From 493ecafed826722ea7579845bf63e3eacf89b633 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 18:34:24 -0800 Subject: [PATCH 001/428] feat(workflow-code): add the workflow-code contract package and sdk scaffold Wave 1 of the code-first workflow core. @sim/workflow-code holds the canonical model, the lock schema with its validator, the block catalog types, the diagnostic codes and code frame, and type-only engine signatures that Wave 2 implements. @sim/workflow-sdk is an empty scaffold for the authoring surface. --- bun.lock | 27 + knip.jsonc | 7 + packages/workflow-code/DESIGN.md | 146 +++++ packages/workflow-code/package.json | 38 ++ packages/workflow-code/src/api.ts | 286 ++++++++++ packages/workflow-code/src/catalog/types.ts | 248 +++++++++ .../workflow-code/src/diagnostics/codes.ts | 256 +++++++++ .../src/diagnostics/frame.test.ts | 67 +++ .../workflow-code/src/diagnostics/frame.ts | 108 ++++ packages/workflow-code/src/index.ts | 118 ++++ packages/workflow-code/src/lock.test.ts | 200 +++++++ packages/workflow-code/src/lock.ts | 521 ++++++++++++++++++ packages/workflow-code/src/model.ts | 335 +++++++++++ packages/workflow-code/tsconfig.json | 8 + packages/workflow-code/vitest.config.ts | 11 + packages/workflow-sdk/README.md | 31 ++ packages/workflow-sdk/package.json | 22 + packages/workflow-sdk/src/.gitkeep | 0 packages/workflow-sdk/tsconfig.json | 8 + 19 files changed, 2437 insertions(+) create mode 100644 packages/workflow-code/DESIGN.md create mode 100644 packages/workflow-code/package.json create mode 100644 packages/workflow-code/src/api.ts create mode 100644 packages/workflow-code/src/catalog/types.ts create mode 100644 packages/workflow-code/src/diagnostics/codes.ts create mode 100644 packages/workflow-code/src/diagnostics/frame.test.ts create mode 100644 packages/workflow-code/src/diagnostics/frame.ts create mode 100644 packages/workflow-code/src/index.ts create mode 100644 packages/workflow-code/src/lock.test.ts create mode 100644 packages/workflow-code/src/lock.ts create mode 100644 packages/workflow-code/src/model.ts create mode 100644 packages/workflow-code/tsconfig.json create mode 100644 packages/workflow-code/vitest.config.ts create mode 100644 packages/workflow-sdk/README.md create mode 100644 packages/workflow-sdk/package.json create mode 100644 packages/workflow-sdk/src/.gitkeep create mode 100644 packages/workflow-sdk/tsconfig.json diff --git a/bun.lock b/bun.lock index 01773fa57c9..bcbb4714543 100644 --- a/bun.lock +++ b/bun.lock @@ -842,6 +842,21 @@ "vitest": "^5.1.0", }, }, + "packages/workflow-code": { + "name": "@sim/workflow-code", + "version": "0.1.0", + "dependencies": { + "@babel/parser": "7.29.9", + "@sim/utils": "workspace:*", + "@sim/workflow-types": "workspace:*", + }, + "devDependencies": { + "@sim/tsconfig": "workspace:*", + "@xyflow/react": "12.12.1", + "typescript": "^7.0.2", + "vitest": "^5.1.0", + }, + }, "packages/workflow-persistence": { "name": "@sim/workflow-persistence", "version": "0.1.0", @@ -893,6 +908,14 @@ "streamdown": ">=2.5.0", }, }, + "packages/workflow-sdk": { + "name": "@sim/workflow-sdk", + "version": "0.1.0", + "devDependencies": { + "@sim/tsconfig": "workspace:*", + "typescript": "^7.0.2", + }, + }, "packages/workflow-types": { "name": "@sim/workflow-types", "version": "0.1.0", @@ -2062,10 +2085,14 @@ "@sim/utils": ["@sim/utils@workspace:packages/utils"], + "@sim/workflow-code": ["@sim/workflow-code@workspace:packages/workflow-code"], + "@sim/workflow-persistence": ["@sim/workflow-persistence@workspace:packages/workflow-persistence"], "@sim/workflow-renderer": ["@sim/workflow-renderer@workspace:packages/workflow-renderer"], + "@sim/workflow-sdk": ["@sim/workflow-sdk@workspace:packages/workflow-sdk"], + "@sim/workflow-types": ["@sim/workflow-types@workspace:packages/workflow-types"], "@sindresorhus/is": ["@sindresorhus/is@4.6.0", "", {}, "sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw=="], diff --git a/knip.jsonc b/knip.jsonc index 59a0adb29b9..dbfb3763a54 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -175,6 +175,13 @@ "entry": ["src/index.ts", "src/runtime.ts", "scripts/*.ts"] }, "packages/sim-setup": { "includeEntryExports": false }, + // The workflow-code contract is built ahead of its consumers (the catalog projection, the + // source use cases and @sim/workflow-sdk codegen), and the parser lands with its compiler. + // Remove both settings once those import it. + "packages/workflow-code": { + "includeEntryExports": false, + "ignoreDependencies": ["@babel/parser", "@sim/utils"] + }, // This shared config is consumed by apps that own the Next dependency. "packages/tsconfig": { "ignoreUnresolved": ["next"] } } diff --git a/packages/workflow-code/DESIGN.md b/packages/workflow-code/DESIGN.md new file mode 100644 index 00000000000..dc4aa78a0c7 --- /dev/null +++ b/packages/workflow-code/DESIGN.md @@ -0,0 +1,146 @@ +# @sim/workflow-code: contract decisions + +Wave 1 wrote the types every engine builds against. The reconciled build spec wins where it +speaks; this file records the choices it left open. Change a contract type only with the +agreement of every lane that consumes it. + +## Layout + +| Module | Owner | State | +|---|---|---| +| `src/model.ts` | Wave 1 | types | +| `src/lock.ts` | Wave 1 | types + `parseWorkflowLock` (real) | +| `src/catalog/types.ts` | Wave 1 | types | +| `src/diagnostics/codes.ts` | Wave 1 | types | +| `src/diagnostics/frame.ts` | Wave 1 | types + `codeFrame` (real) | +| `src/api.ts` | Wave 1 | engine signatures, type-only | +| `src/catalog/canonical-index.ts`, `src/canonicalize/*` | 2B | | +| `src/print/*` | 2C | | +| `src/compile/*`, `src/code-files/*` | 2D | | +| `src/proof/*` | 2G | | +| `src/materialize/*`, `src/equivalence.ts` | Wave 3 | | + +Each engine implements its `api.ts` type, e.g. +`export const compileWorkflow: CompileWorkflowFn = (input) => { ... }`, and adds its runtime +export to `src/index.ts`. `api.ts` stays type-only, so an unimplemented engine fails to import +instead of failing at run time. + +## Model + +1. **No separate draft type.** The CWM has no ids, so it is already name-keyed. `compileWorkflow` + returns a `CanonicalWorkflow`; ids bind only in materialize. s3's `CanonicalWorkflowDraft` + maps onto it as follows: `meta`, `variables`, `blocks[].params`, `branches`, `edges` and + `annotations` all exist. `options.enabled/errorEnabled/retry/locked` map to `enabled`, + `errorPort`, `retry` and `locked`. `unknown` maps to `opaque`. +2. **`meta` is in the CWM** (`name`, `description`). The workflow row holds them, not + `WorkflowState`, so canonicalize takes them as input. `diffCanonical` reports changes. Wave 3 + decides whether apply writes them. +3. **`annotations` is in the CWM but never semantic.** `inactive` (build-spec decision 2) and + `comments` (decision 10) live there. Every equality, hash, diff and fingerprint ignores them. + s1's `Annotations.references` was dropped: the printer tokenizes strings itself (s3 D4). +4. **A stored `null` param is absent** (s3 requirement d). `''` is kept. +5. **`SimNode` has two more variants than s1.** The first is `{ $sim: 'literal', value }`: it + escapes a stored object that already has a `$sim` key, so the encoding stays a bijection. The + second: `unresolved.kind` may be `'var'`. +6. **`ResourceKind` is a closed union**: `credential`, `table`, `knowledgeBase`, `workflow`, + `skill`, `customTool`, `mcpServer`, `sandbox`, `file`, `folder`. A new kind is a contract + change. +7. **Ports use s1's names.** The default port is `out`, not s3's `source`. `PortKey` is the + string form used for edge sorting and `edges:` anchors: `out`, `error`, `branch:`, + `subflowStart`, `subflowEnd` or `raw:`. Edges sort by `(from, portKey, to)` with + `compareStrings`. + +## Lock + +8. **The lock has two halves.** The first, `LockIdentity`, holds ids, type, name, parent, branches + and items. Canonicalize derives it and materialize returns it, and the fingerprint hashes it. + The second, `WorkflowLockBlock`, adds `binding`, `order`, `contentHash`, `layout` and + `codeFile`. The source use case assembles the full `WorkflowLockV1` from identity plus + print/compile `LockHints` plus `workflowId`/`catalogHash`/fingerprint. Canonicalize does not + return a full lock: it cannot know the fingerprint, which hashes its own output. +9. **`codeFile` is per block**, not a top-level `codeFiles` map keyed by id (s3). +10. **`LockHints` are keyed by block key** (s3 keyed them by id): neither print nor compile sees + ids. They hold the same fields `workflow.code_meta` will store (decision 6). +11. **`order` is not unique.** Ties fall back to the key, so a lock merged from two branches + stays valid. +12. **The validator is strict.** It rejects any unknown field. Keys must already be in + normalized form and must match `normalizeWorkflowBlockName(name)` or that name's `~n` + collision form. `binding` must be a non-reserved identifier, unique in the lock. Ids must be + unique per scope: blocks, variables, branches within a block, items within a subBlock. + Parents must exist and must not form a cycle. `contentHash` is 64 lowercase hex characters, + and `baseFingerprint` is `sf1:` plus 64 lowercase hex characters. `codeFile` must be a + normalized relative POSIX path. Every problem is reported at once, with an RFC 6901 `path`. + A string input is parsed as JSON text. + +## Diagnostics + +13. **The prefix fixes severity, and the type enforces it.** `E_` is an error, `W_` a warning, `I_` + info. `Diagnostic` is a union over codes, so a mismatched severity does not type-check. + Because of this, s3's `E_FIELD_NOT_APPLICABLE` is renamed **`W_FIELD_NOT_APPLICABLE`** + (build-spec decision 2 makes it a warning). +14. **Stage segments.** Compile and print codes have no stage segment and keep s3's names. The + other stages use `LOCK_`, `CANON_`, `MAT_` and `APPLY_`. The engine's `SkippedItemType` + values become `E_APPLY_` (`duplicate_trigger` becomes `E_APPLY_DUPLICATE_TRIGGER`). + s4's extra codes map as follows: + - `credential_unreachable` and `sandbox_plan_required` are errors; + - `hosted_key_dropped`, `value_normalized`, `sunset_block`, `type_changed` and + `pending_connections_dropped` are warnings; + - `lock_id_claimed` became `W_MAT_LOCK_ID_CLAIMED`. +15. **Codes added beyond s3 §4**, because the grammar implies them: + - syntax and limits: `E_WORKFLOW_EXPORT`, `E_LIMIT_EXCEEDED`; + - scope: `E_UNKNOWN_VARIABLE`, `E_DUPLICATE_VARIABLE`, `E_INVALID_ENV_NAME`, + `E_UNKNOWN_LOOP_PROPERTY`, `W_FORWARD_REF`; + - branches: `E_UNKNOWN_BRANCH`, `E_DUPLICATE_BRANCH_KEY`, `E_BRANCH_ELSE_LAST`; + - modes: `E_MODE_CONFLICT`, `W_INACTIVE_IS_ACTIVE`; + - code files and handles: `E_CODE_FILE_MISSING`, `E_CODE_FILE_PATH`, `W_CODE_FILE_INLINED`, + `W_RAW_HANDLE`. + + Add a code to `codes.ts` rather than reusing one with a different meaning. +16. **Location is grouped.** Instead of flat line and column fields, a diagnostic carries + `span: SourceSpan`: file, 1-based line and column in UTF-16 units, end, and UTF-16 offsets + `start`/`end`. It also carries `frame` and `fix` (offsets into `span.file`). Compile returns + `LocatedDiagnostic`, which always has `span` and `frame`. Lock diagnostics carry `path` + instead. Babel reports 0-based columns: add 1. +17. **`codeFrame` scope.** It shows two context lines around the span's start line. Every line + inside the span gets `>`, and the caret row sits under the start line only. It splits lines + the way Babel does (CRLF, LF, CR, U+2028, U+2029), so line numbers agree with Babel `loc`. + +## Catalog + +18. **Fields added to s1's shape:** + - `CatalogBlock.graph`: `canBeTarget`, `errorPort`, `container`, `annotationOnly`, and the + `branches` subBlock; + - `CatalogBlock.dynamicOutputs` and `singleInstance`; + - `CatalogSubBlock.surface`, which separates the action and trigger copies of one id. +19. **`valueKind`** is one of `string | number | boolean | array | object | json | code | + branches | tools | resource | picked | upload | none`. `resource`, `picked` and `upload` are + the selector kinds, so a pair member of those kinds is the basic member (build-spec + decision 7). `resourceKind` is set iff `valueKind` is `resource`. +20. **`options` can be opaque.** It is a static list, `{ dynamic: true }` (fetched through a + selector), or `{ opaque: true }` (an unevaluated function). +21. **`builders` are keyed by dotted SDK path** (`slack.sendMessage`, `trigger.gmail.newEmail`). + `fixed` never repeats `operation`. + +## Engines + +22. **`IdentityEntry` is a union on `status`** (`matched` / `created` / `deleted`), not s1's + flat `change` + `via`. A rename, a retype and a reparent can happen together. + `created.idSource` replaces s4's `mintedIds`. +23. **`diffCanonical` takes an optional `renames`** map (target key → base key) from identity + resolution. Without it, a rename shows up as a remove plus an add. +24. **`MaterializeHooks.initBlock`** receives `{ id, type, name, triggerMode }`. +25. **Hashing is unsolved: there is no SHA-256 to use.** `@sim/utils` has none, and `node:crypto` + is banned by the boundary rule. The equivalence owner adds one pure-JS SHA-256 inside this + package; `canonicalHash`, `contentHash` and `sourceFingerprint` all use it, and output is + lowercase hex. + +## Package wiring + +- `tsconfig.json` sets `"types": []`, so no Node globals type-check here. +- `@xyflow/react` is a devDependency only so `@sim/workflow-types`' `Edge` import type-checks. +- `check:boundaries` rule 3 keeps `src/` (minus tests) free of Node built-ins (even type-only + imports), dynamic `import()`, `require`, and value references to `eval` or `Function`. +- `knip.jsonc` sets `includeEntryExports: false` and ignores `@babel/parser` and `@sim/utils` + until consumers and the compiler land. Remove both settings then. +- `@sim/workflow-sdk` is a scaffold with no `exports`, `type-check` or `test` script until 2E + adds code. Its runtime entry is planned as `src/runtime.ts`, not s2's `runtime.js`. diff --git a/packages/workflow-code/package.json b/packages/workflow-code/package.json new file mode 100644 index 00000000000..1a417537c11 --- /dev/null +++ b/packages/workflow-code/package.json @@ -0,0 +1,38 @@ +{ + "name": "@sim/workflow-code", + "version": "0.1.0", + "private": true, + "sideEffects": false, + "type": "module", + "license": "Apache-2.0", + "engines": { + "bun": ">=1.4.4", + "node": ">=20.0.0" + }, + "exports": { + ".": { + "types": "./src/index.ts", + "default": "./src/index.ts" + } + }, + "scripts": { + "type-check": "tsc --noEmit", + "lint": "biome check --write --unsafe .", + "lint:check": "biome check .", + "format": "biome format --write .", + "format:check": "biome format .", + "test": "vitest run", + "test:watch": "vitest" + }, + "dependencies": { + "@babel/parser": "7.29.9", + "@sim/utils": "workspace:*", + "@sim/workflow-types": "workspace:*" + }, + "devDependencies": { + "@sim/tsconfig": "workspace:*", + "@xyflow/react": "12.12.1", + "typescript": "^7.0.2", + "vitest": "^5.1.0" + } +} diff --git a/packages/workflow-code/src/api.ts b/packages/workflow-code/src/api.ts new file mode 100644 index 00000000000..96323b3daf3 --- /dev/null +++ b/packages/workflow-code/src/api.ts @@ -0,0 +1,286 @@ +/** + * Signatures of the engines Wave 2 and Wave 3 implement, one module each. Type-only: there is no + * runtime stub, so an import of an unimplemented engine fails to resolve instead of failing at + * run time. Each implementation declares itself against its type, for example + * `export const canonicalize: CanonicalizeFn = (state, options) => { ... }`. + */ + +import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' +import type { BlockCatalog } from './catalog/types' +import type { + CanonicalizeDiagnosticCode, + CompileDiagnosticCode, + MaterializeDiagnosticCode, + PrintDiagnosticCode, +} from './diagnostics/codes' +import type { Diagnostic, LocatedDiagnostic, SourceSpan } from './diagnostics/frame' +import type { + LockIdentity, + LockLayout, + SourceFingerprint, + WorkflowLockBlock, + WorkflowLockV1, +} from './lock' +import type { + AnchorKey, + BlockKey, + CanonicalEdge, + CanonicalParamId, + CanonicalWorkflow, + CanonicalWorkflowMeta, + ResourceKind, + SubBlockId, + VarKey, +} from './model' + +/** + * Maps workspace resources between internal ids and stable keys. Implemented server-side over the + * workspace's tables, knowledge bases, credentials (bindings) and so on; `null` when there is no + * mapping. + */ +export interface ResourceKeyResolver { + toKey(kind: ResourceKind, id: string): string | null + toId(kind: ResourceKind, key: string): string | null +} + +export interface CanonicalizeOptions { + catalog: BlockCatalog + /** The workflow row's name and description, which `WorkflowState` does not carry. */ + meta: CanonicalWorkflowMeta + /** Supplies branch keys by row id (build-spec decision 5); never changes block keys. */ + lock?: WorkflowLockV1 | null + resources?: ResourceKeyResolver +} + +export interface CanonicalizeResult { + workflow: CanonicalWorkflow + /** Key → id for every block, branch, item and variable in `workflow`. */ + identity: LockIdentity + /** Stored positions by key, for the lock. Not part of the CWM. */ + layout: Record + diagnostics: Diagnostic[] +} + +/** + * Projects a stored, already-migrated graph to the CWM (s1 §2 algorithm; migrations stay + * server-side, s1 D7). Pure and total: problems become diagnostics, never throws. + */ +export type CanonicalizeFn = ( + state: WorkflowState, + options: CanonicalizeOptions +) => CanonicalizeResult + +/** Server callbacks materialize needs; implemented in `apps/sim/lib/workflows/code/`. */ +export interface MaterializeHooks { + /** A fresh block with editor defaults, wrapping editing/builders (s1 §3). */ + initBlock(input: { id: string; type: string; name: string; triggerMode: boolean }): BlockState + /** Stored `outputs` for a new or changed block, wrapping `getEffectiveBlockOutputs` (s1 D6). */ + computeOutputs(block: BlockState): BlockState['outputs'] + /** A new UUID for a block, branch row, item or variable. */ + newId(): string +} + +/** How identity rule matched a compiled block to a stored one (s1 §4, rules 1–4). */ +export type IdentityMatchRule = 'lock-key' | 'lock-binding' | 'db-name' | 'inferred' + +/** One block's identity outcome, for plan output and audit. */ +export type IdentityEntry = + | { + status: 'matched' + key: BlockKey + id: string + via: IdentityMatchRule + /** Set when the display name changed. */ + renamedFrom?: string + /** Set for a catalog `sunset.replacedBy` retype that keeps the id. */ + retypedFrom?: string + /** Set when the parent changed; `null` means it was at the root. */ + reparentedFrom?: BlockKey | null + } + | { + status: 'created' + key: BlockKey + id: string + /** `lock` when the lock's id was unclaimed and reused, else `minted` (s4 §2 step 5). */ + idSource: 'lock' | 'minted' + } + | { status: 'deleted'; key: BlockKey; id: string } + +export interface MaterializeOptions { + catalog: BlockCatalog + hooks: MaterializeHooks + /** The stored graph being replaced. Absent for a new workflow. */ + prev?: WorkflowState + resources?: ResourceKeyResolver + /** + * `preserve` (default): existing blocks keep prev positions; lock layout applies only to new + * blocks. `lock`: lock layout applies to every block that has one (s4 D3). + */ + layout?: 'preserve' | 'lock' + /** Disables identity rule 4 (`--no-infer-renames`). */ + inferRenames?: boolean +} + +export interface MaterializeResult { + state: WorkflowState + identity: LockIdentity + entries: IdentityEntry[] + /** New blocks with neither a prev nor a lock position, for targeted autolayout (s4 D4). */ + needsLayout: BlockKey[] + diagnostics: Diagnostic[] +} + +/** + * Writes a CWM back to a stored graph. Every param whose canonical form equals prev's keeps + * prev's raw value, so a no-op round trip is byte-identical (build-spec decision 1, s1 D1). + * Server-owned fields come from prev by id (s1 D6). + */ +export type MaterializeFn = ( + workflow: CanonicalWorkflow, + lock: WorkflowLockV1 | null, + options: MaterializeOptions +) => MaterializeResult + +/** Structural equality ignoring `annotations`, key order and edge order (s1 quirk 28). */ +export type CanonicalEqualsFn = (a: CanonicalWorkflow, b: CanonicalWorkflow) => boolean + +/** Lowercase hex SHA-256 over a stable serialization of the CWM minus `annotations`. */ +export type CanonicalHashFn = (workflow: CanonicalWorkflow) => string + +/** Block-level fields a diff can name, besides params and modes. */ +export type BlockAttribute = + | 'name' + | 'type' + | 'parent' + | 'enabled' + | 'locked' + | 'triggerMode' + | 'advancedMode' + | 'errorPort' + | 'retry' + | 'branches' + | 'subflow' + | 'opaque' + +export type BlockChange = + | { kind: 'param'; param: SubBlockId } + | { kind: 'mode'; canonicalParamId: CanonicalParamId } + | { kind: 'attribute'; attribute: BlockAttribute } + +export interface CanonicalBlockDiff { + /** The target key; equals the base key unless the block was renamed. */ + key: BlockKey + baseKey: BlockKey + changes: BlockChange[] +} + +/** A key-based diff of two CWMs. The apply path turns it into s4's id-based summary. */ +export interface CanonicalDiff { + /** True iff every other field is empty. */ + noop: boolean + meta: Array + blocks: { + added: BlockKey[] + removed: BlockKey[] + /** Pairs from `renames`; each also appears in `modified` (with a `name` change). */ + renamed: Array<{ from: BlockKey; to: BlockKey }> + modified: CanonicalBlockDiff[] + } + edges: { added: CanonicalEdge[]; removed: CanonicalEdge[] } + variables: { added: VarKey[]; removed: VarKey[]; modified: VarKey[] } +} + +/** + * Diffs base against target. `renames` (target key → base key, from identity resolution) pairs + * blocks whose key changed; without it a rename is a remove plus an add. + */ +export type DiffCanonicalFn = ( + base: CanonicalWorkflow, + target: CanonicalWorkflow, + renames?: ReadonlyMap +) => CanonicalDiff + +/** + * Per-block print hints: the parts of the lock (or of `workflow.code_meta`, build-spec + * decision 6) the printer reads and the compiler reports. Keyed by block key, since neither stage + * sees ids. + */ +export type LockHintBlock = Partial> + +export interface LockHints { + blocks: Record +} + +/** Caps on hostile input (s4 D7). Defaults are the compile module's. */ +export interface CompileLimits { + maxBytes?: number + maxNodes?: number + maxDepth?: number +} + +export interface CompileInput { + entry: { path: string; text: string } + /** Function-code files by repo-relative path; the caller does the I/O. */ + files: ReadonlyMap + catalog: BlockCatalog + /** The highest `@sim-sdk` major the caller supports. */ + sdkMajor: number + limits?: CompileLimits +} + +export interface CompileResult { + /** `null` iff any diagnostic is an error. Name-keyed, like every CWM: ids bind in materialize. */ + workflow: CanonicalWorkflow | null + diagnostics: LocatedDiagnostic[] + /** Where each anchor sits, to map later server findings back to lines. */ + spans: Partial> + /** Bindings as written, `order` as declaration index, and code files, for the lock. */ + hints: LockHints + /** The header's major, or `null` when the header is missing. */ + sdkMajor: number | null +} + +/** Statically interprets a workflow source file. Never executes it (s3 D2, s4 D7). */ +export type CompileWorkflowFn = (input: CompileInput) => CompileResult + +export interface PrintOptions { + /** `files`: function code in `codeDir` files (repo mode); `inline`: `js``...``. */ + functionCode: 'inline' | 'files' + /** Repo-relative directory for code files; required when `functionCode` is `files`. */ + codeDir?: string + /** Defaults to 100 (biome.json). */ + lineWidth?: number +} + +export interface PrintInput { + workflow: CanonicalWorkflow + catalog: BlockCatalog + hints?: LockHints + options: PrintOptions +} + +export interface PrintedFile { + path: string + text: string +} + +export interface PrintResult { + /** The workflow file first, then code files. */ + files: [PrintedFile, ...PrintedFile[]] + /** Input hints plus a binding, order and code file for every block. */ + hints: LockHints + diagnostics: Diagnostic[] +} + +/** Prints a CWM as a source file. Its output always compiles with zero errors (s3 D12). */ +export type PrintWorkflowFn = (input: PrintInput) => PrintResult + +/** + * `sf1:` + SHA-256 over the CWM minus annotations and layout, plus the lock ids, variables and + * locked flags (build-spec decision 11, s4 D3). Layout is excluded so a canvas drag never fails a + * push. + */ +export type SourceFingerprintFn = ( + workflow: CanonicalWorkflow, + identity: LockIdentity +) => SourceFingerprint diff --git a/packages/workflow-code/src/catalog/types.ts b/packages/workflow-code/src/catalog/types.ts new file mode 100644 index 00000000000..9ab55eb5794 --- /dev/null +++ b/packages/workflow-code/src/catalog/types.ts @@ -0,0 +1,248 @@ +/** + * The block catalog: a JSON projection of the block, trigger and tool registries that the + * compiler, printer, canonicalizer and SDK codegen read instead of the registries themselves + * (s1 §2 `BlockCatalog`, build-spec decision 14). It is pure data: every function in a registry + * definition is either evaluated once per deployment by the projection or marked + * `{ opaque: true }`. + * + * Served as a hashed core shard plus per-block docs shards; fields marked "docs shard" are absent + * from the core shard. + */ + +import type { OutputCondition, PrimitiveValueType, SubBlockType } from '@sim/workflow-types/blocks' +import type { CanonicalParamId, Json, ParamStorage, ResourceKind, SubBlockId } from '../model' + +/** A function-form condition or option list the projection could not evaluate to data. */ +export interface OpaqueMarker { + opaque: true +} + +/** The object form of a registry subBlock condition (apps/sim/blocks/types.ts:428-448). */ +export interface SubBlockConditionClause { + field: SubBlockId + value: string | number | boolean | Array + not?: boolean + and?: { + field: SubBlockId + value: string | number | boolean | Array | undefined + not?: boolean + } +} + +/** + * A visibility condition. Function conditions (19 in the registry, s1 §8) become + * `{ opaque: true }`, which counts as active for `inactive` (s1 canonicalize step 9). + */ +export type CatalogCondition = SubBlockConditionClause | OpaqueMarker + +/** + * How a value for this subBlock is written in source and checked by `W_VALUE_KIND`, derived from + * the subBlock type (build-spec decision 14; s2 §2 mapping table): + * - `string`, `number`, `boolean`, `array`, `object`, `json`: plain JSON of that shape. + * - `code`: a code body (`code` subBlock, non-JSON language), printed `js```/`py```/`sh```. + * - `branches`: condition-input / router-input, lifted into named branches. + * - `tools`: tool-input lists. + * - `resource`: a workspace resource by key (`resourceKind` says which). Selector-kind, so a pair + * member of this kind is the basic member (build-spec decision 7). + * - `picked`: an opaque provider id from a remote selector (`picked('C0123')`); basic. + * - `upload`: a workspace file upload (`upload('path')`); basic. + * - `none`: display-only or server-managed (text, schedule-info, webhook-config, modal); never + * written in source. + */ +export type CatalogValueKind = + | 'string' + | 'number' + | 'boolean' + | 'array' + | 'object' + | 'json' + | 'code' + | 'branches' + | 'tools' + | 'resource' + | 'picked' + | 'upload' + | 'none' + +/** Structured subBlock types whose stored JSON canonicalize decodes (s1 canonicalize step 3). */ +export type CatalogStructuredKind = 'tools' | 'branches' | 'tableRows' | 'inputFormat' | 'variables' + +export interface CatalogOption { + id: string + label: string +} + +export interface CatalogSubBlock { + id: SubBlockId + type: SubBlockType + title?: string + mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' + canonicalParamId?: CanonicalParamId + /** + * Which declaration of a duplicated id this is. Action and trigger copies of one id coexist + * (canonical/block-spec.ts:35-63, s1 quirk 14); the catalog keeps both. + */ + surface?: 'action' | 'trigger' + condition?: CatalogCondition + required?: boolean | CatalogCondition + /** UI clearing and fetch ordering only; never part of types or visibility (s2 §2). */ + dependsOn?: { all: SubBlockId[]; any: SubBlockId[] } + defaultValue?: Json + /** The registry `value()` thunk: a constant when it ignores its params, else `computed`. */ + valueDefault?: { constant: Json } | { computed: true } + /** + * Static options; `dynamic` when fetched through `selectorKey`/`fetchOptions`; `opaque` for a + * function the projection could not evaluate (build-spec decision 14). + */ + options?: CatalogOption[] | { dynamic: true } | OpaqueMarker + hidden?: boolean + readOnly?: boolean + password?: boolean + hideFromCopilot?: boolean + context?: 'tool-input' + paramVisibility?: string + emptyIsValid?: boolean + language?: string + multiple?: boolean + min?: number + max?: number + selectorKey?: string + serviceId?: string + valueKind: CatalogValueKind + /** Set iff `valueKind` is `resource`. */ + resourceKind?: ResourceKind + /** Preferred encoding for a new value; prev's encoding wins when it exists (s1 D1). */ + storage: ParamStorage + structured?: CatalogStructuredKind +} + +/** One output field (`OutputFieldDefinition`, recursively expanded). */ +export interface CatalogOutput { + type: PrimitiveValueType + description?: string + condition?: OutputCondition + hiddenFromDisplay?: boolean + properties?: Record + items?: CatalogOutput +} + +export interface CatalogBlockLifecycle { + hidden?: true + preview?: true + sunset?: { status: 'legacy' | 'deprecated'; replacedBy?: string } +} + +/** A registry `subBlocks` id rename applied by load-time migrations, for CLI hints (s1 D7). */ +export interface CatalogLegacyId { + from: SubBlockId + to: SubBlockId | null + whenOperation?: string[] + conditional?: true +} + +/** Graph facts compile needs and the registry spreads over several helpers. */ +export interface CatalogBlockGraph { + /** False for trigger-category blocks: nothing may connect into them (`E_TARGET_TRIGGER`). */ + canBeTarget: boolean + /** Whether the block exposes an error port (`E_ERROR_PORT_UNSUPPORTED`). */ + errorPort: boolean + /** `loop` / `parallel` for containers, else `null`. */ + container: 'loop' | 'parallel' | null + /** The note block: no edges at all (`isWorkflowAnnotationOnlyBlockType`). */ + annotationOnly: boolean + /** The subBlock lifted into named branches, for condition and router blocks. */ + branches?: { subBlockId: SubBlockId; kind: 'condition' | 'router' } +} + +export interface CatalogBlock { + type: string + name: string + category: 'blocks' | 'tools' | 'triggers' + lifecycle?: CatalogBlockLifecycle + triggerAllowed?: boolean + triggers?: { enabled: boolean; available: string[] } + /** Only one instance per workflow (`duplicate_single_instance_block` gate). */ + singleInstance?: boolean + /** Declared order (the printer's param order), duplicates kept (s1 quirk 14). */ + subBlocks: CatalogSubBlock[] + /** + * `operation`: the tool is chosen by the operation dropdown; `opaque`: by a + * `tools.config.tool` function the projection cannot evaluate. + */ + tools: { access: string[]; selector: 'single' | 'operation' | 'opaque' } + inputs: Record + outputs: Record + /** + * Outputs derived from params at run time (agent `responseFormat`, start `inputFormat`, HITL + * form, table rows), so any path is allowed and `W_UNKNOWN_OUTPUT_PATH` is skipped. + */ + dynamicOutputs: boolean + graph: CatalogBlockGraph + legacyIds?: CatalogLegacyId[] + legacyCanonicalIds?: Array<{ from: CanonicalParamId; to: CanonicalParamId }> + /** Present for per-org `custom_block_` types. */ + custom?: { sourceWorkflowId?: string } + /** Docs shard. */ + description?: string +} + +export interface CatalogTrigger { + id: string + provider: string + name: string + polling?: boolean + webhook?: boolean + /** Namespaced as `getTrigger()` returns them (triggers/index.ts:10-63). */ + subBlocks: CatalogSubBlock[] + outputs: Record +} + +/** Docs shard. */ +export interface CatalogTool { + id: string + params: Record< + string, + { + type: string + required?: boolean + visibility: 'user-or-llm' | 'user-only' | 'llm-only' | 'hidden' + default?: Json + description?: string + } + > + outputs: Record +} + +/** + * One SDK builder method, keyed in `BlockCatalog.builders` by its dotted SDK path + * (`slack.sendMessage`, `trigger.gmail.newEmail`). Method names are frozen in + * `apps/sim/blocks/sdk-names.json` (build-spec decision 7). + */ +export interface CatalogBuilder { + /** The registry block type the builder creates. */ + type: string + /** The stored `operation` dropdown id the builder pins (unchanged by renames). */ + operation?: string + /** True for trigger-mode builders. */ + triggerMode?: boolean + /** + * Other subBlock values the builder pins, such as `selectedTriggerId`. Writing `operation` or a + * key here in source is `E_FIXED_PARAM`. + */ + fixed?: Record +} + +export interface BlockCatalog { + catalogVersion: 1 + /** Content hash of the core shard; the ETag and `lock.catalogHash`. */ + hash: string + /** The SDK major this catalog serves (`// @sim-sdk N`). */ + sdkMajor: number + blocks: Record + triggers: Record + builders: Record + /** Docs shard. */ + tools?: Record + /** Present when the catalog includes an organization's custom blocks. */ + scope?: { organizationId: string } +} diff --git a/packages/workflow-code/src/diagnostics/codes.ts b/packages/workflow-code/src/diagnostics/codes.ts new file mode 100644 index 00000000000..3c2dcc13d0a --- /dev/null +++ b/packages/workflow-code/src/diagnostics/codes.ts @@ -0,0 +1,256 @@ +/** + * Every diagnostic code `@sim/workflow-code` and the source apply path can emit. Codes are stable + * wire values: CLI output, the copilot and tests match on them, so never rename one; retire it. + * + * The first letter fixes the severity (`E_` error, `W_` warning, `I_` info; see + * {@link SeverityOf}). The segment after it names the stage that owns the code: + * - no stage segment: compile (s3 §4) and print, which share one vocabulary; + * - `LOCK_`: `parseWorkflowLock`; + * - `CANON_`: canonicalize (s1 §2, §5); + * - `MAT_`: materialize and identity resolution (s1 §4); + * - `APPLY_`: the server apply pipeline and its gates (s4 §2, build-spec decision 11). + */ + +/** Syntax, header and file-shape errors from compile (s3 §4 "Accepted grammar"). */ +export type CompileSyntaxCode = + /** A Babel parse error, re-coded. */ + | 'E_SYNTAX' + /** The first line is not `// @sim-sdk N`. */ + | 'E_SDK_HEADER' + /** The header's major is above the server's supported major. */ + | 'E_SDK_MAJOR' + /** A construct outside the accepted grammar; `hint` names the supported form (s3 §4 table). */ + | 'E_UNSUPPORTED_SYNTAX' + /** Not exactly one `export default workflow(...)`. */ + | 'E_WORKFLOW_EXPORT' + /** Source exceeds the byte, AST node or depth cap (s4 D7). */ + | 'E_LIMIT_EXCEEDED' + +/** Names, identifiers and scope (s3 §4 "Names and scopes"). */ +export type CompileScopeCode = + | 'E_DUPLICATE_NAME' + | 'E_RESERVED_NAME' + | 'E_EMPTY_NAME' + | 'E_NAME_NOT_LITERAL' + /** Includes a Levenshtein "did you mean" in `hint`. */ + | 'E_UNKNOWN_IDENTIFIER' + /** A ref into a sibling subflow's child. */ + | 'E_OUT_OF_SCOPE' + /** `vars.x` names no declared variable. */ + | 'E_UNKNOWN_VARIABLE' + | 'E_DUPLICATE_VARIABLE' + /** `env.X` where X does not match `PATTERNS.ENV_VAR_NAME` (constants.ts:431). */ + | 'E_INVALID_ENV_NAME' + /** `p.` not in the loop/parallel KNOWN_PROPERTIES (loop.ts:44, parallel.ts:45). */ + | 'E_UNKNOWN_LOOP_PROPERTY' + /** A ref to a block declared later; it resolves, but the order is unusual. */ + | 'W_FORWARD_REF' + +/** Wiring (s3 §4 "Edges", build-spec decision 5). */ +export type CompileEdgeCode = + /** Reuses `getWorkflowEdgeScopeDropReason` (workflow.ts:595). */ + | 'E_EDGE_SCOPE' + /** An edge to or from a note block. */ + | 'E_EDGE_NOTE' + | 'E_TARGET_TRIGGER' + /** `.to()` called directly on a condition or router. */ + | 'E_NO_DEFAULT_OUTPUT' + | 'E_DUPLICATE_EDGE' + | 'E_ERROR_PORT_UNSUPPORTED' + /** `x.key.to()` where `key` is not a branch of `x`. */ + | 'E_UNKNOWN_BRANCH' + | 'E_DUPLICATE_BRANCH_KEY' + /** A branch key equal to an output name, `to` or `onError`. */ + | 'E_BRANCH_KEY_COLLIDES' + /** A condition with two or more rows does not end with `else`. */ + | 'E_BRANCH_ELSE_LAST' + /** `edge(a, 'raw', b)`: an unknown handle kept verbatim. */ + | 'W_RAW_HANDLE' + +/** Checks against the block catalog (s3 §4 "Catalog checks", build-spec decision 2). */ +export type CompileCatalogCode = + | 'E_UNKNOWN_BUILDER' + /** `hint` carries a did-you-mean over the params visible for the chosen operation. */ + | 'E_UNKNOWN_PARAM' + /** The builder already pins this param (`operation` or a `fixed` entry). */ + | 'E_FIXED_PARAM' + /** `meta.modes` contradicts the mode the value kind implies. */ + | 'E_MODE_CONFLICT' + /** + * A param not visible under the block's current values. A warning, not an error, because stale + * hidden values are preserved (build-spec decision 2); s3 called it `E_FIELD_NOT_APPLICABLE`. + */ + | 'W_FIELD_NOT_APPLICABLE' + /** A key under `meta.inactive` that is in fact active. */ + | 'W_INACTIVE_IS_ACTIVE' + /** Includes `todo()` placeholders. */ + | 'W_REQUIRED_MISSING' + /** The value's JSON type differs from the field's `valueKind`; never coerced. */ + | 'W_VALUE_KIND' + /** Skipped when the block's outputs are dynamic. */ + | 'W_UNKNOWN_OUTPUT_PATH' + +/** Function-code files (build-spec decision 9, s3 D6/D7). */ +export type CodeFileCode = + /** `fn('./x.js')` names a file absent from `CompileInput.files`. */ + | 'E_CODE_FILE_MISSING' + /** Not a relative path inside the repo, or the extension does not match the block language. */ + | 'E_CODE_FILE_PATH' + /** The printer's bijection self-check failed; the code was printed inline as `js```. */ + | 'W_CODE_FILE_INLINED' + +/** References and comments, shared by compile and print (build-spec decision 8, s3 §4). */ +export type ReferenceCode = + /** A `` token that resolves to nothing; kept as literal text. */ + | 'W_UNRESOLVED_REF' + /** A ref that would point forward (a ref cycle), printed as literal text (s3 D10). */ + | 'W_FORWARD_REF_LITERALIZED' + /** A comment outside an anchor position, hoisted to the nearest anchor. */ + | 'W_COMMENT_MOVED' + /** A comment whose anchor block no longer exists. */ + | 'W_COMMENT_DROPPED' + +export type CompileDiagnosticCode = + | CompileSyntaxCode + | CompileScopeCode + | CompileEdgeCode + | CompileCatalogCode + | CodeFileCode + | ReferenceCode + +/** Print emits only reference, comment and code-file fallbacks; every print compiles (s3 D12). */ +export type PrintDiagnosticCode = ReferenceCode | 'W_CODE_FILE_INLINED' | 'W_RAW_HANDLE' + +/** `parseWorkflowLock` (lock.ts). */ +export type LockDiagnosticCode = + /** The lock text is not valid JSON. */ + | 'E_LOCK_JSON' + /** `lockVersion` is missing or not `1`. */ + | 'E_LOCK_VERSION' + /** A required field is missing or has the wrong type or format. */ + | 'E_LOCK_SHAPE' + /** A field the schema does not define (typos are caught, not ignored). */ + | 'E_LOCK_UNKNOWN_FIELD' + /** A block or variable key that is not in normalized form, or does not match its name. */ + | 'E_LOCK_KEY' + /** A `binding` that is not a valid, non-reserved JS identifier. */ + | 'E_LOCK_BINDING' + | 'E_LOCK_DUPLICATE_BINDING' + /** The same block, variable or branch id under two keys (s1 §4 "Stale lock"). */ + | 'E_LOCK_DUPLICATE_ID' + /** A `parent` naming no lock block, itself, or forming a cycle. */ + | 'E_LOCK_PARENT' + /** A branch key that is not a JS identifier. */ + | 'E_LOCK_BRANCH' + /** A `codeFile` that is absolute, escapes the repo, or uses backslashes. */ + | 'E_LOCK_CODE_FILE_PATH' + +/** canonicalize (s1 §2 algorithm, §5 quirks). */ +export type CanonicalizeDiagnosticCode = + /** Two stored names normalize to one key; the loser is keyed `key~n` (s1 step 1). */ + | 'E_CANON_LEGACY_NAME_COLLISION' + /** A stored edge crosses subflow scopes (s1 quirk 20, workflow.ts:594-622). */ + | 'E_CANON_EDGE_SCOPE' + /** A stored block name normalizes to a reserved prefix (`loop`, `parallel`, `variable`). */ + | 'W_CANON_RESERVED_NAME' + /** An edge whose source or target block does not exist; dropped. */ + | 'W_CANON_DANGLING_EDGE' + /** An unknown edge handle, kept as a `raw` port. */ + | 'W_CANON_RAW_HANDLE' + /** A block type absent from the catalog; params kept, nothing marked inactive. */ + | 'W_CANON_UNKNOWN_BLOCK_TYPE' + /** An internal id the resolver could not map to a key (`UnresolvedNode`). */ + | 'W_CANON_UNRESOLVED_ID' + /** A stored branch title that disagrees with its positional title (s1 quirk 4). */ + | 'W_CANON_TITLE_OVERRIDE' + /** A loop/parallel config the loader would repair (count 0, type fallback; s1 quirk 19). */ + | 'W_CANON_SUBFLOW_REPAIRED' + /** Stored `subBlock.type` differs from the catalog's, or map key ≠ `subBlock.id` (s1 quirk 29). */ + | 'W_CANON_SUBBLOCK_TYPE_DRIFT' + /** A stored JSON-string field that does not parse; kept as a native string. */ + | 'W_CANON_UNDECODABLE_JSON' + +/** materialize and identity resolution (s1 §4). */ +export type MaterializeDiagnosticCode = + /** Two lock keys carry the same block id. */ + | 'E_MAT_DUPLICATE_LOCK_ID' + /** `lock.workflowId` / `workspaceId` differ from the target workflow. */ + | 'E_MAT_LOCK_WORKFLOW_MISMATCH' + /** A resource key the resolver cannot map to an id in this workspace. */ + | 'E_MAT_UNKNOWN_RESOURCE' + /** A lock entry whose id has left prev; the block is re-created (s1 §4 "Stale lock"). */ + | 'W_MAT_DELETED_SINCE_PULL' + /** Identity rule 4: a lockless rename inferred from type, parent and edge neighbourhood. */ + | 'W_MAT_INFERRED_RENAME' + /** A key match with a different type: delete + create; webhook URL and schedules are lost. */ + | 'W_MAT_RETYPE_RECREATED' + /** A lock-supplied id already belongs to another workflow; a fresh id was minted. */ + | 'W_MAT_LOCK_ID_CLAIMED' + /** A new block with no prev or lock position; it is placed by targeted autolayout. */ + | 'I_MAT_NEEDS_LAYOUT' + +/** + * The server apply pipeline. Gate codes mirror the editing engine's `SkippedItemType` + * (apps/sim/lib/workflows/editing/types.ts `WORKFLOW_SKIPPED_ITEM_TYPES`) minus + * `invalid_edge_target`, as `E_APPLY_`; the rest are s4 §2 additions. The engine + * skips such an item silently, while source apply refuses the whole write (s4 D1, D5). + */ +export type ApplyDiagnosticCode = + /** The base fingerprint no longer matches the stored graph (HTTP 409; s4 D3). */ + | 'E_APPLY_STALE' + /** The diff touches a locked block or a child of a locked container (s4 D2). */ + | 'E_APPLY_PROTECTED_BLOCK' + /** `validateWorkflowState` rejected the materialized graph. */ + | 'E_APPLY_INVALID_STATE' + | 'E_APPLY_BLOCK_NOT_FOUND' + | 'E_APPLY_INVALID_BLOCK_TYPE' + | 'E_APPLY_BLOCK_NOT_ALLOWED' + | 'E_APPLY_MODEL_NOT_ALLOWED' + | 'E_APPLY_BLOCK_LOCKED' + | 'E_APPLY_TOOL_NOT_ALLOWED' + | 'E_APPLY_INVALID_EDGE_SOURCE' + | 'E_APPLY_INVALID_EDGE_SCOPE' + | 'E_APPLY_INVALID_SOURCE_HANDLE' + | 'E_APPLY_INVALID_TARGET_HANDLE' + | 'E_APPLY_INVALID_SUBBLOCK_FIELD' + | 'E_APPLY_MISSING_REQUIRED_PARAMS' + | 'E_APPLY_INVALID_SUBFLOW_PARENT' + | 'E_APPLY_NESTED_SUBFLOW_NOT_ALLOWED' + | 'E_APPLY_DUPLICATE_BLOCK_NAME' + | 'E_APPLY_RESERVED_BLOCK_NAME' + | 'E_APPLY_RETRY_NOT_SUPPORTED' + | 'E_APPLY_DUPLICATE_TRIGGER' + | 'E_APPLY_DUPLICATE_SINGLE_INSTANCE_BLOCK' + | 'E_APPLY_DISABLED_ANCESTOR' + /** A credential the acting user cannot reach. */ + | 'E_APPLY_CREDENTIAL_UNREACHABLE' + /** The sandbox selection needs a plan the workspace does not have. */ + | 'E_APPLY_SANDBOX_PLAN_REQUIRED' + /** A hosted key that does not apply to the acting user was dropped. */ + | 'W_APPLY_HOSTED_KEY_DROPPED' + /** Value validation rewrote a value; the response files are re-printed. */ + | 'W_APPLY_VALUE_NORMALIZED' + /** A block whose type is `legacy` or `deprecated`. */ + | 'W_APPLY_SUNSET_BLOCK' + /** A block's type changed; its id, webhook URL and schedules are replaced. */ + | 'W_APPLY_TYPE_CHANGED' + /** Connections to blocks that did not survive the gates were dropped. */ + | 'W_APPLY_PENDING_CONNECTIONS_DROPPED' + /** A workflow lint finding, mapped to a source line. */ + | 'W_APPLY_LINT' + +export type DiagnosticCode = + | CompileDiagnosticCode + | LockDiagnosticCode + | CanonicalizeDiagnosticCode + | MaterializeDiagnosticCode + | ApplyDiagnosticCode + +export type DiagnosticSeverity = 'error' | 'warning' | 'info' + +/** The severity a code's prefix fixes. */ +export type SeverityOf = C extends `E_${string}` + ? 'error' + : C extends `W_${string}` + ? 'warning' + : 'info' diff --git a/packages/workflow-code/src/diagnostics/frame.test.ts b/packages/workflow-code/src/diagnostics/frame.test.ts new file mode 100644 index 00000000000..5703ba9f950 --- /dev/null +++ b/packages/workflow-code/src/diagnostics/frame.test.ts @@ -0,0 +1,67 @@ +import { describe, expect, it } from 'vitest' +import { codeFrame } from './frame' + +const SEVEN_LINES = ['one', 'two', 'three', 'four', 'five', 'six', 'seven'].join('\n') + +describe('codeFrame', () => { + it('shows two lines of context on each side with a caret under the span', () => { + expect(codeFrame(SEVEN_LINES, { line: 4, column: 2, endLine: 4, endColumn: 4 })).toBe( + [' 2 | two', ' 3 | three', '> 4 | four', ' | ^^', ' 5 | five', ' 6 | six'].join('\n') + ) + }) + + it('clips context at the start and end of the text', () => { + expect(codeFrame(SEVEN_LINES, { line: 1, column: 1 })).toBe( + ['> 1 | one', ' | ^', ' 2 | two', ' 3 | three'].join('\n') + ) + expect(codeFrame(SEVEN_LINES, { line: 7, column: 6 })).toBe( + [' 5 | five', ' 6 | six', '> 7 | seven', ' | ^'].join('\n') + ) + }) + + it('counts CRLF, CR, U+2028 and U+2029 as line breaks the way Babel does', () => { + const text = 'a\r\nb\rc\u2028d\u2029e' + expect(codeFrame(text, { line: 5, column: 1 })).toBe( + [' 3 | c', ' 4 | d', '> 5 | e', ' | ^'].join('\n') + ) + }) + + it('keeps tabs in the caret padding so the caret lines up under tabbed source', () => { + expect(codeFrame('\tx = 1', { line: 1, column: 2, endLine: 1, endColumn: 3 })).toBe( + ['> 1 | \tx = 1', ' | \t^'].join('\n') + ) + }) + + it('measures columns in UTF-16 code units', () => { + expect(codeFrame("'😀' + a", { line: 1, column: 8, endLine: 1, endColumn: 9 })).toBe( + ["> 1 | '😀' + a", ' | ^'].join('\n') + ) + }) + + it('draws one caret for an empty span and runs a multi-line span to the end of its first line', () => { + expect(codeFrame('abc', { line: 1, column: 2, endLine: 1, endColumn: 2 })).toBe( + ['> 1 | abc', ' | ^'].join('\n') + ) + expect(codeFrame('abc\ndef', { line: 1, column: 2, endLine: 2, endColumn: 2 })).toBe( + ['> 1 | abc', ' | ^^', '> 2 | def'].join('\n') + ) + }) + + it('widens the gutter when context crosses into more digits', () => { + const text = Array.from({ length: 11 }, (_, i) => `l${i + 1}`).join('\n') + expect(codeFrame(text, { line: 9, column: 1, endLine: 9, endColumn: 3 })).toBe( + [' 7 | l7', ' 8 | l8', '> 9 | l9', ' | ^^', ' 10 | l10', ' 11 | l11'].join('\n') + ) + }) + + it('clamps a location outside the text instead of throwing', () => { + expect(codeFrame('ab', { line: 9, column: 40 })).toBe(['> 1 | ab', ' | ^'].join('\n')) + expect(codeFrame('', { line: 0, column: 0 })).toBe(['> 1 |', ' | ^'].join('\n')) + }) + + it('never emits ANSI escapes or trailing spaces on empty lines', () => { + const frame = codeFrame('a\n\nb', { line: 3, column: 1 }) + expect(frame).toBe([' 1 | a', ' 2 |', '> 3 | b', ' | ^'].join('\n')) + expect(frame).not.toContain('\u001b') + }) +}) diff --git a/packages/workflow-code/src/diagnostics/frame.ts b/packages/workflow-code/src/diagnostics/frame.ts new file mode 100644 index 00000000000..8c84ac3b02f --- /dev/null +++ b/packages/workflow-code/src/diagnostics/frame.ts @@ -0,0 +1,108 @@ +import type { BlockKey, SubBlockId } from '../model' +import type { DiagnosticCode, SeverityOf } from './codes' + +/** + * A source range. Lines and columns are 1-based and columns count UTF-16 code units, which is + * what editors and Babel report (Babel's `loc.column` is 0-based: add 1). `start`/`end` are + * UTF-16 offsets into the file text, `end` exclusive, as Babel's `node.start`/`node.end`. + */ +export interface SourceSpan { + /** Repo-relative path of the file the span is in. */ + file: string + line: number + column: number + endLine: number + endColumn: number + start: number + end: number +} + +/** A machine-applicable edit in `span.file`: replace `[start, end)` with `text`. */ +export interface DiagnosticFix { + start: number + end: number + text: string +} + +interface DiagnosticFields { + message: string + /** The supported form, or a did-you-mean. */ + hint?: string + span?: SourceSpan + /** `codeFrame(text, span)`; present whenever `span` is. */ + frame?: string + fix?: DiagnosticFix + blockKey?: BlockKey + /** Set by the apply path once identity is resolved (s4 `SourceDiagnostic.blockId`). */ + blockId?: string + param?: SubBlockId + /** RFC 6901 JSON Pointer into a non-source input, such as the lock (`/blocks/agent/binding`). */ + path?: string +} + +/** + * One finding. A union over codes, so `severity` always agrees with the code's prefix: an object + * literal with `code: 'E_SYNTAX'` and `severity: 'warning'` does not type-check. + */ +export type Diagnostic = C extends DiagnosticCode + ? DiagnosticFields & { code: C; severity: SeverityOf } + : never + +/** A diagnostic pinned to source, as every compile diagnostic is. */ +export type LocatedDiagnostic = Diagnostic & { + span: SourceSpan + frame: string +} + +/** Where `codeFrame` points. `endLine`/`endColumn` default to a one-character span. */ +export interface FrameLocation { + line: number + column: number + endLine?: number + endColumn?: number +} + +/** Babel's line terminators (`lineBreak` in @babel/parser): CRLF, LF, CR, U+2028, U+2029. */ +const LINE_BREAK = /\r\n|[\n\r\u2028\u2029]/ +const CONTEXT_LINES = 2 + +function clamp(value: number, min: number, max: number): number { + return Math.min(Math.max(value, min), max) +} + +/** + * Renders a plain-text code frame: the start line of `loc` with two lines of context on each + * side, `>` on every line inside the span, and a caret row under the start line. Carets run to + * `endColumn` when the span ends on the start line, else to the end of that line, and never + * fewer than one. Tabs before the caret are kept so it lines up under tabbed source. A location + * outside the text is clamped, never thrown. No ANSI escapes. + */ +export function codeFrame(text: string, loc: FrameLocation): string { + const lines = text.split(LINE_BREAK) + const line = clamp(Math.trunc(loc.line), 1, lines.length) + const endLine = clamp(Math.trunc(loc.endLine ?? line), line, lines.length) + const source = lines[line - 1] + const column = clamp(Math.trunc(loc.column), 1, source.length + 1) + const caretEnd = + endLine === line + ? clamp(Math.trunc(loc.endColumn ?? column + 1), column + 1, source.length + 2) + : source.length + 1 + const caretCount = Math.max(1, caretEnd - column) + + const first = Math.max(1, line - CONTEXT_LINES) + const last = Math.min(lines.length, line + CONTEXT_LINES) + const width = String(last).length + const blankGutter = ' '.repeat(width) + + const rows: string[] = [] + for (let n = first; n <= last; n++) { + const content = lines[n - 1] + const marker = n >= line && n <= endLine ? '>' : ' ' + rows.push(`${marker} ${String(n).padStart(width)} |${content ? ` ${content}` : ''}`) + if (n === line) { + const padding = source.slice(0, column - 1).replace(/[^\t]/g, ' ') + rows.push(` ${blankGutter} | ${padding}${'^'.repeat(caretCount)}`) + } + } + return rows.join('\n') +} diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts new file mode 100644 index 00000000000..5e09b6fac76 --- /dev/null +++ b/packages/workflow-code/src/index.ts @@ -0,0 +1,118 @@ +export type { + BlockAttribute, + BlockChange, + CanonicalBlockDiff, + CanonicalDiff, + CanonicalEqualsFn, + CanonicalHashFn, + CanonicalizeFn, + CanonicalizeOptions, + CanonicalizeResult, + CompileInput, + CompileLimits, + CompileResult, + CompileWorkflowFn, + DiffCanonicalFn, + IdentityEntry, + IdentityMatchRule, + LockHintBlock, + LockHints, + MaterializeFn, + MaterializeHooks, + MaterializeOptions, + MaterializeResult, + PrintedFile, + PrintInput, + PrintOptions, + PrintResult, + PrintWorkflowFn, + ResourceKeyResolver, + SourceFingerprintFn, +} from './api' +export type { + BlockCatalog, + CatalogBlock, + CatalogBlockGraph, + CatalogBlockLifecycle, + CatalogBuilder, + CatalogCondition, + CatalogLegacyId, + CatalogOption, + CatalogOutput, + CatalogStructuredKind, + CatalogSubBlock, + CatalogTool, + CatalogTrigger, + CatalogValueKind, + OpaqueMarker, + SubBlockConditionClause, +} from './catalog/types' +export type { + ApplyDiagnosticCode, + CanonicalizeDiagnosticCode, + CodeFileCode, + CompileCatalogCode, + CompileDiagnosticCode, + CompileEdgeCode, + CompileScopeCode, + CompileSyntaxCode, + DiagnosticCode, + DiagnosticSeverity, + LockDiagnosticCode, + MaterializeDiagnosticCode, + PrintDiagnosticCode, + ReferenceCode, + SeverityOf, +} from './diagnostics/codes' +export { + codeFrame, + type Diagnostic, + type DiagnosticFix, + type FrameLocation, + type LocatedDiagnostic, + type SourceSpan, +} from './diagnostics/frame' +export { + type LockDiagnostic, + type LockIdentity, + type LockIdentityBlock, + type LockLayout, + type ParseWorkflowLockResult, + parseWorkflowLock, + type SourceFingerprint, + type WorkflowLockBlock, + type WorkflowLockV1, +} from './lock' +export type { + AnchorKey, + BlockKey, + BranchKey, + CanonicalBlock, + CanonicalBranches, + CanonicalBranchRow, + CanonicalEdge, + CanonicalParam, + CanonicalParamId, + CanonicalTool, + CanonicalVariable, + CanonicalWorkflow, + CanonicalWorkflowMeta, + CodeComment, + Json, + LiteralNode, + LoopSpec, + ParallelSpec, + ParamMode, + ParamStorage, + Port, + PortKey, + ResourceKind, + ResourceNode, + SimNode, + SubBlockId, + UnresolvedNode, + Value, + VarKey, + VarNode, + WorkflowAnnotations, +} from './model' diff --git a/packages/workflow-code/src/lock.test.ts b/packages/workflow-code/src/lock.test.ts new file mode 100644 index 00000000000..e5b879989ea --- /dev/null +++ b/packages/workflow-code/src/lock.test.ts @@ -0,0 +1,200 @@ +import { describe, expect, it } from 'vitest' +import { parseWorkflowLock } from './lock' + +const HASH = 'a'.repeat(64) + +function validLock(): Record { + return { + lockVersion: 1, + workflowId: 'wf-1', + workspaceId: 'ws-1', + catalogHash: 'cat-1', + baseFingerprint: `sf1:${'b'.repeat(64)}`, + blocks: { + start: { + id: 'blk-start', + type: 'start_trigger', + name: 'Start', + binding: 'start', + order: 0, + parent: null, + contentHash: HASH, + }, + each: { + id: 'blk-each', + type: 'loop', + name: 'Each', + binding: 'each', + order: 1, + parent: null, + contentHash: HASH, + }, + route: { + id: 'blk-route', + type: 'condition', + name: 'Route', + binding: 'route', + order: 2, + parent: 'each', + contentHash: HASH, + branches: { if: 'blk-route-if', else: 'blk-route-else' }, + items: { inputFormat: { subject: 'field-1' } }, + layout: { x: 10, y: -4.5, w: 200, horizontalHandles: true }, + codeFile: 'functions/route.js', + }, + }, + variables: { retries: 'var-1' }, + } +} + +function codesFor(input: unknown): string[] { + const result = parseWorkflowLock(input) + return result.diagnostics ? result.diagnostics.map((d) => `${d.code} ${d.path ?? ''}`) : [] +} + +function withBlock(key: string, patch: Record): Record { + const lock = validLock() + const blocks = lock.blocks as Record> + blocks[key] = { ...blocks[key], ...patch } + return lock +} + +describe('parseWorkflowLock', () => { + it('accepts a well-formed lock, from an object or from JSON text', () => { + const fromObject = parseWorkflowLock(validLock()) + expect(fromObject.diagnostics).toBeUndefined() + expect(fromObject.lock?.blocks.route.branches).toEqual({ + if: 'blk-route-if', + else: 'blk-route-else', + }) + expect(parseWorkflowLock(JSON.stringify(validLock())).lock).toEqual(fromObject.lock) + }) + + it('rejects text that is not JSON and values that are not objects', () => { + expect(codesFor('{"lockVersion":')).toEqual(['E_LOCK_JSON ']) + expect(codesFor([])).toEqual(['E_LOCK_SHAPE ']) + expect(codesFor(null)).toEqual(['E_LOCK_SHAPE ']) + }) + + it('rejects any lock version but 1 before reading the rest', () => { + expect(codesFor({ ...validLock(), lockVersion: 2, blocks: 'nope' })).toEqual([ + 'E_LOCK_VERSION /lockVersion', + ]) + }) + + it('reports every problem at once with JSON Pointer paths', () => { + const lock = withBlock('route', { binding: 'class', order: -1, contentHash: 'xyz' }) + lock.workflowId = '' + lock.baseFingerprint = 'abc' + expect(codesFor(lock)).toEqual([ + 'E_LOCK_SHAPE /workflowId', + 'E_LOCK_SHAPE /baseFingerprint', + 'E_LOCK_BINDING /blocks/route/binding', + 'E_LOCK_SHAPE /blocks/route/order', + 'E_LOCK_SHAPE /blocks/route/contentHash', + ]) + }) + + it('rejects fields the schema does not define, at every level', () => { + const lock = withBlock('start', { ident: 'start' }) + lock.edges = {} + ;(lock.blocks as Record>).route.layout = { x: 1, y: 2, z: 3 } + expect(codesFor(lock)).toEqual([ + 'E_LOCK_UNKNOWN_FIELD /edges', + 'E_LOCK_UNKNOWN_FIELD /blocks/start/ident', + 'E_LOCK_UNKNOWN_FIELD /blocks/route/layout/z', + ]) + }) + + it('requires keys in normalized form and matching their block name', () => { + const lock = validLock() + const blocks = lock.blocks as Record> + blocks['My Block'] = { ...blocks.start, id: 'blk-x', binding: 'myBlock', name: 'My Block' } + blocks.start.name = 'Begin' + lock.variables = { 'Retry Count': 'var-2' } + expect(codesFor(lock)).toEqual([ + 'E_LOCK_KEY /blocks/start/name', + 'E_LOCK_KEY /blocks/My Block', + 'E_LOCK_KEY /variables/Retry Count', + ]) + }) + + it('accepts the ~n key a legacy name collision is projected to', () => { + const lock = validLock() + const blocks = lock.blocks as Record> + blocks['start~2'] = { ...blocks.start, id: 'blk-start-2', binding: 'start2', order: 3 } + expect(parseWorkflowLock(lock).diagnostics).toBeUndefined() + }) + + it('rejects bindings that are not identifiers or that two blocks share', () => { + expect(codesFor(withBlock('route', { binding: '2fast' }))).toEqual([ + 'E_LOCK_BINDING /blocks/route/binding', + ]) + expect(codesFor(withBlock('route', { binding: 'await' }))).toEqual([ + 'E_LOCK_BINDING /blocks/route/binding', + ]) + expect(codesFor(withBlock('route', { binding: 'start' }))).toEqual([ + 'E_LOCK_DUPLICATE_BINDING /blocks/route/binding', + ]) + }) + + it('allows two blocks to share an order so merged locks stay valid', () => { + expect(parseWorkflowLock(withBlock('route', { order: 0 })).diagnostics).toBeUndefined() + }) + + it('rejects an id used by two blocks, two variables, or two branches of one block', () => { + expect(codesFor(withBlock('route', { id: 'blk-start' }))).toEqual([ + 'E_LOCK_DUPLICATE_ID /blocks/route/id', + ]) + const vars = validLock() + vars.variables = { a: 'var-1', b: 'var-1' } + expect(codesFor(vars)).toEqual(['E_LOCK_DUPLICATE_ID /variables/b']) + expect(codesFor(withBlock('route', { branches: { if: 'x', else: 'x' } }))).toEqual([ + 'E_LOCK_DUPLICATE_ID /blocks/route/branches/else', + ]) + }) + + it('rejects parents that are missing, self-referential, or cyclic', () => { + expect(codesFor(withBlock('route', { parent: 'nowhere' }))).toEqual([ + 'E_LOCK_PARENT /blocks/route/parent', + ]) + expect(codesFor(withBlock('route', { parent: 'route' }))).toEqual([ + 'E_LOCK_PARENT /blocks/route/parent', + ]) + const cyclic = withBlock('each', { parent: 'route' }) + expect(codesFor(cyclic)).toEqual([ + 'E_LOCK_PARENT /blocks/each/parent', + 'E_LOCK_PARENT /blocks/route/parent', + ]) + }) + + it('rejects branch keys that are not identifiers', () => { + expect(codesFor(withBlock('route', { branches: { 'else-if-1': 'x' } }))).toEqual([ + 'E_LOCK_BRANCH /blocks/route/branches/else-if-1', + ]) + }) + + it('rejects code file paths that are absolute, escape the repo, or use backslashes', () => { + for (const codeFile of ['/etc/x.js', '../x.js', 'a/../../x.js', 'fns\\x.js', 'C:/x.js', '']) { + expect(codesFor(withBlock('route', { codeFile })), codeFile).toEqual([ + 'E_LOCK_CODE_FILE_PATH /blocks/route/codeFile', + ]) + } + }) + + it('rejects non-finite layout numbers and malformed item maps', () => { + expect( + codesFor(withBlock('route', { layout: { x: Number.NaN, y: 0 }, items: { inputFormat: [] } })) + ).toEqual([ + 'E_LOCK_SHAPE /blocks/route/items/inputFormat', + 'E_LOCK_SHAPE /blocks/route/layout/x', + ]) + }) + + it('escapes ~ and / in pointer segments', () => { + const lock = validLock() + const blocks = lock.blocks as Record> + blocks['a/b~2'] = { ...blocks.start, id: 'blk-ab', binding: 'ab', name: 'a/b', order: 'x' } + expect(codesFor(lock)).toEqual(['E_LOCK_SHAPE /blocks/a~1b~02/order']) + }) +}) diff --git a/packages/workflow-code/src/lock.ts b/packages/workflow-code/src/lock.ts new file mode 100644 index 00000000000..b4ead1d7402 --- /dev/null +++ b/packages/workflow-code/src/lock.ts @@ -0,0 +1,521 @@ +/** + * `.sim/lock.json`: the identity sidecar of a workflow source file. It binds keys to ids so a + * canvas rename, a drag or a branch reorder never changes identity (build-spec decision 4, + * s1 §2 `WorkflowLockV1`, s3 D10/D11). + * + * Ids are physical ids for single-workflow `source get/apply`; in a repo they are logical ids that + * equal the physical ones in the home environment (build-spec decision 4). Edge ids are never in + * the lock (s1 D5). + */ + +import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' +import type { Diagnostic } from './diagnostics/frame' +import type { BlockKey, BranchKey, SubBlockId, VarKey } from './model' + +/** `sf1:` + lowercase hex SHA-256 (build-spec decision 11, s4 D3). */ +export type SourceFingerprint = `sf1:${string}` + +/** Canvas geometry, used only for new blocks or `layout: 'lock'` applies (s4 D3). */ +export interface LockLayout { + x: number + y: number + w?: number + h?: number + /** Stored `block.height`. */ + height?: number + horizontalHandles?: boolean +} + +/** + * The id-bearing half of a lock block: what canonicalize derives from a stored graph and + * materialize returns. `sourceFingerprint` hashes exactly this plus the CWM. + */ +export interface LockIdentityBlock { + id: string + type: string + /** Display name at pull time; the three-way base when the canvas renamed the block (s1 §4). */ + name: string + parent: BlockKey | null + /** Branch key → stored row id (condition/router only). */ + branches?: Record + /** + * Per subBlock, item name → item id for id-bearing lists (inputFormat field ids). These are + * cross-workflow foreign keys: custom block subBlock ids are the Start field ids + * (blocks/custom/build-config.ts:134-151, s1 §4 "Items"). + */ + items?: Record> +} + +/** The ids of one workflow, keyed the way the CWM is. */ +export interface LockIdentity { + blocks: Record + /** Variable key → variable id. */ + variables: Record +} + +export interface WorkflowLockBlock extends LockIdentityBlock { + /** + * The TS `const` identifier the block is printed as (s3 calls it `ident`). Derived camelCase from + * the name on first print, then persisted, so a canvas rename changes one line + * (build-spec decision 4). + */ + binding: string + /** + * Print-order tie-break: the second key of the declaration sort (isTrigger, order, key) + * (build-spec decision 10, s3 D10). Not unique: equal orders fall back to the key, so locks + * merged from two branches stay valid. + */ + order: number + /** Lowercase hex SHA-256 of the canonical block (`canonicalHash` over that block alone). */ + contentHash: string + layout?: LockLayout + /** Repo-relative path of the block's function-code file (build-spec decision 9). */ + codeFile?: string +} + +export interface WorkflowLockV1 { + lockVersion: 1 + workflowId: string + workspaceId: string + /** The catalog `hash` the file was printed against. */ + catalogHash: string + /** The DB freshness token at pull; apply answers 409 when it no longer matches. */ + baseFingerprint: SourceFingerprint + blocks: Record + variables: Record +} + +export type LockDiagnostic = Diagnostic< + | 'E_LOCK_JSON' + | 'E_LOCK_VERSION' + | 'E_LOCK_SHAPE' + | 'E_LOCK_UNKNOWN_FIELD' + | 'E_LOCK_KEY' + | 'E_LOCK_BINDING' + | 'E_LOCK_DUPLICATE_BINDING' + | 'E_LOCK_DUPLICATE_ID' + | 'E_LOCK_PARENT' + | 'E_LOCK_BRANCH' + | 'E_LOCK_CODE_FILE_PATH' +> + +export type ParseWorkflowLockResult = + | { lock: WorkflowLockV1; diagnostics?: undefined } + | { lock?: undefined; diagnostics: LockDiagnostic[] } + +const HEX_SHA256 = /^[0-9a-f]{64}$/ +const FINGERPRINT = /^sf1:[0-9a-f]{64}$/ +const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ +const COLLISION_SUFFIX = /^(.*)~([2-9]|[1-9][0-9]+)$/ +const DRIVE_PATH = /^[A-Za-z]:/ + +/** Reserved words plus strict-mode restrictions; none can name a `const`. */ +const RESERVED_IDENTIFIERS = new Set([ + 'arguments', + 'await', + 'break', + 'case', + 'catch', + 'class', + 'const', + 'continue', + 'debugger', + 'default', + 'delete', + 'do', + 'else', + 'enum', + 'eval', + 'export', + 'extends', + 'false', + 'finally', + 'for', + 'function', + 'if', + 'implements', + 'import', + 'in', + 'instanceof', + 'interface', + 'let', + 'new', + 'null', + 'package', + 'private', + 'protected', + 'public', + 'return', + 'static', + 'super', + 'switch', + 'this', + 'throw', + 'true', + 'try', + 'typeof', + 'undefined', + 'var', + 'void', + 'while', + 'with', + 'yield', +]) + +const LOCK_FIELDS = [ + 'lockVersion', + 'workflowId', + 'workspaceId', + 'catalogHash', + 'baseFingerprint', + 'blocks', + 'variables', +] +const BLOCK_FIELDS = [ + 'id', + 'type', + 'name', + 'binding', + 'order', + 'parent', + 'contentHash', + 'branches', + 'items', + 'layout', + 'codeFile', +] +const LAYOUT_FIELDS = ['x', 'y', 'w', 'h', 'height', 'horizontalHandles'] + +type JsonObject = Record + +function isObject(value: unknown): value is JsonObject { + return typeof value === 'object' && value !== null && !Array.isArray(value) +} + +function isNonEmptyString(value: unknown): value is string { + return typeof value === 'string' && value.length > 0 +} + +function isFiniteNumber(value: unknown): value is number { + return typeof value === 'number' && Number.isFinite(value) +} + +function isSourceFingerprint(value: unknown): value is SourceFingerprint { + return typeof value === 'string' && FINGERPRINT.test(value) +} + +/** RFC 6901: `~` → `~0`, `/` → `~1`. */ +function pointer(segments: readonly string[]): string { + return segments.map((s) => `/${s.replace(/~/g, '~0').replace(/\//g, '~1')}`).join('') +} + +/** Whether `key` is the key `name` normalizes to, or its `~n` legacy-collision form. */ +function keyMatchesName(key: string, name: string): boolean { + const normalized = normalizeWorkflowBlockName(name) + if (key === normalized) return true + const collision = COLLISION_SUFFIX.exec(key) + return collision !== null && collision[1] === normalized +} + +function isSafeRelativePath(path: string): boolean { + if (!path || path.includes('\\') || path.startsWith('/') || DRIVE_PATH.test(path)) return false + return path.split('/').every((segment) => segment !== '' && segment !== '.' && segment !== '..') +} + +class LockReader { + readonly diagnostics: LockDiagnostic[] = [] + + report(code: LockDiagnostic['code'], segments: readonly string[], message: string): void { + this.diagnostics.push({ code, severity: 'error', message, path: pointer(segments) }) + } + + rejectUnknownFields(value: JsonObject, known: readonly string[], at: readonly string[]): void { + for (const field of Object.keys(value)) { + if (!known.includes(field)) { + this.report('E_LOCK_UNKNOWN_FIELD', [...at, field], `Unknown lock field "${field}".`) + } + } + } + + string(value: JsonObject, field: string, at: readonly string[]): string { + const raw = value[field] + if (isNonEmptyString(raw)) return raw + this.report('E_LOCK_SHAPE', [...at, field], `"${field}" must be a non-empty string.`) + return '' + } + + /** A string → non-empty-string record whose values are unique within it. */ + idRecord(raw: unknown, at: readonly string[]): Record { + if (!isObject(raw)) { + this.report('E_LOCK_SHAPE', at, 'Expected an object of id strings.') + return {} + } + const seen = new Set() + const entries: Array<[string, string]> = [] + for (const [key, id] of Object.entries(raw)) { + if (!isNonEmptyString(id)) { + this.report('E_LOCK_SHAPE', [...at, key], 'Expected a non-empty id string.') + continue + } + if (seen.has(id)) { + this.report('E_LOCK_DUPLICATE_ID', [...at, key], `Id "${id}" is used twice.`) + continue + } + seen.add(id) + entries.push([key, id]) + } + return Object.fromEntries(entries) + } + + layout(raw: unknown, at: readonly string[]): LockLayout | undefined { + if (!isObject(raw)) { + this.report('E_LOCK_SHAPE', at, '"layout" must be an object.') + return undefined + } + this.rejectUnknownFields(raw, LAYOUT_FIELDS, at) + const layout: LockLayout = { x: 0, y: 0 } + for (const field of ['x', 'y'] as const) { + if (isFiniteNumber(raw[field])) layout[field] = raw[field] + else this.report('E_LOCK_SHAPE', [...at, field], `"${field}" must be a finite number.`) + } + for (const field of ['w', 'h', 'height'] as const) { + const value = raw[field] + if (value === undefined) continue + if (isFiniteNumber(value)) layout[field] = value + else this.report('E_LOCK_SHAPE', [...at, field], `"${field}" must be a finite number.`) + } + if (raw.horizontalHandles !== undefined) { + if (typeof raw.horizontalHandles === 'boolean') { + layout.horizontalHandles = raw.horizontalHandles + } else { + this.report('E_LOCK_SHAPE', [...at, 'horizontalHandles'], 'Expected a boolean.') + } + } + return layout + } + + block(key: string, raw: unknown): WorkflowLockBlock | undefined { + const at = ['blocks', key] + if (!isObject(raw)) { + this.report('E_LOCK_SHAPE', at, 'A lock block must be an object.') + return undefined + } + this.rejectUnknownFields(raw, BLOCK_FIELDS, at) + const keyIsNormalized = key.length > 0 && normalizeWorkflowBlockName(key) === key + if (!keyIsNormalized) { + this.report('E_LOCK_KEY', at, `Block key "${key}" is not in normalized form.`) + } + + const id = this.string(raw, 'id', at) + const type = this.string(raw, 'type', at) + const name = this.string(raw, 'name', at) + if (keyIsNormalized && name && !keyMatchesName(key, name)) { + this.report('E_LOCK_KEY', [...at, 'name'], `Name "${name}" does not normalize to "${key}".`) + } + + let binding = '' + if (typeof raw.binding !== 'string' || !IDENTIFIER.test(raw.binding)) { + this.report('E_LOCK_BINDING', [...at, 'binding'], '"binding" must be a JS identifier.') + } else if (RESERVED_IDENTIFIERS.has(raw.binding)) { + this.report('E_LOCK_BINDING', [...at, 'binding'], `"${raw.binding}" is a reserved word.`) + } else { + binding = raw.binding + } + + let order = 0 + if (typeof raw.order === 'number' && Number.isSafeInteger(raw.order) && raw.order >= 0) { + order = raw.order + } else { + this.report('E_LOCK_SHAPE', [...at, 'order'], '"order" must be a non-negative integer.') + } + + let parent: BlockKey | null = null + if (raw.parent === null || isNonEmptyString(raw.parent)) { + parent = raw.parent + } else { + this.report('E_LOCK_SHAPE', [...at, 'parent'], '"parent" must be a block key or null.') + } + + let contentHash = '' + if (typeof raw.contentHash === 'string' && HEX_SHA256.test(raw.contentHash)) { + contentHash = raw.contentHash + } else { + this.report('E_LOCK_SHAPE', [...at, 'contentHash'], 'Expected a lowercase hex SHA-256.') + } + + const block: WorkflowLockBlock = { id, type, name, binding, order, parent, contentHash } + + if (raw.branches !== undefined) { + const branches = this.idRecord(raw.branches, [...at, 'branches']) + for (const branchKey of Object.keys(branches)) { + if (!IDENTIFIER.test(branchKey)) { + this.report( + 'E_LOCK_BRANCH', + [...at, 'branches', branchKey], + `Branch key "${branchKey}" is not a JS identifier.` + ) + } + } + block.branches = branches + } + + if (raw.items !== undefined) { + if (isObject(raw.items)) { + block.items = Object.fromEntries( + Object.entries(raw.items).map(([subBlockId, entries]) => [ + subBlockId, + this.idRecord(entries, [...at, 'items', subBlockId]), + ]) + ) + } else { + this.report('E_LOCK_SHAPE', [...at, 'items'], '"items" must be an object.') + } + } + + if (raw.layout !== undefined) { + const layout = this.layout(raw.layout, [...at, 'layout']) + if (layout) block.layout = layout + } + + if (raw.codeFile !== undefined) { + if (typeof raw.codeFile === 'string' && isSafeRelativePath(raw.codeFile)) { + block.codeFile = raw.codeFile + } else { + this.report( + 'E_LOCK_CODE_FILE_PATH', + [...at, 'codeFile'], + '"codeFile" must be a normalized relative path inside the repo, using "/".' + ) + } + } + return block + } + + crossCheckBlocks(blocks: Record): void { + const bindings = new Map() + const ids = new Map() + for (const [key, block] of Object.entries(blocks)) { + if (block.binding) { + const holder = bindings.get(block.binding) + if (holder === undefined) bindings.set(block.binding, key) + else { + this.report( + 'E_LOCK_DUPLICATE_BINDING', + ['blocks', key, 'binding'], + `Binding "${block.binding}" is already used by "${holder}".` + ) + } + } + if (block.id) { + const holder = ids.get(block.id) + if (holder === undefined) ids.set(block.id, key) + else { + this.report( + 'E_LOCK_DUPLICATE_ID', + ['blocks', key, 'id'], + `Block id "${block.id}" is already used by "${holder}".` + ) + } + } + } + + for (const [key, block] of Object.entries(blocks)) { + if (block.parent === null) continue + if (!Object.hasOwn(blocks, block.parent)) { + this.report( + 'E_LOCK_PARENT', + ['blocks', key, 'parent'], + `Parent "${block.parent}" is not a block in this lock.` + ) + continue + } + const visited = new Set() + let current: BlockKey | null = block.parent + while (current !== null && Object.hasOwn(blocks, current) && !visited.has(current)) { + if (current === key) { + this.report('E_LOCK_PARENT', ['blocks', key, 'parent'], `"${key}" contains itself.`) + break + } + visited.add(current) + current = blocks[current].parent + } + } + } + + variables(raw: unknown): Record { + const variables = this.idRecord(raw, ['variables']) + for (const key of Object.keys(variables)) { + if (!key || normalizeWorkflowBlockName(key) !== key) { + this.report( + 'E_LOCK_KEY', + ['variables', key], + `Variable key "${key}" is not in normalized form.` + ) + } + } + return variables + } +} + +/** + * Validates a lock, given as parsed JSON or as JSON text. Every problem is reported at once, each + * with an RFC 6901 `path`; a lock with any problem is rejected whole. Unknown fields are errors, + * so a typo never silently drops identity. A version other than 1 stops validation there. + */ +export function parseWorkflowLock(input: unknown): ParseWorkflowLockResult { + const reader = new LockReader() + let json = input + if (typeof input === 'string') { + try { + json = JSON.parse(input) + } catch { + reader.report('E_LOCK_JSON', [], 'The lock is not valid JSON.') + return { diagnostics: reader.diagnostics } + } + } + if (!isObject(json)) { + reader.report('E_LOCK_SHAPE', [], 'The lock must be a JSON object.') + return { diagnostics: reader.diagnostics } + } + if (json.lockVersion !== 1) { + reader.report('E_LOCK_VERSION', ['lockVersion'], 'Unsupported lock version; expected 1.') + return { diagnostics: reader.diagnostics } + } + + reader.rejectUnknownFields(json, LOCK_FIELDS, []) + const workflowId = reader.string(json, 'workflowId', []) + const workspaceId = reader.string(json, 'workspaceId', []) + const catalogHash = reader.string(json, 'catalogHash', []) + let baseFingerprint: SourceFingerprint = 'sf1:' + if (isSourceFingerprint(json.baseFingerprint)) { + baseFingerprint = json.baseFingerprint + } else { + reader.report('E_LOCK_SHAPE', ['baseFingerprint'], 'Expected "sf1:" + a lowercase hex SHA-256.') + } + + const blockEntries: Array<[BlockKey, WorkflowLockBlock]> = [] + if (isObject(json.blocks)) { + for (const [key, raw] of Object.entries(json.blocks)) { + const block = reader.block(key, raw) + if (block) blockEntries.push([key, block]) + } + } else { + reader.report('E_LOCK_SHAPE', ['blocks'], '"blocks" must be an object.') + } + const blocks: Record = Object.fromEntries(blockEntries) + reader.crossCheckBlocks(blocks) + const variables = reader.variables(json.variables) + + if (reader.diagnostics.length > 0) return { diagnostics: reader.diagnostics } + return { + lock: { + lockVersion: 1, + workflowId, + workspaceId, + catalogHash, + baseFingerprint, + blocks, + variables, + }, + } +} diff --git a/packages/workflow-code/src/model.ts b/packages/workflow-code/src/model.ts new file mode 100644 index 00000000000..cdea1993d37 --- /dev/null +++ b/packages/workflow-code/src/model.ts @@ -0,0 +1,335 @@ +/** + * The Canonical Workflow Model (CWM): a projection of a stored workflow graph with no ids and no + * layout, keyed by normalized block name. The DB graph stays authoritative; the CWM is computed on + * read (`canonicalize`) and written back through `materialize`, which keeps prev's raw bytes for + * every param whose canonical form is unchanged (build-spec decision 1, s1 D1). + * + * Ids live in the lock (`lock.ts`), never here. Two CWMs are equal when `canonicalEquals` says so; + * `annotations` never take part in equality, hashing or the source fingerprint. + */ + +import type { BlockRetryConfig, Variable } from '@sim/workflow-types/workflow' + +/** + * A block's identity inside one workflow: `normalizeWorkflowBlockName(name)` (lowercased, + * whitespace and dots stripped; packages/workflow-types/src/workflow.ts:662). References resolve + * only by this form (executor/variables/resolvers/block.ts:46-61, 388-390), so it is unique per + * workflow. A legacy normalized-name collision is projected as `${key}~${n}` for the losing block, + * with the smallest n ≥ 2 that no other key uses, and `E_CANON_LEGACY_NAME_COLLISION` + * (s1 §2 canonicalize step 1). Such a workflow cannot round-trip until the block is renamed. + */ +export type BlockKey = string + +/** + * A condition or router branch name, unique per block and a valid JS identifier. Defaults mirror + * the copilot handles: condition `if`, `elseIf0..n`, `else`; router `route0..n` + * (build-spec decision 5, s1 quirk 8, validation.ts:1100-1130). + */ +export type BranchKey = string + +/** `normalizeWorkflowBlockName(variable.name)`; unique per workflow. */ +export type VarKey = string + +/** A subBlock id as stored in `block.subBlocks` (registry `SubBlockConfig.id`). */ +export type SubBlockId = string + +/** A canonical basic/advanced group id (registry `canonicalParamId`). */ +export type CanonicalParamId = string + +export type Json = null | boolean | number | string | Json[] | { [key: string]: Json } + +/** Which member of a basic/advanced pair is effective. */ +export type ParamMode = 'basic' | 'advanced' + +/** + * Kinds of workspace resource a value can point at by internal id. Each is printed call-form + * (`table('leads')`, `binding('support-slack')`, `kb('docs')`, ...; build-spec decision 7, + * s2 D6) and resolved to an id by the server's `ResourceKeyResolver`. + */ +export type ResourceKind = + | 'credential' + | 'table' + | 'knowledgeBase' + | 'workflow' + | 'skill' + | 'customTool' + | 'mcpServer' + | 'sandbox' + | 'file' + | 'folder' + +/** A workflow variable referenced by internal id (variables-input `variableId`). */ +export interface VarNode { + $sim: 'var' + key: VarKey +} + +/** A workspace resource lifted from its internal id to its stable key. */ +export interface ResourceNode { + $sim: 'resource' + kind: ResourceKind + key: string +} + +/** + * An internal id the resolver could not map to a key (deleted resource, foreign workspace). Kept + * verbatim so materialize writes the same bytes back; canonicalize emits + * `W_CANON_UNRESOLVED_ID`. + */ +export interface UnresolvedNode { + $sim: 'unresolved' + kind: ResourceKind | 'var' + id: string +} + +/** + * Escape for a stored object that itself carries a `$sim` key, so the encoding stays a bijection: + * canonicalize wraps such an object as `{ $sim: 'literal', value }` and materialize unwraps it. + */ +export interface LiteralNode { + $sim: 'literal' + value: Json +} + +/** Internal-id sites inside values, lifted to keys (s1 §2, sites per remap-internal-ids.ts:111-127). */ +export type SimNode = VarNode | ResourceNode | UnresolvedNode | LiteralNode + +/** + * A param value. Strings are stored text, verbatim: references stay as ``, + * `{{ENV}}` and `` tokens (build-spec decision 8). Canonicalize rewrites only ref + * prefixes to normalized form and `>` to `>` (s3 §2 requirements a, b). + */ +export type Value = Json | SimNode | Value[] | { [key: string]: Value } + +/** + * How a param's value is stored. `json-string` means the subBlock holds JSON text that + * canonicalize decoded (structured types only: tools, tableRows, inputFormat, tag filters; + * s1 quirk 9); materialize re-encodes it, and keeps prev's raw text when the decoded form is + * unchanged, so whitespace and key order survive (s1 D1). + */ +export type ParamStorage = 'native' | 'json-string' + +/** + * One stored subBlock value. A subBlock whose stored value is `null` is absent from + * `CanonicalBlock.params` (s3 §2 requirement d); `''` is kept and never coerced to `null` + * (s1 quirk 25, serializer/index.ts:620-634). + */ +export type CanonicalParam = + | { kind: 'value'; value: Value; storage: ParamStorage } + | { kind: 'tools'; tools: CanonicalTool[]; storage: ParamStorage } + +/** One entry of a `tool-input` list (s1 §2, canonicalize step 5). */ +export interface CanonicalTool { + type: string + operation?: string + toolId?: string + title?: string + /** Decoded via `decodeToolParamValue`; `''` kept (tools/param-shape.ts:185-214). */ + params: Record + /** + * Effective modes per canonical group of this tool, lifted from index keys `${i}:cid` and legacy + * `${type}:cid` (visibility.ts:372-512, s1 quirk 3); re-indexed by position on write. + */ + modes: Record + usageControl?: 'auto' | 'force' | 'none' + usageControlExpression?: string + /** The DB copy wins over the snapshot at run time (agent/handler.ts:1098-1115, s1 quirk 17). */ + customTool?: { + ref?: ResourceNode | UnresolvedNode + snapshot?: { schema: Json; code: string } + } + operationPolicy?: Json + /** Unknown stored keys, minus the UI-only `isExpanded`. */ + extra?: Record +} + +/** Condition or router rows, lifted out of the `conditions` / `routes` subBlock. */ +export interface CanonicalBranches { + kind: 'condition' | 'router' + /** + * `null` when the subBlock was never persisted: the canvas writes it only on first edit + * (condition-input.tsx:384-392) and edges may point at the implicit `${id}-if` handle + * (s1 quirk 7). Materialize keeps `null`. + */ + rows: CanonicalBranchRow[] | null +} + +export interface CanonicalBranchRow { + key: BranchKey + /** The condition expression (condition) or route description (router), verbatim. */ + value: string + /** + * Set only when the stored title differs from the positional one. The executor finds `else` by + * stored title (condition/handler.ts:474) while the UI shows positional titles + * (condition-input.tsx:395-401), s1 quirk 4. + */ + titleOverride?: string + /** Unknown non-UI keys. UI state (`showTags`, `searchTerm`, ...) is stripped (s1 quirk 6). */ + extra?: Record +} + +export interface LoopSpec { + kind: 'loop' + loopType: 'for' | 'forEach' | 'while' | 'doWhile' + /** Raw stored count, `0` kept with `W_CANON_SUBFLOW_REPAIRED` (s1 quirk 19, load.ts:186-245). */ + iterations: number + forEachItems: Json + whileCondition: string + doWhileCondition: string +} + +export interface ParallelSpec { + kind: 'parallel' + parallelType: 'count' | 'collection' + count: number + distribution: Json + /** Raw stored value; the runtime clamps to 1–20 (subflow-helpers.ts:8-14). */ + batchSize: number +} + +export interface CanonicalBlock { + key: BlockKey + /** Display name exactly as stored; `key` is derived from it. */ + name: string + /** Registry type, including legacy versions and per-org `custom_block_` (s1 quirks 16, 18). */ + type: string + /** The enclosing loop/parallel (`data.parentId`), or `null` at the root. */ + parent: BlockKey | null + enabled: boolean + /** Protected: apply refuses any diff touching it (build-spec decision 11, s4 D2). */ + locked: boolean + /** The stored `triggerMode` flag. */ + triggerMode: boolean + /** + * The stored legacy flag. Semantic, not cosmetic: when on, a standalone advanced field is + * serialized and pairs default to advanced (serializer/index.ts:100-105, 641-650). + */ + advancedMode: boolean + /** + * Effective error port: `errorEnabled || has an error edge` (`resolveEffectiveErrorEnabled`, + * workflow.ts:505). Never the raw flag alone. + */ + errorPort: boolean + /** Raw stored retry policy; numbers are kept when `enabled` is false (workflow.ts:87-101). */ + retry: BlockRetryConfig | null + /** + * Every stored subBlock, keyed by subBlock id, except synthetic tool mirrors, server-owned + * runtime ids (`webhookId`, `triggerPath`, `triggerConfig`, `triggerId`; s1 D6), parked + * `_removed_` keys, and `conditions`/`routes` (lifted into `branches`). Stale hidden values are + * kept and listed in `annotations.inactive` (build-spec decision 2, s1 D3). + */ + params: Record + /** + * Effective mode for every canonical pair on this block, explicit or inferred (s1 canonicalize + * step 4). The printer elides modes derivable from the value kind (build-spec decision 7). + */ + modes: Record + /** Present only on condition and router blocks. */ + branches?: CanonicalBranches + /** Present only on loop and parallel containers. */ + subflow?: LoopSpec | ParallelSpec + /** Unknown `block.data` keys, verbatim; printed under `$unknown` (s3 §4 printer edge cases). */ + opaque?: { data?: Record } +} + +/** + * The port an edge leaves from. + * - `out`: the default `source` handle. + * - `error`: the `error` handle. + * - `branch`: `condition-` / `router-`, keyed by branch key. + * - `subflowStart`: `${kind}-start-source` on a container, into its first child (workflow.ts:427). + * - `subflowEnd`: `${kind}-end-source` on a container, after the container finishes. + * - `raw`: an unknown or legacy handle, kept verbatim and printed `edge(a, 'raw', b)`. + */ +export type Port = + | { kind: 'out' } + | { kind: 'error' } + | { kind: 'branch'; key: BranchKey } + | { kind: 'subflowStart' } + | { kind: 'subflowEnd' } + | { kind: 'raw'; handle: string } + +/** + * A port's string form, used for sorting edges and in `edges:` comment anchors: + * `out`, `error`, `branch:`, `subflowStart`, `subflowEnd`, `raw:`. + */ +export type PortKey = + | 'out' + | 'error' + | `branch:${BranchKey}` + | 'subflowStart' + | 'subflowEnd' + | `raw:${string}` + +/** + * An edge, identified by its `(from, port, to)` tuple. Edge ids are not in the CWM or the lock; + * the server reuses prev's edge id when the tuple matches (build-spec decision 3, s1 D5). + */ +export interface CanonicalEdge { + from: BlockKey + port: Port + to: BlockKey +} + +export interface CanonicalVariable { + key: VarKey + name: string + type: Variable['type'] + value: Json +} + +/** Workflow-level fields printed in the `workflow(name, { description })` header. */ +export interface CanonicalWorkflowMeta { + name: string + description: string | null +} + +/** + * Where a comment attaches in a printed file (s3 §2 `AnchorKey`, build-spec decision 10): + * - `header`: above the imports; `wiring`: above the first wiring statement; `footer`: file end. + * - `block:`: the block's `const` declaration. + * - `param::`: one param property inside the block call. + * - `edges::`: the wiring statement for that (source, port). + */ +export type AnchorKey = + | 'header' + | 'wiring' + | 'footer' + | `block:${BlockKey}` + | `param:${BlockKey}:${SubBlockId}` + | `edges:${BlockKey}:${PortKey}` + +export interface CodeComment { + /** Comment text without the `//` or `/* *\/` delimiters, verbatim. */ + text: string + kind: 'line' | 'block' + placement: 'leading' | 'trailing' +} + +/** + * Non-semantic facts carried beside the graph. Excluded from `canonicalEquals`, + * `canonicalHash`, `diffCanonical` and `sourceFingerprint`. + */ +export interface WorkflowAnnotations { + /** + * Per block, the param ids whose value is stored but not serialized under the current values + * (mirrors `shouldSerializeSubBlock`; opaque catalog conditions count as active). The printer + * emits them under the block's `inactive: {...}` meta (build-spec decision 2). + */ + inactive: Record + /** + * Comments by anchor, in source order. Persisted server-side in `workflow.code_meta` once it + * exists (build-spec decision 6); until then only files carry them. + */ + comments: Partial> +} + +export interface CanonicalWorkflow { + modelVersion: 1 + meta: CanonicalWorkflowMeta + blocks: Record + /** Sorted by `(from, portKey(port), to)` with `compareStrings`; no duplicate tuples. */ + edges: CanonicalEdge[] + variables: Record + annotations: WorkflowAnnotations +} diff --git a/packages/workflow-code/tsconfig.json b/packages/workflow-code/tsconfig.json new file mode 100644 index 00000000000..dd8fe6e74c5 --- /dev/null +++ b/packages/workflow-code/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "@sim/tsconfig/library.json", + "compilerOptions": { + "types": [] + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/workflow-code/vitest.config.ts b/packages/workflow-code/vitest.config.ts new file mode 100644 index 00000000000..6f729af4c84 --- /dev/null +++ b/packages/workflow-code/vitest.config.ts @@ -0,0 +1,11 @@ +import { defineConfig, mergeConfig } from 'vitest/config' +import sharedConfig from '../../vitest.shared' + +export default mergeConfig( + sharedConfig, + defineConfig({ + test: { + include: ['src/**/*.test.ts'], + }, + }) +) diff --git a/packages/workflow-sdk/README.md b/packages/workflow-sdk/README.md new file mode 100644 index 00000000000..76895a5cfd2 --- /dev/null +++ b/packages/workflow-sdk/README.md @@ -0,0 +1,31 @@ +# @sim/workflow-sdk + +The authoring surface for Sim workflows written as TypeScript. A workflow file imports from this +package, but **nothing in it ever runs**: `@sim/workflow-code` compiles the file statically, and +every runtime export throws `SimSdkNotExecutable`. + +This package is a scaffold. The modules below are planned and owned by the Wave 2E agent; `src/` +holds no code yet, so the package has no `exports`, `type-check` or `test` script until they land. + +## Planned modules + +| Path | Contents | +|------|----------| +| `src/core.d.ts` | Authoring types: `Ref`, `Value`, `Template`, the `t`/`js`/`py`/`sh`/`json`/`md` tags, `ref`, `raw`, `todo`, `file`, `env`, resource constructors (`binding`, `table`, `kb`, `workflow`, `skill`, `customTool`, `mcp`, `sandbox`, `upload`, `picked`), `BlockMeta`, `Node`/`Block`/`Branches`, and `workflow`, `loop`, `parallel`, `condition`, `router`, `note`, `fn` | +| `src/runtime.ts` | The runtime entry: every export throws `SimSdkNotExecutable`, so imports resolve without implying execution | +| `src/codegen/generate.ts` | `generateSdkTypes(catalog, names)`: one `.d.ts` per block from a `BlockCatalog` (`@sim/workflow-code`) and the frozen `apps/sim/blocks/sdk-names.json` | +| `src/codegen/visibility.ts` | The three-way visibility evaluator (always / sometimes / never visible per operation) over serialized catalog conditions | +| `src/codegen/map-subblock.ts` | SubBlock type → TS type mapping | +| `src/codegen/outputs.ts` | Output types, narrowed per operation | +| `src/codegen/names.ts` | Builder, param and identifier naming | +| `src/codegen/emit.ts` | Deterministic `.d.ts` emission | + +## Rules the generated surface follows + +- A block call is `builder(displayName, params, meta?)`; each operation is its own method, named + from `sdk-names.json`. +- Param names are subBlock ids; a basic/advanced pair is one param named by its + `canonicalParamId`, and the mode follows from the value's kind. +- Resource references are call-form: `table('leads')`, `binding('support-slack')`, `kb('docs')`, + `workflow('enrich')`, `env.NAME`. +- Function code lives in `.js`, `.py` or `.sh` files, stored verbatim. diff --git a/packages/workflow-sdk/package.json b/packages/workflow-sdk/package.json new file mode 100644 index 00000000000..e9fed72ff05 --- /dev/null +++ b/packages/workflow-sdk/package.json @@ -0,0 +1,22 @@ +{ + "name": "@sim/workflow-sdk", + "version": "0.1.0", + "private": true, + "sideEffects": false, + "type": "module", + "license": "Apache-2.0", + "engines": { + "bun": ">=1.4.4", + "node": ">=20.0.0" + }, + "scripts": { + "lint": "biome check --write --unsafe .", + "lint:check": "biome check .", + "format": "biome format --write .", + "format:check": "biome format ." + }, + "devDependencies": { + "@sim/tsconfig": "workspace:*", + "typescript": "^7.0.2" + } +} diff --git a/packages/workflow-sdk/src/.gitkeep b/packages/workflow-sdk/src/.gitkeep new file mode 100644 index 00000000000..e69de29bb2d diff --git a/packages/workflow-sdk/tsconfig.json b/packages/workflow-sdk/tsconfig.json new file mode 100644 index 00000000000..dd8fe6e74c5 --- /dev/null +++ b/packages/workflow-sdk/tsconfig.json @@ -0,0 +1,8 @@ +{ + "extends": "@sim/tsconfig/library.json", + "compilerOptions": { + "types": [] + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "dist"] +} From 57994f3f7d50d75359dbb6ad95dc812ad36de890 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 18:34:26 -0800 Subject: [PATCH 002/428] feat(boundaries): keep @sim/workflow-code free of node built-ins and code execution The compiler reads untrusted workflow source on the server, so its package may not import node built-ins or reach dynamic import, require, eval or Function. --- scripts/check-monorepo-boundaries.test.ts | 61 +++++++++++++++++ scripts/check-monorepo-boundaries.ts | 83 ++++++++++++++++++++++- 2 files changed, 143 insertions(+), 1 deletion(-) diff --git a/scripts/check-monorepo-boundaries.test.ts b/scripts/check-monorepo-boundaries.test.ts index 978ef128104..0d486fcfc69 100644 --- a/scripts/check-monorepo-boundaries.test.ts +++ b/scripts/check-monorepo-boundaries.test.ts @@ -67,6 +67,67 @@ describe('package boundary command', () => { } }, 30_000) + it('keeps @sim/workflow-code free of Node built-ins and dynamic code execution', () => { + const fixture = mkdtempSync(path.join(ROOT, 'node_modules/.boundary-audit-')) + try { + mkdirSync(path.join(fixture, 'scripts')) + mkdirSync(path.join(fixture, 'apps')) + mkdirSync(path.join(fixture, 'packages/workflow-code/src'), { recursive: true }) + mkdirSync(path.join(fixture, 'packages/other/src'), { recursive: true }) + copyFileSync( + path.join(ROOT, 'scripts/check-monorepo-boundaries.ts'), + path.join(fixture, 'scripts/check-monorepo-boundaries.ts') + ) + const source = 'packages/workflow-code/src/compile.ts' + const cases = [ + ["import vm from 'vm'", source, false], + ["import { runInNewContext } from 'node:vm'", source, false], + ["import { readFile } from 'node:fs/promises'", source, false], + ["import { exec } from 'child_process'", source, false], + ["import type { Script } from 'node:vm'", source, false], + ["export { spawn } from 'node:child_process'", source, false], + ["const vm = require('vm')", source, false], + ["const parser = import('@babel/parser')", source, false], + ['const mod = import(specifier)', source, false], + ["const value = eval('1 + 1')", source, false], + ["const value = globalThis.eval('1')", source, false], + ["const value = globalThis['eval']('1')", source, false], + ["const run = new Function('return 1')", source, false], + ["const run = Function('return 1')", source, false], + ["const F = globalThis['Function']", source, false], + ["import vm from 'vm'", 'packages/workflow-code/src/nested/deep.ts', false], + ["import { parse } from '@babel/parser'", source, true], + ["import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow'", source, true], + ['const record = { eval: 1, Function: 2 }', source, true], + ['interface Hooks { eval(): void }', source, true], + ["// import vm from 'vm'", source, true], + ['const text = "eval(\'x\')"', source, true], + [ + "import { readFile } from 'node:fs/promises'", + 'packages/workflow-code/src/x.test.ts', + true, + ], + ["import vm from 'node:vm'", 'packages/other/src/index.ts', true], + ] as const + + for (const [code, file, allowed] of cases) { + rmSync(path.join(fixture, 'packages/workflow-code/src'), { recursive: true, force: true }) + rmSync(path.join(fixture, 'packages/other/src'), { recursive: true, force: true }) + mkdirSync(path.dirname(path.join(fixture, file)), { recursive: true }) + writeFileSync(path.join(fixture, file), `${code}\n`) + const result = spawnSync( + 'bun', + [path.join(fixture, 'scripts/check-monorepo-boundaries.ts')], + { cwd: fixture, encoding: 'utf8' } + ) + expect.soft(result.status, `${file}: ${code}\n${result.stderr}`).toBe(allowed ? 0 : 1) + if (!allowed) expect.soft(result.stderr).toContain(`${file}:1`) + } + } finally { + rmSync(fixture, { recursive: true, force: true }) + } + }, 30_000) + it('keeps application code surface-neutral while allowing shared contract vocabulary', () => { const fixture = mkdtempSync(path.join(ROOT, 'node_modules/.boundary-audit-')) try { diff --git a/scripts/check-monorepo-boundaries.ts b/scripts/check-monorepo-boundaries.ts index 406d6135137..ec7ff73587b 100644 --- a/scripts/check-monorepo-boundaries.ts +++ b/scripts/check-monorepo-boundaries.ts @@ -19,10 +19,18 @@ * context type. * Fix by taking the surface fact (a cursor's route identity, a wire shape) as input from * the adapter. + * 3. `@sim/workflow-code` (every non-test file under `packages/workflow-code/src`) compiles + * untrusted workflow source on the server, in the browser and in the CLI, so it must stay pure + * and must never execute code: no Node built-in (`vm`, `child_process`, `fs`, any `node:*`, + * even type-only), no dynamic `import()` or `require`, and no `eval` or `Function` reached as + * a value (`new Function`, `globalThis.eval`, `globalThis['Function']`). Fix by keeping I/O in + * the caller (the compiler takes file text as input) and interpreting the AST instead of + * evaluating it. * * There is no allowlist. Run: `bun run check:boundaries` */ import { readdir, readFile } from 'node:fs/promises' +import { isBuiltin } from 'node:module' import path from 'node:path' import ts from '@typescript/typescript6' @@ -173,6 +181,76 @@ async function scanImports( return offenders } +const PURE_PACKAGE_SRC = path.join(PACKAGES_DIR, 'workflow-code', 'src') +const CODE_EXECUTING_GLOBALS = new Set(['eval', 'Function']) + +/** Whether `node` names `eval`/`Function` as a value rather than as a key or a type. */ +function isCodeExecutingReference(node: ts.Identifier): boolean { + if (!CODE_EXECUTING_GLOBALS.has(node.text)) return false + const parent = node.parent + if ( + (ts.isPropertyAssignment(parent) || + ts.isPropertyDeclaration(parent) || + ts.isPropertySignature(parent) || + ts.isMethodDeclaration(parent) || + ts.isMethodSignature(parent) || + ts.isGetAccessorDeclaration(parent) || + ts.isSetAccessorDeclaration(parent)) && + parent.name === node + ) { + return false + } + for (let ancestor: ts.Node = parent; !ts.isSourceFile(ancestor); ancestor = ancestor.parent) { + if (ts.isTypeNode(ancestor)) return false + } + return true +} + +/** Rule 3: every way a file in the pure package could reach the host or execute code. */ +async function scanPurePackageFile(file: string): Promise { + const content = await readFile(file, 'utf8') + const source = ts.createSourceFile(file, content, ts.ScriptTarget.Latest, true) + const lines = content.split('\n') + const offenders: Offender[] = [] + function report(node: ts.Node, description: string): void { + const { line } = source.getLineAndCharacterOfPosition(node.getStart(source)) + offenders.push({ + file: path.relative(ROOT, file), + line: line + 1, + description, + snippet: lines[line].trim(), + }) + } + + for (const { module } of importEdges(source)) { + if (module.text.startsWith('node:') || isBuiltin(module.text)) { + report(module, `@sim/workflow-code imports a Node built-in: ${module.text}`) + } + } + function visit(node: ts.Node): void { + if (ts.isCallExpression(node)) { + if (node.expression.kind === ts.SyntaxKind.ImportKeyword) { + report(node, '@sim/workflow-code uses dynamic import()') + } else if (ts.isIdentifier(node.expression) && node.expression.text === 'require') { + report(node, '@sim/workflow-code uses require()') + } + } + if (ts.isIdentifier(node) && isCodeExecutingReference(node)) { + report(node, `@sim/workflow-code references ${node.text}`) + } + if ( + ts.isElementAccessExpression(node) && + ts.isStringLiteralLike(node.argumentExpression) && + CODE_EXECUTING_GLOBALS.has(node.argumentExpression.text) + ) { + report(node, `@sim/workflow-code references ${node.argumentExpression.text}`) + } + ts.forEachChild(node, visit) + } + visit(source) + return offenders +} + /** Package dependencies point toward shared code, including type-only imports. */ function forbiddenImport(file: string, specifier: string, appNames: ReadonlySet): boolean { if (specifier.startsWith('@/') || specifier.startsWith('apps/')) return true @@ -230,6 +308,9 @@ async function main() { forbiddenImport(file, module.text, appNames) ? `import into apps/: ${module.text}` : null )) ) + if (file.startsWith(`${PURE_PACKAGE_SRC}${path.sep}`) && !TEST_FILE.test(file)) { + offenders.push(...(await scanPurePackageFile(file))) + } } } @@ -248,7 +329,7 @@ async function main() { if (offenders.length === 0) { console.log( - '✅ Monorepo boundaries OK: no package imports from apps/*, and application code is surface-neutral' + '✅ Monorepo boundaries OK: no package imports from apps/*, application code is surface-neutral, and @sim/workflow-code is pure' ) return } From 2be78c78cd971358f60c830d5b754f3d4fa288ab Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 18:55:27 -0800 Subject: [PATCH 003/428] contract: wave 1 audit amendments Encoding-free canonical params, a lock split into committed identity and a per-environment base, one shared resource-kind list in @sim/workflow-types, structured comment anchors, the shared hash module, SDK-reserved bindings, catalog additions (addable, dynamic output source, visibleFor), and a tighter boundary rule for @sim/workflow-code. --- .../lib/api/contracts/workflow-references.ts | 2 +- apps/sim/lib/api/contracts/workspace-fork.ts | 2 +- .../workflows/references/binding-targets.ts | 2 +- .../lib/workflows/references/import-plan.ts | 2 +- apps/sim/lib/workflows/references/manifest.ts | 2 +- .../workflows/references/remap-references.ts | 2 +- apps/sim/lib/workflows/references/types.ts | 19 +- bun.lock | 1 + knip.jsonc | 4 +- packages/workflow-code/DESIGN.md | 86 +++++ packages/workflow-code/package.json | 1 + packages/workflow-code/src/anchors.test.ts | 71 ++++ packages/workflow-code/src/anchors.ts | 105 ++++++ packages/workflow-code/src/api.ts | 36 +- packages/workflow-code/src/catalog/types.ts | 53 ++- .../workflow-code/src/diagnostics/codes.ts | 12 +- .../src/diagnostics/frame.test.ts | 16 + .../workflow-code/src/diagnostics/frame.ts | 18 +- packages/workflow-code/src/hash.test.ts | 52 +++ packages/workflow-code/src/hash.ts | 68 ++++ packages/workflow-code/src/index.ts | 11 +- packages/workflow-code/src/lock.test.ts | 137 ++++---- packages/workflow-code/src/lock.ts | 308 ++++++++---------- packages/workflow-code/src/model.ts | 135 +++++--- packages/workflow-code/src/sdk.ts | 116 +++++++ packages/workflow-types/package.json | 4 + packages/workflow-types/src/resources.ts | 23 ++ scripts/check-monorepo-boundaries.test.ts | 12 + scripts/check-monorepo-boundaries.ts | 48 ++- 29 files changed, 995 insertions(+), 353 deletions(-) create mode 100644 packages/workflow-code/src/anchors.test.ts create mode 100644 packages/workflow-code/src/anchors.ts create mode 100644 packages/workflow-code/src/hash.test.ts create mode 100644 packages/workflow-code/src/hash.ts create mode 100644 packages/workflow-code/src/sdk.ts create mode 100644 packages/workflow-types/src/resources.ts diff --git a/apps/sim/lib/api/contracts/workflow-references.ts b/apps/sim/lib/api/contracts/workflow-references.ts index c1ac6498034..24c38fb5b10 100644 --- a/apps/sim/lib/api/contracts/workflow-references.ts +++ b/apps/sim/lib/api/contracts/workflow-references.ts @@ -1,5 +1,5 @@ +import { WORKFLOW_RESOURCE_KINDS } from '@sim/workflow-types/resources' import { z } from 'zod' -import { WORKFLOW_RESOURCE_KINDS } from '@/lib/workflows/references/types' export const portableResourceKindSchema = z.enum([...WORKFLOW_RESOURCE_KINDS, 'workflow']) export const referenceOccurrenceSchema = z diff --git a/apps/sim/lib/api/contracts/workspace-fork.ts b/apps/sim/lib/api/contracts/workspace-fork.ts index 14a5ad93f9c..5e4900fe897 100644 --- a/apps/sim/lib/api/contracts/workspace-fork.ts +++ b/apps/sim/lib/api/contracts/workspace-fork.ts @@ -1,3 +1,4 @@ +import { WORKFLOW_RESOURCE_KINDS } from '@sim/workflow-types/resources' import { z } from 'zod' import { nonEmptyIdSchema, @@ -7,7 +8,6 @@ import { } from '@/lib/api/contracts/primitives' import { defineRouteContract } from '@/lib/api/contracts/types' import { workspaceSchema } from '@/lib/api/contracts/workspaces' -import { WORKFLOW_RESOURCE_KINDS } from '@/lib/workflows/references/types' const workspaceIdParamsSchema = z.object({ id: nonEmptyIdSchema }) diff --git a/apps/sim/lib/workflows/references/binding-targets.ts b/apps/sim/lib/workflows/references/binding-targets.ts index a17f1de61f4..9fb56452760 100644 --- a/apps/sim/lib/workflows/references/binding-targets.ts +++ b/apps/sim/lib/workflows/references/binding-targets.ts @@ -17,6 +17,7 @@ import { workspaceSandbox, } from '@sim/db/schema' import { isRecordLike, toRecord } from '@sim/utils/object' +import type { WorkflowResourceKind } from '@sim/workflow-types/resources' import { and, eq, inArray, isNull, type SQL, sql } from 'drizzle-orm' import { authorizeCredentialUseForAuth } from '@/lib/auth/credential-access' import { isCopilotWorkspaceInvocation } from '@/lib/core/application/copilot-workspace-invocation' @@ -33,7 +34,6 @@ import { getCredentialProvidersByIds, getWorkspaceEnvKeys, } from '@/lib/workflows/references/resources' -import type { WorkflowResourceKind } from '@/lib/workflows/references/types' import { getToolInputParamConfigs } from '@/lib/workflows/search-replace/indexer' import { getBlock } from '@/blocks/registry' diff --git a/apps/sim/lib/workflows/references/import-plan.ts b/apps/sim/lib/workflows/references/import-plan.ts index 048b7fa3256..8756b8a74de 100644 --- a/apps/sim/lib/workflows/references/import-plan.ts +++ b/apps/sim/lib/workflows/references/import-plan.ts @@ -1,4 +1,5 @@ import { isRecordLike, omit } from '@sim/utils/object' +import type { PortableResourceKind } from '@sim/workflow-types/resources' import { workflowReferenceManifestSchema } from '@/lib/api/contracts/workflow-references' import { workflowStateSchema } from '@/lib/api/contracts/workflows' import { OrchestrationError } from '@/lib/core/orchestration/types' @@ -19,7 +20,6 @@ import { } from '@/lib/workflows/references/remap-references' import type { PortableReference, - PortableResourceKind, ReferenceOccurrence, WorkflowReferenceManifest, } from '@/lib/workflows/references/types' diff --git a/apps/sim/lib/workflows/references/manifest.ts b/apps/sim/lib/workflows/references/manifest.ts index f2b6c04cbc9..d83ce94b6d8 100644 --- a/apps/sim/lib/workflows/references/manifest.ts +++ b/apps/sim/lib/workflows/references/manifest.ts @@ -1,4 +1,5 @@ import { isRecordLike } from '@sim/utils/object' +import type { PortableResourceKind } from '@sim/workflow-types/resources' import { coerceObjectArray, type SubBlockRecord, @@ -10,7 +11,6 @@ import { remapSubBlocks, } from '@/lib/workflows/references/remap-references' import type { - PortableResourceKind, ReferenceOccurrence, WorkflowReferenceManifest, } from '@/lib/workflows/references/types' diff --git a/apps/sim/lib/workflows/references/remap-references.ts b/apps/sim/lib/workflows/references/remap-references.ts index 0397bf31a45..226eff62eed 100644 --- a/apps/sim/lib/workflows/references/remap-references.ts +++ b/apps/sim/lib/workflows/references/remap-references.ts @@ -2,6 +2,7 @@ import { createLogger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' import { isRecordLike, omit, toRecord } from '@sim/utils/object' import type { SubBlockType } from '@sim/workflow-types/blocks' +import type { WorkflowResourceKind } from '@sim/workflow-types/resources' import { isWorkflowAnnotationOnlyBlockType } from '@sim/workflow-types/workflow' import { readFolderPaths } from '@/lib/folders/selection' import { isMcpRuntimeReference, normalizeMcpOperationPolicy } from '@/lib/mcp/operation-policy' @@ -15,7 +16,6 @@ import { collectForkFileUploadKeys, remapForkFileUploadValue, } from '@/lib/workflows/references/remap-files' -import type { WorkflowResourceKind } from '@/lib/workflows/references/types' import { getToolInputParamConfigs } from '@/lib/workflows/search-replace/indexer' import { getWorkflowSearchSubBlockResourceDefinition, diff --git a/apps/sim/lib/workflows/references/types.ts b/apps/sim/lib/workflows/references/types.ts index 3a954aab6c7..d274a4a3d43 100644 --- a/apps/sim/lib/workflows/references/types.ts +++ b/apps/sim/lib/workflows/references/types.ts @@ -1,21 +1,4 @@ -/** Registered workspace references shared by workflow imports and fork synchronization. */ -export const WORKFLOW_RESOURCE_KINDS = [ - 'credential', - 'env-var', - 'knowledge-base', - 'knowledge-document', - 'table', - 'file', - 'file-folder', - 'mcp-server', - 'custom-tool', - 'custom-block', - 'skill', - 'sandbox', -] as const - -export type WorkflowResourceKind = (typeof WORKFLOW_RESOURCE_KINDS)[number] -export type PortableResourceKind = WorkflowResourceKind | 'workflow' +import type { PortableResourceKind } from '@sim/workflow-types/resources' export interface ReferenceOccurrence { blockId: string diff --git a/bun.lock b/bun.lock index bcbb4714543..f01b284baeb 100644 --- a/bun.lock +++ b/bun.lock @@ -847,6 +847,7 @@ "version": "0.1.0", "dependencies": { "@babel/parser": "7.29.9", + "@noble/hashes": "2.2.0", "@sim/utils": "workspace:*", "@sim/workflow-types": "workspace:*", }, diff --git a/knip.jsonc b/knip.jsonc index dbfb3763a54..0453df8a81c 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -177,10 +177,10 @@ "packages/sim-setup": { "includeEntryExports": false }, // The workflow-code contract is built ahead of its consumers (the catalog projection, the // source use cases and @sim/workflow-sdk codegen), and the parser lands with its compiler. - // Remove both settings once those import it. + // Wave 3 of the workflow-code build removes both settings once those import it. "packages/workflow-code": { "includeEntryExports": false, - "ignoreDependencies": ["@babel/parser", "@sim/utils"] + "ignoreDependencies": ["@babel/parser"] }, // This shared config is consumed by apps that own the Next dependency. "packages/tsconfig": { "ignoreUnresolved": ["next"] } diff --git a/packages/workflow-code/DESIGN.md b/packages/workflow-code/DESIGN.md index dc4aa78a0c7..ad5563cff73 100644 --- a/packages/workflow-code/DESIGN.md +++ b/packages/workflow-code/DESIGN.md @@ -4,6 +4,8 @@ Wave 1 wrote the types every engine builds against. The reconciled build spec wi speaks; this file records the choices it left open. Change a contract type only with the agreement of every lane that consumes it. +**The Amendments section at the end supersedes any numbered item it names.** + ## Layout | Module | Owner | State | @@ -13,6 +15,9 @@ agreement of every lane that consumes it. | `src/catalog/types.ts` | Wave 1 | types | | `src/diagnostics/codes.ts` | Wave 1 | types | | `src/diagnostics/frame.ts` | Wave 1 | types + `codeFrame` (real) | +| `src/anchors.ts` | Wave 1 | `portKey`, `parsePortKey`, `encodeAnchor`, `decodeAnchor` (real) | +| `src/hash.ts` | Wave 1 | `stableStringify`, `sha256Hex` (real) | +| `src/sdk.ts` | Wave 1 | `GENERIC_BUILDER`, `SDK_CORE_EXPORTS`, `SDK_RESERVED_IDENTIFIERS` | | `src/api.ts` | Wave 1 | engine signatures, type-only | | `src/catalog/canonical-index.ts`, `src/canonicalize/*` | 2B | | | `src/print/*` | 2C | | @@ -144,3 +149,84 @@ instead of failing at run time. until consumers and the compiler land. Remove both settings then. - `@sim/workflow-sdk` is a scaffold with no `exports`, `type-check` or `test` script until 2E adds code. Its runtime entry is planned as `src/runtime.ts`, not s2's `runtime.js`. + +## Amendments (Wave 1 audit) + +- **A1. The CWM is encoding-free.** This supersedes item 4's storage note. `CanonicalParam` has + no `storage`, so equality, hashes, diffs and the fingerprint never see the encoding. + Materialize chooses it: prev's raw encoding first, then `CatalogSubBlock.storage`. `ParamStorage` + now lives in `catalog/types.ts`. +- **A2. Two new materialize inputs.** `MaterializeOptions.compiledBindings` feeds identity rule 2. + `MaterializeOptions.lockFreshness` (`fresh | stale | none`, required) gates rule 4 and the + `W_MAT_DELETED_SINCE_PULL` handling. +- **A3. The lock is split.** This supersedes items 8 and 12. + - `WorkflowLockV1` is `{ lockVersion, blocks, variables }`. Each block holds `id`, `parent`, + `branches?`, `items?`, `binding`, `order`, `layout?` and `codeFile?`, and every id is logical. + - These lock fields were removed: `workflowId`, `workspaceId`, `catalogHash`, + `baseFingerprint`, `blocks[].type`, `blocks[].name` and `blocks[].contentHash`. The + environment facts now live in `LockBase { workspaceId, baseFingerprint, catalogHash }`, which + `source get/apply` carries beside the lock and a repo stores in + `.sim/state//revision.json`. + - The validator tolerates `x-` fields on the lock, on blocks and on layout, and preserves them. + Item entries stay strict. + - Version policy: adding an optional field does not bump `lockVersion`. Validators ship support + for a field before writers emit it, and data waits under `x-` until then. +- **A4. One resource-kind list.** `WORKFLOW_RESOURCE_KINDS`, `WorkflowResourceKind` and + `PortableResourceKind` moved to `@sim/workflow-types/resources`. This supersedes item 6. + - apps/sim imports that list directly. The list moved out of `references/types.ts` rather than + being re-exported from it, because the repo bans re-exports from non-barrel files. That file + keeps its other types. + - `ResourceKind` is now `Exclude`, so its members are + kebab-case: `knowledge-base`, `mcp-server`, `custom-tool`, `file-folder`, `workflow`, and so + on. + - `UnresolvedNode.kind` is widened to `string`. + - Ids inside composite values are handled like this: + - a scalar or array id becomes a `ResourceNode`; + - in a `files` value, each object keeps its shape and only its `key` field becomes a node; + - a `csv` value becomes the new `CsvNode { $sim: 'csv', items }`, and materialize joins the + items with `,`. +- **A5. Catalog additions.** + - `CatalogBlock.dynamicOutputs?: { source, param }` replaces the boolean. + - New subBlock fields: `visibleFor?` (operation → visible, which 2A precomputes for function + conditions), `columns?`, `step?` and `integer?`. +- **A6. Every stored type prints and compiles.** + - `CatalogBlock.addable?: false` marks a type that may stay in a workflow but cannot be added. + Compile reports a new block of that type as `E_TYPE_NOT_ADDABLE`. + - A type with no builder (legacy, unknown, or `custom_block_*` without a method) uses the + generic builder `block(type, name, params, meta?)` (`GENERIC_BUILDER`). +- **A7. `rows: null` has a source form.** It is an empty branch object: `condition('Name', {})`, + or router `routes: {}`. The implicit default keys (`if` and `else`, `route0`) stay addressable as + ports. A persisted list is never empty. +- **A8. Hashing is solved.** This supersedes item 25. `src/hash.ts` belongs to Wave 1. + - `stableStringify` sorts keys with `compareStrings` and throws on anything that is not JSON. + - `sha256Hex` is built on `@noble/hashes` 2.2.0. + - `canonicalHash`, `sourceFingerprint` and any content digest must use these two. +- **A9. Items, edges and subflow configs.** + - Lock `items` changed to `Record>`, so duplicate and empty + names keep their ids. + - For O1, materialize reuses the whole prev edge object (id and handles) when the + `(from, port, to)` tuple matches. + - Materialize also writes prev's subflow config back verbatim when it is canonical-equal. + - The optional fields of `LoopSpec` and `ParallelSpec` are absent exactly when storage omits + them. Canonicalize never fills defaults. +- **A10. Anchors are structured.** This supersedes item 7's anchor strings. + - `Anchor` is a discriminated union over `header`, `wiring`, `footer`, `block`, `param`, + `inactive`, `edges` and `var`. + - `AnchorKey` is now a branded string, produced only by `encodeAnchor` and read by + `decodeAnchor`. Each segment escapes `%` and `:`. + - For a basic/advanced pair, a `param` anchor uses the `canonicalParamId`. + - `portKey` and `parsePortKey` are the only port string forms. +- **A11. Bindings avoid SDK names.** `SDK_RESERVED_IDENTIFIERS` (JS reserved words plus + `SDK_CORE_EXPORTS`) is enforced on lock bindings. + - **Note for 2E:** `core.d.ts` must export exactly `SDK_CORE_EXPORTS`, and `BlockMeta` needs + `advancedMode?: boolean`, because the CWM keeps that legacy flag. +- **A12. Diagnostic changes.** `Diagnostic.related?: Array<{ span, message }>` was added, along + with the codes `E_APPLY_LINT` and `E_TYPE_NOT_ADDABLE`. `E_MAT_LOCK_WORKFLOW_MISMATCH` was + removed, because the lock no longer carries a workflow or workspace. +- **A13. The boundary rule is tighter.** Rule 3 also bans `.constructor` reads, `import.meta`, and + value references to `globalThis`, `window`, `self`, `global`, `Reflect` and `require`. That + covers computed `globalThis[...]` access. +- **A14. `codeFrame` clamps bad input.** NaN becomes line or column 1, ±Infinity a bound. +- **A15. knip.** Wave 3 removes `includeEntryExports: false` and the `@babel/parser` ignore from + `knip.jsonc` once the consumers land. The `@sim/utils` ignore is already gone, because + `hash.ts` uses it. diff --git a/packages/workflow-code/package.json b/packages/workflow-code/package.json index 1a417537c11..04d867080d0 100644 --- a/packages/workflow-code/package.json +++ b/packages/workflow-code/package.json @@ -26,6 +26,7 @@ }, "dependencies": { "@babel/parser": "7.29.9", + "@noble/hashes": "2.2.0", "@sim/utils": "workspace:*", "@sim/workflow-types": "workspace:*" }, diff --git a/packages/workflow-code/src/anchors.test.ts b/packages/workflow-code/src/anchors.test.ts new file mode 100644 index 00000000000..be82a127852 --- /dev/null +++ b/packages/workflow-code/src/anchors.test.ts @@ -0,0 +1,71 @@ +import { describe, expect, it } from 'vitest' +import { decodeAnchor, encodeAnchor, parsePortKey, portKey } from './anchors' +import type { Anchor, Port } from './model' + +describe('portKey / parsePortKey', () => { + it('round-trips every port kind, including handles that contain colons', () => { + const ports: Port[] = [ + { kind: 'out' }, + { kind: 'error' }, + { kind: 'branch', key: 'elseIf0' }, + { kind: 'subflowStart' }, + { kind: 'subflowEnd' }, + { kind: 'raw', handle: 'legacy:handle:1' }, + ] + for (const port of ports) expect(parsePortKey(portKey(port))).toEqual(port) + expect(portKey({ kind: 'branch', key: 'if' })).toBe('branch:if') + }) + + it('rejects unknown kinds and empty payloads', () => { + for (const text of ['source', 'branch:', 'raw:', 'out:x', '']) { + expect(parsePortKey(text), text).toBeNull() + } + }) +}) + +describe('encodeAnchor / decodeAnchor', () => { + it('round-trips every anchor kind, even when keys contain the separator or escapes', () => { + const anchors: Anchor[] = [ + { kind: 'header' }, + { kind: 'wiring' }, + { kind: 'footer' }, + { kind: 'block', block: 'a:b%3A~2' }, + { kind: 'param', block: 'agent', param: 'credential' }, + { kind: 'inactive', block: 'agent', param: 'old:field' }, + { kind: 'edges', block: 'route', port: 'branch:elseIf0' }, + { kind: 'edges', block: 'x', port: 'raw:a:b' }, + { kind: 'var', variable: 'retries' }, + ] + const keys = anchors.map(encodeAnchor) + expect(new Set(keys).size).toBe(anchors.length) + keys.forEach((key, i) => expect(decodeAnchor(key)).toEqual(anchors[i])) + }) + + it('escapes only % and : so plain keys stay readable', () => { + expect(encodeAnchor({ kind: 'param', block: 'agent', param: 'model' })).toBe( + 'param:agent:model' + ) + expect(encodeAnchor({ kind: 'edges', block: 'r', port: 'branch:if' })).toBe( + 'edges:r:branch%3Aif' + ) + expect(encodeAnchor({ kind: 'block', block: '50%' })).toBe('block:50%25') + }) + + it('returns null for anything encodeAnchor cannot produce', () => { + for (const text of [ + '', + 'nope', + 'header:x', + 'block', + 'block:', + 'block:a:b', + 'param:a', + 'edges:a:source', + 'block:50%', + 'block:%zz', + 'block:%3a', + ]) { + expect(decodeAnchor(text), text).toBeNull() + } + }) +}) diff --git a/packages/workflow-code/src/anchors.ts b/packages/workflow-code/src/anchors.ts new file mode 100644 index 00000000000..959b72f2d6d --- /dev/null +++ b/packages/workflow-code/src/anchors.ts @@ -0,0 +1,105 @@ +/** + * String forms of ports and comment anchors. Edges sort by `portKey`, and comment maps (in the CWM + * and in `workflow.code_meta`) are keyed by `encodeAnchor`, so every engine must use these and + * never format either by hand. + */ + +import type { Anchor, AnchorKey, Port, PortKey } from './model' + +/** The string form of a port: `out`, `error`, `branch:`, `subflowStart`, `subflowEnd`, `raw:`. */ +export function portKey(port: Port): PortKey { + switch (port.kind) { + case 'branch': + return `branch:${port.key}` + case 'raw': + return `raw:${port.handle}` + default: + return port.kind + } +} + +/** Inverse of {@link portKey}; `null` for a string it cannot produce. */ +export function parsePortKey(text: string): Port | null { + switch (text) { + case 'out': + case 'error': + case 'subflowStart': + case 'subflowEnd': + return { kind: text } + } + if (text.startsWith('branch:') && text.length > 'branch:'.length) { + return { kind: 'branch', key: text.slice('branch:'.length) } + } + if (text.startsWith('raw:') && text.length > 'raw:'.length) { + return { kind: 'raw', handle: text.slice('raw:'.length) } + } + return null +} + +function escapeSegment(segment: string): string { + return segment.replace(/%/g, '%25').replace(/:/g, '%3A') +} + +/** `null` when the segment holds a `%` that is not one of the two escapes `escapeSegment` writes. */ +function unescapeSegment(segment: string): string | null { + if (/%(?!25|3A)/.test(segment)) return null + return segment.replace(/%3A/g, ':').replace(/%25/g, '%') +} + +function brand(text: string): AnchorKey { + return text as AnchorKey +} + +/** + * Serializes an anchor as `[:...]`, each segment with `%` → `%25` and `:` → `%3A`, + * so block keys, subBlock ids and port keys may contain either character. Injective: distinct + * anchors never share a key. + */ +export function encodeAnchor(anchor: Anchor): AnchorKey { + switch (anchor.kind) { + case 'header': + case 'wiring': + case 'footer': + return brand(anchor.kind) + case 'block': + return brand(`block:${escapeSegment(anchor.block)}`) + case 'param': + case 'inactive': + return brand(`${anchor.kind}:${escapeSegment(anchor.block)}:${escapeSegment(anchor.param)}`) + case 'edges': + return brand(`edges:${escapeSegment(anchor.block)}:${escapeSegment(anchor.port)}`) + case 'var': + return brand(`var:${escapeSegment(anchor.variable)}`) + } +} + +/** Inverse of {@link encodeAnchor}; `null` for any string it cannot produce. */ +export function decodeAnchor(text: string): Anchor | null { + const [kind, ...raw] = text.split(':') + const segments: string[] = [] + for (const segment of raw) { + const decoded = unescapeSegment(segment) + if (decoded === null || decoded === '') return null + segments.push(decoded) + } + switch (kind) { + case 'header': + case 'wiring': + case 'footer': + return segments.length === 0 && raw.length === 0 ? { kind } : null + case 'block': + return segments.length === 1 ? { kind, block: segments[0] } : null + case 'var': + return segments.length === 1 ? { kind, variable: segments[0] } : null + case 'param': + case 'inactive': + return segments.length === 2 ? { kind, block: segments[0], param: segments[1] } : null + case 'edges': { + if (segments.length !== 2) return null + const port = parsePortKey(segments[1]) + return port ? { kind, block: segments[0], port: portKey(port) } : null + } + default: + return null + } +} diff --git a/packages/workflow-code/src/api.ts b/packages/workflow-code/src/api.ts index 96323b3daf3..400c6b34da9 100644 --- a/packages/workflow-code/src/api.ts +++ b/packages/workflow-code/src/api.ts @@ -119,6 +119,19 @@ export interface MaterializeOptions { layout?: 'preserve' | 'lock' /** Disables identity rule 4 (`--no-infer-renames`). */ inferRenames?: boolean + /** + * Bindings as written in the compiled file (`CompileResult.hints`), by block key. Identity + * rule 2 matches a lock entry whose key is gone by its binding, so a human who edits only the + * display string keeps the block's id (s1 §4). + */ + compiledBindings?: Record + /** + * How the lock relates to `prev`: `fresh` when its base fingerprint matches the stored graph, + * `stale` when it does not, `none` when there is no lock. Rule 4 (inferred renames) runs only + * for `stale` and `none`; a `stale` lock entry whose id left prev is re-created with + * `W_MAT_DELETED_SINCE_PULL` (s1 §4 "Stale lock"). + */ + lockFreshness: 'fresh' | 'stale' | 'none' } export interface MaterializeResult { @@ -131,8 +144,14 @@ export interface MaterializeResult { } /** - * Writes a CWM back to a stored graph. Every param whose canonical form equals prev's keeps - * prev's raw value, so a no-op round trip is byte-identical (build-spec decision 1, s1 D1). + * Writes a CWM back to a stored graph. Byte-identical no-op round trips (O1; build-spec + * decision 1, s1 D1) require, for every matched block: + * - each param whose canonical form equals prev's keeps prev's raw value; otherwise the encoding + * is prev's raw encoding when present, else the catalog `storage`; + * - each edge whose `(from, port, to)` tuple matches a prev edge reuses that whole prev edge + * object, handles and id included; + * - a subflow config canonical-equal to prev's is written back verbatim, to both `block.data` and + * the loops/parallels map. * Server-owned fields come from prev by id (s1 D6). */ export type MaterializeFn = ( @@ -144,7 +163,7 @@ export type MaterializeFn = ( /** Structural equality ignoring `annotations`, key order and edge order (s1 quirk 28). */ export type CanonicalEqualsFn = (a: CanonicalWorkflow, b: CanonicalWorkflow) => boolean -/** Lowercase hex SHA-256 over a stable serialization of the CWM minus `annotations`. */ +/** `sha256Hex(stableStringify(workflow minus annotations))`, both from `hash.ts`. */ export type CanonicalHashFn = (workflow: CanonicalWorkflow) => string /** Block-level fields a diff can name, besides params and modes. */ @@ -272,13 +291,16 @@ export interface PrintResult { diagnostics: Diagnostic[] } -/** Prints a CWM as a source file. Its output always compiles with zero errors (s3 D12). */ +/** + * Prints a CWM as a source file. Its output always compiles with zero errors (s3 D12): a block + * whose type has no catalog builder prints through `block(type, name, params, meta?)`. + */ export type PrintWorkflowFn = (input: PrintInput) => PrintResult /** - * `sf1:` + SHA-256 over the CWM minus annotations and layout, plus the lock ids, variables and - * locked flags (build-spec decision 11, s4 D3). Layout is excluded so a canvas drag never fails a - * push. + * `sf1:` + `sha256Hex(stableStringify({ workflow minus annotations, identity }))` (build-spec + * decision 11, s4 D3). The CWM already carries variables and locked flags and has no layout, so a + * canvas drag never fails a push. */ export type SourceFingerprintFn = ( workflow: CanonicalWorkflow, diff --git a/packages/workflow-code/src/catalog/types.ts b/packages/workflow-code/src/catalog/types.ts index 9ab55eb5794..0f9c81e8484 100644 --- a/packages/workflow-code/src/catalog/types.ts +++ b/packages/workflow-code/src/catalog/types.ts @@ -10,7 +10,14 @@ */ import type { OutputCondition, PrimitiveValueType, SubBlockType } from '@sim/workflow-types/blocks' -import type { CanonicalParamId, Json, ParamStorage, ResourceKind, SubBlockId } from '../model' +import type { CanonicalParamId, Json, ResourceKind, SubBlockId } from '../model' + +/** + * How a subBlock stores a value. `json-string` means the subBlock holds JSON text (tools, + * condition/router rows, tableRows, inputFormat, tag filters; s1 quirk 9). Only materialize reads + * this: the CWM is encoding-free. + */ +export type ParamStorage = 'native' | 'json-string' /** A function-form condition or option list the projection could not evaluate to data. */ export interface OpaqueMarker { @@ -84,6 +91,12 @@ export interface CatalogSubBlock { */ surface?: 'action' | 'trigger' condition?: CatalogCondition + /** + * Per operation id, whether this subBlock is visible, precomputed by the catalog projection when + * `condition` is a function (and so `{ opaque: true }` here). Absent for data conditions, which + * consumers evaluate themselves. An operation missing from the map counts as visible. + */ + visibleFor?: Record required?: boolean | CatalogCondition /** UI clearing and fetch ordering only; never part of types or visibility (s2 §2). */ dependsOn?: { all: SubBlockId[]; any: SubBlockId[] } @@ -106,12 +119,18 @@ export interface CatalogSubBlock { multiple?: boolean min?: number max?: number + /** Slider increment (registry `step`). */ + step?: number + /** Slider accepts integers only (registry `integer`). */ + integer?: boolean + /** Column headers of a `table` subBlock, in order (registry `columns`). */ + columns?: string[] selectorKey?: string serviceId?: string valueKind: CatalogValueKind /** Set iff `valueKind` is `resource`. */ resourceKind?: ResourceKind - /** Preferred encoding for a new value; prev's encoding wins when it exists (s1 D1). */ + /** Encoding for a value with no prev raw value; prev's encoding wins when it exists (s1 D1). */ storage: ParamStorage structured?: CatalogStructuredKind } @@ -154,10 +173,27 @@ export interface CatalogBlockGraph { branches?: { subBlockId: SubBlockId; kind: 'condition' | 'router' } } +/** Which param shapes a block's outputs at run time. */ +export interface CatalogDynamicOutputs { + /** + * `responseFormat`: agent structured output; `inputFormat`: start/trigger input fields; + * `humanForm`: human-in-the-loop form fields; `tableRows`: table row columns. + */ + source: 'responseFormat' | 'inputFormat' | 'humanForm' | 'tableRows' + /** The subBlock id (or canonical param id) that holds the shape. */ + param: string +} + export interface CatalogBlock { type: string name: string category: 'blocks' | 'tools' | 'triggers' + /** + * `false` for a type that may stay in a workflow but must not be added: types already stored in + * this workflow but no longer offered (s4 §2 apply step 2), hidden legacy versions, preview + * blocks. Compile rejects a new block of such a type; an existing one keeps compiling. + */ + addable?: false lifecycle?: CatalogBlockLifecycle triggerAllowed?: boolean triggers?: { enabled: boolean; available: string[] } @@ -173,10 +209,11 @@ export interface CatalogBlock { inputs: Record outputs: Record /** - * Outputs derived from params at run time (agent `responseFormat`, start `inputFormat`, HITL - * form, table rows), so any path is allowed and `W_UNKNOWN_OUTPUT_PATH` is skipped. + * Present when outputs derive from a param at run time. Compile and codegen read output paths + * from that param's value; where it cannot be read statically, any path is allowed and + * `W_UNKNOWN_OUTPUT_PATH` is skipped. */ - dynamicOutputs: boolean + dynamicOutputs?: CatalogDynamicOutputs graph: CatalogBlockGraph legacyIds?: CatalogLegacyId[] legacyCanonicalIds?: Array<{ from: CanonicalParamId; to: CanonicalParamId }> @@ -240,6 +277,12 @@ export interface BlockCatalog { sdkMajor: number blocks: Record triggers: Record + /** + * Generated builder methods by dotted SDK path. A stored type with no entry here (legacy, + * unknown, or `custom_block_*` with no generated method) prints and compiles through the + * generic builder `block(type, name, params, meta?)` (`GENERIC_BUILDER` in `sdk.ts`), so every + * type always round-trips. + */ builders: Record /** Docs shard. */ tools?: Record diff --git a/packages/workflow-code/src/diagnostics/codes.ts b/packages/workflow-code/src/diagnostics/codes.ts index 3c2dcc13d0a..216e5d1ba0c 100644 --- a/packages/workflow-code/src/diagnostics/codes.ts +++ b/packages/workflow-code/src/diagnostics/codes.ts @@ -70,6 +70,8 @@ export type CompileEdgeCode = /** Checks against the block catalog (s3 §4 "Catalog checks", build-spec decision 2). */ export type CompileCatalogCode = | 'E_UNKNOWN_BUILDER' + /** A new block of a catalog type marked `addable: false`; existing blocks keep compiling. */ + | 'E_TYPE_NOT_ADDABLE' /** `hint` carries a did-you-mean over the params visible for the chosen operation. */ | 'E_UNKNOWN_PARAM' /** The builder already pins this param (`operation` or a `fixed` entry). */ @@ -131,9 +133,9 @@ export type LockDiagnosticCode = | 'E_LOCK_SHAPE' /** A field the schema does not define (typos are caught, not ignored). */ | 'E_LOCK_UNKNOWN_FIELD' - /** A block or variable key that is not in normalized form, or does not match its name. */ + /** A block or variable key that is not in normalized form. */ | 'E_LOCK_KEY' - /** A `binding` that is not a valid, non-reserved JS identifier. */ + /** A `binding` that is not a JS identifier, or is in `SDK_RESERVED_IDENTIFIERS`. */ | 'E_LOCK_BINDING' | 'E_LOCK_DUPLICATE_BINDING' /** The same block, variable or branch id under two keys (s1 §4 "Stale lock"). */ @@ -174,8 +176,6 @@ export type CanonicalizeDiagnosticCode = export type MaterializeDiagnosticCode = /** Two lock keys carry the same block id. */ | 'E_MAT_DUPLICATE_LOCK_ID' - /** `lock.workflowId` / `workspaceId` differ from the target workflow. */ - | 'E_MAT_LOCK_WORKFLOW_MISMATCH' /** A resource key the resolver cannot map to an id in this workspace. */ | 'E_MAT_UNKNOWN_RESOURCE' /** A lock entry whose id has left prev; the block is re-created (s1 §4 "Stale lock"). */ @@ -236,7 +236,9 @@ export type ApplyDiagnosticCode = | 'W_APPLY_TYPE_CHANGED' /** Connections to blocks that did not survive the gates were dropped. */ | 'W_APPLY_PENDING_CONNECTIONS_DROPPED' - /** A workflow lint finding, mapped to a source line. */ + /** A blocking workflow lint finding, mapped to a source line. */ + | 'E_APPLY_LINT' + /** A non-blocking workflow lint finding, mapped to a source line. */ | 'W_APPLY_LINT' export type DiagnosticCode = diff --git a/packages/workflow-code/src/diagnostics/frame.test.ts b/packages/workflow-code/src/diagnostics/frame.test.ts index 5703ba9f950..c0267203dc1 100644 --- a/packages/workflow-code/src/diagnostics/frame.test.ts +++ b/packages/workflow-code/src/diagnostics/frame.test.ts @@ -59,6 +59,22 @@ describe('codeFrame', () => { expect(codeFrame('', { line: 0, column: 0 })).toBe(['> 1 |', ' | ^'].join('\n')) }) + it('treats NaN as the first line or column and Infinity as the last, instead of throwing', () => { + expect(codeFrame('ab\ncd', { line: Number.NaN, column: Number.NaN })).toBe( + ['> 1 | ab', ' | ^', ' 2 | cd'].join('\n') + ) + expect( + codeFrame('ab\ncd', { + line: Number.POSITIVE_INFINITY, + column: Number.POSITIVE_INFINITY, + endColumn: Number.NaN, + }) + ).toBe([' 1 | ab', '> 2 | cd', ' | ^'].join('\n')) + expect( + codeFrame('ab', { line: 1, column: 1, endLine: Number.NaN, endColumn: Number.NaN }) + ).toBe(['> 1 | ab', ' | ^'].join('\n')) + }) + it('never emits ANSI escapes or trailing spaces on empty lines', () => { const frame = codeFrame('a\n\nb', { line: 3, column: 1 }) expect(frame).toBe([' 1 | a', ' 2 |', '> 3 | b', ' | ^'].join('\n')) diff --git a/packages/workflow-code/src/diagnostics/frame.ts b/packages/workflow-code/src/diagnostics/frame.ts index 8c84ac3b02f..5a9c9bb5550 100644 --- a/packages/workflow-code/src/diagnostics/frame.ts +++ b/packages/workflow-code/src/diagnostics/frame.ts @@ -32,6 +32,8 @@ interface DiagnosticFields { /** `codeFrame(text, span)`; present whenever `span` is. */ frame?: string fix?: DiagnosticFix + /** Other locations that explain this one, such as the first declaration for a duplicate name. */ + related?: Array<{ span: SourceSpan; message: string }> blockKey?: BlockKey /** Set by the apply path once identity is resolved (s4 `SourceDiagnostic.blockId`). */ blockId?: string @@ -66,8 +68,10 @@ export interface FrameLocation { const LINE_BREAK = /\r\n|[\n\r\u2028\u2029]/ const CONTEXT_LINES = 2 -function clamp(value: number, min: number, max: number): number { - return Math.min(Math.max(value, min), max) +/** `value` truncated and clamped; NaN or absent becomes `fallback`, ±Infinity a bound. */ +function position(value: number | undefined, fallback: number, min: number, max: number): number { + const integer = value === undefined || Number.isNaN(value) ? fallback : Math.trunc(value) + return Math.min(Math.max(integer, min), max) } /** @@ -75,17 +79,17 @@ function clamp(value: number, min: number, max: number): number { * side, `>` on every line inside the span, and a caret row under the start line. Carets run to * `endColumn` when the span ends on the start line, else to the end of that line, and never * fewer than one. Tabs before the caret are kept so it lines up under tabbed source. A location - * outside the text is clamped, never thrown. No ANSI escapes. + * outside the text, NaN or infinite is clamped, never thrown. No ANSI escapes. */ export function codeFrame(text: string, loc: FrameLocation): string { const lines = text.split(LINE_BREAK) - const line = clamp(Math.trunc(loc.line), 1, lines.length) - const endLine = clamp(Math.trunc(loc.endLine ?? line), line, lines.length) + const line = position(loc.line, 1, 1, lines.length) + const endLine = position(loc.endLine, line, line, lines.length) const source = lines[line - 1] - const column = clamp(Math.trunc(loc.column), 1, source.length + 1) + const column = position(loc.column, 1, 1, source.length + 1) const caretEnd = endLine === line - ? clamp(Math.trunc(loc.endColumn ?? column + 1), column + 1, source.length + 2) + ? position(loc.endColumn, column + 1, column + 1, source.length + 2) : source.length + 1 const caretCount = Math.max(1, caretEnd - column) diff --git a/packages/workflow-code/src/hash.test.ts b/packages/workflow-code/src/hash.test.ts new file mode 100644 index 00000000000..7547764fd6f --- /dev/null +++ b/packages/workflow-code/src/hash.test.ts @@ -0,0 +1,52 @@ +import { describe, expect, it } from 'vitest' +import { sha256Hex, stableStringify } from './hash' + +describe('stableStringify', () => { + it('serializes objects the same whatever their key order, at every depth', () => { + const a = { b: 1, a: { d: [1, { y: 2, x: 1 }], c: null } } + const b = { a: { c: null, d: [1, { x: 1, y: 2 }] }, b: 1 } + expect(stableStringify(a)).toBe('{"a":{"c":null,"d":[1,{"x":1,"y":2}]},"b":1}') + expect(stableStringify(b)).toBe(stableStringify(a)) + }) + + it('orders keys by code unit, not by locale', () => { + expect(stableStringify({ b: 1, B: 2, a: 3, _: 4 })).toBe('{"B":2,"_":4,"a":3,"b":1}') + }) + + it('keeps array order and drops undefined object fields', () => { + expect(stableStringify({ list: [3, 1, 2], gone: undefined })).toBe('{"list":[3,1,2]}') + }) + + it('escapes lone surrogates so distinct strings never collide', () => { + expect(stableStringify('\uD800')).not.toBe(stableStringify('\uD801')) + expect(stableStringify('\uD800')).toBe('"\\ud800"') + }) + + it('rejects values JSON cannot represent instead of guessing', () => { + expect(() => stableStringify({ n: Number.NaN })).toThrow(TypeError) + expect(() => stableStringify([Number.POSITIVE_INFINITY])).toThrow(TypeError) + expect(() => stableStringify([undefined])).toThrow(TypeError) + expect(() => stableStringify({ f: () => 1 })).toThrow(TypeError) + expect(() => stableStringify(BigInt(1))).toThrow(TypeError) + expect(() => stableStringify(new Date(0))).toThrow(TypeError) + }) + + it('rejects cycles but allows a shared object reached twice', () => { + const shared = { x: 1 } + expect(stableStringify({ a: shared, b: shared })).toBe('{"a":{"x":1},"b":{"x":1}}') + const cyclic: Record = {} + cyclic.self = cyclic + expect(() => stableStringify(cyclic)).toThrow(TypeError) + }) +}) + +describe('sha256Hex', () => { + it('matches the FIPS 180-2 test vectors as lowercase hex over UTF-8', () => { + expect(sha256Hex('')).toBe('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855') + expect(sha256Hex('abc')).toBe( + 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad' + ) + expect(sha256Hex('é')).toBe(sha256Hex('é')) + expect(sha256Hex('é')).not.toBe(sha256Hex('é')) + }) +}) diff --git a/packages/workflow-code/src/hash.ts b/packages/workflow-code/src/hash.ts new file mode 100644 index 00000000000..31af6e4b373 --- /dev/null +++ b/packages/workflow-code/src/hash.ts @@ -0,0 +1,68 @@ +/** + * The one hashing primitive for `canonicalHash`, lock `contentHash`-style digests and + * `sourceFingerprint`, so every engine hashes identical bytes. Pure JS: the boundary rule bans + * `node:crypto` here, and `crypto.subtle` is async. + */ + +import { sha256 } from '@noble/hashes/sha2.js' +import { bytesToHex, utf8ToBytes } from '@noble/hashes/utils.js' +import { compareStrings } from '@sim/utils/string' + +function serialize(value: unknown, ancestors: Set): string { + if (value === null) return 'null' + switch (typeof value) { + case 'boolean': + return value ? 'true' : 'false' + case 'number': + if (!Number.isFinite(value)) throw new TypeError(`Cannot hash non-finite number ${value}`) + return JSON.stringify(value) + case 'string': + return JSON.stringify(value) + case 'object': + break + default: + throw new TypeError(`Cannot hash a value of type ${typeof value}`) + } + if (ancestors.has(value)) throw new TypeError('Cannot hash a cyclic value') + ancestors.add(value) + let text: string + if (Array.isArray(value)) { + text = `[${value + .map((item) => { + if (item === undefined) throw new TypeError('Cannot hash undefined inside an array') + return serialize(item, ancestors) + }) + .join(',')}]` + } else { + const prototype = Object.getPrototypeOf(value) + if (prototype !== Object.prototype && prototype !== null) { + throw new TypeError('Cannot hash a non-plain object') + } + const entries: Array<[string, unknown]> = Object.entries(value) + entries.sort(([a], [b]) => compareStrings(a, b)) + const fields: string[] = [] + for (const [key, field] of entries) { + if (field !== undefined) fields.push(`${JSON.stringify(key)}:${serialize(field, ancestors)}`) + } + text = `{${fields.join(',')}}` + } + ancestors.delete(value) + return text +} + +/** + * Deterministic JSON: object keys sorted by UTF-16 code unit (`compareStrings`), array order kept, + * `undefined` object fields dropped, no whitespace. Key order of the input never changes the + * output, which matters because jsonb does not keep it (s1 quirk 28). Throws `TypeError` on + * anything JSON cannot represent exactly (NaN, ±Infinity, `undefined` in arrays, functions, + * bigint, class instances) and on cycles. `JSON.stringify` escapes lone surrogates, so the output + * is well-formed and distinct strings never collide after UTF-8 encoding. + */ +export function stableStringify(value: unknown): string { + return serialize(value, new Set()) +} + +/** Lowercase hex SHA-256 of `text` encoded as UTF-8. */ +export function sha256Hex(text: string): string { + return bytesToHex(sha256(utf8ToBytes(text))) +} diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index 5e09b6fac76..adb17b5223d 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -1,3 +1,4 @@ +export { decodeAnchor, encodeAnchor, parsePortKey, portKey } from './anchors' export type { BlockAttribute, BlockChange, @@ -36,6 +37,7 @@ export type { CatalogBlockLifecycle, CatalogBuilder, CatalogCondition, + CatalogDynamicOutputs, CatalogLegacyId, CatalogOption, CatalogOutput, @@ -45,6 +47,7 @@ export type { CatalogTrigger, CatalogValueKind, OpaqueMarker, + ParamStorage, SubBlockConditionClause, } from './catalog/types' export type { @@ -72,10 +75,14 @@ export { type LocatedDiagnostic, type SourceSpan, } from './diagnostics/frame' +export { sha256Hex, stableStringify } from './hash' export { + type LockBase, type LockDiagnostic, + type LockExtensionKey, type LockIdentity, type LockIdentityBlock, + type LockItem, type LockLayout, type ParseWorkflowLockResult, parseWorkflowLock, @@ -84,6 +91,7 @@ export { type WorkflowLockV1, } from './lock' export type { + Anchor, AnchorKey, BlockKey, BranchKey, @@ -98,12 +106,12 @@ export type { CanonicalWorkflow, CanonicalWorkflowMeta, CodeComment, + CsvNode, Json, LiteralNode, LoopSpec, ParallelSpec, ParamMode, - ParamStorage, Port, PortKey, ResourceKind, @@ -116,3 +124,4 @@ export type { VarNode, WorkflowAnnotations, } from './model' +export { GENERIC_BUILDER, SDK_CORE_EXPORTS, SDK_RESERVED_IDENTIFIERS } from './sdk' diff --git a/packages/workflow-code/src/lock.test.ts b/packages/workflow-code/src/lock.test.ts index e5b879989ea..4462feb1e5f 100644 --- a/packages/workflow-code/src/lock.test.ts +++ b/packages/workflow-code/src/lock.test.ts @@ -1,44 +1,25 @@ import { describe, expect, it } from 'vitest' import { parseWorkflowLock } from './lock' -const HASH = 'a'.repeat(64) - function validLock(): Record { return { lockVersion: 1, - workflowId: 'wf-1', - workspaceId: 'ws-1', - catalogHash: 'cat-1', - baseFingerprint: `sf1:${'b'.repeat(64)}`, blocks: { - start: { - id: 'blk-start', - type: 'start_trigger', - name: 'Start', - binding: 'start', - order: 0, - parent: null, - contentHash: HASH, - }, - each: { - id: 'blk-each', - type: 'loop', - name: 'Each', - binding: 'each', - order: 1, - parent: null, - contentHash: HASH, - }, + start: { id: 'blk-start', parent: null, binding: 'start', order: 0 }, + each: { id: 'blk-each', parent: null, binding: 'each', order: 1 }, route: { id: 'blk-route', - type: 'condition', - name: 'Route', + parent: 'each', binding: 'route', order: 2, - parent: 'each', - contentHash: HASH, branches: { if: 'blk-route-if', else: 'blk-route-else' }, - items: { inputFormat: { subject: 'field-1' } }, + items: { + inputFormat: [ + { name: 'subject', id: 'field-1' }, + { name: '', id: 'field-2' }, + { name: 'subject', id: 'field-3' }, + ], + }, layout: { x: 10, y: -4.5, w: 200, horizontalHandles: true }, codeFile: 'functions/route.js', }, @@ -70,6 +51,14 @@ describe('parseWorkflowLock', () => { expect(parseWorkflowLock(JSON.stringify(validLock())).lock).toEqual(fromObject.lock) }) + it('keeps items with duplicate or empty names, in order', () => { + expect(parseWorkflowLock(validLock()).lock?.blocks.route.items?.inputFormat).toEqual([ + { name: 'subject', id: 'field-1' }, + { name: '', id: 'field-2' }, + { name: 'subject', id: 'field-3' }, + ]) + }) + it('rejects text that is not JSON and values that are not objects', () => { expect(codesFor('{"lockVersion":')).toEqual(['E_LOCK_JSON ']) expect(codesFor([])).toEqual(['E_LOCK_SHAPE ']) @@ -83,56 +72,63 @@ describe('parseWorkflowLock', () => { }) it('reports every problem at once with JSON Pointer paths', () => { - const lock = withBlock('route', { binding: 'class', order: -1, contentHash: 'xyz' }) - lock.workflowId = '' - lock.baseFingerprint = 'abc' + const lock = withBlock('route', { id: '', binding: 'class', order: -1 }) + lock.variables = { retries: 7 } expect(codesFor(lock)).toEqual([ - 'E_LOCK_SHAPE /workflowId', - 'E_LOCK_SHAPE /baseFingerprint', + 'E_LOCK_SHAPE /blocks/route/id', 'E_LOCK_BINDING /blocks/route/binding', 'E_LOCK_SHAPE /blocks/route/order', - 'E_LOCK_SHAPE /blocks/route/contentHash', + 'E_LOCK_SHAPE /variables/retries', ]) }) it('rejects fields the schema does not define, at every level', () => { const lock = withBlock('start', { ident: 'start' }) - lock.edges = {} - ;(lock.blocks as Record>).route.layout = { x: 1, y: 2, z: 3 } + lock.workflowId = 'wf-1' + const route = (lock.blocks as Record>).route + route.layout = { x: 1, y: 2, z: 3 } + route.items = { inputFormat: [{ name: 'a', id: 'f', type: 'string' }] } expect(codesFor(lock)).toEqual([ - 'E_LOCK_UNKNOWN_FIELD /edges', + 'E_LOCK_UNKNOWN_FIELD /workflowId', 'E_LOCK_UNKNOWN_FIELD /blocks/start/ident', + 'E_LOCK_UNKNOWN_FIELD /blocks/route/items/inputFormat/0/type', 'E_LOCK_UNKNOWN_FIELD /blocks/route/layout/z', ]) }) - it('requires keys in normalized form and matching their block name', () => { + it('tolerates and preserves x- extension fields at every object level', () => { + const lock = withBlock('start', { 'x-note': { by: 'tool' } }) + lock['x-tool'] = 'v2' + ;(lock.blocks as Record>).route.layout = { + x: 1, + y: 2, + 'x-snap': true, + } + const parsed = parseWorkflowLock(lock).lock + expect(parsed?.['x-tool']).toBe('v2') + expect(parsed?.blocks.start['x-note']).toEqual({ by: 'tool' }) + expect(parsed?.blocks.route.layout?.['x-snap']).toBe(true) + expect(codesFor({ ...validLock(), 'x-bad': () => 1 })).toEqual(['E_LOCK_SHAPE /x-bad']) + }) + + it('requires block and variable keys in normalized form, including ~n collision keys', () => { const lock = validLock() const blocks = lock.blocks as Record> - blocks['My Block'] = { ...blocks.start, id: 'blk-x', binding: 'myBlock', name: 'My Block' } - blocks.start.name = 'Begin' + blocks['My Block'] = { id: 'blk-x', parent: null, binding: 'myBlock', order: 3 } + blocks['start~2'] = { id: 'blk-start-2', parent: null, binding: 'start2', order: 4 } lock.variables = { 'Retry Count': 'var-2' } expect(codesFor(lock)).toEqual([ - 'E_LOCK_KEY /blocks/start/name', 'E_LOCK_KEY /blocks/My Block', 'E_LOCK_KEY /variables/Retry Count', ]) }) - it('accepts the ~n key a legacy name collision is projected to', () => { - const lock = validLock() - const blocks = lock.blocks as Record> - blocks['start~2'] = { ...blocks.start, id: 'blk-start-2', binding: 'start2', order: 3 } - expect(parseWorkflowLock(lock).diagnostics).toBeUndefined() - }) - - it('rejects bindings that are not identifiers or that two blocks share', () => { - expect(codesFor(withBlock('route', { binding: '2fast' }))).toEqual([ - 'E_LOCK_BINDING /blocks/route/binding', - ]) - expect(codesFor(withBlock('route', { binding: 'await' }))).toEqual([ - 'E_LOCK_BINDING /blocks/route/binding', - ]) + it('rejects bindings that are not identifiers, are reserved, shadow the SDK, or repeat', () => { + for (const binding of ['2fast', 'await', 'env', 'block', 't']) { + expect(codesFor(withBlock('route', { binding })), binding).toEqual([ + 'E_LOCK_BINDING /blocks/route/binding', + ]) + } expect(codesFor(withBlock('route', { binding: 'start' }))).toEqual([ 'E_LOCK_DUPLICATE_BINDING /blocks/route/binding', ]) @@ -142,7 +138,7 @@ describe('parseWorkflowLock', () => { expect(parseWorkflowLock(withBlock('route', { order: 0 })).diagnostics).toBeUndefined() }) - it('rejects an id used by two blocks, two variables, or two branches of one block', () => { + it('rejects an id used twice by blocks, variables, branches of one block, or items', () => { expect(codesFor(withBlock('route', { id: 'blk-start' }))).toEqual([ 'E_LOCK_DUPLICATE_ID /blocks/route/id', ]) @@ -152,6 +148,18 @@ describe('parseWorkflowLock', () => { expect(codesFor(withBlock('route', { branches: { if: 'x', else: 'x' } }))).toEqual([ 'E_LOCK_DUPLICATE_ID /blocks/route/branches/else', ]) + expect( + codesFor( + withBlock('route', { + items: { + inputFormat: [ + { name: 'a', id: 'f' }, + { name: 'b', id: 'f' }, + ], + }, + }) + ) + ).toEqual(['E_LOCK_DUPLICATE_ID /blocks/route/items/inputFormat/1/id']) }) it('rejects parents that are missing, self-referential, or cyclic', () => { @@ -161,8 +169,7 @@ describe('parseWorkflowLock', () => { expect(codesFor(withBlock('route', { parent: 'route' }))).toEqual([ 'E_LOCK_PARENT /blocks/route/parent', ]) - const cyclic = withBlock('each', { parent: 'route' }) - expect(codesFor(cyclic)).toEqual([ + expect(codesFor(withBlock('each', { parent: 'route' }))).toEqual([ 'E_LOCK_PARENT /blocks/each/parent', 'E_LOCK_PARENT /blocks/route/parent', ]) @@ -182,11 +189,17 @@ describe('parseWorkflowLock', () => { } }) - it('rejects non-finite layout numbers and malformed item maps', () => { + it('rejects non-finite layout numbers and malformed item lists', () => { expect( - codesFor(withBlock('route', { layout: { x: Number.NaN, y: 0 }, items: { inputFormat: [] } })) + codesFor( + withBlock('route', { + layout: { x: Number.NaN, y: 0 }, + items: { inputFormat: { subject: 'f' }, other: [{ name: 1, id: 'g' }] }, + }) + ) ).toEqual([ 'E_LOCK_SHAPE /blocks/route/items/inputFormat', + 'E_LOCK_SHAPE /blocks/route/items/other/0/name', 'E_LOCK_SHAPE /blocks/route/layout/x', ]) }) @@ -194,7 +207,7 @@ describe('parseWorkflowLock', () => { it('escapes ~ and / in pointer segments', () => { const lock = validLock() const blocks = lock.blocks as Record> - blocks['a/b~2'] = { ...blocks.start, id: 'blk-ab', binding: 'ab', name: 'a/b', order: 'x' } + blocks['a/b~2'] = { id: 'blk-ab', parent: null, binding: 'ab', order: 'x' } expect(codesFor(lock)).toEqual(['E_LOCK_SHAPE /blocks/a~1b~02/order']) }) }) diff --git a/packages/workflow-code/src/lock.ts b/packages/workflow-code/src/lock.ts index b4ead1d7402..e1ff836e4d9 100644 --- a/packages/workflow-code/src/lock.ts +++ b/packages/workflow-code/src/lock.ts @@ -1,22 +1,34 @@ /** - * `.sim/lock.json`: the identity sidecar of a workflow source file. It binds keys to ids so a - * canvas rename, a drag or a branch reorder never changes identity (build-spec decision 4, - * s1 §2 `WorkflowLockV1`, s3 D10/D11). + * `.sim/lock.json`: the committed identity sidecar of a workflow source file. It binds keys to ids + * so a canvas rename, a drag or a branch reorder never changes identity (build-spec decision 4, + * s1 §2, s3 D10/D11). Edge ids are never in the lock (s1 D5). * - * Ids are physical ids for single-workflow `source get/apply`; in a repo they are logical ids that - * equal the physical ones in the home environment (build-spec decision 4). Edge ids are never in - * the lock (s1 D5). + * The lock holds only environment-independent facts: logical ids, bindings, print order, code + * files and layout. Everything tied to one environment's stored state (workspace, freshness + * fingerprint, catalog hash) is the separate {@link LockBase}: single-workflow `source get/apply` + * returns and takes it beside the lock, and a repo keeps it in `.sim/state//revision.json`. + * Logical ids equal physical ids in the home environment; elsewhere + * `workspace_repo_block_binding` maps them (build-spec decision 4). + * + * Version policy: adding an optional field does not bump `lockVersion`. Validators learn a field + * before writers emit it; until every reader knows a field, data goes under an `x-` key, which + * every validator tolerates and preserves. Removing or changing the meaning of a field bumps it. */ import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' import type { Diagnostic } from './diagnostics/frame' -import type { BlockKey, BranchKey, SubBlockId, VarKey } from './model' +import type { BlockKey, BranchKey, Json, SubBlockId, VarKey } from './model' +import { SDK_RESERVED_IDENTIFIERS } from './sdk' /** `sf1:` + lowercase hex SHA-256 (build-spec decision 11, s4 D3). */ export type SourceFingerprint = `sf1:${string}` +/** An extension field: tolerated and preserved by every validator, never interpreted. */ +export type LockExtensionKey = `x-${string}` + /** Canvas geometry, used only for new blocks or `layout: 'lock'` applies (s4 D3). */ export interface LockLayout { + [extension: LockExtensionKey]: Json x: number y: number w?: number @@ -26,24 +38,28 @@ export interface LockLayout { horizontalHandles?: boolean } +/** + * One id-bearing list entry (an inputFormat field). A list, not a name → id map, so duplicate or + * empty names keep their ids. These ids are cross-workflow foreign keys: custom block subBlock ids + * are the Start field ids (blocks/custom/build-config.ts:134-151, s1 §4 "Items"). + */ +export interface LockItem { + name: string + id: string +} + /** * The id-bearing half of a lock block: what canonicalize derives from a stored graph and * materialize returns. `sourceFingerprint` hashes exactly this plus the CWM. */ export interface LockIdentityBlock { id: string - type: string - /** Display name at pull time; the three-way base when the canvas renamed the block (s1 §4). */ - name: string + /** The enclosing container's key, or `null` at the root. */ parent: BlockKey | null /** Branch key → stored row id (condition/router only). */ branches?: Record - /** - * Per subBlock, item name → item id for id-bearing lists (inputFormat field ids). These are - * cross-workflow foreign keys: custom block subBlock ids are the Start field ids - * (blocks/custom/build-config.ts:134-151, s1 §4 "Items"). - */ - items?: Record> + /** Per subBlock, its id-bearing items in stored order. */ + items?: Record } /** The ids of one workflow, keyed the way the CWM is. */ @@ -54,10 +70,11 @@ export interface LockIdentity { } export interface WorkflowLockBlock extends LockIdentityBlock { + [extension: LockExtensionKey]: Json /** * The TS `const` identifier the block is printed as (s3 calls it `ident`). Derived camelCase from * the name on first print, then persisted, so a canvas rename changes one line - * (build-spec decision 4). + * (build-spec decision 4). Never one of `SDK_RESERVED_IDENTIFIERS`. */ binding: string /** @@ -66,23 +83,25 @@ export interface WorkflowLockBlock extends LockIdentityBlock { * merged from two branches stay valid. */ order: number - /** Lowercase hex SHA-256 of the canonical block (`canonicalHash` over that block alone). */ - contentHash: string layout?: LockLayout /** Repo-relative path of the block's function-code file (build-spec decision 9). */ codeFile?: string } export interface WorkflowLockV1 { + [extension: LockExtensionKey]: Json lockVersion: 1 - workflowId: string + blocks: Record + variables: Record +} + +/** One environment's freshness facts for a lock (see the module comment). */ +export interface LockBase { workspaceId: string - /** The catalog `hash` the file was printed against. */ - catalogHash: string /** The DB freshness token at pull; apply answers 409 when it no longer matches. */ baseFingerprint: SourceFingerprint - blocks: Record - variables: Record + /** The catalog `hash` the file was printed against. */ + catalogHash: string } export type LockDiagnostic = Diagnostic< @@ -103,88 +122,13 @@ export type ParseWorkflowLockResult = | { lock: WorkflowLockV1; diagnostics?: undefined } | { lock?: undefined; diagnostics: LockDiagnostic[] } -const HEX_SHA256 = /^[0-9a-f]{64}$/ -const FINGERPRINT = /^sf1:[0-9a-f]{64}$/ const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ -const COLLISION_SUFFIX = /^(.*)~([2-9]|[1-9][0-9]+)$/ const DRIVE_PATH = /^[A-Za-z]:/ -/** Reserved words plus strict-mode restrictions; none can name a `const`. */ -const RESERVED_IDENTIFIERS = new Set([ - 'arguments', - 'await', - 'break', - 'case', - 'catch', - 'class', - 'const', - 'continue', - 'debugger', - 'default', - 'delete', - 'do', - 'else', - 'enum', - 'eval', - 'export', - 'extends', - 'false', - 'finally', - 'for', - 'function', - 'if', - 'implements', - 'import', - 'in', - 'instanceof', - 'interface', - 'let', - 'new', - 'null', - 'package', - 'private', - 'protected', - 'public', - 'return', - 'static', - 'super', - 'switch', - 'this', - 'throw', - 'true', - 'try', - 'typeof', - 'undefined', - 'var', - 'void', - 'while', - 'with', - 'yield', -]) - -const LOCK_FIELDS = [ - 'lockVersion', - 'workflowId', - 'workspaceId', - 'catalogHash', - 'baseFingerprint', - 'blocks', - 'variables', -] -const BLOCK_FIELDS = [ - 'id', - 'type', - 'name', - 'binding', - 'order', - 'parent', - 'contentHash', - 'branches', - 'items', - 'layout', - 'codeFile', -] +const LOCK_FIELDS = ['lockVersion', 'blocks', 'variables'] +const BLOCK_FIELDS = ['id', 'parent', 'branches', 'items', 'binding', 'order', 'layout', 'codeFile'] const LAYOUT_FIELDS = ['x', 'y', 'w', 'h', 'height', 'horizontalHandles'] +const ITEM_FIELDS = ['name', 'id'] type JsonObject = Record @@ -200,8 +144,15 @@ function isFiniteNumber(value: unknown): value is number { return typeof value === 'number' && Number.isFinite(value) } -function isSourceFingerprint(value: unknown): value is SourceFingerprint { - return typeof value === 'string' && FINGERPRINT.test(value) +function isExtensionKey(key: string): key is LockExtensionKey { + return key.startsWith('x-') +} + +function isJson(value: unknown): value is Json { + if (value === null || typeof value === 'string' || typeof value === 'boolean') return true + if (typeof value === 'number') return Number.isFinite(value) + if (Array.isArray(value)) return value.every(isJson) + return isObject(value) && Object.values(value).every(isJson) } /** RFC 6901: `~` → `~0`, `/` → `~1`. */ @@ -209,14 +160,6 @@ function pointer(segments: readonly string[]): string { return segments.map((s) => `/${s.replace(/~/g, '~0').replace(/\//g, '~1')}`).join('') } -/** Whether `key` is the key `name` normalizes to, or its `~n` legacy-collision form. */ -function keyMatchesName(key: string, name: string): boolean { - const normalized = normalizeWorkflowBlockName(name) - if (key === normalized) return true - const collision = COLLISION_SUFFIX.exec(key) - return collision !== null && collision[1] === normalized -} - function isSafeRelativePath(path: string): boolean { if (!path || path.includes('\\') || path.startsWith('/') || DRIVE_PATH.test(path)) return false return path.split('/').every((segment) => segment !== '' && segment !== '.' && segment !== '..') @@ -229,19 +172,27 @@ class LockReader { this.diagnostics.push({ code, severity: 'error', message, path: pointer(segments) }) } - rejectUnknownFields(value: JsonObject, known: readonly string[], at: readonly string[]): void { - for (const field of Object.keys(value)) { - if (!known.includes(field)) { + /** + * Reports fields outside `known` unless they are `x-` extensions, and returns the extensions + * (JSON values only) so the parsed lock preserves them. + */ + extensions( + value: JsonObject, + known: readonly string[], + at: readonly string[] + ): Record { + const extensions: Record = {} + for (const [field, raw] of Object.entries(value)) { + if (known.includes(field)) continue + if (!isExtensionKey(field)) { this.report('E_LOCK_UNKNOWN_FIELD', [...at, field], `Unknown lock field "${field}".`) + } else if (isJson(raw)) { + extensions[field] = raw + } else { + this.report('E_LOCK_SHAPE', [...at, field], 'An extension field must hold JSON.') } } - } - - string(value: JsonObject, field: string, at: readonly string[]): string { - const raw = value[field] - if (isNonEmptyString(raw)) return raw - this.report('E_LOCK_SHAPE', [...at, field], `"${field}" must be a non-empty string.`) - return '' + return extensions } /** A string → non-empty-string record whose values are unique within it. */ @@ -267,13 +218,48 @@ class LockReader { return Object.fromEntries(entries) } + itemList(raw: unknown, at: readonly string[]): LockItem[] { + if (!Array.isArray(raw)) { + this.report('E_LOCK_SHAPE', at, 'Expected an array of { name, id } items.') + return [] + } + const seen = new Set() + const items: LockItem[] = [] + raw.forEach((entry: unknown, index) => { + const itemAt = [...at, String(index)] + if (!isObject(entry)) { + this.report('E_LOCK_SHAPE', itemAt, 'An item must be an object.') + return + } + for (const field of Object.keys(entry)) { + if (!ITEM_FIELDS.includes(field)) { + this.report('E_LOCK_UNKNOWN_FIELD', [...itemAt, field], `Unknown item field "${field}".`) + } + } + if (typeof entry.name !== 'string') { + this.report('E_LOCK_SHAPE', [...itemAt, 'name'], '"name" must be a string.') + return + } + if (!isNonEmptyString(entry.id)) { + this.report('E_LOCK_SHAPE', [...itemAt, 'id'], '"id" must be a non-empty string.') + return + } + if (seen.has(entry.id)) { + this.report('E_LOCK_DUPLICATE_ID', [...itemAt, 'id'], `Id "${entry.id}" is used twice.`) + return + } + seen.add(entry.id) + items.push({ name: entry.name, id: entry.id }) + }) + return items + } + layout(raw: unknown, at: readonly string[]): LockLayout | undefined { if (!isObject(raw)) { this.report('E_LOCK_SHAPE', at, '"layout" must be an object.') return undefined } - this.rejectUnknownFields(raw, LAYOUT_FIELDS, at) - const layout: LockLayout = { x: 0, y: 0 } + const layout: LockLayout = { ...this.extensions(raw, LAYOUT_FIELDS, at), x: 0, y: 0 } for (const field of ['x', 'y'] as const) { if (isFiniteNumber(raw[field])) layout[field] = raw[field] else this.report('E_LOCK_SHAPE', [...at, field], `"${field}" must be a finite number.`) @@ -300,24 +286,31 @@ class LockReader { this.report('E_LOCK_SHAPE', at, 'A lock block must be an object.') return undefined } - this.rejectUnknownFields(raw, BLOCK_FIELDS, at) - const keyIsNormalized = key.length > 0 && normalizeWorkflowBlockName(key) === key - if (!keyIsNormalized) { + const extensions = this.extensions(raw, BLOCK_FIELDS, at) + if (!key || normalizeWorkflowBlockName(key) !== key) { this.report('E_LOCK_KEY', at, `Block key "${key}" is not in normalized form.`) } - const id = this.string(raw, 'id', at) - const type = this.string(raw, 'type', at) - const name = this.string(raw, 'name', at) - if (keyIsNormalized && name && !keyMatchesName(key, name)) { - this.report('E_LOCK_KEY', [...at, 'name'], `Name "${name}" does not normalize to "${key}".`) + let id = '' + if (isNonEmptyString(raw.id)) id = raw.id + else this.report('E_LOCK_SHAPE', [...at, 'id'], '"id" must be a non-empty string.') + + let parent: BlockKey | null = null + if (raw.parent === null || isNonEmptyString(raw.parent)) { + parent = raw.parent + } else { + this.report('E_LOCK_SHAPE', [...at, 'parent'], '"parent" must be a block key or null.') } let binding = '' if (typeof raw.binding !== 'string' || !IDENTIFIER.test(raw.binding)) { this.report('E_LOCK_BINDING', [...at, 'binding'], '"binding" must be a JS identifier.') - } else if (RESERVED_IDENTIFIERS.has(raw.binding)) { - this.report('E_LOCK_BINDING', [...at, 'binding'], `"${raw.binding}" is a reserved word.`) + } else if (SDK_RESERVED_IDENTIFIERS.has(raw.binding)) { + this.report( + 'E_LOCK_BINDING', + [...at, 'binding'], + `"${raw.binding}" is a reserved word or an SDK export.` + ) } else { binding = raw.binding } @@ -329,21 +322,7 @@ class LockReader { this.report('E_LOCK_SHAPE', [...at, 'order'], '"order" must be a non-negative integer.') } - let parent: BlockKey | null = null - if (raw.parent === null || isNonEmptyString(raw.parent)) { - parent = raw.parent - } else { - this.report('E_LOCK_SHAPE', [...at, 'parent'], '"parent" must be a block key or null.') - } - - let contentHash = '' - if (typeof raw.contentHash === 'string' && HEX_SHA256.test(raw.contentHash)) { - contentHash = raw.contentHash - } else { - this.report('E_LOCK_SHAPE', [...at, 'contentHash'], 'Expected a lowercase hex SHA-256.') - } - - const block: WorkflowLockBlock = { id, type, name, binding, order, parent, contentHash } + const block: WorkflowLockBlock = { ...extensions, id, parent, binding, order } if (raw.branches !== undefined) { const branches = this.idRecord(raw.branches, [...at, 'branches']) @@ -362,9 +341,9 @@ class LockReader { if (raw.items !== undefined) { if (isObject(raw.items)) { block.items = Object.fromEntries( - Object.entries(raw.items).map(([subBlockId, entries]) => [ + Object.entries(raw.items).map(([subBlockId, list]) => [ subBlockId, - this.idRecord(entries, [...at, 'items', subBlockId]), + this.itemList(list, [...at, 'items', subBlockId]), ]) ) } else { @@ -460,7 +439,8 @@ class LockReader { /** * Validates a lock, given as parsed JSON or as JSON text. Every problem is reported at once, each * with an RFC 6901 `path`; a lock with any problem is rejected whole. Unknown fields are errors, - * so a typo never silently drops identity. A version other than 1 stops validation there. + * so a typo never silently drops identity, except `x-` extension fields, which are preserved. A + * version other than 1 stops validation there. */ export function parseWorkflowLock(input: unknown): ParseWorkflowLockResult { const reader = new LockReader() @@ -482,17 +462,7 @@ export function parseWorkflowLock(input: unknown): ParseWorkflowLockResult { return { diagnostics: reader.diagnostics } } - reader.rejectUnknownFields(json, LOCK_FIELDS, []) - const workflowId = reader.string(json, 'workflowId', []) - const workspaceId = reader.string(json, 'workspaceId', []) - const catalogHash = reader.string(json, 'catalogHash', []) - let baseFingerprint: SourceFingerprint = 'sf1:' - if (isSourceFingerprint(json.baseFingerprint)) { - baseFingerprint = json.baseFingerprint - } else { - reader.report('E_LOCK_SHAPE', ['baseFingerprint'], 'Expected "sf1:" + a lowercase hex SHA-256.') - } - + const extensions = reader.extensions(json, LOCK_FIELDS, []) const blockEntries: Array<[BlockKey, WorkflowLockBlock]> = [] if (isObject(json.blocks)) { for (const [key, raw] of Object.entries(json.blocks)) { @@ -507,15 +477,5 @@ export function parseWorkflowLock(input: unknown): ParseWorkflowLockResult { const variables = reader.variables(json.variables) if (reader.diagnostics.length > 0) return { diagnostics: reader.diagnostics } - return { - lock: { - lockVersion: 1, - workflowId, - workspaceId, - catalogHash, - baseFingerprint, - blocks, - variables, - }, - } + return { lock: { ...extensions, lockVersion: 1, blocks, variables } } } diff --git a/packages/workflow-code/src/model.ts b/packages/workflow-code/src/model.ts index cdea1993d37..30926794a50 100644 --- a/packages/workflow-code/src/model.ts +++ b/packages/workflow-code/src/model.ts @@ -8,6 +8,7 @@ * `annotations` never take part in equality, hashing or the source fingerprint. */ +import type { PortableResourceKind } from '@sim/workflow-types/resources' import type { BlockRetryConfig, Variable } from '@sim/workflow-types/workflow' /** @@ -42,21 +43,14 @@ export type Json = null | boolean | number | string | Json[] | { [key: string]: export type ParamMode = 'basic' | 'advanced' /** - * Kinds of workspace resource a value can point at by internal id. Each is printed call-form - * (`table('leads')`, `binding('support-slack')`, `kb('docs')`, ...; build-spec decision 7, - * s2 D6) and resolved to an id by the server's `ResourceKeyResolver`. + * Kinds of workspace resource a value can point at by internal id: the shared portable vocabulary + * (`WORKFLOW_RESOURCE_KINDS` in `@sim/workflow-types/resources`, also used by workflow imports and + * fork sync) minus `env-var`. Environment variables are `{{NAME}}` text tokens printed as + * `env.NAME`, never nodes. Each kind is printed call-form (`table('leads')`, + * `binding('support-slack')`, `kb('docs')`, ...; build-spec decision 7, s2 D6) and resolved by the + * server's `ResourceKeyResolver`. */ -export type ResourceKind = - | 'credential' - | 'table' - | 'knowledgeBase' - | 'workflow' - | 'skill' - | 'customTool' - | 'mcpServer' - | 'sandbox' - | 'file' - | 'folder' +export type ResourceKind = Exclude /** A workflow variable referenced by internal id (variables-input `variableId`). */ export interface VarNode { @@ -64,7 +58,14 @@ export interface VarNode { key: VarKey } -/** A workspace resource lifted from its internal id to its stable key. */ +/** + * A workspace resource lifted from its internal id to its stable key. Where an id sits inside a + * larger stored shape, only the id is replaced and the shape is kept: + * - scalar or array encoding: the string, or each array element, becomes a node; + * - `files` encoding (file-upload objects carrying `key`): each object stays an object and its + * `key` field becomes `{ $sim: 'resource', kind: 'file', key }`; + * - `csv` encoding (several ids in one comma-joined string): see {@link CsvNode}. + */ export interface ResourceNode { $sim: 'resource' kind: ResourceKind @@ -72,16 +73,26 @@ export interface ResourceNode { } /** - * An internal id the resolver could not map to a key (deleted resource, foreign workspace). Kept - * verbatim so materialize writes the same bytes back; canonicalize emits - * `W_CANON_UNRESOLVED_ID`. + * An internal id the resolver could not map to a key (deleted resource, foreign workspace, or a + * kind this version does not know). Kept verbatim so materialize writes the same bytes back; + * canonicalize emits `W_CANON_UNRESOLVED_ID`. `kind` is any resolver kind or `var`. */ export interface UnresolvedNode { $sim: 'unresolved' - kind: ResourceKind | 'var' + kind: string id: string } +/** + * A stored string holding several ids joined by commas (the reference manifest's `csv` encoding, + * lib/workflows/references/manifest.ts:96 and import-plan.ts:73). Materialize joins the items with + * `,`; prev's raw string (including any spaces after commas) is kept when the items are equal. + */ +export interface CsvNode { + $sim: 'csv' + items: Array +} + /** * Escape for a stored object that itself carries a `$sim` key, so the encoding stays a bijection: * canonicalize wraps such an object as `{ $sim: 'literal', value }` and materialize unwraps it. @@ -92,7 +103,7 @@ export interface LiteralNode { } /** Internal-id sites inside values, lifted to keys (s1 §2, sites per remap-internal-ids.ts:111-127). */ -export type SimNode = VarNode | ResourceNode | UnresolvedNode | LiteralNode +export type SimNode = VarNode | ResourceNode | UnresolvedNode | CsvNode | LiteralNode /** * A param value. Strings are stored text, verbatim: references stay as ``, @@ -102,21 +113,20 @@ export type SimNode = VarNode | ResourceNode | UnresolvedNode | LiteralNode export type Value = Json | SimNode | Value[] | { [key: string]: Value } /** - * How a param's value is stored. `json-string` means the subBlock holds JSON text that - * canonicalize decoded (structured types only: tools, tableRows, inputFormat, tag filters; - * s1 quirk 9); materialize re-encodes it, and keeps prev's raw text when the decoded form is - * unchanged, so whitespace and key order survive (s1 D1). - */ -export type ParamStorage = 'native' | 'json-string' - -/** - * One stored subBlock value. A subBlock whose stored value is `null` is absent from - * `CanonicalBlock.params` (s3 §2 requirement d); `''` is kept and never coerced to `null` - * (s1 quirk 25, serializer/index.ts:620-634). + * One stored subBlock value, decoded. The CWM is encoding-free: whether the subBlock held native + * JSON or JSON text (structured types: tools, tableRows, inputFormat, tag filters; s1 quirk 9) is + * not recorded, so `canonicalEquals`, hashes, diffs and the fingerprint never see it. Materialize + * picks the encoding: prev's raw encoding when the subBlock exists in prev, else the catalog + * `CatalogSubBlock.storage`; and it keeps prev's raw bytes when the decoded value is unchanged + * (s1 D1). + * + * A subBlock whose stored value is `null` is absent from `CanonicalBlock.params` + * (s3 §2 requirement d); `''` is kept and never coerced to `null` (s1 quirk 25, + * serializer/index.ts:620-634). */ export type CanonicalParam = - | { kind: 'value'; value: Value; storage: ParamStorage } - | { kind: 'tools'; tools: CanonicalTool[]; storage: ParamStorage } + | { kind: 'value'; value: Value } + | { kind: 'tools'; tools: CanonicalTool[] } /** One entry of a `tool-input` list (s1 §2, canonicalize step 5). */ export interface CanonicalTool { @@ -149,7 +159,10 @@ export interface CanonicalBranches { /** * `null` when the subBlock was never persisted: the canvas writes it only on first edit * (condition-input.tsx:384-392) and edges may point at the implicit `${id}-if` handle - * (s1 quirk 7). Materialize keeps `null`. + * (s1 quirk 7). Materialize keeps `null`. The source form of `null` is an empty branch object + * (`condition('Name', {})`, router `routes: {}`); the implicit default keys (`if` and `else` + * for a condition, `route0` for a router) stay addressable as ports. A non-empty object is + * always a persisted list, so `[]` is never produced. */ rows: CanonicalBranchRow[] | null } @@ -168,23 +181,30 @@ export interface CanonicalBranchRow { extra?: Record } +/** + * Loop config as the `loops` map stores it (`Loop`, workflow.ts:732-742). Optional fields are + * absent exactly when storage omits them; canonicalize never fills defaults, so materialize can + * write prev's config back verbatim when canonical-equal. + */ export interface LoopSpec { kind: 'loop' loopType: 'for' | 'forEach' | 'while' | 'doWhile' /** Raw stored count, `0` kept with `W_CANON_SUBFLOW_REPAIRED` (s1 quirk 19, load.ts:186-245). */ iterations: number - forEachItems: Json - whileCondition: string - doWhileCondition: string + forEachItems?: Json + whileCondition?: string + doWhileCondition?: string } +/** Parallel config as the `parallels` map stores it (`Parallel`, workflow.ts:744-753). */ export interface ParallelSpec { kind: 'parallel' - parallelType: 'count' | 'collection' - count: number - distribution: Json + /** Absent in storage means the loader's fallback applies, which differs by path (s1 quirk 19). */ + parallelType?: 'count' | 'collection' + count?: number + distribution?: Json /** Raw stored value; the runtime clamps to 1–20 (subflow-helpers.ts:8-14). */ - batchSize: number + batchSize?: number } export interface CanonicalBlock { @@ -285,19 +305,30 @@ export interface CanonicalWorkflowMeta { } /** - * Where a comment attaches in a printed file (s3 §2 `AnchorKey`, build-spec decision 10): + * Where a comment attaches in a printed file (s3 §2, build-spec decision 10): * - `header`: above the imports; `wiring`: above the first wiring statement; `footer`: file end. - * - `block:`: the block's `const` declaration. - * - `param::`: one param property inside the block call. - * - `edges::`: the wiring statement for that (source, port). + * - `block`: the block's `const` declaration. + * - `param`: one param property in the block call. `param` is the printed param name: the + * `canonicalParamId` for a basic/advanced pair, else the subBlock id. + * - `inactive`: one entry under the block's `inactive: {...}` meta (a subBlock id). + * - `edges`: the wiring statement for that (source, port). + * - `var`: one variable declaration in the `workflow(...)` header. + */ +export type Anchor = + | { kind: 'header' } + | { kind: 'wiring' } + | { kind: 'footer' } + | { kind: 'block'; block: BlockKey } + | { kind: 'param'; block: BlockKey; param: SubBlockId | CanonicalParamId } + | { kind: 'inactive'; block: BlockKey; param: SubBlockId } + | { kind: 'edges'; block: BlockKey; port: PortKey } + | { kind: 'var'; variable: VarKey } + +/** + * An {@link Anchor} serialized for use as a map key (`encodeAnchor` / `decodeAnchor` in + * `anchors.ts`). Branded so a raw string cannot stand in for one. */ -export type AnchorKey = - | 'header' - | 'wiring' - | 'footer' - | `block:${BlockKey}` - | `param:${BlockKey}:${SubBlockId}` - | `edges:${BlockKey}:${PortKey}` +export type AnchorKey = string & { readonly __anchorKey: true } export interface CodeComment { /** Comment text without the `//` or `/* *\/` delimiters, verbatim. */ diff --git a/packages/workflow-code/src/sdk.ts b/packages/workflow-code/src/sdk.ts new file mode 100644 index 00000000000..cd5447de686 --- /dev/null +++ b/packages/workflow-code/src/sdk.ts @@ -0,0 +1,116 @@ +/** + * Names the `@sim/workflow-sdk` authoring surface fixes, shared by the printer (which must never + * emit a block binding that shadows one), the compiler (which resolves them) and the lock + * validator. 2E's `core.d.ts` must export exactly {@link SDK_CORE_EXPORTS}. + */ + +/** + * The generic builder, `block(type, name, params, meta?)`. The printer uses it for any stored type + * with no generated builder (legacy, unknown, or `custom_block_*` without a method), and the + * compiler accepts it for every catalog type, so every type always prints and compiles. + */ +export const GENERIC_BUILDER = 'block' + +/** Every value the SDK's core module exports (s2 §2 core types, build-spec decision 7). */ +export const SDK_CORE_EXPORTS = [ + GENERIC_BUILDER, + 'binding', + 'condition', + 'customTool', + 'edge', + 'env', + 'file', + 'fn', + 'folder', + 'human', + 'js', + 'json', + 'kb', + 'legacy', + 'loop', + 'mcp', + 'md', + 'note', + 'parallel', + 'picked', + 'py', + 'raw', + 'ref', + 'response', + 'router', + 'runWorkflow', + 'sandbox', + 'setVariables', + 'sh', + 'skill', + 't', + 'table', + 'todo', + 'trigger', + 'upload', + 'vars', + 'workflow', +] as const + +/** Reserved words and strict-mode restrictions: none can name a `const`. */ +const JS_RESERVED_WORDS = [ + 'arguments', + 'await', + 'break', + 'case', + 'catch', + 'class', + 'const', + 'continue', + 'debugger', + 'default', + 'delete', + 'do', + 'else', + 'enum', + 'eval', + 'export', + 'extends', + 'false', + 'finally', + 'for', + 'function', + 'if', + 'implements', + 'import', + 'in', + 'instanceof', + 'interface', + 'let', + 'new', + 'null', + 'package', + 'private', + 'protected', + 'public', + 'return', + 'static', + 'super', + 'switch', + 'this', + 'throw', + 'true', + 'try', + 'typeof', + 'undefined', + 'var', + 'void', + 'while', + 'with', + 'yield', +] as const + +/** + * Identifiers a block binding may never take: JS reserved words plus every SDK core export. + * Catalog builder namespaces (`slack`, `agent`, ...) are catalog-dependent, so the printer avoids + * those itself with a numeric suffix. + */ +export const SDK_RESERVED_IDENTIFIERS: ReadonlySet = new Set([ + ...JS_RESERVED_WORDS, + ...SDK_CORE_EXPORTS, +]) diff --git a/packages/workflow-types/package.json b/packages/workflow-types/package.json index 9d3b048c134..85020a11ebd 100644 --- a/packages/workflow-types/package.json +++ b/packages/workflow-types/package.json @@ -14,6 +14,10 @@ "types": "./src/blocks.ts", "default": "./src/blocks.ts" }, + "./resources": { + "types": "./src/resources.ts", + "default": "./src/resources.ts" + }, "./workflow": { "types": "./src/workflow.ts", "default": "./src/workflow.ts" diff --git a/packages/workflow-types/src/resources.ts b/packages/workflow-types/src/resources.ts new file mode 100644 index 00000000000..3d00b3c46a0 --- /dev/null +++ b/packages/workflow-types/src/resources.ts @@ -0,0 +1,23 @@ +/** + * Workspace resources a workflow can reference by internal id: the one vocabulary shared by + * workflow imports, fork synchronization and workflow source (`@sim/workflow-code`). + */ +export const WORKFLOW_RESOURCE_KINDS = [ + 'credential', + 'env-var', + 'knowledge-base', + 'knowledge-document', + 'table', + 'file', + 'file-folder', + 'mcp-server', + 'custom-tool', + 'custom-block', + 'skill', + 'sandbox', +] as const + +export type WorkflowResourceKind = (typeof WORKFLOW_RESOURCE_KINDS)[number] + +/** A resource kind that can cross workspaces: every workspace resource, plus another workflow. */ +export type PortableResourceKind = WorkflowResourceKind | 'workflow' diff --git a/scripts/check-monorepo-boundaries.test.ts b/scripts/check-monorepo-boundaries.test.ts index 0d486fcfc69..dc3293a55e9 100644 --- a/scripts/check-monorepo-boundaries.test.ts +++ b/scripts/check-monorepo-boundaries.test.ts @@ -95,6 +95,18 @@ describe('package boundary command', () => { ["const run = new Function('return 1')", source, false], ["const run = Function('return 1')", source, false], ["const F = globalThis['Function']", source, false], + ["const run = (() => {}).constructor('return 1')", source, false], + ["const F = ({})['constructor']['constructor']", source, false], + ['const g = globalThis', source, false], + ["const run = globalThis[['ev', 'al'].join('')]", source, false], + ['const g = Reflect.get(globalThis, name)', source, false], + ["const value = Reflect.apply(fn, undefined, ['1'])", source, false], + ['const load = require', source, false], + ['const here = import.meta.url', source, false], + ['const w = window', source, false], + ['class Parser { constructor() {} }', source, true], + ['const record = { constructor: 1 }', source, true], + ['type Host = typeof globalThis', source, true], ["import vm from 'vm'", 'packages/workflow-code/src/nested/deep.ts', false], ["import { parse } from '@babel/parser'", source, true], ["import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow'", source, true], diff --git a/scripts/check-monorepo-boundaries.ts b/scripts/check-monorepo-boundaries.ts index ec7ff73587b..db786744f52 100644 --- a/scripts/check-monorepo-boundaries.ts +++ b/scripts/check-monorepo-boundaries.ts @@ -22,8 +22,10 @@ * 3. `@sim/workflow-code` (every non-test file under `packages/workflow-code/src`) compiles * untrusted workflow source on the server, in the browser and in the CLI, so it must stay pure * and must never execute code: no Node built-in (`vm`, `child_process`, `fs`, any `node:*`, - * even type-only), no dynamic `import()` or `require`, and no `eval` or `Function` reached as - * a value (`new Function`, `globalThis.eval`, `globalThis['Function']`). Fix by keeping I/O in + * even type-only), no dynamic `import()`, `import.meta` or `require`, no `.constructor` read + * (a function's constructor is `Function`), and no value reference to `eval`, `Function`, + * `Reflect` or the global object under any name (`globalThis`, `window`, `self`, `global`), + * which also bans computed lookups such as `globalThis[name]`. Fix by keeping I/O in * the caller (the compiler takes file text as input) and interpreting the AST instead of * evaluating it. * @@ -182,11 +184,27 @@ async function scanImports( } const PURE_PACKAGE_SRC = path.join(PACKAGES_DIR, 'workflow-code', 'src') -const CODE_EXECUTING_GLOBALS = new Set(['eval', 'Function']) +/** + * Names that reach code execution or the host global object, which leads back to both: `eval`, + * `Function`, the global object under each of its names, `Reflect` (`Reflect.get(globalThis, k)`) + * and `require`. + */ +const HOST_GLOBALS = new Set([ + 'eval', + 'Function', + 'globalThis', + 'window', + 'self', + 'global', + 'Reflect', + 'require', +]) +/** Member names banned however they are reached: `x.constructor` is `Function` for any function. */ +const HOST_MEMBERS = new Set([...HOST_GLOBALS, 'constructor']) -/** Whether `node` names `eval`/`Function` as a value rather than as a key or a type. */ -function isCodeExecutingReference(node: ts.Identifier): boolean { - if (!CODE_EXECUTING_GLOBALS.has(node.text)) return false +/** Whether `node` names a host global as a value rather than as a key or a type. */ +function isHostGlobalReference(node: ts.Identifier): boolean { + if (!HOST_GLOBALS.has(node.text)) return false const parent = node.parent if ( (ts.isPropertyAssignment(parent) || @@ -228,20 +246,22 @@ async function scanPurePackageFile(file: string): Promise { } } function visit(node: ts.Node): void { - if (ts.isCallExpression(node)) { - if (node.expression.kind === ts.SyntaxKind.ImportKeyword) { - report(node, '@sim/workflow-code uses dynamic import()') - } else if (ts.isIdentifier(node.expression) && node.expression.text === 'require') { - report(node, '@sim/workflow-code uses require()') - } + if (ts.isCallExpression(node) && node.expression.kind === ts.SyntaxKind.ImportKeyword) { + report(node, '@sim/workflow-code uses dynamic import()') } - if (ts.isIdentifier(node) && isCodeExecutingReference(node)) { + if (ts.isMetaProperty(node) && node.keywordToken === ts.SyntaxKind.ImportKeyword) { + report(node, '@sim/workflow-code uses import.meta') + } + if (ts.isIdentifier(node) && isHostGlobalReference(node)) { report(node, `@sim/workflow-code references ${node.text}`) } + if (ts.isPropertyAccessExpression(node) && node.name.text === 'constructor') { + report(node, '@sim/workflow-code reads .constructor') + } if ( ts.isElementAccessExpression(node) && ts.isStringLiteralLike(node.argumentExpression) && - CODE_EXECUTING_GLOBALS.has(node.argumentExpression.text) + HOST_MEMBERS.has(node.argumentExpression.text) ) { report(node, `@sim/workflow-code references ${node.argumentExpression.text}`) } From 85ac5ba6e07a66eacee360c775f5877147aaa454 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 18:53:17 -0800 Subject: [PATCH 004/428] feat(workflow-code): add round-trip proof oracles, report collector and fast-check arbitraries --- bun.lock | 1 + packages/workflow-code/package.json | 5 + .../src/proof/arbitraries.test.ts | 97 +++++ .../workflow-code/src/proof/arbitraries.ts | 366 ++++++++++++++++++ packages/workflow-code/src/proof/diff.ts | 127 ++++++ packages/workflow-code/src/proof/index.ts | 41 ++ .../workflow-code/src/proof/oracles.test.ts | 228 +++++++++++ packages/workflow-code/src/proof/oracles.ts | 284 ++++++++++++++ packages/workflow-code/src/proof/random.ts | 48 +++ packages/workflow-code/src/proof/report.ts | 123 ++++++ 10 files changed, 1320 insertions(+) create mode 100644 packages/workflow-code/src/proof/arbitraries.test.ts create mode 100644 packages/workflow-code/src/proof/arbitraries.ts create mode 100644 packages/workflow-code/src/proof/diff.ts create mode 100644 packages/workflow-code/src/proof/index.ts create mode 100644 packages/workflow-code/src/proof/oracles.test.ts create mode 100644 packages/workflow-code/src/proof/oracles.ts create mode 100644 packages/workflow-code/src/proof/random.ts create mode 100644 packages/workflow-code/src/proof/report.ts diff --git a/bun.lock b/bun.lock index f01b284baeb..8e3b6bfc5c1 100644 --- a/bun.lock +++ b/bun.lock @@ -854,6 +854,7 @@ "devDependencies": { "@sim/tsconfig": "workspace:*", "@xyflow/react": "12.12.1", + "fast-check": "3.23.2", "typescript": "^7.0.2", "vitest": "^5.1.0", }, diff --git a/packages/workflow-code/package.json b/packages/workflow-code/package.json index 04d867080d0..158b91f6ffc 100644 --- a/packages/workflow-code/package.json +++ b/packages/workflow-code/package.json @@ -13,6 +13,10 @@ ".": { "types": "./src/index.ts", "default": "./src/index.ts" + }, + "./proof": { + "types": "./src/proof/index.ts", + "default": "./src/proof/index.ts" } }, "scripts": { @@ -33,6 +37,7 @@ "devDependencies": { "@sim/tsconfig": "workspace:*", "@xyflow/react": "12.12.1", + "fast-check": "3.23.2", "typescript": "^7.0.2", "vitest": "^5.1.0" } diff --git a/packages/workflow-code/src/proof/arbitraries.test.ts b/packages/workflow-code/src/proof/arbitraries.test.ts new file mode 100644 index 00000000000..8f08bdb3c9f --- /dev/null +++ b/packages/workflow-code/src/proof/arbitraries.test.ts @@ -0,0 +1,97 @@ +import { + normalizeWorkflowBlockName, + RESERVED_WORKFLOW_BLOCK_NAMES, + type WorkflowState, + wouldCreateCycle, +} from '@sim/workflow-types/workflow' +import fc from 'fast-check' +import { describe, expect, it } from 'vitest' +import { collidingNamesArbitrary, jsCodeBodyArbitrary, workflowStateArbitrary } from './arbitraries' + +/** Every structural invariant a stored graph holds; returns the first violation or null. */ +function structuralViolation(state: WorkflowState): string | null { + const keys = new Set() + for (const block of Object.values(state.blocks)) { + const key = normalizeWorkflowBlockName(block.name) + if (!key) return `empty key for ${block.name}` + if ((RESERVED_WORKFLOW_BLOCK_NAMES as readonly string[]).includes(key)) return `reserved ${key}` + if (keys.has(key)) return `duplicate key ${key}` + keys.add(key) + const parentId = block.data?.parentId + if (parentId) { + const parent = state.blocks[parentId] + if (!parent || (parent.type !== 'loop' && parent.type !== 'parallel')) { + return `bad parent for ${block.name}` + } + const container = state.loops[parentId] ?? state.parallels[parentId] + if (!container?.nodes.includes(block.id)) return `${block.name} missing from container nodes` + } + } + const accepted: Array<{ source: string; target: string }> = [] + for (const edge of state.edges) { + const source = state.blocks[edge.source] + const target = state.blocks[edge.target] + if (!source || !target) return `dangling edge ${edge.id}` + const startEdge = edge.sourceHandle?.endsWith('-start-source') === true + if (startEdge) { + if (target.data?.parentId !== source.id) return `start edge leaves its container ${edge.id}` + } else if ((source.data?.parentId ?? null) !== (target.data?.parentId ?? null)) { + return `cross-scope edge ${edge.id}` + } + if (target.type === 'start_trigger') return `edge into the trigger ${edge.id}` + if (wouldCreateCycle(accepted, edge.source, edge.target)) return `cycle at ${edge.id}` + accepted.push({ source: edge.source, target: edge.target }) + } + return null +} + +describe('workflowStateArbitrary', () => { + it('only generates structurally valid graphs', () => { + fc.assert( + fc.property(workflowStateArbitrary({ maxBlocks: 10, maxDepth: 3 }), (state) => { + expect(structuralViolation(state)).toBeNull() + }), + { numRuns: 300, seed: 20261115 } + ) + }) + + it('reaches nested containers', () => { + const samples = fc.sample(workflowStateArbitrary({ maxBlocks: 10, maxDepth: 3 }), { + numRuns: 300, + seed: 7, + }) + const nested = samples.some((state) => + Object.values(state.blocks).some((block) => { + const parent = block.data?.parentId ? state.blocks[block.data.parentId] : undefined + return ( + (block.type === 'loop' || block.type === 'parallel') && Boolean(parent?.data?.parentId) + ) + }) + ) + expect(nested).toBe(true) + }) +}) + +describe('collidingNamesArbitrary', () => { + it('yields distinct names with one normalized key', () => { + fc.assert( + fc.property(collidingNamesArbitrary(), ([a, b]) => { + expect(a).not.toBe(b) + expect(normalizeWorkflowBlockName(a)).toBe(normalizeWorkflowBlockName(b)) + }), + { numRuns: 200, seed: 1 } + ) + }) +}) + +describe('jsCodeBodyArbitrary', () => { + it('puts references in code, quote, template and comment positions', () => { + const bodies = fc.sample(jsCodeBodyArbitrary(['agent1']), { numRuns: 400, seed: 3 }).join('\n') + expect(bodies).toMatch(/= ]*> <3/) + }) +}) diff --git a/packages/workflow-code/src/proof/arbitraries.ts b/packages/workflow-code/src/proof/arbitraries.ts new file mode 100644 index 00000000000..4ab7a8922a5 --- /dev/null +++ b/packages/workflow-code/src/proof/arbitraries.ts @@ -0,0 +1,366 @@ +/** + * fast-check arbitraries for round-trip fuzzing (s3 §5 corpus 4): random DAGs with nested + * subflows, adversarial block names and strings, and JS code bodies with references in every quote + * context. Every generated state is structurally valid (unique normalized names, edges only within + * one scope and only forward, containers listed in `loops`/`parallels`), so a failing property + * points at the engine and not at the generator. + */ + +import { + type BlockState, + type Loop, + normalizeWorkflowBlockName, + type Parallel, + RESERVED_WORKFLOW_BLOCK_NAMES, + type WorkflowState, +} from '@sim/workflow-types/workflow' +import fc from 'fast-check' + +/** + * Fragments that break naive escaping: a `<` that is not a reference, a reference-looking span, + * nested env braces, CRLF, the JS line separators U+2028/U+2029, lone surrogates, backticks, + * template openers and quotes. + */ +export const ADVERSARIAL_STRING_FRAGMENTS = [ + '<3 ', + '{{ {{X}} }}', + '{{API_KEY}}', + '', + "''", + '\r\n', + '\n', + '
', + '
', + '\uD800', + '\uDC00', + '`', + '${', + '\u0024{x}', + '\\', + '"', + "'", + '*/', + '', + '', + '', +] as const + +const isUsableName = (name: string): boolean => { + const key = normalizeWorkflowBlockName(name) + return key.length > 0 && !(RESERVED_WORKFLOW_BLOCK_NAMES as readonly string[]).includes(key) +} + +/** Text mixing adversarial fragments with arbitrary unicode (including astral characters). */ +export function adversarialStringArbitrary(): fc.Arbitrary { + return fc + .array( + fc.oneof( + { weight: 3, arbitrary: fc.constantFrom(...ADVERSARIAL_STRING_FRAGMENTS) }, + { weight: 1, arbitrary: fc.string({ unit: 'binary', maxLength: 8 }) }, + { weight: 1, arbitrary: fc.string({ maxLength: 8 }) } + ), + { maxLength: 8 } + ) + .map((parts) => parts.join('')) +} + +/** + * Display names with dots, runs of spaces, mixed case and non-ASCII letters, always with a usable + * normalized key. Two draws can still collide after normalization; use + * {@link uniqueBlockNamesArbitrary} when they must not. + */ +export function blockNameArbitrary(): fc.Arbitrary { + return fc + .tuple( + fc.constantFrom( + 'Agent', + 'agent', + 'AGENT', + 'My Block', + 'my.block', + 'Trigger.dev', + 'Ünïcode', + 'x', + 'Loop Body' + ), + fc.constantFrom('', ' ', '.', ' ', '\t'), + fc.nat(30) + ) + .map(([word, separator, n]) => `${word}${separator}${n}`) + .filter(isUsableName) +} + +/** `count` names whose normalized keys are distinct. */ +export function uniqueBlockNamesArbitrary(count: number): fc.Arbitrary { + return fc.uniqueArray(blockNameArbitrary(), { + minLength: count, + maxLength: count, + selector: normalizeWorkflowBlockName, + }) +} + +/** + * A pair of distinct display names with the same normalized key (`Agent 1` / `agent1`, + * `my.block` / `MyBlock`): the legacy collision canonicalize projects as `key~2`. + */ +export function collidingNamesArbitrary(): fc.Arbitrary<[string, string]> { + return blockNameArbitrary() + .chain((name) => + fc + .constantFrom( + name.toUpperCase(), + name.toLowerCase(), + name.replace(/\s+/g, ''), + name.replace(/\./g, ''), + ` ${name} `, + name.replace(/(\w)/, '$1.') + ) + .map((other): [string, string] => [name, other]) + ) + .filter(([a, b]) => a !== b && normalizeWorkflowBlockName(a) === normalizeWorkflowBlockName(b)) +} + +const REF_PATHS = ['input', 'result', 'data.items', 'response.body', 'rows[0]'] as const + +/** + * A JS function body whose references sit in every quote context: bare code, single and double + * quotes, template text, template interpolation, line and block comments, and a `<` comparison + * next to a reference. `refs` are normalized block names (`agent1`); each draws a path. + */ +export function jsCodeBodyArbitrary(refs: readonly string[]): fc.Arbitrary { + const names = refs.length > 0 ? refs : ['start'] + const reference = fc + .tuple(fc.constantFrom(...names), fc.constantFrom(...REF_PATHS)) + .map(([name, path]) => `<${name}.${path}>`) + + const statement = fc.tuple(fc.nat(9), reference, fc.nat(99)).map(([shape, ref, n]) => { + switch (shape) { + case 0: + return `const v${n} = ${ref}` + case 1: + return `const s${n} = '${ref} {{API_KEY}}'` + case 2: + return `const d${n} = "${ref}"` + case 3: + return `const t${n} = \`${ref} \${v${n}}\`` + case 4: + return `const u${n} = \`\${${ref}}\`` + case 5: + return `// ${ref} {{API_KEY}}` + case 6: + return `/* ${ref} */` + case 7: + return `if (${ref} <3) { return {{API_KEY}} }` + case 8: + return `const k${n} = {{API_KEY}}` + default: + return `return ${ref}` + } + }) + + return fc + .tuple(fc.array(statement, { minLength: 1, maxLength: 6 }), fc.constantFrom('\n', '\r\n')) + .map(([lines, eol]) => lines.join(eol)) +} + +type PlannedKind = 'function' | 'note' | 'loop' | 'parallel' + +interface WorkflowPlan { + names: string[] + ids: string[] + kinds: PlannedKind[] + parentPicks: number[] + variants: number[] + edgePicks: Array<[number, number, 'source' | 'error']> + codes: string[] + texts: string[] +} + +export interface WorkflowArbitraryOptions { + /** Blocks including the start trigger. Default 8. */ + maxBlocks?: number + /** Deepest container nesting. Default 2. */ + maxDepth?: number +} + +const LOOP_TYPES = ['for', 'forEach', 'while', 'doWhile'] as const +const PARALLEL_TYPES = ['count', 'collection'] as const + +/** + * A random workflow: a `start_trigger` at the root, then function, note, loop and parallel blocks, + * containers nested up to `maxDepth`, forward `source`/`error` edges within a scope, and a + * `*-start-source` edge from every non-empty container into its first child. + */ +export function workflowStateArbitrary( + options: WorkflowArbitraryOptions = {} +): fc.Arbitrary { + const maxBlocks = Math.max(2, options.maxBlocks ?? 8) + const maxDepth = options.maxDepth ?? 2 + + return fc + .integer({ min: 2, max: maxBlocks }) + .chain((count) => + uniqueBlockNamesArbitrary(count).chain((names) => { + const refs = names.map(normalizeWorkflowBlockName) + return fc.record({ + names: fc.constant(names), + ids: fc.uniqueArray(fc.uuid(), { minLength: count, maxLength: count }), + kinds: fc.array( + fc.constantFrom('function', 'function', 'note', 'loop', 'parallel'), + { + minLength: count, + maxLength: count, + } + ), + parentPicks: fc.array(fc.nat(), { minLength: count, maxLength: count }), + variants: fc.array(fc.nat(), { minLength: count, maxLength: count }), + edgePicks: fc.array( + fc.tuple(fc.nat(), fc.nat(), fc.constantFrom<'source' | 'error'>('source', 'error')), + { + maxLength: count * 2, + } + ), + codes: fc.array(jsCodeBodyArbitrary(refs), { minLength: count, maxLength: count }), + texts: fc.array(adversarialStringArbitrary(), { minLength: count, maxLength: count }), + }) + }) + ) + .map((plan) => buildPlannedState(plan, maxDepth)) +} + +function buildPlannedState(plan: WorkflowPlan, maxDepth: number): WorkflowState { + const count = plan.ids.length + const blocks: Record = {} + const loops: Record = {} + const parallels: Record = {} + const parentIndex: Array = [] + const depth: number[] = [] + const kinds: Array = [] + + for (let i = 0; i < count; i++) { + const id = plan.ids[i] ?? `block-${i}` + const name = plan.names[i] ?? `Block ${i}` + const variant = plan.variants[i] ?? 0 + const kind: PlannedKind | 'start' = i === 0 ? 'start' : (plan.kinds[i] ?? 'function') + kinds.push(kind) + + const containerCandidates: Array = [null] + for (let j = 1; j < i; j++) { + if ((kinds[j] === 'loop' || kinds[j] === 'parallel') && (depth[j] ?? 0) < maxDepth) { + containerCandidates.push(j) + } + } + const parent = + i === 0 + ? null + : (containerCandidates[(plan.parentPicks[i] ?? 0) % containerCandidates.length] ?? null) + parentIndex.push(parent) + depth.push(parent === null ? 0 : (depth[parent] ?? 0) + 1) + const parentId = parent === null ? undefined : plan.ids[parent] + + const base: BlockState = { + id, + type: kind === 'start' ? 'start_trigger' : kind, + name, + position: { x: i * 240, y: (depth[i] ?? 0) * 160 }, + subBlocks: {}, + outputs: {}, + enabled: true, + ...(parentId ? { data: { parentId, extent: 'parent' as const } } : {}), + } + + if (kind === 'function') { + base.subBlocks = { + code: { id: 'code', type: 'code', value: plan.codes[i] ?? '' }, + language: { id: 'language', type: 'dropdown', value: 'javascript' }, + } + } else if (kind === 'note') { + base.subBlocks = { + content: { id: 'content', type: 'long-input', value: plan.texts[i] ?? '' }, + } + } else if (kind === 'loop') { + const loopType = LOOP_TYPES[variant % LOOP_TYPES.length] ?? 'for' + base.data = { + ...base.data, + loopType, + count: (variant % 5) + 1, + collection: loopType === 'forEach' ? '' : '', + whileCondition: loopType === 'while' ? ' <3' : '', + doWhileCondition: loopType === 'doWhile' ? ' <3' : '', + } + loops[id] = { + id, + nodes: [], + iterations: (variant % 5) + 1, + loopType, + forEachItems: loopType === 'forEach' ? '' : '', + whileCondition: loopType === 'while' ? ' <3' : '', + doWhileCondition: loopType === 'doWhile' ? ' <3' : '', + enabled: true, + } + } else if (kind === 'parallel') { + const parallelType = PARALLEL_TYPES[variant % PARALLEL_TYPES.length] ?? 'count' + base.data = { + ...base.data, + parallelType, + count: (variant % 4) + 1, + collection: parallelType === 'collection' ? '' : '', + } + parallels[id] = { + id, + nodes: [], + count: (variant % 4) + 1, + distribution: parallelType === 'collection' ? '' : '', + parallelType, + enabled: true, + } + } + + blocks[id] = base + } + + const edges: WorkflowState['edges'] = [] + const seen = new Set() + const addEdge = (source: string, sourceHandle: string, target: string) => { + const key = `${source}\u0000${sourceHandle}\u0000${target}` + if (seen.has(key)) return + seen.add(key) + edges.push({ + id: `${source}-${sourceHandle}-${target}`, + source, + target, + sourceHandle, + targetHandle: 'target', + }) + } + + for (let i = 1; i < count; i++) { + const parent = parentIndex[i] + if (parent === null || parent === undefined) continue + const parentId = plan.ids[parent] + const childId = plan.ids[i] + if (!parentId || !childId) continue + const container = parallels[parentId] ?? loops[parentId] + container?.nodes.push(childId) + if (container && container.nodes.length === 1 && kinds[i] !== 'note') { + addEdge(parentId, `${kinds[parent]}-start-source`, childId) + } + } + + for (const [a, b, handle] of plan.edgePicks) { + const from = a % count + const to = b % count + if (from >= to || to === 0) continue + if (parentIndex[from] !== parentIndex[to]) continue + if (kinds[from] === 'note' || kinds[to] === 'note') continue + if (handle === 'error' && kinds[from] !== 'function') continue + const source = plan.ids[from] + const target = plan.ids[to] + const sourceKind = kinds[from] + const sourceHandle = + sourceKind === 'loop' || sourceKind === 'parallel' ? `${sourceKind}-end-source` : handle + if (source && target) addEdge(source, sourceHandle, target) + } + + return { blocks, edges, loops, parallels, variables: {} } +} diff --git a/packages/workflow-code/src/proof/diff.ts b/packages/workflow-code/src/proof/diff.ts new file mode 100644 index 00000000000..a73e8e4b1c7 --- /dev/null +++ b/packages/workflow-code/src/proof/diff.ts @@ -0,0 +1,127 @@ +import { isRecordLike } from '@sim/utils/object' + +/** + * Exact structural differences between two JSON-like values, reported as RFC 6901 paths so a + * corpus report names the field that drifted instead of dumping two whole workflows. + */ + +/** One place two values disagree. Previews are truncated JSON, for reports only. */ +export interface Difference { + /** RFC 6901 pointer into the expected value; `''` is the root. */ + path: string + kind: 'missing' | 'unexpected' | 'type' | 'value' | 'length' | 'text' + expected?: string + actual?: string +} + +const PREVIEW_LIMIT = 160 + +function escapePointerSegment(segment: string): string { + return segment.replace(/~/g, '~0').replace(/\//g, '~1') +} + +function preview(value: unknown): string { + let text: string + if (value === undefined) text = 'undefined' + else if (typeof value === 'string') text = JSON.stringify(value) + else if (typeof value === 'number' && !Number.isFinite(value)) text = String(value) + else { + try { + text = JSON.stringify(value) ?? String(value) + } catch { + text = String(value) + } + } + return text.length > PREVIEW_LIMIT ? `${text.slice(0, PREVIEW_LIMIT)}…` : text +} + +function kindOf(value: unknown): string { + if (value === null) return 'null' + if (Array.isArray(value)) return 'array' + return typeof value +} + +/** + * Every difference between `expected` and `actual`, up to `limit`. Exact: primitives compare with + * `Object.is`, arrays compare in order, and an own key holding `undefined` differs from an absent + * key. Object key order is ignored (Postgres `jsonb` does not keep it). + */ +export function findDifferences(expected: unknown, actual: unknown, limit = 20): Difference[] { + const out: Difference[] = [] + + const walk = (a: unknown, b: unknown, path: string): void => { + if (out.length >= limit) return + if (Object.is(a, b)) return + + const kindA = kindOf(a) + const kindB = kindOf(b) + if (kindA !== kindB) { + out.push({ path, kind: 'type', expected: preview(a), actual: preview(b) }) + return + } + + if (Array.isArray(a) && Array.isArray(b)) { + if (a.length !== b.length) { + out.push({ path, kind: 'length', expected: String(a.length), actual: String(b.length) }) + } + const shared = Math.min(a.length, b.length) + for (let i = 0; i < shared; i++) walk(a[i], b[i], `${path}/${i}`) + return + } + + if (isRecordLike(a) && isRecordLike(b)) { + for (const key of Object.keys(a)) { + const childPath = `${path}/${escapePointerSegment(key)}` + if (!Object.hasOwn(b, key)) { + if (out.length < limit) + out.push({ path: childPath, kind: 'missing', expected: preview(a[key]) }) + continue + } + walk(a[key], b[key], childPath) + } + for (const key of Object.keys(b)) { + if (out.length >= limit) return + if (!Object.hasOwn(a, key)) { + out.push({ + path: `${path}/${escapePointerSegment(key)}`, + kind: 'unexpected', + actual: preview(b[key]), + }) + } + } + return + } + + out.push({ path, kind: 'value', expected: preview(a), actual: preview(b) }) + } + + walk(expected, actual, '') + return out +} + +/** + * The first line where two texts differ, or `null` when they are identical. Used for printer + * idempotence (P3), where the whole file is one string. + */ +export function firstTextDifference(expected: string, actual: string): Difference | null { + if (expected === actual) return null + const expectedLines = expected.split('\n') + const actualLines = actual.split('\n') + const count = Math.max(expectedLines.length, actualLines.length) + for (let i = 0; i < count; i++) { + if (expectedLines[i] !== actualLines[i]) { + return { + path: `line:${i + 1}`, + kind: 'text', + expected: preview(expectedLines[i]), + actual: preview(actualLines[i]), + } + } + } + return { + path: 'eof', + kind: 'text', + expected: preview(expected.length), + actual: preview(actual.length), + } +} diff --git a/packages/workflow-code/src/proof/index.ts b/packages/workflow-code/src/proof/index.ts new file mode 100644 index 00000000000..4328d509adc --- /dev/null +++ b/packages/workflow-code/src/proof/index.ts @@ -0,0 +1,41 @@ +/** + * Round-trip proof tooling, served from `@sim/workflow-code/proof` rather than the main entry so + * runtime consumers (the Code tab, the CLI) never load fast-check. Pure, like the rest of the + * package: the app supplies registry-derived corpora, the serializer and the report file write. + */ + +export { + ADVERSARIAL_STRING_FRAGMENTS, + adversarialStringArbitrary, + blockNameArbitrary, + collidingNamesArbitrary, + jsCodeBodyArbitrary, + uniqueBlockNamesArbitrary, + type WorkflowArbitraryOptions, + workflowStateArbitrary, +} from './arbitraries' +export { type Difference, findDifferences, firstTextDifference } from './diff' +export { + alignWorkflowIds, + assertNoopIdentity, + decodeStructured, + type ExecutionParityInput, + executionParity, + idempotence, + type OracleName, + type OracleResult, + type SerializedWorkflowLike, + withoutAnnotations, +} from './oracles' +export { createSeededRandom, type SeededRandom } from './random' +export { + type BlockTypeParity, + createProofReport, + PROOF_PROPERTIES, + type ProofOutcome, + type ProofProperty, + type ProofReport, + type ProofReportCollector, + type ProofStatus, + reportPathVariable, +} from './report' diff --git a/packages/workflow-code/src/proof/oracles.test.ts b/packages/workflow-code/src/proof/oracles.test.ts new file mode 100644 index 00000000000..4e9ee870c80 --- /dev/null +++ b/packages/workflow-code/src/proof/oracles.test.ts @@ -0,0 +1,228 @@ +import type { WorkflowState } from '@sim/workflow-types/workflow' +import { describe, expect, it } from 'vitest' +import { findDifferences } from './diff' +import { + assertNoopIdentity, + executionParity, + idempotence, + type SerializedWorkflowLike, +} from './oracles' + +function conditionWorkflow( + ids: { + start: string + cond: string + target: string + rowIf: string + rowElse: string + edge: string + }, + conditions: unknown +): WorkflowState { + return { + blocks: { + [ids.start]: { + id: ids.start, + type: 'start_trigger', + name: 'Start', + position: { x: 0, y: 0 }, + subBlocks: {}, + outputs: {}, + enabled: true, + }, + [ids.cond]: { + id: ids.cond, + type: 'condition', + name: 'Route It', + position: { x: 1, y: 0 }, + subBlocks: { + conditions: { + id: 'conditions', + type: 'condition-input', + value: conditions as WorkflowState['blocks'][string]['subBlocks'][string]['value'], + }, + }, + outputs: {}, + enabled: true, + }, + [ids.target]: { + id: ids.target, + type: 'function', + name: 'After', + position: { x: 2, y: 0 }, + subBlocks: { code: { id: 'code', type: 'code', value: 'return ' } }, + outputs: {}, + enabled: true, + data: { parentId: undefined }, + }, + }, + edges: [ + { id: `${ids.edge}-a`, source: ids.start, target: ids.cond, sourceHandle: 'source' }, + { + id: `${ids.edge}-b`, + source: ids.cond, + target: ids.target, + sourceHandle: `condition-${ids.rowIf}`, + }, + ], + loops: {}, + parallels: {}, + } +} + +const originalIds = { + start: 'aaaaaaaa-0000-4000-8000-000000000001', + cond: 'aaaaaaaa-0000-4000-8000-000000000002', + target: 'aaaaaaaa-0000-4000-8000-000000000003', + rowIf: 'aaaaaaaa-0000-4000-8000-0000000000a1', + rowElse: 'aaaaaaaa-0000-4000-8000-0000000000a2', + edge: 'aaaaaaaa-0000-4000-8000-0000000000e0', +} +const freshIds = { + start: 'bbbbbbbb-0000-4000-8000-000000000001', + cond: 'bbbbbbbb-0000-4000-8000-000000000002', + target: 'bbbbbbbb-0000-4000-8000-000000000003', + rowIf: 'bbbbbbbb-0000-4000-8000-0000000000a1', + rowElse: 'bbbbbbbb-0000-4000-8000-0000000000a2', + edge: 'bbbbbbbb-0000-4000-8000-0000000000e0', +} + +const rows = (ids: typeof originalIds, expression: string) => [ + { id: ids.rowIf, title: 'if', value: expression }, + { id: ids.rowElse, title: 'else', value: '' }, +] + +/** A serializer stand-in that exposes exactly what the real one forwards: ids, params, handles. */ +function serialize(state: WorkflowState): SerializedWorkflowLike { + return { + blocks: Object.values(state.blocks).map((block) => ({ + id: block.id, + enabled: block.enabled, + config: { + tool: block.type, + params: Object.fromEntries( + Object.entries(block.subBlocks).map(([id, subBlock]) => [id, subBlock.value]) + ), + }, + })), + connections: state.edges.map((edge) => ({ + source: edge.source, + target: edge.target, + sourceHandle: edge.sourceHandle, + targetHandle: edge.targetHandle, + })), + } +} + +const unchanged = () => false + +describe('findDifferences', () => { + it('treats an own key holding undefined as different from an absent key', () => { + expect(findDifferences({ a: 1 }, { a: 1, b: undefined })).toEqual([ + { path: '/b', kind: 'unexpected', actual: 'undefined' }, + ]) + }) + + it('ignores object key order but not array order', () => { + expect(findDifferences({ a: 1, b: 2 }, { b: 2, a: 1 })).toEqual([]) + expect(findDifferences([1, 2], [2, 1]).map((d) => d.path)).toEqual(['/0', '/1']) + }) + + it('escapes pointer segments', () => { + expect(findDifferences({ 'a/b~c': 1 }, { 'a/b~c': 2 })[0]?.path).toBe('/a~1b~0c') + }) +}) + +describe('assertNoopIdentity (O1)', () => { + it('fails a materialize that re-encodes a JSON-string value as an array', () => { + const original = conditionWorkflow(originalIds, JSON.stringify(rows(originalIds, 'x > 1'))) + const reencoded = conditionWorkflow(originalIds, rows(originalIds, 'x > 1')) + const result = assertNoopIdentity({ original, materialized: reencoded }) + expect(result.ok).toBe(false) + expect(result.ok ? [] : result.differences.map((d) => d.path)).toEqual([ + `/blocks/${originalIds.cond}/subBlocks/conditions/value`, + ]) + }) +}) + +describe('executionParity (O2)', () => { + it('passes a lockless round trip with fresh block, row and edge ids and a new encoding', () => { + const original = conditionWorkflow(originalIds, JSON.stringify(rows(originalIds, 'x > 1'))) + const candidate = conditionWorkflow(freshIds, rows(freshIds, 'x > 1')) + expect( + executionParity({ original, candidate, serialize, hasWorkflowChanged: unchanged }) + ).toEqual({ + ok: true, + oracle: 'O2', + }) + }) + + it('fails when a branch expression changed', () => { + const original = conditionWorkflow(originalIds, JSON.stringify(rows(originalIds, 'x > 1'))) + const candidate = conditionWorkflow(freshIds, rows(freshIds, 'x > 2')) + const result = executionParity({ + original, + candidate, + serialize, + hasWorkflowChanged: unchanged, + }) + expect(result.ok).toBe(false) + }) + + it('fails when an edge moved to another branch', () => { + const original = conditionWorkflow(originalIds, JSON.stringify(rows(originalIds, 'x > 1'))) + const candidate = conditionWorkflow(freshIds, rows(freshIds, 'x > 1')) + const moved = { + ...candidate, + edges: candidate.edges.map((edge) => + edge.sourceHandle === `condition-${freshIds.rowIf}` + ? { ...edge, sourceHandle: `condition-${freshIds.rowElse}` } + : edge + ), + } + const result = executionParity({ + original, + candidate: moved, + serialize, + hasWorkflowChanged: unchanged, + }) + expect(result.ok ? [] : result.differences.map((d) => d.path)).toEqual(['/connections/1']) + }) + + it('fails when change detection reports a change', () => { + const original = conditionWorkflow(originalIds, JSON.stringify(rows(originalIds, 'x > 1'))) + const result = executionParity({ + original, + candidate: original, + serialize, + hasWorkflowChanged: () => true, + }) + expect(result.ok ? [] : result.differences.map((d) => d.path)).toEqual(['/hasWorkflowChanged']) + }) +}) + +describe('idempotence (O3, P3)', () => { + it('reports the first differing line of a printed file', () => { + const result = idempotence({ + oracle: 'P3', + value: 'a\nb\nc', + step: (text) => text.replace('b', 'B'), + }) + expect(result).toEqual({ + ok: false, + oracle: 'P3', + differences: [{ path: 'line:2', kind: 'text', expected: '"b"', actual: '"B"' }], + }) + }) + + it('defers to the supplied equality for structured values', () => { + const value = { blocks: {}, annotations: { comments: { header: [] } } } + const result = idempotence({ + oracle: 'O3', + value, + step: () => ({ blocks: {}, annotations: { comments: {} } }), + equals: (a, b) => JSON.stringify(a.blocks) === JSON.stringify(b.blocks), + }) + expect(result.ok).toBe(true) + }) +}) diff --git a/packages/workflow-code/src/proof/oracles.ts b/packages/workflow-code/src/proof/oracles.ts new file mode 100644 index 00000000000..a9f776f0de4 --- /dev/null +++ b/packages/workflow-code/src/proof/oracles.ts @@ -0,0 +1,284 @@ +/** + * The round-trip oracles (s1 §6, s3 §5), as pure functions over values the caller produces. Each + * returns its verdict instead of throwing, so a corpus run reports every failing case rather than + * stopping at the first. Server-side collaborators (the serializer, change detection) are + * injected, which keeps this package free of the app. + * + * Per the Wave 1 audit the CWM carries no encodings, so no oracle compares one: O1 compares raw + * stored states, O2 compares what execution sees, and O3 compares CWMs through the caller's + * equality. + */ + +import { isRecordLike, omit } from '@sim/utils/object' +import { compareStrings, escapeRegExp } from '@sim/utils/string' +import { normalizeWorkflowBlockName, type WorkflowState } from '@sim/workflow-types/workflow' +import type { CanonicalWorkflow } from '../model' +import { type Difference, findDifferences, firstTextDifference } from './diff' + +export type OracleName = 'O1' | 'O2' | 'O3' | 'P3' + +export type OracleResult = + | { ok: true; oracle: OracleName } + | { ok: false; oracle: OracleName; differences: Difference[] } + +function verdict(oracle: OracleName, differences: Difference[]): OracleResult { + return differences.length === 0 ? { ok: true, oracle } : { ok: false, oracle, differences } +} + +/** + * O1, no-op identity: `materialize(canonicalize(x), lock, { prev: x })` deep-equals `x` exactly. + * This is also the "no spurious write" guarantee, so nothing is normalized away first. + */ +export function assertNoopIdentity(input: { + original: WorkflowState + materialized: WorkflowState +}): OracleResult { + return verdict('O1', findDifferences(input.original, input.materialized)) +} + +/** + * Fixed-point check shared by O3 (`canonicalize(materialize(c))` equals `c`) and P3 + * (`print(compile(print(x))) === print(x)`): `step(value)` must equal `value`. Strings compare + * byte for byte and report the first differing line. Other values compare with `equals` when + * given (for CWMs, `canonicalEquals`), else exactly. + */ +export function idempotence(input: { + oracle: 'O3' | 'P3' + value: T + step: (value: T) => T + equals?: (expected: T, actual: T) => boolean +}): OracleResult { + const { oracle, value, step, equals } = input + const stepped = step(value) + + if (typeof value === 'string' && typeof stepped === 'string') { + const difference = firstTextDifference(value, stepped) + return verdict(oracle, difference ? [difference] : []) + } + + if (equals) { + if (equals(value, stepped)) return { ok: true, oracle } + const differences = findDifferences(value, stepped) + return verdict( + oracle, + differences.length > 0 ? differences : [{ path: '', kind: 'value', expected: 'equal' }] + ) + } + + return verdict(oracle, findDifferences(value, stepped)) +} + +/** + * A CWM without its non-semantic `annotations`, for comparing CWMs exactly when no + * `canonicalEquals` is available. Annotations never take part in equality (DESIGN.md decision 3). + */ +export function withoutAnnotations( + workflow: CanonicalWorkflow +): Omit { + return omit(workflow, ['annotations']) +} + +/** The structural slice of `SerializedWorkflow` (apps/sim/serializer/types.ts) parity reads. */ +export interface SerializedWorkflowLike { + blocks: Array<{ + id: string + enabled?: boolean + config: { tool?: string; params: Record } + canonicalModes?: Record + retry?: unknown + }> + connections: Array<{ + source: string + target: string + sourceHandle?: string | null + targetHandle?: string | null + }> + loops?: Record + parallels?: Record +} + +export interface ExecutionParityInput { + original: WorkflowState + /** Materialized lockless (no prev, no lock): ids are fresh and aligned here by key. */ + candidate: WorkflowState + serialize: (state: WorkflowState) => SerializedWorkflowLike + hasWorkflowChanged: (current: WorkflowState, deployed: WorkflowState) => boolean +} + +/** + * O2, execution parity: after aligning the candidate's ids to the original's by block key, the + * serialized blocks carry the same tool, enabled flag, canonical modes, retry and params (with + * JSON-string values decoded, so encoding and whitespace do not count), the same connections and + * subflows, and `hasWorkflowChanged` reports no change. + */ +export function executionParity(input: ExecutionParityInput): OracleResult { + const aligned = alignWorkflowIds(input.original, input.candidate) + const expected = executionView(input.serialize(input.original)) + const actual = executionView(input.serialize(aligned)) + const differences = findDifferences(expected, actual) + if (input.hasWorkflowChanged(aligned, input.original)) { + differences.push({ + path: '/hasWorkflowChanged', + kind: 'value', + expected: 'false', + actual: 'true', + }) + } + return verdict('O2', differences) +} + +function executionView(serialized: SerializedWorkflowLike) { + const blocks: Record = {} + for (const block of serialized.blocks) { + blocks[block.id] = { + tool: block.config.tool ?? null, + enabled: block.enabled ?? true, + canonicalModes: block.canonicalModes ?? {}, + retry: block.retry ?? null, + params: decodeStructured(block.config.params), + } + } + const connections = serialized.connections + .map((c) => + [c.source, c.sourceHandle ?? 'source', c.target, c.targetHandle ?? 'target'].join('\u0000') + ) + .sort(compareStrings) + return { + blocks, + connections, + loops: sortSubflowNodes(serialized.loops ?? {}), + parallels: sortSubflowNodes(serialized.parallels ?? {}), + } +} + +function sortSubflowNodes(subflows: Record): Record { + const out: Record = {} + for (const [id, config] of Object.entries(subflows)) { + if (isRecordLike(config) && Array.isArray(config.nodes)) { + out[id] = { ...config, nodes: config.nodes.map(String).sort(compareStrings) } + } else { + out[id] = config + } + } + return out +} + +/** Decodes JSON-text strings (objects and arrays only) recursively; everything else as is. */ +export function decodeStructured(value: unknown): unknown { + if (typeof value === 'string') { + const trimmed = value.trim() + if (trimmed.startsWith('{') || trimmed.startsWith('[')) { + try { + return decodeStructured(JSON.parse(trimmed)) + } catch { + return value + } + } + return value + } + if (Array.isArray(value)) return value.map(decodeStructured) + if (isRecordLike(value)) { + const out: Record = {} + for (const [key, child] of Object.entries(value)) out[key] = decodeStructured(child) + return out + } + return value +} + +const BRANCH_SUBBLOCK_IDS = ['conditions', 'routes'] as const + +function branchRowIds(block: WorkflowState['blocks'][string] | undefined): string[] { + if (!block) return [] + for (const subBlockId of BRANCH_SUBBLOCK_IDS) { + const raw = block.subBlocks?.[subBlockId]?.value + const rows = typeof raw === 'string' ? decodeStructured(raw) : raw + if (Array.isArray(rows)) { + return rows.flatMap((row) => + isRecordLike(row) && typeof row.id === 'string' ? [row.id] : [] + ) + } + } + return [] +} + +function pairByKey( + reference: Record, + candidate: Record, + keyOf: (item: T) => string +): Map { + const byKey = new Map() + for (const [id, item] of Object.entries(reference)) { + const key = keyOf(item) + byKey.set(key, [...(byKey.get(key) ?? []), id]) + } + const map = new Map() + for (const [id, item] of Object.entries(candidate)) { + const queue = byKey.get(keyOf(item)) + const target = queue?.shift() + if (target !== undefined && target !== id) map.set(id, target) + } + return map +} + +/** + * Rewrites `candidate`'s ids to `reference`'s: blocks and variables pair by normalized name, + * condition/router rows by position within paired blocks, and edges by their + * `(source, sourceHandle, target, targetHandle)` tuple after the block rewrite. Every occurrence of + * a mapped id (object keys and inside strings, such as `condition-` handles) is replaced. + * Unpaired ids stay as they are, so a real difference still shows up downstream. + */ +export function alignWorkflowIds( + reference: WorkflowState, + candidate: WorkflowState +): WorkflowState { + const map = pairByKey(reference.blocks, candidate.blocks, (block) => + normalizeWorkflowBlockName(block.name) + ) + + for (const [candidateId, referenceId] of [...map.entries()]) { + const fromRows = branchRowIds(candidate.blocks[candidateId]) + const toRows = branchRowIds(reference.blocks[referenceId]) + fromRows.forEach((rowId, index) => { + const target = toRows[index] + if (target !== undefined && target !== rowId) map.set(rowId, target) + }) + } + + for (const [from, to] of pairByKey(reference.variables ?? {}, candidate.variables ?? {}, (v) => + normalizeWorkflowBlockName(v.name) + )) { + map.set(from, to) + } + + const rewritten = replaceIds(candidate, map) as WorkflowState + + const edgeKey = (edge: WorkflowState['edges'][number]) => + [edge.source, edge.sourceHandle ?? '', edge.target, edge.targetHandle ?? ''].join('\u0000') + const referenceEdgeIds = new Map(reference.edges.map((edge) => [edgeKey(edge), edge.id])) + return { + ...rewritten, + edges: rewritten.edges.map((edge) => { + const id = referenceEdgeIds.get(edgeKey(edge)) + return id === undefined ? edge : { ...edge, id } + }), + } +} + +function replaceIds(value: unknown, map: Map): unknown { + if (map.size === 0) return value + const ids = [...map.keys()].sort((a, b) => b.length - a.length) + const pattern = new RegExp(ids.map(escapeRegExp).join('|'), 'g') + const swap = (text: string) => text.replace(pattern, (match) => map.get(match) ?? match) + + const walk = (node: unknown): unknown => { + if (typeof node === 'string') return swap(node) + if (Array.isArray(node)) return node.map(walk) + if (isRecordLike(node)) { + const out: Record = {} + for (const [key, child] of Object.entries(node)) out[swap(key)] = walk(child) + return out + } + return node + } + return walk(value) +} diff --git a/packages/workflow-code/src/proof/random.ts b/packages/workflow-code/src/proof/random.ts new file mode 100644 index 00000000000..01e601d670c --- /dev/null +++ b/packages/workflow-code/src/proof/random.ts @@ -0,0 +1,48 @@ +/** + * A small seeded PRNG (mulberry32) for corpus generation. A corpus built from the same seed and + * the same registry is identical byte for byte, so a failing case id names the same workflow on + * every machine. Not for anything security-sensitive. + */ +export interface SeededRandom { + /** A float in [0, 1). */ + next(): number + /** An integer in [min, max], both inclusive. */ + int(min: number, max: number): number + bool(): boolean + /** One element of a non-empty array. */ + pick(items: readonly [T, ...T[]] | readonly T[]): T + /** A version-4-shaped UUID, so generated ids look like the ones the editor mints. */ + uuid(): string +} + +export function createSeededRandom(seed: number): SeededRandom { + let state = seed >>> 0 + + const next = (): number => { + state = (state + 0x6d2b79f5) >>> 0 + let t = state + t = Math.imul(t ^ (t >>> 15), t | 1) + t ^= t + Math.imul(t ^ (t >>> 7), t | 61) + return ((t ^ (t >>> 14)) >>> 0) / 4294967296 + } + + const int = (min: number, max: number): number => min + Math.floor(next() * (max - min + 1)) + + const hex = (length: number): string => { + let out = '' + for (let i = 0; i < length; i++) out += int(0, 15).toString(16) + return out + } + + return { + next, + int, + bool: () => next() < 0.5, + pick(items: readonly T[]): T { + if (items.length === 0) throw new Error('pick() needs a non-empty array') + return items[int(0, items.length - 1)] as T + }, + uuid: () => + `${hex(8)}-${hex(4)}-4${hex(3)}-${(8 + int(0, 3)).toString(16)}${hex(3)}-${hex(12)}`, + } +} diff --git a/packages/workflow-code/src/proof/report.ts b/packages/workflow-code/src/proof/report.ts new file mode 100644 index 00000000000..b359b0d716d --- /dev/null +++ b/packages/workflow-code/src/proof/report.ts @@ -0,0 +1,123 @@ +/** + * Collects round-trip outcomes into the JSON report a corpus run writes to `_REPORT_PATH` + * (the E2E-artifact rule in .claude/rules/sim-testing.md). The headline number is parity per block + * type: the share of cases containing that type that pass each property, which is the plan's 100% + * kill-criterion gate (s3 §5). Pure: the caller owns the clock and the file write. + */ + +import { compareStrings } from '@sim/utils/string' +import type { Difference } from './diff' + +/** The round-trip properties (s3 §5) and oracles (s1 §6) a corpus run checks. */ +export const PROOF_PROPERTIES = ['P1', 'P2', 'P3', 'P4', 'P5', 'O1', 'O2', 'O3'] as const +export type ProofProperty = (typeof PROOF_PROPERTIES)[number] + +export type ProofStatus = 'passed' | 'failed' | 'skipped' | 'errored' + +export interface ProofOutcome { + caseId: string + /** Every block type in the case's workflow; each one's parity counts this outcome. */ + blockTypes: string[] + property: ProofProperty + status: ProofStatus + durationMs?: number + differences?: Difference[] + /** The skip reason, or the thrown error's message. */ + message?: string +} + +interface Tally { + passed: number + failed: number + skipped: number + errored: number +} + +export interface BlockTypeParity extends Tally { + /** `passed / (passed + failed + errored)`; `null` when every outcome was skipped. */ + rate: number | null +} + +export interface ProofReport { + suite: string + status: 'passed' | 'failed' + generatedAt: string + caseCount: number + totals: Record + /** Properties skipped wholesale, with the reason (a missing engine before Wave 3). */ + skippedProperties: Array<{ property: ProofProperty; reason: string }> + /** Block type → property → tally; the per-block-type parity gate. */ + parity: Record>> + /** Failed and errored outcomes, capped at `failureLimit`. */ + failures: ProofOutcome[] + truncatedFailures: number +} + +export interface ProofReportCollector { + record(outcome: ProofOutcome): void + skipProperty(property: ProofProperty, reason: string): void + build(options: { generatedAt: string }): ProofReport +} + +const emptyTally = (): Tally => ({ passed: 0, failed: 0, skipped: 0, errored: 0 }) + +/** The env var a suite's report path comes from: `roundtrip-corpus` → `ROUNDTRIP_CORPUS_REPORT_PATH`. */ +export function reportPathVariable(suite: string): string { + return `${suite.toUpperCase().replace(/[^A-Z0-9]+/g, '_')}_REPORT_PATH` +} + +export function createProofReport( + suite: string, + options: { failureLimit?: number } = {} +): ProofReportCollector { + const failureLimit = options.failureLimit ?? 200 + const outcomes: ProofOutcome[] = [] + const skippedProperties: Array<{ property: ProofProperty; reason: string }> = [] + + return { + record(outcome) { + outcomes.push(outcome) + }, + skipProperty(property, reason) { + skippedProperties.push({ property, reason }) + }, + build({ generatedAt }) { + const totals = Object.fromEntries(PROOF_PROPERTIES.map((p) => [p, emptyTally()])) as Record< + ProofProperty, + Tally + > + const parity: ProofReport['parity'] = {} + const cases = new Set() + const failures: ProofOutcome[] = [] + + for (const outcome of outcomes) { + cases.add(outcome.caseId) + totals[outcome.property][outcome.status] += 1 + if (outcome.status === 'failed' || outcome.status === 'errored') failures.push(outcome) + for (const type of new Set(outcome.blockTypes)) { + const byProperty = (parity[type] ??= {}) + const tally = (byProperty[outcome.property] ??= { ...emptyTally(), rate: null }) + tally[outcome.status] += 1 + const decided = tally.passed + tally.failed + tally.errored + tally.rate = decided === 0 ? null : tally.passed / decided + } + } + + const sortedParity: ProofReport['parity'] = {} + for (const type of Object.keys(parity).sort(compareStrings)) + sortedParity[type] = parity[type] ?? {} + + return { + suite, + status: failures.length === 0 ? 'passed' : 'failed', + generatedAt, + caseCount: cases.size, + totals, + skippedProperties, + parity: sortedParity, + failures: failures.slice(0, failureLimit), + truncatedFailures: Math.max(0, failures.length - failureLimit), + } + }, + } +} From 709fed7a6541796bbaad853980be53cb9dceef4c Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 18:48:32 -0800 Subject: [PATCH 005/428] chore(workflow-code): add fast-check and @babel/types dev dependencies for the compiler --- bun.lock | 2 ++ packages/workflow-code/package.json | 2 ++ 2 files changed, 4 insertions(+) diff --git a/bun.lock b/bun.lock index f01b284baeb..a34fd883793 100644 --- a/bun.lock +++ b/bun.lock @@ -852,8 +852,10 @@ "@sim/workflow-types": "workspace:*", }, "devDependencies": { + "@babel/types": "7.29.8", "@sim/tsconfig": "workspace:*", "@xyflow/react": "12.12.1", + "fast-check": "3.23.2", "typescript": "^7.0.2", "vitest": "^5.1.0", }, diff --git a/packages/workflow-code/package.json b/packages/workflow-code/package.json index 04d867080d0..aabd26da3cd 100644 --- a/packages/workflow-code/package.json +++ b/packages/workflow-code/package.json @@ -31,8 +31,10 @@ "@sim/workflow-types": "workspace:*" }, "devDependencies": { + "@babel/types": "7.29.8", "@sim/tsconfig": "workspace:*", "@xyflow/react": "12.12.1", + "fast-check": "3.23.2", "typescript": "^7.0.2", "vitest": "^5.1.0" } From 8e956d60fb3dd93dc37b41960102a55c09f79bc7 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 18:51:11 -0800 Subject: [PATCH 006/428] feat(workflow-code): code-file bijection for function blocks --- .../workflow-code/src/code-files/bijection.ts | 27 ++ .../src/code-files/code-files.test.ts | 178 +++++++++++++ .../workflow-code/src/code-files/from-file.ts | 238 ++++++++++++++++++ .../workflow-code/src/code-files/index.ts | 8 + .../workflow-code/src/code-files/lexer.ts | 236 +++++++++++++++++ .../workflow-code/src/code-files/ref-path.ts | 97 +++++++ .../workflow-code/src/code-files/to-file.ts | 72 ++++++ 7 files changed, 856 insertions(+) create mode 100644 packages/workflow-code/src/code-files/bijection.ts create mode 100644 packages/workflow-code/src/code-files/code-files.test.ts create mode 100644 packages/workflow-code/src/code-files/from-file.ts create mode 100644 packages/workflow-code/src/code-files/index.ts create mode 100644 packages/workflow-code/src/code-files/lexer.ts create mode 100644 packages/workflow-code/src/code-files/ref-path.ts create mode 100644 packages/workflow-code/src/code-files/to-file.ts diff --git a/packages/workflow-code/src/code-files/bijection.ts b/packages/workflow-code/src/code-files/bijection.ts new file mode 100644 index 00000000000..7951e197c75 --- /dev/null +++ b/packages/workflow-code/src/code-files/bijection.ts @@ -0,0 +1,27 @@ +import { fromCodeFile } from './from-file' +import { type CodeFileLanguage, toCodeFile } from './to-file' + +export type CodeFileBijection = + | { ok: true; file: string } + | { + ok: false + /** `syntax`: the file form does not parse; `lossy`: it parses but reads back differently. */ + reason: 'syntax' | 'lossy' + } + +/** + * The printer's self-check before it writes function code to a file (build-spec decision 9, + * s3 D6): the file form is usable only when reading it back yields the stored code exactly. + * Code that already names `$ref`/`$env` in code position, or a reference followed by a member + * access (`.length`), reads back differently and fails here, so the printer falls back to an + * inline `js` template with `W_CODE_FILE_INLINED`. + */ +export function checkCodeFileBijection( + code: string, + language: CodeFileLanguage +): CodeFileBijection { + const file = toCodeFile(code, language) + const back = fromCodeFile(file, language) + if (!back.ok) return { ok: false, reason: 'syntax' } + return back.code === code ? { ok: true, file } : { ok: false, reason: 'lossy' } +} diff --git a/packages/workflow-code/src/code-files/code-files.test.ts b/packages/workflow-code/src/code-files/code-files.test.ts new file mode 100644 index 00000000000..d5a819166cc --- /dev/null +++ b/packages/workflow-code/src/code-files/code-files.test.ts @@ -0,0 +1,178 @@ +import fc from 'fast-check' +import { describe, expect, it } from 'vitest' +import { checkCodeFileBijection, codeFileLanguage, fromCodeFile, toCodeFile } from './index' + +describe('toCodeFile rewrites only code-position tokens', () => { + it.each([ + ['return ', 'return $ref.start.input'], + ['const k = {{API_KEY}}', 'const k = $env.API_KEY'], + ['f()', 'f($ref.a.items[0].id)'], + ['f()', "f($ref.a.items['0'])"], + ['f()', "f($ref.b['some-field'])"], + ['f()', "f($ref['my-block'].x)"], + ['f()', 'f($ref.loop.currentItem)'], + ['`a ${} c`', '`a ${$ref.a.b} c`'], + ['`a ${f({ k: })} c`', '`a ${f({ k: $ref.a.b })} c`'], + ])('%s', (code, file) => { + expect(toCodeFile(code, 'javascript')).toBe(file) + expect(fromCodeFile(file, 'javascript')).toEqual({ ok: true, code }) + }) + + it.each([ + ["''"], + ['"x {{API_KEY}} y"'], + ['``'], + ['// {{API_KEY}}\nreturn 1'], + ['/* */ return 1'], + ['const r = //'], + ["if (x) /'/.test(y)"], + ])('keeps %s verbatim', (code) => { + expect(toCodeFile(code, 'javascript')).toBe(code) + }) + + it('leaves tokens it cannot map bijectively', () => { + expect(toCodeFile('x = {{ API_KEY }}', 'javascript')).toBe('x = {{ API_KEY }}') + expect(toCodeFile('x = ', 'javascript')).toBe('x = ') + expect(toCodeFile("x = ", 'javascript')).toBe("x = ") + }) + + it('never rewrites python or shell bodies', () => { + const python = 'x = \nprint({{API_KEY}})' + expect(toCodeFile(python, 'python')).toBe(python) + expect(fromCodeFile(python, 'python')).toEqual({ ok: true, code: python }) + const shell = 'echo $API_KEY' + expect(toCodeFile(shell, 'shell')).toBe(shell) + }) +}) + +describe('fromCodeFile', () => { + it('ends a reference at a parenthesis', () => { + expect(fromCodeFile('return ($ref.a.b).length', 'javascript')).toEqual({ + ok: true, + code: 'return ().length', + }) + }) + + it('maps only the env name segment', () => { + expect(fromCodeFile('return $env.KEY.length', 'javascript')).toEqual({ + ok: true, + code: 'return {{KEY}}.length', + }) + }) + + it('accepts top-level return, await and import', () => { + const file = "import x from 'y'\nconst r = await $ref.a.b\nreturn r" + expect(fromCodeFile(file, 'javascript')).toEqual({ + ok: true, + code: "import x from 'y'\nconst r = await \nreturn r", + }) + }) + + it('reports syntax errors with a location', () => { + const result = fromCodeFile('const = 1', 'javascript') + expect(result.ok).toBe(false) + if (result.ok) return + expect(result.errors[0]).toMatchObject({ line: 1 }) + }) + + it('leaves member chains it cannot map', () => { + expect(fromCodeFile('f($ref[k])', 'javascript')).toEqual({ ok: true, code: 'f($ref[k])' }) + expect(fromCodeFile('f($env[k])', 'javascript')).toEqual({ ok: true, code: 'f($env[k])' }) + }) +}) + +describe('checkCodeFileBijection', () => { + it('accepts code whose file form reverses exactly', () => { + expect(checkCodeFileBijection('return + 1', 'javascript')).toEqual({ + ok: true, + file: 'return $ref.a.b + 1', + }) + }) + + it.each([ + ['code that already names $ref', 'return $ref.a + '], + ['a reference followed by a member access', 'return .length'], + ['a reference followed by an index', 'return [0]'], + ['code that is not valid JavaScript', 'return { + expect(checkCodeFileBijection(code, 'javascript').ok).toBe(false) + }) + + it('accepts any python or shell body', () => { + expect(checkCodeFileBijection('print(.x)', 'python')).toEqual({ + ok: true, + file: 'print(.x)', + }) + }) +}) + +describe('codeFileLanguage', () => { + it.each([ + ['fns/a.js', 'javascript'], + ['fns/a.py', 'python'], + ['fns/a.sh', 'shell'], + ['fns/a.ts', null], + ])('%s', (path, language) => { + expect(codeFileLanguage(path)).toBe(language) + }) +}) + +const REF = fc.constantFrom( + '', + '', + '', + '', + '', + '', + '', + '{{API_KEY}}', + '{{B_2}}' +) +const WORD = fc.constantFrom('x', 'y', 'total', 'a b', "it's", '\\n', '<3', '>', '{', '}') + +/** A small JS grammar with a reference in every quote context the resolver distinguishes. */ +const STATEMENT = fc.oneof( + fc.tuple(REF).map(([ref]) => `v = ${ref}`), + fc.tuple(REF, REF).map(([a, b]) => `f(${a}, ${b})`), + fc.tuple(WORD, REF).map(([w, ref]) => `s = '${w.replace(/['\\]/g, '')} ${ref}'`), + fc.tuple(WORD, REF).map(([w, ref]) => `s = "${w.replace(/["\\]/g, '')} ${ref}"`), + fc.tuple(WORD, REF, REF).map(([w, a, b]) => `s = \`${w.replace(/[`\\]/g, '')} ${a} \${${b}}\``), + fc.tuple(REF).map(([ref]) => `// note ${ref}`), + fc.tuple(REF).map(([ref]) => `/* ${ref} */`), + fc.tuple(REF).map(([ref]) => `r = /${ref.replace(/[{}]/g, '')}/`), + fc.tuple(REF).map(([ref]) => `if (ok) /${ref.replace(/[{}]/g, '')}/.test(s)`), + fc.tuple(REF).map(([ref]) => `return (${ref}).length`), + fc.tuple(REF).map(([ref]) => `x = { k: ${ref}, [${ref}]: 1 }`) +) +const PROGRAM = fc.array(STATEMENT, { minLength: 1, maxLength: 8 }).map((lines) => lines.join('\n')) + +describe('code-file bijection over a small JS grammar', () => { + it('reverses every program exactly and rewrites every code-position token', () => { + fc.assert( + fc.property(PROGRAM, (code) => { + const check = checkCodeFileBijection(code, 'javascript') + expect(check.ok).toBe(true) + if (!check.ok) return + expect(fromCodeFile(check.file, 'javascript')).toEqual({ ok: true, code }) + for (const line of check.file.split('\n')) { + if (line.startsWith('v =') || line.startsWith('f(')) { + expect(line).not.toMatch(/[<{]{1,2}[A-Za-z]/) + } + } + }), + { numRuns: 500 } + ) + }) + + it('never throws and never accepts a lossy file for arbitrary text', () => { + fc.assert( + fc.property(fc.string({ maxLength: 80 }), (code) => { + const check = checkCodeFileBijection(code, 'javascript') + if (check.ok) { + expect(fromCodeFile(check.file, 'javascript')).toEqual({ ok: true, code }) + } + }), + { numRuns: 1000 } + ) + }) +}) diff --git a/packages/workflow-code/src/code-files/from-file.ts b/packages/workflow-code/src/code-files/from-file.ts new file mode 100644 index 00000000000..f70d675a675 --- /dev/null +++ b/packages/workflow-code/src/code-files/from-file.ts @@ -0,0 +1,238 @@ +import { type ParserOptions, parse } from '@babel/parser' +import type { Expression, MemberExpression, Node } from '@babel/types' +import { isLikelyWorkflowReferenceSegment } from '@sim/utils/workflow-references' +import { + ENV_VAR_NAME, + formatStoredPath, + isIndexSegment, + isNameSegment, + type RefSegment, +} from './ref-path' +import { type CodeFileLanguage, ENV_ROOT, REF_ROOT } from './to-file' + +export interface CodeFileSyntaxError { + message: string + /** UTF-16 offset into the file text. */ + start: number + /** 1-based. */ + line: number + /** 1-based, UTF-16 units. */ + column: number +} + +export type FromCodeFileResult = + | { ok: true; code: string } + | { ok: false; errors: CodeFileSyntaxError[] } + +/** + * Stored function code runs as a module-or-script body with top-level `return`, `await` and + * `import` (s3 D7), so the parse allows all three. + */ +const FUNCTION_BODY_OPTIONS: ParserOptions = { + sourceType: 'unambiguous', + allowReturnOutsideFunction: true, + allowAwaitOutsideFunction: true, + allowImportExportEverywhere: true, + allowSuperOutsideMethod: true, + allowUndeclaredExports: true, + errorRecovery: true, + ranges: false, +} + +interface Replacement { + start: number + end: number + text: string +} + +interface BabelErrorShape { + message?: unknown + pos?: unknown + loc?: { line?: unknown; column?: unknown } +} + +function toSyntaxError(error: unknown): CodeFileSyntaxError { + const shape: BabelErrorShape = typeof error === 'object' && error !== null ? error : {} + const line = typeof shape.loc?.line === 'number' ? shape.loc.line : 1 + const column = typeof shape.loc?.column === 'number' ? shape.loc.column + 1 : 1 + return { + message: typeof shape.message === 'string' ? shape.message : 'Invalid JavaScript', + start: typeof shape.pos === 'number' ? shape.pos : 0, + line, + column, + } +} + +/** + * Reads a code file back into stored function code: the inverse of `toCodeFile`. JavaScript is + * parsed with Babel and every member chain rooted at `$ref` or `$env` is rewritten to its stored + * token; nothing else in the text changes, so comments, strings and formatting survive. + * + * A `$ref` chain covers every member it can map (`.name`, `['name']`, `[n]`) and stops at the + * first one it cannot (a computed expression, an optional `?.`) or at a parenthesis: + * `($ref.a.b).length` reads `` and keeps `.length` as code. `$env` maps one name only. + * Python and shell files are stored verbatim (see `toCodeFile`). + */ +export function fromCodeFile(text: string, language: CodeFileLanguage): FromCodeFileResult { + if (language !== 'javascript') return { ok: true, code: text } + + let program: Node + try { + const file = parse(text, FUNCTION_BODY_OPTIONS) + if (file.errors && file.errors.length > 0) { + return { ok: false, errors: file.errors.map(toSyntaxError) } + } + program = file.program + } catch (error) { + return { ok: false, errors: [toSyntaxError(error)] } + } + + const replacements = collectReplacements(program) + if (replacements.length === 0) return { ok: true, code: text } + replacements.sort((left, right) => left.start - right.start) + let code = '' + let cursor = 0 + for (const replacement of replacements) { + code += text.slice(cursor, replacement.start) + replacement.text + cursor = replacement.end + } + return { ok: true, code: code + text.slice(cursor) } +} + +function isNode(value: unknown): value is Node { + return ( + typeof value === 'object' && + value !== null && + typeof (value as { type?: unknown }).type === 'string' + ) +} + +function childNodes(node: Node): Node[] { + const children: Node[] = [] + for (const [key, value] of Object.entries(node)) { + if ( + key === 'leadingComments' || + key === 'trailingComments' || + key === 'innerComments' || + key === 'loc' || + key === 'extra' + ) { + continue + } + if (Array.isArray(value)) { + for (const item of value) if (isNode(item)) children.push(item) + } else if (isNode(value)) { + children.push(value) + } + } + return children +} + +function isParenthesized(node: Node): boolean { + return node.extra?.parenthesized === true +} + +/** The members of a chain, innermost first, and its root; stops at a parenthesized object. */ +function flattenChain(top: MemberExpression): { root: Expression; members: MemberExpression[] } { + const members: MemberExpression[] = [top] + let object = top.object + while (object.type === 'MemberExpression' && !isParenthesized(object)) { + members.push(object) + object = object.object + } + members.reverse() + return { root: object, members } +} + +function memberSegment(member: MemberExpression): RefSegment | null { + const property = member.property + if (!member.computed) { + return property.type === 'Identifier' && isNameSegment(property.name) + ? { kind: 'name', name: property.name } + : null + } + if (property.type === 'StringLiteral' && isNameSegment(property.value)) { + return { kind: 'name', name: property.value } + } + if (property.type === 'NumericLiteral' && isIndexSegment(property.value)) { + return { kind: 'index', index: property.value } + } + return null +} + +function envName(member: MemberExpression): string | null { + const property = member.property + const name = + !member.computed && property.type === 'Identifier' + ? property.name + : member.computed && property.type === 'StringLiteral' + ? property.value + : null + return name !== null && ENV_VAR_NAME.test(name) ? name : null +} + +/** + * The replacement for one chain, and the members it consumed. `null` when the chain is not + * rooted at `$ref`/`$env` or maps no member. + */ +function chainReplacement( + root: Expression, + members: MemberExpression[] +): { replacement: Replacement; consumed: number } | null { + if (root.type !== 'Identifier' || members.length === 0) return null + if (root.name === ENV_ROOT) { + const first = members[0] + const name = envName(first) + if (name === null || first.start == null || first.end == null) return null + return { replacement: { start: first.start, end: first.end, text: `{{${name}}}` }, consumed: 1 } + } + if (root.name !== REF_ROOT) return null + + const segments: RefSegment[] = [] + for (const member of members) { + const segment = memberSegment(member) + if (segment === null || (segments.length === 0 && segment.kind === 'index')) break + segments.push(segment) + } + while (segments.length > 0) { + const last = members[segments.length - 1] + const token = `<${formatStoredPath(segments)}>` + if (isLikelyWorkflowReferenceSegment(token) && last.start != null && last.end != null) { + return { + replacement: { start: last.start, end: last.end, text: token }, + consumed: segments.length, + } + } + segments.pop() + } + return null +} + +function collectReplacements(program: Node): Replacement[] { + const replacements: Replacement[] = [] + const stack: Array<{ node: Node; isObjectOfMember: boolean }> = [ + { node: program, isObjectOfMember: false }, + ] + while (stack.length > 0) { + const entry = stack.pop() + if (!entry) break + const { node } = entry + if (node.type === 'MemberExpression' && !entry.isObjectOfMember) { + const { root, members } = flattenChain(node) + const found = chainReplacement(root, members) + if (found) { + replacements.push(found.replacement) + for (const member of members.slice(found.consumed)) { + if (member.computed) stack.push({ node: member.property, isObjectOfMember: false }) + } + continue + } + } + for (const child of childNodes(node)) { + const isObjectOfMember = + node.type === 'MemberExpression' && child === node.object && !isParenthesized(child) + stack.push({ node: child, isObjectOfMember }) + } + } + return replacements +} diff --git a/packages/workflow-code/src/code-files/index.ts b/packages/workflow-code/src/code-files/index.ts new file mode 100644 index 00000000000..750e30a9768 --- /dev/null +++ b/packages/workflow-code/src/code-files/index.ts @@ -0,0 +1,8 @@ +export { type CodeFileBijection, checkCodeFileBijection } from './bijection' +export { type CodeFileSyntaxError, type FromCodeFileResult, fromCodeFile } from './from-file' +export { + type CodeFileLanguage, + codeFileExtension, + codeFileLanguage, + toCodeFile, +} from './to-file' diff --git a/packages/workflow-code/src/code-files/lexer.ts b/packages/workflow-code/src/code-files/lexer.ts new file mode 100644 index 00000000000..77ad67d08ae --- /dev/null +++ b/packages/workflow-code/src/code-files/lexer.ts @@ -0,0 +1,236 @@ +/** + * Where an offset in stored JavaScript function code sits: in code, or inside a string, template, + * regex or comment. A port of the executor's `getCodeStringQuoteContext` + * (apps/sim/executor/variables/resolver.ts), restricted to JavaScript, so the code-file rewrite + * agrees with the runtime about which `` tokens are code-position: those the runtime turns + * into `globalThis[...]` reads (resolver.ts `formatContextVariableReference`). + * + * One difference is deliberate: the runtime reports comments as code-position, since a value + * spliced into a comment is inert there. The rewrite must leave comment text verbatim (s3 D6), + * so comments are reported as their own context. + */ + +export type JsContext = 'code' | 'single' | 'double' | 'template' | 'regex' | 'comment' + +type ScanMode = + | { type: 'normal' } + | { type: 'single' } + | { type: 'double' } + | { type: 'template' } + | { type: 'template-expression'; depth: number } + | { type: 'line-comment' } + | { type: 'block-comment' } + | { type: 'regex'; inCharacterClass: boolean } + +/** Characters after which a `/` opens a regular expression rather than dividing. */ +const REGEX_ALLOWED_AFTER = new Set('(,=:[!&|?{};+-*%^~<>/'.split('')) + +/** Keywords whose parenthesized head is followed by a statement, where a regex may start. */ +const CONTROL_FLOW_HEAD_KEYWORDS = new Set(['if', 'while', 'for', 'switch', 'catch', 'with']) + +/** Keywords a regex may directly follow. */ +const REGEX_ALLOWED_AFTER_KEYWORDS = new Set([ + 'return', + 'typeof', + 'instanceof', + 'in', + 'of', + 'new', + 'delete', + 'void', + 'case', + 'throw', + 'do', + 'else', + 'yield', + 'await', +]) + +const WHITESPACE_CHAR = /\s/ +const IDENTIFIER_CHAR = /[A-Za-z0-9_$]/ + +function isIdentifierChar(char: string | undefined): boolean { + return char !== undefined && IDENTIFIER_CHAR.test(char) +} + +function wordEndingAt(text: string, end: number): string { + let start = end + while (start > 0 && isIdentifierChar(text[start - 1])) start-- + return text.slice(start, end + 1) +} + +/** + * A forward-only scanner over one code body. `contextAt` must be called with non-decreasing + * offsets; each call resumes where the previous one stopped, so a pass over all tokens is linear. + */ +export interface JsContextScanner { + contextAt(index: number): JsContext +} + +export function createJsContextScanner(text: string): JsContextScanner { + const modes: ScanMode[] = [{ type: 'normal' }] + const openParenIsControlHead: boolean[] = [] + const controlHeadParenCloses = new Set() + const regexCloseIndices = new Set() + let lastSignificantIndex = -1 + let identifierFollowsPropertyAccess = false + let position = 0 + + const canStartRegex = (previousSignificantIndex: number): boolean => { + if (previousSignificantIndex < 0) return true + const previous = text[previousSignificantIndex] + if (previous === ')') return controlHeadParenCloses.has(previousSignificantIndex) + if (previous === '/' && regexCloseIndices.has(previousSignificantIndex)) return false + if ((previous === '+' || previous === '-') && text[previousSignificantIndex - 1] === previous) { + return false + } + if (REGEX_ALLOWED_AFTER.has(previous)) return true + if (!isIdentifierChar(previous)) return false + return REGEX_ALLOWED_AFTER_KEYWORDS.has(wordEndingAt(text, previousSignificantIndex)) + } + + const opensControlFlowHead = (previousSignificantIndex: number): boolean => { + if (identifierFollowsPropertyAccess || previousSignificantIndex < 0) return false + if (!isIdentifierChar(text[previousSignificantIndex])) return false + return CONTROL_FLOW_HEAD_KEYWORDS.has(wordEndingAt(text, previousSignificantIndex)) + } + + /** Tracks significance, identifiers and parentheses; returns true when a regex opened. */ + const scanCodeChar = (i: number, char: string): boolean => { + const previousSignificantIndex = lastSignificantIndex + if (!WHITESPACE_CHAR.test(char)) lastSignificantIndex = i + if (isIdentifierChar(char)) { + if (i === 0 || !isIdentifierChar(text[i - 1])) { + identifierFollowsPropertyAccess = text[previousSignificantIndex] === '.' + } + } else if (char === '(') { + openParenIsControlHead.push(opensControlFlowHead(previousSignificantIndex)) + } else if (char === ')') { + if (openParenIsControlHead.pop()) controlHeadParenCloses.add(i) + } + if (char === '/' && canStartRegex(previousSignificantIndex)) { + modes.push({ type: 'regex', inCharacterClass: false }) + return true + } + return false + } + + const advanceTo = (index: number): void => { + let i = position + for (; i < index; i++) { + const char = text[i] + const next = text[i + 1] + const mode = modes[modes.length - 1] + + if (mode.type === 'line-comment') { + if (char === '\n') modes.pop() + continue + } + if (mode.type === 'block-comment') { + if (char === '*' && next === '/') { + modes.pop() + i++ + } + continue + } + if (mode.type === 'regex') { + if (char === '\\') { + i++ + continue + } + if (char === '\n') { + modes.pop() + continue + } + if (char === '[') { + mode.inCharacterClass = true + continue + } + if (char === ']') { + mode.inCharacterClass = false + continue + } + if (char === '/' && !mode.inCharacterClass) { + modes.pop() + regexCloseIndices.add(i) + lastSignificantIndex = i + } + continue + } + if (mode.type === 'single' || mode.type === 'double') { + const quote = mode.type === 'single' ? "'" : '"' + if (char === '\\') { + i++ + continue + } + if (char === quote || char === '\n') modes.pop() + continue + } + if (mode.type === 'template') { + if (char === '\\') { + i++ + continue + } + if (char === '`') { + modes.pop() + continue + } + if (char === '$' && next === '{') { + modes.push({ type: 'template-expression', depth: 1 }) + i++ + } + continue + } + + if (char === '/' && next === '/') { + modes.push({ type: 'line-comment' }) + i++ + continue + } + if (char === '/' && next === '*') { + modes.push({ type: 'block-comment' }) + i++ + continue + } + if (scanCodeChar(i, char)) continue + if (char === "'") { + modes.push({ type: 'single' }) + continue + } + if (char === '"') { + modes.push({ type: 'double' }) + continue + } + if (char === '`') { + modes.push({ type: 'template' }) + continue + } + if (mode.type === 'template-expression') { + if (char === '{') { + mode.depth += 1 + } else if (char === '}') { + mode.depth -= 1 + if (mode.depth === 0) modes.pop() + } + } + } + position = i + } + + return { + contextAt(index: number): JsContext { + advanceTo(index) + const mode = modes[modes.length - 1] + switch (mode.type) { + case 'normal': + case 'template-expression': + return 'code' + case 'line-comment': + case 'block-comment': + return 'comment' + default: + return mode.type + } + }, + } +} diff --git a/packages/workflow-code/src/code-files/ref-path.ts b/packages/workflow-code/src/code-files/ref-path.ts new file mode 100644 index 00000000000..514e3f22e06 --- /dev/null +++ b/packages/workflow-code/src/code-files/ref-path.ts @@ -0,0 +1,97 @@ +/** + * The exact, two-way mapping between a stored reference path (`a.items[0].some-field`) and a JS + * member chain (`a.items[0]['some-field']`), shared by workflow sources (s3 §4 "Ref mapping") and + * function code files (s3 D6). + * + * A stored path is `name ( '.' name | '[' index ']' )*`. A dot segment that is a JS identifier + * maps to `.seg`, any other dot segment to `['seg']`, and a bracket index to `[n]`, so + * `` ↔ `a.items['0']` and `` ↔ `a.items[0]` stay distinct + * (`splitLeadingBracketPath`, executor/variables/resolvers/reference.ts). Paths outside this + * grammar are not mapped at all: callers keep them as literal text, which is exact (s3 D3). + */ + +export type RefSegment = { kind: 'name'; name: string } | { kind: 'index'; index: number } + +/** + * Characters a mappable name segment may not contain: the path delimiters, the reference + * brackets, whitespace, quotes and backslash (so `['seg']` never needs escaping), and the + * operator characters that make the runtime reject a token as a reference + * (`INVALID_REFERENCE_CHARS`, packages/utils/src/workflow-references.ts). + */ +const NAME_SEGMENT = /^[^.[\]<>\s'"`\\+*/=!&|{}]+$/ +const CANONICAL_INDEX = /^(0|[1-9][0-9]{0,14})$/ +const JS_IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ + +/** `PATTERNS.ENV_VAR_NAME` (apps/sim/executor/constants.ts). */ +export const ENV_VAR_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/ + +export function isNameSegment(value: string): boolean { + return NAME_SEGMENT.test(value) +} + +export function isIndexSegment(value: number): boolean { + return Number.isSafeInteger(value) && value >= 0 && CANONICAL_INDEX.test(String(value)) +} + +/** Parses a stored path (the text between `<` and `>`), or `null` when it is outside the grammar. */ +export function parseStoredPath(inner: string): RefSegment[] | null { + const segments: RefSegment[] = [] + let cursor = 0 + const readName = (): string | null => { + let end = cursor + while (end < inner.length && inner[end] !== '.' && inner[end] !== '[') end++ + const name = inner.slice(cursor, end) + if (!isNameSegment(name)) return null + cursor = end + return name + } + + const head = readName() + if (head === null) return null + segments.push({ kind: 'name', name: head }) + + while (cursor < inner.length) { + if (inner[cursor] === '.') { + cursor++ + const name = readName() + if (name === null) return null + segments.push({ kind: 'name', name }) + continue + } + const close = inner.indexOf(']', cursor) + if (close === -1) return null + const digits = inner.slice(cursor + 1, close) + if (!CANONICAL_INDEX.test(digits)) return null + segments.push({ kind: 'index', index: Number(digits) }) + cursor = close + 1 + } + return segments +} + +/** The stored spelling of a path, without the angle brackets. */ +export function formatStoredPath(segments: readonly RefSegment[]): string { + let text = '' + for (const [position, segment] of segments.entries()) { + if (segment.kind === 'index') { + text += `[${segment.index}]` + } else { + text += position === 0 ? segment.name : `.${segment.name}` + } + } + return text +} + +/** A JS member chain rooted at `root`, one member per segment. */ +export function formatMemberPath(root: string, segments: readonly RefSegment[]): string { + let text = root + for (const segment of segments) { + if (segment.kind === 'index') { + text += `[${segment.index}]` + } else if (JS_IDENTIFIER.test(segment.name)) { + text += `.${segment.name}` + } else { + text += `['${segment.name}']` + } + } + return text +} diff --git a/packages/workflow-code/src/code-files/to-file.ts b/packages/workflow-code/src/code-files/to-file.ts new file mode 100644 index 00000000000..c61d919fe19 --- /dev/null +++ b/packages/workflow-code/src/code-files/to-file.ts @@ -0,0 +1,72 @@ +import { isLikelyWorkflowReferenceSegment } from '@sim/utils/workflow-references' +import { createJsContextScanner } from './lexer' +import { ENV_VAR_NAME, formatMemberPath, parseStoredPath } from './ref-path' + +/** The languages a function block runs (`CodeLanguage`, apps/sim/lib/execution/languages.ts). */ +export type CodeFileLanguage = 'javascript' | 'python' | 'shell' + +export const REF_ROOT = '$ref' +export const ENV_ROOT = '$env' + +const CODE_FILE_EXTENSIONS: Record = { + javascript: '.js', + python: '.py', + shell: '.sh', +} + +/** Candidate tokens: `` on one line, or `{{NAME}}`. */ +const TOKEN = /<([^<>\s]+)>|\{\{([^{}\s]+)\}\}/g + +export function codeFileExtension(language: CodeFileLanguage): string { + return CODE_FILE_EXTENSIONS[language] +} + +/** The language a code file's extension names, or `null` for any other extension. */ +export function codeFileLanguage(path: string): CodeFileLanguage | null { + for (const [language, extension] of Object.entries(CODE_FILE_EXTENSIONS)) { + if (path.endsWith(extension)) return language as CodeFileLanguage + } + return null +} + +/** + * Turns stored function code into the text of its code file (build-spec decision 9, s3 D6). + * + * JavaScript: a code-position `` becomes `$ref.a.b` and `{{X}}` becomes `$env.X`, so the + * file is valid JS that editors and the type-checker can read. Tokens inside strings, + * templates, regexes and comments stay verbatim: the runtime splices those as text, and + * rewriting them would change what the string says. Tokens outside the path grammar stay + * verbatim too; the printer's bijection check then decides whether the file form is usable. + * + * Python and shell bodies are returned unchanged. The runtime rewrites their tokens with its own + * per-language quoting (resolver.ts `formatContextVariableReference`), this package has no parser + * for either language to rewrite them back exactly, and no type-checker reads those files, so a + * rewrite would add risk and no checking. The file holds the stored body byte for byte. + */ +export function toCodeFile(code: string, language: CodeFileLanguage): string { + if (language !== 'javascript') return code + const scanner = createJsContextScanner(code) + let result = '' + let cursor = 0 + for (const match of code.matchAll(TOKEN)) { + const start = match.index + const replacement = formatToken(match[0], match[1], match[2]) + if (replacement === null || scanner.contextAt(start) !== 'code') continue + result += code.slice(cursor, start) + replacement + cursor = start + match[0].length + } + return result + code.slice(cursor) +} + +function formatToken( + token: string, + inner: string | undefined, + envName: string | undefined +): string | null { + if (envName !== undefined) { + return ENV_VAR_NAME.test(envName) ? `${ENV_ROOT}.${envName}` : null + } + if (inner === undefined || !isLikelyWorkflowReferenceSegment(token)) return null + const segments = parseStoredPath(inner) + return segments === null ? null : formatMemberPath(REF_ROOT, segments) +} From b9c0919d39ef126aa6a9d0959774805bdcce1be4 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 18:41:11 -0800 Subject: [PATCH 007/428] refactor(workflows): extract graph-write helpers from apply-workflow-operations Moves loadStoredGraph, storedGraphFingerprint, assertStoredGraphUnchanged, layoutChangedBlocks and asGraph into application/graph-write.ts verbatim so the source apply use case can share them. No behaviour change; the only difference is the logger label on the two moved warn lines. --- .../application/apply-workflow-operations.ts | 141 +---------------- .../lib/workflows/application/graph-write.ts | 145 ++++++++++++++++++ 2 files changed, 152 insertions(+), 134 deletions(-) create mode 100644 apps/sim/lib/workflows/application/graph-write.ts diff --git a/apps/sim/lib/workflows/application/apply-workflow-operations.ts b/apps/sim/lib/workflows/application/apply-workflow-operations.ts index dc5398b28fa..e155139fa95 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-operations.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-operations.ts @@ -2,9 +2,6 @@ import { AuditAction, AuditResourceType } from '@sim/audit' import { type Principal, resolvePrincipalAttribution } from '@sim/auth/principal' import { db } from '@sim/db' import { createLogger } from '@sim/logger' -import { toError } from '@sim/utils/errors' -import { sortObjectKeysDeep } from '@sim/utils/object' -import { compareStrings } from '@sim/utils/string' import { generateLoopBlocks, generateParallelBlocks, @@ -14,27 +11,24 @@ import { hasWorkspaceSandboxAccess } from '@/lib/billing/core/subscription' import { ForbiddenOperationError, principalAuditSource } from '@/lib/core/application' import { getBlockVisibility } from '@/lib/core/config/block-visibility' import { OrchestrationError } from '@/lib/core/orchestration/types' -import type { DbOrTx } from '@/lib/db/types' import { MAX_PLAN_REQUIRED } from '@/lib/execution/remote-sandbox/entitlement' import { resolvePermissionGroupConfig } from '@/lib/permission-groups/config-scope.server' import { notifyWorkflowUpdated } from '@/lib/realtime/notify' import { defineAuthorizedWorkflowUseCase } from '@/lib/workflows/application/authorized-workflow-use-case' import { withWorkflowBlockScope } from '@/lib/workflows/application/block-scope' import type { ActiveWorkflowApplicationContext } from '@/lib/workflows/application/context' +import { + asGraph, + assertStoredGraphUnchanged, + layoutChangedBlocks, + loadStoredGraph, + storedGraphFingerprint, +} from '@/lib/workflows/application/graph-write' import { snapshotMcpToolOutputSchemas } from '@/lib/workflows/application/mcp-output-schemas' import { requireMutableWorkflow } from '@/lib/workflows/application/mutability' import { workflowOperations } from '@/lib/workflows/application/operations' import { WorkflowOperationsNotAppliedError } from '@/lib/workflows/application/operations-error' import { resolvePrincipalWorkflowContext } from '@/lib/workflows/application/principal-scope' -import { - applyTargetedLayout, - getTargetedLayoutImpact, - transferBlockHeights, -} from '@/lib/workflows/autolayout' -import { - DEFAULT_HORIZONTAL_SPACING, - DEFAULT_VERTICAL_SPACING, -} from '@/lib/workflows/autolayout/constants' import { checkNeedsRedeployment } from '@/lib/workflows/deployment-status' import { type BlockEnablementRefusal, @@ -60,10 +54,8 @@ import { collectWorkflowGraphIds, replaceWorkflowNormalizedState, } from '@/lib/workflows/persistence/replace-normalized-state' -import { loadWorkflowFromNormalizedTables } from '@/lib/workflows/persistence/utils' import { validateWorkflowState } from '@/lib/workflows/sanitization/validation' import { withBlockVisibility } from '@/blocks/visibility/server-context' -import { normalizeWorkflowState } from '@/stores/workflows/workflow/validation' const logger = createLogger('ApplyWorkflowOperations') @@ -135,51 +127,6 @@ export interface ApplyWorkflowOperationsResult { export const DRY_RUN_PREVIEW_BLOCK_IDS_WARNING = 'Dry run: block ids are previews — the real apply mints new ones; wire edges by slug within one batch or by the ids the real apply returns.' -/** - * The engine models a graph as an open record; the layout helpers want the - * canonical shape. One conversion, named, rather than a cast at each call. - */ -function asGraph(value: Record): Pick { - // double-cast-allowed: the edit engine models a graph as an open record; this is the one place it is read back as the canonical shape, and the layout helpers tolerate missing keys. - return value as unknown as Pick -} - -/** - * Loads the editable graph after the workflow row has already been resolved. - * - * The normalized loader projects a legitimate blockless draft as an empty - * graph. A null result therefore remains a hard failure rather than becoming a - * fallback graph that a write could persist after a failed read. - */ -async function loadStoredGraph( - workflowId: string, - lockedTx?: DbOrTx -): Promise> { - const normalized = await loadWorkflowFromNormalizedTables(workflowId, lockedTx) - if (!normalized) { - // The loader answers null for a failed query too. Under the row lock the - // workflow is known to exist, so that is the only meaning left. - if (lockedTx) { - throw new OrchestrationError('internal', `Failed to re-read workflow ${workflowId}`) - } - throw new OrchestrationError('validation', `Workflow ${workflowId} has no normalized state`) - } - const { state, warnings } = normalizeWorkflowState({ - blocks: normalized.blocks, - edges: normalized.edges, - loops: normalized.loops || {}, - parallels: normalized.parallels || {}, - }) - if (warnings.length > 0) { - logger.warn('Stored workflow state needed normalization before editing', { - workflowId, - warnings, - }) - } - // double-cast-allowed: the edit engine takes an open record; `normalizeWorkflowState` returns the canonical interface, which has no index signature. - return state as unknown as Record -} - /** * How each enablement refusal maps onto the machine-readable skip enum. Kept as * a total `Record` so a new refusal reason fails to compile until it is @@ -228,20 +175,6 @@ function applyBlockEnabledChanges( return { blocks: current, applied } } -/** - * An order-insensitive identity for a stored graph, so two reads of the same - * rows compare equal even though the loader neither orders its rows nor fixes - * the key order of the records it builds. - * - * Only blocks and edges are compared: loops and parallels are rebuilt from the - * blocks on every load, with child `nodes` in row order. - */ -function storedGraphFingerprint(graph: Record): string { - const { blocks, edges } = asGraph(graph) - const sortedEdges = [...(edges ?? [])].sort((a, b) => compareStrings(a.id, b.id)) - return JSON.stringify(sortObjectKeysDeep({ blocks, edges: sortedEdges })) -} - interface BaseGraph { graph: Record /** Set when the base was read from storage, so the write can prove it is still current. */ @@ -258,26 +191,6 @@ async function resolveBaseGraph( return { graph, storedFingerprint: storedGraphFingerprint(graph) } } -/** - * Refuses the write when the stored graph is no longer the one the batch was - * applied to. Runs under the workflow row lock, so a concurrent edit that - * committed after the base read surfaces as a conflict instead of being - * silently overwritten by a graph that never saw it. - */ -async function assertStoredGraphUnchanged( - workflowId: string, - storedFingerprint: string, - tx: DbOrTx -): Promise { - const current = await loadStoredGraph(workflowId, tx) - if (storedGraphFingerprint(current) !== storedFingerprint) { - throw new OrchestrationError( - 'conflict', - 'The workflow changed while these operations were being applied. Re-read it and retry.' - ) - } -} - /** * The one semantic edit operation on a workflow graph. * @@ -573,43 +486,3 @@ export const applyWorkflowOperations = defineAuthorizedWorkflowUseCase({ return notifyWorkflowUpdated(context.workflowId) }, }) - -/** - * Nudges only the blocks this batch touched, leaving the rest of the canvas - * where the user put it. A layout failure is never fatal: the graph is already - * correct, only its positions are less tidy. - */ -function layoutChangedBlocks( - workflowId: string, - before: Pick, - after: Pick -): Record { - const { layoutBlockIds, resizedBlockIds, shiftSourceBlockIds } = getTargetedLayoutImpact({ - before, - after, - }) - if ( - layoutBlockIds.length === 0 && - resizedBlockIds.length === 0 && - shiftSourceBlockIds.length === 0 - ) { - return after.blocks - } - try { - transferBlockHeights(before.blocks, after.blocks) - return applyTargetedLayout(after.blocks, after.edges, { - changedBlockIds: layoutBlockIds, - resizedBlockIds, - shiftSourceBlockIds, - horizontalSpacing: DEFAULT_HORIZONTAL_SPACING, - verticalSpacing: DEFAULT_VERTICAL_SPACING, - previousBlocks: before.blocks, - }) as Record - } catch (error) { - logger.warn('Targeted autolayout failed, using supplied positions', { - workflowId, - error: toError(error).message, - }) - return after.blocks - } -} diff --git a/apps/sim/lib/workflows/application/graph-write.ts b/apps/sim/lib/workflows/application/graph-write.ts new file mode 100644 index 00000000000..06a1fc5207f --- /dev/null +++ b/apps/sim/lib/workflows/application/graph-write.ts @@ -0,0 +1,145 @@ +import { createLogger } from '@sim/logger' +import { toError } from '@sim/utils/errors' +import { sortObjectKeysDeep } from '@sim/utils/object' +import { compareStrings } from '@sim/utils/string' +import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' +import { OrchestrationError } from '@/lib/core/orchestration/types' +import type { DbOrTx } from '@/lib/db/types' +import { + applyTargetedLayout, + getTargetedLayoutImpact, + transferBlockHeights, +} from '@/lib/workflows/autolayout' +import { + DEFAULT_HORIZONTAL_SPACING, + DEFAULT_VERTICAL_SPACING, +} from '@/lib/workflows/autolayout/constants' +import { loadWorkflowFromNormalizedTables } from '@/lib/workflows/persistence/utils' +import { normalizeWorkflowState } from '@/stores/workflows/workflow/validation' + +/** + * Graph-level helpers shared by the use cases that write a whole workflow graph + * (operations apply today, source apply next): reading the stored graph, proving + * it unchanged under the row lock, and laying out only what changed. + */ + +const logger = createLogger('WorkflowGraphWrite') + +/** + * The engine models a graph as an open record; the layout helpers want the + * canonical shape. One conversion, named, rather than a cast at each call. + */ +export function asGraph(value: Record): Pick { + // double-cast-allowed: the edit engine models a graph as an open record; this is the one place it is read back as the canonical shape, and the layout helpers tolerate missing keys. + return value as unknown as Pick +} + +/** + * Loads the editable graph after the workflow row has already been resolved. + * + * The normalized loader projects a legitimate blockless draft as an empty + * graph. A null result therefore remains a hard failure rather than becoming a + * fallback graph that a write could persist after a failed read. + */ +export async function loadStoredGraph( + workflowId: string, + lockedTx?: DbOrTx +): Promise> { + const normalized = await loadWorkflowFromNormalizedTables(workflowId, lockedTx) + if (!normalized) { + // The loader answers null for a failed query too. Under the row lock the + // workflow is known to exist, so that is the only meaning left. + if (lockedTx) { + throw new OrchestrationError('internal', `Failed to re-read workflow ${workflowId}`) + } + throw new OrchestrationError('validation', `Workflow ${workflowId} has no normalized state`) + } + const { state, warnings } = normalizeWorkflowState({ + blocks: normalized.blocks, + edges: normalized.edges, + loops: normalized.loops || {}, + parallels: normalized.parallels || {}, + }) + if (warnings.length > 0) { + logger.warn('Stored workflow state needed normalization before editing', { + workflowId, + warnings, + }) + } + // double-cast-allowed: the edit engine takes an open record; `normalizeWorkflowState` returns the canonical interface, which has no index signature. + return state as unknown as Record +} + +/** + * An order-insensitive identity for a stored graph, so two reads of the same + * rows compare equal even though the loader neither orders its rows nor fixes + * the key order of the records it builds. + * + * Only blocks and edges are compared: loops and parallels are rebuilt from the + * blocks on every load, with child `nodes` in row order. + */ +export function storedGraphFingerprint(graph: Record): string { + const { blocks, edges } = asGraph(graph) + const sortedEdges = [...(edges ?? [])].sort((a, b) => compareStrings(a.id, b.id)) + return JSON.stringify(sortObjectKeysDeep({ blocks, edges: sortedEdges })) +} + +/** + * Refuses the write when the stored graph is no longer the one the batch was + * applied to. Runs under the workflow row lock, so a concurrent edit that + * committed after the base read surfaces as a conflict instead of being + * silently overwritten by a graph that never saw it. + */ +export async function assertStoredGraphUnchanged( + workflowId: string, + storedFingerprint: string, + tx: DbOrTx +): Promise { + const current = await loadStoredGraph(workflowId, tx) + if (storedGraphFingerprint(current) !== storedFingerprint) { + throw new OrchestrationError( + 'conflict', + 'The workflow changed while these operations were being applied. Re-read it and retry.' + ) + } +} + +/** + * Nudges only the blocks this batch touched, leaving the rest of the canvas + * where the user put it. A layout failure is never fatal: the graph is already + * correct, only its positions are less tidy. + */ +export function layoutChangedBlocks( + workflowId: string, + before: Pick, + after: Pick +): Record { + const { layoutBlockIds, resizedBlockIds, shiftSourceBlockIds } = getTargetedLayoutImpact({ + before, + after, + }) + if ( + layoutBlockIds.length === 0 && + resizedBlockIds.length === 0 && + shiftSourceBlockIds.length === 0 + ) { + return after.blocks + } + try { + transferBlockHeights(before.blocks, after.blocks) + return applyTargetedLayout(after.blocks, after.edges, { + changedBlockIds: layoutBlockIds, + resizedBlockIds, + shiftSourceBlockIds, + horizontalSpacing: DEFAULT_HORIZONTAL_SPACING, + verticalSpacing: DEFAULT_VERTICAL_SPACING, + previousBlocks: before.blocks, + }) as Record + } catch (error) { + logger.warn('Targeted autolayout failed, using supplied positions', { + workflowId, + error: toError(error).message, + }) + return after.blocks + } +} From 0b64251a5199958f90f3cbbdbf5d6e3613f0ed39 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 18:45:11 -0800 Subject: [PATCH 008/428] chore(sim): depend on @sim/workflow-code for apply diagnostics --- apps/sim/package.json | 1 + bun.lock | 1 + 2 files changed, 2 insertions(+) diff --git a/apps/sim/package.json b/apps/sim/package.json index 31a53480a53..709f6c26c1d 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -164,6 +164,7 @@ "@sim/security": "workspace:*", "@sim/terminal-protocol": "workspace:*", "@sim/utils": "workspace:*", + "@sim/workflow-code": "workspace:*", "@sim/workflow-persistence": "workspace:*", "@sim/workflow-renderer": "workspace:*", "@sim/workflow-types": "workspace:*", diff --git a/bun.lock b/bun.lock index f01b284baeb..84084ee029b 100644 --- a/bun.lock +++ b/bun.lock @@ -315,6 +315,7 @@ "@sim/security": "workspace:*", "@sim/terminal-protocol": "workspace:*", "@sim/utils": "workspace:*", + "@sim/workflow-code": "workspace:*", "@sim/workflow-persistence": "workspace:*", "@sim/workflow-renderer": "workspace:*", "@sim/workflow-types": "workspace:*", From 1cf8afed642dea2f15a1e9ae38811f18c1396c27 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 18:57:34 -0800 Subject: [PATCH 009/428] feat(workflows): refuse source diffs that touch protected blocks Adds a block- and field-level graph diff keyed by block id (edges by endpoint tuple, layout ignored) and findProtectedBlockRefusals, which refuses any change the persistence door's protected-block merge would silently undo (s4 D2), plus assertProtectedBlocksPreserved for the write reader's identity invariant. An exhaustive lock-layout x mutation test proves every admitted diff survives the merge unchanged. --- apps/sim/lib/workflows/source/graph-diff.ts | 138 ++++++++++ .../lib/workflows/source/protected.test.ts | 252 ++++++++++++++++++ apps/sim/lib/workflows/source/protected.ts | 171 ++++++++++++ 3 files changed, 561 insertions(+) create mode 100644 apps/sim/lib/workflows/source/graph-diff.ts create mode 100644 apps/sim/lib/workflows/source/protected.test.ts create mode 100644 apps/sim/lib/workflows/source/protected.ts diff --git a/apps/sim/lib/workflows/source/graph-diff.ts b/apps/sim/lib/workflows/source/graph-diff.ts new file mode 100644 index 00000000000..b0971cdc2ca --- /dev/null +++ b/apps/sim/lib/workflows/source/graph-diff.ts @@ -0,0 +1,138 @@ +import { compareStrings } from '@sim/utils/string' +import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' +import { isEqual } from 'es-toolkit' + +/** The two parts of a stored graph the source gates compare. */ +export type SourceGraph = Pick + +type GraphEdge = WorkflowState['edges'][number] + +/** + * Block keys that only place a block on the canvas. Source apply keeps stored positions for + * existing blocks (s4 D3), so a difference here is never a semantic change. + */ +const LAYOUT_BLOCK_KEYS: ReadonlySet = new Set(['position', 'height', 'layout']) +const LAYOUT_DATA_KEYS: ReadonlySet = new Set(['width', 'height']) + +/** One block present on both sides whose semantic content differs. */ +export interface ModifiedBlock { + id: string + /** Subblock ids whose stored entry differs, in sorted order. */ + subBlocks: string[] + /** Other block keys that differ (`name`, `type`, `enabled`, `locked`, `data.count`, ...), sorted. */ + attributes: string[] + typeChanged: boolean + parentChanged: boolean + lockedChanged: boolean + enabledChanged: boolean +} + +/** + * A block- and field-level diff of two graphs, keyed by block id. Edges are keyed by their + * endpoints and handles, never their id: materialize reuses a stored edge's id whenever its + * tuple survives (build-spec decision 3), so the tuple is the edge's identity. + */ +export interface GraphDiff { + added: string[] + removed: string[] + modified: ModifiedBlock[] + edgesAdded: GraphEdge[] + edgesRemoved: GraphEdge[] +} + +export function parentIdOf(block: BlockState | undefined): string | undefined { + const parentId = block?.data?.parentId + return typeof parentId === 'string' && parentId.length > 0 ? parentId : undefined +} + +/** `locked` is optional and stored as null or absent when off. */ +export function isLocked(block: BlockState | undefined): boolean { + return block?.locked === true +} + +function edgeKey(edge: GraphEdge): string { + return JSON.stringify([ + edge.source, + edge.sourceHandle ?? null, + edge.target, + edge.targetHandle ?? null, + ]) +} + +function semanticData(block: BlockState): Record { + const data: Record = {} + for (const [key, value] of Object.entries(block.data ?? {})) { + if (!LAYOUT_DATA_KEYS.has(key) && value !== undefined) data[key] = value + } + return data +} + +function diffBlock(base: BlockState, target: BlockState): ModifiedBlock | null { + const subBlocks: string[] = [] + const subBlockIds = new Set([ + ...Object.keys(base.subBlocks ?? {}), + ...Object.keys(target.subBlocks ?? {}), + ]) + for (const id of subBlockIds) { + if (!isEqual(base.subBlocks?.[id], target.subBlocks?.[id])) subBlocks.push(id) + } + + const attributes: string[] = [] + const blockKeys = new Set([...Object.keys(base), ...Object.keys(target)]) + for (const key of blockKeys) { + if (key === 'subBlocks' || key === 'data' || LAYOUT_BLOCK_KEYS.has(key)) continue + const before = base[key as keyof BlockState] + const after = target[key as keyof BlockState] + if (key === 'locked' ? isLocked(base) !== isLocked(target) : !isEqual(before, after)) { + attributes.push(key) + } + } + const baseData = semanticData(base) + const targetData = semanticData(target) + for (const key of new Set([...Object.keys(baseData), ...Object.keys(targetData)])) { + if (!isEqual(baseData[key], targetData[key])) attributes.push(`data.${key}`) + } + + if (subBlocks.length === 0 && attributes.length === 0) return null + subBlocks.sort(compareStrings) + attributes.sort(compareStrings) + return { + id: target.id, + subBlocks, + attributes, + typeChanged: base.type !== target.type, + parentChanged: parentIdOf(base) !== parentIdOf(target), + lockedChanged: isLocked(base) !== isLocked(target), + enabledChanged: base.enabled !== target.enabled, + } +} + +/** Diffs base against target by block id. Layout-only differences are ignored. */ +export function diffGraphs(base: SourceGraph, target: SourceGraph): GraphDiff { + const added: string[] = [] + const removed: string[] = [] + const modified: ModifiedBlock[] = [] + + for (const id of Object.keys(target.blocks)) { + const before = base.blocks[id] + if (!before) { + added.push(id) + continue + } + const change = diffBlock(before, target.blocks[id]) + if (change) modified.push(change) + } + for (const id of Object.keys(base.blocks)) { + if (!target.blocks[id]) removed.push(id) + } + + const baseEdges = new Map(base.edges.map((edge) => [edgeKey(edge), edge])) + const targetEdges = new Map(target.edges.map((edge) => [edgeKey(edge), edge])) + const edgesAdded = [...targetEdges].filter(([key]) => !baseEdges.has(key)).map(([, e]) => e) + const edgesRemoved = [...baseEdges].filter(([key]) => !targetEdges.has(key)).map(([, e]) => e) + + added.sort(compareStrings) + removed.sort(compareStrings) + modified.sort((a, b) => compareStrings(a.id, b.id)) + return { added, removed, modified, edgesAdded, edgesRemoved } +} diff --git a/apps/sim/lib/workflows/source/protected.test.ts b/apps/sim/lib/workflows/source/protected.test.ts new file mode 100644 index 00000000000..3831d2a5a44 --- /dev/null +++ b/apps/sim/lib/workflows/source/protected.test.ts @@ -0,0 +1,252 @@ +/** + * The protected-block gate must refuse every change the persistence door's + * `preserveProtectedWorkflowBlocks` merge would silently undo, so that a write the gate admits is + * stored exactly as submitted (s4 D2). + */ +import { omit } from '@sim/utils/object' +import { type BlockState, preserveProtectedWorkflowBlocks } from '@sim/workflow-types/workflow' +import { describe, expect, it } from 'vitest' +import type { SourceGraph } from '@/lib/workflows/source/graph-diff' +import { + assertProtectedBlocksPreserved, + findProtectedBlockRefusals, +} from '@/lib/workflows/source/protected' + +type GraphEdge = SourceGraph['edges'][number] + +function block( + id: string, + options: { parentId?: string; locked?: boolean; type?: string } = {} +): BlockState { + return { + id, + type: options.type ?? 'agent', + name: id, + position: { x: 10, y: 20 }, + subBlocks: { prompt: { id: 'prompt', type: 'long-input', value: `${id} prompt` } }, + outputs: {}, + enabled: true, + ...(options.locked ? { locked: true } : {}), + data: options.parentId ? { parentId: options.parentId, extent: 'parent' } : {}, + } +} + +function edge(source: string, target: string, sourceHandle = 'source'): GraphEdge { + return { id: `${source}->${target}`, source, target, sourceHandle, targetHandle: 'target' } +} + +/** `loop` contains `child`; `a` and `b` sit beside it. */ +function baseGraph(locked: ReadonlySet): SourceGraph { + return { + blocks: { + loop: block('loop', { type: 'loop', locked: locked.has('loop') }), + child: block('child', { parentId: 'loop', locked: locked.has('child') }), + a: block('a', { locked: locked.has('a') }), + b: block('b', { locked: locked.has('b') }), + }, + edges: [edge('a', 'b'), edge('b', 'loop'), edge('loop', 'child', 'loop-start-source')], + } +} + +/** Deletes blocks and every edge that touches them, as a deletion in source does. */ +function removeBlocks(g: SourceGraph, ids: string[]): void { + g.blocks = omit(g.blocks, ids) + g.edges = g.edges.filter((e) => !ids.includes(e.source) && !ids.includes(e.target)) +} + +const MUTATIONS: Record void> = { + 'edit a field on a': (g) => { + g.blocks.a.subBlocks.prompt.value = 'changed' + }, + 'edit a field on the child': (g) => { + g.blocks.child.subBlocks.prompt.value = 'changed' + }, + 'rename b': (g) => { + g.blocks.b.name = 'renamed' + }, + 'retype b': (g) => { + g.blocks.b.type = 'function' + }, + 'disable b': (g) => { + g.blocks.b.enabled = false + }, + 'delete a': (g) => removeBlocks(g, ['a']), + 'delete the child': (g) => removeBlocks(g, ['child']), + 'delete the loop with its child': (g) => removeBlocks(g, ['loop', 'child']), + 'add a top-level block wired into b': (g) => { + g.blocks.n = block('n') + g.edges.push(edge('n', 'b')) + }, + 'add a block inside the loop': (g) => { + g.blocks.n = block('n', { parentId: 'loop' }) + }, + 'move a into the loop': (g) => { + g.blocks.a.data = { parentId: 'loop', extent: 'parent' } + }, + 'extract the child': (g) => { + g.blocks.child.data = {} + }, + 'add an edge from a into the child': (g) => { + g.edges.push(edge('a', 'child')) + }, + 'add an edge from b back to a': (g) => { + g.edges.push(edge('b', 'a')) + }, + 'remove the edge a to b': (g) => { + g.edges = g.edges.filter((e) => e.id !== 'a->b') + }, + 'remove the edge b to the loop': (g) => { + g.edges = g.edges.filter((e) => e.id !== 'b->loop') + }, + 'lock a': (g) => { + g.blocks.a.locked = true + }, + 'unlock a': (g) => { + g.blocks.a.locked = false + }, + 'move the child on the canvas': (g) => { + g.blocks.child.position = { x: 999, y: 999 } + }, + 'resize the loop': (g) => { + g.blocks.loop.data = { ...g.blocks.loop.data, width: 800, height: 600 } + }, +} + +const LOCKABLE = ['loop', 'child', 'a', 'b'] as const + +function lockCombinations(): Set[] { + const combos: Set[] = [] + for (let mask = 0; mask < 1 << LOCKABLE.length; mask++) { + combos.push(new Set(LOCKABLE.filter((_, bit) => mask & (1 << bit)))) + } + return combos +} + +/** The persistence door restores stored positions before the merge (s4 D3); mirror that. */ +function withStoredLayout(current: SourceGraph, target: SourceGraph): SourceGraph { + const blocks = structuredClone(target.blocks) + for (const [id, stored] of Object.entries(current.blocks)) { + const next = blocks[id] + if (!next) continue + next.position = stored.position + next.data = { ...omit(next.data ?? {}, ['width', 'height']) } + if (stored.data?.width !== undefined) next.data.width = stored.data.width + if (stored.data?.height !== undefined) next.data.height = stored.data.height + } + return { blocks, edges: target.edges } +} + +describe('findProtectedBlockRefusals', () => { + it('refuses every change the protected-block merge would undo, across every lock layout', () => { + let admitted = 0 + let refused = 0 + for (const locked of lockCombinations()) { + for (const [name, mutate] of Object.entries(MUTATIONS)) { + const base = baseGraph(locked) + const target = structuredClone(base) + mutate(target) + const refusals = findProtectedBlockRefusals(base, target) + if (refusals.length > 0) { + refused++ + continue + } + admitted++ + expect( + () => assertProtectedBlocksPreserved(base, withStoredLayout(base, target)), + `${name} with locked=[${[...locked].join(',')}] was admitted but the merge changes it` + ).not.toThrow() + } + } + expect(admitted).toBeGreaterThan(0) + expect(refused).toBeGreaterThan(0) + }) + + it('admits nothing the merge would change: the property is not vacuous', () => { + const base = baseGraph(new Set(['b'])) + const target = structuredClone(base) + target.blocks.b.name = 'renamed' + const merged = preserveProtectedWorkflowBlocks(base, target) + expect(merged.blocks.b.name).toBe('b') + expect(findProtectedBlockRefusals(base, target).map((d) => d.blockId)).toEqual(['b']) + }) + + it('refuses an edge added into a locked block, which the engine would let through', () => { + const base = baseGraph(new Set(['b'])) + const target = structuredClone(base) + target.blocks.n = block('n') + target.edges.push(edge('n', 'b')) + const refusals = findProtectedBlockRefusals(base, target) + expect(refusals).toEqual([ + expect.objectContaining({ code: 'E_APPLY_PROTECTED_BLOCK', blockId: 'b' }), + ]) + }) + + it('refuses rewiring the outgoing edges of a locked block', () => { + const base = baseGraph(new Set(['a'])) + const target = structuredClone(base) + target.edges = target.edges.filter((e) => e.id !== 'a->b') + expect(findProtectedBlockRefusals(base, target).map((d) => d.blockId)).toEqual(['a']) + }) + + it('lets an edge to a locked block go when its unlocked source is deleted', () => { + const base = baseGraph(new Set(['b'])) + const target = structuredClone(base) + removeBlocks(target, ['a']) + expect(findProtectedBlockRefusals(base, target)).toEqual([]) + }) + + it('refuses locking a block or creating one locked', () => { + const base = baseGraph(new Set()) + const target = structuredClone(base) + target.blocks.a.locked = true + target.blocks.n = { ...block('n'), locked: true } + expect( + findProtectedBlockRefusals(base, target) + .map((d) => d.blockId) + .sort() + ).toEqual(['a', 'n']) + }) + + it('refuses unlocking, even for a caller who could unlock on the canvas', () => { + const base = baseGraph(new Set(['a'])) + const target = structuredClone(base) + target.blocks.a.locked = false + expect(findProtectedBlockRefusals(base, target)).toEqual([ + expect.objectContaining({ blockId: 'a', message: expect.stringContaining('lock') }), + ]) + }) + + it('ignores a canvas move of a locked block', () => { + const base = baseGraph(new Set(['loop'])) + const target = structuredClone(base) + target.blocks.child.position = { x: 500, y: 500 } + target.blocks.loop.data = { ...target.blocks.loop.data, width: 900 } + expect(findProtectedBlockRefusals(base, target)).toEqual([]) + }) +}) + +describe('assertProtectedBlocksPreserved', () => { + it('throws an internal error when the target changes a protected block', () => { + const current = baseGraph(new Set(['a'])) + const target = structuredClone(current) + target.blocks.a.subBlocks.prompt.value = 'changed' + expect(() => assertProtectedBlocksPreserved(current, target)).toThrow( + expect.objectContaining({ code: 'internal' }) + ) + }) + + it('throws when the target drops an edge into a protected block', () => { + const current = baseGraph(new Set(['b'])) + const target = structuredClone(current) + target.edges = target.edges.filter((e) => e.id !== 'a->b') + expect(() => assertProtectedBlocksPreserved(current, target)).toThrow() + }) + + it('accepts a target whose unlocked blocks omit the lock flag', () => { + const current = baseGraph(new Set(['loop'])) + const target = structuredClone(current) + target.blocks.a.subBlocks.prompt.value = 'changed' + target.blocks.b = omit(target.blocks.b, ['locked']) + expect(() => assertProtectedBlocksPreserved(current, target)).not.toThrow() + }) +}) diff --git a/apps/sim/lib/workflows/source/protected.ts b/apps/sim/lib/workflows/source/protected.ts new file mode 100644 index 00000000000..3cfd3885453 --- /dev/null +++ b/apps/sim/lib/workflows/source/protected.ts @@ -0,0 +1,171 @@ +import type { Diagnostic } from '@sim/workflow-code' +import { + type BlockState, + isWorkflowBlockProtected, + normalizeWorkflowBlockName, + preserveProtectedWorkflowBlocks, +} from '@sim/workflow-types/workflow' +import { isEqual } from 'es-toolkit' +import { OrchestrationError } from '@/lib/core/orchestration/types' +import { + diffGraphs, + type GraphDiff, + isLocked, + parentIdOf, + type SourceGraph, +} from '@/lib/workflows/source/graph-diff' + +/** + * The source apply path refuses, and never silently preserves, any change to a protected block: + * one that is locked or sits inside a locked container (s4 D2). The persistence door keeps + * protected blocks as stored whatever the incoming graph says, so a source write that changed one + * would report success while storing something else. This applies to admins too, as the + * operations engine does; unlocking stays the canvas toggle. + */ + +export type ProtectedBlockDiagnostic = Diagnostic<'E_APPLY_PROTECTED_BLOCK'> + +function refusal(block: BlockState, message: string): ProtectedBlockDiagnostic { + return { + code: 'E_APPLY_PROTECTED_BLOCK', + severity: 'error', + message, + blockId: block.id, + blockKey: normalizeWorkflowBlockName(block.name ?? ''), + hint: 'Unlock the block on the canvas first, or leave it exactly as it is stored.', + } +} + +function describe(block: BlockState, blocks: Record): string { + const parentId = parentIdOf(block) + if (!isLocked(block) && parentId && isWorkflowBlockProtected(parentId, blocks)) { + return `Block "${block.name}" is inside a locked container` + } + return `Block "${block.name}" is locked` +} + +/** + * Whether a protected block leaves only because an unprotected container above it was deleted, + * which the engine and the persistence door both allow (the child goes with its container). + */ +function leavesWithRemovedContainer(id: string, base: SourceGraph, target: SourceGraph): boolean { + const visited = new Set() + let parentId = parentIdOf(base.blocks[id]) + while (parentId && !visited.has(parentId)) { + visited.add(parentId) + if (!target.blocks[parentId] && !isWorkflowBlockProtected(parentId, base.blocks)) return true + parentId = parentIdOf(base.blocks[parentId]) + } + return false +} + +/** + * Returns one refusal per protected block the diff from `base` to `target` touches, plus one per + * attempt to lock a block or to put a new child into a locked container. Edges into or out of a + * protected block may not be added or removed, except when the edge goes because its other end + * was deleted. + */ +export function findProtectedBlockRefusals( + base: SourceGraph, + target: SourceGraph, + diff: GraphDiff = diffGraphs(base, target) +): ProtectedBlockDiagnostic[] { + const isProtected = (id: string) => isWorkflowBlockProtected(id, base.blocks) + const refusals = new Map() + const refuse = (block: BlockState, message: string) => { + if (!refusals.has(block.id)) refusals.set(block.id, refusal(block, message)) + } + + for (const id of diff.removed) { + if (isProtected(id) && !leavesWithRemovedContainer(id, base, target)) { + const block = base.blocks[id] + refuse(block, `${describe(block, base.blocks)} and cannot be deleted`) + } + } + + for (const change of diff.modified) { + const block = base.blocks[change.id] + if (isProtected(change.id)) { + const what = change.lockedChanged + ? 'its lock cannot be changed from source' + : change.parentChanged + ? 'it cannot be moved' + : `it cannot be edited (${[...change.attributes, ...change.subBlocks.map((id) => `subBlocks.${id}`)].join(', ')})` + refuse(block, `${describe(block, base.blocks)}; ${what}`) + continue + } + if (change.lockedChanged) { + refuse(block, `Block "${block.name}" cannot be locked from source; lock it on the canvas`) + continue + } + const parentId = parentIdOf(target.blocks[change.id]) + if (change.parentChanged && parentId && isProtected(parentId)) { + refuse(block, `Block "${block.name}" cannot be moved into locked container "${parentId}"`) + } + } + + for (const id of diff.added) { + const block = target.blocks[id] + if (isLocked(block)) { + refuse(block, `Block "${block.name}" cannot be created locked; lock it on the canvas`) + continue + } + const parentId = parentIdOf(block) + if (parentId && isProtected(parentId)) { + refuse(block, `Block "${block.name}" cannot be added to locked container "${parentId}"`) + } + } + + const refuseEdge = (endpointId: string, verb: string) => { + const block = base.blocks[endpointId] + refuse(block, `${describe(block, base.blocks)}; its connections cannot be ${verb}`) + } + for (const edge of diff.edgesAdded) { + for (const endpoint of [edge.source, edge.target]) { + if (isProtected(endpoint)) refuseEdge(endpoint, 'added to') + } + } + for (const edge of diff.edgesRemoved) { + if (!target.blocks[edge.source] || !target.blocks[edge.target]) continue + for (const endpoint of [edge.source, edge.target]) { + if (isProtected(endpoint)) refuseEdge(endpoint, 'removed from') + } + } + + return [...refusals.values()] +} + +function withLockOff(block: BlockState): BlockState { + return { ...block, locked: isLocked(block) } +} + +/** + * Asserts that the persistence door's protected-block merge leaves `target` unchanged. The + * source gate refuses every diff that merge would undo, so a difference here means the gate and + * the merge disagree: an invariant breach, reported as an internal error (HTTP 500) rather than + * written as a silently merged graph (s4 D2). `current` is the graph re-read under the row lock. + */ +export function assertProtectedBlocksPreserved(current: SourceGraph, target: SourceGraph): void { + const merged = preserveProtectedWorkflowBlocks(current, target) + + const expectedBlocks = new Map(Object.values(target.blocks).map((b) => [b.id, withLockOff(b)])) + const mergedBlocks = new Map(Object.values(merged.blocks).map((b) => [b.id, withLockOff(b)])) + const blockMismatch = [...new Set([...expectedBlocks.keys(), ...mergedBlocks.keys()])].find( + (id) => !isEqual(expectedBlocks.get(id), mergedBlocks.get(id)) + ) + + const expectedEdges = new Map(target.edges.map((edge) => [edge.id, edge])) + const mergedEdges = new Map(merged.edges.map((edge) => [edge.id, edge])) + const edgeMismatch = [...new Set([...expectedEdges.keys(), ...mergedEdges.keys()])].find( + (id) => !isEqual(expectedEdges.get(id), mergedEdges.get(id)) + ) + + if (blockMismatch !== undefined || edgeMismatch !== undefined) { + throw new OrchestrationError( + 'internal', + blockMismatch !== undefined + ? `Protected-block merge would change block ${blockMismatch}; the source gate let through a change it must refuse` + : `Protected-block merge would change edge ${edgeMismatch}; the source gate let through a change it must refuse` + ) + } +} From c1212ccfcb835edae15ae6e727206efc3b8120f0 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 18:58:03 -0800 Subject: [PATCH 010/428] feat(workflows): gate source diffs with the editing engine's per-user checks gateSourceDiff runs the engine's own gates over added and changed blocks: block type allowlist and deployment visibility, the sunset placement refusal (now exported), model/operation and tool allowlists, credential reachability and hosted keys through preValidateCredentialInputs fed synthetic edit inputs, the sandbox plan, trigger uniqueness, disabled ancestors and the copilot tool-binding contract. Skip reasons map to E_APPLY_* codes. A differential test runs each refusing engine fixture through both the engine and the gates and requires identical refusals. --- apps/sim/lib/workflows/editing/operations.ts | 2 +- apps/sim/lib/workflows/source/gates.test.ts | 842 +++++++++++++++++++ apps/sim/lib/workflows/source/gates.ts | 418 +++++++++ 3 files changed, 1261 insertions(+), 1 deletion(-) create mode 100644 apps/sim/lib/workflows/source/gates.test.ts create mode 100644 apps/sim/lib/workflows/source/gates.ts diff --git a/apps/sim/lib/workflows/editing/operations.ts b/apps/sim/lib/workflows/editing/operations.ts index 9af72759aa3..50959e154f6 100644 --- a/apps/sim/lib/workflows/editing/operations.ts +++ b/apps/sim/lib/workflows/editing/operations.ts @@ -37,7 +37,7 @@ const logger = createLogger('EditWorkflowServerTool') * * @returns whether the placement was refused */ -function refuseSunsetPlacement( +export function refuseSunsetPlacement( skippedItems: SkippedItem[], placement: { blockType: string | undefined diff --git a/apps/sim/lib/workflows/source/gates.test.ts b/apps/sim/lib/workflows/source/gates.test.ts new file mode 100644 index 00000000000..7012e045415 --- /dev/null +++ b/apps/sim/lib/workflows/source/gates.test.ts @@ -0,0 +1,842 @@ +/** + * Differential parity between the editing engine and the source apply gates. + * + * Each case states one change twice: as the edit operations the engine is sent today, and as the + * base → target graph pair source apply sees. The engine's refusals (skipped items, dropped + * inputs, enablement refusals, the sandbox plan check) and the source gates' diagnostics are both + * reduced to `category:blockId` and must be equal. The refusing fixtures mirror + * `editing/operations.test.ts`, `application/apply-workflow-operations.test.ts` and + * `editing/validation.test.ts`; the locked and trigger cases cover engine rules those files + * reach only through mocks. + */ +import { resetEnvFlagsMock, setEnvFlags } from '@sim/testing' +import { + billingSubscriptionMock, + billingSubscriptionMockFns, +} from '@sim/testing/mocks/billing-subscription.mock' +import { integrationsAvailabilityMock } from '@sim/testing/mocks/integrations-availability.mock' +import type { BlockState } from '@sim/workflow-types/workflow' +import type { Mock } from 'vitest' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' +import { + DEFAULT_PERMISSION_GROUP_CONFIG, + type PermissionGroupConfig, +} from '@/lib/permission-groups/fields' +import { decideBlockEnablement } from '@/lib/workflows/editing/block-enablement' +import { applyOperationsToWorkflowState } from '@/lib/workflows/editing/engine' +import { operationsReferenceSimSandbox } from '@/lib/workflows/editing/sandbox-projection' +import type { EditWorkflowOperation } from '@/lib/workflows/editing/types' +import { isDeferredSkippedItem } from '@/lib/workflows/editing/types' +import { preValidateCredentialInputs } from '@/lib/workflows/editing/validation' +import { gateSourceDiff, SKIP_TYPE_APPLY_CODES } from '@/lib/workflows/source/gates' +import type { SourceGraph } from '@/lib/workflows/source/graph-diff' +import { findProtectedBlockRefusals } from '@/lib/workflows/source/protected' +import { getAllBlocks, getBlock } from '@/blocks/registry' +import * as providerModels from '@/providers/models' + +vi.mock('@/lib/integrations/availability.server', () => integrationsAvailabilityMock) +vi.mock('@/lib/billing/core/subscription', () => billingSubscriptionMock) +const { mockValidateSelectorIds } = vi.hoisted(() => ({ mockValidateSelectorIds: vi.fn() })) +vi.mock('@/lib/workflows/editing/selector-validator', () => ({ + validateSelectorIds: mockValidateSelectorIds, +})) + +const MOCK_REGISTRY_BLOCKS: Record = { + agent: { + type: 'agent', + name: 'Agent', + subBlocks: [ + { id: 'systemPrompt', type: 'long-input' }, + { id: 'model', type: 'combobox' }, + { id: 'apiKey', type: 'short-input' }, + { id: 'tools', type: 'tool-input' }, + ], + }, + mothership: { + type: 'mothership', + name: 'Sim Chat', + subBlocks: [{ id: 'tools', type: 'tool-input' }], + }, + function: { + type: 'function', + name: 'Function', + subBlocks: [ + { id: 'code', type: 'code' }, + { id: 'sandboxId', type: 'short-input' }, + ], + }, + slack: { + type: 'slack', + name: 'Slack', + tools: { + access: ['slack_message', 'slack_canvas'], + config: { + tool: ({ operation }: { operation?: string }) => + operation === 'canvas' ? 'slack_canvas' : 'slack_message', + }, + }, + subBlocks: [ + { + id: 'operation', + type: 'dropdown', + options: [ + { label: 'Send Message', id: 'send' }, + { label: 'Create Canvas', id: 'canvas' }, + ], + }, + { id: 'channel', type: 'short-input' }, + { id: 'triggerConfig', type: 'trigger-config' }, + ], + }, + jira: { + type: 'jira', + name: 'Jira', + tools: { access: ['jira_get_issue'] }, + subBlocks: [{ id: 'credential', type: 'oauth-input' }], + }, + table: { + type: 'table', + name: 'Table (Legacy)', + sunset: { status: 'legacy', replacedBy: 'table_v2' }, + subBlocks: [{ id: 'tableId', type: 'short-input' }], + }, + table_v2: { + type: 'table_v2', + name: 'Table', + subBlocks: [{ id: 'tableId', type: 'short-input' }], + }, + api_trigger: { type: 'api_trigger', name: 'API', subBlocks: [] }, + start_trigger: { type: 'start_trigger', name: 'Start', subBlocks: [] }, + starter: { type: 'starter', name: 'Starter', subBlocks: [] }, + response: { type: 'response', name: 'Response', singleInstance: true, subBlocks: [] }, +} +;(getAllBlocks as Mock).mockImplementation(() => Object.values(MOCK_REGISTRY_BLOCKS)) +;(getBlock as Mock).mockImplementation((type: string) => MOCK_REGISTRY_BLOCKS[type]) + +const CTX = { userId: 'user-1', workspaceId: 'workspace-1' } + +const ID = { + a: '11111111-1111-4111-8111-111111111111', + b: '22222222-2222-4222-8222-222222222222', + c: '33333333-3333-4333-8333-333333333333', + d: '44444444-4444-4444-8444-444444444444', + loop: '55555555-5555-4555-8555-555555555555', +} + +interface BlockOptions { + sub?: Record + parentId?: string + locked?: boolean + enabled?: boolean +} + +function block(id: string, type: string, name: string, options: BlockOptions = {}): BlockState { + const config = MOCK_REGISTRY_BLOCKS[type] as { subBlocks?: { id: string; type: string }[] } + const subBlocks: BlockState['subBlocks'] = {} + for (const [key, value] of Object.entries(options.sub ?? {})) { + const type = config?.subBlocks?.find((sb) => sb.id === key)?.type ?? 'short-input' + subBlocks[key] = { id: key, type, value } as BlockState['subBlocks'][string] + } + return { + id, + type, + name, + position: { x: 0, y: 0 }, + subBlocks, + outputs: {}, + enabled: options.enabled ?? true, + ...(options.locked ? { locked: true } : {}), + data: options.parentId ? { parentId: options.parentId, extent: 'parent' } : {}, + } +} + +function graph(...blocks: BlockState[]): SourceGraph { + return { blocks: Object.fromEntries(blocks.map((b) => [b.id, b])), edges: [] } +} + +/** Replaces or adds blocks by id; `null` removes one. */ +function edit(base: SourceGraph, changes: Record): SourceGraph { + const blocks = { ...structuredClone(base.blocks) } + for (const [id, next] of Object.entries(changes)) { + if (next) blocks[id] = next + else delete blocks[id] + } + return { blocks, edges: structuredClone(base.edges) } +} + +interface ParityCase { + name: string + base: SourceGraph + /** What the engine is sent today. */ + operations?: EditWorkflowOperation[] + enabledChanges?: { blockId: string; enabled: boolean }[] + /** The same change as source apply sees it. */ + target: SourceGraph + permissionConfig?: PermissionGroupConfig | null + isCopilot?: boolean + /** The refusals both sides must report; `[]` asserts both accept. */ + expected: string[] +} + +const ENABLEMENT_CATEGORY = { + not_found: 'block_not_found', + locked: 'block_locked', + disabled_ancestor: 'disabled_ancestor', +} as const + +function isCredentialField(blockType: string, field: string): boolean { + const config = MOCK_REGISTRY_BLOCKS[blockType] as { subBlocks: { id: string; type: string }[] } + return config?.subBlocks.some((sb) => sb.id === field && sb.type === 'oauth-input') ?? false +} + +function toolInputField(blockType: string, field: string): boolean { + const config = MOCK_REGISTRY_BLOCKS[blockType] as { subBlocks: { id: string; type: string }[] } + return config?.subBlocks.some((sb) => sb.id === field && sb.type === 'tool-input') ?? false +} + +async function engineRefusals(testCase: ParityCase): Promise { + const operations = testCase.operations ?? [] + const base = structuredClone(testCase.base) as unknown as Record + const refusals = new Set() + + if ( + operationsReferenceSimSandbox(operations) && + !(await billingSubscriptionMockFns.mockHasWorkspaceSandboxAccess(CTX.workspaceId)) + ) { + for (const op of operations) { + if (op.params?.inputs && 'sandboxId' in op.params.inputs) + refusals.add(`sandbox_plan:${op.block_id}`) + } + } + + const pre = await preValidateCredentialInputs(operations, CTX, base) + for (const error of pre.errors) { + refusals.add( + `${isCredentialField(error.blockType, error.field) ? 'credential' : 'hosted_key'}:${error.blockId}` + ) + } + const result = applyOperationsToWorkflowState( + base, + pre.filteredOperations, + testCase.permissionConfig ?? null, + testCase.isCopilot ?? false + ) + for (const item of result.skippedItems) { + if (!isDeferredSkippedItem(item)) refusals.add(`${item.type}:${item.blockId}`) + } + for (const error of result.validationErrors) { + if (testCase.isCopilot && toolInputField(error.blockType, error.field)) { + refusals.add(`invalid_subblock_field:${error.blockId}`) + } + } + for (const change of testCase.enabledChanges ?? []) { + const decision = decideBlockEnablement(result.state.blocks, change.blockId, change.enabled) + if (decision.outcome === 'refused') { + refusals.add(`${ENABLEMENT_CATEGORY[decision.refusal.reason]}:${change.blockId}`) + } + } + return [...refusals].sort() +} + +const APPLY_CODE_CATEGORY: Record = { + ...Object.fromEntries(Object.entries(SKIP_TYPE_APPLY_CODES).map(([skip, code]) => [code, skip])), + E_APPLY_PROTECTED_BLOCK: 'block_locked', + E_APPLY_CREDENTIAL_UNREACHABLE: 'credential', + W_APPLY_HOSTED_KEY_DROPPED: 'hosted_key', + E_APPLY_SANDBOX_PLAN_REQUIRED: 'sandbox_plan', +} + +async function sourceRefusals(testCase: ParityCase): Promise { + const diagnostics = [ + ...findProtectedBlockRefusals(testCase.base, testCase.target), + ...(await gateSourceDiff({ + base: testCase.base, + target: testCase.target, + permissionConfig: testCase.permissionConfig ?? null, + subjectUserId: CTX.userId, + workspaceId: CTX.workspaceId, + isCopilot: testCase.isCopilot ?? false, + })), + ] + const refusals = new Set() + for (const diagnostic of diagnostics) { + if (diagnostic.code === 'W_APPLY_TYPE_CHANGED') continue + const category = APPLY_CODE_CATEGORY[diagnostic.code] + expect(category, `unmapped code ${diagnostic.code}`).toBeDefined() + refusals.add(`${category}:${diagnostic.blockId}`) + } + return [...refusals].sort() +} + +const denyCanvas = { ...DEFAULT_PERMISSION_GROUP_CONFIG, deniedTools: ['slack_canvas'] } + +const lockedLoopBase = graph( + block(ID.loop, 'loop', 'Each', { locked: true }), + block(ID.a, 'agent', 'Inner', { parentId: ID.loop, sub: { systemPrompt: 'old' } }), + block(ID.b, 'agent', 'Outside', { sub: { systemPrompt: 'old' } }) +) + +const CASES: ParityCase[] = [ + // editing/operations.test.ts › sunset block types + { + name: 'sunset: refuses a new legacy child merged into a container, keeps the placed one editable', + base: graph( + block(ID.loop, 'loop', 'Each'), + block(ID.a, 'table', 'Rows', { parentId: ID.loop, sub: { tableId: 'tbl_old' } }) + ), + operations: [ + { + operation_type: 'edit', + block_id: ID.loop, + params: { + nestedNodes: { + [ID.a]: { type: 'table', name: 'Rows', inputs: { tableId: 'tbl_new' } }, + [ID.b]: { type: 'table', name: 'Fresh rows' }, + }, + }, + }, + ], + target: graph( + block(ID.loop, 'loop', 'Each'), + block(ID.a, 'table', 'Rows', { parentId: ID.loop, sub: { tableId: 'tbl_new' } }), + block(ID.b, 'table', 'Fresh rows', { parentId: ID.loop }) + ), + expected: [`block_not_allowed:${ID.b}`], + }, + { + name: 'sunset: refuses a new legacy block top-level, nested and inserted', + base: graph(), + operations: [ + { operation_type: 'add', block_id: ID.a, params: { type: 'table', name: 'Rows' } }, + { + operation_type: 'add', + block_id: ID.loop, + params: { + type: 'loop', + name: 'Each', + nestedNodes: { [ID.b]: { type: 'table', name: 'Nested rows' } }, + }, + }, + { + operation_type: 'insert_into_subflow', + block_id: ID.c, + params: { type: 'table', name: 'Inserted rows', subflowId: ID.loop }, + }, + ], + target: graph( + block(ID.a, 'table', 'Rows'), + block(ID.loop, 'loop', 'Each'), + block(ID.b, 'table', 'Nested rows', { parentId: ID.loop }), + block(ID.c, 'table', 'Inserted rows', { parentId: ID.loop }) + ), + expected: [ + `block_not_allowed:${ID.a}`, + `block_not_allowed:${ID.b}`, + `block_not_allowed:${ID.c}`, + ], + }, + { + name: 'sunset: keeps a legacy block editable but refuses switching another block to it', + base: graph( + block(ID.a, 'table', 'Rows', { sub: { tableId: 'tbl_old' } }), + block(ID.b, 'table_v2', 'V2', { sub: { tableId: 'tbl_old' } }) + ), + operations: [ + { operation_type: 'edit', block_id: ID.a, params: { inputs: { tableId: 'tbl_new' } } }, + { operation_type: 'edit', block_id: ID.b, params: { type: 'table' } }, + ], + target: graph( + block(ID.a, 'table', 'Rows', { sub: { tableId: 'tbl_new' } }), + block(ID.b, 'table', 'V2', { sub: { tableId: 'tbl_old' } }) + ), + expected: [`block_not_allowed:${ID.b}`], + }, + // editing/operations.test.ts › permission-group tool access + { + name: 'tools: refuses an added block whose operation the group denies', + base: graph(), + operations: [ + { + operation_type: 'add', + block_id: ID.a, + params: { type: 'slack', name: 'Slack 1', inputs: { operation: 'canvas', channel: '#g' } }, + }, + ], + target: graph(block(ID.a, 'slack', 'Slack 1', { sub: { operation: 'canvas', channel: '#g' } })), + permissionConfig: denyCanvas, + expected: [`tool_not_allowed:${ID.a}`], + }, + { + name: 'tools: refuses an edit to a denied operation', + base: graph(block(ID.a, 'slack', 'Slack 1', { sub: { operation: 'send' } })), + operations: [ + { operation_type: 'edit', block_id: ID.a, params: { inputs: { operation: 'canvas' } } }, + ], + target: graph(block(ID.a, 'slack', 'Slack 1', { sub: { operation: 'canvas' } })), + permissionConfig: denyCanvas, + expected: [`tool_not_allowed:${ID.a}`], + }, + { + name: 'models: refuses a model the group denies', + base: graph(), + operations: [ + { + operation_type: 'add', + block_id: ID.a, + params: { type: 'agent', name: 'Agent 1', inputs: { model: 'gpt-4o', systemPrompt: 'hi' } }, + }, + ], + target: graph( + block(ID.a, 'agent', 'Agent 1', { sub: { model: 'gpt-4o', systemPrompt: 'hi' } }) + ), + permissionConfig: { ...DEFAULT_PERMISSION_GROUP_CONFIG, deniedModels: ['GPT-4o'] }, + expected: [`model_not_allowed:${ID.a}`], + }, + { + name: 'tools: gates the trigger-config fan-out onto a denied operation', + base: graph( + block(ID.a, 'slack', 'Slack 1', { + sub: { + operation: 'send', + channel: '#general', + triggerConfig: { operation: 'canvas', channel: '#random' }, + }, + }) + ), + operations: [ + { operation_type: 'edit', block_id: ID.a, params: { inputs: { triggerConfig: {} } } }, + ], + target: graph( + block(ID.a, 'slack', 'Slack 1', { + sub: { + operation: 'canvas', + channel: '#random', + triggerConfig: { operation: 'canvas', channel: '#random' }, + }, + }) + ), + permissionConfig: denyCanvas, + expected: [`tool_not_allowed:${ID.a}`], + }, + { + name: 'tools: refuses an agent tool entry whose operation the group denies', + base: graph(), + operations: [ + { + operation_type: 'add', + block_id: ID.a, + params: { + type: 'agent', + name: 'Agent 1', + inputs: { + tools: [ + { type: 'slack', operation: 'canvas', title: 'Create Canvas' }, + { type: 'slack', operation: 'send', title: 'Send Message' }, + ], + }, + }, + }, + ], + target: graph( + block(ID.a, 'agent', 'Agent 1', { + sub: { + tools: [ + { type: 'slack', operation: 'canvas', title: 'Create Canvas' }, + { type: 'slack', operation: 'send', title: 'Send Message' }, + ], + }, + }) + ), + permissionConfig: denyCanvas, + expected: [`tool_not_allowed:${ID.a}`], + }, + { + name: 'tools: a denied tool already stored is not refused when the edit leaves it alone', + base: graph( + block(ID.a, 'agent', 'Agent 1', { + sub: { tools: [{ type: 'slack', operation: 'canvas', title: 'Old' }] }, + }) + ), + operations: [ + { operation_type: 'edit', block_id: ID.a, params: { inputs: { systemPrompt: 'new' } } }, + ], + target: graph( + block(ID.a, 'agent', 'Agent 1', { + sub: { tools: [{ type: 'slack', operation: 'canvas', title: 'Old' }], systemPrompt: 'new' }, + }) + ), + permissionConfig: denyCanvas, + expected: [], + }, + // block-type gates + { + name: 'allowlist: refuses a block type outside the group integration allowlist', + base: graph(), + operations: [{ operation_type: 'add', block_id: ID.a, params: { type: 'slack', name: 'S' } }], + target: graph(block(ID.a, 'slack', 'S')), + permissionConfig: { ...DEFAULT_PERMISSION_GROUP_CONFIG, allowedIntegrations: ['agent'] }, + expected: [`block_not_allowed:${ID.a}`], + }, + { + name: 'registry: refuses an unknown block type', + base: graph(), + operations: [ + { operation_type: 'add', block_id: ID.a, params: { type: 'not_a_block', name: 'X' } }, + ], + target: graph(block(ID.a, 'not_a_block', 'X')), + expected: [`invalid_block_type:${ID.a}`], + }, + // trigger uniqueness + { + name: 'triggers: refuses a second API trigger', + base: graph(block(ID.a, 'api_trigger', 'API')), + operations: [ + { operation_type: 'add', block_id: ID.b, params: { type: 'api_trigger', name: 'API 2' } }, + ], + target: graph(block(ID.a, 'api_trigger', 'API'), block(ID.b, 'api_trigger', 'API 2')), + expected: [`duplicate_trigger:${ID.b}`], + }, + { + name: 'triggers: refuses a modern trigger beside a legacy starter', + base: graph(block(ID.a, 'starter', 'Start')), + operations: [ + { operation_type: 'add', block_id: ID.b, params: { type: 'start_trigger', name: 'Go' } }, + ], + target: graph(block(ID.a, 'starter', 'Start'), block(ID.b, 'start_trigger', 'Go')), + expected: [`duplicate_trigger:${ID.b}`], + }, + { + name: 'triggers: refuses a second single-instance block', + base: graph(block(ID.a, 'response', 'Response')), + operations: [ + { operation_type: 'add', block_id: ID.b, params: { type: 'response', name: 'Response 2' } }, + ], + target: graph(block(ID.a, 'response', 'Response'), block(ID.b, 'response', 'Response 2')), + expected: [`duplicate_single_instance_block:${ID.b}`], + }, + // locked blocks (engine operations.ts:397-473, 960-1180; block-enablement.ts) + { + name: 'locked: refuses an input edit on a locked block', + base: graph(block(ID.a, 'agent', 'A', { locked: true, sub: { systemPrompt: 'old' } })), + operations: [ + { operation_type: 'edit', block_id: ID.a, params: { inputs: { systemPrompt: 'new' } } }, + ], + target: graph(block(ID.a, 'agent', 'A', { locked: true, sub: { systemPrompt: 'new' } })), + expected: [`block_locked:${ID.a}`], + }, + { + name: 'locked: refuses renaming a locked block', + base: graph(block(ID.a, 'agent', 'A', { locked: true })), + operations: [{ operation_type: 'edit', block_id: ID.a, params: { name: 'Renamed' } }], + target: graph(block(ID.a, 'agent', 'Renamed', { locked: true })), + expected: [`block_locked:${ID.a}`], + }, + { + name: 'locked: refuses deleting a locked block', + base: graph(block(ID.a, 'agent', 'A', { locked: true }), block(ID.b, 'agent', 'B')), + operations: [{ operation_type: 'delete', block_id: ID.a }], + target: graph(block(ID.b, 'agent', 'B')), + expected: [`block_locked:${ID.a}`], + }, + { + name: 'locked: refuses an edit to a child of a locked container', + base: lockedLoopBase, + operations: [ + { operation_type: 'edit', block_id: ID.a, params: { inputs: { systemPrompt: 'new' } } }, + ], + target: edit(lockedLoopBase, { + [ID.a]: block(ID.a, 'agent', 'Inner', { parentId: ID.loop, sub: { systemPrompt: 'new' } }), + }), + expected: [`block_locked:${ID.a}`], + }, + { + name: 'locked: refuses inserting a new block into a locked container', + base: lockedLoopBase, + operations: [ + { + operation_type: 'insert_into_subflow', + block_id: ID.c, + params: { type: 'agent', name: 'New', subflowId: ID.loop }, + }, + ], + target: edit(lockedLoopBase, { [ID.c]: block(ID.c, 'agent', 'New', { parentId: ID.loop }) }), + expected: [`block_locked:${ID.c}`], + }, + { + name: 'locked: refuses moving an existing block into a locked container', + base: lockedLoopBase, + operations: [ + { + operation_type: 'insert_into_subflow', + block_id: ID.b, + params: { type: 'agent', name: 'Outside', subflowId: ID.loop }, + }, + ], + target: edit(lockedLoopBase, { + [ID.b]: block(ID.b, 'agent', 'Outside', { parentId: ID.loop, sub: { systemPrompt: 'old' } }), + }), + expected: [`block_locked:${ID.b}`], + }, + { + name: 'locked: refuses extracting a child from a locked container', + base: lockedLoopBase, + operations: [ + { operation_type: 'extract_from_subflow', block_id: ID.a, params: { subflowId: ID.loop } }, + ], + target: edit(lockedLoopBase, { + [ID.a]: block(ID.a, 'agent', 'Inner', { sub: { systemPrompt: 'old' } }), + }), + expected: [`block_locked:${ID.a}`], + }, + { + name: 'locked: refuses toggling a locked block', + base: graph(block(ID.a, 'agent', 'A', { locked: true })), + enabledChanges: [{ blockId: ID.a, enabled: false }], + target: graph(block(ID.a, 'agent', 'A', { locked: true, enabled: false })), + expected: [`block_locked:${ID.a}`], + }, + { + name: 'locked: a locked child goes with its deleted unlocked container', + base: graph( + block(ID.loop, 'loop', 'Each'), + block(ID.a, 'agent', 'Inner', { parentId: ID.loop, locked: true }) + ), + operations: [{ operation_type: 'delete', block_id: ID.loop }], + target: graph(), + expected: [], + }, + // application/apply-workflow-operations.test.ts › enablement + { + name: 'enablement: refuses enabling a block under a disabled container', + base: graph( + block(ID.loop, 'loop', 'Each', { enabled: false }), + block(ID.a, 'agent', 'Inner', { parentId: ID.loop, enabled: false }) + ), + enabledChanges: [{ blockId: ID.a, enabled: true }], + target: graph( + block(ID.loop, 'loop', 'Each', { enabled: false }), + block(ID.a, 'agent', 'Inner', { parentId: ID.loop, enabled: true }) + ), + expected: [`disabled_ancestor:${ID.a}`], + }, + // editing/operations.test.ts › Mothership tool attachment writes (copilot authoring contract) + { + name: 'copilot: refuses an alias on a new tool binding', + base: graph(), + operations: [ + { + operation_type: 'add', + block_id: ID.a, + params: { + type: 'agent', + name: 'Agent', + inputs: { tools: [{ type: 'slack', operation: 'send', title: 'Approved sender' }] }, + }, + }, + ], + target: graph( + block(ID.a, 'agent', 'Agent', { + sub: { tools: [{ type: 'slack', operation: 'send', title: 'Approved sender' }] }, + }) + ), + isCopilot: true, + expected: [`invalid_subblock_field:${ID.a}`], + }, + { + name: 'copilot: refuses renaming a saved tool binding', + base: graph( + block(ID.a, 'agent', 'Agent', { + sub: { tools: [{ type: 'slack', operation: 'send', title: 'Approved sender' }] }, + }) + ), + operations: [ + { + operation_type: 'edit', + block_id: ID.a, + params: { + inputs: { tools: [{ type: 'slack', operation: 'send', title: 'Another name' }] }, + }, + }, + ], + target: graph( + block(ID.a, 'agent', 'Agent', { + sub: { tools: [{ type: 'slack', operation: 'send', title: 'Another name' }] }, + }) + ), + isCopilot: true, + expected: [`invalid_subblock_field:${ID.a}`], + }, + { + name: 'copilot: refuses an integration selection Sim Chat would ignore', + base: graph(), + operations: [ + { + operation_type: 'add', + block_id: ID.a, + params: { + type: 'mothership', + name: 'Sim Chat', + inputs: { tools: [{ type: 'slack', operation: 'send' }] }, + }, + }, + ], + target: graph( + block(ID.a, 'mothership', 'Sim Chat', { + sub: { tools: [{ type: 'slack', operation: 'send' }] }, + }) + ), + isCopilot: true, + expected: [`invalid_subblock_field:${ID.a}`], + }, + // credentials (editing/validation.ts preValidateCredentialInputs) + { + name: 'credentials: refuses a credential the user cannot reach, on add and on edit', + base: graph(block(ID.b, 'jira', 'Jira old', { sub: { credential: 'good-cred' } })), + operations: [ + { + operation_type: 'add', + block_id: ID.a, + params: { type: 'jira', name: 'Jira', inputs: { credential: 'bad-cred' } }, + }, + { operation_type: 'edit', block_id: ID.b, params: { inputs: { credential: 'bad-cred' } } }, + ], + target: graph( + block(ID.a, 'jira', 'Jira', { sub: { credential: 'bad-cred' } }), + block(ID.b, 'jira', 'Jira old', { sub: { credential: 'bad-cred' } }) + ), + expected: [`credential:${ID.a}`, `credential:${ID.b}`], + }, + { + name: 'credentials: a stored unreachable credential the edit leaves alone is not refused', + base: graph(block(ID.b, 'jira', 'Jira', { sub: { credential: 'bad-cred' } })), + operations: [{ operation_type: 'edit', block_id: ID.b, params: { name: 'Jira 2' } }], + target: graph(block(ID.b, 'jira', 'Jira 2', { sub: { credential: 'bad-cred' } })), + expected: [], + }, + // sandbox plan (application/apply-workflow-operations.ts) + { + name: 'sandbox: refuses selecting a sandbox without the plan', + base: graph(block(ID.a, 'function', 'Fn', { sub: { code: 'return 1' } })), + operations: [ + { operation_type: 'edit', block_id: ID.a, params: { inputs: { sandboxId: 'sbx_1' } } }, + ], + target: graph(block(ID.a, 'function', 'Fn', { sub: { code: 'return 1', sandboxId: 'sbx_1' } })), + expected: [`sandbox_plan:${ID.a}`], + }, +] + +describe('source gates agree with the editing engine', () => { + beforeEach(() => { + mockValidateSelectorIds.mockImplementation(async (_type: string, ids: string | string[]) => { + const list = Array.isArray(ids) ? ids : [ids] + return { + valid: list.filter((id) => id !== 'bad-cred'), + invalid: list.filter((id) => id === 'bad-cred'), + } + }) + billingSubscriptionMockFns.mockHasWorkspaceSandboxAccess.mockResolvedValue(false) + }) + + it.each(CASES)('$name', async (testCase) => { + const [engine, source] = await Promise.all([engineRefusals(testCase), sourceRefusals(testCase)]) + expect(engine).toEqual([...testCase.expected].sort()) + expect(source).toEqual(engine) + }) + + describe('on hosted Sim', () => { + beforeEach(() => { + vi.spyOn(providerModels, 'getHostedModels').mockReturnValue(['claude-sonnet-4-6']) + setEnvFlags({ isHosted: true }) + }) + afterEach(() => { + resetEnvFlagsMock() + }) + + it('reports a user API key set on a hosted model', async () => { + const testCase: ParityCase = { + name: 'hosted key', + base: graph(), + operations: [ + { + operation_type: 'add', + block_id: ID.a, + params: { + type: 'agent', + name: 'Agent', + inputs: { model: 'claude-sonnet-4-6', apiKey: 'user-key' }, + }, + }, + ], + target: graph( + block(ID.a, 'agent', 'Agent', { sub: { model: 'claude-sonnet-4-6', apiKey: 'user-key' } }) + ), + expected: [`hosted_key:${ID.a}`], + } + const [engine, source] = await Promise.all([ + engineRefusals(testCase), + sourceRefusals(testCase), + ]) + expect(engine).toEqual(testCase.expected) + expect(source).toEqual(engine) + }) + }) +}) + +describe('gateSourceDiff', () => { + it('lets a sandbox selection through when the workspace has the plan', async () => { + billingSubscriptionMockFns.mockHasWorkspaceSandboxAccess.mockResolvedValue(true) + const base = graph(block(ID.a, 'function', 'Fn')) + const target = graph(block(ID.a, 'function', 'Fn', { sub: { sandboxId: 'sbx_1' } })) + const diagnostics = await gateSourceDiff({ + base, + target, + permissionConfig: null, + subjectUserId: CTX.userId, + workspaceId: CTX.workspaceId, + isCopilot: false, + }) + expect(diagnostics).toEqual([]) + }) + + it('warns, without refusing, when an allowed block changes type', async () => { + const base = graph(block(ID.a, 'table_v2', 'Rows')) + const target = graph(block(ID.a, 'agent', 'Rows')) + const diagnostics = await gateSourceDiff({ + base, + target, + permissionConfig: null, + subjectUserId: CTX.userId, + workspaceId: CTX.workspaceId, + isCopilot: false, + }) + expect(diagnostics.map((d) => d.code)).toEqual(['W_APPLY_TYPE_CHANGED']) + }) + + it('refuses retyping a block into a duplicate trigger, which the engine never checks', async () => { + const base = graph(block(ID.a, 'api_trigger', 'API'), block(ID.b, 'agent', 'Agent')) + const target = graph(block(ID.a, 'api_trigger', 'API'), block(ID.b, 'api_trigger', 'Agent')) + const diagnostics = await gateSourceDiff({ + base, + target, + permissionConfig: null, + subjectUserId: CTX.userId, + workspaceId: CTX.workspaceId, + isCopilot: false, + }) + expect(diagnostics.map((d) => d.code)).toContain('E_APPLY_DUPLICATE_TRIGGER') + }) + + it('accepts replacing a trigger in one apply', async () => { + const base = graph(block(ID.a, 'api_trigger', 'API')) + const target = graph(block(ID.b, 'api_trigger', 'API')) + const diagnostics = await gateSourceDiff({ + base, + target, + permissionConfig: null, + subjectUserId: CTX.userId, + workspaceId: CTX.workspaceId, + isCopilot: false, + }) + expect(diagnostics).toEqual([]) + }) +}) diff --git a/apps/sim/lib/workflows/source/gates.ts b/apps/sim/lib/workflows/source/gates.ts new file mode 100644 index 00000000000..8e38760a3f1 --- /dev/null +++ b/apps/sim/lib/workflows/source/gates.ts @@ -0,0 +1,418 @@ +import { compareStrings } from '@sim/utils/string' +import type { ApplyDiagnosticCode, Diagnostic } from '@sim/workflow-code' +import { type BlockState, normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' +import { isEqual } from 'es-toolkit' +import { hasWorkspaceSandboxAccess } from '@/lib/billing/core/subscription' +import { MAX_PLAN_REQUIRED } from '@/lib/execution/remote-sandbox/entitlement' +import type { PermissionGroupConfig } from '@/lib/permission-groups/fields' +import { hasDisabledAncestor } from '@/lib/workflows/editing/block-enablement' +import { + createSubBlockInputGate, + filterDisallowedTools, + normalizeTools, +} from '@/lib/workflows/editing/builders' +import { refuseSunsetPlacement } from '@/lib/workflows/editing/operations' +import type { + EditWorkflowOperation, + SkippedItem, + SkippedItemType, + ValidationError, +} from '@/lib/workflows/editing/types' +import { isBlockTypeAllowed, preValidateCredentialInputs } from '@/lib/workflows/editing/validation' +import { diffGraphs, type GraphDiff, type SourceGraph } from '@/lib/workflows/source/graph-diff' +import { isNonEmptyValue } from '@/lib/workflows/subblocks/visibility' +import { validateToolBindingAuthoring } from '@/lib/workflows/tool-input/authoring' +import { TriggerUtils } from '@/lib/workflows/triggers/triggers' +import { getBlock } from '@/blocks/registry' + +/** + * The editing engine's per-user gates, applied to a whole-graph diff instead of to edit + * operations (s4 D1). The engine skips a refused item and applies the rest; source apply is + * atomic (s4 D5), so every refusal here is an error diagnostic and nothing is written. + * + * Gates run on added and changed blocks only, as the engine runs them on the blocks an operation + * names: a stored block the caller left alone is never refused for a policy that changed after + * it was placed. Call inside `withBlockVisibility`, as `applyOperationsToWorkflowState` is, so + * the deployment-visibility checks see the acting user's overlay. + */ + +/** Skip reasons a graph diff can produce. A deferred forward reference cannot exist in source. */ +type GatedSkipType = Exclude + +/** + * The engine's skip vocabulary as apply codes (DESIGN.md decision 14). Total, so a new skip + * reason fails to compile until it has a code. + */ +export const SKIP_TYPE_APPLY_CODES = { + block_not_found: 'E_APPLY_BLOCK_NOT_FOUND', + invalid_block_type: 'E_APPLY_INVALID_BLOCK_TYPE', + block_not_allowed: 'E_APPLY_BLOCK_NOT_ALLOWED', + model_not_allowed: 'E_APPLY_MODEL_NOT_ALLOWED', + block_locked: 'E_APPLY_BLOCK_LOCKED', + tool_not_allowed: 'E_APPLY_TOOL_NOT_ALLOWED', + invalid_edge_source: 'E_APPLY_INVALID_EDGE_SOURCE', + invalid_edge_scope: 'E_APPLY_INVALID_EDGE_SCOPE', + invalid_source_handle: 'E_APPLY_INVALID_SOURCE_HANDLE', + invalid_target_handle: 'E_APPLY_INVALID_TARGET_HANDLE', + invalid_subblock_field: 'E_APPLY_INVALID_SUBBLOCK_FIELD', + missing_required_params: 'E_APPLY_MISSING_REQUIRED_PARAMS', + invalid_subflow_parent: 'E_APPLY_INVALID_SUBFLOW_PARENT', + nested_subflow_not_allowed: 'E_APPLY_NESTED_SUBFLOW_NOT_ALLOWED', + duplicate_block_name: 'E_APPLY_DUPLICATE_BLOCK_NAME', + reserved_block_name: 'E_APPLY_RESERVED_BLOCK_NAME', + retry_not_supported: 'E_APPLY_RETRY_NOT_SUPPORTED', + duplicate_trigger: 'E_APPLY_DUPLICATE_TRIGGER', + duplicate_single_instance_block: 'E_APPLY_DUPLICATE_SINGLE_INSTANCE_BLOCK', + disabled_ancestor: 'E_APPLY_DISABLED_ANCESTOR', +} as const satisfies Record + +type GateErrorCode = + | (typeof SKIP_TYPE_APPLY_CODES)[GatedSkipType] + | 'E_APPLY_CREDENTIAL_UNREACHABLE' + | 'E_APPLY_SANDBOX_PLAN_REQUIRED' + +export type SourceGateDiagnostic = Diagnostic< + GateErrorCode | 'W_APPLY_HOSTED_KEY_DROPPED' | 'W_APPLY_TYPE_CHANGED' +> + +export interface GateSourceDiffArgs { + base: SourceGraph + target: SourceGraph + /** Defaults to `diffGraphs(base, target)`. */ + diff?: GraphDiff + permissionConfig: PermissionGroupConfig | null + /** The governed human subject: credential reachability is checked as this user. */ + subjectUserId: string + workspaceId: string + /** Copilot writes are held to the internal tool-binding authoring contract. */ + isCopilot: boolean +} + +const CONTAINER_TYPES: ReadonlySet = new Set(['loop', 'parallel']) +const TOOLS_SUBBLOCK_ID = 'tools' +const SANDBOX_SUBBLOCK_ID = 'sandboxId' + +interface GatedBlock { + block: BlockState + /** Subblock ids whose value the diff sets: every non-empty one for an added block. */ + changedFields: string[] + baseBlock?: BlockState + added: boolean + typeChanged: boolean + enabledChanged: boolean +} + +function blockKeyOf(block: BlockState): string { + return normalizeWorkflowBlockName(block.name ?? '') +} + +function subBlockValue(block: BlockState | undefined, field: string): unknown { + return block?.subBlocks?.[field]?.value +} + +function collectGatedBlocks(base: SourceGraph, target: SourceGraph, diff: GraphDiff): GatedBlock[] { + const gated: GatedBlock[] = [] + for (const id of diff.added) { + const block = target.blocks[id] + gated.push({ + block, + changedFields: Object.keys(block.subBlocks ?? {}) + .filter((field) => isNonEmptyValue(subBlockValue(block, field))) + .sort(compareStrings), + added: true, + typeChanged: false, + enabledChanged: false, + }) + } + for (const change of diff.modified) { + const block = target.blocks[change.id] + const baseBlock = base.blocks[change.id] + gated.push({ + block, + baseBlock, + changedFields: change.subBlocks.filter( + (field) => !isEqual(subBlockValue(baseBlock, field), subBlockValue(block, field)) + ), + added: false, + typeChanged: change.typeChanged, + enabledChanged: change.enabledChanged, + }) + } + return gated +} + +/** + * The block-type gates the engine runs on `add`, `insert_into_subflow` and an `edit` that + * changes `type`: registry membership, deployment visibility plus the integration allowlist, and + * the sunset refusal. Returns whether the placement passed. + */ +function gateBlockPlacement( + entry: GatedBlock, + permissionConfig: PermissionGroupConfig | null, + skipped: SkippedItem[] +): boolean { + const { block } = entry + const operationType = entry.added ? 'add' : 'edit' + if (CONTAINER_TYPES.has(block.type)) return true + if (!getBlock(block.type)) { + skipped.push({ + type: 'invalid_block_type', + operationType, + blockId: block.id, + reason: `Invalid block type "${block.type}"`, + details: { requestedType: block.type }, + }) + return false + } + if (!isBlockTypeAllowed(block.type, permissionConfig)) { + skipped.push({ + type: 'block_not_allowed', + operationType, + blockId: block.id, + reason: `Block type "${block.type}" is unavailable in this deployment or blocked by access control`, + details: { requestedType: block.type }, + }) + return false + } + return !refuseSunsetPlacement(skipped, { + blockType: block.type, + operationType, + blockId: block.id, + outcome: entry.added ? 'block not added' : 'type change refused', + }) +} + +/** + * Trigger uniqueness against the target graph: a new (or retyped) block may not be a second + * single-instance trigger or block. The other blocks are the target's, so replacing a trigger in + * one apply (remove the old, add the new) passes. + */ +function gateTriggerUniqueness( + entry: GatedBlock, + target: SourceGraph, + skipped: SkippedItem[] +): void { + const { block } = entry + const operationType = entry.added ? 'add' : 'edit' + const others = Object.values(target.blocks).filter((other) => other.id !== block.id) + const triggerIssue = TriggerUtils.getTriggerAdditionIssue(others, block.type) + if (triggerIssue) { + skipped.push({ + type: 'duplicate_trigger', + operationType, + blockId: block.id, + reason: `Cannot add ${triggerIssue.triggerName} - a workflow can only have one`, + details: { requestedType: block.type, issue: triggerIssue.issue }, + }) + return + } + const singleInstanceIssue = TriggerUtils.getSingleInstanceBlockIssue(others, block.type) + if (singleInstanceIssue) { + skipped.push({ + type: 'duplicate_single_instance_block', + operationType, + blockId: block.id, + reason: `Cannot add ${singleInstanceIssue.blockName} - a workflow can only have one`, + details: { requestedType: block.type }, + }) + } +} + +/** The model/operation allowlist and the tool denylist, on the values the diff sets. */ +function gateFieldValues( + entry: GatedBlock, + permissionConfig: PermissionGroupConfig | null, + record: (skipped: SkippedItem[], param: string) => void +): void { + const { block, baseBlock } = entry + const operationType = entry.added ? 'add' : 'edit' + for (const field of entry.changedFields) { + const skipped: SkippedItem[] = [] + const isInputAllowed = createSubBlockInputGate({ + blockType: block.type, + permissionConfig, + blockId: block.id, + operationType, + skippedItems: skipped, + }) + const value = subBlockValue(block, field) + isInputAllowed(field, value) + if (field === TOOLS_SUBBLOCK_ID && Array.isArray(value)) { + const before = subBlockValue(baseBlock, field) + const previous = Array.isArray(before) ? before : [] + const newEntries = value.filter((tool) => !previous.some((old) => isEqual(old, tool))) + if (newEntries.length > 0) { + filterDisallowedTools(normalizeTools(newEntries), permissionConfig, block.id, skipped) + } + } + record(skipped, field) + } +} + +/** + * Credentials and hosted keys, through the engine's own pre-validation. Each gated block becomes + * one synthetic `add` or `edit` carrying only the values the diff sets, judged against the base + * graph, which is exactly the operation the engine would have been sent for the same change. + */ +async function gateCredentialInputs( + gated: GatedBlock[], + base: SourceGraph, + context: { userId: string; workspaceId: string } +): Promise { + const operations: EditWorkflowOperation[] = [] + for (const entry of gated) { + if (entry.changedFields.length === 0) continue + const inputs: Record = {} + for (const field of entry.changedFields) { + const value = subBlockValue(entry.block, field) + if (value !== undefined && value !== null) inputs[field] = value + } + operations.push({ + operation_type: entry.added ? 'add' : 'edit', + block_id: entry.block.id, + params: { + ...(entry.added || entry.typeChanged ? { type: entry.block.type } : {}), + inputs, + }, + }) + } + if (operations.length === 0) return [] + // double-cast-allowed: the pre-validator reads the graph as an open record, like the engine; `WorkflowState` has no index signature. + const snapshot = base as unknown as Record + const { errors } = await preValidateCredentialInputs(operations, context, snapshot) + return errors +} + +function isCredentialField(blockType: string, field: string): boolean { + return Boolean( + getBlock(blockType)?.subBlocks.some((sb) => sb.id === field && sb.type === 'oauth-input') + ) +} + +function sandboxChanged(entry: GatedBlock): boolean { + if (!entry.changedFields.includes(SANDBOX_SUBBLOCK_ID)) return false + return entry.added ? isNonEmptyValue(subBlockValue(entry.block, SANDBOX_SUBBLOCK_ID)) : true +} + +/** + * Runs the editing engine's per-user gates over the diff from `base` (the stored graph) to + * `target` (the materialized source) and returns one diagnostic per refusal. Error diagnostics + * refuse the whole apply; `W_APPLY_HOSTED_KEY_DROPPED` names a platform-managed key the use case + * must leave unset, and `W_APPLY_TYPE_CHANGED` a block that keeps its id under a new type. + * + * Protected blocks are refused separately, by `findProtectedBlockRefusals`. + */ +export async function gateSourceDiff(args: GateSourceDiffArgs): Promise { + const { base, target, permissionConfig, subjectUserId, workspaceId, isCopilot } = args + const diff = args.diff ?? diffGraphs(base, target) + const gated = collectGatedBlocks(base, target, diff) + const diagnostics: SourceGateDiagnostic[] = [] + + const record = (skipped: SkippedItem[], param?: string) => { + for (const item of skipped) { + if (item.type === 'invalid_edge_target') continue + const block = target.blocks[item.blockId] ?? base.blocks[item.blockId] + diagnostics.push({ + code: SKIP_TYPE_APPLY_CODES[item.type], + severity: 'error', + message: item.reason, + blockId: item.blockId, + ...(block ? { blockKey: blockKeyOf(block) } : {}), + ...(param ? { param } : {}), + }) + } + } + + for (const entry of gated) { + const { block } = entry + if (entry.added || entry.typeChanged) { + const skipped: SkippedItem[] = [] + const placed = gateBlockPlacement(entry, permissionConfig, skipped) + if (placed) gateTriggerUniqueness(entry, target, skipped) + record(skipped) + if (!placed) continue + } + if (entry.typeChanged) { + diagnostics.push({ + code: 'W_APPLY_TYPE_CHANGED', + severity: 'warning', + message: `Block "${block.name}" changes type from "${entry.baseBlock?.type}" to "${block.type}" and keeps its id`, + blockId: block.id, + blockKey: blockKeyOf(block), + }) + } + + gateFieldValues(entry, permissionConfig, record) + + if (isCopilot) { + const toolInputs = getBlock(block.type)?.subBlocks.filter((sb) => sb.type === 'tool-input') + for (const subBlock of toolInputs ?? []) { + if (!entry.changedFields.includes(subBlock.id)) continue + const error = validateToolBindingAuthoring( + block.type, + subBlockValue(block, subBlock.id), + subBlockValue(entry.baseBlock, subBlock.id) + ) + if (error) { + diagnostics.push({ + code: 'E_APPLY_INVALID_SUBBLOCK_FIELD', + severity: 'error', + message: error, + blockId: block.id, + blockKey: blockKeyOf(block), + param: subBlock.id, + }) + } + } + } + + if ( + entry.enabledChanged && + block.enabled !== false && + hasDisabledAncestor(block.id, target.blocks) + ) { + diagnostics.push({ + code: 'E_APPLY_DISABLED_ANCESTOR', + severity: 'error', + message: `Cannot enable block "${block.name}" while one of its parent containers is disabled. Enable the parent first.`, + blockId: block.id, + blockKey: blockKeyOf(block), + }) + } + } + + const credentialErrors = await gateCredentialInputs(gated, base, { + userId: subjectUserId, + workspaceId, + }) + for (const error of credentialErrors) { + const block = target.blocks[error.blockId] + const located = { + message: error.error, + blockId: error.blockId, + param: error.field, + ...(block ? { blockKey: blockKeyOf(block) } : {}), + } + diagnostics.push( + isCredentialField(error.blockType, error.field) + ? { code: 'E_APPLY_CREDENTIAL_UNREACHABLE', severity: 'error', ...located } + : { code: 'W_APPLY_HOSTED_KEY_DROPPED', severity: 'warning', ...located } + ) + } + + const sandboxBlocks = gated.filter(sandboxChanged) + if (sandboxBlocks.length > 0 && !(await hasWorkspaceSandboxAccess(workspaceId))) { + for (const { block } of sandboxBlocks) { + diagnostics.push({ + code: 'E_APPLY_SANDBOX_PLAN_REQUIRED', + severity: 'error', + message: MAX_PLAN_REQUIRED, + blockId: block.id, + blockKey: blockKeyOf(block), + param: SANDBOX_SUBBLOCK_ID, + }) + } + } + + return diagnostics +} From e11abc0b45cc21dafc3c0f8550666fe745ea38df Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:05:25 -0800 Subject: [PATCH 011/428] feat(workflow-sdk): add the authoring types and the throwing runtime entry core.d.ts declares the s2 authoring surface (refs, templates, resources, graph, workflow, containers and the special builders) and exports exactly SDK_CORE_EXPORTS; runtime.ts throws SimSdkNotExecutable from every export. --- bun.lock | 8 + knip.jsonc | 5 + packages/workflow-sdk/package.json | 25 +- packages/workflow-sdk/src/.gitkeep | 0 packages/workflow-sdk/src/core.d.ts | 625 ++++++++++++++++++++++ packages/workflow-sdk/src/runtime.test.ts | 34 ++ packages/workflow-sdk/src/runtime.ts | 70 +++ packages/workflow-sdk/tsconfig.json | 2 +- packages/workflow-sdk/vitest.config.ts | 11 + 9 files changed, 777 insertions(+), 3 deletions(-) delete mode 100644 packages/workflow-sdk/src/.gitkeep create mode 100644 packages/workflow-sdk/src/core.d.ts create mode 100644 packages/workflow-sdk/src/runtime.test.ts create mode 100644 packages/workflow-sdk/src/runtime.ts create mode 100644 packages/workflow-sdk/vitest.config.ts diff --git a/bun.lock b/bun.lock index f01b284baeb..5fa3cdd82ab 100644 --- a/bun.lock +++ b/bun.lock @@ -912,9 +912,17 @@ "packages/workflow-sdk": { "name": "@sim/workflow-sdk", "version": "0.1.0", + "dependencies": { + "@sim/utils": "workspace:*", + "@sim/workflow-code": "workspace:*", + "@sim/workflow-types": "workspace:*", + }, "devDependencies": { "@sim/tsconfig": "workspace:*", + "@types/node": "24.19.2", + "@xyflow/react": "12.12.1", "typescript": "^7.0.2", + "vitest": "^5.1.0", }, }, "packages/workflow-types": { diff --git a/knip.jsonc b/knip.jsonc index 0453df8a81c..25e32cfacc9 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -182,6 +182,11 @@ "includeEntryExports": false, "ignoreDependencies": ["@babel/parser"] }, + // The SDK's codegen is consumed by the catalog route and `sim types` in Wave 3. + "packages/workflow-sdk": { + "includeEntryExports": false, + "entry": ["src/runtime.ts", "src/codegen/index.ts", "scripts/*.ts"] + }, // This shared config is consumed by apps that own the Next dependency. "packages/tsconfig": { "ignoreUnresolved": ["next"] } } diff --git a/packages/workflow-sdk/package.json b/packages/workflow-sdk/package.json index e9fed72ff05..f72f22f6ed1 100644 --- a/packages/workflow-sdk/package.json +++ b/packages/workflow-sdk/package.json @@ -9,14 +9,35 @@ "bun": ">=1.4.4", "node": ">=20.0.0" }, + "exports": { + ".": { + "types": "./src/core.d.ts", + "default": "./src/runtime.ts" + }, + "./codegen": { + "types": "./src/codegen/index.ts", + "default": "./src/codegen/index.ts" + } + }, "scripts": { + "type-check": "tsc --noEmit", "lint": "biome check --write --unsafe .", "lint:check": "biome check .", "format": "biome format --write .", - "format:check": "biome format ." + "format:check": "biome format .", + "test": "vitest run", + "test:watch": "vitest" + }, + "dependencies": { + "@sim/utils": "workspace:*", + "@sim/workflow-code": "workspace:*", + "@sim/workflow-types": "workspace:*" }, "devDependencies": { "@sim/tsconfig": "workspace:*", - "typescript": "^7.0.2" + "@types/node": "24.19.2", + "@xyflow/react": "12.12.1", + "typescript": "^7.0.2", + "vitest": "^5.1.0" } } diff --git a/packages/workflow-sdk/src/.gitkeep b/packages/workflow-sdk/src/.gitkeep deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/packages/workflow-sdk/src/core.d.ts b/packages/workflow-sdk/src/core.d.ts new file mode 100644 index 00000000000..20d922641f0 --- /dev/null +++ b/packages/workflow-sdk/src/core.d.ts @@ -0,0 +1,625 @@ +/** + * The authoring surface for Sim workflows written as TypeScript (s2 §2). + * + * Nothing declared here runs. `@sim/workflow-code` compiles a workflow file statically, and every + * runtime export of this package throws `SimSdkNotExecutable`. These declarations exist so an + * editor, `tsgo --noEmit` or an agent can check a workflow file before the compiler sees it. + * + * Block builders (`slack.sendMessage`, `agent`, `trigger.gmail.poller`, ...) are not declared here: + * they are generated from the block catalog into `blocks/{type}.d.ts`, which augment this module. + * The generic `block(type, name, params)` covers any stored type without a builder. + */ + +/** Plain JSON. */ +export type Json = null | boolean | number | string | Json[] | { [key: string]: Json } + +declare const REF: unique symbol +declare const TEMPLATE: unique symbol +declare const ENV: unique symbol +declare const RESOURCE: unique symbol +declare const TOOL: unique symbol +declare const NODE: unique symbol +declare const FILE_BODY: unique symbol +declare const RAW: unique symbol + +/** Any reference, whatever it points at. */ +export interface AnyRef { + readonly [REF]: unknown +} + +type RefPaths = [Json] extends [T] + ? { readonly [key: string]: Ref } + : T extends readonly (infer E)[] + ? { readonly [index: number]: Ref; readonly length: Ref } + : T extends object + ? { readonly [K in keyof T]-?: Ref } + : unknown + +/** + * A typed reference to a block output, compiled to `` (build-spec decision 8). + * Paths map exactly: `.seg`, `['seg']` and `[n]`. Untyped JSON allows any path. + */ +export type Ref = { readonly [REF]: T } & RefPaths + +/** Text with references in it, written with one of the tags below. */ +export type Template = string & { readonly [TEMPLATE]: true } + +/** A workspace environment variable, compiled to `{{NAME}}`. */ +export interface EnvRef { + readonly [ENV]: string +} + +/** A param value: a literal, a reference, a template or an environment variable. */ +export type Value = T | AnyRef | Template | EnvRef + +/** JSON whose leaves may be references, templates or environment variables. */ +export type JsonWithRefs = + | null + | boolean + | number + | string + | AnyRef + | Template + | EnvRef + | JsonWithRefs[] + | { [key: string]: JsonWithRefs } + +/** A literal union that still accepts any other string (option ids read from values). */ +export type LiteralUnion = T | (string & {}) + +/** A `time-input` value, `HH:MM`. */ +export type TimeString = `${number}:${number}` + +type Interpolation = AnyRef | EnvRef | VarRef | string | number | boolean + +/** Text with interpolated references: `` t`New ${cls.category} ticket` ``. */ +export declare function t(strings: TemplateStringsArray, ...values: Interpolation[]): Template +/** JavaScript code (condition expressions, inline function code). */ +export declare const js: typeof t +/** Python code. */ +export declare const py: typeof t +/** Shell code. */ +export declare const sh: typeof t +/** JSON text kept verbatim, for bodies an object literal cannot reproduce byte for byte. */ +export declare const json: typeof t +/** Markdown text (note content). */ +export declare const md: typeof t + +/** A reference with a non-canonical spelling, such as `ref('Classify.content')`. */ +export declare function ref(path: string): Ref + +/** A stored value outside the generated type (a legacy option id, say), kept verbatim. */ +export declare function raw(value: unknown): T & { readonly [RAW]: true } + +/** A required value that is still missing; compiles to absent, so canvas drafts type-check. */ +export declare function todo(): never + +/** Function code kept in a file next to the workflow (`.js`, `.py` or `.sh`), stored verbatim. */ +export interface FileBody { + readonly [FILE_BODY]: string +} +export declare function file(path: `./${string}`): FileBody + +/** + * Environment variable names known to the workspace. `workspace.d.ts` adds one member per name; + * until it exists `env` accepts any name. + */ +// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment +export interface WorkspaceEnv {} + +export declare const env: keyof WorkspaceEnv extends never + ? { readonly [name: string]: EnvRef } + : { readonly [K in keyof WorkspaceEnv]: EnvRef } + +/** + * Workspace resources by stable key, filled in by the generated `workspace.d.ts`. Each map's + * values describe the resource: a table's row type, a binding's service, a workflow's inputs. + */ +// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment +export interface WorkspaceTables {} +// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment +export interface WorkspaceKnowledgeBases {} +// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment +export interface WorkspaceBindings {} +// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment +export interface WorkspaceWorkflows {} + +type KeyOf = keyof M extends never ? string : Extract + +export type TableKey = KeyOf +export type KnowledgeBaseKey = KeyOf +export type BindingKey = KeyOf +export type WorkflowKey = KeyOf + +/** A workspace resource by stable key, compiled to the resource's internal id. */ +export interface ResourceRef { + readonly [RESOURCE]: Kind + readonly key: Key +} + +/** A credential binding: `binding('support-slack')`. */ +export type Binding = ResourceRef<'credential', Key> +export declare function binding(key: K): Binding + +/** The columns of a workspace table, or loose JSON when `workspace.d.ts` does not know it. */ +export type TableColumns = K extends keyof WorkspaceTables + ? WorkspaceTables[K] + : { [column: string]: Json } +/** One stored row: its columns plus the row id. */ +export type TableRow = TableColumns & { id: string } +/** Column values written to a row. */ +export type TableData = K extends keyof WorkspaceTables + ? { [C in keyof WorkspaceTables[K]]?: Value | JsonWithRefs } + : { [column: string]: JsonWithRefs } + +/** A workspace table: `table('leads')`. Table block operations live on `table.*`. */ +export type TableRef = ResourceRef<'table', Key> +export declare function table(key: K): TableRef + +/** A knowledge base: `kb('docs')`. */ +export type KnowledgeBaseRef = ResourceRef<'knowledge-base', Key> +export declare function kb(key: K): KnowledgeBaseRef + +/** A workspace skill: `skill('triage')`. */ +export type SkillRef = ResourceRef<'skill'> +export declare function skill(key: string): SkillRef + +/** A sandbox image: `sandbox('node-ml')`. */ +export type SandboxRef = ResourceRef<'sandbox'> +export declare function sandbox(key: string): SandboxRef + +/** A workspace folder: `folder('reports')`. */ +export type FolderRef = ResourceRef<'file-folder'> +export declare function folder(key: string): FolderRef + +/** A workspace file upload: `upload('contracts/acme.pdf')`. */ +export type Upload = ResourceRef<'file'> +export declare function upload(path: string): Upload + +/** An opaque provider id chosen in a remote selector: `picked('C0123')`. */ +export interface Picked { + readonly [RESOURCE]: 'picked' + readonly id: string +} +export declare function picked(id: string): Picked + +/** A file produced at run time (`file` / `file[]` outputs). */ +export interface SimFile { + id: string + name: string + url: string + size: number + type: string + key: string +} + +// Agent tools + +/** One entry of an agent's `tools` list. */ +export interface Tool { + readonly [TOOL]: true +} + +/** How the model may use a tool. */ +export interface ToolOpts { + usageControl?: 'auto' | 'force' | 'none' + usageControlExpression?: string + title?: string +} + +/** A custom tool by key: `customTool('lookup-order')`. */ +export declare function customTool(key: string, options?: ToolOpts): Tool +export declare namespace customTool { + /** A custom tool snapshot that has drifted from the workspace tool. */ + function inline(definition: { schema: Json; code: string | Template; title?: string }): Tool +} + +/** An MCP server by key; `mcp('linear').tool('create_issue')`. */ +export interface McpServerRef extends ResourceRef<'mcp-server'> { + tool(name: string, options?: ToolOpts & { args?: Record }): Tool +} +export declare function mcp(key: string): McpServerRef + +// Graph + +/** Block-level fields (`BlockState`), written as the third builder argument. */ +export interface BlockMeta { + /** Stored as `enabled: false`. */ + disabled?: true + /** Protected: apply refuses any change to this block. */ + locked?: true + /** Exposes the error port without an `onError` edge. */ + errorPort?: boolean + /** The block-level advanced toggle (`advancedMode`). */ + advancedMode?: boolean + retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number } + /** Pair modes that cannot be derived from the value written. */ + modes?: Record + /** Stale values under hidden conditions, kept verbatim. */ + inactive?: Record +} + +/** Anything an edge can point at. */ +export type Target = Node | Group + +/** A block or container in the graph. */ +export interface Node { + readonly [NODE]: true + /** Wires this node's default port to each target. Returns the target, or a group of them. */ + to(...targets: T): T extends [infer One] ? One : Group + /** Wires this node's error port to each target. */ + onError(...targets: Target[]): void +} + +/** Several nodes; `.to()` wires every member (fan-in). */ +export interface Group { + to(...targets: Target[]): Group +} + +/** A block: a node whose outputs can be referenced. */ +export type Block = Node & Ref + +/** The named ports of a condition or router. */ +export type Branches = { readonly [P in K]: Node } + +/** Trigger builders (`trigger.start`, `trigger.gmail.poller`, ...), generated from the catalog. */ +export declare namespace trigger {} + +/** Builders for hidden legacy block versions (`legacy.slack.send`), generated from the catalog. */ +export declare namespace legacy {} + +/** A raw edge from a handle the SDK has no name for (a legacy or unknown port). */ +export declare function edge(from: Node, handle: string, to: Target): void + +/** Any stored block type without a builder (legacy, unknown or custom), with untyped outputs. */ +export declare function block( + type: string, + name: string, + params: Record, + meta?: BlockMeta +): Block + +// Workflow and variables + +export type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'plain' + +export interface VariableDeclaration { + type: VariableType + value?: Json +} + +export type VariableDeclarations = Record + +declare const VAR: unique symbol + +/** A workflow variable, compiled to ``. */ +export interface VarRef { + readonly [VAR]: string +} + +type VariableValue = T extends 'number' + ? number + : T extends 'boolean' + ? boolean + : T extends 'string' | 'plain' + ? string + : Json + +export type VarRefs = { + readonly [K in keyof V]: VarRef & Ref> +} + +/** + * Workflow variables by name, untyped. Prefer the `vars` the `workflow()` body receives, which is + * typed from the declared variables. + */ +export declare const vars: { readonly [name: string]: VarRef & Ref } + +declare const WORKFLOW_DEF: unique symbol + +/** The default export of a workflow file. */ +export interface WorkflowDef { + readonly [WORKFLOW_DEF]: true +} + +/** A child workflow by key, for `runWorkflow` or as an agent tool. */ +export interface WorkflowRef extends ResourceRef<'workflow', Key> { + asTool(options?: ToolOpts): Tool +} + +/** Declares a workflow. The body wires blocks; it never runs. */ +export declare function workflow>( + name: string, + options: { description?: string; variables?: V }, + body: (scope: { vars: VarRefs }) => void +): WorkflowDef +/** A child workflow by key: `workflow('enrich-lead')`. */ +export declare function workflow(key: K): WorkflowRef + +// Containers + +type ItemOf = C extends { readonly [REF]: readonly (infer E)[] } + ? E + : C extends readonly (infer E)[] + ? E + : Json + +/** Inside a loop or parallel body. */ +export interface SubflowScope { + /** The container's start port, into its first child. */ + readonly start: Node + readonly index: Ref + readonly currentItem: Ref + readonly items: Ref +} + +export interface SubflowOutput { + results: Json[] +} + +/** A loop or parallel container. Its `.to()` wires the port taken after it finishes. */ +export type Container = Block + +type Collection = AnyRef | Template | Json[] | string + +export declare const loop: { + for( + name: string, + params: { count: number }, + body: (scope: SubflowScope) => void, + meta?: BlockMeta + ): Container + forEach( + name: string, + params: { collection: C }, + body: (scope: SubflowScope>) => void, + meta?: BlockMeta + ): Container + while( + name: string, + params: { condition: Template | string }, + body: (scope: SubflowScope) => void, + meta?: BlockMeta + ): Container + doWhile( + name: string, + params: { condition: Template | string }, + body: (scope: SubflowScope) => void, + meta?: BlockMeta + ): Container +} + +export declare const parallel: { + count( + name: string, + params: { count: number; batchSize?: number }, + body: (scope: SubflowScope) => void, + meta?: BlockMeta + ): Container + collection( + name: string, + params: { collection: C; batchSize?: number }, + body: (scope: SubflowScope>) => void, + meta?: BlockMeta + ): Container +} + +// Blocks with a source form of their own + +/** + * Params and outputs of the blocks below, generated from the catalog. Each entry is + * `{ params; output }`; without generated types the params are loose. + */ +// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment +export interface SpecialBuilderTypes {} + +type SpecialParams = K extends keyof SpecialBuilderTypes + ? SpecialBuilderTypes[K] extends { params: infer P } + ? P + : never + : Record + +type SpecialOutput = K extends keyof SpecialBuilderTypes + ? SpecialBuilderTypes[K] extends { output: infer O } + ? O + : never + : Json + +/** A condition expression, or `true` for the `else` branch. */ +export type BranchExpression = Template | string | true + +/** + * Keys of a condition written with no rows (`condition('Name', {})`, the source form of rows + * that were never persisted): the implicit `if` and `else` ports stay addressable. + */ +type ConditionKeys = keyof B extends never ? 'if' | 'else' : Extract +type RouterKeys = keyof R extends never ? 'route0' : Extract + +/** A condition: named branches, the last one `else` when there are two or more. */ +export declare function condition>( + name: string, + branches: B, + meta?: BlockMeta +): Block> & Branches> + +/** A router: named routes described for the model. */ +export declare function router>( + name: string, + params: SpecialParams<'router'> & { routes: R }, + meta?: BlockMeta +): Block> & Branches> + +/** A function block. `code` is inline (`` js`...` ``) or a file (`file('./functions/x.js')`). */ +export declare function fn( + name: string, + params: SpecialParams<'fn'> & { code: Template | FileBody | string }, + meta?: BlockMeta +): Block> + +/** Runs a child workflow. */ +export declare function runWorkflow( + name: string, + params: SpecialParams<'runWorkflow'>, + meta?: BlockMeta +): Block> + +/** Pauses for a person; the form in `inputFormat` types `submission`. */ +export declare function human>( + name: string, + params: SpecialParams<'human'> & { inputFormat?: F }, + meta?: BlockMeta +): Block, 'submission'> & { submission: InputFieldsOutput }> + +/** Ends the workflow with an API response. */ +export declare function response( + name: string, + params: SpecialParams<'response'>, + meta?: BlockMeta +): Block> + +/** Assigns workflow variables. */ +export declare function setVariables( + name: string, + params: SpecialParams<'setVariables'>, + meta?: BlockMeta +): Block> + +declare const ANNOTATION: unique symbol + +/** A canvas note: no edges, no outputs. */ +export interface Annotation { + readonly [ANNOTATION]: true +} +export declare function note( + name: string, + params: SpecialParams<'note'>, + meta?: BlockMeta +): Annotation + +// Structured param shapes + +/** Type names an input-format field may declare. */ +export type InputFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'file[]' + +/** A structured input field: its type plus a default value, description or required flag. */ +export interface InputFieldSpec { + type: InputFieldType + value?: JsonWithRefs + description?: string + required?: boolean +} + +/** `input-format` fields by name: `{ subject: 'string', amount: { type: 'number', value: 0 } }`. */ +export type InputFields = Record + +type InputFieldValue = T extends 'string' + ? string + : T extends 'number' + ? number + : T extends 'boolean' + ? boolean + : T extends 'array' + ? Json[] + : T extends 'file[]' + ? SimFile[] + : Json + +/** The outputs an `input-format` declares. */ +export type InputFieldsOutput = { + [K in keyof F]: F[K] extends { type: infer T } ? InputFieldValue : InputFieldValue +} + +/** `response-format` fields: `{ ok: true, id: { type: 'string', value: row.id } }`. */ +export type ResponseFields = Record + +/** An agent message. */ +export interface Message { + role: 'system' | 'user' | 'assistant' + content: Value +} + +/** One `variables-input` assignment. */ +export interface VariableAssignment { + variable: VarRef + value: JsonWithRefs +} + +/** Child workflow inputs by name (`input-mapping`, `workflow-input-mapper`). */ +export type InputMapping = Record + +/** A table filter by column: `{ status: { $eq: 'new' } }`. */ +export type Filter = Record + +/** A table sort by column: `{ createdAt: 'desc' }`. */ +export type Sort = + | Record + | Array<{ column: string; direction: 'asc' | 'desc' }> + +/** One knowledge tag filter. */ +export interface TagFilter { + tagName: string + tagValue: Value + [key: string]: JsonWithRefs +} + +/** One document tag. */ +export interface DocumentTag { + tagName: string + value: Value + [key: string]: JsonWithRefs +} + +/** One `eval-input` metric. */ +export interface EvalMetric { + name: string + description?: string + range?: { min: number; max: number } + [key: string]: JsonWithRefs | undefined +} + +/** One `model-fallback-list` entry. */ +export interface ModelFallback { + model: LiteralUnion + [key: string]: JsonWithRefs +} + +/** + * Model ids, generated into `models.d.ts` (which adds one member per model). Kept apart from the + * block files so a model-list change touches one file. + */ +// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment +export interface ModelIds {} +export type Model = Extract + +/** A JSON Schema `responseFormat`, or `{ name, strict, schema }` around one. */ +export type ResponseFormat = JsonWithRefs + +type Depth = [never, 0, 1, 2, 3, 4] + +type FromSchema = [D] extends [never] + ? Json + : S extends { enum: readonly (infer E)[] } + ? E + : S extends { type: 'object'; properties: infer P } + ? { [K in keyof P]: FromSchema } + : S extends { type: 'array'; items: infer I } + ? FromSchema[] + : S extends { type: 'string' } + ? string + : S extends { type: 'number' | 'integer' } + ? number + : S extends { type: 'boolean' } + ? boolean + : Json + +/** + * The outputs a literal `responseFormat` adds, read from its JSON Schema with recursion capped at + * depth 4. A template or reference adds untyped JSON. + */ +export type ResponseFormatOutput = [RF] extends [undefined] + ? unknown + : RF extends { schema: infer S } + ? FromSchema + : RF extends { type: 'object'; properties: object } + ? FromSchema + : { [key: string]: Json } diff --git a/packages/workflow-sdk/src/runtime.test.ts b/packages/workflow-sdk/src/runtime.test.ts new file mode 100644 index 00000000000..bfd557269ab --- /dev/null +++ b/packages/workflow-sdk/src/runtime.test.ts @@ -0,0 +1,34 @@ +import { readFileSync } from 'node:fs' +import path from 'node:path' +import { SDK_CORE_EXPORTS } from '@sim/workflow-code' +import { describe, expect, it } from 'vitest' +import * as runtimeModule from './runtime' +import { SimSdkNotExecutable } from './runtime' + +const runtime: Record = { ...runtimeModule } + +const coreValueExports = [ + ...readFileSync(path.join(import.meta.dirname, 'core.d.ts'), 'utf8').matchAll( + /^export declare (?:function|const|namespace) ([A-Za-z_$][\w$]*)/gm + ), +].map((match) => match[1]) + +describe('the SDK value surface', () => { + it('core.d.ts declares exactly SDK_CORE_EXPORTS', () => { + expect([...new Set(coreValueExports)].sort()).toEqual([...SDK_CORE_EXPORTS].sort()) + }) + + it('the runtime exports exactly SDK_CORE_EXPORTS, plus the error class', () => { + const names = Object.keys(runtime).filter((name) => name !== 'SimSdkNotExecutable') + expect(names.sort()).toEqual([...SDK_CORE_EXPORTS].sort()) + }) + + it('every runtime export throws SimSdkNotExecutable when called or read', () => { + for (const name of SDK_CORE_EXPORTS) { + const value: unknown = runtime[name] + if (typeof value !== 'function') throw new Error(`${name} is not a stub`) + expect(() => value('x')).toThrow(SimSdkNotExecutable) + expect(() => Reflect.get(value, 'anything')).toThrow(SimSdkNotExecutable) + } + }) +}) diff --git a/packages/workflow-sdk/src/runtime.ts b/packages/workflow-sdk/src/runtime.ts new file mode 100644 index 00000000000..fc0e727a286 --- /dev/null +++ b/packages/workflow-sdk/src/runtime.ts @@ -0,0 +1,70 @@ +/** + * The runtime entry of `@sim/workflow-sdk`. A workflow file is compiled statically and never runs + * (s2 D1), so every export here throws `SimSdkNotExecutable`. The entry exists only so imports + * resolve; the types come from `core.d.ts` and the generated block declarations. + */ + +/** Thrown by every runtime export: workflow files are compiled, never executed. */ +export class SimSdkNotExecutable extends Error { + readonly export: string + + constructor(exportName: string) { + super( + `@sim/workflow-sdk: \`${exportName}\` does not run. Workflow files are compiled by Sim, never executed; check them with \`sim workflows source plan\` or a type-check.` + ) + this.name = 'SimSdkNotExecutable' + this.export = exportName + } +} + +function notExecutable(exportName: string): never { + throw new SimSdkNotExecutable(exportName) +} + +/** A function that throws when called, and whose properties throw when read. */ +function stub(exportName: string): (...args: unknown[]) => never { + const target = () => notExecutable(exportName) + return new Proxy(target, { + apply: () => notExecutable(exportName), + construct: () => notExecutable(exportName), + get: (_target, property) => notExecutable(`${exportName}.${String(property)}`), + }) +} + +export const t = stub('t') +export const js = stub('js') +export const py = stub('py') +export const sh = stub('sh') +export const json = stub('json') +export const md = stub('md') +export const ref = stub('ref') +export const raw = stub('raw') +export const todo = stub('todo') +export const file = stub('file') +export const env = stub('env') +export const binding = stub('binding') +export const table = stub('table') +export const kb = stub('kb') +export const skill = stub('skill') +export const sandbox = stub('sandbox') +export const folder = stub('folder') +export const upload = stub('upload') +export const picked = stub('picked') +export const customTool = stub('customTool') +export const mcp = stub('mcp') +export const edge = stub('edge') +export const block = stub('block') +export const workflow = stub('workflow') +export const loop = stub('loop') +export const parallel = stub('parallel') +export const condition = stub('condition') +export const router = stub('router') +export const fn = stub('fn') +export const runWorkflow = stub('runWorkflow') +export const human = stub('human') +export const response = stub('response') +export const setVariables = stub('setVariables') +export const note = stub('note') +export const trigger = stub('trigger') +export const legacy = stub('legacy') +export const vars = stub('vars') diff --git a/packages/workflow-sdk/tsconfig.json b/packages/workflow-sdk/tsconfig.json index dd8fe6e74c5..e39a0c10ed2 100644 --- a/packages/workflow-sdk/tsconfig.json +++ b/packages/workflow-sdk/tsconfig.json @@ -1,7 +1,7 @@ { "extends": "@sim/tsconfig/library.json", "compilerOptions": { - "types": [] + "types": ["node"] }, "include": ["src/**/*"], "exclude": ["node_modules", "dist"] diff --git a/packages/workflow-sdk/vitest.config.ts b/packages/workflow-sdk/vitest.config.ts new file mode 100644 index 00000000000..6f729af4c84 --- /dev/null +++ b/packages/workflow-sdk/vitest.config.ts @@ -0,0 +1,11 @@ +import { defineConfig, mergeConfig } from 'vitest/config' +import sharedConfig from '../../vitest.shared' + +export default mergeConfig( + sharedConfig, + defineConfig({ + test: { + include: ['src/**/*.test.ts'], + }, + }) +) From c66f9273068f3e0d0a75f62d782e518094bcbd76 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:05:33 -0800 Subject: [PATCH 012/428] feat(workflow-sdk): generate block declarations from the catalog generateSdkTypes(catalog) writes one .d.ts per block, one per operation, a models file and an index, deterministically. A three-way visibility evaluator narrows each operation's params (64-combination cap, one nested union level on a small gating dropdown); outputs are narrowed per operation, and dynamic outputs (responseFormat, inputFormat, table rows) become const generics. generateWorkspaceTypes(manifest) narrows tables, knowledge bases, bindings, workflows and env names. The s2 examples type-check against a fixture catalog projected from 18 real blocks, and the negative fixtures fail. --- packages/workflow-sdk/README.md | 52 +- .../scripts/typecheck-fixtures.ts | 38 + packages/workflow-sdk/src/codegen/catalog.ts | 17 + packages/workflow-sdk/src/codegen/emit.ts | 113 + .../workflow-sdk/src/codegen/generate.test.ts | 85 + packages/workflow-sdk/src/codegen/generate.ts | 609 + packages/workflow-sdk/src/codegen/index.ts | 7 + .../workflow-sdk/src/codegen/map-subblock.ts | 184 + packages/workflow-sdk/src/codegen/names.ts | 116 + packages/workflow-sdk/src/codegen/outputs.ts | 152 + .../src/codegen/visibility.test.ts | 179 + .../workflow-sdk/src/codegen/visibility.ts | 365 + .../workflow-sdk/src/codegen/workspace.ts | 124 + .../test/examples/approval-flow.ts | 49 + .../test/examples/lead-enrichment.ts | 56 + .../workflow-sdk/test/examples/rag-doc-qa.ts | 23 + .../test/examples/scheduled-report.ts | 43 + .../test/examples/support-triage.ts | 71 + .../workflow-sdk/test/fixtures/catalog.json | 25188 ++++++++++++++++ .../workflow-sdk/test/fixtures/workspace.ts | 25 + .../workflow-sdk/test/negative/rejected.ts | 74 + .../workflow-sdk/test/typecheck-project.ts | 71 + 22 files changed, 27619 insertions(+), 22 deletions(-) create mode 100644 packages/workflow-sdk/scripts/typecheck-fixtures.ts create mode 100644 packages/workflow-sdk/src/codegen/catalog.ts create mode 100644 packages/workflow-sdk/src/codegen/emit.ts create mode 100644 packages/workflow-sdk/src/codegen/generate.test.ts create mode 100644 packages/workflow-sdk/src/codegen/generate.ts create mode 100644 packages/workflow-sdk/src/codegen/index.ts create mode 100644 packages/workflow-sdk/src/codegen/map-subblock.ts create mode 100644 packages/workflow-sdk/src/codegen/names.ts create mode 100644 packages/workflow-sdk/src/codegen/outputs.ts create mode 100644 packages/workflow-sdk/src/codegen/visibility.test.ts create mode 100644 packages/workflow-sdk/src/codegen/visibility.ts create mode 100644 packages/workflow-sdk/src/codegen/workspace.ts create mode 100644 packages/workflow-sdk/test/examples/approval-flow.ts create mode 100644 packages/workflow-sdk/test/examples/lead-enrichment.ts create mode 100644 packages/workflow-sdk/test/examples/rag-doc-qa.ts create mode 100644 packages/workflow-sdk/test/examples/scheduled-report.ts create mode 100644 packages/workflow-sdk/test/examples/support-triage.ts create mode 100644 packages/workflow-sdk/test/fixtures/catalog.json create mode 100644 packages/workflow-sdk/test/fixtures/workspace.ts create mode 100644 packages/workflow-sdk/test/negative/rejected.ts create mode 100644 packages/workflow-sdk/test/typecheck-project.ts diff --git a/packages/workflow-sdk/README.md b/packages/workflow-sdk/README.md index 76895a5cfd2..6956900c7e9 100644 --- a/packages/workflow-sdk/README.md +++ b/packages/workflow-sdk/README.md @@ -4,28 +4,36 @@ The authoring surface for Sim workflows written as TypeScript. A workflow file i package, but **nothing in it ever runs**: `@sim/workflow-code` compiles the file statically, and every runtime export throws `SimSdkNotExecutable`. -This package is a scaffold. The modules below are planned and owned by the Wave 2E agent; `src/` -holds no code yet, so the package has no `exports`, `type-check` or `test` script until they land. - -## Planned modules +## Modules | Path | Contents | |------|----------| -| `src/core.d.ts` | Authoring types: `Ref`, `Value`, `Template`, the `t`/`js`/`py`/`sh`/`json`/`md` tags, `ref`, `raw`, `todo`, `file`, `env`, resource constructors (`binding`, `table`, `kb`, `workflow`, `skill`, `customTool`, `mcp`, `sandbox`, `upload`, `picked`), `BlockMeta`, `Node`/`Block`/`Branches`, and `workflow`, `loop`, `parallel`, `condition`, `router`, `note`, `fn` | -| `src/runtime.ts` | The runtime entry: every export throws `SimSdkNotExecutable`, so imports resolve without implying execution | -| `src/codegen/generate.ts` | `generateSdkTypes(catalog, names)`: one `.d.ts` per block from a `BlockCatalog` (`@sim/workflow-code`) and the frozen `apps/sim/blocks/sdk-names.json` | -| `src/codegen/visibility.ts` | The three-way visibility evaluator (always / sometimes / never visible per operation) over serialized catalog conditions | -| `src/codegen/map-subblock.ts` | SubBlock type → TS type mapping | -| `src/codegen/outputs.ts` | Output types, narrowed per operation | -| `src/codegen/names.ts` | Builder, param and identifier naming | -| `src/codegen/emit.ts` | Deterministic `.d.ts` emission | - -## Rules the generated surface follows - -- A block call is `builder(displayName, params, meta?)`; each operation is its own method, named - from `sdk-names.json`. -- Param names are subBlock ids; a basic/advanced pair is one param named by its - `canonicalParamId`, and the mode follows from the value's kind. -- Resource references are call-form: `table('leads')`, `binding('support-slack')`, `kb('docs')`, - `workflow('enrich')`, `env.NAME`. -- Function code lives in `.js`, `.py` or `.sh` files, stored verbatim. +| `src/core.d.ts` | Authoring types: `Ref`, `Value`, `Template`, the `t`/`js`/`py`/`sh`/`json`/`md` tags, `ref`/`raw`/`todo`/`file`/`env`, resource constructors, `BlockMeta`, `Node`/`Block`/`Branches`, `workflow`, `loop`, `parallel`, the special builders (`condition`, `router`, `fn`, `runWorkflow`, `human`, `response`, `setVariables`, `note`), `edge` and the generic `block`. It exports exactly `SDK_CORE_EXPORTS` from `@sim/workflow-code` | +| `src/runtime.ts` | The runtime entry: every export throws `SimSdkNotExecutable` | +| `src/codegen/` | `generateSdkTypes(catalog)` (block catalog → `.d.ts`) and `generateWorkspaceTypes(manifest)` (`workspace.d.ts`) | + +## Generated files + +`generateSdkTypes` returns files sorted by path, byte-identical for the same catalog: + +- `blocks/{type}.d.ts`: augments `@sim/workflow-sdk` with that block's builders, tool forms + (`slack.tool.sendMessage(...)`) and `SpecialBuilderTypes` entries. +- `operations/{type}/{operation}.d.ts`: one operation's params and output types. +- `models.d.ts`: model ids, apart so a model-list change touches one file. +- `index.d.ts`: imports the rest; the only file that names the catalog hash. + +Builder names come from the catalog's frozen `builders` map; codegen never invents one. Param +names are subBlock ids, or the `canonicalParamId` of a basic/advanced pair. Each operation's +params are narrowed by the visibility evaluator: always visible (required when the field is +required and has no default), sometimes visible (optional, with `@when`), never visible (dropped). +One small dropdown that gates disjoint fields becomes one nested union level. + +## Checking the generated types + +```bash +bun run test # determinism, locality, evaluator, type-check +bun scripts/typecheck-fixtures.ts # sizes, then tsc over test/examples and test/negative +``` + +`test/fixtures/catalog.json` is projected from 18 real registry blocks; `test/examples` are the +five s2 example workflows, and `test/negative` holds code each generated type must reject. diff --git a/packages/workflow-sdk/scripts/typecheck-fixtures.ts b/packages/workflow-sdk/scripts/typecheck-fixtures.ts new file mode 100644 index 00000000000..dfe9d51a88a --- /dev/null +++ b/packages/workflow-sdk/scripts/typecheck-fixtures.ts @@ -0,0 +1,38 @@ +/** + * Generates the SDK types for the fixture catalog into ``, reports their size, and + * type-checks the s2 example workflows and negative fixtures against them. + * + * bun scripts/typecheck-fixtures.ts + */ + +import path from 'node:path' +import { typecheck, writeTypecheckProject } from '../test/typecheck-project' + +const outDir = process.argv[2] +if (!outDir) { + process.stderr.write('usage: bun scripts/typecheck-fixtures.ts \n') + process.exit(2) +} + +const { tsconfig, files } = writeTypecheckProject(path.resolve(outDir)) +const bytes = (file: { text: string }) => Buffer.byteLength(file.text) +const total = files.reduce((sum, file) => sum + bytes(file), 0) +const blockTypes = new Set( + files + .filter((file) => file.path.startsWith('blocks/')) + .map((file) => file.path.slice('blocks/'.length, -'.d.ts'.length)) +) +const perBlock = [...blockTypes].map((type) => + files + .filter( + (file) => file.path === `blocks/${type}.d.ts` || file.path.startsWith(`operations/${type}/`) + ) + .reduce((sum, file) => sum + bytes(file), 0) +) +const largest = Math.max(...perBlock) +process.stdout.write( + `${files.length} files, ${total} bytes; ${blockTypes.size} blocks, ${Math.round(total / blockTypes.size)} bytes per block on average, largest ${largest}\n` +) +const diagnostics = typecheck(tsconfig) +process.stdout.write(diagnostics || 'type-check clean\n') +process.exit(diagnostics ? 1 : 0) diff --git a/packages/workflow-sdk/src/codegen/catalog.ts b/packages/workflow-sdk/src/codegen/catalog.ts new file mode 100644 index 00000000000..3116a06d9d1 --- /dev/null +++ b/packages/workflow-sdk/src/codegen/catalog.ts @@ -0,0 +1,17 @@ +/** + * Narrowing helpers over the catalog's condition shapes (`@sim/workflow-code` catalog types). + */ + +import type { CatalogCondition, SubBlockConditionClause } from '@sim/workflow-code' + +/** A data condition the evaluator can read. */ +export function isConditionClause( + value: CatalogCondition | boolean | undefined +): value is SubBlockConditionClause { + return typeof value === 'object' && 'field' in value +} + +/** A function condition the projection could not evaluate (`{ opaque: true }`). */ +export function isOpaque(value: CatalogCondition | boolean | undefined): boolean { + return typeof value === 'object' && 'opaque' in value +} diff --git a/packages/workflow-sdk/src/codegen/emit.ts b/packages/workflow-sdk/src/codegen/emit.ts new file mode 100644 index 00000000000..1299a50b150 --- /dev/null +++ b/packages/workflow-sdk/src/codegen/emit.ts @@ -0,0 +1,113 @@ +/** + * Small, deterministic text helpers for the `.d.ts` emitter: quoting, property keys, JSDoc and + * literal unions. Output follows the repo style (2 spaces, single quotes, no semicolons). + */ + +const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ + +/** ECMAScript reserved words plus TS contextual names that cannot name a namespace member. */ +export const RESERVED_WORDS: ReadonlySet = new Set([ + 'break', + 'case', + 'catch', + 'class', + 'const', + 'continue', + 'debugger', + 'default', + 'delete', + 'do', + 'else', + 'enum', + 'export', + 'extends', + 'false', + 'finally', + 'for', + 'function', + 'if', + 'import', + 'in', + 'instanceof', + 'new', + 'null', + 'return', + 'super', + 'switch', + 'this', + 'throw', + 'true', + 'try', + 'typeof', + 'var', + 'void', + 'while', + 'with', + 'implements', + 'interface', + 'let', + 'package', + 'private', + 'protected', + 'public', + 'static', + 'yield', + 'await', +]) + +export function isIdentifier(name: string): boolean { + return IDENTIFIER.test(name) +} + +/** A single-quoted string literal. */ +export function quote(value: string): string { + return `'${value.replace(/\\/g, '\\\\').replace(/'/g, "\\'").replace(/\n/g, '\\n').replace(/\r/g, '\\r')}'` +} + +/** A property key: bare when it is an identifier, else quoted. */ +export function propertyKey(name: string): string { + return isIdentifier(name) ? name : quote(name) +} + +/** A TS literal type for an option id. */ +export function literal(value: string | number | boolean): string { + return typeof value === 'string' ? quote(value) : String(value) +} + +/** A union of distinct members, in first-seen order. */ +export function union(members: readonly string[]): string { + const distinct: string[] = [] + for (const member of members) if (!distinct.includes(member)) distinct.push(member) + return distinct.length === 0 ? 'never' : distinct.join(' | ') +} + +/** Parenthesises a union so it can take `[]`. */ +export function arrayOf(type: string): string { + return /^[A-Za-z0-9_.<>]+$/.test(type) ? `${type}[]` : `Array<${type}>` +} + +/** `Slack send message` → `SlackSendMessage`. */ +export function pascal(parts: readonly string[]): string { + return parts + .flatMap((part) => part.split(/[^A-Za-z0-9]+/)) + .filter(Boolean) + .map((word) => word[0].toUpperCase() + word.slice(1)) + .join('') +} + +function sanitizeDoc(line: string): string { + return line.replace(/\*\//g, '*\\/').replace(/\s+/g, ' ').trim() +} + +/** JSDoc lines at `indent`, or nothing when there is nothing to say. */ +export function jsdoc(lines: readonly string[], indent: string): string[] { + const clean = lines.map(sanitizeDoc).filter(Boolean) + if (clean.length === 0) return [] + if (clean.length === 1) return [`${indent}/** ${clean[0]} */`] + return [`${indent}/**`, ...clean.map((line) => `${indent} * ${line}`), `${indent} */`] +} + +/** Indents every line of a block. */ +export function indentLines(lines: readonly string[], indent: string): string[] { + return lines.map((line) => (line === '' ? line : `${indent}${line}`)) +} diff --git a/packages/workflow-sdk/src/codegen/generate.test.ts b/packages/workflow-sdk/src/codegen/generate.test.ts new file mode 100644 index 00000000000..c878dcdd7ee --- /dev/null +++ b/packages/workflow-sdk/src/codegen/generate.test.ts @@ -0,0 +1,85 @@ +import { mkdtempSync, rmSync } from 'node:fs' +import { tmpdir } from 'node:os' +import path from 'node:path' +import { describe, expect, it } from 'vitest' +import { FIXTURE_WORKSPACE } from '../../test/fixtures/workspace' +import { + loadFixtureCatalog as loadCatalog, + typecheck, + writeTypecheckProject, +} from '../../test/typecheck-project' +import { generateSdkTypes } from './generate' +import { generateWorkspaceTypes } from './workspace' + +function reversedKeys(record: Record): Record { + return Object.fromEntries(Object.entries(record).reverse()) +} + +describe('generateSdkTypes over the fixture catalog', () => { + it('is byte-identical across runs and independent of catalog key order', () => { + const catalog = loadCatalog() + const first = generateSdkTypes(catalog) + const second = generateSdkTypes(loadCatalog()) + const shuffled = generateSdkTypes({ + ...catalog, + blocks: reversedKeys(catalog.blocks), + triggers: reversedKeys(catalog.triggers), + builders: reversedKeys(catalog.builders), + }) + expect(second).toEqual(first) + expect(shuffled).toEqual(first) + }) + + it('touches only the changed block files when one block changes', () => { + const catalog = loadCatalog() + const before = new Map(generateSdkTypes(catalog).map((file) => [file.path, file.text])) + const changed = structuredClone(catalog) + const url = changed.blocks.api.subBlocks.find((subBlock) => subBlock.id === 'url') + if (!url) throw new Error('fixture api block has no url subBlock') + url.title = 'Endpoint URL' + const after = generateSdkTypes(changed) + const touched = after.filter((file) => before.get(file.path) !== file.text).map((f) => f.path) + expect(touched).toEqual(['blocks/api.d.ts']) + }) + + it('type-checks the s2 example workflows and rejects every negative fixture', () => { + const outDir = mkdtempSync(path.join(tmpdir(), 'sim-sdk-types-')) + try { + const { tsconfig } = writeTypecheckProject(outDir) + expect(typecheck(tsconfig)).toBe('') + } finally { + rmSync(outDir, { recursive: true, force: true }) + } + }, 120_000) + + it('rejects a builder name the emitter cannot declare', () => { + const catalog = loadCatalog() + expect(() => + generateSdkTypes({ + ...catalog, + builders: { ...catalog.builders, 'slack.delete': { type: 'slack_v2' } }, + }) + ).toThrow(/cannot name a declaration/) + expect(() => + generateSdkTypes({ ...catalog, builders: { ...catalog.builders, env: { type: 'api' } } }) + ).toThrow(/redeclares a core export/) + expect(() => + generateSdkTypes({ + ...catalog, + builders: { ...catalog.builders, 'slack.tool': { type: 'slack_v2' } }, + }) + ).toThrow(/collides with the `tool` namespace/) + }) +}) + +describe('generateWorkspaceTypes', () => { + it('is independent of manifest key order', () => { + const reversed = { + ...FIXTURE_WORKSPACE, + tables: reversedKeys(FIXTURE_WORKSPACE.tables ?? {}), + bindings: reversedKeys(FIXTURE_WORKSPACE.bindings ?? {}), + env: [...(FIXTURE_WORKSPACE.env ?? [])].reverse(), + } + expect(generateWorkspaceTypes(reversed)).toEqual(generateWorkspaceTypes(FIXTURE_WORKSPACE)) + }) +}) diff --git a/packages/workflow-sdk/src/codegen/generate.ts b/packages/workflow-sdk/src/codegen/generate.ts new file mode 100644 index 00000000000..cfbaa92d2a1 --- /dev/null +++ b/packages/workflow-sdk/src/codegen/generate.ts @@ -0,0 +1,609 @@ +/** + * `generateSdkTypes(catalog)`: the block catalog → `.d.ts` files (s2 D10). + * + * - `blocks/{type}.d.ts` per block type with builders. It augments `@sim/workflow-sdk` with the + * builder functions, tool forms and `SpecialBuilderTypes` entries. + * - `operations/{type}/{operation}.d.ts` per operation builder, holding that operation's params + * and output types, so an agent can read one operation (about 1–2 KB) on demand. + * - `models.d.ts`: model ids, apart so a model-list change touches one file. + * - `index.d.ts`: imports everything; the only file that names the catalog hash. + * + * Output is deterministic: the same catalog gives byte-identical files in path order. + */ + +import { compareStrings } from '@sim/utils/string' +import type { BlockCatalog, CatalogBlock, CatalogOutput, CatalogSubBlock } from '@sim/workflow-code' +import { indentLines, jsdoc, literal, pascal, propertyKey, quote, union } from './emit' +import { mapSubBlock } from './map-subblock' +import { type BuilderEntry, builderEntries, TOOL_NAMESPACE } from './names' +import { builderOutputs, type DynamicOutputPlan, dynamicOutputPlan, renderMembers } from './outputs' +import { + buildVisibilityContext, + classifyParam, + findGate, + type Gate, + type ParamVisibility, + type Scalar, + type VisibilityContext, +} from './visibility' + +export interface SdkTypeFile { + path: string + text: string +} + +export type GenerateSdkTypesFn = (catalog: BlockCatalog) => SdkTypeFile[] + +/** Names `core.d.ts` exports that generated files may reference; imported only when used. */ +const CORE_TYPE_NAMES = [ + 'AnyRef', + 'Binding', + 'Block', + 'BlockMeta', + 'BranchExpression', + 'DocumentTag', + 'EvalMetric', + 'Filter', + 'FolderRef', + 'InputFields', + 'InputFieldsOutput', + 'InputMapping', + 'Json', + 'JsonWithRefs', + 'KnowledgeBaseRef', + 'LiteralUnion', + 'Message', + 'Model', + 'ModelFallback', + 'Picked', + 'ResponseFields', + 'ResponseFormat', + 'ResponseFormatOutput', + 'SimFile', + 'SkillRef', + 'Sort', + 'TableData', + 'TableRef', + 'TableRow', + 'TagFilter', + 'Template', + 'TimeString', + 'Tool', + 'ToolOpts', + 'Upload', + 'Value', + 'VariableAssignment', + 'WorkflowRef', +] as const + +/** + * Trigger subBlocks the SDK never writes (`SYSTEM_SUBBLOCK_IDS` in apps/sim/triggers/constants.ts, + * minus the credential, plus the server-owned `triggerPath`), s2 §2. + */ +const SYSTEM_SUBBLOCK_IDS: ReadonlySet = new Set([ + 'triggerInstructions', + 'webhookUrlDisplay', + 'samplePayload', + 'setupScript', + 'scheduleInfo', + 'triggerPath', + 'selectedTriggerId', + 'operation', +]) + +/** Types whose control always holds a value (first option, off, minimum), so never required. */ +const ALWAYS_VALUED_TYPES: ReadonlySet = new Set(['dropdown', 'switch', 'slider']) + +const HEADER_PREFIX = '// @sim-sdk' + +function header(sdkMajor: number): string { + return `${HEADER_PREFIX} ${sdkMajor} · generated from the block catalog; do not edit` +} + +function isTriggerModeSubBlock(subBlock: CatalogSubBlock): boolean { + return subBlock.mode === 'trigger' || subBlock.mode === 'trigger-advanced' +} + +/** + * The subBlocks a builder can write, mirroring the serializer's surface rule + * (apps/sim/serializer/index.ts): trigger-mode fields only in a trigger context or on a trigger + * block, action fields never in a trigger context of a non-trigger block. + */ +function candidateSubBlocks(block: CatalogBlock, entry: BuilderEntry): CatalogSubBlock[] { + const triggerCategory = block.category === 'triggers' + const triggerContext = entry.builder.triggerMode === true + const fixed = entry.builder.fixed ?? {} + return block.subBlocks.filter((subBlock) => { + if (subBlock.hidden || subBlock.context === 'tool-input') return false + if (isTriggerModeSubBlock(subBlock)) { + if (!triggerContext && !triggerCategory) return false + } else if (triggerContext && !triggerCategory) { + return false + } + if (SYSTEM_SUBBLOCK_IDS.has(subBlock.id) || subBlock.id.startsWith('samplePayload')) { + return false + } + if (subBlock.id in fixed) return false + return mapSubBlock(subBlock) !== null + }) +} + +interface Param { + name: string + members: CatalogSubBlock[] + visibility: ParamVisibility + type: string + doc: string[] +} + +function hasDefault(members: readonly CatalogSubBlock[]): boolean { + return members.some( + (member) => + member.defaultValue !== undefined || + (member.valueDefault !== undefined && 'constant' in member.valueDefault) || + ALWAYS_VALUED_TYPES.has(member.type) + ) +} + +function paramDoc(members: readonly CatalogSubBlock[], visibility: ParamVisibility): string[] { + const lines: string[] = [] + const title = members.find((member) => member.title)?.title + if (title) lines.push(title) + for (const member of members) { + const mapped = mapSubBlock(member) + if (mapped) for (const line of mapped.doc) if (!lines.includes(line)) lines.push(line) + } + const basic = members.find((member) => member.mode === 'basic') + const advanced = members.find((member) => member.mode === 'advanced') + if (basic && advanced) lines.push(`Basic \`${basic.id}\` or advanced \`${advanced.id}\`.`) + const dependsOn = new Set() + for (const member of members) { + for (const field of member.dependsOn?.all ?? []) dependsOn.add(field) + for (const field of member.dependsOn?.any ?? []) dependsOn.add(field) + } + if (dependsOn.size > 0) lines.push(`@dependsOn ${[...dependsOn].join(', ')}`) + if (visibility.when) lines.push(`@when ${visibility.when}`) + return lines +} + +function groupParams(candidates: readonly CatalogSubBlock[]): Map { + const groups = new Map() + for (const subBlock of candidates) { + const name = subBlock.canonicalParamId ?? subBlock.id + const group = groups.get(name) + if (group) group.push(subBlock) + else groups.set(name, [subBlock]) + } + return groups +} + +interface BuilderOutput { + name: string + /** Type parameter list for a generic output (``), else `''`. */ + typeParameters: string + /** Type arguments that forward the parameters (``), else `''`. */ + typeArguments: string + /** The interface body (members), shared between builders whose bodies match. */ + body: string +} + +interface BuilderTypes { + /** The params type declaration, exported. */ + params: string + output: BuilderOutput + /** The function signature line(s) inside the namespace. */ + signature: string[] + /** The tool-form signature, or `null`. */ + tool: string[] | null + /** The `SpecialBuilderTypes` member, for core-declared builders. */ + special: string | null + /** Exported names, for the block file's import. */ + exportedTypes: string[] +} + +function pinnedValues(entry: BuilderEntry): Record { + const pinned: Record = { ...(entry.builder.fixed ?? {}) } + if (entry.builder.operation !== undefined) pinned.operation = entry.builder.operation + return pinned +} + +function outputSource( + catalog: BlockCatalog, + block: CatalogBlock, + entry: BuilderEntry +): Record { + const triggerId = entry.builder.fixed?.selectedTriggerId + if (triggerId && catalog.triggers[triggerId]) return catalog.triggers[triggerId].outputs + const isTrigger = entry.builder.triggerMode === true || block.category === 'triggers' + const available = block.triggers?.available ?? [] + if (isTrigger && available.length === 1 && catalog.triggers[available[0]]) { + return catalog.triggers[available[0]].outputs + } + return block.outputs +} + +function operationLabel(block: CatalogBlock, operation: string): string | undefined { + const dropdown = block.subBlocks.find((subBlock) => subBlock.id === 'operation') + if (!dropdown || !Array.isArray(dropdown.options)) return undefined + return dropdown.options.find((option) => option.id === operation)?.label +} + +function defaultGateValue( + candidates: readonly CatalogSubBlock[], + field: string +): Scalar | undefined { + const subBlock = candidates.find((candidate) => candidate.id === field) + if (!subBlock) return undefined + const { defaultValue } = subBlock + if (typeof defaultValue === 'string' || typeof defaultValue === 'number') return defaultValue + if (typeof defaultValue === 'boolean') return defaultValue + return Array.isArray(subBlock.options) ? subBlock.options[0]?.id : undefined +} + +function renderProperty(param: Param, required: boolean, indent: string): string[] { + return [ + ...jsdoc(param.doc, indent), + `${indent}${propertyKey(param.name)}${required ? '' : '?'}: ${param.type}`, + ] +} + +function isRequired(param: Param, requiredByVisibility: boolean): boolean { + return requiredByVisibility && !hasDefault(param.members) +} + +function renderParamsType( + params: readonly Param[], + gate: Gate | null, + candidates: readonly CatalogSubBlock[] +): string { + const gated = new Set() + if (gate) { + gated.add(gate.field) + for (const variant of gate.variants) for (const p of variant.params) gated.add(p.name) + } + const common = params.filter((param) => !gated.has(param.name)) + const commonLines = common.flatMap((param) => + renderProperty(param, isRequired(param, param.visibility.required), ' ') + ) + const commonType = commonLines.length > 0 ? `{\n${commonLines.join('\n')}\n}` : '{}' + if (!gate) return commonType + const gateParam = params.find((param) => param.name === gate.field) + const fallback = defaultGateValue(candidates, gate.field) + const variants = gate.variants.map((variant) => { + const optional = fallback !== undefined && variant.values.includes(fallback) + const lines: string[] = [ + ...jsdoc(gateParam?.doc ?? [], ' '), + ` ${propertyKey(gate.field)}${optional ? '?' : ''}: ${union(variant.values.map(literal))}`, + ] + for (const { name, required } of variant.params) { + const param = params.find((candidate) => candidate.name === name) + if (!param) continue + const doc = param.doc.filter((line) => !line.startsWith('@when')) + lines.push(...renderProperty({ ...param, doc }, isRequired(param, required), ' ')) + } + return ` | {\n${lines.join('\n')}\n }` + }) + const variantType = `(\n${variants.join('\n')}\n)` + return commonLines.length > 0 ? `${commonType} & ${variantType}` : variantType +} + +function typeParameterList(plan: DynamicOutputPlan | null, withConst: boolean): string { + if (!plan) return '' + const { name, constraint, fallback, isConst } = plan.typeParameter + return `<${withConst && isConst ? 'const ' : ''}${name} extends ${constraint} = ${fallback}>` +} + +function buildParams( + block: CatalogBlock, + entry: BuilderEntry, + plan: DynamicOutputPlan | null +): { + params: Param[] + gate: Gate | null + candidates: CatalogSubBlock[] + context: VisibilityContext +} { + const candidates = candidateSubBlocks(block, entry) + const context = buildVisibilityContext(candidates, pinnedValues(entry), entry.builder.operation) + const coreParams = new Set(entry.special?.coreParams ?? []) + const params: Param[] = [] + for (const [name, members] of groupParams(candidates)) { + if (coreParams.has(name)) continue + const visibility = classifyParam(members, context) + if (visibility.kind === 'never') continue + let type = union( + members.flatMap((member) => { + const mapped = mapSubBlock(member) + return mapped ? [mapped.type] : [] + }) + ) + if (plan && plan.param.name === name) type = plan.param.type + else if (plan?.paramOverrides[name]) type = plan.paramOverrides[name] + params.push({ name, members, visibility, type, doc: paramDoc(members, visibility) }) + } + const alwaysVisible = new Set( + params.filter((param) => param.visibility.kind === 'always').map((param) => param.name) + ) + const gate = findGate(params, context, alwaysVisible) + return { params, gate, candidates, context } +} + +function builderTypes(catalog: BlockCatalog, entry: BuilderEntry): BuilderTypes { + const block = catalog.blocks[entry.builder.type] + const outputs = outputSource(catalog, block, entry) + const spec = block.dynamicOutputs ?? null + const plan = spec && !entry.special ? dynamicOutputPlan(spec, outputs) : null + const { params, gate, candidates, context } = buildParams(block, entry, plan) + const paramsName = `${entry.typeName}Params` + const outputName = `${entry.typeName}Output` + const generic = typeParameterList(plan, false) + const genericArgs = plan ? `<${plan.typeParameter.name}>` : '' + const outputGeneric = plan && Object.keys(plan.outputOverrides).length > 0 + const members = builderOutputs(outputs, context, plan?.outputOverrides ?? {}) + const paramsDeclaration = `export type ${paramsName}${generic} = ${renderParamsType(params, gate, candidates)}` + const output: BuilderOutput = { + name: outputName, + typeParameters: outputGeneric ? generic : '', + typeArguments: outputGeneric ? genericArgs : '', + body: renderMembers(members, ' ').join('\n'), + } + const outputRef = `${outputName}${outputGeneric ? genericArgs : ''}` + const outputType = plan?.outputExtension ? `${outputRef} & ${plan.outputExtension}` : outputRef + const method = entry.path[entry.path.length - 1] + const label = entry.builder.operation ? operationLabel(block, entry.builder.operation) : undefined + const summary = [ + `${block.name}${label ? `: ${label}` : ''}`, + entry.builder.operation ? `(operation \`${entry.builder.operation}\`)` : '', + entry.builder.triggerMode ? '(trigger mode)' : '', + ] + .filter(Boolean) + .join(' ') + const signature = entry.special + ? [] + : [ + ...jsdoc([summary], ''), + `export function ${method}${typeParameterList(plan, true)}(name: string, params: ${paramsName}${genericArgs}, meta?: BlockMeta): Block<${outputType}>`, + ] + const tool = + !entry.special && + block.category === 'tools' && + !entry.builder.triggerMode && + entry.path.length > 1 + ? [ + ...jsdoc([`${summary}, as an agent tool`], ''), + `export function ${method}(params?: Partial<${paramsName}>, options?: ToolOpts): Tool`, + ] + : null + const special = entry.special + ? `${entry.key}: { params: ${paramsName}; output: ${outputName} }` + : null + return { + params: paramsDeclaration, + output, + signature, + tool, + special, + exportedTypes: [paramsName, outputName], + } +} + +function stripComments(text: string): string { + return text.replace(/\/\*\*[\s\S]*?\*\//g, '').replace(/^\s*\/\/.*$/gm, '') +} + +function coreImports(text: string): string { + const code = stripComments(text) + const used = CORE_TYPE_NAMES.filter((name) => new RegExp(`\\b${name}\\b`).test(code)) + return used.length > 0 ? `import type { ${used.join(', ')} } from '@sim/workflow-sdk'\n` : '' +} + +interface NamespaceNode { + functions: string[][] + tools: string[][] + children: Map +} + +function emptyNode(): NamespaceNode { + return { functions: [], tools: [], children: new Map() } +} + +function renderNamespace(node: NamespaceNode): string[] { + const lines: string[] = [] + for (const fn of node.functions) lines.push(...fn) + if (node.tools.length > 0) { + lines.push(`export namespace ${TOOL_NAMESPACE} {`) + for (const fn of node.tools) lines.push(...indentLines(fn, ' ')) + lines.push('}') + } + const names = [...node.children.keys()].sort(compareStrings) + for (const name of names) { + const child = node.children.get(name) + if (!child) continue + lines.push(`export namespace ${name} {`) + lines.push(...indentLines(renderNamespace(child), ' ')) + lines.push('}') + } + return lines +} + +function safeFileSegment(value: string): string { + return value.replace(/[^A-Za-z0-9_-]/g, '_') +} + +function outputSignature(output: BuilderOutput): string { + return `${output.typeParameters}\u0000${output.body}` +} + +function interfaceDeclaration(name: string, output: BuilderOutput): string { + return output.body + ? `export interface ${name}${output.typeParameters} {\n${output.body}\n}` + : `export interface ${name}${output.typeParameters} {}` +} + +/** + * Output bodies two or more builders of one block share, declared once in the block file + * (`SlackV2Output`, `SlackV2Output2`, ...) so per-operation files alias them instead of repeating + * a block-wide output list. + */ +function sharedOutputs( + type: string, + outputs: readonly BuilderOutput[] +): Map { + const counts = new Map() + for (const output of outputs) { + const signature = outputSignature(output) + counts.set(signature, (counts.get(signature) ?? 0) + 1) + } + const shared = new Map() + const base = `${pascal([type])}Output` + for (const output of outputs) { + const signature = outputSignature(output) + if ((counts.get(signature) ?? 0) < 2 || shared.has(signature)) continue + const name = shared.size === 0 ? base : `${base}${shared.size + 1}` + shared.set(signature, { name, output }) + } + return shared +} + +function generateBlockFiles( + catalog: BlockCatalog, + type: string, + entries: readonly BuilderEntry[] +): SdkTypeFile[] { + const files: SdkTypeFile[] = [] + const root = emptyNode() + const inlineDeclarations: string[] = [] + const operationImports: string[] = [] + const specials: string[] = [] + const usedOperationFiles = new Set() + const built = entries.map((entry) => ({ entry, types: builderTypes(catalog, entry) })) + const shared = sharedOutputs( + type, + built.map(({ types }) => types.output) + ) + const sharedDeclarations = [...shared.values()].map( + ({ name, output }) => `${interfaceDeclaration(name, output)}\n` + ) + for (const { entry, types } of built) { + const sharedOutput = shared.get(outputSignature(types.output)) + const outputDeclaration = sharedOutput + ? `export type ${types.output.name}${types.output.typeParameters} = ${sharedOutput.name}${types.output.typeArguments}` + : interfaceDeclaration(types.output.name, types.output) + const declarations = [types.params, '', outputDeclaration] + if (entry.builder.operation !== undefined) { + let base = safeFileSegment(entry.builder.operation) + if (usedOperationFiles.has(base)) base = `${base}.${entry.typeName}` + usedOperationFiles.add(base) + const body = declarations.join('\n') + const sharedImport = sharedOutput + ? `import type { ${sharedOutput.name} } from '../../blocks/${type}'\n` + : '' + files.push({ + path: `operations/${type}/${base}.d.ts`, + text: `${header(catalog.sdkMajor)}\n${coreImports(body)}${sharedImport}\n${body}\n`, + }) + operationImports.push( + `import type { ${types.exportedTypes.join(', ')} } from '../operations/${type}/${base}'` + ) + } else { + inlineDeclarations.push(...declarations, '') + } + let node = root + for (const segment of entry.path.slice(0, -1)) { + let child = node.children.get(segment) + if (!child) { + child = emptyNode() + node.children.set(segment, child) + } + node = child + } + if (types.signature.length > 0) node.functions.push(types.signature) + if (types.tool) node.tools.push(types.tool) + if (types.special) specials.push(types.special) + } + const moduleBody = renderNamespace(root) + if (specials.length > 0) { + moduleBody.push('interface SpecialBuilderTypes {', ...specials.map((s) => ` ${s}`), '}') + } + const declarations = [...sharedDeclarations, ...inlineDeclarations].join('\n') + const augmentation = [ + `declare module '@sim/workflow-sdk' {`, + ...indentLines(moduleBody, ' '), + '}', + ].join('\n') + const imports = [coreImports(`${declarations}\n${augmentation}`).trimEnd(), ...operationImports] + .filter(Boolean) + .join('\n') + files.push({ + path: `blocks/${type}.d.ts`, + text: [ + header(catalog.sdkMajor), + imports, + '', + declarations.trimEnd(), + declarations.trim() ? '' : null, + augmentation, + '', + ] + .filter((part): part is string => part !== null) + .join('\n'), + }) + return files +} + +function modelIds(catalog: BlockCatalog): string[] { + const ids = new Set() + for (const block of Object.values(catalog.blocks)) { + for (const subBlock of block.subBlocks) { + if (subBlock.id !== 'model' || subBlock.type !== 'combobox') continue + if (!Array.isArray(subBlock.options)) continue + for (const option of subBlock.options) ids.add(option.id) + } + } + return [...ids].sort(compareStrings) +} + +function generateModelsFile(catalog: BlockCatalog): SdkTypeFile { + const members = modelIds(catalog).map((id) => ` ${quote(id)}: true`) + const body = + members.length > 0 ? [' interface ModelIds {', ...members, ' }'] : [' interface ModelIds {}'] + return { + path: 'models.d.ts', + text: [ + header(catalog.sdkMajor), + 'export {}', + '', + `declare module '@sim/workflow-sdk' {`, + ...body, + '}', + '', + ].join('\n'), + } +} + +/** Generates every `.d.ts` file for a catalog, sorted by path. */ +export const generateSdkTypes: GenerateSdkTypesFn = (catalog) => { + const byType = new Map() + for (const entry of builderEntries(catalog)) { + const list = byType.get(entry.builder.type) + if (list) list.push(entry) + else byType.set(entry.builder.type, [entry]) + } + const types = [...byType.keys()].sort(compareStrings) + const files: SdkTypeFile[] = [generateModelsFile(catalog)] + for (const type of types) { + files.push(...generateBlockFiles(catalog, type, byType.get(type) ?? [])) + } + files.push({ + path: 'index.d.ts', + text: [ + `${HEADER_PREFIX} ${catalog.sdkMajor} · generated from block catalog ${catalog.hash}; do not edit`, + `import './models'`, + ...types.map((type) => `import './blocks/${type}'`), + '', + 'export {}', + '', + ].join('\n'), + }) + return files.sort((a, b) => compareStrings(a.path, b.path)) +} diff --git a/packages/workflow-sdk/src/codegen/index.ts b/packages/workflow-sdk/src/codegen/index.ts new file mode 100644 index 00000000000..bf23cc20880 --- /dev/null +++ b/packages/workflow-sdk/src/codegen/index.ts @@ -0,0 +1,7 @@ +export { type GenerateSdkTypesFn, generateSdkTypes, type SdkTypeFile } from './generate' +export { + type GenerateWorkspaceTypesFn, + generateWorkspaceTypes, + type WorkspaceManifest, + type WorkspaceManifestColumn, +} from './workspace' diff --git a/packages/workflow-sdk/src/codegen/map-subblock.ts b/packages/workflow-sdk/src/codegen/map-subblock.ts new file mode 100644 index 00000000000..d2959042c6b --- /dev/null +++ b/packages/workflow-sdk/src/codegen/map-subblock.ts @@ -0,0 +1,184 @@ +/** + * SubBlock type → TS param type (s2 §2 "Mapping each subBlock type"). Every one of the 48 + * `SubBlockType`s has an arm; the `never` check makes a new type a compile error here. + * + * Types reference names exported by `core.d.ts` (`Value`, `Picked`, `Binding`, ...). A basic/advanced + * pair is the union of its members' types, so the mode follows from the kind of value written + * (build-spec decision 7): a selector-kind constructor is basic, a plain value or reference is + * advanced. + */ + +import type { CatalogSubBlock } from '@sim/workflow-code' +import type { SubBlockType } from '@sim/workflow-types/blocks' +import { arrayOf, literal, quote, union } from './emit' + +interface MappedType { + /** The TS type expression. */ + type: string + /** Extra JSDoc lines (bounds, selector keys, hints). */ + doc: string[] +} + +/** SubBlock types that are display-only or server-managed and never written in source. */ +const EXCLUDED_SUBBLOCK_TYPES: ReadonlySet = new Set([ + 'text', + 'schedule-info', + 'webhook-config', + 'workflow-output-selector', + 'modal', +]) + +function staticOptions(subBlock: CatalogSubBlock): string[] | null { + if (!Array.isArray(subBlock.options) || subBlock.options.length === 0) return null + return subBlock.options.map((option) => literal(option.id)) +} + +function selectorDoc(subBlock: CatalogSubBlock): string[] { + return subBlock.selectorKey ? [`Picked from \`${subBlock.selectorKey}\`.`] : [] +} + +function bounds(subBlock: CatalogSubBlock): string[] { + const parts: string[] = [] + if (subBlock.min !== undefined) parts.push(`min ${subBlock.min}`) + if (subBlock.max !== undefined) parts.push(`max ${subBlock.max}`) + if (subBlock.step !== undefined) parts.push(`step ${subBlock.step}`) + if (subBlock.integer) parts.push('integer') + return parts.length > 0 ? [`Range: ${parts.join(', ')}.`] : [] +} + +function isKeyValueTable(columns: readonly string[] | undefined): boolean { + return ( + columns !== undefined && + columns.length === 2 && + /^(key|name)$/i.test(columns[0]) && + /^value$/i.test(columns[1]) + ) +} + +function tableType(subBlock: CatalogSubBlock): string { + const { columns } = subBlock + if (isKeyValueTable(columns)) return 'Record>' + if (columns && columns.length > 0) { + const row = columns.map((column) => `${quote(column)}?: Value`).join('; ') + return `Array<{ ${row} }>` + } + return 'Record> | Array>>' +} + +function codeType(subBlock: CatalogSubBlock): string { + return subBlock.language === 'json' ? 'JsonWithRefs | Template' : 'Template | string' +} + +function dropdownType(subBlock: CatalogSubBlock): string { + const options = staticOptions(subBlock) + const item = options ? union(options) : 'string' + if (subBlock.multiple) return options ? arrayOf(item) : 'Value | string[]' + return options ? item : 'Value' +} + +/** Maps one subBlock to its param type, or `null` when it is never written in source. */ +export function mapSubBlock(subBlock: CatalogSubBlock): MappedType | null { + const type: SubBlockType = subBlock.type + if (EXCLUDED_SUBBLOCK_TYPES.has(type) || subBlock.valueKind === 'none') return null + const doc: string[] = [] + if (subBlock.password) doc.push('Secret: prefer `env.NAME`.') + switch (type) { + case 'short-input': + case 'long-input': + return { type: 'Value', doc } + case 'dropdown': + return { type: dropdownType(subBlock), doc: [...doc, ...selectorDoc(subBlock)] } + case 'combobox': { + if (subBlock.id === 'model') return { type: 'Value>', doc } + const options = staticOptions(subBlock) + return { + type: options ? `Value>` : 'Value', + doc: [...doc, ...selectorDoc(subBlock)], + } + } + case 'slider': + return { type: 'Value', doc: [...doc, ...bounds(subBlock)] } + case 'switch': + return { type: 'Value', doc } + case 'time-input': + return { type: 'TimeString | AnyRef | Template', doc: [...doc, 'Time as `HH:MM`.'] } + case 'table': + return { type: tableType(subBlock), doc } + case 'code': + return { type: codeType(subBlock), doc } + case 'checkbox-list': + case 'grouped-checkbox-list': { + const options = staticOptions(subBlock) + return { type: options ? arrayOf(union(options)) : 'string[]', doc } + } + case 'oauth-input': + return { + type: 'Binding', + doc: [...doc, ...(subBlock.serviceId ? [`Service: \`${subBlock.serviceId}\`.`] : [])], + } + case 'channel-selector': + case 'user-selector': + case 'file-selector': + case 'sheet-selector': + case 'project-selector': + case 'document-selector': + case 'column-selector': + case 'mcp-server-selector': + case 'mcp-tool-selector': + return { type: 'Picked', doc: [...doc, ...selectorDoc(subBlock)] } + case 'folder-selector': + return subBlock.resourceKind === 'file-folder' + ? { type: 'FolderRef', doc } + : { type: 'Picked', doc: [...doc, ...selectorDoc(subBlock)] } + case 'knowledge-base-selector': + return { type: 'KnowledgeBaseRef', doc } + case 'table-selector': + return { type: 'TableRef', doc } + case 'workflow-selector': + return { type: 'WorkflowRef', doc } + case 'file-upload': + return { type: subBlock.multiple ? 'Upload | Upload[]' : 'Upload', doc } + case 'tool-input': + return { type: 'Tool[]', doc } + case 'skill-input': + return { type: 'SkillRef[]', doc } + case 'condition-input': + case 'router-input': + return { type: 'Record', doc } + case 'input-format': + return { type: 'InputFields', doc } + case 'response-format': + return { type: 'ResponseFields', doc } + case 'messages-input': + return { type: 'Message[]', doc } + case 'variables-input': + return { type: 'VariableAssignment[]', doc } + case 'input-mapping': + case 'workflow-input-mapper': + return { type: 'InputMapping', doc } + case 'filter-builder': + return { type: 'Filter', doc } + case 'sort-builder': + return { type: 'Sort', doc } + case 'knowledge-tag-filters': + return { type: 'TagFilter[]', doc } + case 'document-tag-entry': + return { type: 'DocumentTag[]', doc } + case 'mcp-dynamic-args': + return { type: 'Record', doc } + case 'eval-input': + return { type: 'EvalMetric[]', doc } + case 'model-fallback-list': + return { type: 'ModelFallback[]', doc } + case 'text': + case 'schedule-info': + case 'webhook-config': + case 'workflow-output-selector': + case 'modal': + return null + default: { + const unhandled: never = type + throw new Error(`map-subblock: no mapping for subBlock type ${String(unhandled)}`) + } + } +} diff --git a/packages/workflow-sdk/src/codegen/names.ts b/packages/workflow-sdk/src/codegen/names.ts new file mode 100644 index 00000000000..dd8afc59e28 --- /dev/null +++ b/packages/workflow-sdk/src/codegen/names.ts @@ -0,0 +1,116 @@ +/** + * Builder names come from the catalog's frozen `builders` map (`apps/sim/blocks/sdk-names.json`, + * owned by Wave 2A; build-spec decision 7). Codegen never invents a method name: it validates the + * map, splits each dotted path into namespaces, and names the generated type aliases after it. + */ + +import { type BlockCatalog, type CatalogBuilder, SDK_CORE_EXPORTS } from '@sim/workflow-code' +import { isIdentifier, pascal, RESERVED_WORDS } from './emit' + +/** + * Builders `core.d.ts` declares itself, because their source form is special (named branches, + * function code files, a typed human form). Generated files type their params and outputs through + * `SpecialBuilderTypes`. `coreParams` are the params the core signature owns, dropped from the + * generated params type. + */ +const SPECIAL_BUILDERS: Readonly> = { + condition: { coreParams: ['conditions'] }, + router: { coreParams: ['routes'] }, + fn: { coreParams: ['code'] }, + runWorkflow: { coreParams: [] }, + human: { coreParams: ['inputFormat'] }, + response: { coreParams: [] }, + setVariables: { coreParams: [] }, + note: { coreParams: [] }, +} + +/** + * Core exports a generated namespace may merge with: functions (`table.insertRow` beside + * `table('leads')`) and the empty `trigger` / `legacy` namespaces. Consts (`env`, `loop`, `js`, + * ...) cannot merge. + */ +const MERGEABLE_CORE_EXPORTS: ReadonlySet = new Set([ + 'binding', + 'customTool', + 'folder', + 'kb', + 'legacy', + 'mcp', + 'picked', + 'sandbox', + 'skill', + 'table', + 'trigger', + 'upload', + 'workflow', +]) + +const CORE_EXPORTS: ReadonlySet = new Set(SDK_CORE_EXPORTS) + +/** The namespace each tool-form builder is exposed under: `slack.tool.sendMessage(...)`. */ +export const TOOL_NAMESPACE = 'tool' + +export interface BuilderEntry { + /** The dotted SDK path (`slack.sendMessage`). */ + key: string + /** `key` split on dots. */ + path: string[] + builder: CatalogBuilder + /** Set for builders `core.d.ts` declares. */ + special?: { coreParams: readonly string[] } + /** Prefix for generated type aliases (`SlackSendMessage`). */ + typeName: string +} + +function compareKeys(a: string, b: string): number { + return a < b ? -1 : a > b ? 1 : 0 +} + +/** + * Validates the builders map and returns its entries sorted by key. Throws on a name the emitter + * cannot declare: a non-identifier or reserved segment, a root that redeclares a core value, a + * `tool` segment that would hide the tool form, or a builder whose block type is missing. + */ +export function builderEntries(catalog: BlockCatalog): BuilderEntry[] { + const keys = Object.keys(catalog.builders).sort(compareKeys) + const entries: BuilderEntry[] = [] + const namespaces = new Set() + for (const key of keys) { + const path = key.split('.') + for (let depth = 1; depth < path.length; depth++) namespaces.add(path.slice(0, depth).join('.')) + } + for (const key of keys) { + const builder = catalog.builders[key] + const path = key.split('.') + for (const segment of path) { + if (!isIdentifier(segment) || RESERVED_WORDS.has(segment)) { + throw new Error( + `sdk codegen: builder \`${key}\` has segment \`${segment}\`, which cannot name a declaration` + ) + } + } + if (!catalog.blocks[builder.type]) { + throw new Error( + `sdk codegen: builder \`${key}\` names unknown block type \`${builder.type}\`` + ) + } + if (namespaces.has(key)) { + throw new Error(`sdk codegen: builder \`${key}\` is also a namespace of other builders`) + } + if (path.length > 1 && path[path.length - 1] === TOOL_NAMESPACE) { + throw new Error( + `sdk codegen: builder \`${key}\` collides with the \`${TOOL_NAMESPACE}\` namespace` + ) + } + const root = path[0] + const special = path.length === 1 ? SPECIAL_BUILDERS[root] : undefined + if (path.length === 1 && !special && CORE_EXPORTS.has(root)) { + throw new Error(`sdk codegen: builder \`${key}\` redeclares a core export`) + } + if (path.length > 1 && CORE_EXPORTS.has(root) && !MERGEABLE_CORE_EXPORTS.has(root)) { + throw new Error(`sdk codegen: namespace \`${root}\` collides with a core export`) + } + entries.push({ key, path, builder, special, typeName: pascal(path) }) + } + return entries +} diff --git a/packages/workflow-sdk/src/codegen/outputs.ts b/packages/workflow-sdk/src/codegen/outputs.ts new file mode 100644 index 00000000000..f013ed1195f --- /dev/null +++ b/packages/workflow-sdk/src/codegen/outputs.ts @@ -0,0 +1,152 @@ +/** + * Output types for a builder (s2 D8). Static outputs come from the catalog, narrowed per + * operation by `OutputCondition` with the same three-way evaluator as params: an output that is + * never available for the builder is dropped, one that depends on other fields keeps a `@when`. + * Nested outputs recurse to {@link MAX_OUTPUT_DEPTH}, then fall back to `Json`. + * + * Dynamic outputs (contract amendment 5, `dynamicOutputs: { source, param }`) are inferred from + * the param value through const generics; {@link dynamicOutputPlan} says which generic a builder + * takes and how it changes params and outputs. + */ + +import type { CatalogDynamicOutputs, CatalogOutput } from '@sim/workflow-code' +import { arrayOf, jsdoc, propertyKey } from './emit' +import { evaluateClause, type VisibilityContext } from './visibility' + +const MAX_OUTPUT_DEPTH = 4 + +function outputType(output: CatalogOutput, depth: number): string { + if (depth > MAX_OUTPUT_DEPTH) return 'Json' + switch (output.type) { + case 'string': + return 'string' + case 'number': + return 'number' + case 'boolean': + return 'boolean' + case 'file': + return 'SimFile' + case 'file[]': + return 'SimFile[]' + case 'array': + return output.items ? arrayOf(outputType(output.items, depth + 1)) : 'Json[]' + case 'json': + return output.properties && Object.keys(output.properties).length > 0 + ? objectType(output.properties, depth + 1) + : 'Json' + default: + return 'Json' + } +} + +function objectType(properties: Record, depth: number): string { + if (depth > MAX_OUTPUT_DEPTH) return 'Json' + const members = Object.keys(properties).map( + (key) => `${propertyKey(key)}: ${outputType(properties[key], depth)}` + ) + return `{ ${members.join('; ')} }` +} + +interface OutputMember { + name: string + type: string + doc: string[] +} + +/** + * The outputs a builder exposes, in catalog order, with `overrides` replacing a member's type + * (dynamic outputs such as typed table rows). + */ +export function builderOutputs( + outputs: Record, + context: VisibilityContext, + overrides: Readonly> = {} +): OutputMember[] { + const members: OutputMember[] = [] + for (const name of Object.keys(outputs)) { + const output = outputs[name] + const doc: string[] = output.description ? [output.description] : [] + if (output.condition) { + const available = evaluateClause(output.condition, context, {}) + if (available === false) continue + if (available === null) doc.push(`@when depends on ${output.condition.field}`) + } + members.push({ name, type: overrides[name] ?? outputType(output, 1), doc }) + } + return members +} + +/** Renders output members as a type literal body, one member per line. */ +export function renderMembers(members: readonly OutputMember[], indent: string): string[] { + const lines: string[] = [] + for (const member of members) { + lines.push(...jsdoc(member.doc, indent)) + lines.push(`${indent}${propertyKey(member.name)}: ${member.type}`) + } + return lines +} + +export interface DynamicOutputPlan { + /** The type parameter declaration, e.g. `const RF extends ResponseFormat | undefined = undefined`. */ + typeParameter: { name: string; constraint: string; fallback: string; isConst: boolean } + /** The param that carries the generic, and its type. */ + param: { name: string; type: string } + /** Extra param types keyed by param name (typed table data). */ + paramOverrides: Record + /** Output member types replaced by the generic. */ + outputOverrides: Record + /** A type intersected with the static outputs. */ + outputExtension: string | null +} + +/** + * How a block's dynamic outputs become a const generic. `null` for `humanForm`, which `core.d.ts` + * types on `human()` itself. + */ +export function dynamicOutputPlan( + spec: CatalogDynamicOutputs, + outputs: Record +): DynamicOutputPlan | null { + switch (spec.source) { + case 'responseFormat': + return { + typeParameter: { + name: 'RF', + constraint: 'ResponseFormat | undefined', + fallback: 'undefined', + isConst: true, + }, + param: { name: spec.param, type: 'RF' }, + paramOverrides: {}, + outputOverrides: {}, + outputExtension: 'ResponseFormatOutput', + } + case 'inputFormat': + return { + typeParameter: { + name: 'F', + constraint: 'InputFields', + fallback: 'Record', + isConst: true, + }, + param: { name: spec.param, type: 'F' }, + paramOverrides: {}, + outputOverrides: {}, + outputExtension: 'InputFieldsOutput', + } + case 'tableRows': { + const outputOverrides: Record = {} + if (outputs.row) outputOverrides.row = 'TableRow' + if (outputs.rows) outputOverrides.rows = 'TableRow[]' + return { + typeParameter: { name: 'T', constraint: 'string', fallback: 'string', isConst: false }, + param: { name: spec.param, type: 'TableRef | Value' }, + paramOverrides: { data: 'TableData | Template', rows: 'TableData[] | Template' }, + outputOverrides, + outputExtension: null, + } + } + case 'humanForm': + return null + } +} diff --git a/packages/workflow-sdk/src/codegen/visibility.test.ts b/packages/workflow-sdk/src/codegen/visibility.test.ts new file mode 100644 index 00000000000..114d9cfbcc7 --- /dev/null +++ b/packages/workflow-sdk/src/codegen/visibility.test.ts @@ -0,0 +1,179 @@ +import type { CatalogSubBlock } from '@sim/workflow-code' +import { describe, expect, it } from 'vitest' +import { + buildVisibilityContext, + classifyParam, + findGate, + MAX_COMBINATIONS, + type ParamVisibility, +} from './visibility' + +function subBlock( + overrides: Partial & Pick +): CatalogSubBlock { + return { type: 'short-input', valueKind: 'string', storage: 'native', ...overrides } +} + +function dropdown(id: string, options: string[]): CatalogSubBlock { + return subBlock({ + id, + type: 'dropdown', + options: options.map((option) => ({ id: option, label: option })), + }) +} + +describe('classifyParam', () => { + it('classifies by the pinned operation: always, never, sometimes', () => { + const candidates = [ + dropdown('authMethod', ['oauth', 'bot_token']), + subBlock({ id: 'text', required: true, condition: { field: 'operation', value: 'send' } }), + subBlock({ id: 'cursor', condition: { field: 'operation', value: 'list' } }), + subBlock({ id: 'botToken', condition: { field: 'authMethod', value: 'bot_token' } }), + ] + const context = buildVisibilityContext(candidates, { operation: 'send' }, 'send') + const [, text, cursor, botToken] = candidates.map((candidate) => + classifyParam([candidate], context) + ) + expect(text).toMatchObject({ kind: 'always', required: true }) + expect(cursor.kind).toBe('never') + expect(botToken).toMatchObject({ kind: 'sometimes', required: false }) + expect(botToken.when).toBe('authMethod is "bot_token"') + }) + + it('treats a field nobody enumerates as unknown, so the param is optional', () => { + const memory = subBlock({ + id: 'conversationId', + required: true, + condition: { field: 'model', value: ['gpt-5.5'] }, + }) + const context = buildVisibilityContext([memory], {}) + expect(classifyParam([memory], context)).toMatchObject({ + kind: 'sometimes', + required: false, + when: 'depends on model', + }) + }) + + it('reads visibleFor for a function condition, and keeps it optional when visible', () => { + const channel = subBlock({ + id: 'channel', + required: true, + condition: { opaque: true }, + visibleFor: { send: true, list_users: false }, + }) + const sendContext = buildVisibilityContext([channel], { operation: 'send' }, 'send') + const listContext = buildVisibilityContext([channel], { operation: 'list_users' }, 'list_users') + expect(classifyParam([channel], sendContext)).toMatchObject({ + kind: 'sometimes', + required: false, + }) + expect(classifyParam([channel], listContext).kind).toBe('never') + }) + + it('merges a duplicated id: visible wherever any declaration is', () => { + const copies = [ + subBlock({ id: 'temperature', condition: { field: 'provider', value: 'a' } }), + subBlock({ id: 'temperature', condition: { field: 'provider', value: 'b' } }), + ] + const context = buildVisibilityContext([dropdown('provider', ['a', 'b']), ...copies], {}) + expect(classifyParam(copies, context).kind).toBe('always') + }) + + it('evaluates `not` and `and` like evaluateSubBlockCondition', () => { + const field = subBlock({ + id: 'rerankerModel', + condition: { field: 'mode', value: 'x', not: true, and: { field: 'enabled', value: true } }, + }) + const context = buildVisibilityContext( + [dropdown('mode', ['x', 'y']), subBlock({ id: 'enabled', type: 'switch' }), field], + {} + ) + const visibility = classifyParam([field], context) + const visibleCombos = context.combos.filter((_, index) => visibility.visible[index]) + expect(visibleCombos).toEqual([{ enabled: true, mode: 'y' }]) + }) +}) + +describe('buildVisibilityContext', () => { + it(`caps combinations at ${MAX_COMBINATIONS}, dropping the widest siblings first`, () => { + const siblings = [ + dropdown( + 'wide', + Array.from({ length: 40 }, (_, i) => `w${i}`) + ), + dropdown('a', ['1', '2', '3', '4']), + dropdown('b', ['1', '2', '3', '4']), + dropdown('c', ['1', '2', '3', '4']), + dropdown('d', ['1', '2']), + ] + const reader = subBlock({ + id: 'reader', + condition: { field: 'wide', value: 'w1', and: { field: 'a', value: '1' } }, + required: { field: 'b', value: '1', and: { field: 'c', value: '1' } }, + }) + const dReader = subBlock({ id: 'dReader', condition: { field: 'd', value: '1' } }) + const context = buildVisibilityContext([...siblings, reader, dReader], {}) + expect(context.combos.length).toBeLessThanOrEqual(MAX_COMBINATIONS) + expect(context.siblings.map((sibling) => sibling.field)).not.toContain('wide') + expect(context.combos.length).toBe(32) + }) +}) + +describe('findGate', () => { + function gateFor(candidates: CatalogSubBlock[]) { + const context = buildVisibilityContext(candidates, {}) + const params = candidates.map((candidate) => ({ + name: candidate.canonicalParamId ?? candidate.id, + visibility: classifyParam([candidate], context) as ParamVisibility, + })) + const always = new Set(params.filter((p) => p.visibility.kind === 'always').map((p) => p.name)) + return findGate(params, context, always) + } + + it('nests one union level on a small dropdown that gates disjoint fields', () => { + const gate = gateFor([ + dropdown('authMethod', ['oauth', 'bot_token']), + subBlock({ + id: 'credential', + required: true, + condition: { field: 'authMethod', value: 'oauth' }, + }), + subBlock({ + id: 'botToken', + required: true, + condition: { field: 'authMethod', value: 'bot_token' }, + }), + ]) + expect(gate).toEqual({ + field: 'authMethod', + variants: [ + { values: ['oauth'], params: [{ name: 'credential', required: true }] }, + { values: ['bot_token'], params: [{ name: 'botToken', required: true }] }, + ], + }) + }) + + it('does not nest on a dropdown with more than four options', () => { + const options = ['a', 'b', 'c', 'd', 'e'] + expect( + gateFor([ + dropdown('kind', options), + subBlock({ id: 'onlyA', condition: { field: 'kind', value: 'a' } }), + ]) + ).toBeNull() + }) + + it('merges gate values whose fields are identical', () => { + const gate = gateFor([ + dropdown('memoryType', ['none', 'conversation', 'sliding_window']), + subBlock({ + id: 'conversationId', + condition: { field: 'memoryType', value: ['conversation', 'sliding_window'] }, + }), + ]) + expect(gate?.variants.map((variant) => variant.values)).toEqual([ + ['none'], + ['conversation', 'sliding_window'], + ]) + }) +}) diff --git a/packages/workflow-sdk/src/codegen/visibility.ts b/packages/workflow-sdk/src/codegen/visibility.ts new file mode 100644 index 00000000000..738488a2f42 --- /dev/null +++ b/packages/workflow-sdk/src/codegen/visibility.ts @@ -0,0 +1,365 @@ +/** + * The three-way visibility evaluator (s2 §2 "How visibility conditions become types"). + * + * For one builder (an operation, or a trigger mode), every candidate subBlock is evaluated against + * the builder's pinned values (`operation` and `fixed`) and every combination of the static + * siblings its conditions read: dropdowns with a static option list, and switches. Combinations + * are capped at {@link MAX_COMBINATIONS}; the widest siblings stop being enumerated first. A field + * nobody enumerates is unknown, so a condition on it is "sometimes". + * + * Evaluation mirrors `evaluateSubBlockCondition` (apps/sim/lib/workflows/subblocks/visibility.ts): + * strict equality, array values mean "one of", `not` negates, `and` must also hold. + */ + +import type { CatalogSubBlock } from '@sim/workflow-code' +import { isConditionClause, isOpaque } from './catalog' + +export const MAX_COMBINATIONS = 64 + +/** A dropdown with at most this many options may become one nested union level. */ +const MAX_GATE_OPTIONS = 4 + +export type Scalar = string | number | boolean + +/** Three-valued truth: `null` means the answer depends on a field nobody enumerates. */ +type Tri = boolean | null + +interface SiblingDomain { + field: string + values: Scalar[] +} + +export interface VisibilityContext { + /** Values the builder pins: its `operation` and `fixed` entries. */ + pinned: Readonly> + /** The pinned operation, for `visibleFor` on function conditions. */ + operation?: string + /** Enumerated siblings, sorted by field. */ + siblings: SiblingDomain[] + /** Every combination of sibling values (one empty combination when there are none). */ + combos: Array>> +} + +export interface ParamVisibility { + kind: 'always' | 'sometimes' | 'never' + /** True iff the param is visible and required in every combination. */ + required: boolean + /** Visibility per combination, aligned with `context.combos`. */ + visible: Tri[] + /** Visible and required per combination. */ + requiredIn: boolean[] + /** Human-readable `@when` text for a "sometimes" param. */ + when?: string +} + +type ClauseValue = Scalar | null | undefined | ReadonlyArray + +interface ClausePart { + field: string + value: ClauseValue + not?: boolean +} + +/** The shape shared by subBlock conditions and output conditions. */ +interface ConditionLike extends ClausePart { + and?: ClausePart +} + +function clauseFields(clause: ConditionLike): string[] { + return clause.and ? [clause.field, clause.and.field] : [clause.field] +} + +function referencedFields(subBlock: CatalogSubBlock): string[] { + const fields: string[] = [] + if (isConditionClause(subBlock.condition)) fields.push(...clauseFields(subBlock.condition)) + if (isConditionClause(subBlock.required)) fields.push(...clauseFields(subBlock.required)) + return fields +} + +function domainOf(subBlocks: readonly CatalogSubBlock[], field: string): Scalar[] | null { + const values: Scalar[] = [] + let found = false + for (const subBlock of subBlocks) { + if (subBlock.id !== field) continue + if (subBlock.type === 'switch') { + found = true + for (const value of [true, false]) if (!values.includes(value)) values.push(value) + continue + } + if (subBlock.type !== 'dropdown' || subBlock.multiple || !Array.isArray(subBlock.options)) { + return null + } + if (subBlock.options.length === 0) return null + found = true + for (const option of subBlock.options) if (!values.includes(option.id)) values.push(option.id) + } + return found ? values : null +} + +function product(domains: readonly SiblingDomain[]): number { + return domains.reduce((total, domain) => total * domain.values.length, 1) +} + +function byField(a: SiblingDomain, b: SiblingDomain): number { + return a.field < b.field ? -1 : a.field > b.field ? 1 : 0 +} + +/** + * Builds the evaluation context for one builder: which siblings to enumerate and every + * combination of their values. + */ +export function buildVisibilityContext( + candidates: readonly CatalogSubBlock[], + pinned: Readonly>, + operation?: string +): VisibilityContext { + const fields = new Set() + for (const subBlock of candidates) { + for (const field of referencedFields(subBlock)) { + if (!(field in pinned)) fields.add(field) + } + } + let siblings: SiblingDomain[] = [] + for (const field of fields) { + const values = domainOf(candidates, field) + if (values) siblings.push({ field, values }) + } + siblings.sort(byField) + while (product(siblings) > MAX_COMBINATIONS) { + const widest = [...siblings].sort( + (a, b) => b.values.length - a.values.length || byField(a, b) + )[0] + siblings = siblings.filter((sibling) => sibling !== widest) + } + let combos: Array> = [{}] + for (const sibling of siblings) { + combos = combos.flatMap((combo) => + sibling.values.map((value) => ({ ...combo, [sibling.field]: value })) + ) + } + return { pinned, operation, siblings, combos } +} + +function lookup( + context: VisibilityContext, + combo: Readonly>, + field: string +): { known: true; value: Scalar } | { known: false } { + if (field in context.pinned) return { known: true, value: context.pinned[field] } + if (field in combo) return { known: true, value: combo[field] } + return { known: false } +} + +function evalSingle( + clause: ClausePart, + context: VisibilityContext, + combo: Readonly> +): Tri { + const actual = lookup(context, combo, clause.field) + if (!actual.known) return null + const expected = clause.value + if (Array.isArray(expected)) { + const included = expected.includes(actual.value) + return clause.not ? !included : included + } + return clause.not ? actual.value !== expected : actual.value === expected +} + +function and(a: Tri, b: Tri): Tri { + if (a === false || b === false) return false + if (a === null || b === null) return null + return true +} + +/** Evaluates a condition clause; `null` when it reads a field that is not known. */ +export function evaluateClause( + clause: ConditionLike, + context: VisibilityContext, + combo: Readonly> +): Tri { + const head = evalSingle(clause, context, combo) + return clause.and ? and(head, evalSingle(clause.and, context, combo)) : head +} + +function visibleIn( + subBlock: CatalogSubBlock, + context: VisibilityContext, + combo: Readonly> +): Tri { + const { condition } = subBlock + if (condition === undefined) return true + if (isConditionClause(condition)) return evaluateClause(condition, context, combo) + if (isOpaque(condition) && context.operation !== undefined && subBlock.visibleFor) { + const visible = subBlock.visibleFor[context.operation] + // A function condition visible for the operation may still read other fields. + if (visible === false) return false + } + return null +} + +function requiredIn( + subBlock: CatalogSubBlock, + context: VisibilityContext, + combo: Readonly> +): boolean { + const { required } = subBlock + if (required === true) return true + if (isConditionClause(required)) return evaluateClause(required, context, combo) === true + return false +} + +function describeWhen( + members: readonly CatalogSubBlock[], + context: VisibilityContext, + visible: readonly Tri[] +): string { + const parts: string[] = [] + for (const sibling of context.siblings) { + const seen = new Set() + context.combos.forEach((combo, index) => { + if (visible[index] !== false) seen.add(combo[sibling.field]) + }) + if (seen.size < sibling.values.length) { + const values = sibling.values.filter((value) => seen.has(value)) + parts.push(`${sibling.field} is ${values.map((value) => JSON.stringify(value)).join(' | ')}`) + } + } + if (visible.includes(null)) { + const unknown = new Set() + let opaque = false + for (const member of members) { + if (isConditionClause(member.condition)) { + for (const field of clauseFields(member.condition)) { + if (!(field in context.pinned) && !context.siblings.some((s) => s.field === field)) { + unknown.add(field) + } + } + } else if (isOpaque(member.condition)) { + opaque = true + } + } + if (unknown.size > 0) parts.push(`depends on ${[...unknown].sort().join(', ')}`) + if (opaque) parts.push('depends on other fields') + } + return parts.join('; ') +} + +/** + * Classifies one param (one subBlock, a basic/advanced pair, or a duplicated id) across every + * combination: visible in a combination iff any member is. + */ +export function classifyParam( + members: readonly CatalogSubBlock[], + context: VisibilityContext +): ParamVisibility { + const visible: Tri[] = [] + const required: boolean[] = [] + for (const combo of context.combos) { + let anyTrue = false + let anyUnknown = false + let isRequired = false + for (const member of members) { + const memberVisible = visibleIn(member, context, combo) + if (memberVisible === true) { + anyTrue = true + if (requiredIn(member, context, combo)) isRequired = true + } else if (memberVisible === null) { + anyUnknown = true + } + } + visible.push(anyTrue ? true : anyUnknown ? null : false) + required.push(isRequired) + } + const kind = visible.every((value) => value === true) + ? 'always' + : visible.every((value) => value === false) + ? 'never' + : 'sometimes' + return { + kind, + required: kind === 'always' && required.every(Boolean), + visible, + requiredIn: required, + when: kind === 'sometimes' ? describeWhen(members, context, visible) : undefined, + } +} + +interface GateVariant { + /** The gate values this variant covers (variants with identical fields are merged). */ + values: Scalar[] + /** Gated params visible for these values, and whether each is required there. */ + params: Array<{ name: string; required: boolean }> +} + +export interface Gate { + field: string + variants: GateVariant[] +} + +/** + * Finds the one sibling dropdown (at most {@link MAX_GATE_OPTIONS} options, itself always + * visible) whose value alone decides the visibility of the most "sometimes" params, so the params + * type becomes one nested union level keyed on it. Returns `null` when no sibling gates anything. + */ +export function findGate( + params: ReadonlyArray<{ name: string; visibility: ParamVisibility }>, + context: VisibilityContext, + alwaysVisibleFields: ReadonlySet +): Gate | null { + let best: { field: string; gated: string[] } | null = null + for (const sibling of context.siblings) { + if (sibling.values.length > MAX_GATE_OPTIONS || sibling.values.length < 2) continue + if (typeof sibling.values[0] !== 'string') continue + if (!alwaysVisibleFields.has(sibling.field)) continue + const gated: string[] = [] + for (const param of params) { + if (param.visibility.kind !== 'sometimes' || param.name === sibling.field) continue + if (isDecidedBy(param.visibility, context, sibling)) gated.push(param.name) + } + if (gated.length > 0 && (!best || gated.length > best.gated.length)) { + best = { field: sibling.field, gated } + } + } + if (!best) return null + const gate = best + const sibling = context.siblings.find((candidate) => candidate.field === gate.field) + if (!sibling) return null + const variants: GateVariant[] = [] + for (const value of sibling.values) { + const indices = indicesWhere(context, sibling.field, value) + const variantParams: GateVariant['params'] = [] + for (const name of gate.gated) { + const param = params.find((candidate) => candidate.name === name) + if (!param || param.visibility.visible[indices[0]] !== true) continue + const required = indices.every((index) => param.visibility.requiredIn[index]) + variantParams.push({ name, required }) + } + const signature = JSON.stringify(variantParams) + const same = variants.find((variant) => JSON.stringify(variant.params) === signature) + if (same) same.values.push(value) + else variants.push({ values: [value], params: variantParams }) + } + return variants.length > 1 ? { field: gate.field, variants } : null +} + +function indicesWhere(context: VisibilityContext, field: string, value: Scalar): number[] { + const indices: number[] = [] + context.combos.forEach((combo, index) => { + if (combo[field] === value) indices.push(index) + }) + return indices +} + +function isDecidedBy( + visibility: ParamVisibility, + context: VisibilityContext, + sibling: SiblingDomain +): boolean { + for (const value of sibling.values) { + const indices = indicesWhere(context, sibling.field, value) + const first = visibility.visible[indices[0]] + if (first === null) return false + if (!indices.every((index) => visibility.visible[index] === first)) return false + } + return true +} diff --git a/packages/workflow-sdk/src/codegen/workspace.ts b/packages/workflow-sdk/src/codegen/workspace.ts new file mode 100644 index 00000000000..cadd6cd79d5 --- /dev/null +++ b/packages/workflow-sdk/src/codegen/workspace.ts @@ -0,0 +1,124 @@ +/** + * `generateWorkspaceTypes(manifest)`: one `workspace.d.ts` that narrows the SDK to a workspace's + * resources (s2 D6). It fills the `Workspace*` interfaces `core.d.ts` declares, so `table('leads')` + * types its rows, a misspelled `kb('dosc')` or `env.STRIPE_KYE` is an error, and so on. Written by + * `sim pull`; without it every key is a plain string. + */ + +import { compareStrings } from '@sim/utils/string' +import { propertyKey, quote, union } from './emit' +import type { SdkTypeFile } from './generate' + +/** A table column, as the table's schema declares it (apps/sim/lib/table/column-types). */ +export interface WorkspaceManifestColumn { + /** The column type id: `string`, `number`, `currency`, `boolean`, `date`, `json`, `select`, ... */ + type: string + /** Option values of a `select` column. */ + options?: string[] +} + +/** The workspace resources the SDK can name, by stable key. */ +export interface WorkspaceManifest { + tables?: Record }> + knowledgeBases?: string[] + /** Credential bindings, with the provider service each one is for. */ + bindings?: Record + /** Workflows by key, with the inputs their start block declares. */ + workflows?: Record }> + /** Environment variable names (never values). */ + env?: string[] +} + +export type GenerateWorkspaceTypesFn = (manifest: WorkspaceManifest) => SdkTypeFile + +function columnType(column: WorkspaceManifestColumn): string { + switch (column.type) { + case 'number': + case 'currency': + return 'number' + case 'boolean': + return 'boolean' + case 'json': + return 'Json' + case 'select': + return column.options && column.options.length > 0 + ? union(column.options.map(quote)) + : 'string' + default: + return 'string' + } +} + +function inputType(type: string): string { + switch (type) { + case 'number': + return 'number' + case 'boolean': + return 'boolean' + case 'array': + return 'Json[]' + case 'object': + return 'Json' + case 'file[]': + return 'SimFile[]' + default: + return 'string' + } +} + +function sortedKeys(record: Record | undefined): string[] { + return Object.keys(record ?? {}).sort(compareStrings) +} + +function interfaceBlock(name: string, members: readonly string[]): string[] { + if (members.length === 0) return [] + return [` interface ${name} {`, ...members.map((member) => ` ${member}`), ' }'] +} + +/** Generates `workspace.d.ts`. Deterministic: keys are sorted. */ +export const generateWorkspaceTypes: GenerateWorkspaceTypesFn = (manifest) => { + const tables = sortedKeys(manifest.tables).map((key) => { + const columns = manifest.tables?.[key]?.columns ?? {} + const fields = sortedKeys(columns).map( + (column) => `${propertyKey(column)}: ${columnType(columns[column])}` + ) + return `${quote(key)}: { ${fields.join('; ')} }` + }) + const knowledgeBases = [...new Set(manifest.knowledgeBases ?? [])] + .sort(compareStrings) + .map((key) => `${quote(key)}: true`) + const bindings = sortedKeys(manifest.bindings).map( + (key) => `${quote(key)}: { service: ${quote(manifest.bindings?.[key]?.service ?? '')} }` + ) + const workflows = sortedKeys(manifest.workflows).map((key) => { + const inputs = manifest.workflows?.[key]?.inputs ?? {} + const fields = sortedKeys(inputs).map( + (name) => `${propertyKey(name)}: ${inputType(inputs[name])}` + ) + return `${quote(key)}: { inputs: { ${fields.join('; ')} } }` + }) + const env = [...new Set(manifest.env ?? [])] + .sort(compareStrings) + .map((name) => `${propertyKey(name)}: true`) + const body = [ + ...interfaceBlock('WorkspaceTables', tables), + ...interfaceBlock('WorkspaceKnowledgeBases', knowledgeBases), + ...interfaceBlock('WorkspaceBindings', bindings), + ...interfaceBlock('WorkspaceWorkflows', workflows), + ...interfaceBlock('WorkspaceEnv', env), + ] + const text = body.join('\n') + const used = ['Json', 'SimFile'].filter((name) => new RegExp(`\\b${name}\\b`).test(text)) + return { + path: 'workspace.d.ts', + text: [ + '// @sim-sdk workspace · generated by `sim pull`; do not edit', + used.length > 0 ? `import type { ${used.join(', ')} } from '@sim/workflow-sdk'` : 'export {}', + '', + `declare module '@sim/workflow-sdk' {`, + ...body, + '}', + '', + ].join('\n'), + } +} diff --git a/packages/workflow-sdk/test/examples/approval-flow.ts b/packages/workflow-sdk/test/examples/approval-flow.ts new file mode 100644 index 00000000000..82158e91405 --- /dev/null +++ b/packages/workflow-sdk/test/examples/approval-flow.ts @@ -0,0 +1,49 @@ +// @sim-sdk 1 +import { + binding, + condition, + human, + js, + ref, + response, + router, + slack, + t, + trigger, + workflow, +} from '@sim/workflow-sdk' + +export default workflow('Approval flow', {}, () => { + const req = trigger.start('Start', { inputFormat: { amount: 'number', reason: 'string' } }) + const triage = router('Triage', { + context: t`${req.amount} for ${req.reason}`, + model: 'claude-sonnet-5-5', + routes: { small: 'Under $100, auto-approve', review: 'Needs a manager' }, + }) + // A const cannot reference itself in its own initializer, so the block's own URL is a `ref`. + const approve = human('Manager approval', { + builderData: { amount: { type: 'number', value: req.amount } }, + notification: [ + slack.tool.sendMessage({ + oauthCredential: binding('ops-slack'), + channel: 'C0OPS', + text: t`Approve: ${ref('managerapproval.url')}`, + }), + ], + inputFormat: { approved: 'boolean', note: 'string' }, + }) + const decide = condition('Approved?', { yes: js`${approve.submission.approved}`, else: true }) + const done = response('Done', { + dataMode: 'structured', + builderData: { approved: { type: 'boolean', value: true } }, + }) + const notConfigured = condition('Not configured yet', {}) + + req.to(triage) + triage.small.to(done) + triage.review.to(approve).to(decide) + decide.yes.to(done) + decide.else.to(notConfigured) + notConfigured.if.to(done) + notConfigured.else.to(done) +}) diff --git a/packages/workflow-sdk/test/examples/lead-enrichment.ts b/packages/workflow-sdk/test/examples/lead-enrichment.ts new file mode 100644 index 00000000000..c7b36025336 --- /dev/null +++ b/packages/workflow-sdk/test/examples/lead-enrichment.ts @@ -0,0 +1,56 @@ +// @sim-sdk 1 +import { + api, + binding, + env, + file, + fn, + parallel, + runWorkflow, + slack, + t, + table, + trigger, + workflow, +} from '@sim/workflow-sdk' + +export default workflow('Lead enrichment', {}, () => { + const nightly = trigger.schedule('Nightly', { + scheduleType: 'daily', + dailyTime: '02:00', + timezone: 'UTC', + }) + const pending = table.queryRows('Pending leads', { + tableId: table('leads'), + filterInput: { status: { $eq: 'new' } }, + limit: '200', + }) + const enrichAll = parallel.collection( + 'Enrich', + { collection: pending.rows, batchSize: 10 }, + (p) => { + const lookup = api('Lookup', { + url: t`https://crm.example.com/c/${p.currentItem.email}`, + method: 'GET', + headers: { Authorization: t`Bearer ${env.CRM_KEY}` }, + }) + const score = fn('Score', { language: 'javascript', code: file('./functions/score.js') }) + const save = table.updateRowById('Save', { + tableId: table('leads'), + rowId: p.currentItem.id, + data: { score: score.result }, + }) + p.start.to(lookup).to(score).to(save) + } + ) + const handoff = runWorkflow('Hand off', { + workflowId: workflow('assign-owner'), + input: enrichAll.results, + }) + const legacyPing = slack.sendMessage( + 'Old ping', + { oauthCredential: binding('sales-slack'), channel: 'C0SALES', text: 'done' }, + { disabled: true } + ) + nightly.to(pending).to(enrichAll).to(handoff, legacyPing) +}) diff --git a/packages/workflow-sdk/test/examples/rag-doc-qa.ts b/packages/workflow-sdk/test/examples/rag-doc-qa.ts new file mode 100644 index 00000000000..b6f17f1c5f8 --- /dev/null +++ b/packages/workflow-sdk/test/examples/rag-doc-qa.ts @@ -0,0 +1,23 @@ +// @sim-sdk 1 +import { agent, kb, knowledge, response, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Doc QA', {}, () => { + const start = trigger.start('Start', { inputFormat: { question: 'string' } }) + const search = knowledge.search('Search docs', { + knowledgeBaseId: kb('docs'), + query: start.question, + topK: '5', + }) + const answer = agent('Answer', { + model: 'gpt-5.5', + messages: [ + { role: 'system', content: t`Answer only from these passages:\n${search.results}` }, + { role: 'user', content: start.question }, + ], + }) + const reply = response('Reply', { + dataMode: 'structured', + builderData: { answer: { type: 'string', value: answer.content } }, + }) + start.to(search).to(answer).to(reply) +}) diff --git a/packages/workflow-sdk/test/examples/scheduled-report.ts b/packages/workflow-sdk/test/examples/scheduled-report.ts new file mode 100644 index 00000000000..89f38a00727 --- /dev/null +++ b/packages/workflow-sdk/test/examples/scheduled-report.ts @@ -0,0 +1,43 @@ +// @sim-sdk 1 +import { + agent, + binding, + customTool, + gmail, + googleSheets, + mcp, + md, + note, + picked, + t, + trigger, + workflow, +} from '@sim/workflow-sdk' + +export default workflow('Invoice report', {}, () => { + const mail = trigger.gmail.poller('Invoice email', { + oauthCredential: binding('finance-gmail'), + labelIds: ['INBOX'], + markAsRead: true, + }) + const extract = agent('Extract', { + model: 'claude-sonnet-5-5', + messages: [{ role: 'user', content: t`Extract totals:\n${mail.email.bodyText}` }], + tools: [ + googleSheets.tool.appendData( + { oauthCredential: binding('finance-google'), spreadsheetId: picked('1AbC') }, + { usageControl: 'auto' } + ), + customTool('lookup-vendor'), + mcp('linear').tool('create_issue'), + ], + }) + const send = gmail.sendEmail('Send summary', { + oauthCredential: binding('finance-gmail'), + to: 'cfo@acme.com', + subject: 'Invoices', + body: extract.content, + }) + mail.to(extract).to(send) + note('How this works', { content: md`Polls **INBOX**; appends to the finance sheet.` }) +}) diff --git a/packages/workflow-sdk/test/examples/support-triage.ts b/packages/workflow-sdk/test/examples/support-triage.ts new file mode 100644 index 00000000000..a08ba0eeb4e --- /dev/null +++ b/packages/workflow-sdk/test/examples/support-triage.ts @@ -0,0 +1,71 @@ +// @sim-sdk 1 +import { + agent, + binding, + condition, + env, + js, + response, + slack, + t, + table, + trigger, + workflow, +} from '@sim/workflow-sdk' + +export default workflow( + 'Support triage', + { variables: { escalations: { type: 'number', value: 0 } } }, + () => { + const ticketIn = trigger.webhook('Ticket in', { + requireAuth: true, + token: env.TICKETS_WEBHOOK_TOKEN, + inputFormat: { subject: 'string', body: 'string', contacts: 'array' }, + }) + const classify = agent('Classify', { + model: 'claude-sonnet-5-5', + messages: [ + { role: 'system', content: 'Classify support tickets.' }, + { role: 'user', content: t`${ticketIn.subject}\n\n${ticketIn.body}` }, + ], + responseFormat: { + name: 'ticket', + strict: true, + schema: { + type: 'object', + additionalProperties: false, + required: ['category', 'urgent'], + properties: { + category: { type: 'string', enum: ['billing', 'bug', 'other'] }, + urgent: { type: 'boolean' }, + }, + }, + }, + }) + const byCategory = condition('By category', { + billing: js`${classify.category} === 'billing'`, + urgent: js`${classify.urgent} === true`, + else: true, + }) + const logTicket = table.insertRow('Log ticket', { + tableId: table('tickets'), + data: { subject: ticketIn.subject, category: classify.category }, + }) + const notify = slack.sendMessage('Notify', { + oauthCredential: binding('support-slack'), + channel: 'C0SUPPORT', + text: t`New ${classify.category} ticket: ${ticketIn.subject}`, + }) + const reply = response('Reply', { + dataMode: 'structured', + builderData: { ok: true, id: { type: 'string', value: logTicket.row.id } }, + }) + + ticketIn.to(classify).to(byCategory) + byCategory.billing.to(logTicket).to(notify) + byCategory.urgent.to(notify) + byCategory.else.to(reply) + notify.to(reply) + logTicket.onError(notify) + } +) diff --git a/packages/workflow-sdk/test/fixtures/catalog.json b/packages/workflow-sdk/test/fixtures/catalog.json new file mode 100644 index 00000000000..7cb4adb39d7 --- /dev/null +++ b/packages/workflow-sdk/test/fixtures/catalog.json @@ -0,0 +1,25188 @@ +{ + "catalogVersion": 1, + "hash": "fixture", + "sdkMajor": 1, + "blocks": { + "agent": { + "type": "agent", + "name": "Agent", + "category": "blocks", + "subBlocks": [ + { + "id": "messages", + "type": "messages-input", + "title": "Messages", + "condition": { + "field": "model", + "value": ["jev-latest", "jev-1.13.0", "jev-preview"], + "not": true + }, + "valueKind": "array", + "storage": "native" + }, + { + "id": "model", + "type": "combobox", + "title": "Model", + "required": true, + "defaultValue": "claude-sonnet-5-5", + "options": [ + { + "id": "azure-anthropic/claude-fable-5-1", + "label": "azure-anthropic/claude-fable-5-1" + }, + { + "id": "azure-anthropic/claude-haiku-4-5", + "label": "azure-anthropic/claude-haiku-4-5" + }, + { + "id": "azure-anthropic/claude-haiku-5-5", + "label": "azure-anthropic/claude-haiku-5-5" + }, + { + "id": "azure-anthropic/claude-opus-4-1", + "label": "azure-anthropic/claude-opus-4-1" + }, + { + "id": "azure-anthropic/claude-opus-4-5", + "label": "azure-anthropic/claude-opus-4-5" + }, + { + "id": "azure-anthropic/claude-opus-4-6", + "label": "azure-anthropic/claude-opus-4-6" + }, + { + "id": "azure-anthropic/claude-opus-4-7", + "label": "azure-anthropic/claude-opus-4-7" + }, + { + "id": "azure-anthropic/claude-opus-4-8", + "label": "azure-anthropic/claude-opus-4-8" + }, + { + "id": "azure-anthropic/claude-opus-5", + "label": "azure-anthropic/claude-opus-5" + }, + { + "id": "azure-anthropic/claude-opus-5-5", + "label": "azure-anthropic/claude-opus-5-5" + }, + { + "id": "azure-anthropic/claude-sonnet-4-5", + "label": "azure-anthropic/claude-sonnet-4-5" + }, + { + "id": "azure-anthropic/claude-sonnet-4-6", + "label": "azure-anthropic/claude-sonnet-4-6" + }, + { + "id": "azure-anthropic/claude-sonnet-5", + "label": "azure-anthropic/claude-sonnet-5" + }, + { + "id": "azure-anthropic/claude-sonnet-5-5", + "label": "azure-anthropic/claude-sonnet-5-5" + }, + { + "id": "azure/gpt-4.1", + "label": "azure/gpt-4.1" + }, + { + "id": "azure/gpt-4.1-mini", + "label": "azure/gpt-4.1-mini" + }, + { + "id": "azure/gpt-4.1-nano", + "label": "azure/gpt-4.1-nano" + }, + { + "id": "azure/gpt-4o", + "label": "azure/gpt-4o" + }, + { + "id": "azure/gpt-5", + "label": "azure/gpt-5" + }, + { + "id": "azure/gpt-5-chat", + "label": "azure/gpt-5-chat" + }, + { + "id": "azure/gpt-5-mini", + "label": "azure/gpt-5-mini" + }, + { + "id": "azure/gpt-5-nano", + "label": "azure/gpt-5-nano" + }, + { + "id": "azure/gpt-5.1", + "label": "azure/gpt-5.1" + }, + { + "id": "azure/gpt-5.1-codex", + "label": "azure/gpt-5.1-codex" + }, + { + "id": "azure/gpt-5.2", + "label": "azure/gpt-5.2" + }, + { + "id": "azure/gpt-5.4", + "label": "azure/gpt-5.4" + }, + { + "id": "azure/gpt-5.4-mini", + "label": "azure/gpt-5.4-mini" + }, + { + "id": "azure/gpt-5.4-nano", + "label": "azure/gpt-5.4-nano" + }, + { + "id": "azure/gpt-5.4-pro", + "label": "azure/gpt-5.4-pro" + }, + { + "id": "azure/gpt-5.5", + "label": "azure/gpt-5.5" + }, + { + "id": "azure/gpt-5.6-luna", + "label": "azure/gpt-5.6-luna" + }, + { + "id": "azure/gpt-5.6-sol", + "label": "azure/gpt-5.6-sol" + }, + { + "id": "azure/gpt-5.6-terra", + "label": "azure/gpt-5.6-terra" + }, + { + "id": "azure/gpt-6-astra", + "label": "azure/gpt-6-astra" + }, + { + "id": "azure/gpt-6-luna", + "label": "azure/gpt-6-luna" + }, + { + "id": "azure/gpt-6-sol", + "label": "azure/gpt-6-sol" + }, + { + "id": "azure/gpt-6.1-sol", + "label": "azure/gpt-6.1-sol" + }, + { + "id": "azure/model-router", + "label": "azure/model-router" + }, + { + "id": "azure/o3", + "label": "azure/o3" + }, + { + "id": "azure/o4-mini", + "label": "azure/o4-mini" + }, + { + "id": "bedrock/amazon.nova-2-lite-v1:0", + "label": "bedrock/amazon.nova-2-lite-v1:0" + }, + { + "id": "bedrock/amazon.nova-lite-v1:0", + "label": "bedrock/amazon.nova-lite-v1:0" + }, + { + "id": "bedrock/amazon.nova-micro-v1:0", + "label": "bedrock/amazon.nova-micro-v1:0" + }, + { + "id": "bedrock/amazon.nova-premier-v1:0", + "label": "bedrock/amazon.nova-premier-v1:0" + }, + { + "id": "bedrock/amazon.nova-pro-v1:0", + "label": "bedrock/amazon.nova-pro-v1:0" + }, + { + "id": "bedrock/amazon.titan-text-premier-v1:0", + "label": "bedrock/amazon.titan-text-premier-v1:0" + }, + { + "id": "bedrock/anthropic.claude-fable-5", + "label": "bedrock/anthropic.claude-fable-5" + }, + { + "id": "bedrock/anthropic.claude-haiku-4-5-20251001-v1:0", + "label": "bedrock/anthropic.claude-haiku-4-5-20251001-v1:0" + }, + { + "id": "bedrock/anthropic.claude-opus-4-1-20250805-v1:0", + "label": "bedrock/anthropic.claude-opus-4-1-20250805-v1:0" + }, + { + "id": "bedrock/anthropic.claude-opus-4-5-20251101-v1:0", + "label": "bedrock/anthropic.claude-opus-4-5-20251101-v1:0" + }, + { + "id": "bedrock/anthropic.claude-opus-4-6-v1", + "label": "bedrock/anthropic.claude-opus-4-6-v1" + }, + { + "id": "bedrock/anthropic.claude-opus-4-7", + "label": "bedrock/anthropic.claude-opus-4-7" + }, + { + "id": "bedrock/anthropic.claude-opus-4-8", + "label": "bedrock/anthropic.claude-opus-4-8" + }, + { + "id": "bedrock/anthropic.claude-opus-5", + "label": "bedrock/anthropic.claude-opus-5" + }, + { + "id": "bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0", + "label": "bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0" + }, + { + "id": "bedrock/anthropic.claude-sonnet-4-6", + "label": "bedrock/anthropic.claude-sonnet-4-6" + }, + { + "id": "bedrock/anthropic.claude-sonnet-5", + "label": "bedrock/anthropic.claude-sonnet-5" + }, + { + "id": "bedrock/cohere.command-r-plus-v1:0", + "label": "bedrock/cohere.command-r-plus-v1:0" + }, + { + "id": "bedrock/cohere.command-r-v1:0", + "label": "bedrock/cohere.command-r-v1:0" + }, + { + "id": "bedrock/deepseek.v3.2", + "label": "bedrock/deepseek.v3.2" + }, + { + "id": "bedrock/meta.llama3-1-405b-instruct-v1:0", + "label": "bedrock/meta.llama3-1-405b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama3-1-70b-instruct-v1:0", + "label": "bedrock/meta.llama3-1-70b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama3-1-8b-instruct-v1:0", + "label": "bedrock/meta.llama3-1-8b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama3-2-11b-instruct-v1:0", + "label": "bedrock/meta.llama3-2-11b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama3-2-1b-instruct-v1:0", + "label": "bedrock/meta.llama3-2-1b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama3-2-3b-instruct-v1:0", + "label": "bedrock/meta.llama3-2-3b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama3-2-90b-instruct-v1:0", + "label": "bedrock/meta.llama3-2-90b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama3-3-70b-instruct-v1:0", + "label": "bedrock/meta.llama3-3-70b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama4-maverick-17b-instruct-v1:0", + "label": "bedrock/meta.llama4-maverick-17b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama4-scout-17b-instruct-v1:0", + "label": "bedrock/meta.llama4-scout-17b-instruct-v1:0" + }, + { + "id": "bedrock/minimax.minimax-m2.5", + "label": "bedrock/minimax.minimax-m2.5" + }, + { + "id": "bedrock/mistral.magistral-small-2509", + "label": "bedrock/mistral.magistral-small-2509" + }, + { + "id": "bedrock/mistral.ministral-3-14b-instruct", + "label": "bedrock/mistral.ministral-3-14b-instruct" + }, + { + "id": "bedrock/mistral.ministral-3-3b-instruct", + "label": "bedrock/mistral.ministral-3-3b-instruct" + }, + { + "id": "bedrock/mistral.ministral-3-8b-instruct", + "label": "bedrock/mistral.ministral-3-8b-instruct" + }, + { + "id": "bedrock/mistral.mistral-large-2407-v1:0", + "label": "bedrock/mistral.mistral-large-2407-v1:0" + }, + { + "id": "bedrock/mistral.mistral-large-3-675b-instruct", + "label": "bedrock/mistral.mistral-large-3-675b-instruct" + }, + { + "id": "bedrock/mistral.mixtral-8x7b-instruct-v0:1", + "label": "bedrock/mistral.mixtral-8x7b-instruct-v0:1" + }, + { + "id": "bedrock/mistral.pixtral-large-2502-v1:0", + "label": "bedrock/mistral.pixtral-large-2502-v1:0" + }, + { + "id": "bedrock/moonshotai.kimi-k2.5", + "label": "bedrock/moonshotai.kimi-k2.5" + }, + { + "id": "bedrock/openai.gpt-5.6-luna", + "label": "bedrock/openai.gpt-5.6-luna" + }, + { + "id": "bedrock/openai.gpt-5.6-sol", + "label": "bedrock/openai.gpt-5.6-sol" + }, + { + "id": "bedrock/openai.gpt-5.6-terra", + "label": "bedrock/openai.gpt-5.6-terra" + }, + { + "id": "bedrock/openai.gpt-6-astra", + "label": "bedrock/openai.gpt-6-astra" + }, + { + "id": "bedrock/openai.gpt-6.1-sol", + "label": "bedrock/openai.gpt-6.1-sol" + }, + { + "id": "bedrock/openai.gpt-oss-120b-1:0", + "label": "bedrock/openai.gpt-oss-120b-1:0" + }, + { + "id": "bedrock/openai.gpt-oss-20b-1:0", + "label": "bedrock/openai.gpt-oss-20b-1:0" + }, + { + "id": "bedrock/zai.glm-5", + "label": "bedrock/zai.glm-5" + }, + { + "id": "cerebras/gemma-4-31b", + "label": "cerebras/gemma-4-31b" + }, + { + "id": "cerebras/gpt-oss-120b", + "label": "cerebras/gpt-oss-120b" + }, + { + "id": "cerebras/llama3.1-8b", + "label": "cerebras/llama3.1-8b" + }, + { + "id": "cerebras/qwen-3-235b-a22b-instruct-2507", + "label": "cerebras/qwen-3-235b-a22b-instruct-2507" + }, + { + "id": "cerebras/qwen-3.8-27b", + "label": "cerebras/qwen-3.8-27b" + }, + { + "id": "cerebras/zai-glm-4.7", + "label": "cerebras/zai-glm-4.7" + }, + { + "id": "chat-latest", + "label": "chat-latest" + }, + { + "id": "claude-3-haiku-20240307", + "label": "claude-3-haiku-20240307" + }, + { + "id": "claude-fable-5", + "label": "claude-fable-5" + }, + { + "id": "claude-fable-5-1", + "label": "claude-fable-5-1" + }, + { + "id": "claude-fable-5-2", + "label": "claude-fable-5-2" + }, + { + "id": "claude-haiku-4-5", + "label": "claude-haiku-4-5" + }, + { + "id": "claude-haiku-5-5", + "label": "claude-haiku-5-5" + }, + { + "id": "claude-opus-4-0", + "label": "claude-opus-4-0" + }, + { + "id": "claude-opus-4-1", + "label": "claude-opus-4-1" + }, + { + "id": "claude-opus-4-5", + "label": "claude-opus-4-5" + }, + { + "id": "claude-opus-4-6", + "label": "claude-opus-4-6" + }, + { + "id": "claude-opus-4-7", + "label": "claude-opus-4-7" + }, + { + "id": "claude-opus-4-8", + "label": "claude-opus-4-8" + }, + { + "id": "claude-opus-5", + "label": "claude-opus-5" + }, + { + "id": "claude-opus-5-5", + "label": "claude-opus-5-5" + }, + { + "id": "claude-sonnet-4-0", + "label": "claude-sonnet-4-0" + }, + { + "id": "claude-sonnet-4-5", + "label": "claude-sonnet-4-5" + }, + { + "id": "claude-sonnet-4-6", + "label": "claude-sonnet-4-6" + }, + { + "id": "claude-sonnet-5", + "label": "claude-sonnet-5" + }, + { + "id": "claude-sonnet-5-5", + "label": "claude-sonnet-5-5" + }, + { + "id": "codestral-2508", + "label": "codestral-2508" + }, + { + "id": "codestral-latest", + "label": "codestral-latest" + }, + { + "id": "deep-research-pro-preview-12-2025", + "label": "deep-research-pro-preview-12-2025" + }, + { + "id": "deepseek-chat", + "label": "deepseek-chat" + }, + { + "id": "deepseek-flash", + "label": "deepseek-flash" + }, + { + "id": "deepseek-r1", + "label": "deepseek-r1" + }, + { + "id": "deepseek-reasoner", + "label": "deepseek-reasoner" + }, + { + "id": "deepseek-v3", + "label": "deepseek-v3" + }, + { + "id": "deepseek-v4-flash", + "label": "deepseek-v4-flash" + }, + { + "id": "deepseek-v4-pro", + "label": "deepseek-v4-pro" + }, + { + "id": "devstral-2512", + "label": "devstral-2512" + }, + { + "id": "devstral-latest", + "label": "devstral-latest" + }, + { + "id": "devstral-medium-2507", + "label": "devstral-medium-2507" + }, + { + "id": "devstral-small-2507", + "label": "devstral-small-2507" + }, + { + "id": "devstral-small-latest", + "label": "devstral-small-latest" + }, + { + "id": "fugu", + "label": "fugu" + }, + { + "id": "fugu-max", + "label": "fugu-max" + }, + { + "id": "fugu-max-v1.0", + "label": "fugu-max-v1.0" + }, + { + "id": "fugu-ultra", + "label": "fugu-ultra" + }, + { + "id": "fugu-ultra-v2.0", + "label": "fugu-ultra-v2.0" + }, + { + "id": "gemini-2.0-flash", + "label": "gemini-2.0-flash" + }, + { + "id": "gemini-2.0-flash-lite", + "label": "gemini-2.0-flash-lite" + }, + { + "id": "gemini-2.5-flash", + "label": "gemini-2.5-flash" + }, + { + "id": "gemini-2.5-flash-lite", + "label": "gemini-2.5-flash-lite" + }, + { + "id": "gemini-2.5-pro", + "label": "gemini-2.5-pro" + }, + { + "id": "gemini-3-flash-preview", + "label": "gemini-3-flash-preview" + }, + { + "id": "gemini-3.1-flash-lite", + "label": "gemini-3.1-flash-lite" + }, + { + "id": "gemini-3.1-pro-preview", + "label": "gemini-3.1-pro-preview" + }, + { + "id": "gemini-3.5-flash", + "label": "gemini-3.5-flash" + }, + { + "id": "gemini-3.5-flash-lite", + "label": "gemini-3.5-flash-lite" + }, + { + "id": "gemini-3.6-flash", + "label": "gemini-3.6-flash" + }, + { + "id": "gemini-3.7-flash", + "label": "gemini-3.7-flash" + }, + { + "id": "gemini-3.8-flash", + "label": "gemini-3.8-flash" + }, + { + "id": "gemini-4-argon", + "label": "gemini-4-argon" + }, + { + "id": "glm-4-32b-0414-128k", + "label": "glm-4-32b-0414-128k" + }, + { + "id": "glm-4.5", + "label": "glm-4.5" + }, + { + "id": "glm-4.5-air", + "label": "glm-4.5-air" + }, + { + "id": "glm-4.5-airx", + "label": "glm-4.5-airx" + }, + { + "id": "glm-4.5-x", + "label": "glm-4.5-x" + }, + { + "id": "glm-4.6", + "label": "glm-4.6" + }, + { + "id": "glm-4.7", + "label": "glm-4.7" + }, + { + "id": "glm-4.7-flashx", + "label": "glm-4.7-flashx" + }, + { + "id": "glm-5", + "label": "glm-5" + }, + { + "id": "glm-5-turbo", + "label": "glm-5-turbo" + }, + { + "id": "glm-5.1", + "label": "glm-5.1" + }, + { + "id": "glm-5.2", + "label": "glm-5.2" + }, + { + "id": "glm-5.3", + "label": "glm-5.3" + }, + { + "id": "glm-5.3-flash", + "label": "glm-5.3-flash" + }, + { + "id": "glm-5.3-flashx", + "label": "glm-5.3-flashx" + }, + { + "id": "gpt-4.1", + "label": "gpt-4.1" + }, + { + "id": "gpt-4.1-mini", + "label": "gpt-4.1-mini" + }, + { + "id": "gpt-4.1-nano", + "label": "gpt-4.1-nano" + }, + { + "id": "gpt-4o", + "label": "gpt-4o" + }, + { + "id": "gpt-5", + "label": "gpt-5" + }, + { + "id": "gpt-5-chat-latest", + "label": "gpt-5-chat-latest" + }, + { + "id": "gpt-5-mini", + "label": "gpt-5-mini" + }, + { + "id": "gpt-5-nano", + "label": "gpt-5-nano" + }, + { + "id": "gpt-5-pro", + "label": "gpt-5-pro" + }, + { + "id": "gpt-5.1", + "label": "gpt-5.1" + }, + { + "id": "gpt-5.2", + "label": "gpt-5.2" + }, + { + "id": "gpt-5.2-pro", + "label": "gpt-5.2-pro" + }, + { + "id": "gpt-5.3-codex", + "label": "gpt-5.3-codex" + }, + { + "id": "gpt-5.4", + "label": "gpt-5.4" + }, + { + "id": "gpt-5.4-mini", + "label": "gpt-5.4-mini" + }, + { + "id": "gpt-5.4-nano", + "label": "gpt-5.4-nano" + }, + { + "id": "gpt-5.4-pro", + "label": "gpt-5.4-pro" + }, + { + "id": "gpt-5.5", + "label": "gpt-5.5" + }, + { + "id": "gpt-5.5-pro", + "label": "gpt-5.5-pro" + }, + { + "id": "gpt-5.6-luna", + "label": "gpt-5.6-luna" + }, + { + "id": "gpt-5.6-sol", + "label": "gpt-5.6-sol" + }, + { + "id": "gpt-5.6-terra", + "label": "gpt-5.6-terra" + }, + { + "id": "gpt-6-astra", + "label": "gpt-6-astra" + }, + { + "id": "gpt-6-luna", + "label": "gpt-6-luna" + }, + { + "id": "gpt-6-sol", + "label": "gpt-6-sol" + }, + { + "id": "gpt-6.1-sol", + "label": "gpt-6.1-sol" + }, + { + "id": "gpt-6.1-terra", + "label": "gpt-6.1-terra" + }, + { + "id": "grok-3-fast-latest", + "label": "grok-3-fast-latest" + }, + { + "id": "grok-3-latest", + "label": "grok-3-latest" + }, + { + "id": "grok-4-0709", + "label": "grok-4-0709" + }, + { + "id": "grok-4-1-fast-non-reasoning", + "label": "grok-4-1-fast-non-reasoning" + }, + { + "id": "grok-4-1-fast-reasoning", + "label": "grok-4-1-fast-reasoning" + }, + { + "id": "grok-4-fast-non-reasoning", + "label": "grok-4-fast-non-reasoning" + }, + { + "id": "grok-4-fast-reasoning", + "label": "grok-4-fast-reasoning" + }, + { + "id": "grok-4-latest", + "label": "grok-4-latest" + }, + { + "id": "grok-4.20-0309-non-reasoning", + "label": "grok-4.20-0309-non-reasoning" + }, + { + "id": "grok-4.20-0309-reasoning", + "label": "grok-4.20-0309-reasoning" + }, + { + "id": "grok-4.20-multi-agent-0309", + "label": "grok-4.20-multi-agent-0309" + }, + { + "id": "grok-4.3", + "label": "grok-4.3" + }, + { + "id": "grok-4.5", + "label": "grok-4.5" + }, + { + "id": "grok-4.6", + "label": "grok-4.6" + }, + { + "id": "grok-4.7", + "label": "grok-4.7" + }, + { + "id": "grok-code-fast-1", + "label": "grok-code-fast-1" + }, + { + "id": "groq/llama-3.1-8b-instant", + "label": "groq/llama-3.1-8b-instant" + }, + { + "id": "groq/llama-3.3-70b-versatile", + "label": "groq/llama-3.3-70b-versatile" + }, + { + "id": "groq/meta-llama/llama-4-scout-17b-16e-instruct", + "label": "groq/meta-llama/llama-4-scout-17b-16e-instruct" + }, + { + "id": "groq/moonshotai/kimi-k2-instruct-0905", + "label": "groq/moonshotai/kimi-k2-instruct-0905" + }, + { + "id": "groq/openai/gpt-oss-120b", + "label": "groq/openai/gpt-oss-120b" + }, + { + "id": "groq/openai/gpt-oss-20b", + "label": "groq/openai/gpt-oss-20b" + }, + { + "id": "groq/openai/gpt-oss-safeguard-20b", + "label": "groq/openai/gpt-oss-safeguard-20b" + }, + { + "id": "groq/qwen/qwen3-32b", + "label": "groq/qwen/qwen3-32b" + }, + { + "id": "groq/qwen/qwen3.6-27b", + "label": "groq/qwen/qwen3.6-27b" + }, + { + "id": "groq/qwen/qwen3.8-27b", + "label": "groq/qwen/qwen3.8-27b" + }, + { + "id": "jev-1.13.0", + "label": "jev-1.13.0" + }, + { + "id": "jev-latest", + "label": "jev-latest" + }, + { + "id": "jev-preview", + "label": "jev-preview" + }, + { + "id": "kie/claude-fable-5", + "label": "kie/claude-fable-5" + }, + { + "id": "kie/claude-haiku-4-5", + "label": "kie/claude-haiku-4-5" + }, + { + "id": "kie/claude-opus-4-5", + "label": "kie/claude-opus-4-5" + }, + { + "id": "kie/claude-opus-4-6", + "label": "kie/claude-opus-4-6" + }, + { + "id": "kie/claude-opus-4-7", + "label": "kie/claude-opus-4-7" + }, + { + "id": "kie/claude-opus-4-8", + "label": "kie/claude-opus-4-8" + }, + { + "id": "kie/claude-opus-5", + "label": "kie/claude-opus-5" + }, + { + "id": "kie/claude-opus-5-5", + "label": "kie/claude-opus-5-5" + }, + { + "id": "kie/claude-sonnet-4-5", + "label": "kie/claude-sonnet-4-5" + }, + { + "id": "kie/claude-sonnet-4-6", + "label": "kie/claude-sonnet-4-6" + }, + { + "id": "kie/claude-sonnet-5", + "label": "kie/claude-sonnet-5" + }, + { + "id": "kie/claude-sonnet-5-5", + "label": "kie/claude-sonnet-5-5" + }, + { + "id": "kie/gpt-5-5", + "label": "kie/gpt-5-5" + }, + { + "id": "kie/gpt-5-6-luna", + "label": "kie/gpt-5-6-luna" + }, + { + "id": "kie/gpt-5-6-sol", + "label": "kie/gpt-5-6-sol" + }, + { + "id": "kie/gpt-5-6-terra", + "label": "kie/gpt-5-6-terra" + }, + { + "id": "kie/gpt-6-1-sol", + "label": "kie/gpt-6-1-sol" + }, + { + "id": "kie/gpt-6-astra", + "label": "kie/gpt-6-astra" + }, + { + "id": "kie/gpt-6-luna", + "label": "kie/gpt-6-luna" + }, + { + "id": "kie/gpt-6-sol", + "label": "kie/gpt-6-sol" + }, + { + "id": "kie/grok-4-3", + "label": "kie/grok-4-3" + }, + { + "id": "kie/grok-4-5", + "label": "kie/grok-4-5" + }, + { + "id": "kie/grok-4-6", + "label": "kie/grok-4-6" + }, + { + "id": "kie/kimi-k3", + "label": "kie/kimi-k3" + }, + { + "id": "kimi-k2.6", + "label": "kimi-k2.6" + }, + { + "id": "kimi-k2.7-code", + "label": "kimi-k2.7-code" + }, + { + "id": "kimi-k2.7-code-highspeed", + "label": "kimi-k2.7-code-highspeed" + }, + { + "id": "kimi-k3", + "label": "kimi-k3" + }, + { + "id": "labs-leanstral-1-5", + "label": "labs-leanstral-1-5" + }, + { + "id": "magistral-medium-2509", + "label": "magistral-medium-2509" + }, + { + "id": "magistral-medium-latest", + "label": "magistral-medium-latest" + }, + { + "id": "magistral-small-2509", + "label": "magistral-small-2509" + }, + { + "id": "magistral-small-latest", + "label": "magistral-small-latest" + }, + { + "id": "ministral-14b-2512", + "label": "ministral-14b-2512" + }, + { + "id": "ministral-14b-latest", + "label": "ministral-14b-latest" + }, + { + "id": "ministral-3b-2512", + "label": "ministral-3b-2512" + }, + { + "id": "ministral-3b-latest", + "label": "ministral-3b-latest" + }, + { + "id": "ministral-8b-2512", + "label": "ministral-8b-2512" + }, + { + "id": "ministral-8b-latest", + "label": "ministral-8b-latest" + }, + { + "id": "mistral-large-2411", + "label": "mistral-large-2411" + }, + { + "id": "mistral-large-2512", + "label": "mistral-large-2512" + }, + { + "id": "mistral-large-4", + "label": "mistral-large-4" + }, + { + "id": "mistral-large-latest", + "label": "mistral-large-latest" + }, + { + "id": "mistral-medium-2505", + "label": "mistral-medium-2505" + }, + { + "id": "mistral-medium-2508", + "label": "mistral-medium-2508" + }, + { + "id": "mistral-medium-2604", + "label": "mistral-medium-2604" + }, + { + "id": "mistral-medium-3", + "label": "mistral-medium-3" + }, + { + "id": "mistral-medium-3-5", + "label": "mistral-medium-3-5" + }, + { + "id": "mistral-medium-latest", + "label": "mistral-medium-latest" + }, + { + "id": "mistral-small-2506", + "label": "mistral-small-2506" + }, + { + "id": "mistral-small-2603", + "label": "mistral-small-2603" + }, + { + "id": "mistral-small-latest", + "label": "mistral-small-latest" + }, + { + "id": "muse-spark-1.1", + "label": "muse-spark-1.1" + }, + { + "id": "muse-spark-1.3", + "label": "muse-spark-1.3" + }, + { + "id": "nebius/deepseek-ai/deepseek-v4-flash-0731", + "label": "nebius/deepseek-ai/deepseek-v4-flash-0731" + }, + { + "id": "nebius/deepseek-ai/deepseek-v4-pro", + "label": "nebius/deepseek-ai/deepseek-v4-pro" + }, + { + "id": "nebius/deepseek-ai/deepseek-v4-pro-0813", + "label": "nebius/deepseek-ai/deepseek-v4-pro-0813" + }, + { + "id": "nebius/deepseek-ai/deepseek-v4.1-flash", + "label": "nebius/deepseek-ai/deepseek-v4.1-flash" + }, + { + "id": "nebius/google/gemma-3-27b-it", + "label": "nebius/google/gemma-3-27b-it" + }, + { + "id": "nebius/minimaxai/minimax-m3", + "label": "nebius/minimaxai/minimax-m3" + }, + { + "id": "nebius/moonshotai/kimi-k2.6", + "label": "nebius/moonshotai/kimi-k2.6" + }, + { + "id": "nebius/moonshotai/kimi-k2.7-code", + "label": "nebius/moonshotai/kimi-k2.7-code" + }, + { + "id": "nebius/moonshotai/kimi-k3", + "label": "nebius/moonshotai/kimi-k3" + }, + { + "id": "nebius/nousresearch/hermes-4-405b", + "label": "nebius/nousresearch/hermes-4-405b" + }, + { + "id": "nebius/nvidia/nemotron-3-super-120b-a12b", + "label": "nebius/nvidia/nemotron-3-super-120b-a12b" + }, + { + "id": "nebius/nvidia/nemotron-3-ultra-550b-a55b", + "label": "nebius/nvidia/nemotron-3-ultra-550b-a55b" + }, + { + "id": "nebius/nvidia/nemotron-3_5-lightning", + "label": "nebius/nvidia/nemotron-3_5-lightning" + }, + { + "id": "nebius/nvidia/nvidia-nemotron-3-nano-30b-a3b", + "label": "nebius/nvidia/nvidia-nemotron-3-nano-30b-a3b" + }, + { + "id": "nebius/openai/gpt-oss-120b", + "label": "nebius/openai/gpt-oss-120b" + }, + { + "id": "nebius/openbmb/minicpm-v-4_5", + "label": "nebius/openbmb/minicpm-v-4_5" + }, + { + "id": "nebius/qwen/qwen3-235b-a22b-instruct-2507", + "label": "nebius/qwen/qwen3-235b-a22b-instruct-2507" + }, + { + "id": "nebius/qwen/qwen3-30b-a3b-instruct-2507", + "label": "nebius/qwen/qwen3-30b-a3b-instruct-2507" + }, + { + "id": "nebius/qwen/qwen3.5-397b-a17b", + "label": "nebius/qwen/qwen3.5-397b-a17b" + }, + { + "id": "nebius/qwen/qwen3.8-27b", + "label": "nebius/qwen/qwen3.8-27b" + }, + { + "id": "nebius/zai-org/glm-5.1", + "label": "nebius/zai-org/glm-5.1" + }, + { + "id": "nebius/zai-org/glm-5.2", + "label": "nebius/zai-org/glm-5.2" + }, + { + "id": "nebius/zai-org/glm-5.3", + "label": "nebius/zai-org/glm-5.3" + }, + { + "id": "nebius/zai-org/glm-5.3-flash", + "label": "nebius/zai-org/glm-5.3-flash" + }, + { + "id": "nvidia/llama-3.1-nemotron-70b-instruct", + "label": "nvidia/llama-3.1-nemotron-70b-instruct" + }, + { + "id": "nvidia/llama-3.1-nemotron-ultra-253b-v1", + "label": "nvidia/llama-3.1-nemotron-ultra-253b-v1" + }, + { + "id": "nvidia/llama-3.3-nemotron-super-49b-v1.5", + "label": "nvidia/llama-3.3-nemotron-super-49b-v1.5" + }, + { + "id": "nvidia/nemotron-3-nano-30b-a3b", + "label": "nvidia/nemotron-3-nano-30b-a3b" + }, + { + "id": "nvidia/nemotron-3-super-120b-a12b", + "label": "nvidia/nemotron-3-super-120b-a12b" + }, + { + "id": "nvidia/nemotron-3-ultra-550b-a55b", + "label": "nvidia/nemotron-3-ultra-550b-a55b" + }, + { + "id": "nvidia/nemotron-3.5-lightning-30b-a3b", + "label": "nvidia/nemotron-3.5-lightning-30b-a3b" + }, + { + "id": "o1", + "label": "o1" + }, + { + "id": "o3", + "label": "o3" + }, + { + "id": "o3-mini", + "label": "o3-mini" + }, + { + "id": "o3-pro", + "label": "o3-pro" + }, + { + "id": "o4-mini", + "label": "o4-mini" + }, + { + "id": "open-mistral-nemo", + "label": "open-mistral-nemo" + }, + { + "id": "sakana-namazu", + "label": "sakana-namazu" + }, + { + "id": "sakana-namazu-v1.0", + "label": "sakana-namazu-v1.0" + }, + { + "id": "thinkingmachines/inkling", + "label": "thinkingmachines/inkling" + }, + { + "id": "thinkingmachines/inkling-2-small", + "label": "thinkingmachines/inkling-2-small" + }, + { + "id": "thinkingmachines/inkling-small", + "label": "thinkingmachines/inkling-small" + }, + { + "id": "vertex/deep-research-pro-preview-12-2025", + "label": "vertex/deep-research-pro-preview-12-2025" + }, + { + "id": "vertex/gemini-2.0-flash", + "label": "vertex/gemini-2.0-flash" + }, + { + "id": "vertex/gemini-2.0-flash-lite", + "label": "vertex/gemini-2.0-flash-lite" + }, + { + "id": "vertex/gemini-2.5-flash", + "label": "vertex/gemini-2.5-flash" + }, + { + "id": "vertex/gemini-2.5-flash-lite", + "label": "vertex/gemini-2.5-flash-lite" + }, + { + "id": "vertex/gemini-2.5-pro", + "label": "vertex/gemini-2.5-pro" + }, + { + "id": "vertex/gemini-3-flash-preview", + "label": "vertex/gemini-3-flash-preview" + }, + { + "id": "vertex/gemini-3-pro-preview", + "label": "vertex/gemini-3-pro-preview" + }, + { + "id": "vertex/gemini-3.1-flash-lite", + "label": "vertex/gemini-3.1-flash-lite" + }, + { + "id": "vertex/gemini-3.1-pro-preview", + "label": "vertex/gemini-3.1-pro-preview" + }, + { + "id": "vertex/gemini-3.5-flash", + "label": "vertex/gemini-3.5-flash" + }, + { + "id": "vertex/gemini-3.5-flash-lite", + "label": "vertex/gemini-3.5-flash-lite" + }, + { + "id": "vertex/gemini-3.6-flash", + "label": "vertex/gemini-3.6-flash" + }, + { + "id": "vertex/gemini-3.7-flash", + "label": "vertex/gemini-3.7-flash" + }, + { + "id": "vertex/gemini-3.8-flash", + "label": "vertex/gemini-3.8-flash" + }, + { + "id": "zai-glm-5-2", + "label": "zai-glm-5-2" + }, + { + "id": "zai-glm-5-3", + "label": "zai-glm-5-3" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "vertexCredential", + "type": "oauth-input", + "title": "Google Cloud Account", + "mode": "basic", + "canonicalParamId": "vertexCredential", + "condition": { + "opaque": true + }, + "required": true, + "serviceId": "vertex-ai", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "vertexManualCredential", + "type": "short-input", + "title": "Google Cloud Account", + "mode": "advanced", + "canonicalParamId": "vertexCredential", + "condition": { + "opaque": true + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "apiKey", + "type": "short-input", + "title": "API Key", + "condition": { + "opaque": true + }, + "required": true, + "password": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "azureEndpoint", + "type": "short-input", + "title": "Azure Endpoint", + "condition": { + "opaque": true + }, + "password": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "azureApiVersion", + "type": "short-input", + "title": "Azure API Version", + "condition": { + "opaque": true + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "vertexProject", + "type": "short-input", + "title": "Vertex AI Project", + "condition": { + "opaque": true + }, + "required": true, + "password": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "vertexLocation", + "type": "short-input", + "title": "Vertex AI Location", + "condition": { + "opaque": true + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "bedrockAuthMode", + "type": "dropdown", + "title": "AWS Authentication", + "condition": { + "opaque": true + }, + "valueDefault": { + "constant": "access_keys" + }, + "options": [ + { + "id": "access_keys", + "label": "Access keys" + }, + { + "id": "credential", + "label": "Saved AWS credential" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "bedrockCredential", + "type": "oauth-input", + "title": "AWS Credential", + "mode": "basic", + "canonicalParamId": "bedrockCredential", + "condition": { + "opaque": true + }, + "required": true, + "serviceId": "aws", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "bedrockManualCredential", + "type": "short-input", + "title": "AWS Credential", + "mode": "advanced", + "canonicalParamId": "bedrockCredential", + "condition": { + "opaque": true + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "bedrockAccessKeyId", + "type": "short-input", + "title": "AWS Access Key ID", + "condition": { + "opaque": true + }, + "required": true, + "password": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "bedrockSecretKey", + "type": "short-input", + "title": "AWS Secret Access Key", + "condition": { + "opaque": true + }, + "required": true, + "password": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "bedrockRegion", + "type": "short-input", + "title": "AWS Region", + "condition": { + "opaque": true + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "evaluationState", + "type": "long-input", + "title": "State", + "condition": { + "opaque": true + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "evaluationQuestions", + "type": "code", + "title": "Questions", + "condition": { + "opaque": true + }, + "required": true, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "attachmentFiles", + "type": "file-upload", + "title": "Files", + "mode": "basic", + "canonicalParamId": "files", + "condition": { + "field": "model", + "value": ["jev-latest", "jev-1.13.0", "jev-preview"], + "not": true + }, + "required": false, + "multiple": true, + "valueKind": "upload", + "storage": "native" + }, + { + "id": "files", + "type": "short-input", + "title": "Files", + "mode": "advanced", + "canonicalParamId": "files", + "condition": { + "field": "model", + "value": ["jev-latest", "jev-1.13.0", "jev-preview"], + "not": true + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "reasoningEffort", + "type": "combobox", + "title": "Reasoning Effort", + "mode": "advanced", + "condition": { + "opaque": true + }, + "options": [ + { + "id": "auto", + "label": "auto" + }, + { + "id": "low", + "label": "low" + }, + { + "id": "medium", + "label": "medium" + }, + { + "id": "high", + "label": "high" + } + ], + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["model"], + "any": [] + } + }, + { + "id": "verbosity", + "type": "combobox", + "title": "Verbosity", + "mode": "advanced", + "condition": { + "opaque": true + }, + "options": [ + { + "id": "auto", + "label": "auto" + }, + { + "id": "low", + "label": "low" + }, + { + "id": "medium", + "label": "medium" + }, + { + "id": "high", + "label": "high" + } + ], + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["model"], + "any": [] + } + }, + { + "id": "thinkingLevel", + "type": "combobox", + "title": "Thinking Level", + "mode": "advanced", + "condition": { + "opaque": true + }, + "options": [ + { + "id": "none", + "label": "none" + }, + { + "id": "low", + "label": "low" + }, + { + "id": "high", + "label": "high" + } + ], + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["model"], + "any": [] + } + }, + { + "id": "promptCaching", + "type": "switch", + "title": "Prompt Caching", + "mode": "advanced", + "condition": { + "field": "model", + "value": [ + "claude-fable-5-2", + "claude-fable-5-1", + "claude-fable-5", + "claude-sonnet-5-5", + "claude-sonnet-5", + "claude-opus-5-5", + "claude-opus-5", + "claude-opus-4-8", + "claude-opus-4-7", + "claude-opus-4-6", + "claude-sonnet-4-6", + "claude-opus-4-5", + "claude-opus-4-1", + "claude-opus-4-0", + "claude-sonnet-4-5", + "claude-sonnet-4-0", + "claude-haiku-5-5", + "claude-haiku-4-5", + "claude-3-haiku-20240307", + "azure-anthropic/claude-fable-5-1", + "azure-anthropic/claude-opus-5-5", + "azure-anthropic/claude-sonnet-5-5", + "azure-anthropic/claude-haiku-5-5", + "azure-anthropic/claude-opus-5", + "azure-anthropic/claude-opus-4-8", + "azure-anthropic/claude-opus-4-7", + "azure-anthropic/claude-opus-4-6", + "azure-anthropic/claude-opus-4-5", + "azure-anthropic/claude-sonnet-5", + "azure-anthropic/claude-sonnet-4-6", + "azure-anthropic/claude-sonnet-4-5", + "azure-anthropic/claude-opus-4-1", + "azure-anthropic/claude-haiku-4-5" + ] + }, + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "tools", + "type": "tool-input", + "title": "Tools", + "condition": { + "field": "model", + "value": [ + "deep-research-pro-preview-12-2025", + "vertex/deep-research-pro-preview-12-2025", + "jev-latest", + "jev-1.13.0", + "jev-preview" + ], + "not": true + }, + "defaultValue": [], + "valueKind": "tools", + "storage": "json-string", + "structured": "tools" + }, + { + "id": "skills", + "type": "skill-input", + "title": "Skills", + "condition": { + "field": "model", + "value": [ + "deep-research-pro-preview-12-2025", + "vertex/deep-research-pro-preview-12-2025", + "jev-latest", + "jev-1.13.0", + "jev-preview" + ], + "not": true + }, + "defaultValue": [], + "valueKind": "array", + "storage": "native" + }, + { + "id": "memoryType", + "type": "dropdown", + "title": "Memory", + "condition": { + "field": "model", + "value": [ + "jev-latest", + "jev-1.13.0", + "jev-preview", + "deep-research-pro-preview-12-2025", + "vertex/deep-research-pro-preview-12-2025" + ], + "not": true + }, + "defaultValue": "none", + "options": [ + { + "id": "none", + "label": "None" + }, + { + "id": "conversation", + "label": "Conversation" + }, + { + "id": "sliding_window", + "label": "Sliding window (messages)" + }, + { + "id": "sliding_window_tokens", + "label": "Sliding window (tokens)" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "conversationId", + "type": "short-input", + "title": "Conversation ID", + "condition": { + "field": "memoryType", + "value": ["conversation", "sliding_window", "sliding_window_tokens"], + "and": { + "field": "model", + "value": [ + "jev-latest", + "jev-1.13.0", + "jev-preview", + "deep-research-pro-preview-12-2025", + "vertex/deep-research-pro-preview-12-2025" + ], + "not": true + } + }, + "required": { + "field": "memoryType", + "value": ["conversation", "sliding_window", "sliding_window_tokens"] + }, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["memoryType"], + "any": [] + } + }, + { + "id": "slidingWindowSize", + "type": "short-input", + "title": "Sliding Window Size", + "condition": { + "field": "memoryType", + "value": ["sliding_window"], + "and": { + "field": "model", + "value": [ + "jev-latest", + "jev-1.13.0", + "jev-preview", + "deep-research-pro-preview-12-2025", + "vertex/deep-research-pro-preview-12-2025" + ], + "not": true + } + }, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["memoryType"], + "any": [] + } + }, + { + "id": "slidingWindowTokens", + "type": "short-input", + "title": "Max Tokens", + "condition": { + "field": "memoryType", + "value": ["sliding_window_tokens"], + "and": { + "field": "model", + "value": [ + "jev-latest", + "jev-1.13.0", + "jev-preview", + "deep-research-pro-preview-12-2025", + "vertex/deep-research-pro-preview-12-2025" + ], + "not": true + } + }, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["memoryType"], + "any": [] + } + }, + { + "id": "temperature", + "type": "slider", + "title": "Temperature", + "mode": "advanced", + "condition": { + "opaque": true + }, + "defaultValue": 0.3, + "min": 0, + "max": 1, + "valueKind": "number", + "storage": "native" + }, + { + "id": "temperature", + "type": "slider", + "title": "Temperature", + "mode": "advanced", + "condition": { + "opaque": true + }, + "defaultValue": 0.3, + "min": 0, + "max": 1.5, + "valueKind": "number", + "storage": "native" + }, + { + "id": "temperature", + "type": "slider", + "title": "Temperature", + "mode": "advanced", + "condition": { + "opaque": true + }, + "defaultValue": 0.3, + "min": 0, + "max": 2, + "valueKind": "number", + "storage": "native" + }, + { + "id": "maxTokens", + "type": "short-input", + "title": "Max Output Tokens", + "mode": "advanced", + "condition": { + "field": "model", + "value": [ + "deep-research-pro-preview-12-2025", + "vertex/deep-research-pro-preview-12-2025", + "jev-latest", + "jev-1.13.0", + "jev-preview" + ], + "not": true + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "responseFormat", + "type": "code", + "title": "Response Format", + "condition": { + "field": "model", + "value": [ + "deep-research-pro-preview-12-2025", + "vertex/deep-research-pro-preview-12-2025", + "jev-latest", + "jev-1.13.0", + "jev-preview" + ], + "not": true + }, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "previousInteractionId", + "type": "short-input", + "title": "Previous Interaction ID", + "condition": { + "field": "model", + "value": [ + "deep-research-pro-preview-12-2025", + "vertex/deep-research-pro-preview-12-2025" + ] + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "fallbackModels", + "type": "model-fallback-list", + "title": "Fallback models", + "mode": "advanced", + "condition": { + "field": "model", + "value": ["jev-latest", "jev-1.13.0", "jev-preview"], + "not": true + }, + "valueKind": "array", + "storage": "native" + } + ], + "tools": { + "access": [ + "openai_chat", + "anthropic_chat", + "google_chat", + "xai_chat", + "deepseek_chat", + "deepseek_reasoner" + ], + "selector": "opaque" + }, + "inputs": { + "evaluationState": { + "type": "string" + }, + "evaluationQuestions": { + "type": "json" + }, + "messages": { + "type": "json" + }, + "files": { + "type": "array" + }, + "memoryType": { + "type": "string" + }, + "conversationId": { + "type": "string" + }, + "slidingWindowSize": { + "type": "string" + }, + "slidingWindowTokens": { + "type": "string" + }, + "model": { + "type": "string" + }, + "apiKey": { + "type": "string" + }, + "azureEndpoint": { + "type": "string" + }, + "azureApiVersion": { + "type": "string" + }, + "vertexCredential": { + "type": "string" + }, + "vertexProject": { + "type": "string" + }, + "vertexLocation": { + "type": "string" + }, + "bedrockAccessKeyId": { + "type": "string" + }, + "bedrockSecretKey": { + "type": "string" + }, + "bedrockRegion": { + "type": "string" + }, + "bedrockAuthMode": { + "type": "string" + }, + "bedrockCredential": { + "type": "string" + }, + "responseFormat": { + "type": "json" + }, + "temperature": { + "type": "number" + }, + "maxTokens": { + "type": "number" + }, + "reasoningEffort": { + "type": "string" + }, + "verbosity": { + "type": "string" + }, + "thinkingLevel": { + "type": "string" + }, + "promptCaching": { + "type": "boolean" + }, + "fallbackModels": { + "type": "json" + }, + "tools": { + "type": "json" + }, + "skills": { + "type": "json" + } + }, + "outputs": { + "answers": { + "type": "json", + "description": "Evaluation answers keyed by question ID: choice, score, or noul, with probabilities and confidence where applicable", + "condition": { + "field": "model", + "value": ["jev-latest", "jev-1.13.0", "jev-preview"], + "allowReference": true + } + }, + "content": { + "type": "string", + "description": "Generated response content" + }, + "model": { + "type": "string", + "description": "Model used for generation" + }, + "tokens": { + "type": "json", + "description": "Token usage statistics" + }, + "toolCalls": { + "type": "json", + "description": "Tool calls made" + }, + "providerTiming": { + "type": "json", + "description": "Provider timing information" + }, + "cost": { + "type": "json", + "description": "Cost of the API call" + }, + "interactionId": { + "type": "string", + "description": "Interaction ID for multi-turn deep research follow-ups", + "condition": { + "field": "model", + "value": [ + "deep-research-pro-preview-12-2025", + "vertex/deep-research-pro-preview-12-2025" + ] + } + } + }, + "dynamicOutputs": { + "source": "responseFormat", + "param": "responseFormat" + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false + }, + "description": "Build an agent" + }, + "api": { + "type": "api", + "name": "API", + "category": "blocks", + "subBlocks": [ + { + "id": "url", + "type": "short-input", + "title": "URL", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "method", + "type": "dropdown", + "title": "Method", + "required": true, + "options": [ + { + "id": "GET", + "label": "GET" + }, + { + "id": "POST", + "label": "POST" + }, + { + "id": "PUT", + "label": "PUT" + }, + { + "id": "DELETE", + "label": "DELETE" + }, + { + "id": "PATCH", + "label": "PATCH" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "params", + "type": "table", + "title": "Query Params", + "columns": ["Key", "Value"], + "valueKind": "array", + "storage": "json-string", + "structured": "tableRows" + }, + { + "id": "headers", + "type": "table", + "title": "Headers", + "columns": ["Key", "Value"], + "valueKind": "array", + "storage": "json-string", + "structured": "tableRows" + }, + { + "id": "body", + "type": "code", + "title": "Body", + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "timeout", + "type": "short-input", + "title": "Timeout (ms)", + "mode": "advanced", + "valueKind": "string", + "storage": "native" + }, + { + "id": "retries", + "type": "short-input", + "title": "Retries", + "mode": "advanced", + "valueKind": "string", + "storage": "native" + }, + { + "id": "retryDelayMs", + "type": "short-input", + "title": "Retry delay (ms)", + "mode": "advanced", + "valueKind": "string", + "storage": "native" + }, + { + "id": "retryMaxDelayMs", + "type": "short-input", + "title": "Max retry delay (ms)", + "mode": "advanced", + "valueKind": "string", + "storage": "native" + }, + { + "id": "retryNonIdempotent", + "type": "switch", + "title": "Retry non-idempotent methods", + "mode": "advanced", + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "redirectPolicyVersion", + "type": "short-input", + "title": "Redirect policy version", + "defaultValue": "standard-v1", + "hidden": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "sendCredentialsOnCrossOriginRedirect", + "type": "switch", + "title": "Send credentials on cross-origin redirects", + "mode": "advanced", + "defaultValue": true, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "proxyUrl", + "type": "short-input", + "title": "Proxy URL", + "mode": "advanced", + "valueKind": "string", + "storage": "native" + } + ], + "tools": { + "access": ["http_request"], + "selector": "single" + }, + "inputs": { + "url": { + "type": "string" + }, + "method": { + "type": "string" + }, + "headers": { + "type": "json" + }, + "body": { + "type": "json" + }, + "params": { + "type": "json" + }, + "timeout": { + "type": "number" + }, + "retries": { + "type": "number" + }, + "retryDelayMs": { + "type": "number" + }, + "retryMaxDelayMs": { + "type": "number" + }, + "retryNonIdempotent": { + "type": "boolean" + }, + "redirectPolicyVersion": { + "type": "string" + }, + "sendCredentialsOnCrossOriginRedirect": { + "type": "boolean" + }, + "proxyUrl": { + "type": "string" + } + }, + "outputs": { + "data": { + "type": "json", + "description": "API response data (JSON, text, or other formats)" + }, + "status": { + "type": "number", + "description": "HTTP status code (200, 404, 500, etc.)" + }, + "headers": { + "type": "json", + "description": "HTTP response headers as key-value pairs" + } + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false + }, + "description": "Use any API" + }, + "condition": { + "type": "condition", + "name": "Condition", + "category": "blocks", + "subBlocks": [ + { + "id": "conditions", + "type": "condition-input", + "valueKind": "branches", + "storage": "native", + "structured": "branches" + } + ], + "tools": { + "access": [], + "selector": "single" + }, + "inputs": {}, + "outputs": { + "conditionResult": { + "type": "boolean", + "description": "Whether the selected branch's own test passed: true when an if/else-if condition matched, false when the else branch or no branch fired" + }, + "selectedPath": { + "type": "json", + "description": "Selected execution path" + }, + "selectedOption": { + "type": "string", + "description": "Selected condition option ID" + }, + "selectedTitle": { + "type": "string", + "description": "Title of the selected branch (e.g. \"if\", \"else if\", \"else\"); null when no branch fired" + } + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false, + "branches": { + "subBlockId": "conditions", + "kind": "condition" + } + }, + "description": "Add a condition" + }, + "router_v2": { + "type": "router_v2", + "name": "Router", + "category": "blocks", + "subBlocks": [ + { + "id": "context", + "type": "long-input", + "title": "Context", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "routes", + "type": "router-input", + "valueKind": "branches", + "storage": "native", + "structured": "branches" + }, + { + "id": "model", + "type": "combobox", + "title": "Model", + "required": true, + "defaultValue": "claude-sonnet-5-5", + "options": [ + { + "id": "azure-anthropic/claude-fable-5-1", + "label": "azure-anthropic/claude-fable-5-1" + }, + { + "id": "azure-anthropic/claude-haiku-4-5", + "label": "azure-anthropic/claude-haiku-4-5" + }, + { + "id": "azure-anthropic/claude-haiku-5-5", + "label": "azure-anthropic/claude-haiku-5-5" + }, + { + "id": "azure-anthropic/claude-opus-4-1", + "label": "azure-anthropic/claude-opus-4-1" + }, + { + "id": "azure-anthropic/claude-opus-4-5", + "label": "azure-anthropic/claude-opus-4-5" + }, + { + "id": "azure-anthropic/claude-opus-4-6", + "label": "azure-anthropic/claude-opus-4-6" + }, + { + "id": "azure-anthropic/claude-opus-4-7", + "label": "azure-anthropic/claude-opus-4-7" + }, + { + "id": "azure-anthropic/claude-opus-4-8", + "label": "azure-anthropic/claude-opus-4-8" + }, + { + "id": "azure-anthropic/claude-opus-5", + "label": "azure-anthropic/claude-opus-5" + }, + { + "id": "azure-anthropic/claude-opus-5-5", + "label": "azure-anthropic/claude-opus-5-5" + }, + { + "id": "azure-anthropic/claude-sonnet-4-5", + "label": "azure-anthropic/claude-sonnet-4-5" + }, + { + "id": "azure-anthropic/claude-sonnet-4-6", + "label": "azure-anthropic/claude-sonnet-4-6" + }, + { + "id": "azure-anthropic/claude-sonnet-5", + "label": "azure-anthropic/claude-sonnet-5" + }, + { + "id": "azure-anthropic/claude-sonnet-5-5", + "label": "azure-anthropic/claude-sonnet-5-5" + }, + { + "id": "azure/gpt-4.1", + "label": "azure/gpt-4.1" + }, + { + "id": "azure/gpt-4.1-mini", + "label": "azure/gpt-4.1-mini" + }, + { + "id": "azure/gpt-4.1-nano", + "label": "azure/gpt-4.1-nano" + }, + { + "id": "azure/gpt-4o", + "label": "azure/gpt-4o" + }, + { + "id": "azure/gpt-5", + "label": "azure/gpt-5" + }, + { + "id": "azure/gpt-5-chat", + "label": "azure/gpt-5-chat" + }, + { + "id": "azure/gpt-5-mini", + "label": "azure/gpt-5-mini" + }, + { + "id": "azure/gpt-5-nano", + "label": "azure/gpt-5-nano" + }, + { + "id": "azure/gpt-5.1", + "label": "azure/gpt-5.1" + }, + { + "id": "azure/gpt-5.1-codex", + "label": "azure/gpt-5.1-codex" + }, + { + "id": "azure/gpt-5.2", + "label": "azure/gpt-5.2" + }, + { + "id": "azure/gpt-5.4", + "label": "azure/gpt-5.4" + }, + { + "id": "azure/gpt-5.4-mini", + "label": "azure/gpt-5.4-mini" + }, + { + "id": "azure/gpt-5.4-nano", + "label": "azure/gpt-5.4-nano" + }, + { + "id": "azure/gpt-5.4-pro", + "label": "azure/gpt-5.4-pro" + }, + { + "id": "azure/gpt-5.5", + "label": "azure/gpt-5.5" + }, + { + "id": "azure/gpt-5.6-luna", + "label": "azure/gpt-5.6-luna" + }, + { + "id": "azure/gpt-5.6-sol", + "label": "azure/gpt-5.6-sol" + }, + { + "id": "azure/gpt-5.6-terra", + "label": "azure/gpt-5.6-terra" + }, + { + "id": "azure/gpt-6-astra", + "label": "azure/gpt-6-astra" + }, + { + "id": "azure/gpt-6-luna", + "label": "azure/gpt-6-luna" + }, + { + "id": "azure/gpt-6-sol", + "label": "azure/gpt-6-sol" + }, + { + "id": "azure/gpt-6.1-sol", + "label": "azure/gpt-6.1-sol" + }, + { + "id": "azure/model-router", + "label": "azure/model-router" + }, + { + "id": "azure/o3", + "label": "azure/o3" + }, + { + "id": "azure/o4-mini", + "label": "azure/o4-mini" + }, + { + "id": "bedrock/amazon.nova-2-lite-v1:0", + "label": "bedrock/amazon.nova-2-lite-v1:0" + }, + { + "id": "bedrock/amazon.nova-lite-v1:0", + "label": "bedrock/amazon.nova-lite-v1:0" + }, + { + "id": "bedrock/amazon.nova-micro-v1:0", + "label": "bedrock/amazon.nova-micro-v1:0" + }, + { + "id": "bedrock/amazon.nova-premier-v1:0", + "label": "bedrock/amazon.nova-premier-v1:0" + }, + { + "id": "bedrock/amazon.nova-pro-v1:0", + "label": "bedrock/amazon.nova-pro-v1:0" + }, + { + "id": "bedrock/amazon.titan-text-premier-v1:0", + "label": "bedrock/amazon.titan-text-premier-v1:0" + }, + { + "id": "bedrock/anthropic.claude-fable-5", + "label": "bedrock/anthropic.claude-fable-5" + }, + { + "id": "bedrock/anthropic.claude-haiku-4-5-20251001-v1:0", + "label": "bedrock/anthropic.claude-haiku-4-5-20251001-v1:0" + }, + { + "id": "bedrock/anthropic.claude-opus-4-1-20250805-v1:0", + "label": "bedrock/anthropic.claude-opus-4-1-20250805-v1:0" + }, + { + "id": "bedrock/anthropic.claude-opus-4-5-20251101-v1:0", + "label": "bedrock/anthropic.claude-opus-4-5-20251101-v1:0" + }, + { + "id": "bedrock/anthropic.claude-opus-4-6-v1", + "label": "bedrock/anthropic.claude-opus-4-6-v1" + }, + { + "id": "bedrock/anthropic.claude-opus-4-7", + "label": "bedrock/anthropic.claude-opus-4-7" + }, + { + "id": "bedrock/anthropic.claude-opus-4-8", + "label": "bedrock/anthropic.claude-opus-4-8" + }, + { + "id": "bedrock/anthropic.claude-opus-5", + "label": "bedrock/anthropic.claude-opus-5" + }, + { + "id": "bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0", + "label": "bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0" + }, + { + "id": "bedrock/anthropic.claude-sonnet-4-6", + "label": "bedrock/anthropic.claude-sonnet-4-6" + }, + { + "id": "bedrock/anthropic.claude-sonnet-5", + "label": "bedrock/anthropic.claude-sonnet-5" + }, + { + "id": "bedrock/cohere.command-r-plus-v1:0", + "label": "bedrock/cohere.command-r-plus-v1:0" + }, + { + "id": "bedrock/cohere.command-r-v1:0", + "label": "bedrock/cohere.command-r-v1:0" + }, + { + "id": "bedrock/deepseek.v3.2", + "label": "bedrock/deepseek.v3.2" + }, + { + "id": "bedrock/meta.llama3-1-405b-instruct-v1:0", + "label": "bedrock/meta.llama3-1-405b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama3-1-70b-instruct-v1:0", + "label": "bedrock/meta.llama3-1-70b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama3-1-8b-instruct-v1:0", + "label": "bedrock/meta.llama3-1-8b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama3-2-11b-instruct-v1:0", + "label": "bedrock/meta.llama3-2-11b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama3-2-1b-instruct-v1:0", + "label": "bedrock/meta.llama3-2-1b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama3-2-3b-instruct-v1:0", + "label": "bedrock/meta.llama3-2-3b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama3-2-90b-instruct-v1:0", + "label": "bedrock/meta.llama3-2-90b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama3-3-70b-instruct-v1:0", + "label": "bedrock/meta.llama3-3-70b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama4-maverick-17b-instruct-v1:0", + "label": "bedrock/meta.llama4-maverick-17b-instruct-v1:0" + }, + { + "id": "bedrock/meta.llama4-scout-17b-instruct-v1:0", + "label": "bedrock/meta.llama4-scout-17b-instruct-v1:0" + }, + { + "id": "bedrock/minimax.minimax-m2.5", + "label": "bedrock/minimax.minimax-m2.5" + }, + { + "id": "bedrock/mistral.magistral-small-2509", + "label": "bedrock/mistral.magistral-small-2509" + }, + { + "id": "bedrock/mistral.ministral-3-14b-instruct", + "label": "bedrock/mistral.ministral-3-14b-instruct" + }, + { + "id": "bedrock/mistral.ministral-3-3b-instruct", + "label": "bedrock/mistral.ministral-3-3b-instruct" + }, + { + "id": "bedrock/mistral.ministral-3-8b-instruct", + "label": "bedrock/mistral.ministral-3-8b-instruct" + }, + { + "id": "bedrock/mistral.mistral-large-2407-v1:0", + "label": "bedrock/mistral.mistral-large-2407-v1:0" + }, + { + "id": "bedrock/mistral.mistral-large-3-675b-instruct", + "label": "bedrock/mistral.mistral-large-3-675b-instruct" + }, + { + "id": "bedrock/mistral.mixtral-8x7b-instruct-v0:1", + "label": "bedrock/mistral.mixtral-8x7b-instruct-v0:1" + }, + { + "id": "bedrock/mistral.pixtral-large-2502-v1:0", + "label": "bedrock/mistral.pixtral-large-2502-v1:0" + }, + { + "id": "bedrock/moonshotai.kimi-k2.5", + "label": "bedrock/moonshotai.kimi-k2.5" + }, + { + "id": "bedrock/openai.gpt-5.6-luna", + "label": "bedrock/openai.gpt-5.6-luna" + }, + { + "id": "bedrock/openai.gpt-5.6-sol", + "label": "bedrock/openai.gpt-5.6-sol" + }, + { + "id": "bedrock/openai.gpt-5.6-terra", + "label": "bedrock/openai.gpt-5.6-terra" + }, + { + "id": "bedrock/openai.gpt-6-astra", + "label": "bedrock/openai.gpt-6-astra" + }, + { + "id": "bedrock/openai.gpt-6.1-sol", + "label": "bedrock/openai.gpt-6.1-sol" + }, + { + "id": "bedrock/openai.gpt-oss-120b-1:0", + "label": "bedrock/openai.gpt-oss-120b-1:0" + }, + { + "id": "bedrock/openai.gpt-oss-20b-1:0", + "label": "bedrock/openai.gpt-oss-20b-1:0" + }, + { + "id": "bedrock/zai.glm-5", + "label": "bedrock/zai.glm-5" + }, + { + "id": "cerebras/gemma-4-31b", + "label": "cerebras/gemma-4-31b" + }, + { + "id": "cerebras/gpt-oss-120b", + "label": "cerebras/gpt-oss-120b" + }, + { + "id": "cerebras/llama3.1-8b", + "label": "cerebras/llama3.1-8b" + }, + { + "id": "cerebras/qwen-3-235b-a22b-instruct-2507", + "label": "cerebras/qwen-3-235b-a22b-instruct-2507" + }, + { + "id": "cerebras/qwen-3.8-27b", + "label": "cerebras/qwen-3.8-27b" + }, + { + "id": "cerebras/zai-glm-4.7", + "label": "cerebras/zai-glm-4.7" + }, + { + "id": "chat-latest", + "label": "chat-latest" + }, + { + "id": "claude-3-haiku-20240307", + "label": "claude-3-haiku-20240307" + }, + { + "id": "claude-fable-5", + "label": "claude-fable-5" + }, + { + "id": "claude-fable-5-1", + "label": "claude-fable-5-1" + }, + { + "id": "claude-fable-5-2", + "label": "claude-fable-5-2" + }, + { + "id": "claude-haiku-4-5", + "label": "claude-haiku-4-5" + }, + { + "id": "claude-haiku-5-5", + "label": "claude-haiku-5-5" + }, + { + "id": "claude-opus-4-0", + "label": "claude-opus-4-0" + }, + { + "id": "claude-opus-4-1", + "label": "claude-opus-4-1" + }, + { + "id": "claude-opus-4-5", + "label": "claude-opus-4-5" + }, + { + "id": "claude-opus-4-6", + "label": "claude-opus-4-6" + }, + { + "id": "claude-opus-4-7", + "label": "claude-opus-4-7" + }, + { + "id": "claude-opus-4-8", + "label": "claude-opus-4-8" + }, + { + "id": "claude-opus-5", + "label": "claude-opus-5" + }, + { + "id": "claude-opus-5-5", + "label": "claude-opus-5-5" + }, + { + "id": "claude-sonnet-4-0", + "label": "claude-sonnet-4-0" + }, + { + "id": "claude-sonnet-4-5", + "label": "claude-sonnet-4-5" + }, + { + "id": "claude-sonnet-4-6", + "label": "claude-sonnet-4-6" + }, + { + "id": "claude-sonnet-5", + "label": "claude-sonnet-5" + }, + { + "id": "claude-sonnet-5-5", + "label": "claude-sonnet-5-5" + }, + { + "id": "codestral-2508", + "label": "codestral-2508" + }, + { + "id": "codestral-latest", + "label": "codestral-latest" + }, + { + "id": "deep-research-pro-preview-12-2025", + "label": "deep-research-pro-preview-12-2025" + }, + { + "id": "deepseek-chat", + "label": "deepseek-chat" + }, + { + "id": "deepseek-flash", + "label": "deepseek-flash" + }, + { + "id": "deepseek-r1", + "label": "deepseek-r1" + }, + { + "id": "deepseek-reasoner", + "label": "deepseek-reasoner" + }, + { + "id": "deepseek-v3", + "label": "deepseek-v3" + }, + { + "id": "deepseek-v4-flash", + "label": "deepseek-v4-flash" + }, + { + "id": "deepseek-v4-pro", + "label": "deepseek-v4-pro" + }, + { + "id": "devstral-2512", + "label": "devstral-2512" + }, + { + "id": "devstral-latest", + "label": "devstral-latest" + }, + { + "id": "devstral-medium-2507", + "label": "devstral-medium-2507" + }, + { + "id": "devstral-small-2507", + "label": "devstral-small-2507" + }, + { + "id": "devstral-small-latest", + "label": "devstral-small-latest" + }, + { + "id": "fugu", + "label": "fugu" + }, + { + "id": "fugu-max", + "label": "fugu-max" + }, + { + "id": "fugu-max-v1.0", + "label": "fugu-max-v1.0" + }, + { + "id": "fugu-ultra", + "label": "fugu-ultra" + }, + { + "id": "fugu-ultra-v2.0", + "label": "fugu-ultra-v2.0" + }, + { + "id": "gemini-2.0-flash", + "label": "gemini-2.0-flash" + }, + { + "id": "gemini-2.0-flash-lite", + "label": "gemini-2.0-flash-lite" + }, + { + "id": "gemini-2.5-flash", + "label": "gemini-2.5-flash" + }, + { + "id": "gemini-2.5-flash-lite", + "label": "gemini-2.5-flash-lite" + }, + { + "id": "gemini-2.5-pro", + "label": "gemini-2.5-pro" + }, + { + "id": "gemini-3-flash-preview", + "label": "gemini-3-flash-preview" + }, + { + "id": "gemini-3.1-flash-lite", + "label": "gemini-3.1-flash-lite" + }, + { + "id": "gemini-3.1-pro-preview", + "label": "gemini-3.1-pro-preview" + }, + { + "id": "gemini-3.5-flash", + "label": "gemini-3.5-flash" + }, + { + "id": "gemini-3.5-flash-lite", + "label": "gemini-3.5-flash-lite" + }, + { + "id": "gemini-3.6-flash", + "label": "gemini-3.6-flash" + }, + { + "id": "gemini-3.7-flash", + "label": "gemini-3.7-flash" + }, + { + "id": "gemini-3.8-flash", + "label": "gemini-3.8-flash" + }, + { + "id": "gemini-4-argon", + "label": "gemini-4-argon" + }, + { + "id": "glm-4-32b-0414-128k", + "label": "glm-4-32b-0414-128k" + }, + { + "id": "glm-4.5", + "label": "glm-4.5" + }, + { + "id": "glm-4.5-air", + "label": "glm-4.5-air" + }, + { + "id": "glm-4.5-airx", + "label": "glm-4.5-airx" + }, + { + "id": "glm-4.5-x", + "label": "glm-4.5-x" + }, + { + "id": "glm-4.6", + "label": "glm-4.6" + }, + { + "id": "glm-4.7", + "label": "glm-4.7" + }, + { + "id": "glm-4.7-flashx", + "label": "glm-4.7-flashx" + }, + { + "id": "glm-5", + "label": "glm-5" + }, + { + "id": "glm-5-turbo", + "label": "glm-5-turbo" + }, + { + "id": "glm-5.1", + "label": "glm-5.1" + }, + { + "id": "glm-5.2", + "label": "glm-5.2" + }, + { + "id": "glm-5.3", + "label": "glm-5.3" + }, + { + "id": "glm-5.3-flash", + "label": "glm-5.3-flash" + }, + { + "id": "glm-5.3-flashx", + "label": "glm-5.3-flashx" + }, + { + "id": "gpt-4.1", + "label": "gpt-4.1" + }, + { + "id": "gpt-4.1-mini", + "label": "gpt-4.1-mini" + }, + { + "id": "gpt-4.1-nano", + "label": "gpt-4.1-nano" + }, + { + "id": "gpt-4o", + "label": "gpt-4o" + }, + { + "id": "gpt-5", + "label": "gpt-5" + }, + { + "id": "gpt-5-chat-latest", + "label": "gpt-5-chat-latest" + }, + { + "id": "gpt-5-mini", + "label": "gpt-5-mini" + }, + { + "id": "gpt-5-nano", + "label": "gpt-5-nano" + }, + { + "id": "gpt-5-pro", + "label": "gpt-5-pro" + }, + { + "id": "gpt-5.1", + "label": "gpt-5.1" + }, + { + "id": "gpt-5.2", + "label": "gpt-5.2" + }, + { + "id": "gpt-5.2-pro", + "label": "gpt-5.2-pro" + }, + { + "id": "gpt-5.3-codex", + "label": "gpt-5.3-codex" + }, + { + "id": "gpt-5.4", + "label": "gpt-5.4" + }, + { + "id": "gpt-5.4-mini", + "label": "gpt-5.4-mini" + }, + { + "id": "gpt-5.4-nano", + "label": "gpt-5.4-nano" + }, + { + "id": "gpt-5.4-pro", + "label": "gpt-5.4-pro" + }, + { + "id": "gpt-5.5", + "label": "gpt-5.5" + }, + { + "id": "gpt-5.5-pro", + "label": "gpt-5.5-pro" + }, + { + "id": "gpt-5.6-luna", + "label": "gpt-5.6-luna" + }, + { + "id": "gpt-5.6-sol", + "label": "gpt-5.6-sol" + }, + { + "id": "gpt-5.6-terra", + "label": "gpt-5.6-terra" + }, + { + "id": "gpt-6-astra", + "label": "gpt-6-astra" + }, + { + "id": "gpt-6-luna", + "label": "gpt-6-luna" + }, + { + "id": "gpt-6-sol", + "label": "gpt-6-sol" + }, + { + "id": "gpt-6.1-sol", + "label": "gpt-6.1-sol" + }, + { + "id": "gpt-6.1-terra", + "label": "gpt-6.1-terra" + }, + { + "id": "grok-3-fast-latest", + "label": "grok-3-fast-latest" + }, + { + "id": "grok-3-latest", + "label": "grok-3-latest" + }, + { + "id": "grok-4-0709", + "label": "grok-4-0709" + }, + { + "id": "grok-4-1-fast-non-reasoning", + "label": "grok-4-1-fast-non-reasoning" + }, + { + "id": "grok-4-1-fast-reasoning", + "label": "grok-4-1-fast-reasoning" + }, + { + "id": "grok-4-fast-non-reasoning", + "label": "grok-4-fast-non-reasoning" + }, + { + "id": "grok-4-fast-reasoning", + "label": "grok-4-fast-reasoning" + }, + { + "id": "grok-4-latest", + "label": "grok-4-latest" + }, + { + "id": "grok-4.20-0309-non-reasoning", + "label": "grok-4.20-0309-non-reasoning" + }, + { + "id": "grok-4.20-0309-reasoning", + "label": "grok-4.20-0309-reasoning" + }, + { + "id": "grok-4.20-multi-agent-0309", + "label": "grok-4.20-multi-agent-0309" + }, + { + "id": "grok-4.3", + "label": "grok-4.3" + }, + { + "id": "grok-4.5", + "label": "grok-4.5" + }, + { + "id": "grok-4.6", + "label": "grok-4.6" + }, + { + "id": "grok-4.7", + "label": "grok-4.7" + }, + { + "id": "grok-code-fast-1", + "label": "grok-code-fast-1" + }, + { + "id": "groq/llama-3.1-8b-instant", + "label": "groq/llama-3.1-8b-instant" + }, + { + "id": "groq/llama-3.3-70b-versatile", + "label": "groq/llama-3.3-70b-versatile" + }, + { + "id": "groq/meta-llama/llama-4-scout-17b-16e-instruct", + "label": "groq/meta-llama/llama-4-scout-17b-16e-instruct" + }, + { + "id": "groq/moonshotai/kimi-k2-instruct-0905", + "label": "groq/moonshotai/kimi-k2-instruct-0905" + }, + { + "id": "groq/openai/gpt-oss-120b", + "label": "groq/openai/gpt-oss-120b" + }, + { + "id": "groq/openai/gpt-oss-20b", + "label": "groq/openai/gpt-oss-20b" + }, + { + "id": "groq/openai/gpt-oss-safeguard-20b", + "label": "groq/openai/gpt-oss-safeguard-20b" + }, + { + "id": "groq/qwen/qwen3-32b", + "label": "groq/qwen/qwen3-32b" + }, + { + "id": "groq/qwen/qwen3.6-27b", + "label": "groq/qwen/qwen3.6-27b" + }, + { + "id": "groq/qwen/qwen3.8-27b", + "label": "groq/qwen/qwen3.8-27b" + }, + { + "id": "jev-1.13.0", + "label": "jev-1.13.0" + }, + { + "id": "jev-latest", + "label": "jev-latest" + }, + { + "id": "jev-preview", + "label": "jev-preview" + }, + { + "id": "kie/claude-fable-5", + "label": "kie/claude-fable-5" + }, + { + "id": "kie/claude-haiku-4-5", + "label": "kie/claude-haiku-4-5" + }, + { + "id": "kie/claude-opus-4-5", + "label": "kie/claude-opus-4-5" + }, + { + "id": "kie/claude-opus-4-6", + "label": "kie/claude-opus-4-6" + }, + { + "id": "kie/claude-opus-4-7", + "label": "kie/claude-opus-4-7" + }, + { + "id": "kie/claude-opus-4-8", + "label": "kie/claude-opus-4-8" + }, + { + "id": "kie/claude-opus-5", + "label": "kie/claude-opus-5" + }, + { + "id": "kie/claude-opus-5-5", + "label": "kie/claude-opus-5-5" + }, + { + "id": "kie/claude-sonnet-4-5", + "label": "kie/claude-sonnet-4-5" + }, + { + "id": "kie/claude-sonnet-4-6", + "label": "kie/claude-sonnet-4-6" + }, + { + "id": "kie/claude-sonnet-5", + "label": "kie/claude-sonnet-5" + }, + { + "id": "kie/claude-sonnet-5-5", + "label": "kie/claude-sonnet-5-5" + }, + { + "id": "kie/gpt-5-5", + "label": "kie/gpt-5-5" + }, + { + "id": "kie/gpt-5-6-luna", + "label": "kie/gpt-5-6-luna" + }, + { + "id": "kie/gpt-5-6-sol", + "label": "kie/gpt-5-6-sol" + }, + { + "id": "kie/gpt-5-6-terra", + "label": "kie/gpt-5-6-terra" + }, + { + "id": "kie/gpt-6-1-sol", + "label": "kie/gpt-6-1-sol" + }, + { + "id": "kie/gpt-6-astra", + "label": "kie/gpt-6-astra" + }, + { + "id": "kie/gpt-6-luna", + "label": "kie/gpt-6-luna" + }, + { + "id": "kie/gpt-6-sol", + "label": "kie/gpt-6-sol" + }, + { + "id": "kie/grok-4-3", + "label": "kie/grok-4-3" + }, + { + "id": "kie/grok-4-5", + "label": "kie/grok-4-5" + }, + { + "id": "kie/grok-4-6", + "label": "kie/grok-4-6" + }, + { + "id": "kie/kimi-k3", + "label": "kie/kimi-k3" + }, + { + "id": "kimi-k2.6", + "label": "kimi-k2.6" + }, + { + "id": "kimi-k2.7-code", + "label": "kimi-k2.7-code" + }, + { + "id": "kimi-k2.7-code-highspeed", + "label": "kimi-k2.7-code-highspeed" + }, + { + "id": "kimi-k3", + "label": "kimi-k3" + }, + { + "id": "labs-leanstral-1-5", + "label": "labs-leanstral-1-5" + }, + { + "id": "magistral-medium-2509", + "label": "magistral-medium-2509" + }, + { + "id": "magistral-medium-latest", + "label": "magistral-medium-latest" + }, + { + "id": "magistral-small-2509", + "label": "magistral-small-2509" + }, + { + "id": "magistral-small-latest", + "label": "magistral-small-latest" + }, + { + "id": "ministral-14b-2512", + "label": "ministral-14b-2512" + }, + { + "id": "ministral-14b-latest", + "label": "ministral-14b-latest" + }, + { + "id": "ministral-3b-2512", + "label": "ministral-3b-2512" + }, + { + "id": "ministral-3b-latest", + "label": "ministral-3b-latest" + }, + { + "id": "ministral-8b-2512", + "label": "ministral-8b-2512" + }, + { + "id": "ministral-8b-latest", + "label": "ministral-8b-latest" + }, + { + "id": "mistral-large-2411", + "label": "mistral-large-2411" + }, + { + "id": "mistral-large-2512", + "label": "mistral-large-2512" + }, + { + "id": "mistral-large-4", + "label": "mistral-large-4" + }, + { + "id": "mistral-large-latest", + "label": "mistral-large-latest" + }, + { + "id": "mistral-medium-2505", + "label": "mistral-medium-2505" + }, + { + "id": "mistral-medium-2508", + "label": "mistral-medium-2508" + }, + { + "id": "mistral-medium-2604", + "label": "mistral-medium-2604" + }, + { + "id": "mistral-medium-3", + "label": "mistral-medium-3" + }, + { + "id": "mistral-medium-3-5", + "label": "mistral-medium-3-5" + }, + { + "id": "mistral-medium-latest", + "label": "mistral-medium-latest" + }, + { + "id": "mistral-small-2506", + "label": "mistral-small-2506" + }, + { + "id": "mistral-small-2603", + "label": "mistral-small-2603" + }, + { + "id": "mistral-small-latest", + "label": "mistral-small-latest" + }, + { + "id": "muse-spark-1.1", + "label": "muse-spark-1.1" + }, + { + "id": "muse-spark-1.3", + "label": "muse-spark-1.3" + }, + { + "id": "nebius/deepseek-ai/deepseek-v4-flash-0731", + "label": "nebius/deepseek-ai/deepseek-v4-flash-0731" + }, + { + "id": "nebius/deepseek-ai/deepseek-v4-pro", + "label": "nebius/deepseek-ai/deepseek-v4-pro" + }, + { + "id": "nebius/deepseek-ai/deepseek-v4-pro-0813", + "label": "nebius/deepseek-ai/deepseek-v4-pro-0813" + }, + { + "id": "nebius/deepseek-ai/deepseek-v4.1-flash", + "label": "nebius/deepseek-ai/deepseek-v4.1-flash" + }, + { + "id": "nebius/google/gemma-3-27b-it", + "label": "nebius/google/gemma-3-27b-it" + }, + { + "id": "nebius/minimaxai/minimax-m3", + "label": "nebius/minimaxai/minimax-m3" + }, + { + "id": "nebius/moonshotai/kimi-k2.6", + "label": "nebius/moonshotai/kimi-k2.6" + }, + { + "id": "nebius/moonshotai/kimi-k2.7-code", + "label": "nebius/moonshotai/kimi-k2.7-code" + }, + { + "id": "nebius/moonshotai/kimi-k3", + "label": "nebius/moonshotai/kimi-k3" + }, + { + "id": "nebius/nousresearch/hermes-4-405b", + "label": "nebius/nousresearch/hermes-4-405b" + }, + { + "id": "nebius/nvidia/nemotron-3-super-120b-a12b", + "label": "nebius/nvidia/nemotron-3-super-120b-a12b" + }, + { + "id": "nebius/nvidia/nemotron-3-ultra-550b-a55b", + "label": "nebius/nvidia/nemotron-3-ultra-550b-a55b" + }, + { + "id": "nebius/nvidia/nemotron-3_5-lightning", + "label": "nebius/nvidia/nemotron-3_5-lightning" + }, + { + "id": "nebius/nvidia/nvidia-nemotron-3-nano-30b-a3b", + "label": "nebius/nvidia/nvidia-nemotron-3-nano-30b-a3b" + }, + { + "id": "nebius/openai/gpt-oss-120b", + "label": "nebius/openai/gpt-oss-120b" + }, + { + "id": "nebius/openbmb/minicpm-v-4_5", + "label": "nebius/openbmb/minicpm-v-4_5" + }, + { + "id": "nebius/qwen/qwen3-235b-a22b-instruct-2507", + "label": "nebius/qwen/qwen3-235b-a22b-instruct-2507" + }, + { + "id": "nebius/qwen/qwen3-30b-a3b-instruct-2507", + "label": "nebius/qwen/qwen3-30b-a3b-instruct-2507" + }, + { + "id": "nebius/qwen/qwen3.5-397b-a17b", + "label": "nebius/qwen/qwen3.5-397b-a17b" + }, + { + "id": "nebius/qwen/qwen3.8-27b", + "label": "nebius/qwen/qwen3.8-27b" + }, + { + "id": "nebius/zai-org/glm-5.1", + "label": "nebius/zai-org/glm-5.1" + }, + { + "id": "nebius/zai-org/glm-5.2", + "label": "nebius/zai-org/glm-5.2" + }, + { + "id": "nebius/zai-org/glm-5.3", + "label": "nebius/zai-org/glm-5.3" + }, + { + "id": "nebius/zai-org/glm-5.3-flash", + "label": "nebius/zai-org/glm-5.3-flash" + }, + { + "id": "nvidia/llama-3.1-nemotron-70b-instruct", + "label": "nvidia/llama-3.1-nemotron-70b-instruct" + }, + { + "id": "nvidia/llama-3.1-nemotron-ultra-253b-v1", + "label": "nvidia/llama-3.1-nemotron-ultra-253b-v1" + }, + { + "id": "nvidia/llama-3.3-nemotron-super-49b-v1.5", + "label": "nvidia/llama-3.3-nemotron-super-49b-v1.5" + }, + { + "id": "nvidia/nemotron-3-nano-30b-a3b", + "label": "nvidia/nemotron-3-nano-30b-a3b" + }, + { + "id": "nvidia/nemotron-3-super-120b-a12b", + "label": "nvidia/nemotron-3-super-120b-a12b" + }, + { + "id": "nvidia/nemotron-3-ultra-550b-a55b", + "label": "nvidia/nemotron-3-ultra-550b-a55b" + }, + { + "id": "nvidia/nemotron-3.5-lightning-30b-a3b", + "label": "nvidia/nemotron-3.5-lightning-30b-a3b" + }, + { + "id": "o1", + "label": "o1" + }, + { + "id": "o3", + "label": "o3" + }, + { + "id": "o3-mini", + "label": "o3-mini" + }, + { + "id": "o3-pro", + "label": "o3-pro" + }, + { + "id": "o4-mini", + "label": "o4-mini" + }, + { + "id": "open-mistral-nemo", + "label": "open-mistral-nemo" + }, + { + "id": "sakana-namazu", + "label": "sakana-namazu" + }, + { + "id": "sakana-namazu-v1.0", + "label": "sakana-namazu-v1.0" + }, + { + "id": "thinkingmachines/inkling", + "label": "thinkingmachines/inkling" + }, + { + "id": "thinkingmachines/inkling-2-small", + "label": "thinkingmachines/inkling-2-small" + }, + { + "id": "thinkingmachines/inkling-small", + "label": "thinkingmachines/inkling-small" + }, + { + "id": "vertex/deep-research-pro-preview-12-2025", + "label": "vertex/deep-research-pro-preview-12-2025" + }, + { + "id": "vertex/gemini-2.0-flash", + "label": "vertex/gemini-2.0-flash" + }, + { + "id": "vertex/gemini-2.0-flash-lite", + "label": "vertex/gemini-2.0-flash-lite" + }, + { + "id": "vertex/gemini-2.5-flash", + "label": "vertex/gemini-2.5-flash" + }, + { + "id": "vertex/gemini-2.5-flash-lite", + "label": "vertex/gemini-2.5-flash-lite" + }, + { + "id": "vertex/gemini-2.5-pro", + "label": "vertex/gemini-2.5-pro" + }, + { + "id": "vertex/gemini-3-flash-preview", + "label": "vertex/gemini-3-flash-preview" + }, + { + "id": "vertex/gemini-3-pro-preview", + "label": "vertex/gemini-3-pro-preview" + }, + { + "id": "vertex/gemini-3.1-flash-lite", + "label": "vertex/gemini-3.1-flash-lite" + }, + { + "id": "vertex/gemini-3.1-pro-preview", + "label": "vertex/gemini-3.1-pro-preview" + }, + { + "id": "vertex/gemini-3.5-flash", + "label": "vertex/gemini-3.5-flash" + }, + { + "id": "vertex/gemini-3.5-flash-lite", + "label": "vertex/gemini-3.5-flash-lite" + }, + { + "id": "vertex/gemini-3.6-flash", + "label": "vertex/gemini-3.6-flash" + }, + { + "id": "vertex/gemini-3.7-flash", + "label": "vertex/gemini-3.7-flash" + }, + { + "id": "vertex/gemini-3.8-flash", + "label": "vertex/gemini-3.8-flash" + }, + { + "id": "zai-glm-5-2", + "label": "zai-glm-5-2" + }, + { + "id": "zai-glm-5-3", + "label": "zai-glm-5-3" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "vertexCredential", + "type": "oauth-input", + "title": "Google Cloud Account", + "mode": "basic", + "canonicalParamId": "vertexCredential", + "condition": { + "opaque": true + }, + "required": true, + "serviceId": "vertex-ai", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "vertexManualCredential", + "type": "short-input", + "title": "Google Cloud Account", + "mode": "advanced", + "canonicalParamId": "vertexCredential", + "condition": { + "opaque": true + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "apiKey", + "type": "short-input", + "title": "API Key", + "condition": { + "opaque": true + }, + "required": true, + "password": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "azureEndpoint", + "type": "short-input", + "title": "Azure Endpoint", + "condition": { + "opaque": true + }, + "password": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "azureApiVersion", + "type": "short-input", + "title": "Azure API Version", + "condition": { + "opaque": true + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "vertexProject", + "type": "short-input", + "title": "Vertex AI Project", + "condition": { + "opaque": true + }, + "required": true, + "password": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "vertexLocation", + "type": "short-input", + "title": "Vertex AI Location", + "condition": { + "opaque": true + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "bedrockAuthMode", + "type": "dropdown", + "title": "AWS Authentication", + "condition": { + "opaque": true + }, + "valueDefault": { + "constant": "access_keys" + }, + "options": [ + { + "id": "access_keys", + "label": "Access keys" + }, + { + "id": "credential", + "label": "Saved AWS credential" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "bedrockCredential", + "type": "oauth-input", + "title": "AWS Credential", + "mode": "basic", + "canonicalParamId": "bedrockCredential", + "condition": { + "opaque": true + }, + "required": true, + "serviceId": "aws", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "bedrockManualCredential", + "type": "short-input", + "title": "AWS Credential", + "mode": "advanced", + "canonicalParamId": "bedrockCredential", + "condition": { + "opaque": true + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "bedrockAccessKeyId", + "type": "short-input", + "title": "AWS Access Key ID", + "condition": { + "opaque": true + }, + "required": true, + "password": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "bedrockSecretKey", + "type": "short-input", + "title": "AWS Secret Access Key", + "condition": { + "opaque": true + }, + "required": true, + "password": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "bedrockRegion", + "type": "short-input", + "title": "AWS Region", + "condition": { + "opaque": true + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "fallbackModels", + "type": "model-fallback-list", + "title": "Fallback models", + "mode": "advanced", + "valueKind": "array", + "storage": "native" + } + ], + "tools": { + "access": [ + "openai_chat", + "anthropic_chat", + "google_chat", + "xai_chat", + "deepseek_chat", + "deepseek_reasoner" + ], + "selector": "opaque" + }, + "inputs": { + "context": { + "type": "string" + }, + "routes": { + "type": "json" + }, + "model": { + "type": "string" + }, + "apiKey": { + "type": "string" + }, + "azureEndpoint": { + "type": "string" + }, + "azureApiVersion": { + "type": "string" + }, + "vertexProject": { + "type": "string" + }, + "vertexLocation": { + "type": "string" + }, + "vertexCredential": { + "type": "string" + }, + "bedrockAccessKeyId": { + "type": "string" + }, + "bedrockSecretKey": { + "type": "string" + }, + "bedrockRegion": { + "type": "string" + }, + "bedrockAuthMode": { + "type": "string" + }, + "bedrockCredential": { + "type": "string" + }, + "fallbackModels": { + "type": "json" + } + }, + "outputs": { + "context": { + "type": "string", + "description": "Context used for routing" + }, + "model": { + "type": "string", + "description": "Model used" + }, + "tokens": { + "type": "json", + "description": "Token usage" + }, + "cost": { + "type": "json", + "description": "Cost information" + }, + "selectedRoute": { + "type": "string", + "description": "Selected route ID" + }, + "reasoning": { + "type": "string", + "description": "Explanation of why this route was chosen" + }, + "selectedPath": { + "type": "json", + "description": "Selected routing path" + } + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false, + "branches": { + "subBlockId": "routes", + "kind": "router" + } + }, + "description": "Route workflow based on context" + }, + "function": { + "type": "function", + "name": "Function", + "category": "blocks", + "subBlocks": [ + { + "id": "language", + "type": "dropdown", + "valueDefault": { + "constant": "javascript" + }, + "options": [ + { + "id": "javascript", + "label": "JavaScript" + }, + { + "id": "python", + "label": "Python" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "code", + "type": "code", + "title": "Code", + "valueKind": "code", + "storage": "native" + }, + { + "id": "sandboxId", + "type": "combobox", + "title": "Sandbox", + "mode": "advanced", + "options": { + "dynamic": true + }, + "selectorKey": "workspace.sandboxes", + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["language"], + "any": [] + } + }, + { + "id": "secretScope", + "type": "dropdown", + "title": "Secret access", + "valueDefault": { + "constant": "all" + }, + "options": [ + { + "id": "all", + "label": "All secrets" + }, + { + "id": "selected", + "label": "Selected secrets" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "mountedSecrets", + "type": "dropdown", + "title": "Secrets", + "condition": { + "field": "secretScope", + "value": "selected" + }, + "options": { + "dynamic": true + }, + "multiple": true, + "selectorKey": "workspace.secretNames", + "valueKind": "array", + "storage": "native" + } + ], + "tools": { + "access": ["function_execute"], + "selector": "single" + }, + "inputs": { + "code": { + "type": "string" + }, + "language": { + "type": "string" + }, + "timeout": { + "type": "number" + }, + "sandboxId": { + "type": "string" + }, + "secretScope": { + "type": "string" + }, + "mountedSecrets": { + "type": "json" + } + }, + "outputs": { + "result": { + "type": "json", + "description": "Structured result emitted by the executed code" + }, + "stdout": { + "type": "string", + "description": "Console log output and debug messages from function execution" + }, + "files": { + "type": "file[]", + "description": "Files the code wrote to /tmp/sim/outputs, ready to attach or upload downstream" + } + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false + }, + "description": "Run custom logic" + }, + "slack_v2": { + "type": "slack_v2", + "name": "Slack", + "category": "tools", + "triggerAllowed": true, + "triggers": { + "enabled": true, + "available": ["slack_oauth"] + }, + "subBlocks": [ + { + "id": "operation", + "type": "dropdown", + "title": "Operation", + "valueDefault": { + "constant": "send" + }, + "options": [ + { + "id": "send", + "label": "Send Message" + }, + { + "id": "ephemeral", + "label": "Send Ephemeral Message" + }, + { + "id": "canvas", + "label": "Create Canvas" + }, + { + "id": "read", + "label": "Read Messages" + }, + { + "id": "get_message", + "label": "Get Message" + }, + { + "id": "get_thread", + "label": "Get Thread" + }, + { + "id": "get_thread_replies", + "label": "Get Thread Replies" + }, + { + "id": "get_channel_history", + "label": "Get Channel History" + }, + { + "id": "get_permalink", + "label": "Get Message Permalink" + }, + { + "id": "set_status", + "label": "Set Assistant Status" + }, + { + "id": "set_title", + "label": "Set Assistant Title" + }, + { + "id": "set_suggested_prompts", + "label": "Set Assistant Suggested Prompts" + }, + { + "id": "set_agent_suggested_prompts", + "label": "Set Agent Suggested Prompts" + }, + { + "id": "set_agent_session_status", + "label": "Set Agent Session Status" + }, + { + "id": "rename_agent_session", + "label": "Rename Agent Session" + }, + { + "id": "list_channels", + "label": "List Channels" + }, + { + "id": "list_members", + "label": "List Channel Members" + }, + { + "id": "list_users", + "label": "List Users" + }, + { + "id": "get_user", + "label": "Get User Info" + }, + { + "id": "download", + "label": "Download File" + }, + { + "id": "update", + "label": "Update Message" + }, + { + "id": "delete", + "label": "Delete Message" + }, + { + "id": "react", + "label": "Add Reaction" + }, + { + "id": "unreact", + "label": "Remove Reaction" + }, + { + "id": "get_channel_info", + "label": "Get Channel Info" + }, + { + "id": "get_user_presence", + "label": "Get User Presence" + }, + { + "id": "edit_canvas", + "label": "Edit Canvas" + }, + { + "id": "create_channel_canvas", + "label": "Create Channel Canvas" + }, + { + "id": "get_canvas", + "label": "Get Canvas Info" + }, + { + "id": "list_canvases", + "label": "List Canvases" + }, + { + "id": "lookup_canvas_sections", + "label": "Lookup Canvas Sections" + }, + { + "id": "delete_canvas", + "label": "Delete Canvas" + }, + { + "id": "create_list", + "label": "Create List" + }, + { + "id": "rename_list", + "label": "Update List" + }, + { + "id": "share_list", + "label": "Share List" + }, + { + "id": "list_items", + "label": "Read List Items" + }, + { + "id": "get_list_item", + "label": "Get List Item" + }, + { + "id": "create_list_item", + "label": "Create List Item" + }, + { + "id": "update_list_items", + "label": "Update List Items" + }, + { + "id": "delete_list_item", + "label": "Delete List Item" + }, + { + "id": "create_conversation", + "label": "Create Conversation" + }, + { + "id": "invite_to_conversation", + "label": "Invite to Conversation" + }, + { + "id": "open_view", + "label": "Open View" + }, + { + "id": "update_view", + "label": "Update View" + }, + { + "id": "push_view", + "label": "Push View" + }, + { + "id": "publish_view", + "label": "Publish View" + }, + { + "id": "schedule_message", + "label": "Schedule Message" + }, + { + "id": "list_scheduled_messages", + "label": "List Scheduled Messages" + }, + { + "id": "delete_scheduled_message", + "label": "Delete Scheduled Message" + }, + { + "id": "archive_conversation", + "label": "Archive Conversation" + }, + { + "id": "rename_conversation", + "label": "Rename Conversation" + }, + { + "id": "set_conversation_topic", + "label": "Set Conversation Topic" + }, + { + "id": "set_conversation_purpose", + "label": "Set Conversation Purpose" + }, + { + "id": "revoke_list_access", + "label": "Revoke List Access" + }, + { + "id": "start_list_export", + "label": "Start List Export" + }, + { + "id": "get_list_export", + "label": "Get List Export" + }, + { + "id": "delete_list_items", + "label": "Delete List Items" + }, + { + "id": "share_canvas", + "label": "Share Canvas" + }, + { + "id": "revoke_canvas_access", + "label": "Revoke Canvas Access" + }, + { + "id": "join_conversation", + "label": "Join Conversation" + }, + { + "id": "leave_conversation", + "label": "Leave Conversation" + }, + { + "id": "kick_conversation", + "label": "Remove User from Conversation" + }, + { + "id": "unarchive_conversation", + "label": "Unarchive Conversation" + }, + { + "id": "close_conversation", + "label": "Close Conversation" + }, + { + "id": "mark_conversation_read", + "label": "Mark Conversation Read" + }, + { + "id": "open_conversation", + "label": "Open Conversation" + }, + { + "id": "lookup_user_by_email", + "label": "Find User by Email" + }, + { + "id": "list_user_conversations", + "label": "List User Conversations" + }, + { + "id": "get_user_profile", + "label": "Get User Profile" + }, + { + "id": "set_user_presence", + "label": "Set Bot Presence" + }, + { + "id": "get_file_info", + "label": "Get File Info" + }, + { + "id": "list_files", + "label": "List Files" + }, + { + "id": "delete_file", + "label": "Delete File" + }, + { + "id": "get_reactions", + "label": "Get Reactions" + }, + { + "id": "list_reactions", + "label": "List Reactions" + }, + { + "id": "pin_message", + "label": "Pin Message" + }, + { + "id": "unpin_message", + "label": "Unpin Message" + }, + { + "id": "list_pins", + "label": "List Pins" + }, + { + "id": "add_bookmark", + "label": "Add Bookmark" + }, + { + "id": "edit_bookmark", + "label": "Edit Bookmark" + }, + { + "id": "list_bookmarks", + "label": "List Bookmarks" + }, + { + "id": "remove_bookmark", + "label": "Remove Bookmark" + }, + { + "id": "create_user_group", + "label": "Create User Group" + }, + { + "id": "update_user_group", + "label": "Update User Group" + }, + { + "id": "enable_user_group", + "label": "Enable User Group" + }, + { + "id": "disable_user_group", + "label": "Disable User Group" + }, + { + "id": "list_user_groups", + "label": "List User Groups" + }, + { + "id": "list_user_group_members", + "label": "List User Group Members" + }, + { + "id": "update_user_group_members", + "label": "Update User Group Members" + }, + { + "id": "get_dnd_info", + "label": "Get Do Not Disturb Info" + }, + { + "id": "get_team_dnd_info", + "label": "Get Team Do Not Disturb Info" + }, + { + "id": "list_emoji", + "label": "List Custom Emoji" + }, + { + "id": "get_team_info", + "label": "Get Workspace Info" + }, + { + "id": "get_team_profile", + "label": "Get Workspace Profile Fields" + }, + { + "id": "unfurl_links", + "label": "Unfurl Links" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "destinationType", + "type": "dropdown", + "title": "Destination", + "condition": { + "opaque": true + }, + "valueDefault": { + "constant": "channel" + }, + "options": [ + { + "id": "channel", + "label": "Channel" + }, + { + "id": "dm", + "label": "Direct Message" + } + ], + "visibleFor": { + "send": true, + "ephemeral": false, + "canvas": false, + "read": true, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": true, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "credential", + "type": "oauth-input", + "title": "Slack Account", + "mode": "basic", + "canonicalParamId": "oauthCredential", + "condition": { + "opaque": true + }, + "required": true, + "serviceId": "slack", + "visibleFor": { + "send": true, + "ephemeral": true, + "canvas": true, + "read": true, + "get_message": true, + "get_thread": true, + "get_thread_replies": true, + "get_channel_history": true, + "get_permalink": true, + "set_status": true, + "set_title": true, + "set_suggested_prompts": true, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": true, + "list_members": true, + "list_users": true, + "get_user": true, + "download": true, + "update": true, + "delete": true, + "react": true, + "unreact": true, + "get_channel_info": true, + "get_user_presence": true, + "edit_canvas": true, + "create_channel_canvas": true, + "get_canvas": true, + "list_canvases": true, + "lookup_canvas_sections": true, + "delete_canvas": true, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": true, + "invite_to_conversation": true, + "open_view": true, + "update_view": true, + "push_view": true, + "publish_view": true, + "schedule_message": true, + "list_scheduled_messages": true, + "delete_scheduled_message": true, + "archive_conversation": true, + "rename_conversation": true, + "set_conversation_topic": true, + "set_conversation_purpose": true, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "manualCredential", + "type": "short-input", + "title": "Slack Account", + "mode": "advanced", + "canonicalParamId": "oauthCredential", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": true, + "ephemeral": true, + "canvas": true, + "read": true, + "get_message": true, + "get_thread": true, + "get_thread_replies": true, + "get_channel_history": true, + "get_permalink": true, + "set_status": true, + "set_title": true, + "set_suggested_prompts": true, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": true, + "list_members": true, + "list_users": true, + "get_user": true, + "download": true, + "update": true, + "delete": true, + "react": true, + "unreact": true, + "get_channel_info": true, + "get_user_presence": true, + "edit_canvas": true, + "create_channel_canvas": true, + "get_canvas": true, + "list_canvases": true, + "lookup_canvas_sections": true, + "delete_canvas": true, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": true, + "invite_to_conversation": true, + "open_view": true, + "update_view": true, + "push_view": true, + "publish_view": true, + "schedule_message": true, + "list_scheduled_messages": true, + "delete_scheduled_message": true, + "archive_conversation": true, + "rename_conversation": true, + "set_conversation_topic": true, + "set_conversation_purpose": true, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "channel", + "type": "channel-selector", + "title": "Channel", + "mode": "basic", + "canonicalParamId": "channel", + "condition": { + "opaque": true + }, + "required": { + "field": "operation", + "value": [ + "list_canvases", + "list_scheduled_messages", + "set_agent_suggested_prompts", + "set_agent_session_status", + "rename_agent_session", + "create_list", + "rename_list", + "share_list", + "list_items", + "get_list_item", + "create_list_item", + "update_list_items", + "delete_list_item" + ], + "not": true + }, + "options": { + "dynamic": true + }, + "selectorKey": "slack.channels", + "serviceId": "slack", + "visibleFor": { + "send": true, + "ephemeral": true, + "canvas": true, + "read": true, + "get_message": true, + "get_thread": true, + "get_thread_replies": true, + "get_channel_history": true, + "get_permalink": true, + "set_status": true, + "set_title": true, + "set_suggested_prompts": true, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": true, + "list_users": false, + "get_user": false, + "download": true, + "update": true, + "delete": true, + "react": true, + "unreact": true, + "get_channel_info": true, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": true, + "get_canvas": false, + "list_canvases": true, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": true, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": true, + "list_scheduled_messages": true, + "delete_scheduled_message": true, + "archive_conversation": true, + "rename_conversation": true, + "set_conversation_topic": true, + "set_conversation_purpose": true, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "manualChannel", + "type": "short-input", + "title": "Channel ID", + "mode": "advanced", + "canonicalParamId": "channel", + "condition": { + "opaque": true + }, + "required": { + "field": "operation", + "value": [ + "list_canvases", + "list_scheduled_messages", + "set_agent_suggested_prompts", + "set_agent_session_status", + "rename_agent_session", + "create_list", + "rename_list", + "share_list", + "list_items", + "get_list_item", + "create_list_item", + "update_list_items", + "delete_list_item" + ], + "not": true + }, + "visibleFor": { + "send": true, + "ephemeral": true, + "canvas": true, + "read": true, + "get_message": true, + "get_thread": true, + "get_thread_replies": true, + "get_channel_history": true, + "get_permalink": true, + "set_status": true, + "set_title": true, + "set_suggested_prompts": true, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": true, + "list_users": false, + "get_user": false, + "download": true, + "update": true, + "delete": true, + "react": true, + "unreact": true, + "get_channel_info": true, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": true, + "get_canvas": false, + "list_canvases": true, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": true, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": true, + "list_scheduled_messages": true, + "delete_scheduled_message": true, + "archive_conversation": true, + "rename_conversation": true, + "set_conversation_topic": true, + "set_conversation_purpose": true, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "dmUserId", + "type": "user-selector", + "title": "User", + "mode": "basic", + "canonicalParamId": "dmUserId", + "condition": { + "opaque": true + }, + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "slack.users", + "serviceId": "slack", + "visibleFor": { + "send": true, + "ephemeral": true, + "canvas": true, + "read": true, + "get_message": true, + "get_thread": true, + "get_thread_replies": true, + "get_channel_history": true, + "get_permalink": true, + "set_status": true, + "set_title": true, + "set_suggested_prompts": true, + "set_agent_suggested_prompts": true, + "set_agent_session_status": true, + "rename_agent_session": true, + "list_channels": true, + "list_members": true, + "list_users": true, + "get_user": true, + "download": true, + "update": true, + "delete": true, + "react": true, + "unreact": true, + "get_channel_info": true, + "get_user_presence": true, + "edit_canvas": true, + "create_channel_canvas": true, + "get_canvas": true, + "list_canvases": true, + "lookup_canvas_sections": true, + "delete_canvas": true, + "create_list": true, + "rename_list": true, + "share_list": true, + "list_items": true, + "get_list_item": true, + "create_list_item": true, + "update_list_items": true, + "delete_list_item": true, + "create_conversation": true, + "invite_to_conversation": true, + "open_view": true, + "update_view": true, + "push_view": true, + "publish_view": true, + "schedule_message": true, + "list_scheduled_messages": true, + "delete_scheduled_message": true, + "archive_conversation": true, + "rename_conversation": true, + "set_conversation_topic": true, + "set_conversation_purpose": true, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "manualDmUserId", + "type": "short-input", + "title": "User ID", + "mode": "advanced", + "canonicalParamId": "dmUserId", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": true, + "ephemeral": true, + "canvas": true, + "read": true, + "get_message": true, + "get_thread": true, + "get_thread_replies": true, + "get_channel_history": true, + "get_permalink": true, + "set_status": true, + "set_title": true, + "set_suggested_prompts": true, + "set_agent_suggested_prompts": true, + "set_agent_session_status": true, + "rename_agent_session": true, + "list_channels": true, + "list_members": true, + "list_users": true, + "get_user": true, + "download": true, + "update": true, + "delete": true, + "react": true, + "unreact": true, + "get_channel_info": true, + "get_user_presence": true, + "edit_canvas": true, + "create_channel_canvas": true, + "get_canvas": true, + "list_canvases": true, + "lookup_canvas_sections": true, + "delete_canvas": true, + "create_list": true, + "rename_list": true, + "share_list": true, + "list_items": true, + "get_list_item": true, + "create_list_item": true, + "update_list_items": true, + "delete_list_item": true, + "create_conversation": true, + "invite_to_conversation": true, + "open_view": true, + "update_view": true, + "push_view": true, + "publish_view": true, + "schedule_message": true, + "list_scheduled_messages": true, + "delete_scheduled_message": true, + "archive_conversation": true, + "rename_conversation": true, + "set_conversation_topic": true, + "set_conversation_purpose": true, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "ephemeralUser", + "type": "user-selector", + "title": "Target User", + "mode": "basic", + "canonicalParamId": "ephemeralUser", + "condition": { + "opaque": true + }, + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "slack.users", + "serviceId": "slack", + "visibleFor": { + "send": false, + "ephemeral": true, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "manualEphemeralUser", + "type": "short-input", + "title": "Target User ID", + "mode": "advanced", + "canonicalParamId": "ephemeralUser", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": true, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "messageFormat", + "type": "dropdown", + "title": "Message Format", + "condition": { + "opaque": true + }, + "valueDefault": { + "constant": "text" + }, + "options": [ + { + "id": "text", + "label": "Plain Text" + }, + { + "id": "blocks", + "label": "Block Kit" + } + ], + "visibleFor": { + "send": true, + "ephemeral": true, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": true, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": true, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "text", + "type": "long-input", + "title": "Message", + "condition": { + "opaque": true + }, + "required": { + "field": "operation", + "value": ["send", "ephemeral", "schedule_message"], + "and": { + "field": "messageFormat", + "value": "blocks", + "not": true + } + }, + "visibleFor": { + "send": true, + "ephemeral": true, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": true, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "blocks", + "type": "code", + "title": "Block Kit Blocks", + "condition": { + "opaque": true + }, + "required": { + "field": "operation", + "value": ["send", "ephemeral", "update", "schedule_message"], + "and": { + "field": "messageFormat", + "value": "blocks" + } + }, + "language": "json", + "visibleFor": { + "send": true, + "ephemeral": true, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": true, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": true, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "json", + "storage": "native" + }, + { + "id": "threadTs", + "type": "short-input", + "title": "Thread Timestamp", + "condition": { + "opaque": true + }, + "required": false, + "visibleFor": { + "send": true, + "ephemeral": true, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": true, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "attachmentFiles", + "type": "file-upload", + "title": "Attachments", + "mode": "basic", + "canonicalParamId": "files", + "condition": { + "opaque": true + }, + "required": false, + "multiple": true, + "visibleFor": { + "send": true, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "upload", + "storage": "native" + }, + { + "id": "files", + "type": "short-input", + "title": "File Attachments", + "mode": "advanced", + "canonicalParamId": "files", + "condition": { + "opaque": true + }, + "required": false, + "visibleFor": { + "send": true, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "title", + "type": "short-input", + "title": "Canvas Title", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": true, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "content", + "type": "long-input", + "title": "Canvas Content", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": true, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "limit", + "type": "short-input", + "title": "Message Limit", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": true, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "includePrivate", + "type": "dropdown", + "title": "Include Private Channels", + "condition": { + "opaque": true + }, + "valueDefault": { + "constant": "true" + }, + "options": [ + { + "id": "true", + "label": "Yes" + }, + { + "id": "false", + "label": "No" + } + ], + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": true, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "channelLimit", + "type": "short-input", + "title": "Conversations Per Page", + "mode": "advanced", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": true, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "memberLimit", + "type": "short-input", + "title": "Member Limit", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": true, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "includeDeleted", + "type": "dropdown", + "title": "Include Deactivated Users", + "condition": { + "opaque": true + }, + "valueDefault": { + "constant": "false" + }, + "options": [ + { + "id": "false", + "label": "No" + }, + { + "id": "true", + "label": "Yes" + } + ], + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": true, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "userLimit", + "type": "short-input", + "title": "User Limit", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": true, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "paginationCursor", + "type": "short-input", + "title": "Pagination Cursor", + "mode": "advanced", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": true, + "list_members": true, + "list_users": true, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "userId", + "type": "user-selector", + "title": "User", + "mode": "basic", + "canonicalParamId": "userId", + "condition": { + "opaque": true + }, + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "slack.users", + "serviceId": "slack", + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": true, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "manualUserId", + "type": "short-input", + "title": "User ID", + "mode": "advanced", + "canonicalParamId": "userId", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": true, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "getMessageTimestamp", + "type": "short-input", + "title": "Message Timestamp", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": true, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": true, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "getThreadTimestamp", + "type": "short-input", + "title": "Thread Timestamp", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": true, + "get_thread_replies": true, + "get_channel_history": false, + "get_permalink": false, + "set_status": true, + "set_title": true, + "set_suggested_prompts": true, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "threadLimit", + "type": "short-input", + "title": "Message Limit", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": true, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "status", + "type": "short-input", + "title": "Status Text", + "condition": { + "opaque": true + }, + "required": false, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": true, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "loadingMessages", + "type": "long-input", + "title": "Loading Messages", + "condition": { + "opaque": true + }, + "required": false, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": true, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "assistantTitle", + "type": "short-input", + "title": "Thread Title", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": true, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "suggestedPrompts", + "type": "long-input", + "title": "Suggested Prompts", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": true, + "set_agent_suggested_prompts": true, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "promptsTitle", + "type": "short-input", + "title": "Prompts Heading", + "mode": "advanced", + "condition": { + "opaque": true + }, + "required": false, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": true, + "set_agent_suggested_prompts": true, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "historyOldest", + "type": "short-input", + "title": "Oldest Timestamp", + "condition": { + "opaque": true + }, + "required": false, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": true, + "get_channel_history": true, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "historyLatest", + "type": "short-input", + "title": "Latest Timestamp", + "condition": { + "opaque": true + }, + "required": false, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": true, + "get_channel_history": true, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "historyLimit", + "type": "short-input", + "title": "Page Size", + "condition": { + "opaque": true + }, + "required": false, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": true, + "get_channel_history": true, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "historyMaxPages", + "type": "short-input", + "title": "Max Pages", + "mode": "advanced", + "condition": { + "opaque": true + }, + "required": false, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": true, + "get_channel_history": true, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "historyCursor", + "type": "short-input", + "title": "Start Cursor", + "mode": "advanced", + "condition": { + "opaque": true + }, + "required": false, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": true, + "get_channel_history": true, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "historyInclusive", + "type": "dropdown", + "title": "Inclusive", + "condition": { + "opaque": true + }, + "required": false, + "valueDefault": { + "constant": "false" + }, + "options": [ + { + "id": "false", + "label": "No" + }, + { + "id": "true", + "label": "Yes" + } + ], + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": true, + "get_channel_history": true, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "oldest", + "type": "short-input", + "title": "Oldest Timestamp", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": true, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "fileId", + "type": "short-input", + "title": "File ID", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": true, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "downloadFileName", + "type": "short-input", + "title": "File Name Override", + "canonicalParamId": "fileName", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": true, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "updateTimestamp", + "type": "short-input", + "title": "Message Timestamp", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": true, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "updateText", + "type": "long-input", + "title": "New Message Text", + "condition": { + "opaque": true + }, + "required": { + "field": "operation", + "value": "update", + "and": { + "field": "messageFormat", + "value": "blocks", + "not": true + } + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": true, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "deleteTimestamp", + "type": "short-input", + "title": "Message Timestamp", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": true, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "reactionTimestamp", + "type": "short-input", + "title": "Message Timestamp", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": true, + "unreact": true, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "emojiName", + "type": "short-input", + "title": "Emoji Name", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": true, + "unreact": true, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "includeNumMembers", + "type": "dropdown", + "title": "Include Member Count", + "condition": { + "opaque": true + }, + "valueDefault": { + "constant": "true" + }, + "options": [ + { + "id": "true", + "label": "Yes" + }, + { + "id": "false", + "label": "No" + } + ], + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": true, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "presenceUserId", + "type": "user-selector", + "title": "User", + "mode": "basic", + "canonicalParamId": "presenceUserId", + "condition": { + "opaque": true + }, + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "slack.users", + "serviceId": "slack", + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": true, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "manualPresenceUserId", + "type": "short-input", + "title": "User ID", + "mode": "advanced", + "canonicalParamId": "presenceUserId", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": true, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "editCanvasId", + "type": "short-input", + "title": "Canvas ID", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": true, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "canvasOperation", + "type": "dropdown", + "title": "Edit Operation", + "condition": { + "opaque": true + }, + "required": true, + "valueDefault": { + "constant": "insert_at_end" + }, + "options": [ + { + "id": "insert_at_start", + "label": "Insert at Start" + }, + { + "id": "insert_at_end", + "label": "Insert at End" + }, + { + "id": "insert_after", + "label": "Insert After Section" + }, + { + "id": "insert_before", + "label": "Insert Before Section" + }, + { + "id": "replace", + "label": "Replace Canvas or Section" + }, + { + "id": "delete", + "label": "Delete Section" + }, + { + "id": "rename", + "label": "Rename Canvas" + } + ], + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": true, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "canvasContent", + "type": "long-input", + "title": "Content", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": true, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "sectionId", + "type": "short-input", + "title": "Section ID", + "condition": { + "opaque": true + }, + "required": { + "field": "canvasOperation", + "value": ["insert_after", "insert_before", "delete"] + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": true, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "canvasTitle", + "type": "short-input", + "title": "New Title", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": true, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "channelCanvasTitle", + "type": "short-input", + "title": "Canvas Title", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": true, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "channelCanvasContent", + "type": "long-input", + "title": "Canvas Content", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": true, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "getCanvasId", + "type": "short-input", + "title": "Canvas ID", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": true, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "canvasListCount", + "type": "short-input", + "title": "Canvas Limit", + "mode": "advanced", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": true, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "canvasListPage", + "type": "short-input", + "title": "Page", + "mode": "advanced", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": true, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "canvasListUser", + "type": "short-input", + "title": "User ID", + "mode": "advanced", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": true, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "canvasListTsFrom", + "type": "short-input", + "title": "Created After", + "mode": "advanced", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": true, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "canvasListTsTo", + "type": "short-input", + "title": "Created Before", + "mode": "advanced", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": true, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "canvasListTeamId", + "type": "short-input", + "title": "Team ID", + "mode": "advanced", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": true, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "lookupCanvasId", + "type": "short-input", + "title": "Canvas ID", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": true, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "sectionCriteria", + "type": "code", + "title": "Section Criteria", + "condition": { + "opaque": true + }, + "required": true, + "language": "json", + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": true, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "json", + "storage": "native" + }, + { + "id": "deleteCanvasId", + "type": "short-input", + "title": "Canvas ID", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": true, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "conversationName", + "type": "short-input", + "title": "Channel Name", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": true, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "isPrivate", + "type": "dropdown", + "title": "Private Channel", + "condition": { + "opaque": true + }, + "valueDefault": { + "constant": "false" + }, + "options": [ + { + "id": "false", + "label": "No" + }, + { + "id": "true", + "label": "Yes" + } + ], + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": true, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "teamId", + "type": "short-input", + "title": "Team ID", + "mode": "advanced", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": true, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "inviteUsers", + "type": "short-input", + "title": "User IDs", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": true, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "inviteForce", + "type": "dropdown", + "title": "Skip Invalid Users", + "mode": "advanced", + "condition": { + "opaque": true + }, + "valueDefault": { + "constant": "false" + }, + "options": [ + { + "id": "false", + "label": "No" + }, + { + "id": "true", + "label": "Yes" + } + ], + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": true, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "viewTriggerId", + "type": "short-input", + "title": "Trigger ID", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": true, + "update_view": false, + "push_view": true, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "viewInteractivityPointer", + "type": "short-input", + "title": "Interactivity Pointer", + "mode": "advanced", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": true, + "update_view": false, + "push_view": true, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "viewId", + "type": "short-input", + "title": "View ID", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": true, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "viewExternalId", + "type": "short-input", + "title": "External ID", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": true, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "viewHash", + "type": "short-input", + "title": "View Hash", + "mode": "advanced", + "condition": { + "opaque": true + }, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": true, + "push_view": false, + "publish_view": true, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "publishUserId", + "type": "user-selector", + "title": "User", + "mode": "basic", + "canonicalParamId": "publishUserId", + "condition": { + "opaque": true + }, + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "slack.users", + "serviceId": "slack", + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": true, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "manualPublishUserId", + "type": "short-input", + "title": "User ID", + "mode": "advanced", + "canonicalParamId": "publishUserId", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": true, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "viewPayload", + "type": "code", + "title": "View Payload", + "condition": { + "opaque": true + }, + "required": true, + "language": "json", + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": true, + "update_view": true, + "push_view": true, + "publish_view": true, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "json", + "storage": "native" + }, + { + "id": "scheduleAt", + "type": "short-input", + "title": "Send At", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": true, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "scheduledLimit", + "type": "short-input", + "title": "Message Limit", + "mode": "advanced", + "condition": { + "opaque": true + }, + "required": false, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": true, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "scheduledCursor", + "type": "short-input", + "title": "Pagination Cursor", + "mode": "advanced", + "condition": { + "opaque": true + }, + "required": false, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": true, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "scheduledMessageId", + "type": "short-input", + "title": "Scheduled Message ID", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": true, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "renameChannelName", + "type": "short-input", + "title": "New Channel Name", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": true, + "set_conversation_topic": false, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "conversationTopic", + "type": "long-input", + "title": "Topic", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": true, + "set_conversation_purpose": false, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "conversationPurpose", + "type": "long-input", + "title": "Purpose", + "condition": { + "opaque": true + }, + "required": true, + "visibleFor": { + "send": false, + "ephemeral": false, + "canvas": false, + "read": false, + "get_message": false, + "get_thread": false, + "get_thread_replies": false, + "get_channel_history": false, + "get_permalink": false, + "set_status": false, + "set_title": false, + "set_suggested_prompts": false, + "set_agent_suggested_prompts": false, + "set_agent_session_status": false, + "rename_agent_session": false, + "list_channels": false, + "list_members": false, + "list_users": false, + "get_user": false, + "download": false, + "update": false, + "delete": false, + "react": false, + "unreact": false, + "get_channel_info": false, + "get_user_presence": false, + "edit_canvas": false, + "create_channel_canvas": false, + "get_canvas": false, + "list_canvases": false, + "lookup_canvas_sections": false, + "delete_canvas": false, + "create_list": false, + "rename_list": false, + "share_list": false, + "list_items": false, + "get_list_item": false, + "create_list_item": false, + "update_list_items": false, + "delete_list_item": false, + "create_conversation": false, + "invite_to_conversation": false, + "open_view": false, + "update_view": false, + "push_view": false, + "publish_view": false, + "schedule_message": false, + "list_scheduled_messages": false, + "delete_scheduled_message": false, + "archive_conversation": false, + "rename_conversation": false, + "set_conversation_topic": false, + "set_conversation_purpose": true, + "revoke_list_access": false, + "start_list_export": false, + "get_list_export": false, + "delete_list_items": false, + "share_canvas": false, + "revoke_canvas_access": false, + "join_conversation": false, + "leave_conversation": false, + "kick_conversation": false, + "unarchive_conversation": false, + "close_conversation": false, + "mark_conversation_read": false, + "open_conversation": false, + "lookup_user_by_email": false, + "list_user_conversations": false, + "get_user_profile": false, + "set_user_presence": false, + "get_file_info": false, + "list_files": false, + "delete_file": false, + "get_reactions": false, + "list_reactions": false, + "pin_message": false, + "unpin_message": false, + "list_pins": false, + "add_bookmark": false, + "edit_bookmark": false, + "list_bookmarks": false, + "remove_bookmark": false, + "create_user_group": false, + "update_user_group": false, + "enable_user_group": false, + "disable_user_group": false, + "list_user_groups": false, + "list_user_group_members": false, + "update_user_group_members": false, + "get_dnd_info": false, + "get_team_dnd_info": false, + "list_emoji": false, + "get_team_info": false, + "get_team_profile": false, + "unfurl_links": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "agentBotCredential", + "type": "oauth-input", + "title": "Custom Slack Bot", + "mode": "basic", + "canonicalParamId": "agentCredentialId", + "condition": { + "field": "operation", + "value": [ + "set_agent_suggested_prompts", + "set_agent_session_status", + "rename_agent_session" + ] + }, + "required": true, + "serviceId": "slack", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "manualAgentBotCredential", + "type": "short-input", + "title": "Custom Slack Bot Credential ID", + "mode": "advanced", + "canonicalParamId": "agentCredentialId", + "condition": { + "field": "operation", + "value": [ + "set_agent_suggested_prompts", + "set_agent_session_status", + "rename_agent_session" + ] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "agentChannel", + "type": "channel-selector", + "title": "Channel", + "mode": "basic", + "canonicalParamId": "agentChannelId", + "condition": { + "field": "operation", + "value": [ + "set_agent_suggested_prompts", + "set_agent_session_status", + "rename_agent_session" + ] + }, + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "slack.channels", + "serviceId": "slack", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["agentBotCredential"], + "any": [] + } + }, + { + "id": "manualAgentChannel", + "type": "short-input", + "title": "Channel ID", + "mode": "advanced", + "canonicalParamId": "agentChannelId", + "condition": { + "field": "operation", + "value": [ + "set_agent_suggested_prompts", + "set_agent_session_status", + "rename_agent_session" + ] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "agentThreadTs", + "type": "short-input", + "title": "Thread Timestamp", + "condition": { + "field": "operation", + "value": [ + "set_agent_suggested_prompts", + "set_agent_session_status", + "rename_agent_session" + ] + }, + "required": { + "field": "operation", + "value": ["set_agent_session_status", "rename_agent_session"] + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "agentSessionStatus", + "type": "dropdown", + "title": "Session Status", + "condition": { + "field": "operation", + "value": "set_agent_session_status" + }, + "required": true, + "valueDefault": { + "constant": "processing" + }, + "options": [ + { + "id": "active", + "label": "Active" + }, + { + "id": "processing", + "label": "Processing" + }, + { + "id": "suspended", + "label": "Suspended" + }, + { + "id": "closed", + "label": "Closed" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "agentSessionTitle", + "type": "short-input", + "title": "Session Title", + "condition": { + "field": "operation", + "value": ["set_agent_session_status", "rename_agent_session"] + }, + "required": { + "field": "operation", + "value": "rename_agent_session" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "agentInitiatorUser", + "type": "user-selector", + "title": "Initiator", + "mode": "basic", + "canonicalParamId": "agentInitiatorUserId", + "condition": { + "field": "operation", + "value": "set_agent_session_status" + }, + "required": false, + "options": { + "dynamic": true + }, + "selectorKey": "slack.users", + "serviceId": "slack", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["agentBotCredential"], + "any": [] + } + }, + { + "id": "manualAgentInitiatorUser", + "type": "short-input", + "title": "Initiator User ID", + "mode": "advanced", + "canonicalParamId": "agentInitiatorUserId", + "condition": { + "field": "operation", + "value": "set_agent_session_status" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "agentIconEmoji", + "type": "short-input", + "title": "Agent Icon Emoji", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "set_agent_session_status" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "agentIconUrl", + "type": "short-input", + "title": "Agent Icon URL", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "set_agent_session_status" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "agentUsername", + "type": "short-input", + "title": "Agent Username", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "set_agent_session_status" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "listBotCredential", + "type": "oauth-input", + "title": "Custom Slack Bot", + "mode": "basic", + "canonicalParamId": "listCredentialId", + "condition": { + "field": "operation", + "value": [ + "create_list", + "rename_list", + "share_list", + "list_items", + "get_list_item", + "create_list_item", + "update_list_items", + "delete_list_item" + ] + }, + "required": true, + "serviceId": "slack", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "manualListBotCredential", + "type": "short-input", + "title": "Custom Slack Bot Credential ID", + "mode": "advanced", + "canonicalParamId": "listCredentialId", + "condition": { + "field": "operation", + "value": [ + "create_list", + "rename_list", + "share_list", + "list_items", + "get_list_item", + "create_list_item", + "update_list_items", + "delete_list_item" + ] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "listId", + "type": "short-input", + "title": "List ID", + "condition": { + "field": "operation", + "value": [ + "rename_list", + "share_list", + "list_items", + "get_list_item", + "create_list_item", + "update_list_items", + "delete_list_item" + ] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "listShareTarget", + "type": "dropdown", + "title": "Share With", + "condition": { + "field": "operation", + "value": "share_list" + }, + "required": true, + "valueDefault": { + "constant": "users" + }, + "options": [ + { + "id": "users", + "label": "Users" + }, + { + "id": "channels", + "label": "Channels" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "listShareUserIds", + "type": "code", + "title": "User IDs", + "condition": { + "field": "operation", + "value": "share_list", + "and": { + "field": "listShareTarget", + "value": "users" + } + }, + "required": true, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "listShareChannelIds", + "type": "code", + "title": "Channel IDs", + "condition": { + "field": "operation", + "value": "share_list", + "and": { + "field": "listShareTarget", + "value": "channels" + } + }, + "required": true, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "listAccessLevel", + "type": "dropdown", + "title": "Access Level", + "condition": { + "field": "operation", + "value": "share_list" + }, + "required": true, + "valueDefault": { + "constant": "read" + }, + "options": [ + { + "id": "read", + "label": "Can view" + }, + { + "id": "write", + "label": "Can edit" + }, + { + "id": "owner", + "label": "Owner (users only)" + } + ], + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["listShareTarget"], + "any": [] + } + }, + { + "id": "listName", + "type": "short-input", + "title": "Name", + "condition": { + "field": "operation", + "value": ["create_list", "rename_list"] + }, + "required": { + "field": "operation", + "value": "create_list" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "listItemId", + "type": "short-input", + "title": "Row ID", + "condition": { + "field": "operation", + "value": ["get_list_item", "delete_list_item"] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "listInitialFields", + "type": "code", + "title": "Initial Fields", + "condition": { + "field": "operation", + "value": "create_list_item" + }, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "listCells", + "type": "code", + "title": "Cells", + "condition": { + "field": "operation", + "value": "update_list_items" + }, + "required": true, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "listSchema", + "type": "code", + "title": "Column Schema", + "condition": { + "field": "operation", + "value": "create_list" + }, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "listDescription", + "type": "long-input", + "title": "Description", + "mode": "advanced", + "condition": { + "field": "operation", + "value": ["create_list", "rename_list"] + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "listUpdateTodoMode", + "type": "dropdown", + "title": "Task Tracking Fields", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "rename_list" + }, + "valueDefault": { + "constant": "unchanged" + }, + "options": [ + { + "id": "unchanged", + "label": "Leave unchanged" + }, + { + "id": "true", + "label": "Enable" + }, + { + "id": "false", + "label": "Disable" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "listTodoMode", + "type": "switch", + "title": "Task Tracking Fields", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "create_list" + }, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "listParentItemId", + "type": "short-input", + "title": "Parent Row ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "create_list_item" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "listDuplicatedItemId", + "type": "short-input", + "title": "Duplicate Row ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "create_list_item" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "listLimit", + "type": "short-input", + "title": "Page Size", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_items" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "listCursor", + "type": "short-input", + "title": "Cursor", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_items" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "listArchived", + "type": "switch", + "title": "Archived Rows", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_items" + }, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "listIncludeSchema", + "type": "switch", + "title": "Include List Schema", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_items" + }, + "defaultValue": true, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "apiBotCredential", + "type": "oauth-input", + "title": "Custom Slack Bot", + "mode": "basic", + "canonicalParamId": "apiBotCredentialId", + "condition": { + "field": "operation", + "value": [ + "revoke_list_access", + "start_list_export", + "get_list_export", + "delete_list_items", + "join_conversation", + "lookup_user_by_email", + "get_user_profile", + "set_user_presence", + "pin_message", + "unpin_message", + "list_pins", + "add_bookmark", + "edit_bookmark", + "list_bookmarks", + "remove_bookmark", + "create_user_group", + "update_user_group", + "enable_user_group", + "disable_user_group", + "list_user_groups", + "list_user_group_members", + "update_user_group_members", + "get_dnd_info", + "get_team_dnd_info", + "list_emoji", + "get_team_info", + "get_team_profile", + "unfurl_links" + ] + }, + "required": true, + "serviceId": "slack", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "manualApiBotCredential", + "type": "short-input", + "title": "Slack Credential ID", + "mode": "advanced", + "canonicalParamId": "apiBotCredentialId", + "condition": { + "field": "operation", + "value": [ + "revoke_list_access", + "start_list_export", + "get_list_export", + "delete_list_items", + "join_conversation", + "lookup_user_by_email", + "get_user_profile", + "set_user_presence", + "pin_message", + "unpin_message", + "list_pins", + "add_bookmark", + "edit_bookmark", + "list_bookmarks", + "remove_bookmark", + "create_user_group", + "update_user_group", + "enable_user_group", + "disable_user_group", + "list_user_groups", + "list_user_group_members", + "update_user_group_members", + "get_dnd_info", + "get_team_dnd_info", + "list_emoji", + "get_team_info", + "get_team_profile", + "unfurl_links" + ] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "apiOAuthCredential", + "type": "oauth-input", + "title": "Slack Account or Bot", + "mode": "basic", + "canonicalParamId": "apiOAuthCredentialId", + "condition": { + "field": "operation", + "value": [ + "share_canvas", + "revoke_canvas_access", + "leave_conversation", + "kick_conversation", + "unarchive_conversation", + "close_conversation", + "mark_conversation_read", + "open_conversation", + "list_user_conversations", + "get_file_info", + "list_files", + "delete_file", + "get_reactions", + "list_reactions" + ] + }, + "required": true, + "serviceId": "slack", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "manualApiOAuthCredential", + "type": "short-input", + "title": "Slack Credential ID", + "mode": "advanced", + "canonicalParamId": "apiOAuthCredentialId", + "condition": { + "field": "operation", + "value": [ + "share_canvas", + "revoke_canvas_access", + "leave_conversation", + "kick_conversation", + "unarchive_conversation", + "close_conversation", + "mark_conversation_read", + "open_conversation", + "list_user_conversations", + "get_file_info", + "list_files", + "delete_file", + "get_reactions", + "list_reactions" + ] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_revoke_list_access_list_id", + "type": "short-input", + "title": "List ID", + "condition": { + "field": "operation", + "value": "revoke_list_access" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_revoke_list_access_user_ids", + "type": "code", + "title": "User IDs", + "condition": { + "field": "operation", + "value": "revoke_list_access" + }, + "required": false, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_revoke_list_access_channel_ids", + "type": "code", + "title": "Channel IDs", + "condition": { + "field": "operation", + "value": "revoke_list_access" + }, + "required": false, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_start_list_export_list_id", + "type": "short-input", + "title": "List ID", + "condition": { + "field": "operation", + "value": "start_list_export" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_start_list_export_format", + "type": "dropdown", + "title": "Export Format", + "condition": { + "field": "operation", + "value": "start_list_export" + }, + "required": false, + "valueDefault": { + "constant": "csv" + }, + "options": [ + { + "id": "csv", + "label": "csv" + }, + { + "id": "json", + "label": "json" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_start_list_export_include_threads", + "type": "switch", + "title": "Include Threads", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "start_list_export" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_start_list_export_include_attachments", + "type": "switch", + "title": "Include Attachments", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "start_list_export" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_start_list_export_include_archived", + "type": "switch", + "title": "Include Archived Rows", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "start_list_export" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_get_list_export_list_id", + "type": "short-input", + "title": "List ID", + "condition": { + "field": "operation", + "value": "get_list_export" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_list_export_job_id", + "type": "short-input", + "title": "Export Job ID", + "condition": { + "field": "operation", + "value": "get_list_export" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_list_export_format", + "type": "dropdown", + "title": "Export Format", + "condition": { + "field": "operation", + "value": "get_list_export" + }, + "required": false, + "valueDefault": { + "constant": "csv" + }, + "options": [ + { + "id": "csv", + "label": "csv" + }, + { + "id": "json", + "label": "json" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_list_export_include_threads", + "type": "switch", + "title": "Include Threads", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "get_list_export" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_get_list_export_include_attachments", + "type": "switch", + "title": "Include Attachments", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "get_list_export" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_delete_list_items_list_id", + "type": "short-input", + "title": "List ID", + "condition": { + "field": "operation", + "value": "delete_list_items" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_delete_list_items_ids", + "type": "code", + "title": "Row IDs", + "condition": { + "field": "operation", + "value": "delete_list_items" + }, + "required": true, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_share_canvas_canvas_id", + "type": "short-input", + "title": "Canvas ID", + "condition": { + "field": "operation", + "value": "share_canvas" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_share_canvas_access_level", + "type": "dropdown", + "title": "Access Level", + "condition": { + "field": "operation", + "value": "share_canvas" + }, + "required": true, + "valueDefault": { + "constant": "read" + }, + "options": [ + { + "id": "read", + "label": "Can view" + }, + { + "id": "write", + "label": "Can edit" + }, + { + "id": "owner", + "label": "Owner (users only)" + } + ], + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["slack_share_canvas_channel_ids"], + "any": [] + } + }, + { + "id": "slack_share_canvas_user_ids", + "type": "code", + "title": "User IDs", + "condition": { + "field": "operation", + "value": "share_canvas" + }, + "required": false, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_share_canvas_channel_ids", + "type": "code", + "title": "Channel IDs", + "condition": { + "field": "operation", + "value": "share_canvas" + }, + "required": false, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_revoke_canvas_access_canvas_id", + "type": "short-input", + "title": "Canvas ID", + "condition": { + "field": "operation", + "value": "revoke_canvas_access" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_revoke_canvas_access_user_ids", + "type": "code", + "title": "User IDs", + "condition": { + "field": "operation", + "value": "revoke_canvas_access" + }, + "required": false, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_revoke_canvas_access_channel_ids", + "type": "code", + "title": "Channel IDs", + "condition": { + "field": "operation", + "value": "revoke_canvas_access" + }, + "required": false, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_join_conversation_channel", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "join_conversation" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_leave_conversation_channel", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "leave_conversation" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_kick_conversation_channel", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "kick_conversation" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_kick_conversation_user", + "type": "short-input", + "title": "User ID", + "condition": { + "field": "operation", + "value": "kick_conversation" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_unarchive_conversation_channel", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "unarchive_conversation" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_close_conversation_channel", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "close_conversation" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_mark_conversation_read_channel", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "mark_conversation_read" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_mark_conversation_read_ts", + "type": "short-input", + "title": "Read Through Timestamp", + "condition": { + "field": "operation", + "value": "mark_conversation_read" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_open_conversation_users", + "type": "code", + "title": "User IDs", + "condition": { + "field": "operation", + "value": "open_conversation" + }, + "required": false, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_open_conversation_channel", + "type": "short-input", + "title": "Conversation ID", + "condition": { + "field": "operation", + "value": "open_conversation" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_open_conversation_prevent_creation", + "type": "switch", + "title": "Only Resume Existing Conversation", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "open_conversation" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_open_conversation_return_im", + "type": "switch", + "title": "Include Conversation Details", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "open_conversation" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_lookup_user_by_email_email", + "type": "short-input", + "title": "Email", + "condition": { + "field": "operation", + "value": "lookup_user_by_email" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_user_conversations_user", + "type": "short-input", + "title": "User ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_user_conversations" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_user_conversations_types", + "type": "short-input", + "title": "Conversation Types", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_user_conversations" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_user_conversations_exclude_archived", + "type": "switch", + "title": "Exclude Archived", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_user_conversations" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_list_user_conversations_exclude_muted", + "type": "switch", + "title": "Exclude Muted", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_user_conversations" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_list_user_conversations_cursor", + "type": "short-input", + "title": "Cursor", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_user_conversations" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_user_conversations_limit", + "type": "short-input", + "title": "Page Size", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_user_conversations" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_user_conversations_team_id", + "type": "short-input", + "title": "Workspace ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_user_conversations" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_user_profile_user", + "type": "short-input", + "title": "User ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "get_user_profile" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_user_profile_include_labels", + "type": "switch", + "title": "Include Custom Field Labels", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "get_user_profile" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_set_user_presence_presence", + "type": "dropdown", + "title": "Presence", + "condition": { + "field": "operation", + "value": "set_user_presence" + }, + "required": true, + "valueDefault": { + "constant": "auto" + }, + "options": [ + { + "id": "auto", + "label": "auto" + }, + { + "id": "away", + "label": "away" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_file_info_file", + "type": "short-input", + "title": "File ID", + "condition": { + "field": "operation", + "value": "get_file_info" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_file_info_cursor", + "type": "short-input", + "title": "Cursor", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "get_file_info" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_file_info_limit", + "type": "short-input", + "title": "Page Size", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "get_file_info" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_files_channel", + "type": "short-input", + "title": "Channel ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_files" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_files_user", + "type": "short-input", + "title": "User ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_files" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_files_types", + "type": "short-input", + "title": "File Types", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_files" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_files_ts_from", + "type": "short-input", + "title": "From Timestamp", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_files" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_files_ts_to", + "type": "short-input", + "title": "To Timestamp", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_files" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_files_page", + "type": "short-input", + "title": "Page", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_files" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_files_count", + "type": "short-input", + "title": "Page Size", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_files" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_files_show_files_hidden_by_limit", + "type": "switch", + "title": "Include Files Hidden by Plan Limit", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_files" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_list_files_team_id", + "type": "short-input", + "title": "Workspace ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_files" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_delete_file_file", + "type": "short-input", + "title": "File ID", + "condition": { + "field": "operation", + "value": "delete_file" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_reactions_channel", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "get_reactions" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_reactions_timestamp", + "type": "short-input", + "title": "Message Timestamp", + "condition": { + "field": "operation", + "value": "get_reactions" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_reactions_file", + "type": "short-input", + "title": "File ID", + "condition": { + "field": "operation", + "value": "get_reactions" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_reactions_file_comment", + "type": "short-input", + "title": "File Comment ID", + "condition": { + "field": "operation", + "value": "get_reactions" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_reactions_full", + "type": "switch", + "title": "Include All Reacting Users", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "get_reactions" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_list_reactions_user", + "type": "short-input", + "title": "User ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_reactions" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_reactions_full", + "type": "switch", + "title": "Include All Reacting Users", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_reactions" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_list_reactions_cursor", + "type": "short-input", + "title": "Cursor", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_reactions" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_reactions_limit", + "type": "short-input", + "title": "Page Size", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_reactions" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_reactions_team_id", + "type": "short-input", + "title": "Workspace ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_reactions" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_pin_message_channel", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "pin_message" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_pin_message_timestamp", + "type": "short-input", + "title": "Message Timestamp", + "condition": { + "field": "operation", + "value": "pin_message" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_unpin_message_channel", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "unpin_message" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_unpin_message_timestamp", + "type": "short-input", + "title": "Message Timestamp", + "condition": { + "field": "operation", + "value": "unpin_message" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_pins_channel", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "list_pins" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_add_bookmark_channel_id", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "add_bookmark" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_add_bookmark_title", + "type": "short-input", + "title": "Title", + "condition": { + "field": "operation", + "value": "add_bookmark" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_add_bookmark_link", + "type": "short-input", + "title": "Link URL", + "condition": { + "field": "operation", + "value": "add_bookmark" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_add_bookmark_emoji", + "type": "short-input", + "title": "Emoji", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "add_bookmark" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_add_bookmark_parent_id", + "type": "short-input", + "title": "Parent Bookmark ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "add_bookmark" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_edit_bookmark_channel_id", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "edit_bookmark" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_edit_bookmark_bookmark_id", + "type": "short-input", + "title": "Bookmark ID", + "condition": { + "field": "operation", + "value": "edit_bookmark" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_edit_bookmark_title", + "type": "short-input", + "title": "Title", + "condition": { + "field": "operation", + "value": "edit_bookmark" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_edit_bookmark_link", + "type": "short-input", + "title": "Link URL", + "condition": { + "field": "operation", + "value": "edit_bookmark" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_edit_bookmark_emoji", + "type": "short-input", + "title": "Emoji", + "condition": { + "field": "operation", + "value": "edit_bookmark" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_bookmarks_channel_id", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "list_bookmarks" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_remove_bookmark_channel_id", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "remove_bookmark" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_remove_bookmark_bookmark_id", + "type": "short-input", + "title": "Bookmark ID", + "condition": { + "field": "operation", + "value": "remove_bookmark" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_create_user_group_name", + "type": "short-input", + "title": "Name", + "condition": { + "field": "operation", + "value": "create_user_group" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_create_user_group_handle", + "type": "short-input", + "title": "Mention Handle", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "create_user_group" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_create_user_group_description", + "type": "short-input", + "title": "Description", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "create_user_group" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_create_user_group_channels", + "type": "code", + "title": "Default Channel IDs", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "create_user_group" + }, + "required": false, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_create_user_group_additional_channels", + "type": "code", + "title": "Additional Channel IDs", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "create_user_group" + }, + "required": false, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_create_user_group_enable_section", + "type": "switch", + "title": "Show as Sidebar Section", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "create_user_group" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_create_user_group_include_count", + "type": "switch", + "title": "Include Member Count", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "create_user_group" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_create_user_group_team_id", + "type": "short-input", + "title": "Workspace ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "create_user_group" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_update_user_group_usergroup", + "type": "short-input", + "title": "User Group ID", + "condition": { + "field": "operation", + "value": "update_user_group" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_update_user_group_name", + "type": "short-input", + "title": "Name", + "condition": { + "field": "operation", + "value": "update_user_group" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_update_user_group_handle", + "type": "short-input", + "title": "Mention Handle", + "condition": { + "field": "operation", + "value": "update_user_group" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_update_user_group_description", + "type": "short-input", + "title": "Description", + "condition": { + "field": "operation", + "value": "update_user_group" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_update_user_group_channels", + "type": "code", + "title": "Default Channel IDs", + "condition": { + "field": "operation", + "value": "update_user_group" + }, + "required": false, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_update_user_group_additional_channels", + "type": "code", + "title": "Additional Channel IDs", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "update_user_group" + }, + "required": false, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_update_user_group_enable_section", + "type": "switch", + "title": "Show as Sidebar Section", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "update_user_group" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_update_user_group_include_count", + "type": "switch", + "title": "Include Member Count", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "update_user_group" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_update_user_group_team_id", + "type": "short-input", + "title": "Workspace ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "update_user_group" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_enable_user_group_usergroup", + "type": "short-input", + "title": "User Group ID", + "condition": { + "field": "operation", + "value": "enable_user_group" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_enable_user_group_include_count", + "type": "switch", + "title": "Include Member Count", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "enable_user_group" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_enable_user_group_team_id", + "type": "short-input", + "title": "Workspace ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "enable_user_group" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_disable_user_group_usergroup", + "type": "short-input", + "title": "User Group ID", + "condition": { + "field": "operation", + "value": "disable_user_group" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_disable_user_group_include_count", + "type": "switch", + "title": "Include Member Count", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "disable_user_group" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_disable_user_group_team_id", + "type": "short-input", + "title": "Workspace ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "disable_user_group" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_user_groups_include_disabled", + "type": "switch", + "title": "Include Disabled Groups", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_user_groups" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_list_user_groups_include_users", + "type": "switch", + "title": "Include Members", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_user_groups" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_list_user_groups_include_count", + "type": "switch", + "title": "Include Member Count", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_user_groups" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_list_user_groups_team_id", + "type": "short-input", + "title": "Workspace ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_user_groups" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_user_group_members_usergroup", + "type": "short-input", + "title": "User Group ID", + "condition": { + "field": "operation", + "value": "list_user_group_members" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_list_user_group_members_include_disabled", + "type": "switch", + "title": "Include Disabled Users", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_user_group_members" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_list_user_group_members_team_id", + "type": "short-input", + "title": "Workspace ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_user_group_members" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_update_user_group_members_usergroup", + "type": "short-input", + "title": "User Group ID", + "condition": { + "field": "operation", + "value": "update_user_group_members" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_update_user_group_members_users", + "type": "code", + "title": "User IDs", + "condition": { + "field": "operation", + "value": "update_user_group_members" + }, + "required": true, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_update_user_group_members_additional_channels", + "type": "code", + "title": "Additional Channel IDs", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "update_user_group_members" + }, + "required": false, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_update_user_group_members_is_shared", + "type": "switch", + "title": "Shared Section", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "update_user_group_members" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_update_user_group_members_include_count", + "type": "switch", + "title": "Include Member Count", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "update_user_group_members" + }, + "required": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "slack_update_user_group_members_team_id", + "type": "short-input", + "title": "Workspace ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "update_user_group_members" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_dnd_info_user", + "type": "short-input", + "title": "User ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "get_dnd_info" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_dnd_info_team_id", + "type": "short-input", + "title": "Workspace ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "get_dnd_info" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_team_dnd_info_users", + "type": "code", + "title": "User IDs", + "condition": { + "field": "operation", + "value": "get_team_dnd_info" + }, + "required": true, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "slack_get_team_dnd_info_team_id", + "type": "short-input", + "title": "Workspace ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "get_team_dnd_info" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_team_info_team", + "type": "short-input", + "title": "Workspace ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "get_team_info" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_team_info_domain", + "type": "short-input", + "title": "Workspace Domain", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "get_team_info" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_get_team_profile_visibility", + "type": "dropdown", + "title": "Visibility", + "condition": { + "field": "operation", + "value": "get_team_profile" + }, + "required": false, + "valueDefault": { + "constant": "all" + }, + "options": [ + { + "id": "all", + "label": "all" + }, + { + "id": "visible", + "label": "visible" + }, + { + "id": "hidden", + "label": "hidden" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_unfurl_links_channel", + "type": "short-input", + "title": "Channel ID", + "condition": { + "field": "operation", + "value": "unfurl_links" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_unfurl_links_ts", + "type": "short-input", + "title": "Message Timestamp", + "condition": { + "field": "operation", + "value": "unfurl_links" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "slack_unfurl_links_unfurls", + "type": "code", + "title": "Link Previews", + "condition": { + "field": "operation", + "value": "unfurl_links" + }, + "required": true, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "eventType", + "type": "dropdown", + "title": "Event", + "mode": "trigger", + "surface": "trigger", + "required": true, + "options": [ + { + "id": "message", + "label": "Message" + }, + { + "id": "app_mention", + "label": "App mentioned" + }, + { + "id": "reaction_added", + "label": "Reaction added" + }, + { + "id": "reaction_removed", + "label": "Reaction removed" + }, + { + "id": "message_edited", + "label": "Message edited" + }, + { + "id": "message_deleted", + "label": "Message deleted" + }, + { + "id": "file_shared", + "label": "File shared" + }, + { + "id": "member_joined_channel", + "label": "Member joined channel" + }, + { + "id": "member_left_channel", + "label": "Member left channel" + }, + { + "id": "channel_created", + "label": "Channel created" + }, + { + "id": "channel_archive", + "label": "Channel archived" + }, + { + "id": "channel_rename", + "label": "Channel renamed" + }, + { + "id": "pin_added", + "label": "Pin added" + }, + { + "id": "pin_removed", + "label": "Pin removed" + }, + { + "id": "team_join", + "label": "Member joined workspace" + }, + { + "id": "app_home_opened", + "label": "App home opened" + }, + { + "id": "agent_session_stopped", + "label": "Agent session stopped" + }, + { + "id": "agent_session_title_changed", + "label": "Agent session title changed" + }, + { + "id": "app_context_changed", + "label": "Agent context changed" + }, + { + "id": "assistant_thread_started", + "label": "Assistant opened" + }, + { + "id": "assistant_thread_context_changed", + "label": "Assistant context changed" + }, + { + "id": "block_actions", + "label": "Button / select clicked" + }, + { + "id": "view_submission", + "label": "Modal submitted" + }, + { + "id": "slash_command", + "label": "Slash command" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "customBotCredential", + "type": "oauth-input", + "title": "Custom Bot", + "mode": "trigger", + "canonicalParamId": "botCredential", + "surface": "trigger", + "required": true, + "serviceId": "slack", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "manualBotCredential", + "type": "short-input", + "title": "Bot Credential ID", + "mode": "trigger-advanced", + "canonicalParamId": "botCredential", + "surface": "trigger", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "source", + "type": "dropdown", + "title": "Source", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["message", "message_edited", "message_deleted"] + }, + "required": false, + "options": [ + { + "id": "im", + "label": "Direct message" + }, + { + "id": "channel", + "label": "Public channel" + }, + { + "id": "group", + "label": "Private channel" + } + ], + "multiple": true, + "valueKind": "array", + "storage": "native" + }, + { + "id": "channelFilter", + "type": "channel-selector", + "title": "Channels", + "mode": "trigger", + "canonicalParamId": "channelFilter", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": [ + "message", + "app_mention", + "reaction_added", + "reaction_removed", + "message_edited", + "message_deleted", + "file_shared", + "member_joined_channel", + "member_left_channel", + "channel_archive", + "channel_rename", + "pin_added", + "pin_removed" + ] + }, + "required": false, + "options": { + "dynamic": true + }, + "multiple": true, + "selectorKey": "slack.channels", + "serviceId": "slack", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["customBotCredential"], + "any": [] + } + }, + { + "id": "manualChannelFilter", + "type": "short-input", + "title": "Channel IDs", + "mode": "trigger-advanced", + "canonicalParamId": "channelFilter", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": [ + "message", + "app_mention", + "reaction_added", + "reaction_removed", + "message_edited", + "message_deleted", + "file_shared", + "member_joined_channel", + "member_left_channel", + "channel_archive", + "channel_rename", + "pin_added", + "pin_removed" + ] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "threads", + "type": "dropdown", + "title": "Threads", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["message", "app_mention"] + }, + "required": false, + "valueDefault": { + "constant": "include" + }, + "options": [ + { + "id": "include", + "label": "Messages and replies" + }, + { + "id": "exclude", + "label": "Messages only (no replies)" + }, + { + "id": "only", + "label": "Replies only" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "streamResponse", + "type": "switch", + "title": "Enable agent session", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["message", "app_mention"] + }, + "required": false, + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "streamOutputs", + "type": "workflow-output-selector", + "title": "Outputs to stream", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "streamResponse", + "value": true, + "and": { + "field": "eventType", + "value": ["message", "app_mention"] + } + }, + "required": { + "field": "streamResponse", + "value": true, + "and": { + "field": "eventType", + "value": ["message", "app_mention"] + } + }, + "valueKind": "none", + "storage": "native" + }, + { + "id": "streamTaskTitle", + "type": "short-input", + "title": "Response status label", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "streamResponse", + "value": true, + "and": { + "field": "eventType", + "value": ["message", "app_mention"] + } + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "streamTaskDisplayMode", + "type": "dropdown", + "title": "Task display", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "streamResponse", + "value": true, + "and": { + "field": "eventType", + "value": ["message", "app_mention"] + } + }, + "required": false, + "valueDefault": { + "constant": "timeline" + }, + "options": [ + { + "id": "timeline", + "label": "Timeline" + }, + { + "id": "plan", + "label": "Plan" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "streamIncludeThinking", + "type": "switch", + "title": "Include thinking updates", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "streamResponse", + "value": true, + "and": { + "field": "eventType", + "value": ["message", "app_mention"] + } + }, + "required": false, + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "streamIncludeToolCalls", + "type": "switch", + "title": "Include tool calls", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "streamResponse", + "value": true, + "and": { + "field": "eventType", + "value": ["message", "app_mention"] + } + }, + "required": false, + "defaultValue": true, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "emoji", + "type": "short-input", + "title": "Emoji", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["reaction_added", "reaction_removed"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "nameContains", + "type": "short-input", + "title": "Name contains", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["channel_created"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "interactionFilter", + "type": "short-input", + "title": "Action / Callback ID", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["block_actions", "view_submission"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "commandFilter", + "type": "short-input", + "title": "Command", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["slash_command"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "filterBotMessages", + "type": "switch", + "title": "Ignore bot messages", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["message", "app_mention"] + }, + "required": false, + "defaultValue": true, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "includeOwnMessages", + "type": "switch", + "title": "Include own bot messages", + "mode": "trigger-advanced", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["message", "app_mention", "reaction_added", "reaction_removed"] + }, + "required": false, + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "includeFiles", + "type": "switch", + "title": "Include file attachments", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": "message" + }, + "required": false, + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "samplePayload_slack_oauth", + "type": "code", + "title": "Event Payload Example", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "selectedTriggerId", + "value": "slack_oauth" + }, + "defaultValue": "{\n \"event\": {\n \"event_type\": \"mock_event_type\",\n \"subtype\": \"mock_subtype\",\n \"channel\": \"mock_channel\",\n \"channel_name\": \"mock_channel_name\",\n \"channel_type\": \"mock_channel_type\",\n \"user\": \"mock_user\",\n \"user_name\": \"mock_user_name\",\n \"bot_id\": \"mock_bot_id\",\n \"text\": \"mock_text\",\n \"timestamp\": \"mock_timestamp\",\n \"thread_ts\": \"mock_thread_ts\",\n \"streaming_message_ts\": [\n \"mock_streaming_message_ts_item\"\n ],\n \"title\": \"mock_title\",\n \"previous_title\": \"mock_previous_title\",\n \"tab\": \"mock_tab\",\n \"context\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"team_id\": \"mock_team_id\",\n \"user_team_id\": \"mock_user_team_id\",\n \"enterprise_id\": \"mock_enterprise_id\",\n \"event_id\": \"mock_event_id\",\n \"reaction\": \"mock_reaction\",\n \"item_user\": \"mock_item_user\",\n \"command\": \"mock_command\",\n \"action_id\": \"mock_action_id\",\n \"action_value\": \"mock_action_value\",\n \"actions\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"response_url\": \"mock_response_url\",\n \"trigger_id\": \"mock_trigger_id\",\n \"callback_id\": \"mock_callback_id\",\n \"api_app_id\": \"mock_api_app_id\",\n \"app_id\": \"mock_app_id\",\n \"message_ts\": \"mock_message_ts\",\n \"view\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"message\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"state\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"hasFiles\": true,\n \"files\": null\n }\n}", + "readOnly": true, + "language": "json", + "valueKind": "json", + "storage": "native" + } + ], + "tools": { + "access": [ + "slack_message", + "slack_ephemeral_message", + "slack_canvas", + "slack_message_reader", + "slack_get_message", + "slack_get_thread", + "slack_get_thread_replies", + "slack_get_channel_history", + "slack_get_permalink", + "slack_set_status", + "slack_set_title", + "slack_set_suggested_prompts", + "slack_set_suggested_prompts_v2", + "slack_set_agent_session_status_v2", + "slack_rename_agent_session_v2", + "slack_list_channels", + "slack_list_members", + "slack_list_users", + "slack_get_user", + "slack_download", + "slack_update_message", + "slack_delete_message", + "slack_add_reaction", + "slack_remove_reaction", + "slack_get_channel_info", + "slack_get_user_presence", + "slack_edit_canvas", + "slack_create_channel_canvas", + "slack_get_canvas", + "slack_list_canvases", + "slack_lookup_canvas_sections", + "slack_delete_canvas", + "slack_lists_create", + "slack_lists_update", + "slack_lists_access_set", + "slack_lists_items_list", + "slack_lists_items_info", + "slack_lists_items_create", + "slack_lists_items_update", + "slack_lists_items_delete", + "slack_create_conversation", + "slack_invite_to_conversation", + "slack_open_view", + "slack_update_view", + "slack_push_view", + "slack_publish_view", + "slack_schedule_message", + "slack_list_scheduled_messages", + "slack_delete_scheduled_message", + "slack_archive_conversation", + "slack_rename_conversation", + "slack_set_conversation_topic", + "slack_set_conversation_purpose", + "slack_lists_access_delete", + "slack_lists_download_start", + "slack_lists_download_get", + "slack_lists_items_delete_multiple", + "slack_share_canvas", + "slack_revoke_canvas_access", + "slack_join_conversation", + "slack_leave_conversation", + "slack_kick_conversation", + "slack_unarchive_conversation", + "slack_close_conversation", + "slack_mark_conversation_read", + "slack_open_conversation", + "slack_lookup_user_by_email", + "slack_list_user_conversations", + "slack_get_user_profile", + "slack_set_user_presence", + "slack_get_file_info", + "slack_list_files", + "slack_delete_file", + "slack_get_reactions", + "slack_list_reactions", + "slack_pin_message", + "slack_unpin_message", + "slack_list_pins", + "slack_add_bookmark", + "slack_edit_bookmark", + "slack_list_bookmarks", + "slack_remove_bookmark", + "slack_create_user_group", + "slack_update_user_group", + "slack_enable_user_group", + "slack_disable_user_group", + "slack_list_user_groups", + "slack_list_user_group_members", + "slack_update_user_group_members", + "slack_get_dnd_info", + "slack_get_team_dnd_info", + "slack_list_emoji", + "slack_get_team_info", + "slack_get_team_profile", + "slack_unfurl_links" + ], + "selector": "operation" + }, + "inputs": { + "operation": { + "type": "string" + }, + "messageFormat": { + "type": "string" + }, + "destinationType": { + "type": "string" + }, + "oauthCredential": { + "type": "string" + }, + "channel": { + "type": "string" + }, + "dmUserId": { + "type": "string" + }, + "text": { + "type": "string" + }, + "files": { + "type": "array" + }, + "title": { + "type": "string" + }, + "content": { + "type": "string" + }, + "limit": { + "type": "string" + }, + "oldest": { + "type": "string" + }, + "fileId": { + "type": "string" + }, + "fileName": { + "type": "string" + }, + "updateTimestamp": { + "type": "string" + }, + "updateText": { + "type": "string" + }, + "deleteTimestamp": { + "type": "string" + }, + "reactionTimestamp": { + "type": "string" + }, + "emojiName": { + "type": "string" + }, + "timestamp": { + "type": "string" + }, + "name": { + "type": "string" + }, + "threadTs": { + "type": "string" + }, + "thread_ts": { + "type": "string" + }, + "includePrivate": { + "type": "string" + }, + "channelLimit": { + "type": "string" + }, + "memberLimit": { + "type": "string" + }, + "includeDeleted": { + "type": "string" + }, + "userLimit": { + "type": "string" + }, + "paginationCursor": { + "type": "string" + }, + "ephemeralUser": { + "type": "string" + }, + "blocks": { + "type": "json" + }, + "userId": { + "type": "string" + }, + "getMessageTimestamp": { + "type": "string" + }, + "getThreadTimestamp": { + "type": "string" + }, + "threadLimit": { + "type": "string" + }, + "status": { + "type": "string" + }, + "loadingMessages": { + "type": "json" + }, + "assistantTitle": { + "type": "string" + }, + "suggestedPrompts": { + "type": "json" + }, + "promptsTitle": { + "type": "string" + }, + "historyOldest": { + "type": "string" + }, + "historyLatest": { + "type": "string" + }, + "historyLimit": { + "type": "string" + }, + "historyMaxPages": { + "type": "string" + }, + "historyCursor": { + "type": "string" + }, + "historyInclusive": { + "type": "string" + }, + "includeNumMembers": { + "type": "string" + }, + "presenceUserId": { + "type": "string" + }, + "editCanvasId": { + "type": "string" + }, + "canvasOperation": { + "type": "string" + }, + "canvasContent": { + "type": "string" + }, + "sectionId": { + "type": "string" + }, + "canvasTitle": { + "type": "string" + }, + "channelCanvasTitle": { + "type": "string" + }, + "channelCanvasContent": { + "type": "string" + }, + "getCanvasId": { + "type": "string" + }, + "canvasListCount": { + "type": "string" + }, + "canvasListPage": { + "type": "string" + }, + "canvasListUser": { + "type": "string" + }, + "canvasListTsFrom": { + "type": "string" + }, + "canvasListTsTo": { + "type": "string" + }, + "canvasListTeamId": { + "type": "string" + }, + "lookupCanvasId": { + "type": "string" + }, + "sectionCriteria": { + "type": "json" + }, + "deleteCanvasId": { + "type": "string" + }, + "conversationName": { + "type": "string" + }, + "isPrivate": { + "type": "string" + }, + "teamId": { + "type": "string" + }, + "inviteUsers": { + "type": "string" + }, + "inviteForce": { + "type": "string" + }, + "viewTriggerId": { + "type": "string" + }, + "viewInteractivityPointer": { + "type": "string" + }, + "viewId": { + "type": "string" + }, + "viewExternalId": { + "type": "string" + }, + "viewHash": { + "type": "string" + }, + "publishUserId": { + "type": "string" + }, + "viewPayload": { + "type": "json" + }, + "scheduleAt": { + "type": "string" + }, + "scheduledLimit": { + "type": "string" + }, + "scheduledCursor": { + "type": "string" + }, + "scheduledMessageId": { + "type": "string" + }, + "renameChannelName": { + "type": "string" + }, + "conversationTopic": { + "type": "string" + }, + "conversationPurpose": { + "type": "string" + }, + "apiBotCredentialId": { + "type": "string" + }, + "apiOAuthCredentialId": { + "type": "string" + }, + "slack_revoke_list_access_list_id": { + "type": "string" + }, + "slack_revoke_list_access_user_ids": { + "type": "json" + }, + "slack_revoke_list_access_channel_ids": { + "type": "json" + }, + "slack_start_list_export_list_id": { + "type": "string" + }, + "slack_start_list_export_format": { + "type": "string" + }, + "slack_start_list_export_include_threads": { + "type": "boolean" + }, + "slack_start_list_export_include_attachments": { + "type": "boolean" + }, + "slack_start_list_export_include_archived": { + "type": "boolean" + }, + "slack_get_list_export_list_id": { + "type": "string" + }, + "slack_get_list_export_job_id": { + "type": "string" + }, + "slack_get_list_export_format": { + "type": "string" + }, + "slack_get_list_export_include_threads": { + "type": "boolean" + }, + "slack_get_list_export_include_attachments": { + "type": "boolean" + }, + "slack_delete_list_items_list_id": { + "type": "string" + }, + "slack_delete_list_items_ids": { + "type": "json" + }, + "slack_share_canvas_canvas_id": { + "type": "string" + }, + "slack_share_canvas_access_level": { + "type": "string" + }, + "slack_share_canvas_user_ids": { + "type": "json" + }, + "slack_share_canvas_channel_ids": { + "type": "json" + }, + "slack_revoke_canvas_access_canvas_id": { + "type": "string" + }, + "slack_revoke_canvas_access_user_ids": { + "type": "json" + }, + "slack_revoke_canvas_access_channel_ids": { + "type": "json" + }, + "slack_join_conversation_channel": { + "type": "string" + }, + "slack_leave_conversation_channel": { + "type": "string" + }, + "slack_kick_conversation_channel": { + "type": "string" + }, + "slack_kick_conversation_user": { + "type": "string" + }, + "slack_unarchive_conversation_channel": { + "type": "string" + }, + "slack_close_conversation_channel": { + "type": "string" + }, + "slack_mark_conversation_read_channel": { + "type": "string" + }, + "slack_mark_conversation_read_ts": { + "type": "string" + }, + "slack_open_conversation_users": { + "type": "json" + }, + "slack_open_conversation_channel": { + "type": "string" + }, + "slack_open_conversation_prevent_creation": { + "type": "boolean" + }, + "slack_open_conversation_return_im": { + "type": "boolean" + }, + "slack_lookup_user_by_email_email": { + "type": "string" + }, + "slack_list_user_conversations_user": { + "type": "string" + }, + "slack_list_user_conversations_types": { + "type": "string" + }, + "slack_list_user_conversations_exclude_archived": { + "type": "boolean" + }, + "slack_list_user_conversations_exclude_muted": { + "type": "boolean" + }, + "slack_list_user_conversations_cursor": { + "type": "string" + }, + "slack_list_user_conversations_limit": { + "type": "number" + }, + "slack_list_user_conversations_team_id": { + "type": "string" + }, + "slack_get_user_profile_user": { + "type": "string" + }, + "slack_get_user_profile_include_labels": { + "type": "boolean" + }, + "slack_set_user_presence_presence": { + "type": "string" + }, + "slack_get_file_info_file": { + "type": "string" + }, + "slack_get_file_info_cursor": { + "type": "string" + }, + "slack_get_file_info_limit": { + "type": "number" + }, + "slack_list_files_channel": { + "type": "string" + }, + "slack_list_files_user": { + "type": "string" + }, + "slack_list_files_types": { + "type": "string" + }, + "slack_list_files_ts_from": { + "type": "string" + }, + "slack_list_files_ts_to": { + "type": "string" + }, + "slack_list_files_page": { + "type": "number" + }, + "slack_list_files_count": { + "type": "number" + }, + "slack_list_files_show_files_hidden_by_limit": { + "type": "boolean" + }, + "slack_list_files_team_id": { + "type": "string" + }, + "slack_delete_file_file": { + "type": "string" + }, + "slack_get_reactions_channel": { + "type": "string" + }, + "slack_get_reactions_timestamp": { + "type": "string" + }, + "slack_get_reactions_file": { + "type": "string" + }, + "slack_get_reactions_file_comment": { + "type": "string" + }, + "slack_get_reactions_full": { + "type": "boolean" + }, + "slack_list_reactions_user": { + "type": "string" + }, + "slack_list_reactions_full": { + "type": "boolean" + }, + "slack_list_reactions_cursor": { + "type": "string" + }, + "slack_list_reactions_limit": { + "type": "number" + }, + "slack_list_reactions_team_id": { + "type": "string" + }, + "slack_pin_message_channel": { + "type": "string" + }, + "slack_pin_message_timestamp": { + "type": "string" + }, + "slack_unpin_message_channel": { + "type": "string" + }, + "slack_unpin_message_timestamp": { + "type": "string" + }, + "slack_list_pins_channel": { + "type": "string" + }, + "slack_add_bookmark_channel_id": { + "type": "string" + }, + "slack_add_bookmark_title": { + "type": "string" + }, + "slack_add_bookmark_link": { + "type": "string" + }, + "slack_add_bookmark_emoji": { + "type": "string" + }, + "slack_add_bookmark_parent_id": { + "type": "string" + }, + "slack_edit_bookmark_channel_id": { + "type": "string" + }, + "slack_edit_bookmark_bookmark_id": { + "type": "string" + }, + "slack_edit_bookmark_title": { + "type": "string" + }, + "slack_edit_bookmark_link": { + "type": "string" + }, + "slack_edit_bookmark_emoji": { + "type": "string" + }, + "slack_list_bookmarks_channel_id": { + "type": "string" + }, + "slack_remove_bookmark_channel_id": { + "type": "string" + }, + "slack_remove_bookmark_bookmark_id": { + "type": "string" + }, + "slack_create_user_group_name": { + "type": "string" + }, + "slack_create_user_group_handle": { + "type": "string" + }, + "slack_create_user_group_description": { + "type": "string" + }, + "slack_create_user_group_channels": { + "type": "json" + }, + "slack_create_user_group_additional_channels": { + "type": "json" + }, + "slack_create_user_group_enable_section": { + "type": "boolean" + }, + "slack_create_user_group_include_count": { + "type": "boolean" + }, + "slack_create_user_group_team_id": { + "type": "string" + }, + "slack_update_user_group_usergroup": { + "type": "string" + }, + "slack_update_user_group_name": { + "type": "string" + }, + "slack_update_user_group_handle": { + "type": "string" + }, + "slack_update_user_group_description": { + "type": "string" + }, + "slack_update_user_group_channels": { + "type": "json" + }, + "slack_update_user_group_additional_channels": { + "type": "json" + }, + "slack_update_user_group_enable_section": { + "type": "boolean" + }, + "slack_update_user_group_include_count": { + "type": "boolean" + }, + "slack_update_user_group_team_id": { + "type": "string" + }, + "slack_enable_user_group_usergroup": { + "type": "string" + }, + "slack_enable_user_group_include_count": { + "type": "boolean" + }, + "slack_enable_user_group_team_id": { + "type": "string" + }, + "slack_disable_user_group_usergroup": { + "type": "string" + }, + "slack_disable_user_group_include_count": { + "type": "boolean" + }, + "slack_disable_user_group_team_id": { + "type": "string" + }, + "slack_list_user_groups_include_disabled": { + "type": "boolean" + }, + "slack_list_user_groups_include_users": { + "type": "boolean" + }, + "slack_list_user_groups_include_count": { + "type": "boolean" + }, + "slack_list_user_groups_team_id": { + "type": "string" + }, + "slack_list_user_group_members_usergroup": { + "type": "string" + }, + "slack_list_user_group_members_include_disabled": { + "type": "boolean" + }, + "slack_list_user_group_members_team_id": { + "type": "string" + }, + "slack_update_user_group_members_usergroup": { + "type": "string" + }, + "slack_update_user_group_members_users": { + "type": "json" + }, + "slack_update_user_group_members_additional_channels": { + "type": "json" + }, + "slack_update_user_group_members_is_shared": { + "type": "boolean" + }, + "slack_update_user_group_members_include_count": { + "type": "boolean" + }, + "slack_update_user_group_members_team_id": { + "type": "string" + }, + "slack_get_dnd_info_user": { + "type": "string" + }, + "slack_get_dnd_info_team_id": { + "type": "string" + }, + "slack_get_team_dnd_info_users": { + "type": "json" + }, + "slack_get_team_dnd_info_team_id": { + "type": "string" + }, + "slack_get_team_info_team": { + "type": "string" + }, + "slack_get_team_info_domain": { + "type": "string" + }, + "slack_get_team_profile_visibility": { + "type": "string" + }, + "slack_unfurl_links_channel": { + "type": "string" + }, + "slack_unfurl_links_ts": { + "type": "string" + }, + "slack_unfurl_links_unfurls": { + "type": "json" + }, + "listCredentialId": { + "type": "string" + }, + "listId": { + "type": "string" + }, + "listItemId": { + "type": "string" + }, + "listName": { + "type": "string" + }, + "listShareTarget": { + "type": "string" + }, + "listShareUserIds": { + "type": "json" + }, + "listShareChannelIds": { + "type": "json" + }, + "listAccessLevel": { + "type": "string" + }, + "listSchema": { + "type": "json" + }, + "listInitialFields": { + "type": "json" + }, + "listCells": { + "type": "json" + }, + "listDescription": { + "type": "string" + }, + "listTodoMode": { + "type": "boolean" + }, + "listUpdateTodoMode": { + "type": "string" + }, + "listParentItemId": { + "type": "string" + }, + "listDuplicatedItemId": { + "type": "string" + }, + "listLimit": { + "type": "number" + }, + "listCursor": { + "type": "string" + }, + "listArchived": { + "type": "boolean" + }, + "listIncludeSchema": { + "type": "boolean" + }, + "agentCredentialId": { + "type": "string" + }, + "agentChannelId": { + "type": "string" + }, + "agentThreadTs": { + "type": "string" + }, + "agentSessionStatus": { + "type": "string" + }, + "agentSessionTitle": { + "type": "string" + }, + "agentInitiatorUserId": { + "type": "string" + }, + "agentIconEmoji": { + "type": "string" + }, + "agentIconUrl": { + "type": "string" + }, + "agentUsername": { + "type": "string" + } + }, + "outputs": { + "message": { + "type": "json", + "description": "Complete message object with all properties: ts, text, user, channel, reactions, threads, files, attachments, blocks, stars, pins, and edit history" + }, + "ts": { + "type": "string", + "description": "Message timestamp returned by Slack API" + }, + "channel": { + "type": "string", + "description": "Channel identifier where message was sent" + }, + "fileCount": { + "type": "number", + "description": "Number of files uploaded (when files are attached)" + }, + "files": { + "type": "file[]", + "description": "Files attached to the message" + }, + "messageTs": { + "type": "string", + "description": "Timestamp of the ephemeral message (cannot be used to update or delete)" + }, + "canvas_id": { + "type": "string", + "description": "Canvas identifier for created canvases" + }, + "title": { + "type": "string", + "description": "Canvas title" + }, + "canvas": { + "type": "json", + "description": "Canvas file metadata returned by Slack" + }, + "canvases": { + "type": "json", + "description": "Array of canvas file objects returned by Slack" + }, + "paging": { + "type": "json", + "description": "Pagination information for listed canvases" + }, + "sections": { + "type": "json", + "description": "Canvas section IDs returned by Slack section lookup" + }, + "ok": { + "type": "boolean", + "description": "Whether Slack completed the operation" + }, + "status": { + "type": "string", + "description": "List export job status" + }, + "agentStatus": { + "type": "string", + "description": "Agent session status recorded by Slack" + }, + "messages": { + "type": "json", + "description": "Conversation messages" + }, + "parentMessage": { + "type": "json", + "description": "The thread parent message with all properties" + }, + "replies": { + "type": "json", + "description": "Array of reply messages in the thread (excluding the parent)" + }, + "replyCount": { + "type": "number", + "description": "Number of replies returned in this response" + }, + "hasMore": { + "type": "boolean", + "description": "Whether more thread messages or provider pages remain beyond the fetched window" + }, + "pages": { + "type": "number", + "description": "Number of provider pages fetched during a paginated read" + }, + "threadTs": { + "type": "string", + "description": "Thread timestamp an assistant status/title/prompts op was set on" + }, + "permalink": { + "type": "string", + "description": "Permalink URL to the message" + }, + "channels": { + "type": "json", + "description": "One page of accessible public and private channel objects, including conversation type and membership fields." + }, + "count": { + "type": "number", + "description": "Total number of items returned (channels, members, or users)" + }, + "nextCursor": { + "type": "string", + "description": "Continuation cursor; empty or null when finished" + }, + "members": { + "type": "json", + "description": "Array of user IDs who are members of the channel" + }, + "users": { + "type": "json", + "description": "User IDs or a map of user IDs to Do Not Disturb state" + }, + "user": { + "type": "json", + "description": "Detailed user object with properties: id, name, real_name, display_name, first_name, last_name, title, is_bot, is_admin, deleted, timezone, avatars, status" + }, + "file": { + "type": "file", + "description": "Downloaded file stored in execution files" + }, + "content": { + "type": "string", + "description": "Success message for update operation" + }, + "metadata": { + "type": "json", + "description": "Updated message metadata (legacy, use message object instead)" + }, + "channelInfo": { + "type": "json", + "description": "Detailed channel object with properties: id, name, is_private, is_archived, is_member, num_members, topic, purpose, created, creator" + }, + "presence": { + "type": "string", + "description": "User presence status: \"active\" or \"away\"" + }, + "online": { + "type": "boolean", + "description": "Whether user has an active client connection (only available when checking own presence)" + }, + "autoAway": { + "type": "boolean", + "description": "Whether user was automatically set to away (only available when checking own presence)" + }, + "manualAway": { + "type": "boolean", + "description": "Whether user manually set themselves as away (only available when checking own presence)" + }, + "connectionCount": { + "type": "number", + "description": "Total number of active connections (only available when checking own presence)" + }, + "lastActivity": { + "type": "number", + "description": "Unix timestamp of last detected activity (only available when checking own presence)" + }, + "view": { + "type": "json", + "description": "View object with properties: id, team_id, type, title, submit, close, blocks, private_metadata, callback_id, external_id, state, hash, clear_on_close, notify_on_close, root_view_id, previous_view_id, app_id, bot_id" + }, + "errors": { + "type": "json", + "description": "Array of per-user error objects when force is true and some invitations failed (user, ok, error)" + }, + "scheduledMessageId": { + "type": "string", + "description": "Identifier of the scheduled message (used to delete it before it posts)" + }, + "postAt": { + "type": "number", + "description": "Unix timestamp when a scheduled message will post" + }, + "scheduledMessages": { + "type": "json", + "description": "Array of pending scheduled message objects with properties: id, channel_id, post_at, date_created, text" + }, + "purpose": { + "type": "string", + "description": "The purpose/description that was set on the channel" + }, + "event_type": { + "type": "string", + "description": "Type of Slack event that triggered the workflow" + }, + "subtype": { + "type": "string", + "description": "Message subtype (e.g., channel_join, channel_leave, bot_message). Null for regular user messages" + }, + "channel_name": { + "type": "string", + "description": "Human-readable channel name" + }, + "channel_type": { + "type": "string", + "description": "Type of channel (e.g., channel, group, im, mpim)" + }, + "user_name": { + "type": "string", + "description": "Username who triggered the event" + }, + "bot_id": { + "type": "string", + "description": "Bot ID if the message was sent by a bot. Null for human users" + }, + "timestamp": { + "type": "string", + "description": "Message timestamp from the triggering event" + }, + "thread_ts": { + "type": "string", + "description": "Parent thread timestamp (if message is in a thread)" + }, + "team_id": { + "type": "string", + "description": "Slack workspace/team ID" + }, + "event_id": { + "type": "string", + "description": "Unique event identifier for the trigger" + }, + "profile": { + "type": "json", + "description": "User profile or workspace custom profile fields" + }, + "usergroups": { + "type": "json", + "description": "User groups" + }, + "usergroup": { + "type": "json", + "description": "Created or updated user group" + }, + "bookmarks": { + "type": "json", + "description": "Channel bookmarks" + }, + "bookmark": { + "type": "json", + "description": "Created or edited bookmark" + }, + "emoji": { + "type": "json", + "description": "Custom emoji names mapped to image URLs or aliases" + }, + "team": { + "type": "json", + "description": "Workspace details" + }, + "job_id": { + "type": "string", + "description": "List export job ID" + }, + "download_url": { + "type": "string", + "description": "List export download URL when ready" + }, + "response_metadata": { + "type": "json", + "description": "Pagination metadata including next_cursor" + }, + "dnd_enabled": { + "type": "boolean", + "description": "Whether Do Not Disturb is enabled" + }, + "next_dnd_start_ts": { + "type": "number", + "description": "Next Do Not Disturb start timestamp" + }, + "next_dnd_end_ts": { + "type": "number", + "description": "Next Do Not Disturb end timestamp" + }, + "snooze_enabled": { + "type": "boolean", + "description": "Whether notification snooze is enabled" + }, + "snooze_endtime": { + "type": "number", + "description": "Snooze end timestamp" + }, + "snooze_remaining": { + "type": "number", + "description": "Seconds remaining in snooze" + }, + "snooze_is_indefinite": { + "type": "boolean", + "description": "Whether snooze is indefinite" + }, + "type": { + "type": "string", + "description": "Type of reacted-to item" + }, + "comment": { + "type": "json", + "description": "File comment with reactions" + }, + "comments": { + "type": "json", + "description": "File comments (id, comment, user, created, timestamp)" + }, + "fileMetadata": { + "type": "json", + "description": "Slack file metadata (id, name, title, mimetype, permalink)" + }, + "conversation": { + "type": "json", + "description": "Opened or joined conversation details (id, name, is_im, is_mpim)" + }, + "listId": { + "type": "string", + "description": "Created List ID" + }, + "schema": { + "type": "json", + "description": "Created column schema (id, key, name, type, options); null when Slack omits it" + }, + "list": { + "type": "json", + "description": "List metadata (id, title, schema); null when not included" + }, + "items": { + "type": "json", + "description": "List rows, pinned items, or reacted-to items, depending on the operation" + }, + "item": { + "type": "json", + "description": "One row (id, list_id, fields, timestamps, parent_record_id)" + } + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false + }, + "description": "Manage Slack messages, channels, users, files, Lists, canvases, and Agent Sessions" + }, + "gmail_v2": { + "type": "gmail_v2", + "name": "Gmail", + "category": "tools", + "triggerAllowed": true, + "triggers": { + "enabled": true, + "available": ["gmail_poller"] + }, + "subBlocks": [ + { + "id": "operation", + "type": "dropdown", + "title": "Operation", + "valueDefault": { + "constant": "send_gmail" + }, + "options": [ + { + "id": "send_gmail", + "label": "Send Email" + }, + { + "id": "read_gmail", + "label": "Read Email" + }, + { + "id": "draft_gmail", + "label": "Draft Email" + }, + { + "id": "edit_draft_gmail", + "label": "Edit Draft" + }, + { + "id": "search_gmail", + "label": "Search Email" + }, + { + "id": "move_gmail", + "label": "Move Email" + }, + { + "id": "mark_read_gmail", + "label": "Mark as Read" + }, + { + "id": "mark_unread_gmail", + "label": "Mark as Unread" + }, + { + "id": "archive_gmail", + "label": "Archive Email" + }, + { + "id": "unarchive_gmail", + "label": "Unarchive Email" + }, + { + "id": "delete_gmail", + "label": "Delete Email" + }, + { + "id": "add_label_gmail", + "label": "Add Label" + }, + { + "id": "remove_label_gmail", + "label": "Remove Label" + }, + { + "id": "list_labels_gmail", + "label": "List Labels" + }, + { + "id": "create_label_gmail", + "label": "Create Label" + }, + { + "id": "update_label_gmail", + "label": "Update Label" + }, + { + "id": "delete_label_gmail", + "label": "Delete Label" + }, + { + "id": "list_drafts_gmail", + "label": "List Drafts" + }, + { + "id": "get_draft_gmail", + "label": "Get Draft" + }, + { + "id": "delete_draft_gmail", + "label": "Delete Draft" + }, + { + "id": "list_threads_gmail", + "label": "List Threads" + }, + { + "id": "get_thread_gmail", + "label": "Get Thread" + }, + { + "id": "trash_thread_gmail", + "label": "Trash Thread" + }, + { + "id": "untrash_thread_gmail", + "label": "Untrash Thread" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "credential", + "type": "oauth-input", + "title": "Gmail Account", + "mode": "basic", + "canonicalParamId": "oauthCredential", + "required": true, + "serviceId": "gmail", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "manualCredential", + "type": "short-input", + "title": "Gmail Account", + "mode": "advanced", + "canonicalParamId": "oauthCredential", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "impersonateUserEmail", + "type": "short-input", + "title": "Impersonated Account", + "mode": "both", + "valueKind": "string", + "storage": "native" + }, + { + "id": "draftId", + "type": "short-input", + "title": "Draft ID", + "condition": { + "field": "operation", + "value": ["edit_draft_gmail", "get_draft_gmail", "delete_draft_gmail"] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "to", + "type": "short-input", + "title": "To", + "condition": { + "field": "operation", + "value": ["send_gmail", "draft_gmail", "edit_draft_gmail"] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "subject", + "type": "short-input", + "title": "Subject", + "condition": { + "field": "operation", + "value": ["send_gmail", "draft_gmail", "edit_draft_gmail"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "body", + "type": "long-input", + "title": "Body", + "condition": { + "field": "operation", + "value": ["send_gmail", "draft_gmail", "edit_draft_gmail"] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "contentType", + "type": "dropdown", + "title": "Content Type", + "condition": { + "field": "operation", + "value": ["send_gmail", "draft_gmail", "edit_draft_gmail"] + }, + "required": false, + "valueDefault": { + "constant": "text" + }, + "options": [ + { + "id": "text", + "label": "Plain Text" + }, + { + "id": "html", + "label": "HTML" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "attachmentFiles", + "type": "file-upload", + "title": "Attachments", + "mode": "basic", + "canonicalParamId": "attachments", + "condition": { + "field": "operation", + "value": ["send_gmail", "draft_gmail", "edit_draft_gmail"] + }, + "required": false, + "multiple": true, + "valueKind": "upload", + "storage": "native" + }, + { + "id": "attachments", + "type": "short-input", + "title": "Attachments", + "mode": "advanced", + "canonicalParamId": "attachments", + "condition": { + "field": "operation", + "value": ["send_gmail", "draft_gmail", "edit_draft_gmail"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "threadId", + "type": "short-input", + "title": "Thread ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": ["send_gmail", "draft_gmail", "edit_draft_gmail"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "replyToMessageId", + "type": "short-input", + "title": "Reply to Message ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": ["send_gmail", "draft_gmail", "edit_draft_gmail"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "cc", + "type": "short-input", + "title": "CC", + "mode": "advanced", + "condition": { + "field": "operation", + "value": ["send_gmail", "draft_gmail", "edit_draft_gmail"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "bcc", + "type": "short-input", + "title": "BCC", + "mode": "advanced", + "condition": { + "field": "operation", + "value": ["send_gmail", "draft_gmail", "edit_draft_gmail"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "replyTo", + "type": "short-input", + "title": "Reply-To", + "mode": "advanced", + "condition": { + "field": "operation", + "value": ["send_gmail", "draft_gmail", "edit_draft_gmail"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "folder", + "type": "folder-selector", + "title": "Label", + "mode": "basic", + "canonicalParamId": "folder", + "condition": { + "field": "operation", + "value": "read_gmail" + }, + "options": { + "dynamic": true + }, + "selectorKey": "gmail.labels", + "serviceId": "gmail", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "manualFolder", + "type": "short-input", + "title": "Label/Folder", + "mode": "advanced", + "canonicalParamId": "folder", + "condition": { + "field": "operation", + "value": "read_gmail" + }, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "unreadOnly", + "type": "switch", + "title": "Unread Only", + "condition": { + "field": "operation", + "value": "read_gmail" + }, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "includeAttachments", + "type": "switch", + "title": "Include Attachments", + "condition": { + "field": "operation", + "value": "read_gmail" + }, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "messageId", + "type": "short-input", + "title": "Message ID", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "read_gmail" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "query", + "type": "short-input", + "title": "Search Query", + "condition": { + "field": "operation", + "value": "search_gmail" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "maxResults", + "type": "short-input", + "title": "Max Results", + "condition": { + "field": "operation", + "value": ["read_gmail", "search_gmail", "list_drafts_gmail", "list_threads_gmail"] + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "pageToken", + "type": "short-input", + "title": "Page Token", + "mode": "advanced", + "condition": { + "field": "operation", + "value": ["search_gmail", "list_drafts_gmail", "list_threads_gmail"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "moveMessageId", + "type": "short-input", + "title": "Message ID", + "condition": { + "field": "operation", + "value": "move_gmail" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "destinationLabel", + "type": "folder-selector", + "title": "Move To Label", + "mode": "basic", + "canonicalParamId": "addLabelIds", + "condition": { + "field": "operation", + "value": "move_gmail" + }, + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "gmail.labels", + "serviceId": "gmail", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "manualDestinationLabel", + "type": "short-input", + "title": "Move To Label", + "mode": "advanced", + "canonicalParamId": "addLabelIds", + "condition": { + "field": "operation", + "value": "move_gmail" + }, + "required": true, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "sourceLabel", + "type": "folder-selector", + "title": "Remove From Label", + "mode": "basic", + "canonicalParamId": "removeLabelIds", + "condition": { + "field": "operation", + "value": "move_gmail" + }, + "required": false, + "options": { + "dynamic": true + }, + "selectorKey": "gmail.labels", + "serviceId": "gmail", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "manualSourceLabel", + "type": "short-input", + "title": "Remove From Label", + "mode": "advanced", + "canonicalParamId": "removeLabelIds", + "condition": { + "field": "operation", + "value": "move_gmail" + }, + "required": false, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "actionMessageId", + "type": "short-input", + "title": "Message ID", + "condition": { + "field": "operation", + "value": [ + "mark_read_gmail", + "mark_unread_gmail", + "archive_gmail", + "unarchive_gmail", + "delete_gmail" + ] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "labelActionMessageId", + "type": "short-input", + "title": "Message ID", + "condition": { + "field": "operation", + "value": ["add_label_gmail", "remove_label_gmail"] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "labelSelector", + "type": "folder-selector", + "title": "Label", + "mode": "basic", + "canonicalParamId": "manageLabelId", + "condition": { + "field": "operation", + "value": ["add_label_gmail", "remove_label_gmail"] + }, + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "gmail.labels", + "serviceId": "gmail", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "manualLabelId", + "type": "short-input", + "title": "Label", + "mode": "advanced", + "canonicalParamId": "manageLabelId", + "condition": { + "field": "operation", + "value": ["add_label_gmail", "remove_label_gmail"] + }, + "required": true, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "labelTarget", + "type": "folder-selector", + "title": "Label", + "mode": "basic", + "canonicalParamId": "labelId", + "condition": { + "field": "operation", + "value": ["update_label_gmail", "delete_label_gmail"] + }, + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "gmail.labels", + "serviceId": "gmail", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "manualLabelTarget", + "type": "short-input", + "title": "Label ID", + "mode": "advanced", + "canonicalParamId": "labelId", + "condition": { + "field": "operation", + "value": ["update_label_gmail", "delete_label_gmail"] + }, + "required": true, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "labelName", + "type": "short-input", + "title": "Label Name", + "condition": { + "field": "operation", + "value": ["create_label_gmail", "update_label_gmail"] + }, + "required": { + "field": "operation", + "value": "create_label_gmail" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "messageListVisibility", + "type": "dropdown", + "title": "Message List Visibility", + "mode": "advanced", + "condition": { + "field": "operation", + "value": ["create_label_gmail", "update_label_gmail"] + }, + "required": false, + "valueDefault": { + "constant": "" + }, + "options": [ + { + "id": "", + "label": "Default" + }, + { + "id": "show", + "label": "Show" + }, + { + "id": "hide", + "label": "Hide" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "labelListVisibility", + "type": "dropdown", + "title": "Label List Visibility", + "mode": "advanced", + "condition": { + "field": "operation", + "value": ["create_label_gmail", "update_label_gmail"] + }, + "required": false, + "valueDefault": { + "constant": "" + }, + "options": [ + { + "id": "", + "label": "Default" + }, + { + "id": "labelShow", + "label": "Show" + }, + { + "id": "labelShowIfUnread", + "label": "Show if unread" + }, + { + "id": "labelHide", + "label": "Hide" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "targetThreadId", + "type": "short-input", + "title": "Thread ID", + "condition": { + "field": "operation", + "value": ["get_thread_gmail", "trash_thread_gmail", "untrash_thread_gmail"] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "threadFormat", + "type": "dropdown", + "title": "Format", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "get_thread_gmail" + }, + "required": false, + "valueDefault": { + "constant": "full" + }, + "options": [ + { + "id": "full", + "label": "Full" + }, + { + "id": "metadata", + "label": "Metadata" + }, + { + "id": "minimal", + "label": "Minimal" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "listQuery", + "type": "short-input", + "title": "Search Query", + "condition": { + "field": "operation", + "value": ["list_drafts_gmail", "list_threads_gmail"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "threadLabelIds", + "type": "short-input", + "title": "Label IDs", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "list_threads_gmail" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "triggerCredentials", + "type": "oauth-input", + "title": "Credentials", + "mode": "trigger", + "canonicalParamId": "oauthCredential", + "surface": "trigger", + "required": true, + "serviceId": "gmail", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "labelIds", + "type": "dropdown", + "title": "Gmail Labels to Monitor", + "mode": "trigger", + "surface": "trigger", + "required": false, + "options": { + "dynamic": true + }, + "multiple": true, + "selectorKey": "gmail.labels", + "valueKind": "array", + "storage": "native", + "dependsOn": { + "all": ["triggerCredentials"], + "any": [] + } + }, + { + "id": "labelFilterBehavior", + "type": "dropdown", + "title": "Label Filter Behavior", + "mode": "trigger", + "surface": "trigger", + "required": true, + "defaultValue": "INCLUDE", + "options": [ + { + "id": "INCLUDE", + "label": "INCLUDE" + }, + { + "id": "EXCLUDE", + "label": "EXCLUDE" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "searchQuery", + "type": "short-input", + "title": "Gmail Search Query", + "mode": "trigger", + "surface": "trigger", + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "markAsRead", + "type": "switch", + "title": "Mark as Read", + "mode": "trigger", + "surface": "trigger", + "required": false, + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "includeAttachments", + "type": "switch", + "title": "Include Attachments", + "mode": "trigger", + "surface": "trigger", + "required": false, + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "triggerInstructions", + "type": "text", + "title": "Setup Instructions", + "mode": "trigger", + "surface": "trigger", + "defaultValue": "
1. Connect your Gmail account using OAuth credentials
2. Configure which Gmail labels to monitor (optional)
3. The system will automatically check for new emails and trigger your workflow
", + "valueKind": "none", + "storage": "native" + }, + { + "id": "samplePayload_gmail_poller", + "type": "code", + "title": "Event Payload Example", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "selectedTriggerId", + "value": "gmail_poller" + }, + "defaultValue": "{\n \"email\": {\n \"id\": \"mock_id\",\n \"threadId\": \"mock_threadId\",\n \"subject\": \"mock_subject\",\n \"from\": \"mock_from\",\n \"to\": \"mock_to\",\n \"cc\": \"mock_cc\",\n \"bcc\": \"mock_bcc\",\n \"replyTo\": \"mock_replyTo\",\n \"rfcMessageId\": \"mock_rfcMessageId\",\n \"inReplyTo\": \"mock_inReplyTo\",\n \"references\": \"mock_references\",\n \"snippet\": \"mock_snippet\",\n \"date\": \"mock_date\",\n \"bodyText\": \"mock_bodyText\",\n \"bodyHtml\": \"mock_bodyHtml\",\n \"labels\": [\n {\n \"id\": \"item_1\",\n \"name\": \"Sample Item\",\n \"value\": \"Sample Value\"\n }\n ],\n \"hasAttachments\": true,\n \"attachments\": null\n },\n \"timestamp\": \"mock_timestamp\"\n}", + "readOnly": true, + "language": "json", + "valueKind": "json", + "storage": "native" + } + ], + "tools": { + "access": [ + "gmail_send_v2", + "gmail_draft_v2", + "gmail_edit_draft_v2", + "gmail_read_v2", + "gmail_search_v2", + "gmail_move_v2", + "gmail_mark_read_v2", + "gmail_mark_unread_v2", + "gmail_archive_v2", + "gmail_unarchive_v2", + "gmail_delete_v2", + "gmail_add_label_v2", + "gmail_remove_label_v2", + "gmail_list_labels_v2", + "gmail_create_label_v2", + "gmail_update_label_v2", + "gmail_delete_label_v2", + "gmail_list_drafts_v2", + "gmail_get_draft_v2", + "gmail_delete_draft_v2", + "gmail_list_threads_v2", + "gmail_get_thread_v2", + "gmail_trash_thread_v2", + "gmail_untrash_thread_v2" + ], + "selector": "operation" + }, + "inputs": { + "operation": { + "type": "string" + }, + "oauthCredential": { + "type": "string" + }, + "draftId": { + "type": "string" + }, + "to": { + "type": "string" + }, + "subject": { + "type": "string" + }, + "body": { + "type": "string" + }, + "contentType": { + "type": "string" + }, + "threadId": { + "type": "string" + }, + "replyToMessageId": { + "type": "string" + }, + "cc": { + "type": "string" + }, + "bcc": { + "type": "string" + }, + "replyTo": { + "type": "string" + }, + "attachments": { + "type": "array" + }, + "folder": { + "type": "string" + }, + "readMessageId": { + "type": "string" + }, + "unreadOnly": { + "type": "boolean" + }, + "includeAttachments": { + "type": "boolean" + }, + "query": { + "type": "string" + }, + "maxResults": { + "type": "number" + }, + "pageToken": { + "type": "string" + }, + "moveMessageId": { + "type": "string" + }, + "addLabelIds": { + "type": "string" + }, + "removeLabelIds": { + "type": "string" + }, + "actionMessageId": { + "type": "string" + }, + "labelActionMessageId": { + "type": "string" + }, + "manageLabelId": { + "type": "string" + }, + "labelIds": { + "type": "string" + }, + "labelId": { + "type": "string" + }, + "labelName": { + "type": "string" + }, + "messageListVisibility": { + "type": "string" + }, + "labelListVisibility": { + "type": "string" + }, + "targetThreadId": { + "type": "string" + }, + "threadFormat": { + "type": "string" + }, + "listQuery": { + "type": "string" + }, + "threadLabelIds": { + "type": "string" + } + }, + "outputs": { + "id": { + "type": "string", + "description": "Gmail message ID (thread ID for thread operations, label ID for label operations, draft ID for Get Draft)" + }, + "threadId": { + "type": "string", + "description": "Gmail thread ID" + }, + "labelIds": { + "type": "array", + "description": "Email label IDs" + }, + "from": { + "type": "string", + "description": "Sender" + }, + "to": { + "type": "string", + "description": "To" + }, + "bcc": { + "type": "string", + "description": "Bcc recipients (only on messages you sent or drafted)" + }, + "replyTo": { + "type": "string", + "description": "Reply-To header" + }, + "subject": { + "type": "string", + "description": "Subject" + }, + "date": { + "type": "string", + "description": "Date" + }, + "rfcMessageId": { + "type": "string", + "description": "RFC Message-ID header (not the Gmail message id)" + }, + "inReplyTo": { + "type": "string", + "description": "In-Reply-To header" + }, + "references": { + "type": "string", + "description": "References header" + }, + "snippet": { + "type": "string", + "description": "Short excerpt of the message text" + }, + "internalDate": { + "type": "string", + "description": "Gmail internal creation timestamp in epoch milliseconds" + }, + "body": { + "type": "string", + "description": "Email body text (best-effort)" + }, + "results": { + "type": "json", + "description": "Search/read summary results [{id, threadId, subject, from, to, cc, bcc, replyTo, date, snippet, rfcMessageId, inReplyTo, references, internalDate}]" + }, + "nextPageToken": { + "type": "string", + "description": "Token for the next page of results", + "condition": { + "field": "operation", + "value": ["search_gmail", "list_drafts_gmail", "list_threads_gmail"] + } + }, + "resultSizeEstimate": { + "type": "number", + "description": "Estimated total number of results", + "condition": { + "field": "operation", + "value": ["search_gmail", "list_drafts_gmail", "list_threads_gmail"] + } + }, + "name": { + "type": "string", + "description": "Label display name", + "condition": { + "field": "operation", + "value": ["create_label_gmail", "update_label_gmail"] + } + }, + "type": { + "type": "string", + "description": "Label type (system or user)", + "condition": { + "field": "operation", + "value": ["create_label_gmail", "update_label_gmail"] + } + }, + "messageListVisibility": { + "type": "string", + "description": "Message list visibility of the label", + "condition": { + "field": "operation", + "value": ["create_label_gmail", "update_label_gmail"] + } + }, + "labelListVisibility": { + "type": "string", + "description": "Label list visibility of the label", + "condition": { + "field": "operation", + "value": ["create_label_gmail", "update_label_gmail"] + } + }, + "labelId": { + "type": "string", + "description": "ID of the deleted label", + "condition": { + "field": "operation", + "value": "delete_label_gmail" + } + }, + "deleted": { + "type": "boolean", + "description": "Whether the label or draft was deleted", + "condition": { + "field": "operation", + "value": ["delete_label_gmail", "delete_draft_gmail"] + } + }, + "drafts": { + "type": "json", + "description": "Drafts [{id, messageId, threadId}]", + "condition": { + "field": "operation", + "value": "list_drafts_gmail" + } + }, + "threads": { + "type": "json", + "description": "Threads [{id, snippet, historyId}]", + "condition": { + "field": "operation", + "value": "list_threads_gmail" + } + }, + "messages": { + "type": "json", + "description": "Thread messages [{id, threadId, labelIds, snippet, from, to, cc, bcc, replyTo, subject, date, rfcMessageId, inReplyTo, references, internalDate, body}]", + "condition": { + "field": "operation", + "value": "get_thread_gmail" + } + }, + "historyId": { + "type": "string", + "description": "ID of the last history record that modified the thread", + "condition": { + "field": "operation", + "value": "get_thread_gmail" + } + }, + "trashed": { + "type": "boolean", + "description": "Whether the thread was moved to trash", + "condition": { + "field": "operation", + "value": "trash_thread_gmail" + } + }, + "untrashed": { + "type": "boolean", + "description": "Whether the thread was restored from trash", + "condition": { + "field": "operation", + "value": "untrash_thread_gmail" + } + }, + "attachments": { + "type": "file[]", + "description": "Downloaded attachments (if enabled)" + }, + "draftId": { + "type": "string", + "description": "Draft ID", + "condition": { + "field": "operation", + "value": ["draft_gmail", "edit_draft_gmail", "delete_draft_gmail"] + } + }, + "messageId": { + "type": "string", + "description": "Gmail message ID for the draft", + "condition": { + "field": "operation", + "value": ["draft_gmail", "edit_draft_gmail", "get_draft_gmail"] + } + }, + "email_id": { + "type": "string", + "description": "Gmail message ID" + }, + "thread_id": { + "type": "string", + "description": "Gmail thread ID" + }, + "cc": { + "type": "string", + "description": "Cc recipients (raw Cc header, comma-separated)" + }, + "body_text": { + "type": "string", + "description": "Plain text email body" + }, + "body_html": { + "type": "string", + "description": "HTML email body" + }, + "labels": { + "type": "json", + "description": "Email labels (trigger, comma-separated); for List Labels, the label array [{id, name, type, messageListVisibility, labelListVisibility}]" + }, + "has_attachments": { + "type": "boolean", + "description": "Whether email has attachments" + }, + "raw_email": { + "type": "json", + "description": "Complete raw email data from Gmail API (if enabled)" + }, + "timestamp": { + "type": "string", + "description": "Event timestamp" + } + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false + }, + "description": "Send, read, search, and move Gmail messages or trigger workflows from Gmail events" + }, + "google_sheets_v2": { + "type": "google_sheets_v2", + "name": "Google Sheets", + "category": "tools", + "triggers": { + "enabled": true, + "available": ["google_sheets_poller"] + }, + "subBlocks": [ + { + "id": "operation", + "type": "dropdown", + "title": "Operation", + "valueDefault": { + "constant": "read" + }, + "options": [ + { + "id": "read", + "label": "Read Data" + }, + { + "id": "write", + "label": "Write Data" + }, + { + "id": "update", + "label": "Update Data" + }, + { + "id": "append", + "label": "Append Data" + }, + { + "id": "clear", + "label": "Clear Data" + }, + { + "id": "get_info", + "label": "Get Spreadsheet Info" + }, + { + "id": "create", + "label": "Create Spreadsheet" + }, + { + "id": "batch_get", + "label": "Batch Read" + }, + { + "id": "batch_update", + "label": "Batch Update" + }, + { + "id": "batch_clear", + "label": "Batch Clear" + }, + { + "id": "copy_sheet", + "label": "Copy Sheet" + }, + { + "id": "delete_rows", + "label": "Delete Rows" + }, + { + "id": "delete_sheet", + "label": "Delete Sheet" + }, + { + "id": "delete_spreadsheet", + "label": "Delete Spreadsheet" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "credential", + "type": "oauth-input", + "title": "Google Account", + "mode": "basic", + "canonicalParamId": "oauthCredential", + "required": true, + "serviceId": "google-sheets", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "manualCredential", + "type": "short-input", + "title": "Google Account", + "mode": "advanced", + "canonicalParamId": "oauthCredential", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "impersonateUserEmail", + "type": "short-input", + "title": "Impersonated Account", + "mode": "both", + "valueKind": "string", + "storage": "native" + }, + { + "id": "spreadsheetId", + "type": "file-selector", + "title": "Select Spreadsheet", + "mode": "basic", + "canonicalParamId": "spreadsheetId", + "condition": { + "field": "operation", + "value": "create", + "not": true + }, + "options": { + "dynamic": true + }, + "selectorKey": "google.drive", + "serviceId": "google-sheets", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "manualSpreadsheetId", + "type": "short-input", + "title": "Spreadsheet ID", + "mode": "advanced", + "canonicalParamId": "spreadsheetId", + "condition": { + "field": "operation", + "value": "create", + "not": true + }, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": [] + } + }, + { + "id": "sheetName", + "type": "sheet-selector", + "title": "Sheet (Tab)", + "mode": "basic", + "canonicalParamId": "sheetName", + "condition": { + "field": "operation", + "value": ["read", "write", "update", "append", "clear"] + }, + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "google.sheets", + "serviceId": "google-sheets", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": ["spreadsheetId", "manualSpreadsheetId"] + } + }, + { + "id": "manualSheetName", + "type": "short-input", + "title": "Sheet Name", + "mode": "advanced", + "canonicalParamId": "sheetName", + "condition": { + "field": "operation", + "value": ["read", "write", "update", "append", "clear"] + }, + "required": true, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["credential"], + "any": ["spreadsheetId", "manualSpreadsheetId"] + } + }, + { + "id": "cellRange", + "type": "short-input", + "title": "Cell Range", + "condition": { + "field": "operation", + "value": ["read", "write", "update", "clear"] + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "filterColumn", + "type": "short-input", + "title": "Filter Column", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "read" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "filterValue", + "type": "short-input", + "title": "Filter Value", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "read" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "filterMatchType", + "type": "dropdown", + "title": "Match Type", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "read" + }, + "options": [ + { + "id": "contains", + "label": "Contains" + }, + { + "id": "not_contains", + "label": "Does Not Contain" + }, + { + "id": "exact", + "label": "Exact Match" + }, + { + "id": "not_equals", + "label": "Not Equal To" + }, + { + "id": "starts_with", + "label": "Starts With" + }, + { + "id": "ends_with", + "label": "Ends With" + }, + { + "id": "gt", + "label": "Greater Than" + }, + { + "id": "gte", + "label": "Greater Than or Equal" + }, + { + "id": "lt", + "label": "Less Than" + }, + { + "id": "lte", + "label": "Less Than or Equal" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "valueRenderOption", + "type": "dropdown", + "title": "Value Render Option", + "mode": "advanced", + "condition": { + "field": "operation", + "value": ["read", "batch_get"] + }, + "options": [ + { + "id": "FORMATTED_VALUE", + "label": "Formatted (as displayed)" + }, + { + "id": "UNFORMATTED_VALUE", + "label": "Unformatted (raw values)" + }, + { + "id": "FORMULA", + "label": "Formulas" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "dateTimeRenderOption", + "type": "dropdown", + "title": "Date/Time Render Option", + "mode": "advanced", + "condition": { + "field": "operation", + "value": ["read", "batch_get"], + "and": { + "field": "valueRenderOption", + "value": ["UNFORMATTED_VALUE", "FORMULA"] + } + }, + "options": [ + { + "id": "SERIAL_NUMBER", + "label": "Serial Number" + }, + { + "id": "FORMATTED_STRING", + "label": "Formatted String" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "majorDimension", + "type": "dropdown", + "title": "Major Dimension", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "batch_get" + }, + "options": [ + { + "id": "ROWS", + "label": "Rows" + }, + { + "id": "COLUMNS", + "label": "Columns" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "values", + "type": "long-input", + "title": "Values", + "condition": { + "field": "operation", + "value": "write" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "valueInputOption", + "type": "dropdown", + "title": "Value Input Option", + "condition": { + "field": "operation", + "value": ["write", "update", "batch_update"] + }, + "options": [ + { + "id": "USER_ENTERED", + "label": "User Entered (Parse formulas)" + }, + { + "id": "RAW", + "label": "Raw (Don't parse formulas)" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "appendValueInputOption", + "type": "dropdown", + "title": "Value Input Option", + "condition": { + "field": "operation", + "value": "append" + }, + "options": [ + { + "id": "USER_ENTERED", + "label": "User Entered (Parse formulas)" + }, + { + "id": "RAW", + "label": "Raw (Don't parse formulas)" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "includeValuesInResponse", + "type": "switch", + "title": "Return Updated Values", + "mode": "advanced", + "condition": { + "field": "operation", + "value": ["write", "update", "append", "batch_update"] + }, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "values", + "type": "long-input", + "title": "Values", + "condition": { + "field": "operation", + "value": "update" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "values", + "type": "long-input", + "title": "Values", + "condition": { + "field": "operation", + "value": "append" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "insertDataOption", + "type": "dropdown", + "title": "Insert Data Option", + "condition": { + "field": "operation", + "value": "append" + }, + "options": [ + { + "id": "INSERT_ROWS", + "label": "Insert Rows (Add new rows)" + }, + { + "id": "OVERWRITE", + "label": "Overwrite (Add to existing data)" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "title", + "type": "short-input", + "title": "Spreadsheet Title", + "condition": { + "field": "operation", + "value": "create" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "sheetTitles", + "type": "short-input", + "title": "Sheet Names", + "condition": { + "field": "operation", + "value": "create" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "ranges", + "type": "long-input", + "title": "Ranges", + "condition": { + "field": "operation", + "value": "batch_get" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "batchData", + "type": "long-input", + "title": "Data", + "condition": { + "field": "operation", + "value": "batch_update" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "ranges", + "type": "long-input", + "title": "Ranges to Clear", + "condition": { + "field": "operation", + "value": "batch_clear" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "sheetId", + "type": "short-input", + "title": "Sheet ID", + "condition": { + "field": "operation", + "value": "copy_sheet" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "destinationSpreadsheetId", + "type": "short-input", + "title": "Destination Spreadsheet ID", + "condition": { + "field": "operation", + "value": "copy_sheet" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "deleteSheetId", + "type": "short-input", + "title": "Sheet ID", + "condition": { + "field": "operation", + "value": ["delete_rows", "delete_sheet"] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "startIndex", + "type": "short-input", + "title": "Start Row Index", + "condition": { + "field": "operation", + "value": "delete_rows" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "endIndex", + "type": "short-input", + "title": "End Row Index", + "condition": { + "field": "operation", + "value": "delete_rows" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "triggerCredentials", + "type": "oauth-input", + "title": "Credentials", + "mode": "trigger", + "canonicalParamId": "oauthCredential", + "surface": "trigger", + "required": true, + "serviceId": "google-sheets", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "spreadsheetId", + "type": "file-selector", + "title": "Spreadsheet", + "mode": "trigger", + "canonicalParamId": "spreadsheetId", + "surface": "trigger", + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "google.drive", + "serviceId": "google-sheets", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["triggerCredentials"], + "any": [] + } + }, + { + "id": "manualSpreadsheetId", + "type": "short-input", + "title": "Spreadsheet ID", + "mode": "trigger-advanced", + "canonicalParamId": "spreadsheetId", + "surface": "trigger", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "sheetName", + "type": "sheet-selector", + "title": "Sheet Tab", + "mode": "trigger", + "canonicalParamId": "sheetName", + "surface": "trigger", + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "google.sheets", + "serviceId": "google-sheets", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["triggerCredentials"], + "any": ["spreadsheetId", "manualSpreadsheetId"] + } + }, + { + "id": "manualSheetName", + "type": "short-input", + "title": "Sheet Tab Name", + "mode": "trigger-advanced", + "canonicalParamId": "sheetName", + "surface": "trigger", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "valueRenderOption", + "type": "dropdown", + "title": "Value Render", + "mode": "trigger", + "surface": "trigger", + "required": false, + "defaultValue": "FORMATTED_VALUE", + "options": [ + { + "id": "FORMATTED_VALUE", + "label": "Formatted Value" + }, + { + "id": "UNFORMATTED_VALUE", + "label": "Unformatted Value" + }, + { + "id": "FORMULA", + "label": "Formula" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "dateTimeRenderOption", + "type": "dropdown", + "title": "Date/Time Render", + "mode": "trigger", + "surface": "trigger", + "required": false, + "defaultValue": "SERIAL_NUMBER", + "options": [ + { + "id": "SERIAL_NUMBER", + "label": "Serial Number" + }, + { + "id": "FORMATTED_STRING", + "label": "Formatted String" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "triggerInstructions", + "type": "text", + "title": "Setup Instructions", + "mode": "trigger", + "surface": "trigger", + "defaultValue": "
1. Connect your Google account using OAuth credentials
2. Select the spreadsheet to monitor
3. Select the sheet tab to monitor
4. The system will automatically detect new rows appended to the sheet
", + "valueKind": "none", + "storage": "native" + }, + { + "id": "samplePayload_google_sheets_poller", + "type": "code", + "title": "Event Payload Example", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "selectedTriggerId", + "value": "google_sheets_poller" + }, + "defaultValue": "{\n \"row\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"rawRow\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"headers\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"rowNumber\": 42,\n \"spreadsheetId\": \"mock_spreadsheetId\",\n \"sheetName\": \"mock_sheetName\",\n \"timestamp\": \"mock_timestamp\"\n}", + "readOnly": true, + "language": "json", + "valueKind": "json", + "storage": "native" + } + ], + "tools": { + "access": [ + "google_sheets_read_v2", + "google_sheets_write_v2", + "google_sheets_update_v2", + "google_sheets_append_v2", + "google_sheets_clear_v2", + "google_sheets_get_spreadsheet_v2", + "google_sheets_create_spreadsheet_v2", + "google_sheets_batch_get_v2", + "google_sheets_batch_update_v2", + "google_sheets_batch_clear_v2", + "google_sheets_copy_sheet_v2", + "google_sheets_delete_rows_v2", + "google_sheets_delete_sheet_v2", + "google_sheets_delete_spreadsheet_v2" + ], + "selector": "operation" + }, + "inputs": { + "operation": { + "type": "string" + }, + "oauthCredential": { + "type": "string" + }, + "spreadsheetId": { + "type": "string" + }, + "sheetName": { + "type": "string" + }, + "cellRange": { + "type": "string" + }, + "values": { + "type": "string" + }, + "valueInputOption": { + "type": "string" + }, + "appendValueInputOption": { + "type": "string" + }, + "insertDataOption": { + "type": "string" + }, + "includeValuesInResponse": { + "type": "boolean" + }, + "valueRenderOption": { + "type": "string" + }, + "dateTimeRenderOption": { + "type": "string" + }, + "majorDimension": { + "type": "string" + }, + "title": { + "type": "string" + }, + "sheetTitles": { + "type": "string" + }, + "ranges": { + "type": "string" + }, + "batchData": { + "type": "string" + }, + "sheetId": { + "type": "string" + }, + "destinationSpreadsheetId": { + "type": "string" + }, + "deleteSheetId": { + "type": "string" + }, + "startIndex": { + "type": "string" + }, + "endIndex": { + "type": "string" + }, + "filterColumn": { + "type": "string" + }, + "filterValue": { + "type": "string" + }, + "filterMatchType": { + "type": "string" + } + }, + "outputs": { + "sheetName": { + "type": "string", + "description": "Name of the sheet", + "condition": { + "field": "operation", + "value": ["read", "clear"] + } + }, + "range": { + "type": "string", + "description": "Range that was read", + "condition": { + "field": "operation", + "value": "read" + } + }, + "values": { + "type": "json", + "description": "Cell values as 2D array", + "condition": { + "field": "operation", + "value": "read" + } + }, + "filter": { + "type": "json", + "description": "Filter summary (present only when a filter was requested): applied, column, matchType, columnFound, matchedRows, totalRows", + "condition": { + "field": "operation", + "value": "read" + } + }, + "majorDimension": { + "type": "string", + "description": "Major dimension of the returned values (ROWS or COLUMNS)", + "condition": { + "field": "operation", + "value": "read" + } + }, + "updatedData": { + "type": "json", + "description": "Values of the updated cells (range, majorDimension, values), present only when Return Updated Values is on", + "condition": { + "field": "operation", + "value": ["write", "update", "append"] + } + }, + "updatedRange": { + "type": "string", + "description": "Updated range", + "condition": { + "field": "operation", + "value": ["write", "update", "append"] + } + }, + "updatedRows": { + "type": "number", + "description": "Updated rows count", + "condition": { + "field": "operation", + "value": ["write", "update", "append"] + } + }, + "updatedColumns": { + "type": "number", + "description": "Updated columns count", + "condition": { + "field": "operation", + "value": ["write", "update", "append"] + } + }, + "updatedCells": { + "type": "number", + "description": "Updated cells count", + "condition": { + "field": "operation", + "value": ["write", "update", "append"] + } + }, + "tableRange": { + "type": "string", + "description": "Table range", + "condition": { + "field": "operation", + "value": "append" + } + }, + "clearedRange": { + "type": "string", + "description": "Range that was cleared", + "condition": { + "field": "operation", + "value": "clear" + } + }, + "spreadsheetId": { + "type": "string", + "description": "Spreadsheet ID", + "condition": { + "field": "operation", + "value": [ + "get_info", + "create", + "batch_get", + "batch_update", + "batch_clear", + "delete_rows", + "delete_sheet", + "delete_spreadsheet" + ] + } + }, + "title": { + "type": "string", + "description": "Spreadsheet title (or copied sheet title for copy_sheet)", + "condition": { + "field": "operation", + "value": ["get_info", "create", "copy_sheet"] + } + }, + "sheets": { + "type": "json", + "description": "List of sheets in the spreadsheet", + "condition": { + "field": "operation", + "value": ["get_info", "create"] + } + }, + "locale": { + "type": "string", + "description": "Spreadsheet locale", + "condition": { + "field": "operation", + "value": "get_info" + } + }, + "timeZone": { + "type": "string", + "description": "Spreadsheet time zone", + "condition": { + "field": "operation", + "value": "get_info" + } + }, + "spreadsheetUrl": { + "type": "string", + "description": "Spreadsheet URL", + "condition": { + "field": "operation", + "value": ["get_info", "create"] + } + }, + "valueRanges": { + "type": "json", + "description": "Array of value ranges read from the spreadsheet", + "condition": { + "field": "operation", + "value": "batch_get" + } + }, + "totalUpdatedRows": { + "type": "number", + "description": "Total rows updated", + "condition": { + "field": "operation", + "value": "batch_update" + } + }, + "totalUpdatedColumns": { + "type": "number", + "description": "Total columns updated", + "condition": { + "field": "operation", + "value": "batch_update" + } + }, + "totalUpdatedCells": { + "type": "number", + "description": "Total cells updated", + "condition": { + "field": "operation", + "value": "batch_update" + } + }, + "totalUpdatedSheets": { + "type": "number", + "description": "Total sheets updated", + "condition": { + "field": "operation", + "value": "batch_update" + } + }, + "responses": { + "type": "json", + "description": "Array of update responses for each range", + "condition": { + "field": "operation", + "value": "batch_update" + } + }, + "clearedRanges": { + "type": "json", + "description": "Array of ranges that were cleared", + "condition": { + "field": "operation", + "value": "batch_clear" + } + }, + "sheetId": { + "type": "number", + "description": "ID of the copied sheet in the destination, or the sheet the rows were deleted from", + "condition": { + "field": "operation", + "value": ["copy_sheet", "delete_rows"] + } + }, + "index": { + "type": "number", + "description": "Position/index of the copied sheet", + "condition": { + "field": "operation", + "value": "copy_sheet" + } + }, + "sheetType": { + "type": "string", + "description": "Type of the sheet (GRID, CHART, etc.)", + "condition": { + "field": "operation", + "value": "copy_sheet" + } + }, + "destinationSpreadsheetId": { + "type": "string", + "description": "ID of the destination spreadsheet", + "condition": { + "field": "operation", + "value": "copy_sheet" + } + }, + "destinationSpreadsheetUrl": { + "type": "string", + "description": "URL of the destination spreadsheet", + "condition": { + "field": "operation", + "value": "copy_sheet" + } + }, + "deletedRowRange": { + "type": "string", + "description": "Description of the deleted row range", + "condition": { + "field": "operation", + "value": "delete_rows" + } + }, + "deletedSheetId": { + "type": "number", + "description": "The numeric ID of the deleted sheet", + "condition": { + "field": "operation", + "value": "delete_sheet" + } + }, + "deleted": { + "type": "boolean", + "description": "Whether the spreadsheet was successfully deleted", + "condition": { + "field": "operation", + "value": "delete_spreadsheet" + } + }, + "metadata": { + "type": "json", + "description": "Spreadsheet metadata including ID and URL", + "condition": { + "field": "operation", + "value": [ + "read", + "write", + "update", + "append", + "clear", + "batch_get", + "batch_update", + "batch_clear", + "delete_rows", + "delete_sheet" + ] + } + } + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false + }, + "description": "Read, write, and update data with sheet selection" + }, + "table_v2": { + "type": "table_v2", + "name": "Table", + "category": "blocks", + "triggers": { + "enabled": true, + "available": ["table_new_row"] + }, + "subBlocks": [ + { + "id": "operation", + "type": "dropdown", + "title": "Operation", + "valueDefault": { + "constant": "query_rows" + }, + "options": [ + { + "id": "query_rows", + "label": "Query Rows" + }, + { + "id": "insert_row", + "label": "Insert Row" + }, + { + "id": "upsert_row", + "label": "Upsert Row" + }, + { + "id": "batch_insert_rows", + "label": "Batch Insert Rows" + }, + { + "id": "update_rows_by_filter", + "label": "Update Rows by Filter" + }, + { + "id": "delete_rows_by_filter", + "label": "Delete Rows by Filter" + }, + { + "id": "update_row", + "label": "Update Row by ID" + }, + { + "id": "delete_row", + "label": "Delete Row by ID" + }, + { + "id": "get_row", + "label": "Get Row by ID" + }, + { + "id": "get_schema", + "label": "Get Schema" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "tableSelector", + "type": "table-selector", + "title": "Table", + "mode": "basic", + "canonicalParamId": "tableId", + "required": true, + "valueKind": "resource", + "resourceKind": "table", + "storage": "native" + }, + { + "id": "manualTableId", + "type": "short-input", + "title": "Table ID", + "mode": "advanced", + "canonicalParamId": "tableId", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "outputColumns", + "type": "dropdown", + "title": "Columns to Return", + "condition": { + "field": "operation", + "value": "query_rows" + }, + "options": { + "dynamic": true + }, + "multiple": true, + "selectorKey": "table.outputColumns", + "valueKind": "array", + "storage": "native", + "dependsOn": { + "all": [], + "any": ["tableSelector", "manualTableId"] + } + }, + { + "id": "rowId", + "type": "short-input", + "title": "Row ID", + "condition": { + "field": "operation", + "value": ["get_row", "update_row", "delete_row"] + }, + "required": true, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["tableId"], + "any": [] + } + }, + { + "id": "data", + "type": "code", + "title": "Row Data (JSON)", + "condition": { + "field": "operation", + "value": ["insert_row", "upsert_row", "update_row", "update_rows_by_filter"] + }, + "required": true, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "conflictColumnSelector", + "type": "column-selector", + "title": "Conflict Column", + "mode": "basic", + "canonicalParamId": "conflictColumn", + "condition": { + "field": "operation", + "value": "upsert_row" + }, + "options": { + "dynamic": true + }, + "selectorKey": "table.columns", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["tableSelector"], + "any": [] + } + }, + { + "id": "manualConflictColumn", + "type": "short-input", + "title": "Conflict Column", + "mode": "advanced", + "canonicalParamId": "conflictColumn", + "condition": { + "field": "operation", + "value": "upsert_row" + }, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["tableId"], + "any": [] + } + }, + { + "id": "rows", + "type": "code", + "title": "Rows Data (Array of JSON)", + "condition": { + "field": "operation", + "value": "batch_insert_rows" + }, + "required": true, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "filterBuilder", + "type": "filter-builder", + "title": "Filter", + "mode": "basic", + "canonicalParamId": "filterInput", + "condition": { + "field": "operation", + "value": ["query_rows", "update_rows_by_filter", "delete_rows_by_filter"] + }, + "valueKind": "array", + "storage": "native" + }, + { + "id": "filter", + "type": "code", + "title": "Filter", + "mode": "advanced", + "canonicalParamId": "filterInput", + "condition": { + "field": "operation", + "value": ["query_rows", "update_rows_by_filter", "delete_rows_by_filter"] + }, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "sortBuilder", + "type": "sort-builder", + "title": "Order", + "mode": "basic", + "canonicalParamId": "sortInput", + "condition": { + "field": "operation", + "value": "query_rows" + }, + "valueKind": "array", + "storage": "native" + }, + { + "id": "order", + "type": "short-input", + "title": "Order", + "mode": "advanced", + "canonicalParamId": "sortInput", + "condition": { + "field": "operation", + "value": "query_rows" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "limit", + "type": "short-input", + "title": "Limit", + "condition": { + "field": "operation", + "value": ["query_rows", "update_rows_by_filter", "delete_rows_by_filter"] + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "cursor", + "type": "short-input", + "title": "Cursor", + "condition": { + "field": "operation", + "value": "query_rows" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "tableSelector", + "type": "table-selector", + "title": "Table", + "mode": "trigger", + "canonicalParamId": "tableId", + "surface": "trigger", + "required": true, + "valueKind": "resource", + "resourceKind": "table", + "storage": "native" + }, + { + "id": "manualTableId", + "type": "short-input", + "title": "Table ID", + "mode": "trigger-advanced", + "canonicalParamId": "tableId", + "surface": "trigger", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "eventType", + "type": "dropdown", + "title": "Event", + "mode": "trigger", + "surface": "trigger", + "required": true, + "defaultValue": "insert", + "options": [ + { + "id": "insert", + "label": "Row Inserted" + }, + { + "id": "update", + "label": "Row Updated" + }, + { + "id": "delete", + "label": "Row Deleted" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "watchColumns", + "type": "dropdown", + "title": "Watch Columns", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": "update" + }, + "required": false, + "options": { + "dynamic": true + }, + "multiple": true, + "selectorKey": "table.columns", + "valueKind": "array", + "storage": "native", + "dependsOn": { + "all": [], + "any": ["tableSelector", "manualTableId"] + } + }, + { + "id": "includeHeaders", + "type": "switch", + "title": "Map Row Values to Headers", + "mode": "trigger", + "surface": "trigger", + "required": false, + "defaultValue": true, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "triggerInstructions", + "type": "text", + "title": "Setup Instructions", + "mode": "trigger", + "surface": "trigger", + "defaultValue": "
1. Select the table to monitor
2. Choose whether to trigger on row inserts, updates, or deletes
3. For updates, optionally select specific columns to watch
4. The workflow will trigger automatically when the event occurs
", + "valueKind": "none", + "storage": "native" + } + ], + "tools": { + "access": [ + "table_insert_row", + "table_batch_insert_rows", + "table_upsert_row", + "table_update_row", + "table_update_rows_by_filter", + "table_delete_row", + "table_delete_rows_by_filter", + "table_query_rows_v2", + "table_get_row", + "table_get_schema" + ], + "selector": "operation" + }, + "inputs": { + "operation": { + "type": "string" + }, + "tableId": { + "type": "string" + }, + "data": { + "type": "json" + }, + "rows": { + "type": "array" + }, + "rowId": { + "type": "string" + }, + "outputColumns": { + "type": "array" + }, + "filterInput": { + "type": "json" + }, + "sortInput": { + "type": "json" + }, + "limit": { + "type": "number" + }, + "cursor": { + "type": "string" + }, + "conflictColumn": { + "type": "string" + } + }, + "outputs": { + "success": { + "type": "boolean", + "description": "Operation success status" + }, + "row": { + "type": "json", + "description": "Single row data", + "condition": { + "field": "operation", + "value": ["get_row", "insert_row", "upsert_row", "update_row"] + } + }, + "operation": { + "type": "string", + "description": "Operation performed (insert or update)", + "condition": { + "field": "operation", + "value": "upsert_row" + } + }, + "rows": { + "type": "array", + "description": "Array of rows", + "condition": { + "field": "operation", + "value": ["query_rows", "batch_insert_rows"] + } + }, + "rowCount": { + "type": "number", + "description": "Rows returned (query) or total rows in the table (get schema)", + "condition": { + "field": "operation", + "value": ["query_rows", "get_schema"] + } + }, + "totalCount": { + "type": "number", + "description": "Total rows matching the predicate (first page only)", + "condition": { + "field": "operation", + "value": "query_rows" + } + }, + "nextCursor": { + "type": "string", + "description": "Cursor to fetch the next page, or null on the last page", + "condition": { + "field": "operation", + "value": "query_rows" + } + }, + "insertedCount": { + "type": "number", + "description": "Number of rows inserted", + "condition": { + "field": "operation", + "value": "batch_insert_rows" + } + }, + "updatedCount": { + "type": "number", + "description": "Number of rows updated", + "condition": { + "field": "operation", + "value": "update_rows_by_filter" + } + }, + "updatedRowIds": { + "type": "array", + "description": "IDs of updated rows", + "condition": { + "field": "operation", + "value": "update_rows_by_filter" + } + }, + "deletedCount": { + "type": "number", + "description": "Number of rows deleted", + "condition": { + "field": "operation", + "value": ["delete_row", "delete_rows_by_filter"] + } + }, + "deletedRowIds": { + "type": "array", + "description": "IDs of deleted rows", + "condition": { + "field": "operation", + "value": "delete_rows_by_filter" + } + }, + "name": { + "type": "string", + "description": "Table name", + "condition": { + "field": "operation", + "value": "get_schema" + } + }, + "columns": { + "type": "array", + "description": "Column definitions (each includes its stable id)", + "condition": { + "field": "operation", + "value": "get_schema" + } + }, + "columnCount": { + "type": "number", + "description": "Number of columns", + "condition": { + "field": "operation", + "value": "get_schema" + } + }, + "maxRows": { + "type": "number", + "description": "Max rows per table for the workspace's plan", + "condition": { + "field": "operation", + "value": "get_schema" + } + }, + "message": { + "type": "string", + "description": "Operation status message" + } + }, + "dynamicOutputs": { + "source": "tableRows", + "param": "tableId" + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false + }, + "description": "User-defined data tables" + }, + "knowledge": { + "type": "knowledge", + "name": "Knowledge", + "category": "blocks", + "subBlocks": [ + { + "id": "operation", + "type": "dropdown", + "title": "Operation", + "valueDefault": { + "constant": "search" + }, + "options": [ + { + "id": "search", + "label": "Search" + }, + { + "id": "list_documents", + "label": "List Documents" + }, + { + "id": "get_document", + "label": "Get Document" + }, + { + "id": "create_document", + "label": "Create Document" + }, + { + "id": "upsert_document", + "label": "Upsert Document" + }, + { + "id": "delete_document", + "label": "Delete Document" + }, + { + "id": "list_chunks", + "label": "List Chunks" + }, + { + "id": "upload_chunk", + "label": "Upload Chunk" + }, + { + "id": "update_chunk", + "label": "Update Chunk" + }, + { + "id": "delete_chunk", + "label": "Delete Chunk" + }, + { + "id": "list_tags", + "label": "List Tags" + }, + { + "id": "list_connectors", + "label": "List Connectors" + }, + { + "id": "get_connector", + "label": "Get Connector" + }, + { + "id": "trigger_sync", + "label": "Trigger Sync" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "knowledgeBaseSelector", + "type": "knowledge-base-selector", + "title": "Knowledge Base", + "mode": "basic", + "canonicalParamId": "knowledgeBaseId", + "required": true, + "multiple": false, + "valueKind": "resource", + "resourceKind": "knowledge-base", + "storage": "native" + }, + { + "id": "manualKnowledgeBaseId", + "type": "short-input", + "title": "Knowledge Base ID", + "mode": "advanced", + "canonicalParamId": "knowledgeBaseId", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "query", + "type": "short-input", + "title": "Search Query", + "condition": { + "field": "operation", + "value": "search" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "topK", + "type": "short-input", + "title": "Number of Results", + "condition": { + "field": "operation", + "value": "search" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "tagFilters", + "type": "knowledge-tag-filters", + "title": "Tag Filters", + "condition": { + "field": "operation", + "value": "search" + }, + "valueKind": "array", + "storage": "native", + "dependsOn": { + "all": ["knowledgeBaseSelector"], + "any": [] + } + }, + { + "id": "searchMode", + "type": "dropdown", + "title": "Retrieval Mode", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "search" + }, + "valueDefault": { + "constant": "auto" + }, + "options": [ + { + "id": "auto", + "label": "Automatic" + }, + { + "id": "hybrid", + "label": "Hybrid (full-text + vector)" + }, + { + "id": "vector", + "label": "Vector only" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "rerankerEnabled", + "type": "switch", + "title": "Rerank Results", + "condition": { + "field": "operation", + "value": "search" + }, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "rerankerModel", + "type": "dropdown", + "title": "Rerank Model", + "condition": { + "field": "operation", + "value": "search", + "and": { + "field": "rerankerEnabled", + "value": true + } + }, + "valueDefault": { + "constant": "rerank-v4.0-fast" + }, + "options": [ + { + "id": "rerank-v4.0-pro", + "label": "rerank-v4.0-pro" + }, + { + "id": "rerank-v4.0-fast", + "label": "rerank-v4.0-fast" + }, + { + "id": "rerank-v3.5", + "label": "rerank-v3.5" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "rerankerInputCount", + "type": "short-input", + "title": "Documents Sent to Reranker", + "mode": "advanced", + "condition": { + "field": "operation", + "value": "search", + "and": { + "field": "rerankerEnabled", + "value": true + } + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "apiKey", + "type": "short-input", + "title": "Cohere API Key", + "condition": { + "opaque": true + }, + "required": true, + "password": true, + "visibleFor": { + "search": true, + "list_documents": false, + "get_document": false, + "create_document": false, + "upsert_document": false, + "delete_document": false, + "list_chunks": false, + "upload_chunk": false, + "update_chunk": false, + "delete_chunk": false, + "list_tags": false, + "list_connectors": false, + "get_connector": false, + "trigger_sync": false + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "search", + "type": "short-input", + "title": "Search", + "condition": { + "field": "operation", + "value": "list_documents" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "enabledFilter", + "type": "dropdown", + "title": "Status Filter", + "condition": { + "field": "operation", + "value": "list_documents" + }, + "options": [ + { + "id": "all", + "label": "All" + }, + { + "id": "enabled", + "label": "Enabled" + }, + { + "id": "disabled", + "label": "Disabled" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "limit", + "type": "short-input", + "title": "Limit", + "condition": { + "field": "operation", + "value": ["list_documents", "list_chunks"] + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "offset", + "type": "short-input", + "title": "Offset", + "condition": { + "field": "operation", + "value": ["list_documents", "list_chunks"] + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "documentSelector", + "type": "document-selector", + "title": "Document", + "mode": "basic", + "canonicalParamId": "documentId", + "condition": { + "field": "operation", + "value": [ + "get_document", + "upload_chunk", + "delete_document", + "list_chunks", + "update_chunk", + "delete_chunk" + ] + }, + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "knowledge.documents", + "serviceId": "knowledge", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["knowledgeBaseSelector"], + "any": [] + } + }, + { + "id": "documentId", + "type": "short-input", + "title": "Document ID", + "mode": "advanced", + "canonicalParamId": "documentId", + "condition": { + "field": "operation", + "value": [ + "get_document", + "upload_chunk", + "delete_document", + "list_chunks", + "update_chunk", + "delete_chunk" + ] + }, + "required": true, + "valueKind": "string", + "storage": "native", + "dependsOn": { + "all": ["knowledgeBaseId"], + "any": [] + } + }, + { + "id": "content", + "type": "long-input", + "title": "Chunk Content", + "condition": { + "field": "operation", + "value": "upload_chunk" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "name", + "type": "short-input", + "title": "Document Name", + "condition": { + "field": "operation", + "value": ["create_document", "upsert_document"] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "content", + "type": "long-input", + "title": "Document Content", + "condition": { + "field": "operation", + "value": ["create_document", "upsert_document"] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "upsertDocumentId", + "type": "short-input", + "title": "Document ID (Optional)", + "condition": { + "field": "operation", + "value": "upsert_document" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "documentTags", + "type": "document-tag-entry", + "title": "Document Tags", + "condition": { + "field": "operation", + "value": ["create_document", "upsert_document"] + }, + "valueKind": "array", + "storage": "native", + "dependsOn": { + "all": ["knowledgeBaseSelector"], + "any": [] + } + }, + { + "id": "chunkId", + "type": "short-input", + "title": "Chunk ID", + "condition": { + "field": "operation", + "value": ["update_chunk", "delete_chunk"] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "content", + "type": "long-input", + "title": "New Content", + "condition": { + "field": "operation", + "value": "update_chunk" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "enabled", + "type": "dropdown", + "title": "Enabled", + "condition": { + "field": "operation", + "value": "update_chunk" + }, + "options": [ + { + "id": "true", + "label": "Yes" + }, + { + "id": "false", + "label": "No" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "connectorId", + "type": "short-input", + "title": "Connector ID", + "condition": { + "field": "operation", + "value": ["get_connector", "trigger_sync"] + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "chunkSearch", + "type": "short-input", + "title": "Search", + "condition": { + "field": "operation", + "value": "list_chunks" + }, + "valueKind": "string", + "storage": "native" + }, + { + "id": "chunkEnabledFilter", + "type": "dropdown", + "title": "Status Filter", + "condition": { + "field": "operation", + "value": "list_chunks" + }, + "options": [ + { + "id": "all", + "label": "All" + }, + { + "id": "true", + "label": "Enabled" + }, + { + "id": "false", + "label": "Disabled" + } + ], + "valueKind": "string", + "storage": "native" + } + ], + "tools": { + "access": [ + "knowledge_search", + "knowledge_upload_chunk", + "knowledge_create_document", + "knowledge_upsert_document", + "knowledge_list_tags", + "knowledge_list_documents", + "knowledge_get_document", + "knowledge_delete_document", + "knowledge_list_chunks", + "knowledge_update_chunk", + "knowledge_delete_chunk", + "knowledge_list_connectors", + "knowledge_get_connector", + "knowledge_trigger_sync" + ], + "selector": "operation" + }, + "inputs": { + "operation": { + "type": "string" + }, + "knowledgeBaseId": { + "type": "string" + }, + "query": { + "type": "string" + }, + "topK": { + "type": "number" + }, + "documentId": { + "type": "string" + }, + "chunkId": { + "type": "string" + }, + "content": { + "type": "string" + }, + "name": { + "type": "string" + }, + "search": { + "type": "string" + }, + "enabledFilter": { + "type": "string" + }, + "enabled": { + "type": "string" + }, + "limit": { + "type": "number" + }, + "offset": { + "type": "number" + }, + "tagFilters": { + "type": "string" + }, + "searchMode": { + "type": "string" + }, + "rerankerEnabled": { + "type": "boolean" + }, + "rerankerModel": { + "type": "string" + }, + "rerankerInputCount": { + "type": "number" + }, + "apiKey": { + "type": "string" + }, + "documentTags": { + "type": "string" + }, + "chunkSearch": { + "type": "string" + }, + "chunkEnabledFilter": { + "type": "string" + }, + "upsertDocumentId": { + "type": "string" + }, + "connectorId": { + "type": "string" + } + }, + "outputs": { + "results": { + "type": "json", + "description": "Search results" + }, + "query": { + "type": "string", + "description": "Query used" + }, + "totalResults": { + "type": "number", + "description": "Total results count" + }, + "cost": { + "type": "json", + "description": "Search cost breakdown: input, output, and total USD for the query embedding, plus rerankerCost, rerankerModel, and rerankerSearchUnits when a reranker ran. Absent when the search was not billed (e.g. tag-only search or BYOK)." + }, + "tokens": { + "type": "json", + "description": "Token usage of the query embedding: prompt, completion, and total. Present with cost." + }, + "model": { + "type": "string", + "description": "Embedding model that scored the query. Present with cost." + } + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false + }, + "description": "Search knowledge bases and manage documents and chunks" + }, + "start_trigger": { + "type": "start_trigger", + "name": "Start", + "category": "triggers", + "triggerAllowed": true, + "triggers": { + "enabled": true, + "available": ["chat", "manual", "api"] + }, + "subBlocks": [ + { + "id": "inputFormat", + "type": "input-format", + "title": "Inputs", + "valueKind": "array", + "storage": "json-string", + "structured": "inputFormat" + }, + { + "id": "runMetadata", + "type": "switch", + "title": "Add run metadata", + "mode": "advanced", + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + } + ], + "tools": { + "access": [], + "selector": "single" + }, + "inputs": {}, + "outputs": {}, + "dynamicOutputs": { + "source": "inputFormat", + "param": "inputFormat" + }, + "graph": { + "canBeTarget": false, + "errorPort": false, + "container": null, + "annotationOnly": false + }, + "description": "Unified workflow entry point for chat, manual and API runs" + }, + "schedule": { + "type": "schedule", + "name": "Schedule", + "category": "triggers", + "triggerAllowed": true, + "subBlocks": [ + { + "id": "scheduleType", + "type": "dropdown", + "title": "Run frequency", + "mode": "trigger", + "surface": "trigger", + "required": true, + "valueDefault": { + "constant": "daily" + }, + "options": [ + { + "id": "minutes", + "label": "Every X Minutes" + }, + { + "id": "hourly", + "label": "Hourly" + }, + { + "id": "daily", + "label": "Daily" + }, + { + "id": "weekly", + "label": "Weekly" + }, + { + "id": "monthly", + "label": "Monthly" + }, + { + "id": "custom", + "label": "Custom (Cron)" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "minutesInterval", + "type": "short-input", + "title": "Interval (minutes)", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "scheduleType", + "value": "minutes" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "hourlyMinute", + "type": "short-input", + "title": "Minute", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "scheduleType", + "value": "hourly" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "dailyTime", + "type": "time-input", + "title": "Time", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "scheduleType", + "value": "daily" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "weeklyDay", + "type": "dropdown", + "title": "Day of week", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "scheduleType", + "value": "weekly" + }, + "required": true, + "options": [ + { + "id": "MON", + "label": "Monday" + }, + { + "id": "TUE", + "label": "Tuesday" + }, + { + "id": "WED", + "label": "Wednesday" + }, + { + "id": "THU", + "label": "Thursday" + }, + { + "id": "FRI", + "label": "Friday" + }, + { + "id": "SAT", + "label": "Saturday" + }, + { + "id": "SUN", + "label": "Sunday" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "weeklyDayTime", + "type": "time-input", + "title": "Time", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "scheduleType", + "value": "weekly" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "monthlyDay", + "type": "short-input", + "title": "Day of month", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "scheduleType", + "value": "monthly" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "monthlyTime", + "type": "time-input", + "title": "Time", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "scheduleType", + "value": "monthly" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "cronExpression", + "type": "short-input", + "title": "Cron expression", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "scheduleType", + "value": "custom" + }, + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "timezone", + "type": "dropdown", + "title": "Timezone", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "scheduleType", + "value": ["minutes", "hourly"], + "not": true + }, + "required": false, + "valueDefault": { + "constant": "America/Los_Angeles" + }, + "options": [ + { + "id": "UTC", + "label": "UTC" + }, + { + "id": "America/Los_Angeles", + "label": "US Pacific (UTC-8)" + }, + { + "id": "America/Denver", + "label": "US Mountain (UTC-7)" + }, + { + "id": "America/Chicago", + "label": "US Central (UTC-6)" + }, + { + "id": "America/New_York", + "label": "US Eastern (UTC-5)" + }, + { + "id": "America/Anchorage", + "label": "US Alaska (UTC-9)" + }, + { + "id": "Pacific/Honolulu", + "label": "US Hawaii (UTC-10)" + }, + { + "id": "America/Toronto", + "label": "Canada Toronto (UTC-5)" + }, + { + "id": "America/Vancouver", + "label": "Canada Vancouver (UTC-8)" + }, + { + "id": "America/Mexico_City", + "label": "Mexico City (UTC-6)" + }, + { + "id": "America/Sao_Paulo", + "label": "São Paulo (UTC-3)" + }, + { + "id": "America/Argentina/Buenos_Aires", + "label": "Buenos Aires (UTC-3)" + }, + { + "id": "Europe/London", + "label": "London (UTC+0)" + }, + { + "id": "Europe/Paris", + "label": "Paris (UTC+1)" + }, + { + "id": "Europe/Berlin", + "label": "Berlin (UTC+1)" + }, + { + "id": "Europe/Amsterdam", + "label": "Amsterdam (UTC+1)" + }, + { + "id": "Europe/Madrid", + "label": "Madrid (UTC+1)" + }, + { + "id": "Europe/Rome", + "label": "Rome (UTC+1)" + }, + { + "id": "Europe/Moscow", + "label": "Moscow (UTC+3)" + }, + { + "id": "Asia/Dubai", + "label": "Dubai (UTC+4)" + }, + { + "id": "Asia/Tel_Aviv", + "label": "Tel Aviv (UTC+2)" + }, + { + "id": "Africa/Cairo", + "label": "Cairo (UTC+2)" + }, + { + "id": "Africa/Johannesburg", + "label": "Johannesburg (UTC+2)" + }, + { + "id": "Asia/Kolkata", + "label": "India (UTC+5:30)" + }, + { + "id": "Asia/Bangkok", + "label": "Bangkok (UTC+7)" + }, + { + "id": "Asia/Jakarta", + "label": "Jakarta (UTC+7)" + }, + { + "id": "Asia/Singapore", + "label": "Singapore (UTC+8)" + }, + { + "id": "Asia/Shanghai", + "label": "China (UTC+8)" + }, + { + "id": "Asia/Hong_Kong", + "label": "Hong Kong (UTC+8)" + }, + { + "id": "Asia/Seoul", + "label": "Seoul (UTC+9)" + }, + { + "id": "Asia/Tokyo", + "label": "Tokyo (UTC+9)" + }, + { + "id": "Australia/Perth", + "label": "Perth (UTC+8)" + }, + { + "id": "Australia/Sydney", + "label": "Sydney (UTC+10)" + }, + { + "id": "Australia/Melbourne", + "label": "Melbourne (UTC+10)" + }, + { + "id": "Pacific/Auckland", + "label": "Auckland (UTC+12)" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "scheduleInfo", + "type": "schedule-info", + "mode": "trigger", + "surface": "trigger", + "valueKind": "none", + "storage": "native" + } + ], + "tools": { + "access": [], + "selector": "single" + }, + "inputs": {}, + "outputs": {}, + "graph": { + "canBeTarget": false, + "errorPort": false, + "container": null, + "annotationOnly": false + }, + "description": "Trigger workflow execution on a schedule" + }, + "generic_webhook": { + "type": "generic_webhook", + "name": "Webhook Trigger", + "category": "triggers", + "triggerAllowed": true, + "triggers": { + "enabled": true, + "available": ["generic_webhook"] + }, + "subBlocks": [ + { + "id": "webhookUrlDisplay", + "type": "short-input", + "title": "Webhook URL", + "mode": "trigger", + "surface": "trigger", + "readOnly": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "requireAuth", + "type": "switch", + "title": "Require Authentication", + "mode": "trigger", + "surface": "trigger", + "defaultValue": true, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "token", + "type": "short-input", + "title": "Authentication Token", + "mode": "trigger", + "surface": "trigger", + "required": false, + "valueDefault": { + "constant": "e9a80462-af3e-4ad8-aa58-bc3a100d7df4" + }, + "password": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "secretHeaderName", + "type": "short-input", + "title": "Secret Header Name (Optional)", + "mode": "trigger", + "surface": "trigger", + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "acceptOtherMethods", + "type": "switch", + "title": "Accept Other HTTP Methods", + "mode": "trigger", + "surface": "trigger", + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "exposeRequestHeaders", + "type": "switch", + "title": "Expose Request Headers", + "mode": "trigger", + "surface": "trigger", + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "idempotencyField", + "type": "short-input", + "title": "Deduplication Field (Optional)", + "mode": "trigger", + "surface": "trigger", + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "responseMode", + "type": "dropdown", + "title": "Acknowledgement", + "mode": "trigger", + "surface": "trigger", + "defaultValue": "default", + "options": [ + { + "id": "default", + "label": "Default" + }, + { + "id": "custom", + "label": "Custom" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "verifyTestEvents", + "type": "switch", + "title": "Verify Test Events", + "mode": "trigger", + "surface": "trigger", + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "responseStatusCode", + "type": "short-input", + "title": "Response Status Code", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "responseMode", + "value": "custom" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "responseBody", + "type": "code", + "title": "Response Body", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "responseMode", + "value": "custom" + }, + "required": false, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "inputFormat", + "type": "input-format", + "title": "Input Format", + "mode": "trigger", + "surface": "trigger", + "valueKind": "array", + "storage": "json-string", + "structured": "inputFormat" + }, + { + "id": "triggerInstructions", + "type": "text", + "title": "Setup Instructions", + "mode": "trigger", + "surface": "trigger", + "defaultValue": "
1. Copy the webhook URL and use it in your external service or API.
2. Configure your service to send webhooks to this URL.
3. The webhook accepts POST. Turn on \"Accept Other HTTP Methods\" to also accept GET, PUT, PATCH and DELETE — for example to trigger the workflow from a link in an email.
4. Body fields are available in your workflow, and URL query parameters under \"query\" (for example \"query.id\"). Turn on \"Expose Request Headers\" to also get \"headers\" (for example \"headers.x-event-name\"), and \"Accept Other HTTP Methods\" to also get \"method\".
5. Authentication is header-based, so it cannot be used with a plain link. If authentication is enabled, include the token in the Secret Header Name you configured, or in \"Authorization: Bearer TOKEN\" if you left it blank — only the configured one is accepted, not either.
6. To deduplicate incoming events, set the Deduplication Field to the dot-notation path of a unique identifier in the payload (e.g. \"event.id\"). Duplicate values within 7 days will be skipped.
7. Enable \"Verify Test Events\" only if the sending service needs a temporary 200 response while validating the webhook URL.
", + "valueKind": "none", + "storage": "native" + }, + { + "id": "samplePayload_generic_webhook", + "type": "code", + "title": "Event Payload Example", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "selectedTriggerId", + "value": "generic_webhook" + }, + "defaultValue": "{}", + "readOnly": true, + "language": "json", + "valueKind": "json", + "storage": "native" + } + ], + "tools": { + "access": [], + "selector": "single" + }, + "inputs": {}, + "outputs": {}, + "dynamicOutputs": { + "source": "inputFormat", + "param": "inputFormat" + }, + "graph": { + "canBeTarget": false, + "errorPort": false, + "container": null, + "annotationOnly": false + }, + "description": "Receive webhooks from any service by configuring a custom webhook." + }, + "workflow": { + "type": "workflow", + "name": "Workflow", + "category": "blocks", + "lifecycle": { + "hidden": true + }, + "subBlocks": [ + { + "id": "workflowId", + "type": "workflow-selector", + "title": "Select Workflow", + "mode": "basic", + "canonicalParamId": "workflowId", + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "sim.workflows", + "valueKind": "resource", + "resourceKind": "workflow", + "storage": "native" + }, + { + "id": "manualWorkflowId", + "type": "short-input", + "title": "Workflow ID", + "mode": "advanced", + "canonicalParamId": "workflowId", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "input", + "type": "short-input", + "title": "Input Variable", + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "inputMapping", + "type": "workflow-input-mapper", + "title": "Workflow Inputs", + "condition": { + "field": "workflowId", + "value": "", + "not": true + }, + "required": false, + "valueKind": "object", + "storage": "native", + "dependsOn": { + "all": ["workflowId"], + "any": [] + } + } + ], + "tools": { + "access": ["workflow_executor"], + "selector": "single" + }, + "inputs": { + "workflowId": { + "type": "string" + }, + "input": { + "type": "string" + } + }, + "outputs": { + "success": { + "type": "boolean", + "description": "Execution success status" + }, + "childWorkflowName": { + "type": "string", + "description": "Child workflow name" + }, + "childWorkflowId": { + "type": "string", + "description": "Child workflow ID" + }, + "result": { + "type": "json", + "description": "Workflow execution result" + }, + "error": { + "type": "string", + "description": "Error message" + }, + "childTraceSpans": { + "type": "json", + "description": "Child workflow trace spans", + "hiddenFromDisplay": true + } + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false + }, + "description": "This is a core workflow block. Execute another workflow as a block in your workflow. Enter the input variable to pass to the child workflow." + }, + "response": { + "type": "response", + "name": "Response", + "category": "blocks", + "subBlocks": [ + { + "id": "dataMode", + "type": "dropdown", + "title": "Response Data Mode", + "valueDefault": { + "constant": "structured" + }, + "options": [ + { + "id": "structured", + "label": "Builder" + }, + { + "id": "json", + "label": "Editor" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "builderData", + "type": "response-format", + "title": "Response Structure", + "condition": { + "field": "dataMode", + "value": "structured" + }, + "valueKind": "object", + "storage": "native" + }, + { + "id": "data", + "type": "code", + "title": "Response Data", + "condition": { + "field": "dataMode", + "value": "json" + }, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "status", + "type": "short-input", + "title": "Status Code", + "valueKind": "string", + "storage": "native" + }, + { + "id": "headers", + "type": "table", + "title": "Response Headers", + "columns": ["Key", "Value"], + "valueKind": "array", + "storage": "json-string", + "structured": "tableRows" + } + ], + "tools": { + "access": [], + "selector": "single" + }, + "inputs": { + "dataMode": { + "type": "string" + }, + "builderData": { + "type": "json" + }, + "data": { + "type": "json" + }, + "status": { + "type": "number" + }, + "headers": { + "type": "json" + } + }, + "outputs": { + "data": { + "type": "json", + "description": "Response data" + }, + "status": { + "type": "number", + "description": "HTTP status code" + }, + "headers": { + "type": "json", + "description": "Response headers" + } + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false + }, + "description": "Send structured API response" + }, + "human_in_the_loop": { + "type": "human_in_the_loop", + "name": "Human", + "category": "blocks", + "lifecycle": { + "hidden": true + }, + "subBlocks": [ + { + "id": "builderData", + "type": "response-format", + "title": "Display Data", + "valueKind": "object", + "storage": "native" + }, + { + "id": "notification", + "type": "tool-input", + "title": "Notification (Send URL)", + "defaultValue": [], + "valueKind": "tools", + "storage": "json-string", + "structured": "tools" + }, + { + "id": "inputFormat", + "type": "input-format", + "title": "Resume Form", + "valueKind": "array", + "storage": "json-string", + "structured": "inputFormat" + } + ], + "tools": { + "access": [], + "selector": "single" + }, + "inputs": { + "operation": { + "type": "string" + }, + "inputFormat": { + "type": "json" + }, + "notification": { + "type": "json" + }, + "dataMode": { + "type": "string" + }, + "builderData": { + "type": "json" + }, + "data": { + "type": "json" + }, + "status": { + "type": "number" + }, + "headers": { + "type": "json" + } + }, + "outputs": { + "url": { + "type": "string", + "description": "Resume UI URL" + }, + "resumeEndpoint": { + "type": "string", + "description": "Resume API endpoint URL for direct curl requests" + }, + "response": { + "type": "json", + "description": "Display data shown to the approver", + "hiddenFromDisplay": true + }, + "submission": { + "type": "json", + "description": "Form submission data from the approver", + "hiddenFromDisplay": true + }, + "resumeInput": { + "type": "json", + "description": "Raw input data submitted when resuming", + "hiddenFromDisplay": true + }, + "submittedAt": { + "type": "string", + "description": "ISO timestamp when the workflow was resumed" + } + }, + "dynamicOutputs": { + "source": "humanForm", + "param": "inputFormat" + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false + }, + "description": "Pause workflow execution and wait for human input" + }, + "note": { + "type": "note", + "name": "Note", + "category": "blocks", + "subBlocks": [ + { + "id": "content", + "type": "long-input", + "valueKind": "string", + "storage": "native" + }, + { + "id": "color", + "type": "short-input", + "defaultValue": "carbon", + "hidden": true, + "valueKind": "string", + "storage": "native" + } + ], + "tools": { + "access": [], + "selector": "single" + }, + "inputs": { + "content": { + "type": "string" + } + }, + "outputs": {}, + "graph": { + "canBeTarget": true, + "errorPort": false, + "container": null, + "annotationOnly": true + }, + "description": "Add contextual annotations directly onto the workflow canvas." + }, + "variables": { + "type": "variables", + "name": "Variables", + "category": "blocks", + "subBlocks": [ + { + "id": "variables", + "type": "variables-input", + "title": "Variable Assignments", + "required": false, + "valueKind": "array", + "storage": "json-string", + "structured": "variables" + } + ], + "tools": { + "access": [], + "selector": "single" + }, + "inputs": { + "variables": { + "type": "json" + } + }, + "outputs": {}, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false + }, + "description": "Set workflow-scoped variables" + } + }, + "triggers": { + "slack_oauth": { + "id": "slack_oauth", + "provider": "slack_app", + "name": "Slack", + "webhook": true, + "subBlocks": [ + { + "id": "eventType", + "type": "dropdown", + "title": "Event", + "mode": "trigger", + "surface": "trigger", + "required": true, + "options": [ + { + "id": "message", + "label": "Message" + }, + { + "id": "app_mention", + "label": "App mentioned" + }, + { + "id": "reaction_added", + "label": "Reaction added" + }, + { + "id": "reaction_removed", + "label": "Reaction removed" + }, + { + "id": "message_edited", + "label": "Message edited" + }, + { + "id": "message_deleted", + "label": "Message deleted" + }, + { + "id": "file_shared", + "label": "File shared" + }, + { + "id": "member_joined_channel", + "label": "Member joined channel" + }, + { + "id": "member_left_channel", + "label": "Member left channel" + }, + { + "id": "channel_created", + "label": "Channel created" + }, + { + "id": "channel_archive", + "label": "Channel archived" + }, + { + "id": "channel_rename", + "label": "Channel renamed" + }, + { + "id": "pin_added", + "label": "Pin added" + }, + { + "id": "pin_removed", + "label": "Pin removed" + }, + { + "id": "team_join", + "label": "Member joined workspace" + }, + { + "id": "app_home_opened", + "label": "App home opened" + }, + { + "id": "agent_session_stopped", + "label": "Agent session stopped" + }, + { + "id": "agent_session_title_changed", + "label": "Agent session title changed" + }, + { + "id": "app_context_changed", + "label": "Agent context changed" + }, + { + "id": "assistant_thread_started", + "label": "Assistant opened" + }, + { + "id": "assistant_thread_context_changed", + "label": "Assistant context changed" + }, + { + "id": "block_actions", + "label": "Button / select clicked" + }, + { + "id": "view_submission", + "label": "Modal submitted" + }, + { + "id": "slash_command", + "label": "Slash command" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "customBotCredential", + "type": "oauth-input", + "title": "Custom Bot", + "mode": "trigger", + "canonicalParamId": "botCredential", + "surface": "trigger", + "required": true, + "serviceId": "slack", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "manualBotCredential", + "type": "short-input", + "title": "Bot Credential ID", + "mode": "trigger-advanced", + "canonicalParamId": "botCredential", + "surface": "trigger", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "source", + "type": "dropdown", + "title": "Source", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["message", "message_edited", "message_deleted"] + }, + "required": false, + "options": [ + { + "id": "im", + "label": "Direct message" + }, + { + "id": "channel", + "label": "Public channel" + }, + { + "id": "group", + "label": "Private channel" + } + ], + "multiple": true, + "valueKind": "array", + "storage": "native" + }, + { + "id": "channelFilter", + "type": "channel-selector", + "title": "Channels", + "mode": "trigger", + "canonicalParamId": "channelFilter", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": [ + "message", + "app_mention", + "reaction_added", + "reaction_removed", + "message_edited", + "message_deleted", + "file_shared", + "member_joined_channel", + "member_left_channel", + "channel_archive", + "channel_rename", + "pin_added", + "pin_removed" + ] + }, + "required": false, + "options": { + "dynamic": true + }, + "multiple": true, + "selectorKey": "slack.channels", + "serviceId": "slack", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["customBotCredential"], + "any": [] + } + }, + { + "id": "manualChannelFilter", + "type": "short-input", + "title": "Channel IDs", + "mode": "trigger-advanced", + "canonicalParamId": "channelFilter", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": [ + "message", + "app_mention", + "reaction_added", + "reaction_removed", + "message_edited", + "message_deleted", + "file_shared", + "member_joined_channel", + "member_left_channel", + "channel_archive", + "channel_rename", + "pin_added", + "pin_removed" + ] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "threads", + "type": "dropdown", + "title": "Threads", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["message", "app_mention"] + }, + "required": false, + "valueDefault": { + "constant": "include" + }, + "options": [ + { + "id": "include", + "label": "Messages and replies" + }, + { + "id": "exclude", + "label": "Messages only (no replies)" + }, + { + "id": "only", + "label": "Replies only" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "streamResponse", + "type": "switch", + "title": "Enable agent session", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["message", "app_mention"] + }, + "required": false, + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "streamOutputs", + "type": "workflow-output-selector", + "title": "Outputs to stream", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "streamResponse", + "value": true, + "and": { + "field": "eventType", + "value": ["message", "app_mention"] + } + }, + "required": { + "field": "streamResponse", + "value": true, + "and": { + "field": "eventType", + "value": ["message", "app_mention"] + } + }, + "valueKind": "none", + "storage": "native" + }, + { + "id": "streamTaskTitle", + "type": "short-input", + "title": "Response status label", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "streamResponse", + "value": true, + "and": { + "field": "eventType", + "value": ["message", "app_mention"] + } + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "streamTaskDisplayMode", + "type": "dropdown", + "title": "Task display", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "streamResponse", + "value": true, + "and": { + "field": "eventType", + "value": ["message", "app_mention"] + } + }, + "required": false, + "valueDefault": { + "constant": "timeline" + }, + "options": [ + { + "id": "timeline", + "label": "Timeline" + }, + { + "id": "plan", + "label": "Plan" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "streamIncludeThinking", + "type": "switch", + "title": "Include thinking updates", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "streamResponse", + "value": true, + "and": { + "field": "eventType", + "value": ["message", "app_mention"] + } + }, + "required": false, + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "streamIncludeToolCalls", + "type": "switch", + "title": "Include tool calls", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "streamResponse", + "value": true, + "and": { + "field": "eventType", + "value": ["message", "app_mention"] + } + }, + "required": false, + "defaultValue": true, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "emoji", + "type": "short-input", + "title": "Emoji", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["reaction_added", "reaction_removed"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "nameContains", + "type": "short-input", + "title": "Name contains", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["channel_created"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "interactionFilter", + "type": "short-input", + "title": "Action / Callback ID", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["block_actions", "view_submission"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "commandFilter", + "type": "short-input", + "title": "Command", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["slash_command"] + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "filterBotMessages", + "type": "switch", + "title": "Ignore bot messages", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["message", "app_mention"] + }, + "required": false, + "defaultValue": true, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "includeOwnMessages", + "type": "switch", + "title": "Include own bot messages", + "mode": "trigger-advanced", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": ["message", "app_mention", "reaction_added", "reaction_removed"] + }, + "required": false, + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "includeFiles", + "type": "switch", + "title": "Include file attachments", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": "message" + }, + "required": false, + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "samplePayload_slack_oauth", + "type": "code", + "title": "Event Payload Example", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "selectedTriggerId", + "value": "slack_oauth" + }, + "defaultValue": "{\n \"event\": {\n \"event_type\": \"mock_event_type\",\n \"subtype\": \"mock_subtype\",\n \"channel\": \"mock_channel\",\n \"channel_name\": \"mock_channel_name\",\n \"channel_type\": \"mock_channel_type\",\n \"user\": \"mock_user\",\n \"user_name\": \"mock_user_name\",\n \"bot_id\": \"mock_bot_id\",\n \"text\": \"mock_text\",\n \"timestamp\": \"mock_timestamp\",\n \"thread_ts\": \"mock_thread_ts\",\n \"streaming_message_ts\": [\n \"mock_streaming_message_ts_item\"\n ],\n \"title\": \"mock_title\",\n \"previous_title\": \"mock_previous_title\",\n \"tab\": \"mock_tab\",\n \"context\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"team_id\": \"mock_team_id\",\n \"user_team_id\": \"mock_user_team_id\",\n \"enterprise_id\": \"mock_enterprise_id\",\n \"event_id\": \"mock_event_id\",\n \"reaction\": \"mock_reaction\",\n \"item_user\": \"mock_item_user\",\n \"command\": \"mock_command\",\n \"action_id\": \"mock_action_id\",\n \"action_value\": \"mock_action_value\",\n \"actions\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"response_url\": \"mock_response_url\",\n \"trigger_id\": \"mock_trigger_id\",\n \"callback_id\": \"mock_callback_id\",\n \"api_app_id\": \"mock_api_app_id\",\n \"app_id\": \"mock_app_id\",\n \"message_ts\": \"mock_message_ts\",\n \"view\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"message\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"state\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"hasFiles\": true,\n \"files\": null\n }\n}", + "readOnly": true, + "language": "json", + "valueKind": "json", + "storage": "native" + } + ], + "outputs": { + "event": { + "type": "object", + "description": "Slack event data", + "properties": { + "event_type": { + "type": "string", + "description": "Type of Slack payload: an Events API event (e.g., app_mention, message), an interactivity type (e.g., block_actions), or \"slash_command\" for slash commands" + }, + "subtype": { + "type": "string", + "description": "Message subtype (e.g., channel_join, channel_leave, bot_message, file_share). Null for regular user messages" + }, + "channel": { + "type": "string", + "description": "Slack channel ID where the event occurred" + }, + "channel_name": { + "type": "string", + "description": "Human-readable channel name" + }, + "channel_type": { + "type": "string", + "description": "Type of channel (e.g., channel, group, im, mpim). Useful for distinguishing DMs from public channels" + }, + "user": { + "type": "string", + "description": "User ID who triggered the event" + }, + "user_name": { + "type": "string", + "description": "Username who triggered the event" + }, + "bot_id": { + "type": "string", + "description": "Bot ID if the message was sent by a bot. Null for human users" + }, + "text": { + "type": "string", + "description": "Message text content. For slash commands, the text after the command. For interactivity, the source message text (falls back to the triggering action value)" + }, + "timestamp": { + "type": "string", + "description": "Message timestamp from the triggering event" + }, + "thread_ts": { + "type": "string", + "description": "Parent thread timestamp (if message is in a thread)" + }, + "streaming_message_ts": { + "type": "array", + "description": "Message timestamps streamed during a stopped agent session", + "items": { + "type": "string", + "description": "Streaming message timestamp" + } + }, + "title": { + "type": "string", + "description": "Current agent session title" + }, + "previous_title": { + "type": "string", + "description": "Previous agent session title" + }, + "tab": { + "type": "string", + "description": "App Home tab that was opened, including messages for Agent View" + }, + "context": { + "type": "json", + "description": "Current Agent View context. Normalized from context on app_context_changed/app_home_opened or app_context on message.im" + }, + "team_id": { + "type": "string", + "description": "Slack workspace/team ID" + }, + "user_team_id": { + "type": "string", + "description": "Slack workspace/team ID of the user who triggered the event. Used for Slack Connect response streaming." + }, + "enterprise_id": { + "type": "string", + "description": "Slack Enterprise Grid organization ID" + }, + "event_id": { + "type": "string", + "description": "Unique event identifier" + }, + "reaction": { + "type": "string", + "description": "Emoji reaction name (e.g., thumbsup). Present for reaction_added/reaction_removed events" + }, + "item_user": { + "type": "string", + "description": "User ID of the original message author. Present for reaction_added/reaction_removed events" + }, + "command": { + "type": "string", + "description": "Slash command name including the leading slash (e.g., /deploy). Present for slash commands" + }, + "action_id": { + "type": "string", + "description": "action_id of the first interactive element triggered. Present for block_actions (button/select clicks)" + }, + "action_value": { + "type": "string", + "description": "Value carried by the first interactive element (button value, selected option, date, etc.). Present for block_actions" + }, + "actions": { + "type": "json", + "description": "Full array of interactive actions from the payload, preserving every element and its value. Present for block_actions" + }, + "response_url": { + "type": "string", + "description": "Temporary URL to post a response back to the originating message or command. Present for interactivity and slash commands" + }, + "trigger_id": { + "type": "string", + "description": "Short-lived trigger ID used to open a modal in response. Present for interactivity and slash commands" + }, + "callback_id": { + "type": "string", + "description": "Callback ID of the shortcut or view. Present for shortcuts and modal submissions" + }, + "api_app_id": { + "type": "string", + "description": "Slack app ID. Present for interactivity and slash commands" + }, + "app_id": { + "type": "string", + "description": "App ID of the app that produced the event (e.g. the bot that posted a message). Used to identify the app's own output" + }, + "message_ts": { + "type": "string", + "description": "Timestamp of the message the interaction originated from. Present for block_actions" + }, + "view": { + "type": "json", + "description": "Full Slack view object for modal interactions: state.values (submitted input values), private_metadata, id, callback_id, and hash. Present for view_submission/view_closed; null otherwise" + }, + "message": { + "type": "json", + "description": "Full source message object the interaction came from, including its blocks and text. Present for block_actions on a message; null otherwise" + }, + "state": { + "type": "json", + "description": "Current values of all stateful elements in the surface (state.values) at the time of a block action — e.g. inputs read on a button click. Present for block_actions; null otherwise" + }, + "hasFiles": { + "type": "boolean", + "description": "Whether the message has file attachments" + }, + "files": { + "type": "file[]", + "description": "File attachments downloaded from the message (if includeFiles is enabled and bot token is provided)" + } + } + } + } + }, + "gmail_poller": { + "id": "gmail_poller", + "provider": "gmail", + "name": "Gmail Email Trigger", + "polling": true, + "subBlocks": [ + { + "id": "triggerCredentials", + "type": "oauth-input", + "title": "Credentials", + "mode": "trigger", + "canonicalParamId": "oauthCredential", + "surface": "trigger", + "required": true, + "serviceId": "gmail", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "labelIds", + "type": "dropdown", + "title": "Gmail Labels to Monitor", + "mode": "trigger", + "surface": "trigger", + "required": false, + "options": { + "dynamic": true + }, + "multiple": true, + "selectorKey": "gmail.labels", + "valueKind": "array", + "storage": "native", + "dependsOn": { + "all": ["triggerCredentials"], + "any": [] + } + }, + { + "id": "labelFilterBehavior", + "type": "dropdown", + "title": "Label Filter Behavior", + "mode": "trigger", + "surface": "trigger", + "required": true, + "defaultValue": "INCLUDE", + "options": [ + { + "id": "INCLUDE", + "label": "INCLUDE" + }, + { + "id": "EXCLUDE", + "label": "EXCLUDE" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "searchQuery", + "type": "short-input", + "title": "Gmail Search Query", + "mode": "trigger", + "surface": "trigger", + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "markAsRead", + "type": "switch", + "title": "Mark as Read", + "mode": "trigger", + "surface": "trigger", + "required": false, + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "includeAttachments", + "type": "switch", + "title": "Include Attachments", + "mode": "trigger", + "surface": "trigger", + "required": false, + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "triggerInstructions", + "type": "text", + "title": "Setup Instructions", + "mode": "trigger", + "surface": "trigger", + "defaultValue": "
1. Connect your Gmail account using OAuth credentials
2. Configure which Gmail labels to monitor (optional)
3. The system will automatically check for new emails and trigger your workflow
", + "valueKind": "none", + "storage": "native" + }, + { + "id": "samplePayload_gmail_poller", + "type": "code", + "title": "Event Payload Example", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "selectedTriggerId", + "value": "gmail_poller" + }, + "defaultValue": "{\n \"email\": {\n \"id\": \"mock_id\",\n \"threadId\": \"mock_threadId\",\n \"subject\": \"mock_subject\",\n \"from\": \"mock_from\",\n \"to\": \"mock_to\",\n \"cc\": \"mock_cc\",\n \"bcc\": \"mock_bcc\",\n \"replyTo\": \"mock_replyTo\",\n \"rfcMessageId\": \"mock_rfcMessageId\",\n \"inReplyTo\": \"mock_inReplyTo\",\n \"references\": \"mock_references\",\n \"snippet\": \"mock_snippet\",\n \"date\": \"mock_date\",\n \"bodyText\": \"mock_bodyText\",\n \"bodyHtml\": \"mock_bodyHtml\",\n \"labels\": [\n {\n \"id\": \"item_1\",\n \"name\": \"Sample Item\",\n \"value\": \"Sample Value\"\n }\n ],\n \"hasAttachments\": true,\n \"attachments\": null\n },\n \"timestamp\": \"mock_timestamp\"\n}", + "readOnly": true, + "language": "json", + "valueKind": "json", + "storage": "native" + } + ], + "outputs": { + "email": { + "type": "json", + "properties": { + "id": { + "type": "string", + "description": "Gmail message ID" + }, + "threadId": { + "type": "string", + "description": "Gmail thread ID" + }, + "subject": { + "type": "string", + "description": "Email subject line" + }, + "from": { + "type": "string", + "description": "Sender email address" + }, + "to": { + "type": "string", + "description": "Recipient email address" + }, + "cc": { + "type": "string", + "description": "CC recipients" + }, + "bcc": { + "type": "string", + "description": "BCC recipients (only present on messages you sent)" + }, + "replyTo": { + "type": "string", + "description": "Reply-To header" + }, + "rfcMessageId": { + "type": "string", + "description": "RFC Message-ID header (not the Gmail message ID)" + }, + "inReplyTo": { + "type": "string", + "description": "In-Reply-To header (RFC Message-ID of the parent message)" + }, + "references": { + "type": "string", + "description": "References header (RFC Message-IDs in the thread)" + }, + "snippet": { + "type": "string", + "description": "Short excerpt of the message text" + }, + "date": { + "type": "string", + "description": "Email date in ISO format" + }, + "bodyText": { + "type": "string", + "description": "Plain text email body" + }, + "bodyHtml": { + "type": "string", + "description": "HTML email body" + }, + "labels": { + "type": "array", + "description": "Email labels array" + }, + "hasAttachments": { + "type": "boolean", + "description": "Whether email has attachments" + }, + "attachments": { + "type": "file[]", + "description": "Array of email attachments as files (if includeAttachments is enabled)" + } + } + }, + "timestamp": { + "type": "string", + "description": "Event timestamp" + } + } + }, + "google_sheets_poller": { + "id": "google_sheets_poller", + "provider": "google-sheets", + "name": "Google Sheets New Row Trigger", + "polling": true, + "subBlocks": [ + { + "id": "triggerCredentials", + "type": "oauth-input", + "title": "Credentials", + "mode": "trigger", + "canonicalParamId": "oauthCredential", + "surface": "trigger", + "required": true, + "serviceId": "google-sheets", + "valueKind": "resource", + "resourceKind": "credential", + "storage": "native" + }, + { + "id": "spreadsheetId", + "type": "file-selector", + "title": "Spreadsheet", + "mode": "trigger", + "canonicalParamId": "spreadsheetId", + "surface": "trigger", + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "google.drive", + "serviceId": "google-sheets", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["triggerCredentials"], + "any": [] + } + }, + { + "id": "manualSpreadsheetId", + "type": "short-input", + "title": "Spreadsheet ID", + "mode": "trigger-advanced", + "canonicalParamId": "spreadsheetId", + "surface": "trigger", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "sheetName", + "type": "sheet-selector", + "title": "Sheet Tab", + "mode": "trigger", + "canonicalParamId": "sheetName", + "surface": "trigger", + "required": true, + "options": { + "dynamic": true + }, + "selectorKey": "google.sheets", + "serviceId": "google-sheets", + "valueKind": "picked", + "storage": "native", + "dependsOn": { + "all": ["triggerCredentials"], + "any": ["spreadsheetId", "manualSpreadsheetId"] + } + }, + { + "id": "manualSheetName", + "type": "short-input", + "title": "Sheet Tab Name", + "mode": "trigger-advanced", + "canonicalParamId": "sheetName", + "surface": "trigger", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "valueRenderOption", + "type": "dropdown", + "title": "Value Render", + "mode": "trigger", + "surface": "trigger", + "required": false, + "defaultValue": "FORMATTED_VALUE", + "options": [ + { + "id": "FORMATTED_VALUE", + "label": "Formatted Value" + }, + { + "id": "UNFORMATTED_VALUE", + "label": "Unformatted Value" + }, + { + "id": "FORMULA", + "label": "Formula" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "dateTimeRenderOption", + "type": "dropdown", + "title": "Date/Time Render", + "mode": "trigger", + "surface": "trigger", + "required": false, + "defaultValue": "SERIAL_NUMBER", + "options": [ + { + "id": "SERIAL_NUMBER", + "label": "Serial Number" + }, + { + "id": "FORMATTED_STRING", + "label": "Formatted String" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "triggerInstructions", + "type": "text", + "title": "Setup Instructions", + "mode": "trigger", + "surface": "trigger", + "defaultValue": "
1. Connect your Google account using OAuth credentials
2. Select the spreadsheet to monitor
3. Select the sheet tab to monitor
4. The system will automatically detect new rows appended to the sheet
", + "valueKind": "none", + "storage": "native" + }, + { + "id": "samplePayload_google_sheets_poller", + "type": "code", + "title": "Event Payload Example", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "selectedTriggerId", + "value": "google_sheets_poller" + }, + "defaultValue": "{\n \"row\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"rawRow\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"headers\": {\n \"id\": \"sample_id\",\n \"name\": \"Sample Object\",\n \"status\": \"active\"\n },\n \"rowNumber\": 42,\n \"spreadsheetId\": \"mock_spreadsheetId\",\n \"sheetName\": \"mock_sheetName\",\n \"timestamp\": \"mock_timestamp\"\n}", + "readOnly": true, + "language": "json", + "valueKind": "json", + "storage": "native" + } + ], + "outputs": { + "row": { + "type": "json", + "description": "Row data mapped to column headers from row 1" + }, + "rawRow": { + "type": "json", + "description": "Raw row values as an array" + }, + "headers": { + "type": "json", + "description": "Column headers from row 1" + }, + "rowNumber": { + "type": "number", + "description": "The 1-based row number of the new row" + }, + "spreadsheetId": { + "type": "string", + "description": "The spreadsheet ID" + }, + "sheetName": { + "type": "string", + "description": "The sheet tab name" + }, + "timestamp": { + "type": "string", + "description": "Event timestamp in ISO format" + } + } + }, + "table_new_row": { + "id": "table_new_row", + "provider": "table", + "name": "Table Trigger", + "subBlocks": [ + { + "id": "tableSelector", + "type": "table-selector", + "title": "Table", + "mode": "trigger", + "canonicalParamId": "tableId", + "surface": "trigger", + "required": true, + "valueKind": "resource", + "resourceKind": "table", + "storage": "native" + }, + { + "id": "manualTableId", + "type": "short-input", + "title": "Table ID", + "mode": "trigger-advanced", + "canonicalParamId": "tableId", + "surface": "trigger", + "required": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "eventType", + "type": "dropdown", + "title": "Event", + "mode": "trigger", + "surface": "trigger", + "required": true, + "defaultValue": "insert", + "options": [ + { + "id": "insert", + "label": "Row Inserted" + }, + { + "id": "update", + "label": "Row Updated" + }, + { + "id": "delete", + "label": "Row Deleted" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "watchColumns", + "type": "dropdown", + "title": "Watch Columns", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "eventType", + "value": "update" + }, + "required": false, + "options": { + "dynamic": true + }, + "multiple": true, + "selectorKey": "table.columns", + "valueKind": "array", + "storage": "native", + "dependsOn": { + "all": [], + "any": ["tableSelector", "manualTableId"] + } + }, + { + "id": "includeHeaders", + "type": "switch", + "title": "Map Row Values to Headers", + "mode": "trigger", + "surface": "trigger", + "required": false, + "defaultValue": true, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "triggerInstructions", + "type": "text", + "title": "Setup Instructions", + "mode": "trigger", + "surface": "trigger", + "defaultValue": "
1. Select the table to monitor
2. Choose whether to trigger on row inserts, updates, or deletes
3. For updates, optionally select specific columns to watch
4. The workflow will trigger automatically when the event occurs
", + "valueKind": "none", + "storage": "native" + } + ], + "outputs": { + "row": { + "type": "json", + "description": "Row data mapped to column names (when header mapping is enabled)" + }, + "rawRow": { + "type": "json", + "description": "Raw row data object" + }, + "previousRow": { + "type": "json", + "description": "Previous row data before an update or deletion (null for inserts)" + }, + "changedColumns": { + "type": "json", + "description": "List of column names that changed (empty for inserts and deletes)" + }, + "rowId": { + "type": "string", + "description": "The unique row ID" + }, + "headers": { + "type": "json", + "description": "Column names from the table schema" + }, + "tableId": { + "type": "string", + "description": "The table ID" + }, + "tableName": { + "type": "string", + "description": "The table name" + }, + "timestamp": { + "type": "string", + "description": "Event timestamp in ISO format" + } + } + }, + "generic_webhook": { + "id": "generic_webhook", + "provider": "generic", + "name": "Webhook Trigger", + "webhook": true, + "subBlocks": [ + { + "id": "webhookUrlDisplay", + "type": "short-input", + "title": "Webhook URL", + "mode": "trigger", + "surface": "trigger", + "readOnly": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "requireAuth", + "type": "switch", + "title": "Require Authentication", + "mode": "trigger", + "surface": "trigger", + "defaultValue": true, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "token", + "type": "short-input", + "title": "Authentication Token", + "mode": "trigger", + "surface": "trigger", + "required": false, + "valueDefault": { + "constant": "687d5b68-7343-49be-adc4-910c56d69d77" + }, + "password": true, + "valueKind": "string", + "storage": "native" + }, + { + "id": "secretHeaderName", + "type": "short-input", + "title": "Secret Header Name (Optional)", + "mode": "trigger", + "surface": "trigger", + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "acceptOtherMethods", + "type": "switch", + "title": "Accept Other HTTP Methods", + "mode": "trigger", + "surface": "trigger", + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "exposeRequestHeaders", + "type": "switch", + "title": "Expose Request Headers", + "mode": "trigger", + "surface": "trigger", + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "idempotencyField", + "type": "short-input", + "title": "Deduplication Field (Optional)", + "mode": "trigger", + "surface": "trigger", + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "responseMode", + "type": "dropdown", + "title": "Acknowledgement", + "mode": "trigger", + "surface": "trigger", + "defaultValue": "default", + "options": [ + { + "id": "default", + "label": "Default" + }, + { + "id": "custom", + "label": "Custom" + } + ], + "valueKind": "string", + "storage": "native" + }, + { + "id": "verifyTestEvents", + "type": "switch", + "title": "Verify Test Events", + "mode": "trigger", + "surface": "trigger", + "defaultValue": false, + "valueKind": "boolean", + "storage": "native" + }, + { + "id": "responseStatusCode", + "type": "short-input", + "title": "Response Status Code", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "responseMode", + "value": "custom" + }, + "required": false, + "valueKind": "string", + "storage": "native" + }, + { + "id": "responseBody", + "type": "code", + "title": "Response Body", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "responseMode", + "value": "custom" + }, + "required": false, + "language": "json", + "valueKind": "json", + "storage": "native" + }, + { + "id": "inputFormat", + "type": "input-format", + "title": "Input Format", + "mode": "trigger", + "surface": "trigger", + "valueKind": "array", + "storage": "json-string", + "structured": "inputFormat" + }, + { + "id": "triggerInstructions", + "type": "text", + "title": "Setup Instructions", + "mode": "trigger", + "surface": "trigger", + "defaultValue": "
1. Copy the webhook URL and use it in your external service or API.
2. Configure your service to send webhooks to this URL.
3. The webhook accepts POST. Turn on \"Accept Other HTTP Methods\" to also accept GET, PUT, PATCH and DELETE — for example to trigger the workflow from a link in an email.
4. Body fields are available in your workflow, and URL query parameters under \"query\" (for example \"query.id\"). Turn on \"Expose Request Headers\" to also get \"headers\" (for example \"headers.x-event-name\"), and \"Accept Other HTTP Methods\" to also get \"method\".
5. Authentication is header-based, so it cannot be used with a plain link. If authentication is enabled, include the token in the Secret Header Name you configured, or in \"Authorization: Bearer TOKEN\" if you left it blank — only the configured one is accepted, not either.
6. To deduplicate incoming events, set the Deduplication Field to the dot-notation path of a unique identifier in the payload (e.g. \"event.id\"). Duplicate values within 7 days will be skipped.
7. Enable \"Verify Test Events\" only if the sending service needs a temporary 200 response while validating the webhook URL.
", + "valueKind": "none", + "storage": "native" + }, + { + "id": "samplePayload_generic_webhook", + "type": "code", + "title": "Event Payload Example", + "mode": "trigger", + "surface": "trigger", + "condition": { + "field": "selectedTriggerId", + "value": "generic_webhook" + }, + "defaultValue": "{}", + "readOnly": true, + "language": "json", + "valueKind": "json", + "storage": "native" + } + ], + "outputs": {} + } + }, + "builders": { + "agent": { + "type": "agent" + }, + "api": { + "type": "api" + }, + "condition": { + "type": "condition" + }, + "router": { + "type": "router_v2" + }, + "fn": { + "type": "function" + }, + "runWorkflow": { + "type": "workflow" + }, + "response": { + "type": "response" + }, + "human": { + "type": "human_in_the_loop" + }, + "note": { + "type": "note" + }, + "setVariables": { + "type": "variables" + }, + "trigger.start": { + "type": "start_trigger" + }, + "trigger.schedule": { + "type": "schedule" + }, + "trigger.webhook": { + "type": "generic_webhook", + "triggerMode": true, + "fixed": { + "selectedTriggerId": "generic_webhook" + } + }, + "trigger.gmail.poller": { + "type": "gmail_v2", + "triggerMode": true, + "fixed": { + "selectedTriggerId": "gmail_poller" + } + }, + "trigger.googleSheets.poller": { + "type": "google_sheets_v2", + "triggerMode": true, + "fixed": { + "selectedTriggerId": "google_sheets_poller" + } + }, + "trigger.table.newRow": { + "type": "table_v2", + "triggerMode": true, + "fixed": { + "selectedTriggerId": "table_new_row" + } + }, + "slack.sendMessage": { + "type": "slack_v2", + "operation": "send" + }, + "slack.sendEphemeralMessage": { + "type": "slack_v2", + "operation": "ephemeral" + }, + "slack.createCanvas": { + "type": "slack_v2", + "operation": "canvas" + }, + "slack.readMessages": { + "type": "slack_v2", + "operation": "read" + }, + "slack.getMessage": { + "type": "slack_v2", + "operation": "get_message" + }, + "slack.getThread": { + "type": "slack_v2", + "operation": "get_thread" + }, + "slack.getThreadReplies": { + "type": "slack_v2", + "operation": "get_thread_replies" + }, + "slack.getChannelHistory": { + "type": "slack_v2", + "operation": "get_channel_history" + }, + "slack.getMessagePermalink": { + "type": "slack_v2", + "operation": "get_permalink" + }, + "slack.setAssistantStatus": { + "type": "slack_v2", + "operation": "set_status" + }, + "slack.setAssistantTitle": { + "type": "slack_v2", + "operation": "set_title" + }, + "slack.setAssistantSuggestedPrompts": { + "type": "slack_v2", + "operation": "set_suggested_prompts" + }, + "slack.setAgentSuggestedPrompts": { + "type": "slack_v2", + "operation": "set_agent_suggested_prompts" + }, + "slack.setAgentSessionStatus": { + "type": "slack_v2", + "operation": "set_agent_session_status" + }, + "slack.renameAgentSession": { + "type": "slack_v2", + "operation": "rename_agent_session" + }, + "slack.listChannels": { + "type": "slack_v2", + "operation": "list_channels" + }, + "slack.listChannelMembers": { + "type": "slack_v2", + "operation": "list_members" + }, + "slack.listUsers": { + "type": "slack_v2", + "operation": "list_users" + }, + "slack.getUserInfo": { + "type": "slack_v2", + "operation": "get_user" + }, + "slack.downloadFile": { + "type": "slack_v2", + "operation": "download" + }, + "slack.updateMessage": { + "type": "slack_v2", + "operation": "update" + }, + "slack.deleteMessage": { + "type": "slack_v2", + "operation": "delete" + }, + "slack.addReaction": { + "type": "slack_v2", + "operation": "react" + }, + "slack.removeReaction": { + "type": "slack_v2", + "operation": "unreact" + }, + "slack.getChannelInfo": { + "type": "slack_v2", + "operation": "get_channel_info" + }, + "slack.getUserPresence": { + "type": "slack_v2", + "operation": "get_user_presence" + }, + "slack.editCanvas": { + "type": "slack_v2", + "operation": "edit_canvas" + }, + "slack.createChannelCanvas": { + "type": "slack_v2", + "operation": "create_channel_canvas" + }, + "slack.getCanvasInfo": { + "type": "slack_v2", + "operation": "get_canvas" + }, + "slack.listCanvases": { + "type": "slack_v2", + "operation": "list_canvases" + }, + "slack.lookupCanvasSections": { + "type": "slack_v2", + "operation": "lookup_canvas_sections" + }, + "slack.deleteCanvas": { + "type": "slack_v2", + "operation": "delete_canvas" + }, + "slack.createList": { + "type": "slack_v2", + "operation": "create_list" + }, + "slack.updateList": { + "type": "slack_v2", + "operation": "rename_list" + }, + "slack.shareList": { + "type": "slack_v2", + "operation": "share_list" + }, + "slack.readListItems": { + "type": "slack_v2", + "operation": "list_items" + }, + "slack.getListItem": { + "type": "slack_v2", + "operation": "get_list_item" + }, + "slack.createListItem": { + "type": "slack_v2", + "operation": "create_list_item" + }, + "slack.updateListItems": { + "type": "slack_v2", + "operation": "update_list_items" + }, + "slack.deleteListItem": { + "type": "slack_v2", + "operation": "delete_list_item" + }, + "slack.createConversation": { + "type": "slack_v2", + "operation": "create_conversation" + }, + "slack.inviteToConversation": { + "type": "slack_v2", + "operation": "invite_to_conversation" + }, + "slack.openView": { + "type": "slack_v2", + "operation": "open_view" + }, + "slack.updateView": { + "type": "slack_v2", + "operation": "update_view" + }, + "slack.pushView": { + "type": "slack_v2", + "operation": "push_view" + }, + "slack.publishView": { + "type": "slack_v2", + "operation": "publish_view" + }, + "slack.scheduleMessage": { + "type": "slack_v2", + "operation": "schedule_message" + }, + "slack.listScheduledMessages": { + "type": "slack_v2", + "operation": "list_scheduled_messages" + }, + "slack.deleteScheduledMessage": { + "type": "slack_v2", + "operation": "delete_scheduled_message" + }, + "slack.archiveConversation": { + "type": "slack_v2", + "operation": "archive_conversation" + }, + "slack.renameConversation": { + "type": "slack_v2", + "operation": "rename_conversation" + }, + "slack.setConversationTopic": { + "type": "slack_v2", + "operation": "set_conversation_topic" + }, + "slack.setConversationPurpose": { + "type": "slack_v2", + "operation": "set_conversation_purpose" + }, + "slack.revokeListAccess": { + "type": "slack_v2", + "operation": "revoke_list_access" + }, + "slack.startListExport": { + "type": "slack_v2", + "operation": "start_list_export" + }, + "slack.getListExport": { + "type": "slack_v2", + "operation": "get_list_export" + }, + "slack.deleteListItems": { + "type": "slack_v2", + "operation": "delete_list_items" + }, + "slack.shareCanvas": { + "type": "slack_v2", + "operation": "share_canvas" + }, + "slack.revokeCanvasAccess": { + "type": "slack_v2", + "operation": "revoke_canvas_access" + }, + "slack.joinConversation": { + "type": "slack_v2", + "operation": "join_conversation" + }, + "slack.leaveConversation": { + "type": "slack_v2", + "operation": "leave_conversation" + }, + "slack.removeUserFromConversation": { + "type": "slack_v2", + "operation": "kick_conversation" + }, + "slack.unarchiveConversation": { + "type": "slack_v2", + "operation": "unarchive_conversation" + }, + "slack.closeConversation": { + "type": "slack_v2", + "operation": "close_conversation" + }, + "slack.markConversationRead": { + "type": "slack_v2", + "operation": "mark_conversation_read" + }, + "slack.openConversation": { + "type": "slack_v2", + "operation": "open_conversation" + }, + "slack.findUserByEmail": { + "type": "slack_v2", + "operation": "lookup_user_by_email" + }, + "slack.listUserConversations": { + "type": "slack_v2", + "operation": "list_user_conversations" + }, + "slack.getUserProfile": { + "type": "slack_v2", + "operation": "get_user_profile" + }, + "slack.setBotPresence": { + "type": "slack_v2", + "operation": "set_user_presence" + }, + "slack.getFileInfo": { + "type": "slack_v2", + "operation": "get_file_info" + }, + "slack.listFiles": { + "type": "slack_v2", + "operation": "list_files" + }, + "slack.deleteFile": { + "type": "slack_v2", + "operation": "delete_file" + }, + "slack.getReactions": { + "type": "slack_v2", + "operation": "get_reactions" + }, + "slack.listReactions": { + "type": "slack_v2", + "operation": "list_reactions" + }, + "slack.pinMessage": { + "type": "slack_v2", + "operation": "pin_message" + }, + "slack.unpinMessage": { + "type": "slack_v2", + "operation": "unpin_message" + }, + "slack.listPins": { + "type": "slack_v2", + "operation": "list_pins" + }, + "slack.addBookmark": { + "type": "slack_v2", + "operation": "add_bookmark" + }, + "slack.editBookmark": { + "type": "slack_v2", + "operation": "edit_bookmark" + }, + "slack.listBookmarks": { + "type": "slack_v2", + "operation": "list_bookmarks" + }, + "slack.removeBookmark": { + "type": "slack_v2", + "operation": "remove_bookmark" + }, + "slack.createUserGroup": { + "type": "slack_v2", + "operation": "create_user_group" + }, + "slack.updateUserGroup": { + "type": "slack_v2", + "operation": "update_user_group" + }, + "slack.enableUserGroup": { + "type": "slack_v2", + "operation": "enable_user_group" + }, + "slack.disableUserGroup": { + "type": "slack_v2", + "operation": "disable_user_group" + }, + "slack.listUserGroups": { + "type": "slack_v2", + "operation": "list_user_groups" + }, + "slack.listUserGroupMembers": { + "type": "slack_v2", + "operation": "list_user_group_members" + }, + "slack.updateUserGroupMembers": { + "type": "slack_v2", + "operation": "update_user_group_members" + }, + "slack.getDoNotDisturbInfo": { + "type": "slack_v2", + "operation": "get_dnd_info" + }, + "slack.getTeamDoNotDisturbInfo": { + "type": "slack_v2", + "operation": "get_team_dnd_info" + }, + "slack.listCustomEmoji": { + "type": "slack_v2", + "operation": "list_emoji" + }, + "slack.getWorkspaceInfo": { + "type": "slack_v2", + "operation": "get_team_info" + }, + "slack.getWorkspaceProfileFields": { + "type": "slack_v2", + "operation": "get_team_profile" + }, + "slack.unfurlLinks": { + "type": "slack_v2", + "operation": "unfurl_links" + }, + "gmail.sendEmail": { + "type": "gmail_v2", + "operation": "send_gmail" + }, + "gmail.readEmail": { + "type": "gmail_v2", + "operation": "read_gmail" + }, + "gmail.draftEmail": { + "type": "gmail_v2", + "operation": "draft_gmail" + }, + "gmail.editDraft": { + "type": "gmail_v2", + "operation": "edit_draft_gmail" + }, + "gmail.searchEmail": { + "type": "gmail_v2", + "operation": "search_gmail" + }, + "gmail.moveEmail": { + "type": "gmail_v2", + "operation": "move_gmail" + }, + "gmail.markAsRead": { + "type": "gmail_v2", + "operation": "mark_read_gmail" + }, + "gmail.markAsUnread": { + "type": "gmail_v2", + "operation": "mark_unread_gmail" + }, + "gmail.archiveEmail": { + "type": "gmail_v2", + "operation": "archive_gmail" + }, + "gmail.unarchiveEmail": { + "type": "gmail_v2", + "operation": "unarchive_gmail" + }, + "gmail.deleteEmail": { + "type": "gmail_v2", + "operation": "delete_gmail" + }, + "gmail.addLabel": { + "type": "gmail_v2", + "operation": "add_label_gmail" + }, + "gmail.removeLabel": { + "type": "gmail_v2", + "operation": "remove_label_gmail" + }, + "gmail.listLabels": { + "type": "gmail_v2", + "operation": "list_labels_gmail" + }, + "gmail.createLabel": { + "type": "gmail_v2", + "operation": "create_label_gmail" + }, + "gmail.updateLabel": { + "type": "gmail_v2", + "operation": "update_label_gmail" + }, + "gmail.deleteLabel": { + "type": "gmail_v2", + "operation": "delete_label_gmail" + }, + "gmail.listDrafts": { + "type": "gmail_v2", + "operation": "list_drafts_gmail" + }, + "gmail.getDraft": { + "type": "gmail_v2", + "operation": "get_draft_gmail" + }, + "gmail.deleteDraft": { + "type": "gmail_v2", + "operation": "delete_draft_gmail" + }, + "gmail.listThreads": { + "type": "gmail_v2", + "operation": "list_threads_gmail" + }, + "gmail.getThread": { + "type": "gmail_v2", + "operation": "get_thread_gmail" + }, + "gmail.trashThread": { + "type": "gmail_v2", + "operation": "trash_thread_gmail" + }, + "gmail.untrashThread": { + "type": "gmail_v2", + "operation": "untrash_thread_gmail" + }, + "googleSheets.readData": { + "type": "google_sheets_v2", + "operation": "read" + }, + "googleSheets.writeData": { + "type": "google_sheets_v2", + "operation": "write" + }, + "googleSheets.updateData": { + "type": "google_sheets_v2", + "operation": "update" + }, + "googleSheets.appendData": { + "type": "google_sheets_v2", + "operation": "append" + }, + "googleSheets.clearData": { + "type": "google_sheets_v2", + "operation": "clear" + }, + "googleSheets.getSpreadsheetInfo": { + "type": "google_sheets_v2", + "operation": "get_info" + }, + "googleSheets.createSpreadsheet": { + "type": "google_sheets_v2", + "operation": "create" + }, + "googleSheets.batchRead": { + "type": "google_sheets_v2", + "operation": "batch_get" + }, + "googleSheets.batchUpdate": { + "type": "google_sheets_v2", + "operation": "batch_update" + }, + "googleSheets.batchClear": { + "type": "google_sheets_v2", + "operation": "batch_clear" + }, + "googleSheets.copySheet": { + "type": "google_sheets_v2", + "operation": "copy_sheet" + }, + "googleSheets.deleteRows": { + "type": "google_sheets_v2", + "operation": "delete_rows" + }, + "googleSheets.deleteSheet": { + "type": "google_sheets_v2", + "operation": "delete_sheet" + }, + "googleSheets.deleteSpreadsheet": { + "type": "google_sheets_v2", + "operation": "delete_spreadsheet" + }, + "table.queryRows": { + "type": "table_v2", + "operation": "query_rows" + }, + "table.insertRow": { + "type": "table_v2", + "operation": "insert_row" + }, + "table.upsertRow": { + "type": "table_v2", + "operation": "upsert_row" + }, + "table.batchInsertRows": { + "type": "table_v2", + "operation": "batch_insert_rows" + }, + "table.updateRowsByFilter": { + "type": "table_v2", + "operation": "update_rows_by_filter" + }, + "table.deleteRowsByFilter": { + "type": "table_v2", + "operation": "delete_rows_by_filter" + }, + "table.updateRowById": { + "type": "table_v2", + "operation": "update_row" + }, + "table.deleteRowById": { + "type": "table_v2", + "operation": "delete_row" + }, + "table.getRowById": { + "type": "table_v2", + "operation": "get_row" + }, + "table.getSchema": { + "type": "table_v2", + "operation": "get_schema" + }, + "knowledge.search": { + "type": "knowledge", + "operation": "search" + }, + "knowledge.listDocuments": { + "type": "knowledge", + "operation": "list_documents" + }, + "knowledge.getDocument": { + "type": "knowledge", + "operation": "get_document" + }, + "knowledge.createDocument": { + "type": "knowledge", + "operation": "create_document" + }, + "knowledge.upsertDocument": { + "type": "knowledge", + "operation": "upsert_document" + }, + "knowledge.deleteDocument": { + "type": "knowledge", + "operation": "delete_document" + }, + "knowledge.listChunks": { + "type": "knowledge", + "operation": "list_chunks" + }, + "knowledge.uploadChunk": { + "type": "knowledge", + "operation": "upload_chunk" + }, + "knowledge.updateChunk": { + "type": "knowledge", + "operation": "update_chunk" + }, + "knowledge.deleteChunk": { + "type": "knowledge", + "operation": "delete_chunk" + }, + "knowledge.listTags": { + "type": "knowledge", + "operation": "list_tags" + }, + "knowledge.listConnectors": { + "type": "knowledge", + "operation": "list_connectors" + }, + "knowledge.getConnector": { + "type": "knowledge", + "operation": "get_connector" + }, + "knowledge.triggerSync": { + "type": "knowledge", + "operation": "trigger_sync" + } + } +} diff --git a/packages/workflow-sdk/test/fixtures/workspace.ts b/packages/workflow-sdk/test/fixtures/workspace.ts new file mode 100644 index 00000000000..87cdf8da90f --- /dev/null +++ b/packages/workflow-sdk/test/fixtures/workspace.ts @@ -0,0 +1,25 @@ +import type { WorkspaceManifest } from '../../src/codegen' + +/** The workspace the s2 example workflows run in. */ +export const FIXTURE_WORKSPACE: WorkspaceManifest = { + tables: { + tickets: { columns: { subject: { type: 'string' }, category: { type: 'string' } } }, + leads: { + columns: { + email: { type: 'string' }, + status: { type: 'select', options: ['new', 'enriched'] }, + score: { type: 'number' }, + }, + }, + }, + knowledgeBases: ['docs'], + bindings: { + 'support-slack': { service: 'slack' }, + 'sales-slack': { service: 'slack' }, + 'ops-slack': { service: 'slack' }, + 'finance-gmail': { service: 'google-email' }, + 'finance-google': { service: 'google-sheets' }, + }, + workflows: { 'assign-owner': { inputs: { leads: 'array' } } }, + env: ['TICKETS_WEBHOOK_TOKEN', 'CRM_KEY'], +} diff --git a/packages/workflow-sdk/test/negative/rejected.ts b/packages/workflow-sdk/test/negative/rejected.ts new file mode 100644 index 00000000000..6f182f782c4 --- /dev/null +++ b/packages/workflow-sdk/test/negative/rejected.ts @@ -0,0 +1,74 @@ +// @sim-sdk 1 +// Each `@ts-expect-error` must see an error, or the type-check fails with "unused directive". +import { + agent, + binding, + env, + gmail, + js, + kb, + knowledge, + slack, + t, + table, + trigger, + workflow, +} from '@sim/workflow-sdk' + +export default workflow('Rejected', {}, () => { + const start = trigger.start('Start', { inputFormat: { subject: 'string' } }) + const classify = agent('Classify', { + model: 'claude-sonnet-5-5', + responseFormat: { + schema: { + type: 'object', + properties: { category: { type: 'string', enum: ['billing', 'bug'] } }, + }, + }, + }) + + // A misspelled output path. + // @ts-expect-error `categroy` is not an output of `classify` + js`${classify.categroy} === 'billing'` + + // A misspelled input-format field. + // @ts-expect-error `subjct` is not a field of the start input format + t`${start.subjct}` + + // An unknown param. + gmail.sendEmail('Send', { + oauthCredential: binding('finance-gmail'), + to: 'a@b.co', + body: 'hi', + // @ts-expect-error `recipient` is not a param of gmail.sendEmail + recipient: 'a@b.co', + }) + + // A wrong literal option. + knowledge.search('Search', { + knowledgeBaseId: kb('docs'), + // @ts-expect-error `semantic` is not a search mode + searchMode: 'semantic', + }) + + // A missing required param (`to`). + // @ts-expect-error `to` is required by gmail.sendEmail + gmail.sendEmail('Send', { oauthCredential: binding('finance-gmail'), body: 'hi' }) + + // An unknown table column, with workspace types loaded. + table.insertRow('Log', { + tableId: table('tickets'), + // @ts-expect-error `priority` is not a column of the tickets table + data: { priority: 'high' }, + }) + + // Unknown workspace resources and env names. + // @ts-expect-error `dosc` is not a knowledge base of the workspace + kb('dosc') + // @ts-expect-error `CRM_KYE` is not a workspace environment variable + t`${env.CRM_KYE}` + + // An operation that does not exist. + // @ts-expect-error `sendMesage` is not a Slack operation + slack.sendMesage('Typo', {}) +}) diff --git a/packages/workflow-sdk/test/typecheck-project.ts b/packages/workflow-sdk/test/typecheck-project.ts new file mode 100644 index 00000000000..23201d240b4 --- /dev/null +++ b/packages/workflow-sdk/test/typecheck-project.ts @@ -0,0 +1,71 @@ +import { execFileSync } from 'node:child_process' +import { mkdirSync, readFileSync, writeFileSync } from 'node:fs' +import path from 'node:path' +import type { BlockCatalog } from '@sim/workflow-code' +import { generateSdkTypes, generateWorkspaceTypes, type SdkTypeFile } from '../src/codegen' +import { FIXTURE_WORKSPACE } from './fixtures/workspace' + +const testRoot = import.meta.dirname +const packageRoot = path.resolve(testRoot, '..') + +export function loadFixtureCatalog(): BlockCatalog { + return JSON.parse(readFileSync(path.join(testRoot, 'fixtures', 'catalog.json'), 'utf8')) +} + +/** + * Writes the types generated from the fixture catalog and workspace into `outDir`, plus a + * `tsconfig.json` that checks the s2 example workflows (`test/examples`) and the negative + * fixtures (`test/negative`) against them, with `skipLibCheck` off so the generated `.d.ts` are + * checked too. + */ +export function writeTypecheckProject(outDir: string): { tsconfig: string; files: SdkTypeFile[] } { + const files = [ + ...generateSdkTypes(loadFixtureCatalog()), + generateWorkspaceTypes(FIXTURE_WORKSPACE), + ] + for (const file of files) { + const target = path.join(outDir, 'types', file.path) + mkdirSync(path.dirname(target), { recursive: true }) + writeFileSync(target, file.text) + } + const tsconfig = path.join(outDir, 'tsconfig.json') + writeFileSync( + tsconfig, + JSON.stringify( + { + compilerOptions: { + target: 'ES2022', + lib: ['ES2022'], + module: 'ESNext', + moduleResolution: 'bundler', + moduleDetection: 'force', + types: [], + strict: true, + noEmit: true, + skipLibCheck: false, + paths: { '@sim/workflow-sdk': [path.join(packageRoot, 'src', 'core.d.ts')] }, + }, + include: [ + path.join(outDir, 'types', '**', '*.d.ts'), + path.join(testRoot, 'examples', '**', '*.ts'), + path.join(testRoot, 'negative', '**', '*.ts'), + ], + }, + null, + 2 + ) + ) + return { tsconfig, files } +} + +/** Runs the workspace's TypeScript 7 compiler; returns its diagnostics, `''` when clean. */ +export function typecheck(tsconfig: string): string { + const tsc = path.resolve(packageRoot, '../../node_modules/.bin/tsc') + try { + execFileSync(tsc, ['--noEmit', '-p', tsconfig], { encoding: 'utf8', stdio: 'pipe' }) + return '' + } catch (error) { + const failure = error as { stdout?: string; stderr?: string } + return `${failure.stdout ?? ''}${failure.stderr ?? ''}` + } +} From 30b0dad7997c72f2a39150434ff9c2208f341123 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 18:49:22 -0800 Subject: [PATCH 013/428] feat(workflow-code): port the pure canonical index and condition helpers visibility.ts re-exports buildCanonicalIndex, resolveCanonicalMode, evaluateSubBlockCondition, isNonEmptyValue, scopeCanonicalModesForTool, reindexCanonicalModesByPosition (plus getCanonicalValues and isCanonicalPair) from @sim/workflow-code/catalog/canonical-index, so the logic exists once. The ported evaluator treats a catalog { opaque: true } condition as active. --- .../sim/lib/workflows/subblocks/visibility.ts | 278 ++---------------- apps/sim/package.json | 1 + bun.lock | 1 + packages/workflow-code/package.json | 4 + .../src/catalog/canonical-index/index.ts | 248 ++++++++++++++++ scripts/check-explicit-any.baseline.json | 2 - 6 files changed, 281 insertions(+), 253 deletions(-) create mode 100644 packages/workflow-code/src/catalog/canonical-index/index.ts diff --git a/apps/sim/lib/workflows/subblocks/visibility.ts b/apps/sim/lib/workflows/subblocks/visibility.ts index 62eb82b169d..1de78e0d050 100644 --- a/apps/sim/lib/workflows/subblocks/visibility.ts +++ b/apps/sim/lib/workflows/subblocks/visibility.ts @@ -1,38 +1,36 @@ import { isRecordLike, omit } from '@sim/utils/object' +import { + buildCanonicalIndex, + type CanonicalGroup, + type CanonicalIndex, + type CanonicalModeOverrides, + getCanonicalValues, + isCanonicalPair, + isNonEmptyValue, + reindexCanonicalModesByPosition, + resolveCanonicalMode, +} from '@sim/workflow-code/catalog/canonical-index' import { isEqual } from 'es-toolkit' import { getDeploymentShape } from '@/lib/core/config/deployment-shape' import { getEnv, isTruthy } from '@/lib/core/config/env' import type { SubBlockConfig } from '@/blocks/types' -export type CanonicalMode = 'basic' | 'advanced' - -export interface CanonicalGroup { - canonicalId: string - basicId?: string - advancedIds: string[] -} - -export interface CanonicalIndex { - groupsById: Record - canonicalIdBySubBlockId: Record -} - -export interface SubBlockCondition { - field: string - value: string | number | boolean | Array | undefined - not?: boolean - and?: SubBlockCondition -} - -export interface CanonicalModeOverrides { - [canonicalId: string]: CanonicalMode | undefined -} - -export interface CanonicalValueSelection { - basicValue: unknown - advancedValue: unknown - advancedSourceId?: string -} +export { + buildCanonicalIndex, + type CanonicalGroup, + type CanonicalIndex, + type CanonicalMode, + type CanonicalModeOverrides, + type CanonicalValueSelection, + evaluateSubBlockCondition, + getCanonicalValues, + isCanonicalPair, + isNonEmptyValue, + reindexCanonicalModesByPosition, + resolveCanonicalMode, + type SubBlockCondition, + scopeCanonicalModesForTool, +} from '@sim/workflow-code/catalog/canonical-index' interface TriggerVisibilityBlockConfig { category?: string @@ -106,38 +104,6 @@ export function withCanonicalModes( return canonicalModes ? { ...values, __canonicalModes: canonicalModes } : values } -/** - * Build canonical group indices for a block's subblocks. - */ -export function buildCanonicalIndex(subBlocks: SubBlockConfig[]): CanonicalIndex { - const groupsById: Record = {} - const canonicalIdBySubBlockId: Record = {} - - subBlocks.forEach((subBlock) => { - if (!subBlock.canonicalParamId) return - const canonicalId = subBlock.canonicalParamId - if (!groupsById[canonicalId]) { - groupsById[canonicalId] = { canonicalId, advancedIds: [] } - } - const group = groupsById[canonicalId] - if (subBlock.mode === 'advanced' || subBlock.mode === 'trigger-advanced') { - // Deduplicate: trigger spreads may repeat the same advanced ID as the regular block - if (!group.advancedIds.includes(subBlock.id)) { - group.advancedIds.push(subBlock.id) - } - } else { - // A trigger-mode subblock must not overwrite a basicId already claimed by a non-trigger subblock. - // Blocks spread their trigger's subBlocks after their own, so the regular subblock always wins. - if (!group.basicId || subBlock.mode !== 'trigger') { - group.basicId = subBlock.id - } - } - canonicalIdBySubBlockId[subBlock.id] = canonicalId - }) - - return { groupsById, canonicalIdBySubBlockId } -} - /** * The subblocks that define a block's canonical groups on the surface it is being rendered or * resolved on. @@ -177,13 +143,6 @@ export function buildCanonicalIndexForSurface( return buildCanonicalIndex(getCanonicalSubBlocksForSurface(subBlocks, triggerSurface)) } -/** - * Resolve if a canonical group is a swap pair (basic + advanced). - */ -export function isCanonicalPair(group?: CanonicalGroup): boolean { - return Boolean(group?.basicId && group?.advancedIds?.length) -} - /** * Builds default canonical mode overrides for a block's subblocks. * All canonical pairs default to `'basic'`. @@ -201,99 +160,6 @@ export function buildDefaultCanonicalModes( return modes } -/** - * Determine the active mode for a canonical group. - */ -export function resolveCanonicalMode( - group: CanonicalGroup, - values: Record, - overrides?: CanonicalModeOverrides -): CanonicalMode { - const override = overrides?.[group.canonicalId] - if (override === 'advanced' && group.advancedIds.length > 0) return 'advanced' - if (override === 'basic' && group.basicId) return 'basic' - - const { basicValue, advancedValue } = getCanonicalValues(group, values) - const hasBasic = isNonEmptyValue(basicValue) - const hasAdvanced = isNonEmptyValue(advancedValue) - - if (!group.basicId) return 'advanced' - if (!hasBasic && hasAdvanced) return 'advanced' - return 'basic' -} - -/** - * Evaluate a subblock condition against a map of raw values. - */ -export function evaluateSubBlockCondition( - condition: - | SubBlockCondition - | ((values?: Record) => SubBlockCondition) - | undefined, - values: Record -): boolean { - if (!condition) return true - const actual = typeof condition === 'function' ? condition(values) : condition - const fieldValue = values[actual.field] - const valueMatch = Array.isArray(actual.value) - ? fieldValue != null && - (actual.not - ? !actual.value.includes(fieldValue as any) - : actual.value.includes(fieldValue as any)) - : actual.not - ? fieldValue !== actual.value - : fieldValue === actual.value - const andMatch = !actual.and - ? true - : (() => { - const andFieldValue = values[actual.and!.field] - const andValueMatch = Array.isArray(actual.and!.value) - ? andFieldValue != null && - (actual.and!.not - ? !actual.and!.value.includes(andFieldValue as any) - : actual.and!.value.includes(andFieldValue as any)) - : actual.and!.not - ? andFieldValue !== actual.and!.value - : andFieldValue === actual.and!.value - return andValueMatch - })() - - return valueMatch && andMatch -} - -/** - * Check if a value is considered set for advanced visibility/selection. - */ -export function isNonEmptyValue(value: unknown): boolean { - if (value === null || value === undefined) return false - if (typeof value === 'string') return value.trim().length > 0 - if (Array.isArray(value)) return value.length > 0 - return true -} - -/** - * Resolve basic and advanced values for a canonical group. - */ -export function getCanonicalValues( - group: CanonicalGroup, - values: Record -): CanonicalValueSelection { - const basicValue = group.basicId ? values[group.basicId] : undefined - let advancedValue: unknown - let advancedSourceId: string | undefined - - group.advancedIds.forEach((advancedId) => { - if (advancedValue !== undefined) return - const candidate = values[advancedId] - if (isNonEmptyValue(candidate)) { - advancedValue = candidate - advancedSourceId = advancedId - } - }) - - return { basicValue, advancedValue, advancedSourceId } -} - /** * Resolve the ACTIVE canonical member's value for a group: the basic value in basic mode, the * advanced value in advanced mode (per {@link resolveCanonicalMode} - honoring an explicit @@ -335,96 +201,6 @@ export function resolveActiveDependencyValue( return resolveActiveCanonicalValue(group, values, overrides) } -/** Extract override entries matching a `${prefix}` key into a bare-`canonicalId`-keyed object. */ -function extractPrefixedModes( - overrides: CanonicalModeOverrides, - prefix: string -): CanonicalModeOverrides | undefined { - let scoped: CanonicalModeOverrides | undefined - for (const [key, value] of Object.entries(overrides)) { - if (key.startsWith(prefix) && value) { - scoped = scoped ?? {} - scoped[key.slice(prefix.length)] = value - } - } - return scoped -} - -/** - * Strip the `${toolIndex}:` prefix from canonical-mode override keys, returning the overrides for a - * nested tool keyed by bare `canonicalId`. An agent block stores its nested tools' modes scoped as - * `${toolIndex}:${canonicalId}` — keyed by the tool's position in the `tool-input` array, not its - * `type` — so that two tool entries of the SAME type (e.g. two Table tools on one Agent block) get - * independent canonical modes instead of colliding on a shared `${toolType}:${canonicalId}` key. - * - * The legacy `${legacyToolType}:` prefix (the pre-instance-scoping format) is the BASELINE, with - * index-scoped entries layered over it per canonical id, so an override saved before this scoping - * change isn't silently dropped - it keeps applying (type-shared, the old behavior) until the user - * re-toggles that specific canonical id, at which point the new index-scoped key wins for it alone. - * - * Merging per key rather than preferring one map wholesale is what keeps a PARTIALLY re-toggled - * tool intact. Toggles are written one key at a time (`setBlockCanonicalMode`), so the first toggle - * on a legacy tool produces a map holding both formats; returning only the index-scoped side there - * would silently revert every canonical id the user had not yet re-toggled back to basic. - * - * Returns `undefined` when there are no overrides, no `toolIndex`, and no legacy match. - */ -export function scopeCanonicalModesForTool( - overrides: CanonicalModeOverrides | undefined, - toolIndex: number | undefined, - legacyToolType?: string -): CanonicalModeOverrides | undefined { - if (!overrides) return undefined - const scoped = - toolIndex !== undefined ? extractPrefixedModes(overrides, `${toolIndex}:`) : undefined - const legacy = legacyToolType ? extractPrefixedModes(overrides, `${legacyToolType}:`) : undefined - if (!scoped) return legacy - return legacy ? { ...legacy, ...scoped } : scoped -} - -const INDEX_SCOPED_KEY = /^(\d+):(.+)$/ - -/** - * Canonical-mode overrides are keyed by a tool's position in its `tool-input` array - * (`${toolIndex}:${canonicalId}`), so anything that reorders or removes tools - the editor - * (drag-reorder, remove, delete), the workflow edit engine (a rewritten tool list), fork/promote - * copy (dropping an unresolved custom-tool/MCP entry) - must carry each surviving tool's - * overrides to its new position and DROP the vacated index. Otherwise a saved basic/advanced - * choice can attach to whichever DIFFERENT tool later lands on that old index (e.g. a newly-added - * tool, always appended at the end, can refill a slot a removal just freed). - * - * Returns the full replacement `canonicalModes` object (for an atomic whole-map write - a - * per-key merge can't drop a key, and sequential per-key writes can clobber each other when - * two tools swap positions), or `undefined` when nothing needs to change. A legacy, - * non-index-scoped key (the `${toolType}:` fallback format) isn't tied to any array position, - * so it's carried over unchanged. - */ -export function reindexCanonicalModesByPosition( - newIndexByOldIndex: ReadonlyMap, - overrides: CanonicalModeOverrides | undefined -): Record | undefined { - if (!overrides) return undefined - - let changed = false - const result: Record = {} - for (const [key, mode] of Object.entries(overrides)) { - if (!mode) continue - const match = INDEX_SCOPED_KEY.exec(key) - if (!match) { - result[key] = mode - continue - } - const newIndex = newIndexByOldIndex.get(Number(match[1])) - if (newIndex === undefined) { - changed = true // Tool removed (or an already-stale index) - drop the key. - continue - } - if (newIndex !== Number(match[1])) changed = true - result[`${newIndex}:${match[2]}`] = mode - } - return changed ? result : undefined -} - /** * {@link reindexCanonicalModesByPosition}, diffing `oldTools` against `newTools` by OBJECT * IDENTITY to derive the old-index -> new-index map. Callers must not clone the tool objects diff --git a/apps/sim/package.json b/apps/sim/package.json index 31a53480a53..e150d306be6 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -166,6 +166,7 @@ "@sim/utils": "workspace:*", "@sim/workflow-persistence": "workspace:*", "@sim/workflow-renderer": "workspace:*", + "@sim/workflow-code": "workspace:*", "@sim/workflow-types": "workspace:*", "@smithy/node-http-handler": "4.14.1", "@t3-oss/env-nextjs": "0.13.11", diff --git a/bun.lock b/bun.lock index f01b284baeb..84084ee029b 100644 --- a/bun.lock +++ b/bun.lock @@ -315,6 +315,7 @@ "@sim/security": "workspace:*", "@sim/terminal-protocol": "workspace:*", "@sim/utils": "workspace:*", + "@sim/workflow-code": "workspace:*", "@sim/workflow-persistence": "workspace:*", "@sim/workflow-renderer": "workspace:*", "@sim/workflow-types": "workspace:*", diff --git a/packages/workflow-code/package.json b/packages/workflow-code/package.json index 04d867080d0..742d6a8987f 100644 --- a/packages/workflow-code/package.json +++ b/packages/workflow-code/package.json @@ -13,6 +13,10 @@ ".": { "types": "./src/index.ts", "default": "./src/index.ts" + }, + "./catalog/canonical-index": { + "types": "./src/catalog/canonical-index/index.ts", + "default": "./src/catalog/canonical-index/index.ts" } }, "scripts": { diff --git a/packages/workflow-code/src/catalog/canonical-index/index.ts b/packages/workflow-code/src/catalog/canonical-index/index.ts new file mode 100644 index 00000000000..938e6b087c5 --- /dev/null +++ b/packages/workflow-code/src/catalog/canonical-index/index.ts @@ -0,0 +1,248 @@ +/** + * The pure core of basic/advanced canonical pairs and subBlock visibility conditions, shared by + * `apps/sim/lib/workflows/subblocks/visibility.ts` (which re-exports it, so the logic exists once) + * and canonicalize, which runs it over catalog subBlocks instead of registry configs. + * + * Inputs are structural (`CanonicalIndexSubBlock`, `SubBlockCondition`), so a registry + * `SubBlockConfig` and a `CatalogSubBlock` both fit. + */ + +import type { OpaqueMarker } from '../types' + +export type CanonicalMode = 'basic' | 'advanced' + +export interface CanonicalGroup { + canonicalId: string + basicId?: string + advancedIds: string[] +} + +export interface CanonicalIndex { + groupsById: Record + canonicalIdBySubBlockId: Record +} + +export interface SubBlockCondition { + field: string + value: string | number | boolean | Array | undefined + not?: boolean + and?: SubBlockCondition +} + +export interface CanonicalModeOverrides { + [canonicalId: string]: CanonicalMode | undefined +} + +export interface CanonicalValueSelection { + basicValue: unknown + advancedValue: unknown + advancedSourceId?: string +} + +/** The subBlock fields the canonical index reads. */ +export interface CanonicalIndexSubBlock { + id: string + mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' + canonicalParamId?: string +} + +/** + * A visibility condition: the object form, a registry function (evaluated against the values), + * or a catalog `{ opaque: true }` marker for a function the projection could not evaluate. An + * opaque condition counts as satisfied, so its field is treated as active. + */ +export type EvaluableSubBlockCondition = + | SubBlockCondition + | OpaqueMarker + | ((values?: Record) => SubBlockCondition) + | undefined + +/** Build canonical group indices for a block's subblocks. */ +export function buildCanonicalIndex(subBlocks: readonly CanonicalIndexSubBlock[]): CanonicalIndex { + const groupsById: Record = {} + const canonicalIdBySubBlockId: Record = {} + + for (const subBlock of subBlocks) { + if (!subBlock.canonicalParamId) continue + const canonicalId = subBlock.canonicalParamId + if (!groupsById[canonicalId]) { + groupsById[canonicalId] = { canonicalId, advancedIds: [] } + } + const group = groupsById[canonicalId] + if (subBlock.mode === 'advanced' || subBlock.mode === 'trigger-advanced') { + // Trigger spreads may repeat the same advanced id as the regular block. + if (!group.advancedIds.includes(subBlock.id)) { + group.advancedIds.push(subBlock.id) + } + } else if (!group.basicId || subBlock.mode !== 'trigger') { + // Blocks spread their trigger's subBlocks after their own, so a trigger-mode member never + // takes a basicId a regular member already claimed. + group.basicId = subBlock.id + } + canonicalIdBySubBlockId[subBlock.id] = canonicalId + } + + return { groupsById, canonicalIdBySubBlockId } +} + +/** Whether a canonical group is a swap pair (basic + advanced). */ +export function isCanonicalPair(group?: CanonicalGroup): boolean { + return Boolean(group?.basicId && group?.advancedIds?.length) +} + +/** Whether a value counts as set for advanced visibility and mode inference. */ +export function isNonEmptyValue(value: unknown): boolean { + if (value === null || value === undefined) return false + if (typeof value === 'string') return value.trim().length > 0 + if (Array.isArray(value)) return value.length > 0 + return true +} + +/** Resolve the basic and advanced values for a canonical group. */ +export function getCanonicalValues( + group: CanonicalGroup, + values: Record +): CanonicalValueSelection { + const basicValue = group.basicId ? values[group.basicId] : undefined + let advancedValue: unknown + let advancedSourceId: string | undefined + + for (const advancedId of group.advancedIds) { + const candidate = values[advancedId] + if (isNonEmptyValue(candidate)) { + advancedValue = candidate + advancedSourceId = advancedId + break + } + } + + return { basicValue, advancedValue, advancedSourceId } +} + +/** + * The active mode for a canonical group: an explicit override when the group has that member, + * else the advanced member when only it holds a value, else basic. + */ +export function resolveCanonicalMode( + group: CanonicalGroup, + values: Record, + overrides?: CanonicalModeOverrides +): CanonicalMode { + const override = overrides?.[group.canonicalId] + if (override === 'advanced' && group.advancedIds.length > 0) return 'advanced' + if (override === 'basic' && group.basicId) return 'basic' + + const { basicValue, advancedValue } = getCanonicalValues(group, values) + const hasBasic = isNonEmptyValue(basicValue) + const hasAdvanced = isNonEmptyValue(advancedValue) + + if (!group.basicId) return 'advanced' + if (!hasBasic && hasAdvanced) return 'advanced' + return 'basic' +} + +function isOpaqueMarker(condition: object): condition is OpaqueMarker { + return 'opaque' in condition && condition.opaque === true +} + +function matchesClause( + clause: Pick, + values: Record +): boolean { + const fieldValue = values[clause.field] + if (Array.isArray(clause.value)) { + if (fieldValue == null) return false + const included = (clause.value as readonly unknown[]).includes(fieldValue) + return clause.not ? !included : included + } + return clause.not ? fieldValue !== clause.value : fieldValue === clause.value +} + +/** + * Evaluate a subblock condition against a map of raw values. Only one level of `and` is read, + * as in the registry. + */ +export function evaluateSubBlockCondition( + condition: EvaluableSubBlockCondition, + values: Record +): boolean { + if (!condition) return true + const actual = typeof condition === 'function' ? condition(values) : condition + if (isOpaqueMarker(actual)) return true + if (!matchesClause(actual, values)) return false + return actual.and ? matchesClause(actual.and, values) : true +} + +/** Extract override entries matching a `${prefix}` key into a bare-`canonicalId`-keyed object. */ +function extractPrefixedModes( + overrides: CanonicalModeOverrides, + prefix: string +): CanonicalModeOverrides | undefined { + let scoped: CanonicalModeOverrides | undefined + for (const [key, value] of Object.entries(overrides)) { + if (key.startsWith(prefix) && value) { + scoped = scoped ?? {} + scoped[key.slice(prefix.length)] = value + } + } + return scoped +} + +/** + * The canonical-mode overrides of one nested tool, keyed by bare `canonicalId`. An agent block + * stores its nested tools' modes as `${toolIndex}:${canonicalId}` (by position, so two tools of + * the same type stay independent). The legacy `${legacyToolType}:` prefix is the baseline and + * index-scoped entries are layered over it per canonical id, so a partially re-toggled legacy + * tool keeps the ids the user has not re-toggled yet. + * + * Returns `undefined` when there are no overrides, no `toolIndex`, and no legacy match. + */ +export function scopeCanonicalModesForTool( + overrides: CanonicalModeOverrides | undefined, + toolIndex: number | undefined, + legacyToolType?: string +): CanonicalModeOverrides | undefined { + if (!overrides) return undefined + const scoped = + toolIndex !== undefined ? extractPrefixedModes(overrides, `${toolIndex}:`) : undefined + const legacy = legacyToolType ? extractPrefixedModes(overrides, `${legacyToolType}:`) : undefined + if (!scoped) return legacy + return legacy ? { ...legacy, ...scoped } : scoped +} + +const INDEX_SCOPED_KEY = /^(\d+):(.+)$/ + +/** + * Carries each surviving tool's `${toolIndex}:${canonicalId}` overrides to its new position and + * drops vacated indices, so a saved mode never attaches to a different tool that later lands on + * the old index. Legacy `${toolType}:` keys are not positional and pass through unchanged. + * + * Returns the full replacement `canonicalModes` object (for an atomic whole-map write), or + * `undefined` when nothing needs to change. + */ +export function reindexCanonicalModesByPosition( + newIndexByOldIndex: ReadonlyMap, + overrides: CanonicalModeOverrides | undefined +): Record | undefined { + if (!overrides) return undefined + + let changed = false + const result: Record = {} + for (const [key, mode] of Object.entries(overrides)) { + if (!mode) continue + const match = INDEX_SCOPED_KEY.exec(key) + if (!match) { + result[key] = mode + continue + } + const newIndex = newIndexByOldIndex.get(Number(match[1])) + if (newIndex === undefined) { + // Tool removed, or an already-stale index. + changed = true + continue + } + if (newIndex !== Number(match[1])) changed = true + result[`${newIndex}:${match[2]}`] = mode + } + return changed ? result : undefined +} diff --git a/scripts/check-explicit-any.baseline.json b/scripts/check-explicit-any.baseline.json index 02ee28b9eea..d8a5aae67e4 100644 --- a/scripts/check-explicit-any.baseline.json +++ b/scripts/check-explicit-any.baseline.json @@ -273,7 +273,6 @@ "apps/sim/lib/workflows/streaming/streaming.test.ts": 25, "apps/sim/lib/workflows/streaming/streaming.ts": 1, "apps/sim/lib/workflows/subblocks/display.test.ts": 1, - "apps/sim/lib/workflows/subblocks/visibility.ts": 4, "apps/sim/lib/workflows/triggers/triggers.ts": 5, "apps/sim/lib/workflows/utils.test.ts": 1, "apps/sim/lib/workflows/variables/manager.test.ts": 2, @@ -1692,7 +1691,6 @@ "apps/sim/lib/workflows/search-replace/indexer.test.ts": 2, "apps/sim/lib/workflows/streaming/forward-agent-stream-events.test.ts": 16, "apps/sim/lib/workflows/streaming/streaming.ts": 4, - "apps/sim/lib/workflows/subblocks/visibility.ts": 8, "apps/sim/lib/workflows/triggers/utils.ts": 1, "apps/sim/lib/workspace-files/application/read-stored-workspace-file-record-by-key.test.ts": 1, "apps/sim/lib/workspace-files/search/admission.ts": 2, From 4803c196b1c7ab1f5402823a5240157c262b57b6 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:06:28 -0800 Subject: [PATCH 014/428] contract: branch rows without a stored title and dangling subflow parents CanonicalBranchRow.titleMissing records a row stored with no title, which the executor treats differently from a positional one (s1 quirk 4), and W_CANON_DANGLING_PARENT reports a data.parentId naming no block. --- packages/workflow-code/src/diagnostics/codes.ts | 5 +++++ packages/workflow-code/src/model.ts | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/packages/workflow-code/src/diagnostics/codes.ts b/packages/workflow-code/src/diagnostics/codes.ts index 216e5d1ba0c..8e9a7cac620 100644 --- a/packages/workflow-code/src/diagnostics/codes.ts +++ b/packages/workflow-code/src/diagnostics/codes.ts @@ -157,6 +157,11 @@ export type CanonicalizeDiagnosticCode = | 'W_CANON_RESERVED_NAME' /** An edge whose source or target block does not exist; dropped. */ | 'W_CANON_DANGLING_EDGE' + /** + * A block whose `data.parentId` names no stored block. It is placed at the root and the raw + * `parentId` is kept under `opaque.data`, so nothing is lost. + */ + | 'W_CANON_DANGLING_PARENT' /** An unknown edge handle, kept as a `raw` port. */ | 'W_CANON_RAW_HANDLE' /** A block type absent from the catalog; params kept, nothing marked inactive. */ diff --git a/packages/workflow-code/src/model.ts b/packages/workflow-code/src/model.ts index 30926794a50..4a0eeee6ee6 100644 --- a/packages/workflow-code/src/model.ts +++ b/packages/workflow-code/src/model.ts @@ -177,6 +177,13 @@ export interface CanonicalBranchRow { * (condition-input.tsx:395-401), s1 quirk 4. */ titleOverride?: string + /** + * Set when the stored row has no title at all (rows written by the edit engine or copilot can + * omit it). Distinct from a positional title: a last row without a title is not found as `else` + * by the executor (condition/handler.ts:474), so materialize writes no title for such a row. + * Never set together with `titleOverride`. + */ + titleMissing?: true /** Unknown non-UI keys. UI state (`showTags`, `searchTerm`, ...) is stripped (s1 quirk 6). */ extra?: Record } From e792a5a5850db84a1fa1248d7819c5d261669053 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:06:30 -0800 Subject: [PATCH 015/428] test(workflow-sdk): cover a negated list condition in the visibility evaluator --- packages/workflow-sdk/src/codegen/visibility.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/workflow-sdk/src/codegen/visibility.test.ts b/packages/workflow-sdk/src/codegen/visibility.test.ts index 114d9cfbcc7..f691ac0962d 100644 --- a/packages/workflow-sdk/src/codegen/visibility.test.ts +++ b/packages/workflow-sdk/src/codegen/visibility.test.ts @@ -82,7 +82,7 @@ describe('classifyParam', () => { it('evaluates `not` and `and` like evaluateSubBlockCondition', () => { const field = subBlock({ id: 'rerankerModel', - condition: { field: 'mode', value: 'x', not: true, and: { field: 'enabled', value: true } }, + condition: { field: 'mode', value: ['x'], not: true, and: { field: 'enabled', value: true } }, }) const context = buildVisibilityContext( [dropdown('mode', ['x', 'y']), subBlock({ id: 'enabled', type: 'switch' }), field], From c9f988b0476abca5505aea37daa6301e2ffdaea0 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:06:38 -0800 Subject: [PATCH 016/428] feat(workflow-code): canonicalize stored workflows and compare canonical models canonicalize implements s1 steps 1-9: normalized block keys with key~n for legacy collisions, parents and subflow configs (block.data first, as the serializer reads it), encoding-free params with structured JSON decoded, selector ids lifted through the resolver (csv for comma-joined multi-selects) and variable ids lifted to var nodes, effective modes including the legacy advancedMode rule, tool-input lists with index and legacy type-scoped modes, named branches (lock, persisted key, positional if/elseIf0/else, route0), healed edges with raw ports, and the inactive annotation mirroring shouldSerializeSubBlock. Every s1 quirk is cited where it is handled. equivalence adds canonicalEquals (key- and edge-order-insensitive, total), canonicalHash and sourceFingerprint over hash.ts. --- .../src/canonicalize/activity.ts | 82 + .../src/canonicalize/branches.ts | 217 +++ .../workflow-code/src/canonicalize/context.ts | 43 + .../workflow-code/src/canonicalize/edges.ts | 121 ++ .../src/canonicalize/index.test.ts | 1327 +++++++++++++++++ .../workflow-code/src/canonicalize/index.ts | 303 ++++ .../workflow-code/src/canonicalize/keys.ts | 110 ++ .../workflow-code/src/canonicalize/modes.ts | 34 + .../workflow-code/src/canonicalize/params.ts | 260 ++++ .../src/canonicalize/subflows.ts | 171 +++ .../workflow-code/src/canonicalize/tools.ts | 204 +++ .../workflow-code/src/canonicalize/values.ts | 149 ++ .../src/equivalence/index.test.ts | 163 ++ .../workflow-code/src/equivalence/index.ts | 57 + 14 files changed, 3241 insertions(+) create mode 100644 packages/workflow-code/src/canonicalize/activity.ts create mode 100644 packages/workflow-code/src/canonicalize/branches.ts create mode 100644 packages/workflow-code/src/canonicalize/context.ts create mode 100644 packages/workflow-code/src/canonicalize/edges.ts create mode 100644 packages/workflow-code/src/canonicalize/index.test.ts create mode 100644 packages/workflow-code/src/canonicalize/index.ts create mode 100644 packages/workflow-code/src/canonicalize/keys.ts create mode 100644 packages/workflow-code/src/canonicalize/modes.ts create mode 100644 packages/workflow-code/src/canonicalize/params.ts create mode 100644 packages/workflow-code/src/canonicalize/subflows.ts create mode 100644 packages/workflow-code/src/canonicalize/tools.ts create mode 100644 packages/workflow-code/src/canonicalize/values.ts create mode 100644 packages/workflow-code/src/equivalence/index.test.ts create mode 100644 packages/workflow-code/src/equivalence/index.ts diff --git a/packages/workflow-code/src/canonicalize/activity.ts b/packages/workflow-code/src/canonicalize/activity.ts new file mode 100644 index 00000000000..2c67f45c7da --- /dev/null +++ b/packages/workflow-code/src/canonicalize/activity.ts @@ -0,0 +1,82 @@ +import { + type CanonicalIndex, + type CanonicalModeOverrides, + evaluateSubBlockCondition, + isCanonicalPair, + isNonEmptyValue, + resolveCanonicalMode, +} from '../catalog/canonical-index' +import type { CatalogBlock, CatalogSubBlock } from '../catalog/types' +import type { SubBlockId } from '../model' + +/** Agent fields the serializer still forwards with no config, for its legacy migration. */ +const LEGACY_AGENT_FIELDS = new Set(['systemPrompt', 'userPrompt', 'memories']) +/** A custom block's computed wiring; the serializer recomputes it and never forwards it. */ +const CUSTOM_BLOCK_WIRING = new Set(['workflowId', 'inputMapping']) + +export interface ActivityInputs { + block: CatalogBlock + blockType: string + triggerMode: boolean + advancedMode: boolean + /** Raw stored values by subBlock id, with `__canonicalModes` as the serializer passes them. */ + values: Record + overrides: CanonicalModeOverrides | undefined + index: CanonicalIndex +} + +/** + * `shouldSerializeSubBlock` (serializer/index.ts:55-108) over one catalog declaration. + * Env-gated hiding (`hideWhenHosted` / `hideWhenEnvSet`) is deployment state the catalog does not + * carry, so it is not applied. An opaque condition counts as satisfied (s1 canonicalize step 9). + */ +function serializes(subBlock: CatalogSubBlock, inputs: ActivityInputs): boolean { + const { block, triggerMode, advancedMode, values, overrides, index } = inputs + if (subBlock.context === 'tool-input') return false + + const isTriggerCategory = block.category === 'triggers' + if (subBlock.mode === 'trigger' || subBlock.mode === 'trigger-advanced') { + if (!triggerMode && !isTriggerCategory) return false + } else if (triggerMode && !isTriggerCategory) { + return false + } + + const canonicalId = index.canonicalIdBySubBlockId[subBlock.id] + if (canonicalId) { + const group = index.groupsById[canonicalId] + if (group && isCanonicalPair(group)) { + const mode = + overrides?.[group.canonicalId] != null || !advancedMode + ? resolveCanonicalMode(group, values, overrides) + : 'advanced' + const matchesMode = + mode === 'advanced' + ? group.advancedIds.includes(subBlock.id) + : group.basicId === subBlock.id + return matchesMode && evaluateSubBlockCondition(subBlock.condition, values) + } + return evaluateSubBlockCondition(subBlock.condition, values) + } + + if (subBlock.mode === 'advanced' && !advancedMode) return isNonEmptyValue(values[subBlock.id]) + if (subBlock.mode === 'basic' && advancedMode) return false + return evaluateSubBlockCondition(subBlock.condition, values) +} + +/** + * Whether a stored param is inactive: stored, but not forwarded to execution under the block's + * current values (s1 D3, quirks 1 and 10; build-spec decision 2). Mirrors the include rule in + * `extractBlockParams` (serializer/index.ts:558-605): a param with declarations is active when + * any declaration serializes; one with none is inactive except for the serializer's legacy + * agent fields and for a custom block, whose stored fields may be its inputs. + */ +export function isInactive(id: SubBlockId, inputs: ActivityInputs): boolean { + const isCustom = inputs.block.custom !== undefined + if (isCustom && CUSTOM_BLOCK_WIRING.has(id)) return true + const declarations = inputs.block.subBlocks.filter((subBlock) => subBlock.id === id) + if (declarations.length === 0) { + if (isCustom) return false + return !(inputs.blockType === 'agent' && LEGACY_AGENT_FIELDS.has(id)) + } + return !declarations.some((subBlock) => serializes(subBlock, inputs)) +} diff --git a/packages/workflow-code/src/canonicalize/branches.ts b/packages/workflow-code/src/canonicalize/branches.ts new file mode 100644 index 00000000000..ab34827b8ef --- /dev/null +++ b/packages/workflow-code/src/canonicalize/branches.ts @@ -0,0 +1,217 @@ +import { isRecordLike } from '@sim/utils/object' +import type { BlockKey, BranchKey, CanonicalBranches, CanonicalBranchRow, Json } from '../model' +import { type CanonContext, report } from './context' +import { toJson, toValue } from './values' + +const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ + +/** Editor state the condition/router input writes into each row (condition-input.tsx:292-300). */ +const UI_ROW_KEYS = new Set([ + 'showTags', + 'showEnvVars', + 'searchTerm', + 'cursorPosition', + 'activeSourceBlockId', +]) +const MODELED_ROW_KEYS = new Set(['id', 'title', 'value', 'key']) + +export interface LiftedBranches { + branches: CanonicalBranches + /** Branch key → stored row id (or the implicit id a never-persisted row answers to). */ + ids: Record + /** Row id → branch key, for edge handles. */ + keyByRowId: Map + /** Set when the stored value could not be lifted; the caller keeps it as a plain param. */ + unliftedValue?: unknown +} + +type StoredRow = Record & { value: string; id?: string; title?: string } + +function isStoredRow(item: unknown): item is StoredRow { + return ( + isRecordLike(item) && + typeof item.value === 'string' && + (item.id === undefined || typeof item.id === 'string') && + (item.title === undefined || typeof item.title === 'string') + ) +} + +function parseRows(value: unknown): { rows: unknown[] | null; parsed: boolean } { + if (Array.isArray(value)) return { rows: value, parsed: true } + if (typeof value !== 'string' || value.trim() === '') return { rows: null, parsed: false } + try { + const decoded: unknown = JSON.parse(value) + return Array.isArray(decoded) ? { rows: decoded, parsed: true } : { rows: null, parsed: false } + } catch { + return { rows: null, parsed: false } + } +} + +/** Positional default keys mirror the copilot handles (validation.ts:1091-1130), quirk 8. */ +function positionalKeys(kind: CanonicalBranches['kind'], count: number): BranchKey[] { + if (kind === 'router') return Array.from({ length: count }, (_, index) => `route${index}`) + let elseIf = 0 + return Array.from({ length: count }, (_, index) => { + if (index === 0) return 'if' + if (index === count - 1) return 'else' + return `elseIf${elseIf++}` + }) +} + +/** The title the canvas shows (condition-input.tsx:395-401, 686-693; router line 921). */ +function positionalTitle(kind: CanonicalBranches['kind'], index: number, count: number): string { + if (kind === 'router') return `Route ${index + 1}` + if (index === 0) return 'if' + if (index === count - 1) return 'else' + return 'else if' +} + +/** + * Ids a never-persisted (or unparseable, or empty) branch list answers to, keyed by default key: + * `getConditionRows` / `getRouterRows` fallbacks (dynamic-handle-topology.ts:57-100), quirk 7. + */ +function implicitIds(kind: CanonicalBranches['kind'], blockId: string): Record { + return kind === 'router' + ? { route0: `${blockId}-route1` } + : { if: `${blockId}-if`, else: `${blockId}-else` } +} + +/** The id `getConditionRows` / `getRouterRows` give a stored row that has none. */ +function derivedRowId(kind: CanonicalBranches['kind'], blockId: string, index: number): string { + return kind === 'router' ? `${blockId}-route${index + 1}` : `${blockId}-cond-${index}` +} + +function uniqueKey(base: BranchKey, taken: ReadonlySet): BranchKey { + if (!taken.has(base)) return base + let n = 2 + while (taken.has(`${base}_${n}`)) n++ + return `${base}_${n}` +} + +function withImplicit( + kind: CanonicalBranches['kind'], + blockId: string, + rows: CanonicalBranchRow[] | null, + unliftedValue?: unknown +): LiftedBranches { + const ids = implicitIds(kind, blockId) + const keyByRowId = new Map(Object.entries(ids).map(([key, id]) => [id, key])) + return { + branches: { kind, rows }, + ids, + keyByRowId, + ...(unliftedValue !== undefined ? { unliftedValue } : {}), + } +} + +/** + * Lifts the `conditions` / `routes` subBlock into named branches (s1 canonicalize step 6, + * quirks 4–8). Keys resolve lock (by row id) → persisted row `key` → positional default; a key + * already taken gets a `_n` suffix. UI state is stripped, a stored title that differs from the + * positional one becomes `titleOverride` (condition titles are semantic: the executor finds + * `else` by title, condition/handler.ts:474). A never-persisted value is `rows: null` and answers + * to the implicit ids. A value that is not a list of `{ id?, title?, value }` rows is returned + * as `unliftedValue` for the caller to keep verbatim. + */ +export function liftBranches( + kind: CanonicalBranches['kind'], + blockId: string, + blockKey: BlockKey, + param: string, + stored: unknown, + lockKeyByRowId: ReadonlyMap, + context: CanonContext +): LiftedBranches { + if (stored === null || stored === undefined) return withImplicit(kind, blockId, null) + + const { rows: storedRows, parsed } = parseRows(stored) + if (!parsed) { + if (typeof stored !== 'string' || stored.trim() !== '') { + report(context, { + code: 'W_CANON_UNDECODABLE_JSON', + severity: 'warning', + message: `Stored ${kind} branches are not a JSON list; kept verbatim`, + blockKey, + param, + }) + } + return withImplicit(kind, blockId, null, stored) + } + if (!storedRows || !storedRows.every(isStoredRow)) { + report(context, { + code: 'W_CANON_UNDECODABLE_JSON', + severity: 'warning', + message: `Stored ${kind} branches are not a list of { id, title, value } rows; kept verbatim`, + blockKey, + param, + }) + return { + branches: { kind, rows: null }, + ids: {}, + keyByRowId: new Map(), + unliftedValue: stored, + } + } + if (storedRows.length === 0) return withImplicit(kind, blockId, []) + + const count = storedRows.length + const rowIds = storedRows.map((row, index) => row.id ?? derivedRowId(kind, blockId, index)) + const keys: Array = new Array(count) + const taken = new Set() + + rowIds.forEach((rowId, index) => { + const key = lockKeyByRowId.get(rowId) + if (key !== undefined && IDENTIFIER.test(key) && !taken.has(key)) { + keys[index] = key + taken.add(key) + } + }) + storedRows.forEach((row, index) => { + if (keys[index] !== undefined) return + const key = row.key + if (typeof key === 'string' && IDENTIFIER.test(key) && !taken.has(key)) { + keys[index] = key + taken.add(key) + } + }) + const defaults = positionalKeys(kind, count) + for (let index = 0; index < count; index++) { + if (keys[index] !== undefined) continue + const key = uniqueKey(defaults[index], taken) + keys[index] = key + taken.add(key) + } + + const rows: CanonicalBranchRow[] = [] + const ids: Record = {} + const keyByRowId = new Map() + storedRows.forEach((stored, index) => { + const key = keys[index] ?? defaults[index] + const row: CanonicalBranchRow = { key, value: toValue(stored.value, context) as string } + const positional = positionalTitle(kind, index, count) + if (stored.title === undefined) { + row.titleMissing = true + } else if (stored.title !== positional) { + row.titleOverride = stored.title + if (kind === 'condition') { + report(context, { + code: 'W_CANON_TITLE_OVERRIDE', + severity: 'warning', + message: `Branch ${index + 1} is titled "${stored.title}" but shows as "${positional}"; the executor matches else by stored title`, + blockKey, + param, + }) + } + } + const extra: Record = {} + for (const [field, value] of Object.entries(stored)) { + if (MODELED_ROW_KEYS.has(field) || UI_ROW_KEYS.has(field) || value === undefined) continue + extra[field] = toJson(value) + } + if (Object.keys(extra).length > 0) row.extra = extra + rows.push(row) + ids[key] = rowIds[index] + if (!keyByRowId.has(rowIds[index])) keyByRowId.set(rowIds[index], key) + }) + return { branches: { kind, rows }, ids, keyByRowId } +} diff --git a/packages/workflow-code/src/canonicalize/context.ts b/packages/workflow-code/src/canonicalize/context.ts new file mode 100644 index 00000000000..5cb90471f3b --- /dev/null +++ b/packages/workflow-code/src/canonicalize/context.ts @@ -0,0 +1,43 @@ +import type { ResourceKeyResolver } from '../api' +import type { BlockCatalog, CatalogBlock, CatalogSubBlock } from '../catalog/types' +import type { CanonicalizeDiagnosticCode } from '../diagnostics/codes' +import type { Diagnostic } from '../diagnostics/frame' +import type { BlockKey, VarKey } from '../model' + +/** One stored variable in declaration order, as the workflow resolver walks them. */ +export interface VariableEntry { + id: string + key: VarKey + normalizedName: string +} + +/** State shared by the canonicalize steps of one call. */ +export interface CanonContext { + catalog: BlockCatalog + resources?: ResourceKeyResolver + diagnostics: Diagnostic[] + /** Block id → key, every stored block. */ + keyById: Map + /** Normalized name → key of the block references resolve to (the dot-free winner). */ + referenceKeyByName: Map + /** Stored variables in declaration order. */ + variables: VariableEntry[] + /** Variable id → key. */ + variableKeyById: Map +} + +export function report(context: CanonContext, diagnostic: Diagnostic) { + context.diagnostics.push(diagnostic) +} + +export function catalogBlock(context: CanonContext, type: string): CatalogBlock | undefined { + return Object.hasOwn(context.catalog.blocks, type) ? context.catalog.blocks[type] : undefined +} + +/** Every catalog declaration of `id` on a block, in declared order (action and trigger copies). */ +export function subBlockDeclarations( + block: CatalogBlock | undefined, + id: string +): CatalogSubBlock[] { + return block ? block.subBlocks.filter((subBlock) => subBlock.id === id) : [] +} diff --git a/packages/workflow-code/src/canonicalize/edges.ts b/packages/workflow-code/src/canonicalize/edges.ts new file mode 100644 index 00000000000..9cee02fd88d --- /dev/null +++ b/packages/workflow-code/src/canonicalize/edges.ts @@ -0,0 +1,121 @@ +import { compareStrings } from '@sim/utils/string' +import { + type BlockState, + getWorkflowEdgeScopeDropReason, + getWorkflowSubflowHandleIds, + normalizeWorkflowEdgeSourceHandle, + WORKFLOW_ERROR_HANDLE_ID, + WORKFLOW_SOURCE_HANDLE_ID, +} from '@sim/workflow-types/workflow' +import type { Edge } from '@xyflow/react' +import { portKey } from '../anchors' +import type { BranchKey, CanonicalEdge, Port } from '../model' +import { type CanonContext, report } from './context' + +const CONDITION_HANDLE_PREFIX = 'condition-' +const ROUTER_HANDLE_PREFIX = 'router-' + +/** Sorts edges by `(from, portKey, to)` with `compareStrings`. */ +export function compareEdges(left: CanonicalEdge, right: CanonicalEdge): number { + return ( + compareStrings(left.from, right.from) || + compareStrings(portKey(left.port), portKey(right.port)) || + compareStrings(left.to, right.to) + ) +} + +export interface EdgeInputs { + blocks: Record + /** Block id → its branch kind and row-id → key map, for condition and router blocks. */ + branchKeys: Map }> +} + +function sourcePort( + handle: string | null, + source: BlockState, + sourceId: string, + inputs: EdgeInputs +): Port { + if (handle === null || handle === WORKFLOW_SOURCE_HANDLE_ID) return { kind: 'out' } + if (handle === WORKFLOW_ERROR_HANDLE_ID) return { kind: 'error' } + if (source.type === 'loop' || source.type === 'parallel') { + const { start, end } = getWorkflowSubflowHandleIds(source.type) + if (handle === start) return { kind: 'subflowStart' } + if (handle === end) return { kind: 'subflowEnd' } + } + const branches = inputs.branchKeys.get(sourceId) + if (branches) { + const prefix = branches.kind === 'condition' ? CONDITION_HANDLE_PREFIX : ROUTER_HANDLE_PREFIX + if (handle.startsWith(prefix)) { + const key = branches.keyByRowId.get(handle.slice(prefix.length)) + if (key !== undefined) return { kind: 'branch', key } + } + } + return { kind: 'raw', handle } +} + +/** + * Edges by `(from, port, to)` (s1 canonicalize step 7, quirks 5, 7, 20). Handles heal on read + * (side-anchored ids and `''` collapse, workflow.ts:453-473); `condition-` / + * `router-` become branch ports, `-start-source` / `-end-source` subflow ports, and + * anything else a `raw` port with `W_CANON_RAW_HANDLE`. An edge to or from a missing block is + * dropped (`W_CANON_DANGLING_EDGE`); a scope violation is kept and reported as an error + * (`E_CANON_EDGE_SCOPE`). Duplicate tuples collapse to one. + * + * Returns the edges sorted plus the ids of blocks an error edge leaves (`errorPort`). + */ +export function canonicalEdges( + edges: readonly Edge[], + inputs: EdgeInputs, + context: CanonContext +): { edges: CanonicalEdge[]; errorSourceIds: Set } { + const result: CanonicalEdge[] = [] + const seen = new Set() + const errorSourceIds = new Set() + + for (const edge of edges) { + const source = inputs.blocks[edge.source] + const target = inputs.blocks[edge.target] + const from = context.keyById.get(edge.source) + const to = context.keyById.get(edge.target) + if (!source || !target || from === undefined || to === undefined) { + report(context, { + code: 'W_CANON_DANGLING_EDGE', + severity: 'warning', + message: `Edge ${edge.source} -> ${edge.target} references a missing block; dropped`, + ...(from !== undefined ? { blockKey: from } : {}), + }) + continue + } + + const handle = normalizeWorkflowEdgeSourceHandle(edge.sourceHandle) + const port = sourcePort(handle, source, edge.source, inputs) + if (port.kind === 'error') errorSourceIds.add(edge.source) + if (port.kind === 'raw') { + report(context, { + code: 'W_CANON_RAW_HANDLE', + severity: 'warning', + message: `Edge from "${from}" leaves unknown handle "${port.handle}"; kept as a raw port`, + blockKey: from, + }) + } + const scopeProblem = getWorkflowEdgeScopeDropReason(edge, inputs.blocks) + if (scopeProblem) { + report(context, { + code: 'E_CANON_EDGE_SCOPE', + severity: 'error', + message: `Edge ${from} -> ${to}: ${scopeProblem}`, + blockKey: from, + }) + } + + const canonical: CanonicalEdge = { from, port, to } + const identity = `${from}\u0000${portKey(port)}\u0000${to}` + if (seen.has(identity)) continue + seen.add(identity) + result.push(canonical) + } + + result.sort(compareEdges) + return { edges: result, errorSourceIds } +} diff --git a/packages/workflow-code/src/canonicalize/index.test.ts b/packages/workflow-code/src/canonicalize/index.test.ts new file mode 100644 index 00000000000..e662661d25e --- /dev/null +++ b/packages/workflow-code/src/canonicalize/index.test.ts @@ -0,0 +1,1327 @@ +import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' +import { describe, expect, it } from 'vitest' +import type { CanonicalizeOptions, ResourceKeyResolver } from '../api' +import type { BlockCatalog, CatalogBlock, CatalogSubBlock } from '../catalog/types' +import { canonicalEquals, canonicalHash } from '../equivalence' +import type { CanonicalBlock, CanonicalParam, CanonicalWorkflow, Value } from '../model' +import { canonicalize } from '.' + +/* + * The catalog below is hand-projected from real registry configs (apps/sim/blocks/blocks: + * slack.ts, agent.ts, condition.ts, router_v2.ts, function.ts, variables.ts, api.ts, + * start_trigger.ts, table.ts) down to the fields canonicalize reads. Quirk numbers refer to + * s1 §5. + */ + +function sb( + fields: Partial & Pick +): CatalogSubBlock { + return { valueKind: 'string', storage: 'native', ...fields } +} + +function block( + type: string, + subBlocks: CatalogSubBlock[], + extra: Partial = {} +): CatalogBlock { + return { + type, + name: type, + category: 'blocks', + subBlocks, + tools: { access: [], selector: 'single' }, + inputs: {}, + outputs: {}, + graph: { canBeTarget: true, errorPort: true, container: null, annotationOnly: false }, + ...extra, + } +} + +const SEND_OPERATIONS = ['send', 'ephemeral'] + +const CATALOG: BlockCatalog = { + catalogVersion: 1, + hash: 'fixture', + sdkMajor: 1, + builders: {}, + triggers: {}, + tools: { + table_query: { + id: 'table_query', + params: { limit: { type: 'number', visibility: 'user-or-llm' } }, + outputs: {}, + }, + }, + blocks: { + slack: block('slack', [ + sb({ id: 'operation', type: 'dropdown' }), + sb({ + id: 'credential', + type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', + valueKind: 'resource', + resourceKind: 'credential', + }), + sb({ + id: 'manualCredential', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + }), + sb({ + id: 'channel', + type: 'channel-selector', + canonicalParamId: 'channel', + mode: 'basic', + valueKind: 'picked', + }), + sb({ + id: 'manualChannel', + type: 'short-input', + canonicalParamId: 'channel', + mode: 'advanced', + condition: { opaque: true }, + }), + sb({ + id: 'text', + type: 'long-input', + condition: { field: 'operation', value: SEND_OPERATIONS }, + }), + sb({ id: 'threadTs', type: 'short-input', mode: 'advanced' }), + sb({ id: 'botToken', type: 'short-input', mode: 'trigger', surface: 'trigger' }), + sb({ id: 'signingSecret', type: 'short-input', mode: 'trigger', surface: 'trigger' }), + sb({ + id: 'signingSecret', + type: 'short-input', + surface: 'action', + condition: { field: 'operation', value: 'never' }, + }), + sb({ id: 'scopeNote', type: 'short-input', context: 'tool-input' }), + ]), + agent: block('agent', [ + sb({ id: 'messages', type: 'messages-input', valueKind: 'json' }), + sb({ id: 'model', type: 'combobox' }), + sb({ + id: 'tools', + type: 'tool-input', + valueKind: 'tools', + structured: 'tools', + storage: 'native', + }), + sb({ id: 'responseFormat', type: 'code', valueKind: 'code', language: 'json' }), + ]), + table: block('table', [ + sb({ + id: 'tableId', + type: 'table-selector', + canonicalParamId: 'tableId', + mode: 'basic', + valueKind: 'resource', + resourceKind: 'table', + }), + sb({ + id: 'manualTableId', + type: 'short-input', + canonicalParamId: 'tableId', + mode: 'advanced', + }), + sb({ id: 'limit', type: 'short-input' }), + sb({ id: 'includeMeta', type: 'switch', valueKind: 'boolean' }), + ]), + knowledge: block('knowledge', [ + sb({ + id: 'knowledgeBaseIds', + type: 'knowledge-base-selector', + multiple: true, + valueKind: 'resource', + resourceKind: 'knowledge-base', + }), + sb({ + id: 'tagFilters', + type: 'knowledge-tag-filters', + valueKind: 'json', + storage: 'json-string', + }), + ]), + condition: block( + 'condition', + [ + sb({ + id: 'conditions', + type: 'condition-input', + valueKind: 'branches', + structured: 'branches', + storage: 'json-string', + }), + ], + { + graph: { + canBeTarget: true, + errorPort: false, + container: null, + annotationOnly: false, + branches: { subBlockId: 'conditions', kind: 'condition' }, + }, + } + ), + router_v2: block( + 'router_v2', + [ + sb({ id: 'context', type: 'long-input' }), + sb({ + id: 'routes', + type: 'router-input', + valueKind: 'branches', + structured: 'branches', + storage: 'json-string', + }), + ], + { + graph: { + canBeTarget: true, + errorPort: false, + container: null, + annotationOnly: false, + branches: { subBlockId: 'routes', kind: 'router' }, + }, + } + ), + function: block('function', [ + sb({ id: 'language', type: 'dropdown' }), + sb({ id: 'code', type: 'code', valueKind: 'code' }), + ]), + variables: block('variables', [ + sb({ id: 'variables', type: 'variables-input', valueKind: 'json', structured: 'variables' }), + ]), + api: block('api', [ + sb({ id: 'url', type: 'short-input' }), + sb({ + id: 'headers', + type: 'table', + valueKind: 'array', + structured: 'tableRows', + columns: ['Key', 'Value'], + }), + ]), + start_trigger: block( + 'start_trigger', + [ + sb({ + id: 'inputFormat', + type: 'input-format', + valueKind: 'array', + structured: 'inputFormat', + }), + ], + { category: 'triggers' } + ), + custom_block_acme: block( + 'custom_block_acme', + [ + sb({ id: '9b0c0d5e-field', type: 'short-input' }), + sb({ id: 'workflowId', type: 'short-input' }), + ], + { custom: { sourceWorkflowId: 'wf-src' } } + ), + }, +} + +type SubBlocks = Record + +function blockState( + id: string, + type: string, + name: string, + values: SubBlocks = {}, + extra: Partial = {} +): BlockState { + const subBlocks: BlockState['subBlocks'] = {} + for (const [subBlockId, value] of Object.entries(values)) { + subBlocks[subBlockId] = { id: subBlockId, type: 'short-input', value: value as never } + } + return { + id, + type, + name, + position: { x: 0, y: 0 }, + subBlocks, + outputs: {}, + enabled: true, + ...extra, + } +} + +function workflow(blocks: BlockState[], extra: Partial = {}): WorkflowState { + return { + blocks: Object.fromEntries(blocks.map((b) => [b.id, b])), + edges: [], + loops: {}, + parallels: {}, + ...extra, + } +} + +const META = { name: 'Fixture', description: null } + +function run(state: WorkflowState, options: Partial = {}) { + return canonicalize(state, { catalog: CATALOG, meta: META, ...options }) +} + +function onlyBlock(result: ReturnType, key: string): CanonicalBlock { + const found = result.workflow.blocks[key] + expect(found).toBeDefined() + return found +} + +function value(param: CanonicalParam | undefined): Value | undefined { + return param?.kind === 'value' ? param.value : undefined +} + +function codes(result: ReturnType): string[] { + return result.diagnostics.map((d) => d.code) +} + +describe('canonicalize: keys and names (step 1, quirk 21)', () => { + it('keys a block by its normalized name', () => { + const result = run(workflow([blockState('b1', 'function', 'My Code.v2')])) + expect(Object.keys(result.workflow.blocks)).toEqual(['mycodev2']) + expect(result.identity.blocks.mycodev2.id).toBe('b1') + }) + + it('gives the dot-free name the key and keys the dotted loser key~2 with an error (quirk 21)', () => { + const result = run( + workflow([blockState('b1', 'function', 'Agent.1'), blockState('b2', 'function', 'Agent 1')]) + ) + expect(result.identity.blocks.agent1.id).toBe('b2') + expect(result.identity.blocks['agent1~2'].id).toBe('b1') + expect(codes(result)).toContain('E_CANON_LEGACY_NAME_COLLISION') + }) + + it('keeps the first of two dot-free colliding names, as the resolver does (quirk 21)', () => { + const result = run( + workflow([blockState('b1', 'function', 'agent 1'), blockState('b2', 'function', 'Agent1')]) + ) + expect(result.identity.blocks.agent1.id).toBe('b1') + expect(result.identity.blocks['agent1~2'].id).toBe('b2') + }) + + it('skips a ~n suffix another block already owns (quirk 21)', () => { + const result = run( + workflow([ + blockState('b1', 'function', 'x'), + blockState('b2', 'function', 'x~2'), + blockState('b3', 'function', 'X'), + ]) + ) + expect(result.identity.blocks['x~3'].id).toBe('b3') + }) + + it('warns when a name normalizes to a reserved prefix (quirk 21)', () => { + const result = run(workflow([blockState('b1', 'function', 'Loop')])) + expect(codes(result)).toContain('W_CANON_RESERVED_NAME') + }) + + it('rewrites reference prefixes to the normalized form the resolver matches (quirk 21)', () => { + const result = run( + workflow([ + blockState('b1', 'function', 'My Agent'), + blockState('b2', 'function', 'Code', { + code: 'return + + + a + + + a { + const result = run( + workflow( + [ + blockState('b1', 'function', 'Code', { + code: ' ', + }), + ], + { + variables: { 'v-1': { id: 'v-1', name: 'My Var', type: 'string', value: 'a' } }, + } + ) + ) + expect(value(onlyBlock(result, 'code').params.code)).toBe( + ' ' + ) + expect(result.identity.variables).toEqual({ myvar: 'v-1' }) + }) +}) + +describe('canonicalize: params (step 3)', () => { + it('drops runtime ids, synthetic tool mirrors and parked keys (quirks 11, 12, 23)', () => { + const result = run( + workflow([ + blockState('b1', 'slack', 'Slack', { + operation: 'send', + webhookId: 'wh', + triggerPath: 'b1', + triggerConfig: { a: 1 }, + triggerId: 'slack_webhook', + 'tools-tool-0-channel': 'C1', + _removed_legacy: 'secret', + }), + ]) + ) + expect(Object.keys(onlyBlock(result, 'slack').params)).toEqual(['operation']) + }) + + it('drops a null value and keeps an empty string (quirk 25)', () => { + const result = run( + workflow([blockState('b1', 'slack', 'Slack', { operation: '', text: null })]) + ) + const params = onlyBlock(result, 'slack').params + expect(params.operation).toEqual({ kind: 'value', value: '' }) + expect(params.text).toBeUndefined() + }) + + it('keeps stored outputs out of the model (quirk 26)', () => { + const plain = run(workflow([blockState('b1', 'function', 'Code', { code: 'x' })])) + const withOutputs = run( + workflow([ + blockState( + 'b1', + 'function', + 'Code', + { code: 'x' }, + { + outputs: { result: { type: 'json' } } as BlockState['outputs'], + } + ), + ]) + ) + expect(canonicalEquals(plain.workflow, withOutputs.workflow)).toBe(true) + }) + + it('decodes structured JSON text and never decodes code or long-input (quirk 9)', () => { + const result = run( + workflow([ + blockState('b1', 'knowledge', 'KB', { tagFilters: ' [ {"tag":"a"} ] ' }), + blockState('b2', 'agent', 'Agent', { responseFormat: '{"type":"object"}' }), + blockState('b3', 'slack', 'Slack', { operation: 'send', text: '{"blocks":[]}' }), + ]) + ) + expect(value(onlyBlock(result, 'kb').params.tagFilters)).toEqual([{ tag: 'a' }]) + expect(value(onlyBlock(result, 'agent').params.responseFormat)).toBe('{"type":"object"}') + expect(value(onlyBlock(result, 'slack').params.text)).toBe('{"blocks":[]}') + }) + + it('keeps undecodable structured text and reports it (quirk 9)', () => { + const result = run(workflow([blockState('b1', 'knowledge', 'KB', { tagFilters: '[{oops' })])) + expect(value(onlyBlock(result, 'kb').params.tagFilters)).toBe('[{oops') + expect(codes(result)).toContain('W_CANON_UNDECODABLE_JSON') + }) + + it('drops table row ids and blank starter rows but keeps other row shapes (quirk 24)', () => { + const result = run( + workflow([ + blockState('b1', 'api', 'API', { + headers: [ + { id: 'r1', cells: { Key: 'a', Value: '1' } }, + { id: 'r2', cells: { Key: '', Value: '' } }, + { name: 'flat', value: 'row' }, + ], + }), + ]) + ) + expect(value(onlyBlock(result, 'api').params.headers)).toEqual([ + { cells: { Key: 'a', Value: '1' } }, + { name: 'flat', value: 'row' }, + ]) + }) + + it('moves inputFormat ids to identity items, keeping ids of shared names inline (quirks 24, 27)', () => { + const result = run( + workflow([ + blockState('b1', 'start_trigger', 'Start', { + inputFormat: [ + { id: 'f1', name: 'email', type: 'string', collapsed: true }, + { id: 'f2', name: 'dup', type: 'string' }, + { id: 'f3', name: 'dup', type: 'number' }, + ], + }), + ]) + ) + expect(value(onlyBlock(result, 'start').params.inputFormat)).toEqual([ + { name: 'email', type: 'string' }, + { id: 'f2', name: 'dup', type: 'string' }, + { id: 'f3', name: 'dup', type: 'number' }, + ]) + expect(result.identity.blocks.start.items).toEqual({ + inputFormat: [{ name: 'email', id: 'f1' }], + }) + }) + + it('wraps a stored object that already has a $sim key as a literal', () => { + const result = run( + workflow([blockState('b1', 'agent', 'Agent', { messages: [{ $sim: 'var', key: 'x' }] })]) + ) + expect(value(onlyBlock(result, 'agent').params.messages)).toEqual([ + { $sim: 'literal', value: { $sim: 'var', key: 'x' } }, + ]) + }) + + it('reports stored subBlock type drift and a map key that differs from subBlock.id (quirk 29)', () => { + const state = workflow([blockState('b1', 'function', 'Code', { code: 'x' })]) + state.blocks.b1.subBlocks.code = { id: 'other', type: 'short-input', value: 'x' } + const result = run(state) + expect(result.diagnostics.filter((d) => d.code === 'W_CANON_SUBBLOCK_TYPE_DRIFT')).toHaveLength( + 2 + ) + expect(value(onlyBlock(result, 'code').params.code)).toBe('x') + }) + + it('keeps a legacy or unknown block type with verbatim params (quirks 15, 16)', () => { + const result = run(workflow([blockState('b1', 'legacy_v1', 'Old', { oldField: ' {"a":1} ' })])) + expect(value(onlyBlock(result, 'old').params.oldField)).toBe(' {"a":1} ') + expect(onlyBlock(result, 'old').type).toBe('legacy_v1') + expect(codes(result)).toContain('W_CANON_UNKNOWN_BLOCK_TYPE') + expect(result.workflow.annotations.inactive.old).toBeUndefined() + }) + + it('keys custom block params by subBlock id (quirk 18)', () => { + const result = run( + workflow([blockState('b1', 'custom_block_acme', 'Acme', { '9b0c0d5e-field': 'v' })]) + ) + expect(value(onlyBlock(result, 'acme').params['9b0c0d5e-field'])).toBe('v') + }) +}) + +describe('canonicalize: resources and variables (step 8)', () => { + const resolver: ResourceKeyResolver = { + toKey: (kind, id) => (id.startsWith('known-') ? `${kind}:${id.slice(6)}` : null), + toId: () => null, + } + + it('lifts selector ids through the resolver and keeps misses verbatim with a warning', () => { + const result = run( + workflow([ + blockState('b1', 'table', 'Table', { tableId: 'known-leads' }), + blockState('b2', 'table', 'Table 2', { tableId: 'gone' }), + ]), + { resources: resolver } + ) + expect(value(onlyBlock(result, 'table').params.tableId)).toEqual({ + $sim: 'resource', + kind: 'table', + key: 'table:leads', + }) + expect(value(onlyBlock(result, 'table2').params.tableId)).toEqual({ + $sim: 'unresolved', + kind: 'table', + id: 'gone', + }) + expect(codes(result)).toContain('W_CANON_UNRESOLVED_ID') + }) + + it('lifts a comma-joined multi-select into a csv node and leaves references alone', () => { + const result = run( + workflow([ + blockState('b1', 'knowledge', 'KB', { knowledgeBaseIds: 'known-a, known-b' }), + blockState('b2', 'knowledge', 'KB 2', { knowledgeBaseIds: '' }), + ]), + { resources: resolver } + ) + expect(value(onlyBlock(result, 'kb').params.knowledgeBaseIds)).toEqual({ + $sim: 'csv', + items: [ + { $sim: 'resource', kind: 'knowledge-base', key: 'knowledge-base:a' }, + { $sim: 'resource', kind: 'knowledge-base', key: 'knowledge-base:b' }, + ], + }) + expect(value(onlyBlock(result, 'kb2').params.knowledgeBaseIds)).toBe('') + }) + + it('lifts variables-input ids to var nodes, decoding JSON text', () => { + const result = run( + workflow( + [ + blockState('b1', 'variables', 'Vars', { + variables: JSON.stringify([ + { id: 'row1', variableId: 'v-1', value: '1' }, + { id: 'row2', variableId: 'v-missing', value: '2' }, + ]), + }), + ], + { variables: { 'v-1': { id: 'v-1', name: 'Count', type: 'number', value: 0 } } } + ) + ) + expect(value(onlyBlock(result, 'vars').params.variables)).toEqual([ + { id: 'row1', variableId: { $sim: 'var', key: 'count' }, value: '1' }, + { id: 'row2', variableId: { $sim: 'unresolved', kind: 'var', id: 'v-missing' }, value: '2' }, + ]) + expect(codes(result)).toContain('W_CANON_UNRESOLVED_ID') + }) +}) + +describe('canonicalize: modes (step 4, quirk 2)', () => { + it('uses an explicit override even when the other member holds the value', () => { + const result = run( + workflow([ + blockState( + 'b1', + 'slack', + 'Slack', + { manualChannel: 'C9' }, + { data: { canonicalModes: { channel: 'basic' } } } + ), + ]) + ) + expect(onlyBlock(result, 'slack').modes.channel).toBe('basic') + }) + + it('infers advanced when only the advanced member holds a value', () => { + const result = run(workflow([blockState('b1', 'slack', 'Slack', { manualChannel: 'C9' })])) + expect(onlyBlock(result, 'slack').modes).toEqual({ + channel: 'advanced', + oauthCredential: 'basic', + }) + }) + + it('makes every pair advanced under legacy advancedMode unless overridden', () => { + const result = run( + workflow([ + blockState( + 'b1', + 'slack', + 'Slack', + { channel: 'C1' }, + { + advancedMode: true, + data: { canonicalModes: { oauthCredential: 'basic' } }, + } + ), + ]) + ) + expect(onlyBlock(result, 'slack').modes).toEqual({ + channel: 'advanced', + oauthCredential: 'basic', + }) + }) +}) + +describe('canonicalize: inactive annotation (step 9, quirks 1, 10, 14)', () => { + it('keeps a stale hidden value and marks it inactive', () => { + const result = run( + workflow([blockState('b1', 'slack', 'Slack', { operation: 'read', text: 'old' })]) + ) + expect(value(onlyBlock(result, 'slack').params.text)).toBe('old') + expect(result.workflow.annotations.inactive.slack).toEqual(['text']) + }) + + it('treats a non-empty standalone advanced field as active even with advanced off (quirk 1)', () => { + const result = run( + workflow([blockState('b1', 'slack', 'Slack', { operation: 'send', threadTs: '1.2' })]) + ) + expect(result.workflow.annotations.inactive.slack).toBeUndefined() + }) + + it('marks the dormant member of a pair inactive and counts an opaque condition as active', () => { + const result = run( + workflow([ + blockState( + 'b1', + 'slack', + 'Slack', + { channel: 'C1', manualChannel: 'C9' }, + { + data: { canonicalModes: { channel: 'advanced' } }, + } + ), + ]) + ) + expect(result.workflow.annotations.inactive.slack).toEqual(['channel']) + }) + + it('marks trigger fields inactive outside trigger mode and active inside it (quirk 10)', () => { + const action = run( + workflow([blockState('b1', 'slack', 'Slack', { operation: 'send', botToken: 't' })]) + ) + expect(action.workflow.annotations.inactive.slack).toEqual(['botToken']) + const trigger = run( + workflow([ + blockState( + 'b1', + 'slack', + 'Slack', + { botToken: 't', signingSecret: 's' }, + { triggerMode: true } + ), + ]) + ) + expect(trigger.workflow.annotations.inactive.slack).toBeUndefined() + }) + + it('marks action fields inactive on a trigger-mode block (quirk 10)', () => { + const result = run( + workflow([ + blockState( + 'b1', + 'slack', + 'Slack', + { operation: 'send', botToken: 't' }, + { triggerMode: true } + ), + ]) + ) + expect(result.workflow.annotations.inactive.slack).toEqual(['operation']) + }) + + it('counts a duplicated id active when any surface declaration serializes (quirk 14)', () => { + const action = run( + workflow([blockState('b1', 'slack', 'Slack', { operation: 'send', signingSecret: 's' })]) + ) + expect(action.workflow.annotations.inactive.slack).toEqual(['signingSecret']) + }) + + it('marks tool-input-only and undeclared fields inactive, except on custom blocks (quirk 18)', () => { + const result = run( + workflow([ + blockState('b1', 'slack', 'Slack', { operation: 'send', scopeNote: 'x', legacyField: 'y' }), + blockState('b2', 'custom_block_acme', 'Acme', { undeclared: 'z', workflowId: 'wf' }), + ]) + ) + expect(result.workflow.annotations.inactive.slack).toEqual(['scopeNote', 'legacyField']) + expect(result.workflow.annotations.inactive.acme).toEqual(['workflowId']) + }) +}) + +describe('canonicalize: tools (step 5, quirks 3, 17, 24)', () => { + const tools = [ + { + type: 'table', + title: 'Leads', + params: { tableId: 'tbl-1', manualTableId: '', limit: '10', includeMeta: 'true' }, + isExpanded: true, + }, + { type: 'table', toolId: 'table_query', params: { manualTableId: 'tbl-2' } }, + { + type: 'custom-tool', + customToolId: 'ct-1', + schema: { name: 'x' }, + code: 'return 1', + usageControl: 'force', + futureKey: 1, + }, + ] + + it('lifts index-scoped modes over legacy type-scoped ones, independently per tool (quirk 3)', () => { + const result = run( + workflow([ + blockState( + 'b1', + 'agent', + 'Agent', + { tools }, + { + data: { canonicalModes: { 'table:tableId': 'advanced', '0:tableId': 'basic' } }, + } + ), + ]) + ) + const param = onlyBlock(result, 'agent').params.tools + expect(param?.kind).toBe('tools') + if (param?.kind !== 'tools') return + expect(param.tools[0].modes).toEqual({ tableId: 'basic' }) + expect(param.tools[1].modes).toEqual({ tableId: 'advanced' }) + }) + + it('decodes params by sub-block shape, drops isExpanded and keeps unknown keys (quirks 9, 24)', () => { + const result = run( + workflow([blockState('b1', 'agent', 'Agent', { tools: JSON.stringify(tools) })]) + ) + const param = onlyBlock(result, 'agent').params.tools + if (param?.kind !== 'tools') throw new Error('expected tools') + expect(param.tools[0]).toEqual({ + type: 'table', + title: 'Leads', + params: { + tableId: { $sim: 'unresolved', kind: 'table', id: 'tbl-1' }, + manualTableId: '', + limit: '10', + includeMeta: true, + }, + modes: { tableId: 'basic' }, + }) + expect(param.tools[2]).toEqual({ + type: 'custom-tool', + params: {}, + modes: {}, + usageControl: 'force', + customTool: { + ref: { $sim: 'unresolved', kind: 'custom-tool', id: 'ct-1' }, + snapshot: { schema: { name: 'x' }, code: 'return 1' }, + }, + extra: { futureKey: 1 }, + }) + }) + + it('keeps a list with an untyped entry verbatim as a value', () => { + const result = run( + workflow([blockState('b1', 'agent', 'Agent', { tools: [{ title: 'no type' }] })]) + ) + expect(onlyBlock(result, 'agent').params.tools).toEqual({ + kind: 'value', + value: [{ title: 'no type' }], + }) + }) +}) + +describe('canonicalize: branches (step 6, quirks 4-8)', () => { + const conditionRows = (id: string) => [ + { + id: `${id}-if`, + title: 'if', + value: ' > 1', + showTags: false, + searchTerm: '', + cursorPosition: 3, + }, + { + id: `${id}-else-if-1700000000000`, + title: 'else if', + value: 'true', + activeSourceBlockId: null, + }, + { id: `${id}-else-if-1700000000001`, title: 'else if', value: 'false' }, + { id: `${id}-else`, title: 'else', value: '' }, + ] + + it('names rows by position with copilot-style keys and strips UI state (quirks 6, 8)', () => { + const result = run( + workflow([ + blockState('c1', 'condition', 'Cond', { conditions: JSON.stringify(conditionRows('c1')) }), + ]) + ) + const cond = onlyBlock(result, 'cond') + expect(cond.params.conditions).toBeUndefined() + expect(cond.branches).toEqual({ + kind: 'condition', + rows: [ + { key: 'if', value: ' > 1' }, + { key: 'elseIf0', value: 'true' }, + { key: 'elseIf1', value: 'false' }, + { key: 'else', value: '' }, + ], + }) + expect(result.identity.blocks.cond.branches).toEqual({ + if: 'c1-if', + elseIf0: 'c1-else-if-1700000000000', + elseIf1: 'c1-else-if-1700000000001', + else: 'c1-else', + }) + }) + + it('takes keys from the lock by row id first, then a persisted row key (quirk 5)', () => { + const rows = conditionRows('c1').map((row, index) => + index === 1 ? { ...row, key: 'isVip' } : row + ) + const result = run(workflow([blockState('c1', 'condition', 'Cond', { conditions: rows })]), { + lock: { + lockVersion: 1, + variables: {}, + blocks: { + cond: { + id: 'c1', + parent: null, + binding: 'cond', + order: 0, + branches: { highValue: 'c1-if' }, + }, + }, + }, + }) + expect(onlyBlock(result, 'cond').branches?.rows?.map((row) => row.key)).toEqual([ + 'highValue', + 'isVip', + 'elseIf1', + 'else', + ]) + }) + + it('keys rows the same whatever their id format (quirk 5)', () => { + const uuidRows = conditionRows('c1').map((row, index) => ({ + ...row, + id: `00000000-0000-4000-8000-00000000000${index}`, + })) + const a = run( + workflow([blockState('c1', 'condition', 'Cond', { conditions: conditionRows('c1') })]) + ) + const b = run(workflow([blockState('c1', 'condition', 'Cond', { conditions: uuidRows })])) + expect(canonicalEquals(a.workflow, b.workflow)).toBe(true) + }) + + it('records a non-positional title as an override, and a missing title, with a warning (quirk 4)', () => { + const rows = [ + { id: 'a', title: 'if', value: 'x' }, + { id: 'b', title: 'Otherwise', value: '' }, + { id: 'c', value: '' }, + ] + const result = run(workflow([blockState('c1', 'condition', 'Cond', { conditions: rows })])) + expect(onlyBlock(result, 'cond').branches?.rows).toEqual([ + { key: 'if', value: 'x' }, + { key: 'elseIf0', value: '', titleOverride: 'Otherwise' }, + { key: 'else', value: '', titleMissing: true }, + ]) + expect(codes(result)).toContain('W_CANON_TITLE_OVERRIDE') + }) + + it('leaves a never-persisted list as rows: null, answering to the implicit ids (quirk 7)', () => { + const result = run( + workflow( + [ + blockState('c1', 'condition', 'Cond'), + blockState('f1', 'function', 'A'), + blockState('f2', 'function', 'B'), + ], + { + edges: [ + { id: 'e1', source: 'c1', target: 'f1', sourceHandle: 'condition-c1-if' }, + { id: 'e2', source: 'c1', target: 'f2', sourceHandle: 'condition-c1-else' }, + ], + } + ) + ) + expect(onlyBlock(result, 'cond').branches).toEqual({ kind: 'condition', rows: null }) + expect(result.workflow.edges).toEqual([ + { from: 'cond', port: { kind: 'branch', key: 'else' }, to: 'b' }, + { from: 'cond', port: { kind: 'branch', key: 'if' }, to: 'a' }, + ]) + }) + + it('names router rows route0..n and treats a stored "Route n" title as positional (quirk 8)', () => { + const result = run( + workflow([ + blockState('r1', 'router_v2', 'Router', { + routes: JSON.stringify([ + { id: 'r1-route1', title: 'Route 1', value: 'billing' }, + { id: 'r1-x', title: 'route-1700', value: 'support' }, + ]), + }), + ]) + ) + expect(onlyBlock(result, 'router').branches?.rows).toEqual([ + { key: 'route0', value: 'billing' }, + { key: 'route1', value: 'support', titleOverride: 'route-1700' }, + ]) + expect(codes(result)).not.toContain('W_CANON_TITLE_OVERRIDE') + }) + + it('keeps an unliftable branch value verbatim as a param (quirk 6)', () => { + const result = run( + workflow([blockState('c1', 'condition', 'Cond', { conditions: '{not json' })]) + ) + const cond = onlyBlock(result, 'cond') + expect(cond.params.conditions).toEqual({ kind: 'value', value: '{not json' }) + expect(cond.branches?.rows).toBeNull() + expect(result.diagnostics.filter((d) => d.code === 'W_CANON_UNDECODABLE_JSON')).toHaveLength(1) + }) +}) + +describe('canonicalize: edges (step 7, quirk 20)', () => { + const blocks = [ + blockState('f1', 'function', 'A'), + blockState('f2', 'function', 'B', {}, { errorEnabled: false }), + blockState('f3', 'function', 'C'), + ] + + it('heals side-anchored and empty handles, derives errorPort from an error edge, and sorts', () => { + const result = run( + workflow(blocks, { + edges: [ + { id: 'e2', source: 'f2', target: 'f3', sourceHandle: 'error' }, + { + id: 'e1', + source: 'f1', + target: 'f2', + sourceHandle: 'source-right', + targetHandle: 'target-left', + }, + { id: 'e3', source: 'f1', target: 'f3', sourceHandle: '' }, + { id: 'e4', source: 'f1', target: 'f3', sourceHandle: null }, + ], + }) + ) + expect(result.workflow.edges).toEqual([ + { from: 'a', port: { kind: 'out' }, to: 'b' }, + { from: 'a', port: { kind: 'out' }, to: 'c' }, + { from: 'b', port: { kind: 'error' }, to: 'c' }, + ]) + expect(onlyBlock(result, 'b').errorPort).toBe(true) + expect(onlyBlock(result, 'a').errorPort).toBe(false) + }) + + it('keeps unknown handles as raw ports, drops dangling edges and reports scope violations', () => { + const result = run( + workflow( + [ + ...blocks, + blockState('l1', 'loop', 'Loop 1', {}, { data: { loopType: 'for', count: 3 } }), + blockState( + 'in', + 'function', + 'Inside', + {}, + { data: { parentId: 'l1', extent: 'parent' } } + ), + ], + { + edges: [ + { id: 'e1', source: 'f1', target: 'f2', sourceHandle: 'legacy-handle' }, + { id: 'e2', source: 'f1', target: 'ghost' }, + { id: 'e3', source: 'f1', target: 'in' }, + { id: 'e4', source: 'l1', target: 'in', sourceHandle: 'loop-start-source' }, + { id: 'e5', source: 'l1', target: 'f3', sourceHandle: 'loop-end-source' }, + ], + } + ) + ) + expect(result.workflow.edges).toContainEqual({ + from: 'a', + port: { kind: 'raw', handle: 'legacy-handle' }, + to: 'b', + }) + expect(result.workflow.edges).toContainEqual({ + from: 'loop1', + port: { kind: 'subflowStart' }, + to: 'inside', + }) + expect(result.workflow.edges).toContainEqual({ + from: 'loop1', + port: { kind: 'subflowEnd' }, + to: 'c', + }) + expect(codes(result)).toEqual( + expect.arrayContaining(['W_CANON_RAW_HANDLE', 'W_CANON_DANGLING_EDGE', 'E_CANON_EDGE_SCOPE']) + ) + expect(result.workflow.edges.some((edge) => edge.to === 'ghost')).toBe(false) + }) +}) + +describe('canonicalize: subflows (step 2, quirk 19)', () => { + it('reads block.data first, fills from the loops map, and keeps a raw 0 count with a warning', () => { + const result = run( + workflow( + [ + blockState( + 'l1', + 'loop', + 'Each', + {}, + { data: { loopType: 'forEach', count: 0, collection: '' } } + ), + ], + { + loops: { + l1: { + id: 'l1', + nodes: [], + iterations: 9, + loopType: 'for', + whileCondition: 'w', + enabled: true, + }, + }, + } + ) + ) + expect(onlyBlock(result, 'each').subflow).toEqual({ + kind: 'loop', + loopType: 'forEach', + iterations: 0, + forEachItems: '', + whileCondition: 'w', + }) + expect(codes(result)).toContain('W_CANON_SUBFLOW_REPAIRED') + }) + + it('keeps an unknown parallel type under opaque data and reports it', () => { + const result = run( + workflow([ + blockState( + 'p1', + 'parallel', + 'Fan', + {}, + { data: { parallelType: 'weird' as never, count: 3, batchSize: 50 } } + ), + ]) + ) + const fan = onlyBlock(result, 'fan') + expect(fan.subflow).toEqual({ kind: 'parallel', count: 3, batchSize: 50 }) + expect(fan.opaque).toEqual({ data: { parallelType: 'weird' } }) + expect(result.diagnostics.filter((d) => d.code === 'W_CANON_SUBFLOW_REPAIRED')).toHaveLength(2) + }) + + it('takes the parent from data.parentId, and keeps a dangling parent under opaque data', () => { + const result = run( + workflow([ + blockState('l1', 'loop', 'Each', {}, { data: { loopType: 'for', count: 2 } }), + blockState('a', 'function', 'In', {}, { data: { parentId: 'l1', extent: 'parent' } }), + blockState('b', 'function', 'Lost', {}, { data: { parentId: 'gone' } }), + ]) + ) + expect(onlyBlock(result, 'in').parent).toBe('each') + expect(onlyBlock(result, 'in').opaque).toBeUndefined() + expect(onlyBlock(result, 'lost').parent).toBeNull() + expect(onlyBlock(result, 'lost').opaque).toEqual({ data: { parentId: 'gone' } }) + expect(codes(result)).toContain('W_CANON_DANGLING_PARENT') + }) +}) + +describe('canonicalize: block fields (quirk 22)', () => { + it('carries locked, triggerMode and advancedMode, raw retry, and unknown data under opaque', () => { + const result = run( + workflow([ + blockState( + 'b1', + 'function', + 'Code', + {}, + { + locked: true, + retry: { enabled: false, maxTries: 4, waitBetweenTriesMs: 10 }, + data: { width: 100, someFutureFlag: 'x' } as BlockState['data'], + layout: { measuredWidth: 3 }, + position: { x: 5, y: 6 }, + } + ), + ]) + ) + const code = onlyBlock(result, 'code') + expect(code.locked).toBe(true) + expect(code.retry).toEqual({ enabled: false, maxTries: 4, waitBetweenTriesMs: 10 }) + expect(code.opaque).toEqual({ data: { someFutureFlag: 'x' } }) + expect(result.layout.code).toEqual({ x: 5, y: 6, w: 100 }) + }) +}) + +/* + * Idempotence (s1 §6 O3 input side): stored encodings that execute identically canonicalize to + * equal models. A seeded generator builds random workflows, then re-encodes each one in ways the + * canvas, the edit engine and jsonb produce, and every re-encoding must compare and hash equal. + */ +/** A runtime global (Node 17+, browsers); this package type-checks with `types: []`. */ +declare function structuredClone(value: T): T + +function mulberry32(seed: number): () => number { + let state = seed + return () => { + state = (state + 0x6d2b79f5) | 0 + let t = Math.imul(state ^ (state >>> 15), 1 | state) + t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t + return ((t ^ (t >>> 14)) >>> 0) / 4294967296 + } +} + +function shuffleKeys(value: unknown, random: () => number): unknown { + if (Array.isArray(value)) return value.map((item) => shuffleKeys(item, random)) + if (value === null || typeof value !== 'object') return value + const entries = Object.entries(value).map( + ([key, member]) => [key, shuffleKeys(member, random)] as const + ) + for (let i = entries.length - 1; i > 0; i--) { + const j = Math.floor(random() * (i + 1)) + ;[entries[i], entries[j]] = [entries[j], entries[i]] + } + return Object.fromEntries(entries) +} + +function randomWorkflow(random: () => number): WorkflowState { + const pick = (items: readonly T[]): T => items[Math.floor(random() * items.length)] + const rowCount = 1 + Math.floor(random() * 4) + const rows = Array.from({ length: rowCount }, (_, index) => ({ + id: `c-${index}-${Math.floor(random() * 1000)}`, + title: index === 0 ? 'if' : index === rowCount - 1 ? 'else' : 'else if', + value: pick(['', 'x > 1', ' === 2']), + })) + const blocks = [ + blockState('s', 'start_trigger', 'Start', { + inputFormat: [{ id: 'f1', name: pick(['a', 'b']), type: 'string' }], + }), + blockState('c', 'condition', 'Cond', { conditions: JSON.stringify(rows) }), + blockState( + 'sl', + 'slack', + 'Slack', + { + operation: pick(['send', 'read']), + text: pick(['hi', '']), + [pick(['channel', 'manualChannel'])]: 'C1', + }, + { + data: + random() < 0.5 + ? { canonicalModes: { channel: pick(['basic', 'advanced'] as const) } } + : {}, + } + ), + blockState( + 'ag', + 'agent', + 'Agent', + { + tools: [ + { type: 'table', params: { tableId: 't', limit: pick(['5', '']) } }, + { type: 'table', params: { manualTableId: 'm' } }, + ], + }, + { + data: { + canonicalModes: { [`${pick([0, 1])}:tableId`]: pick(['basic', 'advanced'] as const) }, + }, + } + ), + blockState('api', 'api', 'API', { + headers: [{ id: 'h', cells: { Key: 'k', Value: pick(['v', 'w']) } }], + }), + ] + return workflow(blocks, { + edges: [ + { id: 'e1', source: 's', target: 'c', sourceHandle: 'source' }, + { id: 'e2', source: 'c', target: 'sl', sourceHandle: `condition-${rows[0].id}` }, + { id: 'e3', source: 'sl', target: 'ag', sourceHandle: 'error' }, + { id: 'e4', source: 'ag', target: 'api', sourceHandle: null }, + ], + }) +} + +type Reencoding = (state: WorkflowState, random: () => number) => WorkflowState + +const REENCODINGS: Record = { + 'jsonb key order (quirk 28)': (state, random) => shuffleKeys(state, random) as WorkflowState, + 'JSON text with whitespace vs native arrays (quirk 9)': (state) => { + const next = structuredClone(state) + const conditions = next.blocks.c.subBlocks.conditions + conditions.value = JSON.stringify(JSON.parse(String(conditions.value)), null, 2) + const tools = next.blocks.ag.subBlocks.tools + tools.value = ` ${JSON.stringify(tools.value)} ` as never + return next + }, + 'condition UI junk (quirk 6)': (state) => { + const next = structuredClone(state) + const conditions = next.blocks.c.subBlocks.conditions + const rows = JSON.parse(String(conditions.value)) as Array> + conditions.value = JSON.stringify( + rows.map((row) => ({ + ...row, + showTags: true, + showEnvVars: false, + searchTerm: 'q', + cursorPosition: 4, + activeSourceBlockId: 'x', + })) + ) + return next + }, + 'legacy type-scoped tool modes (quirk 3)': (state) => { + // `${i}:tableId` alone equals the legacy `table:tableId` baseline (which reaches both table + // tools) plus an index key pinning the other tool to the mode it inferred before: tool 0 + // holds the basic member, tool 1 the advanced one. + const next = structuredClone(state) + const data = next.blocks.ag.data ?? {} + const [[indexKey, mode]] = Object.entries(data.canonicalModes ?? {}) + const other = indexKey.startsWith('0:') ? 1 : 0 + next.blocks.ag.data = { + ...data, + canonicalModes: { + 'table:tableId': mode, + [`${other}:tableId`]: other === 0 ? 'basic' : 'advanced', + }, + } + return next + }, + 'editor-only tool and field state (quirk 24)': (state) => { + const next = structuredClone(state) + const tools = next.blocks.ag.subBlocks.tools.value as unknown as Array> + next.blocks.ag.subBlocks.tools.value = tools.map((tool) => ({ + ...tool, + isExpanded: true, + })) as never + const fields = next.blocks.s.subBlocks.inputFormat.value as unknown as Array< + Record + > + next.blocks.s.subBlocks.inputFormat.value = fields.map((field) => ({ + ...field, + collapsed: true, + })) as never + const headers = next.blocks.api.subBlocks.headers.value as unknown as unknown[] + next.blocks.api.subBlocks.headers.value = [ + ...headers, + { id: 'starter', cells: { Key: '', Value: '' } }, + ] as never + return next + }, + 'side-anchored and empty handles (quirk 20)': (state) => { + const next = structuredClone(state) + next.edges = next.edges.map((edge: WorkflowState['edges'][number]) => + edge.sourceHandle === 'source' + ? { ...edge, sourceHandle: 'source-right' } + : edge.sourceHandle === null + ? { ...edge, sourceHandle: '' } + : edge + ) + return next + }, + 'synthetic mirrors and runtime ids (quirks 11, 12, 23)': (state) => { + const next = structuredClone(state) + next.blocks.ag.subBlocks['tools-tool-0-limit'] = { + id: 'tools-tool-0-limit', + type: 'short-input', + value: '5', + } + next.blocks.s.subBlocks.triggerPath = { id: 'triggerPath', type: 'short-input', value: 's' } + return next + }, + 'stored subBlock type drift (quirk 29)': (state) => { + const next = structuredClone(state) + next.blocks.sl.subBlocks.operation = { ...next.blocks.sl.subBlocks.operation, type: 'combobox' } + return next + }, +} + +describe('canonicalize: equivalent encodings give equal models (idempotence)', () => { + for (const [name, reencode] of Object.entries(REENCODINGS)) { + it(name, () => { + for (let seed = 1; seed <= 40; seed++) { + const random = mulberry32(seed) + const state = randomWorkflow(random) + const base = run(state).workflow + const other = run(reencode(state, random)).workflow + expect(canonicalEquals(base, other), `seed ${seed}`).toBe(true) + expect(canonicalHash(other)).toBe(canonicalHash(base)) + } + }) + } + + it('is deterministic and never mutates its input', () => { + for (let seed = 1; seed <= 20; seed++) { + const state = randomWorkflow(mulberry32(seed)) + const snapshot = structuredClone(state) + const first = run(state) + const second = run(state) + expect(state).toEqual(snapshot) + expect(second).toEqual(first) + } + }) + + it('distinguishes a semantic change from a re-encoding', () => { + for (let seed = 1; seed <= 20; seed++) { + const state = randomWorkflow(mulberry32(seed)) + const changed = structuredClone(state) + changed.blocks.api.subBlocks.url = { id: 'url', type: 'short-input', value: 'https://x' } + const a: CanonicalWorkflow = run(state).workflow + const b: CanonicalWorkflow = run(changed).workflow + expect(canonicalEquals(a, b)).toBe(false) + expect(canonicalHash(a)).not.toBe(canonicalHash(b)) + } + }) +}) diff --git a/packages/workflow-code/src/canonicalize/index.ts b/packages/workflow-code/src/canonicalize/index.ts new file mode 100644 index 00000000000..5e401b2491a --- /dev/null +++ b/packages/workflow-code/src/canonicalize/index.ts @@ -0,0 +1,303 @@ +import { isRecordLike, toRecord } from '@sim/utils/object' +import { + type BlockRetryConfig, + type BlockState, + normalizeBlockRetryTries, + normalizeBlockRetryWaitMs, + resolveEffectiveErrorEnabled, +} from '@sim/workflow-types/workflow' +import type { CanonicalizeFn } from '../api' +import { buildCanonicalIndex, type CanonicalModeOverrides } from '../catalog/canonical-index' +import type { CanonicalizeDiagnosticCode } from '../diagnostics/codes' +import type { Diagnostic } from '../diagnostics/frame' +import type { LockIdentity, LockIdentityBlock, LockLayout } from '../lock' +import type { + BlockKey, + BranchKey, + CanonicalBlock, + CanonicalVariable, + CanonicalWorkflow, + Json, + SubBlockId, + VarKey, +} from '../model' +import { isInactive } from './activity' +import { type LiftedBranches, liftBranches } from './branches' +import { type CanonContext, catalogBlock, report } from './context' +import { canonicalEdges } from './edges' +import { assignBlockKeys, assignVariableKeys } from './keys' +import { effectiveModes } from './modes' +import { canonicalParams } from './params' +import { loopSpec, parallelSpec, SUBFLOW_DATA_KEYS } from './subflows' +import { toJson, toValue } from './values' + +/** `block.data` keys the model or the lock layout owns; anything else is kept under `opaque`. */ +const LAYOUT_DATA_KEYS = new Set(['width', 'height']) +const MODES = new Set(['basic', 'advanced']) + +function isRetryConfig(value: unknown): value is BlockRetryConfig { + return ( + isRecordLike(value) && + typeof value.enabled === 'boolean' && + typeof value.maxTries === 'number' && + typeof value.waitBetweenTriesMs === 'number' && + Object.keys(value).length === 3 + ) +} + +/** + * The stored retry policy, raw: numbers are kept when it is disabled (workflow.ts:87-101). A + * malformed policy is normalized the way every reader clamps it. + */ +function canonicalRetry(retry: unknown): BlockRetryConfig | null { + if (retry === undefined || retry === null) return null + if (isRetryConfig(retry)) return { ...retry } + const record = toRecord(retry) + return { + enabled: record.enabled === true, + maxTries: normalizeBlockRetryTries(record.maxTries), + waitBetweenTriesMs: normalizeBlockRetryWaitMs(record.waitBetweenTriesMs), + } +} + +function canonicalModeOverrides(data: Record): CanonicalModeOverrides | undefined { + const stored = data.canonicalModes + if (!isRecordLike(stored)) return undefined + const overrides: CanonicalModeOverrides = {} + for (const [id, mode] of Object.entries(stored)) { + if (typeof mode === 'string' && MODES.has(mode)) overrides[id] = mode as 'basic' | 'advanced' + } + return overrides +} + +function isModeMap(value: unknown): boolean { + return ( + isRecordLike(value) && + Object.values(value).every((mode) => typeof mode === 'string' && MODES.has(mode)) + ) +} + +function layoutOf(block: BlockState): LockLayout { + const layout: LockLayout = { x: block.position?.x ?? 0, y: block.position?.y ?? 0 } + const data = block.data ?? {} + if (typeof data.width === 'number') layout.w = data.width + if (typeof data.height === 'number') layout.h = data.height + if (typeof block.height === 'number') layout.height = block.height + if (typeof block.horizontalHandles === 'boolean') + layout.horizontalHandles = block.horizontalHandles + return layout +} + +/** Lock branch keys by block id, then row id → key (build-spec decision 5). */ +function lockBranchKeysById( + lock: Parameters[1]['lock'] +): Map> { + const result = new Map>() + for (const entry of Object.values(lock?.blocks ?? {})) { + if (!entry.branches) continue + const byRow = new Map() + for (const [key, rowId] of Object.entries(entry.branches)) byRow.set(rowId, key) + result.set(entry.id, byRow) + } + return result +} + +/** + * Projects a stored, already-migrated graph to the CWM (s1 §2 canonicalize steps 1–9; quirk + * numbers refer to s1 §5). Pure and total: problems become diagnostics. + */ +export const canonicalize: CanonicalizeFn = (state, options) => { + const diagnostics: Diagnostic[] = [] + const blocks: Record = state.blocks ?? {} + const { keyById, referenceKeyByName } = assignBlockKeys(blocks, diagnostics) + const variableEntries = assignVariableKeys(state.variables ?? {}, diagnostics) + const context: CanonContext = { + catalog: options.catalog, + resources: options.resources, + diagnostics, + keyById, + referenceKeyByName, + variables: variableEntries, + variableKeyById: new Map(variableEntries.map((entry) => [entry.id, entry.key])), + } + const lockBranchKeys = lockBranchKeysById(options.lock) + + const liftedBranches = new Map() + for (const [id, block] of Object.entries(blocks)) { + const branchSpec = catalogBlock(context, block.type)?.graph.branches + if (!branchSpec) continue + const key = keyById.get(id) ?? id + liftedBranches.set( + id, + liftBranches( + branchSpec.kind, + id, + key, + branchSpec.subBlockId, + block.subBlocks?.[branchSpec.subBlockId]?.value, + lockBranchKeys.get(id) ?? new Map(), + context + ) + ) + } + + const { edges, errorSourceIds } = canonicalEdges( + state.edges ?? [], + { + blocks, + branchKeys: new Map( + [...liftedBranches].map(([id, lifted]) => [ + id, + { kind: lifted.branches.kind, keyByRowId: lifted.keyByRowId }, + ]) + ), + }, + context + ) + + const canonicalBlocks: Record = {} + const identity: LockIdentity = { blocks: {}, variables: {} } + const layout: Record = {} + const inactive: Record = {} + + for (const [id, block] of Object.entries(blocks)) { + const key = keyById.get(id) ?? id + const data: Record = { ...block.data } + const catalog = catalogBlock(context, block.type) + const isContainer = block.type === 'loop' || block.type === 'parallel' + if (!catalog && !isContainer) { + report(context, { + code: 'W_CANON_UNKNOWN_BLOCK_TYPE', + severity: 'warning', + message: `Block type "${block.type}" is not in the catalog; params kept verbatim`, + blockKey: key, + }) + } + + const opaqueData: Record = {} + const parentId = typeof data.parentId === 'string' ? data.parentId : undefined + const parent = parentId !== undefined ? (keyById.get(parentId) ?? null) : null + if (data.parentId != null && (parentId === undefined || parent === null)) { + opaqueData.parentId = toJson(data.parentId) + report(context, { + code: 'W_CANON_DANGLING_PARENT', + severity: 'warning', + message: `Block "${key}" names parent "${String(data.parentId)}", which is not a block; placed at the root`, + blockKey: key, + }) + } + + const overrides = canonicalModeOverrides(data) + const lifted = liftedBranches.get(id) + const { params, items } = canonicalParams( + { + blockKey: key, + block, + catalog, + overrides, + branchSubBlockId: lifted ? catalog?.graph.branches?.subBlockId : undefined, + }, + context + ) + if (lifted && 'unliftedValue' in lifted && catalog?.graph.branches) { + params[catalog.graph.branches.subBlockId] = { + kind: 'value', + value: toValue(lifted.unliftedValue, context), + } + } + + const advancedMode = block.advancedMode === true + const triggerMode = block.triggerMode === true + const rawValues: Record = {} + for (const [subBlockId, subBlock] of Object.entries(block.subBlocks ?? {})) { + rawValues[subBlockId] = isRecordLike(subBlock) ? subBlock.value : undefined + } + + const canonical: CanonicalBlock = { + key, + name: block.name, + type: block.type, + parent, + enabled: block.enabled !== false, + locked: block.locked === true, + triggerMode, + advancedMode, + errorPort: resolveEffectiveErrorEnabled(block, id, errorSourceIds), + retry: canonicalRetry(block.retry), + params, + modes: + catalog && !isContainer + ? effectiveModes(catalog.subBlocks, rawValues, overrides, advancedMode) + : {}, + } + if (lifted) canonical.branches = lifted.branches + + const rejectedDataKeys = new Set() + if (block.type === 'loop') { + const result = loopSpec(block, state.loops?.[id], key, context) + canonical.subflow = result.spec + for (const dataKey of result.rejectedDataKeys) rejectedDataKeys.add(dataKey) + } else if (block.type === 'parallel') { + const result = parallelSpec(block, state.parallels?.[id], key, context) + canonical.subflow = result.spec + for (const dataKey of result.rejectedDataKeys) rejectedDataKeys.add(dataKey) + } + + for (const [dataKey, value] of Object.entries(data)) { + if (value === undefined || dataKey === 'parentId') continue + if (LAYOUT_DATA_KEYS.has(dataKey) && typeof value === 'number') continue + if (dataKey === 'extent' && value === 'parent' && parent !== null) continue + if (dataKey === 'canonicalModes' && isModeMap(value)) continue + if (isContainer && SUBFLOW_DATA_KEYS.has(dataKey) && !rejectedDataKeys.has(dataKey)) continue + opaqueData[dataKey] = toJson(value) + } + if (Object.keys(opaqueData).length > 0) canonical.opaque = { data: opaqueData } + + if (catalog && !isContainer) { + const activityValues = overrides ? { ...rawValues, __canonicalModes: overrides } : rawValues + const activityInputs = { + block: catalog, + blockType: block.type, + triggerMode, + advancedMode, + values: activityValues, + overrides, + index: buildCanonicalIndex(catalog.subBlocks), + } + const inactiveIds = Object.keys(params).filter((paramId) => + isInactive(paramId, activityInputs) + ) + if (inactiveIds.length > 0) inactive[key] = inactiveIds + } + + canonicalBlocks[key] = canonical + const identityBlock: LockIdentityBlock = { id, parent } + if (lifted && Object.keys(lifted.ids).length > 0) identityBlock.branches = lifted.ids + if (Object.keys(items).length > 0) identityBlock.items = items + identity.blocks[key] = identityBlock + layout[key] = layoutOf(block) + } + + const variables: Record = {} + const storedVariables = Object.values(state.variables ?? {}) + variableEntries.forEach((entry, index) => { + const variable = storedVariables[index] + variables[entry.key] = { + key: entry.key, + name: variable.name, + type: variable.type, + value: toJson(variable.value), + } + identity.variables[entry.key] = entry.id + }) + + const workflow: CanonicalWorkflow = { + modelVersion: 1, + meta: { name: options.meta.name, description: options.meta.description }, + blocks: canonicalBlocks, + edges, + variables, + annotations: { inactive, comments: {} }, + } + return { workflow, identity, layout, diagnostics } +} diff --git a/packages/workflow-code/src/canonicalize/keys.ts b/packages/workflow-code/src/canonicalize/keys.ts new file mode 100644 index 00000000000..a48678488d5 --- /dev/null +++ b/packages/workflow-code/src/canonicalize/keys.ts @@ -0,0 +1,110 @@ +import { + type BlockState, + normalizeWorkflowBlockName, + RESERVED_WORKFLOW_BLOCK_NAMES, + type Variable, +} from '@sim/workflow-types/workflow' +import type { CanonicalizeDiagnosticCode } from '../diagnostics/codes' +import type { Diagnostic } from '../diagnostics/frame' +import type { BlockKey, VarKey } from '../model' +import type { VariableEntry } from './context' + +const RESERVED_NAMES: ReadonlySet = new Set(RESERVED_WORKFLOW_BLOCK_NAMES) + +export interface BlockKeys { + keyById: Map + /** Normalized name → the key of the block references resolve to. */ + referenceKeyByName: Map +} + +function smallestFreeSuffix(base: string, taken: ReadonlySet): string { + let n = 2 + while (taken.has(`${base}~${n}`)) n++ + return `${base}~${n}` +} + +/** + * Block keys (s1 canonicalize step 1, quirk 21). The key is the normalized name. When two stored + * names normalize alike, the block the resolver binds the name to keeps the key: blocks are walked + * in stored order and a newcomer takes over only from an incumbent whose name contains a dot + * (executor/variables/resolvers/block.ts:49-60). Every other block in the group becomes + * `key~n` (smallest free n ≥ 2) with `E_CANON_LEGACY_NAME_COLLISION`. + */ +export function assignBlockKeys( + blocks: Record, + diagnostics: Diagnostic[] +): BlockKeys { + const entries = Object.entries(blocks) + const winnerByName = new Map() + for (const [id, block] of entries) { + const normalized = normalizeWorkflowBlockName(block.name) + const incumbent = winnerByName.get(normalized) + if (incumbent === undefined || blocks[incumbent].name.includes('.')) { + winnerByName.set(normalized, id) + } + } + + const keyById = new Map() + const taken = new Set(winnerByName.keys()) + for (const [id, block] of entries) { + const normalized = normalizeWorkflowBlockName(block.name) + if (winnerByName.get(normalized) === id) { + keyById.set(id, normalized) + if (RESERVED_NAMES.has(normalized)) { + diagnostics.push({ + code: 'W_CANON_RESERVED_NAME', + severity: 'warning', + message: `Block name "${block.name}" normalizes to the reserved reference prefix "${normalized}"`, + blockKey: normalized, + }) + } + continue + } + const key = smallestFreeSuffix(normalized, taken) + taken.add(key) + keyById.set(id, key) + diagnostics.push({ + code: 'E_CANON_LEGACY_NAME_COLLISION', + severity: 'error', + message: `Block name "${block.name}" normalizes to "${normalized}", which "${blocks[winnerByName.get(normalized) ?? id].name}" already resolves to; keyed "${key}" until renamed`, + blockKey: key, + }) + } + + const referenceKeyByName = new Map() + for (const name of winnerByName.keys()) referenceKeyByName.set(name, name) + return { keyById, referenceKeyByName } +} + +/** + * Variable keys: the normalized variable name, with the same `~n` rule for a collision (the + * first stored variable keeps the key, as the workflow resolver matches the first by name). + */ +export function assignVariableKeys( + variables: Record, + diagnostics: Diagnostic[] +): VariableEntry[] { + const entries: VariableEntry[] = [] + const firstNames = new Set() + for (const variable of Object.values(variables)) { + firstNames.add(normalizeWorkflowBlockName(variable.name)) + } + const taken = new Set(firstNames) + const claimed = new Set() + for (const variable of Object.values(variables)) { + const normalizedName = normalizeWorkflowBlockName(variable.name) + let key: VarKey = normalizedName + if (claimed.has(normalizedName)) { + key = smallestFreeSuffix(normalizedName, taken) + taken.add(key) + diagnostics.push({ + code: 'E_CANON_LEGACY_NAME_COLLISION', + severity: 'error', + message: `Variable name "${variable.name}" normalizes to "${normalizedName}", which another variable already uses; keyed "${key}" until renamed`, + }) + } + claimed.add(normalizedName) + entries.push({ id: variable.id, key, normalizedName }) + } + return entries +} diff --git a/packages/workflow-code/src/canonicalize/modes.ts b/packages/workflow-code/src/canonicalize/modes.ts new file mode 100644 index 00000000000..cbfa272814a --- /dev/null +++ b/packages/workflow-code/src/canonicalize/modes.ts @@ -0,0 +1,34 @@ +import { + buildCanonicalIndex, + type CanonicalIndexSubBlock, + type CanonicalModeOverrides, + isCanonicalPair, + resolveCanonicalMode, +} from '../catalog/canonical-index' +import type { CanonicalParamId, ParamMode } from '../model' + +/** + * The effective mode of every canonical pair (s1 canonicalize step 4, quirk 2), as the + * serializer resolves it (serializer/index.ts:637-650): an explicit override wins; otherwise the + * legacy block-level `advancedMode` makes a pair advanced; otherwise the mode is inferred from + * which member holds a value (`resolveCanonicalMode`). + * + * The index is unscoped, like the serializer's and the backfill's (subblock-migrations.ts:731): + * both members of a pair always sit on one surface, so scoping cannot change which pairs exist. + */ +export function effectiveModes( + subBlocks: readonly CanonicalIndexSubBlock[], + values: Record, + overrides: CanonicalModeOverrides | undefined, + legacyAdvancedMode: boolean +): Record { + const index = buildCanonicalIndex(subBlocks) + const modes: Record = {} + for (const group of Object.values(index.groupsById)) { + if (!isCanonicalPair(group)) continue + const explicit = overrides?.[group.canonicalId] != null + modes[group.canonicalId] = + legacyAdvancedMode && !explicit ? 'advanced' : resolveCanonicalMode(group, values, overrides) + } + return modes +} diff --git a/packages/workflow-code/src/canonicalize/params.ts b/packages/workflow-code/src/canonicalize/params.ts new file mode 100644 index 00000000000..c07be14234b --- /dev/null +++ b/packages/workflow-code/src/canonicalize/params.ts @@ -0,0 +1,260 @@ +import { isRecordLike, omit } from '@sim/utils/object' +import type { BlockState } from '@sim/workflow-types/workflow' +import type { CanonicalModeOverrides } from '../catalog/canonical-index' +import type { CatalogBlock, CatalogSubBlock } from '../catalog/types' +import type { BlockKey, CanonicalParam, SubBlockId, Value } from '../model' +import { type CanonContext, report } from './context' +import { liftTools } from './tools' +import { liftResourceValue, toValue } from './values' + +/** + * Server-owned trigger runtime ids (s1 D6, quirks 11 and 12; triggers/constants.ts + * `TRIGGER_RUNTIME_SUBBLOCK_IDS`). Materialize copies them from prev by id. + */ +const RUNTIME_SUBBLOCK_IDS = new Set(['webhookId', 'triggerPath', 'triggerConfig', 'triggerId']) +/** `{subBlockId}-tool-{index}-{paramId}` editor mirrors (synthetic-subblocks.ts:23-25), quirk 23. */ +const SYNTHETIC_TOOL_SUBBLOCK = /-tool-\d+-/ +/** Retired fields an earlier migration parked instead of deleting (subblock-migrations.ts:555-575). */ +const PARKED_PREFIX = '_removed_' +/** Text types whose JSON-looking content is user text, never decoded (s1 step 3). */ +const NEVER_DECODED_TYPES = new Set(['code', 'long-input']) + +/** Whether a stored subBlock id is excluded from params before any catalog lookup. */ +export function isExcludedSubBlockId(id: string): boolean { + return ( + RUNTIME_SUBBLOCK_IDS.has(id) || SYNTHETIC_TOOL_SUBBLOCK.test(id) || id.startsWith(PARKED_PREFIX) + ) +} + +export interface ParamInputs { + blockKey: BlockKey + block: BlockState + catalog: CatalogBlock | undefined + overrides: CanonicalModeOverrides | undefined + /** Stored subBlock id of the lifted branch list, skipped here. */ + branchSubBlockId?: SubBlockId +} + +export interface ParamsResult { + params: Record + /** inputFormat ids by subBlock: field name → id (lock `items`, quirk 27). */ + items: Record> +} + +/** The declaration a stored value was written through: the current surface's copy first. */ +function declarationFor( + catalog: CatalogBlock | undefined, + id: string, + triggerMode: boolean +): CatalogSubBlock | undefined { + const declarations = catalog?.subBlocks.filter((subBlock) => subBlock.id === id) ?? [] + const surface = triggerMode ? 'trigger' : 'action' + return declarations.find((subBlock) => subBlock.surface === surface) ?? declarations[0] +} + +function shouldDecode(declaration: CatalogSubBlock | undefined): boolean { + if (!declaration || NEVER_DECODED_TYPES.has(declaration.type)) return false + return declaration.structured !== undefined || declaration.storage === 'json-string' +} + +/** + * JSON text of a structured field, decoded (s1 step 3, quirk 9). Only an object or array counts + * as decoded, so a scalar-looking string stays the string it is. Blank text is the untouched + * sentinel and stays as is; other text that does not parse is kept with + * `W_CANON_UNDECODABLE_JSON`. The encoding is not recorded: the CWM is encoding-free and + * materialize keeps prev's (contract amendment 1). + */ +function decodeStructured( + raw: unknown, + blockKey: BlockKey, + param: string, + context: CanonContext +): unknown { + if (typeof raw !== 'string' || raw.trim() === '') return raw + try { + const parsed: unknown = JSON.parse(raw) + if (typeof parsed === 'object' && parsed !== null) return parsed + } catch {} + report(context, { + code: 'W_CANON_UNDECODABLE_JSON', + severity: 'warning', + message: `Stored ${param} is not a JSON list or object; kept as text`, + blockKey, + param, + }) + return raw +} + +/** + * inputFormat fields (quirks 24, 27): the editor's `collapsed` flag is dropped and each field's + * `id` moves to the lock's `items`, keyed by field name. A field whose name is missing or shared + * keeps its id inline, so nothing is lost. + */ +function liftInputFormat( + list: unknown[], + context: CanonContext +): { value: Value; items: Array<{ name: string; id: string }> } { + const nameCounts = new Map() + for (const item of list) { + if (isRecordLike(item) && typeof item.name === 'string') { + nameCounts.set(item.name, (nameCounts.get(item.name) ?? 0) + 1) + } + } + const items: Array<{ name: string; id: string }> = [] + const value = list.map((item) => { + if (!isRecordLike(item) || Object.hasOwn(item, '$sim')) return toValue(item, context) + const rest = omit(item, ['collapsed']) + if ( + typeof rest.id === 'string' && + typeof rest.name === 'string' && + nameCounts.get(rest.name) === 1 + ) { + items.push({ name: rest.name, id: rest.id }) + return toValue(omit(rest, ['id']), context) + } + return toValue(rest, context) + }) + return { value, items } +} + +/** + * Table rows (quirk 24, normalize.ts `sanitizeTableRows`): a `{ id, cells }` row loses its + * client-generated `id`, and a row whose cells are all blank (the editor's starter row) is + * dropped. Rows of any other shape carry data and pass through verbatim. + */ +function liftTableRows(list: unknown[], context: CanonContext): Value { + const rows: Value[] = [] + for (const row of list) { + if (!isRecordLike(row) || !isRecordLike(row.cells) || Object.hasOwn(row, '$sim')) { + rows.push(toValue(row, context)) + continue + } + const blank = Object.values(row.cells).every( + (cell) => cell === '' || cell === null || cell === undefined + ) + if (blank) continue + rows.push(toValue(omit(row, ['id']), context)) + } + return rows +} + +/** + * Variable assignments (`variables-input`): each `variableId` becomes a `var` node keyed by the + * variable's key (s1 step 8; sites as remap-internal-ids.ts:58-80 walks them). An id naming no + * variable stays an `unresolved` node with `W_CANON_UNRESOLVED_ID`. + */ +function liftVariableAssignments( + value: unknown, + blockKey: BlockKey, + param: string, + context: CanonContext +): Value { + if (Array.isArray(value)) { + return value.map((item) => liftVariableAssignments(item, blockKey, param, context)) + } + if (!isRecordLike(value) || Object.hasOwn(value, '$sim')) return toValue(value, context) + const result: Record = {} + for (const [key, member] of Object.entries(value)) { + if (member === undefined) continue + if (key === 'variableId' && typeof member === 'string') { + const variableKey = context.variableKeyById.get(member) + if (variableKey !== undefined) { + result[key] = { $sim: 'var', key: variableKey } + } else { + report(context, { + code: 'W_CANON_UNRESOLVED_ID', + severity: 'warning', + message: `Variable assignment names unknown variable id "${member}"; kept verbatim`, + blockKey, + param, + }) + result[key] = { $sim: 'unresolved', kind: 'var', id: member } + } + continue + } + result[key] = liftVariableAssignments(member, blockKey, param, context) + } + return result +} + +/** + * A block's params (s1 canonicalize step 3): every stored subBlock except runtime ids, synthetic + * tool mirrors, parked keys, the lifted branch list, and a `null` value (DESIGN.md decision 4; + * `''` is kept, quirk 25). Structured fields are decoded; selector values become resource nodes; + * strings keep their text with reference prefixes normalized. The catalog's subBlock type wins + * over the stored one, and a drift is reported (quirk 29). + */ +export function canonicalParams(inputs: ParamInputs, context: CanonContext): ParamsResult { + const { blockKey, block, catalog, overrides } = inputs + const params: Record = {} + const items: ParamsResult['items'] = {} + const triggerMode = block.triggerMode === true + + for (const [id, subBlock] of Object.entries(block.subBlocks ?? {})) { + if (id === inputs.branchSubBlockId || isExcludedSubBlockId(id)) continue + if (!isRecordLike(subBlock)) continue + const raw = subBlock.value + if (raw === null || raw === undefined) continue + + const declaration = declarationFor(catalog, id, triggerMode) + if (typeof subBlock.id === 'string' && subBlock.id !== id) { + report(context, { + code: 'W_CANON_SUBBLOCK_TYPE_DRIFT', + severity: 'warning', + message: `Stored subBlock "${id}" carries id "${subBlock.id}"; the map key wins`, + blockKey, + param: id, + }) + } + if ( + catalog && + typeof subBlock.type === 'string' && + !catalog.subBlocks.some( + (candidate) => candidate.id === id && candidate.type === subBlock.type + ) && + catalog.subBlocks.some((candidate) => candidate.id === id) + ) { + report(context, { + code: 'W_CANON_SUBBLOCK_TYPE_DRIFT', + severity: 'warning', + message: `Stored subBlock "${id}" has type "${subBlock.type}"; the catalog type "${declaration?.type}" wins`, + blockKey, + param: id, + }) + } + + const decoded = shouldDecode(declaration) ? decodeStructured(raw, blockKey, id, context) : raw + const location = { blockKey, param: id } + + if (declaration?.structured === 'tools' && Array.isArray(decoded)) { + const tools = liftTools(decoded, overrides, blockKey, id, context) + if (tools) { + params[id] = { kind: 'tools', tools } + continue + } + } + let value: Value + if (declaration?.structured === 'inputFormat' && Array.isArray(decoded)) { + const lifted = liftInputFormat(decoded, context) + value = lifted.value + if (lifted.items.length > 0) items[id] = lifted.items + } else if (declaration?.structured === 'tableRows' && Array.isArray(decoded)) { + value = liftTableRows(decoded, context) + } else if (declaration?.structured === 'variables') { + value = liftVariableAssignments(decoded, blockKey, id, context) + } else if (declaration?.valueKind === 'resource' && declaration.resourceKind) { + value = + liftResourceValue( + declaration.resourceKind, + decoded, + context, + location, + declaration.multiple + ) ?? toValue(decoded, context) + } else { + value = toValue(decoded, context) + } + params[id] = { kind: 'value', value } + } + return { params, items } +} diff --git a/packages/workflow-code/src/canonicalize/subflows.ts b/packages/workflow-code/src/canonicalize/subflows.ts new file mode 100644 index 00000000000..d2f53417047 --- /dev/null +++ b/packages/workflow-code/src/canonicalize/subflows.ts @@ -0,0 +1,171 @@ +import type { BlockState, Loop, Parallel } from '@sim/workflow-types/workflow' +import type { BlockKey, Json, LoopSpec, ParallelSpec } from '../model' +import { type CanonContext, report } from './context' +import { toValue } from './values' + +const LOOP_TYPES = new Set(['for', 'forEach', 'while', 'doWhile']) +const PARALLEL_TYPES = new Set(['count', 'collection']) +const PARALLEL_BATCH_MIN = 1 +const PARALLEL_BATCH_MAX = 20 +/** `count || 5` in `convertLoopBlockToLoop` (subflow-helpers.ts:46). */ +const DEFAULT_LOOP_ITERATIONS = 5 + +/** `block.data` keys a container's subflow config owns. */ +export const SUBFLOW_DATA_KEYS: ReadonlySet = new Set([ + 'count', + 'collection', + 'loopType', + 'whileCondition', + 'doWhileCondition', + 'parallelType', + 'batchSize', +]) + +/** A subflow config with the `block.data` keys whose stored value it could not represent. */ +export interface SubflowResult { + spec: S + /** Kept verbatim under `opaque.data` so nothing is lost. */ + rejectedDataKeys: string[] +} + +function firstDefined(...candidates: unknown[]): unknown { + return candidates.find((candidate) => candidate !== undefined) +} + +function rejectIfFromData( + rejected: string[], + data: Record, + dataKey: string +): void { + if (data[dataKey] !== undefined) rejected.push(dataKey) +} + +function stringField(value: unknown, context: CanonContext): string | undefined { + return typeof value === 'string' ? (toValue(value, context) as string) : undefined +} + +/** + * Json fields of a subflow (collection / distribution) keep references rewritten in strings, but + * never carry model nodes, so the value is JSON. + */ +function jsonField(value: unknown, context: CanonContext): Json | undefined { + if (value === undefined) return undefined + return toValue(value, context) as Json +} + +function repaired(context: CanonContext, blockKey: BlockKey, message: string) { + report(context, { code: 'W_CANON_SUBFLOW_REPAIRED', severity: 'warning', message, blockKey }) +} + +/** + * A loop's config (s1 canonicalize step 2, quirk 19). `block.data` is read first: the serializer + * rebuilds loops from it (`generateLoopBlocks`, serializer/index.ts:175) and the loader syncs the + * subflow row into it (load.ts:186-245), so it is what executes. The loops map fills fields `data` + * omits. Stored values are kept raw, including a `0` count the runtime replaces with 5 + * (`count || 5`), which is reported instead of repaired. Fields storage omits stay absent. + */ +export function loopSpec( + block: BlockState, + loop: Loop | undefined, + blockKey: BlockKey, + context: CanonContext +): SubflowResult { + const data: Record = { ...block.data } + // `loopType` and `iterations` are required: the loader always writes both into the loops map + // (load.ts:186-245), so the fallbacks below apply only to a state with no loops map at all. + const spec: LoopSpec = { kind: 'loop', loopType: 'for', iterations: DEFAULT_LOOP_ITERATIONS } + const rejected: string[] = [] + + const loopType = firstDefined(data.loopType, loop?.loopType) + if (typeof loopType === 'string' && LOOP_TYPES.has(loopType)) { + spec.loopType = loopType as LoopSpec['loopType'] + } else if (loopType !== undefined) { + rejectIfFromData(rejected, data, 'loopType') + if (typeof loop?.loopType === 'string' && LOOP_TYPES.has(loop.loopType)) { + spec.loopType = loop.loopType + } + repaired(context, blockKey, `Unknown loop type "${String(loopType)}"; the runtime runs "for"`) + } + + const iterations = firstDefined(data.count, loop?.iterations) + if (typeof iterations === 'number') { + spec.iterations = iterations + if (iterations === 0) { + repaired(context, blockKey, 'Loop count is 0; the runtime runs 5 iterations') + } + } else if (iterations !== undefined) { + rejectIfFromData(rejected, data, 'count') + if (typeof loop?.iterations === 'number') spec.iterations = loop.iterations + repaired(context, blockKey, 'Loop count is not a number; the loader repairs it') + } + + const forEachItems = jsonField(firstDefined(data.collection, loop?.forEachItems), context) + if (forEachItems !== undefined) spec.forEachItems = forEachItems + const whileCondition = stringField( + firstDefined(data.whileCondition, loop?.whileCondition), + context + ) + if (whileCondition !== undefined) spec.whileCondition = whileCondition + const doWhileCondition = stringField( + firstDefined(data.doWhileCondition, loop?.doWhileCondition), + context + ) + if (doWhileCondition !== undefined) spec.doWhileCondition = doWhileCondition + for (const key of ['whileCondition', 'doWhileCondition']) { + if (data[key] !== undefined && typeof data[key] !== 'string') rejected.push(key) + } + return { spec, rejectedDataKeys: rejected } +} + +/** + * A parallel's config (quirk 19), `block.data` first for the same reason as loops. An unknown + * `parallelType` is reported: the loader reads it as `count` while the serializer's helper reads + * it as `collection` (load.ts:226-230 vs subflow-helpers.ts:73-77). `batchSize` is kept raw and + * reported outside the 1–20 clamp. + */ +export function parallelSpec( + block: BlockState, + parallel: Parallel | undefined, + blockKey: BlockKey, + context: CanonContext +): SubflowResult { + const data: Record = { ...block.data } + const spec: ParallelSpec = { kind: 'parallel' } + const rejected: string[] = [] + + const parallelType = firstDefined(data.parallelType, parallel?.parallelType) + if (typeof parallelType === 'string' && PARALLEL_TYPES.has(parallelType)) { + spec.parallelType = parallelType as ParallelSpec['parallelType'] + } else if (parallelType !== undefined) { + rejectIfFromData(rejected, data, 'parallelType') + repaired( + context, + blockKey, + `Unknown parallel type "${String(parallelType)}"; the loader and the serializer disagree on its fallback` + ) + } + + const count = firstDefined(data.count, parallel?.count) + if (typeof count === 'number') { + spec.count = count + if (count === 0) repaired(context, blockKey, 'Parallel count is 0; the runtime runs 5') + } else if (count !== undefined) { + rejectIfFromData(rejected, data, 'count') + repaired(context, blockKey, 'Parallel count is not a number; the runtime runs 5') + } + + const distribution = jsonField(firstDefined(data.collection, parallel?.distribution), context) + if (distribution !== undefined) spec.distribution = distribution + + const batchSize = firstDefined(data.batchSize, parallel?.batchSize) + if (typeof batchSize === 'number') { + spec.batchSize = batchSize + if (batchSize < PARALLEL_BATCH_MIN || batchSize > PARALLEL_BATCH_MAX) { + repaired(context, blockKey, `Parallel batch size ${batchSize} is clamped to 1–20 at run time`) + } + } else if (batchSize !== undefined) { + rejectIfFromData(rejected, data, 'batchSize') + repaired(context, blockKey, 'Parallel batch size is not a number; the runtime uses 20') + } + return { spec, rejectedDataKeys: rejected } +} diff --git a/packages/workflow-code/src/canonicalize/tools.ts b/packages/workflow-code/src/canonicalize/tools.ts new file mode 100644 index 00000000000..68f59150376 --- /dev/null +++ b/packages/workflow-code/src/canonicalize/tools.ts @@ -0,0 +1,204 @@ +import { isRecordLike, toRecord } from '@sim/utils/object' +import { type CanonicalModeOverrides, scopeCanonicalModesForTool } from '../catalog/canonical-index' +import type { CatalogSubBlock } from '../catalog/types' +import type { BlockKey, CanonicalTool, Json, Value } from '../model' +import { type CanonContext, catalogBlock } from './context' +import { effectiveModes } from './modes' +import { liftResourceId, liftResourceValue, toJson, toValue } from './values' + +type ToolParamShape = 'string' | 'number' | 'boolean' | 'json' + +const OBJECT_VALUED_TYPES = new Set([ + 'checkbox-list', + 'file-upload', + 'grouped-checkbox-list', + 'table', +]) +const USAGE_CONTROLS = new Set(['auto', 'force', 'none']) + +/** Stored tool keys with a typed model field; anything else is kept under `extra`. */ +const MODELED_KEYS = new Set([ + 'type', + 'operation', + 'toolId', + 'title', + 'params', + 'usageControl', + 'usageControlExpression', + 'customToolId', + 'schema', + 'code', + 'operationPolicy', + 'isExpanded', +]) + +/** `getSubBlockValueShape` (tools/param-shape.ts): the shape a sub-block wrote. */ +function subBlockShape(subBlock: CatalogSubBlock): ToolParamShape { + if (subBlock.type === 'switch') return 'boolean' + if (subBlock.type === 'slider') return 'number' + if (OBJECT_VALUED_TYPES.has(subBlock.type)) return 'json' + if (subBlock.multiple) return 'json' + return 'string' +} + +/** `getToolParamValueShape` (tools/param-shape.ts): the shape a tool declaration implies. */ +function declaredShape(type: string | undefined): ToolParamShape { + switch (type) { + case 'boolean': + return 'boolean' + case 'number': + return 'number' + case 'json': + case 'array': + case 'object': + case 'file': + case 'file[]': + return 'json' + default: + return 'string' + } +} + +/** `decodeToolParamValue` (tools/param-shape.ts:185-214): total, keeps `''` and any misfit. */ +function decodeToolParam(raw: unknown, shape: ToolParamShape): unknown { + if (typeof raw !== 'string' || raw === '') return raw + switch (shape) { + case 'boolean': { + const normalized = raw.trim().toLowerCase() + if (normalized === 'true') return true + if (normalized === 'false') return false + return raw + } + case 'number': { + const parsed = Number(raw.trim()) + return Number.isFinite(parsed) ? parsed : raw + } + case 'json': { + try { + const parsed: unknown = JSON.parse(raw.trim()) + return typeof parsed === 'object' && parsed !== null ? parsed : raw + } catch { + return raw + } + } + default: + return raw + } +} + +/** Whether a stored entry can be represented as a `CanonicalTool` at all. */ +function isLiftableTool(stored: unknown): stored is Record & { type: string } { + return ( + isRecordLike(stored) && + typeof stored.type === 'string' && + (stored.params === undefined || isRecordLike(stored.params)) + ) +} + +function liftTool( + stored: Record & { type: string }, + index: number, + overrides: CanonicalModeOverrides | undefined, + blockKey: BlockKey, + param: string, + context: CanonContext +): CanonicalTool { + const type = stored.type + const block = catalogBlock(context, type) + const toolId = typeof stored.toolId === 'string' ? stored.toolId : undefined + const toolDeclaration = + toolId && context.catalog.tools && Object.hasOwn(context.catalog.tools, toolId) + ? context.catalog.tools[toolId] + : undefined + const location = { blockKey, param } + + const rawParams = toRecord(stored.params) + const params: Record = {} + for (const [key, raw] of Object.entries(rawParams)) { + if (raw === undefined) continue + const subBlock = block?.subBlocks.find( + (candidate) => candidate.id === key || candidate.canonicalParamId === key + ) + const shape = subBlock + ? subBlockShape(subBlock) + : toolDeclaration && Object.hasOwn(toolDeclaration.params, key) + ? declaredShape(toolDeclaration.params[key].type) + : 'string' + const decoded = decodeToolParam(raw, shape) + const lifted = + subBlock?.valueKind === 'resource' && subBlock.resourceKind + ? liftResourceValue(subBlock.resourceKind, decoded, context, location, subBlock.multiple) + : undefined + params[key] = lifted ?? toValue(decoded, context) + } + + const explicit = scopeCanonicalModesForTool(overrides, index, type) + const tool: CanonicalTool = { + type, + params, + modes: block + ? effectiveModes(block.subBlocks, rawParams, explicit, false) + : definedModes(explicit), + } + const extra: Record = {} + + for (const key of ['operation', 'toolId', 'title', 'usageControlExpression'] as const) { + const value = stored[key] + if (typeof value === 'string') tool[key] = value + else if (value !== undefined) extra[key] = toJson(value) + } + if (typeof stored.usageControl === 'string' && USAGE_CONTROLS.has(stored.usageControl)) { + tool.usageControl = stored.usageControl as CanonicalTool['usageControl'] + } else if (stored.usageControl !== undefined) { + extra.usageControl = toJson(stored.usageControl) + } + if (stored.operationPolicy !== undefined) tool.operationPolicy = toJson(stored.operationPolicy) + + // s1 quirk 17: the DB copy wins over the snapshot at run time, so both are kept verbatim. + const customTool: NonNullable = {} + if (typeof stored.customToolId === 'string' && stored.customToolId !== '') { + customTool.ref = liftResourceId('custom-tool', stored.customToolId, context, location) + } else if (stored.customToolId !== undefined) { + extra.customToolId = toJson(stored.customToolId) + } + if (stored.schema !== undefined && typeof stored.code === 'string') { + customTool.snapshot = { schema: toJson(stored.schema), code: stored.code } + } else { + if (stored.schema !== undefined) extra.schema = toJson(stored.schema) + if (stored.code !== undefined) extra.code = toJson(stored.code) + } + if (customTool.ref || customTool.snapshot) tool.customTool = customTool + + // s1 quirk 24: `isExpanded` is editor state and is dropped. + for (const [key, value] of Object.entries(stored)) { + if (!MODELED_KEYS.has(key) && value !== undefined) extra[key] = toJson(value) + } + if (Object.keys(extra).length > 0) tool.extra = extra + return tool +} + +function definedModes(overrides: CanonicalModeOverrides | undefined): CanonicalTool['modes'] { + const modes: CanonicalTool['modes'] = {} + for (const [id, mode] of Object.entries(overrides ?? {})) { + if (mode) modes[id] = mode + } + return modes +} + +/** + * Lifts a `tool-input` list (s1 canonicalize step 5, quirks 3, 9, 17, 24). Each entry's modes + * come from its index-scoped `${i}:cid` overrides layered over legacy `${type}:cid` ones + * (`scopeCanonicalModesForTool`), resolved to an effective mode for every pair of the tool's + * block. Params are decoded with `decodeToolParamValue`'s shape rules. Returns `null` when any + * entry is not a typed object, so the caller keeps the list verbatim as a value. + */ +export function liftTools( + list: unknown[], + overrides: CanonicalModeOverrides | undefined, + blockKey: BlockKey, + param: string, + context: CanonContext +): CanonicalTool[] | null { + if (!list.every(isLiftableTool)) return null + return list.map((stored, index) => liftTool(stored, index, overrides, blockKey, param, context)) +} diff --git a/packages/workflow-code/src/canonicalize/values.ts b/packages/workflow-code/src/canonicalize/values.ts new file mode 100644 index 00000000000..ce1c20ca77e --- /dev/null +++ b/packages/workflow-code/src/canonicalize/values.ts @@ -0,0 +1,149 @@ +import { isRecordLike } from '@sim/utils/object' +import { + findWorkflowReferenceTokens, + isLikelyWorkflowReferenceSegment, +} from '@sim/utils/workflow-references' +import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' +import type { Json, ResourceKind, ResourceNode, UnresolvedNode, Value } from '../model' +import { type CanonContext, report } from './context' + +/** The executor's candidate pattern (`createReferencePattern`); each match is then vetted. */ +const REFERENCE_CANDIDATE = /<([^<>]+)>/g +const SPECIAL_PREFIXES = new Set(['loop', 'parallel']) +const VARIABLE_PREFIX = 'variable' + +/** + * Coerces a stored value to JSON. Stored state is jsonb, so this only drops `undefined` object + * members and maps `undefined` array items to `null` (what `JSON.stringify` writes). + */ +export function toJson(value: unknown): Json { + if (value === null || typeof value === 'string' || typeof value === 'boolean') return value + if (typeof value === 'number') return Number.isFinite(value) ? value : null + if (Array.isArray(value)) return value.map((item) => (item === undefined ? null : toJson(item))) + if (isRecordLike(value)) { + const result: Record = {} + for (const [key, member] of Object.entries(value)) { + if (member !== undefined) result[key] = toJson(member) + } + return result + } + return null +} + +/** + * Rewrites reference prefixes to the form the resolvers already match (s3 §2 requirements a, b): + * `` → `` when `agent1` is a block, and `>` or + * `` → ``. Both are semantics-preserving because the block + * resolver looks names up normalized (block.ts:46-61, 388) and the workflow resolver matches a + * variable by normalized name or id (resolvers/workflow.ts:54-56). Tokens the executor would not + * treat as references, and references that resolve to nothing, are left verbatim. + */ +export function rewriteReferences(text: string, context: CanonContext): string { + if (!text.includes('<')) return text + return text.replace(REFERENCE_CANDIDATE, (match: string, inner: string) => { + if (!isLikelyWorkflowReferenceSegment(match)) return match + const dot = inner.indexOf('.') + const prefix = dot === -1 ? inner : inner.slice(0, dot) + if (prefix === VARIABLE_PREFIX && dot !== -1) { + return rewriteVariableReference(match, inner.slice(dot + 1), context) + } + if (SPECIAL_PREFIXES.has(prefix)) return match + const normalized = normalizeWorkflowBlockName(prefix) + if (normalized === prefix || !context.referenceKeyByName.has(normalized)) return match + return `<${normalized}${dot === -1 ? '' : inner.slice(dot)}>` + }) +} + +function rewriteVariableReference(match: string, rest: string, context: CanonContext): string { + const end = rest.search(/[.[]/) + const name = end === -1 ? rest : rest.slice(0, end) + const normalized = normalizeWorkflowBlockName(name) + const target = context.variables.find( + (entry) => entry.normalizedName === normalized || entry.id === name + ) + if (!target || target.key === name) return match + // A collision loser (`key~2`) is not addressable by name; keep the stored form. + const firstByName = context.variables.find((entry) => entry.normalizedName === target.key) + if (firstByName !== target) return match + return `` +} + +/** + * Converts stored JSON to a model `Value`: strings get their references rewritten, and an object + * that already carries a `$sim` key is wrapped as a `literal` node so the encoding stays a + * bijection (DESIGN.md decision 5). A literal's content is kept verbatim. + */ +export function toValue(value: unknown, context: CanonContext): Value { + if (typeof value === 'string') return rewriteReferences(value, context) + if (Array.isArray(value)) { + return value.map((item) => (item === undefined ? null : toValue(item, context))) + } + if (isRecordLike(value)) { + if (Object.hasOwn(value, '$sim')) return { $sim: 'literal', value: toJson(value) } + const result: Record = {} + for (const [key, member] of Object.entries(value)) { + if (member !== undefined) result[key] = toValue(member, context) + } + return result + } + return toJson(value) +} + +function containsReferenceToken(text: string): boolean { + return findWorkflowReferenceTokens(text).length > 0 +} + +/** + * Lifts a stored resource id to its key through the resolver (s1 canonicalize step 8). An id the + * resolver cannot map, or any id when no resolver is supplied, stays verbatim as an `unresolved` + * node; only a resolver miss is reported (`W_CANON_UNRESOLVED_ID`). + */ +export function liftResourceId( + kind: ResourceKind, + id: string, + context: CanonContext, + location: { blockKey: string; param: string } +): ResourceNode | UnresolvedNode { + const key = context.resources?.toKey(kind, id) ?? null + if (key !== null) return { $sim: 'resource', kind, key } + if (context.resources) { + report(context, { + code: 'W_CANON_UNRESOLVED_ID', + severity: 'warning', + message: `No ${kind} key for stored id "${id}"; kept verbatim`, + blockKey: location.blockKey, + param: location.param, + }) + } + return { $sim: 'unresolved', kind, id } +} + +/** + * The resource-site form of a selector value (contract amendment A4): a non-empty id string, or + * a list of them, becomes resource nodes. A multi-select selector that stored several ids as one + * comma-joined string becomes a `csv` node. A value holding a reference or env token is not an id + * and stays a value (`undefined` here). + */ +export function liftResourceValue( + kind: ResourceKind, + value: unknown, + context: CanonContext, + location: { blockKey: string; param: string }, + multiple = false +): Value | undefined { + const isId = (item: unknown): item is string => + typeof item === 'string' && item.trim() !== '' && !containsReferenceToken(item) + if (multiple && typeof value === 'string' && value.includes(',')) { + const parts = value.split(',').map((part) => part.trim()) + if (!parts.every(isId)) return undefined + return { + $sim: 'csv', + items: parts.map((part) => liftResourceId(kind, part, context, location)), + } + } + if (isId(value)) return liftResourceId(kind, value, context, location) + if (Array.isArray(value) && value.length > 0 && value.every(isId)) { + return value.map((item) => liftResourceId(kind, item, context, location)) + } + return undefined +} diff --git a/packages/workflow-code/src/equivalence/index.test.ts b/packages/workflow-code/src/equivalence/index.test.ts new file mode 100644 index 00000000000..708d428b028 --- /dev/null +++ b/packages/workflow-code/src/equivalence/index.test.ts @@ -0,0 +1,163 @@ +import { describe, expect, it } from 'vitest' +import type { LockIdentity } from '../lock' +import type { CanonicalBlock, CanonicalWorkflow } from '../model' +import { canonicalEquals, canonicalHash, sourceFingerprint } from '.' + +function codeBlock(key: string, overrides: Partial = {}): CanonicalBlock { + return { + key, + name: key, + type: 'function', + parent: null, + enabled: true, + locked: false, + triggerMode: false, + advancedMode: false, + errorPort: false, + retry: null, + params: { code: { kind: 'value', value: { body: 'return 1', options: { a: 1, b: [1, 2] } } } }, + modes: {}, + ...overrides, + } +} + +function base(): CanonicalWorkflow { + return { + modelVersion: 1, + meta: { name: 'W', description: null }, + blocks: { a: codeBlock('a'), b: codeBlock('b') }, + edges: [ + { from: 'a', port: { kind: 'error' }, to: 'b' }, + { from: 'a', port: { kind: 'out' }, to: 'b' }, + ], + variables: { v: { key: 'v', name: 'V', type: 'string', value: 'x' } }, + annotations: { inactive: {}, comments: {} }, + } +} + +/** The same CWM with every object's keys reversed, as jsonb may hand them back (quirk 28). */ +function reverseKeys(value: T): T { + if (Array.isArray(value)) return value.map(reverseKeys) as T + if (value === null || typeof value !== 'object') return value + return Object.fromEntries( + Object.entries(value) + .reverse() + .map(([key, member]) => [key, reverseKeys(member)]) + ) as T +} + +const IDENTITY: LockIdentity = { + blocks: { a: { id: 'id-a', parent: null }, b: { id: 'id-b', parent: null } }, + variables: { v: 'var-1' }, +} + +describe('canonicalEquals and canonicalHash', () => { + it('ignore key order at every depth (quirk 28)', () => { + const reordered = reverseKeys(base()) + expect(JSON.stringify(reordered)).not.toBe(JSON.stringify(base())) + expect(canonicalEquals(base(), reordered)).toBe(true) + expect(canonicalHash(reordered)).toBe(canonicalHash(base())) + }) + + it('ignore edge order', () => { + const swapped = base() + swapped.edges.reverse() + expect(canonicalEquals(base(), swapped)).toBe(true) + expect(canonicalHash(swapped)).toBe(canonicalHash(base())) + }) + + it('ignore annotations', () => { + const annotated = base() + annotated.annotations.inactive = { a: ['code'] } + expect(canonicalEquals(base(), annotated)).toBe(true) + expect(canonicalHash(annotated)).toBe(canonicalHash(base())) + }) + + it('treat an undefined optional field as absent', () => { + const explicit = base() + explicit.blocks.a = { ...explicit.blocks.a, branches: undefined } + expect(canonicalEquals(base(), explicit)).toBe(true) + expect(canonicalHash(explicit)).toBe(canonicalHash(base())) + }) + + it('see every semantic difference, including array order, empty string vs absence, and types', () => { + const changes: Array<(w: CanonicalWorkflow) => void> = [ + (w) => { + w.blocks.a.params.code = { + kind: 'value', + value: { body: 'return 2', options: { a: 1, b: [1, 2] } }, + } + }, + (w) => { + w.blocks.a.params.code = { + kind: 'value', + value: { body: 'return 1', options: { a: 1, b: [2, 1] } }, + } + }, + (w) => { + w.blocks.a.params.extra = { kind: 'value', value: '' } + }, + (w) => { + w.blocks.a.params.code = { kind: 'value', value: '1' } + }, + (w) => { + w.blocks.a.locked = true + }, + (w) => { + w.edges.pop() + }, + (w) => { + w.edges[0] = { from: 'a', port: { kind: 'raw', handle: 'error' }, to: 'b' } + }, + (w) => { + w.variables.v.value = 'y' + }, + (w) => { + w.meta.description = '' + }, + ] + for (const change of changes) { + const changed = base() + change(changed) + expect(canonicalEquals(base(), changed)).toBe(false) + expect(canonicalHash(changed)).not.toBe(canonicalHash(base())) + } + }) + + it('hash as lowercase hex SHA-256', () => { + expect(canonicalHash(base())).toMatch(/^[0-9a-f]{64}$/) + }) +}) + +describe('sourceFingerprint', () => { + it('is sf1: plus 64 hex characters and stable under key and edge order', () => { + const fingerprint = sourceFingerprint(base(), IDENTITY) + expect(fingerprint).toMatch(/^sf1:[0-9a-f]{64}$/) + const reordered = reverseKeys(base()) + reordered.edges.reverse() + expect(sourceFingerprint(reordered, reverseKeys(IDENTITY))).toBe(fingerprint) + }) + + it('ignores annotations but changes with any id, locked flag or variable', () => { + const fingerprint = sourceFingerprint(base(), IDENTITY) + const annotated = base() + annotated.annotations.inactive = { a: ['code'] } + expect(sourceFingerprint(annotated, IDENTITY)).toBe(fingerprint) + + const reId: LockIdentity = { + ...IDENTITY, + blocks: { ...IDENTITY.blocks, a: { id: 'id-z', parent: null } }, + } + expect(sourceFingerprint(base(), reId)).not.toBe(fingerprint) + expect(sourceFingerprint(base(), { ...IDENTITY, variables: { v: 'var-2' } })).not.toBe( + fingerprint + ) + const locked = base() + locked.blocks.b.locked = true + expect(sourceFingerprint(locked, IDENTITY)).not.toBe(fingerprint) + }) + + it('differs from the plain canonical hash, so the two cannot be confused', () => { + expect(sourceFingerprint(base(), IDENTITY).slice(4)).not.toBe(canonicalHash(base())) + }) +}) diff --git a/packages/workflow-code/src/equivalence/index.ts b/packages/workflow-code/src/equivalence/index.ts new file mode 100644 index 00000000000..711ac2cdefa --- /dev/null +++ b/packages/workflow-code/src/equivalence/index.ts @@ -0,0 +1,57 @@ +/** + * Equality and digests over the CWM. All three ignore `annotations` (DESIGN.md decision 3), the + * key order of every object (jsonb does not keep it, s1 quirk 28) and the order of `edges`. + */ + +import type { CanonicalEqualsFn, CanonicalHashFn, SourceFingerprintFn } from '../api' +import { compareEdges } from '../canonicalize/edges' +import { sha256Hex, stableStringify } from '../hash' +import type { CanonicalWorkflow } from '../model' + +/** The semantic part of a CWM: everything but annotations, with edges in canonical order. */ +function semantic(workflow: CanonicalWorkflow) { + return { + modelVersion: workflow.modelVersion, + meta: workflow.meta, + blocks: workflow.blocks, + edges: [...workflow.edges].sort(compareEdges), + variables: workflow.variables, + } +} + +/** Defined own entries; an `undefined` field means the same as an absent one. */ +function definedEntries(value: object): Array<[string, unknown]> { + return Object.entries(value).filter(([, field]) => field !== undefined) +} + +function deepEqual(left: unknown, right: unknown): boolean { + if (Object.is(left, right)) return true + if (typeof left !== 'object' || typeof right !== 'object' || left === null || right === null) { + return false + } + if (Array.isArray(left) || Array.isArray(right)) { + if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) return false + return left.every((item, index) => deepEqual(item, right[index])) + } + const leftEntries = definedEntries(left) + const rightRecord = right as Record + if (leftEntries.length !== definedEntries(right).length) return false + return leftEntries.every( + ([key, field]) => Object.hasOwn(rightRecord, key) && deepEqual(field, rightRecord[key]) + ) +} + +/** Structural equality, total (never throws). */ +export const canonicalEquals: CanonicalEqualsFn = (a, b) => deepEqual(semantic(a), semantic(b)) + +/** `sha256Hex(stableStringify(workflow minus annotations))`. Equal CWMs hash alike. */ +export const canonicalHash: CanonicalHashFn = (workflow) => + sha256Hex(stableStringify(semantic(workflow))) + +/** + * `sf1:` + `sha256Hex(stableStringify({ workflow, identity }))` (build-spec decision 11). The CWM + * part already carries variables and locked flags and has no layout, and the identity adds the + * ids, so a canvas drag never changes it while any rename, re-id or edit does. + */ +export const sourceFingerprint: SourceFingerprintFn = (workflow, identity) => + `sf1:${sha256Hex(stableStringify({ workflow: semantic(workflow), identity }))}` From 0e80b65ca6e85f4b774f189f4028523a17f206fb Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:06:59 -0800 Subject: [PATCH 017/428] feat(workflow-code): export canonicalize and the equivalence functions --- packages/workflow-code/src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index adb17b5223d..32dda261b62 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -30,6 +30,7 @@ export type { ResourceKeyResolver, SourceFingerprintFn, } from './api' +export { canonicalize } from './canonicalize' export type { BlockCatalog, CatalogBlock, @@ -75,6 +76,7 @@ export { type LocatedDiagnostic, type SourceSpan, } from './diagnostics/frame' +export { canonicalEquals, canonicalHash, sourceFingerprint } from './equivalence' export { sha256Hex, stableStringify } from './hash' export { type LockBase, From 4626fa149038205b77539c683ae07f1d623b36d4 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:07:54 -0800 Subject: [PATCH 018/428] feat(workflow-code): biome-style doc printer and literal escaping for the printer --- packages/workflow-code/src/print/doc.ts | 381 ++++++++++++++++++++ packages/workflow-code/src/print/strings.ts | 114 ++++++ packages/workflow-code/src/print/syntax.ts | 183 ++++++++++ 3 files changed, 678 insertions(+) create mode 100644 packages/workflow-code/src/print/doc.ts create mode 100644 packages/workflow-code/src/print/strings.ts create mode 100644 packages/workflow-code/src/print/syntax.ts diff --git a/packages/workflow-code/src/print/doc.ts b/packages/workflow-code/src/print/doc.ts new file mode 100644 index 00000000000..638f5b8b206 --- /dev/null +++ b/packages/workflow-code/src/print/doc.ts @@ -0,0 +1,381 @@ +/** + * A Wadler-style document printer that reproduces the layout decisions Biome (and Prettier, which + * Biome mirrors) make for the subset of TypeScript the workflow printer emits (s3 D8). Printed + * files must be a Biome fixed point, so the algorithm follows Prettier's `printDocToString`: + * groups print flat when the rest of the line fits, conditional groups try their states in order, + * and a hard line inside a group breaks it (except conditional groups, which choose for + * themselves). + */ + +export type Doc = + | string + | Doc[] + | { type: 'group'; contents: Doc; break: boolean; states?: Doc[] } + | { type: 'indent'; contents: Doc } + | { type: 'line'; soft: boolean; hard: boolean; literal: boolean } + | { type: 'ifBreak'; breakContents: Doc; flatContents: Doc } + | { type: 'fill'; parts: Doc[] } + | { type: 'lineSuffix'; contents: Doc } + | { type: 'breakParent' } + +export const line: Doc = { type: 'line', soft: false, hard: false, literal: false } +export const softline: Doc = { type: 'line', soft: true, hard: false, literal: false } +const hardLineOnly: Doc = { type: 'line', soft: false, hard: true, literal: false } +const literalLineOnly: Doc = { type: 'line', soft: false, hard: true, literal: true } +export const breakParent: Doc = { type: 'breakParent' } +export const hardline: Doc = [hardLineOnly, breakParent] +/** A newline that resets the column to 0: template-literal content is never re-indented. */ +export const literalline: Doc = [literalLineOnly, breakParent] + +export function group(contents: Doc, options: { shouldBreak?: boolean } = {}): Doc { + return { type: 'group', contents, break: options.shouldBreak === true } +} + +/** Prettier's `conditionalGroup`: the first state that fits flat wins, else the last breaks. */ +export function conditionalGroup(states: Doc[]): Doc { + return { type: 'group', contents: states[0] ?? '', break: false, states } +} + +export function indent(contents: Doc): Doc { + return { type: 'indent', contents } +} + +export function ifBreak(breakContents: Doc, flatContents: Doc = ''): Doc { + return { type: 'ifBreak', breakContents, flatContents } +} + +export function fill(parts: Doc[]): Doc { + return { type: 'fill', parts } +} + +export function lineSuffix(contents: Doc): Doc { + return { type: 'lineSuffix', contents } +} + +export function join(separator: Doc, docs: Doc[]): Doc[] { + const out: Doc[] = [] + docs.forEach((doc, index) => { + if (index > 0) out.push(separator) + out.push(doc) + }) + return out +} + +/** Text that may contain `\n`: each newline becomes a `literalline`. */ +export function literalText(text: string): Doc { + if (!text.includes('\n')) return text + return join(literalline, text.split('\n')) +} + +/** True when the doc contains a forced break (Prettier's `willBreak`). */ +export function willBreak(doc: Doc): boolean { + if (typeof doc === 'string') return false + if (Array.isArray(doc)) return doc.some(willBreak) + switch (doc.type) { + case 'group': + return doc.break || willBreak(doc.contents) + case 'indent': + case 'lineSuffix': + return willBreak(doc.contents) + case 'line': + return doc.hard + case 'breakParent': + return true + case 'ifBreak': + return willBreak(doc.breakContents) || willBreak(doc.flatContents) + case 'fill': + return doc.parts.some(willBreak) + } +} + +/** + * Marks every non-conditional group that contains a `breakParent` as broken, bottom-up + * (Prettier's `propagateBreaks`). Returns whether `doc` contains one. + */ +function propagateBreaks(doc: Doc): boolean { + if (typeof doc === 'string') return false + if (Array.isArray(doc)) { + let found = false + for (const child of doc) if (propagateBreaks(child)) found = true + return found + } + switch (doc.type) { + case 'breakParent': + return true + case 'group': { + let found = propagateBreaks(doc.contents) + if (doc.states) { + for (const state of doc.states.slice(1)) if (propagateBreaks(state)) found = true + return false + } + if (found) doc.break = true + return doc.break || found + } + case 'indent': + case 'lineSuffix': + return propagateBreaks(doc.contents) + case 'ifBreak': { + const a = propagateBreaks(doc.breakContents) + const b = propagateBreaks(doc.flatContents) + return a || b + } + case 'fill': { + let found = false + for (const part of doc.parts) if (propagateBreaks(part)) found = true + return found + } + case 'line': + return false + } +} + +type Mode = 'flat' | 'break' + +interface Command { + indent: number + mode: Mode + doc: Doc +} + +/** + * Display width in columns. Wide East Asian characters and emoji count as two, combining marks as + * zero, matching the `unicode-width` rules Biome measures with closely enough for workflow text. + */ +export function stringWidth(text: string): number { + let width = 0 + for (const char of text) { + const code = char.codePointAt(0) ?? 0 + if (code < 0x20 || (code >= 0x7f && code < 0xa0)) continue + if ((code >= 0x300 && code <= 0x36f) || (code >= 0xfe00 && code <= 0xfe0f) || code === 0x200d) { + continue + } + width += isWide(code) ? 2 : 1 + } + return width +} + +function isWide(code: number): boolean { + return ( + (code >= 0x1100 && code <= 0x115f) || + (code >= 0x2e80 && code <= 0x303e) || + (code >= 0x3041 && code <= 0x33ff) || + (code >= 0x3400 && code <= 0x4dbf) || + (code >= 0x4e00 && code <= 0x9fff) || + (code >= 0xa000 && code <= 0xa4cf) || + (code >= 0xac00 && code <= 0xd7a3) || + (code >= 0xf900 && code <= 0xfaff) || + (code >= 0xfe30 && code <= 0xfe4f) || + (code >= 0xff00 && code <= 0xff60) || + (code >= 0xffe0 && code <= 0xffe6) || + (code >= 0x1f300 && code <= 0x1f64f) || + (code >= 0x1f900 && code <= 0x1f9ff) || + (code >= 0x20000 && code <= 0x3fffd) + ) +} + +function fits(next: Command, rest: Command[], initialWidth: number, mustBeFlat: boolean): boolean { + let width = initialWidth + let restIndex = rest.length + const commands: Array<{ mode: Mode; doc: Doc }> = [{ mode: next.mode, doc: next.doc }] + while (width >= 0) { + let current = commands.pop() + if (!current) { + if (restIndex === 0) return true + const restCommand = rest[restIndex - 1] + restIndex -= 1 + if (!restCommand) return true + current = { mode: restCommand.mode, doc: restCommand.doc } + } + const { mode, doc } = current + if (typeof doc === 'string') { + width -= stringWidth(doc) + continue + } + if (Array.isArray(doc)) { + for (let i = doc.length - 1; i >= 0; i -= 1) { + const child = doc[i] + if (child !== undefined) commands.push({ mode, doc: child }) + } + continue + } + switch (doc.type) { + case 'indent': + commands.push({ mode, doc: doc.contents }) + break + case 'group': { + if (mustBeFlat && doc.break) return false + const groupMode: Mode = doc.break ? 'break' : mode + const contents = + doc.states && groupMode === 'break' ? (doc.states.at(-1) ?? doc.contents) : doc.contents + commands.push({ mode: groupMode, doc: contents }) + break + } + case 'ifBreak': + commands.push({ mode, doc: mode === 'break' ? doc.breakContents : doc.flatContents }) + break + case 'fill': + for (let i = doc.parts.length - 1; i >= 0; i -= 1) { + const part = doc.parts[i] + if (part !== undefined) commands.push({ mode, doc: part }) + } + break + case 'line': + if (mode === 'break' || doc.hard) return true + if (!doc.soft) width -= 1 + break + case 'lineSuffix': + case 'breakParent': + break + } + } + return false +} + +/** Renders a doc to text at the given width with 2-space indentation and LF line endings. */ +export function printDoc(root: Doc, width: number): string { + propagateBreaks(root) + let output = '' + let column = 0 + /** Set after a hard line inside flat content: later flat groups must measure again. */ + let shouldRemeasure = false + const lineSuffixes: Command[] = [] + const commands: Command[] = [{ indent: 0, mode: 'break', doc: root }] + + const trimTrailing = () => { + const trimmed = output.replace(/[ \t]+$/, '') + column -= output.length - trimmed.length + output = trimmed + } + + while (commands.length > 0) { + const command = commands.pop() + if (!command) break + const { indent: ind, mode, doc } = command + if (typeof doc === 'string') { + output += doc + column += stringWidth(doc) + continue + } + if (Array.isArray(doc)) { + for (let i = doc.length - 1; i >= 0; i -= 1) { + const child = doc[i] + if (child !== undefined) commands.push({ indent: ind, mode, doc: child }) + } + continue + } + switch (doc.type) { + case 'indent': + commands.push({ indent: ind + 2, mode, doc: doc.contents }) + break + case 'group': { + if (mode === 'flat' && !shouldRemeasure) { + commands.push({ indent: ind, mode: doc.break ? 'break' : 'flat', doc: doc.contents }) + break + } + shouldRemeasure = false + const next: Command = { indent: ind, mode: 'flat', doc: doc.contents } + const remaining = width - column + if (!doc.break && fits(next, commands, remaining, false)) { + commands.push(next) + break + } + if (!doc.states) { + commands.push({ indent: ind, mode: 'break', doc: doc.contents }) + break + } + const mostExpanded = doc.states.at(-1) ?? doc.contents + if (doc.break) { + commands.push({ indent: ind, mode: 'break', doc: mostExpanded }) + break + } + let chosen: Command | null = null + for (let i = 1; i < doc.states.length; i += 1) { + const state = doc.states[i] + if (state === undefined) continue + const candidate: Command = { indent: ind, mode: 'flat', doc: state } + if (fits(candidate, commands, remaining, false)) { + chosen = candidate + break + } + } + commands.push(chosen ?? { indent: ind, mode: 'break', doc: mostExpanded }) + break + } + case 'ifBreak': + commands.push({ + indent: ind, + mode, + doc: mode === 'break' ? doc.breakContents : doc.flatContents, + }) + break + case 'fill': + printFill(doc.parts, ind, mode, commands, width - column) + break + case 'lineSuffix': + lineSuffixes.push({ indent: ind, mode, doc: doc.contents }) + break + case 'breakParent': + break + case 'line': { + if (mode === 'flat' && !doc.hard) { + if (!doc.soft) { + output += ' ' + column += 1 + } + break + } + if (mode === 'flat') shouldRemeasure = true + if (lineSuffixes.length > 0) { + commands.push(command) + while (lineSuffixes.length > 0) { + const suffix = lineSuffixes.pop() + if (suffix) commands.push(suffix) + } + break + } + if (doc.literal) { + output += '\n' + column = 0 + } else { + trimTrailing() + output += `\n${' '.repeat(ind)}` + column = ind + } + break + } + } + } + return output +} + +/** Prettier's fill: content/separator pairs, each separator breaking only when the next part overflows. */ +function printFill(parts: Doc[], ind: number, mode: Mode, commands: Command[], remaining: number) { + const [content, separator, nextContent, ...rest] = parts + if (content === undefined) return + const contentFlat: Command = { indent: ind, mode: 'flat', doc: content } + const contentFits = fits(contentFlat, [], remaining, true) + if (separator === undefined) { + commands.push(contentFits ? contentFlat : { indent: ind, mode: 'break', doc: content }) + return + } + const restCommand: Command = { + indent: ind, + mode, + doc: { type: 'fill', parts: nextContent === undefined ? [] : [nextContent, ...rest] }, + } + if (nextContent === undefined) { + commands.push(restCommand) + commands.push({ indent: ind, mode: contentFits ? 'flat' : 'break', doc: separator }) + commands.push(contentFits ? contentFlat : { indent: ind, mode: 'break', doc: content }) + return + } + const pairFits = fits( + { indent: ind, mode: 'flat', doc: [content, separator, nextContent] }, + [], + remaining, + true + ) + commands.push(restCommand) + commands.push({ indent: ind, mode: pairFits ? 'flat' : 'break', doc: separator }) + commands.push(contentFits ? contentFlat : { indent: ind, mode: 'break', doc: content }) +} diff --git a/packages/workflow-code/src/print/strings.ts b/packages/workflow-code/src/print/strings.ts new file mode 100644 index 00000000000..14fd7dd50e2 --- /dev/null +++ b/packages/workflow-code/src/print/strings.ts @@ -0,0 +1,114 @@ +/** + * Literal escaping for printed source. Every function returns text whose cooked JS value is + * exactly the input (s3 D5): the compiler reads cooked values, so `\`, quotes, `${`, CR, + * U+2028/2029, other control characters and lone surrogates are escaped, while LF stays raw inside + * templates so multi-line text reads naturally. Template content is never re-indented. + */ + +const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ + +/** An ASCII identifier name: usable as a bare object key or after `.` (reserved words included). */ +export function isIdentifierName(text: string): boolean { + return IDENTIFIER.test(text) +} + +function hex4(code: number): string { + return `\\u${code.toString(16).toUpperCase().padStart(4, '0')}` +} + +/** + * Escapes one UTF-16 code unit sequence. `mode` decides which characters are special: quoted + * strings escape LF and their quote, templates escape the backtick and `${` instead. + */ +function escapeText(text: string, mode: 'single' | 'double' | 'template'): string { + let out = '' + for (let i = 0; i < text.length; i += 1) { + const code = text.charCodeAt(i) + const char = text[i] ?? '' + if (code >= 0xd800 && code <= 0xdbff) { + const next = text.charCodeAt(i + 1) + if (next >= 0xdc00 && next <= 0xdfff) { + out += char + (text[i + 1] ?? '') + i += 1 + } else { + out += hex4(code) + } + continue + } + if (code >= 0xdc00 && code <= 0xdfff) { + out += hex4(code) + continue + } + switch (char) { + case '\\': + out += '\\\\' + continue + case '\r': + out += '\\r' + continue + case '\u2028': + case '\u2029': + out += hex4(code) + continue + case '\n': + out += mode === 'template' ? '\n' : '\\n' + continue + case '\t': + out += mode === 'template' ? '\t' : '\\t' + continue + case "'": + out += mode === 'single' ? "\\'" : "'" + continue + case '"': + out += mode === 'double' ? '\\"' : '"' + continue + case '`': + out += mode === 'template' ? '\\`' : '`' + continue + case '$': + out += mode === 'template' && text[i + 1] === '{' ? '\\$' : '$' + continue + } + if (code < 0x20 || code === 0x7f) { + out += hex4(code) + continue + } + out += char + } + return out +} + +/** + * A quoted string literal. Single quotes unless the text holds more single than double quotes, + * which is the quote Biome would pick (`quoteStyle: single`). + */ +export function quoteString(text: string): string { + let singles = 0 + let doubles = 0 + for (const char of text) { + if (char === "'") singles += 1 + else if (char === '"') doubles += 1 + } + const quote = singles > doubles ? '"' : "'" + return quote + escapeText(text, quote === '"' ? 'double' : 'single') + quote +} + +/** The literal (cooked) part of a template between interpolations. */ +export function escapeTemplateText(text: string): string { + return escapeText(text, 'template') +} + +/** An object key: bare when it is an identifier name, quoted otherwise (`quoteProperties: asNeeded`). */ +export function printKey(key: string): string { + return isIdentifierName(key) ? key : quoteString(key) +} + +/** A member access segment: `.seg` for identifier names, `['seg']` otherwise. */ +export function printMember(segment: string): string { + return isIdentifierName(segment) ? `.${segment}` : `[${quoteString(segment)}]` +} + +/** A JSON number as Biome prints a numeric literal (`String(n)` minus the exponent `+`). */ +export function printNumber(value: number): string { + return String(value).replace('e+', 'e') +} diff --git a/packages/workflow-code/src/print/syntax.ts b/packages/workflow-code/src/print/syntax.ts new file mode 100644 index 00000000000..e6690f0f40d --- /dev/null +++ b/packages/workflow-code/src/print/syntax.ts @@ -0,0 +1,183 @@ +/** + * Doc builders for the few expression shapes printed workflow files contain, each laid out the + * way Biome lays it out: objects and arrays with es5 trailing commas, call arguments with + * last-argument hugging, and object properties that break after the colon only where Biome does. + */ + +import { + breakParent, + conditionalGroup, + type Doc, + fill, + group, + hardline, + ifBreak, + indent, + join, + line, + softline, + stringWidth, + willBreak, +} from './doc' + +/** The syntactic shape of a printed expression, which drives Biome's layout choices. */ +export type ExprShape = + | 'string' + | 'template' + | 'number' + | 'literal' + | 'identifier' + | 'member' + | 'object' + | 'array' + | 'call' + | 'arrow' + +export interface Expr { + doc: Doc + shape: ExprShape + /** True for a non-empty object or array literal (Biome's `couldExpandArg`). */ + expandable?: boolean + /** True for a number literal, or `-` applied to one. */ + numeric?: boolean + /** Property or element count of an object or array literal. */ + size?: number + /** A number-only array, which Biome fills like text instead of one element per line. */ + concise?: boolean +} + +export interface Property { + key: string + value: Expr + leading?: Doc[] + trailing?: Doc[] +} + +/** Keys narrower than this never break after the colon (Biome's short-key rule: width < tab + 3). */ +const SHORT_KEY_WIDTH = 5 + +function printProperty(property: Property): Doc { + const { key, value } = property + const breakAfterColon = + stringWidth(key) >= SHORT_KEY_WIDTH && (value.shape === 'string' || value.shape === 'member') + const body: Doc = breakAfterColon + ? group([key, ':', group(indent([line, value.doc]))]) + : group([key, ': ', value.doc]) + const leading = property.leading ?? [] + return [...leading.map((comment) => [comment, hardline]), body] +} + +export function objectExpr(properties: Property[]): Expr { + if (properties.length === 0) return { doc: '{}', shape: 'object' } + const parts: Doc[] = [] + properties.forEach((property, index) => { + const isLast = index === properties.length - 1 + const trailing = property.trailing ?? [] + parts.push(printProperty(property)) + if (!isLast) parts.push(',') + else parts.push(ifBreak(',')) + parts.push(trailing) + if (!isLast) parts.push(line) + }) + return { + doc: group(['{', indent([line, parts]), line, '}']), + shape: 'object', + expandable: true, + size: properties.length, + } +} + +export function arrayExpr(elements: Expr[]): Expr { + if (elements.length === 0) return { doc: '[]', shape: 'array' } + const concise = elements.length > 1 && elements.every((element) => element.numeric === true) + if (concise) { + const parts: Doc[] = [] + elements.forEach((element, index) => { + if (index > 0) parts.push([',', line]) + parts.push(element.doc) + }) + return { + doc: group(['[', indent([softline, fill(parts)]), ifBreak(','), softline, ']']), + shape: 'array', + expandable: true, + size: elements.length, + concise: true, + } + } + const shouldBreak = + elements.length > 1 && + elements.every( + (element) => + (element.shape === 'object' || element.shape === 'array') && + element.shape === elements[0]?.shape && + (element.size ?? 0) > 1 + ) + return { + doc: group( + [ + '[', + indent([ + softline, + join( + [',', line], + elements.map((element) => element.doc) + ), + ]), + ifBreak(','), + softline, + ']', + ], + { shouldBreak } + ), + shape: 'array', + expandable: true, + size: elements.length, + } +} + +/** Call arguments with Biome's last-argument hugging (`fn('Name', {` … `})`). */ +export function callArgs(args: Expr[]): Doc { + if (args.length === 0) return '()' + const docs = args.map((arg) => arg.doc) + const separated: Doc[] = [] + docs.forEach((doc, index) => { + if (index > 0) separated.push([',', line]) + separated.push(doc) + }) + const allBroken = group(['(', indent([line, separated]), line, ')'], { shouldBreak: true }) + const last = args.at(-1) + const penultimate = args.at(-2) + const shouldGroupLast = + last !== undefined && + (last.expandable === true || last.shape === 'arrow') && + (penultimate === undefined || penultimate.shape !== last.shape) && + !(args.length === 2 && penultimate?.shape === 'arrow' && last.shape === 'array') && + !(args.length > 1 && last.concise === true) + if (!shouldGroupLast || last === undefined) { + return group(['(', indent([softline, separated]), softline, ')']) + } + const leading = docs.slice(0, -1) + if (leading.some(willBreak)) return allBroken + const leadingSeparated: Doc[] = leading.map((doc) => [doc, ',', line]) + return [ + docs.some(willBreak) ? breakParent : '', + conditionalGroup([ + ['(', separated, ')'], + ['(', leadingSeparated, group(last.doc, { shouldBreak: true }), ')'], + allBroken, + ]), + ] +} + +export function callExpr(callee: string, args: Expr[]): Expr { + return { doc: [callee, callArgs(args)], shape: 'call' } +} + +/** `(params) => { statements }`, with an empty body printed `{}`. */ +export function arrowExpr(params: string, statements: Doc[]): Expr { + const body: Doc = + statements.length === 0 + ? '{}' + : ['{', indent([hardline, join(hardline, statements)]), hardline, '}'] + return { doc: [`(${params}) => `, body], shape: 'arrow' } +} From 9baec5cadf7d1280b0aad72e08f4a4688ca914f0 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:07:55 -0800 Subject: [PATCH 019/428] feat(workflow-code): print canonical workflows as sdk source --- packages/workflow-code/src/print/comments.ts | 124 ++ packages/workflow-code/src/print/idents.ts | 59 + packages/workflow-code/src/print/order.ts | 73 ++ packages/workflow-code/src/print/printer.ts | 1140 ++++++++++++++++++ packages/workflow-code/src/print/refs.ts | 173 +++ packages/workflow-code/src/print/values.ts | 210 ++++ 6 files changed, 1779 insertions(+) create mode 100644 packages/workflow-code/src/print/comments.ts create mode 100644 packages/workflow-code/src/print/idents.ts create mode 100644 packages/workflow-code/src/print/order.ts create mode 100644 packages/workflow-code/src/print/printer.ts create mode 100644 packages/workflow-code/src/print/refs.ts create mode 100644 packages/workflow-code/src/print/values.ts diff --git a/packages/workflow-code/src/print/comments.ts b/packages/workflow-code/src/print/comments.ts new file mode 100644 index 00000000000..ec1701961c8 --- /dev/null +++ b/packages/workflow-code/src/print/comments.ts @@ -0,0 +1,124 @@ +/** + * Comments at anchors (build-spec decision 10, s3 §4 "Comments"). Comments live in + * `annotations.comments` keyed by anchor; the printer places each one at its anchor, moves one + * whose param or wiring statement no longer prints to its block, and drops one whose block is gone. + */ + +import { decodeAnchor, encodeAnchor } from '../anchors' +import type { PrintDiagnosticCode } from '../diagnostics/codes' +import type { Diagnostic } from '../diagnostics/frame' +import type { AnchorKey, BlockKey, CodeComment, PortKey } from '../model' +import { breakParent, type Doc, hardline, join, lineSuffix, literalText } from './doc' + +export const anchors = { + header: encodeAnchor({ kind: 'header' }), + wiring: encodeAnchor({ kind: 'wiring' }), + footer: encodeAnchor({ kind: 'footer' }), + block: (block: BlockKey) => encodeAnchor({ kind: 'block', block }), + param: (block: BlockKey, param: string) => encodeAnchor({ kind: 'param', block, param }), + inactive: (block: BlockKey, param: string) => encodeAnchor({ kind: 'inactive', block, param }), + edges: (block: BlockKey, port: PortKey) => encodeAnchor({ kind: 'edges', block, port }), + variable: (variable: string) => encodeAnchor({ kind: 'var', variable }), +} + +/** The block an anchor belongs to, or `null` for file-level and variable anchors. */ +function anchorBlock(anchor: string): BlockKey | null { + const decoded = decodeAnchor(anchor) + if (!decoded) return null + return 'block' in decoded ? decoded.block : null +} + +function printComment(comment: CodeComment): Doc { + if (comment.kind === 'line' || comment.text.includes('*/')) { + return join( + hardline, + comment.text.split(/\r\n|[\n\r\u2028\u2029]/).map((text) => `//${text}`) + ) + } + const lines = comment.text.split('\n') + const indentable = + lines.length > 1 && lines.slice(1).every((text) => text.trimStart().startsWith('*')) + if (!indentable) return ['/*', literalText(comment.text), '*/'] + const body = lines.map((text, index) => { + if (index === 0) return text.trimEnd() + return ` ${index < lines.length - 1 ? text.trim() : text.trimStart()}` + }) + return ['/*', join(hardline, body), '*/'] +} + +export interface AttachedComments { + leading: Doc[] + trailing: Doc[] +} + +/** Hands out each anchor's comments once and reports the ones nobody claimed. */ +export class CommentPlacer { + private readonly pending = new Map() + readonly diagnostics: Diagnostic[] = [] + + constructor(comments: Partial>) { + for (const [anchor, list] of Object.entries(comments)) { + if (list && list.length > 0) this.pending.set(anchor, [...list]) + } + } + + take(anchor: AnchorKey): AttachedComments { + const list = this.pending.get(anchor) ?? [] + this.pending.delete(anchor) + return split(list) + } + + /** + * Claims every comment left on a param or wiring anchor of `block` so it prints with the block + * declaration (`W_COMMENT_MOVED`). Call after the block's params and wiring were printed. + */ + takeOrphans(block: BlockKey): AttachedComments { + const moved: CodeComment[] = [] + for (const [anchor, list] of [...this.pending]) { + if (decodeAnchor(anchor)?.kind === 'block' || anchorBlock(anchor) !== block) continue + this.pending.delete(anchor) + moved.push(...list) + this.diagnostics.push({ + code: 'W_COMMENT_MOVED', + severity: 'warning', + message: 'A comment has no printed anchor; moved to its block declaration.', + blockKey: block, + }) + } + return split(moved) + } + + /** Reports every comment no anchor claimed (`W_COMMENT_DROPPED`). */ + dropRemaining(): void { + for (const anchor of this.pending.keys()) { + const block = anchorBlock(anchor) + this.diagnostics.push({ + code: 'W_COMMENT_DROPPED', + severity: 'warning', + message: 'A comment was dropped: its anchor no longer exists.', + ...(block === null ? {} : { blockKey: block }), + }) + } + this.pending.clear() + } +} + +function split(list: CodeComment[]): AttachedComments { + const leading: Doc[] = [] + const trailing: Doc[] = [] + for (const comment of list) { + if (comment.placement === 'leading') { + leading.push(printComment(comment)) + } else if (comment.kind === 'line') { + trailing.push([lineSuffix([' ', printComment(comment)]), breakParent]) + } else { + trailing.push([' ', printComment(comment)]) + } + } + return { leading, trailing } +} + +/** A statement with its leading comments above and trailing comments after. */ +export function withComments(statement: Doc, comments: AttachedComments): Doc { + return [...comments.leading.map((comment) => [comment, hardline]), statement, comments.trailing] +} diff --git a/packages/workflow-code/src/print/idents.ts b/packages/workflow-code/src/print/idents.ts new file mode 100644 index 00000000000..ada2f65e754 --- /dev/null +++ b/packages/workflow-code/src/print/idents.ts @@ -0,0 +1,59 @@ +import type { BlockKey } from '../model' +import { SDK_RESERVED_IDENTIFIERS } from '../sdk' +import { isIdentifierName } from './strings' + +/** `'Classify ticket'` → `classifyTicket`; non-ASCII and punctuation split words. */ +export function deriveIdentifier(name: string): string { + const words = name.split(/[^A-Za-z0-9]+/).filter((word) => word.length > 0) + if (words.length === 0) return 'block' + const [first = '', ...rest] = words + const head = + first === first.toUpperCase() ? first.toLowerCase() : first[0]?.toLowerCase() + first.slice(1) + const tail = rest.map((word) => (word[0]?.toUpperCase() ?? '') + word.slice(1)).join('') + const ident = head + tail + return /^[0-9]/.test(ident) ? `_${ident}` : ident +} + +function isReservedIdentifier(name: string, extraReserved: ReadonlySet): boolean { + return SDK_RESERVED_IDENTIFIERS.has(name) || extraReserved.has(name) +} + +/** + * Assigns one unique `const` identifier per block. Blocks are visited in declaration order: a + * usable hinted binding (lock or code_meta) is claimed first, so a canvas rename keeps the + * identifier (build-spec decision 4); the rest derive camelCase from the display name, with a + * numeric suffix on collision with another block, `SDK_RESERVED_IDENTIFIERS` or a name in + * `reserved` (the catalog's builder namespaces). + */ +export function assignIdentifiers( + blocks: Array<{ key: BlockKey; name: string; hint: string | undefined }>, + reserved: ReadonlySet +): Map { + const taken = new Set() + const result = new Map() + for (const block of blocks) { + const hint = block.hint + if ( + hint !== undefined && + isIdentifierName(hint) && + !isReservedIdentifier(hint, reserved) && + !taken.has(hint) + ) { + taken.add(hint) + result.set(block.key, hint) + } + } + for (const block of blocks) { + if (result.has(block.key)) continue + const base = deriveIdentifier(block.name) + let candidate = base + let suffix = 2 + while (isReservedIdentifier(candidate, reserved) || taken.has(candidate)) { + candidate = `${base}${suffix}` + suffix += 1 + } + taken.add(candidate) + result.set(block.key, candidate) + } + return result +} diff --git a/packages/workflow-code/src/print/order.ts b/packages/workflow-code/src/print/order.ts new file mode 100644 index 00000000000..12f4fe09014 --- /dev/null +++ b/packages/workflow-code/src/print/order.ts @@ -0,0 +1,73 @@ +import { compareStrings } from '@sim/utils/string' +import type { BlockKey } from '../model' + +export interface OrderNode { + key: BlockKey + isTrigger: boolean + /** Lock / code_meta order; absent sorts last. */ + order: number | undefined +} + +export interface OrderDependency { + before: BlockKey + after: BlockKey + /** + * A ref dependency: declaring `after` first would be TS2448, so the printer literalizes the ref + * when a cycle forces it. Edge dependencies are soft and only shape the reading order. + */ + hard: boolean +} + +function compareNodes(a: OrderNode, b: OrderNode): number { + if (a.isTrigger !== b.isTrigger) return a.isTrigger ? -1 : 1 + const ao = a.order ?? Number.POSITIVE_INFINITY + const bo = b.order ?? Number.POSITIVE_INFINITY + if (ao !== bo) return ao < bo ? -1 : 1 + return compareStrings(a.key, b.key) +} + +/** + * Declaration order for one scope: Kahn's algorithm whose ready queue is keyed by + * (trigger first, lock order, key) (s3 D10). When every remaining node waits on another (a cycle), + * the smallest node with no unmet hard dependency goes next, else the smallest node outright; the + * caller literalizes the refs that end up pointing forward. + */ +export function declarationOrder(nodes: OrderNode[], dependencies: OrderDependency[]): BlockKey[] { + const byKey = new Map(nodes.map((node) => [node.key, node])) + const hardIn = new Map() + const softIn = new Map() + const outgoing = new Map() + for (const node of nodes) { + hardIn.set(node.key, 0) + softIn.set(node.key, 0) + outgoing.set(node.key, []) + } + const seen = new Set() + for (const dep of dependencies) { + if (dep.before === dep.after || !byKey.has(dep.before) || !byKey.has(dep.after)) continue + const id = `${dep.hard ? 'h' : 's'}\u0000${dep.before}\u0000${dep.after}` + if (seen.has(id)) continue + seen.add(id) + const counts = dep.hard ? hardIn : softIn + counts.set(dep.after, (counts.get(dep.after) ?? 0) + 1) + outgoing.get(dep.before)?.push(dep) + } + + const remaining = [...nodes].sort(compareNodes) + const result: BlockKey[] = [] + while (remaining.length > 0) { + let index = remaining.findIndex( + (node) => (hardIn.get(node.key) ?? 0) === 0 && (softIn.get(node.key) ?? 0) === 0 + ) + if (index === -1) index = remaining.findIndex((node) => (hardIn.get(node.key) ?? 0) === 0) + if (index === -1) index = 0 + const [next] = remaining.splice(index, 1) + if (!next) break + result.push(next.key) + for (const dep of outgoing.get(next.key) ?? []) { + const counts = dep.hard ? hardIn : softIn + counts.set(dep.after, (counts.get(dep.after) ?? 0) - 1) + } + } + return result +} diff --git a/packages/workflow-code/src/print/printer.ts b/packages/workflow-code/src/print/printer.ts new file mode 100644 index 00000000000..c4d6486edee --- /dev/null +++ b/packages/workflow-code/src/print/printer.ts @@ -0,0 +1,1140 @@ +/** + * `printWorkflow`: a canonical workflow → one TypeScript source file plus optional function-code + * files (build-spec decisions 7–10, s3 D8–D12, s2 §2). Output is deterministic: the same input + * prints byte-identical text, a one-param change touches one line, and the file is a Biome fixed + * point. + */ + +import { compareStrings } from '@sim/utils/string' +import { portKey } from '../anchors' +import type { LockHintBlock, LockHints, PrintInput, PrintResult, PrintWorkflowFn } from '../api' +import type { BlockCatalog, CatalogBlock, CatalogBuilder, CatalogSubBlock } from '../catalog/types' +import type { PrintDiagnosticCode } from '../diagnostics/codes' +import type { Diagnostic } from '../diagnostics/frame' +import type { + AnchorKey, + BlockKey, + CanonicalBlock, + CanonicalEdge, + CanonicalTool, + CanonicalWorkflow, + Json, + ParamMode, + PortKey, + Value, +} from '../model' +import { GENERIC_BUILDER } from '../sdk' +import { type AttachedComments, anchors, CommentPlacer, withComments } from './comments' +import { type Doc, group, hardline, ifBreak, indent, join, line, printDoc } from './doc' +import { assignIdentifiers } from './idents' +import { declarationOrder, type OrderDependency } from './order' +import { RefPrinter, type RefScope, referencedHeads } from './refs' +import { printKey, printMember, quoteString } from './strings' +import { arrayExpr, arrowExpr, callExpr, type Expr, objectExpr, type Property } from './syntax' +import { type FieldContext, type PrintedValue, type Tag, ValuePrinter } from './values' + +/** The function-code languages a code file can hold (`CodeLanguage`, lib/execution/languages.ts). */ +export type CodeLanguage = 'javascript' | 'python' | 'shell' + +/** + * The code-position token bijection owned by `src/code-files` (Wave 2D): `toFile` rewrites a stored + * body's code-position `` / `{{X}}` tokens to `$ref.a.b` / `$env.X`, `fromFile` reverses it. + * Either returns `null` when the body cannot be represented (build-spec decision 9). + */ +export interface CodeFileCodec { + toFile(code: string, language: CodeLanguage): string | null + fromFile(text: string, language: CodeLanguage): string | null +} + +const DEFAULT_WIDTH = 100 +const DEFAULT_CODE_DIR = 'functions' +const ENTRY_PATH = 'workflow.ts' +const SDK_MODULE = '@sim/workflow-sdk' + +const LANGUAGE_TAGS: Record = { javascript: 'js', python: 'py', shell: 'sh' } +const LANGUAGE_EXTENSIONS: Record = { + javascript: 'js', + python: 'py', + shell: 'sh', +} + +type Diag = Diagnostic + +function toLanguage(value: unknown): CodeLanguage | null { + if (value === 'javascript' || value === 'js') return 'javascript' + if (value === 'python' || value === 'py') return 'python' + if (value === 'shell' || value === 'bash' || value === 'sh') return 'shell' + return null +} + +function stringParam(block: CanonicalBlock, id: string): string | undefined { + const param = block.params[id] + return param?.kind === 'value' && typeof param.value === 'string' ? param.value : undefined +} + +function hasValue(block: CanonicalBlock, id: string): boolean { + return block.params[id] !== undefined +} + +/** + * The catalog builder for a block, most specific first (operation, then pinned fields). A builder + * whose trigger mode differs is used only when none matches, and the caller then prints + * `triggerMode` in the meta. + */ +function findBuilder( + catalog: BlockCatalog, + type: string, + triggerMode: boolean, + read: (id: string) => string | undefined +): { path: string; builder: CatalogBuilder } | null { + const candidates = Object.entries(catalog.builders) + .filter(([, builder]) => { + if (builder.type !== type) return false + if (builder.operation !== undefined && read('operation') !== builder.operation) return false + return Object.entries(builder.fixed ?? {}).every(([id, value]) => read(id) === value) + }) + .sort(([pathA, a], [pathB, b]) => { + const modeA = (a.triggerMode === true) === triggerMode ? 0 : 1 + const modeB = (b.triggerMode === true) === triggerMode ? 0 : 1 + if (modeA !== modeB) return modeA - modeB + const opA = a.operation === undefined ? 1 : 0 + const opB = b.operation === undefined ? 1 : 0 + if (opA !== opB) return opA - opB + const fixedA = Object.keys(a.fixed ?? {}).length + const fixedB = Object.keys(b.fixed ?? {}).length + if (fixedA !== fixedB) return fixedB - fixedA + return compareStrings(pathA, pathB) + }) + const [first] = candidates + return first ? { path: first[0], builder: first[1] } : null +} + +function pinnedIds(builder: CatalogBuilder | undefined): Set { + const ids = new Set(Object.keys(builder?.fixed ?? {})) + if (builder?.operation !== undefined) ids.add('operation') + return ids +} + +function kebab(ident: string): string { + return ident + .replace(/([a-z0-9])([A-Z])/g, '$1-$2') + .replace(/_/g, '-') + .toLowerCase() +} + +const INTEGER_LIKE = /^(0|[1-9][0-9]*)$/ +const INPUT_FIELD_KEYS = new Set(['name', 'type', 'value', 'description', 'required']) + +/** + * The `inputFormat` record sugar (s2 §2): `{ subject: 'string' }` for `{ name, type, value: '' }` + * items, `{ name: { type, value?, description?, required? } }` otherwise. `null` when any item + * would not compile back to the same list (unknown keys, duplicate or integer-like names). + */ +function inputFormatSugar( + value: Value +): Array<{ name: string; item: Record }> | null { + if (!Array.isArray(value) || value.length === 0) return null + const seen = new Set() + const items: Array<{ name: string; item: Record }> = [] + for (const entry of value) { + if (entry === null || typeof entry !== 'object' || Array.isArray(entry) || '$sim' in entry) { + return null + } + const record = entry as Record + const name = record.name + if (typeof name !== 'string' || typeof record.type !== 'string') return null + if (seen.has(name) || INTEGER_LIKE.test(name) || name === '__proto__') return null + if (Object.keys(record).some((key) => !INPUT_FIELD_KEYS.has(key))) return null + seen.add(name) + items.push({ name, item: record }) + } + return items +} + +interface ScopeInfo { + /** Declaration order of the scope's members. */ + members: BlockKey[] +} + +/** One resolved param ready to print. */ +interface ParamEntry { + key: string + anchor: AnchorKey + value: Expr +} + +class WorkflowPrinter { + private readonly workflow: CanonicalWorkflow + private readonly catalog: BlockCatalog + private readonly hints: LockHints + private readonly width: number + private readonly options: PrintInput['options'] + private readonly diagnostics: Diag[] = [] + private readonly imports = new Set(['workflow']) + private usesVars = false + private readonly blocks: Map + private readonly parentOf = new Map() + private readonly scopes = new Map() + private readonly position = new Map() + private readonly preorder: BlockKey[] = [] + private idents = new Map() + private readonly paramNames = new Map() + private readonly refs: RefPrinter + private readonly values: ValuePrinter + private readonly comments: CommentPlacer + private readonly codeFiles: Array<{ path: string; text: string }> = [] + private readonly codeFileHints = new Map() + private readonly takenCodePaths = new Set() + + constructor( + input: PrintInput, + private readonly codec: CodeFileCodec | undefined + ) { + this.workflow = input.workflow + this.catalog = input.catalog + this.hints = input.hints ?? { blocks: {} } + this.width = input.options.lineWidth ?? DEFAULT_WIDTH + this.options = input.options + this.blocks = new Map(Object.entries(this.workflow.blocks)) + for (const [key, block] of this.blocks) { + const parent = block.parent === null ? undefined : this.blocks.get(block.parent) + this.parentOf.set(key, parent?.subflow && block.parent !== null ? block.parent : null) + } + this.breakParentCycles() + const scope: RefScope = { + hasBlock: (key) => this.blocks.has(key), + hasVariable: (key) => key in this.workflow.variables, + visibility: (from, target) => this.visibility(from, target), + identOf: (key) => this.idents.get(key) ?? key, + loopParam: (from, kind) => this.loopParam(from, kind), + use: (name) => this.imports.add(name), + useVars: () => { + this.usesVars = true + }, + } + this.refs = new RefPrinter(scope) + this.values = new ValuePrinter( + this.refs, + (name) => this.imports.add(name), + () => { + this.usesVars = true + } + ) + this.comments = new CommentPlacer(this.workflow.annotations.comments) + } + + /** A parent chain that loops (corrupt input) is cut at the block that closes it. */ + private breakParentCycles(): void { + for (const key of this.blocks.keys()) { + const seen = new Set([key]) + let current = this.parentOf.get(key) ?? null + while (current !== null) { + if (seen.has(current)) { + this.parentOf.set(key, null) + break + } + seen.add(current) + current = this.parentOf.get(current) ?? null + } + } + } + + private ancestors(key: BlockKey): BlockKey[] { + const chain: BlockKey[] = [] + let current = this.parentOf.get(key) ?? null + while (current !== null) { + chain.push(current) + current = this.parentOf.get(current) ?? null + } + return chain + } + + /** The member of `target`'s scope that encloses `from` (or is `from`), if any. */ + private enclosingMember(from: BlockKey, target: BlockKey): BlockKey | null { + const scope = this.parentOf.get(target) ?? null + for (const candidate of [from, ...this.ancestors(from)]) { + if ((this.parentOf.get(candidate) ?? null) === scope) return candidate + } + return null + } + + private visibility(from: BlockKey, target: BlockKey): 'ok' | 'forward' | 'scope' { + if (from === target) return 'forward' + const member = this.enclosingMember(from, target) + if (member === null) return 'scope' + if (member === target) return 'ok' + const a = this.position.get(target) ?? 0 + const b = this.position.get(member) ?? 0 + return a < b ? 'ok' : 'forward' + } + + private loopParam(from: BlockKey, kind: 'loop' | 'parallel'): string | null { + for (const ancestor of this.ancestors(from)) { + if (this.blocks.get(ancestor)?.subflow?.kind === kind) { + return this.paramNames.get(ancestor) ?? null + } + } + return null + } + + private isTrigger(block: CanonicalBlock): boolean { + return block.triggerMode || this.catalog.blocks[block.type]?.category === 'triggers' + } + + private layout(): void { + const dependencies: OrderDependency[] = [] + for (const [key, block] of this.blocks) { + for (const head of this.blockRefHeads(block)) { + if (!this.blocks.has(head) || head === key) continue + const member = this.enclosingMember(key, head) + if (member !== null && member !== head) { + dependencies.push({ before: head, after: member, hard: true }) + } + } + } + for (const edge of this.workflow.edges) { + if (!this.blocks.has(edge.from) || !this.blocks.has(edge.to)) continue + if ((this.parentOf.get(edge.from) ?? null) === (this.parentOf.get(edge.to) ?? null)) { + dependencies.push({ before: edge.from, after: edge.to, hard: false }) + } + } + const membersOf = new Map() + for (const key of this.blocks.keys()) { + const parent = this.parentOf.get(key) ?? null + const list = membersOf.get(parent) ?? [] + list.push(key) + membersOf.set(parent, list) + } + const visit = (scope: BlockKey | null) => { + const keys = membersOf.get(scope) ?? [] + const order = declarationOrder( + keys.map((key) => { + const block = this.blocks.get(key) + return { + key, + isTrigger: block ? this.isTrigger(block) : false, + order: this.hints.blocks[key]?.order, + } + }), + dependencies + ) + this.scopes.set(scope, { members: order }) + order.forEach((key, index) => { + this.position.set(key, index) + this.preorder.push(key) + if (this.blocks.get(key)?.subflow) visit(key) + }) + } + visit(null) + + const reserved = new Set() + for (const path of Object.keys(this.catalog.builders)) { + const [namespace] = path.split('.') + if (namespace) reserved.add(namespace) + } + this.idents = assignIdentifiers( + this.preorder.map((key) => ({ + key, + name: this.blocks.get(key)?.name ?? key, + hint: this.hints.blocks[key]?.binding, + })), + reserved + ) + const taken = new Set(this.idents.values()) + for (const key of this.preorder) { + if (!this.blocks.get(key)?.subflow) continue + const depth = this.ancestors(key).filter((a) => this.blocks.get(a)?.subflow).length + 1 + let name = depth === 1 ? 'p' : `p${depth}` + while (taken.has(name)) name = `${name}_` + this.paramNames.set(key, name) + } + } + + private blockRefHeads(block: CanonicalBlock): string[] { + const heads: string[] = [] + const walk = (value: unknown) => { + if (typeof value === 'string') heads.push(...referencedHeads(value)) + else if (Array.isArray(value)) value.forEach(walk) + else if (value !== null && typeof value === 'object') Object.values(value).forEach(walk) + } + for (const param of Object.values(block.params)) { + if (param.kind === 'value') walk(param.value) + else walk(param.tools.map((tool) => tool.params)) + } + for (const row of block.branches?.rows ?? []) walk(row.value) + if (block.subflow) walk(block.subflow) + return heads + } + + private surfaceSubBlocks(block: CanonicalBlock, catalogBlock: CatalogBlock): CatalogSubBlock[] { + const surface = block.triggerMode ? 'trigger' : 'action' + return catalogBlock.subBlocks.filter((sb) => sb.surface === undefined || sb.surface === surface) + } + + private tagFor( + block: CanonicalBlock, + catalogBlock: CatalogBlock | undefined, + sb?: CatalogSubBlock + ): Tag { + if (sb?.valueKind === 'code') { + if (sb.language === 'json') return 'json' + const language = toLanguage(stringParam(block, 'language')) ?? toLanguage(sb.language) + return language ? LANGUAGE_TAGS[language] : 'js' + } + if (catalogBlock?.graph.annotationOnly) return 'md' + return 't' + } + + private context( + block: CanonicalBlock, + catalogBlock: CatalogBlock | undefined, + sb?: CatalogSubBlock + ): FieldContext { + return { + tag: this.tagFor(block, catalogBlock, sb), + from: block.key, + templateWholeRefs: sb?.structured === 'variables', + ...(sb ? { subBlock: sb } : {}), + } + } + + private printParamValue( + block: CanonicalBlock, + catalogBlock: CatalogBlock | undefined, + id: string, + sb: CatalogSubBlock | undefined + ): PrintedValue | null { + const param = block.params[id] + if (!param) return null + if (param.kind === 'tools') return this.printTools(block, param.tools) + const context = this.context(block, catalogBlock, sb) + if (sb?.structured === 'inputFormat') { + const sugar = inputFormatSugar(param.value) + if (sugar) return this.printInputFormat(block, sugar) + } + if ( + this.options.functionCode === 'files' && + sb?.valueKind === 'code' && + (context.tag === 'js' || context.tag === 'py' || context.tag === 'sh') && + typeof param.value === 'string' && + !this.codeFileHints.has(block.key) + ) { + const fileExpr = this.printCodeFile(block, param.value, context.tag) + if (fileExpr) return fileExpr + } + return this.values.field(param.value, context) + } + + private printInputFormat( + block: CanonicalBlock, + items: Array<{ name: string; item: Record }> + ): PrintedValue { + const nested: FieldContext = { tag: 't', from: block.key } + return objectExpr( + items.map(({ name, item }) => { + const keys = Object.keys(item) + const short = + keys.length === 3 && 'value' in item && item.value === '' && typeof item.type === 'string' + if (short && typeof item.type === 'string') { + return { key: printKey(name), value: this.values.string(item.type) } + } + const properties: Property[] = [] + for (const field of ['type', 'value', 'description', 'required']) { + const fieldValue = item[field] + if (fieldValue === undefined) continue + properties.push({ key: field, value: this.values.value(fieldValue, nested) }) + } + return { key: printKey(name), value: objectExpr(properties) } + }) + ) + } + + private printCodeFile( + block: CanonicalBlock, + code: string, + tag: 'js' | 'py' | 'sh' + ): PrintedValue | null { + const language: CodeLanguage = tag === 'js' ? 'javascript' : tag === 'py' ? 'python' : 'shell' + const inline = (reason: string): null => { + this.diagnostics.push({ + code: 'W_CODE_FILE_INLINED', + severity: 'warning', + message: `Function code of ${block.name} printed inline: ${reason}.`, + blockKey: block.key, + }) + return null + } + if (!this.codec) return inline('no code-file codec is available') + const text = this.codec.toFile(code, language) + if (text === null) return inline('its tokens cannot be rewritten for a code file') + if (this.codec.fromFile(text, language) !== code) { + return inline('the code-file round trip did not reproduce the stored code') + } + const extension = LANGUAGE_EXTENSIONS[language] + const hinted = this.hints.blocks[block.key]?.codeFile + const dir = (this.options.codeDir ?? DEFAULT_CODE_DIR).replace(/\/+$/, '') + let path = + hinted?.endsWith(`.${extension}`) && !this.takenCodePaths.has(hinted) + ? hinted + : `${dir}/${kebab(this.idents.get(block.key) ?? block.key)}.${extension}` + let suffix = 2 + const base = path.slice(0, -(extension.length + 1)) + while (this.takenCodePaths.has(path)) { + path = `${base}-${suffix}.${extension}` + suffix += 1 + } + this.takenCodePaths.add(path) + this.codeFileHints.set(block.key, path) + this.codeFiles.push({ path, text }) + return this.values.call('file', [{ doc: quoteString(`./${path}`), shape: 'string' }]) + } + + private printTools(block: CanonicalBlock, tools: CanonicalTool[]): PrintedValue { + const elements = tools.map((tool) => { + const catalogBlock = this.catalog.blocks[tool.type] + const found = findBuilder(this.catalog, tool.type, false, (id) => { + if (id === 'operation') return tool.operation + const value = tool.params[id] + return typeof value === 'string' ? value : undefined + }) + if (!found) return this.values.call('raw', [this.values.json(tool as unknown as Json)]) + const pinned = pinnedIds(found.builder) + const nested: FieldContext = { tag: 't', from: block.key } + const params: Property[] = Object.entries(tool.params) + .filter(([id]) => !pinned.has(id)) + .map(([id, value]) => { + const sb = catalogBlock?.subBlocks.find((candidate) => candidate.id === id) + return { + key: printKey(id), + value: sb + ? this.values.field(value, { ...nested, subBlock: sb }) + : this.values.value(value, nested), + } + }) + const options: Property[] = [] + if (tool.operation !== undefined && !pinned.has('operation')) { + options.push({ key: 'operation', value: this.values.string(tool.operation) }) + } + if (tool.toolId !== undefined) + options.push({ key: 'toolId', value: this.values.string(tool.toolId) }) + if (tool.title !== undefined) + options.push({ key: 'title', value: this.values.string(tool.title) }) + if (tool.usageControl !== undefined) { + options.push({ key: 'usageControl', value: this.values.string(tool.usageControl) }) + } + if (tool.usageControlExpression !== undefined) { + options.push({ + key: 'usageControlExpression', + value: this.values.value(tool.usageControlExpression, { tag: 'js', from: block.key }), + }) + } + if (Object.keys(tool.modes).length > 0) { + options.push({ key: 'modes', value: this.modesExpr(tool.modes) }) + } + if (tool.customTool !== undefined) { + options.push({ + key: 'customTool', + value: this.values.value(tool.customTool as Value, nested), + }) + } + if (tool.operationPolicy !== undefined) { + options.push({ key: 'operationPolicy', value: this.values.json(tool.operationPolicy) }) + } + if (tool.extra !== undefined && Object.keys(tool.extra).length > 0) { + options.push({ key: 'extra', value: this.values.json(tool.extra) }) + } + const segments = found.path.split('.') + const method = segments.pop() + const callee = + segments.length === 0 ? `${method}.tool` : `${segments.join('.')}.tool.${method}` + const args: Expr[] = [objectExpr(params)] + if (options.length > 0) args.push(objectExpr(options)) + return this.values.call(callee, args) + }) + return arrayExpr(elements) + } + + private modesExpr(modes: Record): Expr { + return objectExpr( + Object.keys(modes) + .sort(compareStrings) + .map((cid) => ({ key: printKey(cid), value: this.values.string(modes[cid] ?? 'basic') })) + ) + } + + /** + * Params in catalog registry order, one per canonical pair (build-spec decision 7). Values the + * annotation marks inactive, non-effective pair members and ids the catalog does not know go + * under `inactive` so nothing is lost (build-spec decision 2). + */ + private collectParams( + block: CanonicalBlock, + catalogBlock: CatalogBlock | undefined, + pinned: Set + ): { params: ParamEntry[]; inactive: ParamEntry[]; modes: Record } { + const params: ParamEntry[] = [] + const inactive: ParamEntry[] = [] + const modes: Record = {} + const handled = new Set(pinned) + const branchId = catalogBlock?.graph.branches?.subBlockId + if (branchId) handled.add(branchId) + const inactiveIds = new Set(this.workflow.annotations.inactive[block.key] ?? []) + const pushInactive = (id: string, sb: CatalogSubBlock | undefined) => { + const value = this.printParamValue(block, catalogBlock, id, sb) + if (value) + inactive.push({ key: printKey(id), anchor: anchors.inactive(block.key, id), value }) + } + + if (catalogBlock) { + const subBlocks = this.surfaceSubBlocks(block, catalogBlock) + const seenCids = new Set() + for (const sb of subBlocks) { + if (handled.has(sb.id)) continue + const cid = sb.canonicalParamId + if (cid !== undefined) { + if (seenCids.has(cid)) continue + seenCids.add(cid) + const members = subBlocks.filter((m) => m.canonicalParamId === cid && !pinned.has(m.id)) + const mode: ParamMode = block.modes[cid] ?? 'basic' + const basic = members.find((m) => m.mode !== 'advanced') + const advanced = members.find((m) => m.mode === 'advanced') + const effective = (mode === 'advanced' ? advanced : basic) ?? members[0] + let printed: PrintedValue | null = null + for (const member of members) { + if (handled.has(member.id)) continue + handled.add(member.id) + if (!hasValue(block, member.id)) continue + if (member === effective && !inactiveIds.has(member.id)) { + printed = this.printParamValue(block, catalogBlock, member.id, member) + if (printed) { + params.push({ + key: printKey(cid), + anchor: anchors.param(block.key, cid), + value: printed, + }) + } + } else { + pushInactive(member.id, member) + } + } + const implied: ParamMode = printed ? (printed.selector ? 'basic' : 'advanced') : 'basic' + if (implied !== mode) modes[cid] = mode + continue + } + handled.add(sb.id) + if (!hasValue(block, sb.id)) { + if (this.needsTodo(block, sb)) { + params.push({ + key: printKey(sb.id), + anchor: anchors.param(block.key, sb.id), + value: this.values.call('todo', []), + }) + } + continue + } + if (inactiveIds.has(sb.id)) { + pushInactive(sb.id, sb) + continue + } + const printed = this.printParamValue(block, catalogBlock, sb.id, sb) + if (printed) { + params.push({ + key: printKey(sb.id), + anchor: anchors.param(block.key, sb.id), + value: printed, + }) + } + } + } + + const rest = Object.keys(block.params) + .filter((id) => !handled.has(id)) + .sort(compareStrings) + for (const id of rest) { + if (catalogBlock) { + pushInactive(id, undefined) + } else { + const printed = this.printParamValue(block, undefined, id, undefined) + if (printed) { + params.push({ key: printKey(id), anchor: anchors.param(block.key, id), value: printed }) + } + } + } + for (const cid of Object.keys(block.modes).sort(compareStrings)) { + const handledCid = catalogBlock?.subBlocks.some((sb) => sb.canonicalParamId === cid) ?? false + if (!handledCid) modes[cid] = block.modes[cid] ?? 'basic' + } + return { params, inactive, modes } + } + + /** A required, always-visible field with no stored value prints `todo()` (s2 D7). */ + private needsTodo(block: CanonicalBlock, sb: CatalogSubBlock): boolean { + if (sb.required !== true || sb.condition !== undefined || sb.hidden || sb.readOnly) return false + if (sb.valueKind === 'none' || sb.valueKind === 'branches' || sb.valueKind === 'tools') + return false + const surfaceMode = block.triggerMode ? 'trigger' : undefined + if (block.triggerMode) return sb.mode === surfaceMode + return sb.mode === undefined || sb.mode === 'basic' || sb.mode === 'both' + } + + private paramProperties(entries: ParamEntry[]): Property[] { + return entries.map((entry) => { + const attached = this.comments.take(entry.anchor) + return { + key: entry.key, + value: entry.value, + leading: attached.leading, + trailing: attached.trailing, + } + }) + } + + private hasErrorEdge(key: BlockKey): boolean { + return this.workflow.edges.some((edge) => edge.from === key && edge.port.kind === 'error') + } + + private metaProperties( + block: CanonicalBlock, + extra: { + triggerMode?: boolean | undefined + modes: Record + inactive: Property[] + branches?: Property[] + } + ): Property[] { + const meta: Property[] = [] + const yes: Expr = { doc: 'true', shape: 'literal' } + if (!block.enabled) meta.push({ key: 'disabled', value: yes }) + if (block.locked) meta.push({ key: 'locked', value: yes }) + if (block.advancedMode) meta.push({ key: 'advancedMode', value: yes }) + if (extra.triggerMode !== undefined) { + meta.push({ key: 'triggerMode', value: { doc: String(extra.triggerMode), shape: 'literal' } }) + } + if (block.errorPort && !this.hasErrorEdge(block.key)) + meta.push({ key: 'errorPort', value: yes }) + if (block.retry) + meta.push({ key: 'retry', value: this.values.json(block.retry as unknown as Json) }) + if (Object.keys(extra.modes).length > 0) + meta.push({ key: 'modes', value: this.modesExpr(extra.modes) }) + if (extra.branches && extra.branches.length > 0) { + meta.push({ key: 'branches', value: objectExpr(extra.branches) }) + } + if (extra.inactive.length > 0) meta.push({ key: 'inactive', value: objectExpr(extra.inactive) }) + const opaque = block.opaque?.data + if (opaque && Object.keys(opaque).length > 0) { + meta.push({ key: '$unknown', value: this.values.json(opaque) }) + } + return meta + } + + /** Branch rows as named keys, plus per-row title overrides and extra keys for the meta. */ + private branchEntries(block: CanonicalBlock): { entries: Property[]; meta: Property[] } { + const branches = block.branches + if (!branches?.rows) return { entries: [], meta: [] } + const entries: Property[] = [] + const meta: Property[] = [] + const rows = branches.rows + rows.forEach((row, index) => { + const isElse = + branches.kind === 'condition' && row.key === 'else' && index === rows.length - 1 + const value: Expr = + isElse && row.value === '' + ? { doc: 'true', shape: 'literal' } + : this.values.value(row.value, { + tag: branches.kind === 'condition' ? 'js' : 't', + from: block.key, + }) + entries.push({ key: printMember(row.key).slice(1), value }) + const rowMeta: Property[] = [] + if (row.titleOverride !== undefined) { + rowMeta.push({ key: 'title', value: this.values.string(row.titleOverride) }) + } + if (row.extra && Object.keys(row.extra).length > 0) { + rowMeta.push({ key: 'extra', value: this.values.json(row.extra) }) + } + if (rowMeta.length > 0) meta.push({ key: printKey(row.key), value: objectExpr(rowMeta) }) + }) + return { entries, meta } + } + + private blockCall(block: CanonicalBlock): Expr { + if (block.subflow) return this.containerCall(block) + const catalogBlock = this.catalog.blocks[block.type] + const found = findBuilder(this.catalog, block.type, block.triggerMode, (id) => + stringParam(block, id) + ) + const pinned = pinnedIds(found?.builder) + const { params, inactive, modes } = this.collectParams(block, catalogBlock, pinned) + const paramProps = this.paramProperties(params) + const inactiveProps = this.paramProperties(inactive) + const branchKind = catalogBlock?.graph.branches?.kind ?? block.branches?.kind + const { entries: branchProps, meta: branchMeta } = this.branchEntries(block) + const branchSubBlock = + catalogBlock?.graph.branches?.subBlockId ?? + (branchKind === 'router' ? 'routes' : 'conditions') + + let generic = found === null + let topLevel: Property[] = paramProps + if (block.branches) { + const collides = paramProps.some((prop) => + branchProps.some((branch) => branch.key === prop.key) + ) + if (branchKind === 'condition' && !generic && !collides) { + topLevel = [...branchProps, ...paramProps] + } else { + if (branchKind === 'condition' && collides) generic = true + topLevel = [ + ...paramProps, + { key: printKey(branchSubBlock), value: objectExpr(branchProps) }, + ] + } + } + let triggerMode: boolean | undefined + if (generic) triggerMode = block.triggerMode ? true : undefined + else if ((found?.builder.triggerMode === true) !== block.triggerMode) + triggerMode = block.triggerMode + const meta = this.metaProperties(block, { + triggerMode, + modes, + inactive: inactiveProps, + branches: branchMeta, + }) + const args: Expr[] = [] + let callee = found?.path ?? GENERIC_BUILDER + if (generic) { + callee = GENERIC_BUILDER + args.push(this.values.string(block.type)) + if (found) { + topLevel = this.paramProperties( + [...pinned].sort(compareStrings).flatMap((id) => { + const value = block.params[id] + return value?.kind === 'value' + ? [ + { + key: printKey(id), + anchor: anchors.param(block.key, id), + value: this.values.value(value.value, this.context(block, catalogBlock)), + }, + ] + : [] + }) + ).concat(topLevel) + } + } + args.push(this.values.string(block.name), objectExpr(topLevel)) + if (meta.length > 0) args.push(objectExpr(meta)) + return this.values.call(callee, args) + } + + private containerCall(block: CanonicalBlock): Expr { + const spec = block.subflow + if (!spec) throw new Error('containerCall requires a subflow block') + const config: Property[] = [] + const inactive: Property[] = [] + const field = ( + name: string, + key: string, + value: Json | undefined, + active: boolean, + tag: Tag + ) => { + if (value === undefined) return + const printed = this.values.value(value, { tag, from: block.key }) + if (active) { + config.push({ key, value: printed }) + } else { + const attached = this.comments.take(anchors.inactive(block.key, name)) + inactive.push({ key: name, value: printed, ...attached }) + } + } + let callee: string + if (spec.kind === 'loop') { + callee = `loop.${spec.loopType}` + field('iterations', 'count', spec.iterations, spec.loopType === 'for', 't') + field('forEachItems', 'collection', spec.forEachItems, spec.loopType === 'forEach', 't') + field('whileCondition', 'condition', spec.whileCondition, spec.loopType === 'while', 'js') + field( + 'doWhileCondition', + 'condition', + spec.doWhileCondition, + spec.loopType === 'doWhile', + 'js' + ) + } else { + const type = spec.parallelType + callee = type === undefined ? 'parallel' : `parallel.${type}` + field('count', 'count', spec.count, type !== 'collection', 't') + field('distribution', 'collection', spec.distribution, type !== 'count', 't') + field('batchSize', 'batchSize', spec.batchSize, true, 't') + } + const catalogBlock = this.catalog.blocks[block.type] + const { + params, + inactive: inactiveParams, + modes, + } = this.collectParams(block, catalogBlock, new Set()) + const extraInactive = this.paramProperties([...params, ...inactiveParams]) + const meta = this.metaProperties(block, { modes, inactive: [...inactive, ...extraInactive] }) + const body = this.scopeStatements(block.key) + const args: Expr[] = [ + this.values.string(block.name), + objectExpr(config), + arrowExpr(this.paramNames.get(block.key) ?? 'p', body), + ] + if (meta.length > 0) args.push(objectExpr(meta)) + return this.values.call(callee, args) + } + + private identExpr(key: BlockKey): Expr { + return { doc: this.idents.get(key) ?? key, shape: 'identifier' } + } + + private wiring(scope: BlockKey | null): Array<{ doc: Doc; anchor: AnchorKey; source: BlockKey }> { + const statements: Array<{ doc: Doc; anchor: AnchorKey; source: BlockKey }> = [] + const byTarget = (a: CanonicalEdge, b: CanonicalEdge) => + (this.position.get(a.to) ?? 0) - (this.position.get(b.to) ?? 0) || + this.preorder.indexOf(a.to) - this.preorder.indexOf(b.to) + const call = (head: string, targets: CanonicalEdge[], method: string): Doc => + callExpr( + `${head}.${method}`, + [...targets].sort(byTarget).map((edge) => this.identExpr(edge.to)) + ).doc + const raw = (source: BlockKey, handle: string, target: BlockKey): Doc => { + this.diagnostics.push({ + code: 'W_RAW_HANDLE', + severity: 'warning', + message: `Edge handle ${handle} has no SDK form; printed as edge().`, + blockKey: source, + }) + return this.values.call('edge', [ + this.identExpr(source), + this.values.string(handle), + this.identExpr(target), + ]).doc + } + + if (scope !== null) { + const container = this.blocks.get(scope) + const starts = this.workflow.edges.filter( + (e) => e.from === scope && e.port.kind === 'subflowStart' + ) + if (container?.subflow && starts.length > 0) { + statements.push({ + doc: call(this.paramNames.get(scope) ?? 'p', starts, 'to'), + anchor: anchors.edges(scope, 'subflowStart'), + source: scope, + }) + } + } + + for (const source of this.scopes.get(scope)?.members ?? []) { + const block = this.blocks.get(source) + if (!block) continue + const ident = this.idents.get(source) ?? source + const edges = this.workflow.edges.filter( + (edge) => edge.from === source && this.blocks.has(edge.to) + ) + const isContainer = block.subflow !== undefined + const hasBranches = + block.branches !== undefined || + this.catalog.blocks[block.type]?.graph.branches !== undefined + const groups = new Map() + for (const edge of edges) { + const key = portKey(edge.port) + const list = groups.get(key) ?? [] + list.push(edge) + groups.set(key, list) + } + const rowOrder = (block.branches?.rows ?? []).map((row) => `branch:${row.key}`) + const portOrder = (key: string): [number, number, string] => { + if (key === 'out') return [0, 0, key] + if (key === 'subflowEnd') return [1, 0, key] + if (key.startsWith('branch:')) { + const index = rowOrder.indexOf(key) + return [2, index === -1 ? rowOrder.length : index, key] + } + if (key === 'error') return [3, 0, key] + if (key === 'subflowStart') return [5, 0, key] + return [4, 0, key] + } + const ports = [...groups.keys()].sort((a, b) => { + const [ga, ia, ka] = portOrder(a) + const [gb, ib, kb] = portOrder(b) + return ga - gb || ia - ib || compareStrings(ka, kb) + }) + for (const port of ports) { + const targets = groups.get(port) ?? [] + const anchor = anchors.edges(source, port) + const first = targets[0] + if (!first) continue + const kind = first.port + if (kind.kind === 'subflowStart') { + if (isContainer) continue + for (const edge of targets) { + statements.push({ doc: raw(source, 'loop-start-source', edge.to), anchor, source }) + } + continue + } + if (kind.kind === 'raw' || (kind.kind === 'out' && (isContainer || hasBranches))) { + const handle = kind.kind === 'raw' ? kind.handle : 'source' + for (const edge of [...targets].sort(byTarget)) { + statements.push({ doc: raw(source, handle, edge.to), anchor, source }) + } + continue + } + if (kind.kind === 'subflowEnd' && !isContainer) { + for (const edge of [...targets].sort(byTarget)) { + statements.push({ doc: raw(source, 'loop-end-source', edge.to), anchor, source }) + } + continue + } + if (kind.kind === 'error') { + statements.push({ doc: call(ident, targets, 'onError'), anchor, source }) + } else if (kind.kind === 'branch') { + statements.push({ + doc: call(`${ident}${printMember(kind.key)}`, targets, 'to'), + anchor, + source, + }) + } else { + statements.push({ doc: call(ident, targets, 'to'), anchor, source }) + } + } + } + return statements + } + + /** Declarations then wiring for one scope (the workflow body or a container callback). */ + private scopeStatements(scope: BlockKey | null): Doc[] { + const members = this.scopes.get(scope)?.members ?? [] + const calls = members.map((key) => { + const block = this.blocks.get(key) + return block ? { key, call: this.blockCall(block) } : null + }) + const wiring = this.wiring(scope) + const wiringDocs: Doc[] = [] + wiring.forEach((statement, index) => { + const seenBefore = wiring.slice(0, index).some((s) => s.anchor === statement.anchor) + const attached: AttachedComments = seenBefore + ? { leading: [], trailing: [] } + : this.comments.take(statement.anchor) + if (index === 0 && scope === null) { + const wiringComments = this.comments.take(anchors.wiring) + attached.leading.unshift(...wiringComments.leading) + attached.trailing.push(...wiringComments.trailing) + } + wiringDocs.push(withComments(statement.doc, attached)) + }) + const declarations: Doc[] = [] + for (const entry of calls) { + if (!entry) continue + const { key, call } = entry + const own = this.comments.take(anchors.block(key)) + const moved = this.comments.takeOrphans(key) + const attached: AttachedComments = { + leading: [...own.leading, ...moved.leading], + trailing: [...own.trailing, ...moved.trailing], + } + declarations.push( + withComments(['const ', this.idents.get(key) ?? key, ' = ', call.doc], attached) + ) + } + if (scope === null && wiring.length === 0) { + const dangling = this.comments.take(anchors.wiring) + for (const comment of [...dangling.leading, ...dangling.trailing]) wiringDocs.push(comment) + } + if (declarations.length > 0 && wiringDocs.length > 0) + return [...declarations, '', ...wiringDocs] + return [...declarations, ...wiringDocs] + } + + print(): PrintResult { + this.layout() + const body = this.scopeStatements(null) + const options: Property[] = [] + const { description } = this.workflow.meta + if (description !== null) + options.push({ key: 'description', value: this.values.string(description) }) + const variables = Object.values(this.workflow.variables).sort((a, b) => + compareStrings(a.key, b.key) + ) + if (variables.length > 0) { + options.push({ + key: 'variables', + value: objectExpr( + variables.map((variable) => { + const fields: Property[] = [] + if (variable.name !== variable.key) { + fields.push({ key: 'name', value: this.values.string(variable.name) }) + } + fields.push({ key: 'type', value: this.values.string(variable.type) }) + fields.push({ key: 'value', value: this.values.json(variable.value) }) + const attached = this.comments.take(anchors.variable(variable.key)) + return { key: printKey(variable.key), value: objectExpr(fields), ...attached } + }) + ), + }) + } + const callback = arrowExpr(this.usesVars ? '{ vars }' : '', body) + const workflowCall = this.values.call('workflow', [ + this.values.string(this.workflow.meta.name), + objectExpr(options), + callback, + ]) + + for (const key of this.preorder) this.comments.takeOrphans(key) + const header = this.comments.take(anchors.header) + const footer = this.comments.take(anchors.footer) + this.comments.dropRemaining() + + const importNames = [...this.imports].sort(compareImportNames) + const importLine = group([ + 'import {', + indent([line, join([',', line], importNames)]), + ifBreak(','), + line, + `} from '${SDK_MODULE}'`, + ]) + const parts: Doc[] = [ + `// @sim-sdk ${this.catalog.sdkMajor}`, + hardline, + withComments(importLine, header), + hardline, + hardline, + 'export default ', + workflowCall.doc, + footer.trailing, + ] + if (footer.leading.length > 0) parts.push(hardline, join(hardline, footer.leading)) + parts.push(hardline) + const text = printDoc(parts, this.width) + + const hintBlocks: Record = { ...this.hints.blocks } + this.preorder.forEach((key, index) => { + const codeFile = this.codeFileHints.get(key) + hintBlocks[key] = { + binding: this.idents.get(key) ?? key, + order: index, + ...(codeFile ? { codeFile } : {}), + } + }) + return { + files: [{ path: ENTRY_PATH, text }, ...this.codeFiles], + hints: { blocks: hintBlocks }, + diagnostics: [...this.refs.diagnostics, ...this.diagnostics, ...this.comments.diagnostics], + } + } +} + +/** Import specifiers in the order Biome's organizeImports keeps them. */ +function compareImportNames(a: string, b: string): number { + return compareStrings(a, b) +} + +/** Creates a printer that writes function code to files through `codec` when given. */ +export function createPrintWorkflow(codec?: CodeFileCodec): PrintWorkflowFn { + return (input) => new WorkflowPrinter(input, codec).print() +} + +/** Prints function code inline until the code-file codec is wired in (`createPrintWorkflow`). */ +export const printWorkflow: PrintWorkflowFn = createPrintWorkflow() diff --git a/packages/workflow-code/src/print/refs.ts b/packages/workflow-code/src/print/refs.ts new file mode 100644 index 00000000000..e38018aa30c --- /dev/null +++ b/packages/workflow-code/src/print/refs.ts @@ -0,0 +1,173 @@ +/** + * Reference printing (build-spec decision 8, s3 D3/D4). A stored string is literal text plus + * tokens; each token that resolves to something in lexical scope becomes an interpolation, and + * everything else stays literal text, which compiles back to the same bytes. Path segments map + * exactly: `.seg` ↔ `.seg`, a non-identifier `.seg` ↔ `['seg']`, `[n]` ↔ `[n]`. + */ + +import { findWorkflowReferenceTokens } from '@sim/utils/workflow-references' +import type { PrintDiagnosticCode } from '../diagnostics/codes' +import type { Diagnostic } from '../diagnostics/frame' +import type { BlockKey } from '../model' +import { printMember } from './strings' + +const ENV_VAR_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/ +const LOOP_PROPERTIES = new Set(['iteration', 'index', 'item', 'currentItem', 'items']) +const PARALLEL_PROPERTIES = new Set(['index', 'currentItem', 'items']) + +export type RefPart = { kind: 'text'; text: string } | { kind: 'ref'; expr: string } + +/** What reference printing needs to know about declarations and scopes. */ +export interface RefScope { + hasBlock(key: BlockKey): boolean + hasVariable(key: string): boolean + /** + * Whether `target` can be named from inside `from`'s params: `ok`, `forward` (declared later or + * self, a TS2448 cycle) or `scope` (inside another subflow). + */ + visibility(from: BlockKey, target: BlockKey): 'ok' | 'forward' | 'scope' + identOf(key: BlockKey): string + /** The param name of the nearest `kind` container enclosing `from`, if any. */ + loopParam(from: BlockKey, kind: 'loop' | 'parallel'): string | null + /** Records that the printed file uses an SDK import (`env`). */ + use(name: string): void + /** Records that the printed file reads `vars`. */ + useVars(): void +} + +interface ParsedPath { + head: string + segments: Array<{ kind: 'member'; name: string } | { kind: 'index'; index: string }> +} + +/** Splits `head.a[0].b-c` into a head and exact segments; `null` when the grammar does not fit. */ +export function parseRefPath(inner: string): ParsedPath | null { + const headMatch = /^[^.[\]]+/.exec(inner) + if (!headMatch) return null + const head = headMatch[0] + const segments: ParsedPath['segments'] = [] + let rest = inner.slice(head.length) + while (rest.length > 0) { + const member = /^\.([^.[\]]+)/.exec(rest) + if (member?.[1] !== undefined) { + segments.push({ kind: 'member', name: member[1] }) + rest = rest.slice(member[0].length) + continue + } + const index = /^\[(0|[1-9][0-9]*)\]/.exec(rest) + if (index?.[1] !== undefined) { + segments.push({ kind: 'index', index: index[1] }) + rest = rest.slice(index[0].length) + continue + } + return null + } + return { head, segments } +} + +function printSegments(segments: ParsedPath['segments']): string { + return segments + .map((segment) => + segment.kind === 'member' ? printMember(segment.name) : `[${segment.index}]` + ) + .join('') +} + +export class RefPrinter { + readonly diagnostics: Diagnostic[] = [] + + constructor(private readonly scope: RefScope) {} + + /** The interpolation for one token, or `null` (with a warning) to keep it literal. */ + resolveToken(token: string, from: BlockKey | null): string | null { + if (token.startsWith('{{')) { + const name = token.slice(2, -2) + if (!ENV_VAR_NAME.test(name)) return null + this.scope.use('env') + return `env.${name}` + } + const parsed = parseRefPath(token.slice(1, -1)) + if (!parsed) return this.unresolved(token, from, 'W_UNRESOLVED_REF') + const { head, segments } = parsed + if (head === 'variable') { + const [first, ...rest] = segments + if (first?.kind !== 'member' || !this.scope.hasVariable(first.name)) { + return this.unresolved(token, from, 'W_UNRESOLVED_REF') + } + this.scope.useVars() + return `vars${printMember(first.name)}${printSegments(rest)}` + } + if (head === 'loop' || head === 'parallel') { + const [first] = segments + const known = head === 'loop' ? LOOP_PROPERTIES : PARALLEL_PROPERTIES + const param = from === null ? null : this.scope.loopParam(from, head) + if (first?.kind !== 'member' || !known.has(first.name) || param === null) { + return this.unresolved(token, from, 'W_UNRESOLVED_REF') + } + return `${param}${printSegments(segments)}` + } + if (!this.scope.hasBlock(head) || from === null) { + return this.unresolved(token, from, 'W_UNRESOLVED_REF') + } + const visibility = this.scope.visibility(from, head) + if (visibility === 'forward') return this.unresolved(token, from, 'W_FORWARD_REF_LITERALIZED') + if (visibility === 'scope') return this.unresolved(token, from, 'W_UNRESOLVED_REF') + return `${this.scope.identOf(head)}${printSegments(segments)}` + } + + /** Splits text into literal runs and resolved interpolations. */ + parts(text: string, from: BlockKey | null): RefPart[] { + const parts: RefPart[] = [] + let cursor = 0 + const pushText = (value: string) => { + if (value.length === 0) return + const last = parts.at(-1) + if (last?.kind === 'text') last.text += value + else parts.push({ kind: 'text', text: value }) + } + for (const token of findWorkflowReferenceTokens(text)) { + const expr = this.resolveToken(token.value, from) + if (expr === null) continue + pushText(text.slice(cursor, token.start)) + parts.push({ kind: 'ref', expr }) + cursor = token.end + } + pushText(text.slice(cursor)) + return parts + } + + private unresolved( + token: string, + from: BlockKey | null, + code: 'W_UNRESOLVED_REF' | 'W_FORWARD_REF_LITERALIZED' + ): null { + this.diagnostics.push({ + code, + severity: 'warning', + message: + code === 'W_FORWARD_REF_LITERALIZED' + ? `Reference ${token} would point at a block declared later; printed as literal text.` + : `Reference ${token} does not resolve in scope; printed as literal text.`, + ...(from === null ? {} : { blockKey: from }), + }) + return null + } +} + +/** Block keys a string refers to, for declaration-order dependencies. */ +export function referencedHeads(text: string): string[] { + const heads: string[] = [] + for (const token of findWorkflowReferenceTokens(text)) { + if (token.kind !== 'workflow') continue + const parsed = parseRefPath(token.value.slice(1, -1)) + if ( + parsed && + parsed.head !== 'variable' && + parsed.head !== 'loop' && + parsed.head !== 'parallel' + ) { + heads.push(parsed.head) + } + } + return heads +} diff --git a/packages/workflow-code/src/print/values.ts b/packages/workflow-code/src/print/values.ts new file mode 100644 index 00000000000..0d854b69c1c --- /dev/null +++ b/packages/workflow-code/src/print/values.ts @@ -0,0 +1,210 @@ +/** + * Param values as source expressions (s2 §2 mapping table, D5–D7). Strings become quoted + * literals, untagged templates, or tagged `t`/`js`/`py`/`sh`/`json`/`md` templates by field kind; + * resource nodes become call forms; a value outside its field's type prints as `raw(v)`. Sugared + * forms are chosen only when they compile back to the same stored value. + */ + +import type { CatalogSubBlock } from '../catalog/types' +import type { BlockKey, Json, SimNode, Value } from '../model' +import { type Doc, literalText } from './doc' +import type { RefPrinter } from './refs' +import { escapeTemplateText, printKey, printNumber, quoteString } from './strings' +import { arrayExpr, callExpr, type Expr, objectExpr, type Property } from './syntax' + +/** The template tag a string field prints with; `t` prints untagged when it holds no refs. */ +export type Tag = 't' | 'js' | 'py' | 'sh' | 'json' | 'md' + +export interface FieldContext { + tag: Tag + /** The block whose param is printed, for scope; `null` at workflow level. */ + from: BlockKey | null + /** Whole-string refs print as templates instead of bare refs (variables-input values). */ + templateWholeRefs?: boolean + subBlock?: CatalogSubBlock +} + +/** + * Resource kinds with a dedicated call form (s2 D6). A kind without one prints as + * `raw()`, which compiles back to the same node. + */ +const RESOURCE_CALLS: Partial> = { + credential: 'binding', + table: 'table', + 'knowledge-base': 'kb', + workflow: 'workflow', + skill: 'skill', + 'custom-tool': 'customTool', + 'mcp-server': 'mcp', + sandbox: 'sandbox', + file: 'upload', + 'file-folder': 'folder', +} + +export interface PrintedValue extends Expr { + /** + * True when the value printed as a selector call (`table('x')`, `picked('C1')`, ...) or a + * non-empty array of them: the form that stores into the basic member of a pair. + */ + selector?: boolean +} + +function isSimNode(value: object): value is SimNode { + const tag = (value as { $sim?: unknown }).$sim + return ( + tag === 'var' || + tag === 'resource' || + tag === 'unresolved' || + tag === 'csv' || + tag === 'literal' + ) +} + +/** Prints values, recording SDK imports and reference diagnostics as it goes. */ +export class ValuePrinter { + constructor( + private readonly refs: RefPrinter, + private readonly use: (name: string) => void, + private readonly useVars: () => void + ) {} + + call(callee: string, args: Expr[]): Expr { + this.use(callee.split('.')[0] ?? callee) + return callExpr(callee, args) + } + + /** A param value, honoring the field's value kind (selectors, static options). */ + field(value: Value, context: FieldContext): PrintedValue { + const subBlock = context.subBlock + const kind = subBlock?.valueKind + if (kind === 'picked' && isPlainSelectorValue(value)) { + return { ...this.call('picked', [this.json(value as Json)]), selector: true } + } + if ( + typeof value === 'string' && + value !== '' && + !/[<{]/.test(value) && + Array.isArray(subBlock?.options) && + subBlock.type === 'dropdown' && + !subBlock.options.some((option) => option.id === value) + ) { + return this.call('raw', [this.string(value)]) + } + return this.value(value, context) + } + + value(value: Value, context: FieldContext): PrintedValue { + if (value === null) return { doc: 'null', shape: 'literal' } + if (typeof value === 'boolean') return { doc: String(value), shape: 'literal' } + if (typeof value === 'number') + return { doc: printNumber(value), shape: 'number', numeric: true } + if (typeof value === 'string') return this.text(value, context) + if (Array.isArray(value)) { + const items = value.map((item) => this.value(item, { ...context, tag: nestedTag(context) })) + const selector = items.length > 0 && items.every((item) => item.selector === true) + return { ...arrayExpr(items), selector } + } + if (isSimNode(value)) return this.simNode(value) + const properties: Property[] = Object.entries(value).map(([key, item]) => ({ + key: printKey(key), + value: this.value(item, { ...context, tag: nestedTag(context) }), + })) + return objectExpr(properties) + } + + /** Plain JSON with no ref or SimNode interpretation, as `literal()` and `raw()` take it. */ + json(value: Json): Expr { + if (value === null) return { doc: 'null', shape: 'literal' } + if (typeof value === 'boolean') return { doc: String(value), shape: 'literal' } + if (typeof value === 'number') + return { doc: printNumber(value), shape: 'number', numeric: true } + if (typeof value === 'string') return this.string(value) + if (Array.isArray(value)) return arrayExpr(value.map((item) => this.json(item))) + return objectExpr( + Object.entries(value).map(([key, item]) => ({ key: printKey(key), value: this.json(item) })) + ) + } + + /** A string with no ref interpretation: quoted, or an untagged template when multi-line. */ + string(text: string): Expr { + if (!text.includes('\n')) return { doc: quoteString(text), shape: 'string' } + return { doc: ['`', literalText(escapeTemplateText(text)), '`'], shape: 'template' } + } + + private simNode(node: SimNode): PrintedValue { + if (node.$sim === 'var') { + this.useVars() + return { doc: `vars${memberOf(node.key)}`, shape: 'member' } + } + if (node.$sim === 'resource') { + const callee = RESOURCE_CALLS[node.kind] + if (callee) return { ...this.call(callee, [this.string(node.key)]), selector: true } + } + return this.call('raw', [this.json(node as unknown as Json)]) + } + + private text(text: string, context: FieldContext): PrintedValue { + const parts = this.refs.parts(text, context.from) + const hasRef = parts.some((part) => part.kind === 'ref') + const [only] = parts + if ( + parts.length === 1 && + only?.kind === 'ref' && + context.tag === 't' && + context.templateWholeRefs !== true + ) { + return { doc: only.expr, shape: /[.[]/.test(only.expr) ? 'member' : 'identifier' } + } + if (context.tag === 'json' && !hasRef) { + const sugar = jsonSugar(text) + if (sugar !== undefined) return this.json(sugar) + } + const tagged = context.tag !== 't' || hasRef + if (!tagged) return this.string(text) + const tag = context.tag + this.use(tag) + const body: Doc[] = parts.map((part) => + part.kind === 'text' ? literalText(escapeTemplateText(part.text)) : ['${', part.expr, '}'] + ) + return { doc: [tag, '`', body, '`'], shape: 'template' } + } +} + +function memberOf(key: string): string { + return /^[A-Za-z_$][A-Za-z0-9_$]*$/.test(key) ? `.${key}` : `[${quoteString(key)}]` +} + +function nestedTag(context: FieldContext): Tag { + return context.tag === 'json' ? 't' : context.tag === 'md' ? 't' : context.tag +} + +/** A stored selector value with no reference text: a non-empty id string. */ +function isPlainSelectorValue(value: Value): boolean { + if (typeof value === 'string') return value.length > 0 && !/[<>{}]/.test(value) + return false +} + +/** + * A JSON code body that is exactly `JSON.stringify(parsed, null, 2)` of an object or array prints + * as that literal (s2 D7); anything else stays `json```. + */ +function jsonSugar(text: string): Json | undefined { + let parsed: unknown + try { + parsed = JSON.parse(text) + } catch { + return undefined + } + if (parsed === null || typeof parsed !== 'object') return undefined + if (JSON.stringify(parsed, null, 2) !== text) return undefined + if (containsSimKey(parsed)) return undefined + return parsed as Json +} + +function containsSimKey(value: unknown): boolean { + if (Array.isArray(value)) return value.some(containsSimKey) + if (value !== null && typeof value === 'object') { + return Object.entries(value).some(([key, item]) => key === '$sim' || containsSimKey(item)) + } + return false +} From c950d79fa02864f248c52ec349c76c57919f99f1 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:07:57 -0800 Subject: [PATCH 020/428] test(workflow-code): golden prints and determinism over 32 printer cases --- .../src/print/__fixtures__/cases.ts | 838 ++++++++++++++++++ .../src/print/__fixtures__/catalog.ts | 299 +++++++ .../src/print/__golden__/agent-tools.txt | 24 + .../src/print/__golden__/block-meta.txt | 23 + .../__golden__/branch-titles-and-extra.txt | 17 + .../print/__golden__/branches-null-rows.txt | 13 + .../print/__golden__/comments-at-anchors.txt | 32 + .../src/print/__golden__/diagnostics.json | 52 ++ .../src/print/__golden__/fan-out-wrapping.txt | 19 + .../src/print/__golden__/function-files.txt | 13 + .../print/__golden__/function-languages.txt | 23 + .../generic-block-legacy-operation.txt | 10 + .../__golden__/generic-block-unknown-type.txt | 12 + .../__golden__/identifier-collisions.txt | 16 + .../src/print/__golden__/inactive-values.txt | 13 + .../print/__golden__/input-format-sugar.txt | 18 + .../src/print/__golden__/json-code-fields.txt | 16 + .../src/print/__golden__/layout-widths.txt | 25 + .../__golden__/legacy-dropdown-and-todo.txt | 8 + .../src/print/__golden__/lock-order.txt | 11 + .../src/print/__golden__/loop-foreach.txt | 31 + .../src/print/__golden__/minimal-trigger.txt | 6 + .../src/print/__golden__/nested-subflows.txt | 34 + .../src/print/__golden__/note-markdown.txt | 10 + .../src/print/__golden__/pair-modes.txt | 23 + .../src/print/__golden__/parallel-untyped.txt | 13 + .../print/__golden__/raw-and-odd-edges.txt | 14 + .../__golden__/ref-cycle-literalized.txt | 12 + .../src/print/__golden__/resource-nodes.txt | 40 + .../src/print/__golden__/router-routes.txt | 17 + .../src/print/__golden__/string-escapes.txt | 12 + .../src/print/__golden__/support-triage.txt | 75 ++ .../print/__golden__/templates-and-paths.txt | 21 + .../__golden__/trigger-mode-builders.txt | 24 + .../print/__golden__/unresolved-tokens.txt | 12 + .../src/print/determinism.test.ts | 102 +++ .../workflow-code/src/print/golden.test.ts | 99 +++ 37 files changed, 2027 insertions(+) create mode 100644 packages/workflow-code/src/print/__fixtures__/cases.ts create mode 100644 packages/workflow-code/src/print/__fixtures__/catalog.ts create mode 100644 packages/workflow-code/src/print/__golden__/agent-tools.txt create mode 100644 packages/workflow-code/src/print/__golden__/block-meta.txt create mode 100644 packages/workflow-code/src/print/__golden__/branch-titles-and-extra.txt create mode 100644 packages/workflow-code/src/print/__golden__/branches-null-rows.txt create mode 100644 packages/workflow-code/src/print/__golden__/comments-at-anchors.txt create mode 100644 packages/workflow-code/src/print/__golden__/diagnostics.json create mode 100644 packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt create mode 100644 packages/workflow-code/src/print/__golden__/function-files.txt create mode 100644 packages/workflow-code/src/print/__golden__/function-languages.txt create mode 100644 packages/workflow-code/src/print/__golden__/generic-block-legacy-operation.txt create mode 100644 packages/workflow-code/src/print/__golden__/generic-block-unknown-type.txt create mode 100644 packages/workflow-code/src/print/__golden__/identifier-collisions.txt create mode 100644 packages/workflow-code/src/print/__golden__/inactive-values.txt create mode 100644 packages/workflow-code/src/print/__golden__/input-format-sugar.txt create mode 100644 packages/workflow-code/src/print/__golden__/json-code-fields.txt create mode 100644 packages/workflow-code/src/print/__golden__/layout-widths.txt create mode 100644 packages/workflow-code/src/print/__golden__/legacy-dropdown-and-todo.txt create mode 100644 packages/workflow-code/src/print/__golden__/lock-order.txt create mode 100644 packages/workflow-code/src/print/__golden__/loop-foreach.txt create mode 100644 packages/workflow-code/src/print/__golden__/minimal-trigger.txt create mode 100644 packages/workflow-code/src/print/__golden__/nested-subflows.txt create mode 100644 packages/workflow-code/src/print/__golden__/note-markdown.txt create mode 100644 packages/workflow-code/src/print/__golden__/pair-modes.txt create mode 100644 packages/workflow-code/src/print/__golden__/parallel-untyped.txt create mode 100644 packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt create mode 100644 packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt create mode 100644 packages/workflow-code/src/print/__golden__/resource-nodes.txt create mode 100644 packages/workflow-code/src/print/__golden__/router-routes.txt create mode 100644 packages/workflow-code/src/print/__golden__/string-escapes.txt create mode 100644 packages/workflow-code/src/print/__golden__/support-triage.txt create mode 100644 packages/workflow-code/src/print/__golden__/templates-and-paths.txt create mode 100644 packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt create mode 100644 packages/workflow-code/src/print/__golden__/unresolved-tokens.txt create mode 100644 packages/workflow-code/src/print/determinism.test.ts create mode 100644 packages/workflow-code/src/print/golden.test.ts diff --git a/packages/workflow-code/src/print/__fixtures__/cases.ts b/packages/workflow-code/src/print/__fixtures__/cases.ts new file mode 100644 index 00000000000..e89e9b8cabe --- /dev/null +++ b/packages/workflow-code/src/print/__fixtures__/cases.ts @@ -0,0 +1,838 @@ +/** + * Hand-built canonical workflows, one per printer construct (golden snapshots in `__golden__/`). + * Each case names the behavior it pins so a golden diff points at the construct that changed. + */ + +import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' +import { encodeAnchor } from '../../anchors' +import type { LockHints } from '../../api' +import type { + AnchorKey, + CanonicalBlock, + CanonicalEdge, + CanonicalParam, + CanonicalTool, + CanonicalVariable, + CanonicalWorkflow, + CodeComment, + Port, + Value, +} from '../../model' + +export interface PrintCase { + name: string + workflow: CanonicalWorkflow + hints?: LockHints +} + +type BlockInit = Partial> & { + params?: Record + tools?: Record +} + +export function blk(name: string, type: string, init: BlockInit = {}): CanonicalBlock { + const { params = {}, tools = {}, ...rest } = init + const canonicalParams: Record = {} + for (const [id, value] of Object.entries(params)) canonicalParams[id] = { kind: 'value', value } + for (const [id, list] of Object.entries(tools)) + canonicalParams[id] = { kind: 'tools', tools: list } + return { + key: normalizeWorkflowBlockName(name), + name, + type, + parent: null, + enabled: true, + locked: false, + triggerMode: false, + advancedMode: false, + errorPort: false, + retry: null, + params: canonicalParams, + modes: {}, + ...rest, + } +} + +export function edge(from: string, to: string, port: Port = { kind: 'out' }): CanonicalEdge { + return { from, port, to } +} + +interface WorkflowInit { + name?: string + description?: string | null + blocks: CanonicalBlock[] + edges?: CanonicalEdge[] + variables?: CanonicalVariable[] + inactive?: Record + comments?: Array<[AnchorKey, CodeComment[]]> +} + +export function wf(init: WorkflowInit): CanonicalWorkflow { + return { + modelVersion: 1, + meta: { name: init.name ?? 'Fixture', description: init.description ?? null }, + blocks: Object.fromEntries(init.blocks.map((block) => [block.key, block])), + edges: init.edges ?? [], + variables: Object.fromEntries( + (init.variables ?? []).map((variable) => [variable.key, variable]) + ), + annotations: { + inactive: init.inactive ?? {}, + comments: Object.fromEntries(init.comments ?? []), + }, + } +} + +const line = (text: string, placement: 'leading' | 'trailing' = 'leading'): CodeComment => ({ + text: ` ${text}`, + kind: 'line', + placement, +}) + +const start = (name = 'Start', inputFormat: Value = []) => + blk(name, 'start_trigger', { params: { inputFormat } }) + +export const cases: PrintCase[] = [ + { + name: 'minimal-trigger', + workflow: wf({ name: 'Hello', blocks: [start()] }), + }, + { + name: 'support-triage', + workflow: wf({ + name: 'Support triage', + description: 'Classifies inbound tickets and routes them.', + variables: [{ key: 'escalations', name: 'escalations', type: 'number', value: 0 }], + blocks: [ + blk('Ticket in', 'webhook', { + params: { + requireAuth: true, + token: '{{TICKETS_WEBHOOK_TOKEN}}', + inputFormat: [ + { name: 'subject', type: 'string', value: '' }, + { name: 'body', type: 'string', value: '' }, + ], + }, + }), + blk('Classify', 'agent', { + params: { + model: 'claude-sonnet-5-5', + messages: [ + { role: 'system', content: 'Classify support tickets.' }, + { role: 'user', content: '\n\n' }, + ], + temperature: 0.2, + }, + }), + blk('By category', 'condition', { + branches: { + kind: 'condition', + rows: [ + { key: 'billing', value: " === 'billing'" }, + { + key: 'urgent', + value: '.includes("urgent") && < 3', + }, + { key: 'else', value: '' }, + ], + }, + }), + blk('Log ticket', 'table', { + params: { + operation: 'insert_row', + tableSelector: { $sim: 'resource', kind: 'table', key: 'tickets' }, + data: '{\n "subject": ""\n}', + }, + modes: { tableId: 'basic' }, + }), + blk('Notify', 'slack', { + params: { + operation: 'send', + authMethod: 'oauth', + credential: { $sim: 'resource', kind: 'credential', key: 'support-slack' }, + channel: 'C0SUPPORT', + text: 'New ticket: ', + }, + modes: { channel: 'basic' }, + errorPort: true, + }), + blk('Reply', 'response', { + params: { dataMode: 'structured', builderData: { ok: true } }, + }), + ], + edges: [ + edge('bycategory', 'logticket', { kind: 'branch', key: 'billing' }), + edge('bycategory', 'notify', { kind: 'branch', key: 'urgent' }), + edge('bycategory', 'reply', { kind: 'branch', key: 'else' }), + edge('classify', 'bycategory'), + edge('logticket', 'notify'), + edge('logticket', 'notify', { kind: 'error' }), + edge('notify', 'reply'), + edge('ticketin', 'classify'), + ], + }), + }, + { + name: 'string-escapes', + workflow: wf({ + blocks: [ + start(), + blk('Escapes', 'agent', { + params: { + model: "it's a \"model\" with 'quotes'", + systemPrompt: + 'back\\slash `tick` $\u007bnotInterp} tab\there\r\ncrlf line\u2028ls\u2029ps \ud800 lone 漢字 🎉', + messages: [{ role: 'user', content: "single 'quote' only" }], + }, + }), + ], + }), + }, + { + name: 'templates-and-paths', + workflow: wf({ + blocks: [ + start(), + blk('Writer', 'agent', { + params: { + model: 'gpt-5.5', + systemPrompt: 'Line one\nLine two without refs', + messages: [ + { + role: 'user', + content: + 'Items: / / / \nnext', + }, + ], + conversationId: '', + }, + }), + ], + edges: [edge('start', 'writer')], + }), + }, + { + name: 'unresolved-tokens', + workflow: wf({ + blocks: [ + start(), + blk('Html', 'agent', { + params: { + model: '{{ not valid }}', + systemPrompt: + '
hello
{{lower_ok}} ', + }, + }), + ], + edges: [edge('start', 'html')], + }), + }, + { + name: 'ref-cycle-literalized', + workflow: wf({ + blocks: [ + start(), + blk('Alpha', 'agent', { params: { model: 'm', systemPrompt: 'See ' } }), + blk('Beta', 'agent', { params: { model: 'm', systemPrompt: 'See ' } }), + blk('Self', 'agent', { params: { model: 'm', systemPrompt: 'Me: ' } }), + ], + edges: [edge('start', 'alpha'), edge('alpha', 'beta')], + }), + }, + { + name: 'loop-foreach', + workflow: wf({ + blocks: [ + start('Start', [{ name: 'leads', type: 'array', value: '' }]), + blk('Each lead', 'loop', { + subflow: { + kind: 'loop', + loopType: 'forEach', + iterations: 5, + forEachItems: '', + }, + }), + blk('Lookup', 'api', { + parent: 'eachlead', + params: { + url: 'https://crm.example.com/c/?i=', + method: 'GET', + }, + }), + blk('Score', 'function', { + parent: 'eachlead', + params: { language: 'javascript', code: 'return .score * 2' }, + }), + blk('Summary', 'agent', { + params: { model: 'm', systemPrompt: 'Results: and ' }, + }), + ], + edges: [ + edge('eachlead', 'lookup', { kind: 'subflowStart' }), + edge('eachlead', 'summary', { kind: 'subflowEnd' }), + edge('lookup', 'score'), + edge('start', 'eachlead'), + ], + }), + }, + { + name: 'nested-subflows', + workflow: wf({ + blocks: [ + start(), + blk('Outer', 'loop', { + subflow: { kind: 'loop', loopType: 'for', iterations: 3 }, + }), + blk('Fan', 'parallel', { + parent: 'outer', + subflow: { + kind: 'parallel', + parallelType: 'collection', + distribution: '', + batchSize: 5, + }, + }), + blk('Work', 'agent', { + parent: 'fan', + params: { + model: 'm', + systemPrompt: + 'loop parallel named fan ', + }, + }), + blk('Sibling', 'loop', { + subflow: { + kind: 'loop', + loopType: 'while', + iterations: 5, + whileCondition: ' < 3', + doWhileCondition: '', + }, + }), + blk('Inside sibling', 'agent', { + parent: 'sibling', + params: { model: 'm', systemPrompt: 'cannot see ' }, + }), + ], + edges: [ + edge('fan', 'work', { kind: 'subflowStart' }), + edge('outer', 'fan', { kind: 'subflowStart' }), + edge('outer', 'sibling', { kind: 'subflowEnd' }), + edge('sibling', 'insidesibling', { kind: 'subflowStart' }), + edge('start', 'outer'), + ], + }), + }, + { + name: 'parallel-untyped', + workflow: wf({ + blocks: [ + start(), + blk('Batch', 'parallel', { subflow: { kind: 'parallel', count: 4 } }), + blk('Ping', 'api', { parent: 'batch', params: { url: 'https://x.test/' } }), + ], + edges: [edge('batch', 'ping', { kind: 'subflowStart' }), edge('start', 'batch')], + }), + }, + { + name: 'branches-null-rows', + workflow: wf({ + blocks: [ + start(), + blk('Gate', 'condition', { branches: { kind: 'condition', rows: null } }), + blk('Pick', 'router', { + params: { context: 'ctx', model: 'm' }, + branches: { kind: 'router', rows: null }, + }), + blk('Yes', 'response', { params: { dataMode: 'structured' } }), + ], + edges: [ + edge('gate', 'pick', { kind: 'branch', key: 'if' }), + edge('pick', 'yes', { kind: 'branch', key: 'route0' }), + edge('start', 'gate'), + ], + }), + }, + { + name: 'branch-titles-and-extra', + workflow: wf({ + blocks: [ + start(), + blk('Check', 'condition', { + branches: { + kind: 'condition', + rows: [ + { key: 'big', value: ' > 100', titleOverride: 'Large amount' }, + { key: 'elseIf0', value: '', extra: { legacyFlag: true } }, + { key: 'else', value: 'true' }, + ], + }, + }), + blk('Done', 'response', {}), + ], + edges: [ + edge('check', 'done', { kind: 'branch', key: 'big' }), + edge('check', 'done', { kind: 'branch', key: 'else' }), + edge('check', 'done', { kind: 'branch', key: 'elseIf0' }), + edge('start', 'check'), + ], + }), + }, + { + name: 'router-routes', + workflow: wf({ + blocks: [ + start('Start', [ + { name: 'amount', type: 'number', value: '' }, + { name: 'reason', type: 'string', value: '' }, + ]), + blk('Triage', 'router', { + params: { context: ' for ', model: 'claude-sonnet-5-5' }, + branches: { + kind: 'router', + rows: [ + { key: 'small', value: 'Under $100, auto-approve' }, + { key: 'review', value: 'Needs a manager' }, + ], + }, + }), + blk('Approve', 'response', {}), + blk('Escalate', 'response', {}), + ], + edges: [ + edge('start', 'triage'), + edge('triage', 'approve', { kind: 'branch', key: 'small' }), + edge('triage', 'escalate', { kind: 'branch', key: 'review' }), + ], + }), + }, + { + name: 'pair-modes', + workflow: wf({ + blocks: [ + start(), + blk('Picked basic', 'slack', { + params: { operation: 'send', channel: 'C0ONE', text: 'a' }, + modes: { channel: 'basic' }, + }), + blk('Manual advanced', 'slack', { + params: { operation: 'send', manualChannel: '', text: 'b' }, + modes: { channel: 'advanced' }, + }), + blk('Basic holding text', 'slack', { + params: { operation: 'send', channel: '', text: 'c' }, + modes: { channel: 'basic' }, + }), + blk('Advanced empty', 'slack', { + params: { operation: 'send', text: 'd' }, + modes: { channel: 'advanced' }, + }), + blk('Both members', 'slack', { + params: { operation: 'send', channel: 'C0OLD', manualChannel: 'C0NEW', text: 'e' }, + modes: { channel: 'advanced' }, + }), + ], + }), + }, + { + name: 'resource-nodes', + workflow: wf({ + variables: [ + { key: 'retries', name: 'retries', type: 'number', value: 2 }, + { key: 'lastrun', name: 'Last Run', type: 'string', value: 'never' }, + ], + blocks: [ + start(), + blk('Query', 'table', { + params: { + operation: 'query_rows', + tableSelector: { $sim: 'unresolved', kind: 'table', id: 'tbl_deleted' }, + knowledgeBases: [ + { $sim: 'resource', kind: 'knowledge-base', key: 'docs' }, + { $sim: 'resource', kind: 'knowledge-base', key: 'faq' }, + ], + limit: { + $sim: 'csv', + items: [ + { $sim: 'resource', kind: 'knowledge-document', key: 'a' }, + { $sim: 'unresolved', kind: 'knowledge-document', id: 'doc_9' }, + ], + }, + data: { $sim: 'literal', value: { $sim: 'user data', n: 1 } }, + }, + modes: { tableId: 'basic' }, + }), + blk('Set vars', 'variables', { + params: { + variables: [ + { variable: { $sim: 'var', key: 'retries' }, value: '' }, + { variable: { $sim: 'var', key: 'lastrun' }, value: '' }, + ], + }, + }), + ], + edges: [edge('query', 'setvars'), edge('start', 'query')], + }), + }, + { + name: 'inactive-values', + workflow: wf({ + blocks: [ + start(), + blk('Remember', 'agent', { + params: { + model: 'm', + memoryType: 'none', + conversationId: 'stale-id', + legacyField: 'kept', + }, + }), + ], + inactive: { remember: ['conversationId'] }, + edges: [edge('start', 'remember')], + }), + }, + { + name: 'generic-block-unknown-type', + workflow: wf({ + blocks: [ + start(), + blk('Mystery', 'custom_block_acme', { + params: { zeta: 1, alpha: 'a ' }, + triggerMode: true, + modes: { someCid: 'advanced' }, + }), + ], + }), + }, + { + name: 'generic-block-legacy-operation', + workflow: wf({ + blocks: [ + start(), + blk('Old table op', 'table', { + params: { operation: 'delete_everything', limit: '10' }, + }), + ], + }), + }, + { + name: 'block-meta', + workflow: wf({ + blocks: [ + start(), + blk('Guarded', 'api', { + params: { url: 'https://a.test', method: 'POST' }, + enabled: false, + locked: true, + advancedMode: true, + errorPort: true, + retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 }, + opaque: { data: { canvasNote: 'x', width: 300 } }, + }), + blk('Flaky', 'api', { + params: { url: 'https://b.test' }, + errorPort: true, + }), + blk('Fallback', 'response', {}), + ], + edges: [ + edge('flaky', 'fallback', { kind: 'error' }), + edge('start', 'guarded'), + edge('start', 'flaky'), + ], + }), + }, + { + name: 'agent-tools', + workflow: wf({ + blocks: [ + start(), + blk('Assistant', 'agent', { + params: { model: 'claude-sonnet-5-5' }, + tools: { + tools: [ + { + type: 'slack', + operation: 'send', + params: { channel: 'C0OPS', text: 'Approve: ' }, + modes: { channel: 'basic' }, + usageControl: 'auto', + }, + { + type: 'custom-tool-type', + title: 'Lookup vendor', + params: { query: '' }, + modes: {}, + customTool: { + ref: { $sim: 'resource', kind: 'custom-tool', key: 'lookup-vendor' }, + }, + }, + ], + }, + }), + ], + edges: [edge('start', 'assistant')], + }), + }, + { + name: 'input-format-sugar', + workflow: wf({ + blocks: [ + start('Start', [ + { name: 'question', type: 'string', value: '' }, + { name: 'limit', type: 'number', value: 10, description: 'Max results', required: true }, + { name: 'tags', type: 'array' }, + ]), + blk('Hook', 'webhook', { + params: { + inputFormat: [ + { name: '1', type: 'string', value: '' }, + { name: 'id', type: 'string', value: '', extraKey: true }, + ], + }, + }), + ], + }), + }, + { + name: 'json-code-fields', + workflow: wf({ + blocks: [ + start(), + blk('Sugared', 'agent', { + params: { model: 'm', responseFormat: '{\n "name": "ticket",\n "strict": true\n}' }, + }), + blk('Compact', 'agent', { + params: { model: 'm', responseFormat: '{"name":"ticket"}' }, + }), + blk('Refs in json', 'api', { + params: { url: 'https://x.test', body: '{\n "q": \n}' }, + }), + ], + edges: [edge('start', 'sugared')], + }), + }, + { + name: 'function-languages', + workflow: wf({ + blocks: [ + start(), + blk('Js code', 'function', { + params: { + language: 'javascript', + code: 'const total = + {{TAX_RATE}}\n// keep `ticks` and $\u007bbraces}\nreturn total', + }, + }), + blk('Py code', 'function', { + params: { language: 'python', code: 'def main():\n return \n' }, + }), + blk('Sh code', 'function', { params: { language: 'shell', code: 'echo "{{HOME_DIR}}"' } }), + ], + edges: [edge('jscode', 'pycode'), edge('pycode', 'shcode'), edge('start', 'jscode')], + }), + }, + { + name: 'comments-at-anchors', + workflow: wf({ + blocks: [ + start(), + blk('Classify', 'agent', { params: { model: 'm', temperature: 0.5 } }), + blk('Done', 'response', {}), + ], + variables: [{ key: 'count', name: 'count', type: 'number', value: 1 }], + edges: [edge('classify', 'done'), edge('start', 'classify')], + comments: [ + [encodeAnchor({ kind: 'header' }), [line('Owned by the support team.')]], + [ + encodeAnchor({ kind: 'block', block: 'classify' }), + [line('Cheap model first.'), line('see runbook', 'trailing')], + ], + [ + encodeAnchor({ kind: 'param', block: 'classify', param: 'temperature' }), + [line('tuned 2026-10')], + ], + [ + encodeAnchor({ kind: 'param', block: 'classify', param: 'systemPrompt' }), + [line('param not printed')], + ], + [ + encodeAnchor({ kind: 'edges', block: 'classify', port: 'out' }), + [line('happy path', 'trailing')], + ], + [encodeAnchor({ kind: 'wiring' }), [line('Wiring')]], + [encodeAnchor({ kind: 'var', variable: 'count' }), [line('starts at one')]], + [encodeAnchor({ kind: 'block', block: 'deleted' }), [line('dropped')]], + [ + encodeAnchor({ kind: 'block', block: 'done' }), + [{ text: '*\n * Final reply.\n ', kind: 'block', placement: 'leading' }], + ], + [encodeAnchor({ kind: 'footer' }), [line('end of file')]], + ], + }), + }, + { + name: 'identifier-collisions', + workflow: wf({ + blocks: [ + start(), + blk('Default', 'api', { params: { url: 'https://a.test' } }), + blk('Table', 'api', { params: { url: 'https://b.test' } }), + blk('Workflow', 'api', { params: { url: 'https://c.test' } }), + blk('Slack', 'api', { params: { url: 'https://d.test' } }), + blk('Send Email', 'api', { params: { url: 'https://e.test' } }), + blk('send-email', 'api', { params: { url: 'https://f.test' } }), + blk('1st step', 'api', { params: { url: 'https://g.test' } }), + blk('日本語', 'api', { params: { url: 'https://h.test' } }), + blk('Hinted', 'api', { params: { url: 'https://i.test ' } }), + blk('Bad hint', 'api', { params: { url: 'https://j.test' } }), + ], + }), + hints: { blocks: { hinted: { binding: 'myHinted' }, badhint: { binding: 'class' } } }, + }, + { + name: 'lock-order', + workflow: wf({ + blocks: [ + blk('Zeta', 'api', { params: { url: 'https://z.test' } }), + blk('Alpha', 'api', { params: { url: 'https://a.test' } }), + blk('Mid', 'api', { params: { url: 'https://m.test ' } }), + start(), + ], + edges: [edge('start', 'zeta')], + }), + hints: { blocks: { zeta: { order: 0 }, mid: { order: 1 }, alpha: { order: 2 } } }, + }, + { + name: 'raw-and-odd-edges', + workflow: wf({ + blocks: [ + start(), + blk('Gate', 'condition', { + branches: { + kind: 'condition', + rows: [ + { key: 'if', value: 'true' }, + { key: 'else', value: '' }, + ], + }, + }), + blk('A', 'api', { params: { url: 'https://a.test' } }), + blk('B', 'api', { params: { url: 'https://b.test' } }), + ], + edges: [ + edge('a', 'b', { kind: 'raw', handle: 'right-legacy' }), + edge('gate', 'a', { kind: 'out' }), + edge('gate', 'b', { kind: 'branch', key: 'if' }), + edge('start', 'gate'), + ], + }), + }, + { + name: 'fan-out-wrapping', + workflow: wf({ + blocks: [ + start(), + ...[ + 'Enrich company profile', + 'Enrich contact details', + 'Score lead quality', + 'Notify sales channel', + 'Archive raw payload', + ].map((name) => blk(name, 'api', { params: { url: 'https://x.test' } })), + ], + edges: [ + 'enrichcompanyprofile', + 'enrichcontactdetails', + 'scoreleadquality', + 'notifysaleschannel', + 'archiverawpayload', + ].map((to) => edge('start', to)), + }), + }, + { + name: 'legacy-dropdown-and-todo', + workflow: wf({ + blocks: [ + start(), + blk('Legacy method', 'api', { params: { method: 'PATCH' } }), + blk('Drafted', 'agent', { params: {} }), + ], + }), + }, + { + name: 'layout-widths', + workflow: wf({ + blocks: [ + start(), + blk('Widths', 'api', { + params: { + url: 'https://example.com/a/very/long/path/that/keeps/going/and/going/until/it/overflows/the/line', + headers: [ + { key: 'Authorization', value: 'Bearer {{API_TOKEN}}' }, + { key: 'Accept', value: 'application/json' }, + ], + method: 'GET', + }, + }), + blk('Numbers', 'agent', { + params: { + model: 'm', + temperature: 1e21, + messages: [ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, -0.5, + ], + }, + }), + blk('Short key', 'slack', { + params: { + operation: 'send', + text: 'a very long message body that will never fit on the same line as its very short key', + }, + }), + ], + }), + }, + { + name: 'trigger-mode-builders', + workflow: wf({ + blocks: [ + blk('Invoice email', 'gmail', { + triggerMode: true, + params: { + selectedTriggerId: 'gmail_poller', + credential: { $sim: 'resource', kind: 'credential', key: 'finance-gmail' }, + labelIds: ['INBOX'], + markAsRead: true, + }, + }), + blk('Send summary', 'gmail', { + params: { + operation: 'send_gmail', + credential: { $sim: 'resource', kind: 'credential', key: 'finance-gmail' }, + to: 'cfo@acme.test', + subject: 'Invoices', + body: '', + }, + }), + blk('Odd trigger', 'gmail', { + triggerMode: true, + params: { selectedTriggerId: 'gmail_other', markAsRead: false }, + }), + ], + edges: [edge('invoiceemail', 'sendsummary')], + }), + }, + { + name: 'note-markdown', + workflow: wf({ + blocks: [ + start(), + blk('How this works', 'note', { + params: { content: 'Polls **INBOX**;\nappends to the `finance` sheet.' }, + }), + ], + }), + }, +] diff --git a/packages/workflow-code/src/print/__fixtures__/catalog.ts b/packages/workflow-code/src/print/__fixtures__/catalog.ts new file mode 100644 index 00000000000..d17d4507eba --- /dev/null +++ b/packages/workflow-code/src/print/__fixtures__/catalog.ts @@ -0,0 +1,299 @@ +/** + * A small hand-built catalog covering every construct the printer handles: triggers, an operation + * namespace, basic/advanced pairs, selectors, code fields, branches, tools, containers, a note and + * a trigger-mode builder. Shapes follow `catalog/types.ts`; values are illustrative only. + */ + +import type { + BlockCatalog, + CatalogBlock, + CatalogSubBlock, + CatalogValueKind, +} from '../../catalog/types' + +type SubBlockInit = Partial & Pick + +function sb(init: SubBlockInit & { valueKind?: CatalogValueKind }): CatalogSubBlock { + return { valueKind: 'string', storage: 'native', ...init } +} + +function block( + type: string, + subBlocks: CatalogSubBlock[], + extra: Partial = {} +): CatalogBlock { + return { + type, + name: type, + category: 'blocks', + subBlocks, + tools: { access: [], selector: 'single' }, + inputs: {}, + outputs: {}, + graph: { canBeTarget: true, errorPort: true, container: null, annotationOnly: false }, + ...extra, + } +} + +const trigger = (type: string, subBlocks: CatalogSubBlock[]) => + block(type, subBlocks, { + category: 'triggers', + graph: { canBeTarget: false, errorPort: false, container: null, annotationOnly: false }, + }) + +export const catalog: BlockCatalog = { + catalogVersion: 1, + hash: 'fixture', + sdkMajor: 1, + blocks: { + start_trigger: trigger('start_trigger', [ + sb({ + id: 'inputFormat', + type: 'input-format', + valueKind: 'array', + structured: 'inputFormat', + }), + ]), + webhook: trigger('webhook', [ + sb({ id: 'requireAuth', type: 'switch', valueKind: 'boolean' }), + sb({ id: 'token', type: 'short-input', password: true }), + sb({ + id: 'inputFormat', + type: 'input-format', + valueKind: 'array', + structured: 'inputFormat', + }), + ]), + agent: block('agent', [ + sb({ id: 'model', type: 'combobox', required: true }), + sb({ id: 'messages', type: 'messages-input', valueKind: 'array' }), + sb({ id: 'systemPrompt', type: 'long-input' }), + sb({ id: 'responseFormat', type: 'code', valueKind: 'code', language: 'json' }), + sb({ id: 'tools', type: 'tool-input', valueKind: 'tools', structured: 'tools' }), + sb({ id: 'temperature', type: 'slider', valueKind: 'number', min: 0, max: 2 }), + sb({ + id: 'memoryType', + type: 'dropdown', + options: [ + { id: 'none', label: 'None' }, + { id: 'conversation', label: 'Conversation' }, + ], + }), + sb({ + id: 'conversationId', + type: 'short-input', + condition: { field: 'memoryType', value: 'conversation' }, + }), + ]), + slack: block('slack', [ + sb({ + id: 'operation', + type: 'dropdown', + options: [ + { id: 'send', label: 'Send Message' }, + { id: 'read', label: 'Read Messages' }, + ], + }), + sb({ + id: 'authMethod', + type: 'dropdown', + options: [ + { id: 'oauth', label: 'OAuth' }, + { id: 'bot_token', label: 'Bot token' }, + ], + }), + sb({ + id: 'credential', + type: 'oauth-input', + valueKind: 'resource', + resourceKind: 'credential', + }), + sb({ id: 'botToken', type: 'short-input', password: true }), + sb({ + id: 'channel', + type: 'channel-selector', + valueKind: 'picked', + mode: 'basic', + canonicalParamId: 'channel', + }), + sb({ + id: 'manualChannel', + type: 'short-input', + mode: 'advanced', + canonicalParamId: 'channel', + }), + sb({ id: 'text', type: 'long-input', required: true }), + sb({ id: 'limit', type: 'short-input', condition: { field: 'operation', value: 'read' } }), + ]), + function: block('function', [ + sb({ + id: 'language', + type: 'dropdown', + options: [ + { id: 'javascript', label: 'JavaScript' }, + { id: 'python', label: 'Python' }, + { id: 'shell', label: 'Shell' }, + ], + }), + sb({ id: 'code', type: 'code', valueKind: 'code', language: 'javascript' }), + ]), + condition: block( + 'condition', + [ + sb({ + id: 'conditions', + type: 'condition-input', + valueKind: 'branches', + structured: 'branches', + }), + ], + { + graph: { + canBeTarget: true, + errorPort: false, + container: null, + annotationOnly: false, + branches: { subBlockId: 'conditions', kind: 'condition' }, + }, + } + ), + router: block( + 'router', + [ + sb({ id: 'context', type: 'long-input' }), + sb({ id: 'model', type: 'combobox' }), + sb({ id: 'routes', type: 'router-input', valueKind: 'branches', structured: 'branches' }), + ], + { + graph: { + canBeTarget: true, + errorPort: false, + container: null, + annotationOnly: false, + branches: { subBlockId: 'routes', kind: 'router' }, + }, + } + ), + table: block('table', [ + sb({ + id: 'operation', + type: 'dropdown', + options: [ + { id: 'insert_row', label: 'Insert Row' }, + { id: 'query_rows', label: 'Query Rows' }, + ], + }), + sb({ + id: 'tableSelector', + type: 'table-selector', + valueKind: 'resource', + resourceKind: 'table', + mode: 'basic', + canonicalParamId: 'tableId', + }), + sb({ + id: 'manualTableId', + type: 'short-input', + mode: 'advanced', + canonicalParamId: 'tableId', + }), + sb({ id: 'data', type: 'code', valueKind: 'code', language: 'json' }), + sb({ id: 'limit', type: 'short-input' }), + sb({ + id: 'knowledgeBases', + type: 'knowledge-base-selector', + valueKind: 'resource', + resourceKind: 'knowledge-base', + multiple: true, + }), + ]), + note: block('note', [sb({ id: 'content', type: 'long-input' })], { + graph: { canBeTarget: false, errorPort: false, container: null, annotationOnly: true }, + }), + variables: block('variables', [ + sb({ id: 'variables', type: 'variables-input', valueKind: 'array', structured: 'variables' }), + ]), + api: block('api', [ + sb({ id: 'url', type: 'short-input', required: true }), + sb({ + id: 'method', + type: 'dropdown', + options: [ + { id: 'GET', label: 'GET' }, + { id: 'POST', label: 'POST' }, + ], + }), + sb({ id: 'headers', type: 'table', valueKind: 'array' }), + sb({ id: 'body', type: 'code', valueKind: 'code', language: 'json' }), + ]), + gmail: block( + 'gmail', + [ + sb({ + id: 'operation', + type: 'dropdown', + surface: 'action', + options: [{ id: 'send_gmail', label: 'Send Email' }], + }), + sb({ + id: 'credential', + type: 'oauth-input', + valueKind: 'resource', + resourceKind: 'credential', + }), + sb({ id: 'to', type: 'short-input', surface: 'action' }), + sb({ id: 'subject', type: 'short-input', surface: 'action' }), + sb({ id: 'body', type: 'long-input', surface: 'action' }), + sb({ id: 'selectedTriggerId', type: 'dropdown', surface: 'trigger', mode: 'trigger' }), + sb({ + id: 'labelIds', + type: 'dropdown', + surface: 'trigger', + mode: 'trigger', + multiple: true, + }), + sb({ + id: 'markAsRead', + type: 'switch', + valueKind: 'boolean', + surface: 'trigger', + mode: 'trigger', + }), + ], + { triggerAllowed: true } + ), + response: block('response', [ + sb({ id: 'dataMode', type: 'dropdown', options: [{ id: 'structured', label: 'Builder' }] }), + sb({ id: 'builderData', type: 'response-format', valueKind: 'object' }), + ]), + loop: block('loop', [], { + graph: { canBeTarget: true, errorPort: false, container: 'loop', annotationOnly: false }, + }), + parallel: block('parallel', [], { + graph: { canBeTarget: true, errorPort: false, container: 'parallel', annotationOnly: false }, + }), + }, + triggers: {}, + builders: { + 'trigger.start': { type: 'start_trigger' }, + 'trigger.webhook': { type: 'webhook' }, + agent: { type: 'agent' }, + 'slack.sendMessage': { type: 'slack', operation: 'send' }, + 'slack.readMessages': { type: 'slack', operation: 'read' }, + fn: { type: 'function' }, + condition: { type: 'condition' }, + router: { type: 'router' }, + 'table.insertRow': { type: 'table', operation: 'insert_row' }, + 'table.queryRows': { type: 'table', operation: 'query_rows' }, + note: { type: 'note' }, + setVariables: { type: 'variables' }, + api: { type: 'api' }, + 'gmail.sendEmail': { type: 'gmail', operation: 'send_gmail' }, + 'trigger.gmail.poller': { + type: 'gmail', + triggerMode: true, + fixed: { selectedTriggerId: 'gmail_poller' }, + }, + response: { type: 'response' }, + }, +} diff --git a/packages/workflow-code/src/print/__golden__/agent-tools.txt b/packages/workflow-code/src/print/__golden__/agent-tools.txt new file mode 100644 index 00000000000..5efd946b10f --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/agent-tools.txt @@ -0,0 +1,24 @@ +// @sim-sdk 1 +import { agent, picked, raw, slack, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const assistant = agent('Assistant', { + model: 'claude-sonnet-5-5', + tools: [ + slack.tool.sendMessage( + { channel: picked('C0OPS'), text: t`Approve: ${start.input}` }, + { usageControl: 'auto', modes: { channel: 'basic' } } + ), + raw({ + type: 'custom-tool-type', + title: 'Lookup vendor', + params: { query: '' }, + modes: {}, + customTool: { ref: { $sim: 'resource', kind: 'custom-tool', key: 'lookup-vendor' } }, + }), + ], + }) + + start.to(assistant) +}) diff --git a/packages/workflow-code/src/print/__golden__/block-meta.txt b/packages/workflow-code/src/print/__golden__/block-meta.txt new file mode 100644 index 00000000000..2c89a3d78e2 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/block-meta.txt @@ -0,0 +1,23 @@ +// @sim-sdk 1 +import { api, response, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const flaky = api('Flaky', { url: 'https://b.test' }) + const fallback = response('Fallback', {}) + const guarded = api( + 'Guarded', + { url: 'https://a.test', method: 'POST' }, + { + disabled: true, + locked: true, + advancedMode: true, + errorPort: true, + retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 }, + $unknown: { canvasNote: 'x', width: 300 }, + } + ) + + start.to(flaky, guarded) + flaky.onError(fallback) +}) diff --git a/packages/workflow-code/src/print/__golden__/branch-titles-and-extra.txt b/packages/workflow-code/src/print/__golden__/branch-titles-and-extra.txt new file mode 100644 index 00000000000..4c398c26a97 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/branch-titles-and-extra.txt @@ -0,0 +1,17 @@ +// @sim-sdk 1 +import { condition, js, response, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const check = condition( + 'Check', + { big: js`${start.amount} > 100`, elseIf0: js``, else: js`true` }, + { branches: { big: { title: 'Large amount' }, elseIf0: { extra: { legacyFlag: true } } } } + ) + const done = response('Done', {}) + + start.to(check) + check.big.to(done) + check.elseIf0.to(done) + check.else.to(done) +}) diff --git a/packages/workflow-code/src/print/__golden__/branches-null-rows.txt b/packages/workflow-code/src/print/__golden__/branches-null-rows.txt new file mode 100644 index 00000000000..0a22f3a640d --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/branches-null-rows.txt @@ -0,0 +1,13 @@ +// @sim-sdk 1 +import { condition, response, router, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const gate = condition('Gate', {}) + const pick = router('Pick', { context: 'ctx', model: 'm', routes: {} }) + const yes = response('Yes', { dataMode: 'structured' }) + + start.to(gate) + gate.if.to(pick) + pick.route0.to(yes) +}) diff --git a/packages/workflow-code/src/print/__golden__/comments-at-anchors.txt b/packages/workflow-code/src/print/__golden__/comments-at-anchors.txt new file mode 100644 index 00000000000..83624c1a615 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/comments-at-anchors.txt @@ -0,0 +1,32 @@ +// @sim-sdk 1 +// Owned by the support team. +import { agent, response, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow( + 'Fixture', + { + variables: { + // starts at one + count: { type: 'number', value: 1 }, + }, + }, + () => { + const start = trigger.start('Start', { inputFormat: [] }) + // Cheap model first. + // param not printed + const classify = agent('Classify', { + model: 'm', + // tuned 2026-10 + temperature: 0.5, + }) // see runbook + /** + * Final reply. + */ + const done = response('Done', {}) + + // Wiring + start.to(classify) + classify.to(done) // happy path + } +) +// end of file diff --git a/packages/workflow-code/src/print/__golden__/diagnostics.json b/packages/workflow-code/src/print/__golden__/diagnostics.json new file mode 100644 index 00000000000..70ba334ca49 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/diagnostics.json @@ -0,0 +1,52 @@ +{ + "minimal-trigger": [], + "support-triage": [], + "string-escapes": [], + "templates-and-paths": [], + "unresolved-tokens": [ + "W_UNRESOLVED_REF html: Reference
does not resolve in scope; printed as literal text.", + "W_UNRESOLVED_REF html: Reference does not resolve in scope; printed as literal text.", + "W_UNRESOLVED_REF html: Reference does not resolve in scope; printed as literal text.", + "W_UNRESOLVED_REF html: Reference does not resolve in scope; printed as literal text." + ], + "ref-cycle-literalized": [ + "W_FORWARD_REF_LITERALIZED self: Reference would point at a block declared later; printed as literal text.", + "W_FORWARD_REF_LITERALIZED alpha: Reference would point at a block declared later; printed as literal text." + ], + "loop-foreach": [ + "W_UNRESOLVED_REF summary: Reference does not resolve in scope; printed as literal text." + ], + "nested-subflows": [ + "W_UNRESOLVED_REF sibling: Reference does not resolve in scope; printed as literal text.", + "W_UNRESOLVED_REF insidesibling: Reference does not resolve in scope; printed as literal text." + ], + "parallel-untyped": [], + "branches-null-rows": [], + "branch-titles-and-extra": [], + "router-routes": [], + "pair-modes": [], + "resource-nodes": [], + "inactive-values": [], + "generic-block-unknown-type": [], + "generic-block-legacy-operation": [], + "block-meta": [], + "agent-tools": [], + "input-format-sugar": [], + "json-code-fields": [], + "function-languages": [], + "comments-at-anchors": [ + "W_COMMENT_MOVED classify: A comment has no printed anchor; moved to its block declaration.", + "W_COMMENT_DROPPED deleted: A comment was dropped: its anchor no longer exists." + ], + "identifier-collisions": [], + "lock-order": [], + "raw-and-odd-edges": [ + "W_RAW_HANDLE gate: Edge handle source has no SDK form; printed as edge().", + "W_RAW_HANDLE a: Edge handle right-legacy has no SDK form; printed as edge()." + ], + "fan-out-wrapping": [], + "legacy-dropdown-and-todo": [], + "layout-widths": [], + "trigger-mode-builders": [], + "note-markdown": [] +} diff --git a/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt b/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt new file mode 100644 index 00000000000..4d2e5503c1b --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt @@ -0,0 +1,19 @@ +// @sim-sdk 1 +import { api, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const archiveRawPayload = api('Archive raw payload', { url: 'https://x.test' }) + const enrichCompanyProfile = api('Enrich company profile', { url: 'https://x.test' }) + const enrichContactDetails = api('Enrich contact details', { url: 'https://x.test' }) + const notifySalesChannel = api('Notify sales channel', { url: 'https://x.test' }) + const scoreLeadQuality = api('Score lead quality', { url: 'https://x.test' }) + + start.to( + archiveRawPayload, + enrichCompanyProfile, + enrichContactDetails, + notifySalesChannel, + scoreLeadQuality + ) +}) diff --git a/packages/workflow-code/src/print/__golden__/function-files.txt b/packages/workflow-code/src/print/__golden__/function-files.txt new file mode 100644 index 00000000000..4a9183d2cca --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/function-files.txt @@ -0,0 +1,13 @@ +// @sim-sdk 1 +import { file, fn, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const jsCode = fn('Js code', { language: 'javascript', code: file('./functions/js-code.js') }) + const pyCode = fn('Py code', { language: 'python', code: file('./functions/py-code.py') }) + const shCode = fn('Sh code', { language: 'shell', code: file('./functions/sh-code.sh') }) + + start.to(jsCode) + jsCode.to(pyCode) + pyCode.to(shCode) +}) diff --git a/packages/workflow-code/src/print/__golden__/function-languages.txt b/packages/workflow-code/src/print/__golden__/function-languages.txt new file mode 100644 index 00000000000..3b7e2c22a8a --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/function-languages.txt @@ -0,0 +1,23 @@ +// @sim-sdk 1 +import { env, fn, js, py, sh, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const jsCode = fn('Js code', { + language: 'javascript', + code: js`const total = ${start.total} + ${env.TAX_RATE} +// keep \`ticks\` and \${braces} +return total`, + }) + const pyCode = fn('Py code', { + language: 'python', + code: py`def main(): + return ${start.total} +`, + }) + const shCode = fn('Sh code', { language: 'shell', code: sh`echo "${env.HOME_DIR}"` }) + + start.to(jsCode) + jsCode.to(pyCode) + pyCode.to(shCode) +}) diff --git a/packages/workflow-code/src/print/__golden__/generic-block-legacy-operation.txt b/packages/workflow-code/src/print/__golden__/generic-block-legacy-operation.txt new file mode 100644 index 00000000000..02c702828fd --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/generic-block-legacy-operation.txt @@ -0,0 +1,10 @@ +// @sim-sdk 1 +import { block, raw, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const oldTableOp = block('table', 'Old table op', { + operation: raw('delete_everything'), + limit: '10', + }) +}) diff --git a/packages/workflow-code/src/print/__golden__/generic-block-unknown-type.txt b/packages/workflow-code/src/print/__golden__/generic-block-unknown-type.txt new file mode 100644 index 00000000000..ed3f5fe508c --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/generic-block-unknown-type.txt @@ -0,0 +1,12 @@ +// @sim-sdk 1 +import { block, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const mystery = block( + 'custom_block_acme', + 'Mystery', + { alpha: t`a ${start.input}`, zeta: 1 }, + { triggerMode: true, modes: { someCid: 'advanced' } } + ) +}) diff --git a/packages/workflow-code/src/print/__golden__/identifier-collisions.txt b/packages/workflow-code/src/print/__golden__/identifier-collisions.txt new file mode 100644 index 00000000000..7c8dfb1a9c8 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/identifier-collisions.txt @@ -0,0 +1,16 @@ +// @sim-sdk 1 +import { api, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const _1stStep = api('1st step', { url: 'https://g.test' }) + const badHint = api('Bad hint', { url: 'https://j.test' }) + const default2 = api('Default', { url: 'https://a.test' }) + const myHinted = api('Hinted', { url: t`https://i.test ${default2.data}` }) + const sendEmail = api('send-email', { url: 'https://f.test' }) + const sendEmail2 = api('Send Email', { url: 'https://e.test' }) + const slack2 = api('Slack', { url: 'https://d.test' }) + const table2 = api('Table', { url: 'https://b.test' }) + const workflow2 = api('Workflow', { url: 'https://c.test' }) + const block2 = api('日本語', { url: 'https://h.test' }) +}) diff --git a/packages/workflow-code/src/print/__golden__/inactive-values.txt b/packages/workflow-code/src/print/__golden__/inactive-values.txt new file mode 100644 index 00000000000..699299f8285 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/inactive-values.txt @@ -0,0 +1,13 @@ +// @sim-sdk 1 +import { agent, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const remember = agent( + 'Remember', + { model: 'm', memoryType: 'none' }, + { inactive: { conversationId: 'stale-id', legacyField: 'kept' } } + ) + + start.to(remember) +}) diff --git a/packages/workflow-code/src/print/__golden__/input-format-sugar.txt b/packages/workflow-code/src/print/__golden__/input-format-sugar.txt new file mode 100644 index 00000000000..7295b9c3505 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/input-format-sugar.txt @@ -0,0 +1,18 @@ +// @sim-sdk 1 +import { trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const hook = trigger.webhook('Hook', { + inputFormat: [ + { name: '1', type: 'string', value: '' }, + { name: 'id', type: 'string', value: '', extraKey: true }, + ], + }) + const start = trigger.start('Start', { + inputFormat: { + question: 'string', + limit: { type: 'number', value: 10, description: 'Max results', required: true }, + tags: { type: 'array' }, + }, + }) +}) diff --git a/packages/workflow-code/src/print/__golden__/json-code-fields.txt b/packages/workflow-code/src/print/__golden__/json-code-fields.txt new file mode 100644 index 00000000000..05533929a51 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/json-code-fields.txt @@ -0,0 +1,16 @@ +// @sim-sdk 1 +import { agent, api, json, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const compact = agent('Compact', { model: 'm', responseFormat: json`{"name":"ticket"}` }) + const refsInJson = api('Refs in json', { + url: 'https://x.test', + body: json`{ + "q": ${start.input} +}`, + }) + const sugared = agent('Sugared', { model: 'm', responseFormat: { name: 'ticket', strict: true } }) + + start.to(sugared) +}) diff --git a/packages/workflow-code/src/print/__golden__/layout-widths.txt b/packages/workflow-code/src/print/__golden__/layout-widths.txt new file mode 100644 index 00000000000..6e0c2d02d92 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/layout-widths.txt @@ -0,0 +1,25 @@ +// @sim-sdk 1 +import { agent, api, env, slack, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const numbers = agent('Numbers', { + model: 'm', + messages: [ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, + 27, 28, 29, 30, -0.5, + ], + temperature: 1e21, + }) + const shortKey = slack.sendMessage('Short key', { + text: 'a very long message body that will never fit on the same line as its very short key', + }) + const widths = api('Widths', { + url: 'https://example.com/a/very/long/path/that/keeps/going/and/going/until/it/overflows/the/line', + method: 'GET', + headers: [ + { key: 'Authorization', value: t`Bearer ${env.API_TOKEN}` }, + { key: 'Accept', value: 'application/json' }, + ], + }) +}) diff --git a/packages/workflow-code/src/print/__golden__/legacy-dropdown-and-todo.txt b/packages/workflow-code/src/print/__golden__/legacy-dropdown-and-todo.txt new file mode 100644 index 00000000000..37a0374e251 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/legacy-dropdown-and-todo.txt @@ -0,0 +1,8 @@ +// @sim-sdk 1 +import { agent, api, raw, todo, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const drafted = agent('Drafted', { model: todo() }) + const legacyMethod = api('Legacy method', { url: todo(), method: raw('PATCH') }) +}) diff --git a/packages/workflow-code/src/print/__golden__/lock-order.txt b/packages/workflow-code/src/print/__golden__/lock-order.txt new file mode 100644 index 00000000000..a3abccbb905 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/lock-order.txt @@ -0,0 +1,11 @@ +// @sim-sdk 1 +import { api, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const zeta = api('Zeta', { url: 'https://z.test' }) + const alpha = api('Alpha', { url: 'https://a.test' }) + const mid = api('Mid', { url: t`https://m.test ${alpha.data}` }) + + start.to(zeta) +}) diff --git a/packages/workflow-code/src/print/__golden__/loop-foreach.txt b/packages/workflow-code/src/print/__golden__/loop-foreach.txt new file mode 100644 index 00000000000..470919d42e1 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/loop-foreach.txt @@ -0,0 +1,31 @@ +// @sim-sdk 1 +import { agent, api, fn, js, loop, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: { leads: 'array' } }) + const eachLead = loop.forEach( + 'Each lead', + { collection: start.leads }, + (p) => { + const lookup = api('Lookup', { + url: t`https://crm.example.com/c/${p.currentItem.email}?i=${p.index}`, + method: 'GET', + }) + const score = fn('Score', { + language: 'javascript', + code: js`return ${lookup.data}.score * 2`, + }) + + p.to(lookup) + lookup.to(score) + }, + { inactive: { iterations: 5 } } + ) + const summary = agent('Summary', { + model: 'm', + systemPrompt: t`Results: ${eachLead.results} and `, + }) + + start.to(eachLead) + eachLead.to(summary) +}) diff --git a/packages/workflow-code/src/print/__golden__/minimal-trigger.txt b/packages/workflow-code/src/print/__golden__/minimal-trigger.txt new file mode 100644 index 00000000000..5b68c66cf7e --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/minimal-trigger.txt @@ -0,0 +1,6 @@ +// @sim-sdk 1 +import { trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Hello', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) +}) diff --git a/packages/workflow-code/src/print/__golden__/nested-subflows.txt b/packages/workflow-code/src/print/__golden__/nested-subflows.txt new file mode 100644 index 00000000000..7e50e4a36be --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/nested-subflows.txt @@ -0,0 +1,34 @@ +// @sim-sdk 1 +import { agent, js, loop, parallel, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const outer = loop.for('Outer', { count: 3 }, (p) => { + const fan = parallel.collection('Fan', { collection: start.rows, batchSize: 5 }, (p2) => { + const work = agent('Work', { + model: 'm', + systemPrompt: t`loop ${p.index} parallel ${p2.currentItem} named ${outer.index} fan ${fan.index}`, + }) + + p2.to(work) + }) + + p.to(fan) + }) + const sibling = loop.while( + 'Sibling', + { condition: js` < 3` }, + (p) => { + const insideSibling = agent('Inside sibling', { + model: 'm', + systemPrompt: 'cannot see ', + }) + + p.to(insideSibling) + }, + { inactive: { iterations: 5, doWhileCondition: js`` } } + ) + + start.to(outer) + outer.to(sibling) +}) diff --git a/packages/workflow-code/src/print/__golden__/note-markdown.txt b/packages/workflow-code/src/print/__golden__/note-markdown.txt new file mode 100644 index 00000000000..eaf1f22a7ae --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/note-markdown.txt @@ -0,0 +1,10 @@ +// @sim-sdk 1 +import { md, note, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const howThisWorks = note('How this works', { + content: md`Polls **INBOX**; +appends to the \`finance\` sheet.`, + }) +}) diff --git a/packages/workflow-code/src/print/__golden__/pair-modes.txt b/packages/workflow-code/src/print/__golden__/pair-modes.txt new file mode 100644 index 00000000000..cc3634cd875 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/pair-modes.txt @@ -0,0 +1,23 @@ +// @sim-sdk 1 +import { picked, slack, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const advancedEmpty = slack.sendMessage( + 'Advanced empty', + { text: 'd' }, + { modes: { channel: 'advanced' } } + ) + const basicHoldingText = slack.sendMessage( + 'Basic holding text', + { channel: start.channel, text: 'c' }, + { modes: { channel: 'basic' } } + ) + const bothMembers = slack.sendMessage( + 'Both members', + { channel: 'C0NEW', text: 'e' }, + { inactive: { channel: picked('C0OLD') } } + ) + const manualAdvanced = slack.sendMessage('Manual advanced', { channel: start.channel, text: 'b' }) + const pickedBasic = slack.sendMessage('Picked basic', { channel: picked('C0ONE'), text: 'a' }) +}) diff --git a/packages/workflow-code/src/print/__golden__/parallel-untyped.txt b/packages/workflow-code/src/print/__golden__/parallel-untyped.txt new file mode 100644 index 00000000000..7169309b471 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/parallel-untyped.txt @@ -0,0 +1,13 @@ +// @sim-sdk 1 +import { api, parallel, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const batch = parallel('Batch', { count: 4 }, (p) => { + const ping = api('Ping', { url: t`https://x.test/${p.index}` }) + + p.to(ping) + }) + + start.to(batch) +}) diff --git a/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt b/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt new file mode 100644 index 00000000000..f25afeaff73 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt @@ -0,0 +1,14 @@ +// @sim-sdk 1 +import { api, condition, edge, js, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const gate = condition('Gate', { if: js`true`, else: true }) + const a = api('A', { url: 'https://a.test' }) + const b = api('B', { url: 'https://b.test' }) + + start.to(gate) + edge(gate, 'source', a) + gate.if.to(b) + edge(a, 'right-legacy', b) +}) diff --git a/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt b/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt new file mode 100644 index 00000000000..f5dd7ee64d8 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt @@ -0,0 +1,12 @@ +// @sim-sdk 1 +import { agent, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const self = agent('Self', { model: 'm', systemPrompt: 'Me: ' }) + const alpha = agent('Alpha', { model: 'm', systemPrompt: 'See ' }) + const beta = agent('Beta', { model: 'm', systemPrompt: t`See ${alpha.content}` }) + + start.to(alpha) + alpha.to(beta) +}) diff --git a/packages/workflow-code/src/print/__golden__/resource-nodes.txt b/packages/workflow-code/src/print/__golden__/resource-nodes.txt new file mode 100644 index 00000000000..11b7419ea8d --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/resource-nodes.txt @@ -0,0 +1,40 @@ +// @sim-sdk 1 +import { kb, raw, setVariables, t, table, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow( + 'Fixture', + { + variables: { + lastrun: { name: 'Last Run', type: 'string', value: 'never' }, + retries: { type: 'number', value: 2 }, + }, + }, + ({ vars }) => { + const start = trigger.start('Start', { inputFormat: [] }) + const query = table.queryRows( + 'Query', + { + tableId: raw({ $sim: 'unresolved', kind: 'table', id: 'tbl_deleted' }), + data: raw({ $sim: 'literal', value: { $sim: 'user data', n: 1 } }), + limit: raw({ + $sim: 'csv', + items: [ + { $sim: 'resource', kind: 'knowledge-document', key: 'a' }, + { $sim: 'unresolved', kind: 'knowledge-document', id: 'doc_9' }, + ], + }), + knowledgeBases: [kb('docs'), kb('faq')], + }, + { modes: { tableId: 'basic' } } + ) + const setVars = setVariables('Set vars', { + variables: [ + { variable: vars.retries, value: t`${vars.retries}` }, + { variable: vars.lastrun, value: t`${query.rows}` }, + ], + }) + + start.to(query) + query.to(setVars) + } +) diff --git a/packages/workflow-code/src/print/__golden__/router-routes.txt b/packages/workflow-code/src/print/__golden__/router-routes.txt new file mode 100644 index 00000000000..3292df4ff84 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/router-routes.txt @@ -0,0 +1,17 @@ +// @sim-sdk 1 +import { response, router, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: { amount: 'number', reason: 'string' } }) + const triage = router('Triage', { + context: t`${start.amount} for ${start.reason}`, + model: 'claude-sonnet-5-5', + routes: { small: 'Under $100, auto-approve', review: 'Needs a manager' }, + }) + const approve = response('Approve', {}) + const escalate = response('Escalate', {}) + + start.to(triage) + triage.small.to(approve) + triage.review.to(escalate) +}) diff --git a/packages/workflow-code/src/print/__golden__/string-escapes.txt b/packages/workflow-code/src/print/__golden__/string-escapes.txt new file mode 100644 index 00000000000..e53b30a5d05 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/string-escapes.txt @@ -0,0 +1,12 @@ +// @sim-sdk 1 +import { agent, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const escapes = agent('Escapes', { + model: "it's a \"model\" with 'quotes'", + messages: [{ role: 'user', content: "single 'quote' only" }], + systemPrompt: `back\\slash \`tick\` \${notInterp} tab here\r +crlf line\u2028ls\u2029ps \uD800 lone 漢字 🎉`, + }) +}) diff --git a/packages/workflow-code/src/print/__golden__/support-triage.txt b/packages/workflow-code/src/print/__golden__/support-triage.txt new file mode 100644 index 00000000000..32ee86211ea --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/support-triage.txt @@ -0,0 +1,75 @@ +// @sim-sdk 1 +import { + agent, + binding, + condition, + env, + js, + json, + picked, + response, + slack, + t, + table, + trigger, + workflow, +} from '@sim/workflow-sdk' + +export default workflow( + 'Support triage', + { + description: 'Classifies inbound tickets and routes them.', + variables: { escalations: { type: 'number', value: 0 } }, + }, + ({ vars }) => { + const ticketIn = trigger.webhook('Ticket in', { + requireAuth: true, + token: env.TICKETS_WEBHOOK_TOKEN, + inputFormat: { subject: 'string', body: 'string' }, + }) + const classify = agent('Classify', { + model: 'claude-sonnet-5-5', + messages: [ + { role: 'system', content: 'Classify support tickets.' }, + { + role: 'user', + content: t`${ticketIn.subject} + +${ticketIn.body}`, + }, + ], + temperature: 0.2, + }) + const byCategory = condition('By category', { + billing: js`${classify.content} === 'billing'`, + urgent: js`${classify.content}.includes("urgent") && ${vars.escalations} < 3`, + else: true, + }) + const logTicket = table.insertRow('Log ticket', { + tableId: table('tickets'), + data: json`{ + "subject": "${ticketIn.subject}" +}`, + }) + const notify = slack.sendMessage( + 'Notify', + { + authMethod: 'oauth', + credential: binding('support-slack'), + channel: picked('C0SUPPORT'), + text: t`New ${classify.content} ticket: ${ticketIn.subject}`, + }, + { errorPort: true } + ) + const reply = response('Reply', { dataMode: 'structured', builderData: { ok: true } }) + + ticketIn.to(classify) + classify.to(byCategory) + byCategory.billing.to(logTicket) + byCategory.urgent.to(notify) + byCategory.else.to(reply) + logTicket.to(notify) + logTicket.onError(notify) + notify.to(reply) + } +) diff --git a/packages/workflow-code/src/print/__golden__/templates-and-paths.txt b/packages/workflow-code/src/print/__golden__/templates-and-paths.txt new file mode 100644 index 00000000000..618e0bc5603 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/templates-and-paths.txt @@ -0,0 +1,21 @@ +// @sim-sdk 1 +import { agent, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const writer = agent('Writer', { + model: 'gpt-5.5', + messages: [ + { + role: 'user', + content: t`Items: ${start.items[0].id} / ${start.items['0']} / ${start['some-field']} / ${start.a.b} +next`, + }, + ], + systemPrompt: `Line one +Line two without refs`, + conversationId: start.conversationId, + }) + + start.to(writer) +}) diff --git a/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt b/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt new file mode 100644 index 00000000000..e3dbc423919 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt @@ -0,0 +1,24 @@ +// @sim-sdk 1 +import { binding, block, gmail, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const invoiceEmail = trigger.gmail.poller('Invoice email', { + credential: binding('finance-gmail'), + labelIds: ['INBOX'], + markAsRead: true, + }) + const oddTrigger = block( + 'gmail', + 'Odd trigger', + { selectedTriggerId: 'gmail_other', markAsRead: false }, + { triggerMode: true } + ) + const sendSummary = gmail.sendEmail('Send summary', { + credential: binding('finance-gmail'), + to: 'cfo@acme.test', + subject: 'Invoices', + body: invoiceEmail.email.body_text, + }) + + invoiceEmail.to(sendSummary) +}) diff --git a/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt b/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt new file mode 100644 index 00000000000..9eda842749c --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt @@ -0,0 +1,12 @@ +// @sim-sdk 1 +import { agent, env, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const html = agent('Html', { + model: '{{ not valid }}', + systemPrompt: t`
hello
${env.lower_ok} `, + }) + + start.to(html) +}) diff --git a/packages/workflow-code/src/print/determinism.test.ts b/packages/workflow-code/src/print/determinism.test.ts new file mode 100644 index 00000000000..0d09b20eb77 --- /dev/null +++ b/packages/workflow-code/src/print/determinism.test.ts @@ -0,0 +1,102 @@ +/** + * Print determinism over every golden case. Until the compiler lands this stands in for P3 + * (`print(compile(print(x))) === print(x)`): the same model prints the same bytes whatever the + * order of its records, the hints a print returns reproduce that print, and a one-param edit + * changes exactly one line. + */ + +import { describe, expect, it } from 'vitest' +import type { LockHints } from '../api' +import type { CanonicalWorkflow } from '../model' +import { cases } from './__fixtures__/cases' +import { catalog } from './__fixtures__/catalog' +import { printWorkflow } from './printer' + +/** A deep copy of plain data: every CWM value is JSON (`model.ts`). */ +function clone(value: T): T { + if (Array.isArray(value)) return value.map(clone) as T + if (value !== null && typeof value === 'object') { + return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, clone(item)])) as T + } + return value +} + +function print(workflow: CanonicalWorkflow, hints: LockHints | undefined) { + return printWorkflow({ workflow, catalog, hints, options: { functionCode: 'inline' } }) +} + +/** The same workflow with every record and list that has no semantic order reversed. */ +function reorder(workflow: CanonicalWorkflow): CanonicalWorkflow { + const copy = clone(workflow) + const reverseRecord = (record: Record) => + Object.fromEntries(Object.entries(record).reverse()) + copy.blocks = reverseRecord(copy.blocks) + for (const block of Object.values(copy.blocks)) { + block.params = reverseRecord(block.params) + block.modes = reverseRecord(block.modes) + } + copy.variables = reverseRecord(copy.variables) + copy.edges = [...copy.edges].reverse() + copy.annotations.inactive = reverseRecord(copy.annotations.inactive) + return copy +} + +const EDITABLE_TYPES = new Set(['short-input', 'long-input', 'combobox']) + +/** Every single-line, token-free text param a user could retype, as (block, param) pairs. */ +function editableParams(workflow: CanonicalWorkflow): Array<[string, string]> { + const pairs: Array<[string, string]> = [] + for (const block of Object.values(workflow.blocks)) { + const subBlocks = catalog.blocks[block.type]?.subBlocks ?? [] + for (const [id, param] of Object.entries(block.params)) { + if (param.kind !== 'value' || typeof param.value !== 'string') continue + if (!/^[\w .:/-]+$/.test(param.value)) continue + const subBlock = subBlocks.find((candidate) => candidate.id === id) + if (subBlock && !EDITABLE_TYPES.has(subBlock.type)) continue + pairs.push([block.key, id]) + } + } + return pairs +} + +describe('print determinism', () => { + it('has enough single-line text params across the cases to exercise one-line edits', () => { + const total = cases.reduce((sum, testCase) => sum + editableParams(testCase.workflow).length, 0) + expect(total).toBeGreaterThan(40) + }) + + for (const testCase of cases) { + describe(testCase.name, () => { + const first = printWorkflow({ + workflow: testCase.workflow, + catalog, + hints: testCase.hints, + options: { functionCode: 'inline' }, + }) + const text = first.files[0].text + + it('prints byte-identical text for a reordered copy of the same model', () => { + expect(print(reorder(testCase.workflow), testCase.hints).files[0].text).toBe(text) + }) + + it('reprints identically from the hints its own print returned', () => { + expect(print(clone(testCase.workflow), first.hints).files[0].text).toBe(text) + }) + + it('changes exactly one line when one text param is edited', () => { + for (const [blockKey, paramId] of editableParams(testCase.workflow)) { + const edited = clone(testCase.workflow) + const param = edited.blocks[blockKey]?.params[paramId] + if (param?.kind !== 'value' || typeof param.value !== 'string') continue + const last = param.value.at(-1) + param.value = `${param.value.slice(0, -1)}${last === 'q' ? 'z' : 'q'}` + const before = text.split('\n') + const after = print(edited, first.hints).files[0].text.split('\n') + expect(after.length, `${blockKey}.${paramId}`).toBe(before.length) + const changed = after.filter((lineText, index) => lineText !== before[index]) + expect(changed, `${blockKey}.${paramId}`).toHaveLength(1) + } + }) + }) + } +}) diff --git a/packages/workflow-code/src/print/golden.test.ts b/packages/workflow-code/src/print/golden.test.ts new file mode 100644 index 00000000000..57b550520f5 --- /dev/null +++ b/packages/workflow-code/src/print/golden.test.ts @@ -0,0 +1,99 @@ +import { describe, expect, it } from 'vitest' +import { cases } from './__fixtures__/cases' +import { catalog } from './__fixtures__/catalog' +import { type CodeFileCodec, createPrintWorkflow, printWorkflow } from './printer' + +const GOLDEN_DIR = './__golden__' + +/** A codec whose file form is the stored body itself, standing in for Wave 2D's bijection. */ +const identityCodec: CodeFileCodec = { + toFile: (code) => code, + fromFile: (text) => text, +} + +/** A codec whose round trip adds a byte: the printer must fall back to inline code. */ +const lossyCodec: CodeFileCodec = { + toFile: (code) => code, + fromFile: (text) => `${text}\n`, +} + +describe('printWorkflow golden files', () => { + for (const testCase of cases) { + it(`prints ${testCase.name}`, async () => { + const result = printWorkflow({ + workflow: testCase.workflow, + catalog, + hints: testCase.hints, + options: { functionCode: 'inline' }, + }) + expect(result.files).toHaveLength(1) + await expect(result.files[0].text).toMatchFileSnapshot(`${GOLDEN_DIR}/${testCase.name}.txt`) + }) + } + + it('reports the diagnostics each golden case produces', async () => { + const report = Object.fromEntries( + cases.map((testCase) => { + const { diagnostics } = printWorkflow({ + workflow: testCase.workflow, + catalog, + hints: testCase.hints, + options: { functionCode: 'inline' }, + }) + return [ + testCase.name, + diagnostics.map((d) => `${d.code} ${d.blockKey ?? '-'}: ${d.message}`), + ] + }) + ) + await expect(`${JSON.stringify(report, null, 2)}\n`).toMatchFileSnapshot( + `${GOLDEN_DIR}/diagnostics.json` + ) + }) + + it('writes function code to language files when the codec round-trips it', async () => { + const testCase = cases.find((c) => c.name === 'function-languages') + if (!testCase) throw new Error('missing case') + const result = createPrintWorkflow(identityCodec)({ + workflow: testCase.workflow, + catalog, + options: { functionCode: 'files', codeDir: 'functions' }, + }) + expect(result.files.map((file) => file.path)).toEqual([ + 'workflow.ts', + 'functions/js-code.js', + 'functions/py-code.py', + 'functions/sh-code.sh', + ]) + expect(result.files.slice(1).map((file) => file.text)).toEqual( + ['jscode', 'pycode', 'shcode'].map((key) => { + const param = testCase.workflow.blocks[key]?.params.code + return param?.kind === 'value' ? param.value : null + }) + ) + expect(result.hints.blocks.jscode?.codeFile).toBe('functions/js-code.js') + expect(result.diagnostics.filter((d) => d.code === 'W_CODE_FILE_INLINED')).toEqual([]) + await expect(result.files[0].text).toMatchFileSnapshot(`${GOLDEN_DIR}/function-files.txt`) + }) + + it('falls back to inline code with a warning when the codec round trip is lossy or absent', () => { + const testCase = cases.find((c) => c.name === 'function-languages') + if (!testCase) throw new Error('missing case') + const inline = printWorkflow({ + workflow: testCase.workflow, + catalog, + options: { functionCode: 'inline' }, + }) + for (const print of [createPrintWorkflow(lossyCodec), printWorkflow]) { + const result = print({ + workflow: testCase.workflow, + catalog, + options: { functionCode: 'files', codeDir: 'functions' }, + }) + expect(result.files).toHaveLength(1) + expect(result.files[0].text).toBe(inline.files[0].text) + const inlined = result.diagnostics.filter((d) => d.code === 'W_CODE_FILE_INLINED') + expect(inlined.map((d) => d.blockKey)).toEqual(['jscode', 'pycode', 'shcode']) + } + }) +}) From 9593a5fc297dffe9eaffc5aad15cfd245eaeb491 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:07:58 -0800 Subject: [PATCH 021/428] chore(workflow-code): check that golden prints are a biome fixed point --- package.json | 1 + scripts/check-workflow-code-golden.ts | 55 +++++++++++++++++++++++++++ 2 files changed, 56 insertions(+) create mode 100644 scripts/check-workflow-code-golden.ts diff --git a/package.json b/package.json index c47de135725..a99620be60a 100644 --- a/package.json +++ b/package.json @@ -71,6 +71,7 @@ "check:icon-path-precision": "bun run scripts/check-icon-path-precision.ts", "check:migrations": "bun run scripts/check-migrations-safety.ts", "check:native-typecheck": "bun run scripts/check-native-typecheck.ts", + "check:workflow-code-golden": "bun run scripts/check-workflow-code-golden.ts", "check:source-text": "bun run scripts/check-source-text.ts", "check:comment-hygiene": "bun run scripts/check-comment-hygiene.ts", "check:site-urls": "bun run scripts/check-site-urls.ts", diff --git a/scripts/check-workflow-code-golden.ts b/scripts/check-workflow-code-golden.ts new file mode 100644 index 00000000000..5fd4ba4cd3e --- /dev/null +++ b/scripts/check-workflow-code-golden.ts @@ -0,0 +1,55 @@ +#!/usr/bin/env bun +/** + * Asserts that every golden print of `@sim/workflow-code`'s printer is a Biome fixed point. + * + * The printer formats workflow source itself (s3 D8: no formatter runs at print time, so a print + * never depends on a formatter version and works in the browser). Its doc printer mirrors Biome's + * layout rules; if it drifts, every printed file churns the first time a user runs `bun run lint` + * on it. This runs `biome check --write` (format, organize imports, safe fixes) over each golden + * under `packages/workflow-code/src/print/__golden__/` and fails on any difference. + * + * To fix a failure, change the doc printer (`packages/workflow-code/src/print/`) until the golden + * it prints matches Biome's output, then refresh the goldens with + * `bun run --cwd packages/workflow-code test src/print -u`. Never edit a golden by hand. + */ +import { spawnSync } from 'node:child_process' +import { readdirSync, readFileSync } from 'node:fs' +import path from 'node:path' +import { fileURLToPath } from 'node:url' + +const ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '..') +const GOLDEN_DIR = path.join(ROOT, 'packages/workflow-code/src/print/__golden__') +const BIOME = path.join(ROOT, 'node_modules/.bin/biome') + +const goldens = readdirSync(GOLDEN_DIR) + .filter((name) => name.endsWith('.txt')) + .sort() + +if (goldens.length === 0) { + console.error(`No goldens found in ${GOLDEN_DIR}`) + process.exit(1) +} + +const failures: string[] = [] +for (const name of goldens) { + const text = readFileSync(path.join(GOLDEN_DIR, name), 'utf8') + const result = spawnSync( + BIOME, + [ + 'check', + '--write', + `--config-path=${path.join(ROOT, 'biome.json')}`, + '--stdin-file-path=golden.ts', + ], + { input: text, encoding: 'utf8', cwd: ROOT } + ) + if (result.status !== 0 || result.stdout !== text) { + failures.push(`${name}${result.stderr ? `\n${result.stderr.trim()}` : ''}`) + } +} + +if (failures.length > 0) { + console.error(`Golden prints that are not a Biome fixed point:\n${failures.join('\n')}`) + process.exit(1) +} +console.log(`${goldens.length} workflow-code goldens are Biome fixed points`) From 922bd9b005dd7659cf4ebad070a70d9e0aa36a5d Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:08:31 -0800 Subject: [PATCH 022/428] feat(workflow-code): export printWorkflow --- packages/workflow-code/src/index.ts | 6 ++++++ packages/workflow-code/src/print/index.ts | 6 ++++++ 2 files changed, 12 insertions(+) create mode 100644 packages/workflow-code/src/print/index.ts diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index adb17b5223d..2e2fa2cf052 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -124,4 +124,10 @@ export type { VarNode, WorkflowAnnotations, } from './model' +export { + type CodeFileCodec, + type CodeLanguage, + createPrintWorkflow, + printWorkflow, +} from './print' export { GENERIC_BUILDER, SDK_CORE_EXPORTS, SDK_RESERVED_IDENTIFIERS } from './sdk' diff --git a/packages/workflow-code/src/print/index.ts b/packages/workflow-code/src/print/index.ts new file mode 100644 index 00000000000..680575a713a --- /dev/null +++ b/packages/workflow-code/src/print/index.ts @@ -0,0 +1,6 @@ +export { + type CodeFileCodec, + type CodeLanguage, + createPrintWorkflow, + printWorkflow, +} from './printer' From f3a46899eb7916b47fce8936a8d3753fffab75e3 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:10:14 -0800 Subject: [PATCH 023/428] refactor(workflow-code): keep printer helpers module-private --- packages/workflow-code/src/print/__fixtures__/cases.ts | 6 +++--- packages/workflow-code/src/print/doc.ts | 2 +- packages/workflow-code/src/print/idents.ts | 2 +- packages/workflow-code/src/print/refs.ts | 2 +- packages/workflow-code/src/print/syntax.ts | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/workflow-code/src/print/__fixtures__/cases.ts b/packages/workflow-code/src/print/__fixtures__/cases.ts index e89e9b8cabe..7e323ece03f 100644 --- a/packages/workflow-code/src/print/__fixtures__/cases.ts +++ b/packages/workflow-code/src/print/__fixtures__/cases.ts @@ -30,7 +30,7 @@ type BlockInit = Partial } -export function blk(name: string, type: string, init: BlockInit = {}): CanonicalBlock { +function blk(name: string, type: string, init: BlockInit = {}): CanonicalBlock { const { params = {}, tools = {}, ...rest } = init const canonicalParams: Record = {} for (const [id, value] of Object.entries(params)) canonicalParams[id] = { kind: 'value', value } @@ -53,7 +53,7 @@ export function blk(name: string, type: string, init: BlockInit = {}): Canonical } } -export function edge(from: string, to: string, port: Port = { kind: 'out' }): CanonicalEdge { +function edge(from: string, to: string, port: Port = { kind: 'out' }): CanonicalEdge { return { from, port, to } } @@ -67,7 +67,7 @@ interface WorkflowInit { comments?: Array<[AnchorKey, CodeComment[]]> } -export function wf(init: WorkflowInit): CanonicalWorkflow { +function wf(init: WorkflowInit): CanonicalWorkflow { return { modelVersion: 1, meta: { name: init.name ?? 'Fixture', description: init.description ?? null }, diff --git a/packages/workflow-code/src/print/doc.ts b/packages/workflow-code/src/print/doc.ts index 638f5b8b206..87340ea6ae1 100644 --- a/packages/workflow-code/src/print/doc.ts +++ b/packages/workflow-code/src/print/doc.ts @@ -25,7 +25,7 @@ const literalLineOnly: Doc = { type: 'line', soft: false, hard: true, literal: t export const breakParent: Doc = { type: 'breakParent' } export const hardline: Doc = [hardLineOnly, breakParent] /** A newline that resets the column to 0: template-literal content is never re-indented. */ -export const literalline: Doc = [literalLineOnly, breakParent] +const literalline: Doc = [literalLineOnly, breakParent] export function group(contents: Doc, options: { shouldBreak?: boolean } = {}): Doc { return { type: 'group', contents, break: options.shouldBreak === true } diff --git a/packages/workflow-code/src/print/idents.ts b/packages/workflow-code/src/print/idents.ts index ada2f65e754..c61d7a660e8 100644 --- a/packages/workflow-code/src/print/idents.ts +++ b/packages/workflow-code/src/print/idents.ts @@ -3,7 +3,7 @@ import { SDK_RESERVED_IDENTIFIERS } from '../sdk' import { isIdentifierName } from './strings' /** `'Classify ticket'` → `classifyTicket`; non-ASCII and punctuation split words. */ -export function deriveIdentifier(name: string): string { +function deriveIdentifier(name: string): string { const words = name.split(/[^A-Za-z0-9]+/).filter((word) => word.length > 0) if (words.length === 0) return 'block' const [first = '', ...rest] = words diff --git a/packages/workflow-code/src/print/refs.ts b/packages/workflow-code/src/print/refs.ts index e38018aa30c..7280f2241c0 100644 --- a/packages/workflow-code/src/print/refs.ts +++ b/packages/workflow-code/src/print/refs.ts @@ -41,7 +41,7 @@ interface ParsedPath { } /** Splits `head.a[0].b-c` into a head and exact segments; `null` when the grammar does not fit. */ -export function parseRefPath(inner: string): ParsedPath | null { +function parseRefPath(inner: string): ParsedPath | null { const headMatch = /^[^.[\]]+/.exec(inner) if (!headMatch) return null const head = headMatch[0] diff --git a/packages/workflow-code/src/print/syntax.ts b/packages/workflow-code/src/print/syntax.ts index e6690f0f40d..2022c0029bc 100644 --- a/packages/workflow-code/src/print/syntax.ts +++ b/packages/workflow-code/src/print/syntax.ts @@ -21,7 +21,7 @@ import { } from './doc' /** The syntactic shape of a printed expression, which drives Biome's layout choices. */ -export type ExprShape = +type ExprShape = | 'string' | 'template' | 'number' @@ -136,7 +136,7 @@ export function arrayExpr(elements: Expr[]): Expr { } /** Call arguments with Biome's last-argument hugging (`fn('Name', {` … `})`). */ -export function callArgs(args: Expr[]): Doc { +function callArgs(args: Expr[]): Doc { if (args.length === 0) return '()' const docs = args.map((arg) => arg.doc) const separated: Doc[] = [] From 436683a070a7e23e63a6dc7ec0c39fd59698957a Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:10:51 -0800 Subject: [PATCH 024/428] feat(workflow-code): add the P4 oracle, per-property oracle names and an incomplete report status --- packages/workflow-code/src/proof/diff.ts | 3 +- packages/workflow-code/src/proof/index.ts | 1 + packages/workflow-code/src/proof/oracles.ts | 28 +++++++++- .../workflow-code/src/proof/report.test.ts | 55 +++++++++++++++++++ packages/workflow-code/src/proof/report.ts | 6 +- 5 files changed, 87 insertions(+), 6 deletions(-) create mode 100644 packages/workflow-code/src/proof/report.test.ts diff --git a/packages/workflow-code/src/proof/diff.ts b/packages/workflow-code/src/proof/diff.ts index a73e8e4b1c7..a273002d353 100644 --- a/packages/workflow-code/src/proof/diff.ts +++ b/packages/workflow-code/src/proof/diff.ts @@ -1,4 +1,5 @@ import { isRecordLike } from '@sim/utils/object' +import { truncate } from '@sim/utils/string' /** * Exact structural differences between two JSON-like values, reported as RFC 6901 paths so a @@ -32,7 +33,7 @@ function preview(value: unknown): string { text = String(value) } } - return text.length > PREVIEW_LIMIT ? `${text.slice(0, PREVIEW_LIMIT)}…` : text + return truncate(text, PREVIEW_LIMIT, '…') } function kindOf(value: unknown): string { diff --git a/packages/workflow-code/src/proof/index.ts b/packages/workflow-code/src/proof/index.ts index 4328d509adc..71603fc8e85 100644 --- a/packages/workflow-code/src/proof/index.ts +++ b/packages/workflow-code/src/proof/index.ts @@ -17,6 +17,7 @@ export { export { type Difference, findDifferences, firstTextDifference } from './diff' export { alignWorkflowIds, + assertNoErrors, assertNoopIdentity, decodeStructured, type ExecutionParityInput, diff --git a/packages/workflow-code/src/proof/oracles.ts b/packages/workflow-code/src/proof/oracles.ts index a9f776f0de4..295794e2fc6 100644 --- a/packages/workflow-code/src/proof/oracles.ts +++ b/packages/workflow-code/src/proof/oracles.ts @@ -15,7 +15,8 @@ import { normalizeWorkflowBlockName, type WorkflowState } from '@sim/workflow-ty import type { CanonicalWorkflow } from '../model' import { type Difference, findDifferences, firstTextDifference } from './diff' -export type OracleName = 'O1' | 'O2' | 'O3' | 'P3' +/** The property or oracle a verdict belongs to (s3 §5 P1–P5, s1 §6 O1–O3). */ +export type OracleName = 'P1' | 'P2' | 'P3' | 'P4' | 'P5' | 'O1' | 'O2' | 'O3' export type OracleResult = | { ok: true; oracle: OracleName } @@ -43,7 +44,7 @@ export function assertNoopIdentity(input: { * given (for CWMs, `canonicalEquals`), else exactly. */ export function idempotence(input: { - oracle: 'O3' | 'P3' + oracle: 'P1' | 'P3' | 'P5' | 'O3' value: T step: (value: T) => T equals?: (expected: T, actual: T) => boolean @@ -103,6 +104,8 @@ export interface ExecutionParityInput { candidate: WorkflowState serialize: (state: WorkflowState) => SerializedWorkflowLike hasWorkflowChanged: (current: WorkflowState, deployed: WorkflowState) => boolean + /** `P2` when the candidate went through print and compile too. Default `O2`. */ + oracle?: 'O2' | 'P2' } /** @@ -124,7 +127,26 @@ export function executionParity(input: ExecutionParityInput): OracleResult { actual: 'true', }) } - return verdict('O2', differences) + return verdict(input.oracle ?? 'O2', differences) +} + +/** + * P4: printed code compiles with zero errors (s3 D12). Warnings and info do not count; each error + * is reported by code and message. + */ +export function assertNoErrors( + diagnostics: ReadonlyArray<{ code: string; severity: string; message: string }> +): OracleResult { + return verdict( + 'P4', + diagnostics + .filter((diagnostic) => diagnostic.severity === 'error') + .map((diagnostic) => ({ + path: diagnostic.code, + kind: 'value' as const, + actual: diagnostic.message, + })) + ) } function executionView(serialized: SerializedWorkflowLike) { diff --git a/packages/workflow-code/src/proof/report.test.ts b/packages/workflow-code/src/proof/report.test.ts new file mode 100644 index 00000000000..4cf665ae0aa --- /dev/null +++ b/packages/workflow-code/src/proof/report.test.ts @@ -0,0 +1,55 @@ +import { describe, expect, it } from 'vitest' +import { createProofReport, reportPathVariable } from './report' + +describe('createProofReport', () => { + it('computes parity per block type from decided outcomes only', () => { + const report = createProofReport('roundtrip-corpus') + report.record({ + caseId: 'a', + blockTypes: ['slack', 'start_trigger'], + property: 'P1', + status: 'passed', + }) + report.record({ caseId: 'b', blockTypes: ['slack'], property: 'P1', status: 'failed' }) + report.record({ caseId: 'c', blockTypes: ['slack'], property: 'P1', status: 'skipped' }) + report.record({ + caseId: 'd', + blockTypes: ['slack', 'slack'], + property: 'P1', + status: 'errored', + }) + const built = report.build({ generatedAt: 'now' }) + expect(built.parity.slack?.P1).toEqual({ + passed: 1, + failed: 1, + skipped: 1, + errored: 1, + rate: 1 / 3, + }) + expect(built.parity.start_trigger?.P1?.rate).toBe(1) + expect(built.status).toBe('failed') + expect(built.caseCount).toBe(4) + expect(built.failures.map((f) => f.caseId)).toEqual(['b', 'd']) + }) + + it('reports a run with a skipped property as incomplete, never passed', () => { + const report = createProofReport('roundtrip-corpus') + report.record({ caseId: 'a', blockTypes: ['agent'], property: 'O1', status: 'passed' }) + report.skipProperty('P1', 'missing @sim/workflow-code#printWorkflow') + expect(report.build({ generatedAt: 'now' }).status).toBe('incomplete') + }) + + it('caps the failure list and counts the overflow', () => { + const report = createProofReport('s', { failureLimit: 2 }) + for (const id of ['a', 'b', 'c']) { + report.record({ caseId: id, blockTypes: [], property: 'O2', status: 'failed' }) + } + const built = report.build({ generatedAt: 'now' }) + expect(built.failures).toHaveLength(2) + expect(built.truncatedFailures).toBe(1) + }) + + it('derives the report path variable from the suite name', () => { + expect(reportPathVariable('roundtrip-corpus')).toBe('ROUNDTRIP_CORPUS_REPORT_PATH') + }) +}) diff --git a/packages/workflow-code/src/proof/report.ts b/packages/workflow-code/src/proof/report.ts index b359b0d716d..b82f18ef5d5 100644 --- a/packages/workflow-code/src/proof/report.ts +++ b/packages/workflow-code/src/proof/report.ts @@ -40,7 +40,8 @@ export interface BlockTypeParity extends Tally { export interface ProofReport { suite: string - status: 'passed' | 'failed' + /** `incomplete` when nothing failed but some property was skipped wholesale. */ + status: 'passed' | 'failed' | 'incomplete' generatedAt: string caseCount: number totals: Record @@ -109,7 +110,8 @@ export function createProofReport( return { suite, - status: failures.length === 0 ? 'passed' : 'failed', + status: + failures.length > 0 ? 'failed' : skippedProperties.length > 0 ? 'incomplete' : 'passed', generatedAt, caseCount: cases.size, totals, From 6616974fbdb8177bc5d8bb330b6d133257ce57a3 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:10:52 -0800 Subject: [PATCH 025/428] feat(workflows): generate a pairwise round-trip corpus from the block registry --- apps/sim/lib/workflows/code/corpus/blocks.ts | 171 +++++ .../workflows/code/corpus/generate.test.ts | 156 ++++ .../sim/lib/workflows/code/corpus/generate.ts | 705 ++++++++++++++++++ apps/sim/lib/workflows/code/corpus/index.ts | 5 + apps/sim/lib/workflows/code/corpus/values.ts | 292 ++++++++ 5 files changed, 1329 insertions(+) create mode 100644 apps/sim/lib/workflows/code/corpus/blocks.ts create mode 100644 apps/sim/lib/workflows/code/corpus/generate.test.ts create mode 100644 apps/sim/lib/workflows/code/corpus/generate.ts create mode 100644 apps/sim/lib/workflows/code/corpus/index.ts create mode 100644 apps/sim/lib/workflows/code/corpus/values.ts diff --git a/apps/sim/lib/workflows/code/corpus/blocks.ts b/apps/sim/lib/workflows/code/corpus/blocks.ts new file mode 100644 index 00000000000..01c59e450ae --- /dev/null +++ b/apps/sim/lib/workflows/code/corpus/blocks.ts @@ -0,0 +1,171 @@ +/** + * Builds one stored block for a corpus case from its registry config, the way the editor would + * have persisted it: every declared subBlock present as `{ id, type, value }` (later declarations + * of a duplicated id set the type, as `createBlockFromParams` does), visible fields filled by + * type, hidden ones `null`, and `data.canonicalModes` explicit for every pair. + */ + +import type { SeededRandom } from '@sim/workflow-code/proof' +import { + type FillContext, + fillSubBlockValue, + isWritableSubBlock, +} from '@/lib/workflows/code/corpus/values' +import { + buildCanonicalIndexForSurface, + buildDefaultCanonicalModes, + evaluateSubBlockCondition, + isCanonicalPair, + withCanonicalModes, +} from '@/lib/workflows/subblocks/visibility' +import type { BlockConfig, SubBlockConfig } from '@/blocks/types' +import type { BlockState, SubBlockState } from '@/stores/workflows/workflow/types' +import { TRIGGER_RUNTIME_SUBBLOCK_IDS } from '@/triggers/constants' + +export type PairMode = 'basic' | 'advanced' + +interface BlockFixtureInput { + config: BlockConfig + id: string + name: string + rng: SeededRandom + newId: () => string + toolType: FillContext['toolType'] + /** The stored `triggerMode` flag. */ + triggerMode: boolean + operation?: string + triggerId?: string + /** The effective member of every basic/advanced pair. */ + pairMode: PairMode + /** The block-level advanced toggle; when on, standalone advanced fields are filled. */ + advancedMode: boolean + /** Fill standalone advanced fields even with `advancedMode` off (s1 D3: they still serialize). */ + fillStandaloneAdvanced?: boolean + parentId?: string + position?: { x: number; y: number } +} + +export interface BlockFixture { + block: BlockState + /** Subblock ids that received a corpus value, in declaration order. */ + filled: string[] +} + +const TRIGGER_MODES = new Set(['trigger', 'trigger-advanced']) + +/** Whether a subBlock belongs to the surface (action or trigger) this block is stored on. */ +export function isOnSurface( + subBlock: SubBlockConfig, + config: BlockConfig, + triggerSurface: boolean +) { + if (config.category === 'triggers') return true + return triggerSurface === TRIGGER_MODES.has(subBlock.mode ?? 'both') +} + +export function isStandaloneAdvanced(subBlock: SubBlockConfig): boolean { + return ( + (subBlock.mode === 'advanced' || subBlock.mode === 'trigger-advanced') && + !subBlock.canonicalParamId + ) +} + +/** Visible under `values`; a condition that throws counts as hidden. */ +export function isVisible(subBlock: SubBlockConfig, values: Record): boolean { + try { + return evaluateSubBlockCondition(subBlock.condition, values) + } catch { + return false + } +} + +export function buildBlockFixture(input: BlockFixtureInput): BlockFixture { + const { config } = input + const triggerSurface = input.triggerMode || config.category === 'triggers' + const index = buildCanonicalIndexForSurface(config.subBlocks, triggerSurface) + const canonicalModes = Object.fromEntries( + Object.keys(buildDefaultCanonicalModes(config.subBlocks)).map((id) => [id, input.pairMode]) + ) + + const values: Record = {} + if (input.operation !== undefined) values.operation = input.operation + if (input.triggerId !== undefined) values.selectedTriggerId = input.triggerId + + const subBlocks: Record = {} + const filled: string[] = [] + const ctx: FillContext = { rng: input.rng, values, newId: input.newId, toolType: input.toolType } + + for (const subBlock of config.subBlocks) { + const existing = subBlocks[subBlock.id] + if (existing) { + existing.type = subBlock.type + if (existing.value !== null) continue + } + + const value = valueFor(subBlock, input, index, triggerSurface, canonicalModes, ctx) + subBlocks[subBlock.id] = { + id: subBlock.id, + type: subBlock.type, + value: value as SubBlockState['value'], + } + if (value !== null && value !== undefined) { + values[subBlock.id] = value + if (!filled.includes(subBlock.id)) filled.push(subBlock.id) + } + } + + const data: NonNullable = {} + if (input.parentId) { + data.parentId = input.parentId + data.extent = 'parent' + } + if (Object.keys(canonicalModes).length > 0) data.canonicalModes = canonicalModes + + return { + block: { + id: input.id, + type: config.type, + name: input.name, + position: input.position ?? { x: 0, y: 0 }, + subBlocks, + outputs: {}, + enabled: true, + horizontalHandles: true, + advancedMode: input.advancedMode, + triggerMode: input.triggerMode, + height: 0, + data, + locked: false, + }, + filled, + } +} + +function valueFor( + subBlock: SubBlockConfig, + input: BlockFixtureInput, + index: ReturnType, + triggerSurface: boolean, + canonicalModes: Record, + ctx: FillContext +): unknown { + if (TRIGGER_RUNTIME_SUBBLOCK_IDS.includes(subBlock.id)) return null + if (!isOnSurface(subBlock, input.config, triggerSurface)) return null + if (subBlock.id === 'operation' && input.operation !== undefined) return input.operation + if (subBlock.id === 'selectedTriggerId' && input.triggerId !== undefined) return input.triggerId + if (!isVisible(subBlock, withCanonicalModes(ctx.values, canonicalModes))) return null + + const canonicalId = index.canonicalIdBySubBlockId[subBlock.id] + const group = canonicalId ? index.groupsById[canonicalId] : undefined + if (group && isCanonicalPair(group)) { + const isBasic = group.basicId === subBlock.id + if (input.pairMode === 'basic' ? !isBasic : isBasic) return null + } else if (isStandaloneAdvanced(subBlock)) { + if (!input.advancedMode && !input.fillStandaloneAdvanced) return null + } + + if (!isWritableSubBlock(subBlock) || subBlock.hidden) { + return subBlock.defaultValue === undefined ? null : structuredClone(subBlock.defaultValue) + } + return fillSubBlockValue(subBlock, ctx) +} diff --git a/apps/sim/lib/workflows/code/corpus/generate.test.ts b/apps/sim/lib/workflows/code/corpus/generate.test.ts new file mode 100644 index 00000000000..fedc8d13059 --- /dev/null +++ b/apps/sim/lib/workflows/code/corpus/generate.test.ts @@ -0,0 +1,156 @@ +/** + * The corpus is only proof if its fixtures are states the product could have stored. These + * properties hold over the whole real registry: every block type yields a fixture, every fixture + * passes the existing workflow and per-value validators, free text carries the adversarial + * payload, and the corpus is a pure function of the seed. + */ +import { describe, expect, it, vi } from 'vitest' + +vi.unmock('@/blocks/registry') +vi.unmock('@/tools/registry') + +import { + CORPUS_TEXT, + CORPUS_TEXT_MARKERS, + type CorpusCase, + generateRegistryCorpus, +} from '@/lib/workflows/code/corpus' +import { + validateSourceHandleForBlock, + validateValueForSubBlockType, +} from '@/lib/workflows/editing/validation' +import { validateWorkflowState } from '@/lib/workflows/sanitization/validation' +import { getBlockRegistry } from '@/blocks/registry' + +const corpus = generateRegistryCorpus() +const known = corpus.filter((c) => !c.unknownTypes) + +function valueProblems(corpusCase: CorpusCase): string[] { + const problems: string[] = [] + for (const block of Object.values(corpusCase.state.blocks)) { + const config = getBlockRegistry()[block.type] + if (!config) continue + for (const [id, subBlock] of Object.entries(block.subBlocks)) { + if (subBlock.value === null) continue + const declarations = config.subBlocks.filter((s) => s.id === id) + if (declarations.length === 0) { + problems.push(`${block.type}.${id}: not declared`) + continue + } + const results = declarations.map((declared) => + validateValueForSubBlockType(declared, subBlock.value, id, block.type, block.id) + ) + if (!results.some((result) => result.valid)) { + problems.push(`${block.type}.${id}: ${results[0]?.error?.error}`) + } + } + } + for (const edge of corpusCase.state.edges) { + const source = corpusCase.state.blocks[edge.source] + if (!source) continue + const implicitHandle = edge.sourceHandle === `condition-${source.id}-if` + if (corpusCase.storedQuirk === 'implicit-branch-handle' && implicitHandle) continue + const result = validateSourceHandleForBlock(edge.sourceHandle ?? 'source', source.type, source) + if (!result.valid) problems.push(`edge ${edge.sourceHandle}: ${result.error}`) + } + return problems +} + +describe('generateRegistryCorpus', () => { + it('yields at least one fixture for every registered block type', () => { + const covered = new Set(corpus.flatMap((c) => c.blockTypes)) + const missing = Object.keys(getBlockRegistry()).filter((type) => !covered.has(type)) + expect(missing).toEqual([]) + }) + + it('gives every case a unique id', () => { + expect(new Set(corpus.map((c) => c.id)).size).toBe(corpus.length) + }) + + it('passes validateWorkflowState for every known-type fixture', () => { + const failures = known.flatMap((c) => { + const result = validateWorkflowState(c.state) + return result.valid ? [] : [`${c.id}: ${result.errors.join('; ')}`] + }) + expect(failures).toEqual([]) + }) + + it('rejects only the unknown types in unknown-type fixtures', () => { + const unknown = corpus.filter((c) => c.unknownTypes) + expect(unknown.length).toBeGreaterThan(0) + for (const c of unknown) { + const { errors } = validateWorkflowState(c.state) + expect(errors.length).toBeGreaterThan(0) + expect(errors.every((e) => e.includes('unknown block type'))).toBe(true) + } + }) + + it('stores only values the editor validators accept, on handles they accept', () => { + const failures = known.flatMap((c) => valueProblems(c).map((p) => `${c.id}: ${p}`)) + expect(failures.slice(0, 20)).toEqual([]) + }) + + it('carries every payload marker in each free-text value', () => { + const texts = known.flatMap((c) => + Object.values(c.state.blocks).flatMap((block) => { + const config = getBlockRegistry()[block.type] + return Object.values(block.subBlocks).flatMap((s) => { + if (s.type !== 'short-input' && s.type !== 'long-input') return [] + if (typeof s.value !== 'string') return [] + const declarations = config?.subBlocks.filter((declared) => declared.id === s.id) ?? [] + const freeText = declarations.every( + (declared) => declared.type === 'short-input' || declared.type === 'long-input' + ) + const isDeclaredDefault = declarations.some( + (declared) => declared.defaultValue === s.value + ) + return freeText && !isDeclaredDefault ? [s.value] : [] + }) + }) + ) + expect(texts.length).toBeGreaterThan(1000) + for (const text of new Set(texts)) { + for (const marker of CORPUS_TEXT_MARKERS) expect(text).toContain(marker) + } + expect(texts.every((t) => t === CORPUS_TEXT)).toBe(true) + }) + + it('covers every pairwise dimension the proof needs', () => { + const kinds = new Set(corpus.map((c) => c.kind)) + for (const kind of [ + 'operation', + 'trigger', + 'standalone-advanced', + 'error-edge', + 'branches', + 'name-collision', + 'subflow', + 'input-format', + 'variables', + 'unknown-type', + ]) { + expect(kinds).toContain(kind) + } + expect(corpus.some((c) => c.id.endsWith(':advanced'))).toBe(true) + expect(corpus.some((c) => c.id === 'branches:condition:null-rows')).toBe(true) + const toolLists = known.flatMap((c) => + Object.values(c.state.blocks).flatMap((b) => { + const tools = b.subBlocks.tools?.value + return b.subBlocks.tools?.type === 'tool-input' && Array.isArray(tools) ? [tools] : [] + }) + ) + expect(toolLists.length).toBeGreaterThan(0) + for (const tools of toolLists) { + const types = tools.map((t) => (t as { type?: string }).type) + expect(types.length).toBe(2) + expect(types[0]).toBe(types[1]) + } + }) + + it('is a pure function of the seed', () => { + expect(generateRegistryCorpus()).toEqual(corpus) + const reseeded = generateRegistryCorpus({ seed: 1 }) + expect(reseeded.map((c) => c.id)).toEqual(corpus.map((c) => c.id)) + expect(reseeded).not.toEqual(corpus) + }) +}) diff --git a/apps/sim/lib/workflows/code/corpus/generate.ts b/apps/sim/lib/workflows/code/corpus/generate.ts new file mode 100644 index 00000000000..61123b5e709 --- /dev/null +++ b/apps/sim/lib/workflows/code/corpus/generate.ts @@ -0,0 +1,705 @@ +/** + * The generated round-trip corpus over the real block registry (s3 §5 corpus 1, s1 §6). Each case + * is one stored `WorkflowState` with an upstream `start` trigger. Coverage is pairwise, not + * cartesian: + * + * - every block type × every option of its `operation` dropdown, each in all-basic and (when that + * operation shows a canonical pair) all-advanced, the latter with the advanced toggle on; + * - trigger mode for every trigger the block hosts; + * - a standalone advanced field holding a value with the advanced toggle off; + * - an error edge out of every block that can have one; + * - tool-input lists with two tools of one type (every tool-input field); + * - structural cases: condition/router title variants, `null` rows and 3+ branches, legacy + * normalized-name collisions, every loop and parallel type including nesting, inputFormat + * fields with duplicate and empty names, workflow variables, and stored types the registry does + * not know (retired and custom blocks), which must still print and compile (contract + * amendment 6). + * + * Deterministic: each case draws from a PRNG seeded by `(seed, case id)`, so the corpus is the + * same on every machine and adding a block does not reshuffle the others. + */ + +import { createSeededRandom, type SeededRandom } from '@sim/workflow-code/proof' +import { + type BlockFixture, + buildBlockFixture, + isOnSurface, + isStandaloneAdvanced, + isVisible, + type PairMode, +} from '@/lib/workflows/code/corpus/blocks' +import { + CORPUS_START_NAME, + CORPUS_TEXT, + CORPUS_VARIABLE_NAME, + resolveOptions, +} from '@/lib/workflows/code/corpus/values' +import { hasTriggerCapability } from '@/lib/workflows/triggers/utils' +import { getBlockRegistry } from '@/blocks/registry' +import type { BlockConfig } from '@/blocks/types' +import type { BlockState, Loop, Parallel, WorkflowState } from '@/stores/workflows/workflow/types' + +type CorpusCaseKind = + | 'operation' + | 'trigger' + | 'standalone-advanced' + | 'error-edge' + | 'branches' + | 'name-collision' + | 'subflow' + | 'input-format' + | 'variables' + | 'unknown-type' + +export interface CorpusCase { + /** Stable and unique: `::`. */ + id: string + kind: CorpusCaseKind + /** Every block type in `state`, sorted, for per-type parity. */ + blockTypes: string[] + state: WorkflowState + /** + * True for cases whose types the registry does not know. They still must print and compile, + * but `validateWorkflowState` rejects them by design. + */ + unknownTypes?: true + /** + * A stored shape the editor's write-time validators refuse but real workflows hold: + * `implicit-branch-handle` is an edge on `condition--if` while the rows were never + * persisted (s1 quirk 7, contract amendment 7). + */ + storedQuirk?: 'implicit-branch-handle' +} + +interface CorpusOptions { + seed?: number + /** Defaults to every registered block type, legacy versions included. */ + blocks?: BlockConfig[] +} + +const DEFAULT_CORPUS_SEED = 20261115 + +function hashString(text: string): number { + let hash = 0x811c9dc5 + for (let i = 0; i < text.length; i++) { + hash ^= text.charCodeAt(i) + hash = Math.imul(hash, 0x01000193) + } + return hash >>> 0 +} + +/** Accumulates one case's blocks, edges and subflows with ids from the case's PRNG. */ +class CaseBuilder { + readonly rng: SeededRandom + readonly blocks: Record = {} + readonly edges: WorkflowState['edges'] = [] + readonly loops: Record = {} + readonly parallels: Record = {} + private column = 0 + + constructor( + seed: number, + readonly id: string + ) { + this.rng = createSeededRandom((seed ^ hashString(id)) >>> 0) + } + + newId = (): string => this.rng.uuid() + + nextPosition() { + this.column += 1 + return { x: this.column * 320, y: 0 } + } + + add(block: BlockState): string { + this.blocks[block.id] = block + const parentId = block.data?.parentId + if (parentId) { + const container = this.loops[parentId] ?? this.parallels[parentId] + container?.nodes.push(block.id) + } + return block.id + } + + connect(source: string, target: string, sourceHandle = 'source') { + this.edges.push({ + id: this.newId(), + source, + target, + sourceHandle, + targetHandle: 'target', + type: 'default', + data: {}, + }) + } + + build( + kind: CorpusCaseKind, + extras: Pick = {} + ): CorpusCase { + const variableId = this.newId() + const state: WorkflowState = { + blocks: this.blocks, + edges: this.edges, + loops: this.loops, + parallels: this.parallels, + variables: { + [variableId]: { + id: variableId, + name: CORPUS_VARIABLE_NAME, + type: 'string', + value: CORPUS_TEXT, + }, + }, + } + const blockTypes = [...new Set(Object.values(this.blocks).map((b) => b.type))].sort() + return { id: this.id, kind, blockTypes, state, ...extras } + } +} + +interface Registry { + byType: Map + toolType: { type: string; operations: string[] } | null +} + +function operationsOf(config: BlockConfig): string[] { + const operation = config.subBlocks.find((s) => s.id === 'operation' && s.type === 'dropdown') + if (!operation) return [] + return (resolveOptions(operation, {}) ?? []).map((option) => option.id) +} + +function startBlock(builder: CaseBuilder, registry: Registry, inputFormat?: unknown[]): string { + const config = registry.byType.get('start_trigger') + if (!config) throw new Error('The registry has no start_trigger block') + const fixture = buildBlockFixture({ + config, + id: builder.newId(), + name: CORPUS_START_NAME, + rng: builder.rng, + newId: builder.newId, + toolType: registry.toolType, + triggerMode: false, + pairMode: 'basic', + advancedMode: false, + position: { x: 0, y: 0 }, + }) + const inputFormatState = fixture.block.subBlocks.inputFormat + if (inputFormat && inputFormatState) { + inputFormatState.value = inputFormat as typeof inputFormatState.value + } + return builder.add(fixture.block) +} + +interface SubjectOptions { + triggerMode?: boolean + operation?: string + triggerId?: string + pairMode?: PairMode + advancedMode?: boolean + fillStandaloneAdvanced?: boolean + parentId?: string + name?: string +} + +function subject( + builder: CaseBuilder, + registry: Registry, + config: BlockConfig, + options: SubjectOptions = {} +): BlockFixture { + const fixture = buildBlockFixture({ + config, + id: builder.newId(), + name: options.name ?? config.name, + rng: builder.rng, + newId: builder.newId, + toolType: registry.toolType, + triggerMode: options.triggerMode ?? false, + operation: options.operation, + triggerId: options.triggerId, + pairMode: options.pairMode ?? 'basic', + advancedMode: options.advancedMode ?? false, + fillStandaloneAdvanced: options.fillStandaloneAdvanced, + parentId: options.parentId, + position: builder.nextPosition(), + }) + builder.add(fixture.block) + return fixture +} + +/** Whether nothing may connect into blocks of this config in this mode. */ +function isTriggerOnly(config: BlockConfig, triggerMode: boolean): boolean { + return triggerMode || config.category === 'triggers' +} + +function canConnect(config: BlockConfig): boolean { + return config.type !== 'note' +} + +function hasVisiblePair( + config: BlockConfig, + operation: string | undefined, + triggerSurface: boolean +) { + const values = operation === undefined ? {} : { operation } + const counts = new Map() + for (const subBlock of config.subBlocks) { + if (!subBlock.canonicalParamId) continue + if (!isOnSurface(subBlock, config, triggerSurface) || !isVisible(subBlock, values)) continue + counts.set(subBlock.canonicalParamId, (counts.get(subBlock.canonicalParamId) ?? 0) + 1) + } + return [...counts.values()].some((n) => n > 1) +} + +function blockCases(config: BlockConfig, registry: Registry, seed: number): CorpusCase[] { + const cases: CorpusCase[] = [] + const type = config.type + + const singleCase = ( + kind: CorpusCaseKind, + detail: string, + options: SubjectOptions, + after?: (builder: CaseBuilder, subjectId: string) => void + ) => { + const builder = new CaseBuilder(seed, `${kind}:${type}:${detail}`) + const start = startBlock(builder, registry) + const { block } = subject(builder, registry, config, options) + if (!isTriggerOnly(config, options.triggerMode ?? false) && canConnect(config)) { + builder.connect(start, block.id) + } + after?.(builder, block.id) + cases.push(builder.build(kind)) + } + + if (config.category !== 'triggers' && type !== 'start_trigger') { + const operations = operationsOf(config) + const opList: Array = operations.length > 0 ? operations : [undefined] + for (const operation of opList) { + const detail = operation ?? 'default' + singleCase('operation', `${detail}:basic`, { operation, pairMode: 'basic' }) + if (hasVisiblePair(config, operation, false)) { + singleCase('operation', `${detail}:advanced`, { + operation, + pairMode: 'advanced', + advancedMode: true, + }) + } + } + + const standaloneOperation = opList.find((operation) => + config.subBlocks.some( + (s) => + isStandaloneAdvanced(s) && + isOnSurface(s, config, false) && + isVisible(s, operation === undefined ? {} : { operation }) + ) + ) + if ( + standaloneOperation !== undefined || + (opList[0] === undefined && config.subBlocks.some(isStandaloneAdvanced)) + ) { + singleCase('standalone-advanced', standaloneOperation ?? 'default', { + operation: standaloneOperation, + advancedMode: false, + fillStandaloneAdvanced: true, + }) + } + + if (canConnect(config) && config.type !== 'loop' && config.type !== 'parallel') { + const functionConfig = registry.byType.get('function') + singleCase('error-edge', opList[0] ?? 'default', { operation: opList[0] }, (builder, id) => { + if (!functionConfig) return + const handler = subject(builder, registry, functionConfig, { name: 'On Error' }) + builder.connect(id, handler.block.id, 'error') + }) + } + } + + if (hasTriggerCapability(config) || config.category === 'triggers') { + const triggerIds = config.triggers?.available?.length ? config.triggers.available : [undefined] + const dualMode = config.category !== 'triggers' + triggerIds.forEach((triggerId, i) => { + const detail = triggerId ?? 'default' + singleCase('trigger', `${detail}:basic`, { + triggerMode: dualMode, + triggerId, + pairMode: 'basic', + }) + if (i === 0 && hasVisiblePair(config, undefined, true)) { + singleCase('trigger', `${detail}:advanced`, { + triggerMode: dualMode, + triggerId, + pairMode: 'advanced', + advancedMode: true, + }) + } + }) + } + + return cases +} + +function rowsJson(rows: Array<{ id: string; title: string; value: string }>, asArray = false) { + return asArray ? rows : JSON.stringify(rows) +} + +function branchCases(registry: Registry, seed: number): CorpusCase[] { + const cases: CorpusCase[] = [] + const condition = registry.byType.get('condition') + const router = registry.byType.get('router_v2') + const fn = registry.byType.get('function') + if (!fn) return cases + + const conditionCase = ( + detail: string, + makeRows: (b: CaseBuilder) => Array<{ id: string; title: string; value: string }> | null, + options: { asArray?: boolean; implicitHandle?: boolean } = {} + ) => { + if (!condition) return + const builder = new CaseBuilder(seed, `branches:condition:${detail}`) + const start = startBlock(builder, registry) + const { block } = subject(builder, registry, condition, { name: 'Decide' }) + builder.connect(start, block.id) + const rows = makeRows(builder) + const conditions = block.subBlocks.conditions + if (conditions) { + conditions.value = ( + rows === null ? null : rowsJson(rows, options.asArray) + ) as typeof conditions.value + } + const targets = rows ?? [{ id: `${block.id}-if`, title: 'if', value: '' }] + targets.forEach((row, i) => { + const target = subject(builder, registry, fn, { name: `Branch ${i}` }) + builder.connect(block.id, target.block.id, `condition-${row.id}`) + }) + cases.push( + builder.build('branches', rows === null ? { storedQuirk: 'implicit-branch-handle' } : {}) + ) + } + + conditionCase('three-branches', (b) => [ + { id: b.newId(), title: 'if', value: ' > 10' }, + { id: b.newId(), title: 'else if', value: " === 'a`b\u0024{c}'" }, + { id: b.newId(), title: 'else if', value: ' <3' }, + { id: b.newId(), title: 'else', value: '' }, + ]) + conditionCase('title-overrides', (b) => [ + { id: b.newId(), title: 'If big', value: ' > 10' }, + { id: b.newId(), title: 'Otherwise maybe', value: ' > 5' }, + { id: b.newId(), title: 'Fallback', value: '' }, + ]) + conditionCase('null-rows', () => null) + conditionCase( + 'array-encoded', + (b) => [ + { id: b.newId(), title: 'if', value: '' }, + { id: b.newId(), title: 'else', value: '' }, + ], + { asArray: true } + ) + + const routerCase = ( + detail: string, + rows: ((b: CaseBuilder) => Array<{ id: string; title: string; value: string }>) | null + ) => { + if (!router) return + const builder = new CaseBuilder(seed, `branches:router_v2:${detail}`) + const start = startBlock(builder, registry) + const { block } = subject(builder, registry, router, { name: 'Pick Route' }) + builder.connect(start, block.id) + const routeRows = rows ? rows(builder) : null + const routes = block.subBlocks.routes + if (routes) + routes.value = (routeRows === null ? null : JSON.stringify(routeRows)) as typeof routes.value + for (const [i, row] of (routeRows ?? []).entries()) { + const target = subject(builder, registry, fn, { name: `Route Target ${i}` }) + builder.connect(block.id, target.block.id, `router-${row.id}`) + } + cases.push(builder.build('branches')) + } + + routerCase('three-routes', (b) => [ + { id: b.newId(), title: 'Route 1', value: CORPUS_TEXT }, + { id: b.newId(), title: 'Route 2', value: 'Billing questions' }, + { id: b.newId(), title: 'Route 3', value: 'Everything else' }, + ]) + routerCase('title-overrides', (b) => [ + { id: b.newId(), title: 'Sales', value: 'Pricing and plans' }, + { id: b.newId(), title: 'Support', value: CORPUS_TEXT }, + ]) + routerCase('null-rows', null) + + return cases +} + +function collisionCases(registry: Registry, seed: number): CorpusCase[] { + const fn = registry.byType.get('function') + if (!fn) return [] + const pairs: Array<[string, string]> = [ + ['Agent 1', 'agent1'], + ['My.Block', 'myblock'], + ['Fetch Data', 'fetch data'], + ] + return pairs.map(([a, b]) => { + const builder = new CaseBuilder(seed, `name-collision:function:${a}|${b}`) + const start = startBlock(builder, registry) + const first = subject(builder, registry, fn, { name: a }) + const second = subject(builder, registry, fn, { name: b }) + builder.connect(start, first.block.id) + builder.connect(first.block.id, second.block.id) + return builder.build('name-collision') + }) +} + +type ContainerSpec = + | { kind: 'loop'; loopType: Loop['loopType'] } + | { kind: 'parallel'; parallelType: 'count' | 'collection' } + +function containerBlock( + builder: CaseBuilder, + spec: ContainerSpec, + name: string, + parentId?: string +): string { + const id = builder.newId() + const parent = parentId ? { parentId, extent: 'parent' as const } : {} + if (spec.kind === 'loop') { + const { loopType } = spec + const forEachItems = loopType === 'forEach' ? '' : '' + const whileCondition = loopType === 'while' ? ' <3' : '' + const doWhileCondition = loopType === 'doWhile' ? ' < 5' : '' + builder.loops[id] = { + id, + nodes: [], + iterations: 4, + loopType, + forEachItems, + whileCondition, + doWhileCondition, + enabled: true, + } + builder.add({ + id, + type: 'loop', + name, + position: builder.nextPosition(), + subBlocks: {}, + outputs: {}, + enabled: true, + data: { + ...parent, + width: 500, + height: 300, + type: 'subflowNode', + loopType, + count: 4, + collection: forEachItems, + whileCondition, + doWhileCondition, + }, + }) + } else { + const { parallelType } = spec + const distribution = parallelType === 'collection' ? '' : '' + builder.parallels[id] = { + id, + nodes: [], + count: 3, + distribution, + parallelType, + batchSize: 2, + enabled: true, + } + builder.add({ + id, + type: 'parallel', + name, + position: builder.nextPosition(), + subBlocks: {}, + outputs: {}, + enabled: true, + data: { + ...parent, + width: 500, + height: 300, + type: 'subflowNode', + parallelType, + count: 3, + collection: distribution, + batchSize: 2, + }, + }) + } + return id +} + +function subflowCases(registry: Registry, seed: number): CorpusCase[] { + const fn = registry.byType.get('function') + if (!fn) return [] + const specs: Array<{ detail: string; chain: ContainerSpec[] }> = [ + { detail: 'loop-for', chain: [{ kind: 'loop', loopType: 'for' }] }, + { detail: 'loop-forEach', chain: [{ kind: 'loop', loopType: 'forEach' }] }, + { detail: 'loop-while', chain: [{ kind: 'loop', loopType: 'while' }] }, + { detail: 'loop-doWhile', chain: [{ kind: 'loop', loopType: 'doWhile' }] }, + { detail: 'parallel-count', chain: [{ kind: 'parallel', parallelType: 'count' }] }, + { detail: 'parallel-collection', chain: [{ kind: 'parallel', parallelType: 'collection' }] }, + { + detail: 'loop-in-parallel', + chain: [ + { kind: 'parallel', parallelType: 'collection' }, + { kind: 'loop', loopType: 'forEach' }, + ], + }, + { + detail: 'parallel-in-loop', + chain: [ + { kind: 'loop', loopType: 'for' }, + { kind: 'parallel', parallelType: 'count' }, + ], + }, + { + detail: 'loop-in-loop', + chain: [ + { kind: 'loop', loopType: 'while' }, + { kind: 'loop', loopType: 'doWhile' }, + ], + }, + { + detail: 'loop-parallel-loop', + chain: [ + { kind: 'loop', loopType: 'forEach' }, + { kind: 'parallel', parallelType: 'collection' }, + { kind: 'loop', loopType: 'for' }, + ], + }, + ] + + return specs.map(({ detail, chain }) => { + const builder = new CaseBuilder(seed, `subflow:${chain.map((c) => c.kind).join('>')}:${detail}`) + const start = startBlock(builder, registry) + let parentId: string | undefined + let upstream = start + let upstreamHandle = 'source' + const containers: string[] = [] + chain.forEach((spec, depth) => { + const id = containerBlock(builder, spec, `${spec.kind} ${depth}`, parentId) + builder.connect(upstream, id, upstreamHandle) + containers.push(id) + parentId = id + upstream = id + upstreamHandle = `${spec.kind}-start-source` + }) + const body = subject(builder, registry, fn, { name: 'Body', parentId }) + builder.connect(upstream, body.block.id, upstreamHandle) + const second = subject(builder, registry, fn, { name: 'Body Two', parentId }) + builder.connect(body.block.id, second.block.id) + const outer = containers[0] + const outerSpec = chain[0] + if (outer && outerSpec) { + const after = subject(builder, registry, fn, { name: 'After Subflow' }) + builder.connect(outer, after.block.id, `${outerSpec.kind}-end-source`) + } + return builder.build('subflow') + }) +} + +function inputFormatCases(registry: Registry, seed: number): CorpusCase[] { + const builder = new CaseBuilder(seed, 'input-format:start_trigger:duplicate-and-empty-names') + const field = (name: string, type: string) => ({ + id: builder.newId(), + name, + type, + value: '', + collapsed: false, + }) + startBlock(builder, registry, [ + field('query', 'string'), + field('query', 'number'), + field('', 'string'), + field('', 'object'), + field('weird name.with dots', 'string'), + ]) + return [builder.build('input-format')] +} + +function variableCases(registry: Registry, seed: number): CorpusCase[] { + const builder = new CaseBuilder(seed, 'variables:variables:every-type') + const start = startBlock(builder, registry) + const variablesBlock = registry.byType.get('variables') + if (variablesBlock) { + const { block } = subject(builder, registry, variablesBlock) + builder.connect(start, block.id) + } + const built = builder.build('variables') + const extra: Array<[string, NonNullable[string]['type'], unknown]> = [ + ['count', 'number', 3], + ['flag', 'boolean', false], + ['payload', 'object', { text: CORPUS_TEXT }], + ['items', 'array', ['', 2]], + ['raw', 'plain', CORPUS_TEXT], + ['Count', 'string', 'case collision with count'], + ] + for (const [name, type, value] of extra) { + const id = builder.newId() + built.state.variables = { ...built.state.variables, [id]: { id, name, type, value } } + } + return [built] +} + +function unknownTypeCases(registry: Registry, seed: number): CorpusCase[] { + return ['retired_block_corpus', 'custom_block_corpus-slug'].map((type) => { + const builder = new CaseBuilder(seed, `unknown-type:${type}:stored`) + const start = startBlock(builder, registry) + const id = builder.newId() + builder.add({ + id, + type, + name: 'Mystery Block', + position: builder.nextPosition(), + subBlocks: { + prompt: { id: 'prompt', type: 'long-input', value: CORPUS_TEXT }, + mode: { id: 'mode', type: 'dropdown', value: 'fast' }, + count: { id: 'count', type: 'slider', value: 3 }, + empty: { id: 'empty', type: 'short-input', value: '' }, + cleared: { id: 'cleared', type: 'short-input', value: null }, + }, + outputs: { result: { type: 'string', description: 'Result' } }, + enabled: true, + data: { someUnknownKey: 'kept verbatim' } as BlockState['data'], + }) + builder.connect(start, id) + return builder.build('unknown-type', { unknownTypes: true }) + }) +} + +/** + * Generates the registry corpus. Pure apart from reading the registry: the same seed and the same + * registry give the same cases in the same order. + */ +export function generateRegistryCorpus(options: CorpusOptions = {}): CorpusCase[] { + const seed = options.seed ?? DEFAULT_CORPUS_SEED + const configs = options.blocks ?? Object.values(getBlockRegistry()) + const all = Object.values(getBlockRegistry()) + const byType = new Map(all.map((config) => [config.type, config])) + for (const config of configs) byType.set(config.type, config) + + const toolCandidate = + byType.get('slack') ?? + all.find((config) => config.tools.access.length > 0 && operationsOf(config).length > 1) + const registry: Registry = { + byType, + toolType: toolCandidate + ? { type: toolCandidate.type, operations: operationsOf(toolCandidate) } + : null, + } + + return [ + ...configs.flatMap((config) => blockCases(config, registry, seed)), + ...branchCases(registry, seed), + ...collisionCases(registry, seed), + ...subflowCases(registry, seed), + ...inputFormatCases(registry, seed), + ...variableCases(registry, seed), + ...unknownTypeCases(registry, seed), + ] +} diff --git a/apps/sim/lib/workflows/code/corpus/index.ts b/apps/sim/lib/workflows/code/corpus/index.ts new file mode 100644 index 00000000000..48a7e809d90 --- /dev/null +++ b/apps/sim/lib/workflows/code/corpus/index.ts @@ -0,0 +1,5 @@ +export { + type CorpusCase, + generateRegistryCorpus, +} from './generate' +export { CORPUS_TEXT, CORPUS_TEXT_MARKERS } from './values' diff --git a/apps/sim/lib/workflows/code/corpus/values.ts b/apps/sim/lib/workflows/code/corpus/values.ts new file mode 100644 index 00000000000..1908015ec09 --- /dev/null +++ b/apps/sim/lib/workflows/code/corpus/values.ts @@ -0,0 +1,292 @@ +/** + * Stored values for corpus fixtures, one generator per subBlock type, in the shapes the editor + * persists (the sub-block components' `useSubBlockValue` types and + * `validateValueForSubBlockType`). Free text always carries the adversarial payload s3 §5 asks + * for: a reference in code position, a reference inside quotes, `{{API_KEY}}`, a newline, a + * backtick and `${`. Values that must be ids (dropdown options, selector picks, credentials) are + * ids instead, because a payload there is a value the editor could never have stored; the + * advanced member of a selector pair is free text and carries the payload. + */ + +import type { SeededRandom } from '@sim/workflow-code/proof' +import type { SubBlockConfig } from '@/blocks/types' + +/** The upstream start block every case has; its key is `start`. */ +export const CORPUS_START_NAME = 'Start' + +/** The workflow variable every case declares, referenced as ``. */ +export const CORPUS_VARIABLE_NAME = 'corpusNote' + +/** The six markers every free-text corpus string carries. */ +export const CORPUS_TEXT_MARKERS = [ + '', + "''", + '{{API_KEY}}', + '\n', + '`', + '${', +] as const + +export const CORPUS_TEXT = [ + 'Reply to as', + "'' using {{API_KEY}} and ", + 'second line with a `backtick` and a literal \u0024{notInterpolated} and <3 hearts', +].join('\n') + +const JS_CODE = [ + 'const input = ', + "const label = ' {{API_KEY}}'", + 'const note = `tick \u0024{label}` // \u0024{', + 'return { input, label, note, key: {{API_KEY}} }', +].join('\n') + +const PYTHON_CODE = [ + 'value = ', + "label = ' {{API_KEY}}'", + 'note = f"`tick` \u0024{label}"', + 'return {"value": value, "label": label}', +].join('\n') + +const SHELL_CODE = [ + 'INPUT=', + "echo ' {{API_KEY}}'", + 'echo "`date` \u0024{HOME}"', +].join('\n') + +/** JSON code fields must stay parseable, so the payload lives inside JSON strings. */ +const JSON_CODE = JSON.stringify( + { + input: '', + quoted: "''", + key: '{{API_KEY}}', + text: CORPUS_TEXT, + }, + null, + 2 +) + +const RESPONSE_FORMAT = JSON.stringify( + { + name: 'corpus_result', + schema: { + type: 'object', + properties: { summary: { type: 'string', description: CORPUS_TEXT } }, + required: ['summary'], + additionalProperties: false, + }, + strict: true, + }, + null, + 2 +) + +export interface FillContext { + rng: SeededRandom + /** Values filled so far on this block, for option functions that read siblings. */ + values: Record + /** A uuid source for row ids inside structured values. */ + newId: () => string + /** A registry block type with an operation dropdown, for tool-input entries. */ + toolType: { type: string; operations: string[] } | null +} + +type OptionList = Array<{ id: string; hidden?: boolean }> + +/** A subBlock's options for these values, or `null` when it has none or they cannot be evaluated. */ +export function resolveOptions( + subBlock: SubBlockConfig, + values: Record +): OptionList | null { + const { options } = subBlock + if (!options) return null + try { + const list: OptionList = typeof options === 'function' ? options({ values }) : options + const visible = list.filter((option) => !option.hidden && typeof option.id === 'string') + return visible.length > 0 ? visible : null + } catch { + return null + } +} + +/** SubBlock types the user never writes (display, server-managed, modal launchers). */ +const NON_VALUE_TYPES = new Set([ + 'text', + 'schedule-info', + 'webhook-config', + 'modal', +]) + +export function isWritableSubBlock(subBlock: SubBlockConfig): boolean { + return !NON_VALUE_TYPES.has(subBlock.type) && !subBlock.readOnly +} + +function codeFor(subBlock: SubBlockConfig, values: Record): string { + const language = String(subBlock.language ?? values.language ?? 'javascript').toLowerCase() + if (language === 'json') return JSON_CODE + if (language === 'python') return PYTHON_CODE + if (language === 'shell' || language === 'bash' || language === 'sh') return SHELL_CODE + return JS_CODE +} + +function pickOption(subBlock: SubBlockConfig, ctx: FillContext): string | null { + const options = resolveOptions(subBlock, ctx.values) + return options ? ctx.rng.pick(options).id : null +} + +function toolEntries(ctx: FillContext): unknown[] { + if (!ctx.toolType) return [] + const { type, operations } = ctx.toolType + const first = operations[0] + const second = operations[1] ?? first + const entry = (operation: string | undefined, title: string) => ({ + type, + title, + ...(operation ? { operation } : {}), + params: { corpusText: CORPUS_TEXT, emptyValue: '' }, + isExpanded: false, + usageControl: 'auto', + }) + return [entry(first, `${type} one`), entry(second, `${type} two`)] +} + +/** + * The stored value for one writable subBlock, or `null` when this type has no value the corpus + * can stand behind (a dynamic dropdown with nothing to pick). + */ +export function fillSubBlockValue(subBlock: SubBlockConfig, ctx: FillContext): unknown { + const { rng, newId } = ctx + switch (subBlock.type) { + case 'short-input': + case 'long-input': + return CORPUS_TEXT + case 'combobox': + return ( + pickOption(subBlock, ctx) ?? + (subBlock.defaultValue !== undefined + ? structuredClone(subBlock.defaultValue) + : typeof subBlock.options === 'function' + ? null + : CORPUS_TEXT) + ) + case 'dropdown': { + const picked = pickOption(subBlock, ctx) + if (picked === null) return subBlock.options ? null : 'corpus-option' + return subBlock.multiSelect ? [picked] : picked + } + case 'slider': { + const min = subBlock.min ?? 0 + const max = subBlock.max ?? Math.max(min + 1, 10) + return subBlock.integer ? rng.int(Math.ceil(min), Math.floor(max)) : min + (max - min) / 2 + } + case 'switch': + return rng.bool() + case 'code': + return codeFor(subBlock, ctx.values) + case 'response-format': + return RESPONSE_FORMAT + case 'time-input': + return `${String(rng.int(0, 23)).padStart(2, '0')}:${String(rng.int(0, 59)).padStart(2, '0')}` + case 'table': + return [ + { + id: newId(), + cells: Object.fromEntries( + (subBlock.columns ?? ['Key', 'Value']).map((c) => [c, CORPUS_TEXT]) + ), + }, + ] + case 'checkbox-list': + case 'grouped-checkbox-list': { + const options = resolveOptions(subBlock, ctx.values) ?? [] + return Object.fromEntries(options.map((option, i) => [option.id, i % 2 === 0])) + } + case 'tool-input': + return toolEntries(ctx) + case 'skill-input': + return [{ skillId: 'corpus-skill', name: 'Corpus skill' }] + case 'condition-input': + return JSON.stringify([ + { id: newId(), title: 'if', value: ' === "a"' }, + { id: newId(), title: 'else', value: '' }, + ]) + case 'router-input': + return JSON.stringify([ + { id: newId(), title: 'Route 1', value: CORPUS_TEXT }, + { id: newId(), title: 'Route 2', value: 'Everything else' }, + ]) + case 'eval-input': + return [ + { id: newId(), name: 'accuracy', description: CORPUS_TEXT, range: { min: 0, max: 10 } }, + ] + case 'input-format': + return [ + { id: newId(), name: 'name', type: 'string', value: '', collapsed: false }, + { id: newId(), name: 'count', type: 'number', value: '', collapsed: false }, + ] + case 'messages-input': + return [ + { role: 'system', content: CORPUS_TEXT }, + { role: 'user', content: '' }, + ] + case 'variables-input': + return [ + { + id: newId(), + variableName: CORPUS_VARIABLE_NAME, + type: 'string', + value: CORPUS_TEXT, + isExisting: true, + }, + ] + case 'knowledge-tag-filters': + return JSON.stringify([ + { id: newId(), tagName: 'topic', fieldType: 'text', operator: 'eq', tagValue: CORPUS_TEXT }, + ]) + case 'document-tag-entry': + return JSON.stringify([ + { id: newId(), tagName: 'topic', fieldType: 'text', value: CORPUS_TEXT }, + ]) + case 'filter-builder': + return [ + { id: newId(), logicalOperator: 'and', column: 'name', operator: 'eq', value: CORPUS_TEXT }, + ] + case 'sort-builder': + return [{ id: newId(), column: 'name', direction: 'asc' }] + case 'input-mapping': + case 'workflow-input-mapper': + return JSON.stringify({ name: CORPUS_TEXT, count: '' }) + case 'mcp-dynamic-args': + return { query: CORPUS_TEXT } + case 'workflow-output-selector': + return ['start.input'] + case 'file-upload': { + const file = { + name: 'corpus.txt', + path: '/api/files/serve/corpus.txt', + size: 12, + type: 'text/plain', + } + return subBlock.multiple ? [file] : file + } + case 'model-fallback-list': + return [] + case 'oauth-input': + return 'corpus-credential' + case 'knowledge-base-selector': + case 'document-selector': + case 'file-selector': + case 'sheet-selector': + case 'project-selector': + case 'channel-selector': + case 'user-selector': + case 'folder-selector': + case 'mcp-server-selector': + case 'mcp-tool-selector': + case 'workflow-selector': + case 'table-selector': + case 'column-selector': + return subBlock.multiSelect ? ['corpus-pick-1', 'corpus-pick-2'] : 'corpus-pick-1' + default: + return null + } +} From 283f7284f8b1aae069e3db9bddc2369b86234675 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:10:53 -0800 Subject: [PATCH 026/428] test(workflows): add the round-trip harness with loud skips until wave 3 engines land --- .../code/corpus/fixtures.test-helpers.ts | 89 ++++ .../code/corpus/roundtrip.corpus.test.ts | 391 ++++++++++++++++++ 2 files changed, 480 insertions(+) create mode 100644 apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts create mode 100644 apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts diff --git a/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts b/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts new file mode 100644 index 00000000000..9e1ef530481 --- /dev/null +++ b/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts @@ -0,0 +1,89 @@ +/** + * The real-state corpora (s3 §5 corpus 2) that live in this public repo: the landing-page + * templates and the states `@sim/testing` builds. Agent-authored states from the private copilot + * repo and anything exported from production stay out of the repo; `scripts/export-redacted- + * workflows.ts` writes redacted production states to a directory outside it, and a caller points + * the harness there with `ROUNDTRIP_CORPUS_EXTRA_DIR`. + * + * Test-only: it imports `@sim/testing` (a devDependency) and reads the filesystem. + */ + +import { readdirSync, readFileSync } from 'node:fs' +import path from 'node:path' +import { WorkflowBuilder } from '@sim/testing/builders' +import { + createComplexWorkflowState, + createConditionalWorkflowState, + createLoopWorkflowState, + createMinimalWorkflowState, +} from '@sim/testing/factories' +import { omit } from '@sim/utils/object' +import { compareStrings } from '@sim/utils/string' +import type { WorkflowState } from '@/stores/workflows/workflow/types' + +export interface FixtureState { + /** `:`, stable across runs. */ + id: string + state: WorkflowState +} + +const LANDING_TEMPLATES_DIR = path.resolve(process.cwd(), 'public/landing-page-templates') + +/** Reads exported workflow files (`{ version, exportedAt, state }` or a bare state) from a directory. */ +export function loadWorkflowStatesFromDirectory(directory: string, source: string): FixtureState[] { + return readdirSync(directory) + .filter((file) => file.endsWith('.json')) + .sort(compareStrings) + .map((file) => { + const parsed: unknown = JSON.parse(readFileSync(path.join(directory, file), 'utf8')) + return { + id: `${source}:${file.replace(/\.json$/, '')}`, + state: toWorkflowState(parsed, file), + } + }) +} + +function toWorkflowState(parsed: unknown, file: string): WorkflowState { + const envelope = parsed && typeof parsed === 'object' && 'state' in parsed ? parsed.state : parsed + if ( + !envelope || + typeof envelope !== 'object' || + !('blocks' in envelope) || + !('edges' in envelope) + ) { + throw new Error(`${file} is not an exported workflow state`) + } + const state = envelope as WorkflowState + return { ...state, loops: state.loops ?? {}, parallels: state.parallels ?? {} } +} + +/** The 11 landing-page templates in `public/landing-page-templates`. */ +export function loadLandingTemplateStates(): FixtureState[] { + return loadWorkflowStatesFromDirectory(LANDING_TEMPLATES_DIR, 'landing-template') +} + +type FactoryOutput = Omit & { + parallels?: WorkflowState['parallels'] + isDeployed?: boolean +} + +/** Drops the builder's wall-clock and deploy fields, which are not part of a stored graph. */ +function stored(state: FactoryOutput): WorkflowState { + const graph = omit(state, ['lastSaved', 'isDeployed']) + return { ...graph, parallels: graph.parallels ?? {} } +} + +/** States from the shared `@sim/testing` factories and builder presets. */ +export function buildTestingFactoryStates(): FixtureState[] { + const fixtures: Array<[string, FactoryOutput]> = [ + ['minimal', createMinimalWorkflowState()], + ['conditional', createConditionalWorkflowState()], + ['loop', createLoopWorkflowState()], + ['complex', createComplexWorkflowState()], + ['builder-linear', WorkflowBuilder.linear(5).build()], + ['builder-branching', WorkflowBuilder.branching().build()], + ['builder-loop', WorkflowBuilder.withLoop(4).build()], + ['builder-parallel', WorkflowBuilder.withParallel(3).build()], + ] + return fixtures.map(([name, state]) => ({ id: `testing:${name}`, state: stored(state) })) +} diff --git a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts new file mode 100644 index 00000000000..f66d17fcf9e --- /dev/null +++ b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts @@ -0,0 +1,391 @@ +/** + * The Wave 3 round-trip harness (s3 §5 P1–P5, s1 §6 O1–O3) over every corpus: the generated + * registry corpus, the landing templates, the `@sim/testing` states, redacted production states + * from `ROUNDTRIP_CORPUS_EXTRA_DIR` (written outside the repo by + * scripts/export-redacted-workflows.ts), and fast-check workflows. + * + * It is written against the `api.ts` function types and reads the real engines from + * `@sim/workflow-code` at run time. Until an engine lands, each property that needs it is + * registered as a skipped test whose title names the missing export or module, and the report + * lists it under `skippedProperties`. Wave 3 replaces the run-time lookups with static imports + * and removes the skips. + * + * CI budget (under 60 s): by default every block type keeps up to `CASES_PER_BLOCK_TYPE` cases + * plus every structural case; `ROUNDTRIP_CORPUS_FULL=1` runs the whole corpus. Set + * `ROUNDTRIP_CORPUS_REPORT_PATH` to write the JSON report (per-block-type parity). + */ +import { mkdirSync, writeFileSync } from 'node:fs' +import path from 'node:path' +import { describe, expect, it, vi } from 'vitest' + +vi.unmock('@/blocks/registry') +vi.unmock('@/tools/registry') + +import { getErrorMessage } from '@sim/utils/errors' +import type { + BlockCatalog, + CanonicalEqualsFn, + CanonicalizeFn, + CanonicalWorkflow, + CompileWorkflowFn, + MaterializeFn, + MaterializeHooks, + PrintWorkflowFn, +} from '@sim/workflow-code' +import * as workflowCode from '@sim/workflow-code' +import { + assertNoErrors, + assertNoopIdentity, + createProofReport, + executionParity, + findDifferences, + idempotence, + type OracleResult, + type ProofProperty, + reportPathVariable, + withoutAnnotations, + workflowStateArbitrary, +} from '@sim/workflow-code/proof' +import fc from 'fast-check' +import { type CorpusCase, generateRegistryCorpus } from '@/lib/workflows/code/corpus' +import { + buildTestingFactoryStates, + type FixtureState, + loadLandingTemplateStates, + loadWorkflowStatesFromDirectory, +} from '@/lib/workflows/code/corpus/fixtures.test-helpers' +import { hasWorkflowChanged } from '@/lib/workflows/comparison/compare' +import { Serializer } from '@/serializer' +import type { WorkflowState } from '@/stores/workflows/workflow/types' + +const SUITE = 'roundtrip-corpus' +const CASES_PER_BLOCK_TYPE = 3 +const FUZZ_RUNS = 50 + +interface Engines { + canonicalize: CanonicalizeFn + materialize: MaterializeFn + compileWorkflow: CompileWorkflowFn + printWorkflow: PrintWorkflowFn + canonicalEquals: CanonicalEqualsFn +} + +type EngineName = keyof Engines + +const packageExports: Record = { ...workflowCode } + +function engine(name: K): Engines[K] | null { + const value = packageExports[name] + return typeof value === 'function' ? (value as Engines[K]) : null +} + +/** + * Loads a server module that does not exist before Wave 3 without failing the file's transform. + * Resolves `null` when the module or the export is missing. + */ +async function optionalExport(specifier: string, name: string): Promise { + try { + const mod: Record = await import(/* @vite-ignore */ specifier) + return mod[name] ?? null + } catch { + return null + } +} + +const CATALOG_MODULE = '@/lib/workflows/code/catalog' +const CATALOG_EXPORT = 'buildCodeCatalog' +const HOOKS_MODULE = '@/lib/workflows/code/materialize-hooks' +const HOOKS_EXPORT = 'createMaterializeHooks' + +const buildCatalog = await optionalExport(CATALOG_MODULE, CATALOG_EXPORT) +const createHooks = await optionalExport(HOOKS_MODULE, HOOKS_EXPORT) + +const catalog: BlockCatalog | null = + typeof buildCatalog === 'function' ? (buildCatalog({}).catalog as BlockCatalog) : null +const hooks: MaterializeHooks | null = + typeof createHooks === 'function' ? (createHooks() as MaterializeHooks) : null + +const PROPERTY_NEEDS: Record> = { + P1: ['catalog', 'hooks', 'canonicalize', 'printWorkflow', 'compileWorkflow', 'materialize'], + P2: ['catalog', 'hooks', 'canonicalize', 'printWorkflow', 'compileWorkflow', 'materialize'], + P3: ['catalog', 'canonicalize', 'printWorkflow', 'compileWorkflow'], + P4: ['catalog', 'canonicalize', 'printWorkflow', 'compileWorkflow'], + P5: ['catalog', 'canonicalize', 'printWorkflow', 'compileWorkflow'], + O1: ['catalog', 'hooks', 'canonicalize', 'materialize'], + O2: ['catalog', 'hooks', 'canonicalize', 'materialize'], + O3: ['catalog', 'hooks', 'canonicalize', 'materialize'], +} + +function missingFor(property: ProofProperty): string[] { + return PROPERTY_NEEDS[property].flatMap((need) => { + if (need === 'catalog') return catalog ? [] : [`${CATALOG_MODULE}#${CATALOG_EXPORT} (Wave 2A)`] + if (need === 'hooks') return hooks ? [] : [`${HOOKS_MODULE}#${HOOKS_EXPORT} (Wave 3)`] + return engine(need) ? [] : [`@sim/workflow-code#${need}`] + }) +} + +interface ProofSubject { + id: string + blockTypes: string[] + state: WorkflowState +} + +function toSubject(fixture: FixtureState): ProofSubject { + const blockTypes = [...new Set(Object.values(fixture.state.blocks).map((b) => b.type))].sort() + return { id: fixture.id, blockTypes, state: fixture.state } +} + +/** Every structural case, plus up to `CASES_PER_BLOCK_TYPE` per-block cases for each type. */ +function budgetedCorpus(corpus: CorpusCase[]): CorpusCase[] { + if (process.env.ROUNDTRIP_CORPUS_FULL === '1') return corpus + const perType = new Map() + return corpus.filter((corpusCase) => { + const [, type = ''] = corpusCase.id.split(':') + const isPerBlock = ['operation', 'trigger', 'standalone-advanced', 'error-edge'].includes( + corpusCase.kind + ) + if (!isPerBlock) return true + const count = perType.get(type) ?? 0 + if (count >= CASES_PER_BLOCK_TYPE) return false + perType.set(type, count + 1) + return true + }) +} + +const subjects: ProofSubject[] = [ + ...budgetedCorpus(generateRegistryCorpus()), + ...loadLandingTemplateStates().map(toSubject), + ...buildTestingFactoryStates().map(toSubject), + ...(process.env.ROUNDTRIP_CORPUS_EXTRA_DIR + ? loadWorkflowStatesFromDirectory(process.env.ROUNDTRIP_CORPUS_EXTRA_DIR, 'redacted').map( + toSubject + ) + : []), + ...fc + .sample(workflowStateArbitrary({ maxBlocks: 8, maxDepth: 2 }), { + numRuns: FUZZ_RUNS, + seed: 20261115, + }) + .map((state, i) => toSubject({ id: `fuzz:${i}`, state })), +] + +const report = createProofReport(SUITE) + +/** The engines with every needed one present; only called after `missingFor` came back empty. */ +type ResolvedEngines = Engines & { catalog: BlockCatalog; hooks: MaterializeHooks } + +function resolveEngines(): ResolvedEngines { + const found = { + canonicalize: engine('canonicalize'), + materialize: engine('materialize'), + compileWorkflow: engine('compileWorkflow'), + printWorkflow: engine('printWorkflow'), + canonicalEquals: engine('canonicalEquals'), + } + if (!catalog) throw new Error('catalog missing') + return { + canonicalize: found.canonicalize ?? missingEngine('canonicalize'), + materialize: found.materialize ?? missingEngine('materialize'), + compileWorkflow: found.compileWorkflow ?? missingEngine('compileWorkflow'), + printWorkflow: found.printWorkflow ?? missingEngine('printWorkflow'), + canonicalEquals: + found.canonicalEquals ?? + ((a, b) => findDifferences(withoutAnnotations(a), withoutAnnotations(b)).length === 0), + catalog, + hooks: hooks ?? missingHooks(), + } +} + +function missingEngine(name: string): never { + throw new Error(`@sim/workflow-code#${name} is not implemented`) +} + +function missingHooks(): never { + throw new Error(`${HOOKS_MODULE}#${HOOKS_EXPORT} is not implemented`) +} + +const serializer = new Serializer() +const serialize = (state: WorkflowState) => + serializer.serializeWorkflow(state.blocks, state.edges, state.loops, state.parallels) + +function canonical(e: ResolvedEngines, subject: ProofSubject): CanonicalWorkflow { + return e.canonicalize(subject.state, { + catalog: e.catalog, + meta: { name: subject.id, description: null }, + }).workflow +} + +function printText(e: ResolvedEngines, workflow: CanonicalWorkflow, mode: 'inline' | 'files') { + return e.printWorkflow({ + workflow, + catalog: e.catalog, + options: + mode === 'files' ? { functionCode: 'files', codeDir: 'code' } : { functionCode: 'inline' }, + }) +} + +function compileFiles(e: ResolvedEngines, printed: ReturnType) { + const [entry, ...codeFiles] = printed.files + return e.compileWorkflow({ + entry, + files: new Map(codeFiles.map((file) => [file.path, file.text])), + catalog: e.catalog, + sdkMajor: e.catalog.sdkMajor, + }) +} + +function compiledWorkflow( + e: ResolvedEngines, + workflow: CanonicalWorkflow, + mode: 'inline' | 'files' = 'inline' +) { + const compiled = compileFiles(e, printText(e, workflow, mode)) + if (!compiled.workflow) { + throw new Error(`compile failed: ${compiled.diagnostics.map((d) => d.code).join(', ')}`) + } + return compiled.workflow +} + +function materialized(e: ResolvedEngines, workflow: CanonicalWorkflow, prev?: WorkflowState) { + return e.materialize(workflow, null, { + catalog: e.catalog, + hooks: e.hooks, + prev, + lockFreshness: 'none', + }).state +} + +const properties: Record OracleResult> = { + P1: (e, s) => { + const original = canonical(e, s) + return idempotence({ + oracle: 'P1', + value: original, + step: (c) => + e.canonicalize(materialized(e, compiledWorkflow(e, c), s.state), { + catalog: e.catalog, + meta: c.meta, + }).workflow, + equals: e.canonicalEquals, + }) + }, + P2: (e, s) => + executionParity({ + original: s.state, + candidate: materialized(e, compiledWorkflow(e, canonical(e, s)), s.state), + serialize, + hasWorkflowChanged, + oracle: 'P2', + }), + P3: (e, s) => + idempotence({ + oracle: 'P3', + value: printText(e, canonical(e, s), 'inline').files[0].text, + step: (text) => { + const compiled = e.compileWorkflow({ + entry: { path: 'workflow.ts', text }, + files: new Map(), + catalog: e.catalog, + sdkMajor: e.catalog.sdkMajor, + }) + return compiled.workflow ? printText(e, compiled.workflow, 'inline').files[0].text : '' + }, + }), + P4: (e, s) => + assertNoErrors(compileFiles(e, printText(e, canonical(e, s), 'inline')).diagnostics), + P5: (e, s) => { + const c = canonical(e, s) + return idempotence({ + oracle: 'P5', + value: compiledWorkflow(e, c, 'inline'), + step: () => compiledWorkflow(e, c, 'files'), + equals: e.canonicalEquals, + }) + }, + O1: (e, s) => + assertNoopIdentity({ + original: s.state, + materialized: materialized(e, canonical(e, s), s.state), + }), + O2: (e, s) => + executionParity({ + original: s.state, + candidate: materialized(e, canonical(e, s)), + serialize, + hasWorkflowChanged, + }), + O3: (e, s) => + idempotence({ + oracle: 'O3', + value: canonical(e, s), + step: (c) => + e.canonicalize(materialized(e, c, s.state), { catalog: e.catalog, meta: c.meta }).workflow, + equals: e.canonicalEquals, + }), +} + +const PROPERTY_TITLES: Record = { + P1: 'P1 fidelity: canonicalize(materialize(compile(print(c)))) equals c', + P2: 'P2 serializer parity after a full source round trip', + P3: 'P3 print idempotence: print(compile(print(c))) is byte-identical', + P4: 'P4 printed code compiles with zero errors', + P5: 'P5 files mode compiles to the same workflow as inline mode', + O1: 'O1 no-op identity: materialize(canonicalize(x), prev x) deep-equals x', + O2: 'O2 lockless execution parity', + O3: 'O3 idempotence: canonicalize(materialize(c)) equals c', +} + +describe(`round-trip corpus (${subjects.length} workflows)`, () => { + for (const property of Object.keys(PROPERTY_TITLES) as ProofProperty[]) { + const missing = missingFor(property) + if (missing.length > 0) { + const reason = `missing ${missing.join(', ')}` + report.skipProperty(property, reason) + it.skip(`${PROPERTY_TITLES[property]} [SKIPPED until Wave 3: ${reason}]`, () => {}) + continue + } + + it(PROPERTY_TITLES[property], () => { + const e = resolveEngines() + let failed = 0 + for (const subject of subjects) { + const started = performance.now() + try { + const result = properties[property](e, subject) + if (!result.ok) failed += 1 + report.record({ + caseId: subject.id, + blockTypes: subject.blockTypes, + property, + status: result.ok ? 'passed' : 'failed', + durationMs: Math.round(performance.now() - started), + ...(result.ok ? {} : { differences: result.differences }), + }) + } catch (error) { + failed += 1 + report.record({ + caseId: subject.id, + blockTypes: subject.blockTypes, + property, + status: 'errored', + durationMs: Math.round(performance.now() - started), + message: getErrorMessage(error, String(error)), + }) + } + } + expect(failed).toBe(0) + }) + } + + it('writes the report when a report path is set', () => { + const target = process.env[reportPathVariable(SUITE)] + const built = report.build({ generatedAt: new Date().toISOString() }) + expect(built.caseCount + built.skippedProperties.length).toBeGreaterThan(0) + if (!target) return + mkdirSync(path.dirname(target), { recursive: true }) + writeFileSync( + target, + `${JSON.stringify({ ...built, workflowCount: subjects.length }, null, 2)}\n` + ) + }) +}) From e9714d1958190aa283d384a0c6295d143265da64 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:10:54 -0800 Subject: [PATCH 027/428] feat(scripts): export redacted, block-type-stratified workflows outside the repo --- .../scripts/export-redacted-workflows.test.ts | 98 +++++ apps/sim/scripts/export-redacted-workflows.ts | 409 ++++++++++++++++++ 2 files changed, 507 insertions(+) create mode 100644 apps/sim/scripts/export-redacted-workflows.test.ts create mode 100644 apps/sim/scripts/export-redacted-workflows.ts diff --git a/apps/sim/scripts/export-redacted-workflows.test.ts b/apps/sim/scripts/export-redacted-workflows.test.ts new file mode 100644 index 00000000000..c4758e87549 --- /dev/null +++ b/apps/sim/scripts/export-redacted-workflows.test.ts @@ -0,0 +1,98 @@ +/** + * The export writes production workflow content to disk, so redaction is a data-leak boundary: + * prose and secrets must not survive, while the structure the round trip proves (references, env + * tokens, escaping-relevant punctuation, ids, option ids) must. + */ +import path from 'node:path' +import { describe, expect, it } from 'vitest' +import { assertOutsideRepo, Redactor, stratify } from '@/scripts/export-redacted-workflows' + +const redactor = new Redactor( + new Map([['customerlookup', 'agent1']]), + new Map([['apikey', 'var0']]) +) + +describe('Redactor', () => { + it('removes prose but keeps references, env tokens and escaping punctuation', () => { + const out = redactor.string( + 'Email Jane at with {{ACME_KEY}}\n`x` \u0024{y}', + 'body' + ) + expect(out).toBe('xxxxx xxxx xx xxxx {{ACME_KEY}}\n`x` \u0024{x}') + expect(out).not.toMatch(/Jane|Email/) + }) + + it('rewrites variable references to the renamed variable', () => { + expect(redactor.string('use ', 'prompt')).toBe('xxx ') + }) + + it('replaces secret-looking fields entirely, but keeps credential references', () => { + expect(redactor.string('sk-live-abc123', 'apiKey')).toBe('REDACTED') + expect(redactor.string('Bearer abc', 'Authorization')).toBe('REDACTED') + expect(redactor.string('cred_8f2', 'credentialId')).toBe('cred_8f2') + }) + + it('keeps ids, positional branch titles and pair modes', () => { + expect(redactor.string('6f1c1e0a-1b2c-4d3e-8f4a-5b6c7d8e9f00', 'anything')).toBe( + '6f1c1e0a-1b2c-4d3e-8f4a-5b6c7d8e9f00' + ) + expect(redactor.string('else if', 'title')).toBe('else if') + expect(redactor.string('advanced', 'channel')).toBe('advanced') + expect(redactor.string('Escalate to legal', 'title')).toBe('xxxxxxxx xx xxxxx') + }) + + it('strips URL queries and fragments, which can carry tokens', () => { + expect(redactor.string('https://hooks.example.com/a/b?token=s3cret#frag', 'url')).toBe( + 'https://hooks.example.com/a/b?redacted#redacted' + ) + }) + + it('redacts inside JSON text and keeps its keys and shape', () => { + const rows = JSON.stringify([ + { id: 'r1', title: 'Refund policy', value: ' > 2' }, + ]) + expect(JSON.parse(redactor.string(rows, 'conditions'))).toEqual([ + { id: 'r1', title: 'xxxxxx xxxxxx', value: ' > 0' }, + ]) + }) + + it('leaves option ids alone and redacts free text in subBlocks', () => { + expect( + redactor.subBlockValue( + { id: 'operation', type: 'dropdown', value: 'send_message' }, + 'operation' + ) + ).toEqual({ + id: 'operation', + type: 'dropdown', + value: 'send_message', + }) + expect( + redactor.subBlockValue({ id: 'text', type: 'long-input', value: 'Hi Bob' }, 'text') + ).toEqual({ + id: 'text', + type: 'long-input', + value: 'xx xxx', + }) + }) +}) + +describe('stratify', () => { + it('interleaves strata so a small limit spans types, without duplicates', () => { + const pools = new Map([ + ['agent:action', ['w1', 'w2', 'w3']], + ['slack:action', ['w1', 'w4']], + ['gmail:trigger', ['w5']], + ]) + expect(stratify(pools, 3)).toEqual(['w1', 'w5', 'w4']) + expect(stratify(pools, 10)).toEqual(['w1', 'w5', 'w4', 'w2', 'w3']) + }) +}) + +describe('assertOutsideRepo', () => { + it('refuses an output directory inside the repository', () => { + expect(() => assertOutsideRepo(path.resolve(process.cwd(), 'scripts'))).toThrow( + /inside the repo/ + ) + }) +}) diff --git a/apps/sim/scripts/export-redacted-workflows.ts b/apps/sim/scripts/export-redacted-workflows.ts new file mode 100644 index 00000000000..fabad11747f --- /dev/null +++ b/apps/sim/scripts/export-redacted-workflows.ts @@ -0,0 +1,409 @@ +#!/usr/bin/env bun + +/** + * Exports a redacted, block-type-stratified sample of stored workflows for the round-trip corpus + * (s1 §6 "golden set exported from prod and redacted"). The output never belongs in this public + * repo: the script refuses any output directory inside the repository. + * + * Sampling: for every `(block type, trigger mode)` pair the database holds, up to `--per-type` + * workflows are drawn (ordered by a hash of the id, so a re-run picks the same ones), then the + * pools are interleaved round-robin and cut at `--limit`, so a small limit still spreads across + * types instead of filling up with the most common one. + * + * Redaction keeps what the round trip is about and nothing else: + * - kept: object keys, ids (UUIDs and `id`/`*Id`/`*_id` fields), credential references, block and + * subBlock `type`, edge handles, dropdown/operation option ids, numbers, booleans, `null`, and + * URLs (scheme, host and path; query and fragment are redacted); + * - rewritten consistently: block and variable names become ` ` / `var`, and every + * `` / `` reference follows; + * - redacted: every other string. Letters become `x`, digits `0`; whitespace, newlines, + * punctuation, backticks, `${`, `<...>` references and `{{ENV}}` tokens survive, so escaping + * quirks stay in the corpus. JSON-text values are redacted inside and re-encoded. Fields whose + * key looks like a secret (`apiKey`, `token`, `password`, ...) become `REDACTED`. + * + * The states are exported raw (pre-migration), as stored rows; the harness applies no migration. + * + * Usage (never run against production from a laptop; use the sanctioned read replica): + * EXPORT_DATABASE_URL=... bun run apps/sim/scripts/export-redacted-workflows.ts \ + * --out /abs/path/outside/repo --limit 200 [--per-type 3] + * Then: ROUNDTRIP_CORPUS_EXTRA_DIR=/abs/path/outside/repo bun run --cwd apps/sim test \ + * lib/workflows/code/corpus/roundtrip.corpus.test.ts + */ + +import { mkdirSync, realpathSync, writeFileSync } from 'node:fs' +import path from 'node:path' +import { fileURLToPath } from 'node:url' +import { parseArgs } from 'node:util' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' +import { isRecordLike, toRecord } from '@sim/utils/object' +import { compareStrings, escapeRegExp } from '@sim/utils/string' +import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' +import postgres from 'postgres' + +const logger = createLogger('ExportRedactedWorkflows', { enabled: true, logLevel: 'INFO' }) + +const REPO_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), '../../..') +/** Positional branch titles and pair modes are structure, not prose. */ +const STRUCTURAL_VALUE = /^(if|else if|else|Route \d+|basic|advanced)$/i + +const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i +const ID_KEY = /^(id|nodes|.*Id|.*_id|.*Ids)$/ +const CREDENTIAL_KEY = /credential/i +const SECRET_KEY = + /(api[-_]?key|token|secret|password|private[-_]?key|bearer|authorization|signing)/i +const STRUCTURAL_KEYS = new Set([ + 'type', + 'sourceHandle', + 'targetHandle', + 'loopType', + 'parallelType', + 'extent', + 'role', + 'language', + 'usageControl', + 'operation', + 'toolId', + 'fieldType', + 'operator', + 'logicalOperator', + 'direction', + 'mode', +]) +/** SubBlock types whose stored value is an option id or a picked resource id, never prose. */ +const ID_VALUED_SUBBLOCK_TYPES = new Set([ + 'dropdown', + 'oauth-input', + 'file-selector', + 'sheet-selector', + 'project-selector', + 'channel-selector', + 'user-selector', + 'folder-selector', + 'knowledge-base-selector', + 'document-selector', + 'mcp-server-selector', + 'mcp-tool-selector', + 'workflow-selector', + 'table-selector', + 'column-selector', +]) + +/** References and env tokens survive redaction verbatim; the text between them does not. */ +const PROTECTED_TOKEN = /(<[^<>\s]+>|\{\{[^{}]+\}\}|\$\{)/g + +interface Args { + out: string + limit: number + perType: number +} + +function parseCliArgs(): Args { + const { values } = parseArgs({ + options: { + out: { type: 'string' }, + limit: { type: 'string' }, + 'per-type': { type: 'string', default: '3' }, + }, + }) + if (!values.out) throw new Error('--out is required') + const limit = Number(values.limit) + const perType = Number(values['per-type']) + if (!Number.isInteger(limit) || limit <= 0) throw new Error('--limit must be a positive integer') + if (!Number.isInteger(perType) || perType <= 0) + throw new Error('--per-type must be a positive integer') + return { out: path.resolve(values.out), limit, perType } +} + +export function assertOutsideRepo(directory: string): void { + mkdirSync(directory, { recursive: true }) + const real = realpathSync(directory) + const repo = realpathSync(REPO_ROOT) + if (real === repo || real.startsWith(`${repo}${path.sep}`)) { + throw new Error(`Refusing to write redacted production data inside the repo (${real})`) + } +} + +function redactText(text: string): string { + return text + .split(PROTECTED_TOKEN) + .map((part, i) => (i % 2 === 1 ? part : part.replace(/\p{L}/gu, 'x').replace(/\p{N}/gu, '0'))) + .join('') +} + +function redactUrl(text: string): string | null { + try { + const url = new URL(text) + if (url.protocol !== 'http:' && url.protocol !== 'https:') return null + const query = url.search ? '?redacted' : '' + const hash = url.hash ? '#redacted' : '' + return `${url.protocol}//${url.host}${url.pathname}${query}${hash}` + } catch { + return null + } +} + +export class Redactor { + private readonly renames = new Map() + private renamePattern: RegExp | null = null + + constructor(blockNames: Map, variableNames: Map) { + for (const [from, to] of blockNames) this.renames.set(`<${from}.`, `<${to}.`) + for (const [from, to] of blockNames) this.renames.set(`<${from}>`, `<${to}>`) + for (const [from, to] of variableNames) + this.renames.set(``, ``) + for (const [from, to] of variableNames) + this.renames.set(` b.length - a.length) + if (keys.length > 0) this.renamePattern = new RegExp(keys.map(escapeRegExp).join('|'), 'gi') + } + + private rewriteRefs(text: string): string { + if (!this.renamePattern) return text + return text.replace(this.renamePattern, (match) => { + const key = [...this.renames.keys()].find((k) => k.toLowerCase() === match.toLowerCase()) + return key ? (this.renames.get(key) ?? match) : match + }) + } + + string(text: string, key: string | null): string { + if (key && SECRET_KEY.test(key) && !CREDENTIAL_KEY.test(key)) return text ? 'REDACTED' : text + if (UUID.test(text) || STRUCTURAL_VALUE.test(text)) return text + if (key && (ID_KEY.test(key) || CREDENTIAL_KEY.test(key) || STRUCTURAL_KEYS.has(key))) + return text + const url = redactUrl(text.trim()) + if (url !== null) return url + const trimmed = text.trim() + if (trimmed.startsWith('{') || trimmed.startsWith('[')) { + try { + const parsed: unknown = JSON.parse(trimmed) + const indent = /\n(\s+)"/.exec(text)?.[1]?.length ?? 0 + return JSON.stringify(this.value(parsed, key), null, indent || undefined) + } catch { + // Not JSON: fall through to text redaction. + } + } + return redactText(this.rewriteRefs(text)) + } + + value(node: unknown, key: string | null): unknown { + if (typeof node === 'string') return this.string(node, key) + if (Array.isArray(node)) return node.map((item) => this.value(item, key)) + if (isRecordLike(node)) { + const out: Record = {} + for (const [childKey, child] of Object.entries(node)) + out[childKey] = this.value(child, childKey) + return out + } + return node + } + + subBlockValue(subBlock: unknown, subBlockId: string): unknown { + if (!isRecordLike(subBlock)) return subBlock + const type = typeof subBlock.type === 'string' ? subBlock.type : '' + const value = + ID_VALUED_SUBBLOCK_TYPES.has(type) && !SECRET_KEY.test(subBlockId) + ? subBlock.value + : this.value(subBlock.value, subBlockId) + return { ...subBlock, value } + } +} + +interface BlockRow { + id: string + type: string + name: string + position_x: string + position_y: string + enabled: boolean + horizontal_handles: boolean + advanced_mode: boolean + trigger_mode: boolean + error_enabled: boolean + retry: unknown + locked: boolean + height: string + sub_blocks: Record + outputs: Record + data: Record | null +} + +async function exportWorkflow(sql: postgres.Sql, workflowId: string, variablesRaw: unknown) { + const [blocks, edges, subflows] = await Promise.all([ + sql`SELECT * FROM workflow_blocks WHERE workflow_id = ${workflowId} ORDER BY id`, + sql< + Array<{ + id: string + source_block_id: string + target_block_id: string + source_handle: string | null + target_handle: string | null + }> + >`SELECT * FROM workflow_edges WHERE workflow_id = ${workflowId} ORDER BY id`, + sql }>>` + SELECT * FROM workflow_subflows WHERE workflow_id = ${workflowId} ORDER BY id`, + ]) + + const blockNames = new Map() + const renamed = new Map() + const perType = new Map() + for (const block of blocks) { + const n = (perType.get(block.type) ?? 0) + 1 + perType.set(block.type, n) + const name = `${block.type} ${n}` + renamed.set(block.id, name) + blockNames.set(normalizeWorkflowBlockName(block.name), normalizeWorkflowBlockName(name)) + } + + const variables = toRecord(variablesRaw) + const variableNames = new Map() + const variableRenames = new Map() + Object.entries(variables).forEach(([id, variable], i) => { + if (!isRecordLike(variable) || typeof variable.name !== 'string') return + variableNames.set(normalizeWorkflowBlockName(variable.name), `var${i}`) + variableRenames.set(id, `var${i}`) + }) + + const redactor = new Redactor(blockNames, variableNames) + + const stateBlocks: Record = {} + for (const block of blocks) { + const subBlocks: Record = {} + for (const [id, subBlock] of Object.entries(block.sub_blocks ?? {})) { + subBlocks[id] = redactor.subBlockValue(subBlock, id) + } + stateBlocks[block.id] = { + id: block.id, + type: block.type, + name: renamed.get(block.id), + position: { x: Number(block.position_x), y: Number(block.position_y) }, + subBlocks, + outputs: redactor.value(block.outputs ?? {}, 'outputs'), + enabled: block.enabled, + horizontalHandles: block.horizontal_handles, + advancedMode: block.advanced_mode, + triggerMode: block.trigger_mode, + errorEnabled: block.error_enabled, + ...(block.retry ? { retry: block.retry } : {}), + locked: block.locked, + height: Number(block.height), + data: redactor.value(block.data ?? {}, 'data'), + } + } + + const loops: Record = {} + const parallels: Record = {} + for (const subflow of subflows) { + const config = redactor.value(subflow.config, 'config') + if (subflow.type === 'loop') loops[subflow.id] = config + else if (subflow.type === 'parallel') parallels[subflow.id] = config + } + + const redactedVariables: Record = {} + for (const [id, variable] of Object.entries(variables)) { + if (!isRecordLike(variable)) continue + redactedVariables[id] = { + ...variable, + name: variableRenames.get(id) ?? 'var', + value: redactor.value(variable.value, 'value'), + } + } + + return { + blocks: stateBlocks, + edges: edges.map((edge) => ({ + id: edge.id, + source: edge.source_block_id, + target: edge.target_block_id, + sourceHandle: edge.source_handle, + targetHandle: edge.target_handle, + })), + loops, + parallels, + variables: redactedVariables, + } +} + +/** Interleaves per-type pools round-robin, de-duplicating, until `limit` ids are chosen. */ +export function stratify(pools: Map, limit: number): string[] { + const chosen: string[] = [] + const seen = new Set() + const queues = [...pools.entries()] + .sort(([a], [b]) => compareStrings(a, b)) + .map(([, ids]) => [...ids]) + while (chosen.length < limit && queues.some((q) => q.length > 0)) { + for (const queue of queues) { + if (chosen.length >= limit) break + while (queue.length > 0) { + const id = queue.shift() + if (id && !seen.has(id)) { + seen.add(id) + chosen.push(id) + break + } + } + } + } + return chosen +} + +async function main(): Promise { + const args = parseCliArgs() + assertOutsideRepo(args.out) + const connectionString = process.env.EXPORT_DATABASE_URL + if (!connectionString) throw new Error('EXPORT_DATABASE_URL is required') + + const sql = postgres(connectionString, { + prepare: false, + max: 4, + connect_timeout: 30, + onnotice: () => {}, + }) + try { + const sampled = await sql>` + SELECT type, trigger_mode, workflow_id FROM ( + SELECT b.type, b.trigger_mode, b.workflow_id, + row_number() OVER (PARTITION BY b.type, b.trigger_mode ORDER BY md5(b.workflow_id)) AS rn + FROM (SELECT DISTINCT type, trigger_mode, workflow_id FROM workflow_blocks) b + JOIN workflow w ON w.id = b.workflow_id + WHERE w.archived_at IS NULL + ) ranked + WHERE rn <= ${args.perType}` + + const pools = new Map() + for (const row of sampled) { + const key = `${row.type}:${row.trigger_mode ? 'trigger' : 'action'}` + pools.set(key, [...(pools.get(key) ?? []), row.workflow_id]) + } + const workflowIds = stratify(pools, args.limit) + logger.info('Sampled workflows', { strata: pools.size, workflows: workflowIds.length }) + + let written = 0 + for (const [index, workflowId] of workflowIds.entries()) { + try { + const [row] = await sql>` + SELECT variables FROM workflow WHERE id = ${workflowId}` + const state = await exportWorkflow(sql, workflowId, row?.variables) + const file = path.join(args.out, `${String(index).padStart(5, '0')}.json`) + writeFileSync( + file, + `${JSON.stringify({ version: '1.0', exportedAt: new Date().toISOString(), state }, null, 2)}\n` + ) + written += 1 + } catch (error) { + logger.error('Workflow export failed', { workflowId, error: getErrorMessage(error) }) + process.exitCode = 1 + } + } + logger.info('Redacted export complete', { written, out: args.out }) + } finally { + await sql.end() + } +} + +if (import.meta.main) { + main().catch((error) => { + logger.error('Redacted export aborted', { error: getErrorMessage(error) }) + process.exitCode = 1 + }) +} From 01f1ec6cbb7623ae48b199a536deb438843ff136 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:18:05 -0800 Subject: [PATCH 028/428] feat(workflows): frozen sdk builder names with an add-only generator and check sdk-names.json maps every block type to a builder namespace, every operation to a method and every trigger to a trigger method, plus the credential param aliases. generate:sdk-names only adds names; check:sdk-names fails on a missing entry, a collision, or a stale runtime module. --- apps/sim/blocks/sdk-names.generated.ts | 9 + apps/sim/blocks/sdk-names.json | 14455 ++++++++++++++++ .../code/catalog/registry-sources.ts | 27 + .../workflows/code/catalog/sdk-names.test.ts | 164 + .../lib/workflows/code/catalog/sdk-names.ts | 406 + apps/sim/package.json | 1 + apps/sim/scripts/generate-sdk-names.ts | 102 + bun.lock | 1 + package.json | 2 + 9 files changed, 15167 insertions(+) create mode 100644 apps/sim/blocks/sdk-names.generated.ts create mode 100644 apps/sim/blocks/sdk-names.json create mode 100644 apps/sim/lib/workflows/code/catalog/registry-sources.ts create mode 100644 apps/sim/lib/workflows/code/catalog/sdk-names.test.ts create mode 100644 apps/sim/lib/workflows/code/catalog/sdk-names.ts create mode 100644 apps/sim/scripts/generate-sdk-names.ts diff --git a/apps/sim/blocks/sdk-names.generated.ts b/apps/sim/blocks/sdk-names.generated.ts new file mode 100644 index 00000000000..bf4e0dc510b --- /dev/null +++ b/apps/sim/blocks/sdk-names.generated.ts @@ -0,0 +1,9 @@ +// Generated by apps/sim/scripts/generate-sdk-names.ts from blocks/sdk-names.json — do not edit. +// Regenerate with: bun run generate:sdk-names + +import type { SdkNamesFile } from '@/lib/workflows/code/catalog/sdk-names' + +/** The frozen SDK builder names. */ +export const SDK_NAMES: SdkNamesFile = JSON.parse( + '{"version":1,"blocks":{"a2a":{"namespace":"a2a","methods":{"a2a_cancel_task":"cancelTask","a2a_get_agent_card":"getAgentCard","a2a_get_task":"getTask","a2a_send_message":"sendMessage"}},"affinity":{"namespace":"legacy.affinity","methods":{"batch_update_entity_fields":"batchUpdateEntityFields","batch_update_list_entry_fields":"batchUpdateListEntryFields","create_list":"createList","create_list_field_dropdown_option":"createListFieldDropdownOption","create_merge":"createMerge","create_note":"createNote","create_reminder":"createReminder","delete_list_field_dropdown_option":"deleteListFieldDropdownOption","delete_note":"deleteNote","get_company":"getCompany","get_current_user":"getCurrentUser","get_entity_field_value":"getEntityFieldValue","get_list":"getList","get_list_entry":"getListEntry","get_list_entry_field":"getListEntryField","get_list_field_dropdown_option":"getListFieldDropdownOption","get_merge":"getMerge","get_merge_task":"getMergeTask","get_note":"getNote","get_opportunity":"getOpportunity","get_person":"getPerson","get_saved_view":"getSavedView","get_transcript":"getTranscript","get_user":"getUser","list_calls":"listCalls","list_chat_messages":"listChatMessages","list_companies":"listCompanies","list_coworker_connections":"listCoworkerConnections","list_emails":"listEmails","list_entity_field_values":"listEntityFieldValues","list_entity_list_entries":"listRowsHoldingEntity","list_entity_lists":"listListsHoldingEntity","list_entity_notes":"listNotesOnEntity","list_entity_relationships":"listEntityRelationships","list_field_dropdown_options":"listFieldDropdownOptions","list_field_metadata":"listFieldMetadata","list_field_value_changes":"listFieldValueChanges","list_investor_executive_connections":"listInvestorExecutiveConnections","list_list_entries":"listListEntries","list_list_entry_field_value_changes":"listListEntryFieldValueChanges","list_list_entry_fields":"listListEntryFields","list_list_field_dropdown_options":"listListFieldDropdownOptions","list_list_fields":"listListFields","list_lists":"listLists","list_meetings":"listMeetings","list_merge_tasks":"listMergeTasks","list_merges":"listMerges","list_note_attached_companies":"listNoteAttachedCompanies","list_note_attached_opportunities":"listNoteAttachedOpportunities","list_note_attached_persons":"listNoteAttachedPeople","list_note_replies":"listNoteReplies","list_notes":"listNotes","list_opportunities":"listOpportunities","list_persons":"listPeople","list_reminders":"listReminders","list_saved_view_entries":"listSavedViewEntries","list_saved_views":"listSavedViews","list_transcript_fragments":"listTranscriptFragments","list_transcripts":"listTranscripts","list_users":"listUsers","search_companies":"searchCompanies","search_files":"searchFiles","search_list_entries":"searchListEntries","search_notes":"searchNotes","search_persons":"searchPeople","semantic_search":"semanticSearch","update_entity_field_value":"updateEntityFieldValue","update_list_entry_field":"updateListEntryField","update_list_field_dropdown_option":"updateListFieldDropdownOption","update_note":"updateNote"}},"affinity_v2":{"namespace":"affinity","methods":{"batch_update_entity_fields":"batchUpdateEntityFields","batch_update_list_entry_fields":"batchUpdateListEntryFields","create_list":"createList","create_list_field_dropdown_option":"createListFieldDropdownOption","create_merge":"createMerge","create_note":"createNote","create_reminder":"createReminder","delete_list_field_dropdown_option":"deleteListFieldDropdownOption","delete_note":"deleteNote","get_company":"getCompany","get_current_user":"getCurrentUser","get_entity_field_value":"getEntityFieldValue","get_list":"getList","get_list_entry":"getListEntry","get_list_entry_field":"getListEntryField","get_list_field_dropdown_option":"getListFieldDropdownOption","get_merge":"getMerge","get_merge_task":"getMergeTask","get_note":"getNote","get_opportunity":"getOpportunity","get_person":"getPerson","get_saved_view":"getSavedView","get_transcript":"getTranscript","get_user":"getUser","list_calls":"listCalls","list_chat_messages":"listChatMessages","list_companies":"listCompanies","list_coworker_connections":"listCoworkerConnections","list_emails":"listEmails","list_entity_field_values":"listEntityFieldValues","list_entity_list_entries":"listRowsHoldingEntity","list_entity_lists":"listListsHoldingEntity","list_entity_notes":"listNotesOnEntity","list_entity_relationships":"listEntityRelationships","list_field_dropdown_options":"listFieldDropdownOptions","list_field_metadata":"listFieldMetadata","list_field_value_changes":"listFieldValueChanges","list_investor_executive_connections":"listInvestorExecutiveConnections","list_list_entries":"listListEntries","list_list_entry_field_value_changes":"listListEntryFieldValueChanges","list_list_entry_fields":"listListEntryFields","list_list_field_dropdown_options":"listListFieldDropdownOptions","list_list_fields":"listListFields","list_lists":"listLists","list_meetings":"listMeetings","list_merge_tasks":"listMergeTasks","list_merges":"listMerges","list_note_attached_companies":"listNoteAttachedCompanies","list_note_attached_opportunities":"listNoteAttachedOpportunities","list_note_attached_persons":"listNoteAttachedPeople","list_note_replies":"listNoteReplies","list_notes":"listNotes","list_opportunities":"listOpportunities","list_persons":"listPeople","list_reminders":"listReminders","list_saved_view_entries":"listSavedViewEntries","list_saved_views":"listSavedViews","list_transcript_fragments":"listTranscriptFragments","list_transcripts":"listTranscripts","list_users":"listUsers","search_companies":"searchCompanies","search_files":"searchFiles","search_list_entries":"searchListEntries","search_notes":"searchNotes","search_persons":"searchPeople","semantic_search":"semanticSearch","update_entity_field_value":"updateEntityFieldValue","update_list_entry_field":"updateListEntryField","update_list_field_dropdown_option":"updateListFieldDropdownOption","update_note":"updateNote"},"params":{"action":{"oauthCredential":"credential"}}},"agent":{"namespace":"agent"},"agentmail":{"namespace":"legacy.agentmail","methods":{"create_draft":"createDraft","create_inbox":"createInbox","delete_draft":"deleteDraft","delete_inbox":"deleteInbox","delete_thread":"deleteThread","forward_message":"forwardMessage","get_draft":"getDraft","get_inbox":"getInbox","get_message":"getMessage","get_thread":"getThread","list_drafts":"listDrafts","list_inboxes":"listInboxes","list_messages":"listMessages","list_threads":"listThreads","reply_message":"replyToMessage","send_draft":"sendDraft","send_message":"sendMessage","update_draft":"updateDraft","update_inbox":"updateInbox","update_message":"updateMessageLabels","update_thread":"updateThreadLabels"}},"agentmail_v2":{"namespace":"agentmail","methods":{"create_draft":"createDraft","create_inbox":"createInbox","delete_draft":"deleteDraft","delete_inbox":"deleteInbox","delete_thread":"deleteThread","forward_message":"forwardMessage","get_draft":"getDraft","get_inbox":"getInbox","get_message":"getMessage","get_thread":"getThread","list_drafts":"listDrafts","list_inboxes":"listInboxes","list_messages":"listMessages","list_threads":"listThreads","reply_message":"replyToMessage","send_draft":"sendDraft","send_message":"sendMessage","update_draft":"updateDraft","update_inbox":"updateInbox","update_message":"updateMessageLabels","update_thread":"updateThreadLabels"},"params":{"action":{"oauthCredential":"credential"}}},"agentphone":{"namespace":"legacy.agentphone","methods":{"create_call":"createCall","create_contact":"createContact","create_number":"createNumber","delete_contact":"deleteContact","get_call":"getCall","get_call_transcript":"getCallTranscript","get_contact":"getContact","get_conversation":"getConversation","get_conversation_messages":"getConversationMessages","get_number_messages":"getNumberMessages","get_usage":"getUsage","get_usage_daily":"getDailyUsage","get_usage_monthly":"getMonthlyUsage","list_calls":"listCalls","list_contacts":"listContacts","list_conversations":"listConversations","list_numbers":"listNumbers","react_to_message":"reactToMessage","release_number":"releaseNumber","send_message":"sendMessage","update_contact":"updateContact","update_conversation":"updateConversation"}},"agentphone_v2":{"namespace":"agentphone","methods":{"create_call":"createCall","create_contact":"createContact","create_number":"createNumber","delete_contact":"deleteContact","get_call":"getCall","get_call_transcript":"getCallTranscript","get_contact":"getContact","get_conversation":"getConversation","get_conversation_messages":"getConversationMessages","get_number_messages":"getNumberMessages","get_usage":"getUsage","get_usage_daily":"getDailyUsage","get_usage_monthly":"getMonthlyUsage","list_calls":"listCalls","list_contacts":"listContacts","list_conversations":"listConversations","list_numbers":"listNumbers","react_to_message":"reactToMessage","release_number":"releaseNumber","send_message":"sendMessage","update_contact":"updateContact","update_conversation":"updateConversation"},"params":{"action":{"oauthCredential":"credential"}}},"agiloft":{"namespace":"agiloft","methods":{"async_status":"asyncStatus","attach_file":"attachFile","attachment_info":"attachmentInfo","create_record":"createRecord","delete_record":"deleteRecord","get_choice_line_id":"getChoiceLineId","list_tables":"listTablesFields","lock_record":"lockRecord","nlp_search":"naturalLanguageSearch","read_record":"readRecord","remove_attachment":"removeAttachment","retrieve_attachment":"retrieveAttachment","run_action_button":"runActionButton","saved_search":"savedSearch","search_records":"searchRecords","select_records":"selectRecords","update_record":"updateRecord","upsert_record":"upsertRecord"}},"ahrefs":{"namespace":"legacy.ahrefs","methods":{"ahrefs_anchors":"anchors","ahrefs_backlinks":"backlinks","ahrefs_backlinks_stats":"backlinksStats","ahrefs_batch_analysis":"batchAnalysis","ahrefs_broken_backlinks":"brokenBacklinks","ahrefs_domain_rating":"domainRating","ahrefs_domain_rating_history":"domainRatingHistory","ahrefs_keyword_overview":"keywordOverview","ahrefs_keywords_history":"keywordsHistory","ahrefs_metrics":"metricsOverview","ahrefs_metrics_history":"metricsHistory","ahrefs_organic_competitors":"organicCompetitors","ahrefs_organic_keywords":"organicKeywords","ahrefs_paid_pages":"paidPages","ahrefs_rank_tracker_competitors_overview":"rankTrackerCompetitorsOverview","ahrefs_rank_tracker_competitors_stats":"rankTrackerCompetitorsStats","ahrefs_rank_tracker_overview":"rankTrackerOverview","ahrefs_rank_tracker_serp_overview":"rankTrackerSerpOverview","ahrefs_refdomains_history":"referringDomainsHistory","ahrefs_referring_domains":"referringDomains","ahrefs_related_terms":"relatedTerms","ahrefs_site_audit_page_explorer":"siteAuditPageExplorer","ahrefs_top_pages":"topPages"}},"ahrefs_v2":{"namespace":"ahrefs","methods":{"ahrefs_anchors":"anchors","ahrefs_backlinks":"backlinks","ahrefs_backlinks_stats":"backlinksStats","ahrefs_batch_analysis":"batchAnalysis","ahrefs_broken_backlinks":"brokenBacklinks","ahrefs_domain_rating":"domainRating","ahrefs_domain_rating_history":"domainRatingHistory","ahrefs_keyword_overview":"keywordOverview","ahrefs_keywords_history":"keywordsHistory","ahrefs_metrics":"metricsOverview","ahrefs_metrics_history":"metricsHistory","ahrefs_organic_competitors":"organicCompetitors","ahrefs_organic_keywords":"organicKeywords","ahrefs_paid_pages":"paidPages","ahrefs_rank_tracker_competitors_overview":"rankTrackerCompetitorsOverview","ahrefs_rank_tracker_competitors_stats":"rankTrackerCompetitorsStats","ahrefs_rank_tracker_overview":"rankTrackerOverview","ahrefs_rank_tracker_serp_overview":"rankTrackerSerpOverview","ahrefs_refdomains_history":"referringDomainsHistory","ahrefs_referring_domains":"referringDomains","ahrefs_related_terms":"relatedTerms","ahrefs_site_audit_page_explorer":"siteAuditPageExplorer","ahrefs_top_pages":"topPages"},"params":{"action":{"oauthCredential":"credential"}}},"airtable":{"namespace":"airtable","methods":{"create":"createRecords","delete":"deleteRecords","get":"getRecord","getSchema":"getBaseSchema","list":"listRecords","listBases":"listBases","listTables":"listTables","update":"updateRecord","updateMultiple":"updateMultipleRecords","upsert":"upsertRecords"},"triggers":{"airtable_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"algolia":{"namespace":"legacy.algolia","methods":{"add_record":"addRecord","batch_operations":"batchOperations","browse_records":"browseRecords","clear_records":"clearRecords","copy_move_index":"copyMoveIndex","delete_by_filter":"deleteByFilter","delete_index":"deleteIndex","delete_record":"deleteRecord","get_record":"getRecord","get_records":"getRecords","get_settings":"getSettings","get_task_status":"getTaskStatus","list_indices":"listIndices","partial_update_record":"partialUpdateRecord","search":"search","update_settings":"updateSettings"}},"algolia_v2":{"namespace":"algolia","methods":{"add_record":"addRecord","batch_operations":"batchOperations","browse_records":"browseRecords","clear_records":"clearRecords","copy_move_index":"copyMoveIndex","delete_by_filter":"deleteByFilter","delete_index":"deleteIndex","delete_record":"deleteRecord","get_record":"getRecord","get_records":"getRecords","get_settings":"getSettings","get_task_status":"getTaskStatus","list_indices":"listIndices","partial_update_record":"partialUpdateRecord","search":"search","update_settings":"updateSettings"},"params":{"action":{"oauthCredential":"credential"}}},"amplitude":{"namespace":"legacy.amplitude","methods":{"event_segmentation":"eventSegmentation","funnels":"funnels","get_active_users":"getActiveUsers","get_revenue":"getRevenue","group_identify":"groupIdentify","identify_user":"identifyUser","list_events":"listEvents","realtime_active_users":"realTimeActiveUsers","retention":"retention","send_event":"sendEvent","user_activity":"userActivity","user_profile":"userProfile","user_search":"userSearch"}},"amplitude_v2":{"namespace":"amplitude","methods":{"event_segmentation":"eventSegmentation","funnels":"funnels","get_active_users":"getActiveUsers","get_revenue":"getRevenue","group_identify":"groupIdentify","identify_user":"identifyUser","list_events":"listEvents","realtime_active_users":"realTimeActiveUsers","retention":"retention","send_event":"sendEvent","user_activity":"userActivity","user_profile":"userProfile","user_search":"userSearch"},"params":{"action":{"oauthCredential":"credential"}}},"api":{"namespace":"api"},"api_trigger":{"namespace":"legacy.apiTrigger"},"apify":{"namespace":"legacy.apify","methods":{"apify_get_dataset_items":"getDatasetItems","apify_get_run":"getRun","apify_run_actor_async":"runActorAsync","apify_run_actor_sync":"runActor","apify_run_task":"runTask"}},"apify_v2":{"namespace":"apify","methods":{"apify_get_dataset_items":"getDatasetItems","apify_get_run":"getRun","apify_run_actor_async":"runActorAsync","apify_run_actor_sync":"runActor","apify_run_task":"runTask"},"params":{"action":{"oauthCredential":"credential"}}},"apollo":{"namespace":"legacy.apollo","methods":{"account_bulk_create":"bulkCreateAccounts","account_bulk_update":"bulkUpdateAccounts","account_create":"createAccount","account_search":"searchAccounts","account_update":"updateAccount","contact_bulk_create":"bulkCreateContacts","contact_bulk_update":"bulkUpdateContacts","contact_create":"createContact","contact_search":"searchContacts","contact_update":"updateContact","email_accounts":"getEmailAccounts","opportunity_create":"createOpportunity","opportunity_get":"getOpportunity","opportunity_search":"searchOpportunities","opportunity_update":"updateOpportunity","organization_bulk_enrich":"bulkEnrichOrganizations","organization_enrich":"enrichOrganization","organization_search":"searchOrganizations","people_bulk_enrich":"bulkEnrichPeople","people_enrich":"enrichPerson","people_search":"searchPeople","sequence_add":"addToSequence","sequence_search":"searchSequences","task_create":"createTask","task_search":"searchTasks"}},"apollo_v2":{"namespace":"apollo","methods":{"account_bulk_create":"bulkCreateAccounts","account_bulk_update":"bulkUpdateAccounts","account_create":"createAccount","account_search":"searchAccounts","account_update":"updateAccount","contact_bulk_create":"bulkCreateContacts","contact_bulk_update":"bulkUpdateContacts","contact_create":"createContact","contact_search":"searchContacts","contact_update":"updateContact","email_accounts":"getEmailAccounts","opportunity_create":"createOpportunity","opportunity_get":"getOpportunity","opportunity_search":"searchOpportunities","opportunity_update":"updateOpportunity","organization_bulk_enrich":"bulkEnrichOrganizations","organization_enrich":"enrichOrganization","organization_search":"searchOrganizations","people_bulk_enrich":"bulkEnrichPeople","people_enrich":"enrichPerson","people_search":"searchPeople","sequence_add":"addToSequence","sequence_search":"searchSequences","task_create":"createTask","task_search":"searchTasks"},"params":{"action":{"oauthCredential":"credential"}}},"appconfig":{"namespace":"legacy.appconfig","methods":{"create_application":"createApplication","create_configuration_profile":"createConfigurationProfile","create_environment":"createEnvironment","create_hosted_configuration_version":"createHostedConfigurationVersion","delete_application":"deleteApplication","delete_configuration_profile":"deleteConfigurationProfile","delete_environment":"deleteEnvironment","delete_hosted_configuration_version":"deleteHostedConfigurationVersion","get_application":"getApplication","get_configuration":"getConfiguration","get_configuration_profile":"getConfigurationProfile","get_deployment":"getDeployment","get_environment":"getEnvironment","get_hosted_configuration_version":"getHostedConfigurationVersion","list_applications":"listApplications","list_configuration_profiles":"listConfigurationProfiles","list_deployment_strategies":"listDeploymentStrategies","list_deployments":"listDeployments","list_environments":"listEnvironments","list_hosted_configuration_versions":"listHostedConfigurationVersions","start_deployment":"startDeployment","stop_deployment":"stopDeployment","update_application":"updateApplication","update_configuration_profile":"updateConfigurationProfile","update_environment":"updateEnvironment"}},"appconfig_v2":{"namespace":"appconfig","methods":{"create_application":"createApplication","create_configuration_profile":"createConfigurationProfile","create_environment":"createEnvironment","create_hosted_configuration_version":"createHostedConfigurationVersion","delete_application":"deleteApplication","delete_configuration_profile":"deleteConfigurationProfile","delete_environment":"deleteEnvironment","delete_hosted_configuration_version":"deleteHostedConfigurationVersion","get_application":"getApplication","get_configuration":"getConfiguration","get_configuration_profile":"getConfigurationProfile","get_deployment":"getDeployment","get_environment":"getEnvironment","get_hosted_configuration_version":"getHostedConfigurationVersion","list_applications":"listApplications","list_configuration_profiles":"listConfigurationProfiles","list_deployment_strategies":"listDeploymentStrategies","list_deployments":"listDeployments","list_environments":"listEnvironments","list_hosted_configuration_versions":"listHostedConfigurationVersions","start_deployment":"startDeployment","stop_deployment":"stopDeployment","update_application":"updateApplication","update_configuration_profile":"updateConfigurationProfile","update_environment":"updateEnvironment"},"params":{"action":{"oauthCredential":"credential"}}},"arxiv":{"namespace":"arxiv","methods":{"arxiv_get_author_papers":"getAuthorPapers","arxiv_get_paper":"getPaperDetails","arxiv_search":"searchPapers"}},"asana":{"namespace":"asana","methods":{"add_comment":"addComment","add_followers":"addFollowers","create_project":"createProject","create_section":"createSection","create_subtask":"createSubtask","create_task":"createTask","delete_task":"deleteTask","get_project":"getProject","get_projects":"getProjects","get_task":"getTask","list_sections":"listSections","list_workspaces":"listWorkspaces","search_tasks":"searchTasks","update_task":"updateTask"},"params":{"action":{"oauthCredential":"credential"}}},"ashby":{"namespace":"legacy.ashby","methods":{"add_candidate_tag":"addCandidateTag","anonymize_candidate":"anonymizeCandidate","change_application_source":"changeApplicationSource","change_application_stage":"changeApplicationStage","create_application":"createApplication","create_candidate":"createCandidate","create_note":"createNote","delete_application":"deleteApplication","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_job_posting":"getJobPosting","get_offer":"getOffer","get_opening":"getOpening","list_application_feedback":"listApplicationFeedback","list_application_history":"listApplicationHistory","list_applications":"listApplications","list_archive_reasons":"listArchiveReasons","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_interview_plans":"listInterviewPlans","list_interview_stages":"listInterviewStages","list_interviews":"listInterviews","list_job_postings":"listJobPostings","list_jobs":"listJobs","list_locations":"listLocations","list_notes":"listNotes","list_offers":"listOffers","list_openings":"listOpenings","list_sources":"listSources","list_users":"listUsers","remove_candidate_tag":"removeCandidateTag","search_candidates":"searchCandidates","search_jobs":"searchJobs","search_openings":"searchOpenings","search_users":"searchUsers","set_custom_field_value":"setCustomFieldValue","set_custom_field_values":"setCustomFieldValues","transfer_application":"transferApplication","update_candidate":"updateCandidate","upload_candidate_file":"uploadCandidateFile","upload_resume":"uploadResume"},"triggers":{"ashby_application_submit":"applicationSubmit","ashby_application_update":"applicationUpdate","ashby_candidate_delete":"candidateDelete","ashby_candidate_hire":"candidateHire","ashby_candidate_merge":"candidateMerge","ashby_candidate_stage_change":"candidateStageChange","ashby_interview_schedule_create":"interviewScheduleCreate","ashby_interview_schedule_update":"interviewScheduleUpdate","ashby_job_create":"jobCreate","ashby_job_posting_delete":"jobPostingDelete","ashby_job_posting_update":"jobPostingUpdate","ashby_job_update":"jobUpdate","ashby_offer_create":"offerCreate","ashby_offer_delete":"offerDelete","ashby_offer_update":"offerUpdate","ashby_opening_create":"openingCreate","ashby_signature_request_update":"signatureRequestUpdate"}},"ashby_v2":{"namespace":"ashby","methods":{"add_candidate_tag":"addCandidateTag","anonymize_candidate":"anonymizeCandidate","change_application_source":"changeApplicationSource","change_application_stage":"changeApplicationStage","create_application":"createApplication","create_candidate":"createCandidate","create_note":"createNote","delete_application":"deleteApplication","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_job_posting":"getJobPosting","get_offer":"getOffer","get_opening":"getOpening","list_application_feedback":"listApplicationFeedback","list_application_history":"listApplicationHistory","list_applications":"listApplications","list_archive_reasons":"listArchiveReasons","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_interview_plans":"listInterviewPlans","list_interview_stages":"listInterviewStages","list_interviews":"listInterviews","list_job_postings":"listJobPostings","list_jobs":"listJobs","list_locations":"listLocations","list_notes":"listNotes","list_offers":"listOffers","list_openings":"listOpenings","list_sources":"listSources","list_users":"listUsers","remove_candidate_tag":"removeCandidateTag","search_candidates":"searchCandidates","search_jobs":"searchJobs","search_openings":"searchOpenings","search_users":"searchUsers","set_custom_field_value":"setCustomFieldValue","set_custom_field_values":"setCustomFieldValues","transfer_application":"transferApplication","update_candidate":"updateCandidate","upload_candidate_file":"uploadCandidateFile","upload_resume":"uploadResume"},"triggers":{"ashby_application_submit":"applicationSubmit","ashby_application_update":"applicationUpdate","ashby_candidate_delete":"candidateDelete","ashby_candidate_hire":"candidateHire","ashby_candidate_merge":"candidateMerge","ashby_candidate_stage_change":"candidateStageChange","ashby_interview_schedule_create":"interviewScheduleCreate","ashby_interview_schedule_update":"interviewScheduleUpdate","ashby_job_create":"jobCreate","ashby_job_posting_delete":"jobPostingDelete","ashby_job_posting_update":"jobPostingUpdate","ashby_job_update":"jobUpdate","ashby_offer_create":"offerCreate","ashby_offer_delete":"offerDelete","ashby_offer_update":"offerUpdate","ashby_opening_create":"openingCreate","ashby_signature_request_update":"signatureRequestUpdate"},"params":{"action":{"oauthCredential":"credential"}}},"athena":{"namespace":"legacy.athena","methods":{"batch_get_named_query":"batchGetNamedQueries","batch_get_prepared_statement":"batchGetPreparedStatements","batch_get_query_execution":"batchGetQueryExecutions","create_named_query":"createNamedQuery","create_prepared_statement":"createPreparedStatement","delete_named_query":"deleteNamedQuery","delete_prepared_statement":"deletePreparedStatement","get_data_catalog":"getDataCatalog","get_database":"getDatabase","get_named_query":"getNamedQuery","get_prepared_statement":"getPreparedStatement","get_query_execution":"getQueryExecution","get_query_results":"getQueryResults","get_query_runtime_statistics":"getQueryRuntimeStatistics","get_table_metadata":"getTableMetadata","get_work_group":"getWorkgroup","list_data_catalogs":"listDataCatalogs","list_databases":"listDatabases","list_named_queries":"listNamedQueries","list_prepared_statements":"listPreparedStatements","list_query_executions":"listQueryExecutions","list_table_metadata":"listTableMetadata","list_work_groups":"listWorkgroups","start_query":"startQuery","stop_query":"stopQuery","update_named_query":"updateNamedQuery","update_prepared_statement":"updatePreparedStatement"}},"athena_v2":{"namespace":"athena","methods":{"batch_get_named_query":"batchGetNamedQueries","batch_get_prepared_statement":"batchGetPreparedStatements","batch_get_query_execution":"batchGetQueryExecutions","create_named_query":"createNamedQuery","create_prepared_statement":"createPreparedStatement","delete_named_query":"deleteNamedQuery","delete_prepared_statement":"deletePreparedStatement","get_data_catalog":"getDataCatalog","get_database":"getDatabase","get_named_query":"getNamedQuery","get_prepared_statement":"getPreparedStatement","get_query_execution":"getQueryExecution","get_query_results":"getQueryResults","get_query_runtime_statistics":"getQueryRuntimeStatistics","get_table_metadata":"getTableMetadata","get_work_group":"getWorkgroup","list_data_catalogs":"listDataCatalogs","list_databases":"listDatabases","list_named_queries":"listNamedQueries","list_prepared_statements":"listPreparedStatements","list_query_executions":"listQueryExecutions","list_table_metadata":"listTableMetadata","list_work_groups":"listWorkgroups","start_query":"startQuery","stop_query":"stopQuery","update_named_query":"updateNamedQuery","update_prepared_statement":"updatePreparedStatement"},"params":{"action":{"oauthCredential":"credential"}}},"attio":{"namespace":"attio","methods":{"assert_record":"assertRecordUpsert","create_attribute":"createAttribute","create_comment":"createComment","create_list":"createList","create_list_entry":"createListEntry","create_note":"createNote","create_object":"createObject","create_record":"createRecord","create_task":"createTask","create_webhook":"createWebhook","delete_comment":"deleteComment","delete_list_entry":"deleteListEntry","delete_note":"deleteNote","delete_record":"deleteRecord","delete_task":"deleteTask","delete_webhook":"deleteWebhook","get_attribute":"getAttribute","get_comment":"getComment","get_list":"getList","get_list_entry":"getListEntry","get_member":"getMember","get_note":"getNote","get_object":"getObject","get_record":"getRecord","get_task":"getTask","get_thread":"getThread","get_webhook":"getWebhook","list_attributes":"listAttributes","list_lists":"listLists","list_members":"listMembers","list_notes":"listNotes","list_objects":"listObjects","list_records":"listRecords","list_tasks":"listTasks","list_threads":"listThreads","list_webhooks":"listWebhooks","query_list_entries":"queryListEntries","search_records":"searchRecords","update_attribute":"updateAttribute","update_list":"updateList","update_list_entry":"updateListEntry","update_object":"updateObject","update_record":"updateRecord","update_task":"updateTask","update_webhook":"updateWebhook"},"triggers":{"attio_comment_created":"commentCreated","attio_comment_deleted":"commentDeleted","attio_comment_resolved":"commentResolved","attio_comment_unresolved":"commentUnresolved","attio_list_created":"listCreated","attio_list_deleted":"listDeleted","attio_list_entry_created":"listEntryCreated","attio_list_entry_deleted":"listEntryDeleted","attio_list_entry_updated":"listEntryUpdated","attio_list_updated":"listUpdated","attio_note_created":"noteCreated","attio_note_deleted":"noteDeleted","attio_note_updated":"noteUpdated","attio_record_created":"recordCreated","attio_record_deleted":"recordDeleted","attio_record_merged":"recordMerged","attio_record_updated":"recordUpdated","attio_task_created":"taskCreated","attio_task_deleted":"taskDeleted","attio_task_updated":"taskUpdated","attio_webhook":"webhook","attio_workspace_member_created":"workspaceMemberCreated"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"azure_data_explorer":{"namespace":"legacy.azureDataExplorer","methods":{"azure_data_explorer_create_table":"createTable","azure_data_explorer_drop_table":"dropTable","azure_data_explorer_ingest_from_query":"ingestFromQuery","azure_data_explorer_ingest_inline":"ingestRowsInline","azure_data_explorer_list_databases":"listDatabases","azure_data_explorer_list_functions":"listFunctions","azure_data_explorer_list_tables":"listTables","azure_data_explorer_management":"managementCommandAdvanced","azure_data_explorer_query":"runQuery","azure_data_explorer_show_database_schema":"showDatabaseSchema","azure_data_explorer_show_ingestion_failures":"showIngestionFailures","azure_data_explorer_show_operations":"showOperations","azure_data_explorer_show_table_details":"showTableDetails","azure_data_explorer_show_table_schema":"showTableSchema"}},"azure_data_explorer_v2":{"namespace":"azureDataExplorer","methods":{"azure_data_explorer_create_table":"createTable","azure_data_explorer_drop_table":"dropTable","azure_data_explorer_ingest_from_query":"ingestFromQuery","azure_data_explorer_ingest_inline":"ingestRowsInline","azure_data_explorer_list_databases":"listDatabases","azure_data_explorer_list_functions":"listFunctions","azure_data_explorer_list_tables":"listTables","azure_data_explorer_management":"managementCommandAdvanced","azure_data_explorer_query":"runQuery","azure_data_explorer_show_database_schema":"showDatabaseSchema","azure_data_explorer_show_ingestion_failures":"showIngestionFailures","azure_data_explorer_show_operations":"showOperations","azure_data_explorer_show_table_details":"showTableDetails","azure_data_explorer_show_table_schema":"showTableSchema"},"params":{"action":{"oauthCredential":"credential"}}},"azure_devops":{"namespace":"legacy.azureDevops","methods":{"azure_devops_add_comment":"addComment","azure_devops_create_work_item":"createWorkItem","azure_devops_get_build_log":"getBuildLog","azure_devops_get_build_timeline":"getBuildTimeline","azure_devops_get_comments":"getComments","azure_devops_get_pipeline":"getPipeline","azure_devops_get_pipeline_run":"getPipelineRun","azure_devops_get_work_item":"getWorkItem","azure_devops_get_work_items_batch":"getWorkItemsBatch","azure_devops_get_work_items_between_builds":"getWorkItemsBetweenBuilds","azure_devops_list_build_logs":"listBuildLogs","azure_devops_list_builds":"listBuilds","azure_devops_list_pipeline_runs":"listPipelineRuns","azure_devops_list_pipelines":"listPipelines","azure_devops_query_work_items":"queryWorkItems","azure_devops_update_work_item":"updateWorkItem"},"triggers":{"azure_devops_build_failed":"buildFailed","azure_devops_webhook":"webhook","azure_devops_work_item_created":"workItemCreated"}},"azure_devops_v2":{"namespace":"azureDevops","methods":{"azure_devops_add_comment":"addComment","azure_devops_create_work_item":"createWorkItem","azure_devops_get_build_log":"getBuildLog","azure_devops_get_build_timeline":"getBuildTimeline","azure_devops_get_comments":"getComments","azure_devops_get_pipeline":"getPipeline","azure_devops_get_pipeline_run":"getPipelineRun","azure_devops_get_work_item":"getWorkItem","azure_devops_get_work_items_batch":"getWorkItemsBatch","azure_devops_get_work_items_between_builds":"getWorkItemsBetweenBuilds","azure_devops_list_build_logs":"listBuildLogs","azure_devops_list_builds":"listBuilds","azure_devops_list_pipeline_runs":"listPipelineRuns","azure_devops_list_pipelines":"listPipelines","azure_devops_query_work_items":"queryWorkItems","azure_devops_update_work_item":"updateWorkItem"},"triggers":{"azure_devops_build_failed":"buildFailed","azure_devops_webhook":"webhook","azure_devops_work_item_created":"workItemCreated"},"params":{"action":{"oauthCredential":"credential"}}},"bitbucket":{"namespace":"bitbucket","methods":{"bitbucket_approve_pull_request":"approvePullRequest","bitbucket_create_branch":"createBranch","bitbucket_create_pull_request":"createPullRequest","bitbucket_create_pull_request_comment":"createPullRequestComment","bitbucket_decline_pull_request":"declinePullRequest","bitbucket_delete_branch":"deleteBranch","bitbucket_get_commit":"getCommit","bitbucket_get_file":"getFile","bitbucket_get_file_metadata":"getFileMetadata","bitbucket_get_pipeline":"getPipeline","bitbucket_get_pipeline_step_log":"getPipelineStepLog","bitbucket_get_pull_request":"getPullRequest","bitbucket_get_pull_request_diff":"getPullRequestDiff","bitbucket_get_pull_request_diffstat":"getPullRequestDiffstat","bitbucket_get_pull_request_merge_task_status":"getPullRequestMergeTaskStatus","bitbucket_get_repository":"getRepository","bitbucket_list_branches":"listBranches","bitbucket_list_commits":"listCommits","bitbucket_list_directory":"listDirectory","bitbucket_list_pipeline_steps":"listPipelineSteps","bitbucket_list_pipelines":"listPipelines","bitbucket_list_pull_request_comments":"listPullRequestComments","bitbucket_list_pull_request_commit_statuses":"listPullRequestCommitStatuses","bitbucket_list_pull_requests":"listPullRequests","bitbucket_list_repositories":"listRepositories","bitbucket_list_workspaces":"listWorkspaces","bitbucket_merge_pull_request":"mergePullRequest","bitbucket_request_pull_request_changes":"requestPullRequestChanges","bitbucket_stop_pipeline":"stopPipeline","bitbucket_trigger_pipeline":"triggerPipeline"},"triggers":{"bitbucket_build_status_created":"buildStatusCreated","bitbucket_build_status_updated":"buildStatusUpdated","bitbucket_commit_comment_created":"commitCommentCreated","bitbucket_pull_request_approval_removed":"pullRequestApprovalRemoved","bitbucket_pull_request_approved":"pullRequestApproved","bitbucket_pull_request_changes_request_removed":"pullRequestChangesRequestRemoved","bitbucket_pull_request_changes_requested":"pullRequestChangesRequested","bitbucket_pull_request_comment_created":"pullRequestCommentCreated","bitbucket_pull_request_comment_deleted":"pullRequestCommentDeleted","bitbucket_pull_request_comment_reopened":"pullRequestCommentReopened","bitbucket_pull_request_comment_resolved":"pullRequestCommentResolved","bitbucket_pull_request_comment_updated":"pullRequestCommentUpdated","bitbucket_pull_request_created":"pullRequestCreated","bitbucket_pull_request_declined":"pullRequestDeclined","bitbucket_pull_request_merged":"pullRequestMerged","bitbucket_pull_request_updated":"pullRequestUpdated","bitbucket_push":"push","bitbucket_repository_forked":"repositoryForked","bitbucket_repository_updated":"repositoryUpdated"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"box":{"namespace":"legacy.box","methods":{"copy_file":"copyFile","create_folder":"createFolder","delete_file":"deleteFile","delete_folder":"deleteFolder","download_file":"downloadFile","get_file_info":"getFileInfo","list_folder_items":"listFolderItems","search":"search","sign_cancel_request":"cancelSignRequest","sign_create_request":"createSignRequest","sign_get_request":"getSignRequest","sign_list_requests":"listSignRequests","sign_resend_request":"resendSignRequest","update_file":"updateFile","upload_file":"uploadFile"}},"box_v2":{"namespace":"box","methods":{"copy_file":"copyFile","create_folder":"createFolder","delete_file":"deleteFile","delete_folder":"deleteFolder","download_file":"downloadFile","get_file_info":"getFileInfo","list_folder_items":"listFolderItems","search":"search","sign_cancel_request":"cancelSignRequest","sign_create_request":"createSignRequest","sign_get_request":"getSignRequest","sign_list_requests":"listSignRequests","sign_resend_request":"resendSignRequest","update_file":"updateFile","upload_file":"uploadFile"}},"brandfetch":{"namespace":"brandfetch","methods":{"get_brand":"getBrand","search":"searchBrands"}},"brex":{"namespace":"legacy.brex","methods":{"archive_budget":"archiveBudget","create_budget":"createBudget","create_spend_limit":"createSpendLimit","create_transfer":"createTransfer","create_vendor":"createVendor","get_budget":"getBudget","get_cash_account":"getCashAccount","get_company":"getCompany","get_current_user":"getCurrentUser","get_expense":"getExpense","get_spend_limit":"getSpendLimit","get_transfer":"getTransfer","get_user":"getUser","get_vendor":"getVendor","list_budgets":"listBudgets","list_card_accounts":"listCardAccounts","list_card_statements":"listCardStatements","list_card_transactions":"listCardTransactions","list_cards":"listCards","list_cash_accounts":"listCashAccounts","list_cash_statements":"listCashStatements","list_cash_transactions":"listCashTransactions","list_departments":"listDepartments","list_expenses":"listExpenses","list_locations":"listLocations","list_spend_limits":"listSpendLimits","list_titles":"listTitles","list_transfers":"listTransfers","list_users":"listUsers","list_vendors":"listVendors","match_receipt":"matchReceipt","update_expense":"updateExpenseMemo","update_vendor":"updateVendor","upload_receipt":"uploadReceipt"}},"brex_v2":{"namespace":"brex","methods":{"archive_budget":"archiveBudget","create_budget":"createBudget","create_spend_limit":"createSpendLimit","create_transfer":"createTransfer","create_vendor":"createVendor","get_budget":"getBudget","get_cash_account":"getCashAccount","get_company":"getCompany","get_current_user":"getCurrentUser","get_expense":"getExpense","get_spend_limit":"getSpendLimit","get_transfer":"getTransfer","get_user":"getUser","get_vendor":"getVendor","list_budgets":"listBudgets","list_card_accounts":"listCardAccounts","list_card_statements":"listCardStatements","list_card_transactions":"listCardTransactions","list_cards":"listCards","list_cash_accounts":"listCashAccounts","list_cash_statements":"listCashStatements","list_cash_transactions":"listCashTransactions","list_departments":"listDepartments","list_expenses":"listExpenses","list_locations":"listLocations","list_spend_limits":"listSpendLimits","list_titles":"listTitles","list_transfers":"listTransfers","list_users":"listUsers","list_vendors":"listVendors","match_receipt":"matchReceipt","update_expense":"updateExpenseMemo","update_vendor":"updateVendor","upload_receipt":"uploadReceipt"},"params":{"action":{"oauthCredential":"credential"}}},"brightdata":{"namespace":"legacy.brightdata","methods":{"cancel_snapshot":"cancelSnapshot","discover":"discover","download_snapshot":"downloadSnapshot","scrape_dataset":"scrapeDataset","scrape_url":"scrapeUrl","serp_search":"serpSearch","snapshot_status":"snapshotStatus","sync_scrape":"syncScrape"}},"brightdata_v2":{"namespace":"brightdata","methods":{"cancel_snapshot":"cancelSnapshot","discover":"discover","download_snapshot":"downloadSnapshot","scrape_dataset":"scrapeDataset","scrape_url":"scrapeUrl","serp_search":"serpSearch","snapshot_status":"snapshotStatus","sync_scrape":"syncScrape"},"params":{"action":{"oauthCredential":"credential"}}},"browser_use":{"namespace":"legacy.browserUse"},"browser_use_v2":{"namespace":"browserUse","params":{"action":{"oauthCredential":"credential"}}},"buffer":{"namespace":"legacy.buffer","methods":{"create_idea":"createIdea","create_post":"createPost","delete_post":"deletePost","edit_post":"editPost","get_account":"getAccount","get_aggregated_post_metrics":"getAggregatedPostMetrics","get_channel":"getChannel","get_channels":"getChannels","get_daily_posting_limits":"getDailyPostingLimits","get_idea_groups":"getIdeaGroups","get_ideas":"getIdeas","get_post":"getPost","get_posts":"getPosts"}},"buffer_v2":{"namespace":"buffer","methods":{"create_idea":"createIdea","create_post":"createPost","delete_post":"deletePost","edit_post":"editPost","get_account":"getAccount","get_aggregated_post_metrics":"getAggregatedPostMetrics","get_channel":"getChannel","get_channels":"getChannels","get_daily_posting_limits":"getDailyPostingLimits","get_idea_groups":"getIdeaGroups","get_ideas":"getIdeas","get_post":"getPost","get_posts":"getPosts"},"params":{"action":{"oauthCredential":"credential"}}},"calcom":{"namespace":"calcom","methods":{"calcom_cancel_booking":"cancelBooking","calcom_confirm_booking":"confirmBooking","calcom_create_booking":"createBooking","calcom_create_event_type":"createEventType","calcom_create_schedule":"createSchedule","calcom_decline_booking":"declineBooking","calcom_delete_event_type":"deleteEventType","calcom_delete_schedule":"deleteSchedule","calcom_get_booking":"getBooking","calcom_get_default_schedule":"getDefaultSchedule","calcom_get_event_type":"getEventType","calcom_get_schedule":"getSchedule","calcom_get_slots":"getAvailableSlots","calcom_list_bookings":"listBookings","calcom_list_event_types":"listEventTypes","calcom_list_schedules":"listSchedules","calcom_reschedule_booking":"rescheduleBooking","calcom_update_event_type":"updateEventType","calcom_update_schedule":"updateSchedule"},"triggers":{"calcom_booking_cancelled":"bookingCancelled","calcom_booking_created":"bookingCreated","calcom_booking_paid":"bookingPaid","calcom_booking_rejected":"bookingRejected","calcom_booking_requested":"bookingRequested","calcom_booking_rescheduled":"bookingRescheduled","calcom_meeting_ended":"meetingEnded","calcom_recording_ready":"recordingReady","calcom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"calendly":{"namespace":"legacy.calendly","methods":{"calendly_cancel_event":"cancelEvent","calendly_create_event_invitee":"bookMeeting","calendly_create_invitee_no_show":"markInviteeNoShow","calendly_create_scheduling_link":"createSchedulingLink","calendly_delete_invitee_no_show":"unmarkInviteeNoShow","calendly_get_current_user":"getCurrentUser","calendly_get_event_invitee":"getEventInvitee","calendly_get_event_type":"getEventType","calendly_get_scheduled_event":"getScheduledEvent","calendly_get_user":"getUser","calendly_list_event_invitees":"listEventInvitees","calendly_list_event_type_available_times":"listEventTypeAvailableTimes","calendly_list_event_types":"listEventTypes","calendly_list_organization_memberships":"listOrganizationMemberships","calendly_list_routing_form_submissions":"listRoutingFormSubmissions","calendly_list_routing_forms":"listRoutingForms","calendly_list_scheduled_events":"listScheduledEvents","calendly_list_user_availability_schedules":"listUserAvailabilitySchedules","calendly_list_user_busy_times":"listUserBusyTimes"},"triggers":{"calendly_invitee_canceled":"inviteeCanceled","calendly_invitee_created":"inviteeCreated","calendly_routing_form_submitted":"routingFormSubmitted","calendly_webhook":"webhook"}},"calendly_v2":{"namespace":"calendly","methods":{"calendly_cancel_event":"cancelEvent","calendly_create_event_invitee":"bookMeeting","calendly_create_invitee_no_show":"markInviteeNoShow","calendly_create_scheduling_link":"createSchedulingLink","calendly_delete_invitee_no_show":"unmarkInviteeNoShow","calendly_get_current_user":"getCurrentUser","calendly_get_event_invitee":"getEventInvitee","calendly_get_event_type":"getEventType","calendly_get_scheduled_event":"getScheduledEvent","calendly_get_user":"getUser","calendly_list_event_invitees":"listEventInvitees","calendly_list_event_type_available_times":"listEventTypeAvailableTimes","calendly_list_event_types":"listEventTypes","calendly_list_organization_memberships":"listOrganizationMemberships","calendly_list_routing_form_submissions":"listRoutingFormSubmissions","calendly_list_routing_forms":"listRoutingForms","calendly_list_scheduled_events":"listScheduledEvents","calendly_list_user_availability_schedules":"listUserAvailabilitySchedules","calendly_list_user_busy_times":"listUserBusyTimes"},"triggers":{"calendly_invitee_canceled":"inviteeCanceled","calendly_invitee_created":"inviteeCreated","calendly_routing_form_submitted":"routingFormSubmitted","calendly_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"cbinsights":{"namespace":"legacy.cbinsights","methods":{"chat":"askChatCbi","get_commercial_maturity_history":"getCommercialMaturityHistory","get_exit_probability_history":"getExitProbabilityHistory","get_mosaic_history":"getMosaicHistory","get_org_business_relationships":"getOrganizationBusinessRelationships","get_org_funding_window":"getOrganizationFundingWindow","get_org_fundings":"getOrganizationFundings","get_org_investments":"getOrganizationInvestments","get_org_management_and_board":"getOrganizationManagementAndBoard","get_org_outlook":"getOrganizationOutlook","get_org_portfolio_exits":"getOrganizationPortfolioExits","get_org_revenue":"getOrganizationRevenue","get_scouting_report":"getScoutingReport","get_strategy_map":"getStrategyMap","list_business_relationships":"listBusinessRelationships","list_funding_window":"listFundingWindows","list_fundings":"listFundings","list_investments":"listInvestments","list_management_and_board":"listManagementAndBoard","list_outlook":"listOutlook","list_portfolio_exits":"listPortfolioExits","list_revenue":"listRevenue","lookup_organizations":"lookUpOrganizations","rag":"retrieveContext","search_firmographics":"searchFirmographics"}},"cbinsights_v2":{"namespace":"cbinsights","methods":{"chat":"askChatCbi","get_commercial_maturity_history":"getCommercialMaturityHistory","get_exit_probability_history":"getExitProbabilityHistory","get_mosaic_history":"getMosaicHistory","get_org_business_relationships":"getOrganizationBusinessRelationships","get_org_funding_window":"getOrganizationFundingWindow","get_org_fundings":"getOrganizationFundings","get_org_investments":"getOrganizationInvestments","get_org_management_and_board":"getOrganizationManagementAndBoard","get_org_outlook":"getOrganizationOutlook","get_org_portfolio_exits":"getOrganizationPortfolioExits","get_org_revenue":"getOrganizationRevenue","get_scouting_report":"getScoutingReport","get_strategy_map":"getStrategyMap","list_business_relationships":"listBusinessRelationships","list_funding_window":"listFundingWindows","list_fundings":"listFundings","list_investments":"listInvestments","list_management_and_board":"listManagementAndBoard","list_outlook":"listOutlook","list_portfolio_exits":"listPortfolioExits","list_revenue":"listRevenue","lookup_organizations":"lookUpOrganizations","rag":"retrieveContext","search_firmographics":"searchFirmographics"},"params":{"action":{"oauthCredential":"credential"}}},"chat_trigger":{"namespace":"legacy.chatTrigger"},"checkr":{"namespace":"legacy.checkr","methods":{"add_report_tag":"addReportTag","apply_report_review_action":"applyReportReviewAction","cancel_adverse_action":"cancelAdverseAction","cancel_continuous_check":"cancelContinuousCheck","cancel_invitation":"cancelInvitation","cancel_subscription":"cancelSubscription","complete_report":"completeReport","create_adverse_action":"createAdverseAction","create_candidate":"createCandidate","create_continuous_check":"createContinuousCheck","create_geo":"createGeo","create_invitation":"inviteCandidate","create_report":"orderReport","create_subscription":"scheduleRecurringCheck","delete_candidate_pii":"deleteCandidatePii","delete_geo":"deleteGeo","get_account":"getAccount","get_adverse_action":"getAdverseAction","get_candidate":"getCandidate","get_continuous_check":"getContinuousCheck","get_document":"getDocument","get_geo":"getGeo","get_invitation":"getInvitation","get_node":"getNode","get_package":"getPackage","get_program":"getProgram","get_report":"getReport","get_report_eta":"getReportEta","get_report_progressive_status":"getReportCheckpoints","get_report_tags":"getReportTags","get_screening":"getScreening","get_subscription":"getSubscription","get_verification":"getVerification","list_adverse_actions":"listAdverseActions","list_adverse_items":"listAdverseItems","list_assessments":"listAssessments","list_candidate_documents":"listCandidateDocuments","list_candidates":"listCandidates","list_continuous_checks":"listContinuousChecks","list_counties":"listCounties","list_geos":"listGeos","list_invitations":"listInvitations","list_nodes":"listNodes","list_packages":"listPackages","list_programs":"listPrograms","list_report_addresses":"listReportAddresses","list_subscriptions":"listSubscriptions","list_users":"listUsers","list_verifications":"listVerifications","remove_report_tag":"removeReportTag","set_report_tags":"setReportTags","update_candidate":"updateCandidate","update_continuous_check":"updateContinuousCheck","update_geo":"updateGeo","update_report":"updateReport","update_subscription":"updateSubscription"},"triggers":{"checkr_adverse_action_canceled":"adverseActionCanceled","checkr_adverse_action_completed":"adverseActionCompleted","checkr_adverse_action_created":"adverseActionCreated","checkr_adverse_action_notice_not_delivered":"adverseActionNoticeNotDelivered","checkr_adverse_action_paused":"adverseActionPaused","checkr_adverse_action_resumed":"adverseActionResumed","checkr_candidate_created":"candidateCreated","checkr_candidate_updated":"candidateUpdated","checkr_continuous_check_confirmation_required":"continuousCheckConfirmationRequired","checkr_continuous_check_subscription_error":"continuousCheckSubscriptionError","checkr_invitation_completed":"invitationCompleted","checkr_invitation_created":"invitationCreated","checkr_invitation_deleted":"invitationDeleted","checkr_invitation_expired":"invitationExpired","checkr_report_canceled":"reportCanceled","checkr_report_completed":"reportCompleted","checkr_report_created":"reportCreated","checkr_report_dispute_completed":"reportDisputeCompleted","checkr_report_disputed":"reportDisputed","checkr_report_engaged":"reportEngaged","checkr_report_paused":"reportPaused","checkr_report_post_adverse_action":"reportPostAdverseAction","checkr_report_pre_adverse_action":"reportPreAdverseAction","checkr_report_resumed":"reportResumed","checkr_report_suspended":"reportSuspended","checkr_report_updated":"reportUpdated","checkr_report_upgraded":"reportUpgraded","checkr_verification_completed":"verificationCompleted","checkr_verification_created":"verificationCreated","checkr_verification_processed":"verificationProcessed","checkr_webhook":"webhook"}},"checkr_v2":{"namespace":"checkr","methods":{"add_report_tag":"addReportTag","apply_report_review_action":"applyReportReviewAction","cancel_adverse_action":"cancelAdverseAction","cancel_continuous_check":"cancelContinuousCheck","cancel_invitation":"cancelInvitation","cancel_subscription":"cancelSubscription","complete_report":"completeReport","create_adverse_action":"createAdverseAction","create_candidate":"createCandidate","create_continuous_check":"createContinuousCheck","create_geo":"createGeo","create_invitation":"inviteCandidate","create_report":"orderReport","create_subscription":"scheduleRecurringCheck","delete_candidate_pii":"deleteCandidatePii","delete_geo":"deleteGeo","get_account":"getAccount","get_adverse_action":"getAdverseAction","get_candidate":"getCandidate","get_continuous_check":"getContinuousCheck","get_document":"getDocument","get_geo":"getGeo","get_invitation":"getInvitation","get_node":"getNode","get_package":"getPackage","get_program":"getProgram","get_report":"getReport","get_report_eta":"getReportEta","get_report_progressive_status":"getReportCheckpoints","get_report_tags":"getReportTags","get_screening":"getScreening","get_subscription":"getSubscription","get_verification":"getVerification","list_adverse_actions":"listAdverseActions","list_adverse_items":"listAdverseItems","list_assessments":"listAssessments","list_candidate_documents":"listCandidateDocuments","list_candidates":"listCandidates","list_continuous_checks":"listContinuousChecks","list_counties":"listCounties","list_geos":"listGeos","list_invitations":"listInvitations","list_nodes":"listNodes","list_packages":"listPackages","list_programs":"listPrograms","list_report_addresses":"listReportAddresses","list_subscriptions":"listSubscriptions","list_users":"listUsers","list_verifications":"listVerifications","remove_report_tag":"removeReportTag","set_report_tags":"setReportTags","update_candidate":"updateCandidate","update_continuous_check":"updateContinuousCheck","update_geo":"updateGeo","update_report":"updateReport","update_subscription":"updateSubscription"},"triggers":{"checkr_adverse_action_canceled":"adverseActionCanceled","checkr_adverse_action_completed":"adverseActionCompleted","checkr_adverse_action_created":"adverseActionCreated","checkr_adverse_action_notice_not_delivered":"adverseActionNoticeNotDelivered","checkr_adverse_action_paused":"adverseActionPaused","checkr_adverse_action_resumed":"adverseActionResumed","checkr_candidate_created":"candidateCreated","checkr_candidate_updated":"candidateUpdated","checkr_continuous_check_confirmation_required":"continuousCheckConfirmationRequired","checkr_continuous_check_subscription_error":"continuousCheckSubscriptionError","checkr_invitation_completed":"invitationCompleted","checkr_invitation_created":"invitationCreated","checkr_invitation_deleted":"invitationDeleted","checkr_invitation_expired":"invitationExpired","checkr_report_canceled":"reportCanceled","checkr_report_completed":"reportCompleted","checkr_report_created":"reportCreated","checkr_report_dispute_completed":"reportDisputeCompleted","checkr_report_disputed":"reportDisputed","checkr_report_engaged":"reportEngaged","checkr_report_paused":"reportPaused","checkr_report_post_adverse_action":"reportPostAdverseAction","checkr_report_pre_adverse_action":"reportPreAdverseAction","checkr_report_resumed":"reportResumed","checkr_report_suspended":"reportSuspended","checkr_report_updated":"reportUpdated","checkr_report_upgraded":"reportUpgraded","checkr_verification_completed":"verificationCompleted","checkr_verification_created":"verificationCreated","checkr_verification_processed":"verificationProcessed","checkr_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"circleback":{"namespace":"legacy.circleback","methods":{"add_tag_to_meetings":"addTagToMeetings","create_tag":"createTag","delete_action_item":"deleteActionItem","delete_meeting":"deleteMeeting","delete_tag":"deleteTag","get_company":"getCompany","get_meeting":"getMeeting","get_person":"getPerson","get_transcript":"getTranscript","list_action_items":"listActionItems","list_calendar_events":"listCalendarEvents","list_companies":"listCompanies","list_meetings":"listMeetings","list_people":"listPeople","list_tags":"listTags","remove_tag_from_meetings":"removeTagFromMeetings","search_meetings":"searchMeetings","update_action_item":"updateActionItem","update_meeting":"updateMeeting","update_tag":"updateTag"},"triggers":{"circleback_meeting_completed":"meetingCompleted","circleback_meeting_notes":"meetingNotes","circleback_webhook":"webhook"}},"circleback_v2":{"namespace":"circleback","methods":{"add_tag_to_meetings":"addTagToMeetings","create_tag":"createTag","delete_action_item":"deleteActionItem","delete_meeting":"deleteMeeting","delete_tag":"deleteTag","get_company":"getCompany","get_meeting":"getMeeting","get_person":"getPerson","get_transcript":"getTranscript","list_action_items":"listActionItems","list_calendar_events":"listCalendarEvents","list_companies":"listCompanies","list_meetings":"listMeetings","list_people":"listPeople","list_tags":"listTags","remove_tag_from_meetings":"removeTagFromMeetings","search_meetings":"searchMeetings","update_action_item":"updateActionItem","update_meeting":"updateMeeting","update_tag":"updateTag"},"triggers":{"circleback_meeting_completed":"meetingCompleted","circleback_meeting_notes":"meetingNotes","circleback_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"clay":{"namespace":"clay"},"clerk":{"namespace":"legacy.clerk","methods":{"clerk_add_organization_member":"addOrganizationMember","clerk_ban_user":"banUser","clerk_create_actor_token":"createActorToken","clerk_create_allowlist_identifier":"createAllowlistIdentifier","clerk_create_blocklist_identifier":"createBlocklistIdentifier","clerk_create_organization":"createOrganization","clerk_create_organization_invitation":"createOrganizationInvitation","clerk_create_user":"createUser","clerk_delete_allowlist_identifier":"deleteAllowlistIdentifier","clerk_delete_blocklist_identifier":"deleteBlocklistIdentifier","clerk_delete_organization":"deleteOrganization","clerk_delete_user":"deleteUser","clerk_get_jwt_template":"getJwtTemplate","clerk_get_organization":"getOrganization","clerk_get_session":"getSession","clerk_get_user":"getUser","clerk_get_user_oauth_token":"getUserOauthToken","clerk_list_allowlist_identifiers":"listAllowlistIdentifiers","clerk_list_blocklist_identifiers":"listBlocklistIdentifiers","clerk_list_jwt_templates":"listJwtTemplates","clerk_list_organization_invitations":"listOrganizationInvitations","clerk_list_organization_memberships":"listOrganizationMemberships","clerk_list_organizations":"listOrganizations","clerk_list_sessions":"listSessions","clerk_list_users":"listUsers","clerk_lock_user":"lockUser","clerk_remove_organization_member":"removeOrganizationMember","clerk_revoke_actor_token":"revokeActorToken","clerk_revoke_session":"revokeSession","clerk_unban_user":"unbanUser","clerk_unlock_user":"unlockUser","clerk_update_organization":"updateOrganization","clerk_update_organization_membership":"updateOrganizationMembership","clerk_update_user":"updateUser"},"triggers":{"clerk_organization_created":"organizationCreated","clerk_organization_deleted":"organizationDeleted","clerk_organization_membership_created":"organizationMembershipCreated","clerk_organization_membership_deleted":"organizationMembershipDeleted","clerk_organization_membership_updated":"organizationMembershipUpdated","clerk_organization_updated":"organizationUpdated","clerk_session_created":"sessionCreated","clerk_session_ended":"sessionEnded","clerk_session_removed":"sessionRemoved","clerk_session_revoked":"sessionRevoked","clerk_user_created":"userCreated","clerk_user_deleted":"userDeleted","clerk_user_updated":"userUpdated","clerk_webhook":"webhook"}},"clerk_v2":{"namespace":"clerk","methods":{"clerk_add_organization_member":"addOrganizationMember","clerk_ban_user":"banUser","clerk_create_actor_token":"createActorToken","clerk_create_allowlist_identifier":"createAllowlistIdentifier","clerk_create_blocklist_identifier":"createBlocklistIdentifier","clerk_create_organization":"createOrganization","clerk_create_organization_invitation":"createOrganizationInvitation","clerk_create_user":"createUser","clerk_delete_allowlist_identifier":"deleteAllowlistIdentifier","clerk_delete_blocklist_identifier":"deleteBlocklistIdentifier","clerk_delete_organization":"deleteOrganization","clerk_delete_user":"deleteUser","clerk_get_jwt_template":"getJwtTemplate","clerk_get_organization":"getOrganization","clerk_get_session":"getSession","clerk_get_user":"getUser","clerk_get_user_oauth_token":"getUserOauthToken","clerk_list_allowlist_identifiers":"listAllowlistIdentifiers","clerk_list_blocklist_identifiers":"listBlocklistIdentifiers","clerk_list_jwt_templates":"listJwtTemplates","clerk_list_organization_invitations":"listOrganizationInvitations","clerk_list_organization_memberships":"listOrganizationMemberships","clerk_list_organizations":"listOrganizations","clerk_list_sessions":"listSessions","clerk_list_users":"listUsers","clerk_lock_user":"lockUser","clerk_remove_organization_member":"removeOrganizationMember","clerk_revoke_actor_token":"revokeActorToken","clerk_revoke_session":"revokeSession","clerk_unban_user":"unbanUser","clerk_unlock_user":"unlockUser","clerk_update_organization":"updateOrganization","clerk_update_organization_membership":"updateOrganizationMembership","clerk_update_user":"updateUser"},"triggers":{"clerk_organization_created":"organizationCreated","clerk_organization_deleted":"organizationDeleted","clerk_organization_membership_created":"organizationMembershipCreated","clerk_organization_membership_deleted":"organizationMembershipDeleted","clerk_organization_membership_updated":"organizationMembershipUpdated","clerk_organization_updated":"organizationUpdated","clerk_session_created":"sessionCreated","clerk_session_ended":"sessionEnded","clerk_session_removed":"sessionRemoved","clerk_session_revoked":"sessionRevoked","clerk_user_created":"userCreated","clerk_user_deleted":"userDeleted","clerk_user_updated":"userUpdated","clerk_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"clickhouse":{"namespace":"clickhouse","methods":{"count_rows":"countRows","create_database":"createDatabase","create_table":"createTable","delete":"deleteData","describe_table":"describeTable","drop_database":"dropDatabase","drop_partition":"dropPartition","drop_table":"dropTable","execute":"executeRawSql","insert":"insertRow","insert_rows":"insertRowsBulk","introspect":"introspectSchema","kill_query":"killQuery","list_clusters":"listClusters","list_databases":"listDatabases","list_mutations":"listMutations","list_partitions":"listPartitions","list_running_queries":"listRunningQueries","list_tables":"listTables","optimize_table":"optimizeTable","query":"querySelect","rename_table":"renameTable","show_create_table":"showCreateTable","table_stats":"tableStats","truncate_table":"truncateTable","update":"updateData"}},"clickup":{"namespace":"clickup","methods":{"add_tag_to_task":"addTagToTask","create_checklist":"createChecklist","create_checklist_item":"createChecklistItem","create_comment":"createComment","create_folder":"createFolder","create_list":"createList","create_task":"createTask","create_time_entry":"createTimeEntry","delete_checklist":"deleteChecklist","delete_checklist_item":"deleteChecklistItem","delete_comment":"deleteComment","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","get_comments":"getComments","get_custom_fields":"getCustomFields","get_folders":"getFolders","get_list_members":"getListMembers","get_lists":"getLists","get_running_timer":"getRunningTimer","get_space_tags":"getSpaceTags","get_spaces":"getSpaces","get_task":"getTask","get_task_members":"getTaskMembers","get_tasks":"getTasks","get_time_entries":"getTimeEntries","get_workspaces":"getWorkspaces","remove_custom_field_value":"removeCustomFieldValue","remove_tag_from_task":"removeTagFromTask","search_tasks":"searchTasks","set_custom_field_value":"setCustomFieldValue","start_timer":"startTimer","stop_timer":"stopTimer","update_checklist":"updateChecklist","update_checklist_item":"updateChecklistItem","update_comment":"updateComment","update_task":"updateTask","update_time_entry":"updateTimeEntry","upload_attachment":"uploadAttachment"},"triggers":{"clickup_folder_created":"folderCreated","clickup_folder_deleted":"folderDeleted","clickup_folder_updated":"folderUpdated","clickup_goal_created":"goalCreated","clickup_goal_deleted":"goalDeleted","clickup_goal_updated":"goalUpdated","clickup_key_result_created":"keyResultCreated","clickup_key_result_deleted":"keyResultDeleted","clickup_key_result_updated":"keyResultUpdated","clickup_list_created":"listCreated","clickup_list_deleted":"listDeleted","clickup_list_updated":"listUpdated","clickup_space_created":"spaceCreated","clickup_space_deleted":"spaceDeleted","clickup_space_updated":"spaceUpdated","clickup_task_assignee_updated":"taskAssigneeUpdated","clickup_task_comment_posted":"taskCommentPosted","clickup_task_comment_updated":"taskCommentUpdated","clickup_task_created":"taskCreated","clickup_task_deleted":"taskDeleted","clickup_task_due_date_updated":"taskDueDateUpdated","clickup_task_moved":"taskMoved","clickup_task_priority_updated":"taskPriorityUpdated","clickup_task_status_updated":"taskStatusUpdated","clickup_task_tag_updated":"taskTagUpdated","clickup_task_time_estimate_updated":"taskTimeEstimateUpdated","clickup_task_time_tracked_updated":"taskTimeTrackedUpdated","clickup_task_updated":"taskUpdated","clickup_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"cloudflare":{"namespace":"legacy.cloudflare","methods":{"create_access_application":"createAccessApplication","create_access_group":"createAccessGroup","create_access_policy":"createAccessPolicy","create_access_service_token":"createAccessServiceToken","create_dns_record":"createDnsRecord","create_r2_bucket":"createR2Bucket","create_rate_limit_rule":"createRateLimitingRule","create_ruleset":"createRuleset","create_ruleset_rule":"createRulesetRule","create_tunnel":"createTunnel","create_worker_route":"createWorkerRoute","create_zone":"createZone","delete_access_application":"deleteAccessApplication","delete_access_group":"deleteAccessGroup","delete_access_policy":"deleteAccessPolicy","delete_dns_record":"deleteDnsRecord","delete_r2_bucket":"deleteR2Bucket","delete_r2_bucket_cors":"deleteR2BucketCors","delete_ruleset":"deleteRuleset","delete_ruleset_rule":"deleteRulesetRule","delete_tunnel":"deleteTunnel","delete_worker_route":"deleteWorkerRoute","delete_worker_script":"deleteWorkerScript","delete_zone":"deleteZone","dns_analytics":"dnsAnalytics","get_access_application":"getAccessApplication","get_access_group":"getAccessGroup","get_access_policy":"getAccessPolicy","get_access_service_token":"getAccessServiceToken","get_dns_record":"getDnsRecord","get_r2_bucket":"getR2Bucket","get_r2_bucket_cors":"getR2BucketCors","get_r2_bucket_lifecycle":"getR2BucketLifecycle","get_ruleset":"getRuleset","get_ruleset_entrypoint":"getPhaseEntryPointRuleset","get_tunnel":"getTunnel","get_tunnel_configuration":"getTunnelConfiguration","get_tunnel_token":"getTunnelToken","get_worker_route":"getWorkerRoute","get_worker_script_settings":"getWorkerScriptSettings","get_zone":"getZoneDetails","get_zone_settings":"getZoneSettings","list_access_applications":"listAccessApplications","list_access_groups":"listAccessGroups","list_access_identity_providers":"listAccessIdentityProviders","list_access_policies":"listAccessPolicies","list_access_service_tokens":"listAccessServiceTokens","list_certificates":"listCertificates","list_dns_records":"listDnsRecords","list_managed_ruleset_overrides":"listManagedRulesetOverrides","list_r2_buckets":"listR2Buckets","list_rate_limit_rules":"listRateLimitingRules","list_rulesets":"listRulesets","list_tunnels":"listTunnels","list_worker_routes":"listWorkerRoutes","list_worker_scripts":"listWorkerScripts","list_zones":"listZones","purge_cache":"purgeCache","refresh_access_service_token":"refreshAccessServiceToken","revoke_access_service_token":"revokeAccessServiceToken","rotate_access_service_token":"rotateAccessServiceToken","update_access_application":"updateAccessApplication","update_access_group":"updateAccessGroup","update_access_policy":"updateAccessPolicy","update_access_service_token":"updateAccessServiceToken","update_dns_record":"updateDnsRecord","update_r2_bucket_cors":"updateR2BucketCors","update_r2_bucket_lifecycle":"updateR2BucketLifecycle","update_rate_limit_rule":"updateRateLimitingRule","update_ruleset":"updateRuleset","update_ruleset_rule":"updateRulesetRule","update_tunnel":"updateTunnel","update_tunnel_configuration":"updateTunnelConfiguration","update_worker_route":"updateWorkerRoute","update_zone":"updateZone","update_zone_setting":"updateZoneSetting"}},"cloudflare_v2":{"namespace":"cloudflare","methods":{"create_access_application":"createAccessApplication","create_access_group":"createAccessGroup","create_access_policy":"createAccessPolicy","create_access_service_token":"createAccessServiceToken","create_dns_record":"createDnsRecord","create_r2_bucket":"createR2Bucket","create_rate_limit_rule":"createRateLimitingRule","create_ruleset":"createRuleset","create_ruleset_rule":"createRulesetRule","create_tunnel":"createTunnel","create_worker_route":"createWorkerRoute","create_zone":"createZone","delete_access_application":"deleteAccessApplication","delete_access_group":"deleteAccessGroup","delete_access_policy":"deleteAccessPolicy","delete_dns_record":"deleteDnsRecord","delete_r2_bucket":"deleteR2Bucket","delete_r2_bucket_cors":"deleteR2BucketCors","delete_ruleset":"deleteRuleset","delete_ruleset_rule":"deleteRulesetRule","delete_tunnel":"deleteTunnel","delete_worker_route":"deleteWorkerRoute","delete_worker_script":"deleteWorkerScript","delete_zone":"deleteZone","dns_analytics":"dnsAnalytics","get_access_application":"getAccessApplication","get_access_group":"getAccessGroup","get_access_policy":"getAccessPolicy","get_access_service_token":"getAccessServiceToken","get_dns_record":"getDnsRecord","get_r2_bucket":"getR2Bucket","get_r2_bucket_cors":"getR2BucketCors","get_r2_bucket_lifecycle":"getR2BucketLifecycle","get_ruleset":"getRuleset","get_ruleset_entrypoint":"getPhaseEntryPointRuleset","get_tunnel":"getTunnel","get_tunnel_configuration":"getTunnelConfiguration","get_tunnel_token":"getTunnelToken","get_worker_route":"getWorkerRoute","get_worker_script_settings":"getWorkerScriptSettings","get_zone":"getZoneDetails","get_zone_settings":"getZoneSettings","list_access_applications":"listAccessApplications","list_access_groups":"listAccessGroups","list_access_identity_providers":"listAccessIdentityProviders","list_access_policies":"listAccessPolicies","list_access_service_tokens":"listAccessServiceTokens","list_certificates":"listCertificates","list_dns_records":"listDnsRecords","list_managed_ruleset_overrides":"listManagedRulesetOverrides","list_r2_buckets":"listR2Buckets","list_rate_limit_rules":"listRateLimitingRules","list_rulesets":"listRulesets","list_tunnels":"listTunnels","list_worker_routes":"listWorkerRoutes","list_worker_scripts":"listWorkerScripts","list_zones":"listZones","purge_cache":"purgeCache","refresh_access_service_token":"refreshAccessServiceToken","revoke_access_service_token":"revokeAccessServiceToken","rotate_access_service_token":"rotateAccessServiceToken","update_access_application":"updateAccessApplication","update_access_group":"updateAccessGroup","update_access_policy":"updateAccessPolicy","update_access_service_token":"updateAccessServiceToken","update_dns_record":"updateDnsRecord","update_r2_bucket_cors":"updateR2BucketCors","update_r2_bucket_lifecycle":"updateR2BucketLifecycle","update_rate_limit_rule":"updateRateLimitingRule","update_ruleset":"updateRuleset","update_ruleset_rule":"updateRulesetRule","update_tunnel":"updateTunnel","update_tunnel_configuration":"updateTunnelConfiguration","update_worker_route":"updateWorkerRoute","update_zone":"updateZone","update_zone_setting":"updateZoneSetting"},"params":{"action":{"oauthCredential":"credential"}}},"cloudformation":{"namespace":"legacy.cloudformation","methods":{"cancel_update_stack":"cancelUpdateStack","create_change_set":"createChangeSet","create_stack":"createStack","delete_stack":"deleteStack","describe_change_set":"describeChangeSet","describe_stack_drift_detection_status":"driftDetectionStatus","describe_stack_events":"describeStackEvents","describe_stacks":"describeStacks","detect_stack_drift":"detectStackDrift","execute_change_set":"executeChangeSet","get_template":"getTemplate","get_template_summary":"getTemplateSummary","list_stack_resources":"listStackResources","update_stack":"updateStack","validate_template":"validateTemplate"}},"cloudformation_v2":{"namespace":"cloudformation","methods":{"cancel_update_stack":"cancelUpdateStack","create_change_set":"createChangeSet","create_stack":"createStack","delete_stack":"deleteStack","describe_change_set":"describeChangeSet","describe_stack_drift_detection_status":"driftDetectionStatus","describe_stack_events":"describeStackEvents","describe_stacks":"describeStacks","detect_stack_drift":"detectStackDrift","execute_change_set":"executeChangeSet","get_template":"getTemplate","get_template_summary":"getTemplateSummary","list_stack_resources":"listStackResources","update_stack":"updateStack","validate_template":"validateTemplate"},"params":{"action":{"oauthCredential":"credential"}}},"cloudtrail":{"namespace":"legacy.cloudtrail","methods":{"cancel_query":"cancelLakeQuery","describe_query":"describeLakeQuery","describe_trails":"describeTrails","get_event_data_store":"getEventDataStore","get_event_selectors":"getEventSelectors","get_insight_selectors":"getInsightSelectors","get_query_results":"getLakeQueryResults","get_trail":"getTrail","get_trail_status":"getTrailStatus","list_event_data_stores":"listEventDataStores","list_tags":"listTags","list_trails":"listTrails","lookup_events":"lookUpEvents","start_query":"startLakeQuery"}},"cloudtrail_v2":{"namespace":"cloudtrail","methods":{"cancel_query":"cancelLakeQuery","describe_query":"describeLakeQuery","describe_trails":"describeTrails","get_event_data_store":"getEventDataStore","get_event_selectors":"getEventSelectors","get_insight_selectors":"getInsightSelectors","get_query_results":"getLakeQueryResults","get_trail":"getTrail","get_trail_status":"getTrailStatus","list_event_data_stores":"listEventDataStores","list_tags":"listTags","list_trails":"listTrails","lookup_events":"lookUpEvents","start_query":"startLakeQuery"},"params":{"action":{"oauthCredential":"credential"}}},"cloudwatch":{"namespace":"legacy.cloudwatch","methods":{"describe_alarm_history":"describeAlarmHistory","describe_alarms":"describeAlarms","describe_log_groups":"describeLogGroups","describe_log_streams":"describeLogStreams","filter_log_events":"filterLogEvents","get_log_events":"getLogEvents","get_metric_statistics":"getMetricStatistics","list_metrics":"listMetrics","mute_alarm":"muteAlarm","put_log_group_retention":"setLogGroupRetention","put_metric_data":"publishMetric","query_logs":"queryLogsInsights","unmute_alarm":"unmuteAlarm"}},"cloudwatch_v2":{"namespace":"cloudwatch","methods":{"describe_alarm_history":"describeAlarmHistory","describe_alarms":"describeAlarms","describe_log_groups":"describeLogGroups","describe_log_streams":"describeLogStreams","filter_log_events":"filterLogEvents","get_log_events":"getLogEvents","get_metric_statistics":"getMetricStatistics","list_metrics":"listMetrics","mute_alarm":"muteAlarm","put_log_group_retention":"setLogGroupRetention","put_metric_data":"publishMetric","query_logs":"queryLogsInsights","unmute_alarm":"unmuteAlarm"},"params":{"action":{"oauthCredential":"credential"}}},"coda":{"namespace":"coda","methods":{"add_custom_domain":"addCustomDomain","add_permission":"shareDoc","change_user_role":"changeUserRole","create_doc":"createDoc","create_folder":"createFolder","create_page":"createPage","delete_custom_domain":"deleteCustomDomain","delete_doc":"deleteDoc","delete_folder":"deleteFolder","delete_page":"deletePage","delete_page_content":"deletePageContent","delete_permission":"removePermission","delete_row":"deleteRow","delete_rows":"deleteRows","export_page":"exportPage","get_acl_settings":"getSharingSettings","get_analytics_last_updated":"getAnalyticsLastUpdated","get_column":"getColumn","get_control":"getControl","get_custom_domain_provider":"getCustomDomainProvider","get_doc":"getDoc","get_doc_analytics_summary":"getDocAnalyticsSummary","get_folder":"getFolder","get_formula":"getFormula","get_mutation_status":"getMutationStatus","get_page":"getPage","get_page_content":"getPageContent","get_page_export_status":"getPageExportStatus","get_row":"getRow","get_sharing_metadata":"getSharingMetadata","get_table":"getTable","list_categories":"listDocCategories","list_columns":"listColumns","list_controls":"listControls","list_custom_domains":"listCustomDomains","list_doc_analytics":"listDocAnalytics","list_docs":"listDocs","list_folder_children":"listSubfolders","list_folders":"listFolders","list_formulas":"listFormulas","list_page_analytics":"listPageAnalytics","list_pages":"listPages","list_permissions":"listPermissions","list_rows":"listRows","list_tables":"listTables","list_workspace_members":"listWorkspaceMembers","list_workspace_roles":"listWorkspaceRoleActivity","publish_doc":"publishDoc","push_button":"pushButton","resolve_browser_link":"resolveBrowserLink","search_principals":"searchUsersAndGroups","trigger_automation":"triggerAutomation","unpublish_doc":"unpublishDoc","update_acl_settings":"updateSharingSettings","update_doc":"updateDoc","update_folder":"updateFolder","update_page":"updatePage","update_row":"updateRow","upsert_rows":"insertOrUpsertRows","whoami":"getCurrentUser"},"params":{"action":{"oauthCredential":"credential"}}},"codepipeline":{"namespace":"legacy.codepipeline","methods":{"disable_stage_transition":"disableStageTransition","enable_stage_transition":"enableStageTransition","get_pipeline":"getPipelineStructure","get_pipeline_execution":"getExecution","get_pipeline_state":"getPipelineState","list_action_executions":"listActionExecutions","list_pipeline_executions":"listExecutions","list_pipelines":"listPipelines","put_approval_result":"approveRejectApproval","retry_stage_execution":"retryStage","start_execution":"startExecution","stop_execution":"stopExecution"}},"codepipeline_v2":{"namespace":"codepipeline","methods":{"disable_stage_transition":"disableStageTransition","enable_stage_transition":"enableStageTransition","get_pipeline":"getPipelineStructure","get_pipeline_execution":"getExecution","get_pipeline_state":"getPipelineState","list_action_executions":"listActionExecutions","list_pipeline_executions":"listExecutions","list_pipelines":"listPipelines","put_approval_result":"approveRejectApproval","retry_stage_execution":"retryStage","start_execution":"startExecution","stop_execution":"stopExecution"},"params":{"action":{"oauthCredential":"credential"}}},"condition":{"namespace":"condition"},"confluence":{"namespace":"legacy.confluence","methods":{"create":"createPage","create_comment":"createComment","delete":"deletePage","delete_attachment":"deleteAttachment","delete_comment":"deleteComment","get_space":"getSpace","list_attachments":"listAttachments","list_comments":"listComments","list_labels":"listLabels","list_spaces":"listSpaces","read":"readPage","search":"searchContent","update":"updatePage","update_comment":"updateComment","upload_attachment":"uploadAttachment"},"params":{"action":{"oauthCredential":"credential"}}},"confluence_v2":{"namespace":"confluence","methods":{"add_label":"addLabel","create":"createPage","create_blogpost":"createBlogPost","create_comment":"createComment","create_page_property":"createPageProperty","create_space":"createSpace","create_space_property":"createSpaceProperty","delete":"deletePage","delete_attachment":"deleteAttachment","delete_blogpost":"deleteBlogPost","delete_comment":"deleteComment","delete_label":"deleteLabel","delete_page_property":"deletePageProperty","delete_space":"deleteSpace","delete_space_property":"deleteSpaceProperty","get_blogpost":"getBlogPost","get_page_ancestors":"getPageAncestors","get_page_children":"getPageChildren","get_page_descendants":"getPageDescendants","get_page_version":"getPageVersion","get_pages_by_label":"getPagesByLabel","get_space":"getSpace","get_task":"getTask","get_user":"getUser","list_attachments":"listAttachments","list_blogposts":"listBlogPosts","list_blogposts_in_space":"listBlogPostsInSpace","list_comments":"listComments","list_labels":"listLabels","list_page_properties":"listPageProperties","list_page_versions":"listPageVersions","list_pages_in_space":"listPagesInSpace","list_space_labels":"listSpaceLabels","list_space_permissions":"listSpacePermissions","list_space_properties":"listSpaceProperties","list_spaces":"listSpaces","list_tasks":"listTasks","read":"readPage","search":"searchContent","search_in_space":"searchInSpace","update":"updatePage","update_blogpost":"updateBlogPost","update_comment":"updateComment","update_space":"updateSpace","update_task":"updateTask","upload_attachment":"uploadAttachment"},"triggers":{"confluence_attachment_created":"attachmentCreated","confluence_attachment_removed":"attachmentRemoved","confluence_attachment_updated":"attachmentUpdated","confluence_blog_created":"blogCreated","confluence_blog_removed":"blogRemoved","confluence_blog_restored":"blogRestored","confluence_blog_updated":"blogUpdated","confluence_comment_created":"commentCreated","confluence_comment_removed":"commentRemoved","confluence_comment_updated":"commentUpdated","confluence_label_added":"labelAdded","confluence_label_removed":"labelRemoved","confluence_page_created":"pageCreated","confluence_page_moved":"pageMoved","confluence_page_permissions_updated":"pagePermissionsUpdated","confluence_page_removed":"pageRemoved","confluence_page_restored":"pageRestored","confluence_page_updated":"pageUpdated","confluence_space_created":"spaceCreated","confluence_space_removed":"spaceRemoved","confluence_space_updated":"spaceUpdated","confluence_user_created":"userCreated","confluence_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"context_dev":{"namespace":"contextDev","methods":{"classify_naics":"classifyNaics","classify_sic":"classifySic","crawl":"crawlWebsite","extract":"extractStructuredData","extract_product":"extractProduct","extract_products":"extractProducts","get_brand":"getBrandByDomain","get_brand_by_email":"getBrandByEmail","get_brand_by_name":"getBrandByName","get_brand_by_ticker":"getBrandByTicker","identify_transaction":"identifyTransaction","map":"mapSitemap","scrape_fonts":"scrapeFonts","scrape_html":"scrapeHtml","scrape_images":"scrapeImages","scrape_markdown":"scrapeMarkdown","scrape_styleguide":"scrapeStyleguide","screenshot":"screenshot","search":"webSearch"}},"convex":{"namespace":"legacy.convex","methods":{"action":"runAction","document_deltas":"documentDeltas","list_documents":"listDocuments","list_tables":"listTables","mutation":"runMutation","query":"runQuery","run_function":"runFunction"}},"convex_v2":{"namespace":"convex","methods":{"action":"runAction","document_deltas":"documentDeltas","list_documents":"listDocuments","list_tables":"listTables","mutation":"runMutation","query":"runQuery","run_function":"runFunction"},"params":{"action":{"oauthCredential":"credential"}}},"credential":{"namespace":"credential","methods":{"find_organization_account":"findOrganizationAccount","find_organization_mcp_connection":"findOrganizationMcpConnection","list":"listCredentials","list_organization_accounts":"listOrganizationAccounts","list_organization_mcp_connections":"listOrganizationMcpConnections","select":"selectCredential"},"triggers":{"credential_group_event":"groupEvent"}},"credential_group":{"namespace":"legacy.credentialGroup","methods":{"get_invite_link":"getInviteLink","list_credentials":"listCredentials","list_mcp_connections":"listMcpConnections","list_people":"listPeople","send_invite":"sendInvite"},"triggers":{"credential_group_event":"event"}},"crowdstrike":{"namespace":"legacy.crowdstrike","methods":{"crowdstrike_create_indicators":"createIndicators","crowdstrike_delete_indicators":"deleteIndicators","crowdstrike_delete_rtr_session":"deleteRtrSession","crowdstrike_execute_rtr_command":"executeRtrCommand","crowdstrike_get_alert_details":"getAlertDetails","crowdstrike_get_case_details":"getCaseDetails","crowdstrike_get_host_group_details":"getHostGroupDetails","crowdstrike_get_indicator_details":"getIndicatorDetails","crowdstrike_get_rtr_command_status":"getRtrCommandStatus","crowdstrike_get_sensor_aggregates":"getSensorAggregates","crowdstrike_get_sensor_details":"getSensorDetails","crowdstrike_get_vulnerability_details":"getVulnerabilityDetails","crowdstrike_init_rtr_session":"initRtrSession","crowdstrike_perform_host_action":"performHostAction","crowdstrike_perform_host_group_action":"performHostGroupAction","crowdstrike_query_alerts":"queryAlerts","crowdstrike_query_cases":"queryCases","crowdstrike_query_host_groups":"queryHostGroups","crowdstrike_query_indicators":"queryIndicators","crowdstrike_query_sensors":"querySensors","crowdstrike_query_vulnerabilities":"queryVulnerabilities","crowdstrike_update_alerts":"updateAlerts","crowdstrike_update_indicators":"updateIndicators"}},"crowdstrike_v2":{"namespace":"crowdstrike","methods":{"crowdstrike_create_indicators":"createIndicators","crowdstrike_delete_indicators":"deleteIndicators","crowdstrike_delete_rtr_session":"deleteRtrSession","crowdstrike_execute_rtr_command":"executeRtrCommand","crowdstrike_get_alert_details":"getAlertDetails","crowdstrike_get_case_details":"getCaseDetails","crowdstrike_get_host_group_details":"getHostGroupDetails","crowdstrike_get_indicator_details":"getIndicatorDetails","crowdstrike_get_rtr_command_status":"getRtrCommandStatus","crowdstrike_get_sensor_aggregates":"getSensorAggregates","crowdstrike_get_sensor_details":"getSensorDetails","crowdstrike_get_vulnerability_details":"getVulnerabilityDetails","crowdstrike_init_rtr_session":"initRtrSession","crowdstrike_perform_host_action":"performHostAction","crowdstrike_perform_host_group_action":"performHostGroupAction","crowdstrike_query_alerts":"queryAlerts","crowdstrike_query_cases":"queryCases","crowdstrike_query_host_groups":"queryHostGroups","crowdstrike_query_indicators":"queryIndicators","crowdstrike_query_sensors":"querySensors","crowdstrike_query_vulnerabilities":"queryVulnerabilities","crowdstrike_update_alerts":"updateAlerts","crowdstrike_update_indicators":"updateIndicators"},"params":{"action":{"oauthCredential":"credential"}}},"crunchbase":{"namespace":"legacy.crunchbase","methods":{"autocomplete":"autocomplete","get_acquisition":"getAcquisition","get_entity":"getAnyEntity","get_entity_card":"getEntityCard","get_fields_metadata":"getFieldsMetadata","get_funding_round":"getFundingRound","get_organization":"getOrganization","get_person":"getPerson","list_deleted_entities":"listDeletedEntities","search_acquisitions":"searchAcquisitions","search_entities":"searchAnyCollection","search_funding_rounds":"searchFundingRounds","search_organizations":"searchOrganizations","search_people":"searchPeople"}},"crunchbase_v2":{"namespace":"crunchbase","methods":{"autocomplete":"autocomplete","get_acquisition":"getAcquisition","get_entity":"getAnyEntity","get_entity_card":"getEntityCard","get_fields_metadata":"getFieldsMetadata","get_funding_round":"getFundingRound","get_organization":"getOrganization","get_person":"getPerson","list_deleted_entities":"listDeletedEntities","search_acquisitions":"searchAcquisitions","search_entities":"searchAnyCollection","search_funding_rounds":"searchFundingRounds","search_organizations":"searchOrganizations","search_people":"searchPeople"},"params":{"action":{"oauthCredential":"credential"}}},"cursor":{"namespace":"legacy.cursor","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"}},"cursor_v2":{"namespace":"legacy.cursorV2","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"}},"cursor_v3":{"namespace":"cursor","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"},"params":{"action":{"oauthCredential":"credential"}}},"dagster":{"namespace":"dagster","methods":{"delete_run":"deleteRun","get_asset":"getAsset","get_run":"getRun","get_run_logs":"getRunLogs","launch_run":"launchRun","list_assets":"listAssets","list_jobs":"listJobs","list_runs":"listRuns","list_schedules":"listSchedules","list_sensors":"listSensors","materialize_assets":"materializeAssets","reexecute_run":"reexecuteRun","report_asset_materialization":"reportAssetMaterialization","start_schedule":"startSchedule","start_sensor":"startSensor","stop_schedule":"stopSchedule","stop_sensor":"stopSensor","terminate_run":"terminateRun","wipe_asset":"wipeAsset"}},"databricks":{"namespace":"legacy.databricks","methods":{"cancel_all_runs":"cancelAllRuns","cancel_run":"cancelRun","cancel_statement":"cancelStatement","create_cluster":"createCluster","create_job":"createJob","create_warehouse":"createWarehouse","delete_cluster":"deleteCluster","delete_job":"deleteJob","delete_run":"deleteRun","delete_warehouse":"deleteWarehouse","edit_cluster":"editCluster","edit_warehouse":"editWarehouse","execute_sql":"executeSql","genie_agent_ask":"askGenieAgent","genie_agent_cancel":"cancelGenieAgentResponse","genie_agent_list_items":"listGenieAgentItems","genie_ask":"askGenie","genie_create_space":"createGenieSpace","genie_delete_conversation":"deleteGenieConversation","genie_delete_message":"deleteGenieMessage","genie_delete_space":"trashGenieSpace","genie_download_visualization":"downloadGenieVisualization","genie_execute_query":"executeGenieQuery","genie_get_message":"getGenieMessage","genie_get_query_result":"getGenieQueryResult","genie_get_space":"getGenieSpace","genie_list_conversations":"listGenieConversations","genie_list_messages":"listGenieMessages","genie_list_spaces":"listGenieSpaces","genie_send_feedback":"sendGenieFeedback","genie_update_space":"updateGenieSpace","get_cluster":"getCluster","get_job":"getJob","get_run":"getRun","get_run_output":"getRunOutput","get_statement":"getStatement","get_statement_chunk":"getStatementChunk","get_warehouse":"getWarehouse","list_clusters":"listClusters","list_jobs":"listJobs","list_runs":"listRuns","list_warehouses":"listWarehouses","repair_run":"repairRun","reset_job":"resetJob","resize_cluster":"resizeCluster","restart_cluster":"restartCluster","run_job":"runJob","start_cluster":"startCluster","start_warehouse":"startWarehouse","stop_warehouse":"stopWarehouse","submit_run":"submitRun","terminate_cluster":"terminateCluster","update_job":"updateJob"}},"databricks_v2":{"namespace":"databricks","methods":{"cancel_all_runs":"cancelAllRuns","cancel_run":"cancelRun","cancel_statement":"cancelStatement","create_cluster":"createCluster","create_job":"createJob","create_warehouse":"createWarehouse","delete_cluster":"deleteCluster","delete_job":"deleteJob","delete_run":"deleteRun","delete_warehouse":"deleteWarehouse","edit_cluster":"editCluster","edit_warehouse":"editWarehouse","execute_sql":"executeSql","genie_agent_ask":"askGenieAgent","genie_agent_cancel":"cancelGenieAgentResponse","genie_agent_list_items":"listGenieAgentItems","genie_ask":"askGenie","genie_create_space":"createGenieSpace","genie_delete_conversation":"deleteGenieConversation","genie_delete_message":"deleteGenieMessage","genie_delete_space":"trashGenieSpace","genie_download_visualization":"downloadGenieVisualization","genie_execute_query":"executeGenieQuery","genie_get_message":"getGenieMessage","genie_get_query_result":"getGenieQueryResult","genie_get_space":"getGenieSpace","genie_list_conversations":"listGenieConversations","genie_list_messages":"listGenieMessages","genie_list_spaces":"listGenieSpaces","genie_send_feedback":"sendGenieFeedback","genie_update_space":"updateGenieSpace","get_cluster":"getCluster","get_job":"getJob","get_run":"getRun","get_run_output":"getRunOutput","get_statement":"getStatement","get_statement_chunk":"getStatementChunk","get_warehouse":"getWarehouse","list_clusters":"listClusters","list_jobs":"listJobs","list_runs":"listRuns","list_warehouses":"listWarehouses","repair_run":"repairRun","reset_job":"resetJob","resize_cluster":"resizeCluster","restart_cluster":"restartCluster","run_job":"runJob","start_cluster":"startCluster","start_warehouse":"startWarehouse","stop_warehouse":"stopWarehouse","submit_run":"submitRun","terminate_cluster":"terminateCluster","update_job":"updateJob"},"params":{"action":{"oauthCredential":"credential"}}},"datadog":{"namespace":"legacy.datadog","methods":{"datadog_add_incident_todo":"addIncidentTodo","datadog_cancel_downtime":"cancelDowntime","datadog_create_dashboard":"createDashboard","datadog_create_downtime":"createDowntime","datadog_create_event":"createEvent","datadog_create_incident":"createIncident","datadog_create_monitor":"createMonitor","datadog_create_slo":"createSlo","datadog_delete_dashboard":"deleteDashboard","datadog_delete_slo":"deleteSlo","datadog_get_browser_synthetics_results":"getBrowserSyntheticTestResults","datadog_get_dashboard":"getDashboard","datadog_get_incident":"getIncident","datadog_get_monitor":"getMonitor","datadog_get_security_signal":"getSecuritySignal","datadog_get_slo":"getSlo","datadog_get_slo_history":"getSloHistory","datadog_get_synthetics_results":"getSyntheticTestResults","datadog_get_synthetics_test":"getSyntheticTest","datadog_list_dashboards":"listDashboards","datadog_list_downtimes":"listDowntimes","datadog_list_incidents":"listIncidents","datadog_list_monitors":"listMonitors","datadog_list_security_rules":"listSecurityRules","datadog_list_security_signals":"listSecuritySignals","datadog_list_services":"listServices","datadog_list_slos":"listSlos","datadog_list_synthetics_tests":"listSyntheticTests","datadog_mute_monitor":"muteMonitor","datadog_query_logs":"queryLogs","datadog_query_timeseries":"queryTimeseries","datadog_search_spans":"searchSpans","datadog_send_logs":"sendLogs","datadog_submit_metrics":"submitMetrics","datadog_trigger_synthetics_tests":"triggerSyntheticTests","datadog_unmute_monitor":"unmuteMonitor","datadog_update_incident":"updateIncident","datadog_update_security_signal_assignee":"assignSecuritySignal","datadog_update_security_signal_state":"updateSecuritySignalState","datadog_update_slo":"updateSlo","datadog_update_synthetics_status":"pauseOrStartSyntheticTest"}},"datadog_v2":{"namespace":"datadog","methods":{"datadog_add_incident_todo":"addIncidentTodo","datadog_cancel_downtime":"cancelDowntime","datadog_create_dashboard":"createDashboard","datadog_create_downtime":"createDowntime","datadog_create_event":"createEvent","datadog_create_incident":"createIncident","datadog_create_monitor":"createMonitor","datadog_create_slo":"createSlo","datadog_delete_dashboard":"deleteDashboard","datadog_delete_slo":"deleteSlo","datadog_get_browser_synthetics_results":"getBrowserSyntheticTestResults","datadog_get_dashboard":"getDashboard","datadog_get_incident":"getIncident","datadog_get_monitor":"getMonitor","datadog_get_security_signal":"getSecuritySignal","datadog_get_slo":"getSlo","datadog_get_slo_history":"getSloHistory","datadog_get_synthetics_results":"getSyntheticTestResults","datadog_get_synthetics_test":"getSyntheticTest","datadog_list_dashboards":"listDashboards","datadog_list_downtimes":"listDowntimes","datadog_list_incidents":"listIncidents","datadog_list_monitors":"listMonitors","datadog_list_security_rules":"listSecurityRules","datadog_list_security_signals":"listSecuritySignals","datadog_list_services":"listServices","datadog_list_slos":"listSlos","datadog_list_synthetics_tests":"listSyntheticTests","datadog_mute_monitor":"muteMonitor","datadog_query_logs":"queryLogs","datadog_query_timeseries":"queryTimeseries","datadog_search_spans":"searchSpans","datadog_send_logs":"sendLogs","datadog_submit_metrics":"submitMetrics","datadog_trigger_synthetics_tests":"triggerSyntheticTests","datadog_unmute_monitor":"unmuteMonitor","datadog_update_incident":"updateIncident","datadog_update_security_signal_assignee":"assignSecuritySignal","datadog_update_security_signal_state":"updateSecuritySignalState","datadog_update_slo":"updateSlo","datadog_update_synthetics_status":"pauseOrStartSyntheticTest"},"params":{"action":{"oauthCredential":"credential"}}},"datagma":{"namespace":"datagma","methods":{"datagma_enrich_company":"enrichCompany","datagma_enrich_person":"enrichPerson","datagma_find_email":"findEmail","datagma_find_phone":"findPhone","datagma_get_credits":"getRemainingCredits"}},"daytona":{"namespace":"legacy.daytona","methods":{"create_sandbox":"createSandbox","delete_sandbox":"deleteSandbox","download_file":"downloadFile","execute_command":"executeCommand","get_sandbox":"getSandbox","git_clone":"gitClone","list_files":"listFiles","list_sandboxes":"listSandboxes","run_code":"runCode","start_sandbox":"startSandbox","stop_sandbox":"stopSandbox","upload_file":"uploadFile"}},"daytona_v2":{"namespace":"daytona","methods":{"create_sandbox":"createSandbox","delete_sandbox":"deleteSandbox","download_file":"downloadFile","execute_command":"executeCommand","get_sandbox":"getSandbox","git_clone":"gitClone","list_files":"listFiles","list_sandboxes":"listSandboxes","run_code":"runCode","start_sandbox":"startSandbox","stop_sandbox":"stopSandbox","upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"deployments":{"namespace":"deployments","methods":{"deployments_deploy":"deploy","deployments_get_version":"getVersionDetails","deployments_list_versions":"listVersions","deployments_promote":"promoteVersionToLive","deployments_undeploy":"undeploy"}},"devin":{"namespace":"legacy.devin","methods":{"append_session_tags":"appendSessionTags","archive_session":"archiveSession","create_session":"createSession","get_session":"getSession","get_session_tags":"getSessionTags","list_session_attachments":"listSessionAttachments","list_session_messages":"listSessionMessages","list_sessions":"listSessions","replace_session_tags":"replaceSessionTags","send_message":"sendMessage","terminate_session":"terminateSession"}},"devin_v2":{"namespace":"devin","methods":{"append_session_tags":"appendSessionTags","archive_session":"archiveSession","create_session":"createSession","get_session":"getSession","get_session_tags":"getSessionTags","list_session_attachments":"listSessionAttachments","list_session_messages":"listSessionMessages","list_sessions":"listSessions","replace_session_tags":"replaceSessionTags","send_message":"sendMessage","terminate_session":"terminateSession"},"params":{"action":{"oauthCredential":"credential"}}},"discord":{"namespace":"legacy.discord","methods":{"discord_add_reaction":"addReaction","discord_archive_thread":"archiveThread","discord_assign_role":"assignRole","discord_ban_member":"banMember","discord_bulk_delete_messages":"bulkDeleteMessages","discord_create_channel":"createChannel","discord_create_invite":"createInvite","discord_create_role":"createRole","discord_create_thread":"createThread","discord_create_webhook":"createWebhook","discord_delete_channel":"deleteChannel","discord_delete_invite":"deleteInvite","discord_delete_message":"deleteMessage","discord_delete_role":"deleteRole","discord_delete_webhook":"deleteWebhook","discord_edit_message":"editMessage","discord_execute_webhook":"executeWebhook","discord_get_channel":"getChannel","discord_get_invite":"getInvite","discord_get_member":"getMember","discord_get_messages":"getChannelMessages","discord_get_pinned_messages":"getPinnedMessages","discord_get_server":"getServerInformation","discord_get_user":"getUserInformation","discord_get_webhook":"getWebhook","discord_join_thread":"joinThread","discord_kick_member":"kickMember","discord_leave_thread":"leaveThread","discord_list_channels":"listChannels","discord_list_roles":"listRoles","discord_pin_message":"pinMessage","discord_remove_reaction":"removeReaction","discord_remove_role":"removeRole","discord_send_message":"sendMessage","discord_unban_member":"unbanMember","discord_unpin_message":"unpinMessage","discord_update_channel":"updateChannel","discord_update_member":"updateMember","discord_update_role":"updateRole"}},"discord_v2":{"namespace":"discord","methods":{"discord_add_reaction":"addReaction","discord_archive_thread":"archiveThread","discord_assign_role":"assignRole","discord_ban_member":"banMember","discord_bulk_delete_messages":"bulkDeleteMessages","discord_create_channel":"createChannel","discord_create_invite":"createInvite","discord_create_role":"createRole","discord_create_thread":"createThread","discord_create_webhook":"createWebhook","discord_delete_channel":"deleteChannel","discord_delete_invite":"deleteInvite","discord_delete_message":"deleteMessage","discord_delete_role":"deleteRole","discord_delete_webhook":"deleteWebhook","discord_edit_message":"editMessage","discord_execute_webhook":"executeWebhook","discord_get_channel":"getChannel","discord_get_invite":"getInvite","discord_get_member":"getMember","discord_get_messages":"getChannelMessages","discord_get_pinned_messages":"getPinnedMessages","discord_get_server":"getServerInformation","discord_get_user":"getUserInformation","discord_get_webhook":"getWebhook","discord_join_thread":"joinThread","discord_kick_member":"kickMember","discord_leave_thread":"leaveThread","discord_list_channels":"listChannels","discord_list_roles":"listRoles","discord_pin_message":"pinMessage","discord_remove_reaction":"removeReaction","discord_remove_role":"removeRole","discord_send_message":"sendMessage","discord_unban_member":"unbanMember","discord_unpin_message":"unpinMessage","discord_update_channel":"updateChannel","discord_update_member":"updateMember","discord_update_role":"updateRole"},"params":{"action":{"oauthCredential":"credential"}}},"docusign":{"namespace":"docusign","methods":{"create_from_template":"sendFromTemplate","download_document":"downloadDocument","get_envelope":"getEnvelope","list_envelopes":"listEnvelopes","list_recipients":"listRecipients","list_templates":"listTemplates","send_envelope":"sendEnvelope","void_envelope":"voidEnvelope"},"params":{"action":{"oauthCredential":"credential"}}},"downdetector":{"namespace":"downdetector","methods":{"downdetector_get_company":"getCompany","downdetector_get_company_attribution":"getCompanyAttribution","downdetector_get_company_baseline":"getCompanyBaseline","downdetector_get_company_events":"getCompanyEvents","downdetector_get_company_incidents":"getCompanyIncidents","downdetector_get_company_indicators":"getCompanyIndicators","downdetector_get_company_last_15":"getCompanyLast15Minutes","downdetector_get_company_status":"getCompanyStatus","downdetector_get_provider":"getProvider","downdetector_get_reports":"getReports","downdetector_get_site_companies":"getSiteCompanies","downdetector_list_categories":"listCategories","downdetector_list_incidents":"listIncidents","downdetector_list_sites":"listSites","downdetector_search_companies":"searchCompanies"}},"dropbox":{"namespace":"legacy.dropbox","methods":{"dropbox_copy":"copyFileFolder","dropbox_create_folder":"createFolder","dropbox_create_shared_link":"createSharedLink","dropbox_delete":"deleteFileFolder","dropbox_download":"downloadFile","dropbox_get_metadata":"getMetadata","dropbox_list_folder":"listFolder","dropbox_list_revisions":"listRevisions","dropbox_list_shared_links":"listSharedLinks","dropbox_move":"moveFileFolder","dropbox_restore":"restoreFile","dropbox_search":"searchFiles","dropbox_upload":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"dropbox_v2":{"namespace":"dropbox","methods":{"dropbox_copy":"copyFileFolder","dropbox_create_folder":"createFolder","dropbox_create_shared_link":"createSharedLink","dropbox_delete":"deleteFileFolder","dropbox_download":"downloadFile","dropbox_get_metadata":"getMetadata","dropbox_list_folder":"listFolder","dropbox_list_revisions":"listRevisions","dropbox_list_shared_links":"listSharedLinks","dropbox_move":"moveFileFolder","dropbox_restore":"restoreFile","dropbox_search":"searchFiles","dropbox_upload":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"dropcontact":{"namespace":"dropcontact","methods":{"dropcontact_enrich_contact":"enrichContact"}},"dspy":{"namespace":"dspy","methods":{"chain_of_thought":"chainOfThought","predict":"predict","react":"reActAgent"}},"dub":{"namespace":"legacy.dub","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"}},"dub_v2":{"namespace":"legacy.dubV2","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"}},"dub_v3":{"namespace":"dub","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"},"params":{"action":{"oauthCredential":"credential"}}},"duckduckgo":{"namespace":"duckduckgo"},"dynamodb":{"namespace":"legacy.dynamodb","methods":{"delete":"deleteItem","get":"getItem","introspect":"introspect","put":"putItem","query":"query","scan":"scan","update":"updateItem"}},"dynamodb_v2":{"namespace":"dynamodb","methods":{"delete":"deleteItem","get":"getItem","introspect":"introspect","put":"putItem","query":"query","scan":"scan","update":"updateItem"},"params":{"action":{"oauthCredential":"credential"}}},"dynatrace":{"namespace":"legacy.dynatrace","methods":{"dynatrace_add_problem_comment":"addProblemComment","dynatrace_add_tags":"addTags","dynatrace_close_problem":"closeProblem","dynatrace_create_settings_object":"createSettingsObject","dynatrace_create_slo":"createSlo","dynatrace_delete_problem_comment":"deleteProblemComment","dynatrace_delete_settings_object":"deleteSettingsObject","dynatrace_delete_slo":"deleteSlo","dynatrace_delete_tag":"deleteTag","dynatrace_execute_synthetic_monitors":"executeSyntheticMonitors","dynatrace_get_attack":"getAttack","dynatrace_get_audit_logs":"getAuditLogs","dynatrace_get_entity":"getEntity","dynatrace_get_event":"getEvent","dynatrace_get_metric":"getMetricDescriptor","dynatrace_get_problem":"getProblem","dynatrace_get_problem_comment":"getProblemComment","dynatrace_get_security_problem":"getSecurityProblem","dynatrace_get_settings_object":"getSettingsObject","dynatrace_get_slo":"getSlo","dynatrace_get_synthetic_batch":"getSyntheticBatch","dynatrace_ingest_event":"ingestEvent","dynatrace_ingest_logs":"ingestLogs","dynatrace_ingest_metrics":"ingestMetrics","dynatrace_list_attacks":"listAttacks","dynatrace_list_entities":"listEntities","dynatrace_list_entity_types":"listEntityTypes","dynatrace_list_events":"listEvents","dynatrace_list_metrics":"listMetrics","dynatrace_list_problem_comments":"listProblemComments","dynatrace_list_problems":"listProblems","dynatrace_list_remediation_items":"listRemediationItems","dynatrace_list_security_problems":"listSecurityProblems","dynatrace_list_settings_objects":"listSettingsObjects","dynatrace_list_settings_schemas":"listSettingsSchemas","dynatrace_list_slos":"listSlos","dynatrace_list_synthetic_monitors":"listSyntheticMonitors","dynatrace_list_tags":"listTags","dynatrace_mute_security_problem":"muteSecurityProblem","dynatrace_mute_security_problems":"muteSecurityProblemsBulk","dynatrace_query_metrics":"queryMetrics","dynatrace_search_logs":"searchLogs","dynatrace_unmute_security_problem":"unmuteSecurityProblem","dynatrace_unmute_security_problems":"unmuteSecurityProblemsBulk","dynatrace_update_problem_comment":"updateProblemComment","dynatrace_update_settings_object":"updateSettingsObject","dynatrace_update_slo":"updateSlo"}},"dynatrace_v2":{"namespace":"dynatrace","methods":{"dynatrace_add_problem_comment":"addProblemComment","dynatrace_add_tags":"addTags","dynatrace_close_problem":"closeProblem","dynatrace_create_settings_object":"createSettingsObject","dynatrace_create_slo":"createSlo","dynatrace_delete_problem_comment":"deleteProblemComment","dynatrace_delete_settings_object":"deleteSettingsObject","dynatrace_delete_slo":"deleteSlo","dynatrace_delete_tag":"deleteTag","dynatrace_execute_synthetic_monitors":"executeSyntheticMonitors","dynatrace_get_attack":"getAttack","dynatrace_get_audit_logs":"getAuditLogs","dynatrace_get_entity":"getEntity","dynatrace_get_event":"getEvent","dynatrace_get_metric":"getMetricDescriptor","dynatrace_get_problem":"getProblem","dynatrace_get_problem_comment":"getProblemComment","dynatrace_get_security_problem":"getSecurityProblem","dynatrace_get_settings_object":"getSettingsObject","dynatrace_get_slo":"getSlo","dynatrace_get_synthetic_batch":"getSyntheticBatch","dynatrace_ingest_event":"ingestEvent","dynatrace_ingest_logs":"ingestLogs","dynatrace_ingest_metrics":"ingestMetrics","dynatrace_list_attacks":"listAttacks","dynatrace_list_entities":"listEntities","dynatrace_list_entity_types":"listEntityTypes","dynatrace_list_events":"listEvents","dynatrace_list_metrics":"listMetrics","dynatrace_list_problem_comments":"listProblemComments","dynatrace_list_problems":"listProblems","dynatrace_list_remediation_items":"listRemediationItems","dynatrace_list_security_problems":"listSecurityProblems","dynatrace_list_settings_objects":"listSettingsObjects","dynatrace_list_settings_schemas":"listSettingsSchemas","dynatrace_list_slos":"listSlos","dynatrace_list_synthetic_monitors":"listSyntheticMonitors","dynatrace_list_tags":"listTags","dynatrace_mute_security_problem":"muteSecurityProblem","dynatrace_mute_security_problems":"muteSecurityProblemsBulk","dynatrace_query_metrics":"queryMetrics","dynatrace_search_logs":"searchLogs","dynatrace_unmute_security_problem":"unmuteSecurityProblem","dynatrace_unmute_security_problems":"unmuteSecurityProblemsBulk","dynatrace_update_problem_comment":"updateProblemComment","dynatrace_update_settings_object":"updateSettingsObject","dynatrace_update_slo":"updateSlo"},"params":{"action":{"oauthCredential":"credential"}}},"ec2":{"namespace":"legacy.ec2","methods":{"allocate_address":"allocateElasticIp","associate_address":"associateElasticIp","authorize_security_group_ingress":"authorizeSecurityGroupIngress","create_snapshot":"createEbsSnapshot","create_tags":"createTags","delete_snapshot":"deleteEbsSnapshot","delete_tags":"deleteTags","delete_volume":"deleteEbsVolume","describe_addresses":"describeElasticIps","describe_availability_zones":"describeAvailabilityZones","describe_images":"describeAmis","describe_instance_status":"describeInstanceStatus","describe_instances":"describeInstances","describe_internet_gateways":"describeInternetGateways","describe_key_pairs":"describeKeyPairs","describe_nat_gateways":"describeNatGateways","describe_network_acls":"describeNetworkAcls","describe_network_interfaces":"describeNetworkInterfaces","describe_regions":"describeRegions","describe_route_tables":"describeRouteTables","describe_security_groups":"describeSecurityGroups","describe_snapshots":"describeEbsSnapshots","describe_subnets":"describeSubnets","describe_volumes":"describeEbsVolumes","describe_vpc_endpoints":"describeVpcEndpoints","describe_vpc_peering_connections":"describeVpcPeeringConnections","describe_vpcs":"describeVpcs","disassociate_address":"disassociateElasticIp","reboot_instances":"rebootInstances","release_address":"releaseElasticIp","revoke_security_group_ingress":"revokeSecurityGroupIngress","start_instances":"startInstances","stop_instances":"stopInstances","terminate_instances":"terminateInstances"}},"ec2_v2":{"namespace":"ec2","methods":{"allocate_address":"allocateElasticIp","associate_address":"associateElasticIp","authorize_security_group_ingress":"authorizeSecurityGroupIngress","create_snapshot":"createEbsSnapshot","create_tags":"createTags","delete_snapshot":"deleteEbsSnapshot","delete_tags":"deleteTags","delete_volume":"deleteEbsVolume","describe_addresses":"describeElasticIps","describe_availability_zones":"describeAvailabilityZones","describe_images":"describeAmis","describe_instance_status":"describeInstanceStatus","describe_instances":"describeInstances","describe_internet_gateways":"describeInternetGateways","describe_key_pairs":"describeKeyPairs","describe_nat_gateways":"describeNatGateways","describe_network_acls":"describeNetworkAcls","describe_network_interfaces":"describeNetworkInterfaces","describe_regions":"describeRegions","describe_route_tables":"describeRouteTables","describe_security_groups":"describeSecurityGroups","describe_snapshots":"describeEbsSnapshots","describe_subnets":"describeSubnets","describe_volumes":"describeEbsVolumes","describe_vpc_endpoints":"describeVpcEndpoints","describe_vpc_peering_connections":"describeVpcPeeringConnections","describe_vpcs":"describeVpcs","disassociate_address":"disassociateElasticIp","reboot_instances":"rebootInstances","release_address":"releaseElasticIp","revoke_security_group_ingress":"revokeSecurityGroupIngress","start_instances":"startInstances","stop_instances":"stopInstances","terminate_instances":"terminateInstances"},"params":{"action":{"oauthCredential":"credential"}}},"elasticsearch":{"namespace":"elasticsearch","methods":{"elasticsearch_bulk":"bulkOperations","elasticsearch_cluster_health":"clusterHealth","elasticsearch_cluster_stats":"clusterStats","elasticsearch_count":"countDocuments","elasticsearch_create_index":"createIndex","elasticsearch_delete_document":"deleteDocument","elasticsearch_delete_index":"deleteIndex","elasticsearch_get_document":"getDocument","elasticsearch_get_index":"getIndexInfo","elasticsearch_index_document":"indexDocument","elasticsearch_list_indices":"listIndices","elasticsearch_search":"search","elasticsearch_update_document":"updateDocument"}},"elevenlabs":{"namespace":"legacy.elevenlabs","methods":{"audio_isolation":"audioIsolation","edit_voice_settings":"editVoiceSettings","get_user":"getUserInfo","get_voice":"getVoice","get_voice_settings":"getVoiceSettings","list_models":"listModels","list_voices":"listVoices","sound_effects":"soundEffects","speech_to_speech":"speechToSpeech","tts":"textToSpeech"}},"elevenlabs_v2":{"namespace":"elevenlabs","methods":{"audio_isolation":"audioIsolation","edit_voice_settings":"editVoiceSettings","get_user":"getUserInfo","get_voice":"getVoice","get_voice_settings":"getVoiceSettings","list_models":"listModels","list_voices":"listVoices","sound_effects":"soundEffects","speech_to_speech":"speechToSpeech","tts":"textToSpeech"},"params":{"action":{"oauthCredential":"credential"}}},"emailbison":{"namespace":"legacy.emailbison","methods":{"attach_leads_to_campaign":"attachLeadsToCampaign","attach_tags_to_leads":"attachTagsToLeads","create_campaign":"createCampaign","create_lead":"createLead","create_tag":"createTag","get_lead":"getLead","list_campaigns":"listCampaigns","list_leads":"listLeads","list_replies":"listReplies","list_tags":"listTags","update_campaign":"updateCampaign","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead"},"triggers":{"emailbison_email_account_added":"emailAccountAdded","emailbison_email_account_disconnected":"emailAccountDisconnected","emailbison_email_account_reconnected":"emailAccountReconnected","emailbison_email_account_removed":"emailAccountRemoved","emailbison_email_bounced":"emailBounced","emailbison_email_opened":"emailOpened","emailbison_email_sent":"emailSent","emailbison_lead_first_contacted":"leadFirstContacted","emailbison_lead_interested":"leadInterested","emailbison_lead_replied":"leadReplied","emailbison_lead_unsubscribed":"leadUnsubscribed","emailbison_manual_email_sent":"manualEmailSent","emailbison_tag_attached":"tagAttached","emailbison_tag_removed":"tagRemoved","emailbison_untracked_reply_received":"untrackedReplyReceived","emailbison_warmup_disabled_causing_bounces":"warmupDisabledCausingBounces","emailbison_warmup_disabled_receiving_bounces":"warmupDisabledReceivingBounces"}},"emailbison_v2":{"namespace":"emailbison","methods":{"attach_leads_to_campaign":"attachLeadsToCampaign","attach_tags_to_leads":"attachTagsToLeads","create_campaign":"createCampaign","create_lead":"createLead","create_tag":"createTag","get_lead":"getLead","list_campaigns":"listCampaigns","list_leads":"listLeads","list_replies":"listReplies","list_tags":"listTags","update_campaign":"updateCampaign","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead"},"triggers":{"emailbison_email_account_added":"emailAccountAdded","emailbison_email_account_disconnected":"emailAccountDisconnected","emailbison_email_account_reconnected":"emailAccountReconnected","emailbison_email_account_removed":"emailAccountRemoved","emailbison_email_bounced":"emailBounced","emailbison_email_opened":"emailOpened","emailbison_email_sent":"emailSent","emailbison_lead_first_contacted":"leadFirstContacted","emailbison_lead_interested":"leadInterested","emailbison_lead_replied":"leadReplied","emailbison_lead_unsubscribed":"leadUnsubscribed","emailbison_manual_email_sent":"manualEmailSent","emailbison_tag_attached":"tagAttached","emailbison_tag_removed":"tagRemoved","emailbison_untracked_reply_received":"untrackedReplyReceived","emailbison_warmup_disabled_causing_bounces":"warmupDisabledCausingBounces","emailbison_warmup_disabled_receiving_bounces":"warmupDisabledReceivingBounces"},"params":{"action":{"oauthCredential":"credential"}}},"embeddings":{"namespace":"embeddings"},"enrich":{"namespace":"legacy.enrich","methods":{"check_credits":"checkCredits","company_funding":"companyFundingTraffic","company_lookup":"companyLookup","company_revenue":"companyRevenue","disposable_email_check":"disposableEmailCheck","email_to_ip":"emailToIp","email_to_person_lite":"emailToPersonLite","email_to_phone":"emailToPhone","email_to_profile":"emailToProfile","find_email":"findEmail","get_post_details":"getPostDetails","ip_to_company":"ipToCompany","linkedin_profile":"linkedInProfileEnrichment","linkedin_to_personal_email":"linkedInToPersonalEmail","linkedin_to_work_email":"linkedInToWorkEmail","phone_finder":"phoneFinderLinkedIn","reverse_hash_lookup":"reverseHashLookup","sales_pointer_people":"salesPointerPeople","search_company":"searchCompany","search_company_activities":"searchCompanyActivities","search_company_employees":"searchCompanyEmployees","search_jobs":"searchJobs","search_logo":"searchLogo","search_people":"searchPeople","search_people_activities":"searchPeopleActivities","search_post_comments":"searchPostComments","search_post_comments_by_url":"searchPostCommentsByUrl","search_post_reactions":"searchPostReactions","search_post_reactions_by_url":"searchPostReactionsByUrl","search_posts":"searchPosts","search_similar_companies":"searchSimilarCompanies","verify_email":"verifyEmail"}},"enrich_v2":{"namespace":"enrich","methods":{"check_credits":"checkCredits","company_funding":"companyFundingTraffic","company_lookup":"companyLookup","company_revenue":"companyRevenue","disposable_email_check":"disposableEmailCheck","email_to_ip":"emailToIp","email_to_person_lite":"emailToPersonLite","email_to_phone":"emailToPhone","email_to_profile":"emailToProfile","find_email":"findEmail","get_post_details":"getPostDetails","ip_to_company":"ipToCompany","linkedin_profile":"linkedInProfileEnrichment","linkedin_to_personal_email":"linkedInToPersonalEmail","linkedin_to_work_email":"linkedInToWorkEmail","phone_finder":"phoneFinderLinkedIn","reverse_hash_lookup":"reverseHashLookup","sales_pointer_people":"salesPointerPeople","search_company":"searchCompany","search_company_activities":"searchCompanyActivities","search_company_employees":"searchCompanyEmployees","search_jobs":"searchJobs","search_logo":"searchLogo","search_people":"searchPeople","search_people_activities":"searchPeopleActivities","search_post_comments":"searchPostComments","search_post_comments_by_url":"searchPostCommentsByUrl","search_post_reactions":"searchPostReactions","search_post_reactions_by_url":"searchPostReactionsByUrl","search_posts":"searchPosts","search_similar_companies":"searchSimilarCompanies","verify_email":"verifyEmail"},"params":{"action":{"oauthCredential":"credential"}}},"enrichment":{"namespace":"enrichment","methods":{"company-domain":"companyDomain","company-info":"companyInfo","email-verification":"emailVerification","linkedin-profile":"linkedInProfile","phone-number":"phoneNumber","work-email":"workEmail"}},"enrow":{"namespace":"enrow","methods":{"enrow_find_email":"findEmail","enrow_verify_email":"verifyEmail"}},"evaluator":{"namespace":"evaluator"},"exa":{"namespace":"exa","methods":{"exa_agent":"agent","exa_answer":"answer","exa_find_similar_links":"findSimilarLinks","exa_get_contents":"getContents","exa_search":"search"}},"extend":{"namespace":"legacy.extend"},"extend_v2":{"namespace":"legacy.extendV2"},"extend_v3":{"namespace":"extend","params":{"action":{"oauthCredential":"credential"}}},"fathom":{"namespace":"legacy.fathom","methods":{"fathom_get_summary":"getSummary","fathom_get_transcript":"getTranscript","fathom_list_meeting_types":"listMeetingTypes","fathom_list_meetings":"listMeetings","fathom_list_team_members":"listTeamMembers","fathom_list_teams":"listTeams"},"triggers":{"fathom_new_meeting":"newMeeting","fathom_webhook":"webhook"}},"fathom_v2":{"namespace":"fathom","methods":{"fathom_get_summary":"getSummary","fathom_get_transcript":"getTranscript","fathom_list_meeting_types":"listMeetingTypes","fathom_list_meetings":"listMeetings","fathom_list_team_members":"listTeamMembers","fathom_list_teams":"listTeams"},"triggers":{"fathom_new_meeting":"newMeeting","fathom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"file":{"namespace":"legacy.file"},"file_v2":{"namespace":"legacy.fileV2"},"file_v3":{"namespace":"legacy.fileV3","methods":{"file_append":"append","file_get":"get","file_parser_v3":"read","file_write":"write"}},"file_v4":{"namespace":"legacy.fileV4","methods":{"file_append":"append","file_fetch":"fetch","file_read":"read","file_write":"write"}},"file_v5":{"namespace":"fileV5","methods":{"file_append":"append","file_compress":"compress","file_create_folder":"createFolder","file_decompress":"decompress","file_delete_folder":"deleteFolder","file_edit":"applyEdit","file_fetch":"fetch","file_get_content":"getContent","file_list":"list","file_manage_sharing":"manageSharing","file_move":"moveFile","file_read":"read","file_restore_folder":"restoreFolder","file_search":"search","file_update_folder":"moveFolder","file_write":"write"}},"findymail":{"namespace":"findymail","methods":{"findymail_find_email_from_linkedin":"findEmailFromLinkedIn","findymail_find_email_from_name":"findEmailFromName","findymail_find_emails_by_domain":"findEmailsByDomain","findymail_find_employees":"findEmployees","findymail_find_phone":"findPhone","findymail_get_company":"getCompanyInfo","findymail_get_credits":"getRemainingCredits","findymail_lookup_technologies":"lookupTechnologiesByDomain","findymail_reverse_email_lookup":"reverseEmailLookup","findymail_search_technologies":"searchTechnologies","findymail_verify_email":"verifyEmail"}},"firecrawl":{"namespace":"firecrawl","methods":{"agent":"agent","batch_scrape":"batchScrape","batch_scrape_status":"batchScrapeStatus","cancel_crawl":"cancelCrawl","crawl":"crawl","crawl_status":"crawlStatus","credit_usage":"creditUsage","enrich":"enrichContactOrCompany","extract":"extract","extract_status":"extractStatus","map":"map","parse":"parseDocument","scrape":"scrape","search":"search"}},"fireflies":{"namespace":"legacy.fireflies","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"}},"fireflies_v2":{"namespace":"legacy.firefliesV2","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"}},"fireflies_v3":{"namespace":"fireflies","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"},"params":{"action":{"oauthCredential":"credential"}}},"fivetran":{"namespace":"fivetran","methods":{"cancel_transformation":"cancelTransformation","create_connect_card":"createConnectCard","create_connection":"createConnection","create_destination":"createDestination","create_group":"createGroup","delete_connection":"deleteConnection","get_account_info":"getAccountInfo","get_connection":"getConnection","get_connection_schema_config":"getSchemaConfig","get_connection_warnings":"getConnectionWarnings","get_connector_type":"getConnectorType","get_destination":"getDestination","get_group":"getGroup","get_sync_history":"getSyncHistory","get_transformation":"getTransformation","list_connections":"listConnections","list_connector_types":"listConnectorTypes","list_destinations":"listDestinations","list_groups":"listGroups","list_transformations":"listTransformations","list_users":"listUsers","pause_connection":"pauseConnection","reload_connection_schema":"reloadSchema","resume_connection":"resumeConnection","resync_connection":"reSyncConnection","resync_tables":"reSyncTables","run_connection_setup_tests":"runConnectionSetupTests","run_destination_setup_tests":"runDestinationSetupTests","run_transformation":"runTransformation","sync_connection":"syncConnection","update_connection":"updateConnection","update_connection_schema":"updateSchemaSync","update_connection_table":"updateTableSync","update_schema_config":"updateSchemaConfig"},"triggers":{"fivetran_connection_failure":"connectionFailure","fivetran_connection_successful":"connectionSuccessful","fivetran_create_connector":"createConnector","fivetran_delete_connector":"deleteConnector","fivetran_edit_connector":"editConnector","fivetran_force_update_connector":"forceUpdateConnector","fivetran_pause_connector":"pauseConnector","fivetran_resume_connector":"resumeConnector","fivetran_resync_connector":"resyncConnector","fivetran_resync_table":"resyncTable","fivetran_sync_end":"syncEnd","fivetran_sync_start":"syncStart","fivetran_transformation_failed":"transformationFailed","fivetran_transformation_start":"transformationStart","fivetran_transformation_succeeded":"transformationSucceeded","fivetran_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"flint":{"namespace":"legacy.flint","methods":{"flint_create_task":"createTask","flint_generate_pages":"generatePages","flint_get_task":"getTask"}},"flint_v2":{"namespace":"flint","methods":{"flint_create_task":"createTask","flint_generate_pages":"generatePages","flint_get_task":"getTask"},"params":{"action":{"oauthCredential":"credential"}}},"flow":{"namespace":"flow","methods":{"add_link":"addLink","create_branch":"createBranch","create_comment":"createComment","create_entities":"createEntities","create_entity":"createEntity","delete_comment":"deleteComment","delete_entity":"deleteEntity","filter_entities":"filterEntities","get_comment":"getComment","get_data_model":"getDataModel","get_entities":"getEntities","get_entity_history":"getEntityHistory","get_project":"getProject","list_branches":"listBranches","list_comments":"listComments","list_entities":"listEntities","list_projects":"listProjects","remove_link":"removeLink","restore_entity":"restoreEntity","search_entities":"searchEntities","set_value":"setValue","set_values":"setValues","update_comment":"updateComment"},"params":{"action":{"oauthCredential":"credential"}}},"function":{"namespace":"fn"},"gamma":{"namespace":"legacy.gamma","methods":{"check_status":"checkStatus","generate":"generate","generate_from_template":"generateFromTemplate","list_folders":"listFolders","list_themes":"listThemes"}},"gamma_v2":{"namespace":"gamma","methods":{"check_status":"checkStatus","generate":"generate","generate_from_template":"generateFromTemplate","list_folders":"listFolders","list_themes":"listThemes"},"params":{"action":{"oauthCredential":"credential"}}},"gauge":{"namespace":"gauge","methods":{"gauge_add_tags_to_prompts":"addTagsToPrompts","gauge_bulk_update_prompts":"bulkUpdatePrompts","gauge_create_prompts":"createPrompts","gauge_create_tag":"createTag","gauge_create_topic":"createTopic","gauge_delete_tag":"deleteTag","gauge_get_answer":"getAnswer","gauge_get_category":"getCategory","gauge_get_current_credential":"getCurrentCredential","gauge_get_organization":"getOrganization","gauge_get_prompt":"getPrompt","gauge_get_query_metadata":"getQueryCatalog","gauge_get_tag":"getTag","gauge_get_topic":"getTopic","gauge_list_answers":"listAnswers","gauge_list_brands":"listBrands","gauge_list_categories":"listCategories","gauge_list_citations":"listCitations","gauge_list_organizations":"listOrganizations","gauge_list_prompts":"listPrompts","gauge_list_tags":"listTags","gauge_list_topics":"listTopics","gauge_query":"runReportQuery","gauge_remove_tags_from_prompts":"removeTagsFromPrompts","gauge_rename_topic":"renameTopic","gauge_update_prompt":"updatePrompt","gauge_update_tag":"updateTag"},"params":{"action":{"oauthCredential":"credential"}}},"generic_webhook":{"namespace":"genericWebhook","triggers":{"generic_webhook":"webhook"}},"github":{"namespace":"legacy.github","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"}},"github_v2":{"namespace":"legacy.githubV2","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"}},"github_v3":{"namespace":"github","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"},"params":{"action":{"oauthCredential":"credential"}}},"gitlab":{"namespace":"legacy.gitlab","methods":{"gitlab_activate_user":"activateUser","gitlab_add_member":"addMember","gitlab_add_saml_group_link":"addSamlGroupLink","gitlab_approve_access_request":"approveAccessRequest","gitlab_approve_merge_request":"approveMergeRequest","gitlab_approve_user":"approveUserSignup","gitlab_ban_user":"banUser","gitlab_block_user":"blockUser","gitlab_cancel_pipeline":"cancelPipeline","gitlab_compare_branches":"compareBranches","gitlab_create_branch":"createBranch","gitlab_create_file":"createFile","gitlab_create_issue":"createIssue","gitlab_create_issue_note":"addIssueComment","gitlab_create_merge_request":"createMergeRequest","gitlab_create_merge_request_note":"addMrComment","gitlab_create_pipeline":"createPipeline","gitlab_create_release":"createRelease","gitlab_create_user":"createUser","gitlab_deactivate_user":"deactivateUser","gitlab_delete_branch":"deleteBranch","gitlab_delete_issue":"deleteIssue","gitlab_delete_saml_group_link":"deleteSamlGroupLink","gitlab_delete_user":"deleteUser","gitlab_delete_user_identity":"deleteUserIdentity","gitlab_deny_access_request":"denyAccessRequest","gitlab_get_file":"getFile","gitlab_get_group":"getGroup","gitlab_get_issue":"getIssue","gitlab_get_job_log":"getJobLog","gitlab_get_merge_request":"getMergeRequest","gitlab_get_merge_request_changes":"getMrChanges","gitlab_get_pipeline":"getPipeline","gitlab_get_project":"getProject","gitlab_invite_member":"inviteMemberByEmail","gitlab_list_access_requests":"listAccessRequests","gitlab_list_branches":"listBranches","gitlab_list_commits":"listCommits","gitlab_list_groups":"listGroups","gitlab_list_invitations":"listInvitations","gitlab_list_issues":"listIssues","gitlab_list_members":"listMembers","gitlab_list_merge_requests":"listMergeRequests","gitlab_list_pipeline_jobs":"listPipelineJobs","gitlab_list_pipelines":"listPipelines","gitlab_list_projects":"listProjects","gitlab_list_releases":"listReleases","gitlab_list_repository_tree":"listRepositoryTree","gitlab_list_saml_group_links":"listSamlGroupLinks","gitlab_list_user_memberships":"listUserMemberships","gitlab_merge_merge_request":"mergeMergeRequest","gitlab_play_job":"playJob","gitlab_reject_user":"rejectUserSignup","gitlab_remove_member":"removeMember","gitlab_retry_pipeline":"retryPipeline","gitlab_revoke_invitation":"revokeInvitation","gitlab_search_users":"searchUsers","gitlab_unban_user":"unbanUser","gitlab_unblock_user":"unblockUser","gitlab_update_file":"updateFile","gitlab_update_invitation":"updateInvitation","gitlab_update_issue":"updateIssue","gitlab_update_member":"updateMember","gitlab_update_merge_request":"updateMergeRequest","gitlab_update_user":"updateUser"},"triggers":{"gitlab_comment":"comment","gitlab_issue":"issue","gitlab_merge_request":"mergeRequest","gitlab_pipeline":"pipeline","gitlab_push":"push","gitlab_webhook":"webhook"}},"gitlab_v2":{"namespace":"gitlab","methods":{"gitlab_activate_user":"activateUser","gitlab_add_member":"addMember","gitlab_add_saml_group_link":"addSamlGroupLink","gitlab_approve_access_request":"approveAccessRequest","gitlab_approve_merge_request":"approveMergeRequest","gitlab_approve_user":"approveUserSignup","gitlab_ban_user":"banUser","gitlab_block_user":"blockUser","gitlab_cancel_pipeline":"cancelPipeline","gitlab_compare_branches":"compareBranches","gitlab_create_branch":"createBranch","gitlab_create_file":"createFile","gitlab_create_issue":"createIssue","gitlab_create_issue_note":"addIssueComment","gitlab_create_merge_request":"createMergeRequest","gitlab_create_merge_request_note":"addMrComment","gitlab_create_pipeline":"createPipeline","gitlab_create_release":"createRelease","gitlab_create_user":"createUser","gitlab_deactivate_user":"deactivateUser","gitlab_delete_branch":"deleteBranch","gitlab_delete_issue":"deleteIssue","gitlab_delete_saml_group_link":"deleteSamlGroupLink","gitlab_delete_user":"deleteUser","gitlab_delete_user_identity":"deleteUserIdentity","gitlab_deny_access_request":"denyAccessRequest","gitlab_get_file":"getFile","gitlab_get_group":"getGroup","gitlab_get_issue":"getIssue","gitlab_get_job_log":"getJobLog","gitlab_get_merge_request":"getMergeRequest","gitlab_get_merge_request_changes":"getMrChanges","gitlab_get_pipeline":"getPipeline","gitlab_get_project":"getProject","gitlab_invite_member":"inviteMemberByEmail","gitlab_list_access_requests":"listAccessRequests","gitlab_list_branches":"listBranches","gitlab_list_commits":"listCommits","gitlab_list_groups":"listGroups","gitlab_list_invitations":"listInvitations","gitlab_list_issues":"listIssues","gitlab_list_members":"listMembers","gitlab_list_merge_requests":"listMergeRequests","gitlab_list_pipeline_jobs":"listPipelineJobs","gitlab_list_pipelines":"listPipelines","gitlab_list_projects":"listProjects","gitlab_list_releases":"listReleases","gitlab_list_repository_tree":"listRepositoryTree","gitlab_list_saml_group_links":"listSamlGroupLinks","gitlab_list_user_memberships":"listUserMemberships","gitlab_merge_merge_request":"mergeMergeRequest","gitlab_play_job":"playJob","gitlab_reject_user":"rejectUserSignup","gitlab_remove_member":"removeMember","gitlab_retry_pipeline":"retryPipeline","gitlab_revoke_invitation":"revokeInvitation","gitlab_search_users":"searchUsers","gitlab_unban_user":"unbanUser","gitlab_unblock_user":"unblockUser","gitlab_update_file":"updateFile","gitlab_update_invitation":"updateInvitation","gitlab_update_issue":"updateIssue","gitlab_update_member":"updateMember","gitlab_update_merge_request":"updateMergeRequest","gitlab_update_user":"updateUser"},"triggers":{"gitlab_comment":"comment","gitlab_issue":"issue","gitlab_merge_request":"mergeRequest","gitlab_pipeline":"pipeline","gitlab_push":"push","gitlab_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"gmail":{"namespace":"legacy.gmail","methods":{"add_label_gmail":"addLabel","archive_gmail":"archiveEmail","delete_gmail":"deleteEmail","draft_gmail":"draftEmail","edit_draft_gmail":"editDraft","mark_read_gmail":"markAsRead","mark_unread_gmail":"markAsUnread","move_gmail":"moveEmail","read_gmail":"readEmail","remove_label_gmail":"removeLabel","search_gmail":"searchEmail","send_gmail":"sendEmail","unarchive_gmail":"unarchiveEmail"},"triggers":{"gmail_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"gmail_v2":{"namespace":"gmail","methods":{"add_label_gmail":"addLabel","archive_gmail":"archiveEmail","create_label_gmail":"createLabel","delete_draft_gmail":"deleteDraft","delete_gmail":"deleteEmail","delete_label_gmail":"deleteLabel","draft_gmail":"draftEmail","edit_draft_gmail":"editDraft","get_draft_gmail":"getDraft","get_thread_gmail":"getThread","list_drafts_gmail":"listDrafts","list_labels_gmail":"listLabels","list_threads_gmail":"listThreads","mark_read_gmail":"markAsRead","mark_unread_gmail":"markAsUnread","move_gmail":"moveEmail","read_gmail":"readEmail","remove_label_gmail":"removeLabel","search_gmail":"searchEmail","send_gmail":"sendEmail","trash_thread_gmail":"trashThread","unarchive_gmail":"unarchiveEmail","untrash_thread_gmail":"untrashThread","update_label_gmail":"updateLabel"},"triggers":{"gmail_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"gong":{"namespace":"legacy.gong","methods":{"aggregate_activity":"aggregateActivity","aggregate_by_period":"aggregateByPeriod","answered_scorecards":"answeredScorecards","ask_anything":"askAnything","assign_flow_prospects":"assignFlowProspects","create_call":"createCall","day_by_day_activity":"dayByDayActivity","get_brief":"getBrief","get_call":"getCall","get_call_transcript":"getCallTranscript","get_coaching":"getCoaching","get_extensive_calls":"getExtensiveCalls","get_folder_content":"getFolderContent","get_logs":"getLogs","get_prospect_flows":"getProspectFlows","get_user":"getUser","interaction_stats":"interactionStats","list_calls":"listCalls","list_flows":"listFlows","list_library_folders":"listLibraryFolders","list_scorecards":"listScorecards","list_trackers":"listTrackers","list_users":"listUsers","list_workspaces":"listWorkspaces","lookup_email":"lookupEmail","lookup_phone":"lookupPhone","purge_email_address":"purgeEmailAddress","purge_phone_number":"purgePhoneNumber","unassign_flow_prospects":"unassignFlowProspects"},"triggers":{"gong_call_completed":"callCompleted","gong_webhook":"webhook"}},"gong_v2":{"namespace":"gong","methods":{"aggregate_activity":"aggregateActivity","aggregate_by_period":"aggregateByPeriod","answered_scorecards":"answeredScorecards","ask_anything":"askAnything","assign_flow_prospects":"assignFlowProspects","create_call":"createCall","day_by_day_activity":"dayByDayActivity","get_brief":"getBrief","get_call":"getCall","get_call_transcript":"getCallTranscript","get_coaching":"getCoaching","get_extensive_calls":"getExtensiveCalls","get_folder_content":"getFolderContent","get_logs":"getLogs","get_prospect_flows":"getProspectFlows","get_user":"getUser","interaction_stats":"interactionStats","list_calls":"listCalls","list_flows":"listFlows","list_library_folders":"listLibraryFolders","list_scorecards":"listScorecards","list_trackers":"listTrackers","list_users":"listUsers","list_workspaces":"listWorkspaces","lookup_email":"lookupEmail","lookup_phone":"lookupPhone","purge_email_address":"purgeEmailAddress","purge_phone_number":"purgePhoneNumber","unassign_flow_prospects":"unassignFlowProspects"},"triggers":{"gong_call_completed":"callCompleted","gong_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"google_ads":{"namespace":"googleAds","methods":{"ad_performance":"adPerformance","campaign_performance":"campaignPerformance","list_ad_groups":"listAdGroups","list_campaigns":"listCampaigns","list_customers":"listCustomers","search":"customQueryGaql"},"params":{"action":{"oauthCredential":"credential"}}},"google_appsheet":{"namespace":"googleAppsheet","methods":{"google_appsheet_add_rows":"addRows","google_appsheet_delete_rows":"deleteRows","google_appsheet_edit_rows":"editRows","google_appsheet_find_rows":"findRows"}},"google_bigquery":{"namespace":"googleBigquery","methods":{"create_dataset":"createDataset","create_table":"createTable","delete_dataset":"deleteDataset","delete_table":"deleteTable","get_query_results":"getQueryResults","get_table":"getTable","insert_rows":"insertRows","list_datasets":"listDatasets","list_table_data":"listTableData","list_tables":"listTables","query":"runQuery"},"params":{"action":{"oauthCredential":"credential"}}},"google_books":{"namespace":"googleBooks","methods":{"volume_details":"getVolumeDetails","volume_search":"searchVolumes"}},"google_calendar":{"namespace":"legacy.googleCalendar","methods":{"create":"createEvent","create_calendar":"createCalendar","delete":"deleteEvent","delete_calendar":"deleteCalendar","freebusy":"checkFreeBusy","get":"getEvent","instances":"getRecurringInstances","invite":"inviteAttendees","list":"listEvents","list_acl":"listSharing","list_calendars":"listCalendars","move":"moveEvent","quick_add":"quickAddNaturalLanguage","respond":"respondToInvitationRsvp","share_calendar":"shareCalendar","unshare_calendar":"removeSharing","update":"updateEvent","update_acl":"updateSharing","update_calendar":"updateCalendar"},"triggers":{"google_calendar_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_calendar_v2":{"namespace":"googleCalendar","methods":{"create":"createEvent","create_calendar":"createCalendar","delete":"deleteEvent","delete_calendar":"deleteCalendar","freebusy":"checkFreeBusy","get":"getEvent","instances":"getRecurringInstances","invite":"inviteAttendees","list":"listEvents","list_acl":"listSharing","list_calendars":"listCalendars","move":"moveEvent","quick_add":"quickAddNaturalLanguage","respond":"respondToInvitationRsvp","share_calendar":"shareCalendar","unshare_calendar":"removeSharing","update":"updateEvent","update_acl":"updateSharing","update_calendar":"updateCalendar"},"triggers":{"google_calendar_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_contacts":{"namespace":"googleContacts","methods":{"create":"createContact","delete":"deleteContact","get":"getContact","list":"listContacts","search":"searchContacts","update":"updateContact"},"params":{"action":{"oauthCredential":"credential"}}},"google_docs":{"namespace":"googleDocs","methods":{"create":"createDocument","create_named_range":"createNamedRange","create_paragraph_bullets":"createBullets","delete_content_range":"deleteContentRange","delete_named_range":"deleteNamedRange","delete_paragraph_bullets":"deleteBullets","insert_image":"insertImage","insert_page_break":"insertPageBreak","insert_table":"insertTable","insert_text":"insertText","read":"readDocument","replace_text":"findReplaceText","update_paragraph_style":"applyParagraphStyle","update_text_style":"applyTextStyle","write":"writeToDocument"},"params":{"action":{"oauthCredential":"credential"}}},"google_drive":{"namespace":"googleDrive","methods":{"copy":"copyFile","create_comment":"createComment","create_file":"createFile","create_folder":"createFolder","delete":"deletePermanently","delete_comment":"deleteComment","download":"downloadFile","export":"exportFile","get_about":"getDriveInfo","get_content":"getFileContent","get_file":"getFileInfo","get_revision":"getRevision","list":"listFiles","list_comments":"listComments","list_permissions":"listPermissions","list_revisions":"listRevisions","move":"moveFile","search":"searchFiles","share":"shareFile","trash":"moveToTrash","unshare":"removeSharing","untrash":"restoreFromTrash","update":"updateFile","upload":"uploadFile"},"triggers":{"google_drive_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_forms":{"namespace":"googleForms","methods":{"batch_update":"batchUpdate","create_form":"createForm","create_watch":"createWatch","delete_watch":"deleteWatch","get_form":"getForm","get_responses":"getResponses","list_watches":"listWatches","renew_watch":"renewWatch","set_publish_settings":"setPublishSettings"},"triggers":{"google_forms_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"google_groups":{"namespace":"googleGroups","methods":{"add_alias":"addAlias","add_member":"addMember","create_group":"createGroup","delete_group":"deleteGroup","get_group":"getGroup","get_member":"getMember","get_settings":"getSettings","has_member":"checkMembership","list_aliases":"listAliases","list_groups":"listGroups","list_members":"listMembers","remove_alias":"removeAlias","remove_member":"removeMember","update_group":"updateGroup","update_member":"updateMemberRole","update_settings":"updateSettings"},"params":{"action":{"oauthCredential":"credential"}}},"google_maps":{"namespace":"googleMaps","methods":{"air_quality":"airQuality","directions":"getDirections","distance_matrix":"distanceMatrix","elevation":"getElevation","geocode":"geocodeAddress","geolocate":"geolocateWiFiCell","place_details":"placeDetails","places_nearby":"nearbyPlaces","places_search":"searchPlaces","pollen":"pollenForecast","reverse_geocode":"reverseGeocode","snap_to_roads":"snapToRoads","solar":"solarPotential","speed_limits":"speedLimits","timezone":"getTimezone","validate_address":"validateAddress"}},"google_meet":{"namespace":"googleMeet","methods":{"create_space":"createSpace","end_conference":"endConference","get_conference_record":"getConferenceRecord","get_space":"getSpace","list_conference_records":"listConferenceRecords","list_participants":"listParticipants"},"params":{"action":{"oauthCredential":"credential"}}},"google_pagespeed":{"namespace":"googlePagespeed"},"google_search":{"namespace":"googleSearch"},"google_sheets":{"namespace":"legacy.googleSheets","methods":{"append":"appendData","read":"readData","update":"updateData","write":"writeData"},"params":{"action":{"oauthCredential":"credential"}}},"google_sheets_v2":{"namespace":"googleSheets","methods":{"append":"appendData","batch_clear":"batchClear","batch_get":"batchRead","batch_update":"batchUpdate","clear":"clearData","copy_sheet":"copySheet","create":"createSpreadsheet","delete_rows":"deleteRows","delete_sheet":"deleteSheet","delete_spreadsheet":"deleteSpreadsheet","get_info":"getSpreadsheetInfo","read":"readData","update":"updateData","write":"writeData"},"triggers":{"google_sheets_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_slides":{"namespace":"legacy.googleSlides","methods":{"add_image":"addImage","add_slide":"addSlide","batch_update":"batchUpdateRaw","copy_presentation":"copyPresentation","create":"createPresentation","create_line":"createLine","create_paragraph_bullets":"createParagraphBullets","create_shape":"createShape","create_sheets_chart":"embedSheetsChart","create_table":"createTable","create_video":"embedVideo","delete_object":"deleteObject","delete_paragraph_bullets":"deleteParagraphBullets","delete_table_column":"deleteTableColumn","delete_table_row":"deleteTableRow","delete_text":"deleteText","duplicate_object":"duplicateObject","export_presentation":"exportPresentation","get_page":"getPage","get_thumbnail":"getThumbnail","group_objects":"groupObjects","insert_table_columns":"insertTableColumns","insert_table_rows":"insertTableRows","insert_text":"insertText","merge_table_cells":"mergeTableCells","read":"readPresentation","refresh_sheets_chart":"refreshSheetsChart","reorder_slides":"reorderSlides","replace_all_shapes_with_image":"replaceAllShapesWithImage","replace_all_shapes_with_sheets_chart":"replaceAllShapesWithSheetsChart","replace_all_text":"replaceAllText","replace_image":"replaceImage","reroute_line":"rerouteLine","ungroup_objects":"ungroupObjects","unmerge_table_cells":"unmergeTableCells","update_image_properties":"updateImageProperties","update_line_category":"updateLineCategory","update_line_properties":"updateLineProperties","update_page_element_alt_text":"updateAltText","update_page_element_transform":"updateElementTransform","update_page_elements_z_order":"updateZOrder","update_page_properties":"updatePageProperties","update_paragraph_style":"updateParagraphStyle","update_shape_properties":"updateShapeProperties","update_slide_properties":"updateSlideProperties","update_table_border_properties":"updateTableBorderProperties","update_table_cell_properties":"updateTableCellProperties","update_table_column_properties":"updateTableColumnProperties","update_table_row_properties":"updateTableRowProperties","update_text_style":"updateTextStyle","update_video_properties":"updateVideoProperties","write":"writeToPresentation"},"params":{"action":{"oauthCredential":"credential"}}},"google_slides_v2":{"namespace":"googleSlides","methods":{"add_image":"addImage","add_slide":"addSlide","batch_update":"batchUpdateRaw","copy_presentation":"copyPresentation","create":"createPresentation","create_line":"createLine","create_paragraph_bullets":"createParagraphBullets","create_shape":"createShape","create_sheets_chart":"embedSheetsChart","create_table":"createTable","create_video":"embedVideo","delete_object":"deleteObject","delete_paragraph_bullets":"deleteParagraphBullets","delete_table_column":"deleteTableColumn","delete_table_row":"deleteTableRow","delete_text":"deleteText","duplicate_object":"duplicateObject","export_presentation":"exportPresentation","get_page":"getPage","get_thumbnail":"getThumbnail","group_objects":"groupObjects","insert_table_columns":"insertTableColumns","insert_table_rows":"insertTableRows","insert_text":"insertText","merge_table_cells":"mergeTableCells","read":"readPresentation","refresh_sheets_chart":"refreshSheetsChart","reorder_slides":"reorderSlides","replace_all_shapes_with_image":"replaceAllShapesWithImage","replace_all_shapes_with_sheets_chart":"replaceAllShapesWithSheetsChart","replace_all_text":"replaceAllText","replace_image":"replaceImage","reroute_line":"rerouteLine","ungroup_objects":"ungroupObjects","unmerge_table_cells":"unmergeTableCells","update_image_properties":"updateImageProperties","update_line_category":"updateLineCategory","update_line_properties":"updateLineProperties","update_page_element_alt_text":"updateAltText","update_page_element_transform":"updateElementTransform","update_page_elements_z_order":"updateZOrder","update_page_properties":"updatePageProperties","update_paragraph_style":"updateParagraphStyle","update_shape_properties":"updateShapeProperties","update_slide_properties":"updateSlideProperties","update_table_border_properties":"updateTableBorderProperties","update_table_cell_properties":"updateTableCellProperties","update_table_column_properties":"updateTableColumnProperties","update_table_row_properties":"updateTableRowProperties","update_text_style":"updateTextStyle","update_video_properties":"updateVideoProperties","write":"writeToPresentation"},"params":{"action":{"oauthCredential":"credential"}}},"google_tasks":{"namespace":"googleTasks","methods":{"create":"createTask","delete":"deleteTask","get":"getTask","list":"listTasks","list_task_lists":"listTaskLists","update":"updateTask"},"params":{"action":{"oauthCredential":"credential"}}},"google_translate":{"namespace":"googleTranslate","methods":{"detect":"detectLanguage","text":"translateText"}},"google_vault":{"namespace":"googleVault","methods":{"add_held_accounts":"addHeldAccounts","add_matters_permissions":"addMatterCollaborator","close_matters":"closeMatter","create_matters":"createMatter","create_matters_export":"createExport","create_matters_holds":"createHold","create_saved_query":"createSavedQuery","delete_matters":"deleteMatter","delete_matters_export":"deleteExport","delete_matters_holds":"deleteHold","delete_saved_query":"deleteSavedQuery","download_export_file":"downloadExportFile","list_matters":"listMatters","list_matters_export":"listExports","list_matters_holds":"listHolds","list_saved_queries":"listSavedQueries","remove_held_accounts":"removeHeldAccounts","remove_matters_permissions":"removeMatterCollaborator","reopen_matters":"reopenMatter","undelete_matters":"undeleteMatter","update_matters":"updateMatter","update_matters_holds":"updateHold"},"params":{"action":{"oauthCredential":"credential"}}},"grafana":{"namespace":"legacy.grafana","methods":{"grafana_check_data_source_health":"checkDataSourceHealth","grafana_create_alert_rule":"createAlertRule","grafana_create_annotation":"createAnnotation","grafana_create_contact_point":"createContactPoint","grafana_create_dashboard":"createDashboard","grafana_create_folder":"createFolder","grafana_delete_alert_rule":"deleteAlertRule","grafana_delete_annotation":"deleteAnnotation","grafana_delete_contact_point":"deleteContactPoint","grafana_delete_dashboard":"deleteDashboard","grafana_delete_folder":"deleteFolder","grafana_get_alert_rule":"getAlertRule","grafana_get_alert_rule_group":"getAlertRuleGroup","grafana_get_dashboard":"getDashboard","grafana_get_data_source":"getDataSource","grafana_get_folder":"getFolder","grafana_get_health":"getHealth","grafana_list_alert_rules":"listAlertRules","grafana_list_annotations":"listAnnotations","grafana_list_contact_points":"listContactPoints","grafana_list_dashboards":"listDashboards","grafana_list_data_sources":"listDataSources","grafana_list_folders":"listFolders","grafana_move_folder":"moveFolder","grafana_query_data_source":"queryDataSource","grafana_update_alert_rule":"updateAlertRule","grafana_update_annotation":"updateAnnotation","grafana_update_contact_point":"updateContactPoint","grafana_update_dashboard":"updateDashboard","grafana_update_folder":"updateFolder"}},"grafana_v2":{"namespace":"grafana","methods":{"grafana_check_data_source_health":"checkDataSourceHealth","grafana_create_alert_rule":"createAlertRule","grafana_create_annotation":"createAnnotation","grafana_create_contact_point":"createContactPoint","grafana_create_dashboard":"createDashboard","grafana_create_folder":"createFolder","grafana_delete_alert_rule":"deleteAlertRule","grafana_delete_annotation":"deleteAnnotation","grafana_delete_contact_point":"deleteContactPoint","grafana_delete_dashboard":"deleteDashboard","grafana_delete_folder":"deleteFolder","grafana_get_alert_rule":"getAlertRule","grafana_get_alert_rule_group":"getAlertRuleGroup","grafana_get_dashboard":"getDashboard","grafana_get_data_source":"getDataSource","grafana_get_folder":"getFolder","grafana_get_health":"getHealth","grafana_list_alert_rules":"listAlertRules","grafana_list_annotations":"listAnnotations","grafana_list_contact_points":"listContactPoints","grafana_list_dashboards":"listDashboards","grafana_list_data_sources":"listDataSources","grafana_list_folders":"listFolders","grafana_move_folder":"moveFolder","grafana_query_data_source":"queryDataSource","grafana_update_alert_rule":"updateAlertRule","grafana_update_annotation":"updateAnnotation","grafana_update_contact_point":"updateContactPoint","grafana_update_dashboard":"updateDashboard","grafana_update_folder":"updateFolder"},"params":{"action":{"oauthCredential":"credential"}}},"grain":{"namespace":"legacy.grain","methods":{"grain_create_hook":"createWebhook","grain_delete_hook":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams","grain_list_views":"listViews"},"triggers":{"grain_highlight_created":"highlightCreated","grain_highlight_updated":"highlightUpdated","grain_item_added":"itemAdded","grain_item_updated":"itemUpdated","grain_recording_created":"recordingCreated","grain_recording_updated":"recordingUpdated","grain_story_created":"storyCreated","grain_webhook":"webhook"}},"grain_v2":{"namespace":"legacy.grainV2","methods":{"grain_create_hook_v2":"createWebhook","grain_delete_hook_v2":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks_v2":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams"},"triggers":{"grain_all_events_v2":"allEvents","grain_highlight_added_v2":"highlightAdded","grain_highlight_deleted_v2":"highlightDeleted","grain_highlight_updated_v2":"highlightUpdated","grain_recording_added_v2":"recordingAdded","grain_recording_deleted_v2":"recordingDeleted","grain_recording_updated_v2":"recordingUpdated","grain_story_added_v2":"storyAdded","grain_story_deleted_v2":"storyDeleted","grain_story_updated_v2":"storyUpdated","grain_upload_status_v2":"uploadStatus"}},"grain_v3":{"namespace":"grain","methods":{"grain_create_hook_v2":"createWebhook","grain_delete_hook_v2":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks_v2":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams"},"triggers":{"grain_all_events_v2":"allEvents","grain_highlight_added_v2":"highlightAdded","grain_highlight_deleted_v2":"highlightDeleted","grain_highlight_updated_v2":"highlightUpdated","grain_recording_added_v2":"recordingAdded","grain_recording_deleted_v2":"recordingDeleted","grain_recording_updated_v2":"recordingUpdated","grain_story_added_v2":"storyAdded","grain_story_deleted_v2":"storyDeleted","grain_story_updated_v2":"storyUpdated","grain_upload_status_v2":"uploadStatus"},"params":{"action":{"oauthCredential":"credential"}}},"granola":{"namespace":"legacy.granola","methods":{"create_webhook_endpoint":"createWebhookEndpoint","delete_webhook_endpoint":"deleteWebhookEndpoint","get_note":"getNote","get_transcript":"getTranscript","list_audit_events":"listAuditEvents","list_folders":"listFolders","list_notes":"listNotes","list_webhook_endpoints":"listWebhookEndpoints","update_webhook_endpoint":"updateWebhookEndpoint"},"triggers":{"granola_note_access_granted":"noteAccessGranted","granola_note_edited":"noteEdited","granola_note_generated":"noteGenerated","granola_webhook":"webhook"}},"granola_v2":{"namespace":"granola","methods":{"create_webhook_endpoint":"createWebhookEndpoint","delete_webhook_endpoint":"deleteWebhookEndpoint","get_note":"getNote","get_transcript":"getTranscript","list_audit_events":"listAuditEvents","list_folders":"listFolders","list_notes":"listNotes","list_webhook_endpoints":"listWebhookEndpoints","update_webhook_endpoint":"updateWebhookEndpoint"},"triggers":{"granola_note_access_granted":"noteAccessGranted","granola_note_edited":"noteEdited","granola_note_generated":"noteGenerated","granola_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"greenhouse":{"namespace":"legacy.greenhouse","methods":{"greenhouse_get_application":"getApplication","greenhouse_get_candidate":"getCandidate","greenhouse_get_job":"getJob","greenhouse_get_user":"getUser","greenhouse_list_applications":"listApplications","greenhouse_list_candidates":"listCandidates","greenhouse_list_departments":"listDepartments","greenhouse_list_job_stages":"listJobStages","greenhouse_list_jobs":"listJobs","greenhouse_list_offices":"listOffices","greenhouse_list_users":"listUsers"},"triggers":{"greenhouse_candidate_hired":"candidateHired","greenhouse_candidate_rejected":"candidateRejected","greenhouse_candidate_stage_change":"candidateStageChange","greenhouse_job_created":"jobCreated","greenhouse_job_updated":"jobUpdated","greenhouse_new_application":"newApplication","greenhouse_offer_created":"offerCreated","greenhouse_webhook":"webhook"}},"greenhouse_v2":{"namespace":"greenhouse","methods":{"apply_candidate_tag":"applyCandidateTag","convert_prospect":"convertProspect","create_application":"createApplication","create_attachment":"createAttachment","create_candidate":"createCandidate","create_candidate_tag":"createCandidateTag","create_note":"createNote","delete_application":"deleteApplication","delete_attachment":"deleteAttachment","delete_candidate":"deleteCandidate","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_user":"getUser","hire_application":"hireApplication","list_application_stages":"listApplicationStages","list_applications":"listApplications","list_applied_candidate_tags":"listAppliedCandidateTags","list_attachments":"listAttachments","list_candidate_educations":"listCandidateEducations","list_candidate_employments":"listCandidateEmployments","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_close_reasons":"listCloseReasons","list_custom_field_options":"listCustomFieldOptions","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_email_templates":"listEmailTemplates","list_interviews":"listInterviews","list_job_hiring_managers":"listJobHiringManagers","list_job_interview_stages":"listJobInterviewStages","list_job_owners":"listJobOwners","list_jobs":"listJobs","list_notes":"listNotes","list_offers":"listOffers","list_offices":"listOffices","list_openings":"listOpenings","list_prospect_pool_stages":"listProspectPoolStages","list_prospect_pools":"listProspectPools","list_referrers":"listReferrers","list_rejection_reasons":"listRejectionReasons","list_scorecards":"listScorecards","list_sources":"listSources","list_users":"listUsers","move_application":"moveApplication","reject_application":"rejectApplication","remove_candidate_tag":"removeCandidateTag","unreject_application":"unrejectApplication","update_application":"updateApplication","update_candidate":"updateCandidate"},"triggers":{"greenhouse_candidate_hired":"candidateHired","greenhouse_candidate_rejected":"candidateRejected","greenhouse_candidate_stage_change":"candidateStageChange","greenhouse_job_created":"jobCreated","greenhouse_job_updated":"jobUpdated","greenhouse_new_application":"newApplication","greenhouse_offer_created":"offerCreated","greenhouse_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"greptile":{"namespace":"greptile","methods":{"greptile_index_repo":"indexRepository","greptile_query":"query","greptile_status":"checkStatus"}},"guardrails":{"namespace":"guardrails"},"harmonic":{"namespace":"harmonic","methods":{"harmonic_batch_get_people":"batchGetPeople","harmonic_clear_people_saved_search_net_new_results":"clearPeopleSavedSearchNetNewResults","harmonic_enrich_person":"enrichPerson","harmonic_get_company_employees":"getCompanyEmployees","harmonic_get_email_enrichment_job":"getEmailEnrichmentJob","harmonic_get_email_enrichment_usage":"getEmailEnrichmentUsage","harmonic_get_enrichment_status":"getEnrichmentStatus","harmonic_get_people_saved_search_net_new_results":"getPeopleSavedSearchNetNewResults","harmonic_get_people_saved_search_results":"getPeopleSavedSearchResults","harmonic_get_person":"getPerson","harmonic_list_people_saved_searches":"listPeopleSavedSearches","harmonic_search_people_scout":"searchPeopleWithScout","harmonic_submit_email_enrichment_job":"submitEmailEnrichmentJob"},"params":{"action":{"oauthCredential":"credential"}}},"helpscout":{"namespace":"helpscout","methods":{"assign_conversation":"assignConversation","create_conversation":"createConversation","create_customer":"createCustomer","create_customer_thread":"addCustomerMessage","create_note":"addNote","create_reply":"replyToConversation","delete_conversation":"deleteConversation","get_conversation":"getConversation","get_current_user":"getCurrentUser","get_customer":"getCustomer","get_organization":"getOrganization","get_saved_reply":"getSavedReply","list_conversations":"listConversations","list_custom_fields":"listCustomFields","list_customer_properties":"listCustomerProperties","list_customers":"listCustomers","list_folders":"listFolders","list_mailboxes":"listInboxes","list_organizations":"listOrganizations","list_saved_replies":"listSavedReplies","list_tags":"listTags","list_teams":"listTeams","list_threads":"listThreads","list_users":"listUsers","list_workflows":"listWorkflows","move_conversation":"moveConversation","run_workflow":"runWorkflow","set_conversation_tags":"setConversationTags","snooze_conversation":"snoozeConversation","unassign_conversation":"unassignConversation","unsnooze_conversation":"unsnoozeConversation","update_conversation_customer":"changeConversationCustomer","update_conversation_status":"updateConversationStatus","update_conversation_subject":"updateConversationSubject","update_custom_fields":"updateCustomFields","update_customer":"updateCustomer","update_customer_properties":"updateCustomerProperties"},"triggers":{"helpscout_agent_replied":"agentReplied","helpscout_conversation_assigned":"conversationAssigned","helpscout_conversation_created":"conversationCreated","helpscout_conversation_deleted":"conversationDeleted","helpscout_conversation_merged":"conversationMerged","helpscout_conversation_moved":"conversationMoved","helpscout_conversation_status_changed":"conversationStatusChanged","helpscout_conversation_tags_updated":"conversationTagsUpdated","helpscout_customer_created":"customerCreated","helpscout_customer_replied":"customerReplied","helpscout_customer_updated":"customerUpdated","helpscout_note_created":"noteCreated","helpscout_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"hex":{"namespace":"legacy.hex","methods":{"cancel_run":"cancelRun","create_collection":"createCollection","create_group":"createGroup","deactivate_user":"deactivateUser","delete_group":"deleteGroup","get_collection":"getCollection","get_data_connection":"getDataConnection","get_group":"getGroup","get_project":"getProject","get_project_runs":"getProjectRuns","get_queried_tables":"getQueriedTables","get_run_status":"getRunStatus","list_collections":"listCollections","list_data_connections":"listDataConnections","list_groups":"listGroups","list_projects":"listProjects","list_users":"listUsers","run_project":"runProject","update_collection":"updateCollection","update_group":"updateGroup","update_project":"updateProject"}},"hex_v2":{"namespace":"hex","methods":{"cancel_run":"cancelRun","create_collection":"createCollection","create_group":"createGroup","deactivate_user":"deactivateUser","delete_group":"deleteGroup","get_collection":"getCollection","get_data_connection":"getDataConnection","get_group":"getGroup","get_project":"getProject","get_project_runs":"getProjectRuns","get_queried_tables":"getQueriedTables","get_run_status":"getRunStatus","list_collections":"listCollections","list_data_connections":"listDataConnections","list_groups":"listGroups","list_projects":"listProjects","list_users":"listUsers","run_project":"runProject","update_collection":"updateCollection","update_group":"updateGroup","update_project":"updateProject"},"params":{"action":{"oauthCredential":"credential"}}},"higgsfield":{"namespace":"higgsfield","methods":{"higgsfield_cancel_request":"cancelRequest","higgsfield_create_character":"createCharacter","higgsfield_delete_character":"deleteCharacter","higgsfield_delete_request":"deleteRequest","higgsfield_generate":"generateAnyModel","higgsfield_generate_soul_image":"generateSoulImage","higgsfield_get_character":"getCharacter","higgsfield_get_request_status":"getRequestStatus","higgsfield_list_characters":"listCharacters"},"params":{"action":{"oauthCredential":"credential"}}},"hubspot":{"namespace":"hubspot","methods":{"add_list_memberships":"addListMembers","create_appointment":"createAppointment","create_association":"createAssociation","create_company":"createCompany","create_contact":"createContact","create_deal":"createDeal","create_email":"createEmail","create_line_item":"createLineItem","create_list":"createList","create_note":"createNote","create_ticket":"createTicket","delete_association":"deleteAssociation","delete_company":"deleteCompany","delete_contact":"deleteContact","delete_deal":"deleteDeal","delete_line_item":"deleteLineItem","delete_ticket":"deleteTicket","get_appointments":"getAppointments","get_association_labels":"getAssociationLabels","get_carts":"getCarts","get_companies":"getCompanies","get_contacts":"getContacts","get_deals":"getDeals","get_emails":"getEmails","get_line_items":"getLineItems","get_list_memberships":"getListMembers","get_lists":"getLists","get_marketing_events":"getMarketingEvents","get_notes":"getNotes","get_properties":"getProperties","get_quotes":"getQuotes","get_tickets":"getTickets","get_users":"getUsers","list_associations":"listAssociations","list_owners":"listOwners","remove_list_memberships":"removeListMembers","search_companies":"searchCompanies","search_contacts":"searchContacts","search_deals":"searchDeals","search_emails":"searchEmails","search_line_items":"searchLineItems","search_notes":"searchNotes","search_quotes":"searchQuotes","search_tickets":"searchTickets","update_appointment":"updateAppointment","update_company":"updateCompany","update_contact":"updateContact","update_deal":"updateDeal","update_line_item":"updateLineItem","update_ticket":"updateTicket"},"triggers":{"hubspot_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"huggingface":{"namespace":"legacy.huggingface"},"huggingface_v2":{"namespace":"huggingface","params":{"action":{"oauthCredential":"credential"}}},"human_in_the_loop":{"namespace":"legacy.humanInTheLoop"},"human_in_the_loop_v2":{"namespace":"human"},"hunter":{"namespace":"hunter","methods":{"hunter_companies_find":"findCompany","hunter_discover":"discoverCompanies","hunter_domain_search":"domainSearch","hunter_email_count":"emailCount","hunter_email_finder":"emailFinder","hunter_email_verifier":"emailVerifier"}},"iam":{"namespace":"legacy.iam","methods":{"add_user_to_group":"addUserToGroup","attach_role_policy":"attachRolePolicy","attach_user_policy":"attachUserPolicy","create_access_key":"createAccessKey","create_role":"createRole","create_user":"createUser","delete_access_key":"deleteAccessKey","delete_role":"deleteRole","delete_user":"deleteUser","detach_role_policy":"detachRolePolicy","detach_user_policy":"detachUserPolicy","get_policy":"getPolicy","get_role":"getRole","get_user":"getUser","list_access_keys":"listAccessKeys","list_attached_role_policies":"listAttachedRolePolicies","list_attached_user_policies":"listAttachedUserPolicies","list_groups":"listGroups","list_policies":"listPolicies","list_roles":"listRoles","list_users":"listUsers","remove_user_from_group":"removeUserFromGroup","simulate_principal_policy":"simulatePrincipalPolicy","update_access_key":"updateAccessKey"}},"iam_v2":{"namespace":"iam","methods":{"add_user_to_group":"addUserToGroup","attach_role_policy":"attachRolePolicy","attach_user_policy":"attachUserPolicy","create_access_key":"createAccessKey","create_role":"createRole","create_user":"createUser","delete_access_key":"deleteAccessKey","delete_role":"deleteRole","delete_user":"deleteUser","detach_role_policy":"detachRolePolicy","detach_user_policy":"detachUserPolicy","get_policy":"getPolicy","get_role":"getRole","get_user":"getUser","list_access_keys":"listAccessKeys","list_attached_role_policies":"listAttachedRolePolicies","list_attached_user_policies":"listAttachedUserPolicies","list_groups":"listGroups","list_policies":"listPolicies","list_roles":"listRoles","list_users":"listUsers","remove_user_from_group":"removeUserFromGroup","simulate_principal_policy":"simulatePrincipalPolicy","update_access_key":"updateAccessKey"},"params":{"action":{"oauthCredential":"credential"}}},"icypeas":{"namespace":"icypeas","methods":{"icypeas_find_email":"findEmail","icypeas_verify_email":"verifyEmail"}},"identity_center":{"namespace":"legacy.identityCenter","methods":{"check_assignment_deletion_status":"checkAssignmentDeletionStatus","check_assignment_status":"checkAssignmentStatus","create_account_assignment":"createAccountAssignment","delete_account_assignment":"deleteAccountAssignment","describe_account":"describeAccount","describe_group":"describeGroup","describe_user":"describeUser","get_group":"getGroup","get_user":"getUser","list_account_assignments":"listAccountAssignmentsForPrincipal","list_accounts":"listAccounts","list_assignments_for_account":"listAssignmentsForAccount","list_group_memberships":"listGroupMemberships","list_groups":"listGroups","list_instances":"listInstances","list_permission_sets":"listPermissionSets"}},"identity_center_v2":{"namespace":"identityCenter","methods":{"check_assignment_deletion_status":"checkAssignmentDeletionStatus","check_assignment_status":"checkAssignmentStatus","create_account_assignment":"createAccountAssignment","delete_account_assignment":"deleteAccountAssignment","describe_account":"describeAccount","describe_group":"describeGroup","describe_user":"describeUser","get_group":"getGroup","get_user":"getUser","list_account_assignments":"listAccountAssignmentsForPrincipal","list_accounts":"listAccounts","list_assignments_for_account":"listAssignmentsForAccount","list_group_memberships":"listGroupMemberships","list_groups":"listGroups","list_instances":"listInstances","list_permission_sets":"listPermissionSets"},"params":{"action":{"oauthCredential":"credential"}}},"image_generator":{"namespace":"legacy.imageGenerator"},"image_generator_v2":{"namespace":"imageGenerator"},"imap":{"namespace":"imap","triggers":{"imap_poller":"poller"}},"incidentio":{"namespace":"legacy.incidentio","methods":{"incidentio_actions_create":"createAction","incidentio_actions_list":"listActions","incidentio_actions_show":"showAction","incidentio_actions_update":"updateAction","incidentio_alert_events_create":"createAlertEvent","incidentio_alerts_list":"listAlerts","incidentio_alerts_resolve":"resolveAlert","incidentio_alerts_show":"showAlert","incidentio_catalog_entries_list":"listCatalogEntries","incidentio_catalog_types_list":"listCatalogTypes","incidentio_custom_fields_create":"createCustomField","incidentio_custom_fields_delete":"deleteCustomField","incidentio_custom_fields_list":"listCustomFields","incidentio_custom_fields_show":"showCustomField","incidentio_custom_fields_update":"updateCustomField","incidentio_escalation_paths_create":"createEscalationPath","incidentio_escalation_paths_delete":"deleteEscalationPath","incidentio_escalation_paths_list":"listEscalationPaths","incidentio_escalation_paths_show":"showEscalationPath","incidentio_escalation_paths_update":"updateEscalationPath","incidentio_escalations_cancel":"cancelEscalation","incidentio_escalations_create":"createEscalation","incidentio_escalations_list":"listEscalations","incidentio_escalations_show":"showEscalation","incidentio_follow_ups_create":"createFollowUp","incidentio_follow_ups_list":"listFollowUps","incidentio_follow_ups_show":"showFollowUp","incidentio_follow_ups_update":"updateFollowUp","incidentio_incident_alerts_list":"listIncidentAlerts","incidentio_incident_memberships_create":"grantIncidentMembership","incidentio_incident_memberships_revoke":"revokeIncidentMembership","incidentio_incident_participants_list":"listIncidentParticipants","incidentio_incident_roles_create":"createIncidentRole","incidentio_incident_roles_delete":"deleteIncidentRole","incidentio_incident_roles_list":"listIncidentRoles","incidentio_incident_roles_show":"showIncidentRole","incidentio_incident_roles_update":"updateIncidentRole","incidentio_incident_statuses_list":"listIncidentStatuses","incidentio_incident_timestamps_list":"listIncidentTimestamps","incidentio_incident_timestamps_show":"showIncidentTimestamp","incidentio_incident_types_list":"listIncidentTypes","incidentio_incident_updates_list":"listIncidentUpdates","incidentio_incidents_create":"createIncident","incidentio_incidents_list":"listIncidents","incidentio_incidents_show":"showIncident","incidentio_incidents_update":"updateIncident","incidentio_on_call_now":"getWhoIsOnCall","incidentio_schedule_entries_list":"listScheduleEntries","incidentio_schedule_overrides_create":"createScheduleOverride","incidentio_schedule_overrides_list":"listScheduleOverrides","incidentio_schedules_create":"createSchedule","incidentio_schedules_delete":"deleteSchedule","incidentio_schedules_list":"listSchedules","incidentio_schedules_show":"showSchedule","incidentio_schedules_update":"updateSchedule","incidentio_severities_list":"listSeverities","incidentio_teams_list":"listTeams","incidentio_teams_show":"showTeam","incidentio_users_list":"listUsers","incidentio_users_show":"showUser","incidentio_workflows_create":"createWorkflow","incidentio_workflows_delete":"deleteWorkflow","incidentio_workflows_list":"listWorkflows","incidentio_workflows_show":"showWorkflow","incidentio_workflows_update":"updateWorkflow"},"triggers":{"incidentio_alert_created":"alertCreated","incidentio_incident_created":"incidentCreated","incidentio_incident_status_updated":"incidentStatusUpdated","incidentio_incident_updated":"incidentUpdated"}},"incidentio_v2":{"namespace":"incidentio","methods":{"incidentio_actions_create":"createAction","incidentio_actions_list":"listActions","incidentio_actions_show":"showAction","incidentio_actions_update":"updateAction","incidentio_alert_events_create":"createAlertEvent","incidentio_alerts_list":"listAlerts","incidentio_alerts_resolve":"resolveAlert","incidentio_alerts_show":"showAlert","incidentio_catalog_entries_list":"listCatalogEntries","incidentio_catalog_types_list":"listCatalogTypes","incidentio_custom_fields_create":"createCustomField","incidentio_custom_fields_delete":"deleteCustomField","incidentio_custom_fields_list":"listCustomFields","incidentio_custom_fields_show":"showCustomField","incidentio_custom_fields_update":"updateCustomField","incidentio_escalation_paths_create":"createEscalationPath","incidentio_escalation_paths_delete":"deleteEscalationPath","incidentio_escalation_paths_list":"listEscalationPaths","incidentio_escalation_paths_show":"showEscalationPath","incidentio_escalation_paths_update":"updateEscalationPath","incidentio_escalations_cancel":"cancelEscalation","incidentio_escalations_create":"createEscalation","incidentio_escalations_list":"listEscalations","incidentio_escalations_show":"showEscalation","incidentio_follow_ups_create":"createFollowUp","incidentio_follow_ups_list":"listFollowUps","incidentio_follow_ups_show":"showFollowUp","incidentio_follow_ups_update":"updateFollowUp","incidentio_incident_alerts_list":"listIncidentAlerts","incidentio_incident_memberships_create":"grantIncidentMembership","incidentio_incident_memberships_revoke":"revokeIncidentMembership","incidentio_incident_participants_list":"listIncidentParticipants","incidentio_incident_roles_create":"createIncidentRole","incidentio_incident_roles_delete":"deleteIncidentRole","incidentio_incident_roles_list":"listIncidentRoles","incidentio_incident_roles_show":"showIncidentRole","incidentio_incident_roles_update":"updateIncidentRole","incidentio_incident_statuses_list":"listIncidentStatuses","incidentio_incident_timestamps_list":"listIncidentTimestamps","incidentio_incident_timestamps_show":"showIncidentTimestamp","incidentio_incident_types_list":"listIncidentTypes","incidentio_incident_updates_list":"listIncidentUpdates","incidentio_incidents_create":"createIncident","incidentio_incidents_list":"listIncidents","incidentio_incidents_show":"showIncident","incidentio_incidents_update":"updateIncident","incidentio_on_call_now":"getWhoIsOnCall","incidentio_schedule_entries_list":"listScheduleEntries","incidentio_schedule_overrides_create":"createScheduleOverride","incidentio_schedule_overrides_list":"listScheduleOverrides","incidentio_schedules_create":"createSchedule","incidentio_schedules_delete":"deleteSchedule","incidentio_schedules_list":"listSchedules","incidentio_schedules_show":"showSchedule","incidentio_schedules_update":"updateSchedule","incidentio_severities_list":"listSeverities","incidentio_teams_list":"listTeams","incidentio_teams_show":"showTeam","incidentio_users_list":"listUsers","incidentio_users_show":"showUser","incidentio_workflows_create":"createWorkflow","incidentio_workflows_delete":"deleteWorkflow","incidentio_workflows_list":"listWorkflows","incidentio_workflows_show":"showWorkflow","incidentio_workflows_update":"updateWorkflow"},"triggers":{"incidentio_alert_created":"alertCreated","incidentio_incident_created":"incidentCreated","incidentio_incident_status_updated":"incidentStatusUpdated","incidentio_incident_updated":"incidentUpdated"},"params":{"action":{"oauthCredential":"credential"}}},"infisical":{"namespace":"legacy.infisical","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","get_secret":"getSecret","list_secrets":"listSecrets","update_secret":"updateSecret"}},"infisical_v2":{"namespace":"infisical","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","get_secret":"getSecret","list_secrets":"listSecrets","update_secret":"updateSecret"},"params":{"action":{"oauthCredential":"credential"}}},"input_trigger":{"namespace":"legacy.inputTrigger"},"instagram":{"namespace":"legacy.instagram","methods":{"instagram_delete_comment":"deleteComment","instagram_download_media":"downloadMedia","instagram_get_account_insights":"getAccountInsights","instagram_get_container_status":"getContainerStatus","instagram_get_conversation_messages":"getConversationMessages","instagram_get_media":"getMedia","instagram_get_media_insights":"getMediaInsights","instagram_get_message":"getMessage","instagram_get_profile":"getProfile","instagram_get_publishing_limit":"getPublishingLimit","instagram_hide_comment":"hideComment","instagram_list_comments":"listComments","instagram_list_conversations":"listConversations","instagram_list_media":"listMedia","instagram_list_stories":"listStories","instagram_private_reply":"privateReply","instagram_publish_carousel":"publishCarousel","instagram_publish_image":"publishImage","instagram_publish_reel":"publishReel","instagram_publish_story":"publishStory","instagram_publish_video":"publishVideo","instagram_reply_to_comment":"replyToComment","instagram_send_text_message":"sendTextMessage","instagram_set_comments_enabled":"setCommentsEnabled"},"params":{"action":{"oauthCredential":"credential"}}},"instantly":{"namespace":"legacy.instantly","methods":{"activate_campaign":"activateCampaign","create_campaign":"createCampaign","create_lead":"createLead","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_leads":"deleteLeads","get_lead":"getLead","list_campaigns":"listCampaigns","list_emails":"listEmails","list_lead_lists":"listLeadLists","list_leads":"listLeads","patch_campaign":"patchCampaign","patch_lead":"patchLead","pause_campaign":"pauseCampaign","reply_to_email":"replyToEmail","update_lead_interest_status":"updateLeadInterestStatus"},"triggers":{"instantly_account_error":"accountError","instantly_auto_reply_received":"autoReplyReceived","instantly_campaign_completed":"campaignCompleted","instantly_email_bounced":"emailBounced","instantly_email_opened":"emailOpened","instantly_email_sent":"emailSent","instantly_lead_closed":"leadClosed","instantly_lead_interested":"leadInterested","instantly_lead_meeting_booked":"leadMeetingBooked","instantly_lead_meeting_completed":"leadMeetingCompleted","instantly_lead_neutral":"leadNeutral","instantly_lead_no_show":"leadNoShow","instantly_lead_not_interested":"leadNotInterested","instantly_lead_out_of_office":"leadOutOfOffice","instantly_lead_unsubscribed":"leadUnsubscribed","instantly_lead_wrong_person":"leadWrongPerson","instantly_link_clicked":"linkClicked","instantly_reply_received":"replyReceived","instantly_supersearch_enrichment_completed":"supersearchEnrichmentCompleted","instantly_webhook":"webhook"}},"instantly_v2":{"namespace":"instantly","methods":{"activate_campaign":"activateCampaign","create_campaign":"createCampaign","create_lead":"createLead","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_leads":"deleteLeads","get_lead":"getLead","list_campaigns":"listCampaigns","list_emails":"listEmails","list_lead_lists":"listLeadLists","list_leads":"listLeads","patch_campaign":"patchCampaign","patch_lead":"patchLead","pause_campaign":"pauseCampaign","reply_to_email":"replyToEmail","update_lead_interest_status":"updateLeadInterestStatus"},"triggers":{"instantly_account_error":"accountError","instantly_auto_reply_received":"autoReplyReceived","instantly_campaign_completed":"campaignCompleted","instantly_email_bounced":"emailBounced","instantly_email_opened":"emailOpened","instantly_email_sent":"emailSent","instantly_lead_closed":"leadClosed","instantly_lead_interested":"leadInterested","instantly_lead_meeting_booked":"leadMeetingBooked","instantly_lead_meeting_completed":"leadMeetingCompleted","instantly_lead_neutral":"leadNeutral","instantly_lead_no_show":"leadNoShow","instantly_lead_not_interested":"leadNotInterested","instantly_lead_out_of_office":"leadOutOfOffice","instantly_lead_unsubscribed":"leadUnsubscribed","instantly_lead_wrong_person":"leadWrongPerson","instantly_link_clicked":"linkClicked","instantly_reply_received":"replyReceived","instantly_supersearch_enrichment_completed":"supersearchEnrichmentCompleted","instantly_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"intercom":{"namespace":"legacy.intercom","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"}},"intercom_v2":{"namespace":"legacy.intercomV2","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"intercom_contact_created":"contactCreated","intercom_conversation_closed":"conversationClosed","intercom_conversation_created":"conversationCreated","intercom_conversation_reply":"conversationReply","intercom_user_created":"userCreated","intercom_webhook":"webhook"}},"intercom_v3":{"namespace":"intercom","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"intercom_contact_created":"contactCreated","intercom_conversation_closed":"conversationClosed","intercom_conversation_created":"conversationCreated","intercom_conversation_reply":"conversationReply","intercom_user_created":"userCreated","intercom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"intune":{"namespace":"intune","methods":{"intune_get_compliance_policy":"getCompliancePolicy","intune_get_detected_app":"getDetectedApp","intune_get_device":"getDevice","intune_get_device_configuration":"getDeviceConfiguration","intune_list_app_devices":"listAppDevices","intune_list_compliance_policies":"listCompliancePolicies","intune_list_compliance_policy_device_statuses":"listCompliancePolicyDeviceStatuses","intune_list_detected_apps":"listDetectedApps","intune_list_device_configurations":"listDeviceConfigurations","intune_list_devices":"listDevices","intune_reboot_device":"rebootDevice","intune_remote_lock_device":"remoteLockDevice","intune_retire_device":"retireDevice","intune_sync_device":"syncDevice"},"params":{"action":{"oauthCredential":"credential"}}},"jama":{"namespace":"jama","methods":{"create_comment":"createComment","create_item":"createItem","create_relationship":"createRelationship","delete_item":"deleteItem","delete_relationship":"deleteRelationship","get_baseline":"getBaseline","get_current_user":"getCurrentUser","get_filter":"getFilter","get_item":"getItem","get_item_type":"getItemType","get_item_version":"getItemVersion","get_project":"getProject","get_relationship":"getRelationship","get_test_cycle":"getTestCycle","get_test_plan":"getTestPlan","get_test_run":"getTestRun","list_baseline_items":"listBaselineItems","list_baselines":"listBaselines","list_downstream_items":"listDownstreamItems","list_filter_results":"listFilterResults","list_filters":"listFilters","list_item_children":"listItemChildren","list_item_comments":"listItemComments","list_item_types":"listItemTypes","list_item_versions":"listItemVersions","list_items":"listItems","list_pick_list_options":"listPickListOptions","list_pick_lists":"listPickLists","list_projects":"listProjects","list_relationship_types":"listRelationshipTypes","list_relationships":"listRelationships","list_releases":"listReleases","list_tags":"listTags","list_test_cycles":"listTestCycles","list_test_plans":"listTestPlans","list_test_runs":"listTestRuns","list_upstream_items":"listUpstreamItems","search_items":"searchItems","update_item":"updateItem","update_test_run":"updateTestRun"},"params":{"action":{"oauthCredential":"credential"}}},"jina":{"namespace":"jina","methods":{"jina_read_url":"readUrl","jina_search":"search"}},"jira":{"namespace":"jira","methods":{"add_attachment":"addAttachment","add_comment":"addComment","add_watcher":"addWatcher","add_worklog":"addWorklog","assign":"assignIssue","create_link":"createIssueLink","create_sprint":"createSprint","delete":"deleteIssue","delete_attachment":"deleteAttachment","delete_comment":"deleteComment","delete_link":"deleteIssueLink","delete_worklog":"deleteWorklog","get_attachments":"getAttachments","get_comments":"getComments","get_fields":"getFields","get_project":"getProject","get_transitions":"getTransitions","get_users":"getUsers","get_worklogs":"getWorklogs","list_issue_types":"listIssueTypes","list_projects":"listProjects","read":"readIssue","read-bulk":"readBulkIssues","remove_watcher":"removeWatcher","search":"searchIssues","search_users":"searchUsers","transition":"transitionIssue","update":"updateIssue","update_comment":"updateComment","update_worklog":"updateWorklog","write":"writeIssue"},"triggers":{"jira_comment_deleted":"commentDeleted","jira_comment_updated":"commentUpdated","jira_issue_commented":"issueCommented","jira_issue_created":"issueCreated","jira_issue_deleted":"issueDeleted","jira_issue_updated":"issueUpdated","jira_project_created":"projectCreated","jira_sprint_closed":"sprintClosed","jira_sprint_created":"sprintCreated","jira_sprint_started":"sprintStarted","jira_version_released":"versionReleased","jira_webhook":"webhook","jira_worklog_created":"worklogCreated","jira_worklog_deleted":"worklogDeleted","jira_worklog_updated":"worklogUpdated"},"params":{"action":{"oauthCredential":"credential"}}},"jira_service_management":{"namespace":"jiraServiceManagement","methods":{"add_comment":"addComment","add_customer":"addCustomer","add_organization":"addOrganization","add_participants":"addParticipants","answer_approval":"answerApproval","attach_form":"attachForm","copy_forms":"copyForms","create_object":"createAssetObject","create_organization":"createOrganization","create_request":"createRequest","delete_form":"deleteForm","delete_object":"deleteAssetObject","externalise_form":"externaliseForm","get_approvals":"getApprovals","get_comments":"getComments","get_customers":"getCustomers","get_form":"getForm","get_form_answers":"getFormAnswers","get_form_structure":"getFormStructure","get_form_templates":"getFormTemplates","get_issue_forms":"getIssueForms","get_object":"getAssetObject","get_object_schema":"getAssetSchema","get_object_type_attributes":"getAssetObjectTypeAttributes","get_organizations":"getOrganizations","get_participants":"getParticipants","get_queues":"getQueues","get_request":"getRequest","get_request_type_fields":"getRequestTypeFields","get_request_types":"getRequestTypes","get_requests":"getRequests","get_service_desks":"getServiceDesks","get_sla":"getSla","get_transitions":"getTransitions","internalise_form":"internaliseForm","list_object_schemas":"listAssetSchemas","list_object_types":"listAssetObjectTypes","reopen_form":"reopenForm","save_form_answers":"saveFormAnswers","search_objects_aql":"searchAssetsAql","submit_form":"submitForm","transition_request":"transitionRequest","update_object":"updateAssetObject"},"triggers":{"jsm_request_commented":"requestCommented","jsm_request_created":"requestCreated","jsm_request_resolved":"requestResolved","jsm_request_updated":"requestUpdated","jsm_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"jotform":{"namespace":"legacy.jotform","methods":{"add_label_resources":"addLabelResources","clone_form":"cloneForm","create_form":"createForm","create_label":"createLabel","create_question":"createQuestion","create_questions":"createQuestions","create_report":"createReport","create_submission":"createSubmission","create_submissions":"createSubmissions","create_webhook":"createWebhook","delete_form":"deleteForm","delete_label":"deleteLabel","delete_question":"deleteQuestion","delete_report":"deleteReport","delete_submission":"deleteSubmission","delete_webhook":"deleteWebhook","get_form":"getForm","get_form_properties":"getFormProperties","get_history":"getHistory","get_label":"getLabel","get_question":"getQuestion","get_report":"getReport","get_settings":"getSettings","get_submission":"getSubmission","get_usage":"getUsage","get_user":"getAccount","list_form_files":"listFormFiles","list_form_reports":"listFormReports","list_form_submissions":"listFormSubmissions","list_forms":"listForms","list_label_resources":"listLabelResources","list_labels":"listLabels","list_questions":"listQuestions","list_reports":"listReports","list_submissions":"listSubmissions","list_subusers":"listSubUsers","list_webhooks":"listWebhooks","remove_label_resources":"removeLabelResources","update_form_properties":"updateFormProperties","update_label":"updateLabel","update_question":"updateQuestion","update_settings":"updateSettings","update_submission":"updateSubmission"},"triggers":{"jotform_webhook":"webhook"}},"jotform_v2":{"namespace":"jotform","methods":{"add_label_resources":"addLabelResources","clone_form":"cloneForm","create_form":"createForm","create_label":"createLabel","create_question":"createQuestion","create_questions":"createQuestions","create_report":"createReport","create_submission":"createSubmission","create_submissions":"createSubmissions","create_webhook":"createWebhook","delete_form":"deleteForm","delete_label":"deleteLabel","delete_question":"deleteQuestion","delete_report":"deleteReport","delete_submission":"deleteSubmission","delete_webhook":"deleteWebhook","get_form":"getForm","get_form_properties":"getFormProperties","get_history":"getHistory","get_label":"getLabel","get_question":"getQuestion","get_report":"getReport","get_settings":"getSettings","get_submission":"getSubmission","get_usage":"getUsage","get_user":"getAccount","list_form_files":"listFormFiles","list_form_reports":"listFormReports","list_form_submissions":"listFormSubmissions","list_forms":"listForms","list_label_resources":"listLabelResources","list_labels":"listLabels","list_questions":"listQuestions","list_reports":"listReports","list_submissions":"listSubmissions","list_subusers":"listSubUsers","list_webhooks":"listWebhooks","remove_label_resources":"removeLabelResources","update_form_properties":"updateFormProperties","update_label":"updateLabel","update_question":"updateQuestion","update_settings":"updateSettings","update_submission":"updateSubmission"},"triggers":{"jotform_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"jupyter":{"namespace":"legacy.jupyter","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"}},"jupyter_v2":{"namespace":"legacy.jupyterV2","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"}},"jupyter_v3":{"namespace":"jupyter","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"kalshi":{"namespace":"legacy.kalshi","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"}},"kalshi_v2":{"namespace":"legacy.kalshiV2","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"}},"kalshi_v3":{"namespace":"kalshi","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"},"params":{"action":{"oauthCredential":"credential"}}},"ketch":{"namespace":"ketch","methods":{"get_consent":"getConsent","get_subscriptions":"getSubscriptions","invoke_right":"invokeRight","set_consent":"setConsent","set_subscriptions":"setSubscriptions"}},"knowledge":{"namespace":"knowledge","methods":{"create_document":"createDocument","delete_chunk":"deleteChunk","delete_document":"deleteDocument","get_connector":"getConnector","get_document":"getDocument","list_chunks":"listChunks","list_connectors":"listConnectors","list_documents":"listDocuments","list_tags":"listTags","search":"search","trigger_sync":"triggerSync","update_chunk":"updateChunk","upload_chunk":"uploadChunk","upsert_document":"upsertDocument"}},"lambda":{"namespace":"legacy.lambda","methods":{"add_permission":"addPermission","create_alias":"createAlias","create_event_source_mapping":"createEventSourceMapping","create_function":"createFunction","create_function_url_config":"createFunctionUrl","delete_alias":"deleteAlias","delete_event_source_mapping":"deleteEventSourceMapping","delete_function":"deleteFunction","delete_function_concurrency":"deleteFunctionConcurrency","delete_function_event_invoke_config":"deleteAsyncInvokeConfig","delete_function_url_config":"deleteFunctionUrl","delete_provisioned_concurrency_config":"deleteProvisionedConcurrency","get_account_settings":"getAccountSettings","get_alias":"getAlias","get_event_source_mapping":"getEventSourceMapping","get_function":"getFunction","get_function_concurrency":"getFunctionConcurrency","get_function_configuration":"getFunctionConfiguration","get_function_event_invoke_config":"getAsyncInvokeConfig","get_function_recursion_config":"getRecursionConfig","get_function_url_config":"getFunctionUrl","get_layer_version":"getLayerVersion","get_policy":"getPolicy","get_provisioned_concurrency_config":"getProvisionedConcurrency","get_runtime_management_config":"getRuntimeManagementConfig","invoke":"invokeFunction","list_aliases":"listAliases","list_event_source_mappings":"listEventSourceMappings","list_function_event_invoke_configs":"listAsyncInvokeConfigs","list_function_url_configs":"listFunctionUrls","list_functions":"listFunctions","list_layer_versions":"listLayerVersions","list_layers":"listLayers","list_provisioned_concurrency_configs":"listProvisionedConcurrency","list_tags":"listTags","list_versions_by_function":"listFunctionVersions","publish_version":"publishVersion","put_function_concurrency":"setFunctionConcurrency","put_function_event_invoke_config":"setAsyncInvokeConfig","put_function_recursion_config":"setRecursionConfig","put_provisioned_concurrency_config":"setProvisionedConcurrency","put_runtime_management_config":"setRuntimeManagementConfig","remove_permission":"removePermission","tag_resource":"tagResource","untag_resource":"untagResource","update_alias":"updateAlias","update_event_source_mapping":"updateEventSourceMapping","update_function_code":"updateFunctionCode","update_function_configuration":"updateFunctionConfiguration","update_function_url_config":"updateFunctionUrl"}},"lambda_v2":{"namespace":"lambda","methods":{"add_permission":"addPermission","create_alias":"createAlias","create_event_source_mapping":"createEventSourceMapping","create_function":"createFunction","create_function_url_config":"createFunctionUrl","delete_alias":"deleteAlias","delete_event_source_mapping":"deleteEventSourceMapping","delete_function":"deleteFunction","delete_function_concurrency":"deleteFunctionConcurrency","delete_function_event_invoke_config":"deleteAsyncInvokeConfig","delete_function_url_config":"deleteFunctionUrl","delete_provisioned_concurrency_config":"deleteProvisionedConcurrency","get_account_settings":"getAccountSettings","get_alias":"getAlias","get_event_source_mapping":"getEventSourceMapping","get_function":"getFunction","get_function_concurrency":"getFunctionConcurrency","get_function_configuration":"getFunctionConfiguration","get_function_event_invoke_config":"getAsyncInvokeConfig","get_function_recursion_config":"getRecursionConfig","get_function_url_config":"getFunctionUrl","get_layer_version":"getLayerVersion","get_policy":"getPolicy","get_provisioned_concurrency_config":"getProvisionedConcurrency","get_runtime_management_config":"getRuntimeManagementConfig","invoke":"invokeFunction","list_aliases":"listAliases","list_event_source_mappings":"listEventSourceMappings","list_function_event_invoke_configs":"listAsyncInvokeConfigs","list_function_url_configs":"listFunctionUrls","list_functions":"listFunctions","list_layer_versions":"listLayerVersions","list_layers":"listLayers","list_provisioned_concurrency_configs":"listProvisionedConcurrency","list_tags":"listTags","list_versions_by_function":"listFunctionVersions","publish_version":"publishVersion","put_function_concurrency":"setFunctionConcurrency","put_function_event_invoke_config":"setAsyncInvokeConfig","put_function_recursion_config":"setRecursionConfig","put_provisioned_concurrency_config":"setProvisionedConcurrency","put_runtime_management_config":"setRuntimeManagementConfig","remove_permission":"removePermission","tag_resource":"tagResource","untag_resource":"untagResource","update_alias":"updateAlias","update_event_source_mapping":"updateEventSourceMapping","update_function_code":"updateFunctionCode","update_function_configuration":"updateFunctionConfiguration","update_function_url_config":"updateFunctionUrl"},"params":{"action":{"oauthCredential":"credential"}}},"langsmith":{"namespace":"legacy.langsmith","methods":{"langsmith_create_feedback":"createFeedback","langsmith_create_run":"createRun","langsmith_create_runs_batch":"createRunsBatch","langsmith_get_run":"getRun","langsmith_update_run":"updateRun"}},"langsmith_v2":{"namespace":"langsmith","methods":{"langsmith_create_feedback":"createFeedback","langsmith_create_run":"createRun","langsmith_create_runs_batch":"createRunsBatch","langsmith_get_run":"getRun","langsmith_update_run":"updateRun"},"params":{"action":{"oauthCredential":"credential"}}},"latex":{"namespace":"latex","methods":{"latex_compile":"compileDocument","latex_get_package":"getPackageDetails","latex_list_fonts":"listFonts","latex_search_packages":"searchPackages"}},"launchdarkly":{"namespace":"legacy.launchdarkly","methods":{"create_flag":"createFlag","delete_flag":"deleteFlag","get_audit_log":"getAuditLog","get_flag":"getFlag","get_flag_status":"getFlagStatus","list_environments":"listEnvironments","list_flags":"listFlags","list_members":"listMembers","list_projects":"listProjects","list_segments":"listSegments","toggle_flag":"toggleFlag","update_flag":"updateFlag"}},"launchdarkly_v2":{"namespace":"launchdarkly","methods":{"create_flag":"createFlag","delete_flag":"deleteFlag","get_audit_log":"getAuditLog","get_flag":"getFlag","get_flag_status":"getFlagStatus","list_environments":"listEnvironments","list_flags":"listFlags","list_members":"listMembers","list_projects":"listProjects","list_segments":"listSegments","toggle_flag":"toggleFlag","update_flag":"updateFlag"},"params":{"action":{"oauthCredential":"credential"}}},"leadmagic":{"namespace":"leadmagic","methods":{"leadmagic_company_search":"companySearch","leadmagic_email_to_profile":"emailToProfile","leadmagic_find_email":"findEmail","leadmagic_find_mobile":"findMobile","leadmagic_get_credits":"getCredits","leadmagic_profile_search":"profileSearch","leadmagic_profile_to_email":"profileToEmail","leadmagic_role_finder":"roleFinder","leadmagic_validate_email":"validateEmail"}},"lemlist":{"namespace":"legacy.lemlist","methods":{"get_activities":"getActivities","get_lead":"getLead","send_email":"sendEmail"},"triggers":{"lemlist_email_bounced":"emailBounced","lemlist_email_clicked":"emailClicked","lemlist_email_opened":"emailOpened","lemlist_email_replied":"emailReplied","lemlist_email_sent":"emailSent","lemlist_interested":"interested","lemlist_linkedin_replied":"linkedinReplied","lemlist_not_interested":"notInterested","lemlist_webhook":"webhook"}},"lemlist_v2":{"namespace":"lemlist","methods":{"get_activities":"getActivities","get_lead":"getLead","send_email":"sendEmail"},"triggers":{"lemlist_email_bounced":"emailBounced","lemlist_email_clicked":"emailClicked","lemlist_email_opened":"emailOpened","lemlist_email_replied":"emailReplied","lemlist_email_sent":"emailSent","lemlist_interested":"interested","lemlist_linkedin_replied":"linkedinReplied","lemlist_not_interested":"notInterested","lemlist_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"linear":{"namespace":"legacy.linear","methods":{"linear_add_label_to_issue":"addLabelToIssue","linear_add_label_to_project":"addLabelToProject","linear_archive_issue":"archiveIssue","linear_archive_label":"archiveLabel","linear_archive_project":"archiveProject","linear_create_attachment":"createAttachment","linear_create_comment":"createComment","linear_create_customer":"createCustomer","linear_create_customer_request":"createCustomerRequest","linear_create_customer_status":"createCustomerStatus","linear_create_customer_tier":"createCustomerTier","linear_create_cycle":"createCycle","linear_create_favorite":"createFavorite","linear_create_issue":"createIssue","linear_create_issue_relation":"createIssueRelation","linear_create_label":"createLabel","linear_create_project":"createProject","linear_create_project_label":"createProjectLabel","linear_create_project_milestone":"createProjectMilestone","linear_create_project_status":"createProjectStatus","linear_create_project_update":"createProjectUpdate","linear_create_workflow_state":"createWorkflowState","linear_delete_attachment":"deleteAttachment","linear_delete_comment":"deleteComment","linear_delete_customer":"deleteCustomer","linear_delete_customer_status":"deleteCustomerStatus","linear_delete_customer_tier":"deleteCustomerTier","linear_delete_issue":"deleteIssue","linear_delete_issue_relation":"deleteIssueRelation","linear_delete_project":"deleteProject","linear_delete_project_label":"deleteProjectLabel","linear_delete_project_milestone":"deleteProjectMilestone","linear_delete_project_status":"deleteProjectStatus","linear_get_active_cycle":"getActiveCycle","linear_get_customer":"getCustomer","linear_get_cycle":"getCycle","linear_get_issue":"getIssue","linear_get_project":"getProject","linear_get_viewer":"getViewer","linear_list_attachments":"listAttachments","linear_list_comments":"listComments","linear_list_customer_requests":"listCustomerRequests","linear_list_customer_statuses":"listCustomerStatuses","linear_list_customer_tiers":"listCustomerTiers","linear_list_customers":"listCustomers","linear_list_cycles":"listCycles","linear_list_favorites":"listFavorites","linear_list_issue_relations":"listIssueRelations","linear_list_labels":"listLabels","linear_list_notifications":"listNotifications","linear_list_project_labels":"listProjectLabels","linear_list_project_milestones":"listProjectMilestones","linear_list_project_statuses":"listProjectStatuses","linear_list_project_updates":"listProjectUpdates","linear_list_projects":"listProjects","linear_list_teams":"listTeams","linear_list_users":"listUsers","linear_list_workflow_states":"listWorkflowStates","linear_merge_customers":"mergeCustomers","linear_read_issues":"readIssues","linear_remove_label_from_issue":"removeLabelFromIssue","linear_remove_label_from_project":"removeLabelFromProject","linear_search_issues":"searchIssues","linear_unarchive_issue":"unarchiveIssue","linear_update_attachment":"updateAttachment","linear_update_comment":"updateComment","linear_update_customer":"updateCustomer","linear_update_customer_request":"updateCustomerRequest","linear_update_customer_status":"updateCustomerStatus","linear_update_customer_tier":"updateCustomerTier","linear_update_issue":"updateIssue","linear_update_label":"updateLabel","linear_update_notification":"updateNotification","linear_update_project":"updateProject","linear_update_project_label":"updateProjectLabel","linear_update_project_milestone":"updateProjectMilestone","linear_update_project_status":"updateProjectStatus","linear_update_workflow_state":"updateWorkflowState"},"triggers":{"linear_comment_created":"commentCreated","linear_comment_updated":"commentUpdated","linear_customer_request_created":"customerRequestCreated","linear_customer_request_updated":"customerRequestUpdated","linear_cycle_created":"cycleCreated","linear_cycle_updated":"cycleUpdated","linear_issue_created":"issueCreated","linear_issue_removed":"issueRemoved","linear_issue_updated":"issueUpdated","linear_label_created":"labelCreated","linear_label_updated":"labelUpdated","linear_project_created":"projectCreated","linear_project_update_created":"projectUpdateCreated","linear_project_updated":"projectUpdated","linear_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"linear_v2":{"namespace":"linear","methods":{"linear_add_label_to_issue":"addLabelToIssue","linear_add_label_to_project":"addLabelToProject","linear_archive_issue":"archiveIssue","linear_archive_label":"archiveLabel","linear_archive_project":"archiveProject","linear_create_attachment":"createAttachment","linear_create_comment":"createComment","linear_create_customer":"createCustomer","linear_create_customer_request":"createCustomerRequest","linear_create_customer_status":"createCustomerStatus","linear_create_customer_tier":"createCustomerTier","linear_create_cycle":"createCycle","linear_create_favorite":"createFavorite","linear_create_issue":"createIssue","linear_create_issue_relation":"createIssueRelation","linear_create_label":"createLabel","linear_create_project":"createProject","linear_create_project_label":"createProjectLabel","linear_create_project_milestone":"createProjectMilestone","linear_create_project_status":"createProjectStatus","linear_create_project_update":"createProjectUpdate","linear_create_workflow_state":"createWorkflowState","linear_delete_attachment":"deleteAttachment","linear_delete_comment":"deleteComment","linear_delete_customer":"deleteCustomer","linear_delete_customer_status":"deleteCustomerStatus","linear_delete_customer_tier":"deleteCustomerTier","linear_delete_issue":"deleteIssue","linear_delete_issue_relation":"deleteIssueRelation","linear_delete_project":"deleteProject","linear_delete_project_label":"deleteProjectLabel","linear_delete_project_milestone":"deleteProjectMilestone","linear_delete_project_status":"deleteProjectStatus","linear_get_active_cycle":"getActiveCycle","linear_get_customer":"getCustomer","linear_get_cycle":"getCycle","linear_get_issue":"getIssue","linear_get_project":"getProject","linear_get_viewer":"getViewer","linear_list_attachments":"listAttachments","linear_list_comments":"listComments","linear_list_customer_requests":"listCustomerRequests","linear_list_customer_statuses":"listCustomerStatuses","linear_list_customer_tiers":"listCustomerTiers","linear_list_customers":"listCustomers","linear_list_cycles":"listCycles","linear_list_favorites":"listFavorites","linear_list_issue_relations":"listIssueRelations","linear_list_labels":"listLabels","linear_list_notifications":"listNotifications","linear_list_project_labels":"listProjectLabels","linear_list_project_milestones":"listProjectMilestones","linear_list_project_statuses":"listProjectStatuses","linear_list_project_updates":"listProjectUpdates","linear_list_projects":"listProjects","linear_list_teams":"listTeams","linear_list_users":"listUsers","linear_list_workflow_states":"listWorkflowStates","linear_merge_customers":"mergeCustomers","linear_read_issues":"readIssues","linear_remove_label_from_issue":"removeLabelFromIssue","linear_remove_label_from_project":"removeLabelFromProject","linear_search_issues":"searchIssues","linear_unarchive_issue":"unarchiveIssue","linear_update_attachment":"updateAttachment","linear_update_comment":"updateComment","linear_update_customer":"updateCustomer","linear_update_customer_request":"updateCustomerRequest","linear_update_customer_status":"updateCustomerStatus","linear_update_customer_tier":"updateCustomerTier","linear_update_issue":"updateIssue","linear_update_label":"updateLabel","linear_update_notification":"updateNotification","linear_update_project":"updateProject","linear_update_project_label":"updateProjectLabel","linear_update_project_milestone":"updateProjectMilestone","linear_update_project_status":"updateProjectStatus","linear_update_workflow_state":"updateWorkflowState"},"triggers":{"linear_comment_created_v2":"commentCreated","linear_comment_updated_v2":"commentUpdated","linear_customer_request_created_v2":"customerRequestCreated","linear_customer_request_updated_v2":"customerRequestUpdated","linear_cycle_created_v2":"cycleCreated","linear_cycle_updated_v2":"cycleUpdated","linear_issue_created_v2":"issueCreated","linear_issue_removed_v2":"issueRemoved","linear_issue_updated_v2":"issueUpdated","linear_label_created_v2":"labelCreated","linear_label_updated_v2":"labelUpdated","linear_project_created_v2":"projectCreated","linear_project_update_created_v2":"projectUpdateCreated","linear_project_updated_v2":"projectUpdated","linear_webhook_v2":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"linkedin":{"namespace":"linkedin","methods":{"get_profile":"getProfile","share_post":"sharePost"},"params":{"action":{"oauthCredential":"credential"}}},"linkup":{"namespace":"linkup"},"linq":{"namespace":"legacy.linq","methods":{"add_participant":"addParticipant","check_imessage":"checkIMessage","check_rcs":"checkRcs","create_attachment":"createAttachment","create_chat":"createChat","create_contact_card":"createContactCard","create_webhook_subscription":"createWebhookSubscription","delete_attachment":"deleteAttachment","delete_message":"deleteMessage","delete_webhook_subscription":"deleteWebhookSubscription","edit_message":"editMessage","get_attachment":"getAttachment","get_chat":"getChat","get_contact_card":"getContactCard","get_message":"getMessage","get_webhook_subscription":"getWebhookSubscription","leave_chat":"leaveChat","list_chats":"listChats","list_messages":"listMessages","list_phone_numbers":"listPhoneNumbers","list_thread":"listThread","list_webhook_events":"listWebhookEvents","list_webhook_subscriptions":"listWebhookSubscriptions","mark_chat_read":"markChatAsRead","react_to_message":"reactToMessage","remove_participant":"removeParticipant","send_message":"sendMessage","send_voice_memo":"sendVoiceMemo","share_contact_card":"shareContactCard","start_typing":"startTyping","stop_typing":"stopTyping","update_chat":"updateChat","update_contact_card":"updateContactCard","update_webhook_subscription":"updateWebhookSubscription"},"triggers":{"linq_message_delivered":"messageDelivered","linq_message_failed":"messageFailed","linq_message_read":"messageRead","linq_message_received":"messageReceived","linq_reaction_added":"reactionAdded","linq_webhook":"webhook"}},"linq_v2":{"namespace":"linq","methods":{"add_participant":"addParticipant","check_imessage":"checkIMessage","check_rcs":"checkRcs","create_attachment":"createAttachment","create_chat":"createChat","create_contact_card":"createContactCard","create_webhook_subscription":"createWebhookSubscription","delete_attachment":"deleteAttachment","delete_message":"deleteMessage","delete_webhook_subscription":"deleteWebhookSubscription","edit_message":"editMessage","get_attachment":"getAttachment","get_chat":"getChat","get_contact_card":"getContactCard","get_message":"getMessage","get_webhook_subscription":"getWebhookSubscription","leave_chat":"leaveChat","list_chats":"listChats","list_messages":"listMessages","list_phone_numbers":"listPhoneNumbers","list_thread":"listThread","list_webhook_events":"listWebhookEvents","list_webhook_subscriptions":"listWebhookSubscriptions","mark_chat_read":"markChatAsRead","react_to_message":"reactToMessage","remove_participant":"removeParticipant","send_message":"sendMessage","send_voice_memo":"sendVoiceMemo","share_contact_card":"shareContactCard","start_typing":"startTyping","stop_typing":"stopTyping","update_chat":"updateChat","update_contact_card":"updateContactCard","update_webhook_subscription":"updateWebhookSubscription"},"triggers":{"linq_message_delivered":"messageDelivered","linq_message_failed":"messageFailed","linq_message_read":"messageRead","linq_message_received":"messageReceived","linq_reaction_added":"reactionAdded","linq_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"logfire":{"namespace":"legacy.logfire","methods":{"logfire_get_token_info":"getTokenInfo","logfire_get_trace":"getTrace","logfire_query":"runSqlQuery","logfire_search_records":"searchRecords"}},"logfire_v2":{"namespace":"logfire","methods":{"logfire_get_token_info":"getTokenInfo","logfire_get_trace":"getTrace","logfire_query":"runSqlQuery","logfire_search_records":"searchRecords"},"params":{"action":{"oauthCredential":"credential"}}},"logrocket":{"namespace":"logrocket","methods":{"create_release":"createRelease","get_audit_logs":"getAuditLogs","get_highlights":"getHighlights","identify_user":"identifyUser","list_exported_sessions":"listExportedSessions","request_highlights":"requestHighlights"}},"logs":{"namespace":"legacy.logs","methods":{"get_execution":"getExecutionDetails","get_log":"getLogById","query":"queryLogs"}},"logs_v2":{"namespace":"logs","methods":{"get_run_details":"getRunDetails","query":"queryLogs"}},"loops":{"namespace":"legacy.loops","methods":{"check_contact_suppression":"checkContactSuppression","create_contact":"createContact","create_contact_property":"createContactProperty","delete_contact":"deleteContact","find_contact":"findContact","get_transactional_email":"getTransactionalEmail","list_contact_properties":"listContactProperties","list_mailing_lists":"listMailingLists","list_transactional_emails":"listTransactionalEmails","remove_contact_suppression":"removeContactSuppression","send_event":"sendEvent","send_transactional_email":"sendTransactionalEmail","update_contact":"updateContact"},"triggers":{"loops_campaign_email_sent":"campaignEmailSent","loops_email_clicked":"emailClicked","loops_email_delivered":"emailDelivered","loops_email_hard_bounced":"emailHardBounced","loops_email_opened":"emailOpened","loops_email_soft_bounced":"emailSoftBounced","loops_loop_email_sent":"loopEmailSent","loops_transactional_email_sent":"transactionalEmailSent"}},"loops_v2":{"namespace":"loops","methods":{"check_contact_suppression":"checkContactSuppression","create_contact":"createContact","create_contact_property":"createContactProperty","delete_contact":"deleteContact","find_contact":"findContact","get_transactional_email":"getTransactionalEmail","list_contact_properties":"listContactProperties","list_mailing_lists":"listMailingLists","list_transactional_emails":"listTransactionalEmails","remove_contact_suppression":"removeContactSuppression","send_event":"sendEvent","send_transactional_email":"sendTransactionalEmail","update_contact":"updateContact"},"triggers":{"loops_campaign_email_sent":"campaignEmailSent","loops_email_clicked":"emailClicked","loops_email_delivered":"emailDelivered","loops_email_hard_bounced":"emailHardBounced","loops_email_opened":"emailOpened","loops_email_soft_bounced":"emailSoftBounced","loops_loop_email_sent":"loopEmailSent","loops_transactional_email_sent":"transactionalEmailSent"},"params":{"action":{"oauthCredential":"credential"}}},"luma":{"namespace":"legacy.luma","methods":{"add_guests":"addGuests","cancel_event":"cancelEvent","create_event":"createEvent","get_event":"getEvent","get_guest":"getGuest","get_guests":"getGuests","list_events":"listEvents","lookup_event":"lookupEvent","send_invites":"sendInvites","update_event":"updateEvent","update_guest_status":"updateGuestStatus"}},"luma_v2":{"namespace":"luma","methods":{"add_guests":"addGuests","cancel_event":"cancelEvent","create_event":"createEvent","get_event":"getEvent","get_guest":"getGuest","get_guests":"getGuests","list_events":"listEvents","lookup_event":"lookupEvent","send_invites":"sendInvites","update_event":"updateEvent","update_guest_status":"updateGuestStatus"},"params":{"action":{"oauthCredential":"credential"}}},"mailchimp":{"namespace":"legacy.mailchimp","methods":{"add_member":"addMember","add_member_tags":"addMemberTags","add_or_update_member":"addOrUpdateMember","add_segment_member":"addSegmentMember","add_subscriber_to_automation":"addSubscriberToAutomation","archive_member":"archiveMember","create_audience":"createAudience","create_batch_operation":"createBatchOperation","create_campaign":"createCampaign","create_interest":"createInterest","create_interest_category":"createInterestCategory","create_landing_page":"createLandingPage","create_merge_field":"createMergeField","create_segment":"createSegment","create_template":"createTemplate","delete_audience":"deleteAudience","delete_batch_operation":"deleteBatchOperation","delete_campaign":"deleteCampaign","delete_interest":"deleteInterest","delete_interest_category":"deleteInterestCategory","delete_landing_page":"deleteLandingPage","delete_member":"deleteMember","delete_member_permanent":"permanentlyDeleteMember","delete_merge_field":"deleteMergeField","delete_segment":"deleteSegment","delete_template":"deleteTemplate","get_audience":"getAudience","get_audiences":"getAudiences","get_automation":"getAutomation","get_automations":"getAutomations","get_batch_operation":"getBatchOperation","get_batch_operations":"getBatchOperations","get_campaign":"getCampaign","get_campaign_content":"getCampaignContent","get_campaign_report":"getCampaignReport","get_campaign_reports":"getCampaignReports","get_campaigns":"getCampaigns","get_interest":"getInterest","get_interest_categories":"getInterestCategories","get_interest_category":"getInterestCategory","get_interests":"getInterests","get_landing_page":"getLandingPage","get_landing_pages":"getLandingPages","get_member":"getMember","get_member_tags":"getMemberTags","get_members":"getMembers","get_merge_field":"getMergeField","get_merge_fields":"getMergeFields","get_segment":"getSegment","get_segment_members":"getSegmentMembers","get_segments":"getSegments","get_template":"getTemplate","get_templates":"getTemplates","pause_automation":"pauseAutomation","publish_landing_page":"publishLandingPage","remove_member_tags":"removeMemberTags","remove_segment_member":"removeSegmentMember","replicate_campaign":"replicateCampaign","schedule_campaign":"scheduleCampaign","send_campaign":"sendCampaign","set_campaign_content":"setCampaignContent","start_automation":"startAutomation","unarchive_member":"unarchiveMember","unpublish_landing_page":"unpublishLandingPage","unschedule_campaign":"unscheduleCampaign","update_audience":"updateAudience","update_campaign":"updateCampaign","update_interest":"updateInterest","update_interest_category":"updateInterestCategory","update_landing_page":"updateLandingPage","update_member":"updateMember","update_merge_field":"updateMergeField","update_segment":"updateSegment","update_template":"updateTemplate"}},"mailchimp_v2":{"namespace":"mailchimp","methods":{"add_member":"addMember","add_member_tags":"addMemberTags","add_or_update_member":"addOrUpdateMember","add_segment_member":"addSegmentMember","add_subscriber_to_automation":"addSubscriberToAutomation","archive_member":"archiveMember","create_audience":"createAudience","create_batch_operation":"createBatchOperation","create_campaign":"createCampaign","create_interest":"createInterest","create_interest_category":"createInterestCategory","create_landing_page":"createLandingPage","create_merge_field":"createMergeField","create_segment":"createSegment","create_template":"createTemplate","delete_audience":"deleteAudience","delete_batch_operation":"deleteBatchOperation","delete_campaign":"deleteCampaign","delete_interest":"deleteInterest","delete_interest_category":"deleteInterestCategory","delete_landing_page":"deleteLandingPage","delete_member":"deleteMember","delete_member_permanent":"permanentlyDeleteMember","delete_merge_field":"deleteMergeField","delete_segment":"deleteSegment","delete_template":"deleteTemplate","get_audience":"getAudience","get_audiences":"getAudiences","get_automation":"getAutomation","get_automations":"getAutomations","get_batch_operation":"getBatchOperation","get_batch_operations":"getBatchOperations","get_campaign":"getCampaign","get_campaign_content":"getCampaignContent","get_campaign_report":"getCampaignReport","get_campaign_reports":"getCampaignReports","get_campaigns":"getCampaigns","get_interest":"getInterest","get_interest_categories":"getInterestCategories","get_interest_category":"getInterestCategory","get_interests":"getInterests","get_landing_page":"getLandingPage","get_landing_pages":"getLandingPages","get_member":"getMember","get_member_tags":"getMemberTags","get_members":"getMembers","get_merge_field":"getMergeField","get_merge_fields":"getMergeFields","get_segment":"getSegment","get_segment_members":"getSegmentMembers","get_segments":"getSegments","get_template":"getTemplate","get_templates":"getTemplates","pause_automation":"pauseAutomation","publish_landing_page":"publishLandingPage","remove_member_tags":"removeMemberTags","remove_segment_member":"removeSegmentMember","replicate_campaign":"replicateCampaign","schedule_campaign":"scheduleCampaign","send_campaign":"sendCampaign","set_campaign_content":"setCampaignContent","start_automation":"startAutomation","unarchive_member":"unarchiveMember","unpublish_landing_page":"unpublishLandingPage","unschedule_campaign":"unscheduleCampaign","update_audience":"updateAudience","update_campaign":"updateCampaign","update_interest":"updateInterest","update_interest_category":"updateInterestCategory","update_landing_page":"updateLandingPage","update_member":"updateMember","update_merge_field":"updateMergeField","update_segment":"updateSegment","update_template":"updateTemplate"},"params":{"action":{"oauthCredential":"credential"}}},"mailgun":{"namespace":"legacy.mailgun","methods":{"add_list_member":"addListMember","create_mailing_list":"createMailingList","get_domain":"getDomain","get_mailing_list":"getMailingList","get_message":"getMessage","list_domains":"listDomains","list_messages":"listMessages","send_message":"sendMessage"}},"mailgun_v2":{"namespace":"mailgun","methods":{"add_list_member":"addListMember","create_mailing_list":"createMailingList","get_domain":"getDomain","get_mailing_list":"getMailingList","get_message":"getMessage","list_domains":"listDomains","list_messages":"listMessages","send_message":"sendMessage"},"params":{"action":{"oauthCredential":"credential"}}},"managed_agent":{"namespace":"managedAgent","methods":{"archive_session":"archiveSession","create_session":"createSession","delete_session":"deleteSession","get_session":"getSession","interrupt_session":"interruptSession","list_events":"listEvents","respond_custom_tool":"respondToCustomTool","respond_tool_confirmation":"respondToToolConfirmation","run_session":"runSessionCreateSendWaitForReply","send_message":"sendMessage","update_session":"updateSession"}},"manageengine_sdp":{"namespace":"manageengineSdp","methods":{"add_change_note":"addChangeNote","add_problem_note":"addProblemNote","add_request_note":"addRequestNote","create_asset":"createAsset","create_change":"createChange","create_problem":"createProblem","create_request":"createRequest","create_solution":"createSolution","delete_asset":"deleteAsset","delete_change":"deleteChange","delete_problem":"deleteProblem","delete_request":"deleteRequest","delete_solution":"deleteSolution","get_asset":"getAsset","get_change":"getChange","get_problem":"getProblem","get_request":"getRequest","get_solution":"getSolution","list_assets":"listAssets","list_change_notes":"listChangeNotes","list_changes":"listChanges","list_problem_notes":"listProblemNotes","list_problems":"listProblems","list_request_notes":"listRequestNotes","list_requests":"listRequests","list_solutions":"listSolutions","update_asset":"updateAsset","update_change":"updateChange","update_problem":"updateProblem","update_request":"updateRequest","update_solution":"updateSolution"},"params":{"action":{"oauthCredential":"credential"}}},"manual_trigger":{"namespace":"legacy.manualTrigger"},"mcp":{"namespace":"mcpBlock","methods":{"list":"listOperations","run":"runOperation"}},"mem0":{"namespace":"legacy.mem0","methods":{"add":"addMemories","get":"getMemories","search":"searchMemories"}},"mem0_v2":{"namespace":"mem0","methods":{"add":"addMemories","get":"getMemories","search":"searchMemories"},"params":{"action":{"oauthCredential":"credential"}}},"memory":{"namespace":"memory","methods":{"add":"addMemory","delete":"deleteMemory","get":"getMemory","getAll":"getAllMemories"}},"microsoft_ad":{"namespace":"microsoftAd","methods":{"add_directory_role_member":"addDirectoryRoleMember","add_group_member":"addGroupMember","add_user_app_role_assignment":"grantAppRoleToUser","assign_license":"assignLicense","create_group":"createGroup","create_user":"createUser","delete_group":"deleteGroup","delete_user":"deleteUser","get_conditional_access_policy":"getConditionalAccessPolicy","get_device":"getDevice","get_group":"getGroup","get_user":"getUser","list_authentication_methods":"listAuthenticationMethods","list_conditional_access_policies":"listConditionalAccessPolicies","list_devices":"listDevices","list_directory_audits":"listDirectoryAudits","list_directory_role_members":"listDirectoryRoleMembers","list_directory_roles":"listDirectoryRoles","list_group_members":"listGroupMembers","list_groups":"listGroups","list_service_principal_app_role_assignments":"listApplicationAssignments","list_service_principals":"listServicePrincipals","list_sign_ins":"listSignIns","list_subscribed_skus":"listSubscribedSkus","list_user_app_role_assignments":"listUserAppRoleAssignments","list_user_devices":"listUserDevices","list_user_licenses":"listUserLicenses","list_user_memberships":"listUserMemberships","list_users":"listUsers","remove_directory_role_member":"removeDirectoryRoleMember","remove_group_member":"removeGroupMember","remove_user_app_role_assignment":"revokeAppRoleFromUser","reset_password":"resetPassword","revoke_sign_in_sessions":"revokeSignInSessions","set_password":"setPassword","update_group":"updateGroup","update_user":"updateUser"}},"microsoft_dataverse":{"namespace":"legacy.microsoftDataverse","methods":{"associate":"associateRecords","create_multiple":"createMultiple","create_record":"createRecord","delete_record":"deleteRecord","disassociate":"disassociateRecords","download_file":"downloadFile","execute_action":"executeAction","execute_function":"executeFunction","fetchxml_query":"fetchXmlQuery","get_entity_metadata":"getTableMetadata","get_record":"getRecord","list_records":"listRecords","search":"search","update_multiple":"updateMultiple","update_record":"updateRecord","upload_file":"uploadFile","upsert_record":"upsertRecord","whoami":"whoAmI"}},"microsoft_dataverse_v2":{"namespace":"microsoftDataverse","methods":{"associate":"associateRecords","create_multiple":"createMultiple","create_record":"createRecord","delete_record":"deleteRecord","disassociate":"disassociateRecords","download_file":"downloadFile","execute_action":"executeAction","execute_function":"executeFunction","fetchxml_query":"fetchXmlQuery","get_entity_metadata":"getTableMetadata","get_record":"getRecord","list_records":"listRecords","search":"search","update_multiple":"updateMultiple","update_record":"updateRecord","upload_file":"uploadFile","upsert_record":"upsertRecord","whoami":"whoAmI"}},"microsoft_dynamics_365":{"namespace":"microsoftDynamics365","methods":{"assign_record":"assignRecord","close_case":"closeCase","close_opportunity":"closeOpportunity","create_record":"createRecord","get_record":"getRecord","list_owners":"listOwners","list_records":"listRecords","qualify_lead":"qualifyLead","search_records":"searchRecords","update_record":"updateRecord"}},"microsoft_excel":{"namespace":"legacy.microsoftExcel","methods":{"clear_range":"clearRange","create_table":"createTable","delete_worksheet":"deleteWorksheet","format_range":"formatRange","read":"readData","sort_range":"sortRange","table_add":"addToTable","worksheet_add":"addWorksheet","write":"writeUpdateData"},"params":{"action":{"oauthCredential":"credential"}}},"microsoft_excel_v2":{"namespace":"microsoftExcel","methods":{"calculate":"calculateWorkbook","clear_range":"clearRange","close_session":"closeSession","create_session":"createSession","create_table":"createTable","delete_table":"deleteTable","delete_table_row":"deleteTableRow","delete_worksheet":"deleteWorksheet","format_range":"formatRange","get_table":"getTable","get_table_row":"getTableRow","get_worksheet":"getWorksheet","list_table_rows":"listTableRows","list_tables":"listTables","list_worksheets":"listWorksheets","read":"readData","refresh_session":"refreshSession","sort_range":"sortRange","table_add":"addTableRows","update_table":"updateTable","update_table_row":"updateTableRow","update_worksheet":"updateWorksheet","worksheet_add":"addWorksheet","write":"writeData"},"params":{"action":{"oauthCredential":"credential"}}},"microsoft_planner":{"namespace":"microsoftPlanner","methods":{"create_bucket":"createBucket","create_plan":"createPlan","create_task":"createTask","delete_bucket":"deleteBucket","delete_plan":"deletePlan","delete_task":"deleteTask","get_plan_details":"getPlanDetails","get_task_details":"getTaskDetails","list_buckets":"listBuckets","list_plans":"listPlans","read_bucket":"readBucket","read_plan":"readPlan","read_task":"readTask","update_bucket":"updateBucket","update_plan":"updatePlan","update_plan_details":"updatePlanDetails","update_task":"updateTask","update_task_details":"updateTaskDetails"},"params":{"action":{"oauthCredential":"credential"}}},"microsoft_teams":{"namespace":"microsoftTeams","methods":{"delete_channel_message":"deleteChannelMessage","delete_chat_message":"deleteChatMessage","get_message":"getMessage","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_chat_members":"listChatMembers","list_chats":"listChats","list_team_members":"listTeamMembers","list_teams":"listTeams","read_channel":"readChannelMessages","read_chat":"readChatMessages","reply_to_message":"replyToChannelMessage","set_reaction":"addReaction","unset_reaction":"removeReaction","update_channel_message":"updateChannelMessage","update_chat_message":"updateChatMessage","write_channel":"writeChannelMessage","write_chat":"writeChatMessage"},"triggers":{"microsoftteams_chat_subscription":"microsoftteamsChatSubscription","microsoftteams_webhook":"microsoftteamsWebhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"microsoft_word":{"namespace":"microsoftWord","methods":{"append":"appendContent","create":"createDocument","create_from_template":"createFromTemplate","export_pdf":"exportAsPdf","list":"listDocuments","read":"readDocument","replace_text":"findAndReplaceText","update":"replaceContent"},"params":{"action":{"oauthCredential":"credential"}}},"millionverifier":{"namespace":"millionverifier","methods":{"millionverifier_get_credits":"getRemainingCredits","millionverifier_verify_email":"verifyEmail"}},"mintlify":{"namespace":"mintlify","methods":{"create_agent_job":"createAgentJob","create_assistant_message":"askAssistant","detect_ai_prose":"detectAiSoundingProse","get_agent_job":"getAgentJob","get_assistant_caller_stats":"getAssistantCallerStats","get_assistant_conversations":"getAssistantConversations","get_feedback":"getFeedback","get_feedback_by_page":"getFeedbackByPage","get_page_content":"getPageContent","get_searches":"getSearchQueries","get_update_status":"getUpdateStatus","get_views":"getPageViews","get_visitors":"getUniqueVisitors","search":"searchDocumentation","send_agent_message":"sendAgentMessage","trigger_automation":"triggerAutomation","trigger_preview":"triggerPreviewDeployment","trigger_update":"triggerUpdate"}},"mistral_parse":{"namespace":"legacy.mistralParse"},"mistral_parse_v2":{"namespace":"legacy.mistralParseV2"},"mistral_parse_v3":{"namespace":"mistralParse"},"modal":{"namespace":"modal","methods":{"call_function":"callFunction","chat_completion":"chatCompletion","list_models":"listModels"}},"monaco":{"namespace":"monaco","methods":{"monaco_add_audience_contacts":"addContactsToAudience","monaco_add_campaign_audiences":"addAudiencesToCampaign","monaco_create_audience":"createAudience","monaco_create_contact":"createContact","monaco_create_opportunity":"createOpportunity","monaco_create_tag":"createTag","monaco_create_task":"createTask","monaco_delete_account":"deleteAccount","monaco_delete_contact":"deleteContact","monaco_delete_opportunity":"deleteOpportunity","monaco_enroll_campaign_contacts":"enrollContactsInCampaign","monaco_get_account":"getAccount","monaco_get_audience":"getAudience","monaco_get_campaign":"getCampaign","monaco_get_contact":"getContact","monaco_get_conversation":"getConversation","monaco_get_current_user":"getCurrentUser","monaco_get_field_schemas":"getFieldSchemas","monaco_get_meeting":"getMeeting","monaco_get_opportunity":"getOpportunity","monaco_get_sequence":"getSequence","monaco_get_task":"getTask","monaco_link_opportunity_contacts":"linkContactsToOpportunity","monaco_list_accounts":"listAccounts","monaco_list_audience_contacts":"listAudienceContacts","monaco_list_audiences":"listAudiences","monaco_list_campaigns":"listCampaigns","monaco_list_contacts":"listContacts","monaco_list_meetings":"listMeetings","monaco_list_messages":"listMessages","monaco_list_opportunities":"listOpportunities","monaco_list_opportunity_contacts":"listOpportunityContacts","monaco_list_pipelines":"listPipelines","monaco_list_sequences":"listSequences","monaco_list_tags":"listTags","monaco_list_tasks":"listTasks","monaco_list_users":"listUsers","monaco_remove_audience_contacts":"removeContactsFromAudience","monaco_unlink_opportunity_contacts":"unlinkContactsFromOpportunity","monaco_update_account":"updateAccount","monaco_update_contact":"updateContact","monaco_update_opportunity":"updateOpportunity","monaco_update_sequence":"updateSequence","monaco_update_task":"updateTask","monaco_upsert_account":"upsertAccount","monaco_upsert_contact":"upsertContact"},"params":{"action":{"oauthCredential":"credential"}}},"monday":{"namespace":"monday","methods":{"archive_item":"archiveItem","change_column_value":"changeColumnValue","create_board":"createBoard","create_column":"createColumn","create_group":"createGroup","create_item":"createItem","create_subitem":"createSubitem","create_update":"createUpdate","delete_item":"deleteItem","duplicate_item":"duplicateItem","get_board":"getBoard","get_groups":"getGroups","get_item":"getItem","get_items":"getItems","list_boards":"listBoards","move_item_to_group":"moveItemToGroup","search_items":"searchItems","update_item":"updateItem"},"triggers":{"monday_column_changed":"columnChanged","monday_item_archived":"itemArchived","monday_item_created":"itemCreated","monday_item_deleted":"itemDeleted","monday_item_moved":"itemMoved","monday_item_name_changed":"itemNameChanged","monday_status_changed":"statusChanged","monday_subitem_created":"subitemCreated","monday_update_created":"updateCreated"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"mongodb":{"namespace":"mongodb","methods":{"delete":"deleteDocuments","execute":"aggregatePipeline","insert":"insertDocuments","introspect":"introspectDatabase","query":"findDocuments","update":"updateDocuments"}},"mothership":{"namespace":"mothership"},"mssql":{"namespace":"legacy.mssql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"mssql_v2":{"namespace":"mssql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"mysql":{"namespace":"legacy.mysql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"mysql_v2":{"namespace":"mysql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"neo4j":{"namespace":"neo4j","methods":{"create":"createNodesRelationships","delete":"deleteNodesRelationships","execute":"executeCypher","introspect":"introspectSchema","merge":"mergeFindOrCreate","query":"queryMatch","update":"updatePropertiesSet"}},"netsuite":{"namespace":"netsuite","methods":{"netsuite_attach_record":"attachRecordOrFile","netsuite_batch_create_records":"batchCreateRecords","netsuite_batch_delete_records":"batchDeleteRecords","netsuite_batch_get_records":"batchGetRecords","netsuite_batch_update_records":"batchUpdateRecords","netsuite_batch_upsert_records":"batchUpsertRecords","netsuite_create_record":"createRecord","netsuite_delete_record":"deleteRecord","netsuite_detach_record":"detachRecordOrFile","netsuite_execute_action":"executeRecordAction","netsuite_execute_dataset":"executeSuiteAnalyticsDataset","netsuite_execute_suiteql":"executeSuiteQl","netsuite_get_async_result":"getAsyncOperationResult","netsuite_get_async_status":"getAsyncStatus","netsuite_get_governance_limits":"getGovernanceLimits","netsuite_get_record":"getRecord","netsuite_get_record_form":"getRecordForm","netsuite_get_record_metadata":"getRecordMetadata","netsuite_get_select_options":"getSelectOptions","netsuite_get_server_time":"getServerTime","netsuite_get_subresource":"getSubresource","netsuite_list_datasets":"listSuiteAnalyticsDatasets","netsuite_list_record_types":"listRecordTypes","netsuite_list_records":"listSearchRecords","netsuite_transform_record":"transformRecord","netsuite_update_record":"updateRecord","netsuite_upsert_record":"upsertRecord"},"params":{"action":{"oauthCredential":"credential"}}},"neverbounce":{"namespace":"neverbounce","methods":{"neverbounce_get_credits":"getRemainingCredits","neverbounce_verify_email":"verifyEmail"}},"new_relic":{"namespace":"legacy.newRelic","methods":{"new_relic_create_deployment_event":"createDeploymentEvent","new_relic_get_entity":"getEntity","new_relic_nrql_query":"runNrqlQuery","new_relic_search_entities":"searchEntities"}},"new_relic_v2":{"namespace":"newRelic","methods":{"new_relic_create_deployment_event":"createDeploymentEvent","new_relic_get_entity":"getEntity","new_relic_nrql_query":"runNrqlQuery","new_relic_search_entities":"searchEntities"},"params":{"action":{"oauthCredential":"credential"}}},"note":{"namespace":"note"},"notion":{"namespace":"legacy.notion","methods":{"notion_add_database_row":"addDatabaseRow","notion_append_blocks":"appendBlockChildren","notion_create_comment":"createComment","notion_create_database":"createDatabase","notion_create_page":"createPage","notion_delete_block":"deleteBlock","notion_list_comments":"listComments","notion_list_users":"listUsers","notion_query_database":"queryDatabase","notion_read":"readPage","notion_read_database":"readDatabase","notion_retrieve_block":"retrieveBlock","notion_retrieve_block_children":"retrieveBlockChildren","notion_retrieve_user":"retrieveUser","notion_search":"searchWorkspace","notion_update_block":"updateBlock","notion_update_page":"updatePageProperties","notion_write":"appendContent"},"params":{"action":{"oauthCredential":"credential"}}},"notion_v2":{"namespace":"notion","methods":{"notion_add_database_row":"addDatabaseRow","notion_append_blocks":"appendBlockChildren","notion_create_comment":"createComment","notion_create_database":"createDatabase","notion_create_page":"createPage","notion_delete_block":"deleteBlock","notion_list_comments":"listComments","notion_list_users":"listUsers","notion_query_database":"queryDatabase","notion_read":"readPage","notion_read_database":"readDatabase","notion_retrieve_block":"retrieveBlock","notion_retrieve_block_children":"retrieveBlockChildren","notion_retrieve_user":"retrieveUser","notion_search":"searchWorkspace","notion_update_block":"updateBlock","notion_update_page":"updatePageProperties","notion_write":"appendContent"},"triggers":{"notion_comment_created":"commentCreated","notion_database_created":"databaseCreated","notion_database_deleted":"databaseDeleted","notion_database_schema_updated":"databaseSchemaUpdated","notion_page_content_updated":"pageContentUpdated","notion_page_created":"pageCreated","notion_page_deleted":"pageDeleted","notion_page_properties_updated":"pagePropertiesUpdated","notion_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"obsidian":{"namespace":"obsidian","methods":{"append_active":"appendToActiveFile","append_note":"appendToNote","append_periodic_note":"appendToPeriodicNote","create_note":"createNote","delete_note":"deleteNote","execute_command":"executeCommand","get_active":"getActiveFile","get_note":"getNote","get_periodic_note":"getPeriodicNote","list_commands":"listCommands","list_files":"listFiles","open_file":"openFile","patch_active":"patchActiveFile","patch_note":"patchNote","search":"search"}},"okta":{"namespace":"legacy.okta","methods":{"okta_activate_group_rule":"activateGroupRule","okta_activate_user":"activateUser","okta_add_user_to_group":"addUserToGroup","okta_assign_group_to_app":"assignGroupToApplication","okta_assign_user_role":"assignUserRole","okta_assign_user_to_app":"assignUserToApplication","okta_clear_user_sessions":"clearUserSessions","okta_create_group":"createGroup","okta_create_group_rule":"createGroupRule","okta_create_user":"createUser","okta_deactivate_group_rule":"deactivateGroupRule","okta_deactivate_user":"deactivateUser","okta_delete_group":"deleteGroup","okta_delete_group_rule":"deleteGroupRule","okta_delete_user":"deleteUser","okta_enroll_factor":"enrollFactor","okta_get_app":"getApplication","okta_get_factor":"getFactor","okta_get_group":"getGroup","okta_get_group_rule":"getGroupRule","okta_get_logs":"getSystemLogEvents","okta_get_session":"getSession","okta_get_user":"getUser","okta_list_app_groups":"listApplicationGroups","okta_list_app_users":"listApplicationUsers","okta_list_apps":"listApplications","okta_list_factors":"listFactors","okta_list_group_members":"listGroupMembers","okta_list_group_rules":"listGroupRules","okta_list_groups":"listGroups","okta_list_user_roles":"listUserRoles","okta_list_users":"listUsers","okta_remove_group_from_app":"removeGroupFromApplication","okta_remove_user_from_app":"removeUserFromApplication","okta_remove_user_from_group":"removeUserFromGroup","okta_remove_user_role":"removeUserRole","okta_reset_all_factors":"resetAllFactors","okta_reset_factor":"resetFactor","okta_reset_password":"resetPassword","okta_revoke_session":"revokeSession","okta_suspend_user":"suspendUser","okta_unsuspend_user":"unsuspendUser","okta_update_group":"updateGroup","okta_update_user":"updateUser"}},"okta_v2":{"namespace":"okta","methods":{"okta_activate_group_rule":"activateGroupRule","okta_activate_user":"activateUser","okta_add_user_to_group":"addUserToGroup","okta_assign_group_to_app":"assignGroupToApplication","okta_assign_user_role":"assignUserRole","okta_assign_user_to_app":"assignUserToApplication","okta_clear_user_sessions":"clearUserSessions","okta_create_group":"createGroup","okta_create_group_rule":"createGroupRule","okta_create_user":"createUser","okta_deactivate_group_rule":"deactivateGroupRule","okta_deactivate_user":"deactivateUser","okta_delete_group":"deleteGroup","okta_delete_group_rule":"deleteGroupRule","okta_delete_user":"deleteUser","okta_enroll_factor":"enrollFactor","okta_get_app":"getApplication","okta_get_factor":"getFactor","okta_get_group":"getGroup","okta_get_group_rule":"getGroupRule","okta_get_logs":"getSystemLogEvents","okta_get_session":"getSession","okta_get_user":"getUser","okta_list_app_groups":"listApplicationGroups","okta_list_app_users":"listApplicationUsers","okta_list_apps":"listApplications","okta_list_factors":"listFactors","okta_list_group_members":"listGroupMembers","okta_list_group_rules":"listGroupRules","okta_list_groups":"listGroups","okta_list_user_roles":"listUserRoles","okta_list_users":"listUsers","okta_remove_group_from_app":"removeGroupFromApplication","okta_remove_user_from_app":"removeUserFromApplication","okta_remove_user_from_group":"removeUserFromGroup","okta_remove_user_role":"removeUserRole","okta_reset_all_factors":"resetAllFactors","okta_reset_factor":"resetFactor","okta_reset_password":"resetPassword","okta_revoke_session":"revokeSession","okta_suspend_user":"suspendUser","okta_unsuspend_user":"unsuspendUser","okta_update_group":"updateGroup","okta_update_user":"updateUser"},"params":{"action":{"oauthCredential":"credential"}}},"onedrive":{"namespace":"onedrive","methods":{"copy":"copyFile","create_file":"createFile","create_folder":"createFolder","create_share_link":"createSharingLink","delete":"deleteFile","download":"downloadFile","get_drive_info":"getDriveInfo","get_item":"getItemInfo","list":"listFiles","move":"moveRenameFile","search":"searchFiles","upload":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"onepassword":{"namespace":"onepassword","methods":{"create_item":"createItem","delete_item":"deleteItem","get_item":"getItem","get_item_file":"getItemFile","get_vault":"getVault","list_items":"listItems","list_vaults":"listVaults","replace_item":"replaceItem","resolve_secret":"resolveSecret","update_item":"updateItem"}},"openai":{"namespace":"legacy.openai"},"oracle_fusion_financials":{"namespace":"oracleFusionFinancials","methods":{"oracle_fusion_financials_apply_receivables_receipt":"applyReceivablesReceipt","oracle_fusion_financials_approve_receivables_invoice":"approveReceivablesInvoice","oracle_fusion_financials_create_expense_line":"createExpenseLine","oracle_fusion_financials_create_expense_report":"createExpenseReport","oracle_fusion_financials_create_receivables_credit_memo":"createReceivablesCreditMemo","oracle_fusion_financials_create_receivables_invoice":"createReceivablesInvoice","oracle_fusion_financials_create_receivables_receipt":"createReceivablesReceipt","oracle_fusion_financials_get_expense_line":"getExpenseLine","oracle_fusion_financials_get_expense_report":"getExpenseReport","oracle_fusion_financials_get_gl_journal_batch":"getGlJournalBatch","oracle_fusion_financials_get_gl_ledger":"getGlLedger","oracle_fusion_financials_get_payables_invoice":"getPayablesInvoice","oracle_fusion_financials_get_payables_invoice_line":"getPayablesInvoiceLine","oracle_fusion_financials_get_payables_payment":"getPayablesPayment","oracle_fusion_financials_get_receivables_credit_memo":"getReceivablesCreditMemo","oracle_fusion_financials_get_receivables_invoice":"getReceivablesInvoice","oracle_fusion_financials_get_receivables_invoice_installment":"getReceivablesInvoiceInstallment","oracle_fusion_financials_get_receivables_invoice_line":"getReceivablesInvoiceLine","oracle_fusion_financials_get_receivables_receipt":"getReceivablesReceipt","oracle_fusion_financials_list_expense_lines":"listExpenseLines","oracle_fusion_financials_list_expense_reports":"listExpenseReports","oracle_fusion_financials_list_gl_balances":"listGlBalances","oracle_fusion_financials_list_gl_journal_batches":"listGlJournalBatches","oracle_fusion_financials_list_gl_ledgers":"listGlLedgers","oracle_fusion_financials_list_payables_invoice_lines":"listPayablesInvoiceLines","oracle_fusion_financials_list_payables_invoices":"listPayablesInvoices","oracle_fusion_financials_list_payables_payments":"listPayablesPayments","oracle_fusion_financials_list_receivables_credit_memos":"listReceivablesCreditMemos","oracle_fusion_financials_list_receivables_invoice_installments":"listReceivablesInvoiceInstallments","oracle_fusion_financials_list_receivables_invoice_lines":"listReceivablesInvoiceLines","oracle_fusion_financials_list_receivables_invoices":"listReceivablesInvoices","oracle_fusion_financials_list_receivables_receipts":"listReceivablesReceipts","oracle_fusion_financials_submit_expense_report":"submitExpenseReport","oracle_fusion_financials_update_expense_line":"updateExpenseLine","oracle_fusion_financials_update_expense_report":"updateExpenseReport","oracle_fusion_financials_update_receivables_invoice":"updateReceivablesInvoice"},"params":{"action":{"oauthCredential":"credential"}}},"oracledb":{"namespace":"oracledb","methods":{"delete":"deleteData","execute":"executeSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"otter":{"namespace":"legacy.otter","methods":{"create_conversation":"importRecording","get_conversation":"getConversation","get_conversation_audio":"getConversationAudio","get_workspace":"getWorkspace","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_conversations":"listConversations","list_workspace_conversations":"listWorkspaceConversations"},"triggers":{"otter_conversation_completed":"conversationCompleted","otter_conversation_shared":"conversationShared","otter_webhook":"webhook"}},"otter_v2":{"namespace":"otter","methods":{"create_conversation":"importRecording","get_conversation":"getConversation","get_conversation_audio":"getConversationAudio","get_workspace":"getWorkspace","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_conversations":"listConversations","list_workspace_conversations":"listWorkspaceConversations"},"triggers":{"otter_conversation_completed":"conversationCompleted","otter_conversation_shared":"conversationShared","otter_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"outlook":{"namespace":"outlook","methods":{"copy_outlook":"copyEmail","create_event_calendar":"createEvent","create_folder_outlook":"createFolder","delete_event_calendar":"deleteEvent","delete_outlook":"deleteEmail","draft_outlook":"draftEmail","forward_outlook":"forwardEmail","get_attachment_outlook":"getAttachment","get_event_calendar":"getCalendarEvent","list_attachments_outlook":"listAttachments","list_events_calendar":"listCalendarEvents","list_folders_outlook":"listFolders","mark_read_outlook":"markAsRead","mark_unread_outlook":"markAsUnread","move_outlook":"moveEmail","read_outlook":"readEmail","reply_all_outlook":"replyAll","reply_outlook":"replyToEmail","respond_calendar":"respondToInvite","search_outlook":"searchEmail","send_outlook":"sendEmail","update_event_calendar":"updateEvent","update_message_outlook":"setCategoriesFlag"},"triggers":{"outlook_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"pagerduty":{"namespace":"legacy.pagerduty","methods":{"add_note":"addNote","create_incident":"createIncident","get_incident":"getIncident","get_service":"getService","list_escalation_policies":"listEscalationPolicies","list_incident_alerts":"listIncidentAlerts","list_incidents":"listIncidents","list_oncalls":"listOnCalls","list_schedules":"listSchedules","list_services":"listServices","list_users":"listUsers","merge_incidents":"mergeIncidents","send_event":"sendEvent","snooze_incident":"snoozeIncident","update_incident":"updateIncident"},"triggers":{"pagerduty_incident_acknowledged":"incidentAcknowledged","pagerduty_incident_escalated":"incidentEscalated","pagerduty_incident_reassigned":"incidentReassigned","pagerduty_incident_resolved":"incidentResolved","pagerduty_incident_triggered":"incidentTriggered","pagerduty_webhook":"webhook"}},"pagerduty_v2":{"namespace":"pagerduty","methods":{"add_note":"addNote","create_incident":"createIncident","get_incident":"getIncident","get_service":"getService","list_escalation_policies":"listEscalationPolicies","list_incident_alerts":"listIncidentAlerts","list_incidents":"listIncidents","list_oncalls":"listOnCalls","list_schedules":"listSchedules","list_services":"listServices","list_users":"listUsers","merge_incidents":"mergeIncidents","send_event":"sendEvent","snooze_incident":"snoozeIncident","update_incident":"updateIncident"},"triggers":{"pagerduty_incident_acknowledged":"incidentAcknowledged","pagerduty_incident_escalated":"incidentEscalated","pagerduty_incident_reassigned":"incidentReassigned","pagerduty_incident_resolved":"incidentResolved","pagerduty_incident_triggered":"incidentTriggered","pagerduty_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"parallel_ai":{"namespace":"parallelAi","methods":{"deep_research":"deepResearch","extract":"extractFromUrls","search":"search"}},"peopledatalabs":{"namespace":"peopledatalabs","methods":{"pdl_autocomplete":"autocomplete","pdl_bulk_company_enrich":"bulkCompanyEnrich","pdl_bulk_person_enrich":"bulkPersonEnrich","pdl_clean_company":"companyCleaner","pdl_clean_location":"locationCleaner","pdl_clean_school":"schoolCleaner","pdl_company_enrich":"companyEnrich","pdl_company_search":"companySearch","pdl_person_enrich":"personEnrich","pdl_person_identify":"personIdentify","pdl_person_search":"personSearch"}},"perplexity":{"namespace":"perplexity","methods":{"perplexity_chat":"chat","perplexity_search":"search"}},"persona":{"namespace":"legacy.persona","methods":{"approve_inquiry":"approveInquiry","create_account":"createAccount","create_inquiry":"createInquiry","create_report":"createReport","decline_inquiry":"declineInquiry","expire_inquiry":"expireInquiry","generate_inquiry_link":"generateInquiryLink","get_account":"getAccount","get_case":"getCase","get_document":"getDocument","get_inquiry":"getInquiry","get_report":"getReport","get_verification":"getVerification","import_accounts":"importAccountsCsv","list_accounts":"listAccounts","list_cases":"listCases","list_inquiries":"listInquiries","list_inquiry_templates":"listInquiryTemplates","list_reports":"listReports","mark_inquiry_for_review":"markInquiryForReview","print_inquiry_pdf":"printInquiryPdf","redact_account":"redactAccount","redact_inquiry":"redactInquiry","resume_inquiry":"resumeInquiry","update_account":"updateAccount","update_inquiry":"updateInquiry"}},"persona_v2":{"namespace":"persona","methods":{"approve_inquiry":"approveInquiry","create_account":"createAccount","create_inquiry":"createInquiry","create_report":"createReport","decline_inquiry":"declineInquiry","expire_inquiry":"expireInquiry","generate_inquiry_link":"generateInquiryLink","get_account":"getAccount","get_case":"getCase","get_document":"getDocument","get_inquiry":"getInquiry","get_report":"getReport","get_verification":"getVerification","import_accounts":"importAccountsCsv","list_accounts":"listAccounts","list_cases":"listCases","list_inquiries":"listInquiries","list_inquiry_templates":"listInquiryTemplates","list_reports":"listReports","mark_inquiry_for_review":"markInquiryForReview","print_inquiry_pdf":"printInquiryPdf","redact_account":"redactAccount","redact_inquiry":"redactInquiry","resume_inquiry":"resumeInquiry","update_account":"updateAccount","update_inquiry":"updateInquiry"},"params":{"action":{"oauthCredential":"credential"}}},"pi":{"namespace":"pi"},"pinecone":{"namespace":"pinecone","methods":{"delete_vectors":"deleteVectors","describe_index":"describeIndex","describe_index_stats":"describeIndexStats","fetch":"fetchVectors","generate":"generateEmbeddings","list_indexes":"listIndexes","list_vector_ids":"listVectorIds","search_text":"searchWithText","search_vector":"searchWithVector","update_vector":"updateVector","upsert_text":"upsertText"}},"pipedrive":{"namespace":"pipedrive","methods":{"create_activity":"createActivity","create_deal":"createDeal","create_lead":"createLead","create_project":"createProject","delete_lead":"deleteLead","get_activities":"getActivities","get_all_deals":"getAllDeals","get_deal":"getDeal","get_files":"getFiles","get_leads":"getLeads","get_mail_messages":"getMailThreads","get_mail_thread":"getMailThreadMessages","get_pipeline_deals":"getPipelineDeals","get_pipelines":"getPipelines","get_projects":"getProjects","update_activity":"updateActivity","update_deal":"updateDeal","update_lead":"updateLead"},"params":{"action":{"oauthCredential":"credential"}}},"pitchbook":{"namespace":"pitchbook","methods":{"company_active_investors":"getCompanyActiveInvestors","company_bio":"getCompanyBio","company_deal_service_providers":"getCompanyDealServiceProviders","company_deals":"getCompanyDeals","company_financials":"getCompanyFinancialsHistory","company_general_service_providers":"getCompanyServiceProviders","company_industries":"getCompanyIndustries","company_investors":"getCompanyInvestors","company_most_recent_debt_financing":"getCompanyLatestDebtFinancing","company_most_recent_financials":"getCompanyLatestFinancials","company_most_recent_financing":"getCompanyLatestFinancing","company_search":"searchCompanies","company_similar_companies":"getSimilarCompanies","company_social_analytics":"getCompanySocialAnalytics","company_updates":"getCompanyUpdates","company_vc_exit_predictions":"getVcExitPredictions","contracts_history":"getContractsHistory","cost_of_calls":"getCostOfCalls","credit_history":"getCreditHistory","credit_news":"getCreditNewsArticle","credit_news_bulk":"getCreditNewsArticlesInBulk","credit_news_most_recent":"getRecentCreditNews","credit_news_search":"searchCreditNews","deal_bio":"getDealBio","deal_cap_table_history":"getDealCapTable","deal_debt_lenders":"getDealDebtAndLenders","deal_detailed":"getDealDetail","deal_investors":"getDealInvestors","deal_multiples":"getDealMultiples","deal_search":"searchDeals","deal_service_providers":"getDealServiceProviders","deal_stock_info":"getDealStockInfo","deal_tranche_info":"getDealTranches","deal_updates":"getDealUpdates","deal_valuation":"getDealValuation","entity_affiliates":"getEntityAffiliates","entity_locations":"getEntityLocations","entity_news":"getEntityNews","entity_people":"getEntityPeople","entity_updates":"getEntityUpdates","fund_active_investments":"getFundActiveInvestments","fund_benchmark":"getFundBenchmark","fund_bio":"getFundBio","fund_cash_flows":"getFundCashFlows","fund_commitments":"getFundCommitments","fund_investment_preferences":"getFundPreferences","fund_investments":"getFundInvestments","fund_performance":"getFundPerformance","fund_search":"searchFunds","fund_team":"getFundTeam","fund_updates":"getFundUpdates","investor_active_investments":"getInvestorActiveInvestments","investor_bio":"getInvestorBio","investor_board_seats":"getInvestorBoardSeats","investor_deal_service_providers":"getInvestorDealServiceProviders","investor_funds":"getInvestorFunds","investor_general_service_providers":"getInvestorServiceProviders","investor_investments":"getInvestorInvestments","investor_last_closed_fund":"getInvestorLastClosedFund","investor_preferences":"getInvestorPreferences","investor_search":"searchInvestors","investor_updates":"getInvestorUpdates","limited_partner_actual_allocations":"getLpActualAllocations","limited_partner_bio":"getLimitedPartnerBio","limited_partner_commitment_aggregates":"getLpCommitmentTotals","limited_partner_commitment_preferences":"getLpCommitmentPreferences","limited_partner_commitments_detailed":"getLpCommitments","limited_partner_search":"searchLimitedPartners","limited_partner_service_providers":"getLpServiceProviders","limited_partner_target_allocations":"getLpTargetAllocations","limited_partner_updates":"getLpUpdates","lookup_table_structure":"listLookupTables","lookup_tables":"getLookupTableCodes","patent_detailed":"getPatentDetail","patent_search":"searchCompanyPatents","people_search":"searchPeople","person_bio":"getPersonBio","person_contact":"getPersonContact","person_education_work":"getPersonHistory","sandbox_entities":"listSandboxEntities","search":"searchAllEntities","service_provider_bio":"getServiceProviderBio","service_provider_search":"searchServiceProviders","service_provider_updates":"getServiceProviderUpdates","serviced_companies":"getServicedCompanies","serviced_deals":"getServicedDeals","serviced_funds":"getServicedFunds","serviced_investors":"getServicedInvestors","serviced_limited_partners":"getServicedLimitedPartners","shared_search":"sharedSearch","usage_report":"getUsageReport"}},"plane":{"namespace":"legacy.plane","methods":{"plane_archive_project":"archiveAProject","plane_archive_work_item":"archiveAWorkItem","plane_confirm_attachment_upload":"confirmAWorkItemAttachmentUpload","plane_create_attachment_upload":"createAWorkItemAttachmentUpload","plane_create_comment":"createAComment","plane_create_cycle":"createACycle","plane_create_label":"createALabel","plane_create_link":"createALink","plane_create_module":"createAModule","plane_create_project":"createAProject","plane_create_project_page":"createAProjectPage","plane_create_state":"createAState","plane_create_webhook":"createAWebhook","plane_create_work_item":"createAWorkItem","plane_delete_attachment":"deleteAnAttachment","plane_delete_comment":"deleteAComment","plane_delete_cycle":"deleteACycle","plane_delete_label":"deleteALabel","plane_delete_link":"deleteALink","plane_delete_module":"deleteAModule","plane_delete_project":"deleteAProject","plane_delete_project_page":"deleteAProjectPage","plane_delete_state":"deleteAState","plane_delete_webhook":"deleteAWebhook","plane_delete_work_item":"deleteAWorkItem","plane_get_attachment":"getAnAttachment","plane_get_comment":"getAComment","plane_get_current_user":"getCurrentUser","plane_get_cycle":"getACycle","plane_get_label":"getALabel","plane_get_link":"getALink","plane_get_module":"getAModule","plane_get_project":"getAProject","plane_get_project_page":"getAProjectPage","plane_get_project_summary":"getAProjectSummary","plane_get_state":"getAState","plane_get_webhook":"getAWebhook","plane_get_work_item":"getAWorkItem","plane_get_work_item_by_identifier":"getAWorkItemByIdentifier","plane_list_attachments":"listAttachments","plane_list_comments":"listComments","plane_list_cycles":"listCycles","plane_list_labels":"listLabels","plane_list_links":"listLinks","plane_list_modules":"listModules","plane_list_project_pages":"listProjectPages","plane_list_projects":"listProjects","plane_list_states":"listStates","plane_list_webhooks":"listWebhooks","plane_list_work_items":"listWorkItems","plane_list_workspace_work_items":"listWorkItemsAcrossAWorkspace","plane_manage_cycle_work_items":"addOrRemoveCycleWorkItems","plane_manage_module_work_items":"addOrRemoveModuleWorkItems","plane_regenerate_webhook_secret":"regenerateAWebhookSecret","plane_transfer_cycle_work_items":"transferWorkItemsBetweenCycles","plane_unarchive_project":"unarchiveAProject","plane_unarchive_work_item":"unarchiveAWorkItem","plane_update_comment":"updateAComment","plane_update_cycle":"updateACycle","plane_update_label":"updateALabel","plane_update_link":"updateALink","plane_update_module":"updateAModule","plane_update_project":"updateAProject","plane_update_project_page":"updateAProjectPage","plane_update_state":"updateAState","plane_update_webhook":"updateAWebhook","plane_update_work_item":"updateAWorkItem"},"triggers":{"plane_cycle_archived":"cycleArchived","plane_cycle_created":"cycleCreated","plane_cycle_deleted":"cycleDeleted","plane_cycle_updated":"cycleUpdated","plane_milestone_created":"milestoneCreated","plane_milestone_deleted":"milestoneDeleted","plane_milestone_updated":"milestoneUpdated","plane_module_archived":"moduleArchived","plane_module_created":"moduleCreated","plane_module_deleted":"moduleDeleted","plane_module_updated":"moduleUpdated","plane_page_archived":"pageArchived","plane_page_comment_created":"pageCommentCreated","plane_page_comment_deleted":"pageCommentDeleted","plane_page_comment_updated":"pageCommentUpdated","plane_page_created":"pageCreated","plane_page_deleted":"pageDeleted","plane_page_updated":"pageUpdated","plane_project_archived":"projectArchived","plane_project_created":"projectCreated","plane_project_deleted":"projectDeleted","plane_project_updated":"projectUpdated","plane_webhook":"webhook","plane_workitem_archived":"workitemArchived","plane_workitem_attachment_created":"workitemAttachmentCreated","plane_workitem_attachment_deleted":"workitemAttachmentDeleted","plane_workitem_attachment_updated":"workitemAttachmentUpdated","plane_workitem_comment_created":"workitemCommentCreated","plane_workitem_comment_deleted":"workitemCommentDeleted","plane_workitem_comment_updated":"workitemCommentUpdated","plane_workitem_created":"workitemCreated","plane_workitem_deleted":"workitemDeleted","plane_workitem_dependency_created":"workitemDependencyCreated","plane_workitem_dependency_deleted":"workitemDependencyDeleted","plane_workitem_link_created":"workitemLinkCreated","plane_workitem_link_deleted":"workitemLinkDeleted","plane_workitem_link_updated":"workitemLinkUpdated","plane_workitem_page_link_created":"workitemPageLinkCreated","plane_workitem_page_link_deleted":"workitemPageLinkDeleted","plane_workitem_relation_created":"workitemRelationCreated","plane_workitem_relation_deleted":"workitemRelationDeleted","plane_workitem_updated":"workitemUpdated","plane_workitem_vote_created":"workitemVoteCreated","plane_workitem_vote_deleted":"workitemVoteDeleted"}},"plane_v2":{"namespace":"plane","methods":{"plane_archive_project":"archiveAProject","plane_archive_work_item":"archiveAWorkItem","plane_confirm_attachment_upload":"confirmAWorkItemAttachmentUpload","plane_create_attachment_upload":"createAWorkItemAttachmentUpload","plane_create_comment":"createAComment","plane_create_cycle":"createACycle","plane_create_label":"createALabel","plane_create_link":"createALink","plane_create_module":"createAModule","plane_create_project":"createAProject","plane_create_project_page":"createAProjectPage","plane_create_state":"createAState","plane_create_webhook":"createAWebhook","plane_create_work_item":"createAWorkItem","plane_delete_attachment":"deleteAnAttachment","plane_delete_comment":"deleteAComment","plane_delete_cycle":"deleteACycle","plane_delete_label":"deleteALabel","plane_delete_link":"deleteALink","plane_delete_module":"deleteAModule","plane_delete_project":"deleteAProject","plane_delete_project_page":"deleteAProjectPage","plane_delete_state":"deleteAState","plane_delete_webhook":"deleteAWebhook","plane_delete_work_item":"deleteAWorkItem","plane_get_attachment":"getAnAttachment","plane_get_comment":"getAComment","plane_get_current_user":"getCurrentUser","plane_get_cycle":"getACycle","plane_get_label":"getALabel","plane_get_link":"getALink","plane_get_module":"getAModule","plane_get_project":"getAProject","plane_get_project_page":"getAProjectPage","plane_get_project_summary":"getAProjectSummary","plane_get_state":"getAState","plane_get_webhook":"getAWebhook","plane_get_work_item":"getAWorkItem","plane_get_work_item_by_identifier":"getAWorkItemByIdentifier","plane_list_attachments":"listAttachments","plane_list_comments":"listComments","plane_list_cycles":"listCycles","plane_list_labels":"listLabels","plane_list_links":"listLinks","plane_list_modules":"listModules","plane_list_project_pages":"listProjectPages","plane_list_projects":"listProjects","plane_list_states":"listStates","plane_list_webhooks":"listWebhooks","plane_list_work_items":"listWorkItems","plane_list_workspace_work_items":"listWorkItemsAcrossAWorkspace","plane_manage_cycle_work_items":"addOrRemoveCycleWorkItems","plane_manage_module_work_items":"addOrRemoveModuleWorkItems","plane_regenerate_webhook_secret":"regenerateAWebhookSecret","plane_transfer_cycle_work_items":"transferWorkItemsBetweenCycles","plane_unarchive_project":"unarchiveAProject","plane_unarchive_work_item":"unarchiveAWorkItem","plane_update_comment":"updateAComment","plane_update_cycle":"updateACycle","plane_update_label":"updateALabel","plane_update_link":"updateALink","plane_update_module":"updateAModule","plane_update_project":"updateAProject","plane_update_project_page":"updateAProjectPage","plane_update_state":"updateAState","plane_update_webhook":"updateAWebhook","plane_update_work_item":"updateAWorkItem"},"triggers":{"plane_cycle_archived":"cycleArchived","plane_cycle_created":"cycleCreated","plane_cycle_deleted":"cycleDeleted","plane_cycle_updated":"cycleUpdated","plane_milestone_created":"milestoneCreated","plane_milestone_deleted":"milestoneDeleted","plane_milestone_updated":"milestoneUpdated","plane_module_archived":"moduleArchived","plane_module_created":"moduleCreated","plane_module_deleted":"moduleDeleted","plane_module_updated":"moduleUpdated","plane_page_archived":"pageArchived","plane_page_comment_created":"pageCommentCreated","plane_page_comment_deleted":"pageCommentDeleted","plane_page_comment_updated":"pageCommentUpdated","plane_page_created":"pageCreated","plane_page_deleted":"pageDeleted","plane_page_updated":"pageUpdated","plane_project_archived":"projectArchived","plane_project_created":"projectCreated","plane_project_deleted":"projectDeleted","plane_project_updated":"projectUpdated","plane_webhook":"webhook","plane_workitem_archived":"workitemArchived","plane_workitem_attachment_created":"workitemAttachmentCreated","plane_workitem_attachment_deleted":"workitemAttachmentDeleted","plane_workitem_attachment_updated":"workitemAttachmentUpdated","plane_workitem_comment_created":"workitemCommentCreated","plane_workitem_comment_deleted":"workitemCommentDeleted","plane_workitem_comment_updated":"workitemCommentUpdated","plane_workitem_created":"workitemCreated","plane_workitem_deleted":"workitemDeleted","plane_workitem_dependency_created":"workitemDependencyCreated","plane_workitem_dependency_deleted":"workitemDependencyDeleted","plane_workitem_link_created":"workitemLinkCreated","plane_workitem_link_deleted":"workitemLinkDeleted","plane_workitem_link_updated":"workitemLinkUpdated","plane_workitem_page_link_created":"workitemPageLinkCreated","plane_workitem_page_link_deleted":"workitemPageLinkDeleted","plane_workitem_relation_created":"workitemRelationCreated","plane_workitem_relation_deleted":"workitemRelationDeleted","plane_workitem_updated":"workitemUpdated","plane_workitem_vote_created":"workitemVoteCreated","plane_workitem_vote_deleted":"workitemVoteDeleted"},"params":{"action":{"oauthCredential":"credential"}}},"planetscale":{"namespace":"legacy.planetscale","methods":{"close_deploy_request":"closeDeployRequestVitess","create_backup":"createBackup","create_branch":"createBranch","create_deploy_request":"createDeployRequestVitess","delete_branch":"deleteBranch","get_backup":"getBackup","get_branch":"getBranch","get_database":"getDatabase","get_deploy_request":"getDeployRequestVitess","list_backups":"listBackups","list_branches":"listBranches","list_databases":"listDatabases","list_deploy_requests":"listDeployRequestsVitess","queue_deploy_request":"queueDeployRequestVitess","review_deploy_request":"reviewDeployRequestVitess"}},"planetscale_v2":{"namespace":"planetscale","methods":{"close_deploy_request":"closeDeployRequestVitess","create_backup":"createBackup","create_branch":"createBranch","create_deploy_request":"createDeployRequestVitess","delete_branch":"deleteBranch","get_backup":"getBackup","get_branch":"getBranch","get_database":"getDatabase","get_deploy_request":"getDeployRequestVitess","list_backups":"listBackups","list_branches":"listBranches","list_databases":"listDatabases","list_deploy_requests":"listDeployRequestsVitess","queue_deploy_request":"queueDeployRequestVitess","review_deploy_request":"reviewDeployRequestVitess"},"params":{"action":{"oauthCredential":"credential"}}},"polymarket":{"namespace":"polymarket","methods":{"get_activity":"getActivity","get_event":"getEvent","get_events":"getEvents","get_holders":"getMarketHolders","get_last_trade_price":"getLastTradePrice","get_leaderboard":"getLeaderboard","get_market":"getMarket","get_markets":"getMarkets","get_midpoint":"getMidpoint","get_orderbook":"getOrderbook","get_positions":"getPositions","get_price":"getPrice","get_price_history":"getPriceHistory","get_series":"getSeries","get_series_by_id":"getSeriesById","get_spread":"getSpread","get_tags":"getTags","get_tick_size":"getTickSize","get_trades":"getTrades","search":"search"}},"postgresql":{"namespace":"legacy.postgresql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"postgresql_v2":{"namespace":"postgresql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"posthog":{"namespace":"posthog","methods":{"posthog_batch_events":"batchEvents","posthog_capture_event":"captureEvent","posthog_create_annotation":"createAnnotation","posthog_create_cohort":"createCohort","posthog_create_dashboard":"createDashboard","posthog_create_experiment":"createExperiment","posthog_create_feature_flag":"createFeatureFlag","posthog_create_insight":"createInsight","posthog_create_survey":"createSurvey","posthog_delete_feature_flag":"deleteFeatureFlag","posthog_delete_person":"deletePerson","posthog_delete_survey":"deleteSurvey","posthog_evaluate_flags":"evaluateFlags","posthog_get_cohort":"getCohort","posthog_get_dashboard":"getDashboard","posthog_get_event_definition":"getEventDefinition","posthog_get_experiment":"getExperiment","posthog_get_feature_flag":"getFeatureFlag","posthog_get_insight":"getInsight","posthog_get_organization":"getOrganization","posthog_get_person":"getPerson","posthog_get_project":"getProject","posthog_get_property_definition":"getPropertyDefinition","posthog_get_session_recording":"getSessionRecording","posthog_get_survey":"getSurvey","posthog_list_actions":"listActions","posthog_list_annotations":"listAnnotations","posthog_list_cohorts":"listCohorts","posthog_list_dashboards":"listDashboards","posthog_list_event_definitions":"listEventDefinitions","posthog_list_experiments":"listExperiments","posthog_list_feature_flags":"listFeatureFlags","posthog_list_insights":"listInsights","posthog_list_organizations":"listOrganizations","posthog_list_persons":"listPersons","posthog_list_projects":"listProjects","posthog_list_property_definitions":"listPropertyDefinitions","posthog_list_recording_playlists":"listRecordingPlaylists","posthog_list_session_recordings":"listSessionRecordings","posthog_list_surveys":"listSurveys","posthog_query":"runQueryHogQl","posthog_update_cohort":"updateCohort","posthog_update_event_definition":"updateEventDefinition","posthog_update_experiment":"updateExperiment","posthog_update_feature_flag":"updateFeatureFlag","posthog_update_insight":"updateInsight","posthog_update_property_definition":"updatePropertyDefinition","posthog_update_survey":"updateSurvey"}},"powerbi":{"namespace":"powerbi","methods":{"powerbi_execute_query":"executeDaxQuery","powerbi_get_dataset":"getSemanticModel","powerbi_get_refresh_history":"getRefreshHistory","powerbi_get_report":"getReport","powerbi_list_datasets":"listSemanticModels","powerbi_list_reports":"listReports","powerbi_list_workspaces":"listWorkspaces","powerbi_refresh_dataset":"refreshSemanticModel"},"params":{"action":{"oauthCredential":"credential"}}},"profound":{"namespace":"legacy.profound","methods":{"bot_logs":"botLogs","bots_report":"botsReport","category_assets":"categoryAssets","category_personas":"categoryPersonas","category_prompts":"categoryPrompts","category_tags":"categoryTags","category_topics":"categoryTopics","citation_prompts":"citationPrompts","citations_report":"citationsReport","list_assets":"listAssets","list_categories":"listCategories","list_domains":"listDomains","list_models":"listModels","list_optimizations":"listOptimizations","list_personas":"listPersonas","list_regions":"listRegions","optimization_analysis":"optimizationAnalysis","prompt_answers":"promptAnswers","prompt_volume":"promptVolume","query_fanouts":"queryFanouts","raw_logs":"rawLogs","referrals_report":"referralsReport","sentiment_report":"sentimentReport","visibility_report":"visibilityReport"}},"profound_v2":{"namespace":"profound","methods":{"bot_logs":"botLogs","bots_report":"botsReport","category_assets":"categoryAssets","category_personas":"categoryPersonas","category_prompts":"categoryPrompts","category_tags":"categoryTags","category_topics":"categoryTopics","citation_prompts":"citationPrompts","citations_report":"citationsReport","list_assets":"listAssets","list_categories":"listCategories","list_domains":"listDomains","list_models":"listModels","list_optimizations":"listOptimizations","list_personas":"listPersonas","list_regions":"listRegions","optimization_analysis":"optimizationAnalysis","prompt_answers":"promptAnswers","prompt_volume":"promptVolume","query_fanouts":"queryFanouts","raw_logs":"rawLogs","referrals_report":"referralsReport","sentiment_report":"sentimentReport","visibility_report":"visibilityReport"},"params":{"action":{"oauthCredential":"credential"}}},"prospeo":{"namespace":"prospeo","methods":{"prospeo_account_information":"accountInformation","prospeo_bulk_enrich_company":"bulkEnrichCompany","prospeo_bulk_enrich_person":"bulkEnrichPerson","prospeo_enrich_company":"enrichCompany","prospeo_enrich_person":"enrichPerson","prospeo_search_company":"searchCompany","prospeo_search_person":"searchPerson","prospeo_search_suggestions":"searchSuggestions"}},"pulse":{"namespace":"legacy.pulse"},"pulse_v2":{"namespace":"legacy.pulseV2"},"pulse_v3":{"namespace":"pulse","params":{"action":{"oauthCredential":"credential"}}},"qdrant":{"namespace":"legacy.qdrant","methods":{"fetch":"fetch","search":"search","upsert":"upsert"}},"qdrant_v2":{"namespace":"qdrant","methods":{"fetch":"fetch","search":"search","upsert":"upsert"},"params":{"action":{"oauthCredential":"credential"}}},"quartr":{"namespace":"legacy.quartr","methods":{"get_audio":"getAudio","get_company":"getCompany","get_event":"getEvent","get_event_summary":"getEventSummary","get_report":"getReport","get_slide_deck":"getSlideDeck","get_transcript":"getTranscript","list_audio":"listAudio","list_companies":"listCompanies","list_document_types":"listDocumentTypes","list_documents":"listDocuments","list_event_types":"listEventTypes","list_events":"listEvents","list_live_events":"listLiveEvents","list_reports":"listReports","list_slide_decks":"listSlideDecks","list_transcripts":"listTranscripts"}},"quartr_v2":{"namespace":"quartr","methods":{"get_audio":"getAudio","get_company":"getCompany","get_event":"getEvent","get_event_summary":"getEventSummary","get_report":"getReport","get_slide_deck":"getSlideDeck","get_transcript":"getTranscript","list_audio":"listAudio","list_companies":"listCompanies","list_document_types":"listDocumentTypes","list_documents":"listDocuments","list_event_types":"listEventTypes","list_events":"listEvents","list_live_events":"listLiveEvents","list_reports":"listReports","list_slide_decks":"listSlideDecks","list_transcripts":"listTranscripts"},"params":{"action":{"oauthCredential":"credential"}}},"quickbooks":{"namespace":"quickbooks","methods":{"quickbooks_add_attachment":"addAttachment","quickbooks_create_bill":"createBill","quickbooks_create_bill_payment":"createBillPayment","quickbooks_create_credit_memo":"createCreditMemo","quickbooks_create_customer":"createCustomer","quickbooks_create_customer_payment":"createCustomerPayment","quickbooks_create_deposit":"createDeposit","quickbooks_create_employee":"createEmployee","quickbooks_create_estimate":"createEstimate","quickbooks_create_invoice":"createInvoice","quickbooks_create_item":"createItem","quickbooks_create_journal_entry":"createJournalEntry","quickbooks_create_purchase":"createPurchaseOrExpense","quickbooks_create_purchase_order":"createPurchaseOrder","quickbooks_create_refund_receipt":"createRefundReceipt","quickbooks_create_sales_receipt":"createSalesReceipt","quickbooks_create_vendor":"createVendor","quickbooks_create_vendor_credit":"createVendorCredit","quickbooks_download_attachment":"downloadAttachment","quickbooks_download_transaction_pdf":"downloadTransactionPdf","quickbooks_email_transaction":"emailTransaction","quickbooks_get_company_info":"getCompanyInfo","quickbooks_read_accounting_transactions":"readAccountingTransactions","quickbooks_read_attachments":"readAttachments","quickbooks_read_master_data":"readMasterData","quickbooks_read_purchasing_transactions":"readPurchasingTransactions","quickbooks_read_sales_transactions":"readSalesTransactions","quickbooks_run_financial_report":"runFinancialReport","quickbooks_update_bill":"updateBill","quickbooks_update_bill_payment":"updateBillPayment","quickbooks_update_credit_memo":"updateCreditMemo","quickbooks_update_customer":"updateCustomer","quickbooks_update_customer_payment":"updateCustomerPayment","quickbooks_update_deposit":"updateDeposit","quickbooks_update_employee":"updateEmployee","quickbooks_update_estimate":"updateEstimate","quickbooks_update_invoice":"updateInvoice","quickbooks_update_item":"updateItem","quickbooks_update_journal_entry":"updateJournalEntry","quickbooks_update_purchase":"updatePurchaseOrExpense","quickbooks_update_purchase_order":"updatePurchaseOrder","quickbooks_update_refund_receipt":"updateRefundReceipt","quickbooks_update_sales_receipt":"updateSalesReceipt","quickbooks_update_vendor":"updateVendor","quickbooks_update_vendor_credit":"updateVendorCredit","quickbooks_void_bill_payment":"voidBillPayment","quickbooks_void_customer_payment":"voidCustomerPayment","quickbooks_void_invoice":"voidInvoice","quickbooks_void_sales_receipt":"voidSalesReceipt"},"triggers":{"quickbooks_account_events":"accountEvents","quickbooks_bill_events":"billEvents","quickbooks_bill_payment_events":"billPaymentEvents","quickbooks_budget_events":"budgetEvents","quickbooks_class_events":"classEvents","quickbooks_credit_memo_events":"creditMemoEvents","quickbooks_currency_events":"currencyEvents","quickbooks_customer_events":"customerEvents","quickbooks_department_events":"departmentEvents","quickbooks_deposit_events":"depositEvents","quickbooks_employee_events":"employeeEvents","quickbooks_estimate_events":"estimateEvents","quickbooks_invoice_events":"invoiceEvents","quickbooks_item_events":"itemEvents","quickbooks_journal_code_events":"journalCodeEvents","quickbooks_journal_entry_events":"journalEntryEvents","quickbooks_payment_events":"paymentEvents","quickbooks_payment_method_events":"paymentMethodEvents","quickbooks_preferences_updated":"preferencesUpdated","quickbooks_purchase_events":"purchaseEvents","quickbooks_purchase_order_events":"purchaseOrderEvents","quickbooks_refund_receipt_events":"refundReceiptEvents","quickbooks_sales_receipt_events":"salesReceiptEvents","quickbooks_tax_agency_events":"taxAgencyEvents","quickbooks_term_events":"termEvents","quickbooks_time_activity_events":"timeActivityEvents","quickbooks_transfer_events":"transferEvents","quickbooks_vendor_credit_events":"vendorCreditEvents","quickbooks_vendor_events":"vendorEvents"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"quiver":{"namespace":"legacy.quiver","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"}},"quiver_v2":{"namespace":"legacy.quiverV2","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"}},"quiver_v3":{"namespace":"quiver","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"},"params":{"action":{"oauthCredential":"credential"}}},"rabbitmq":{"namespace":"rabbitmq","methods":{"rabbitmq_create_binding":"createBinding","rabbitmq_create_exchange":"createExchange","rabbitmq_create_policy":"createPolicy","rabbitmq_create_queue":"createQueue","rabbitmq_delete_binding":"deleteBinding","rabbitmq_delete_exchange":"deleteExchange","rabbitmq_delete_policy":"deletePolicy","rabbitmq_delete_queue":"deleteQueue","rabbitmq_get_exchange":"getExchange","rabbitmq_get_messages":"getMessages","rabbitmq_get_overview":"getOverview","rabbitmq_get_queue":"getQueue","rabbitmq_health_check":"healthCheck","rabbitmq_list_bindings":"listQueueBindings","rabbitmq_list_channels":"listChannels","rabbitmq_list_connections":"listConnections","rabbitmq_list_consumers":"listConsumers","rabbitmq_list_exchange_bindings":"listExchangeBindings","rabbitmq_list_exchanges":"listExchanges","rabbitmq_list_nodes":"listNodes","rabbitmq_list_policies":"listPolicies","rabbitmq_list_queues":"listQueues","rabbitmq_list_vhosts":"listVirtualHosts","rabbitmq_publish_message":"publishMessage","rabbitmq_purge_queue":"purgeQueue"}},"railway":{"namespace":"legacy.railway","methods":{"create_environment":"createEnvironment","create_project":"createProject","create_service":"createService","delete_environment":"deleteEnvironment","delete_project":"deleteProject","delete_service":"deleteService","delete_variable":"deleteVariable","deploy_service":"deployService","get_deployment":"getDeployment","get_deployment_logs":"getDeploymentLogs","get_project":"getProject","list_deployments":"listDeployments","list_project_members":"listProjectMembers","list_projects":"listProjects","list_variables":"listVariables","restart_deployment":"restartDeployment","rollback_deployment":"rollbackDeployment","transfer_project":"transferProject","update_project":"updateProject","upsert_variable":"upsertVariable"}},"railway_v2":{"namespace":"railway","methods":{"create_environment":"createEnvironment","create_project":"createProject","create_service":"createService","delete_environment":"deleteEnvironment","delete_project":"deleteProject","delete_service":"deleteService","delete_variable":"deleteVariable","deploy_service":"deployService","get_deployment":"getDeployment","get_deployment_logs":"getDeploymentLogs","get_project":"getProject","list_deployments":"listDeployments","list_project_members":"listProjectMembers","list_projects":"listProjects","list_variables":"listVariables","restart_deployment":"restartDeployment","rollback_deployment":"rollbackDeployment","transfer_project":"transferProject","update_project":"updateProject","upsert_variable":"upsertVariable"},"params":{"action":{"oauthCredential":"credential"}}},"ramp":{"namespace":"ramp","methods":{"create_memo":"createMemo","get_balance":"getBalance","get_bill":"getBill","get_business":"getBusiness","get_memo":"getMemo","get_physical_card":"getPhysicalCard","get_reimbursement":"getReimbursement","get_transaction":"getTransaction","get_user":"getUser","get_vendor":"getVendor","get_virtual_card":"getVirtualCard","list_bills":"listBills","list_physical_cards":"listPhysicalCards","list_reimbursements":"listReimbursements","list_transactions":"listTransactions","list_users":"listUsers","list_vendors":"listVendors","list_virtual_cards":"listVirtualCards"},"params":{"action":{"oauthCredential":"credential"}}},"rb2b":{"namespace":"legacy.rb2b","methods":{"credit_check":"creditCheck","email_to_activity":"emailToLastActiveDate","hem_to_best_linkedin":"emailHemToBestLinkedInUrl","hem_to_business_profile":"emailHemToBusinessProfile","hem_to_linkedin":"emailHemToLinkedInSlug","hem_to_maid":"emailHemToMaid","ip_to_company":"ipToCompany","ip_to_hem":"ipToHem","ip_to_maid":"ipToMaid","linkedin_slug_search":"linkedInSlugSearch","linkedin_to_best_personal_email":"linkedInToBestPersonalEmail","linkedin_to_business_profile":"linkedInToBusinessProfile","linkedin_to_hashed_emails":"linkedInToHashedEmails","linkedin_to_mobile_phone":"linkedInToMobilePhone","linkedin_to_personal_email":"linkedInToPersonalEmail"}},"rb2b_v2":{"namespace":"rb2b","methods":{"credit_check":"creditCheck","email_to_activity":"emailToLastActiveDate","hem_to_best_linkedin":"emailHemToBestLinkedInUrl","hem_to_business_profile":"emailHemToBusinessProfile","hem_to_linkedin":"emailHemToLinkedInSlug","hem_to_maid":"emailHemToMaid","ip_to_company":"ipToCompany","ip_to_hem":"ipToHem","ip_to_maid":"ipToMaid","linkedin_slug_search":"linkedInSlugSearch","linkedin_to_best_personal_email":"linkedInToBestPersonalEmail","linkedin_to_business_profile":"linkedInToBusinessProfile","linkedin_to_hashed_emails":"linkedInToHashedEmails","linkedin_to_mobile_phone":"linkedInToMobilePhone","linkedin_to_personal_email":"linkedInToPersonalEmail"},"params":{"action":{"oauthCredential":"credential"}}},"rds":{"namespace":"legacy.rds","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"rds_v2":{"namespace":"rds","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"reddit":{"namespace":"reddit","methods":{"delete":"delete_","edit":"edit","get_comments":"getComments","get_controversial":"getControversialPosts","get_info":"getInfoById","get_me":"getMyProfile","get_messages":"getMessages","get_posts":"getPosts","get_saved":"getSavedItems","get_subreddit_info":"getSubredditInfo","get_subreddit_rules":"getSubredditRules","get_user":"getUserProfile","get_user_comments":"getUserComments","get_user_posts":"getUserPosts","hide":"hide","list_my_subreddits":"listMySubreddits","lock":"lockMod","mark_all_read":"markAllMessagesRead","mark_read":"markMessagesRead","marknsfw":"markNsfw","mod_approve":"approveMod","mod_distinguish":"distinguishMod","mod_remove":"removeMod","mod_sticky":"stickyMod","reply":"reply","report":"report","save":"save","search":"searchSubreddit","search_subreddits":"searchSubreddits","send_message":"sendMessage","submit_post":"submitPost","subscribe":"subscribe","unhide":"unhide","unlock":"unlockMod","unmarknsfw":"unmarkNsfw","unsave":"unsave","vote":"vote"},"params":{"action":{"oauthCredential":"credential"}}},"redis":{"namespace":"redis","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hdel":"hdel","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","llen":"llen","lpop":"lpop","lpush":"lpush","lrange":"lrange","persist":"persist","rpop":"rpop","rpush":"rpush","set":"set","setnx":"setnx","ttl":"ttl"}},"reducto":{"namespace":"legacy.reducto"},"reducto_v2":{"namespace":"legacy.reductoV2"},"reducto_v3":{"namespace":"reducto","params":{"action":{"oauthCredential":"credential"}}},"resend":{"namespace":"legacy.resend","methods":{"cancel_email":"cancelEmail","create_audience":"createAudience","create_broadcast":"createBroadcast","create_contact":"createContact","delete_audience":"deleteAudience","delete_contact":"deleteContact","get_audience":"getAudience","get_broadcast":"getBroadcast","get_contact":"getContact","get_email":"getEmail","list_audiences":"listAudiences","list_contacts":"listContacts","list_domains":"listDomains","send_broadcast":"sendBroadcast","send_email":"sendEmail","update_contact":"updateContact"},"triggers":{"resend_email_bounced":"emailBounced","resend_email_clicked":"emailClicked","resend_email_complained":"emailComplained","resend_email_delivered":"emailDelivered","resend_email_failed":"emailFailed","resend_email_opened":"emailOpened","resend_email_sent":"emailSent","resend_webhook":"webhook"}},"resend_v2":{"namespace":"resend","methods":{"cancel_email":"cancelEmail","create_audience":"createAudience","create_broadcast":"createBroadcast","create_contact":"createContact","delete_audience":"deleteAudience","delete_contact":"deleteContact","get_audience":"getAudience","get_broadcast":"getBroadcast","get_contact":"getContact","get_email":"getEmail","list_audiences":"listAudiences","list_contacts":"listContacts","list_domains":"listDomains","send_broadcast":"sendBroadcast","send_email":"sendEmail","update_contact":"updateContact"},"triggers":{"resend_email_bounced":"emailBounced","resend_email_clicked":"emailClicked","resend_email_complained":"emailComplained","resend_email_delivered":"emailDelivered","resend_email_failed":"emailFailed","resend_email_opened":"emailOpened","resend_email_sent":"emailSent","resend_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"response":{"namespace":"response"},"revenuecat":{"namespace":"revenuecat","methods":{"create_purchase":"createPurchase","defer_google_subscription":"deferGoogleSubscription","delete_customer":"deleteCustomer","get_customer":"getCustomer","grant_entitlement":"grantEntitlement","list_offerings":"listOfferings","refund_google_subscription":"refundGoogleSubscription","revoke_entitlement":"revokeEntitlement","revoke_google_subscription":"revokeGoogleSubscription","update_subscriber_attributes":"updateSubscriberAttributes"},"triggers":{"revenuecat_cancellation":"cancellation","revenuecat_expiration":"expiration","revenuecat_initial_purchase":"initialPurchase","revenuecat_non_renewing_purchase":"nonRenewingPurchase","revenuecat_product_change":"productChange","revenuecat_renewal":"renewal"}},"rippling":{"namespace":"legacy.rippling","methods":{"bulk_create_custom_object_records":"bulkCreateCustomObjectRecords","bulk_delete_custom_object_records":"bulkDeleteCustomObjectRecords","bulk_update_custom_object_records":"bulkUpdateCustomObjectRecords","create_business_partner":"createBusinessPartner","create_business_partner_group":"createBusinessPartnerGroup","create_custom_app":"createCustomApp","create_custom_object":"createCustomObject","create_custom_object_field":"createCustomObjectField","create_custom_object_record":"createCustomObjectRecord","create_custom_page":"createCustomPage","create_custom_setting":"createCustomSetting","create_department":"createDepartment","create_draft_hires":"createDraftHires","create_object_category":"createObjectCategory","create_title":"createTitle","create_work_location":"createWorkLocation","delete_business_partner":"deleteBusinessPartner","delete_business_partner_group":"deleteBusinessPartnerGroup","delete_custom_app":"deleteCustomApp","delete_custom_object":"deleteCustomObject","delete_custom_object_field":"deleteCustomObjectField","delete_custom_object_record":"deleteCustomObjectRecord","delete_custom_page":"deleteCustomPage","delete_custom_setting":"deleteCustomSetting","delete_object_category":"deleteObjectCategory","delete_title":"deleteTitle","delete_work_location":"deleteWorkLocation","get_business_partner":"getBusinessPartner","get_business_partner_group":"getBusinessPartnerGroup","get_current_user":"getCurrentUser","get_custom_app":"getCustomApp","get_custom_object":"getCustomObject","get_custom_object_field":"getCustomObjectField","get_custom_object_record":"getCustomObjectRecord","get_custom_object_record_by_external_id":"getCustomObjectRecordByExternalId","get_custom_page":"getCustomPage","get_custom_setting":"getCustomSetting","get_department":"getDepartment","get_employment_type":"getEmploymentType","get_job_function":"getJobFunction","get_object_category":"getObjectCategory","get_report_run":"getReportRun","get_supergroup":"getSupergroup","get_team":"getTeam","get_title":"getTitle","get_user":"getUser","get_work_location":"getWorkLocation","get_worker":"getWorker","list_business_partner_groups":"listBusinessPartnerGroups","list_business_partners":"listBusinessPartners","list_companies":"listCompanies","list_custom_apps":"listCustomApps","list_custom_fields":"listCustomFields","list_custom_object_fields":"listCustomObjectFields","list_custom_object_records":"listCustomObjectRecords","list_custom_objects":"listCustomObjects","list_custom_pages":"listCustomPages","list_custom_settings":"listCustomSettings","list_departments":"listDepartments","list_employment_types":"listEmploymentTypes","list_entitlements":"listEntitlements","list_job_functions":"listJobFunctions","list_object_categories":"listObjectCategories","list_supergroup_exclusion_members":"listSupergroupExclusionMembers","list_supergroup_inclusion_members":"listSupergroupInclusionMembers","list_supergroup_members":"listSupergroupMembers","list_supergroups":"listSupergroups","list_teams":"listTeams","list_titles":"listTitles","list_users":"listUsers","list_work_locations":"listWorkLocations","list_workers":"listWorkers","query_custom_object_records":"queryCustomObjectRecords","trigger_report_run":"triggerReportRun","update_custom_app":"updateCustomApp","update_custom_object":"updateCustomObject","update_custom_object_field":"updateCustomObjectField","update_custom_object_record":"updateCustomObjectRecord","update_custom_page":"updateCustomPage","update_custom_setting":"updateCustomSetting","update_department":"updateDepartment","update_object_category":"updateObjectCategory","update_supergroup_exclusion_members":"updateSupergroupExclusionMembers","update_supergroup_inclusion_members":"updateSupergroupInclusionMembers","update_title":"updateTitle","update_work_location":"updateWorkLocation"}},"rippling_v2":{"namespace":"rippling","methods":{"bulk_create_custom_object_records":"bulkCreateCustomObjectRecords","bulk_delete_custom_object_records":"bulkDeleteCustomObjectRecords","bulk_update_custom_object_records":"bulkUpdateCustomObjectRecords","create_business_partner":"createBusinessPartner","create_business_partner_group":"createBusinessPartnerGroup","create_custom_app":"createCustomApp","create_custom_object":"createCustomObject","create_custom_object_field":"createCustomObjectField","create_custom_object_record":"createCustomObjectRecord","create_custom_page":"createCustomPage","create_custom_setting":"createCustomSetting","create_department":"createDepartment","create_draft_hires":"createDraftHires","create_object_category":"createObjectCategory","create_title":"createTitle","create_work_location":"createWorkLocation","delete_business_partner":"deleteBusinessPartner","delete_business_partner_group":"deleteBusinessPartnerGroup","delete_custom_app":"deleteCustomApp","delete_custom_object":"deleteCustomObject","delete_custom_object_field":"deleteCustomObjectField","delete_custom_object_record":"deleteCustomObjectRecord","delete_custom_page":"deleteCustomPage","delete_custom_setting":"deleteCustomSetting","delete_object_category":"deleteObjectCategory","delete_title":"deleteTitle","delete_work_location":"deleteWorkLocation","get_business_partner":"getBusinessPartner","get_business_partner_group":"getBusinessPartnerGroup","get_current_user":"getCurrentUser","get_custom_app":"getCustomApp","get_custom_object":"getCustomObject","get_custom_object_field":"getCustomObjectField","get_custom_object_record":"getCustomObjectRecord","get_custom_object_record_by_external_id":"getCustomObjectRecordByExternalId","get_custom_page":"getCustomPage","get_custom_setting":"getCustomSetting","get_department":"getDepartment","get_employment_type":"getEmploymentType","get_job_function":"getJobFunction","get_object_category":"getObjectCategory","get_report_run":"getReportRun","get_supergroup":"getSupergroup","get_team":"getTeam","get_title":"getTitle","get_user":"getUser","get_work_location":"getWorkLocation","get_worker":"getWorker","list_business_partner_groups":"listBusinessPartnerGroups","list_business_partners":"listBusinessPartners","list_companies":"listCompanies","list_custom_apps":"listCustomApps","list_custom_fields":"listCustomFields","list_custom_object_fields":"listCustomObjectFields","list_custom_object_records":"listCustomObjectRecords","list_custom_objects":"listCustomObjects","list_custom_pages":"listCustomPages","list_custom_settings":"listCustomSettings","list_departments":"listDepartments","list_employment_types":"listEmploymentTypes","list_entitlements":"listEntitlements","list_job_functions":"listJobFunctions","list_object_categories":"listObjectCategories","list_supergroup_exclusion_members":"listSupergroupExclusionMembers","list_supergroup_inclusion_members":"listSupergroupInclusionMembers","list_supergroup_members":"listSupergroupMembers","list_supergroups":"listSupergroups","list_teams":"listTeams","list_titles":"listTitles","list_users":"listUsers","list_work_locations":"listWorkLocations","list_workers":"listWorkers","query_custom_object_records":"queryCustomObjectRecords","trigger_report_run":"triggerReportRun","update_custom_app":"updateCustomApp","update_custom_object":"updateCustomObject","update_custom_object_field":"updateCustomObjectField","update_custom_object_record":"updateCustomObjectRecord","update_custom_page":"updateCustomPage","update_custom_setting":"updateCustomSetting","update_department":"updateDepartment","update_object_category":"updateObjectCategory","update_supergroup_exclusion_members":"updateSupergroupExclusionMembers","update_supergroup_inclusion_members":"updateSupergroupInclusionMembers","update_title":"updateTitle","update_work_location":"updateWorkLocation"},"params":{"action":{"oauthCredential":"credential"}}},"rocketlane":{"namespace":"legacy.rocketlane","methods":{"add_field_option":"addFieldOption","add_project_members":"addProjectMembers","add_task_assignees":"addTaskAssignees","add_task_dependencies":"addTaskDependencies","add_task_followers":"addTaskFollowers","archive_project":"archiveProject","assign_placeholders":"assignPlaceholder","create_field":"createField","create_phase":"createPhase","create_project":"createProject","create_space":"createSpace","create_space_document":"createSpaceDocument","create_task":"createTask","create_time_entry":"createTimeEntry","create_time_off":"createTimeOff","delete_field":"deleteField","delete_phase":"deletePhase","delete_project":"deleteProject","delete_space":"deleteSpace","delete_space_document":"deleteSpaceDocument","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","delete_time_off":"deleteTimeOff","get_field":"getField","get_invoice":"getInvoice","get_invoice_line_items":"getInvoiceLineItems","get_invoice_payments":"getInvoicePayments","get_phase":"getPhase","get_project":"getProject","get_space":"getSpace","get_space_document":"getSpaceDocument","get_task":"getTask","get_time_entry":"getTimeEntry","get_time_off":"getTimeOff","get_user":"getUser","import_template":"importTemplate","list_fields":"listFields","list_invoices":"listInvoices","list_phases":"listPhases","list_placeholders":"listPlaceholders","list_projects":"listProjects","list_resource_allocations":"listResourceAllocations","list_space_documents":"listSpaceDocuments","list_spaces":"listSpaces","list_tasks":"listTasks","list_time_entries":"listTimeEntries","list_time_entry_categories":"listTimeEntryCategories","list_time_offs":"listTimeOffs","list_users":"listUsers","move_task_to_phase":"moveTaskToPhase","remove_project_members":"removeProjectMembers","remove_task_assignees":"removeTaskAssignees","remove_task_dependencies":"removeTaskDependencies","remove_task_followers":"removeTaskFollowers","search_time_entries":"searchTimeEntries","unassign_placeholders":"unassignPlaceholder","update_field":"updateField","update_field_option":"updateFieldOption","update_phase":"updatePhase","update_project":"updateProject","update_space":"updateSpace","update_space_document":"updateSpaceDocument","update_task":"updateTask","update_time_entry":"updateTimeEntry"}},"rocketlane_v2":{"namespace":"rocketlane","methods":{"add_field_option":"addFieldOption","add_project_members":"addProjectMembers","add_task_assignees":"addTaskAssignees","add_task_dependencies":"addTaskDependencies","add_task_followers":"addTaskFollowers","archive_project":"archiveProject","assign_placeholders":"assignPlaceholder","create_field":"createField","create_phase":"createPhase","create_project":"createProject","create_space":"createSpace","create_space_document":"createSpaceDocument","create_task":"createTask","create_time_entry":"createTimeEntry","create_time_off":"createTimeOff","delete_field":"deleteField","delete_phase":"deletePhase","delete_project":"deleteProject","delete_space":"deleteSpace","delete_space_document":"deleteSpaceDocument","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","delete_time_off":"deleteTimeOff","get_field":"getField","get_invoice":"getInvoice","get_invoice_line_items":"getInvoiceLineItems","get_invoice_payments":"getInvoicePayments","get_phase":"getPhase","get_project":"getProject","get_space":"getSpace","get_space_document":"getSpaceDocument","get_task":"getTask","get_time_entry":"getTimeEntry","get_time_off":"getTimeOff","get_user":"getUser","import_template":"importTemplate","list_fields":"listFields","list_invoices":"listInvoices","list_phases":"listPhases","list_placeholders":"listPlaceholders","list_projects":"listProjects","list_resource_allocations":"listResourceAllocations","list_space_documents":"listSpaceDocuments","list_spaces":"listSpaces","list_tasks":"listTasks","list_time_entries":"listTimeEntries","list_time_entry_categories":"listTimeEntryCategories","list_time_offs":"listTimeOffs","list_users":"listUsers","move_task_to_phase":"moveTaskToPhase","remove_project_members":"removeProjectMembers","remove_task_assignees":"removeTaskAssignees","remove_task_dependencies":"removeTaskDependencies","remove_task_followers":"removeTaskFollowers","search_time_entries":"searchTimeEntries","unassign_placeholders":"unassignPlaceholder","update_field":"updateField","update_field_option":"updateFieldOption","update_phase":"updatePhase","update_project":"updateProject","update_space":"updateSpace","update_space_document":"updateSpaceDocument","update_task":"updateTask","update_time_entry":"updateTimeEntry"},"params":{"action":{"oauthCredential":"credential"}}},"rootly":{"namespace":"legacy.rootly","methods":{"rootly_acknowledge_alert":"acknowledgeAlert","rootly_add_incident_event":"addIncidentEvent","rootly_add_subscribers":"addSubscribers","rootly_assign_incident_role":"assignIncidentRole","rootly_create_action_item":"createActionItem","rootly_create_alert":"createAlert","rootly_create_incident":"createIncident","rootly_create_status_page_event":"createStatusPageEvent","rootly_delete_action_item":"deleteActionItem","rootly_delete_incident":"deleteIncident","rootly_escalate_alert":"escalateAlert","rootly_get_alert":"getAlert","rootly_get_incident":"getIncident","rootly_list_action_items":"listActionItems","rootly_list_alerts":"listAlerts","rootly_list_causes":"listCauses","rootly_list_environments":"listEnvironments","rootly_list_escalation_policies":"listEscalationPolicies","rootly_list_functionalities":"listFunctionalities","rootly_list_incident_events":"listIncidentEvents","rootly_list_incident_roles":"listIncidentRoles","rootly_list_incident_types":"listIncidentTypes","rootly_list_incidents":"listIncidents","rootly_list_on_calls":"listOnCalls","rootly_list_playbooks":"listPlaybooks","rootly_list_retrospectives":"listRetrospectives","rootly_list_schedules":"listSchedules","rootly_list_services":"listServices","rootly_list_severities":"listSeverities","rootly_list_teams":"listTeams","rootly_list_users":"listUsers","rootly_mitigate_incident":"mitigateIncident","rootly_remove_subscribers":"removeSubscribers","rootly_resolve_alert":"resolveAlert","rootly_resolve_incident":"resolveIncident","rootly_run_workflow":"runWorkflow","rootly_snooze_alert":"snoozeAlert","rootly_unassign_incident_role":"unassignIncidentRole","rootly_update_action_item":"updateActionItem","rootly_update_alert":"updateAlert","rootly_update_incident":"updateIncident"},"triggers":{"rootly_alert_created":"alertCreated","rootly_incident_created":"incidentCreated","rootly_incident_resolved":"incidentResolved","rootly_incident_updated":"incidentUpdated"}},"rootly_v2":{"namespace":"rootly","methods":{"rootly_acknowledge_alert":"acknowledgeAlert","rootly_add_incident_event":"addIncidentEvent","rootly_add_subscribers":"addSubscribers","rootly_assign_incident_role":"assignIncidentRole","rootly_create_action_item":"createActionItem","rootly_create_alert":"createAlert","rootly_create_incident":"createIncident","rootly_create_status_page_event":"createStatusPageEvent","rootly_delete_action_item":"deleteActionItem","rootly_delete_incident":"deleteIncident","rootly_escalate_alert":"escalateAlert","rootly_get_alert":"getAlert","rootly_get_incident":"getIncident","rootly_list_action_items":"listActionItems","rootly_list_alerts":"listAlerts","rootly_list_causes":"listCauses","rootly_list_environments":"listEnvironments","rootly_list_escalation_policies":"listEscalationPolicies","rootly_list_functionalities":"listFunctionalities","rootly_list_incident_events":"listIncidentEvents","rootly_list_incident_roles":"listIncidentRoles","rootly_list_incident_types":"listIncidentTypes","rootly_list_incidents":"listIncidents","rootly_list_on_calls":"listOnCalls","rootly_list_playbooks":"listPlaybooks","rootly_list_retrospectives":"listRetrospectives","rootly_list_schedules":"listSchedules","rootly_list_services":"listServices","rootly_list_severities":"listSeverities","rootly_list_teams":"listTeams","rootly_list_users":"listUsers","rootly_mitigate_incident":"mitigateIncident","rootly_remove_subscribers":"removeSubscribers","rootly_resolve_alert":"resolveAlert","rootly_resolve_incident":"resolveIncident","rootly_run_workflow":"runWorkflow","rootly_snooze_alert":"snoozeAlert","rootly_unassign_incident_role":"unassignIncidentRole","rootly_update_action_item":"updateActionItem","rootly_update_alert":"updateAlert","rootly_update_incident":"updateIncident"},"triggers":{"rootly_alert_created":"alertCreated","rootly_incident_created":"incidentCreated","rootly_incident_resolved":"incidentResolved","rootly_incident_updated":"incidentUpdated"},"params":{"action":{"oauthCredential":"credential"}}},"router":{"namespace":"legacy.router"},"router_v2":{"namespace":"router"},"rss":{"namespace":"rss","triggers":{"rss_poller":"poller"}},"s3":{"namespace":"legacy.s3","methods":{"copy_object":"copyObject","create_bucket":"createBucket","delete_bucket":"deleteBucket","delete_object":"deleteObject","delete_objects":"deleteObjectsBatch","get_object":"downloadFile","head_object":"headObjectMetadata","list_buckets":"listBuckets","list_objects":"listObjects","presigned_url":"presignedUrl","put_object":"uploadFile"}},"s3_v2":{"namespace":"s3","methods":{"copy_object":"copyObject","create_bucket":"createBucket","delete_bucket":"deleteBucket","delete_object":"deleteObject","delete_objects":"deleteObjectsBatch","get_object":"downloadFile","head_object":"headObjectMetadata","list_buckets":"listBuckets","list_objects":"listObjects","presigned_url":"presignedUrl","put_object":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"sailpoint":{"namespace":"legacy.sailpoint","methods":{"sailpoint_approve_access_request":"approveAccessRequest","sailpoint_cancel_access_request":"cancelAccessRequest","sailpoint_decide_certification_review_items":"decideCertificationReviewItems","sailpoint_get_access_profile":"getAccessProfile","sailpoint_get_access_profile_entitlements":"getAccessProfileEntitlements","sailpoint_get_access_request_config":"getAccessRequestConfig","sailpoint_get_access_request_status":"getAccessRequestStatus","sailpoint_get_account":"getAccount","sailpoint_get_account_activity":"getAccountActivity","sailpoint_get_account_entitlements":"getAccountEntitlements","sailpoint_get_account_selections":"getAccountSelections","sailpoint_get_campaign":"getCampaign","sailpoint_get_certification":"getCertification","sailpoint_get_entitlement":"getEntitlement","sailpoint_get_entitlement_request_config":"getEntitlementRequestConfig","sailpoint_get_identity":"getIdentity","sailpoint_get_role":"getRole","sailpoint_get_role_entitlements":"getRoleEntitlements","sailpoint_get_source":"getSource","sailpoint_get_task_status":"getTaskStatus","sailpoint_list_access_profiles":"listAccessProfiles","sailpoint_list_account_activities":"listAccountActivities","sailpoint_list_accounts":"listAccounts","sailpoint_list_campaigns":"listCampaigns","sailpoint_list_certification_review_items":"listCertificationReviewItems","sailpoint_list_certifications":"listCertifications","sailpoint_list_entitlements":"listEntitlements","sailpoint_list_identities":"listIdentities","sailpoint_list_identity_entitlements":"listIdentityEntitlements","sailpoint_list_pending_access_request_approvals":"listPendingAccessRequestApprovals","sailpoint_list_roles":"listRoles","sailpoint_list_sources":"listSources","sailpoint_load_accounts":"loadAccountsCsv","sailpoint_load_entitlements":"loadEntitlementsCsv","sailpoint_reject_access_request":"rejectAccessRequest","sailpoint_request_access":"requestAccess","sailpoint_search":"search","sailpoint_search_aggregate":"searchAggregate","sailpoint_search_count":"searchCount","sailpoint_sign_off_certification":"signOffCertification"}},"sailpoint_v2":{"namespace":"sailpoint","methods":{"sailpoint_approve_access_request":"approveAccessRequest","sailpoint_cancel_access_request":"cancelAccessRequest","sailpoint_decide_certification_review_items":"decideCertificationReviewItems","sailpoint_get_access_profile":"getAccessProfile","sailpoint_get_access_profile_entitlements":"getAccessProfileEntitlements","sailpoint_get_access_request_config":"getAccessRequestConfig","sailpoint_get_access_request_status":"getAccessRequestStatus","sailpoint_get_account":"getAccount","sailpoint_get_account_activity":"getAccountActivity","sailpoint_get_account_entitlements":"getAccountEntitlements","sailpoint_get_account_selections":"getAccountSelections","sailpoint_get_campaign":"getCampaign","sailpoint_get_certification":"getCertification","sailpoint_get_entitlement":"getEntitlement","sailpoint_get_entitlement_request_config":"getEntitlementRequestConfig","sailpoint_get_identity":"getIdentity","sailpoint_get_role":"getRole","sailpoint_get_role_entitlements":"getRoleEntitlements","sailpoint_get_source":"getSource","sailpoint_get_task_status":"getTaskStatus","sailpoint_list_access_profiles":"listAccessProfiles","sailpoint_list_account_activities":"listAccountActivities","sailpoint_list_accounts":"listAccounts","sailpoint_list_campaigns":"listCampaigns","sailpoint_list_certification_review_items":"listCertificationReviewItems","sailpoint_list_certifications":"listCertifications","sailpoint_list_entitlements":"listEntitlements","sailpoint_list_identities":"listIdentities","sailpoint_list_identity_entitlements":"listIdentityEntitlements","sailpoint_list_pending_access_request_approvals":"listPendingAccessRequestApprovals","sailpoint_list_roles":"listRoles","sailpoint_list_sources":"listSources","sailpoint_load_accounts":"loadAccountsCsv","sailpoint_load_entitlements":"loadEntitlementsCsv","sailpoint_reject_access_request":"rejectAccessRequest","sailpoint_request_access":"requestAccess","sailpoint_search":"search","sailpoint_search_aggregate":"searchAggregate","sailpoint_search_count":"searchCount","sailpoint_sign_off_certification":"signOffCertification"},"params":{"action":{"oauthCredential":"credential"}}},"salesforce":{"namespace":"salesforce","methods":{"create_account":"createAccount","create_case":"createCase","create_contact":"createContact","create_custom_field":"createCustomField","create_custom_object":"createCustomObject","create_lead":"createLead","create_opportunity":"createOpportunity","create_task":"createTask","delete_account":"deleteAccount","delete_case":"deleteCase","delete_contact":"deleteContact","delete_custom_field":"deleteCustomField","delete_lead":"deleteLead","delete_opportunity":"deleteOpportunity","delete_task":"deleteTask","describe_object":"describeObject","get_accounts":"getAccounts","get_cases":"getCases","get_contacts":"getContacts","get_dashboard":"getDashboard","get_leads":"getLeads","get_opportunities":"getOpportunities","get_report":"getReport","get_tasks":"getTasks","list_dashboards":"listDashboards","list_objects":"listObjects","list_report_types":"listReportTypes","list_reports":"listReports","query":"runSoqlQuery","query_more":"getMoreQueryResults","refresh_dashboard":"refreshDashboard","run_report":"runReport","tooling_query":"runToolingQuery","update_account":"updateAccount","update_case":"updateCase","update_contact":"updateContact","update_custom_field":"updateCustomField","update_lead":"updateLead","update_opportunity":"updateOpportunity","update_task":"updateTask"},"triggers":{"salesforce_case_status_changed":"caseStatusChanged","salesforce_opportunity_stage_changed":"opportunityStageChanged","salesforce_record_created":"recordCreated","salesforce_record_deleted":"recordDeleted","salesforce_record_updated":"recordUpdated","salesforce_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"sap_concur":{"namespace":"sapConcur","methods":{"sap_concur_approve_expense_report":"approveExpenseReport","sap_concur_associate_attendees":"associateAttendees","sap_concur_create_cash_advance":"createCashAdvance","sap_concur_create_expected_expense":"createExpectedExpense","sap_concur_create_expense_report":"createExpenseReport","sap_concur_create_list_item":"createListItem","sap_concur_create_purchase_request":"createPurchaseRequest","sap_concur_create_quick_expense":"createQuickExpense","sap_concur_create_quick_expense_with_image":"createQuickExpenseWithImage","sap_concur_create_report_comment":"createReportComment","sap_concur_create_travel_request":"createTravelRequest","sap_concur_create_user":"createUser","sap_concur_delete_expected_expense":"deleteExpectedExpense","sap_concur_delete_expense":"deleteExpense","sap_concur_delete_expense_report":"deleteExpenseReport","sap_concur_delete_list_item":"deleteListItem","sap_concur_delete_travel_request":"deleteTravelRequest","sap_concur_delete_user":"deleteUser","sap_concur_get_allocation":"getAllocation","sap_concur_get_budget":"getBudget","sap_concur_get_cash_advance":"getCashAdvance","sap_concur_get_expected_expense":"getExpectedExpense","sap_concur_get_expense":"getExpense","sap_concur_get_expense_report":"getExpenseReport","sap_concur_get_itemizations":"getItemizations","sap_concur_get_itinerary":"getItineraryTrip","sap_concur_get_list":"getList","sap_concur_get_list_item":"getListItem","sap_concur_get_purchase_request":"getPurchaseRequest","sap_concur_get_receipt":"getReceipt","sap_concur_get_receipt_status":"getReceiptStatus","sap_concur_get_request_cash_advance":"getRequestCashAdvance","sap_concur_get_travel_profile":"getTravelProfile","sap_concur_get_travel_request":"getTravelRequest","sap_concur_get_user":"getUser","sap_concur_issue_cash_advance":"issueCashAdvance","sap_concur_list_allocations":"listAllocations","sap_concur_list_attendee_associations":"listAttendeeAssociations","sap_concur_list_budget_categories":"listBudgetCategories","sap_concur_list_budgets":"listBudgets","sap_concur_list_exceptions":"listExceptions","sap_concur_list_expected_expenses":"listExpectedExpenses","sap_concur_list_expense_reports":"listExpenseReports","sap_concur_list_expenses":"listExpenses","sap_concur_list_itineraries":"listItinerariesTrips","sap_concur_list_list_items":"listListItems","sap_concur_list_lists":"listLists","sap_concur_list_receipts":"listReceipts","sap_concur_list_report_comments":"listReportComments","sap_concur_list_reports_to_approve":"listReportsToApprove","sap_concur_list_travel_profiles_summary":"listTravelProfilesSummary","sap_concur_list_travel_request_comments":"listTravelRequestComments","sap_concur_list_travel_requests":"listTravelRequests","sap_concur_list_users":"listUsers","sap_concur_move_travel_request":"moveTravelRequestWorkflowAction","sap_concur_recall_expense_report":"recallExpenseReport","sap_concur_remove_all_attendees":"removeAllAttendees","sap_concur_search_locations":"searchLocations","sap_concur_search_users":"searchUsers","sap_concur_send_back_expense_report":"sendBackExpenseReport","sap_concur_submit_expense_report":"submitExpenseReport","sap_concur_update_allocation":"updateAllocation","sap_concur_update_expected_expense":"updateExpectedExpense","sap_concur_update_expense":"updateExpense","sap_concur_update_expense_report":"updateExpenseReport","sap_concur_update_list_item":"updateListItem","sap_concur_update_travel_request":"updateTravelRequest","sap_concur_update_user":"updateUserPatch","sap_concur_upload_exchange_rates":"uploadExchangeRates","sap_concur_upload_receipt_image":"uploadReceiptImage"}},"sap_s4hana":{"namespace":"sapS4hana","methods":{"sap_s4hana_create_business_partner":"createBusinessPartner","sap_s4hana_create_purchase_order":"createPurchaseOrder","sap_s4hana_create_purchase_requisition":"createPurchaseRequisition","sap_s4hana_create_sales_order":"createSalesOrder","sap_s4hana_delete_sales_order":"deleteSalesOrder","sap_s4hana_get_billing_document":"getBillingDocument","sap_s4hana_get_business_partner":"getBusinessPartner","sap_s4hana_get_customer":"getCustomer","sap_s4hana_get_inbound_delivery":"getInboundDelivery","sap_s4hana_get_material_document":"getMaterialDocument","sap_s4hana_get_outbound_delivery":"getOutboundDelivery","sap_s4hana_get_product":"getProduct","sap_s4hana_get_purchase_order":"getPurchaseOrder","sap_s4hana_get_purchase_requisition":"getPurchaseRequisition","sap_s4hana_get_sales_order":"getSalesOrder","sap_s4hana_get_supplier":"getSupplier","sap_s4hana_get_supplier_invoice":"getSupplierInvoice","sap_s4hana_list_billing_documents":"listBillingDocuments","sap_s4hana_list_business_partners":"listBusinessPartners","sap_s4hana_list_customers":"listCustomers","sap_s4hana_list_inbound_deliveries":"listInboundDeliveries","sap_s4hana_list_material_documents":"listMaterialDocuments","sap_s4hana_list_material_stock":"listMaterialStock","sap_s4hana_list_outbound_deliveries":"listOutboundDeliveries","sap_s4hana_list_products":"listProducts","sap_s4hana_list_purchase_orders":"listPurchaseOrders","sap_s4hana_list_purchase_requisitions":"listPurchaseRequisitions","sap_s4hana_list_sales_orders":"listSalesOrders","sap_s4hana_list_supplier_invoices":"listSupplierInvoices","sap_s4hana_list_suppliers":"listSuppliers","sap_s4hana_odata_query":"odataQueryAdvanced","sap_s4hana_update_business_partner":"updateBusinessPartner","sap_s4hana_update_customer":"updateCustomer","sap_s4hana_update_product":"updateProduct","sap_s4hana_update_purchase_order":"updatePurchaseOrder","sap_s4hana_update_purchase_requisition":"updatePurchaseRequisition","sap_s4hana_update_sales_order":"updateSalesOrder","sap_s4hana_update_supplier":"updateSupplier"}},"schedule":{"namespace":"schedule"},"search":{"namespace":"search"},"secrets_manager":{"namespace":"legacy.secretsManager","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","describe_secret":"describeSecret","get_secret":"getSecret","list_secrets":"listSecrets","restore_secret":"restoreSecret","rotate_secret":"rotateSecret","tag_resource":"tagSecret","untag_resource":"untagSecret","update_secret":"updateSecret"}},"secrets_manager_v2":{"namespace":"secretsManager","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","describe_secret":"describeSecret","get_secret":"getSecret","list_secrets":"listSecrets","restore_secret":"restoreSecret","rotate_secret":"rotateSecret","tag_resource":"tagSecret","untag_resource":"untagSecret","update_secret":"updateSecret"},"params":{"action":{"oauthCredential":"credential"}}},"semrush":{"namespace":"semrush","methods":{"semrush_backlinks":"backlinks","semrush_backlinks_anchors":"backlinkAnchors","semrush_backlinks_competitors":"backlinkCompetitors","semrush_backlinks_geo_distribution":"backlinkCountryDistribution","semrush_backlinks_indexed_pages":"indexedPages","semrush_backlinks_overview":"backlinksOverview","semrush_backlinks_tld_distribution":"backlinkTldDistribution","semrush_batch_keyword_overview":"batchKeywordOverview","semrush_broad_match_keywords":"broadMatchKeywords","semrush_domain_ad_copies":"domainAdCopies","semrush_domain_ad_history":"domainAdHistory","semrush_domain_organic_competitors":"organicCompetitors","semrush_domain_organic_keywords":"domainOrganicKeywords","semrush_domain_overview":"domainOverview","semrush_domain_overview_all":"domainOverviewAllDatabases","semrush_domain_overview_history":"domainOverviewHistory","semrush_domain_paid_competitors":"paidCompetitors","semrush_domain_paid_keywords":"domainPaidKeywords","semrush_domain_pla_copies":"domainPlaCopies","semrush_domain_pla_keywords":"domainPlaKeywords","semrush_domain_vs_domain":"domainVsDomain","semrush_keyword_ad_history":"keywordAdHistory","semrush_keyword_difficulty":"keywordDifficulty","semrush_keyword_overview":"keywordOverview","semrush_keyword_overview_all":"keywordOverviewAllDatabases","semrush_keyword_questions":"keywordQuestions","semrush_organic_results":"organicResults","semrush_paid_results":"paidResults","semrush_referring_domains":"referringDomains","semrush_referring_ips":"referringIps","semrush_related_keywords":"relatedKeywords","semrush_subdomain_ad_copies":"subdomainAdCopies","semrush_subdomain_organic_keywords":"subdomainOrganicKeywords","semrush_subdomain_overview":"subdomainOverview","semrush_subdomain_overview_all":"subdomainOverviewAllDatabases","semrush_subdomain_overview_history":"subdomainOverviewHistory","semrush_subdomain_paid_keywords":"subdomainPaidKeywords","semrush_top_domains":"topDomains","semrush_url_organic_keywords":"urlOrganicKeywords","semrush_url_overview":"urlOverview","semrush_url_overview_all":"urlOverviewAllDatabases","semrush_url_overview_history":"urlOverviewHistory","semrush_url_paid_keywords":"urlPaidKeywords","semrush_winners_and_losers":"winnersAndLosers"}},"sendblue":{"namespace":"sendblue","methods":{"sendblue_evaluate_service":"evaluateService","sendblue_get_message":"getMessage","sendblue_send_group_message":"sendGroupMessage","sendblue_send_message":"sendMessage","sendblue_send_typing_indicator":"sendTypingIndicator"},"triggers":{"sendblue_message_received":"messageReceived","sendblue_message_status_updated":"messageStatusUpdated"}},"sendgrid":{"namespace":"legacy.sendgrid","methods":{"add_contact":"addContact","add_contacts_to_list":"addContactsToList","create_list":"createList","create_template":"createTemplate","create_template_version":"createTemplateVersion","delete_contacts":"deleteContacts","delete_list":"deleteList","delete_template":"deleteTemplate","get_contact":"getContact","get_list":"getList","get_template":"getTemplate","list_all_lists":"listAllLists","list_templates":"listTemplates","remove_contacts_from_list":"removeContactsFromList","search_contacts":"searchContacts","send_mail":"sendMail"}},"sendgrid_v2":{"namespace":"sendgrid","methods":{"add_contact":"addContact","add_contacts_to_list":"addContactsToList","create_list":"createList","create_template":"createTemplate","create_template_version":"createTemplateVersion","delete_contacts":"deleteContacts","delete_list":"deleteList","delete_template":"deleteTemplate","get_contact":"getContact","get_list":"getList","get_template":"getTemplate","list_all_lists":"listAllLists","list_templates":"listTemplates","remove_contacts_from_list":"removeContactsFromList","search_contacts":"searchContacts","send_mail":"sendMail"},"params":{"action":{"oauthCredential":"credential"}}},"sentry":{"namespace":"legacy.sentry","methods":{"sentry_events_get":"getEvent","sentry_events_list":"listEvents","sentry_issues_get":"getIssue","sentry_issues_list":"listIssues","sentry_issues_update":"updateIssue","sentry_projects_create":"createProject","sentry_projects_get":"getProject","sentry_projects_list":"listProjects","sentry_projects_update":"updateProject","sentry_releases_create":"createRelease","sentry_releases_deploy":"createDeploy","sentry_releases_list":"listReleases","sentry_teams_list":"listTeams"},"triggers":{"sentry_error_created":"errorCreated","sentry_issue_alert":"issueAlert","sentry_issue_created":"issueCreated","sentry_issue_resolved":"issueResolved","sentry_metric_alert":"metricAlert"}},"sentry_v2":{"namespace":"sentry","methods":{"sentry_events_get":"getEvent","sentry_events_list":"listEvents","sentry_issues_get":"getIssue","sentry_issues_list":"listIssues","sentry_issues_update":"updateIssue","sentry_projects_create":"createProject","sentry_projects_get":"getProject","sentry_projects_list":"listProjects","sentry_projects_update":"updateProject","sentry_releases_create":"createRelease","sentry_releases_deploy":"createDeploy","sentry_releases_list":"listReleases","sentry_teams_list":"listTeams"},"triggers":{"sentry_error_created":"errorCreated","sentry_issue_alert":"issueAlert","sentry_issue_created":"issueCreated","sentry_issue_resolved":"issueResolved","sentry_metric_alert":"metricAlert"},"params":{"action":{"oauthCredential":"credential"}}},"serper":{"namespace":"serper"},"servicenow":{"namespace":"legacy.servicenow","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"}},"servicenow_v2":{"namespace":"legacy.servicenowV2","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"}},"servicenow_v3":{"namespace":"servicenow","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"ses":{"namespace":"legacy.ses","methods":{"create_configuration_set":"createConfigurationSet","create_email_identity":"createEmailIdentity","create_template":"createTemplate","delete_email_identity":"deleteEmailIdentity","delete_suppressed_destination":"deleteSuppressedDestination","delete_template":"deleteTemplate","get_account":"getAccount","get_email_identity":"getEmailIdentity","get_suppressed_destination":"getSuppressedDestination","get_template":"getTemplate","list_identities":"listIdentities","list_suppressed_destinations":"listSuppressedDestinations","list_templates":"listTemplates","put_suppressed_destination":"putSuppressedDestination","send_bulk_email":"sendBulkEmail","send_custom_verification_email":"sendCustomVerificationEmail","send_email":"sendEmail","send_templated_email":"sendTemplatedEmail","update_template":"updateTemplate"}},"ses_v2":{"namespace":"ses","methods":{"create_configuration_set":"createConfigurationSet","create_email_identity":"createEmailIdentity","create_template":"createTemplate","delete_email_identity":"deleteEmailIdentity","delete_suppressed_destination":"deleteSuppressedDestination","delete_template":"deleteTemplate","get_account":"getAccount","get_email_identity":"getEmailIdentity","get_suppressed_destination":"getSuppressedDestination","get_template":"getTemplate","list_identities":"listIdentities","list_suppressed_destinations":"listSuppressedDestinations","list_templates":"listTemplates","put_suppressed_destination":"putSuppressedDestination","send_bulk_email":"sendBulkEmail","send_custom_verification_email":"sendCustomVerificationEmail","send_email":"sendEmail","send_templated_email":"sendTemplatedEmail","update_template":"updateTemplate"},"params":{"action":{"oauthCredential":"credential"}}},"sftp":{"namespace":"legacy.sftp","methods":{"sftp_create":"createFile","sftp_delete":"deleteFileDirectory","sftp_download":"downloadFile","sftp_list":"listDirectory","sftp_mkdir":"createDirectory","sftp_upload":"uploadFiles"}},"sftp_v2":{"namespace":"sftp","methods":{"sftp_create":"createFile","sftp_delete":"deleteFileDirectory","sftp_download":"downloadFile","sftp_list":"listDirectory","sftp_mkdir":"createDirectory","sftp_upload":"uploadFiles"}},"sharepoint":{"namespace":"legacy.sharepoint","methods":{"add_list_items":"addListItems","create_list":"createList","create_page":"createPage","delete_file":"deleteFile","delete_list_item":"deleteListItem","delete_page":"deletePage","download_file":"downloadFile","get_drive_item":"getDriveItem","get_list_item":"getListItem","list_sites":"listSites","publish_page":"publishPage","read_list":"readList","read_page":"readPage","update_list":"updateList","update_page":"updatePage","upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"sharepoint_v2":{"namespace":"sharepoint","methods":{"sharepoint_add_list_items":"addListItem","sharepoint_create_list":"createList","sharepoint_create_page":"createPage","sharepoint_delete_file":"deleteFile","sharepoint_delete_list_item":"deleteListItem","sharepoint_delete_page":"deletePage","sharepoint_download_file":"downloadFile","sharepoint_get_drive_item":"getDriveItem","sharepoint_get_list":"readList","sharepoint_get_list_item":"getListItem","sharepoint_list_sites":"listSites","sharepoint_publish_page":"publishPage","sharepoint_read_page":"readPage","sharepoint_update_list":"updateListItem","sharepoint_update_page":"updatePage","sharepoint_upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"shopify":{"namespace":"shopify","methods":{"shopify_adjust_inventory":"adjustInventory","shopify_cancel_order":"cancelOrder","shopify_create_customer":"createCustomer","shopify_create_fulfillment":"createFulfillment","shopify_create_product":"createProduct","shopify_create_product_variants":"createProductVariants","shopify_delete_customer":"deleteCustomer","shopify_delete_product":"deleteProduct","shopify_get_collection":"getCollection","shopify_get_customer":"getCustomer","shopify_get_fulfillment":"getFulfillment","shopify_get_fulfillment_order":"getFulfillmentOrder","shopify_get_inventory_level":"getInventoryLevel","shopify_get_job":"getJob","shopify_get_order":"getOrder","shopify_get_product":"getProduct","shopify_list_collections":"listCollections","shopify_list_customers":"listCustomers","shopify_list_fulfillment_orders":"listFulfillmentOrders","shopify_list_inventory_items":"listInventoryItems","shopify_list_locations":"listLocations","shopify_list_orders":"listOrders","shopify_list_products":"listProducts","shopify_update_customer":"updateCustomer","shopify_update_fulfillment_tracking":"updateFulfillmentTracking","shopify_update_order":"updateOrder","shopify_update_product":"updateProduct","shopify_update_product_variants":"updateProductVariants"},"params":{"action":{"oauthCredential":"credential"}}},"sim_workspace_event":{"namespace":"simWorkspaceEvent","triggers":{"sim_workspace_event":"workspaceEvent"}},"similarweb":{"namespace":"legacy.similarweb","methods":{"similarweb_bounce_rate":"bounceRate","similarweb_page_views":"pageViews","similarweb_pages_per_visit":"pagesPerVisit","similarweb_traffic_visits":"trafficVisits","similarweb_visit_duration":"visitDurationDesktop","similarweb_website_overview":"websiteOverview"}},"similarweb_v2":{"namespace":"similarweb","methods":{"similarweb_bounce_rate":"bounceRate","similarweb_page_views":"pageViews","similarweb_pages_per_visit":"pagesPerVisit","similarweb_traffic_visits":"trafficVisits","similarweb_visit_duration":"visitDurationDesktop","similarweb_website_overview":"websiteOverview"},"params":{"action":{"oauthCredential":"credential"}}},"sixtyfour":{"namespace":"legacy.sixtyfour","methods":{"enrich_company":"enrichCompany","enrich_lead":"enrichLead","find_email":"findEmail","find_phone":"findPhone"}},"sixtyfour_v2":{"namespace":"sixtyfour","methods":{"enrich_company":"enrichCompany","enrich_lead":"enrichLead","find_email":"findEmail","find_phone":"findPhone"},"params":{"action":{"oauthCredential":"credential"}}},"slack":{"namespace":"legacy.slack","methods":{"archive_conversation":"archiveConversation","canvas":"createCanvas","create_channel_canvas":"createChannelCanvas","create_conversation":"createConversation","delete":"deleteMessage","delete_canvas":"deleteCanvas","delete_scheduled_message":"deleteScheduledMessage","download":"downloadFile","edit_canvas":"editCanvas","ephemeral":"sendEphemeralMessage","get_canvas":"getCanvasInfo","get_channel_history":"getChannelHistory","get_channel_info":"getChannelInfo","get_message":"getMessage","get_permalink":"getMessagePermalink","get_thread":"getThread","get_thread_replies":"getThreadReplies","get_user":"getUserInfo","get_user_presence":"getUserPresence","invite_to_conversation":"inviteToConversation","list_canvases":"listCanvases","list_channels":"listChannels","list_members":"listChannelMembers","list_scheduled_messages":"listScheduledMessages","list_users":"listUsers","lookup_canvas_sections":"lookupCanvasSections","open_view":"openView","publish_view":"publishView","push_view":"pushView","react":"addReaction","read":"readMessages","rename_conversation":"renameConversation","schedule_message":"scheduleMessage","send":"sendMessage","set_conversation_purpose":"setConversationPurpose","set_conversation_topic":"setConversationTopic","set_status":"setAssistantStatus","set_suggested_prompts":"setSuggestedPrompts","set_title":"setAssistantTitle","unreact":"removeReaction","update":"updateMessage","update_view":"updateView"},"triggers":{"slack_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"slack_v2":{"namespace":"slack","methods":{"add_bookmark":"addBookmark","archive_conversation":"archiveConversation","canvas":"createCanvas","close_conversation":"closeConversation","create_channel_canvas":"createChannelCanvas","create_conversation":"createConversation","create_list":"createList","create_list_item":"createListItem","create_user_group":"createUserGroup","delete":"deleteMessage","delete_canvas":"deleteCanvas","delete_file":"deleteFile","delete_list_item":"deleteListItem","delete_list_items":"deleteListItems","delete_scheduled_message":"deleteScheduledMessage","disable_user_group":"disableUserGroup","download":"downloadFile","edit_bookmark":"editBookmark","edit_canvas":"editCanvas","enable_user_group":"enableUserGroup","ephemeral":"sendEphemeralMessage","get_canvas":"getCanvasInfo","get_channel_history":"getChannelHistory","get_channel_info":"getChannelInfo","get_dnd_info":"getDoNotDisturbInfo","get_file_info":"getFileInfo","get_list_export":"getListExport","get_list_item":"getListItem","get_message":"getMessage","get_permalink":"getMessagePermalink","get_reactions":"getReactions","get_team_dnd_info":"getTeamDoNotDisturbInfo","get_team_info":"getWorkspaceInfo","get_team_profile":"getWorkspaceProfileFields","get_thread":"getThread","get_thread_replies":"getThreadReplies","get_user":"getUserInfo","get_user_presence":"getUserPresence","get_user_profile":"getUserProfile","invite_to_conversation":"inviteToConversation","join_conversation":"joinConversation","kick_conversation":"removeUserFromConversation","leave_conversation":"leaveConversation","list_bookmarks":"listBookmarks","list_canvases":"listCanvases","list_channels":"listChannels","list_emoji":"listCustomEmoji","list_files":"listFiles","list_items":"readListItems","list_members":"listChannelMembers","list_pins":"listPins","list_reactions":"listReactions","list_scheduled_messages":"listScheduledMessages","list_user_conversations":"listUserConversations","list_user_group_members":"listUserGroupMembers","list_user_groups":"listUserGroups","list_users":"listUsers","lookup_canvas_sections":"lookupCanvasSections","lookup_user_by_email":"findUserByEmail","mark_conversation_read":"markConversationRead","open_conversation":"openConversation","open_view":"openView","pin_message":"pinMessage","publish_view":"publishView","push_view":"pushView","react":"addReaction","read":"readMessages","remove_bookmark":"removeBookmark","rename_agent_session":"renameAgentSession","rename_conversation":"renameConversation","rename_list":"updateList","revoke_canvas_access":"revokeCanvasAccess","revoke_list_access":"revokeListAccess","schedule_message":"scheduleMessage","send":"sendMessage","set_agent_session_status":"setAgentSessionStatus","set_agent_suggested_prompts":"setAgentSuggestedPrompts","set_conversation_purpose":"setConversationPurpose","set_conversation_topic":"setConversationTopic","set_status":"setAssistantStatus","set_suggested_prompts":"setAssistantSuggestedPrompts","set_title":"setAssistantTitle","set_user_presence":"setBotPresence","share_canvas":"shareCanvas","share_list":"shareList","start_list_export":"startListExport","unarchive_conversation":"unarchiveConversation","unfurl_links":"unfurlLinks","unpin_message":"unpinMessage","unreact":"removeReaction","update":"updateMessage","update_list_items":"updateListItems","update_user_group":"updateUserGroup","update_user_group_members":"updateUserGroupMembers","update_view":"updateView"},"triggers":{"slack_oauth":"oauth"},"params":{"action":{"oauthCredential":"credential"}}},"smartlead":{"namespace":"legacy.smartlead","methods":{"add_email_accounts_to_campaign":"addEmailAccountsToCampaign","add_leads_to_campaign":"addLeadsToCampaign","create_campaign":"createCampaign","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_campaign_webhook":"deleteCampaignWebhook","delete_lead_from_campaign":"deleteLeadFromCampaign","delete_lead_list":"deleteLeadList","duplicate_campaign":"duplicateCampaign","export_campaign_leads":"exportCampaignLeadsCsv","get_campaign":"getCampaign","get_campaign_analytics":"getCampaignAnalytics","get_campaign_analytics_by_date":"getCampaignAnalyticsByDate","get_campaign_lead_statistics":"getCampaignLeadStatistics","get_campaign_mailbox_statistics":"getCampaignMailboxStatistics","get_campaign_sequences":"getCampaignSequences","get_campaign_statistics":"getCampaignStatistics","get_campaign_top_level_analytics_by_date":"getTopLevelAnalyticsByDate","get_campaign_webhook_summary":"getWebhookSummary","get_lead_by_email":"getLeadByEmail","get_lead_by_id":"getLeadById","get_lead_list":"getLeadList","get_lead_message_history":"getLeadMessageHistory","list_campaign_email_accounts":"listCampaignEmailAccounts","list_campaign_leads":"listCampaignLeads","list_campaign_webhooks":"listCampaignWebhooks","list_campaigns":"listCampaigns","list_clients":"listClients","list_email_accounts":"listEmailAccounts","list_inbox_replies":"listInboxReplies","list_lead_activities":"listLeadActivities","list_lead_categories":"listLeadCategories","list_lead_lists":"listLeadLists","mark_lead_complete":"markLeadComplete","pause_lead":"pauseLead","remove_email_accounts_from_campaign":"removeEmailAccountsFromCampaign","resume_lead":"resumeLead","save_campaign_sequences":"saveCampaignSequences","unsubscribe_lead_from_campaign":"unsubscribeLeadFromCampaign","unsubscribe_lead_globally":"unsubscribeLeadGlobally","update_campaign_schedule":"updateCampaignSchedule","update_campaign_settings":"updateCampaignSettings","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead","update_lead_category":"updateLeadCategory","update_lead_list":"updateLeadList","upsert_campaign_webhook":"createOrUpdateWebhook"}},"smartlead_v2":{"namespace":"smartlead","methods":{"add_email_accounts_to_campaign":"addEmailAccountsToCampaign","add_leads_to_campaign":"addLeadsToCampaign","create_campaign":"createCampaign","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_campaign_webhook":"deleteCampaignWebhook","delete_lead_from_campaign":"deleteLeadFromCampaign","delete_lead_list":"deleteLeadList","duplicate_campaign":"duplicateCampaign","export_campaign_leads":"exportCampaignLeadsCsv","get_campaign":"getCampaign","get_campaign_analytics":"getCampaignAnalytics","get_campaign_analytics_by_date":"getCampaignAnalyticsByDate","get_campaign_lead_statistics":"getCampaignLeadStatistics","get_campaign_mailbox_statistics":"getCampaignMailboxStatistics","get_campaign_sequences":"getCampaignSequences","get_campaign_statistics":"getCampaignStatistics","get_campaign_top_level_analytics_by_date":"getTopLevelAnalyticsByDate","get_campaign_webhook_summary":"getWebhookSummary","get_lead_by_email":"getLeadByEmail","get_lead_by_id":"getLeadById","get_lead_list":"getLeadList","get_lead_message_history":"getLeadMessageHistory","list_campaign_email_accounts":"listCampaignEmailAccounts","list_campaign_leads":"listCampaignLeads","list_campaign_webhooks":"listCampaignWebhooks","list_campaigns":"listCampaigns","list_clients":"listClients","list_email_accounts":"listEmailAccounts","list_inbox_replies":"listInboxReplies","list_lead_activities":"listLeadActivities","list_lead_categories":"listLeadCategories","list_lead_lists":"listLeadLists","mark_lead_complete":"markLeadComplete","pause_lead":"pauseLead","remove_email_accounts_from_campaign":"removeEmailAccountsFromCampaign","resume_lead":"resumeLead","save_campaign_sequences":"saveCampaignSequences","unsubscribe_lead_from_campaign":"unsubscribeLeadFromCampaign","unsubscribe_lead_globally":"unsubscribeLeadGlobally","update_campaign_schedule":"updateCampaignSchedule","update_campaign_settings":"updateCampaignSettings","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead","update_lead_category":"updateLeadCategory","update_lead_list":"updateLeadList","upsert_campaign_webhook":"createOrUpdateWebhook"},"params":{"action":{"oauthCredential":"credential"}}},"smtp":{"namespace":"smtp"},"snowflake":{"namespace":"snowflake","methods":{"alter_warehouse":"alterWarehouse","call_procedure":"callProcedure","cancel_statement":"cancelStatement","cancel_task_run":"cancelTaskQuery","cortex_analyst_ask":"askCortexAnalyst","cortex_analyst_feedback":"sendCortexAnalystFeedback","delete_rows":"deleteRows","execute_sql":"executeSql","get_statement":"getStatement","get_task":"getTask","get_task_run":"getTaskRun","get_task_run_output":"getTaskRunOutput","get_warehouse":"getWarehouse","insert_rows":"insertRows","introspect_schema":"introspectSchema","list_copy_history":"listCopyHistory","list_databases":"listDatabases","list_query_history":"listQueryHistory","list_schemas":"listSchemas","list_tables":"listTables","list_task_runs":"listTaskRuns","list_tasks":"listTasks","list_warehouses":"listWarehouses","load_data":"loadData","resume_task":"resumeTask","resume_warehouse":"resumeWarehouse","run_task":"runTask","suspend_task":"suspendTask","suspend_warehouse":"suspendWarehouse","unload_data":"unloadData","update_rows":"updateRows","upsert_rows":"upsertRows"},"params":{"action":{"oauthCredential":"credential"}}},"splunk":{"namespace":"legacy.splunk","methods":{"splunk_cancel_search_job":"cancelSearchJob","splunk_create_search_job":"createSearchJob","splunk_dispatch_saved_search":"dispatchSavedSearch","splunk_get_fired_alerts":"getFiredAlerts","splunk_get_saved_search":"getSavedSearch","splunk_get_search_job":"getSearchJob","splunk_get_search_results":"getSearchResults","splunk_list_apps":"listApps","splunk_list_fired_alerts":"listFiredAlerts","splunk_list_indexes":"listIndexes","splunk_list_saved_searches":"listSavedSearches","splunk_run_search":"runSearch"}},"splunk_v2":{"namespace":"splunk","methods":{"splunk_cancel_search_job":"cancelSearchJob","splunk_create_search_job":"createSearchJob","splunk_dispatch_saved_search":"dispatchSavedSearch","splunk_get_fired_alerts":"getFiredAlerts","splunk_get_saved_search":"getSavedSearch","splunk_get_search_job":"getSearchJob","splunk_get_search_results":"getSearchResults","splunk_list_apps":"listApps","splunk_list_fired_alerts":"listFiredAlerts","splunk_list_indexes":"listIndexes","splunk_list_saved_searches":"listSavedSearches","splunk_run_search":"runSearch"},"params":{"action":{"oauthCredential":"credential"}}},"sportmonks":{"namespace":"legacy.sportmonks","methods":{"core_get_cities":"coreGetCities","core_get_city":"coreGetCityById","core_get_continent":"coreGetContinentById","core_get_continents":"coreGetContinents","core_get_countries":"coreGetCountries","core_get_country":"coreGetCountryById","core_get_entity_filters":"coreGetAllEntityFilters","core_get_my_usage":"coreGetMyUsage","core_get_region":"coreGetRegionById","core_get_regions":"coreGetRegions","core_get_timezones":"coreGetTimezones","core_get_type":"coreGetTypeById","core_get_type_by_entity":"coreGetTypeByEntity","core_get_types":"coreGetTypes","core_search_cities":"coreSearchCities","core_search_countries":"coreSearchCountries","core_search_regions":"coreSearchRegions","football_expected_by_player":"footballGetExpectedXGByPlayer","football_expected_by_team":"footballGetExpectedXGByTeam","football_get_all_commentaries":"footballGetAllCommentaries","football_get_all_fixtures":"footballGetAllFixtures","football_get_all_players":"footballGetAllPlayers","football_get_all_rivals":"footballGetAllRivals","football_get_all_teams":"footballGetAllTeams","football_get_all_transfer_rumours":"footballGetAllTransferRumours","football_get_all_transfers":"footballGetAllTransfers","football_get_brackets_by_season":"footballGetBracketsBySeason","football_get_coach":"footballGetCoachById","football_get_coaches":"footballGetCoaches","football_get_coaches_by_country":"footballGetCoachesByCountry","football_get_commentaries_by_fixture":"footballGetCommentariesByFixture","football_get_current_leagues_by_team":"footballGetCurrentLeaguesByTeam","football_get_expected_lineups_by_player":"footballGetExpectedLineupsByPlayer","football_get_expected_lineups_by_team":"footballGetExpectedLineupsByTeam","football_get_extended_team_squad":"footballGetExtendedTeamSquad","football_get_fixture":"footballGetFixtureById","football_get_fixtures_by_date":"footballGetFixturesByDate","football_get_fixtures_by_date_range":"footballGetFixturesByDateRange","football_get_fixtures_by_date_range_for_team":"footballGetFixturesByDateRangeForTeam","football_get_fixtures_by_ids":"footballGetFixturesByMultipleIds","football_get_grouped_standings_by_round":"footballGetGroupedStandingsByRound","football_get_head_to_head":"footballGetHeadToHead","football_get_inplay_livescores":"footballGetInplayLivescores","football_get_latest_coaches":"footballGetLastUpdatedCoaches","football_get_latest_fixtures":"footballGetLatestUpdatedFixtures","football_get_latest_livescores":"footballGetLatestUpdatedLivescores","football_get_latest_players":"footballGetLastUpdatedPlayers","football_get_latest_totw":"footballGetLatestTeamOfTheWeek","football_get_latest_transfers":"footballGetLatestTransfers","football_get_league":"footballGetLeagueById","football_get_leagues":"footballGetLeagues","football_get_leagues_by_country":"footballGetLeaguesByCountry","football_get_leagues_by_date":"footballGetLeaguesByDate","football_get_leagues_by_team":"footballGetLeaguesByTeam","football_get_live_leagues":"footballGetLiveLeagues","football_get_live_probabilities":"footballGetLiveProbabilities","football_get_live_probabilities_by_fixture":"footballGetLiveProbabilitiesByFixture","football_get_live_standings_by_league":"footballGetLiveStandingsByLeague","football_get_livescores":"footballGetLivescores","football_get_match_facts":"footballGetAllMatchFacts","football_get_match_facts_by_date_range":"footballGetMatchFactsByDateRange","football_get_match_facts_by_fixture":"footballGetMatchFactsByFixture","football_get_match_facts_by_league":"footballGetMatchFactsByLeague","football_get_past_fixtures_by_tv_station":"footballGetPastFixturesByTvStation","football_get_player":"footballGetPlayerById","football_get_players_by_country":"footballGetPlayersByCountry","football_get_postmatch_news":"footballGetPostMatchNews","football_get_postmatch_news_by_season":"footballGetPostMatchNewsBySeason","football_get_predictability_by_league":"footballGetPredictabilityByLeague","football_get_prematch_news":"footballGetPreMatchNews","football_get_prematch_news_by_season":"footballGetPreMatchNewsBySeason","football_get_prematch_news_upcoming":"footballGetPreMatchNewsForUpcomingFixtures","football_get_probabilities":"footballGetProbabilities","football_get_probabilities_by_fixture":"footballGetPredictionsByFixture","football_get_referee":"footballGetRefereeById","football_get_referees":"footballGetReferees","football_get_referees_by_country":"footballGetRefereesByCountry","football_get_referees_by_season":"footballGetRefereesBySeason","football_get_rivals_by_team":"footballGetRivalsByTeam","football_get_round":"footballGetRoundById","football_get_round_statistics":"footballGetRoundStatistics","football_get_rounds":"footballGetRounds","football_get_rounds_by_season":"footballGetRoundsBySeason","football_get_schedules_by_season":"footballGetSchedulesBySeason","football_get_schedules_by_season_and_team":"footballGetSchedulesBySeasonAndTeam","football_get_schedules_by_team":"footballGetSchedulesByTeam","football_get_season":"footballGetSeasonById","football_get_seasons":"footballGetSeasons","football_get_seasons_by_team":"footballGetSeasonsByTeam","football_get_stage":"footballGetStageById","football_get_stage_statistics":"footballGetStageStatistics","football_get_stages":"footballGetStages","football_get_stages_by_season":"footballGetStagesBySeason","football_get_standing_corrections_by_season":"footballGetStandingCorrectionsBySeason","football_get_standings":"footballGetAllStandings","football_get_standings_by_round":"footballGetStandingsByRound","football_get_standings_by_season":"footballGetStandingsBySeason","football_get_state":"footballGetStateById","football_get_states":"footballGetStates","football_get_team":"footballGetTeamById","football_get_team_rankings":"footballGetAllTeamRankings","football_get_team_rankings_by_date":"footballGetTeamRankingsByDate","football_get_team_rankings_by_team":"footballGetTeamRankingsByTeam","football_get_team_squad":"footballGetTeamSquad","football_get_team_squad_by_season":"footballGetTeamSquadBySeason","football_get_teams_by_country":"footballGetTeamsByCountry","football_get_teams_by_season":"footballGetTeamsBySeason","football_get_topscorers_by_season":"footballGetTopscorersBySeason","football_get_topscorers_by_stage":"footballGetTopscorersByStage","football_get_totw":"footballGetAllTeamOfTheWeek","football_get_totw_by_round":"footballGetTeamOfTheWeekByRound","football_get_transfer":"footballGetTransferById","football_get_transfer_rumour":"footballGetTransferRumourById","football_get_transfer_rumours_between_dates":"footballGetTransferRumoursBetweenDates","football_get_transfer_rumours_by_player":"footballGetTransferRumoursByPlayer","football_get_transfer_rumours_by_team":"footballGetTransferRumoursByTeam","football_get_transfers_between_dates":"footballGetTransfersBetweenDates","football_get_transfers_by_player":"footballGetTransfersByPlayer","football_get_transfers_by_team":"footballGetTransfersByTeam","football_get_tv_station":"footballGetTvStationById","football_get_tv_stations":"footballGetTvStations","football_get_tv_stations_by_fixture":"footballGetTvStationsByFixture","football_get_upcoming_fixtures_by_market":"footballGetUpcomingFixturesByMarket","football_get_upcoming_fixtures_by_tv_station":"footballGetUpcomingFixturesByTvStation","football_get_value_bets":"footballGetValueBets","football_get_value_bets_by_fixture":"footballGetValueBetsByFixture","football_get_venue":"footballGetVenueById","football_get_venues":"footballGetVenues","football_get_venues_by_season":"footballGetVenuesBySeason","football_search_coaches":"footballSearchCoaches","football_search_fixtures":"footballSearchFixtures","football_search_leagues":"footballSearchLeagues","football_search_players":"footballSearchPlayers","football_search_referees":"footballSearchReferees","football_search_rounds":"footballSearchRounds","football_search_seasons":"footballSearchSeasons","football_search_stages":"footballSearchStages","football_search_teams":"footballSearchTeams","football_search_venues":"footballSearchVenues","motorsport_get_all_fixtures":"motorsportGetAllFixtures","motorsport_get_current_leagues_by_team":"motorsportGetCurrentLeaguesByTeam","motorsport_get_driver":"motorsportGetDriverById","motorsport_get_driver_standings":"motorsportGetAllDriverStandings","motorsport_get_driver_standings_by_season":"motorsportGetDriverStandingsBySeason","motorsport_get_drivers":"motorsportGetDrivers","motorsport_get_drivers_by_country":"motorsportGetDriversByCountry","motorsport_get_drivers_by_season":"motorsportGetDriversBySeason","motorsport_get_fixture":"motorsportGetFixtureById","motorsport_get_fixtures_by_date":"motorsportGetFixturesByDate","motorsport_get_fixtures_by_date_range":"motorsportGetFixturesByDateRange","motorsport_get_fixtures_by_ids":"motorsportGetFixturesByIds","motorsport_get_laps_by_fixture":"motorsportGetLapsByFixture","motorsport_get_laps_by_fixture_and_driver":"motorsportGetLapsByFixtureAndDriver","motorsport_get_laps_by_fixture_and_lap":"motorsportGetLapsByFixtureAndLapNumber","motorsport_get_latest_laps_by_fixture":"motorsportGetLatestLapsByFixture","motorsport_get_latest_pitstops_by_fixture":"motorsportGetLatestPitstopsByFixture","motorsport_get_latest_stints_by_fixture":"motorsportGetLatestStintsByFixture","motorsport_get_latest_updated_drivers":"motorsportGetLatestUpdatedDrivers","motorsport_get_latest_updated_fixtures":"motorsportGetLatestUpdatedFixtures","motorsport_get_league":"motorsportGetLeagueById","motorsport_get_leagues":"motorsportGetAllLeagues","motorsport_get_leagues_by_country":"motorsportGetLeaguesByCountry","motorsport_get_leagues_by_date":"motorsportGetLeaguesByFixtureDate","motorsport_get_leagues_by_live":"motorsportGetLeaguesByLive","motorsport_get_leagues_by_team":"motorsportGetLeaguesByTeam","motorsport_get_livescores":"motorsportGetLivescores","motorsport_get_pitstops_by_fixture":"motorsportGetPitstopsByFixture","motorsport_get_pitstops_by_fixture_and_driver":"motorsportGetPitstopsByFixtureAndDriver","motorsport_get_pitstops_by_fixture_and_lap":"motorsportGetPitstopsByFixtureAndLapNumber","motorsport_get_race_results_by_season_and_driver":"motorsportGetRaceResultsBySeasonAndDriver","motorsport_get_race_results_by_season_and_team":"motorsportGetRaceResultsBySeasonAndTeam","motorsport_get_schedules_by_season":"motorsportGetSchedulesBySeason","motorsport_get_season":"motorsportGetSeasonById","motorsport_get_seasons":"motorsportGetAllSeasons","motorsport_get_stage":"motorsportGetStageById","motorsport_get_stages":"motorsportGetAllStages","motorsport_get_stages_by_season":"motorsportGetStagesBySeason","motorsport_get_state":"motorsportGetStateById","motorsport_get_states":"motorsportGetAllStates","motorsport_get_stints_by_fixture":"motorsportGetStintsByFixture","motorsport_get_stints_by_fixture_and_driver":"motorsportGetStintsByFixtureAndDriver","motorsport_get_stints_by_fixture_and_stint":"motorsportGetStintsByFixtureAndStintNumber","motorsport_get_team":"motorsportGetTeamById","motorsport_get_team_standings":"motorsportGetAllTeamStandings","motorsport_get_team_standings_by_season":"motorsportGetTeamStandingsBySeason","motorsport_get_teams":"motorsportGetTeams","motorsport_get_teams_by_country":"motorsportGetTeamsByCountry","motorsport_get_teams_by_season":"motorsportGetTeamsBySeason","motorsport_get_venue":"motorsportGetVenueById","motorsport_get_venues":"motorsportGetVenues","motorsport_get_venues_by_season":"motorsportGetVenuesBySeason","motorsport_search_drivers":"motorsportSearchDrivers","motorsport_search_leagues":"motorsportSearchLeagues","motorsport_search_stages":"motorsportSearchStages","motorsport_search_teams":"motorsportSearchTeams","motorsport_search_venues":"motorsportSearchVenues","odds_get_all_historical_odds":"oddsGetAllHistoricalOdds","odds_get_all_inplay_odds":"oddsGetAllInPlayOdds","odds_get_all_pre_match_odds":"oddsGetAllPreMatchOdds","odds_get_all_premium_odds":"oddsGetAllPremiumOdds","odds_get_bookmaker":"oddsGetBookmakerById","odds_get_bookmaker_event_ids_by_fixture":"oddsGetBookmakerEventIdsByFixture","odds_get_bookmakers":"oddsGetBookmakers","odds_get_bookmakers_by_fixture":"oddsGetBookmakersByFixture","odds_get_inplay_odds_by_fixture":"oddsGetInPlayOddsByFixture","odds_get_inplay_odds_by_fixture_and_bookmaker":"oddsGetInPlayOddsByFixtureAndBookmaker","odds_get_inplay_odds_by_fixture_and_market":"oddsGetInPlayOddsByFixtureAndMarket","odds_get_last_updated_inplay_odds":"oddsGetLastUpdatedInPlayOdds","odds_get_last_updated_pre_match_odds":"oddsGetLastUpdatedPreMatchOdds","odds_get_market":"oddsGetMarketById","odds_get_markets":"oddsGetMarkets","odds_get_pre_match_odds_by_fixture":"oddsGetPreMatchOddsByFixture","odds_get_pre_match_odds_by_fixture_and_bookmaker":"oddsGetPreMatchOddsByFixtureAndBookmaker","odds_get_pre_match_odds_by_fixture_and_market":"oddsGetPreMatchOddsByFixtureAndMarket","odds_get_premium_odds_by_fixture":"oddsGetPremiumOddsByFixture","odds_get_premium_odds_by_fixture_and_bookmaker":"oddsGetPremiumOddsByFixtureAndBookmaker","odds_get_premium_odds_by_fixture_and_market":"oddsGetPremiumOddsByFixtureAndMarket","odds_get_updated_historical_odds_between":"oddsGetUpdatedHistoricalOddsBetweenTimeRange","odds_get_updated_premium_odds_between":"oddsGetUpdatedPremiumOddsBetweenTimeRange","odds_search_bookmakers":"oddsSearchBookmakers","odds_search_markets":"oddsSearchMarkets"}},"sportmonks_v2":{"namespace":"sportmonks","methods":{"core_get_cities":"coreGetCities","core_get_city":"coreGetCityById","core_get_continent":"coreGetContinentById","core_get_continents":"coreGetContinents","core_get_countries":"coreGetCountries","core_get_country":"coreGetCountryById","core_get_entity_filters":"coreGetAllEntityFilters","core_get_my_usage":"coreGetMyUsage","core_get_region":"coreGetRegionById","core_get_regions":"coreGetRegions","core_get_timezones":"coreGetTimezones","core_get_type":"coreGetTypeById","core_get_type_by_entity":"coreGetTypeByEntity","core_get_types":"coreGetTypes","core_search_cities":"coreSearchCities","core_search_countries":"coreSearchCountries","core_search_regions":"coreSearchRegions","football_expected_by_player":"footballGetExpectedXGByPlayer","football_expected_by_team":"footballGetExpectedXGByTeam","football_get_all_commentaries":"footballGetAllCommentaries","football_get_all_fixtures":"footballGetAllFixtures","football_get_all_players":"footballGetAllPlayers","football_get_all_rivals":"footballGetAllRivals","football_get_all_teams":"footballGetAllTeams","football_get_all_transfer_rumours":"footballGetAllTransferRumours","football_get_all_transfers":"footballGetAllTransfers","football_get_brackets_by_season":"footballGetBracketsBySeason","football_get_coach":"footballGetCoachById","football_get_coaches":"footballGetCoaches","football_get_coaches_by_country":"footballGetCoachesByCountry","football_get_commentaries_by_fixture":"footballGetCommentariesByFixture","football_get_current_leagues_by_team":"footballGetCurrentLeaguesByTeam","football_get_expected_lineups_by_player":"footballGetExpectedLineupsByPlayer","football_get_expected_lineups_by_team":"footballGetExpectedLineupsByTeam","football_get_extended_team_squad":"footballGetExtendedTeamSquad","football_get_fixture":"footballGetFixtureById","football_get_fixtures_by_date":"footballGetFixturesByDate","football_get_fixtures_by_date_range":"footballGetFixturesByDateRange","football_get_fixtures_by_date_range_for_team":"footballGetFixturesByDateRangeForTeam","football_get_fixtures_by_ids":"footballGetFixturesByMultipleIds","football_get_grouped_standings_by_round":"footballGetGroupedStandingsByRound","football_get_head_to_head":"footballGetHeadToHead","football_get_inplay_livescores":"footballGetInplayLivescores","football_get_latest_coaches":"footballGetLastUpdatedCoaches","football_get_latest_fixtures":"footballGetLatestUpdatedFixtures","football_get_latest_livescores":"footballGetLatestUpdatedLivescores","football_get_latest_players":"footballGetLastUpdatedPlayers","football_get_latest_totw":"footballGetLatestTeamOfTheWeek","football_get_latest_transfers":"footballGetLatestTransfers","football_get_league":"footballGetLeagueById","football_get_leagues":"footballGetLeagues","football_get_leagues_by_country":"footballGetLeaguesByCountry","football_get_leagues_by_date":"footballGetLeaguesByDate","football_get_leagues_by_team":"footballGetLeaguesByTeam","football_get_live_leagues":"footballGetLiveLeagues","football_get_live_probabilities":"footballGetLiveProbabilities","football_get_live_probabilities_by_fixture":"footballGetLiveProbabilitiesByFixture","football_get_live_standings_by_league":"footballGetLiveStandingsByLeague","football_get_livescores":"footballGetLivescores","football_get_match_facts":"footballGetAllMatchFacts","football_get_match_facts_by_date_range":"footballGetMatchFactsByDateRange","football_get_match_facts_by_fixture":"footballGetMatchFactsByFixture","football_get_match_facts_by_league":"footballGetMatchFactsByLeague","football_get_past_fixtures_by_tv_station":"footballGetPastFixturesByTvStation","football_get_player":"footballGetPlayerById","football_get_players_by_country":"footballGetPlayersByCountry","football_get_postmatch_news":"footballGetPostMatchNews","football_get_postmatch_news_by_season":"footballGetPostMatchNewsBySeason","football_get_predictability_by_league":"footballGetPredictabilityByLeague","football_get_prematch_news":"footballGetPreMatchNews","football_get_prematch_news_by_season":"footballGetPreMatchNewsBySeason","football_get_prematch_news_upcoming":"footballGetPreMatchNewsForUpcomingFixtures","football_get_probabilities":"footballGetProbabilities","football_get_probabilities_by_fixture":"footballGetPredictionsByFixture","football_get_referee":"footballGetRefereeById","football_get_referees":"footballGetReferees","football_get_referees_by_country":"footballGetRefereesByCountry","football_get_referees_by_season":"footballGetRefereesBySeason","football_get_rivals_by_team":"footballGetRivalsByTeam","football_get_round":"footballGetRoundById","football_get_round_statistics":"footballGetRoundStatistics","football_get_rounds":"footballGetRounds","football_get_rounds_by_season":"footballGetRoundsBySeason","football_get_schedules_by_season":"footballGetSchedulesBySeason","football_get_schedules_by_season_and_team":"footballGetSchedulesBySeasonAndTeam","football_get_schedules_by_team":"footballGetSchedulesByTeam","football_get_season":"footballGetSeasonById","football_get_seasons":"footballGetSeasons","football_get_seasons_by_team":"footballGetSeasonsByTeam","football_get_stage":"footballGetStageById","football_get_stage_statistics":"footballGetStageStatistics","football_get_stages":"footballGetStages","football_get_stages_by_season":"footballGetStagesBySeason","football_get_standing_corrections_by_season":"footballGetStandingCorrectionsBySeason","football_get_standings":"footballGetAllStandings","football_get_standings_by_round":"footballGetStandingsByRound","football_get_standings_by_season":"footballGetStandingsBySeason","football_get_state":"footballGetStateById","football_get_states":"footballGetStates","football_get_team":"footballGetTeamById","football_get_team_rankings":"footballGetAllTeamRankings","football_get_team_rankings_by_date":"footballGetTeamRankingsByDate","football_get_team_rankings_by_team":"footballGetTeamRankingsByTeam","football_get_team_squad":"footballGetTeamSquad","football_get_team_squad_by_season":"footballGetTeamSquadBySeason","football_get_teams_by_country":"footballGetTeamsByCountry","football_get_teams_by_season":"footballGetTeamsBySeason","football_get_topscorers_by_season":"footballGetTopscorersBySeason","football_get_topscorers_by_stage":"footballGetTopscorersByStage","football_get_totw":"footballGetAllTeamOfTheWeek","football_get_totw_by_round":"footballGetTeamOfTheWeekByRound","football_get_transfer":"footballGetTransferById","football_get_transfer_rumour":"footballGetTransferRumourById","football_get_transfer_rumours_between_dates":"footballGetTransferRumoursBetweenDates","football_get_transfer_rumours_by_player":"footballGetTransferRumoursByPlayer","football_get_transfer_rumours_by_team":"footballGetTransferRumoursByTeam","football_get_transfers_between_dates":"footballGetTransfersBetweenDates","football_get_transfers_by_player":"footballGetTransfersByPlayer","football_get_transfers_by_team":"footballGetTransfersByTeam","football_get_tv_station":"footballGetTvStationById","football_get_tv_stations":"footballGetTvStations","football_get_tv_stations_by_fixture":"footballGetTvStationsByFixture","football_get_upcoming_fixtures_by_market":"footballGetUpcomingFixturesByMarket","football_get_upcoming_fixtures_by_tv_station":"footballGetUpcomingFixturesByTvStation","football_get_value_bets":"footballGetValueBets","football_get_value_bets_by_fixture":"footballGetValueBetsByFixture","football_get_venue":"footballGetVenueById","football_get_venues":"footballGetVenues","football_get_venues_by_season":"footballGetVenuesBySeason","football_search_coaches":"footballSearchCoaches","football_search_fixtures":"footballSearchFixtures","football_search_leagues":"footballSearchLeagues","football_search_players":"footballSearchPlayers","football_search_referees":"footballSearchReferees","football_search_rounds":"footballSearchRounds","football_search_seasons":"footballSearchSeasons","football_search_stages":"footballSearchStages","football_search_teams":"footballSearchTeams","football_search_venues":"footballSearchVenues","motorsport_get_all_fixtures":"motorsportGetAllFixtures","motorsport_get_current_leagues_by_team":"motorsportGetCurrentLeaguesByTeam","motorsport_get_driver":"motorsportGetDriverById","motorsport_get_driver_standings":"motorsportGetAllDriverStandings","motorsport_get_driver_standings_by_season":"motorsportGetDriverStandingsBySeason","motorsport_get_drivers":"motorsportGetDrivers","motorsport_get_drivers_by_country":"motorsportGetDriversByCountry","motorsport_get_drivers_by_season":"motorsportGetDriversBySeason","motorsport_get_fixture":"motorsportGetFixtureById","motorsport_get_fixtures_by_date":"motorsportGetFixturesByDate","motorsport_get_fixtures_by_date_range":"motorsportGetFixturesByDateRange","motorsport_get_fixtures_by_ids":"motorsportGetFixturesByIds","motorsport_get_laps_by_fixture":"motorsportGetLapsByFixture","motorsport_get_laps_by_fixture_and_driver":"motorsportGetLapsByFixtureAndDriver","motorsport_get_laps_by_fixture_and_lap":"motorsportGetLapsByFixtureAndLapNumber","motorsport_get_latest_laps_by_fixture":"motorsportGetLatestLapsByFixture","motorsport_get_latest_pitstops_by_fixture":"motorsportGetLatestPitstopsByFixture","motorsport_get_latest_stints_by_fixture":"motorsportGetLatestStintsByFixture","motorsport_get_latest_updated_drivers":"motorsportGetLatestUpdatedDrivers","motorsport_get_latest_updated_fixtures":"motorsportGetLatestUpdatedFixtures","motorsport_get_league":"motorsportGetLeagueById","motorsport_get_leagues":"motorsportGetAllLeagues","motorsport_get_leagues_by_country":"motorsportGetLeaguesByCountry","motorsport_get_leagues_by_date":"motorsportGetLeaguesByFixtureDate","motorsport_get_leagues_by_live":"motorsportGetLeaguesByLive","motorsport_get_leagues_by_team":"motorsportGetLeaguesByTeam","motorsport_get_livescores":"motorsportGetLivescores","motorsport_get_pitstops_by_fixture":"motorsportGetPitstopsByFixture","motorsport_get_pitstops_by_fixture_and_driver":"motorsportGetPitstopsByFixtureAndDriver","motorsport_get_pitstops_by_fixture_and_lap":"motorsportGetPitstopsByFixtureAndLapNumber","motorsport_get_race_results_by_season_and_driver":"motorsportGetRaceResultsBySeasonAndDriver","motorsport_get_race_results_by_season_and_team":"motorsportGetRaceResultsBySeasonAndTeam","motorsport_get_schedules_by_season":"motorsportGetSchedulesBySeason","motorsport_get_season":"motorsportGetSeasonById","motorsport_get_seasons":"motorsportGetAllSeasons","motorsport_get_stage":"motorsportGetStageById","motorsport_get_stages":"motorsportGetAllStages","motorsport_get_stages_by_season":"motorsportGetStagesBySeason","motorsport_get_state":"motorsportGetStateById","motorsport_get_states":"motorsportGetAllStates","motorsport_get_stints_by_fixture":"motorsportGetStintsByFixture","motorsport_get_stints_by_fixture_and_driver":"motorsportGetStintsByFixtureAndDriver","motorsport_get_stints_by_fixture_and_stint":"motorsportGetStintsByFixtureAndStintNumber","motorsport_get_team":"motorsportGetTeamById","motorsport_get_team_standings":"motorsportGetAllTeamStandings","motorsport_get_team_standings_by_season":"motorsportGetTeamStandingsBySeason","motorsport_get_teams":"motorsportGetTeams","motorsport_get_teams_by_country":"motorsportGetTeamsByCountry","motorsport_get_teams_by_season":"motorsportGetTeamsBySeason","motorsport_get_venue":"motorsportGetVenueById","motorsport_get_venues":"motorsportGetVenues","motorsport_get_venues_by_season":"motorsportGetVenuesBySeason","motorsport_search_drivers":"motorsportSearchDrivers","motorsport_search_leagues":"motorsportSearchLeagues","motorsport_search_stages":"motorsportSearchStages","motorsport_search_teams":"motorsportSearchTeams","motorsport_search_venues":"motorsportSearchVenues","odds_get_all_historical_odds":"oddsGetAllHistoricalOdds","odds_get_all_inplay_odds":"oddsGetAllInPlayOdds","odds_get_all_pre_match_odds":"oddsGetAllPreMatchOdds","odds_get_all_premium_odds":"oddsGetAllPremiumOdds","odds_get_bookmaker":"oddsGetBookmakerById","odds_get_bookmaker_event_ids_by_fixture":"oddsGetBookmakerEventIdsByFixture","odds_get_bookmakers":"oddsGetBookmakers","odds_get_bookmakers_by_fixture":"oddsGetBookmakersByFixture","odds_get_inplay_odds_by_fixture":"oddsGetInPlayOddsByFixture","odds_get_inplay_odds_by_fixture_and_bookmaker":"oddsGetInPlayOddsByFixtureAndBookmaker","odds_get_inplay_odds_by_fixture_and_market":"oddsGetInPlayOddsByFixtureAndMarket","odds_get_last_updated_inplay_odds":"oddsGetLastUpdatedInPlayOdds","odds_get_last_updated_pre_match_odds":"oddsGetLastUpdatedPreMatchOdds","odds_get_market":"oddsGetMarketById","odds_get_markets":"oddsGetMarkets","odds_get_pre_match_odds_by_fixture":"oddsGetPreMatchOddsByFixture","odds_get_pre_match_odds_by_fixture_and_bookmaker":"oddsGetPreMatchOddsByFixtureAndBookmaker","odds_get_pre_match_odds_by_fixture_and_market":"oddsGetPreMatchOddsByFixtureAndMarket","odds_get_premium_odds_by_fixture":"oddsGetPremiumOddsByFixture","odds_get_premium_odds_by_fixture_and_bookmaker":"oddsGetPremiumOddsByFixtureAndBookmaker","odds_get_premium_odds_by_fixture_and_market":"oddsGetPremiumOddsByFixtureAndMarket","odds_get_updated_historical_odds_between":"oddsGetUpdatedHistoricalOddsBetweenTimeRange","odds_get_updated_premium_odds_between":"oddsGetUpdatedPremiumOddsBetweenTimeRange","odds_search_bookmakers":"oddsSearchBookmakers","odds_search_markets":"oddsSearchMarkets"},"params":{"action":{"oauthCredential":"credential"}}},"spotify":{"namespace":"legacy.spotify","methods":{"spotify_add_playlist_cover":"addPlaylistCover","spotify_add_to_queue":"addToQueue","spotify_add_tracks_to_playlist":"addTracksToPlaylist","spotify_check_following":"checkFollowing","spotify_check_playlist_followers":"checkPlaylistFollowers","spotify_check_saved_albums":"checkSavedAlbums","spotify_check_saved_audiobooks":"checkSavedAudiobooks","spotify_check_saved_episodes":"checkSavedEpisodes","spotify_check_saved_shows":"checkSavedShows","spotify_check_saved_tracks":"checkSavedTracks","spotify_create_playlist":"createPlaylist","spotify_follow_artists":"followArtists","spotify_follow_playlist":"followPlaylist","spotify_get_album":"getAlbum","spotify_get_album_tracks":"getAlbumTracks","spotify_get_albums":"getMultipleAlbums","spotify_get_artist":"getArtist","spotify_get_artist_albums":"getArtistAlbums","spotify_get_artist_top_tracks":"getArtistTopTracks","spotify_get_artists":"getMultipleArtists","spotify_get_audiobook":"getAudiobook","spotify_get_audiobook_chapters":"getAudiobookChapters","spotify_get_audiobooks":"getMultipleAudiobooks","spotify_get_categories":"getCategories","spotify_get_current_user":"getMyProfile","spotify_get_currently_playing":"getCurrentlyPlaying","spotify_get_devices":"getDevices","spotify_get_episode":"getEpisode","spotify_get_episodes":"getMultipleEpisodes","spotify_get_followed_artists":"getFollowedArtists","spotify_get_markets":"getAvailableMarkets","spotify_get_new_releases":"getNewReleases","spotify_get_playback_state":"getPlaybackState","spotify_get_playlist":"getPlaylist","spotify_get_playlist_cover":"getPlaylistCover","spotify_get_playlist_tracks":"getPlaylistTracks","spotify_get_queue":"getQueue","spotify_get_recently_played":"getRecentlyPlayed","spotify_get_saved_albums":"getSavedAlbums","spotify_get_saved_audiobooks":"getSavedAudiobooks","spotify_get_saved_episodes":"getSavedEpisodes","spotify_get_saved_shows":"getSavedShows","spotify_get_saved_tracks":"getSavedTracks","spotify_get_show":"getShow","spotify_get_show_episodes":"getShowEpisodes","spotify_get_shows":"getMultipleShows","spotify_get_top_artists":"getMyTopArtists","spotify_get_top_tracks":"getMyTopTracks","spotify_get_track":"getTrack","spotify_get_tracks":"getMultipleTracks","spotify_get_user_playlists":"getMyPlaylists","spotify_get_user_profile":"getUserProfile","spotify_pause":"pause","spotify_play":"play","spotify_remove_saved_albums":"removeSavedAlbums","spotify_remove_saved_audiobooks":"removeSavedAudiobooks","spotify_remove_saved_episodes":"removeSavedEpisodes","spotify_remove_saved_shows":"removeSavedShows","spotify_remove_saved_tracks":"removeSavedTracks","spotify_remove_tracks_from_playlist":"removeTracksFromPlaylist","spotify_reorder_playlist_items":"reorderPlaylistItems","spotify_replace_playlist_items":"replacePlaylistItems","spotify_save_albums":"saveAlbums","spotify_save_audiobooks":"saveAudiobooks","spotify_save_episodes":"saveEpisodes","spotify_save_shows":"saveShows","spotify_save_tracks":"saveTracks","spotify_search":"search","spotify_seek":"seek","spotify_set_repeat":"setRepeat","spotify_set_shuffle":"setShuffle","spotify_set_volume":"setVolume","spotify_skip_next":"skipToNext","spotify_skip_previous":"skipToPrevious","spotify_transfer_playback":"transferPlayback","spotify_unfollow_artists":"unfollowArtists","spotify_unfollow_playlist":"unfollowPlaylist","spotify_update_playlist":"updatePlaylist"},"params":{"action":{"oauthCredential":"credential"}}},"sqs":{"namespace":"legacy.sqs","methods":{"cancel_message_move_task":"cancelMessageMoveTask","change_message_visibility":"changeMessageVisibility","change_message_visibility_batch":"changeMessageVisibilityBatch","create_queue":"createQueue","delete_message":"deleteMessage","delete_message_batch":"deleteMessageBatch","delete_queue":"deleteQueue","get_queue_attributes":"getQueueAttributes","get_queue_url":"getQueueUrl","list_dead_letter_source_queues":"listDeadLetterSourceQueues","list_message_move_tasks":"listMessageMoveTasks","list_queue_tags":"listQueueTags","list_queues":"listQueues","purge_queue":"purgeQueue","receive_message":"receiveMessage","send":"sendMessage","send_message_batch":"sendMessageBatch","set_queue_attributes":"setQueueAttributes","start_message_move_task":"startMessageMoveTask","tag_queue":"tagQueue","untag_queue":"untagQueue"}},"sqs_v2":{"namespace":"sqs","methods":{"cancel_message_move_task":"cancelMessageMoveTask","change_message_visibility":"changeMessageVisibility","change_message_visibility_batch":"changeMessageVisibilityBatch","create_queue":"createQueue","delete_message":"deleteMessage","delete_message_batch":"deleteMessageBatch","delete_queue":"deleteQueue","get_queue_attributes":"getQueueAttributes","get_queue_url":"getQueueUrl","list_dead_letter_source_queues":"listDeadLetterSourceQueues","list_message_move_tasks":"listMessageMoveTasks","list_queue_tags":"listQueueTags","list_queues":"listQueues","purge_queue":"purgeQueue","receive_message":"receiveMessage","send":"sendMessage","send_message_batch":"sendMessageBatch","set_queue_attributes":"setQueueAttributes","start_message_move_task":"startMessageMoveTask","tag_queue":"tagQueue","untag_queue":"untagQueue"},"params":{"action":{"oauthCredential":"credential"}}},"square":{"namespace":"legacy.square","methods":{"batch_retrieve_inventory_counts":"batchRetrieveInventoryCounts","cancel_invoice":"cancelInvoice","cancel_payment":"cancelPayment","complete_payment":"completePayment","create_catalog_image":"createCatalogImage","create_customer":"createCustomer","create_invoice":"createInvoice","create_order":"createOrder","create_payment":"createPayment","delete_catalog_object":"deleteCatalogObject","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","get_catalog_object":"getCatalogObject","get_customer":"getCustomer","get_invoice":"getInvoice","get_location":"getLocation","get_order":"getOrder","get_payment":"getPayment","get_refund":"getRefund","list_catalog":"listCatalog","list_customers":"listCustomers","list_invoices":"listInvoices","list_locations":"listLocations","list_payments":"listPayments","list_refunds":"listRefunds","pay_order":"payOrder","publish_invoice":"publishInvoice","refund_payment":"refundPayment","search_catalog_objects":"searchCatalogObjects","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_orders":"searchOrders","update_customer":"updateCustomer","upsert_catalog_object":"upsertCatalogObject"}},"square_v2":{"namespace":"square","methods":{"batch_retrieve_inventory_counts":"batchRetrieveInventoryCounts","cancel_invoice":"cancelInvoice","cancel_payment":"cancelPayment","complete_payment":"completePayment","create_catalog_image":"createCatalogImage","create_customer":"createCustomer","create_invoice":"createInvoice","create_order":"createOrder","create_payment":"createPayment","delete_catalog_object":"deleteCatalogObject","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","get_catalog_object":"getCatalogObject","get_customer":"getCustomer","get_invoice":"getInvoice","get_location":"getLocation","get_order":"getOrder","get_payment":"getPayment","get_refund":"getRefund","list_catalog":"listCatalog","list_customers":"listCustomers","list_invoices":"listInvoices","list_locations":"listLocations","list_payments":"listPayments","list_refunds":"listRefunds","pay_order":"payOrder","publish_invoice":"publishInvoice","refund_payment":"refundPayment","search_catalog_objects":"searchCatalogObjects","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_orders":"searchOrders","update_customer":"updateCustomer","upsert_catalog_object":"upsertCatalogObject"},"params":{"action":{"oauthCredential":"credential"}}},"ssh":{"namespace":"legacy.ssh","methods":{"ssh_check_command_exists":"checkCommandExists","ssh_check_file_exists":"checkFileDirectoryExists","ssh_create_directory":"createDirectory","ssh_delete_file":"deleteFileDirectory","ssh_download_file":"downloadFile","ssh_execute_command":"executeCommand","ssh_execute_script":"executeScript","ssh_get_system_info":"getSystemInfo","ssh_list_directory":"listDirectory","ssh_move_rename":"moveRename","ssh_read_file_content":"readFileContent","ssh_upload_file":"uploadFile","ssh_write_file_content":"writeFileContent"}},"ssh_v2":{"namespace":"ssh","methods":{"ssh_check_command_exists":"checkCommandExists","ssh_check_file_exists":"checkFileDirectoryExists","ssh_create_directory":"createDirectory","ssh_delete_file":"deleteFileDirectory","ssh_download_file":"downloadFile","ssh_execute_command":"executeCommand","ssh_execute_script":"executeScript","ssh_get_system_info":"getSystemInfo","ssh_list_directory":"listDirectory","ssh_move_rename":"moveRename","ssh_read_file_content":"readFileContent","ssh_upload_file":"uploadFile","ssh_write_file_content":"writeFileContent"}},"ssm":{"namespace":"legacy.ssm","methods":{"cancel_command":"cancelCommand","delete_parameter":"deleteParameter","describe_automation_executions":"describeAutomationExecutions","describe_instance_information":"describeInstanceInformation","describe_instance_patch_states":"describeInstancePatchStates","describe_instance_patches":"describeInstancePatches","describe_parameters":"describeParameters","get_automation_execution":"getAutomationExecution","get_command_invocation":"getCommandInvocation","get_document":"getDocument","get_parameter":"getParameter","get_parameters":"getParameters","get_parameters_by_path":"getParametersByPath","list_command_invocations":"listCommandInvocations","list_commands":"listCommands","list_compliance_items":"listComplianceItems","list_compliance_summaries":"listComplianceSummaries","list_documents":"listDocuments","put_parameter":"putParameter","send_command":"sendCommand","start_automation_execution":"startAutomationExecution","stop_automation_execution":"stopAutomationExecution"}},"ssm_v2":{"namespace":"ssm","methods":{"cancel_command":"cancelCommand","delete_parameter":"deleteParameter","describe_automation_executions":"describeAutomationExecutions","describe_instance_information":"describeInstanceInformation","describe_instance_patch_states":"describeInstancePatchStates","describe_instance_patches":"describeInstancePatches","describe_parameters":"describeParameters","get_automation_execution":"getAutomationExecution","get_command_invocation":"getCommandInvocation","get_document":"getDocument","get_parameter":"getParameter","get_parameters":"getParameters","get_parameters_by_path":"getParametersByPath","list_command_invocations":"listCommandInvocations","list_commands":"listCommands","list_compliance_items":"listComplianceItems","list_compliance_summaries":"listComplianceSummaries","list_documents":"listDocuments","put_parameter":"putParameter","send_command":"sendCommand","start_automation_execution":"startAutomationExecution","stop_automation_execution":"stopAutomationExecution"},"params":{"action":{"oauthCredential":"credential"}}},"stagehand":{"namespace":"stagehand","methods":{"agent":"runAgent","extract":"extractData"}},"start_trigger":{"namespace":"startTrigger"},"starter":{"namespace":"legacy.starter"},"stripe":{"namespace":"legacy.stripe","methods":{"cancel_payment_intent":"cancelPaymentIntent","cancel_subscription":"cancelSubscription","capture_charge":"captureCharge","capture_payment_intent":"capturePaymentIntent","confirm_payment_intent":"confirmPaymentIntent","create_charge":"createCharge","create_customer":"createCustomer","create_invoice":"createInvoice","create_payment_intent":"createPaymentIntent","create_price":"createPrice","create_product":"createProduct","create_subscription":"createSubscription","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","delete_product":"deleteProduct","finalize_invoice":"finalizeInvoice","list_charges":"listCharges","list_customers":"listCustomers","list_events":"listEvents","list_invoices":"listInvoices","list_payment_intents":"listPaymentIntents","list_prices":"listPrices","list_products":"listProducts","list_subscriptions":"listSubscriptions","pay_invoice":"payInvoice","resume_subscription":"resumeSubscription","retrieve_charge":"retrieveCharge","retrieve_customer":"retrieveCustomer","retrieve_event":"retrieveEvent","retrieve_invoice":"retrieveInvoice","retrieve_payment_intent":"retrievePaymentIntent","retrieve_price":"retrievePrice","retrieve_product":"retrieveProduct","retrieve_subscription":"retrieveSubscription","search_charges":"searchCharges","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_payment_intents":"searchPaymentIntents","search_prices":"searchPrices","search_products":"searchProducts","search_subscriptions":"searchSubscriptions","send_invoice":"sendInvoice","update_charge":"updateCharge","update_customer":"updateCustomer","update_invoice":"updateInvoice","update_payment_intent":"updatePaymentIntent","update_price":"updatePrice","update_product":"updateProduct","update_subscription":"updateSubscription","void_invoice":"voidInvoice"},"triggers":{"stripe_webhook":"webhook"}},"stripe_v2":{"namespace":"stripe","methods":{"cancel_payment_intent":"cancelPaymentIntent","cancel_subscription":"cancelSubscription","capture_charge":"captureCharge","capture_payment_intent":"capturePaymentIntent","confirm_payment_intent":"confirmPaymentIntent","create_charge":"createCharge","create_customer":"createCustomer","create_invoice":"createInvoice","create_payment_intent":"createPaymentIntent","create_price":"createPrice","create_product":"createProduct","create_subscription":"createSubscription","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","delete_product":"deleteProduct","finalize_invoice":"finalizeInvoice","list_charges":"listCharges","list_customers":"listCustomers","list_events":"listEvents","list_invoices":"listInvoices","list_payment_intents":"listPaymentIntents","list_prices":"listPrices","list_products":"listProducts","list_subscriptions":"listSubscriptions","pay_invoice":"payInvoice","resume_subscription":"resumeSubscription","retrieve_charge":"retrieveCharge","retrieve_customer":"retrieveCustomer","retrieve_event":"retrieveEvent","retrieve_invoice":"retrieveInvoice","retrieve_payment_intent":"retrievePaymentIntent","retrieve_price":"retrievePrice","retrieve_product":"retrieveProduct","retrieve_subscription":"retrieveSubscription","search_charges":"searchCharges","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_payment_intents":"searchPaymentIntents","search_prices":"searchPrices","search_products":"searchProducts","search_subscriptions":"searchSubscriptions","send_invoice":"sendInvoice","update_charge":"updateCharge","update_customer":"updateCustomer","update_invoice":"updateInvoice","update_payment_intent":"updatePaymentIntent","update_price":"updatePrice","update_product":"updateProduct","update_subscription":"updateSubscription","void_invoice":"voidInvoice"},"triggers":{"stripe_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"sts":{"namespace":"legacy.sts","methods":{"assume_role":"assumeRole","assume_role_with_saml":"assumeRoleWithSaml","assume_role_with_web_identity":"assumeRoleWithWebIdentity","get_access_key_info":"getAccessKeyInfo","get_caller_identity":"getCallerIdentity","get_session_token":"getSessionToken"}},"sts_v2":{"namespace":"sts","methods":{"assume_role":"assumeRole","assume_role_with_saml":"assumeRoleWithSaml","assume_role_with_web_identity":"assumeRoleWithWebIdentity","get_access_key_info":"getAccessKeyInfo","get_caller_identity":"getCallerIdentity","get_session_token":"getSessionToken"},"params":{"action":{"oauthCredential":"credential"}}},"stt":{"namespace":"legacy.stt"},"stt_v2":{"namespace":"stt"},"supabase":{"namespace":"legacy.supabase","methods":{"count":"countRows","delete":"deleteARow","get_row":"getARow","insert":"createARow","introspect":"introspectSchema","invoke_function":"invokeEdgeFunction","query":"getManyRows","rpc":"callRpcFunction","storage_copy":"storageCopyFile","storage_create_bucket":"storageCreateBucket","storage_create_signed_upload_url":"storageCreateSignedUploadUrl","storage_create_signed_url":"storageCreateSignedUrl","storage_delete":"storageDeleteFiles","storage_delete_bucket":"storageDeleteBucket","storage_download":"storageDownloadFile","storage_empty_bucket":"storageEmptyBucket","storage_get_public_url":"storageGetPublicUrl","storage_list":"storageListFiles","storage_list_buckets":"storageListBuckets","storage_move":"storageMoveFile","storage_update_bucket":"storageUpdateBucket","storage_upload":"storageUploadFile","text_search":"fullTextSearch","update":"updateARow","upsert":"upsertARow","vector_search":"vectorSearch"}},"supabase_v2":{"namespace":"supabase","methods":{"count":"countRows","delete":"deleteARow","get_row":"getARow","insert":"createARow","introspect":"introspectSchema","invoke_function":"invokeEdgeFunction","query":"getManyRows","rpc":"callRpcFunction","storage_copy":"storageCopyFile","storage_create_bucket":"storageCreateBucket","storage_create_signed_upload_url":"storageCreateSignedUploadUrl","storage_create_signed_url":"storageCreateSignedUrl","storage_delete":"storageDeleteFiles","storage_delete_bucket":"storageDeleteBucket","storage_download":"storageDownloadFile","storage_empty_bucket":"storageEmptyBucket","storage_get_public_url":"storageGetPublicUrl","storage_list":"storageListFiles","storage_list_buckets":"storageListBuckets","storage_move":"storageMoveFile","storage_update_bucket":"storageUpdateBucket","storage_upload":"storageUploadFile","text_search":"fullTextSearch","update":"updateARow","upsert":"upsertARow","vector_search":"vectorSearch"},"params":{"action":{"oauthCredential":"credential"}}},"table":{"namespace":"legacy.table","methods":{"batch_insert_rows":"batchInsertRows","delete_row":"deleteRowById","delete_rows_by_filter":"deleteRowsByFilter","get_row":"getRowById","get_schema":"getSchema","insert_row":"insertRow","query_rows":"queryRows","update_row":"updateRowById","update_rows_by_filter":"updateRowsByFilter","upsert_row":"upsertRow"},"triggers":{"table_new_row":"newRow"}},"table_v2":{"namespace":"table","methods":{"batch_insert_rows":"batchInsertRows","delete_row":"deleteRowById","delete_rows_by_filter":"deleteRowsByFilter","get_row":"getRowById","get_schema":"getSchema","insert_row":"insertRow","query_rows":"queryRows","update_row":"updateRowById","update_rows_by_filter":"updateRowsByFilter","upsert_row":"upsertRow"},"triggers":{"table_new_row":"newRow"}},"tailscale":{"namespace":"legacy.tailscale","methods":{"approve_user":"approveUser","authorize_device":"authorizeDevice","create_auth_key":"createAuthKey","delete_auth_key":"deleteAuthKey","delete_device":"deleteDevice","delete_device_attribute":"deleteDeviceAttribute","delete_user":"deleteUser","expire_device_key":"expireDeviceKey","get_acl":"getAcl","get_auth_key":"getAuthKey","get_device":"getDevice","get_device_attributes":"getDeviceAttributes","get_device_routes":"getDeviceRoutes","get_dns_configuration":"getDnsConfiguration","get_dns_preferences":"getDnsPreferences","get_dns_searchpaths":"getDnsSearchPaths","get_split_dns":"getSplitDns","get_tailnet_settings":"getTailnetSettings","get_user":"getUser","list_auth_keys":"listKeys","list_devices":"listDevices","list_dns_nameservers":"listDnsNameservers","list_users":"listUsers","restore_user":"restoreUser","set_acl":"setAcl","set_device_attribute":"setDeviceAttribute","set_device_name":"setDeviceName","set_device_routes":"setDeviceRoutes","set_device_tags":"setDeviceTags","set_dns_configuration":"setDnsConfiguration","set_dns_nameservers":"setDnsNameservers","set_dns_preferences":"setDnsPreferences","set_dns_searchpaths":"setDnsSearchPaths","set_split_dns":"setSplitDns","set_user_role":"setUserRole","suspend_user":"suspendUser","update_device_key":"updateDeviceKey","update_split_dns":"updateSplitDns","update_tailnet_settings":"updateTailnetSettings","validate_acl":"validateAcl"}},"tailscale_v2":{"namespace":"tailscale","methods":{"approve_user":"approveUser","authorize_device":"authorizeDevice","create_auth_key":"createAuthKey","delete_auth_key":"deleteAuthKey","delete_device":"deleteDevice","delete_device_attribute":"deleteDeviceAttribute","delete_user":"deleteUser","expire_device_key":"expireDeviceKey","get_acl":"getAcl","get_auth_key":"getAuthKey","get_device":"getDevice","get_device_attributes":"getDeviceAttributes","get_device_routes":"getDeviceRoutes","get_dns_configuration":"getDnsConfiguration","get_dns_preferences":"getDnsPreferences","get_dns_searchpaths":"getDnsSearchPaths","get_split_dns":"getSplitDns","get_tailnet_settings":"getTailnetSettings","get_user":"getUser","list_auth_keys":"listKeys","list_devices":"listDevices","list_dns_nameservers":"listDnsNameservers","list_users":"listUsers","restore_user":"restoreUser","set_acl":"setAcl","set_device_attribute":"setDeviceAttribute","set_device_name":"setDeviceName","set_device_routes":"setDeviceRoutes","set_device_tags":"setDeviceTags","set_dns_configuration":"setDnsConfiguration","set_dns_nameservers":"setDnsNameservers","set_dns_preferences":"setDnsPreferences","set_dns_searchpaths":"setDnsSearchPaths","set_split_dns":"setSplitDns","set_user_role":"setUserRole","suspend_user":"suspendUser","update_device_key":"updateDeviceKey","update_split_dns":"updateSplitDns","update_tailnet_settings":"updateTailnetSettings","validate_acl":"validateAcl"},"params":{"action":{"oauthCredential":"credential"}}},"tavily":{"namespace":"legacy.tavily","methods":{"tavily_crawl":"crawlWebsite","tavily_extract":"extractContent","tavily_map":"mapWebsite","tavily_search":"search"}},"tavily_v2":{"namespace":"tavily","methods":{"tavily_crawl":"crawlWebsite","tavily_extract":"extractContent","tavily_map":"mapWebsite","tavily_search":"search"},"params":{"action":{"oauthCredential":"credential"}}},"telegram":{"namespace":"legacy.telegram","methods":{"telegram_copy_message":"copyMessage","telegram_delete_message":"deleteMessage","telegram_edit_message_text":"editMessageText","telegram_forward_message":"forwardMessage","telegram_get_chat":"getChat","telegram_get_chat_member":"getChatMember","telegram_message":"sendMessage","telegram_pin_message":"pinMessage","telegram_send_animation":"sendAnimation","telegram_send_audio":"sendAudio","telegram_send_chat_action":"sendChatAction","telegram_send_contact":"sendContact","telegram_send_document":"sendDocument","telegram_send_location":"sendLocation","telegram_send_photo":"sendPhoto","telegram_send_poll":"sendPoll","telegram_send_video":"sendVideo","telegram_set_message_reaction":"setMessageReaction","telegram_unpin_message":"unpinMessage"},"triggers":{"telegram_webhook":"webhook"}},"telegram_v2":{"namespace":"telegram","methods":{"telegram_copy_message":"copyMessage","telegram_delete_message":"deleteMessage","telegram_edit_message_text":"editMessageText","telegram_forward_message":"forwardMessage","telegram_get_chat":"getChat","telegram_get_chat_member":"getChatMember","telegram_message":"sendMessage","telegram_pin_message":"pinMessage","telegram_send_animation":"sendAnimation","telegram_send_audio":"sendAudio","telegram_send_chat_action":"sendChatAction","telegram_send_contact":"sendContact","telegram_send_document":"sendDocument","telegram_send_location":"sendLocation","telegram_send_photo":"sendPhoto","telegram_send_poll":"sendPoll","telegram_send_video":"sendVideo","telegram_set_message_reaction":"setMessageReaction","telegram_unpin_message":"unpinMessage"},"triggers":{"telegram_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"temporal":{"namespace":"temporal","methods":{"cancel_workflow":"cancelWorkflow","count_workflows":"countWorkflows","create_schedule":"createSchedule","delete_schedule":"deleteSchedule","describe_schedule":"describeSchedule","describe_task_queue":"describeTaskQueue","describe_workflow":"describeWorkflow","get_workflow_history":"getWorkflowHistory","list_schedules":"listSchedules","list_workflows":"listWorkflows","pause_schedule":"pauseSchedule","query_workflow":"queryWorkflow","reset_workflow":"resetWorkflow","signal_with_start":"signalWithStart","signal_workflow":"signalWorkflow","start_workflow":"startWorkflow","terminate_workflow":"terminateWorkflow","trigger_schedule":"triggerSchedule","unpause_schedule":"unpauseSchedule","update_workflow":"updateWorkflow"}},"textract":{"namespace":"legacy.textract"},"textract_v2":{"namespace":"legacy.textractV2","methods":{"analyze_document":"analyzeDocumentTextTablesForms","analyze_expense":"analyzeExpenseInvoicesReceipts","analyze_id":"analyzeIdentityDocument"}},"textract_v3":{"namespace":"textract","methods":{"analyze_document":"analyzeDocumentTextTablesForms","analyze_expense":"analyzeExpenseInvoicesReceipts","analyze_id":"analyzeIdentityDocument"},"params":{"action":{"oauthCredential":"credential"}}},"thinking":{"namespace":"legacy.thinking"},"thrive":{"namespace":"legacy.thrive","methods":{"add_audience_managers":"addAudienceManagers","add_audience_members":"addAudienceMembers","add_user_tags":"addUserTags","create_assignment":"createAssignment","create_audience":"createAudience","create_completion":"createCompletion","create_user":"createUser","delete_assignment":"deleteAssignment","delete_audience":"deleteAudience","delete_user":"deleteUser","get_activity":"getActivity","get_assignment":"getAssignment","get_audience":"getAudience","get_completion":"getCompletion","get_content":"getContent","get_cpd_category":"getCpdCategory","get_cpd_entry":"getCpdEntry","get_cpd_requirement":"getCpdRequirement","get_enrolment":"getEnrolment","get_skill_levels":"getSkillLevels","get_tag":"getTag","get_user_by_id":"getUserById","get_user_by_ref":"getUserByRef","list_assignments":"listAssignments","list_audience_managers":"listAudienceManagers","list_audience_members":"listAudienceMembers","list_audiences":"listAudiences","list_completions":"listCompletions","list_enrolments":"listEnrolments","list_tags":"listTags","query_activities":"queryActivities","query_content":"queryContent","query_cpd_categories":"queryCpdCategories","query_cpd_entries":"queryCpdEntries","query_cpd_requirements":"queryCpdRequirements","query_cpd_user_summaries":"queryCpdUserSummaries","remove_audience_manager":"removeAudienceManager","remove_audience_member":"removeAudienceMember","remove_user_tags":"removeUserTags","replace_audience_managers":"replaceAudienceManagers","replace_audience_members":"replaceAudienceMembers","search_users":"searchUsers","suspend_user":"suspendUser","update_assignment":"updateAssignment","update_audience":"updateAudience","update_user":"updateUser","update_user_skills":"updateUserSkills"}},"thrive_v2":{"namespace":"thrive","methods":{"add_audience_managers":"addAudienceManagers","add_audience_members":"addAudienceMembers","add_user_tags":"addUserTags","create_assignment":"createAssignment","create_audience":"createAudience","create_completion":"createCompletion","create_user":"createUser","delete_assignment":"deleteAssignment","delete_audience":"deleteAudience","delete_user":"deleteUser","get_activity":"getActivity","get_assignment":"getAssignment","get_audience":"getAudience","get_completion":"getCompletion","get_content":"getContent","get_cpd_category":"getCpdCategory","get_cpd_entry":"getCpdEntry","get_cpd_requirement":"getCpdRequirement","get_enrolment":"getEnrolment","get_skill_levels":"getSkillLevels","get_tag":"getTag","get_user_by_id":"getUserById","get_user_by_ref":"getUserByRef","list_assignments":"listAssignments","list_audience_managers":"listAudienceManagers","list_audience_members":"listAudienceMembers","list_audiences":"listAudiences","list_completions":"listCompletions","list_enrolments":"listEnrolments","list_tags":"listTags","query_activities":"queryActivities","query_content":"queryContent","query_cpd_categories":"queryCpdCategories","query_cpd_entries":"queryCpdEntries","query_cpd_requirements":"queryCpdRequirements","query_cpd_user_summaries":"queryCpdUserSummaries","remove_audience_manager":"removeAudienceManager","remove_audience_member":"removeAudienceMember","remove_user_tags":"removeUserTags","replace_audience_managers":"replaceAudienceManagers","replace_audience_members":"replaceAudienceMembers","search_users":"searchUsers","suspend_user":"suspendUser","update_assignment":"updateAssignment","update_audience":"updateAudience","update_user":"updateUser","update_user_skills":"updateUserSkills"},"params":{"action":{"oauthCredential":"credential"}}},"tiktok":{"namespace":"tiktok","methods":{"tiktok_get_post_status":"getPostStatus","tiktok_get_user":"getUserInfo","tiktok_list_videos":"listVideos","tiktok_query_videos":"queryVideos","tiktok_upload_video_draft":"uploadVideoDraft"},"triggers":{"tiktok_authorization_removed":"authorizationRemoved","tiktok_post_inbox_delivered":"postInboxDelivered","tiktok_post_no_longer_public":"postNoLongerPublic","tiktok_post_publicly_available":"postPubliclyAvailable","tiktok_post_publish_complete":"postPublishComplete","tiktok_post_publish_failed":"postPublishFailed"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"tinybird":{"namespace":"legacy.tinybird","methods":{"tinybird_append_datasource":"appendDataSourceFromUrl","tinybird_delete_datasource_rows":"deleteDataSourceRows","tinybird_events":"sendEvents","tinybird_get_job":"getJobStatus","tinybird_query":"query","tinybird_query_pipe":"queryPipeEndpoint","tinybird_truncate_datasource":"truncateDataSource"}},"tinybird_v2":{"namespace":"tinybird","methods":{"tinybird_append_datasource":"appendDataSourceFromUrl","tinybird_delete_datasource_rows":"deleteDataSourceRows","tinybird_events":"sendEvents","tinybird_get_job":"getJobStatus","tinybird_query":"query","tinybird_query_pipe":"queryPipeEndpoint","tinybird_truncate_datasource":"truncateDataSource"},"params":{"action":{"oauthCredential":"credential"}}},"tinyfish":{"namespace":"tinyfish","methods":{"tinyfish_cancel_run":"cancelRun","tinyfish_fetch":"fetchUrls","tinyfish_get_run":"getRun","tinyfish_list_profiles":"listBrowserProfiles","tinyfish_list_runs":"listRuns","tinyfish_list_vault_items":"listVaultItems","tinyfish_run":"runAgent","tinyfish_run_async":"startAgentRun","tinyfish_search":"search"}},"translate":{"namespace":"translate"},"trello":{"namespace":"trello","methods":{"trello_add_checklist":"addChecklist","trello_add_checklist_item":"addChecklistItem","trello_add_comment":"addComment","trello_add_label":"addLabel","trello_add_member":"addMember","trello_create_board":"createBoard","trello_create_card":"createCard","trello_create_list":"createList","trello_delete_card":"deleteCard","trello_get_actions":"getActions","trello_get_board":"getBoard","trello_get_card":"getCard","trello_list_cards":"listCards","trello_list_lists":"getLists","trello_list_members":"listMembers","trello_remove_label":"removeLabel","trello_remove_member":"removeMember","trello_search":"search","trello_update_card":"updateCard","trello_update_checklist_item":"updateChecklistItem","trello_update_list":"updateList"},"params":{"action":{"oauthCredential":"credential"}}},"trigger_dev":{"namespace":"legacy.triggerDev","methods":{"trigger_dev_activate_schedule":"activateSchedule","trigger_dev_add_run_tags":"addRunTags","trigger_dev_batch_trigger_task":"batchTriggerTask","trigger_dev_cancel_run":"cancelRun","trigger_dev_complete_waitpoint_token":"completeWaitpointToken","trigger_dev_create_env_var":"createEnvVar","trigger_dev_create_schedule":"createSchedule","trigger_dev_create_waitpoint_token":"createWaitpointToken","trigger_dev_deactivate_schedule":"deactivateSchedule","trigger_dev_delete_env_var":"deleteEnvVar","trigger_dev_delete_schedule":"deleteSchedule","trigger_dev_execute_query":"executeQuery","trigger_dev_get_batch":"getBatch","trigger_dev_get_batch_results":"getBatchResults","trigger_dev_get_deployment":"getDeployment","trigger_dev_get_env_var":"getEnvVar","trigger_dev_get_latest_deployment":"getLatestDeployment","trigger_dev_get_query_schema":"getQuerySchema","trigger_dev_get_queue":"getQueue","trigger_dev_get_run":"getRun","trigger_dev_get_run_events":"getRunEvents","trigger_dev_get_run_result":"getRunResult","trigger_dev_get_run_trace":"getRunTrace","trigger_dev_get_schedule":"getSchedule","trigger_dev_get_waitpoint_token":"getWaitpointToken","trigger_dev_import_env_vars":"importEnvVars","trigger_dev_list_deployments":"listDeployments","trigger_dev_list_env_vars":"listEnvVars","trigger_dev_list_queues":"listQueues","trigger_dev_list_runs":"listRuns","trigger_dev_list_schedules":"listSchedules","trigger_dev_list_timezones":"listTimezones","trigger_dev_list_waitpoint_tokens":"listWaitpointTokens","trigger_dev_override_queue_concurrency":"overrideQueueConcurrency","trigger_dev_pause_queue":"pauseQueue","trigger_dev_promote_deployment":"promoteDeployment","trigger_dev_replay_run":"replayRun","trigger_dev_reschedule_run":"rescheduleRun","trigger_dev_reset_queue_concurrency":"resetQueueConcurrency","trigger_dev_resume_queue":"resumeQueue","trigger_dev_trigger_task":"triggerTask","trigger_dev_update_env_var":"updateEnvVar","trigger_dev_update_run_metadata":"updateRunMetadata","trigger_dev_update_schedule":"updateSchedule"}},"trigger_dev_v2":{"namespace":"triggerDev","methods":{"trigger_dev_activate_schedule":"activateSchedule","trigger_dev_add_run_tags":"addRunTags","trigger_dev_batch_trigger_task":"batchTriggerTask","trigger_dev_cancel_run":"cancelRun","trigger_dev_complete_waitpoint_token":"completeWaitpointToken","trigger_dev_create_env_var":"createEnvVar","trigger_dev_create_schedule":"createSchedule","trigger_dev_create_waitpoint_token":"createWaitpointToken","trigger_dev_deactivate_schedule":"deactivateSchedule","trigger_dev_delete_env_var":"deleteEnvVar","trigger_dev_delete_schedule":"deleteSchedule","trigger_dev_execute_query":"executeQuery","trigger_dev_get_batch":"getBatch","trigger_dev_get_batch_results":"getBatchResults","trigger_dev_get_deployment":"getDeployment","trigger_dev_get_env_var":"getEnvVar","trigger_dev_get_latest_deployment":"getLatestDeployment","trigger_dev_get_query_schema":"getQuerySchema","trigger_dev_get_queue":"getQueue","trigger_dev_get_run":"getRun","trigger_dev_get_run_events":"getRunEvents","trigger_dev_get_run_result":"getRunResult","trigger_dev_get_run_trace":"getRunTrace","trigger_dev_get_schedule":"getSchedule","trigger_dev_get_waitpoint_token":"getWaitpointToken","trigger_dev_import_env_vars":"importEnvVars","trigger_dev_list_deployments":"listDeployments","trigger_dev_list_env_vars":"listEnvVars","trigger_dev_list_queues":"listQueues","trigger_dev_list_runs":"listRuns","trigger_dev_list_schedules":"listSchedules","trigger_dev_list_timezones":"listTimezones","trigger_dev_list_waitpoint_tokens":"listWaitpointTokens","trigger_dev_override_queue_concurrency":"overrideQueueConcurrency","trigger_dev_pause_queue":"pauseQueue","trigger_dev_promote_deployment":"promoteDeployment","trigger_dev_replay_run":"replayRun","trigger_dev_reschedule_run":"rescheduleRun","trigger_dev_reset_queue_concurrency":"resetQueueConcurrency","trigger_dev_resume_queue":"resumeQueue","trigger_dev_trigger_task":"triggerTask","trigger_dev_update_env_var":"updateEnvVar","trigger_dev_update_run_metadata":"updateRunMetadata","trigger_dev_update_schedule":"updateSchedule"},"params":{"action":{"oauthCredential":"credential"}}},"tts":{"namespace":"tts"},"twilio_sms":{"namespace":"legacy.twilioSms","triggers":{"twilio_sms_received":"received","twilio_sms_status":"status"}},"twilio_sms_v2":{"namespace":"twilioSms","triggers":{"twilio_sms_received":"received","twilio_sms_status":"status"},"params":{"action":{"oauthCredential":"credential"}}},"twilio_voice":{"namespace":"legacy.twilioVoice","methods":{"get_recording":"getRecording","list_calls":"listCalls","make_call":"makeCall"},"triggers":{"twilio_voice_webhook":"webhook"}},"twilio_voice_v2":{"namespace":"twilioVoice","methods":{"get_recording":"getRecording","list_calls":"listCalls","make_call":"makeCall"},"triggers":{"twilio_voice_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"typeform":{"namespace":"legacy.typeform","methods":{"typeform_create_form":"createForm","typeform_delete_form":"deleteForm","typeform_files":"downloadFile","typeform_get_form":"getFormDetails","typeform_insights":"formInsights","typeform_list_forms":"listForms","typeform_responses":"retrieveResponses","typeform_update_form":"updateForm"},"triggers":{"typeform_webhook":"webhook"}},"typeform_v2":{"namespace":"typeform","methods":{"typeform_create_form":"createForm","typeform_delete_form":"deleteForm","typeform_files":"downloadFile","typeform_get_form":"getFormDetails","typeform_insights":"formInsights","typeform_list_forms":"listForms","typeform_responses":"retrieveResponses","typeform_update_form":"updateForm"},"triggers":{"typeform_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"upstash":{"namespace":"legacy.upstash","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","lpush":"lpush","lrange":"lrange","set":"set","setnx":"setnx","ttl":"ttl"}},"upstash_v2":{"namespace":"upstash","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","lpush":"lpush","lrange":"lrange","set":"set","setnx":"setnx","ttl":"ttl"},"params":{"action":{"oauthCredential":"credential"}}},"uptimerobot":{"namespace":"legacy.uptimerobot","methods":{"create_alert_contact":"createAlertContact","create_maintenance_window":"createMaintenanceWindow","create_monitor":"createMonitor","create_psp":"createStatusPage","delete_alert_contact":"deleteAlertContact","delete_maintenance_window":"deleteMaintenanceWindow","delete_monitor":"deleteMonitor","delete_psp":"deleteStatusPage","get_account":"getAccount","get_alert_contact":"getAlertContact","get_incident":"getIncident","get_maintenance_window":"getMaintenanceWindow","get_monitor":"getMonitor","get_psp":"getStatusPage","list_alert_contacts":"listAlertContacts","list_incidents":"listIncidents","list_maintenance_windows":"listMaintenanceWindows","list_monitors":"listMonitors","list_psps":"listStatusPages","pause_monitor":"pauseMonitor","start_monitor":"startMonitor","update_maintenance_window":"updateMaintenanceWindow","update_monitor":"updateMonitor","update_psp":"updateStatusPage"}},"uptimerobot_v2":{"namespace":"uptimerobot","methods":{"create_alert_contact":"createAlertContact","create_maintenance_window":"createMaintenanceWindow","create_monitor":"createMonitor","create_psp":"createStatusPage","delete_alert_contact":"deleteAlertContact","delete_maintenance_window":"deleteMaintenanceWindow","delete_monitor":"deleteMonitor","delete_psp":"deleteStatusPage","get_account":"getAccount","get_alert_contact":"getAlertContact","get_incident":"getIncident","get_maintenance_window":"getMaintenanceWindow","get_monitor":"getMonitor","get_psp":"getStatusPage","list_alert_contacts":"listAlertContacts","list_incidents":"listIncidents","list_maintenance_windows":"listMaintenanceWindows","list_monitors":"listMonitors","list_psps":"listStatusPages","pause_monitor":"pauseMonitor","start_monitor":"startMonitor","update_maintenance_window":"updateMaintenanceWindow","update_monitor":"updateMonitor","update_psp":"updateStatusPage"},"params":{"action":{"oauthCredential":"credential"}}},"vanta":{"namespace":"vanta","methods":{"download_document_file":"downloadDocumentFile","get_control":"getControl","get_document":"getDocument","get_framework":"getFramework","get_person":"getPerson","get_policy":"getPolicy","get_risk_scenario":"getRiskScenario","get_test":"getTest","get_vendor":"getVendor","get_vulnerable_asset":"getVulnerableAsset","list_control_documents":"listControlDocuments","list_control_tests":"listControlTests","list_controls":"listControls","list_document_uploads":"listDocumentUploads","list_documents":"listDocuments","list_framework_controls":"listFrameworkControls","list_frameworks":"listFrameworks","list_monitored_computers":"listMonitoredComputers","list_people":"listPeople","list_policies":"listPolicies","list_risk_scenarios":"listRiskScenarios","list_test_entities":"listTestEntities","list_tests":"listTests","list_vendors":"listVendors","list_vulnerabilities":"listVulnerabilities","list_vulnerability_remediations":"listVulnerabilityRemediations","list_vulnerable_assets":"listVulnerableAssets","submit_document":"submitDocument","upload_document_file":"uploadDocumentFile"},"params":{"action":{"oauthCredential":"credential"}}},"variables":{"namespace":"setVariables"},"vercel":{"namespace":"legacy.vercel","methods":{"add_domain":"addDomain","add_project_domain":"addProjectDomain","cancel_deployment":"cancelDeployment","create_alias":"createAlias","create_check":"createCheck","create_deployment":"createDeployment","create_dns_record":"createDnsRecord","create_edge_config":"createEdgeConfig","create_env_var":"createEnvironmentVariable","create_project":"createProject","create_webhook":"createWebhook","delete_alias":"deleteAlias","delete_deployment":"deleteDeployment","delete_dns_record":"deleteDnsRecord","delete_domain":"deleteDomain","delete_edge_config":"deleteEdgeConfig","delete_env_var":"deleteEnvironmentVariable","delete_project":"deleteProject","delete_webhook":"deleteWebhook","get_alias":"getAlias","get_check":"getCheck","get_deployment":"getDeployment","get_deployment_events":"getDeploymentLogs","get_domain":"getDomain","get_domain_config":"getDomainConfig","get_edge_config":"getEdgeConfig","get_edge_config_items":"getEdgeConfigItems","get_env_vars":"getEnvironmentVariables","get_project":"getProject","get_team":"getTeam","get_user":"getUser","get_webhook":"getWebhook","list_aliases":"listAliases","list_checks":"listChecks","list_deployment_files":"listDeploymentFiles","list_deployments":"listDeployments","list_dns_records":"listDnsRecords","list_domains":"listDomains","list_edge_configs":"listEdgeConfigs","list_project_domains":"listProjectDomains","list_projects":"listProjects","list_team_members":"listTeamMembers","list_teams":"listTeams","list_webhooks":"listWebhooks","pause_project":"pauseProject","promote_deployment":"promoteDeployment","remove_project_domain":"removeProjectDomain","rerequest_check":"rerequestCheck","unpause_project":"unpauseProject","update_check":"updateCheck","update_dns_record":"updateDnsRecord","update_edge_config_items":"updateEdgeConfigItems","update_env_var":"updateEnvironmentVariable","update_project":"updateProject","update_project_domain":"updateProjectDomain","verify_project_domain":"verifyProjectDomain"},"triggers":{"vercel_deployment_canceled":"deploymentCanceled","vercel_deployment_created":"deploymentCreated","vercel_deployment_error":"deploymentError","vercel_deployment_ready":"deploymentReady","vercel_domain_created":"domainCreated","vercel_project_created":"projectCreated","vercel_project_removed":"projectRemoved","vercel_webhook":"webhook"}},"vercel_v2":{"namespace":"vercel","methods":{"add_domain":"addDomain","add_project_domain":"addProjectDomain","cancel_deployment":"cancelDeployment","create_alias":"createAlias","create_check":"createCheck","create_deployment":"createDeployment","create_dns_record":"createDnsRecord","create_edge_config":"createEdgeConfig","create_env_var":"createEnvironmentVariable","create_project":"createProject","create_webhook":"createWebhook","delete_alias":"deleteAlias","delete_deployment":"deleteDeployment","delete_dns_record":"deleteDnsRecord","delete_domain":"deleteDomain","delete_edge_config":"deleteEdgeConfig","delete_env_var":"deleteEnvironmentVariable","delete_project":"deleteProject","delete_webhook":"deleteWebhook","get_alias":"getAlias","get_check":"getCheck","get_deployment":"getDeployment","get_deployment_events":"getDeploymentLogs","get_domain":"getDomain","get_domain_config":"getDomainConfig","get_edge_config":"getEdgeConfig","get_edge_config_items":"getEdgeConfigItems","get_env_vars":"getEnvironmentVariables","get_project":"getProject","get_team":"getTeam","get_user":"getUser","get_webhook":"getWebhook","list_aliases":"listAliases","list_checks":"listChecks","list_deployment_files":"listDeploymentFiles","list_deployments":"listDeployments","list_dns_records":"listDnsRecords","list_domains":"listDomains","list_edge_configs":"listEdgeConfigs","list_project_domains":"listProjectDomains","list_projects":"listProjects","list_team_members":"listTeamMembers","list_teams":"listTeams","list_webhooks":"listWebhooks","pause_project":"pauseProject","promote_deployment":"promoteDeployment","remove_project_domain":"removeProjectDomain","rerequest_check":"rerequestCheck","unpause_project":"unpauseProject","update_check":"updateCheck","update_dns_record":"updateDnsRecord","update_edge_config_items":"updateEdgeConfigItems","update_env_var":"updateEnvironmentVariable","update_project":"updateProject","update_project_domain":"updateProjectDomain","verify_project_domain":"verifyProjectDomain"},"triggers":{"vercel_deployment_canceled":"deploymentCanceled","vercel_deployment_created":"deploymentCreated","vercel_deployment_error":"deploymentError","vercel_deployment_ready":"deploymentReady","vercel_domain_created":"domainCreated","vercel_project_created":"projectCreated","vercel_project_removed":"projectRemoved","vercel_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"video_generator":{"namespace":"legacy.videoGenerator"},"video_generator_v2":{"namespace":"legacy.videoGeneratorV2"},"video_generator_v3":{"namespace":"videoGenerator"},"vision":{"namespace":"legacy.vision"},"vision_v2":{"namespace":"legacy.visionV2"},"wait":{"namespace":"wait"},"wealthbox":{"namespace":"wealthbox","methods":{"read_contact":"readContact","read_note":"readNote","read_task":"readTask","write_contact":"writeContact","write_note":"writeNote","write_task":"writeTask"},"params":{"action":{"oauthCredential":"credential"}}},"webflow":{"namespace":"webflow","methods":{"create":"createItem","delete":"deleteItem","get":"getItem","list":"listItems","update":"updateItem"},"triggers":{"webflow_collection_item_changed":"collectionItemChanged","webflow_collection_item_created":"collectionItemCreated","webflow_collection_item_deleted":"collectionItemDeleted","webflow_form_submission":"formSubmission"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"webhook_request":{"namespace":"webhookRequest"},"whatsapp":{"namespace":"legacy.whatsapp","methods":{"get_media":"downloadMedia","mark_read":"markAsRead","send_interactive":"sendInteractive","send_media":"sendMedia","send_message":"sendMessage","send_reaction":"sendReaction","send_template":"sendTemplate","upload_media":"uploadMedia"},"triggers":{"whatsapp_webhook":"webhook"}},"whatsapp_v2":{"namespace":"whatsapp","methods":{"get_media":"downloadMedia","mark_read":"markAsRead","send_interactive":"sendInteractive","send_media":"sendMedia","send_message":"sendMessage","send_reaction":"sendReaction","send_template":"sendTemplate","upload_media":"uploadMedia"},"triggers":{"whatsapp_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"wikipedia":{"namespace":"wikipedia","methods":{"wikipedia_content":"getPageContent","wikipedia_random":"randomPage","wikipedia_search":"searchPages","wikipedia_summary":"getPageSummary"}},"windchill":{"namespace":"windchill","methods":{"windchill_check_in_document":"checkInDocument","windchill_check_in_documents":"checkInDocuments","windchill_check_out_document":"checkOutDocument","windchill_check_out_documents":"checkOutDocuments","windchill_create_document":"createDocument","windchill_create_documents":"createDocuments","windchill_delete_document":"deleteDocument","windchill_delete_documents":"deleteDocuments","windchill_download_attachment":"downloadAttachment","windchill_download_primary_content":"downloadPrimaryContent","windchill_get_document":"getDocument","windchill_get_document_structure":"getDocumentStructure","windchill_get_primary_content":"getPrimaryContent","windchill_get_valid_state_transitions":"getValidStateTransitions","windchill_list_attachments":"listAttachments","windchill_list_documents":"listDocuments","windchill_revise_document":"reviseDocument","windchill_revise_documents":"reviseDocuments","windchill_set_lifecycle_state":"setLifecycleState","windchill_undo_check_out_document":"undoCheckOutDocument","windchill_undo_check_out_documents":"undoCheckOutDocuments","windchill_update_common_properties":"updateCommonProperties","windchill_update_document":"updateDocument","windchill_update_document_security_labels":"updateDocumentSecurityLabels","windchill_update_documents":"updateDocuments","windchill_upload_attachments":"uploadAttachments","windchill_upload_primary_content":"uploadPrimaryContent"}},"wiza":{"namespace":"wiza","methods":{"company_enrichment":"companyEnrichment","get_credits":"getCredits","individual_reveal":"individualReveal","prospect_search":"prospectSearch"}},"wordpress":{"namespace":"wordpress","methods":{"wordpress_create_category":"createCategory","wordpress_create_comment":"createComment","wordpress_create_page":"createPage","wordpress_create_post":"createPost","wordpress_create_tag":"createTag","wordpress_delete_category":"deleteCategory","wordpress_delete_comment":"deleteComment","wordpress_delete_media":"deleteMedia","wordpress_delete_page":"deletePage","wordpress_delete_post":"deletePost","wordpress_delete_tag":"deleteTag","wordpress_get_category":"getCategory","wordpress_get_current_user":"getCurrentUser","wordpress_get_media":"getMedia","wordpress_get_page":"getPage","wordpress_get_post":"getPost","wordpress_get_tag":"getTag","wordpress_get_user":"getUser","wordpress_list_categories":"listCategories","wordpress_list_comments":"listComments","wordpress_list_media":"listMedia","wordpress_list_pages":"listPages","wordpress_list_posts":"listPosts","wordpress_list_tags":"listTags","wordpress_list_users":"listUsers","wordpress_search_content":"searchContent","wordpress_update_category":"updateCategory","wordpress_update_comment":"updateComment","wordpress_update_page":"updatePage","wordpress_update_post":"updatePost","wordpress_update_tag":"updateTag","wordpress_upload_media":"uploadMedia"},"params":{"action":{"oauthCredential":"credential"}}},"workday":{"namespace":"workday","methods":{"assign_onboarding":"assignOnboardingPlan","change_job":"changeJob","create_prehire":"createPreHire","get_compensation":"getCompensation","get_organizations":"getOrganizations","get_worker":"getWorker","hire_employee":"hireEmployee","list_workers":"listWorkers","terminate_worker":"terminateWorker","update_worker":"updatePersonalInformation"}},"workflow":{"namespace":"legacy.workflow"},"workflow_input":{"namespace":"runWorkflow"},"x":{"namespace":"x","methods":{"x_create_bookmark":"createBookmark","x_create_tweet":"createTweet","x_delete_bookmark":"deleteBookmark","x_delete_tweet":"deleteTweet","x_get_blocking":"getBlockedUsers","x_get_bookmarks":"getBookmarks","x_get_followers":"getFollowers","x_get_following":"getFollowing","x_get_liked_tweets":"getLikedTweets","x_get_liking_users":"getLikingUsers","x_get_me":"getMyProfile","x_get_personalized_trends":"getPersonalizedTrends","x_get_quote_tweets":"getQuoteTweets","x_get_retweeted_by":"getRetweetedBy","x_get_trends_by_woeid":"getTrendsByLocation","x_get_tweets_by_ids":"getTweetsByIds","x_get_usage":"getApiUsage","x_get_user_mentions":"getUserMentions","x_get_user_timeline":"getUserTimeline","x_get_user_tweets":"getUserTweets","x_hide_reply":"hideReply","x_manage_block":"blockUnblock","x_manage_follow":"followUnfollow","x_manage_like":"likeUnlike","x_manage_mute":"muteUnmute","x_manage_retweet":"retweetUnretweet","x_search_tweets":"searchTweets","x_search_users":"searchUsers"},"params":{"action":{"oauthCredential":"credential"}}},"youcom":{"namespace":"legacy.youcom","methods":{"youcom_answer":"answer","youcom_finance_research":"financeResearch","youcom_get_account_balance":"getAccountBalance","youcom_get_contents":"getContents","youcom_get_research_task":"getResearchTask","youcom_research":"research","youcom_search":"search","youcom_search_images":"searchImages"}},"youcom_v2":{"namespace":"youcom","methods":{"youcom_answer":"answer","youcom_finance_research":"financeResearch","youcom_get_account_balance":"getAccountBalance","youcom_get_contents":"getContents","youcom_get_research_task":"getResearchTask","youcom_research":"research","youcom_search":"search","youcom_search_images":"searchImages"},"params":{"action":{"oauthCredential":"credential"}}},"youtube":{"namespace":"legacy.youtube","methods":{"youtube_channel_info":"getChannelInfo","youtube_channel_playlists":"getChannelPlaylists","youtube_channel_videos":"getChannelVideos","youtube_comments":"getVideoComments","youtube_playlist_items":"getPlaylistItems","youtube_search":"searchVideos","youtube_trending":"getTrendingVideos","youtube_video_categories":"getVideoCategories","youtube_video_details":"getVideoDetails"}},"youtube_v2":{"namespace":"youtube","methods":{"youtube_channel_info":"getChannelInfo","youtube_channel_playlists":"getChannelPlaylists","youtube_channel_videos":"getChannelVideos","youtube_comments":"getVideoComments","youtube_playlist_items":"getPlaylistItems","youtube_search":"searchVideos","youtube_trending":"getTrendingVideos","youtube_video_categories":"getVideoCategories","youtube_video_details":"getVideoDetails"},"params":{"action":{"oauthCredential":"credential"}}},"zendesk":{"namespace":"legacy.zendesk","methods":{"autocomplete_organizations":"autocompleteOrganizations","create_organization":"createOrganization","create_organizations_bulk":"createOrganizationsBulk","create_ticket":"createTicket","create_tickets_bulk":"createTicketsBulk","create_user":"createUser","create_users_bulk":"createUsersBulk","delete_organization":"deleteOrganization","delete_ticket":"deleteTicket","delete_user":"deleteUser","get_current_user":"getCurrentUser","get_organization":"getOrganization","get_organizations":"getOrganizations","get_ticket":"getTicket","get_tickets":"getTickets","get_user":"getUser","get_users":"getUsers","merge_tickets":"mergeTickets","search":"search","search_count":"searchCount","search_users":"searchUsers","update_organization":"updateOrganization","update_ticket":"updateTicket","update_tickets_bulk":"updateTicketsBulk","update_user":"updateUser","update_users_bulk":"updateUsersBulk"},"triggers":{"zendesk_ticket_comment_added":"ticketCommentAdded","zendesk_ticket_created":"ticketCreated","zendesk_ticket_priority_changed":"ticketPriorityChanged","zendesk_ticket_status_changed":"ticketStatusChanged","zendesk_webhook":"webhook"}},"zendesk_v2":{"namespace":"zendesk","methods":{"autocomplete_organizations":"autocompleteOrganizations","create_organization":"createOrganization","create_organizations_bulk":"createOrganizationsBulk","create_ticket":"createTicket","create_tickets_bulk":"createTicketsBulk","create_user":"createUser","create_users_bulk":"createUsersBulk","delete_organization":"deleteOrganization","delete_ticket":"deleteTicket","delete_user":"deleteUser","get_current_user":"getCurrentUser","get_organization":"getOrganization","get_organizations":"getOrganizations","get_ticket":"getTicket","get_tickets":"getTickets","get_user":"getUser","get_users":"getUsers","merge_tickets":"mergeTickets","search":"search","search_count":"searchCount","search_users":"searchUsers","update_organization":"updateOrganization","update_ticket":"updateTicket","update_tickets_bulk":"updateTicketsBulk","update_user":"updateUser","update_users_bulk":"updateUsersBulk"},"triggers":{"zendesk_ticket_comment_added":"ticketCommentAdded","zendesk_ticket_created":"ticketCreated","zendesk_ticket_priority_changed":"ticketPriorityChanged","zendesk_ticket_status_changed":"ticketStatusChanged","zendesk_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"zep":{"namespace":"legacy.zep","methods":{"add_messages":"addMessages","add_user":"addUser","create_thread":"createThread","delete_thread":"deleteThread","get_context":"getContext","get_messages":"getMessages","get_threads":"getThreads","get_user":"getUser","get_user_threads":"getUserThreads"}},"zep_v2":{"namespace":"zep","methods":{"add_messages":"addMessages","add_user":"addUser","create_thread":"createThread","delete_thread":"deleteThread","get_context":"getContext","get_messages":"getMessages","get_threads":"getThreads","get_user":"getUser","get_user_threads":"getUserThreads"},"params":{"action":{"oauthCredential":"credential"}}},"zerobounce":{"namespace":"zerobounce","methods":{"zerobounce_get_credits":"getRemainingCredits","zerobounce_verify_email":"verifyEmail"}},"zoho_desk":{"namespace":"zohoDesk","methods":{"add_comment":"addComment","create_account":"createAccount","create_contact":"createContact","create_ticket":"createTicket","delete_comment":"deleteComment","get_account":"getAccount","get_agent":"getAgent","get_attachment":"getAttachment","get_comment":"getComment","get_contact":"getContact","get_department":"getDepartment","get_thread":"getThread","get_ticket":"getTicket","list_accounts":"listAccounts","list_agents":"listAgents","list_comments":"listComments","list_contacts":"listContacts","list_departments":"listDepartments","list_organizations":"listOrganizations","list_threads":"listThreads","list_tickets":"listTickets","move_ticket":"moveTicket","search_accounts":"searchAccounts","search_contacts":"searchContacts","search_tickets":"searchTickets","send_reply":"sendReply","update_account":"updateAccount","update_comment":"updateComment","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"zoho_desk":"zohoDesk"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"zoom":{"namespace":"zoom","methods":{"zoom_create_meeting":"createMeeting","zoom_delete_meeting":"deleteMeeting","zoom_delete_recording":"deleteRecording","zoom_get_meeting":"getMeeting","zoom_get_meeting_invitation":"getMeetingInvitation","zoom_get_meeting_recordings":"getMeetingRecordings","zoom_list_meetings":"listMeetings","zoom_list_past_participants":"listPastParticipants","zoom_list_recordings":"listRecordings","zoom_update_meeting":"updateMeeting"},"triggers":{"zoom_meeting_ended":"meetingEnded","zoom_meeting_started":"meetingStarted","zoom_participant_joined":"participantJoined","zoom_participant_left":"participantLeft","zoom_recording_completed":"recordingCompleted","zoom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"zoominfo":{"namespace":"legacy.zoominfo","methods":{"enrich_companies":"enrichCompanies","enrich_contacts":"enrichContacts","search_companies":"searchCompanies","search_contacts":"searchContacts","search_intent":"searchIntent","search_news":"searchNews"}},"zoominfo_v2":{"namespace":"zoominfo","methods":{"enrich_companies":"enrichCompanies","enrich_contacts":"enrichContacts","search_companies":"searchCompanies","search_contacts":"searchContacts","search_intent":"searchIntent","search_news":"searchNews"},"params":{"action":{"oauthCredential":"credential"}}}}}' +) diff --git a/apps/sim/blocks/sdk-names.json b/apps/sim/blocks/sdk-names.json new file mode 100644 index 00000000000..4509e5daec1 --- /dev/null +++ b/apps/sim/blocks/sdk-names.json @@ -0,0 +1,14455 @@ +{ + "version": 1, + "blocks": { + "a2a": { + "namespace": "a2a", + "methods": { + "a2a_cancel_task": "cancelTask", + "a2a_get_agent_card": "getAgentCard", + "a2a_get_task": "getTask", + "a2a_send_message": "sendMessage" + } + }, + "affinity": { + "namespace": "legacy.affinity", + "methods": { + "batch_update_entity_fields": "batchUpdateEntityFields", + "batch_update_list_entry_fields": "batchUpdateListEntryFields", + "create_list": "createList", + "create_list_field_dropdown_option": "createListFieldDropdownOption", + "create_merge": "createMerge", + "create_note": "createNote", + "create_reminder": "createReminder", + "delete_list_field_dropdown_option": "deleteListFieldDropdownOption", + "delete_note": "deleteNote", + "get_company": "getCompany", + "get_current_user": "getCurrentUser", + "get_entity_field_value": "getEntityFieldValue", + "get_list": "getList", + "get_list_entry": "getListEntry", + "get_list_entry_field": "getListEntryField", + "get_list_field_dropdown_option": "getListFieldDropdownOption", + "get_merge": "getMerge", + "get_merge_task": "getMergeTask", + "get_note": "getNote", + "get_opportunity": "getOpportunity", + "get_person": "getPerson", + "get_saved_view": "getSavedView", + "get_transcript": "getTranscript", + "get_user": "getUser", + "list_calls": "listCalls", + "list_chat_messages": "listChatMessages", + "list_companies": "listCompanies", + "list_coworker_connections": "listCoworkerConnections", + "list_emails": "listEmails", + "list_entity_field_values": "listEntityFieldValues", + "list_entity_list_entries": "listRowsHoldingEntity", + "list_entity_lists": "listListsHoldingEntity", + "list_entity_notes": "listNotesOnEntity", + "list_entity_relationships": "listEntityRelationships", + "list_field_dropdown_options": "listFieldDropdownOptions", + "list_field_metadata": "listFieldMetadata", + "list_field_value_changes": "listFieldValueChanges", + "list_investor_executive_connections": "listInvestorExecutiveConnections", + "list_list_entries": "listListEntries", + "list_list_entry_field_value_changes": "listListEntryFieldValueChanges", + "list_list_entry_fields": "listListEntryFields", + "list_list_field_dropdown_options": "listListFieldDropdownOptions", + "list_list_fields": "listListFields", + "list_lists": "listLists", + "list_meetings": "listMeetings", + "list_merge_tasks": "listMergeTasks", + "list_merges": "listMerges", + "list_note_attached_companies": "listNoteAttachedCompanies", + "list_note_attached_opportunities": "listNoteAttachedOpportunities", + "list_note_attached_persons": "listNoteAttachedPeople", + "list_note_replies": "listNoteReplies", + "list_notes": "listNotes", + "list_opportunities": "listOpportunities", + "list_persons": "listPeople", + "list_reminders": "listReminders", + "list_saved_view_entries": "listSavedViewEntries", + "list_saved_views": "listSavedViews", + "list_transcript_fragments": "listTranscriptFragments", + "list_transcripts": "listTranscripts", + "list_users": "listUsers", + "search_companies": "searchCompanies", + "search_files": "searchFiles", + "search_list_entries": "searchListEntries", + "search_notes": "searchNotes", + "search_persons": "searchPeople", + "semantic_search": "semanticSearch", + "update_entity_field_value": "updateEntityFieldValue", + "update_list_entry_field": "updateListEntryField", + "update_list_field_dropdown_option": "updateListFieldDropdownOption", + "update_note": "updateNote" + } + }, + "affinity_v2": { + "namespace": "affinity", + "methods": { + "batch_update_entity_fields": "batchUpdateEntityFields", + "batch_update_list_entry_fields": "batchUpdateListEntryFields", + "create_list": "createList", + "create_list_field_dropdown_option": "createListFieldDropdownOption", + "create_merge": "createMerge", + "create_note": "createNote", + "create_reminder": "createReminder", + "delete_list_field_dropdown_option": "deleteListFieldDropdownOption", + "delete_note": "deleteNote", + "get_company": "getCompany", + "get_current_user": "getCurrentUser", + "get_entity_field_value": "getEntityFieldValue", + "get_list": "getList", + "get_list_entry": "getListEntry", + "get_list_entry_field": "getListEntryField", + "get_list_field_dropdown_option": "getListFieldDropdownOption", + "get_merge": "getMerge", + "get_merge_task": "getMergeTask", + "get_note": "getNote", + "get_opportunity": "getOpportunity", + "get_person": "getPerson", + "get_saved_view": "getSavedView", + "get_transcript": "getTranscript", + "get_user": "getUser", + "list_calls": "listCalls", + "list_chat_messages": "listChatMessages", + "list_companies": "listCompanies", + "list_coworker_connections": "listCoworkerConnections", + "list_emails": "listEmails", + "list_entity_field_values": "listEntityFieldValues", + "list_entity_list_entries": "listRowsHoldingEntity", + "list_entity_lists": "listListsHoldingEntity", + "list_entity_notes": "listNotesOnEntity", + "list_entity_relationships": "listEntityRelationships", + "list_field_dropdown_options": "listFieldDropdownOptions", + "list_field_metadata": "listFieldMetadata", + "list_field_value_changes": "listFieldValueChanges", + "list_investor_executive_connections": "listInvestorExecutiveConnections", + "list_list_entries": "listListEntries", + "list_list_entry_field_value_changes": "listListEntryFieldValueChanges", + "list_list_entry_fields": "listListEntryFields", + "list_list_field_dropdown_options": "listListFieldDropdownOptions", + "list_list_fields": "listListFields", + "list_lists": "listLists", + "list_meetings": "listMeetings", + "list_merge_tasks": "listMergeTasks", + "list_merges": "listMerges", + "list_note_attached_companies": "listNoteAttachedCompanies", + "list_note_attached_opportunities": "listNoteAttachedOpportunities", + "list_note_attached_persons": "listNoteAttachedPeople", + "list_note_replies": "listNoteReplies", + "list_notes": "listNotes", + "list_opportunities": "listOpportunities", + "list_persons": "listPeople", + "list_reminders": "listReminders", + "list_saved_view_entries": "listSavedViewEntries", + "list_saved_views": "listSavedViews", + "list_transcript_fragments": "listTranscriptFragments", + "list_transcripts": "listTranscripts", + "list_users": "listUsers", + "search_companies": "searchCompanies", + "search_files": "searchFiles", + "search_list_entries": "searchListEntries", + "search_notes": "searchNotes", + "search_persons": "searchPeople", + "semantic_search": "semanticSearch", + "update_entity_field_value": "updateEntityFieldValue", + "update_list_entry_field": "updateListEntryField", + "update_list_field_dropdown_option": "updateListFieldDropdownOption", + "update_note": "updateNote" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "agent": { + "namespace": "agent" + }, + "agentmail": { + "namespace": "legacy.agentmail", + "methods": { + "create_draft": "createDraft", + "create_inbox": "createInbox", + "delete_draft": "deleteDraft", + "delete_inbox": "deleteInbox", + "delete_thread": "deleteThread", + "forward_message": "forwardMessage", + "get_draft": "getDraft", + "get_inbox": "getInbox", + "get_message": "getMessage", + "get_thread": "getThread", + "list_drafts": "listDrafts", + "list_inboxes": "listInboxes", + "list_messages": "listMessages", + "list_threads": "listThreads", + "reply_message": "replyToMessage", + "send_draft": "sendDraft", + "send_message": "sendMessage", + "update_draft": "updateDraft", + "update_inbox": "updateInbox", + "update_message": "updateMessageLabels", + "update_thread": "updateThreadLabels" + } + }, + "agentmail_v2": { + "namespace": "agentmail", + "methods": { + "create_draft": "createDraft", + "create_inbox": "createInbox", + "delete_draft": "deleteDraft", + "delete_inbox": "deleteInbox", + "delete_thread": "deleteThread", + "forward_message": "forwardMessage", + "get_draft": "getDraft", + "get_inbox": "getInbox", + "get_message": "getMessage", + "get_thread": "getThread", + "list_drafts": "listDrafts", + "list_inboxes": "listInboxes", + "list_messages": "listMessages", + "list_threads": "listThreads", + "reply_message": "replyToMessage", + "send_draft": "sendDraft", + "send_message": "sendMessage", + "update_draft": "updateDraft", + "update_inbox": "updateInbox", + "update_message": "updateMessageLabels", + "update_thread": "updateThreadLabels" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "agentphone": { + "namespace": "legacy.agentphone", + "methods": { + "create_call": "createCall", + "create_contact": "createContact", + "create_number": "createNumber", + "delete_contact": "deleteContact", + "get_call": "getCall", + "get_call_transcript": "getCallTranscript", + "get_contact": "getContact", + "get_conversation": "getConversation", + "get_conversation_messages": "getConversationMessages", + "get_number_messages": "getNumberMessages", + "get_usage": "getUsage", + "get_usage_daily": "getDailyUsage", + "get_usage_monthly": "getMonthlyUsage", + "list_calls": "listCalls", + "list_contacts": "listContacts", + "list_conversations": "listConversations", + "list_numbers": "listNumbers", + "react_to_message": "reactToMessage", + "release_number": "releaseNumber", + "send_message": "sendMessage", + "update_contact": "updateContact", + "update_conversation": "updateConversation" + } + }, + "agentphone_v2": { + "namespace": "agentphone", + "methods": { + "create_call": "createCall", + "create_contact": "createContact", + "create_number": "createNumber", + "delete_contact": "deleteContact", + "get_call": "getCall", + "get_call_transcript": "getCallTranscript", + "get_contact": "getContact", + "get_conversation": "getConversation", + "get_conversation_messages": "getConversationMessages", + "get_number_messages": "getNumberMessages", + "get_usage": "getUsage", + "get_usage_daily": "getDailyUsage", + "get_usage_monthly": "getMonthlyUsage", + "list_calls": "listCalls", + "list_contacts": "listContacts", + "list_conversations": "listConversations", + "list_numbers": "listNumbers", + "react_to_message": "reactToMessage", + "release_number": "releaseNumber", + "send_message": "sendMessage", + "update_contact": "updateContact", + "update_conversation": "updateConversation" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "agiloft": { + "namespace": "agiloft", + "methods": { + "async_status": "asyncStatus", + "attach_file": "attachFile", + "attachment_info": "attachmentInfo", + "create_record": "createRecord", + "delete_record": "deleteRecord", + "get_choice_line_id": "getChoiceLineId", + "list_tables": "listTablesFields", + "lock_record": "lockRecord", + "nlp_search": "naturalLanguageSearch", + "read_record": "readRecord", + "remove_attachment": "removeAttachment", + "retrieve_attachment": "retrieveAttachment", + "run_action_button": "runActionButton", + "saved_search": "savedSearch", + "search_records": "searchRecords", + "select_records": "selectRecords", + "update_record": "updateRecord", + "upsert_record": "upsertRecord" + } + }, + "ahrefs": { + "namespace": "legacy.ahrefs", + "methods": { + "ahrefs_anchors": "anchors", + "ahrefs_backlinks": "backlinks", + "ahrefs_backlinks_stats": "backlinksStats", + "ahrefs_batch_analysis": "batchAnalysis", + "ahrefs_broken_backlinks": "brokenBacklinks", + "ahrefs_domain_rating": "domainRating", + "ahrefs_domain_rating_history": "domainRatingHistory", + "ahrefs_keyword_overview": "keywordOverview", + "ahrefs_keywords_history": "keywordsHistory", + "ahrefs_metrics": "metricsOverview", + "ahrefs_metrics_history": "metricsHistory", + "ahrefs_organic_competitors": "organicCompetitors", + "ahrefs_organic_keywords": "organicKeywords", + "ahrefs_paid_pages": "paidPages", + "ahrefs_rank_tracker_competitors_overview": "rankTrackerCompetitorsOverview", + "ahrefs_rank_tracker_competitors_stats": "rankTrackerCompetitorsStats", + "ahrefs_rank_tracker_overview": "rankTrackerOverview", + "ahrefs_rank_tracker_serp_overview": "rankTrackerSerpOverview", + "ahrefs_refdomains_history": "referringDomainsHistory", + "ahrefs_referring_domains": "referringDomains", + "ahrefs_related_terms": "relatedTerms", + "ahrefs_site_audit_page_explorer": "siteAuditPageExplorer", + "ahrefs_top_pages": "topPages" + } + }, + "ahrefs_v2": { + "namespace": "ahrefs", + "methods": { + "ahrefs_anchors": "anchors", + "ahrefs_backlinks": "backlinks", + "ahrefs_backlinks_stats": "backlinksStats", + "ahrefs_batch_analysis": "batchAnalysis", + "ahrefs_broken_backlinks": "brokenBacklinks", + "ahrefs_domain_rating": "domainRating", + "ahrefs_domain_rating_history": "domainRatingHistory", + "ahrefs_keyword_overview": "keywordOverview", + "ahrefs_keywords_history": "keywordsHistory", + "ahrefs_metrics": "metricsOverview", + "ahrefs_metrics_history": "metricsHistory", + "ahrefs_organic_competitors": "organicCompetitors", + "ahrefs_organic_keywords": "organicKeywords", + "ahrefs_paid_pages": "paidPages", + "ahrefs_rank_tracker_competitors_overview": "rankTrackerCompetitorsOverview", + "ahrefs_rank_tracker_competitors_stats": "rankTrackerCompetitorsStats", + "ahrefs_rank_tracker_overview": "rankTrackerOverview", + "ahrefs_rank_tracker_serp_overview": "rankTrackerSerpOverview", + "ahrefs_refdomains_history": "referringDomainsHistory", + "ahrefs_referring_domains": "referringDomains", + "ahrefs_related_terms": "relatedTerms", + "ahrefs_site_audit_page_explorer": "siteAuditPageExplorer", + "ahrefs_top_pages": "topPages" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "airtable": { + "namespace": "airtable", + "methods": { + "create": "createRecords", + "delete": "deleteRecords", + "get": "getRecord", + "getSchema": "getBaseSchema", + "list": "listRecords", + "listBases": "listBases", + "listTables": "listTables", + "update": "updateRecord", + "updateMultiple": "updateMultipleRecords", + "upsert": "upsertRecords" + }, + "triggers": { + "airtable_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "triggerCredentials": "credential" + } + } + }, + "algolia": { + "namespace": "legacy.algolia", + "methods": { + "add_record": "addRecord", + "batch_operations": "batchOperations", + "browse_records": "browseRecords", + "clear_records": "clearRecords", + "copy_move_index": "copyMoveIndex", + "delete_by_filter": "deleteByFilter", + "delete_index": "deleteIndex", + "delete_record": "deleteRecord", + "get_record": "getRecord", + "get_records": "getRecords", + "get_settings": "getSettings", + "get_task_status": "getTaskStatus", + "list_indices": "listIndices", + "partial_update_record": "partialUpdateRecord", + "search": "search", + "update_settings": "updateSettings" + } + }, + "algolia_v2": { + "namespace": "algolia", + "methods": { + "add_record": "addRecord", + "batch_operations": "batchOperations", + "browse_records": "browseRecords", + "clear_records": "clearRecords", + "copy_move_index": "copyMoveIndex", + "delete_by_filter": "deleteByFilter", + "delete_index": "deleteIndex", + "delete_record": "deleteRecord", + "get_record": "getRecord", + "get_records": "getRecords", + "get_settings": "getSettings", + "get_task_status": "getTaskStatus", + "list_indices": "listIndices", + "partial_update_record": "partialUpdateRecord", + "search": "search", + "update_settings": "updateSettings" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "amplitude": { + "namespace": "legacy.amplitude", + "methods": { + "event_segmentation": "eventSegmentation", + "funnels": "funnels", + "get_active_users": "getActiveUsers", + "get_revenue": "getRevenue", + "group_identify": "groupIdentify", + "identify_user": "identifyUser", + "list_events": "listEvents", + "realtime_active_users": "realTimeActiveUsers", + "retention": "retention", + "send_event": "sendEvent", + "user_activity": "userActivity", + "user_profile": "userProfile", + "user_search": "userSearch" + } + }, + "amplitude_v2": { + "namespace": "amplitude", + "methods": { + "event_segmentation": "eventSegmentation", + "funnels": "funnels", + "get_active_users": "getActiveUsers", + "get_revenue": "getRevenue", + "group_identify": "groupIdentify", + "identify_user": "identifyUser", + "list_events": "listEvents", + "realtime_active_users": "realTimeActiveUsers", + "retention": "retention", + "send_event": "sendEvent", + "user_activity": "userActivity", + "user_profile": "userProfile", + "user_search": "userSearch" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "api": { + "namespace": "api" + }, + "api_trigger": { + "namespace": "legacy.apiTrigger" + }, + "apify": { + "namespace": "legacy.apify", + "methods": { + "apify_get_dataset_items": "getDatasetItems", + "apify_get_run": "getRun", + "apify_run_actor_async": "runActorAsync", + "apify_run_actor_sync": "runActor", + "apify_run_task": "runTask" + } + }, + "apify_v2": { + "namespace": "apify", + "methods": { + "apify_get_dataset_items": "getDatasetItems", + "apify_get_run": "getRun", + "apify_run_actor_async": "runActorAsync", + "apify_run_actor_sync": "runActor", + "apify_run_task": "runTask" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "apollo": { + "namespace": "legacy.apollo", + "methods": { + "account_bulk_create": "bulkCreateAccounts", + "account_bulk_update": "bulkUpdateAccounts", + "account_create": "createAccount", + "account_search": "searchAccounts", + "account_update": "updateAccount", + "contact_bulk_create": "bulkCreateContacts", + "contact_bulk_update": "bulkUpdateContacts", + "contact_create": "createContact", + "contact_search": "searchContacts", + "contact_update": "updateContact", + "email_accounts": "getEmailAccounts", + "opportunity_create": "createOpportunity", + "opportunity_get": "getOpportunity", + "opportunity_search": "searchOpportunities", + "opportunity_update": "updateOpportunity", + "organization_bulk_enrich": "bulkEnrichOrganizations", + "organization_enrich": "enrichOrganization", + "organization_search": "searchOrganizations", + "people_bulk_enrich": "bulkEnrichPeople", + "people_enrich": "enrichPerson", + "people_search": "searchPeople", + "sequence_add": "addToSequence", + "sequence_search": "searchSequences", + "task_create": "createTask", + "task_search": "searchTasks" + } + }, + "apollo_v2": { + "namespace": "apollo", + "methods": { + "account_bulk_create": "bulkCreateAccounts", + "account_bulk_update": "bulkUpdateAccounts", + "account_create": "createAccount", + "account_search": "searchAccounts", + "account_update": "updateAccount", + "contact_bulk_create": "bulkCreateContacts", + "contact_bulk_update": "bulkUpdateContacts", + "contact_create": "createContact", + "contact_search": "searchContacts", + "contact_update": "updateContact", + "email_accounts": "getEmailAccounts", + "opportunity_create": "createOpportunity", + "opportunity_get": "getOpportunity", + "opportunity_search": "searchOpportunities", + "opportunity_update": "updateOpportunity", + "organization_bulk_enrich": "bulkEnrichOrganizations", + "organization_enrich": "enrichOrganization", + "organization_search": "searchOrganizations", + "people_bulk_enrich": "bulkEnrichPeople", + "people_enrich": "enrichPerson", + "people_search": "searchPeople", + "sequence_add": "addToSequence", + "sequence_search": "searchSequences", + "task_create": "createTask", + "task_search": "searchTasks" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "appconfig": { + "namespace": "legacy.appconfig", + "methods": { + "create_application": "createApplication", + "create_configuration_profile": "createConfigurationProfile", + "create_environment": "createEnvironment", + "create_hosted_configuration_version": "createHostedConfigurationVersion", + "delete_application": "deleteApplication", + "delete_configuration_profile": "deleteConfigurationProfile", + "delete_environment": "deleteEnvironment", + "delete_hosted_configuration_version": "deleteHostedConfigurationVersion", + "get_application": "getApplication", + "get_configuration": "getConfiguration", + "get_configuration_profile": "getConfigurationProfile", + "get_deployment": "getDeployment", + "get_environment": "getEnvironment", + "get_hosted_configuration_version": "getHostedConfigurationVersion", + "list_applications": "listApplications", + "list_configuration_profiles": "listConfigurationProfiles", + "list_deployment_strategies": "listDeploymentStrategies", + "list_deployments": "listDeployments", + "list_environments": "listEnvironments", + "list_hosted_configuration_versions": "listHostedConfigurationVersions", + "start_deployment": "startDeployment", + "stop_deployment": "stopDeployment", + "update_application": "updateApplication", + "update_configuration_profile": "updateConfigurationProfile", + "update_environment": "updateEnvironment" + } + }, + "appconfig_v2": { + "namespace": "appconfig", + "methods": { + "create_application": "createApplication", + "create_configuration_profile": "createConfigurationProfile", + "create_environment": "createEnvironment", + "create_hosted_configuration_version": "createHostedConfigurationVersion", + "delete_application": "deleteApplication", + "delete_configuration_profile": "deleteConfigurationProfile", + "delete_environment": "deleteEnvironment", + "delete_hosted_configuration_version": "deleteHostedConfigurationVersion", + "get_application": "getApplication", + "get_configuration": "getConfiguration", + "get_configuration_profile": "getConfigurationProfile", + "get_deployment": "getDeployment", + "get_environment": "getEnvironment", + "get_hosted_configuration_version": "getHostedConfigurationVersion", + "list_applications": "listApplications", + "list_configuration_profiles": "listConfigurationProfiles", + "list_deployment_strategies": "listDeploymentStrategies", + "list_deployments": "listDeployments", + "list_environments": "listEnvironments", + "list_hosted_configuration_versions": "listHostedConfigurationVersions", + "start_deployment": "startDeployment", + "stop_deployment": "stopDeployment", + "update_application": "updateApplication", + "update_configuration_profile": "updateConfigurationProfile", + "update_environment": "updateEnvironment" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "arxiv": { + "namespace": "arxiv", + "methods": { + "arxiv_get_author_papers": "getAuthorPapers", + "arxiv_get_paper": "getPaperDetails", + "arxiv_search": "searchPapers" + } + }, + "asana": { + "namespace": "asana", + "methods": { + "add_comment": "addComment", + "add_followers": "addFollowers", + "create_project": "createProject", + "create_section": "createSection", + "create_subtask": "createSubtask", + "create_task": "createTask", + "delete_task": "deleteTask", + "get_project": "getProject", + "get_projects": "getProjects", + "get_task": "getTask", + "list_sections": "listSections", + "list_workspaces": "listWorkspaces", + "search_tasks": "searchTasks", + "update_task": "updateTask" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "ashby": { + "namespace": "legacy.ashby", + "methods": { + "add_candidate_tag": "addCandidateTag", + "anonymize_candidate": "anonymizeCandidate", + "change_application_source": "changeApplicationSource", + "change_application_stage": "changeApplicationStage", + "create_application": "createApplication", + "create_candidate": "createCandidate", + "create_note": "createNote", + "delete_application": "deleteApplication", + "get_application": "getApplication", + "get_candidate": "getCandidate", + "get_job": "getJob", + "get_job_posting": "getJobPosting", + "get_offer": "getOffer", + "get_opening": "getOpening", + "list_application_feedback": "listApplicationFeedback", + "list_application_history": "listApplicationHistory", + "list_applications": "listApplications", + "list_archive_reasons": "listArchiveReasons", + "list_candidate_tags": "listCandidateTags", + "list_candidates": "listCandidates", + "list_custom_fields": "listCustomFields", + "list_departments": "listDepartments", + "list_interview_plans": "listInterviewPlans", + "list_interview_stages": "listInterviewStages", + "list_interviews": "listInterviews", + "list_job_postings": "listJobPostings", + "list_jobs": "listJobs", + "list_locations": "listLocations", + "list_notes": "listNotes", + "list_offers": "listOffers", + "list_openings": "listOpenings", + "list_sources": "listSources", + "list_users": "listUsers", + "remove_candidate_tag": "removeCandidateTag", + "search_candidates": "searchCandidates", + "search_jobs": "searchJobs", + "search_openings": "searchOpenings", + "search_users": "searchUsers", + "set_custom_field_value": "setCustomFieldValue", + "set_custom_field_values": "setCustomFieldValues", + "transfer_application": "transferApplication", + "update_candidate": "updateCandidate", + "upload_candidate_file": "uploadCandidateFile", + "upload_resume": "uploadResume" + }, + "triggers": { + "ashby_application_submit": "applicationSubmit", + "ashby_application_update": "applicationUpdate", + "ashby_candidate_delete": "candidateDelete", + "ashby_candidate_hire": "candidateHire", + "ashby_candidate_merge": "candidateMerge", + "ashby_candidate_stage_change": "candidateStageChange", + "ashby_interview_schedule_create": "interviewScheduleCreate", + "ashby_interview_schedule_update": "interviewScheduleUpdate", + "ashby_job_create": "jobCreate", + "ashby_job_posting_delete": "jobPostingDelete", + "ashby_job_posting_update": "jobPostingUpdate", + "ashby_job_update": "jobUpdate", + "ashby_offer_create": "offerCreate", + "ashby_offer_delete": "offerDelete", + "ashby_offer_update": "offerUpdate", + "ashby_opening_create": "openingCreate", + "ashby_signature_request_update": "signatureRequestUpdate" + } + }, + "ashby_v2": { + "namespace": "ashby", + "methods": { + "add_candidate_tag": "addCandidateTag", + "anonymize_candidate": "anonymizeCandidate", + "change_application_source": "changeApplicationSource", + "change_application_stage": "changeApplicationStage", + "create_application": "createApplication", + "create_candidate": "createCandidate", + "create_note": "createNote", + "delete_application": "deleteApplication", + "get_application": "getApplication", + "get_candidate": "getCandidate", + "get_job": "getJob", + "get_job_posting": "getJobPosting", + "get_offer": "getOffer", + "get_opening": "getOpening", + "list_application_feedback": "listApplicationFeedback", + "list_application_history": "listApplicationHistory", + "list_applications": "listApplications", + "list_archive_reasons": "listArchiveReasons", + "list_candidate_tags": "listCandidateTags", + "list_candidates": "listCandidates", + "list_custom_fields": "listCustomFields", + "list_departments": "listDepartments", + "list_interview_plans": "listInterviewPlans", + "list_interview_stages": "listInterviewStages", + "list_interviews": "listInterviews", + "list_job_postings": "listJobPostings", + "list_jobs": "listJobs", + "list_locations": "listLocations", + "list_notes": "listNotes", + "list_offers": "listOffers", + "list_openings": "listOpenings", + "list_sources": "listSources", + "list_users": "listUsers", + "remove_candidate_tag": "removeCandidateTag", + "search_candidates": "searchCandidates", + "search_jobs": "searchJobs", + "search_openings": "searchOpenings", + "search_users": "searchUsers", + "set_custom_field_value": "setCustomFieldValue", + "set_custom_field_values": "setCustomFieldValues", + "transfer_application": "transferApplication", + "update_candidate": "updateCandidate", + "upload_candidate_file": "uploadCandidateFile", + "upload_resume": "uploadResume" + }, + "triggers": { + "ashby_application_submit": "applicationSubmit", + "ashby_application_update": "applicationUpdate", + "ashby_candidate_delete": "candidateDelete", + "ashby_candidate_hire": "candidateHire", + "ashby_candidate_merge": "candidateMerge", + "ashby_candidate_stage_change": "candidateStageChange", + "ashby_interview_schedule_create": "interviewScheduleCreate", + "ashby_interview_schedule_update": "interviewScheduleUpdate", + "ashby_job_create": "jobCreate", + "ashby_job_posting_delete": "jobPostingDelete", + "ashby_job_posting_update": "jobPostingUpdate", + "ashby_job_update": "jobUpdate", + "ashby_offer_create": "offerCreate", + "ashby_offer_delete": "offerDelete", + "ashby_offer_update": "offerUpdate", + "ashby_opening_create": "openingCreate", + "ashby_signature_request_update": "signatureRequestUpdate" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "athena": { + "namespace": "legacy.athena", + "methods": { + "batch_get_named_query": "batchGetNamedQueries", + "batch_get_prepared_statement": "batchGetPreparedStatements", + "batch_get_query_execution": "batchGetQueryExecutions", + "create_named_query": "createNamedQuery", + "create_prepared_statement": "createPreparedStatement", + "delete_named_query": "deleteNamedQuery", + "delete_prepared_statement": "deletePreparedStatement", + "get_data_catalog": "getDataCatalog", + "get_database": "getDatabase", + "get_named_query": "getNamedQuery", + "get_prepared_statement": "getPreparedStatement", + "get_query_execution": "getQueryExecution", + "get_query_results": "getQueryResults", + "get_query_runtime_statistics": "getQueryRuntimeStatistics", + "get_table_metadata": "getTableMetadata", + "get_work_group": "getWorkgroup", + "list_data_catalogs": "listDataCatalogs", + "list_databases": "listDatabases", + "list_named_queries": "listNamedQueries", + "list_prepared_statements": "listPreparedStatements", + "list_query_executions": "listQueryExecutions", + "list_table_metadata": "listTableMetadata", + "list_work_groups": "listWorkgroups", + "start_query": "startQuery", + "stop_query": "stopQuery", + "update_named_query": "updateNamedQuery", + "update_prepared_statement": "updatePreparedStatement" + } + }, + "athena_v2": { + "namespace": "athena", + "methods": { + "batch_get_named_query": "batchGetNamedQueries", + "batch_get_prepared_statement": "batchGetPreparedStatements", + "batch_get_query_execution": "batchGetQueryExecutions", + "create_named_query": "createNamedQuery", + "create_prepared_statement": "createPreparedStatement", + "delete_named_query": "deleteNamedQuery", + "delete_prepared_statement": "deletePreparedStatement", + "get_data_catalog": "getDataCatalog", + "get_database": "getDatabase", + "get_named_query": "getNamedQuery", + "get_prepared_statement": "getPreparedStatement", + "get_query_execution": "getQueryExecution", + "get_query_results": "getQueryResults", + "get_query_runtime_statistics": "getQueryRuntimeStatistics", + "get_table_metadata": "getTableMetadata", + "get_work_group": "getWorkgroup", + "list_data_catalogs": "listDataCatalogs", + "list_databases": "listDatabases", + "list_named_queries": "listNamedQueries", + "list_prepared_statements": "listPreparedStatements", + "list_query_executions": "listQueryExecutions", + "list_table_metadata": "listTableMetadata", + "list_work_groups": "listWorkgroups", + "start_query": "startQuery", + "stop_query": "stopQuery", + "update_named_query": "updateNamedQuery", + "update_prepared_statement": "updatePreparedStatement" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "attio": { + "namespace": "attio", + "methods": { + "assert_record": "assertRecordUpsert", + "create_attribute": "createAttribute", + "create_comment": "createComment", + "create_list": "createList", + "create_list_entry": "createListEntry", + "create_note": "createNote", + "create_object": "createObject", + "create_record": "createRecord", + "create_task": "createTask", + "create_webhook": "createWebhook", + "delete_comment": "deleteComment", + "delete_list_entry": "deleteListEntry", + "delete_note": "deleteNote", + "delete_record": "deleteRecord", + "delete_task": "deleteTask", + "delete_webhook": "deleteWebhook", + "get_attribute": "getAttribute", + "get_comment": "getComment", + "get_list": "getList", + "get_list_entry": "getListEntry", + "get_member": "getMember", + "get_note": "getNote", + "get_object": "getObject", + "get_record": "getRecord", + "get_task": "getTask", + "get_thread": "getThread", + "get_webhook": "getWebhook", + "list_attributes": "listAttributes", + "list_lists": "listLists", + "list_members": "listMembers", + "list_notes": "listNotes", + "list_objects": "listObjects", + "list_records": "listRecords", + "list_tasks": "listTasks", + "list_threads": "listThreads", + "list_webhooks": "listWebhooks", + "query_list_entries": "queryListEntries", + "search_records": "searchRecords", + "update_attribute": "updateAttribute", + "update_list": "updateList", + "update_list_entry": "updateListEntry", + "update_object": "updateObject", + "update_record": "updateRecord", + "update_task": "updateTask", + "update_webhook": "updateWebhook" + }, + "triggers": { + "attio_comment_created": "commentCreated", + "attio_comment_deleted": "commentDeleted", + "attio_comment_resolved": "commentResolved", + "attio_comment_unresolved": "commentUnresolved", + "attio_list_created": "listCreated", + "attio_list_deleted": "listDeleted", + "attio_list_entry_created": "listEntryCreated", + "attio_list_entry_deleted": "listEntryDeleted", + "attio_list_entry_updated": "listEntryUpdated", + "attio_list_updated": "listUpdated", + "attio_note_created": "noteCreated", + "attio_note_deleted": "noteDeleted", + "attio_note_updated": "noteUpdated", + "attio_record_created": "recordCreated", + "attio_record_deleted": "recordDeleted", + "attio_record_merged": "recordMerged", + "attio_record_updated": "recordUpdated", + "attio_task_created": "taskCreated", + "attio_task_deleted": "taskDeleted", + "attio_task_updated": "taskUpdated", + "attio_webhook": "webhook", + "attio_workspace_member_created": "workspaceMemberCreated" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "triggerCredentials": "credential" + } + } + }, + "azure_data_explorer": { + "namespace": "legacy.azureDataExplorer", + "methods": { + "azure_data_explorer_create_table": "createTable", + "azure_data_explorer_drop_table": "dropTable", + "azure_data_explorer_ingest_from_query": "ingestFromQuery", + "azure_data_explorer_ingest_inline": "ingestRowsInline", + "azure_data_explorer_list_databases": "listDatabases", + "azure_data_explorer_list_functions": "listFunctions", + "azure_data_explorer_list_tables": "listTables", + "azure_data_explorer_management": "managementCommandAdvanced", + "azure_data_explorer_query": "runQuery", + "azure_data_explorer_show_database_schema": "showDatabaseSchema", + "azure_data_explorer_show_ingestion_failures": "showIngestionFailures", + "azure_data_explorer_show_operations": "showOperations", + "azure_data_explorer_show_table_details": "showTableDetails", + "azure_data_explorer_show_table_schema": "showTableSchema" + } + }, + "azure_data_explorer_v2": { + "namespace": "azureDataExplorer", + "methods": { + "azure_data_explorer_create_table": "createTable", + "azure_data_explorer_drop_table": "dropTable", + "azure_data_explorer_ingest_from_query": "ingestFromQuery", + "azure_data_explorer_ingest_inline": "ingestRowsInline", + "azure_data_explorer_list_databases": "listDatabases", + "azure_data_explorer_list_functions": "listFunctions", + "azure_data_explorer_list_tables": "listTables", + "azure_data_explorer_management": "managementCommandAdvanced", + "azure_data_explorer_query": "runQuery", + "azure_data_explorer_show_database_schema": "showDatabaseSchema", + "azure_data_explorer_show_ingestion_failures": "showIngestionFailures", + "azure_data_explorer_show_operations": "showOperations", + "azure_data_explorer_show_table_details": "showTableDetails", + "azure_data_explorer_show_table_schema": "showTableSchema" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "azure_devops": { + "namespace": "legacy.azureDevops", + "methods": { + "azure_devops_add_comment": "addComment", + "azure_devops_create_work_item": "createWorkItem", + "azure_devops_get_build_log": "getBuildLog", + "azure_devops_get_build_timeline": "getBuildTimeline", + "azure_devops_get_comments": "getComments", + "azure_devops_get_pipeline": "getPipeline", + "azure_devops_get_pipeline_run": "getPipelineRun", + "azure_devops_get_work_item": "getWorkItem", + "azure_devops_get_work_items_batch": "getWorkItemsBatch", + "azure_devops_get_work_items_between_builds": "getWorkItemsBetweenBuilds", + "azure_devops_list_build_logs": "listBuildLogs", + "azure_devops_list_builds": "listBuilds", + "azure_devops_list_pipeline_runs": "listPipelineRuns", + "azure_devops_list_pipelines": "listPipelines", + "azure_devops_query_work_items": "queryWorkItems", + "azure_devops_update_work_item": "updateWorkItem" + }, + "triggers": { + "azure_devops_build_failed": "buildFailed", + "azure_devops_webhook": "webhook", + "azure_devops_work_item_created": "workItemCreated" + } + }, + "azure_devops_v2": { + "namespace": "azureDevops", + "methods": { + "azure_devops_add_comment": "addComment", + "azure_devops_create_work_item": "createWorkItem", + "azure_devops_get_build_log": "getBuildLog", + "azure_devops_get_build_timeline": "getBuildTimeline", + "azure_devops_get_comments": "getComments", + "azure_devops_get_pipeline": "getPipeline", + "azure_devops_get_pipeline_run": "getPipelineRun", + "azure_devops_get_work_item": "getWorkItem", + "azure_devops_get_work_items_batch": "getWorkItemsBatch", + "azure_devops_get_work_items_between_builds": "getWorkItemsBetweenBuilds", + "azure_devops_list_build_logs": "listBuildLogs", + "azure_devops_list_builds": "listBuilds", + "azure_devops_list_pipeline_runs": "listPipelineRuns", + "azure_devops_list_pipelines": "listPipelines", + "azure_devops_query_work_items": "queryWorkItems", + "azure_devops_update_work_item": "updateWorkItem" + }, + "triggers": { + "azure_devops_build_failed": "buildFailed", + "azure_devops_webhook": "webhook", + "azure_devops_work_item_created": "workItemCreated" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "bitbucket": { + "namespace": "bitbucket", + "methods": { + "bitbucket_approve_pull_request": "approvePullRequest", + "bitbucket_create_branch": "createBranch", + "bitbucket_create_pull_request": "createPullRequest", + "bitbucket_create_pull_request_comment": "createPullRequestComment", + "bitbucket_decline_pull_request": "declinePullRequest", + "bitbucket_delete_branch": "deleteBranch", + "bitbucket_get_commit": "getCommit", + "bitbucket_get_file": "getFile", + "bitbucket_get_file_metadata": "getFileMetadata", + "bitbucket_get_pipeline": "getPipeline", + "bitbucket_get_pipeline_step_log": "getPipelineStepLog", + "bitbucket_get_pull_request": "getPullRequest", + "bitbucket_get_pull_request_diff": "getPullRequestDiff", + "bitbucket_get_pull_request_diffstat": "getPullRequestDiffstat", + "bitbucket_get_pull_request_merge_task_status": "getPullRequestMergeTaskStatus", + "bitbucket_get_repository": "getRepository", + "bitbucket_list_branches": "listBranches", + "bitbucket_list_commits": "listCommits", + "bitbucket_list_directory": "listDirectory", + "bitbucket_list_pipeline_steps": "listPipelineSteps", + "bitbucket_list_pipelines": "listPipelines", + "bitbucket_list_pull_request_comments": "listPullRequestComments", + "bitbucket_list_pull_request_commit_statuses": "listPullRequestCommitStatuses", + "bitbucket_list_pull_requests": "listPullRequests", + "bitbucket_list_repositories": "listRepositories", + "bitbucket_list_workspaces": "listWorkspaces", + "bitbucket_merge_pull_request": "mergePullRequest", + "bitbucket_request_pull_request_changes": "requestPullRequestChanges", + "bitbucket_stop_pipeline": "stopPipeline", + "bitbucket_trigger_pipeline": "triggerPipeline" + }, + "triggers": { + "bitbucket_build_status_created": "buildStatusCreated", + "bitbucket_build_status_updated": "buildStatusUpdated", + "bitbucket_commit_comment_created": "commitCommentCreated", + "bitbucket_pull_request_approval_removed": "pullRequestApprovalRemoved", + "bitbucket_pull_request_approved": "pullRequestApproved", + "bitbucket_pull_request_changes_request_removed": "pullRequestChangesRequestRemoved", + "bitbucket_pull_request_changes_requested": "pullRequestChangesRequested", + "bitbucket_pull_request_comment_created": "pullRequestCommentCreated", + "bitbucket_pull_request_comment_deleted": "pullRequestCommentDeleted", + "bitbucket_pull_request_comment_reopened": "pullRequestCommentReopened", + "bitbucket_pull_request_comment_resolved": "pullRequestCommentResolved", + "bitbucket_pull_request_comment_updated": "pullRequestCommentUpdated", + "bitbucket_pull_request_created": "pullRequestCreated", + "bitbucket_pull_request_declined": "pullRequestDeclined", + "bitbucket_pull_request_merged": "pullRequestMerged", + "bitbucket_pull_request_updated": "pullRequestUpdated", + "bitbucket_push": "push", + "bitbucket_repository_forked": "repositoryForked", + "bitbucket_repository_updated": "repositoryUpdated" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "oauthCredential": "credential" + } + } + }, + "box": { + "namespace": "legacy.box", + "methods": { + "copy_file": "copyFile", + "create_folder": "createFolder", + "delete_file": "deleteFile", + "delete_folder": "deleteFolder", + "download_file": "downloadFile", + "get_file_info": "getFileInfo", + "list_folder_items": "listFolderItems", + "search": "search", + "sign_cancel_request": "cancelSignRequest", + "sign_create_request": "createSignRequest", + "sign_get_request": "getSignRequest", + "sign_list_requests": "listSignRequests", + "sign_resend_request": "resendSignRequest", + "update_file": "updateFile", + "upload_file": "uploadFile" + } + }, + "box_v2": { + "namespace": "box", + "methods": { + "copy_file": "copyFile", + "create_folder": "createFolder", + "delete_file": "deleteFile", + "delete_folder": "deleteFolder", + "download_file": "downloadFile", + "get_file_info": "getFileInfo", + "list_folder_items": "listFolderItems", + "search": "search", + "sign_cancel_request": "cancelSignRequest", + "sign_create_request": "createSignRequest", + "sign_get_request": "getSignRequest", + "sign_list_requests": "listSignRequests", + "sign_resend_request": "resendSignRequest", + "update_file": "updateFile", + "upload_file": "uploadFile" + } + }, + "brandfetch": { + "namespace": "brandfetch", + "methods": { + "get_brand": "getBrand", + "search": "searchBrands" + } + }, + "brex": { + "namespace": "legacy.brex", + "methods": { + "archive_budget": "archiveBudget", + "create_budget": "createBudget", + "create_spend_limit": "createSpendLimit", + "create_transfer": "createTransfer", + "create_vendor": "createVendor", + "get_budget": "getBudget", + "get_cash_account": "getCashAccount", + "get_company": "getCompany", + "get_current_user": "getCurrentUser", + "get_expense": "getExpense", + "get_spend_limit": "getSpendLimit", + "get_transfer": "getTransfer", + "get_user": "getUser", + "get_vendor": "getVendor", + "list_budgets": "listBudgets", + "list_card_accounts": "listCardAccounts", + "list_card_statements": "listCardStatements", + "list_card_transactions": "listCardTransactions", + "list_cards": "listCards", + "list_cash_accounts": "listCashAccounts", + "list_cash_statements": "listCashStatements", + "list_cash_transactions": "listCashTransactions", + "list_departments": "listDepartments", + "list_expenses": "listExpenses", + "list_locations": "listLocations", + "list_spend_limits": "listSpendLimits", + "list_titles": "listTitles", + "list_transfers": "listTransfers", + "list_users": "listUsers", + "list_vendors": "listVendors", + "match_receipt": "matchReceipt", + "update_expense": "updateExpenseMemo", + "update_vendor": "updateVendor", + "upload_receipt": "uploadReceipt" + } + }, + "brex_v2": { + "namespace": "brex", + "methods": { + "archive_budget": "archiveBudget", + "create_budget": "createBudget", + "create_spend_limit": "createSpendLimit", + "create_transfer": "createTransfer", + "create_vendor": "createVendor", + "get_budget": "getBudget", + "get_cash_account": "getCashAccount", + "get_company": "getCompany", + "get_current_user": "getCurrentUser", + "get_expense": "getExpense", + "get_spend_limit": "getSpendLimit", + "get_transfer": "getTransfer", + "get_user": "getUser", + "get_vendor": "getVendor", + "list_budgets": "listBudgets", + "list_card_accounts": "listCardAccounts", + "list_card_statements": "listCardStatements", + "list_card_transactions": "listCardTransactions", + "list_cards": "listCards", + "list_cash_accounts": "listCashAccounts", + "list_cash_statements": "listCashStatements", + "list_cash_transactions": "listCashTransactions", + "list_departments": "listDepartments", + "list_expenses": "listExpenses", + "list_locations": "listLocations", + "list_spend_limits": "listSpendLimits", + "list_titles": "listTitles", + "list_transfers": "listTransfers", + "list_users": "listUsers", + "list_vendors": "listVendors", + "match_receipt": "matchReceipt", + "update_expense": "updateExpenseMemo", + "update_vendor": "updateVendor", + "upload_receipt": "uploadReceipt" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "brightdata": { + "namespace": "legacy.brightdata", + "methods": { + "cancel_snapshot": "cancelSnapshot", + "discover": "discover", + "download_snapshot": "downloadSnapshot", + "scrape_dataset": "scrapeDataset", + "scrape_url": "scrapeUrl", + "serp_search": "serpSearch", + "snapshot_status": "snapshotStatus", + "sync_scrape": "syncScrape" + } + }, + "brightdata_v2": { + "namespace": "brightdata", + "methods": { + "cancel_snapshot": "cancelSnapshot", + "discover": "discover", + "download_snapshot": "downloadSnapshot", + "scrape_dataset": "scrapeDataset", + "scrape_url": "scrapeUrl", + "serp_search": "serpSearch", + "snapshot_status": "snapshotStatus", + "sync_scrape": "syncScrape" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "browser_use": { + "namespace": "legacy.browserUse" + }, + "browser_use_v2": { + "namespace": "browserUse", + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "buffer": { + "namespace": "legacy.buffer", + "methods": { + "create_idea": "createIdea", + "create_post": "createPost", + "delete_post": "deletePost", + "edit_post": "editPost", + "get_account": "getAccount", + "get_aggregated_post_metrics": "getAggregatedPostMetrics", + "get_channel": "getChannel", + "get_channels": "getChannels", + "get_daily_posting_limits": "getDailyPostingLimits", + "get_idea_groups": "getIdeaGroups", + "get_ideas": "getIdeas", + "get_post": "getPost", + "get_posts": "getPosts" + } + }, + "buffer_v2": { + "namespace": "buffer", + "methods": { + "create_idea": "createIdea", + "create_post": "createPost", + "delete_post": "deletePost", + "edit_post": "editPost", + "get_account": "getAccount", + "get_aggregated_post_metrics": "getAggregatedPostMetrics", + "get_channel": "getChannel", + "get_channels": "getChannels", + "get_daily_posting_limits": "getDailyPostingLimits", + "get_idea_groups": "getIdeaGroups", + "get_ideas": "getIdeas", + "get_post": "getPost", + "get_posts": "getPosts" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "calcom": { + "namespace": "calcom", + "methods": { + "calcom_cancel_booking": "cancelBooking", + "calcom_confirm_booking": "confirmBooking", + "calcom_create_booking": "createBooking", + "calcom_create_event_type": "createEventType", + "calcom_create_schedule": "createSchedule", + "calcom_decline_booking": "declineBooking", + "calcom_delete_event_type": "deleteEventType", + "calcom_delete_schedule": "deleteSchedule", + "calcom_get_booking": "getBooking", + "calcom_get_default_schedule": "getDefaultSchedule", + "calcom_get_event_type": "getEventType", + "calcom_get_schedule": "getSchedule", + "calcom_get_slots": "getAvailableSlots", + "calcom_list_bookings": "listBookings", + "calcom_list_event_types": "listEventTypes", + "calcom_list_schedules": "listSchedules", + "calcom_reschedule_booking": "rescheduleBooking", + "calcom_update_event_type": "updateEventType", + "calcom_update_schedule": "updateSchedule" + }, + "triggers": { + "calcom_booking_cancelled": "bookingCancelled", + "calcom_booking_created": "bookingCreated", + "calcom_booking_paid": "bookingPaid", + "calcom_booking_rejected": "bookingRejected", + "calcom_booking_requested": "bookingRequested", + "calcom_booking_rescheduled": "bookingRescheduled", + "calcom_meeting_ended": "meetingEnded", + "calcom_recording_ready": "recordingReady", + "calcom_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "calendly": { + "namespace": "legacy.calendly", + "methods": { + "calendly_cancel_event": "cancelEvent", + "calendly_create_event_invitee": "bookMeeting", + "calendly_create_invitee_no_show": "markInviteeNoShow", + "calendly_create_scheduling_link": "createSchedulingLink", + "calendly_delete_invitee_no_show": "unmarkInviteeNoShow", + "calendly_get_current_user": "getCurrentUser", + "calendly_get_event_invitee": "getEventInvitee", + "calendly_get_event_type": "getEventType", + "calendly_get_scheduled_event": "getScheduledEvent", + "calendly_get_user": "getUser", + "calendly_list_event_invitees": "listEventInvitees", + "calendly_list_event_type_available_times": "listEventTypeAvailableTimes", + "calendly_list_event_types": "listEventTypes", + "calendly_list_organization_memberships": "listOrganizationMemberships", + "calendly_list_routing_form_submissions": "listRoutingFormSubmissions", + "calendly_list_routing_forms": "listRoutingForms", + "calendly_list_scheduled_events": "listScheduledEvents", + "calendly_list_user_availability_schedules": "listUserAvailabilitySchedules", + "calendly_list_user_busy_times": "listUserBusyTimes" + }, + "triggers": { + "calendly_invitee_canceled": "inviteeCanceled", + "calendly_invitee_created": "inviteeCreated", + "calendly_routing_form_submitted": "routingFormSubmitted", + "calendly_webhook": "webhook" + } + }, + "calendly_v2": { + "namespace": "calendly", + "methods": { + "calendly_cancel_event": "cancelEvent", + "calendly_create_event_invitee": "bookMeeting", + "calendly_create_invitee_no_show": "markInviteeNoShow", + "calendly_create_scheduling_link": "createSchedulingLink", + "calendly_delete_invitee_no_show": "unmarkInviteeNoShow", + "calendly_get_current_user": "getCurrentUser", + "calendly_get_event_invitee": "getEventInvitee", + "calendly_get_event_type": "getEventType", + "calendly_get_scheduled_event": "getScheduledEvent", + "calendly_get_user": "getUser", + "calendly_list_event_invitees": "listEventInvitees", + "calendly_list_event_type_available_times": "listEventTypeAvailableTimes", + "calendly_list_event_types": "listEventTypes", + "calendly_list_organization_memberships": "listOrganizationMemberships", + "calendly_list_routing_form_submissions": "listRoutingFormSubmissions", + "calendly_list_routing_forms": "listRoutingForms", + "calendly_list_scheduled_events": "listScheduledEvents", + "calendly_list_user_availability_schedules": "listUserAvailabilitySchedules", + "calendly_list_user_busy_times": "listUserBusyTimes" + }, + "triggers": { + "calendly_invitee_canceled": "inviteeCanceled", + "calendly_invitee_created": "inviteeCreated", + "calendly_routing_form_submitted": "routingFormSubmitted", + "calendly_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "cbinsights": { + "namespace": "legacy.cbinsights", + "methods": { + "chat": "askChatCbi", + "get_commercial_maturity_history": "getCommercialMaturityHistory", + "get_exit_probability_history": "getExitProbabilityHistory", + "get_mosaic_history": "getMosaicHistory", + "get_org_business_relationships": "getOrganizationBusinessRelationships", + "get_org_funding_window": "getOrganizationFundingWindow", + "get_org_fundings": "getOrganizationFundings", + "get_org_investments": "getOrganizationInvestments", + "get_org_management_and_board": "getOrganizationManagementAndBoard", + "get_org_outlook": "getOrganizationOutlook", + "get_org_portfolio_exits": "getOrganizationPortfolioExits", + "get_org_revenue": "getOrganizationRevenue", + "get_scouting_report": "getScoutingReport", + "get_strategy_map": "getStrategyMap", + "list_business_relationships": "listBusinessRelationships", + "list_funding_window": "listFundingWindows", + "list_fundings": "listFundings", + "list_investments": "listInvestments", + "list_management_and_board": "listManagementAndBoard", + "list_outlook": "listOutlook", + "list_portfolio_exits": "listPortfolioExits", + "list_revenue": "listRevenue", + "lookup_organizations": "lookUpOrganizations", + "rag": "retrieveContext", + "search_firmographics": "searchFirmographics" + } + }, + "cbinsights_v2": { + "namespace": "cbinsights", + "methods": { + "chat": "askChatCbi", + "get_commercial_maturity_history": "getCommercialMaturityHistory", + "get_exit_probability_history": "getExitProbabilityHistory", + "get_mosaic_history": "getMosaicHistory", + "get_org_business_relationships": "getOrganizationBusinessRelationships", + "get_org_funding_window": "getOrganizationFundingWindow", + "get_org_fundings": "getOrganizationFundings", + "get_org_investments": "getOrganizationInvestments", + "get_org_management_and_board": "getOrganizationManagementAndBoard", + "get_org_outlook": "getOrganizationOutlook", + "get_org_portfolio_exits": "getOrganizationPortfolioExits", + "get_org_revenue": "getOrganizationRevenue", + "get_scouting_report": "getScoutingReport", + "get_strategy_map": "getStrategyMap", + "list_business_relationships": "listBusinessRelationships", + "list_funding_window": "listFundingWindows", + "list_fundings": "listFundings", + "list_investments": "listInvestments", + "list_management_and_board": "listManagementAndBoard", + "list_outlook": "listOutlook", + "list_portfolio_exits": "listPortfolioExits", + "list_revenue": "listRevenue", + "lookup_organizations": "lookUpOrganizations", + "rag": "retrieveContext", + "search_firmographics": "searchFirmographics" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "chat_trigger": { + "namespace": "legacy.chatTrigger" + }, + "checkr": { + "namespace": "legacy.checkr", + "methods": { + "add_report_tag": "addReportTag", + "apply_report_review_action": "applyReportReviewAction", + "cancel_adverse_action": "cancelAdverseAction", + "cancel_continuous_check": "cancelContinuousCheck", + "cancel_invitation": "cancelInvitation", + "cancel_subscription": "cancelSubscription", + "complete_report": "completeReport", + "create_adverse_action": "createAdverseAction", + "create_candidate": "createCandidate", + "create_continuous_check": "createContinuousCheck", + "create_geo": "createGeo", + "create_invitation": "inviteCandidate", + "create_report": "orderReport", + "create_subscription": "scheduleRecurringCheck", + "delete_candidate_pii": "deleteCandidatePii", + "delete_geo": "deleteGeo", + "get_account": "getAccount", + "get_adverse_action": "getAdverseAction", + "get_candidate": "getCandidate", + "get_continuous_check": "getContinuousCheck", + "get_document": "getDocument", + "get_geo": "getGeo", + "get_invitation": "getInvitation", + "get_node": "getNode", + "get_package": "getPackage", + "get_program": "getProgram", + "get_report": "getReport", + "get_report_eta": "getReportEta", + "get_report_progressive_status": "getReportCheckpoints", + "get_report_tags": "getReportTags", + "get_screening": "getScreening", + "get_subscription": "getSubscription", + "get_verification": "getVerification", + "list_adverse_actions": "listAdverseActions", + "list_adverse_items": "listAdverseItems", + "list_assessments": "listAssessments", + "list_candidate_documents": "listCandidateDocuments", + "list_candidates": "listCandidates", + "list_continuous_checks": "listContinuousChecks", + "list_counties": "listCounties", + "list_geos": "listGeos", + "list_invitations": "listInvitations", + "list_nodes": "listNodes", + "list_packages": "listPackages", + "list_programs": "listPrograms", + "list_report_addresses": "listReportAddresses", + "list_subscriptions": "listSubscriptions", + "list_users": "listUsers", + "list_verifications": "listVerifications", + "remove_report_tag": "removeReportTag", + "set_report_tags": "setReportTags", + "update_candidate": "updateCandidate", + "update_continuous_check": "updateContinuousCheck", + "update_geo": "updateGeo", + "update_report": "updateReport", + "update_subscription": "updateSubscription" + }, + "triggers": { + "checkr_adverse_action_canceled": "adverseActionCanceled", + "checkr_adverse_action_completed": "adverseActionCompleted", + "checkr_adverse_action_created": "adverseActionCreated", + "checkr_adverse_action_notice_not_delivered": "adverseActionNoticeNotDelivered", + "checkr_adverse_action_paused": "adverseActionPaused", + "checkr_adverse_action_resumed": "adverseActionResumed", + "checkr_candidate_created": "candidateCreated", + "checkr_candidate_updated": "candidateUpdated", + "checkr_continuous_check_confirmation_required": "continuousCheckConfirmationRequired", + "checkr_continuous_check_subscription_error": "continuousCheckSubscriptionError", + "checkr_invitation_completed": "invitationCompleted", + "checkr_invitation_created": "invitationCreated", + "checkr_invitation_deleted": "invitationDeleted", + "checkr_invitation_expired": "invitationExpired", + "checkr_report_canceled": "reportCanceled", + "checkr_report_completed": "reportCompleted", + "checkr_report_created": "reportCreated", + "checkr_report_dispute_completed": "reportDisputeCompleted", + "checkr_report_disputed": "reportDisputed", + "checkr_report_engaged": "reportEngaged", + "checkr_report_paused": "reportPaused", + "checkr_report_post_adverse_action": "reportPostAdverseAction", + "checkr_report_pre_adverse_action": "reportPreAdverseAction", + "checkr_report_resumed": "reportResumed", + "checkr_report_suspended": "reportSuspended", + "checkr_report_updated": "reportUpdated", + "checkr_report_upgraded": "reportUpgraded", + "checkr_verification_completed": "verificationCompleted", + "checkr_verification_created": "verificationCreated", + "checkr_verification_processed": "verificationProcessed", + "checkr_webhook": "webhook" + } + }, + "checkr_v2": { + "namespace": "checkr", + "methods": { + "add_report_tag": "addReportTag", + "apply_report_review_action": "applyReportReviewAction", + "cancel_adverse_action": "cancelAdverseAction", + "cancel_continuous_check": "cancelContinuousCheck", + "cancel_invitation": "cancelInvitation", + "cancel_subscription": "cancelSubscription", + "complete_report": "completeReport", + "create_adverse_action": "createAdverseAction", + "create_candidate": "createCandidate", + "create_continuous_check": "createContinuousCheck", + "create_geo": "createGeo", + "create_invitation": "inviteCandidate", + "create_report": "orderReport", + "create_subscription": "scheduleRecurringCheck", + "delete_candidate_pii": "deleteCandidatePii", + "delete_geo": "deleteGeo", + "get_account": "getAccount", + "get_adverse_action": "getAdverseAction", + "get_candidate": "getCandidate", + "get_continuous_check": "getContinuousCheck", + "get_document": "getDocument", + "get_geo": "getGeo", + "get_invitation": "getInvitation", + "get_node": "getNode", + "get_package": "getPackage", + "get_program": "getProgram", + "get_report": "getReport", + "get_report_eta": "getReportEta", + "get_report_progressive_status": "getReportCheckpoints", + "get_report_tags": "getReportTags", + "get_screening": "getScreening", + "get_subscription": "getSubscription", + "get_verification": "getVerification", + "list_adverse_actions": "listAdverseActions", + "list_adverse_items": "listAdverseItems", + "list_assessments": "listAssessments", + "list_candidate_documents": "listCandidateDocuments", + "list_candidates": "listCandidates", + "list_continuous_checks": "listContinuousChecks", + "list_counties": "listCounties", + "list_geos": "listGeos", + "list_invitations": "listInvitations", + "list_nodes": "listNodes", + "list_packages": "listPackages", + "list_programs": "listPrograms", + "list_report_addresses": "listReportAddresses", + "list_subscriptions": "listSubscriptions", + "list_users": "listUsers", + "list_verifications": "listVerifications", + "remove_report_tag": "removeReportTag", + "set_report_tags": "setReportTags", + "update_candidate": "updateCandidate", + "update_continuous_check": "updateContinuousCheck", + "update_geo": "updateGeo", + "update_report": "updateReport", + "update_subscription": "updateSubscription" + }, + "triggers": { + "checkr_adverse_action_canceled": "adverseActionCanceled", + "checkr_adverse_action_completed": "adverseActionCompleted", + "checkr_adverse_action_created": "adverseActionCreated", + "checkr_adverse_action_notice_not_delivered": "adverseActionNoticeNotDelivered", + "checkr_adverse_action_paused": "adverseActionPaused", + "checkr_adverse_action_resumed": "adverseActionResumed", + "checkr_candidate_created": "candidateCreated", + "checkr_candidate_updated": "candidateUpdated", + "checkr_continuous_check_confirmation_required": "continuousCheckConfirmationRequired", + "checkr_continuous_check_subscription_error": "continuousCheckSubscriptionError", + "checkr_invitation_completed": "invitationCompleted", + "checkr_invitation_created": "invitationCreated", + "checkr_invitation_deleted": "invitationDeleted", + "checkr_invitation_expired": "invitationExpired", + "checkr_report_canceled": "reportCanceled", + "checkr_report_completed": "reportCompleted", + "checkr_report_created": "reportCreated", + "checkr_report_dispute_completed": "reportDisputeCompleted", + "checkr_report_disputed": "reportDisputed", + "checkr_report_engaged": "reportEngaged", + "checkr_report_paused": "reportPaused", + "checkr_report_post_adverse_action": "reportPostAdverseAction", + "checkr_report_pre_adverse_action": "reportPreAdverseAction", + "checkr_report_resumed": "reportResumed", + "checkr_report_suspended": "reportSuspended", + "checkr_report_updated": "reportUpdated", + "checkr_report_upgraded": "reportUpgraded", + "checkr_verification_completed": "verificationCompleted", + "checkr_verification_created": "verificationCreated", + "checkr_verification_processed": "verificationProcessed", + "checkr_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "circleback": { + "namespace": "legacy.circleback", + "methods": { + "add_tag_to_meetings": "addTagToMeetings", + "create_tag": "createTag", + "delete_action_item": "deleteActionItem", + "delete_meeting": "deleteMeeting", + "delete_tag": "deleteTag", + "get_company": "getCompany", + "get_meeting": "getMeeting", + "get_person": "getPerson", + "get_transcript": "getTranscript", + "list_action_items": "listActionItems", + "list_calendar_events": "listCalendarEvents", + "list_companies": "listCompanies", + "list_meetings": "listMeetings", + "list_people": "listPeople", + "list_tags": "listTags", + "remove_tag_from_meetings": "removeTagFromMeetings", + "search_meetings": "searchMeetings", + "update_action_item": "updateActionItem", + "update_meeting": "updateMeeting", + "update_tag": "updateTag" + }, + "triggers": { + "circleback_meeting_completed": "meetingCompleted", + "circleback_meeting_notes": "meetingNotes", + "circleback_webhook": "webhook" + } + }, + "circleback_v2": { + "namespace": "circleback", + "methods": { + "add_tag_to_meetings": "addTagToMeetings", + "create_tag": "createTag", + "delete_action_item": "deleteActionItem", + "delete_meeting": "deleteMeeting", + "delete_tag": "deleteTag", + "get_company": "getCompany", + "get_meeting": "getMeeting", + "get_person": "getPerson", + "get_transcript": "getTranscript", + "list_action_items": "listActionItems", + "list_calendar_events": "listCalendarEvents", + "list_companies": "listCompanies", + "list_meetings": "listMeetings", + "list_people": "listPeople", + "list_tags": "listTags", + "remove_tag_from_meetings": "removeTagFromMeetings", + "search_meetings": "searchMeetings", + "update_action_item": "updateActionItem", + "update_meeting": "updateMeeting", + "update_tag": "updateTag" + }, + "triggers": { + "circleback_meeting_completed": "meetingCompleted", + "circleback_meeting_notes": "meetingNotes", + "circleback_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "clay": { + "namespace": "clay" + }, + "clerk": { + "namespace": "legacy.clerk", + "methods": { + "clerk_add_organization_member": "addOrganizationMember", + "clerk_ban_user": "banUser", + "clerk_create_actor_token": "createActorToken", + "clerk_create_allowlist_identifier": "createAllowlistIdentifier", + "clerk_create_blocklist_identifier": "createBlocklistIdentifier", + "clerk_create_organization": "createOrganization", + "clerk_create_organization_invitation": "createOrganizationInvitation", + "clerk_create_user": "createUser", + "clerk_delete_allowlist_identifier": "deleteAllowlistIdentifier", + "clerk_delete_blocklist_identifier": "deleteBlocklistIdentifier", + "clerk_delete_organization": "deleteOrganization", + "clerk_delete_user": "deleteUser", + "clerk_get_jwt_template": "getJwtTemplate", + "clerk_get_organization": "getOrganization", + "clerk_get_session": "getSession", + "clerk_get_user": "getUser", + "clerk_get_user_oauth_token": "getUserOauthToken", + "clerk_list_allowlist_identifiers": "listAllowlistIdentifiers", + "clerk_list_blocklist_identifiers": "listBlocklistIdentifiers", + "clerk_list_jwt_templates": "listJwtTemplates", + "clerk_list_organization_invitations": "listOrganizationInvitations", + "clerk_list_organization_memberships": "listOrganizationMemberships", + "clerk_list_organizations": "listOrganizations", + "clerk_list_sessions": "listSessions", + "clerk_list_users": "listUsers", + "clerk_lock_user": "lockUser", + "clerk_remove_organization_member": "removeOrganizationMember", + "clerk_revoke_actor_token": "revokeActorToken", + "clerk_revoke_session": "revokeSession", + "clerk_unban_user": "unbanUser", + "clerk_unlock_user": "unlockUser", + "clerk_update_organization": "updateOrganization", + "clerk_update_organization_membership": "updateOrganizationMembership", + "clerk_update_user": "updateUser" + }, + "triggers": { + "clerk_organization_created": "organizationCreated", + "clerk_organization_deleted": "organizationDeleted", + "clerk_organization_membership_created": "organizationMembershipCreated", + "clerk_organization_membership_deleted": "organizationMembershipDeleted", + "clerk_organization_membership_updated": "organizationMembershipUpdated", + "clerk_organization_updated": "organizationUpdated", + "clerk_session_created": "sessionCreated", + "clerk_session_ended": "sessionEnded", + "clerk_session_removed": "sessionRemoved", + "clerk_session_revoked": "sessionRevoked", + "clerk_user_created": "userCreated", + "clerk_user_deleted": "userDeleted", + "clerk_user_updated": "userUpdated", + "clerk_webhook": "webhook" + } + }, + "clerk_v2": { + "namespace": "clerk", + "methods": { + "clerk_add_organization_member": "addOrganizationMember", + "clerk_ban_user": "banUser", + "clerk_create_actor_token": "createActorToken", + "clerk_create_allowlist_identifier": "createAllowlistIdentifier", + "clerk_create_blocklist_identifier": "createBlocklistIdentifier", + "clerk_create_organization": "createOrganization", + "clerk_create_organization_invitation": "createOrganizationInvitation", + "clerk_create_user": "createUser", + "clerk_delete_allowlist_identifier": "deleteAllowlistIdentifier", + "clerk_delete_blocklist_identifier": "deleteBlocklistIdentifier", + "clerk_delete_organization": "deleteOrganization", + "clerk_delete_user": "deleteUser", + "clerk_get_jwt_template": "getJwtTemplate", + "clerk_get_organization": "getOrganization", + "clerk_get_session": "getSession", + "clerk_get_user": "getUser", + "clerk_get_user_oauth_token": "getUserOauthToken", + "clerk_list_allowlist_identifiers": "listAllowlistIdentifiers", + "clerk_list_blocklist_identifiers": "listBlocklistIdentifiers", + "clerk_list_jwt_templates": "listJwtTemplates", + "clerk_list_organization_invitations": "listOrganizationInvitations", + "clerk_list_organization_memberships": "listOrganizationMemberships", + "clerk_list_organizations": "listOrganizations", + "clerk_list_sessions": "listSessions", + "clerk_list_users": "listUsers", + "clerk_lock_user": "lockUser", + "clerk_remove_organization_member": "removeOrganizationMember", + "clerk_revoke_actor_token": "revokeActorToken", + "clerk_revoke_session": "revokeSession", + "clerk_unban_user": "unbanUser", + "clerk_unlock_user": "unlockUser", + "clerk_update_organization": "updateOrganization", + "clerk_update_organization_membership": "updateOrganizationMembership", + "clerk_update_user": "updateUser" + }, + "triggers": { + "clerk_organization_created": "organizationCreated", + "clerk_organization_deleted": "organizationDeleted", + "clerk_organization_membership_created": "organizationMembershipCreated", + "clerk_organization_membership_deleted": "organizationMembershipDeleted", + "clerk_organization_membership_updated": "organizationMembershipUpdated", + "clerk_organization_updated": "organizationUpdated", + "clerk_session_created": "sessionCreated", + "clerk_session_ended": "sessionEnded", + "clerk_session_removed": "sessionRemoved", + "clerk_session_revoked": "sessionRevoked", + "clerk_user_created": "userCreated", + "clerk_user_deleted": "userDeleted", + "clerk_user_updated": "userUpdated", + "clerk_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "clickhouse": { + "namespace": "clickhouse", + "methods": { + "count_rows": "countRows", + "create_database": "createDatabase", + "create_table": "createTable", + "delete": "deleteData", + "describe_table": "describeTable", + "drop_database": "dropDatabase", + "drop_partition": "dropPartition", + "drop_table": "dropTable", + "execute": "executeRawSql", + "insert": "insertRow", + "insert_rows": "insertRowsBulk", + "introspect": "introspectSchema", + "kill_query": "killQuery", + "list_clusters": "listClusters", + "list_databases": "listDatabases", + "list_mutations": "listMutations", + "list_partitions": "listPartitions", + "list_running_queries": "listRunningQueries", + "list_tables": "listTables", + "optimize_table": "optimizeTable", + "query": "querySelect", + "rename_table": "renameTable", + "show_create_table": "showCreateTable", + "table_stats": "tableStats", + "truncate_table": "truncateTable", + "update": "updateData" + } + }, + "clickup": { + "namespace": "clickup", + "methods": { + "add_tag_to_task": "addTagToTask", + "create_checklist": "createChecklist", + "create_checklist_item": "createChecklistItem", + "create_comment": "createComment", + "create_folder": "createFolder", + "create_list": "createList", + "create_task": "createTask", + "create_time_entry": "createTimeEntry", + "delete_checklist": "deleteChecklist", + "delete_checklist_item": "deleteChecklistItem", + "delete_comment": "deleteComment", + "delete_task": "deleteTask", + "delete_time_entry": "deleteTimeEntry", + "get_comments": "getComments", + "get_custom_fields": "getCustomFields", + "get_folders": "getFolders", + "get_list_members": "getListMembers", + "get_lists": "getLists", + "get_running_timer": "getRunningTimer", + "get_space_tags": "getSpaceTags", + "get_spaces": "getSpaces", + "get_task": "getTask", + "get_task_members": "getTaskMembers", + "get_tasks": "getTasks", + "get_time_entries": "getTimeEntries", + "get_workspaces": "getWorkspaces", + "remove_custom_field_value": "removeCustomFieldValue", + "remove_tag_from_task": "removeTagFromTask", + "search_tasks": "searchTasks", + "set_custom_field_value": "setCustomFieldValue", + "start_timer": "startTimer", + "stop_timer": "stopTimer", + "update_checklist": "updateChecklist", + "update_checklist_item": "updateChecklistItem", + "update_comment": "updateComment", + "update_task": "updateTask", + "update_time_entry": "updateTimeEntry", + "upload_attachment": "uploadAttachment" + }, + "triggers": { + "clickup_folder_created": "folderCreated", + "clickup_folder_deleted": "folderDeleted", + "clickup_folder_updated": "folderUpdated", + "clickup_goal_created": "goalCreated", + "clickup_goal_deleted": "goalDeleted", + "clickup_goal_updated": "goalUpdated", + "clickup_key_result_created": "keyResultCreated", + "clickup_key_result_deleted": "keyResultDeleted", + "clickup_key_result_updated": "keyResultUpdated", + "clickup_list_created": "listCreated", + "clickup_list_deleted": "listDeleted", + "clickup_list_updated": "listUpdated", + "clickup_space_created": "spaceCreated", + "clickup_space_deleted": "spaceDeleted", + "clickup_space_updated": "spaceUpdated", + "clickup_task_assignee_updated": "taskAssigneeUpdated", + "clickup_task_comment_posted": "taskCommentPosted", + "clickup_task_comment_updated": "taskCommentUpdated", + "clickup_task_created": "taskCreated", + "clickup_task_deleted": "taskDeleted", + "clickup_task_due_date_updated": "taskDueDateUpdated", + "clickup_task_moved": "taskMoved", + "clickup_task_priority_updated": "taskPriorityUpdated", + "clickup_task_status_updated": "taskStatusUpdated", + "clickup_task_tag_updated": "taskTagUpdated", + "clickup_task_time_estimate_updated": "taskTimeEstimateUpdated", + "clickup_task_time_tracked_updated": "taskTimeTrackedUpdated", + "clickup_task_updated": "taskUpdated", + "clickup_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "oauthCredential": "credential" + } + } + }, + "cloudflare": { + "namespace": "legacy.cloudflare", + "methods": { + "create_access_application": "createAccessApplication", + "create_access_group": "createAccessGroup", + "create_access_policy": "createAccessPolicy", + "create_access_service_token": "createAccessServiceToken", + "create_dns_record": "createDnsRecord", + "create_r2_bucket": "createR2Bucket", + "create_rate_limit_rule": "createRateLimitingRule", + "create_ruleset": "createRuleset", + "create_ruleset_rule": "createRulesetRule", + "create_tunnel": "createTunnel", + "create_worker_route": "createWorkerRoute", + "create_zone": "createZone", + "delete_access_application": "deleteAccessApplication", + "delete_access_group": "deleteAccessGroup", + "delete_access_policy": "deleteAccessPolicy", + "delete_dns_record": "deleteDnsRecord", + "delete_r2_bucket": "deleteR2Bucket", + "delete_r2_bucket_cors": "deleteR2BucketCors", + "delete_ruleset": "deleteRuleset", + "delete_ruleset_rule": "deleteRulesetRule", + "delete_tunnel": "deleteTunnel", + "delete_worker_route": "deleteWorkerRoute", + "delete_worker_script": "deleteWorkerScript", + "delete_zone": "deleteZone", + "dns_analytics": "dnsAnalytics", + "get_access_application": "getAccessApplication", + "get_access_group": "getAccessGroup", + "get_access_policy": "getAccessPolicy", + "get_access_service_token": "getAccessServiceToken", + "get_dns_record": "getDnsRecord", + "get_r2_bucket": "getR2Bucket", + "get_r2_bucket_cors": "getR2BucketCors", + "get_r2_bucket_lifecycle": "getR2BucketLifecycle", + "get_ruleset": "getRuleset", + "get_ruleset_entrypoint": "getPhaseEntryPointRuleset", + "get_tunnel": "getTunnel", + "get_tunnel_configuration": "getTunnelConfiguration", + "get_tunnel_token": "getTunnelToken", + "get_worker_route": "getWorkerRoute", + "get_worker_script_settings": "getWorkerScriptSettings", + "get_zone": "getZoneDetails", + "get_zone_settings": "getZoneSettings", + "list_access_applications": "listAccessApplications", + "list_access_groups": "listAccessGroups", + "list_access_identity_providers": "listAccessIdentityProviders", + "list_access_policies": "listAccessPolicies", + "list_access_service_tokens": "listAccessServiceTokens", + "list_certificates": "listCertificates", + "list_dns_records": "listDnsRecords", + "list_managed_ruleset_overrides": "listManagedRulesetOverrides", + "list_r2_buckets": "listR2Buckets", + "list_rate_limit_rules": "listRateLimitingRules", + "list_rulesets": "listRulesets", + "list_tunnels": "listTunnels", + "list_worker_routes": "listWorkerRoutes", + "list_worker_scripts": "listWorkerScripts", + "list_zones": "listZones", + "purge_cache": "purgeCache", + "refresh_access_service_token": "refreshAccessServiceToken", + "revoke_access_service_token": "revokeAccessServiceToken", + "rotate_access_service_token": "rotateAccessServiceToken", + "update_access_application": "updateAccessApplication", + "update_access_group": "updateAccessGroup", + "update_access_policy": "updateAccessPolicy", + "update_access_service_token": "updateAccessServiceToken", + "update_dns_record": "updateDnsRecord", + "update_r2_bucket_cors": "updateR2BucketCors", + "update_r2_bucket_lifecycle": "updateR2BucketLifecycle", + "update_rate_limit_rule": "updateRateLimitingRule", + "update_ruleset": "updateRuleset", + "update_ruleset_rule": "updateRulesetRule", + "update_tunnel": "updateTunnel", + "update_tunnel_configuration": "updateTunnelConfiguration", + "update_worker_route": "updateWorkerRoute", + "update_zone": "updateZone", + "update_zone_setting": "updateZoneSetting" + } + }, + "cloudflare_v2": { + "namespace": "cloudflare", + "methods": { + "create_access_application": "createAccessApplication", + "create_access_group": "createAccessGroup", + "create_access_policy": "createAccessPolicy", + "create_access_service_token": "createAccessServiceToken", + "create_dns_record": "createDnsRecord", + "create_r2_bucket": "createR2Bucket", + "create_rate_limit_rule": "createRateLimitingRule", + "create_ruleset": "createRuleset", + "create_ruleset_rule": "createRulesetRule", + "create_tunnel": "createTunnel", + "create_worker_route": "createWorkerRoute", + "create_zone": "createZone", + "delete_access_application": "deleteAccessApplication", + "delete_access_group": "deleteAccessGroup", + "delete_access_policy": "deleteAccessPolicy", + "delete_dns_record": "deleteDnsRecord", + "delete_r2_bucket": "deleteR2Bucket", + "delete_r2_bucket_cors": "deleteR2BucketCors", + "delete_ruleset": "deleteRuleset", + "delete_ruleset_rule": "deleteRulesetRule", + "delete_tunnel": "deleteTunnel", + "delete_worker_route": "deleteWorkerRoute", + "delete_worker_script": "deleteWorkerScript", + "delete_zone": "deleteZone", + "dns_analytics": "dnsAnalytics", + "get_access_application": "getAccessApplication", + "get_access_group": "getAccessGroup", + "get_access_policy": "getAccessPolicy", + "get_access_service_token": "getAccessServiceToken", + "get_dns_record": "getDnsRecord", + "get_r2_bucket": "getR2Bucket", + "get_r2_bucket_cors": "getR2BucketCors", + "get_r2_bucket_lifecycle": "getR2BucketLifecycle", + "get_ruleset": "getRuleset", + "get_ruleset_entrypoint": "getPhaseEntryPointRuleset", + "get_tunnel": "getTunnel", + "get_tunnel_configuration": "getTunnelConfiguration", + "get_tunnel_token": "getTunnelToken", + "get_worker_route": "getWorkerRoute", + "get_worker_script_settings": "getWorkerScriptSettings", + "get_zone": "getZoneDetails", + "get_zone_settings": "getZoneSettings", + "list_access_applications": "listAccessApplications", + "list_access_groups": "listAccessGroups", + "list_access_identity_providers": "listAccessIdentityProviders", + "list_access_policies": "listAccessPolicies", + "list_access_service_tokens": "listAccessServiceTokens", + "list_certificates": "listCertificates", + "list_dns_records": "listDnsRecords", + "list_managed_ruleset_overrides": "listManagedRulesetOverrides", + "list_r2_buckets": "listR2Buckets", + "list_rate_limit_rules": "listRateLimitingRules", + "list_rulesets": "listRulesets", + "list_tunnels": "listTunnels", + "list_worker_routes": "listWorkerRoutes", + "list_worker_scripts": "listWorkerScripts", + "list_zones": "listZones", + "purge_cache": "purgeCache", + "refresh_access_service_token": "refreshAccessServiceToken", + "revoke_access_service_token": "revokeAccessServiceToken", + "rotate_access_service_token": "rotateAccessServiceToken", + "update_access_application": "updateAccessApplication", + "update_access_group": "updateAccessGroup", + "update_access_policy": "updateAccessPolicy", + "update_access_service_token": "updateAccessServiceToken", + "update_dns_record": "updateDnsRecord", + "update_r2_bucket_cors": "updateR2BucketCors", + "update_r2_bucket_lifecycle": "updateR2BucketLifecycle", + "update_rate_limit_rule": "updateRateLimitingRule", + "update_ruleset": "updateRuleset", + "update_ruleset_rule": "updateRulesetRule", + "update_tunnel": "updateTunnel", + "update_tunnel_configuration": "updateTunnelConfiguration", + "update_worker_route": "updateWorkerRoute", + "update_zone": "updateZone", + "update_zone_setting": "updateZoneSetting" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "cloudformation": { + "namespace": "legacy.cloudformation", + "methods": { + "cancel_update_stack": "cancelUpdateStack", + "create_change_set": "createChangeSet", + "create_stack": "createStack", + "delete_stack": "deleteStack", + "describe_change_set": "describeChangeSet", + "describe_stack_drift_detection_status": "driftDetectionStatus", + "describe_stack_events": "describeStackEvents", + "describe_stacks": "describeStacks", + "detect_stack_drift": "detectStackDrift", + "execute_change_set": "executeChangeSet", + "get_template": "getTemplate", + "get_template_summary": "getTemplateSummary", + "list_stack_resources": "listStackResources", + "update_stack": "updateStack", + "validate_template": "validateTemplate" + } + }, + "cloudformation_v2": { + "namespace": "cloudformation", + "methods": { + "cancel_update_stack": "cancelUpdateStack", + "create_change_set": "createChangeSet", + "create_stack": "createStack", + "delete_stack": "deleteStack", + "describe_change_set": "describeChangeSet", + "describe_stack_drift_detection_status": "driftDetectionStatus", + "describe_stack_events": "describeStackEvents", + "describe_stacks": "describeStacks", + "detect_stack_drift": "detectStackDrift", + "execute_change_set": "executeChangeSet", + "get_template": "getTemplate", + "get_template_summary": "getTemplateSummary", + "list_stack_resources": "listStackResources", + "update_stack": "updateStack", + "validate_template": "validateTemplate" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "cloudtrail": { + "namespace": "legacy.cloudtrail", + "methods": { + "cancel_query": "cancelLakeQuery", + "describe_query": "describeLakeQuery", + "describe_trails": "describeTrails", + "get_event_data_store": "getEventDataStore", + "get_event_selectors": "getEventSelectors", + "get_insight_selectors": "getInsightSelectors", + "get_query_results": "getLakeQueryResults", + "get_trail": "getTrail", + "get_trail_status": "getTrailStatus", + "list_event_data_stores": "listEventDataStores", + "list_tags": "listTags", + "list_trails": "listTrails", + "lookup_events": "lookUpEvents", + "start_query": "startLakeQuery" + } + }, + "cloudtrail_v2": { + "namespace": "cloudtrail", + "methods": { + "cancel_query": "cancelLakeQuery", + "describe_query": "describeLakeQuery", + "describe_trails": "describeTrails", + "get_event_data_store": "getEventDataStore", + "get_event_selectors": "getEventSelectors", + "get_insight_selectors": "getInsightSelectors", + "get_query_results": "getLakeQueryResults", + "get_trail": "getTrail", + "get_trail_status": "getTrailStatus", + "list_event_data_stores": "listEventDataStores", + "list_tags": "listTags", + "list_trails": "listTrails", + "lookup_events": "lookUpEvents", + "start_query": "startLakeQuery" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "cloudwatch": { + "namespace": "legacy.cloudwatch", + "methods": { + "describe_alarm_history": "describeAlarmHistory", + "describe_alarms": "describeAlarms", + "describe_log_groups": "describeLogGroups", + "describe_log_streams": "describeLogStreams", + "filter_log_events": "filterLogEvents", + "get_log_events": "getLogEvents", + "get_metric_statistics": "getMetricStatistics", + "list_metrics": "listMetrics", + "mute_alarm": "muteAlarm", + "put_log_group_retention": "setLogGroupRetention", + "put_metric_data": "publishMetric", + "query_logs": "queryLogsInsights", + "unmute_alarm": "unmuteAlarm" + } + }, + "cloudwatch_v2": { + "namespace": "cloudwatch", + "methods": { + "describe_alarm_history": "describeAlarmHistory", + "describe_alarms": "describeAlarms", + "describe_log_groups": "describeLogGroups", + "describe_log_streams": "describeLogStreams", + "filter_log_events": "filterLogEvents", + "get_log_events": "getLogEvents", + "get_metric_statistics": "getMetricStatistics", + "list_metrics": "listMetrics", + "mute_alarm": "muteAlarm", + "put_log_group_retention": "setLogGroupRetention", + "put_metric_data": "publishMetric", + "query_logs": "queryLogsInsights", + "unmute_alarm": "unmuteAlarm" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "coda": { + "namespace": "coda", + "methods": { + "add_custom_domain": "addCustomDomain", + "add_permission": "shareDoc", + "change_user_role": "changeUserRole", + "create_doc": "createDoc", + "create_folder": "createFolder", + "create_page": "createPage", + "delete_custom_domain": "deleteCustomDomain", + "delete_doc": "deleteDoc", + "delete_folder": "deleteFolder", + "delete_page": "deletePage", + "delete_page_content": "deletePageContent", + "delete_permission": "removePermission", + "delete_row": "deleteRow", + "delete_rows": "deleteRows", + "export_page": "exportPage", + "get_acl_settings": "getSharingSettings", + "get_analytics_last_updated": "getAnalyticsLastUpdated", + "get_column": "getColumn", + "get_control": "getControl", + "get_custom_domain_provider": "getCustomDomainProvider", + "get_doc": "getDoc", + "get_doc_analytics_summary": "getDocAnalyticsSummary", + "get_folder": "getFolder", + "get_formula": "getFormula", + "get_mutation_status": "getMutationStatus", + "get_page": "getPage", + "get_page_content": "getPageContent", + "get_page_export_status": "getPageExportStatus", + "get_row": "getRow", + "get_sharing_metadata": "getSharingMetadata", + "get_table": "getTable", + "list_categories": "listDocCategories", + "list_columns": "listColumns", + "list_controls": "listControls", + "list_custom_domains": "listCustomDomains", + "list_doc_analytics": "listDocAnalytics", + "list_docs": "listDocs", + "list_folder_children": "listSubfolders", + "list_folders": "listFolders", + "list_formulas": "listFormulas", + "list_page_analytics": "listPageAnalytics", + "list_pages": "listPages", + "list_permissions": "listPermissions", + "list_rows": "listRows", + "list_tables": "listTables", + "list_workspace_members": "listWorkspaceMembers", + "list_workspace_roles": "listWorkspaceRoleActivity", + "publish_doc": "publishDoc", + "push_button": "pushButton", + "resolve_browser_link": "resolveBrowserLink", + "search_principals": "searchUsersAndGroups", + "trigger_automation": "triggerAutomation", + "unpublish_doc": "unpublishDoc", + "update_acl_settings": "updateSharingSettings", + "update_doc": "updateDoc", + "update_folder": "updateFolder", + "update_page": "updatePage", + "update_row": "updateRow", + "upsert_rows": "insertOrUpsertRows", + "whoami": "getCurrentUser" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "codepipeline": { + "namespace": "legacy.codepipeline", + "methods": { + "disable_stage_transition": "disableStageTransition", + "enable_stage_transition": "enableStageTransition", + "get_pipeline": "getPipelineStructure", + "get_pipeline_execution": "getExecution", + "get_pipeline_state": "getPipelineState", + "list_action_executions": "listActionExecutions", + "list_pipeline_executions": "listExecutions", + "list_pipelines": "listPipelines", + "put_approval_result": "approveRejectApproval", + "retry_stage_execution": "retryStage", + "start_execution": "startExecution", + "stop_execution": "stopExecution" + } + }, + "codepipeline_v2": { + "namespace": "codepipeline", + "methods": { + "disable_stage_transition": "disableStageTransition", + "enable_stage_transition": "enableStageTransition", + "get_pipeline": "getPipelineStructure", + "get_pipeline_execution": "getExecution", + "get_pipeline_state": "getPipelineState", + "list_action_executions": "listActionExecutions", + "list_pipeline_executions": "listExecutions", + "list_pipelines": "listPipelines", + "put_approval_result": "approveRejectApproval", + "retry_stage_execution": "retryStage", + "start_execution": "startExecution", + "stop_execution": "stopExecution" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "condition": { + "namespace": "condition" + }, + "confluence": { + "namespace": "legacy.confluence", + "methods": { + "create": "createPage", + "create_comment": "createComment", + "delete": "deletePage", + "delete_attachment": "deleteAttachment", + "delete_comment": "deleteComment", + "get_space": "getSpace", + "list_attachments": "listAttachments", + "list_comments": "listComments", + "list_labels": "listLabels", + "list_spaces": "listSpaces", + "read": "readPage", + "search": "searchContent", + "update": "updatePage", + "update_comment": "updateComment", + "upload_attachment": "uploadAttachment" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "confluence_v2": { + "namespace": "confluence", + "methods": { + "add_label": "addLabel", + "create": "createPage", + "create_blogpost": "createBlogPost", + "create_comment": "createComment", + "create_page_property": "createPageProperty", + "create_space": "createSpace", + "create_space_property": "createSpaceProperty", + "delete": "deletePage", + "delete_attachment": "deleteAttachment", + "delete_blogpost": "deleteBlogPost", + "delete_comment": "deleteComment", + "delete_label": "deleteLabel", + "delete_page_property": "deletePageProperty", + "delete_space": "deleteSpace", + "delete_space_property": "deleteSpaceProperty", + "get_blogpost": "getBlogPost", + "get_page_ancestors": "getPageAncestors", + "get_page_children": "getPageChildren", + "get_page_descendants": "getPageDescendants", + "get_page_version": "getPageVersion", + "get_pages_by_label": "getPagesByLabel", + "get_space": "getSpace", + "get_task": "getTask", + "get_user": "getUser", + "list_attachments": "listAttachments", + "list_blogposts": "listBlogPosts", + "list_blogposts_in_space": "listBlogPostsInSpace", + "list_comments": "listComments", + "list_labels": "listLabels", + "list_page_properties": "listPageProperties", + "list_page_versions": "listPageVersions", + "list_pages_in_space": "listPagesInSpace", + "list_space_labels": "listSpaceLabels", + "list_space_permissions": "listSpacePermissions", + "list_space_properties": "listSpaceProperties", + "list_spaces": "listSpaces", + "list_tasks": "listTasks", + "read": "readPage", + "search": "searchContent", + "search_in_space": "searchInSpace", + "update": "updatePage", + "update_blogpost": "updateBlogPost", + "update_comment": "updateComment", + "update_space": "updateSpace", + "update_task": "updateTask", + "upload_attachment": "uploadAttachment" + }, + "triggers": { + "confluence_attachment_created": "attachmentCreated", + "confluence_attachment_removed": "attachmentRemoved", + "confluence_attachment_updated": "attachmentUpdated", + "confluence_blog_created": "blogCreated", + "confluence_blog_removed": "blogRemoved", + "confluence_blog_restored": "blogRestored", + "confluence_blog_updated": "blogUpdated", + "confluence_comment_created": "commentCreated", + "confluence_comment_removed": "commentRemoved", + "confluence_comment_updated": "commentUpdated", + "confluence_label_added": "labelAdded", + "confluence_label_removed": "labelRemoved", + "confluence_page_created": "pageCreated", + "confluence_page_moved": "pageMoved", + "confluence_page_permissions_updated": "pagePermissionsUpdated", + "confluence_page_removed": "pageRemoved", + "confluence_page_restored": "pageRestored", + "confluence_page_updated": "pageUpdated", + "confluence_space_created": "spaceCreated", + "confluence_space_removed": "spaceRemoved", + "confluence_space_updated": "spaceUpdated", + "confluence_user_created": "userCreated", + "confluence_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "context_dev": { + "namespace": "contextDev", + "methods": { + "classify_naics": "classifyNaics", + "classify_sic": "classifySic", + "crawl": "crawlWebsite", + "extract": "extractStructuredData", + "extract_product": "extractProduct", + "extract_products": "extractProducts", + "get_brand": "getBrandByDomain", + "get_brand_by_email": "getBrandByEmail", + "get_brand_by_name": "getBrandByName", + "get_brand_by_ticker": "getBrandByTicker", + "identify_transaction": "identifyTransaction", + "map": "mapSitemap", + "scrape_fonts": "scrapeFonts", + "scrape_html": "scrapeHtml", + "scrape_images": "scrapeImages", + "scrape_markdown": "scrapeMarkdown", + "scrape_styleguide": "scrapeStyleguide", + "screenshot": "screenshot", + "search": "webSearch" + } + }, + "convex": { + "namespace": "legacy.convex", + "methods": { + "action": "runAction", + "document_deltas": "documentDeltas", + "list_documents": "listDocuments", + "list_tables": "listTables", + "mutation": "runMutation", + "query": "runQuery", + "run_function": "runFunction" + } + }, + "convex_v2": { + "namespace": "convex", + "methods": { + "action": "runAction", + "document_deltas": "documentDeltas", + "list_documents": "listDocuments", + "list_tables": "listTables", + "mutation": "runMutation", + "query": "runQuery", + "run_function": "runFunction" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "credential": { + "namespace": "credential", + "methods": { + "find_organization_account": "findOrganizationAccount", + "find_organization_mcp_connection": "findOrganizationMcpConnection", + "list": "listCredentials", + "list_organization_accounts": "listOrganizationAccounts", + "list_organization_mcp_connections": "listOrganizationMcpConnections", + "select": "selectCredential" + }, + "triggers": { + "credential_group_event": "groupEvent" + } + }, + "credential_group": { + "namespace": "legacy.credentialGroup", + "methods": { + "get_invite_link": "getInviteLink", + "list_credentials": "listCredentials", + "list_mcp_connections": "listMcpConnections", + "list_people": "listPeople", + "send_invite": "sendInvite" + }, + "triggers": { + "credential_group_event": "event" + } + }, + "crowdstrike": { + "namespace": "legacy.crowdstrike", + "methods": { + "crowdstrike_create_indicators": "createIndicators", + "crowdstrike_delete_indicators": "deleteIndicators", + "crowdstrike_delete_rtr_session": "deleteRtrSession", + "crowdstrike_execute_rtr_command": "executeRtrCommand", + "crowdstrike_get_alert_details": "getAlertDetails", + "crowdstrike_get_case_details": "getCaseDetails", + "crowdstrike_get_host_group_details": "getHostGroupDetails", + "crowdstrike_get_indicator_details": "getIndicatorDetails", + "crowdstrike_get_rtr_command_status": "getRtrCommandStatus", + "crowdstrike_get_sensor_aggregates": "getSensorAggregates", + "crowdstrike_get_sensor_details": "getSensorDetails", + "crowdstrike_get_vulnerability_details": "getVulnerabilityDetails", + "crowdstrike_init_rtr_session": "initRtrSession", + "crowdstrike_perform_host_action": "performHostAction", + "crowdstrike_perform_host_group_action": "performHostGroupAction", + "crowdstrike_query_alerts": "queryAlerts", + "crowdstrike_query_cases": "queryCases", + "crowdstrike_query_host_groups": "queryHostGroups", + "crowdstrike_query_indicators": "queryIndicators", + "crowdstrike_query_sensors": "querySensors", + "crowdstrike_query_vulnerabilities": "queryVulnerabilities", + "crowdstrike_update_alerts": "updateAlerts", + "crowdstrike_update_indicators": "updateIndicators" + } + }, + "crowdstrike_v2": { + "namespace": "crowdstrike", + "methods": { + "crowdstrike_create_indicators": "createIndicators", + "crowdstrike_delete_indicators": "deleteIndicators", + "crowdstrike_delete_rtr_session": "deleteRtrSession", + "crowdstrike_execute_rtr_command": "executeRtrCommand", + "crowdstrike_get_alert_details": "getAlertDetails", + "crowdstrike_get_case_details": "getCaseDetails", + "crowdstrike_get_host_group_details": "getHostGroupDetails", + "crowdstrike_get_indicator_details": "getIndicatorDetails", + "crowdstrike_get_rtr_command_status": "getRtrCommandStatus", + "crowdstrike_get_sensor_aggregates": "getSensorAggregates", + "crowdstrike_get_sensor_details": "getSensorDetails", + "crowdstrike_get_vulnerability_details": "getVulnerabilityDetails", + "crowdstrike_init_rtr_session": "initRtrSession", + "crowdstrike_perform_host_action": "performHostAction", + "crowdstrike_perform_host_group_action": "performHostGroupAction", + "crowdstrike_query_alerts": "queryAlerts", + "crowdstrike_query_cases": "queryCases", + "crowdstrike_query_host_groups": "queryHostGroups", + "crowdstrike_query_indicators": "queryIndicators", + "crowdstrike_query_sensors": "querySensors", + "crowdstrike_query_vulnerabilities": "queryVulnerabilities", + "crowdstrike_update_alerts": "updateAlerts", + "crowdstrike_update_indicators": "updateIndicators" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "crunchbase": { + "namespace": "legacy.crunchbase", + "methods": { + "autocomplete": "autocomplete", + "get_acquisition": "getAcquisition", + "get_entity": "getAnyEntity", + "get_entity_card": "getEntityCard", + "get_fields_metadata": "getFieldsMetadata", + "get_funding_round": "getFundingRound", + "get_organization": "getOrganization", + "get_person": "getPerson", + "list_deleted_entities": "listDeletedEntities", + "search_acquisitions": "searchAcquisitions", + "search_entities": "searchAnyCollection", + "search_funding_rounds": "searchFundingRounds", + "search_organizations": "searchOrganizations", + "search_people": "searchPeople" + } + }, + "crunchbase_v2": { + "namespace": "crunchbase", + "methods": { + "autocomplete": "autocomplete", + "get_acquisition": "getAcquisition", + "get_entity": "getAnyEntity", + "get_entity_card": "getEntityCard", + "get_fields_metadata": "getFieldsMetadata", + "get_funding_round": "getFundingRound", + "get_organization": "getOrganization", + "get_person": "getPerson", + "list_deleted_entities": "listDeletedEntities", + "search_acquisitions": "searchAcquisitions", + "search_entities": "searchAnyCollection", + "search_funding_rounds": "searchFundingRounds", + "search_organizations": "searchOrganizations", + "search_people": "searchPeople" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "cursor": { + "namespace": "legacy.cursor", + "methods": { + "cursor_add_followup": "addFollowUp", + "cursor_delete_agent": "deleteAgent", + "cursor_download_artifact": "downloadArtifact", + "cursor_get_agent": "getAgentStatus", + "cursor_get_api_key_info": "getApiKeyInfo", + "cursor_get_conversation": "getConversation", + "cursor_launch_agent": "launchAgent", + "cursor_list_agents": "listAgents", + "cursor_list_artifacts": "listArtifacts", + "cursor_list_models": "listModels", + "cursor_list_repositories": "listRepositories", + "cursor_stop_agent": "stopAgent" + } + }, + "cursor_v2": { + "namespace": "legacy.cursorV2", + "methods": { + "cursor_add_followup": "addFollowUp", + "cursor_delete_agent": "deleteAgent", + "cursor_download_artifact": "downloadArtifact", + "cursor_get_agent": "getAgentStatus", + "cursor_get_api_key_info": "getApiKeyInfo", + "cursor_get_conversation": "getConversation", + "cursor_launch_agent": "launchAgent", + "cursor_list_agents": "listAgents", + "cursor_list_artifacts": "listArtifacts", + "cursor_list_models": "listModels", + "cursor_list_repositories": "listRepositories", + "cursor_stop_agent": "stopAgent" + } + }, + "cursor_v3": { + "namespace": "cursor", + "methods": { + "cursor_add_followup": "addFollowUp", + "cursor_delete_agent": "deleteAgent", + "cursor_download_artifact": "downloadArtifact", + "cursor_get_agent": "getAgentStatus", + "cursor_get_api_key_info": "getApiKeyInfo", + "cursor_get_conversation": "getConversation", + "cursor_launch_agent": "launchAgent", + "cursor_list_agents": "listAgents", + "cursor_list_artifacts": "listArtifacts", + "cursor_list_models": "listModels", + "cursor_list_repositories": "listRepositories", + "cursor_stop_agent": "stopAgent" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "dagster": { + "namespace": "dagster", + "methods": { + "delete_run": "deleteRun", + "get_asset": "getAsset", + "get_run": "getRun", + "get_run_logs": "getRunLogs", + "launch_run": "launchRun", + "list_assets": "listAssets", + "list_jobs": "listJobs", + "list_runs": "listRuns", + "list_schedules": "listSchedules", + "list_sensors": "listSensors", + "materialize_assets": "materializeAssets", + "reexecute_run": "reexecuteRun", + "report_asset_materialization": "reportAssetMaterialization", + "start_schedule": "startSchedule", + "start_sensor": "startSensor", + "stop_schedule": "stopSchedule", + "stop_sensor": "stopSensor", + "terminate_run": "terminateRun", + "wipe_asset": "wipeAsset" + } + }, + "databricks": { + "namespace": "legacy.databricks", + "methods": { + "cancel_all_runs": "cancelAllRuns", + "cancel_run": "cancelRun", + "cancel_statement": "cancelStatement", + "create_cluster": "createCluster", + "create_job": "createJob", + "create_warehouse": "createWarehouse", + "delete_cluster": "deleteCluster", + "delete_job": "deleteJob", + "delete_run": "deleteRun", + "delete_warehouse": "deleteWarehouse", + "edit_cluster": "editCluster", + "edit_warehouse": "editWarehouse", + "execute_sql": "executeSql", + "genie_agent_ask": "askGenieAgent", + "genie_agent_cancel": "cancelGenieAgentResponse", + "genie_agent_list_items": "listGenieAgentItems", + "genie_ask": "askGenie", + "genie_create_space": "createGenieSpace", + "genie_delete_conversation": "deleteGenieConversation", + "genie_delete_message": "deleteGenieMessage", + "genie_delete_space": "trashGenieSpace", + "genie_download_visualization": "downloadGenieVisualization", + "genie_execute_query": "executeGenieQuery", + "genie_get_message": "getGenieMessage", + "genie_get_query_result": "getGenieQueryResult", + "genie_get_space": "getGenieSpace", + "genie_list_conversations": "listGenieConversations", + "genie_list_messages": "listGenieMessages", + "genie_list_spaces": "listGenieSpaces", + "genie_send_feedback": "sendGenieFeedback", + "genie_update_space": "updateGenieSpace", + "get_cluster": "getCluster", + "get_job": "getJob", + "get_run": "getRun", + "get_run_output": "getRunOutput", + "get_statement": "getStatement", + "get_statement_chunk": "getStatementChunk", + "get_warehouse": "getWarehouse", + "list_clusters": "listClusters", + "list_jobs": "listJobs", + "list_runs": "listRuns", + "list_warehouses": "listWarehouses", + "repair_run": "repairRun", + "reset_job": "resetJob", + "resize_cluster": "resizeCluster", + "restart_cluster": "restartCluster", + "run_job": "runJob", + "start_cluster": "startCluster", + "start_warehouse": "startWarehouse", + "stop_warehouse": "stopWarehouse", + "submit_run": "submitRun", + "terminate_cluster": "terminateCluster", + "update_job": "updateJob" + } + }, + "databricks_v2": { + "namespace": "databricks", + "methods": { + "cancel_all_runs": "cancelAllRuns", + "cancel_run": "cancelRun", + "cancel_statement": "cancelStatement", + "create_cluster": "createCluster", + "create_job": "createJob", + "create_warehouse": "createWarehouse", + "delete_cluster": "deleteCluster", + "delete_job": "deleteJob", + "delete_run": "deleteRun", + "delete_warehouse": "deleteWarehouse", + "edit_cluster": "editCluster", + "edit_warehouse": "editWarehouse", + "execute_sql": "executeSql", + "genie_agent_ask": "askGenieAgent", + "genie_agent_cancel": "cancelGenieAgentResponse", + "genie_agent_list_items": "listGenieAgentItems", + "genie_ask": "askGenie", + "genie_create_space": "createGenieSpace", + "genie_delete_conversation": "deleteGenieConversation", + "genie_delete_message": "deleteGenieMessage", + "genie_delete_space": "trashGenieSpace", + "genie_download_visualization": "downloadGenieVisualization", + "genie_execute_query": "executeGenieQuery", + "genie_get_message": "getGenieMessage", + "genie_get_query_result": "getGenieQueryResult", + "genie_get_space": "getGenieSpace", + "genie_list_conversations": "listGenieConversations", + "genie_list_messages": "listGenieMessages", + "genie_list_spaces": "listGenieSpaces", + "genie_send_feedback": "sendGenieFeedback", + "genie_update_space": "updateGenieSpace", + "get_cluster": "getCluster", + "get_job": "getJob", + "get_run": "getRun", + "get_run_output": "getRunOutput", + "get_statement": "getStatement", + "get_statement_chunk": "getStatementChunk", + "get_warehouse": "getWarehouse", + "list_clusters": "listClusters", + "list_jobs": "listJobs", + "list_runs": "listRuns", + "list_warehouses": "listWarehouses", + "repair_run": "repairRun", + "reset_job": "resetJob", + "resize_cluster": "resizeCluster", + "restart_cluster": "restartCluster", + "run_job": "runJob", + "start_cluster": "startCluster", + "start_warehouse": "startWarehouse", + "stop_warehouse": "stopWarehouse", + "submit_run": "submitRun", + "terminate_cluster": "terminateCluster", + "update_job": "updateJob" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "datadog": { + "namespace": "legacy.datadog", + "methods": { + "datadog_add_incident_todo": "addIncidentTodo", + "datadog_cancel_downtime": "cancelDowntime", + "datadog_create_dashboard": "createDashboard", + "datadog_create_downtime": "createDowntime", + "datadog_create_event": "createEvent", + "datadog_create_incident": "createIncident", + "datadog_create_monitor": "createMonitor", + "datadog_create_slo": "createSlo", + "datadog_delete_dashboard": "deleteDashboard", + "datadog_delete_slo": "deleteSlo", + "datadog_get_browser_synthetics_results": "getBrowserSyntheticTestResults", + "datadog_get_dashboard": "getDashboard", + "datadog_get_incident": "getIncident", + "datadog_get_monitor": "getMonitor", + "datadog_get_security_signal": "getSecuritySignal", + "datadog_get_slo": "getSlo", + "datadog_get_slo_history": "getSloHistory", + "datadog_get_synthetics_results": "getSyntheticTestResults", + "datadog_get_synthetics_test": "getSyntheticTest", + "datadog_list_dashboards": "listDashboards", + "datadog_list_downtimes": "listDowntimes", + "datadog_list_incidents": "listIncidents", + "datadog_list_monitors": "listMonitors", + "datadog_list_security_rules": "listSecurityRules", + "datadog_list_security_signals": "listSecuritySignals", + "datadog_list_services": "listServices", + "datadog_list_slos": "listSlos", + "datadog_list_synthetics_tests": "listSyntheticTests", + "datadog_mute_monitor": "muteMonitor", + "datadog_query_logs": "queryLogs", + "datadog_query_timeseries": "queryTimeseries", + "datadog_search_spans": "searchSpans", + "datadog_send_logs": "sendLogs", + "datadog_submit_metrics": "submitMetrics", + "datadog_trigger_synthetics_tests": "triggerSyntheticTests", + "datadog_unmute_monitor": "unmuteMonitor", + "datadog_update_incident": "updateIncident", + "datadog_update_security_signal_assignee": "assignSecuritySignal", + "datadog_update_security_signal_state": "updateSecuritySignalState", + "datadog_update_slo": "updateSlo", + "datadog_update_synthetics_status": "pauseOrStartSyntheticTest" + } + }, + "datadog_v2": { + "namespace": "datadog", + "methods": { + "datadog_add_incident_todo": "addIncidentTodo", + "datadog_cancel_downtime": "cancelDowntime", + "datadog_create_dashboard": "createDashboard", + "datadog_create_downtime": "createDowntime", + "datadog_create_event": "createEvent", + "datadog_create_incident": "createIncident", + "datadog_create_monitor": "createMonitor", + "datadog_create_slo": "createSlo", + "datadog_delete_dashboard": "deleteDashboard", + "datadog_delete_slo": "deleteSlo", + "datadog_get_browser_synthetics_results": "getBrowserSyntheticTestResults", + "datadog_get_dashboard": "getDashboard", + "datadog_get_incident": "getIncident", + "datadog_get_monitor": "getMonitor", + "datadog_get_security_signal": "getSecuritySignal", + "datadog_get_slo": "getSlo", + "datadog_get_slo_history": "getSloHistory", + "datadog_get_synthetics_results": "getSyntheticTestResults", + "datadog_get_synthetics_test": "getSyntheticTest", + "datadog_list_dashboards": "listDashboards", + "datadog_list_downtimes": "listDowntimes", + "datadog_list_incidents": "listIncidents", + "datadog_list_monitors": "listMonitors", + "datadog_list_security_rules": "listSecurityRules", + "datadog_list_security_signals": "listSecuritySignals", + "datadog_list_services": "listServices", + "datadog_list_slos": "listSlos", + "datadog_list_synthetics_tests": "listSyntheticTests", + "datadog_mute_monitor": "muteMonitor", + "datadog_query_logs": "queryLogs", + "datadog_query_timeseries": "queryTimeseries", + "datadog_search_spans": "searchSpans", + "datadog_send_logs": "sendLogs", + "datadog_submit_metrics": "submitMetrics", + "datadog_trigger_synthetics_tests": "triggerSyntheticTests", + "datadog_unmute_monitor": "unmuteMonitor", + "datadog_update_incident": "updateIncident", + "datadog_update_security_signal_assignee": "assignSecuritySignal", + "datadog_update_security_signal_state": "updateSecuritySignalState", + "datadog_update_slo": "updateSlo", + "datadog_update_synthetics_status": "pauseOrStartSyntheticTest" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "datagma": { + "namespace": "datagma", + "methods": { + "datagma_enrich_company": "enrichCompany", + "datagma_enrich_person": "enrichPerson", + "datagma_find_email": "findEmail", + "datagma_find_phone": "findPhone", + "datagma_get_credits": "getRemainingCredits" + } + }, + "daytona": { + "namespace": "legacy.daytona", + "methods": { + "create_sandbox": "createSandbox", + "delete_sandbox": "deleteSandbox", + "download_file": "downloadFile", + "execute_command": "executeCommand", + "get_sandbox": "getSandbox", + "git_clone": "gitClone", + "list_files": "listFiles", + "list_sandboxes": "listSandboxes", + "run_code": "runCode", + "start_sandbox": "startSandbox", + "stop_sandbox": "stopSandbox", + "upload_file": "uploadFile" + } + }, + "daytona_v2": { + "namespace": "daytona", + "methods": { + "create_sandbox": "createSandbox", + "delete_sandbox": "deleteSandbox", + "download_file": "downloadFile", + "execute_command": "executeCommand", + "get_sandbox": "getSandbox", + "git_clone": "gitClone", + "list_files": "listFiles", + "list_sandboxes": "listSandboxes", + "run_code": "runCode", + "start_sandbox": "startSandbox", + "stop_sandbox": "stopSandbox", + "upload_file": "uploadFile" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "deployments": { + "namespace": "deployments", + "methods": { + "deployments_deploy": "deploy", + "deployments_get_version": "getVersionDetails", + "deployments_list_versions": "listVersions", + "deployments_promote": "promoteVersionToLive", + "deployments_undeploy": "undeploy" + } + }, + "devin": { + "namespace": "legacy.devin", + "methods": { + "append_session_tags": "appendSessionTags", + "archive_session": "archiveSession", + "create_session": "createSession", + "get_session": "getSession", + "get_session_tags": "getSessionTags", + "list_session_attachments": "listSessionAttachments", + "list_session_messages": "listSessionMessages", + "list_sessions": "listSessions", + "replace_session_tags": "replaceSessionTags", + "send_message": "sendMessage", + "terminate_session": "terminateSession" + } + }, + "devin_v2": { + "namespace": "devin", + "methods": { + "append_session_tags": "appendSessionTags", + "archive_session": "archiveSession", + "create_session": "createSession", + "get_session": "getSession", + "get_session_tags": "getSessionTags", + "list_session_attachments": "listSessionAttachments", + "list_session_messages": "listSessionMessages", + "list_sessions": "listSessions", + "replace_session_tags": "replaceSessionTags", + "send_message": "sendMessage", + "terminate_session": "terminateSession" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "discord": { + "namespace": "legacy.discord", + "methods": { + "discord_add_reaction": "addReaction", + "discord_archive_thread": "archiveThread", + "discord_assign_role": "assignRole", + "discord_ban_member": "banMember", + "discord_bulk_delete_messages": "bulkDeleteMessages", + "discord_create_channel": "createChannel", + "discord_create_invite": "createInvite", + "discord_create_role": "createRole", + "discord_create_thread": "createThread", + "discord_create_webhook": "createWebhook", + "discord_delete_channel": "deleteChannel", + "discord_delete_invite": "deleteInvite", + "discord_delete_message": "deleteMessage", + "discord_delete_role": "deleteRole", + "discord_delete_webhook": "deleteWebhook", + "discord_edit_message": "editMessage", + "discord_execute_webhook": "executeWebhook", + "discord_get_channel": "getChannel", + "discord_get_invite": "getInvite", + "discord_get_member": "getMember", + "discord_get_messages": "getChannelMessages", + "discord_get_pinned_messages": "getPinnedMessages", + "discord_get_server": "getServerInformation", + "discord_get_user": "getUserInformation", + "discord_get_webhook": "getWebhook", + "discord_join_thread": "joinThread", + "discord_kick_member": "kickMember", + "discord_leave_thread": "leaveThread", + "discord_list_channels": "listChannels", + "discord_list_roles": "listRoles", + "discord_pin_message": "pinMessage", + "discord_remove_reaction": "removeReaction", + "discord_remove_role": "removeRole", + "discord_send_message": "sendMessage", + "discord_unban_member": "unbanMember", + "discord_unpin_message": "unpinMessage", + "discord_update_channel": "updateChannel", + "discord_update_member": "updateMember", + "discord_update_role": "updateRole" + } + }, + "discord_v2": { + "namespace": "discord", + "methods": { + "discord_add_reaction": "addReaction", + "discord_archive_thread": "archiveThread", + "discord_assign_role": "assignRole", + "discord_ban_member": "banMember", + "discord_bulk_delete_messages": "bulkDeleteMessages", + "discord_create_channel": "createChannel", + "discord_create_invite": "createInvite", + "discord_create_role": "createRole", + "discord_create_thread": "createThread", + "discord_create_webhook": "createWebhook", + "discord_delete_channel": "deleteChannel", + "discord_delete_invite": "deleteInvite", + "discord_delete_message": "deleteMessage", + "discord_delete_role": "deleteRole", + "discord_delete_webhook": "deleteWebhook", + "discord_edit_message": "editMessage", + "discord_execute_webhook": "executeWebhook", + "discord_get_channel": "getChannel", + "discord_get_invite": "getInvite", + "discord_get_member": "getMember", + "discord_get_messages": "getChannelMessages", + "discord_get_pinned_messages": "getPinnedMessages", + "discord_get_server": "getServerInformation", + "discord_get_user": "getUserInformation", + "discord_get_webhook": "getWebhook", + "discord_join_thread": "joinThread", + "discord_kick_member": "kickMember", + "discord_leave_thread": "leaveThread", + "discord_list_channels": "listChannels", + "discord_list_roles": "listRoles", + "discord_pin_message": "pinMessage", + "discord_remove_reaction": "removeReaction", + "discord_remove_role": "removeRole", + "discord_send_message": "sendMessage", + "discord_unban_member": "unbanMember", + "discord_unpin_message": "unpinMessage", + "discord_update_channel": "updateChannel", + "discord_update_member": "updateMember", + "discord_update_role": "updateRole" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "docusign": { + "namespace": "docusign", + "methods": { + "create_from_template": "sendFromTemplate", + "download_document": "downloadDocument", + "get_envelope": "getEnvelope", + "list_envelopes": "listEnvelopes", + "list_recipients": "listRecipients", + "list_templates": "listTemplates", + "send_envelope": "sendEnvelope", + "void_envelope": "voidEnvelope" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "downdetector": { + "namespace": "downdetector", + "methods": { + "downdetector_get_company": "getCompany", + "downdetector_get_company_attribution": "getCompanyAttribution", + "downdetector_get_company_baseline": "getCompanyBaseline", + "downdetector_get_company_events": "getCompanyEvents", + "downdetector_get_company_incidents": "getCompanyIncidents", + "downdetector_get_company_indicators": "getCompanyIndicators", + "downdetector_get_company_last_15": "getCompanyLast15Minutes", + "downdetector_get_company_status": "getCompanyStatus", + "downdetector_get_provider": "getProvider", + "downdetector_get_reports": "getReports", + "downdetector_get_site_companies": "getSiteCompanies", + "downdetector_list_categories": "listCategories", + "downdetector_list_incidents": "listIncidents", + "downdetector_list_sites": "listSites", + "downdetector_search_companies": "searchCompanies" + } + }, + "dropbox": { + "namespace": "legacy.dropbox", + "methods": { + "dropbox_copy": "copyFileFolder", + "dropbox_create_folder": "createFolder", + "dropbox_create_shared_link": "createSharedLink", + "dropbox_delete": "deleteFileFolder", + "dropbox_download": "downloadFile", + "dropbox_get_metadata": "getMetadata", + "dropbox_list_folder": "listFolder", + "dropbox_list_revisions": "listRevisions", + "dropbox_list_shared_links": "listSharedLinks", + "dropbox_move": "moveFileFolder", + "dropbox_restore": "restoreFile", + "dropbox_search": "searchFiles", + "dropbox_upload": "uploadFile" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "dropbox_v2": { + "namespace": "dropbox", + "methods": { + "dropbox_copy": "copyFileFolder", + "dropbox_create_folder": "createFolder", + "dropbox_create_shared_link": "createSharedLink", + "dropbox_delete": "deleteFileFolder", + "dropbox_download": "downloadFile", + "dropbox_get_metadata": "getMetadata", + "dropbox_list_folder": "listFolder", + "dropbox_list_revisions": "listRevisions", + "dropbox_list_shared_links": "listSharedLinks", + "dropbox_move": "moveFileFolder", + "dropbox_restore": "restoreFile", + "dropbox_search": "searchFiles", + "dropbox_upload": "uploadFile" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "dropcontact": { + "namespace": "dropcontact", + "methods": { + "dropcontact_enrich_contact": "enrichContact" + } + }, + "dspy": { + "namespace": "dspy", + "methods": { + "chain_of_thought": "chainOfThought", + "predict": "predict", + "react": "reActAgent" + } + }, + "dub": { + "namespace": "legacy.dub", + "methods": { + "bulk_create_links": "bulkCreateLinks", + "bulk_delete_links": "bulkDeleteLinks", + "bulk_update_links": "bulkUpdateLinks", + "create_link": "createLink", + "create_tag": "createTag", + "delete_link": "deleteLink", + "get_analytics": "getAnalytics", + "get_events": "listEvents", + "get_link": "getLink", + "get_links_count": "countLinks", + "get_qr_code": "getQrCode", + "list_domains": "listDomains", + "list_folders": "listFolders", + "list_links": "listLinks", + "list_tags": "listTags", + "update_link": "updateLink", + "upsert_link": "upsertLink" + } + }, + "dub_v2": { + "namespace": "legacy.dubV2", + "methods": { + "bulk_create_links": "bulkCreateLinks", + "bulk_delete_links": "bulkDeleteLinks", + "bulk_update_links": "bulkUpdateLinks", + "create_link": "createLink", + "create_tag": "createTag", + "delete_link": "deleteLink", + "get_analytics": "getAnalytics", + "get_events": "listEvents", + "get_link": "getLink", + "get_links_count": "countLinks", + "get_qr_code": "getQrCode", + "list_domains": "listDomains", + "list_folders": "listFolders", + "list_links": "listLinks", + "list_tags": "listTags", + "update_link": "updateLink", + "upsert_link": "upsertLink" + } + }, + "dub_v3": { + "namespace": "dub", + "methods": { + "bulk_create_links": "bulkCreateLinks", + "bulk_delete_links": "bulkDeleteLinks", + "bulk_update_links": "bulkUpdateLinks", + "create_link": "createLink", + "create_tag": "createTag", + "delete_link": "deleteLink", + "get_analytics": "getAnalytics", + "get_events": "listEvents", + "get_link": "getLink", + "get_links_count": "countLinks", + "get_qr_code": "getQrCode", + "list_domains": "listDomains", + "list_folders": "listFolders", + "list_links": "listLinks", + "list_tags": "listTags", + "update_link": "updateLink", + "upsert_link": "upsertLink" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "duckduckgo": { + "namespace": "duckduckgo" + }, + "dynamodb": { + "namespace": "legacy.dynamodb", + "methods": { + "delete": "deleteItem", + "get": "getItem", + "introspect": "introspect", + "put": "putItem", + "query": "query", + "scan": "scan", + "update": "updateItem" + } + }, + "dynamodb_v2": { + "namespace": "dynamodb", + "methods": { + "delete": "deleteItem", + "get": "getItem", + "introspect": "introspect", + "put": "putItem", + "query": "query", + "scan": "scan", + "update": "updateItem" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "dynatrace": { + "namespace": "legacy.dynatrace", + "methods": { + "dynatrace_add_problem_comment": "addProblemComment", + "dynatrace_add_tags": "addTags", + "dynatrace_close_problem": "closeProblem", + "dynatrace_create_settings_object": "createSettingsObject", + "dynatrace_create_slo": "createSlo", + "dynatrace_delete_problem_comment": "deleteProblemComment", + "dynatrace_delete_settings_object": "deleteSettingsObject", + "dynatrace_delete_slo": "deleteSlo", + "dynatrace_delete_tag": "deleteTag", + "dynatrace_execute_synthetic_monitors": "executeSyntheticMonitors", + "dynatrace_get_attack": "getAttack", + "dynatrace_get_audit_logs": "getAuditLogs", + "dynatrace_get_entity": "getEntity", + "dynatrace_get_event": "getEvent", + "dynatrace_get_metric": "getMetricDescriptor", + "dynatrace_get_problem": "getProblem", + "dynatrace_get_problem_comment": "getProblemComment", + "dynatrace_get_security_problem": "getSecurityProblem", + "dynatrace_get_settings_object": "getSettingsObject", + "dynatrace_get_slo": "getSlo", + "dynatrace_get_synthetic_batch": "getSyntheticBatch", + "dynatrace_ingest_event": "ingestEvent", + "dynatrace_ingest_logs": "ingestLogs", + "dynatrace_ingest_metrics": "ingestMetrics", + "dynatrace_list_attacks": "listAttacks", + "dynatrace_list_entities": "listEntities", + "dynatrace_list_entity_types": "listEntityTypes", + "dynatrace_list_events": "listEvents", + "dynatrace_list_metrics": "listMetrics", + "dynatrace_list_problem_comments": "listProblemComments", + "dynatrace_list_problems": "listProblems", + "dynatrace_list_remediation_items": "listRemediationItems", + "dynatrace_list_security_problems": "listSecurityProblems", + "dynatrace_list_settings_objects": "listSettingsObjects", + "dynatrace_list_settings_schemas": "listSettingsSchemas", + "dynatrace_list_slos": "listSlos", + "dynatrace_list_synthetic_monitors": "listSyntheticMonitors", + "dynatrace_list_tags": "listTags", + "dynatrace_mute_security_problem": "muteSecurityProblem", + "dynatrace_mute_security_problems": "muteSecurityProblemsBulk", + "dynatrace_query_metrics": "queryMetrics", + "dynatrace_search_logs": "searchLogs", + "dynatrace_unmute_security_problem": "unmuteSecurityProblem", + "dynatrace_unmute_security_problems": "unmuteSecurityProblemsBulk", + "dynatrace_update_problem_comment": "updateProblemComment", + "dynatrace_update_settings_object": "updateSettingsObject", + "dynatrace_update_slo": "updateSlo" + } + }, + "dynatrace_v2": { + "namespace": "dynatrace", + "methods": { + "dynatrace_add_problem_comment": "addProblemComment", + "dynatrace_add_tags": "addTags", + "dynatrace_close_problem": "closeProblem", + "dynatrace_create_settings_object": "createSettingsObject", + "dynatrace_create_slo": "createSlo", + "dynatrace_delete_problem_comment": "deleteProblemComment", + "dynatrace_delete_settings_object": "deleteSettingsObject", + "dynatrace_delete_slo": "deleteSlo", + "dynatrace_delete_tag": "deleteTag", + "dynatrace_execute_synthetic_monitors": "executeSyntheticMonitors", + "dynatrace_get_attack": "getAttack", + "dynatrace_get_audit_logs": "getAuditLogs", + "dynatrace_get_entity": "getEntity", + "dynatrace_get_event": "getEvent", + "dynatrace_get_metric": "getMetricDescriptor", + "dynatrace_get_problem": "getProblem", + "dynatrace_get_problem_comment": "getProblemComment", + "dynatrace_get_security_problem": "getSecurityProblem", + "dynatrace_get_settings_object": "getSettingsObject", + "dynatrace_get_slo": "getSlo", + "dynatrace_get_synthetic_batch": "getSyntheticBatch", + "dynatrace_ingest_event": "ingestEvent", + "dynatrace_ingest_logs": "ingestLogs", + "dynatrace_ingest_metrics": "ingestMetrics", + "dynatrace_list_attacks": "listAttacks", + "dynatrace_list_entities": "listEntities", + "dynatrace_list_entity_types": "listEntityTypes", + "dynatrace_list_events": "listEvents", + "dynatrace_list_metrics": "listMetrics", + "dynatrace_list_problem_comments": "listProblemComments", + "dynatrace_list_problems": "listProblems", + "dynatrace_list_remediation_items": "listRemediationItems", + "dynatrace_list_security_problems": "listSecurityProblems", + "dynatrace_list_settings_objects": "listSettingsObjects", + "dynatrace_list_settings_schemas": "listSettingsSchemas", + "dynatrace_list_slos": "listSlos", + "dynatrace_list_synthetic_monitors": "listSyntheticMonitors", + "dynatrace_list_tags": "listTags", + "dynatrace_mute_security_problem": "muteSecurityProblem", + "dynatrace_mute_security_problems": "muteSecurityProblemsBulk", + "dynatrace_query_metrics": "queryMetrics", + "dynatrace_search_logs": "searchLogs", + "dynatrace_unmute_security_problem": "unmuteSecurityProblem", + "dynatrace_unmute_security_problems": "unmuteSecurityProblemsBulk", + "dynatrace_update_problem_comment": "updateProblemComment", + "dynatrace_update_settings_object": "updateSettingsObject", + "dynatrace_update_slo": "updateSlo" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "ec2": { + "namespace": "legacy.ec2", + "methods": { + "allocate_address": "allocateElasticIp", + "associate_address": "associateElasticIp", + "authorize_security_group_ingress": "authorizeSecurityGroupIngress", + "create_snapshot": "createEbsSnapshot", + "create_tags": "createTags", + "delete_snapshot": "deleteEbsSnapshot", + "delete_tags": "deleteTags", + "delete_volume": "deleteEbsVolume", + "describe_addresses": "describeElasticIps", + "describe_availability_zones": "describeAvailabilityZones", + "describe_images": "describeAmis", + "describe_instance_status": "describeInstanceStatus", + "describe_instances": "describeInstances", + "describe_internet_gateways": "describeInternetGateways", + "describe_key_pairs": "describeKeyPairs", + "describe_nat_gateways": "describeNatGateways", + "describe_network_acls": "describeNetworkAcls", + "describe_network_interfaces": "describeNetworkInterfaces", + "describe_regions": "describeRegions", + "describe_route_tables": "describeRouteTables", + "describe_security_groups": "describeSecurityGroups", + "describe_snapshots": "describeEbsSnapshots", + "describe_subnets": "describeSubnets", + "describe_volumes": "describeEbsVolumes", + "describe_vpc_endpoints": "describeVpcEndpoints", + "describe_vpc_peering_connections": "describeVpcPeeringConnections", + "describe_vpcs": "describeVpcs", + "disassociate_address": "disassociateElasticIp", + "reboot_instances": "rebootInstances", + "release_address": "releaseElasticIp", + "revoke_security_group_ingress": "revokeSecurityGroupIngress", + "start_instances": "startInstances", + "stop_instances": "stopInstances", + "terminate_instances": "terminateInstances" + } + }, + "ec2_v2": { + "namespace": "ec2", + "methods": { + "allocate_address": "allocateElasticIp", + "associate_address": "associateElasticIp", + "authorize_security_group_ingress": "authorizeSecurityGroupIngress", + "create_snapshot": "createEbsSnapshot", + "create_tags": "createTags", + "delete_snapshot": "deleteEbsSnapshot", + "delete_tags": "deleteTags", + "delete_volume": "deleteEbsVolume", + "describe_addresses": "describeElasticIps", + "describe_availability_zones": "describeAvailabilityZones", + "describe_images": "describeAmis", + "describe_instance_status": "describeInstanceStatus", + "describe_instances": "describeInstances", + "describe_internet_gateways": "describeInternetGateways", + "describe_key_pairs": "describeKeyPairs", + "describe_nat_gateways": "describeNatGateways", + "describe_network_acls": "describeNetworkAcls", + "describe_network_interfaces": "describeNetworkInterfaces", + "describe_regions": "describeRegions", + "describe_route_tables": "describeRouteTables", + "describe_security_groups": "describeSecurityGroups", + "describe_snapshots": "describeEbsSnapshots", + "describe_subnets": "describeSubnets", + "describe_volumes": "describeEbsVolumes", + "describe_vpc_endpoints": "describeVpcEndpoints", + "describe_vpc_peering_connections": "describeVpcPeeringConnections", + "describe_vpcs": "describeVpcs", + "disassociate_address": "disassociateElasticIp", + "reboot_instances": "rebootInstances", + "release_address": "releaseElasticIp", + "revoke_security_group_ingress": "revokeSecurityGroupIngress", + "start_instances": "startInstances", + "stop_instances": "stopInstances", + "terminate_instances": "terminateInstances" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "elasticsearch": { + "namespace": "elasticsearch", + "methods": { + "elasticsearch_bulk": "bulkOperations", + "elasticsearch_cluster_health": "clusterHealth", + "elasticsearch_cluster_stats": "clusterStats", + "elasticsearch_count": "countDocuments", + "elasticsearch_create_index": "createIndex", + "elasticsearch_delete_document": "deleteDocument", + "elasticsearch_delete_index": "deleteIndex", + "elasticsearch_get_document": "getDocument", + "elasticsearch_get_index": "getIndexInfo", + "elasticsearch_index_document": "indexDocument", + "elasticsearch_list_indices": "listIndices", + "elasticsearch_search": "search", + "elasticsearch_update_document": "updateDocument" + } + }, + "elevenlabs": { + "namespace": "legacy.elevenlabs", + "methods": { + "audio_isolation": "audioIsolation", + "edit_voice_settings": "editVoiceSettings", + "get_user": "getUserInfo", + "get_voice": "getVoice", + "get_voice_settings": "getVoiceSettings", + "list_models": "listModels", + "list_voices": "listVoices", + "sound_effects": "soundEffects", + "speech_to_speech": "speechToSpeech", + "tts": "textToSpeech" + } + }, + "elevenlabs_v2": { + "namespace": "elevenlabs", + "methods": { + "audio_isolation": "audioIsolation", + "edit_voice_settings": "editVoiceSettings", + "get_user": "getUserInfo", + "get_voice": "getVoice", + "get_voice_settings": "getVoiceSettings", + "list_models": "listModels", + "list_voices": "listVoices", + "sound_effects": "soundEffects", + "speech_to_speech": "speechToSpeech", + "tts": "textToSpeech" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "emailbison": { + "namespace": "legacy.emailbison", + "methods": { + "attach_leads_to_campaign": "attachLeadsToCampaign", + "attach_tags_to_leads": "attachTagsToLeads", + "create_campaign": "createCampaign", + "create_lead": "createLead", + "create_tag": "createTag", + "get_lead": "getLead", + "list_campaigns": "listCampaigns", + "list_leads": "listLeads", + "list_replies": "listReplies", + "list_tags": "listTags", + "update_campaign": "updateCampaign", + "update_campaign_status": "updateCampaignStatus", + "update_lead": "updateLead" + }, + "triggers": { + "emailbison_email_account_added": "emailAccountAdded", + "emailbison_email_account_disconnected": "emailAccountDisconnected", + "emailbison_email_account_reconnected": "emailAccountReconnected", + "emailbison_email_account_removed": "emailAccountRemoved", + "emailbison_email_bounced": "emailBounced", + "emailbison_email_opened": "emailOpened", + "emailbison_email_sent": "emailSent", + "emailbison_lead_first_contacted": "leadFirstContacted", + "emailbison_lead_interested": "leadInterested", + "emailbison_lead_replied": "leadReplied", + "emailbison_lead_unsubscribed": "leadUnsubscribed", + "emailbison_manual_email_sent": "manualEmailSent", + "emailbison_tag_attached": "tagAttached", + "emailbison_tag_removed": "tagRemoved", + "emailbison_untracked_reply_received": "untrackedReplyReceived", + "emailbison_warmup_disabled_causing_bounces": "warmupDisabledCausingBounces", + "emailbison_warmup_disabled_receiving_bounces": "warmupDisabledReceivingBounces" + } + }, + "emailbison_v2": { + "namespace": "emailbison", + "methods": { + "attach_leads_to_campaign": "attachLeadsToCampaign", + "attach_tags_to_leads": "attachTagsToLeads", + "create_campaign": "createCampaign", + "create_lead": "createLead", + "create_tag": "createTag", + "get_lead": "getLead", + "list_campaigns": "listCampaigns", + "list_leads": "listLeads", + "list_replies": "listReplies", + "list_tags": "listTags", + "update_campaign": "updateCampaign", + "update_campaign_status": "updateCampaignStatus", + "update_lead": "updateLead" + }, + "triggers": { + "emailbison_email_account_added": "emailAccountAdded", + "emailbison_email_account_disconnected": "emailAccountDisconnected", + "emailbison_email_account_reconnected": "emailAccountReconnected", + "emailbison_email_account_removed": "emailAccountRemoved", + "emailbison_email_bounced": "emailBounced", + "emailbison_email_opened": "emailOpened", + "emailbison_email_sent": "emailSent", + "emailbison_lead_first_contacted": "leadFirstContacted", + "emailbison_lead_interested": "leadInterested", + "emailbison_lead_replied": "leadReplied", + "emailbison_lead_unsubscribed": "leadUnsubscribed", + "emailbison_manual_email_sent": "manualEmailSent", + "emailbison_tag_attached": "tagAttached", + "emailbison_tag_removed": "tagRemoved", + "emailbison_untracked_reply_received": "untrackedReplyReceived", + "emailbison_warmup_disabled_causing_bounces": "warmupDisabledCausingBounces", + "emailbison_warmup_disabled_receiving_bounces": "warmupDisabledReceivingBounces" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "embeddings": { + "namespace": "embeddings" + }, + "enrich": { + "namespace": "legacy.enrich", + "methods": { + "check_credits": "checkCredits", + "company_funding": "companyFundingTraffic", + "company_lookup": "companyLookup", + "company_revenue": "companyRevenue", + "disposable_email_check": "disposableEmailCheck", + "email_to_ip": "emailToIp", + "email_to_person_lite": "emailToPersonLite", + "email_to_phone": "emailToPhone", + "email_to_profile": "emailToProfile", + "find_email": "findEmail", + "get_post_details": "getPostDetails", + "ip_to_company": "ipToCompany", + "linkedin_profile": "linkedInProfileEnrichment", + "linkedin_to_personal_email": "linkedInToPersonalEmail", + "linkedin_to_work_email": "linkedInToWorkEmail", + "phone_finder": "phoneFinderLinkedIn", + "reverse_hash_lookup": "reverseHashLookup", + "sales_pointer_people": "salesPointerPeople", + "search_company": "searchCompany", + "search_company_activities": "searchCompanyActivities", + "search_company_employees": "searchCompanyEmployees", + "search_jobs": "searchJobs", + "search_logo": "searchLogo", + "search_people": "searchPeople", + "search_people_activities": "searchPeopleActivities", + "search_post_comments": "searchPostComments", + "search_post_comments_by_url": "searchPostCommentsByUrl", + "search_post_reactions": "searchPostReactions", + "search_post_reactions_by_url": "searchPostReactionsByUrl", + "search_posts": "searchPosts", + "search_similar_companies": "searchSimilarCompanies", + "verify_email": "verifyEmail" + } + }, + "enrich_v2": { + "namespace": "enrich", + "methods": { + "check_credits": "checkCredits", + "company_funding": "companyFundingTraffic", + "company_lookup": "companyLookup", + "company_revenue": "companyRevenue", + "disposable_email_check": "disposableEmailCheck", + "email_to_ip": "emailToIp", + "email_to_person_lite": "emailToPersonLite", + "email_to_phone": "emailToPhone", + "email_to_profile": "emailToProfile", + "find_email": "findEmail", + "get_post_details": "getPostDetails", + "ip_to_company": "ipToCompany", + "linkedin_profile": "linkedInProfileEnrichment", + "linkedin_to_personal_email": "linkedInToPersonalEmail", + "linkedin_to_work_email": "linkedInToWorkEmail", + "phone_finder": "phoneFinderLinkedIn", + "reverse_hash_lookup": "reverseHashLookup", + "sales_pointer_people": "salesPointerPeople", + "search_company": "searchCompany", + "search_company_activities": "searchCompanyActivities", + "search_company_employees": "searchCompanyEmployees", + "search_jobs": "searchJobs", + "search_logo": "searchLogo", + "search_people": "searchPeople", + "search_people_activities": "searchPeopleActivities", + "search_post_comments": "searchPostComments", + "search_post_comments_by_url": "searchPostCommentsByUrl", + "search_post_reactions": "searchPostReactions", + "search_post_reactions_by_url": "searchPostReactionsByUrl", + "search_posts": "searchPosts", + "search_similar_companies": "searchSimilarCompanies", + "verify_email": "verifyEmail" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "enrichment": { + "namespace": "enrichment", + "methods": { + "company-domain": "companyDomain", + "company-info": "companyInfo", + "email-verification": "emailVerification", + "linkedin-profile": "linkedInProfile", + "phone-number": "phoneNumber", + "work-email": "workEmail" + } + }, + "enrow": { + "namespace": "enrow", + "methods": { + "enrow_find_email": "findEmail", + "enrow_verify_email": "verifyEmail" + } + }, + "evaluator": { + "namespace": "evaluator" + }, + "exa": { + "namespace": "exa", + "methods": { + "exa_agent": "agent", + "exa_answer": "answer", + "exa_find_similar_links": "findSimilarLinks", + "exa_get_contents": "getContents", + "exa_search": "search" + } + }, + "extend": { + "namespace": "legacy.extend" + }, + "extend_v2": { + "namespace": "legacy.extendV2" + }, + "extend_v3": { + "namespace": "extend", + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "fathom": { + "namespace": "legacy.fathom", + "methods": { + "fathom_get_summary": "getSummary", + "fathom_get_transcript": "getTranscript", + "fathom_list_meeting_types": "listMeetingTypes", + "fathom_list_meetings": "listMeetings", + "fathom_list_team_members": "listTeamMembers", + "fathom_list_teams": "listTeams" + }, + "triggers": { + "fathom_new_meeting": "newMeeting", + "fathom_webhook": "webhook" + } + }, + "fathom_v2": { + "namespace": "fathom", + "methods": { + "fathom_get_summary": "getSummary", + "fathom_get_transcript": "getTranscript", + "fathom_list_meeting_types": "listMeetingTypes", + "fathom_list_meetings": "listMeetings", + "fathom_list_team_members": "listTeamMembers", + "fathom_list_teams": "listTeams" + }, + "triggers": { + "fathom_new_meeting": "newMeeting", + "fathom_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "file": { + "namespace": "legacy.file" + }, + "file_v2": { + "namespace": "legacy.fileV2" + }, + "file_v3": { + "namespace": "legacy.fileV3", + "methods": { + "file_append": "append", + "file_get": "get", + "file_parser_v3": "read", + "file_write": "write" + } + }, + "file_v4": { + "namespace": "legacy.fileV4", + "methods": { + "file_append": "append", + "file_fetch": "fetch", + "file_read": "read", + "file_write": "write" + } + }, + "file_v5": { + "namespace": "fileV5", + "methods": { + "file_append": "append", + "file_compress": "compress", + "file_create_folder": "createFolder", + "file_decompress": "decompress", + "file_delete_folder": "deleteFolder", + "file_edit": "applyEdit", + "file_fetch": "fetch", + "file_get_content": "getContent", + "file_list": "list", + "file_manage_sharing": "manageSharing", + "file_move": "moveFile", + "file_read": "read", + "file_restore_folder": "restoreFolder", + "file_search": "search", + "file_update_folder": "moveFolder", + "file_write": "write" + } + }, + "findymail": { + "namespace": "findymail", + "methods": { + "findymail_find_email_from_linkedin": "findEmailFromLinkedIn", + "findymail_find_email_from_name": "findEmailFromName", + "findymail_find_emails_by_domain": "findEmailsByDomain", + "findymail_find_employees": "findEmployees", + "findymail_find_phone": "findPhone", + "findymail_get_company": "getCompanyInfo", + "findymail_get_credits": "getRemainingCredits", + "findymail_lookup_technologies": "lookupTechnologiesByDomain", + "findymail_reverse_email_lookup": "reverseEmailLookup", + "findymail_search_technologies": "searchTechnologies", + "findymail_verify_email": "verifyEmail" + } + }, + "firecrawl": { + "namespace": "firecrawl", + "methods": { + "agent": "agent", + "batch_scrape": "batchScrape", + "batch_scrape_status": "batchScrapeStatus", + "cancel_crawl": "cancelCrawl", + "crawl": "crawl", + "crawl_status": "crawlStatus", + "credit_usage": "creditUsage", + "enrich": "enrichContactOrCompany", + "extract": "extract", + "extract_status": "extractStatus", + "map": "map", + "parse": "parseDocument", + "scrape": "scrape", + "search": "search" + } + }, + "fireflies": { + "namespace": "legacy.fireflies", + "methods": { + "fireflies_add_to_live_meeting": "addBotToLiveMeeting", + "fireflies_create_bite": "createBite", + "fireflies_delete_transcript": "deleteTranscript", + "fireflies_get_transcript": "getTranscript", + "fireflies_get_user": "getUser", + "fireflies_list_bites": "listBites", + "fireflies_list_contacts": "listContacts", + "fireflies_list_transcripts": "listTranscripts", + "fireflies_list_users": "listUsers", + "fireflies_upload_audio": "uploadAudio" + }, + "triggers": { + "fireflies_transcription_complete": "transcriptionComplete" + } + }, + "fireflies_v2": { + "namespace": "legacy.firefliesV2", + "methods": { + "fireflies_add_to_live_meeting": "addBotToLiveMeeting", + "fireflies_create_bite": "createBite", + "fireflies_delete_transcript": "deleteTranscript", + "fireflies_get_transcript": "getTranscript", + "fireflies_get_user": "getUser", + "fireflies_list_bites": "listBites", + "fireflies_list_contacts": "listContacts", + "fireflies_list_transcripts": "listTranscripts", + "fireflies_list_users": "listUsers", + "fireflies_upload_audio": "uploadAudio" + }, + "triggers": { + "fireflies_transcription_complete": "transcriptionComplete" + } + }, + "fireflies_v3": { + "namespace": "fireflies", + "methods": { + "fireflies_add_to_live_meeting": "addBotToLiveMeeting", + "fireflies_create_bite": "createBite", + "fireflies_delete_transcript": "deleteTranscript", + "fireflies_get_transcript": "getTranscript", + "fireflies_get_user": "getUser", + "fireflies_list_bites": "listBites", + "fireflies_list_contacts": "listContacts", + "fireflies_list_transcripts": "listTranscripts", + "fireflies_list_users": "listUsers", + "fireflies_upload_audio": "uploadAudio" + }, + "triggers": { + "fireflies_transcription_complete": "transcriptionComplete" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "fivetran": { + "namespace": "fivetran", + "methods": { + "cancel_transformation": "cancelTransformation", + "create_connect_card": "createConnectCard", + "create_connection": "createConnection", + "create_destination": "createDestination", + "create_group": "createGroup", + "delete_connection": "deleteConnection", + "get_account_info": "getAccountInfo", + "get_connection": "getConnection", + "get_connection_schema_config": "getSchemaConfig", + "get_connection_warnings": "getConnectionWarnings", + "get_connector_type": "getConnectorType", + "get_destination": "getDestination", + "get_group": "getGroup", + "get_sync_history": "getSyncHistory", + "get_transformation": "getTransformation", + "list_connections": "listConnections", + "list_connector_types": "listConnectorTypes", + "list_destinations": "listDestinations", + "list_groups": "listGroups", + "list_transformations": "listTransformations", + "list_users": "listUsers", + "pause_connection": "pauseConnection", + "reload_connection_schema": "reloadSchema", + "resume_connection": "resumeConnection", + "resync_connection": "reSyncConnection", + "resync_tables": "reSyncTables", + "run_connection_setup_tests": "runConnectionSetupTests", + "run_destination_setup_tests": "runDestinationSetupTests", + "run_transformation": "runTransformation", + "sync_connection": "syncConnection", + "update_connection": "updateConnection", + "update_connection_schema": "updateSchemaSync", + "update_connection_table": "updateTableSync", + "update_schema_config": "updateSchemaConfig" + }, + "triggers": { + "fivetran_connection_failure": "connectionFailure", + "fivetran_connection_successful": "connectionSuccessful", + "fivetran_create_connector": "createConnector", + "fivetran_delete_connector": "deleteConnector", + "fivetran_edit_connector": "editConnector", + "fivetran_force_update_connector": "forceUpdateConnector", + "fivetran_pause_connector": "pauseConnector", + "fivetran_resume_connector": "resumeConnector", + "fivetran_resync_connector": "resyncConnector", + "fivetran_resync_table": "resyncTable", + "fivetran_sync_end": "syncEnd", + "fivetran_sync_start": "syncStart", + "fivetran_transformation_failed": "transformationFailed", + "fivetran_transformation_start": "transformationStart", + "fivetran_transformation_succeeded": "transformationSucceeded", + "fivetran_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "flint": { + "namespace": "legacy.flint", + "methods": { + "flint_create_task": "createTask", + "flint_generate_pages": "generatePages", + "flint_get_task": "getTask" + } + }, + "flint_v2": { + "namespace": "flint", + "methods": { + "flint_create_task": "createTask", + "flint_generate_pages": "generatePages", + "flint_get_task": "getTask" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "flow": { + "namespace": "flow", + "methods": { + "add_link": "addLink", + "create_branch": "createBranch", + "create_comment": "createComment", + "create_entities": "createEntities", + "create_entity": "createEntity", + "delete_comment": "deleteComment", + "delete_entity": "deleteEntity", + "filter_entities": "filterEntities", + "get_comment": "getComment", + "get_data_model": "getDataModel", + "get_entities": "getEntities", + "get_entity_history": "getEntityHistory", + "get_project": "getProject", + "list_branches": "listBranches", + "list_comments": "listComments", + "list_entities": "listEntities", + "list_projects": "listProjects", + "remove_link": "removeLink", + "restore_entity": "restoreEntity", + "search_entities": "searchEntities", + "set_value": "setValue", + "set_values": "setValues", + "update_comment": "updateComment" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "function": { + "namespace": "fn" + }, + "gamma": { + "namespace": "legacy.gamma", + "methods": { + "check_status": "checkStatus", + "generate": "generate", + "generate_from_template": "generateFromTemplate", + "list_folders": "listFolders", + "list_themes": "listThemes" + } + }, + "gamma_v2": { + "namespace": "gamma", + "methods": { + "check_status": "checkStatus", + "generate": "generate", + "generate_from_template": "generateFromTemplate", + "list_folders": "listFolders", + "list_themes": "listThemes" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "gauge": { + "namespace": "gauge", + "methods": { + "gauge_add_tags_to_prompts": "addTagsToPrompts", + "gauge_bulk_update_prompts": "bulkUpdatePrompts", + "gauge_create_prompts": "createPrompts", + "gauge_create_tag": "createTag", + "gauge_create_topic": "createTopic", + "gauge_delete_tag": "deleteTag", + "gauge_get_answer": "getAnswer", + "gauge_get_category": "getCategory", + "gauge_get_current_credential": "getCurrentCredential", + "gauge_get_organization": "getOrganization", + "gauge_get_prompt": "getPrompt", + "gauge_get_query_metadata": "getQueryCatalog", + "gauge_get_tag": "getTag", + "gauge_get_topic": "getTopic", + "gauge_list_answers": "listAnswers", + "gauge_list_brands": "listBrands", + "gauge_list_categories": "listCategories", + "gauge_list_citations": "listCitations", + "gauge_list_organizations": "listOrganizations", + "gauge_list_prompts": "listPrompts", + "gauge_list_tags": "listTags", + "gauge_list_topics": "listTopics", + "gauge_query": "runReportQuery", + "gauge_remove_tags_from_prompts": "removeTagsFromPrompts", + "gauge_rename_topic": "renameTopic", + "gauge_update_prompt": "updatePrompt", + "gauge_update_tag": "updateTag" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "generic_webhook": { + "namespace": "genericWebhook", + "triggers": { + "generic_webhook": "webhook" + } + }, + "github": { + "namespace": "legacy.github", + "methods": { + "github_add_assignees": "addIssueAssignees", + "github_add_labels": "addIssueLabels", + "github_cancel_workflow_run": "cancelWorkflowRun", + "github_check_star": "checkIfStarred", + "github_close_issue": "closeIssue", + "github_close_pr": "closePullRequest", + "github_comment": "createPrComment", + "github_compare_commits": "compareCommits", + "github_create_branch": "createBranch", + "github_create_comment_reaction": "addCommentReaction", + "github_create_file": "createFile", + "github_create_gist": "createGist", + "github_create_issue": "createIssue", + "github_create_issue_reaction": "addIssueReaction", + "github_create_milestone": "createMilestone", + "github_create_pr": "createPullRequest", + "github_create_pr_review": "createPrReview", + "github_create_project": "createProject", + "github_create_release": "createRelease", + "github_delete_branch": "deleteBranch", + "github_delete_comment": "deleteComment", + "github_delete_comment_reaction": "removeCommentReaction", + "github_delete_file": "deleteFile", + "github_delete_gist": "deleteGist", + "github_delete_issue_reaction": "removeIssueReaction", + "github_delete_milestone": "deleteMilestone", + "github_delete_project": "deleteProject", + "github_delete_release": "deleteRelease", + "github_fork_gist": "forkGist", + "github_fork_repo": "forkRepository", + "github_get_branch": "getBranch", + "github_get_branch_protection": "getBranchProtection", + "github_get_commit": "getCommit", + "github_get_file_content": "getFileContent", + "github_get_gist": "getGist", + "github_get_issue": "getIssue", + "github_get_latest_release": "getLatestRelease", + "github_get_milestone": "getMilestone", + "github_get_pr_files": "getPrFiles", + "github_get_project": "getProject", + "github_get_readme": "getReadme", + "github_get_release": "getRelease", + "github_get_tree": "getDirectoryTree", + "github_get_workflow": "getWorkflow", + "github_get_workflow_run": "getWorkflowRun", + "github_issue_comment": "createIssueComment", + "github_latest_commit": "getLatestCommit", + "github_list_branches": "listBranches", + "github_list_commits": "listCommits", + "github_list_forks": "listForks", + "github_list_gists": "listGists", + "github_list_issue_comments": "listIssueComments", + "github_list_issues": "listIssues", + "github_list_milestones": "listMilestones", + "github_list_pr_comments": "listPrComments", + "github_list_projects": "listProjects", + "github_list_prs": "listPullRequests", + "github_list_releases": "listReleases", + "github_list_stargazers": "listStargazers", + "github_list_tags": "listTags", + "github_list_workflow_runs": "listWorkflowRuns", + "github_list_workflows": "listWorkflows", + "github_merge_pr": "mergePullRequest", + "github_pr": "getPrDetails", + "github_remove_label": "removeIssueLabel", + "github_repo_info": "getRepositoryInfo", + "github_request_reviewers": "requestPrReviewers", + "github_rerun_workflow": "rerunWorkflow", + "github_search_code": "searchCode", + "github_search_commits": "searchCommits", + "github_search_issues": "searchIssues", + "github_search_repos": "searchRepositories", + "github_search_users": "searchUsers", + "github_star_gist": "starGist", + "github_star_repo": "starRepository", + "github_trigger_workflow": "triggerWorkflow", + "github_unstar_gist": "unstarGist", + "github_unstar_repo": "unstarRepository", + "github_update_branch_protection": "updateBranchProtection", + "github_update_comment": "updateComment", + "github_update_file": "updateFile", + "github_update_gist": "updateGist", + "github_update_issue": "updateIssue", + "github_update_milestone": "updateMilestone", + "github_update_pr": "updatePullRequest", + "github_update_project": "updateProject", + "github_update_release": "updateRelease" + }, + "triggers": { + "github_issue_closed": "issueClosed", + "github_issue_comment": "issueComment", + "github_issue_opened": "issueOpened", + "github_pr_closed": "prClosed", + "github_pr_comment": "prComment", + "github_pr_merged": "prMerged", + "github_pr_opened": "prOpened", + "github_pr_reviewed": "prReviewed", + "github_push": "push", + "github_release_published": "releasePublished", + "github_workflow_run": "workflowRun" + } + }, + "github_v2": { + "namespace": "legacy.githubV2", + "methods": { + "github_add_assignees": "addIssueAssignees", + "github_add_labels": "addIssueLabels", + "github_cancel_workflow_run": "cancelWorkflowRun", + "github_check_star": "checkIfStarred", + "github_close_issue": "closeIssue", + "github_close_pr": "closePullRequest", + "github_comment": "createPrComment", + "github_compare_commits": "compareCommits", + "github_create_branch": "createBranch", + "github_create_comment_reaction": "addCommentReaction", + "github_create_file": "createFile", + "github_create_gist": "createGist", + "github_create_issue": "createIssue", + "github_create_issue_reaction": "addIssueReaction", + "github_create_milestone": "createMilestone", + "github_create_pr": "createPullRequest", + "github_create_pr_review": "createPrReview", + "github_create_project": "createProject", + "github_create_release": "createRelease", + "github_delete_branch": "deleteBranch", + "github_delete_comment": "deleteComment", + "github_delete_comment_reaction": "removeCommentReaction", + "github_delete_file": "deleteFile", + "github_delete_gist": "deleteGist", + "github_delete_issue_reaction": "removeIssueReaction", + "github_delete_milestone": "deleteMilestone", + "github_delete_project": "deleteProject", + "github_delete_release": "deleteRelease", + "github_fork_gist": "forkGist", + "github_fork_repo": "forkRepository", + "github_get_branch": "getBranch", + "github_get_branch_protection": "getBranchProtection", + "github_get_commit": "getCommit", + "github_get_file_content": "getFileContent", + "github_get_gist": "getGist", + "github_get_issue": "getIssue", + "github_get_latest_release": "getLatestRelease", + "github_get_milestone": "getMilestone", + "github_get_pr_files": "getPrFiles", + "github_get_project": "getProject", + "github_get_readme": "getReadme", + "github_get_release": "getRelease", + "github_get_tree": "getDirectoryTree", + "github_get_workflow": "getWorkflow", + "github_get_workflow_run": "getWorkflowRun", + "github_issue_comment": "createIssueComment", + "github_latest_commit": "getLatestCommit", + "github_list_branches": "listBranches", + "github_list_commits": "listCommits", + "github_list_forks": "listForks", + "github_list_gists": "listGists", + "github_list_issue_comments": "listIssueComments", + "github_list_issues": "listIssues", + "github_list_milestones": "listMilestones", + "github_list_pr_comments": "listPrComments", + "github_list_projects": "listProjects", + "github_list_prs": "listPullRequests", + "github_list_releases": "listReleases", + "github_list_stargazers": "listStargazers", + "github_list_tags": "listTags", + "github_list_workflow_runs": "listWorkflowRuns", + "github_list_workflows": "listWorkflows", + "github_merge_pr": "mergePullRequest", + "github_pr": "getPrDetails", + "github_remove_label": "removeIssueLabel", + "github_repo_info": "getRepositoryInfo", + "github_request_reviewers": "requestPrReviewers", + "github_rerun_workflow": "rerunWorkflow", + "github_search_code": "searchCode", + "github_search_commits": "searchCommits", + "github_search_issues": "searchIssues", + "github_search_repos": "searchRepositories", + "github_search_users": "searchUsers", + "github_star_gist": "starGist", + "github_star_repo": "starRepository", + "github_trigger_workflow": "triggerWorkflow", + "github_unstar_gist": "unstarGist", + "github_unstar_repo": "unstarRepository", + "github_update_branch_protection": "updateBranchProtection", + "github_update_comment": "updateComment", + "github_update_file": "updateFile", + "github_update_gist": "updateGist", + "github_update_issue": "updateIssue", + "github_update_milestone": "updateMilestone", + "github_update_pr": "updatePullRequest", + "github_update_project": "updateProject", + "github_update_release": "updateRelease" + }, + "triggers": { + "github_issue_closed": "issueClosed", + "github_issue_comment": "issueComment", + "github_issue_opened": "issueOpened", + "github_pr_closed": "prClosed", + "github_pr_comment": "prComment", + "github_pr_merged": "prMerged", + "github_pr_opened": "prOpened", + "github_pr_reviewed": "prReviewed", + "github_push": "push", + "github_release_published": "releasePublished", + "github_workflow_run": "workflowRun" + } + }, + "github_v3": { + "namespace": "github", + "methods": { + "github_add_assignees": "addIssueAssignees", + "github_add_labels": "addIssueLabels", + "github_cancel_workflow_run": "cancelWorkflowRun", + "github_check_star": "checkIfStarred", + "github_close_issue": "closeIssue", + "github_close_pr": "closePullRequest", + "github_comment": "createPrComment", + "github_compare_commits": "compareCommits", + "github_create_branch": "createBranch", + "github_create_comment_reaction": "addCommentReaction", + "github_create_file": "createFile", + "github_create_gist": "createGist", + "github_create_issue": "createIssue", + "github_create_issue_reaction": "addIssueReaction", + "github_create_milestone": "createMilestone", + "github_create_pr": "createPullRequest", + "github_create_pr_review": "createPrReview", + "github_create_project": "createProject", + "github_create_release": "createRelease", + "github_delete_branch": "deleteBranch", + "github_delete_comment": "deleteComment", + "github_delete_comment_reaction": "removeCommentReaction", + "github_delete_file": "deleteFile", + "github_delete_gist": "deleteGist", + "github_delete_issue_reaction": "removeIssueReaction", + "github_delete_milestone": "deleteMilestone", + "github_delete_project": "deleteProject", + "github_delete_release": "deleteRelease", + "github_fork_gist": "forkGist", + "github_fork_repo": "forkRepository", + "github_get_branch": "getBranch", + "github_get_branch_protection": "getBranchProtection", + "github_get_commit": "getCommit", + "github_get_file_content": "getFileContent", + "github_get_gist": "getGist", + "github_get_issue": "getIssue", + "github_get_latest_release": "getLatestRelease", + "github_get_milestone": "getMilestone", + "github_get_pr_files": "getPrFiles", + "github_get_project": "getProject", + "github_get_readme": "getReadme", + "github_get_release": "getRelease", + "github_get_tree": "getDirectoryTree", + "github_get_workflow": "getWorkflow", + "github_get_workflow_run": "getWorkflowRun", + "github_issue_comment": "createIssueComment", + "github_latest_commit": "getLatestCommit", + "github_list_branches": "listBranches", + "github_list_commits": "listCommits", + "github_list_forks": "listForks", + "github_list_gists": "listGists", + "github_list_issue_comments": "listIssueComments", + "github_list_issues": "listIssues", + "github_list_milestones": "listMilestones", + "github_list_pr_comments": "listPrComments", + "github_list_projects": "listProjects", + "github_list_prs": "listPullRequests", + "github_list_releases": "listReleases", + "github_list_stargazers": "listStargazers", + "github_list_tags": "listTags", + "github_list_workflow_runs": "listWorkflowRuns", + "github_list_workflows": "listWorkflows", + "github_merge_pr": "mergePullRequest", + "github_pr": "getPrDetails", + "github_remove_label": "removeIssueLabel", + "github_repo_info": "getRepositoryInfo", + "github_request_reviewers": "requestPrReviewers", + "github_rerun_workflow": "rerunWorkflow", + "github_search_code": "searchCode", + "github_search_commits": "searchCommits", + "github_search_issues": "searchIssues", + "github_search_repos": "searchRepositories", + "github_search_users": "searchUsers", + "github_star_gist": "starGist", + "github_star_repo": "starRepository", + "github_trigger_workflow": "triggerWorkflow", + "github_unstar_gist": "unstarGist", + "github_unstar_repo": "unstarRepository", + "github_update_branch_protection": "updateBranchProtection", + "github_update_comment": "updateComment", + "github_update_file": "updateFile", + "github_update_gist": "updateGist", + "github_update_issue": "updateIssue", + "github_update_milestone": "updateMilestone", + "github_update_pr": "updatePullRequest", + "github_update_project": "updateProject", + "github_update_release": "updateRelease" + }, + "triggers": { + "github_issue_closed": "issueClosed", + "github_issue_comment": "issueComment", + "github_issue_opened": "issueOpened", + "github_pr_closed": "prClosed", + "github_pr_comment": "prComment", + "github_pr_merged": "prMerged", + "github_pr_opened": "prOpened", + "github_pr_reviewed": "prReviewed", + "github_push": "push", + "github_release_published": "releasePublished", + "github_workflow_run": "workflowRun" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "gitlab": { + "namespace": "legacy.gitlab", + "methods": { + "gitlab_activate_user": "activateUser", + "gitlab_add_member": "addMember", + "gitlab_add_saml_group_link": "addSamlGroupLink", + "gitlab_approve_access_request": "approveAccessRequest", + "gitlab_approve_merge_request": "approveMergeRequest", + "gitlab_approve_user": "approveUserSignup", + "gitlab_ban_user": "banUser", + "gitlab_block_user": "blockUser", + "gitlab_cancel_pipeline": "cancelPipeline", + "gitlab_compare_branches": "compareBranches", + "gitlab_create_branch": "createBranch", + "gitlab_create_file": "createFile", + "gitlab_create_issue": "createIssue", + "gitlab_create_issue_note": "addIssueComment", + "gitlab_create_merge_request": "createMergeRequest", + "gitlab_create_merge_request_note": "addMrComment", + "gitlab_create_pipeline": "createPipeline", + "gitlab_create_release": "createRelease", + "gitlab_create_user": "createUser", + "gitlab_deactivate_user": "deactivateUser", + "gitlab_delete_branch": "deleteBranch", + "gitlab_delete_issue": "deleteIssue", + "gitlab_delete_saml_group_link": "deleteSamlGroupLink", + "gitlab_delete_user": "deleteUser", + "gitlab_delete_user_identity": "deleteUserIdentity", + "gitlab_deny_access_request": "denyAccessRequest", + "gitlab_get_file": "getFile", + "gitlab_get_group": "getGroup", + "gitlab_get_issue": "getIssue", + "gitlab_get_job_log": "getJobLog", + "gitlab_get_merge_request": "getMergeRequest", + "gitlab_get_merge_request_changes": "getMrChanges", + "gitlab_get_pipeline": "getPipeline", + "gitlab_get_project": "getProject", + "gitlab_invite_member": "inviteMemberByEmail", + "gitlab_list_access_requests": "listAccessRequests", + "gitlab_list_branches": "listBranches", + "gitlab_list_commits": "listCommits", + "gitlab_list_groups": "listGroups", + "gitlab_list_invitations": "listInvitations", + "gitlab_list_issues": "listIssues", + "gitlab_list_members": "listMembers", + "gitlab_list_merge_requests": "listMergeRequests", + "gitlab_list_pipeline_jobs": "listPipelineJobs", + "gitlab_list_pipelines": "listPipelines", + "gitlab_list_projects": "listProjects", + "gitlab_list_releases": "listReleases", + "gitlab_list_repository_tree": "listRepositoryTree", + "gitlab_list_saml_group_links": "listSamlGroupLinks", + "gitlab_list_user_memberships": "listUserMemberships", + "gitlab_merge_merge_request": "mergeMergeRequest", + "gitlab_play_job": "playJob", + "gitlab_reject_user": "rejectUserSignup", + "gitlab_remove_member": "removeMember", + "gitlab_retry_pipeline": "retryPipeline", + "gitlab_revoke_invitation": "revokeInvitation", + "gitlab_search_users": "searchUsers", + "gitlab_unban_user": "unbanUser", + "gitlab_unblock_user": "unblockUser", + "gitlab_update_file": "updateFile", + "gitlab_update_invitation": "updateInvitation", + "gitlab_update_issue": "updateIssue", + "gitlab_update_member": "updateMember", + "gitlab_update_merge_request": "updateMergeRequest", + "gitlab_update_user": "updateUser" + }, + "triggers": { + "gitlab_comment": "comment", + "gitlab_issue": "issue", + "gitlab_merge_request": "mergeRequest", + "gitlab_pipeline": "pipeline", + "gitlab_push": "push", + "gitlab_webhook": "webhook" + } + }, + "gitlab_v2": { + "namespace": "gitlab", + "methods": { + "gitlab_activate_user": "activateUser", + "gitlab_add_member": "addMember", + "gitlab_add_saml_group_link": "addSamlGroupLink", + "gitlab_approve_access_request": "approveAccessRequest", + "gitlab_approve_merge_request": "approveMergeRequest", + "gitlab_approve_user": "approveUserSignup", + "gitlab_ban_user": "banUser", + "gitlab_block_user": "blockUser", + "gitlab_cancel_pipeline": "cancelPipeline", + "gitlab_compare_branches": "compareBranches", + "gitlab_create_branch": "createBranch", + "gitlab_create_file": "createFile", + "gitlab_create_issue": "createIssue", + "gitlab_create_issue_note": "addIssueComment", + "gitlab_create_merge_request": "createMergeRequest", + "gitlab_create_merge_request_note": "addMrComment", + "gitlab_create_pipeline": "createPipeline", + "gitlab_create_release": "createRelease", + "gitlab_create_user": "createUser", + "gitlab_deactivate_user": "deactivateUser", + "gitlab_delete_branch": "deleteBranch", + "gitlab_delete_issue": "deleteIssue", + "gitlab_delete_saml_group_link": "deleteSamlGroupLink", + "gitlab_delete_user": "deleteUser", + "gitlab_delete_user_identity": "deleteUserIdentity", + "gitlab_deny_access_request": "denyAccessRequest", + "gitlab_get_file": "getFile", + "gitlab_get_group": "getGroup", + "gitlab_get_issue": "getIssue", + "gitlab_get_job_log": "getJobLog", + "gitlab_get_merge_request": "getMergeRequest", + "gitlab_get_merge_request_changes": "getMrChanges", + "gitlab_get_pipeline": "getPipeline", + "gitlab_get_project": "getProject", + "gitlab_invite_member": "inviteMemberByEmail", + "gitlab_list_access_requests": "listAccessRequests", + "gitlab_list_branches": "listBranches", + "gitlab_list_commits": "listCommits", + "gitlab_list_groups": "listGroups", + "gitlab_list_invitations": "listInvitations", + "gitlab_list_issues": "listIssues", + "gitlab_list_members": "listMembers", + "gitlab_list_merge_requests": "listMergeRequests", + "gitlab_list_pipeline_jobs": "listPipelineJobs", + "gitlab_list_pipelines": "listPipelines", + "gitlab_list_projects": "listProjects", + "gitlab_list_releases": "listReleases", + "gitlab_list_repository_tree": "listRepositoryTree", + "gitlab_list_saml_group_links": "listSamlGroupLinks", + "gitlab_list_user_memberships": "listUserMemberships", + "gitlab_merge_merge_request": "mergeMergeRequest", + "gitlab_play_job": "playJob", + "gitlab_reject_user": "rejectUserSignup", + "gitlab_remove_member": "removeMember", + "gitlab_retry_pipeline": "retryPipeline", + "gitlab_revoke_invitation": "revokeInvitation", + "gitlab_search_users": "searchUsers", + "gitlab_unban_user": "unbanUser", + "gitlab_unblock_user": "unblockUser", + "gitlab_update_file": "updateFile", + "gitlab_update_invitation": "updateInvitation", + "gitlab_update_issue": "updateIssue", + "gitlab_update_member": "updateMember", + "gitlab_update_merge_request": "updateMergeRequest", + "gitlab_update_user": "updateUser" + }, + "triggers": { + "gitlab_comment": "comment", + "gitlab_issue": "issue", + "gitlab_merge_request": "mergeRequest", + "gitlab_pipeline": "pipeline", + "gitlab_push": "push", + "gitlab_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "gmail": { + "namespace": "legacy.gmail", + "methods": { + "add_label_gmail": "addLabel", + "archive_gmail": "archiveEmail", + "delete_gmail": "deleteEmail", + "draft_gmail": "draftEmail", + "edit_draft_gmail": "editDraft", + "mark_read_gmail": "markAsRead", + "mark_unread_gmail": "markAsUnread", + "move_gmail": "moveEmail", + "read_gmail": "readEmail", + "remove_label_gmail": "removeLabel", + "search_gmail": "searchEmail", + "send_gmail": "sendEmail", + "unarchive_gmail": "unarchiveEmail" + }, + "triggers": { + "gmail_poller": "poller" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "oauthCredential": "credential" + } + } + }, + "gmail_v2": { + "namespace": "gmail", + "methods": { + "add_label_gmail": "addLabel", + "archive_gmail": "archiveEmail", + "create_label_gmail": "createLabel", + "delete_draft_gmail": "deleteDraft", + "delete_gmail": "deleteEmail", + "delete_label_gmail": "deleteLabel", + "draft_gmail": "draftEmail", + "edit_draft_gmail": "editDraft", + "get_draft_gmail": "getDraft", + "get_thread_gmail": "getThread", + "list_drafts_gmail": "listDrafts", + "list_labels_gmail": "listLabels", + "list_threads_gmail": "listThreads", + "mark_read_gmail": "markAsRead", + "mark_unread_gmail": "markAsUnread", + "move_gmail": "moveEmail", + "read_gmail": "readEmail", + "remove_label_gmail": "removeLabel", + "search_gmail": "searchEmail", + "send_gmail": "sendEmail", + "trash_thread_gmail": "trashThread", + "unarchive_gmail": "unarchiveEmail", + "untrash_thread_gmail": "untrashThread", + "update_label_gmail": "updateLabel" + }, + "triggers": { + "gmail_poller": "poller" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "oauthCredential": "credential" + } + } + }, + "gong": { + "namespace": "legacy.gong", + "methods": { + "aggregate_activity": "aggregateActivity", + "aggregate_by_period": "aggregateByPeriod", + "answered_scorecards": "answeredScorecards", + "ask_anything": "askAnything", + "assign_flow_prospects": "assignFlowProspects", + "create_call": "createCall", + "day_by_day_activity": "dayByDayActivity", + "get_brief": "getBrief", + "get_call": "getCall", + "get_call_transcript": "getCallTranscript", + "get_coaching": "getCoaching", + "get_extensive_calls": "getExtensiveCalls", + "get_folder_content": "getFolderContent", + "get_logs": "getLogs", + "get_prospect_flows": "getProspectFlows", + "get_user": "getUser", + "interaction_stats": "interactionStats", + "list_calls": "listCalls", + "list_flows": "listFlows", + "list_library_folders": "listLibraryFolders", + "list_scorecards": "listScorecards", + "list_trackers": "listTrackers", + "list_users": "listUsers", + "list_workspaces": "listWorkspaces", + "lookup_email": "lookupEmail", + "lookup_phone": "lookupPhone", + "purge_email_address": "purgeEmailAddress", + "purge_phone_number": "purgePhoneNumber", + "unassign_flow_prospects": "unassignFlowProspects" + }, + "triggers": { + "gong_call_completed": "callCompleted", + "gong_webhook": "webhook" + } + }, + "gong_v2": { + "namespace": "gong", + "methods": { + "aggregate_activity": "aggregateActivity", + "aggregate_by_period": "aggregateByPeriod", + "answered_scorecards": "answeredScorecards", + "ask_anything": "askAnything", + "assign_flow_prospects": "assignFlowProspects", + "create_call": "createCall", + "day_by_day_activity": "dayByDayActivity", + "get_brief": "getBrief", + "get_call": "getCall", + "get_call_transcript": "getCallTranscript", + "get_coaching": "getCoaching", + "get_extensive_calls": "getExtensiveCalls", + "get_folder_content": "getFolderContent", + "get_logs": "getLogs", + "get_prospect_flows": "getProspectFlows", + "get_user": "getUser", + "interaction_stats": "interactionStats", + "list_calls": "listCalls", + "list_flows": "listFlows", + "list_library_folders": "listLibraryFolders", + "list_scorecards": "listScorecards", + "list_trackers": "listTrackers", + "list_users": "listUsers", + "list_workspaces": "listWorkspaces", + "lookup_email": "lookupEmail", + "lookup_phone": "lookupPhone", + "purge_email_address": "purgeEmailAddress", + "purge_phone_number": "purgePhoneNumber", + "unassign_flow_prospects": "unassignFlowProspects" + }, + "triggers": { + "gong_call_completed": "callCompleted", + "gong_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "google_ads": { + "namespace": "googleAds", + "methods": { + "ad_performance": "adPerformance", + "campaign_performance": "campaignPerformance", + "list_ad_groups": "listAdGroups", + "list_campaigns": "listCampaigns", + "list_customers": "listCustomers", + "search": "customQueryGaql" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "google_appsheet": { + "namespace": "googleAppsheet", + "methods": { + "google_appsheet_add_rows": "addRows", + "google_appsheet_delete_rows": "deleteRows", + "google_appsheet_edit_rows": "editRows", + "google_appsheet_find_rows": "findRows" + } + }, + "google_bigquery": { + "namespace": "googleBigquery", + "methods": { + "create_dataset": "createDataset", + "create_table": "createTable", + "delete_dataset": "deleteDataset", + "delete_table": "deleteTable", + "get_query_results": "getQueryResults", + "get_table": "getTable", + "insert_rows": "insertRows", + "list_datasets": "listDatasets", + "list_table_data": "listTableData", + "list_tables": "listTables", + "query": "runQuery" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "google_books": { + "namespace": "googleBooks", + "methods": { + "volume_details": "getVolumeDetails", + "volume_search": "searchVolumes" + } + }, + "google_calendar": { + "namespace": "legacy.googleCalendar", + "methods": { + "create": "createEvent", + "create_calendar": "createCalendar", + "delete": "deleteEvent", + "delete_calendar": "deleteCalendar", + "freebusy": "checkFreeBusy", + "get": "getEvent", + "instances": "getRecurringInstances", + "invite": "inviteAttendees", + "list": "listEvents", + "list_acl": "listSharing", + "list_calendars": "listCalendars", + "move": "moveEvent", + "quick_add": "quickAddNaturalLanguage", + "respond": "respondToInvitationRsvp", + "share_calendar": "shareCalendar", + "unshare_calendar": "removeSharing", + "update": "updateEvent", + "update_acl": "updateSharing", + "update_calendar": "updateCalendar" + }, + "triggers": { + "google_calendar_poller": "poller" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "oauthCredential": "credential" + } + } + }, + "google_calendar_v2": { + "namespace": "googleCalendar", + "methods": { + "create": "createEvent", + "create_calendar": "createCalendar", + "delete": "deleteEvent", + "delete_calendar": "deleteCalendar", + "freebusy": "checkFreeBusy", + "get": "getEvent", + "instances": "getRecurringInstances", + "invite": "inviteAttendees", + "list": "listEvents", + "list_acl": "listSharing", + "list_calendars": "listCalendars", + "move": "moveEvent", + "quick_add": "quickAddNaturalLanguage", + "respond": "respondToInvitationRsvp", + "share_calendar": "shareCalendar", + "unshare_calendar": "removeSharing", + "update": "updateEvent", + "update_acl": "updateSharing", + "update_calendar": "updateCalendar" + }, + "triggers": { + "google_calendar_poller": "poller" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "oauthCredential": "credential" + } + } + }, + "google_contacts": { + "namespace": "googleContacts", + "methods": { + "create": "createContact", + "delete": "deleteContact", + "get": "getContact", + "list": "listContacts", + "search": "searchContacts", + "update": "updateContact" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "google_docs": { + "namespace": "googleDocs", + "methods": { + "create": "createDocument", + "create_named_range": "createNamedRange", + "create_paragraph_bullets": "createBullets", + "delete_content_range": "deleteContentRange", + "delete_named_range": "deleteNamedRange", + "delete_paragraph_bullets": "deleteBullets", + "insert_image": "insertImage", + "insert_page_break": "insertPageBreak", + "insert_table": "insertTable", + "insert_text": "insertText", + "read": "readDocument", + "replace_text": "findReplaceText", + "update_paragraph_style": "applyParagraphStyle", + "update_text_style": "applyTextStyle", + "write": "writeToDocument" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "google_drive": { + "namespace": "googleDrive", + "methods": { + "copy": "copyFile", + "create_comment": "createComment", + "create_file": "createFile", + "create_folder": "createFolder", + "delete": "deletePermanently", + "delete_comment": "deleteComment", + "download": "downloadFile", + "export": "exportFile", + "get_about": "getDriveInfo", + "get_content": "getFileContent", + "get_file": "getFileInfo", + "get_revision": "getRevision", + "list": "listFiles", + "list_comments": "listComments", + "list_permissions": "listPermissions", + "list_revisions": "listRevisions", + "move": "moveFile", + "search": "searchFiles", + "share": "shareFile", + "trash": "moveToTrash", + "unshare": "removeSharing", + "untrash": "restoreFromTrash", + "update": "updateFile", + "upload": "uploadFile" + }, + "triggers": { + "google_drive_poller": "poller" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "oauthCredential": "credential" + } + } + }, + "google_forms": { + "namespace": "googleForms", + "methods": { + "batch_update": "batchUpdate", + "create_form": "createForm", + "create_watch": "createWatch", + "delete_watch": "deleteWatch", + "get_form": "getForm", + "get_responses": "getResponses", + "list_watches": "listWatches", + "renew_watch": "renewWatch", + "set_publish_settings": "setPublishSettings" + }, + "triggers": { + "google_forms_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "google_groups": { + "namespace": "googleGroups", + "methods": { + "add_alias": "addAlias", + "add_member": "addMember", + "create_group": "createGroup", + "delete_group": "deleteGroup", + "get_group": "getGroup", + "get_member": "getMember", + "get_settings": "getSettings", + "has_member": "checkMembership", + "list_aliases": "listAliases", + "list_groups": "listGroups", + "list_members": "listMembers", + "remove_alias": "removeAlias", + "remove_member": "removeMember", + "update_group": "updateGroup", + "update_member": "updateMemberRole", + "update_settings": "updateSettings" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "google_maps": { + "namespace": "googleMaps", + "methods": { + "air_quality": "airQuality", + "directions": "getDirections", + "distance_matrix": "distanceMatrix", + "elevation": "getElevation", + "geocode": "geocodeAddress", + "geolocate": "geolocateWiFiCell", + "place_details": "placeDetails", + "places_nearby": "nearbyPlaces", + "places_search": "searchPlaces", + "pollen": "pollenForecast", + "reverse_geocode": "reverseGeocode", + "snap_to_roads": "snapToRoads", + "solar": "solarPotential", + "speed_limits": "speedLimits", + "timezone": "getTimezone", + "validate_address": "validateAddress" + } + }, + "google_meet": { + "namespace": "googleMeet", + "methods": { + "create_space": "createSpace", + "end_conference": "endConference", + "get_conference_record": "getConferenceRecord", + "get_space": "getSpace", + "list_conference_records": "listConferenceRecords", + "list_participants": "listParticipants" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "google_pagespeed": { + "namespace": "googlePagespeed" + }, + "google_search": { + "namespace": "googleSearch" + }, + "google_sheets": { + "namespace": "legacy.googleSheets", + "methods": { + "append": "appendData", + "read": "readData", + "update": "updateData", + "write": "writeData" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "google_sheets_v2": { + "namespace": "googleSheets", + "methods": { + "append": "appendData", + "batch_clear": "batchClear", + "batch_get": "batchRead", + "batch_update": "batchUpdate", + "clear": "clearData", + "copy_sheet": "copySheet", + "create": "createSpreadsheet", + "delete_rows": "deleteRows", + "delete_sheet": "deleteSheet", + "delete_spreadsheet": "deleteSpreadsheet", + "get_info": "getSpreadsheetInfo", + "read": "readData", + "update": "updateData", + "write": "writeData" + }, + "triggers": { + "google_sheets_poller": "poller" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "oauthCredential": "credential" + } + } + }, + "google_slides": { + "namespace": "legacy.googleSlides", + "methods": { + "add_image": "addImage", + "add_slide": "addSlide", + "batch_update": "batchUpdateRaw", + "copy_presentation": "copyPresentation", + "create": "createPresentation", + "create_line": "createLine", + "create_paragraph_bullets": "createParagraphBullets", + "create_shape": "createShape", + "create_sheets_chart": "embedSheetsChart", + "create_table": "createTable", + "create_video": "embedVideo", + "delete_object": "deleteObject", + "delete_paragraph_bullets": "deleteParagraphBullets", + "delete_table_column": "deleteTableColumn", + "delete_table_row": "deleteTableRow", + "delete_text": "deleteText", + "duplicate_object": "duplicateObject", + "export_presentation": "exportPresentation", + "get_page": "getPage", + "get_thumbnail": "getThumbnail", + "group_objects": "groupObjects", + "insert_table_columns": "insertTableColumns", + "insert_table_rows": "insertTableRows", + "insert_text": "insertText", + "merge_table_cells": "mergeTableCells", + "read": "readPresentation", + "refresh_sheets_chart": "refreshSheetsChart", + "reorder_slides": "reorderSlides", + "replace_all_shapes_with_image": "replaceAllShapesWithImage", + "replace_all_shapes_with_sheets_chart": "replaceAllShapesWithSheetsChart", + "replace_all_text": "replaceAllText", + "replace_image": "replaceImage", + "reroute_line": "rerouteLine", + "ungroup_objects": "ungroupObjects", + "unmerge_table_cells": "unmergeTableCells", + "update_image_properties": "updateImageProperties", + "update_line_category": "updateLineCategory", + "update_line_properties": "updateLineProperties", + "update_page_element_alt_text": "updateAltText", + "update_page_element_transform": "updateElementTransform", + "update_page_elements_z_order": "updateZOrder", + "update_page_properties": "updatePageProperties", + "update_paragraph_style": "updateParagraphStyle", + "update_shape_properties": "updateShapeProperties", + "update_slide_properties": "updateSlideProperties", + "update_table_border_properties": "updateTableBorderProperties", + "update_table_cell_properties": "updateTableCellProperties", + "update_table_column_properties": "updateTableColumnProperties", + "update_table_row_properties": "updateTableRowProperties", + "update_text_style": "updateTextStyle", + "update_video_properties": "updateVideoProperties", + "write": "writeToPresentation" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "google_slides_v2": { + "namespace": "googleSlides", + "methods": { + "add_image": "addImage", + "add_slide": "addSlide", + "batch_update": "batchUpdateRaw", + "copy_presentation": "copyPresentation", + "create": "createPresentation", + "create_line": "createLine", + "create_paragraph_bullets": "createParagraphBullets", + "create_shape": "createShape", + "create_sheets_chart": "embedSheetsChart", + "create_table": "createTable", + "create_video": "embedVideo", + "delete_object": "deleteObject", + "delete_paragraph_bullets": "deleteParagraphBullets", + "delete_table_column": "deleteTableColumn", + "delete_table_row": "deleteTableRow", + "delete_text": "deleteText", + "duplicate_object": "duplicateObject", + "export_presentation": "exportPresentation", + "get_page": "getPage", + "get_thumbnail": "getThumbnail", + "group_objects": "groupObjects", + "insert_table_columns": "insertTableColumns", + "insert_table_rows": "insertTableRows", + "insert_text": "insertText", + "merge_table_cells": "mergeTableCells", + "read": "readPresentation", + "refresh_sheets_chart": "refreshSheetsChart", + "reorder_slides": "reorderSlides", + "replace_all_shapes_with_image": "replaceAllShapesWithImage", + "replace_all_shapes_with_sheets_chart": "replaceAllShapesWithSheetsChart", + "replace_all_text": "replaceAllText", + "replace_image": "replaceImage", + "reroute_line": "rerouteLine", + "ungroup_objects": "ungroupObjects", + "unmerge_table_cells": "unmergeTableCells", + "update_image_properties": "updateImageProperties", + "update_line_category": "updateLineCategory", + "update_line_properties": "updateLineProperties", + "update_page_element_alt_text": "updateAltText", + "update_page_element_transform": "updateElementTransform", + "update_page_elements_z_order": "updateZOrder", + "update_page_properties": "updatePageProperties", + "update_paragraph_style": "updateParagraphStyle", + "update_shape_properties": "updateShapeProperties", + "update_slide_properties": "updateSlideProperties", + "update_table_border_properties": "updateTableBorderProperties", + "update_table_cell_properties": "updateTableCellProperties", + "update_table_column_properties": "updateTableColumnProperties", + "update_table_row_properties": "updateTableRowProperties", + "update_text_style": "updateTextStyle", + "update_video_properties": "updateVideoProperties", + "write": "writeToPresentation" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "google_tasks": { + "namespace": "googleTasks", + "methods": { + "create": "createTask", + "delete": "deleteTask", + "get": "getTask", + "list": "listTasks", + "list_task_lists": "listTaskLists", + "update": "updateTask" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "google_translate": { + "namespace": "googleTranslate", + "methods": { + "detect": "detectLanguage", + "text": "translateText" + } + }, + "google_vault": { + "namespace": "googleVault", + "methods": { + "add_held_accounts": "addHeldAccounts", + "add_matters_permissions": "addMatterCollaborator", + "close_matters": "closeMatter", + "create_matters": "createMatter", + "create_matters_export": "createExport", + "create_matters_holds": "createHold", + "create_saved_query": "createSavedQuery", + "delete_matters": "deleteMatter", + "delete_matters_export": "deleteExport", + "delete_matters_holds": "deleteHold", + "delete_saved_query": "deleteSavedQuery", + "download_export_file": "downloadExportFile", + "list_matters": "listMatters", + "list_matters_export": "listExports", + "list_matters_holds": "listHolds", + "list_saved_queries": "listSavedQueries", + "remove_held_accounts": "removeHeldAccounts", + "remove_matters_permissions": "removeMatterCollaborator", + "reopen_matters": "reopenMatter", + "undelete_matters": "undeleteMatter", + "update_matters": "updateMatter", + "update_matters_holds": "updateHold" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "grafana": { + "namespace": "legacy.grafana", + "methods": { + "grafana_check_data_source_health": "checkDataSourceHealth", + "grafana_create_alert_rule": "createAlertRule", + "grafana_create_annotation": "createAnnotation", + "grafana_create_contact_point": "createContactPoint", + "grafana_create_dashboard": "createDashboard", + "grafana_create_folder": "createFolder", + "grafana_delete_alert_rule": "deleteAlertRule", + "grafana_delete_annotation": "deleteAnnotation", + "grafana_delete_contact_point": "deleteContactPoint", + "grafana_delete_dashboard": "deleteDashboard", + "grafana_delete_folder": "deleteFolder", + "grafana_get_alert_rule": "getAlertRule", + "grafana_get_alert_rule_group": "getAlertRuleGroup", + "grafana_get_dashboard": "getDashboard", + "grafana_get_data_source": "getDataSource", + "grafana_get_folder": "getFolder", + "grafana_get_health": "getHealth", + "grafana_list_alert_rules": "listAlertRules", + "grafana_list_annotations": "listAnnotations", + "grafana_list_contact_points": "listContactPoints", + "grafana_list_dashboards": "listDashboards", + "grafana_list_data_sources": "listDataSources", + "grafana_list_folders": "listFolders", + "grafana_move_folder": "moveFolder", + "grafana_query_data_source": "queryDataSource", + "grafana_update_alert_rule": "updateAlertRule", + "grafana_update_annotation": "updateAnnotation", + "grafana_update_contact_point": "updateContactPoint", + "grafana_update_dashboard": "updateDashboard", + "grafana_update_folder": "updateFolder" + } + }, + "grafana_v2": { + "namespace": "grafana", + "methods": { + "grafana_check_data_source_health": "checkDataSourceHealth", + "grafana_create_alert_rule": "createAlertRule", + "grafana_create_annotation": "createAnnotation", + "grafana_create_contact_point": "createContactPoint", + "grafana_create_dashboard": "createDashboard", + "grafana_create_folder": "createFolder", + "grafana_delete_alert_rule": "deleteAlertRule", + "grafana_delete_annotation": "deleteAnnotation", + "grafana_delete_contact_point": "deleteContactPoint", + "grafana_delete_dashboard": "deleteDashboard", + "grafana_delete_folder": "deleteFolder", + "grafana_get_alert_rule": "getAlertRule", + "grafana_get_alert_rule_group": "getAlertRuleGroup", + "grafana_get_dashboard": "getDashboard", + "grafana_get_data_source": "getDataSource", + "grafana_get_folder": "getFolder", + "grafana_get_health": "getHealth", + "grafana_list_alert_rules": "listAlertRules", + "grafana_list_annotations": "listAnnotations", + "grafana_list_contact_points": "listContactPoints", + "grafana_list_dashboards": "listDashboards", + "grafana_list_data_sources": "listDataSources", + "grafana_list_folders": "listFolders", + "grafana_move_folder": "moveFolder", + "grafana_query_data_source": "queryDataSource", + "grafana_update_alert_rule": "updateAlertRule", + "grafana_update_annotation": "updateAnnotation", + "grafana_update_contact_point": "updateContactPoint", + "grafana_update_dashboard": "updateDashboard", + "grafana_update_folder": "updateFolder" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "grain": { + "namespace": "legacy.grain", + "methods": { + "grain_create_hook": "createWebhook", + "grain_delete_hook": "deleteWebhook", + "grain_get_recording": "getRecording", + "grain_get_transcript": "getTranscript", + "grain_list_hooks": "listWebhooks", + "grain_list_meeting_types": "listMeetingTypes", + "grain_list_recordings": "listRecordings", + "grain_list_teams": "listTeams", + "grain_list_views": "listViews" + }, + "triggers": { + "grain_highlight_created": "highlightCreated", + "grain_highlight_updated": "highlightUpdated", + "grain_item_added": "itemAdded", + "grain_item_updated": "itemUpdated", + "grain_recording_created": "recordingCreated", + "grain_recording_updated": "recordingUpdated", + "grain_story_created": "storyCreated", + "grain_webhook": "webhook" + } + }, + "grain_v2": { + "namespace": "legacy.grainV2", + "methods": { + "grain_create_hook_v2": "createWebhook", + "grain_delete_hook_v2": "deleteWebhook", + "grain_get_recording": "getRecording", + "grain_get_transcript": "getTranscript", + "grain_list_hooks_v2": "listWebhooks", + "grain_list_meeting_types": "listMeetingTypes", + "grain_list_recordings": "listRecordings", + "grain_list_teams": "listTeams" + }, + "triggers": { + "grain_all_events_v2": "allEvents", + "grain_highlight_added_v2": "highlightAdded", + "grain_highlight_deleted_v2": "highlightDeleted", + "grain_highlight_updated_v2": "highlightUpdated", + "grain_recording_added_v2": "recordingAdded", + "grain_recording_deleted_v2": "recordingDeleted", + "grain_recording_updated_v2": "recordingUpdated", + "grain_story_added_v2": "storyAdded", + "grain_story_deleted_v2": "storyDeleted", + "grain_story_updated_v2": "storyUpdated", + "grain_upload_status_v2": "uploadStatus" + } + }, + "grain_v3": { + "namespace": "grain", + "methods": { + "grain_create_hook_v2": "createWebhook", + "grain_delete_hook_v2": "deleteWebhook", + "grain_get_recording": "getRecording", + "grain_get_transcript": "getTranscript", + "grain_list_hooks_v2": "listWebhooks", + "grain_list_meeting_types": "listMeetingTypes", + "grain_list_recordings": "listRecordings", + "grain_list_teams": "listTeams" + }, + "triggers": { + "grain_all_events_v2": "allEvents", + "grain_highlight_added_v2": "highlightAdded", + "grain_highlight_deleted_v2": "highlightDeleted", + "grain_highlight_updated_v2": "highlightUpdated", + "grain_recording_added_v2": "recordingAdded", + "grain_recording_deleted_v2": "recordingDeleted", + "grain_recording_updated_v2": "recordingUpdated", + "grain_story_added_v2": "storyAdded", + "grain_story_deleted_v2": "storyDeleted", + "grain_story_updated_v2": "storyUpdated", + "grain_upload_status_v2": "uploadStatus" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "granola": { + "namespace": "legacy.granola", + "methods": { + "create_webhook_endpoint": "createWebhookEndpoint", + "delete_webhook_endpoint": "deleteWebhookEndpoint", + "get_note": "getNote", + "get_transcript": "getTranscript", + "list_audit_events": "listAuditEvents", + "list_folders": "listFolders", + "list_notes": "listNotes", + "list_webhook_endpoints": "listWebhookEndpoints", + "update_webhook_endpoint": "updateWebhookEndpoint" + }, + "triggers": { + "granola_note_access_granted": "noteAccessGranted", + "granola_note_edited": "noteEdited", + "granola_note_generated": "noteGenerated", + "granola_webhook": "webhook" + } + }, + "granola_v2": { + "namespace": "granola", + "methods": { + "create_webhook_endpoint": "createWebhookEndpoint", + "delete_webhook_endpoint": "deleteWebhookEndpoint", + "get_note": "getNote", + "get_transcript": "getTranscript", + "list_audit_events": "listAuditEvents", + "list_folders": "listFolders", + "list_notes": "listNotes", + "list_webhook_endpoints": "listWebhookEndpoints", + "update_webhook_endpoint": "updateWebhookEndpoint" + }, + "triggers": { + "granola_note_access_granted": "noteAccessGranted", + "granola_note_edited": "noteEdited", + "granola_note_generated": "noteGenerated", + "granola_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "greenhouse": { + "namespace": "legacy.greenhouse", + "methods": { + "greenhouse_get_application": "getApplication", + "greenhouse_get_candidate": "getCandidate", + "greenhouse_get_job": "getJob", + "greenhouse_get_user": "getUser", + "greenhouse_list_applications": "listApplications", + "greenhouse_list_candidates": "listCandidates", + "greenhouse_list_departments": "listDepartments", + "greenhouse_list_job_stages": "listJobStages", + "greenhouse_list_jobs": "listJobs", + "greenhouse_list_offices": "listOffices", + "greenhouse_list_users": "listUsers" + }, + "triggers": { + "greenhouse_candidate_hired": "candidateHired", + "greenhouse_candidate_rejected": "candidateRejected", + "greenhouse_candidate_stage_change": "candidateStageChange", + "greenhouse_job_created": "jobCreated", + "greenhouse_job_updated": "jobUpdated", + "greenhouse_new_application": "newApplication", + "greenhouse_offer_created": "offerCreated", + "greenhouse_webhook": "webhook" + } + }, + "greenhouse_v2": { + "namespace": "greenhouse", + "methods": { + "apply_candidate_tag": "applyCandidateTag", + "convert_prospect": "convertProspect", + "create_application": "createApplication", + "create_attachment": "createAttachment", + "create_candidate": "createCandidate", + "create_candidate_tag": "createCandidateTag", + "create_note": "createNote", + "delete_application": "deleteApplication", + "delete_attachment": "deleteAttachment", + "delete_candidate": "deleteCandidate", + "get_application": "getApplication", + "get_candidate": "getCandidate", + "get_job": "getJob", + "get_user": "getUser", + "hire_application": "hireApplication", + "list_application_stages": "listApplicationStages", + "list_applications": "listApplications", + "list_applied_candidate_tags": "listAppliedCandidateTags", + "list_attachments": "listAttachments", + "list_candidate_educations": "listCandidateEducations", + "list_candidate_employments": "listCandidateEmployments", + "list_candidate_tags": "listCandidateTags", + "list_candidates": "listCandidates", + "list_close_reasons": "listCloseReasons", + "list_custom_field_options": "listCustomFieldOptions", + "list_custom_fields": "listCustomFields", + "list_departments": "listDepartments", + "list_email_templates": "listEmailTemplates", + "list_interviews": "listInterviews", + "list_job_hiring_managers": "listJobHiringManagers", + "list_job_interview_stages": "listJobInterviewStages", + "list_job_owners": "listJobOwners", + "list_jobs": "listJobs", + "list_notes": "listNotes", + "list_offers": "listOffers", + "list_offices": "listOffices", + "list_openings": "listOpenings", + "list_prospect_pool_stages": "listProspectPoolStages", + "list_prospect_pools": "listProspectPools", + "list_referrers": "listReferrers", + "list_rejection_reasons": "listRejectionReasons", + "list_scorecards": "listScorecards", + "list_sources": "listSources", + "list_users": "listUsers", + "move_application": "moveApplication", + "reject_application": "rejectApplication", + "remove_candidate_tag": "removeCandidateTag", + "unreject_application": "unrejectApplication", + "update_application": "updateApplication", + "update_candidate": "updateCandidate" + }, + "triggers": { + "greenhouse_candidate_hired": "candidateHired", + "greenhouse_candidate_rejected": "candidateRejected", + "greenhouse_candidate_stage_change": "candidateStageChange", + "greenhouse_job_created": "jobCreated", + "greenhouse_job_updated": "jobUpdated", + "greenhouse_new_application": "newApplication", + "greenhouse_offer_created": "offerCreated", + "greenhouse_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "greptile": { + "namespace": "greptile", + "methods": { + "greptile_index_repo": "indexRepository", + "greptile_query": "query", + "greptile_status": "checkStatus" + } + }, + "guardrails": { + "namespace": "guardrails" + }, + "harmonic": { + "namespace": "harmonic", + "methods": { + "harmonic_batch_get_people": "batchGetPeople", + "harmonic_clear_people_saved_search_net_new_results": "clearPeopleSavedSearchNetNewResults", + "harmonic_enrich_person": "enrichPerson", + "harmonic_get_company_employees": "getCompanyEmployees", + "harmonic_get_email_enrichment_job": "getEmailEnrichmentJob", + "harmonic_get_email_enrichment_usage": "getEmailEnrichmentUsage", + "harmonic_get_enrichment_status": "getEnrichmentStatus", + "harmonic_get_people_saved_search_net_new_results": "getPeopleSavedSearchNetNewResults", + "harmonic_get_people_saved_search_results": "getPeopleSavedSearchResults", + "harmonic_get_person": "getPerson", + "harmonic_list_people_saved_searches": "listPeopleSavedSearches", + "harmonic_search_people_scout": "searchPeopleWithScout", + "harmonic_submit_email_enrichment_job": "submitEmailEnrichmentJob" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "helpscout": { + "namespace": "helpscout", + "methods": { + "assign_conversation": "assignConversation", + "create_conversation": "createConversation", + "create_customer": "createCustomer", + "create_customer_thread": "addCustomerMessage", + "create_note": "addNote", + "create_reply": "replyToConversation", + "delete_conversation": "deleteConversation", + "get_conversation": "getConversation", + "get_current_user": "getCurrentUser", + "get_customer": "getCustomer", + "get_organization": "getOrganization", + "get_saved_reply": "getSavedReply", + "list_conversations": "listConversations", + "list_custom_fields": "listCustomFields", + "list_customer_properties": "listCustomerProperties", + "list_customers": "listCustomers", + "list_folders": "listFolders", + "list_mailboxes": "listInboxes", + "list_organizations": "listOrganizations", + "list_saved_replies": "listSavedReplies", + "list_tags": "listTags", + "list_teams": "listTeams", + "list_threads": "listThreads", + "list_users": "listUsers", + "list_workflows": "listWorkflows", + "move_conversation": "moveConversation", + "run_workflow": "runWorkflow", + "set_conversation_tags": "setConversationTags", + "snooze_conversation": "snoozeConversation", + "unassign_conversation": "unassignConversation", + "unsnooze_conversation": "unsnoozeConversation", + "update_conversation_customer": "changeConversationCustomer", + "update_conversation_status": "updateConversationStatus", + "update_conversation_subject": "updateConversationSubject", + "update_custom_fields": "updateCustomFields", + "update_customer": "updateCustomer", + "update_customer_properties": "updateCustomerProperties" + }, + "triggers": { + "helpscout_agent_replied": "agentReplied", + "helpscout_conversation_assigned": "conversationAssigned", + "helpscout_conversation_created": "conversationCreated", + "helpscout_conversation_deleted": "conversationDeleted", + "helpscout_conversation_merged": "conversationMerged", + "helpscout_conversation_moved": "conversationMoved", + "helpscout_conversation_status_changed": "conversationStatusChanged", + "helpscout_conversation_tags_updated": "conversationTagsUpdated", + "helpscout_customer_created": "customerCreated", + "helpscout_customer_replied": "customerReplied", + "helpscout_customer_updated": "customerUpdated", + "helpscout_note_created": "noteCreated", + "helpscout_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "oauthCredential": "credential" + } + } + }, + "hex": { + "namespace": "legacy.hex", + "methods": { + "cancel_run": "cancelRun", + "create_collection": "createCollection", + "create_group": "createGroup", + "deactivate_user": "deactivateUser", + "delete_group": "deleteGroup", + "get_collection": "getCollection", + "get_data_connection": "getDataConnection", + "get_group": "getGroup", + "get_project": "getProject", + "get_project_runs": "getProjectRuns", + "get_queried_tables": "getQueriedTables", + "get_run_status": "getRunStatus", + "list_collections": "listCollections", + "list_data_connections": "listDataConnections", + "list_groups": "listGroups", + "list_projects": "listProjects", + "list_users": "listUsers", + "run_project": "runProject", + "update_collection": "updateCollection", + "update_group": "updateGroup", + "update_project": "updateProject" + } + }, + "hex_v2": { + "namespace": "hex", + "methods": { + "cancel_run": "cancelRun", + "create_collection": "createCollection", + "create_group": "createGroup", + "deactivate_user": "deactivateUser", + "delete_group": "deleteGroup", + "get_collection": "getCollection", + "get_data_connection": "getDataConnection", + "get_group": "getGroup", + "get_project": "getProject", + "get_project_runs": "getProjectRuns", + "get_queried_tables": "getQueriedTables", + "get_run_status": "getRunStatus", + "list_collections": "listCollections", + "list_data_connections": "listDataConnections", + "list_groups": "listGroups", + "list_projects": "listProjects", + "list_users": "listUsers", + "run_project": "runProject", + "update_collection": "updateCollection", + "update_group": "updateGroup", + "update_project": "updateProject" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "higgsfield": { + "namespace": "higgsfield", + "methods": { + "higgsfield_cancel_request": "cancelRequest", + "higgsfield_create_character": "createCharacter", + "higgsfield_delete_character": "deleteCharacter", + "higgsfield_delete_request": "deleteRequest", + "higgsfield_generate": "generateAnyModel", + "higgsfield_generate_soul_image": "generateSoulImage", + "higgsfield_get_character": "getCharacter", + "higgsfield_get_request_status": "getRequestStatus", + "higgsfield_list_characters": "listCharacters" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "hubspot": { + "namespace": "hubspot", + "methods": { + "add_list_memberships": "addListMembers", + "create_appointment": "createAppointment", + "create_association": "createAssociation", + "create_company": "createCompany", + "create_contact": "createContact", + "create_deal": "createDeal", + "create_email": "createEmail", + "create_line_item": "createLineItem", + "create_list": "createList", + "create_note": "createNote", + "create_ticket": "createTicket", + "delete_association": "deleteAssociation", + "delete_company": "deleteCompany", + "delete_contact": "deleteContact", + "delete_deal": "deleteDeal", + "delete_line_item": "deleteLineItem", + "delete_ticket": "deleteTicket", + "get_appointments": "getAppointments", + "get_association_labels": "getAssociationLabels", + "get_carts": "getCarts", + "get_companies": "getCompanies", + "get_contacts": "getContacts", + "get_deals": "getDeals", + "get_emails": "getEmails", + "get_line_items": "getLineItems", + "get_list_memberships": "getListMembers", + "get_lists": "getLists", + "get_marketing_events": "getMarketingEvents", + "get_notes": "getNotes", + "get_properties": "getProperties", + "get_quotes": "getQuotes", + "get_tickets": "getTickets", + "get_users": "getUsers", + "list_associations": "listAssociations", + "list_owners": "listOwners", + "remove_list_memberships": "removeListMembers", + "search_companies": "searchCompanies", + "search_contacts": "searchContacts", + "search_deals": "searchDeals", + "search_emails": "searchEmails", + "search_line_items": "searchLineItems", + "search_notes": "searchNotes", + "search_quotes": "searchQuotes", + "search_tickets": "searchTickets", + "update_appointment": "updateAppointment", + "update_company": "updateCompany", + "update_contact": "updateContact", + "update_deal": "updateDeal", + "update_line_item": "updateLineItem", + "update_ticket": "updateTicket" + }, + "triggers": { + "hubspot_poller": "poller" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "oauthCredential": "credential" + } + } + }, + "huggingface": { + "namespace": "legacy.huggingface" + }, + "huggingface_v2": { + "namespace": "huggingface", + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "human_in_the_loop": { + "namespace": "legacy.humanInTheLoop" + }, + "human_in_the_loop_v2": { + "namespace": "human" + }, + "hunter": { + "namespace": "hunter", + "methods": { + "hunter_companies_find": "findCompany", + "hunter_discover": "discoverCompanies", + "hunter_domain_search": "domainSearch", + "hunter_email_count": "emailCount", + "hunter_email_finder": "emailFinder", + "hunter_email_verifier": "emailVerifier" + } + }, + "iam": { + "namespace": "legacy.iam", + "methods": { + "add_user_to_group": "addUserToGroup", + "attach_role_policy": "attachRolePolicy", + "attach_user_policy": "attachUserPolicy", + "create_access_key": "createAccessKey", + "create_role": "createRole", + "create_user": "createUser", + "delete_access_key": "deleteAccessKey", + "delete_role": "deleteRole", + "delete_user": "deleteUser", + "detach_role_policy": "detachRolePolicy", + "detach_user_policy": "detachUserPolicy", + "get_policy": "getPolicy", + "get_role": "getRole", + "get_user": "getUser", + "list_access_keys": "listAccessKeys", + "list_attached_role_policies": "listAttachedRolePolicies", + "list_attached_user_policies": "listAttachedUserPolicies", + "list_groups": "listGroups", + "list_policies": "listPolicies", + "list_roles": "listRoles", + "list_users": "listUsers", + "remove_user_from_group": "removeUserFromGroup", + "simulate_principal_policy": "simulatePrincipalPolicy", + "update_access_key": "updateAccessKey" + } + }, + "iam_v2": { + "namespace": "iam", + "methods": { + "add_user_to_group": "addUserToGroup", + "attach_role_policy": "attachRolePolicy", + "attach_user_policy": "attachUserPolicy", + "create_access_key": "createAccessKey", + "create_role": "createRole", + "create_user": "createUser", + "delete_access_key": "deleteAccessKey", + "delete_role": "deleteRole", + "delete_user": "deleteUser", + "detach_role_policy": "detachRolePolicy", + "detach_user_policy": "detachUserPolicy", + "get_policy": "getPolicy", + "get_role": "getRole", + "get_user": "getUser", + "list_access_keys": "listAccessKeys", + "list_attached_role_policies": "listAttachedRolePolicies", + "list_attached_user_policies": "listAttachedUserPolicies", + "list_groups": "listGroups", + "list_policies": "listPolicies", + "list_roles": "listRoles", + "list_users": "listUsers", + "remove_user_from_group": "removeUserFromGroup", + "simulate_principal_policy": "simulatePrincipalPolicy", + "update_access_key": "updateAccessKey" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "icypeas": { + "namespace": "icypeas", + "methods": { + "icypeas_find_email": "findEmail", + "icypeas_verify_email": "verifyEmail" + } + }, + "identity_center": { + "namespace": "legacy.identityCenter", + "methods": { + "check_assignment_deletion_status": "checkAssignmentDeletionStatus", + "check_assignment_status": "checkAssignmentStatus", + "create_account_assignment": "createAccountAssignment", + "delete_account_assignment": "deleteAccountAssignment", + "describe_account": "describeAccount", + "describe_group": "describeGroup", + "describe_user": "describeUser", + "get_group": "getGroup", + "get_user": "getUser", + "list_account_assignments": "listAccountAssignmentsForPrincipal", + "list_accounts": "listAccounts", + "list_assignments_for_account": "listAssignmentsForAccount", + "list_group_memberships": "listGroupMemberships", + "list_groups": "listGroups", + "list_instances": "listInstances", + "list_permission_sets": "listPermissionSets" + } + }, + "identity_center_v2": { + "namespace": "identityCenter", + "methods": { + "check_assignment_deletion_status": "checkAssignmentDeletionStatus", + "check_assignment_status": "checkAssignmentStatus", + "create_account_assignment": "createAccountAssignment", + "delete_account_assignment": "deleteAccountAssignment", + "describe_account": "describeAccount", + "describe_group": "describeGroup", + "describe_user": "describeUser", + "get_group": "getGroup", + "get_user": "getUser", + "list_account_assignments": "listAccountAssignmentsForPrincipal", + "list_accounts": "listAccounts", + "list_assignments_for_account": "listAssignmentsForAccount", + "list_group_memberships": "listGroupMemberships", + "list_groups": "listGroups", + "list_instances": "listInstances", + "list_permission_sets": "listPermissionSets" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "image_generator": { + "namespace": "legacy.imageGenerator" + }, + "image_generator_v2": { + "namespace": "imageGenerator" + }, + "imap": { + "namespace": "imap", + "triggers": { + "imap_poller": "poller" + } + }, + "incidentio": { + "namespace": "legacy.incidentio", + "methods": { + "incidentio_actions_create": "createAction", + "incidentio_actions_list": "listActions", + "incidentio_actions_show": "showAction", + "incidentio_actions_update": "updateAction", + "incidentio_alert_events_create": "createAlertEvent", + "incidentio_alerts_list": "listAlerts", + "incidentio_alerts_resolve": "resolveAlert", + "incidentio_alerts_show": "showAlert", + "incidentio_catalog_entries_list": "listCatalogEntries", + "incidentio_catalog_types_list": "listCatalogTypes", + "incidentio_custom_fields_create": "createCustomField", + "incidentio_custom_fields_delete": "deleteCustomField", + "incidentio_custom_fields_list": "listCustomFields", + "incidentio_custom_fields_show": "showCustomField", + "incidentio_custom_fields_update": "updateCustomField", + "incidentio_escalation_paths_create": "createEscalationPath", + "incidentio_escalation_paths_delete": "deleteEscalationPath", + "incidentio_escalation_paths_list": "listEscalationPaths", + "incidentio_escalation_paths_show": "showEscalationPath", + "incidentio_escalation_paths_update": "updateEscalationPath", + "incidentio_escalations_cancel": "cancelEscalation", + "incidentio_escalations_create": "createEscalation", + "incidentio_escalations_list": "listEscalations", + "incidentio_escalations_show": "showEscalation", + "incidentio_follow_ups_create": "createFollowUp", + "incidentio_follow_ups_list": "listFollowUps", + "incidentio_follow_ups_show": "showFollowUp", + "incidentio_follow_ups_update": "updateFollowUp", + "incidentio_incident_alerts_list": "listIncidentAlerts", + "incidentio_incident_memberships_create": "grantIncidentMembership", + "incidentio_incident_memberships_revoke": "revokeIncidentMembership", + "incidentio_incident_participants_list": "listIncidentParticipants", + "incidentio_incident_roles_create": "createIncidentRole", + "incidentio_incident_roles_delete": "deleteIncidentRole", + "incidentio_incident_roles_list": "listIncidentRoles", + "incidentio_incident_roles_show": "showIncidentRole", + "incidentio_incident_roles_update": "updateIncidentRole", + "incidentio_incident_statuses_list": "listIncidentStatuses", + "incidentio_incident_timestamps_list": "listIncidentTimestamps", + "incidentio_incident_timestamps_show": "showIncidentTimestamp", + "incidentio_incident_types_list": "listIncidentTypes", + "incidentio_incident_updates_list": "listIncidentUpdates", + "incidentio_incidents_create": "createIncident", + "incidentio_incidents_list": "listIncidents", + "incidentio_incidents_show": "showIncident", + "incidentio_incidents_update": "updateIncident", + "incidentio_on_call_now": "getWhoIsOnCall", + "incidentio_schedule_entries_list": "listScheduleEntries", + "incidentio_schedule_overrides_create": "createScheduleOverride", + "incidentio_schedule_overrides_list": "listScheduleOverrides", + "incidentio_schedules_create": "createSchedule", + "incidentio_schedules_delete": "deleteSchedule", + "incidentio_schedules_list": "listSchedules", + "incidentio_schedules_show": "showSchedule", + "incidentio_schedules_update": "updateSchedule", + "incidentio_severities_list": "listSeverities", + "incidentio_teams_list": "listTeams", + "incidentio_teams_show": "showTeam", + "incidentio_users_list": "listUsers", + "incidentio_users_show": "showUser", + "incidentio_workflows_create": "createWorkflow", + "incidentio_workflows_delete": "deleteWorkflow", + "incidentio_workflows_list": "listWorkflows", + "incidentio_workflows_show": "showWorkflow", + "incidentio_workflows_update": "updateWorkflow" + }, + "triggers": { + "incidentio_alert_created": "alertCreated", + "incidentio_incident_created": "incidentCreated", + "incidentio_incident_status_updated": "incidentStatusUpdated", + "incidentio_incident_updated": "incidentUpdated" + } + }, + "incidentio_v2": { + "namespace": "incidentio", + "methods": { + "incidentio_actions_create": "createAction", + "incidentio_actions_list": "listActions", + "incidentio_actions_show": "showAction", + "incidentio_actions_update": "updateAction", + "incidentio_alert_events_create": "createAlertEvent", + "incidentio_alerts_list": "listAlerts", + "incidentio_alerts_resolve": "resolveAlert", + "incidentio_alerts_show": "showAlert", + "incidentio_catalog_entries_list": "listCatalogEntries", + "incidentio_catalog_types_list": "listCatalogTypes", + "incidentio_custom_fields_create": "createCustomField", + "incidentio_custom_fields_delete": "deleteCustomField", + "incidentio_custom_fields_list": "listCustomFields", + "incidentio_custom_fields_show": "showCustomField", + "incidentio_custom_fields_update": "updateCustomField", + "incidentio_escalation_paths_create": "createEscalationPath", + "incidentio_escalation_paths_delete": "deleteEscalationPath", + "incidentio_escalation_paths_list": "listEscalationPaths", + "incidentio_escalation_paths_show": "showEscalationPath", + "incidentio_escalation_paths_update": "updateEscalationPath", + "incidentio_escalations_cancel": "cancelEscalation", + "incidentio_escalations_create": "createEscalation", + "incidentio_escalations_list": "listEscalations", + "incidentio_escalations_show": "showEscalation", + "incidentio_follow_ups_create": "createFollowUp", + "incidentio_follow_ups_list": "listFollowUps", + "incidentio_follow_ups_show": "showFollowUp", + "incidentio_follow_ups_update": "updateFollowUp", + "incidentio_incident_alerts_list": "listIncidentAlerts", + "incidentio_incident_memberships_create": "grantIncidentMembership", + "incidentio_incident_memberships_revoke": "revokeIncidentMembership", + "incidentio_incident_participants_list": "listIncidentParticipants", + "incidentio_incident_roles_create": "createIncidentRole", + "incidentio_incident_roles_delete": "deleteIncidentRole", + "incidentio_incident_roles_list": "listIncidentRoles", + "incidentio_incident_roles_show": "showIncidentRole", + "incidentio_incident_roles_update": "updateIncidentRole", + "incidentio_incident_statuses_list": "listIncidentStatuses", + "incidentio_incident_timestamps_list": "listIncidentTimestamps", + "incidentio_incident_timestamps_show": "showIncidentTimestamp", + "incidentio_incident_types_list": "listIncidentTypes", + "incidentio_incident_updates_list": "listIncidentUpdates", + "incidentio_incidents_create": "createIncident", + "incidentio_incidents_list": "listIncidents", + "incidentio_incidents_show": "showIncident", + "incidentio_incidents_update": "updateIncident", + "incidentio_on_call_now": "getWhoIsOnCall", + "incidentio_schedule_entries_list": "listScheduleEntries", + "incidentio_schedule_overrides_create": "createScheduleOverride", + "incidentio_schedule_overrides_list": "listScheduleOverrides", + "incidentio_schedules_create": "createSchedule", + "incidentio_schedules_delete": "deleteSchedule", + "incidentio_schedules_list": "listSchedules", + "incidentio_schedules_show": "showSchedule", + "incidentio_schedules_update": "updateSchedule", + "incidentio_severities_list": "listSeverities", + "incidentio_teams_list": "listTeams", + "incidentio_teams_show": "showTeam", + "incidentio_users_list": "listUsers", + "incidentio_users_show": "showUser", + "incidentio_workflows_create": "createWorkflow", + "incidentio_workflows_delete": "deleteWorkflow", + "incidentio_workflows_list": "listWorkflows", + "incidentio_workflows_show": "showWorkflow", + "incidentio_workflows_update": "updateWorkflow" + }, + "triggers": { + "incidentio_alert_created": "alertCreated", + "incidentio_incident_created": "incidentCreated", + "incidentio_incident_status_updated": "incidentStatusUpdated", + "incidentio_incident_updated": "incidentUpdated" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "infisical": { + "namespace": "legacy.infisical", + "methods": { + "create_secret": "createSecret", + "delete_secret": "deleteSecret", + "get_secret": "getSecret", + "list_secrets": "listSecrets", + "update_secret": "updateSecret" + } + }, + "infisical_v2": { + "namespace": "infisical", + "methods": { + "create_secret": "createSecret", + "delete_secret": "deleteSecret", + "get_secret": "getSecret", + "list_secrets": "listSecrets", + "update_secret": "updateSecret" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "input_trigger": { + "namespace": "legacy.inputTrigger" + }, + "instagram": { + "namespace": "legacy.instagram", + "methods": { + "instagram_delete_comment": "deleteComment", + "instagram_download_media": "downloadMedia", + "instagram_get_account_insights": "getAccountInsights", + "instagram_get_container_status": "getContainerStatus", + "instagram_get_conversation_messages": "getConversationMessages", + "instagram_get_media": "getMedia", + "instagram_get_media_insights": "getMediaInsights", + "instagram_get_message": "getMessage", + "instagram_get_profile": "getProfile", + "instagram_get_publishing_limit": "getPublishingLimit", + "instagram_hide_comment": "hideComment", + "instagram_list_comments": "listComments", + "instagram_list_conversations": "listConversations", + "instagram_list_media": "listMedia", + "instagram_list_stories": "listStories", + "instagram_private_reply": "privateReply", + "instagram_publish_carousel": "publishCarousel", + "instagram_publish_image": "publishImage", + "instagram_publish_reel": "publishReel", + "instagram_publish_story": "publishStory", + "instagram_publish_video": "publishVideo", + "instagram_reply_to_comment": "replyToComment", + "instagram_send_text_message": "sendTextMessage", + "instagram_set_comments_enabled": "setCommentsEnabled" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "instantly": { + "namespace": "legacy.instantly", + "methods": { + "activate_campaign": "activateCampaign", + "create_campaign": "createCampaign", + "create_lead": "createLead", + "create_lead_list": "createLeadList", + "delete_campaign": "deleteCampaign", + "delete_leads": "deleteLeads", + "get_lead": "getLead", + "list_campaigns": "listCampaigns", + "list_emails": "listEmails", + "list_lead_lists": "listLeadLists", + "list_leads": "listLeads", + "patch_campaign": "patchCampaign", + "patch_lead": "patchLead", + "pause_campaign": "pauseCampaign", + "reply_to_email": "replyToEmail", + "update_lead_interest_status": "updateLeadInterestStatus" + }, + "triggers": { + "instantly_account_error": "accountError", + "instantly_auto_reply_received": "autoReplyReceived", + "instantly_campaign_completed": "campaignCompleted", + "instantly_email_bounced": "emailBounced", + "instantly_email_opened": "emailOpened", + "instantly_email_sent": "emailSent", + "instantly_lead_closed": "leadClosed", + "instantly_lead_interested": "leadInterested", + "instantly_lead_meeting_booked": "leadMeetingBooked", + "instantly_lead_meeting_completed": "leadMeetingCompleted", + "instantly_lead_neutral": "leadNeutral", + "instantly_lead_no_show": "leadNoShow", + "instantly_lead_not_interested": "leadNotInterested", + "instantly_lead_out_of_office": "leadOutOfOffice", + "instantly_lead_unsubscribed": "leadUnsubscribed", + "instantly_lead_wrong_person": "leadWrongPerson", + "instantly_link_clicked": "linkClicked", + "instantly_reply_received": "replyReceived", + "instantly_supersearch_enrichment_completed": "supersearchEnrichmentCompleted", + "instantly_webhook": "webhook" + } + }, + "instantly_v2": { + "namespace": "instantly", + "methods": { + "activate_campaign": "activateCampaign", + "create_campaign": "createCampaign", + "create_lead": "createLead", + "create_lead_list": "createLeadList", + "delete_campaign": "deleteCampaign", + "delete_leads": "deleteLeads", + "get_lead": "getLead", + "list_campaigns": "listCampaigns", + "list_emails": "listEmails", + "list_lead_lists": "listLeadLists", + "list_leads": "listLeads", + "patch_campaign": "patchCampaign", + "patch_lead": "patchLead", + "pause_campaign": "pauseCampaign", + "reply_to_email": "replyToEmail", + "update_lead_interest_status": "updateLeadInterestStatus" + }, + "triggers": { + "instantly_account_error": "accountError", + "instantly_auto_reply_received": "autoReplyReceived", + "instantly_campaign_completed": "campaignCompleted", + "instantly_email_bounced": "emailBounced", + "instantly_email_opened": "emailOpened", + "instantly_email_sent": "emailSent", + "instantly_lead_closed": "leadClosed", + "instantly_lead_interested": "leadInterested", + "instantly_lead_meeting_booked": "leadMeetingBooked", + "instantly_lead_meeting_completed": "leadMeetingCompleted", + "instantly_lead_neutral": "leadNeutral", + "instantly_lead_no_show": "leadNoShow", + "instantly_lead_not_interested": "leadNotInterested", + "instantly_lead_out_of_office": "leadOutOfOffice", + "instantly_lead_unsubscribed": "leadUnsubscribed", + "instantly_lead_wrong_person": "leadWrongPerson", + "instantly_link_clicked": "linkClicked", + "instantly_reply_received": "replyReceived", + "instantly_supersearch_enrichment_completed": "supersearchEnrichmentCompleted", + "instantly_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "intercom": { + "namespace": "legacy.intercom", + "methods": { + "assign_conversation": "assignConversation", + "attach_contact_to_company": "attachContactToCompany", + "close_conversation": "closeConversation", + "create_company": "createCompany", + "create_contact": "createContact", + "create_event": "createEvent", + "create_message": "createMessage", + "create_note": "createNote", + "create_tag": "createTag", + "create_ticket": "createTicket", + "delete_contact": "deleteContact", + "detach_contact_from_company": "detachContactFromCompany", + "get_company": "getCompany", + "get_contact": "getContact", + "get_conversation": "getConversation", + "get_ticket": "getTicket", + "list_admins": "listAdmins", + "list_companies": "listCompanies", + "list_contacts": "listContacts", + "list_conversations": "listConversations", + "list_tags": "listTags", + "open_conversation": "openConversation", + "reply_conversation": "replyToConversation", + "search_contacts": "searchContacts", + "search_conversations": "searchConversations", + "snooze_conversation": "snoozeConversation", + "tag_contact": "tagContact", + "tag_conversation": "tagConversation", + "untag_contact": "untagContact", + "update_contact": "updateContact", + "update_ticket": "updateTicket" + } + }, + "intercom_v2": { + "namespace": "legacy.intercomV2", + "methods": { + "assign_conversation": "assignConversation", + "attach_contact_to_company": "attachContactToCompany", + "close_conversation": "closeConversation", + "create_company": "createCompany", + "create_contact": "createContact", + "create_event": "createEvent", + "create_message": "createMessage", + "create_note": "createNote", + "create_tag": "createTag", + "create_ticket": "createTicket", + "delete_contact": "deleteContact", + "detach_contact_from_company": "detachContactFromCompany", + "get_company": "getCompany", + "get_contact": "getContact", + "get_conversation": "getConversation", + "get_ticket": "getTicket", + "list_admins": "listAdmins", + "list_companies": "listCompanies", + "list_contacts": "listContacts", + "list_conversations": "listConversations", + "list_tags": "listTags", + "open_conversation": "openConversation", + "reply_conversation": "replyToConversation", + "search_contacts": "searchContacts", + "search_conversations": "searchConversations", + "snooze_conversation": "snoozeConversation", + "tag_contact": "tagContact", + "tag_conversation": "tagConversation", + "untag_contact": "untagContact", + "update_contact": "updateContact", + "update_ticket": "updateTicket" + }, + "triggers": { + "intercom_contact_created": "contactCreated", + "intercom_conversation_closed": "conversationClosed", + "intercom_conversation_created": "conversationCreated", + "intercom_conversation_reply": "conversationReply", + "intercom_user_created": "userCreated", + "intercom_webhook": "webhook" + } + }, + "intercom_v3": { + "namespace": "intercom", + "methods": { + "assign_conversation": "assignConversation", + "attach_contact_to_company": "attachContactToCompany", + "close_conversation": "closeConversation", + "create_company": "createCompany", + "create_contact": "createContact", + "create_event": "createEvent", + "create_message": "createMessage", + "create_note": "createNote", + "create_tag": "createTag", + "create_ticket": "createTicket", + "delete_contact": "deleteContact", + "detach_contact_from_company": "detachContactFromCompany", + "get_company": "getCompany", + "get_contact": "getContact", + "get_conversation": "getConversation", + "get_ticket": "getTicket", + "list_admins": "listAdmins", + "list_companies": "listCompanies", + "list_contacts": "listContacts", + "list_conversations": "listConversations", + "list_tags": "listTags", + "open_conversation": "openConversation", + "reply_conversation": "replyToConversation", + "search_contacts": "searchContacts", + "search_conversations": "searchConversations", + "snooze_conversation": "snoozeConversation", + "tag_contact": "tagContact", + "tag_conversation": "tagConversation", + "untag_contact": "untagContact", + "update_contact": "updateContact", + "update_ticket": "updateTicket" + }, + "triggers": { + "intercom_contact_created": "contactCreated", + "intercom_conversation_closed": "conversationClosed", + "intercom_conversation_created": "conversationCreated", + "intercom_conversation_reply": "conversationReply", + "intercom_user_created": "userCreated", + "intercom_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "intune": { + "namespace": "intune", + "methods": { + "intune_get_compliance_policy": "getCompliancePolicy", + "intune_get_detected_app": "getDetectedApp", + "intune_get_device": "getDevice", + "intune_get_device_configuration": "getDeviceConfiguration", + "intune_list_app_devices": "listAppDevices", + "intune_list_compliance_policies": "listCompliancePolicies", + "intune_list_compliance_policy_device_statuses": "listCompliancePolicyDeviceStatuses", + "intune_list_detected_apps": "listDetectedApps", + "intune_list_device_configurations": "listDeviceConfigurations", + "intune_list_devices": "listDevices", + "intune_reboot_device": "rebootDevice", + "intune_remote_lock_device": "remoteLockDevice", + "intune_retire_device": "retireDevice", + "intune_sync_device": "syncDevice" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "jama": { + "namespace": "jama", + "methods": { + "create_comment": "createComment", + "create_item": "createItem", + "create_relationship": "createRelationship", + "delete_item": "deleteItem", + "delete_relationship": "deleteRelationship", + "get_baseline": "getBaseline", + "get_current_user": "getCurrentUser", + "get_filter": "getFilter", + "get_item": "getItem", + "get_item_type": "getItemType", + "get_item_version": "getItemVersion", + "get_project": "getProject", + "get_relationship": "getRelationship", + "get_test_cycle": "getTestCycle", + "get_test_plan": "getTestPlan", + "get_test_run": "getTestRun", + "list_baseline_items": "listBaselineItems", + "list_baselines": "listBaselines", + "list_downstream_items": "listDownstreamItems", + "list_filter_results": "listFilterResults", + "list_filters": "listFilters", + "list_item_children": "listItemChildren", + "list_item_comments": "listItemComments", + "list_item_types": "listItemTypes", + "list_item_versions": "listItemVersions", + "list_items": "listItems", + "list_pick_list_options": "listPickListOptions", + "list_pick_lists": "listPickLists", + "list_projects": "listProjects", + "list_relationship_types": "listRelationshipTypes", + "list_relationships": "listRelationships", + "list_releases": "listReleases", + "list_tags": "listTags", + "list_test_cycles": "listTestCycles", + "list_test_plans": "listTestPlans", + "list_test_runs": "listTestRuns", + "list_upstream_items": "listUpstreamItems", + "search_items": "searchItems", + "update_item": "updateItem", + "update_test_run": "updateTestRun" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "jina": { + "namespace": "jina", + "methods": { + "jina_read_url": "readUrl", + "jina_search": "search" + } + }, + "jira": { + "namespace": "jira", + "methods": { + "add_attachment": "addAttachment", + "add_comment": "addComment", + "add_watcher": "addWatcher", + "add_worklog": "addWorklog", + "assign": "assignIssue", + "create_link": "createIssueLink", + "create_sprint": "createSprint", + "delete": "deleteIssue", + "delete_attachment": "deleteAttachment", + "delete_comment": "deleteComment", + "delete_link": "deleteIssueLink", + "delete_worklog": "deleteWorklog", + "get_attachments": "getAttachments", + "get_comments": "getComments", + "get_fields": "getFields", + "get_project": "getProject", + "get_transitions": "getTransitions", + "get_users": "getUsers", + "get_worklogs": "getWorklogs", + "list_issue_types": "listIssueTypes", + "list_projects": "listProjects", + "read": "readIssue", + "read-bulk": "readBulkIssues", + "remove_watcher": "removeWatcher", + "search": "searchIssues", + "search_users": "searchUsers", + "transition": "transitionIssue", + "update": "updateIssue", + "update_comment": "updateComment", + "update_worklog": "updateWorklog", + "write": "writeIssue" + }, + "triggers": { + "jira_comment_deleted": "commentDeleted", + "jira_comment_updated": "commentUpdated", + "jira_issue_commented": "issueCommented", + "jira_issue_created": "issueCreated", + "jira_issue_deleted": "issueDeleted", + "jira_issue_updated": "issueUpdated", + "jira_project_created": "projectCreated", + "jira_sprint_closed": "sprintClosed", + "jira_sprint_created": "sprintCreated", + "jira_sprint_started": "sprintStarted", + "jira_version_released": "versionReleased", + "jira_webhook": "webhook", + "jira_worklog_created": "worklogCreated", + "jira_worklog_deleted": "worklogDeleted", + "jira_worklog_updated": "worklogUpdated" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "jira_service_management": { + "namespace": "jiraServiceManagement", + "methods": { + "add_comment": "addComment", + "add_customer": "addCustomer", + "add_organization": "addOrganization", + "add_participants": "addParticipants", + "answer_approval": "answerApproval", + "attach_form": "attachForm", + "copy_forms": "copyForms", + "create_object": "createAssetObject", + "create_organization": "createOrganization", + "create_request": "createRequest", + "delete_form": "deleteForm", + "delete_object": "deleteAssetObject", + "externalise_form": "externaliseForm", + "get_approvals": "getApprovals", + "get_comments": "getComments", + "get_customers": "getCustomers", + "get_form": "getForm", + "get_form_answers": "getFormAnswers", + "get_form_structure": "getFormStructure", + "get_form_templates": "getFormTemplates", + "get_issue_forms": "getIssueForms", + "get_object": "getAssetObject", + "get_object_schema": "getAssetSchema", + "get_object_type_attributes": "getAssetObjectTypeAttributes", + "get_organizations": "getOrganizations", + "get_participants": "getParticipants", + "get_queues": "getQueues", + "get_request": "getRequest", + "get_request_type_fields": "getRequestTypeFields", + "get_request_types": "getRequestTypes", + "get_requests": "getRequests", + "get_service_desks": "getServiceDesks", + "get_sla": "getSla", + "get_transitions": "getTransitions", + "internalise_form": "internaliseForm", + "list_object_schemas": "listAssetSchemas", + "list_object_types": "listAssetObjectTypes", + "reopen_form": "reopenForm", + "save_form_answers": "saveFormAnswers", + "search_objects_aql": "searchAssetsAql", + "submit_form": "submitForm", + "transition_request": "transitionRequest", + "update_object": "updateAssetObject" + }, + "triggers": { + "jsm_request_commented": "requestCommented", + "jsm_request_created": "requestCreated", + "jsm_request_resolved": "requestResolved", + "jsm_request_updated": "requestUpdated", + "jsm_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "jotform": { + "namespace": "legacy.jotform", + "methods": { + "add_label_resources": "addLabelResources", + "clone_form": "cloneForm", + "create_form": "createForm", + "create_label": "createLabel", + "create_question": "createQuestion", + "create_questions": "createQuestions", + "create_report": "createReport", + "create_submission": "createSubmission", + "create_submissions": "createSubmissions", + "create_webhook": "createWebhook", + "delete_form": "deleteForm", + "delete_label": "deleteLabel", + "delete_question": "deleteQuestion", + "delete_report": "deleteReport", + "delete_submission": "deleteSubmission", + "delete_webhook": "deleteWebhook", + "get_form": "getForm", + "get_form_properties": "getFormProperties", + "get_history": "getHistory", + "get_label": "getLabel", + "get_question": "getQuestion", + "get_report": "getReport", + "get_settings": "getSettings", + "get_submission": "getSubmission", + "get_usage": "getUsage", + "get_user": "getAccount", + "list_form_files": "listFormFiles", + "list_form_reports": "listFormReports", + "list_form_submissions": "listFormSubmissions", + "list_forms": "listForms", + "list_label_resources": "listLabelResources", + "list_labels": "listLabels", + "list_questions": "listQuestions", + "list_reports": "listReports", + "list_submissions": "listSubmissions", + "list_subusers": "listSubUsers", + "list_webhooks": "listWebhooks", + "remove_label_resources": "removeLabelResources", + "update_form_properties": "updateFormProperties", + "update_label": "updateLabel", + "update_question": "updateQuestion", + "update_settings": "updateSettings", + "update_submission": "updateSubmission" + }, + "triggers": { + "jotform_webhook": "webhook" + } + }, + "jotform_v2": { + "namespace": "jotform", + "methods": { + "add_label_resources": "addLabelResources", + "clone_form": "cloneForm", + "create_form": "createForm", + "create_label": "createLabel", + "create_question": "createQuestion", + "create_questions": "createQuestions", + "create_report": "createReport", + "create_submission": "createSubmission", + "create_submissions": "createSubmissions", + "create_webhook": "createWebhook", + "delete_form": "deleteForm", + "delete_label": "deleteLabel", + "delete_question": "deleteQuestion", + "delete_report": "deleteReport", + "delete_submission": "deleteSubmission", + "delete_webhook": "deleteWebhook", + "get_form": "getForm", + "get_form_properties": "getFormProperties", + "get_history": "getHistory", + "get_label": "getLabel", + "get_question": "getQuestion", + "get_report": "getReport", + "get_settings": "getSettings", + "get_submission": "getSubmission", + "get_usage": "getUsage", + "get_user": "getAccount", + "list_form_files": "listFormFiles", + "list_form_reports": "listFormReports", + "list_form_submissions": "listFormSubmissions", + "list_forms": "listForms", + "list_label_resources": "listLabelResources", + "list_labels": "listLabels", + "list_questions": "listQuestions", + "list_reports": "listReports", + "list_submissions": "listSubmissions", + "list_subusers": "listSubUsers", + "list_webhooks": "listWebhooks", + "remove_label_resources": "removeLabelResources", + "update_form_properties": "updateFormProperties", + "update_label": "updateLabel", + "update_question": "updateQuestion", + "update_settings": "updateSettings", + "update_submission": "updateSubmission" + }, + "triggers": { + "jotform_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "jupyter": { + "namespace": "legacy.jupyter", + "methods": { + "jupyter_copy_content": "copyContent", + "jupyter_create_file": "createFile", + "jupyter_create_session": "createSession", + "jupyter_delete_content": "deleteContent", + "jupyter_delete_session": "deleteSession", + "jupyter_get_content": "getContent", + "jupyter_interrupt_kernel": "interruptKernel", + "jupyter_list_contents": "listContents", + "jupyter_list_kernels": "listKernels", + "jupyter_list_kernelspecs": "listKernelSpecs", + "jupyter_list_sessions": "listSessions", + "jupyter_rename_content": "renameContent", + "jupyter_restart_kernel": "restartKernel", + "jupyter_start_kernel": "startKernel", + "jupyter_stop_kernel": "stopKernel", + "jupyter_upload_file": "uploadFile" + } + }, + "jupyter_v2": { + "namespace": "legacy.jupyterV2", + "methods": { + "jupyter_copy_content": "copyContent", + "jupyter_create_file": "createFile", + "jupyter_create_session": "createSession", + "jupyter_delete_content": "deleteContent", + "jupyter_delete_session": "deleteSession", + "jupyter_get_content": "getContent", + "jupyter_interrupt_kernel": "interruptKernel", + "jupyter_list_contents": "listContents", + "jupyter_list_kernels": "listKernels", + "jupyter_list_kernelspecs": "listKernelSpecs", + "jupyter_list_sessions": "listSessions", + "jupyter_rename_content": "renameContent", + "jupyter_restart_kernel": "restartKernel", + "jupyter_start_kernel": "startKernel", + "jupyter_stop_kernel": "stopKernel", + "jupyter_upload_file": "uploadFile" + } + }, + "jupyter_v3": { + "namespace": "jupyter", + "methods": { + "jupyter_copy_content": "copyContent", + "jupyter_create_file": "createFile", + "jupyter_create_session": "createSession", + "jupyter_delete_content": "deleteContent", + "jupyter_delete_session": "deleteSession", + "jupyter_get_content": "getContent", + "jupyter_interrupt_kernel": "interruptKernel", + "jupyter_list_contents": "listContents", + "jupyter_list_kernels": "listKernels", + "jupyter_list_kernelspecs": "listKernelSpecs", + "jupyter_list_sessions": "listSessions", + "jupyter_rename_content": "renameContent", + "jupyter_restart_kernel": "restartKernel", + "jupyter_start_kernel": "startKernel", + "jupyter_stop_kernel": "stopKernel", + "jupyter_upload_file": "uploadFile" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "kalshi": { + "namespace": "legacy.kalshi", + "methods": { + "amend_order": "amendOrder", + "cancel_order": "cancelOrder", + "create_order": "createOrder", + "get_balance": "getBalance", + "get_candlesticks": "getCandlesticks", + "get_event": "getEvent", + "get_event_candlesticks": "getEventCandlesticks", + "get_events": "getEvents", + "get_exchange_announcements": "getExchangeAnnouncements", + "get_exchange_schedule": "getExchangeSchedule", + "get_exchange_status": "getExchangeStatus", + "get_fills": "getFills", + "get_market": "getMarket", + "get_markets": "getMarkets", + "get_order": "getOrder", + "get_orderbook": "getOrderbook", + "get_orders": "getOrders", + "get_positions": "getPositions", + "get_series_by_ticker": "getSeriesByTicker", + "get_series_list": "getSeriesList", + "get_settlements": "getSettlements", + "get_trades": "getTrades" + } + }, + "kalshi_v2": { + "namespace": "legacy.kalshiV2", + "methods": { + "amend_order": "amendOrder", + "cancel_order": "cancelOrder", + "create_order": "createOrder", + "get_balance": "getBalance", + "get_candlesticks": "getCandlesticks", + "get_event": "getEvent", + "get_event_candlesticks": "getEventCandlesticks", + "get_events": "getEvents", + "get_exchange_announcements": "getExchangeAnnouncements", + "get_exchange_schedule": "getExchangeSchedule", + "get_exchange_status": "getExchangeStatus", + "get_fills": "getFills", + "get_market": "getMarket", + "get_markets": "getMarkets", + "get_order": "getOrder", + "get_orderbook": "getOrderbook", + "get_orders": "getOrders", + "get_positions": "getPositions", + "get_series_by_ticker": "getSeriesByTicker", + "get_series_list": "getSeriesList", + "get_settlements": "getSettlements", + "get_trades": "getTrades" + } + }, + "kalshi_v3": { + "namespace": "kalshi", + "methods": { + "amend_order": "amendOrder", + "cancel_order": "cancelOrder", + "create_order": "createOrder", + "get_balance": "getBalance", + "get_candlesticks": "getCandlesticks", + "get_event": "getEvent", + "get_event_candlesticks": "getEventCandlesticks", + "get_events": "getEvents", + "get_exchange_announcements": "getExchangeAnnouncements", + "get_exchange_schedule": "getExchangeSchedule", + "get_exchange_status": "getExchangeStatus", + "get_fills": "getFills", + "get_market": "getMarket", + "get_markets": "getMarkets", + "get_order": "getOrder", + "get_orderbook": "getOrderbook", + "get_orders": "getOrders", + "get_positions": "getPositions", + "get_series_by_ticker": "getSeriesByTicker", + "get_series_list": "getSeriesList", + "get_settlements": "getSettlements", + "get_trades": "getTrades" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "ketch": { + "namespace": "ketch", + "methods": { + "get_consent": "getConsent", + "get_subscriptions": "getSubscriptions", + "invoke_right": "invokeRight", + "set_consent": "setConsent", + "set_subscriptions": "setSubscriptions" + } + }, + "knowledge": { + "namespace": "knowledge", + "methods": { + "create_document": "createDocument", + "delete_chunk": "deleteChunk", + "delete_document": "deleteDocument", + "get_connector": "getConnector", + "get_document": "getDocument", + "list_chunks": "listChunks", + "list_connectors": "listConnectors", + "list_documents": "listDocuments", + "list_tags": "listTags", + "search": "search", + "trigger_sync": "triggerSync", + "update_chunk": "updateChunk", + "upload_chunk": "uploadChunk", + "upsert_document": "upsertDocument" + } + }, + "lambda": { + "namespace": "legacy.lambda", + "methods": { + "add_permission": "addPermission", + "create_alias": "createAlias", + "create_event_source_mapping": "createEventSourceMapping", + "create_function": "createFunction", + "create_function_url_config": "createFunctionUrl", + "delete_alias": "deleteAlias", + "delete_event_source_mapping": "deleteEventSourceMapping", + "delete_function": "deleteFunction", + "delete_function_concurrency": "deleteFunctionConcurrency", + "delete_function_event_invoke_config": "deleteAsyncInvokeConfig", + "delete_function_url_config": "deleteFunctionUrl", + "delete_provisioned_concurrency_config": "deleteProvisionedConcurrency", + "get_account_settings": "getAccountSettings", + "get_alias": "getAlias", + "get_event_source_mapping": "getEventSourceMapping", + "get_function": "getFunction", + "get_function_concurrency": "getFunctionConcurrency", + "get_function_configuration": "getFunctionConfiguration", + "get_function_event_invoke_config": "getAsyncInvokeConfig", + "get_function_recursion_config": "getRecursionConfig", + "get_function_url_config": "getFunctionUrl", + "get_layer_version": "getLayerVersion", + "get_policy": "getPolicy", + "get_provisioned_concurrency_config": "getProvisionedConcurrency", + "get_runtime_management_config": "getRuntimeManagementConfig", + "invoke": "invokeFunction", + "list_aliases": "listAliases", + "list_event_source_mappings": "listEventSourceMappings", + "list_function_event_invoke_configs": "listAsyncInvokeConfigs", + "list_function_url_configs": "listFunctionUrls", + "list_functions": "listFunctions", + "list_layer_versions": "listLayerVersions", + "list_layers": "listLayers", + "list_provisioned_concurrency_configs": "listProvisionedConcurrency", + "list_tags": "listTags", + "list_versions_by_function": "listFunctionVersions", + "publish_version": "publishVersion", + "put_function_concurrency": "setFunctionConcurrency", + "put_function_event_invoke_config": "setAsyncInvokeConfig", + "put_function_recursion_config": "setRecursionConfig", + "put_provisioned_concurrency_config": "setProvisionedConcurrency", + "put_runtime_management_config": "setRuntimeManagementConfig", + "remove_permission": "removePermission", + "tag_resource": "tagResource", + "untag_resource": "untagResource", + "update_alias": "updateAlias", + "update_event_source_mapping": "updateEventSourceMapping", + "update_function_code": "updateFunctionCode", + "update_function_configuration": "updateFunctionConfiguration", + "update_function_url_config": "updateFunctionUrl" + } + }, + "lambda_v2": { + "namespace": "lambda", + "methods": { + "add_permission": "addPermission", + "create_alias": "createAlias", + "create_event_source_mapping": "createEventSourceMapping", + "create_function": "createFunction", + "create_function_url_config": "createFunctionUrl", + "delete_alias": "deleteAlias", + "delete_event_source_mapping": "deleteEventSourceMapping", + "delete_function": "deleteFunction", + "delete_function_concurrency": "deleteFunctionConcurrency", + "delete_function_event_invoke_config": "deleteAsyncInvokeConfig", + "delete_function_url_config": "deleteFunctionUrl", + "delete_provisioned_concurrency_config": "deleteProvisionedConcurrency", + "get_account_settings": "getAccountSettings", + "get_alias": "getAlias", + "get_event_source_mapping": "getEventSourceMapping", + "get_function": "getFunction", + "get_function_concurrency": "getFunctionConcurrency", + "get_function_configuration": "getFunctionConfiguration", + "get_function_event_invoke_config": "getAsyncInvokeConfig", + "get_function_recursion_config": "getRecursionConfig", + "get_function_url_config": "getFunctionUrl", + "get_layer_version": "getLayerVersion", + "get_policy": "getPolicy", + "get_provisioned_concurrency_config": "getProvisionedConcurrency", + "get_runtime_management_config": "getRuntimeManagementConfig", + "invoke": "invokeFunction", + "list_aliases": "listAliases", + "list_event_source_mappings": "listEventSourceMappings", + "list_function_event_invoke_configs": "listAsyncInvokeConfigs", + "list_function_url_configs": "listFunctionUrls", + "list_functions": "listFunctions", + "list_layer_versions": "listLayerVersions", + "list_layers": "listLayers", + "list_provisioned_concurrency_configs": "listProvisionedConcurrency", + "list_tags": "listTags", + "list_versions_by_function": "listFunctionVersions", + "publish_version": "publishVersion", + "put_function_concurrency": "setFunctionConcurrency", + "put_function_event_invoke_config": "setAsyncInvokeConfig", + "put_function_recursion_config": "setRecursionConfig", + "put_provisioned_concurrency_config": "setProvisionedConcurrency", + "put_runtime_management_config": "setRuntimeManagementConfig", + "remove_permission": "removePermission", + "tag_resource": "tagResource", + "untag_resource": "untagResource", + "update_alias": "updateAlias", + "update_event_source_mapping": "updateEventSourceMapping", + "update_function_code": "updateFunctionCode", + "update_function_configuration": "updateFunctionConfiguration", + "update_function_url_config": "updateFunctionUrl" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "langsmith": { + "namespace": "legacy.langsmith", + "methods": { + "langsmith_create_feedback": "createFeedback", + "langsmith_create_run": "createRun", + "langsmith_create_runs_batch": "createRunsBatch", + "langsmith_get_run": "getRun", + "langsmith_update_run": "updateRun" + } + }, + "langsmith_v2": { + "namespace": "langsmith", + "methods": { + "langsmith_create_feedback": "createFeedback", + "langsmith_create_run": "createRun", + "langsmith_create_runs_batch": "createRunsBatch", + "langsmith_get_run": "getRun", + "langsmith_update_run": "updateRun" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "latex": { + "namespace": "latex", + "methods": { + "latex_compile": "compileDocument", + "latex_get_package": "getPackageDetails", + "latex_list_fonts": "listFonts", + "latex_search_packages": "searchPackages" + } + }, + "launchdarkly": { + "namespace": "legacy.launchdarkly", + "methods": { + "create_flag": "createFlag", + "delete_flag": "deleteFlag", + "get_audit_log": "getAuditLog", + "get_flag": "getFlag", + "get_flag_status": "getFlagStatus", + "list_environments": "listEnvironments", + "list_flags": "listFlags", + "list_members": "listMembers", + "list_projects": "listProjects", + "list_segments": "listSegments", + "toggle_flag": "toggleFlag", + "update_flag": "updateFlag" + } + }, + "launchdarkly_v2": { + "namespace": "launchdarkly", + "methods": { + "create_flag": "createFlag", + "delete_flag": "deleteFlag", + "get_audit_log": "getAuditLog", + "get_flag": "getFlag", + "get_flag_status": "getFlagStatus", + "list_environments": "listEnvironments", + "list_flags": "listFlags", + "list_members": "listMembers", + "list_projects": "listProjects", + "list_segments": "listSegments", + "toggle_flag": "toggleFlag", + "update_flag": "updateFlag" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "leadmagic": { + "namespace": "leadmagic", + "methods": { + "leadmagic_company_search": "companySearch", + "leadmagic_email_to_profile": "emailToProfile", + "leadmagic_find_email": "findEmail", + "leadmagic_find_mobile": "findMobile", + "leadmagic_get_credits": "getCredits", + "leadmagic_profile_search": "profileSearch", + "leadmagic_profile_to_email": "profileToEmail", + "leadmagic_role_finder": "roleFinder", + "leadmagic_validate_email": "validateEmail" + } + }, + "lemlist": { + "namespace": "legacy.lemlist", + "methods": { + "get_activities": "getActivities", + "get_lead": "getLead", + "send_email": "sendEmail" + }, + "triggers": { + "lemlist_email_bounced": "emailBounced", + "lemlist_email_clicked": "emailClicked", + "lemlist_email_opened": "emailOpened", + "lemlist_email_replied": "emailReplied", + "lemlist_email_sent": "emailSent", + "lemlist_interested": "interested", + "lemlist_linkedin_replied": "linkedinReplied", + "lemlist_not_interested": "notInterested", + "lemlist_webhook": "webhook" + } + }, + "lemlist_v2": { + "namespace": "lemlist", + "methods": { + "get_activities": "getActivities", + "get_lead": "getLead", + "send_email": "sendEmail" + }, + "triggers": { + "lemlist_email_bounced": "emailBounced", + "lemlist_email_clicked": "emailClicked", + "lemlist_email_opened": "emailOpened", + "lemlist_email_replied": "emailReplied", + "lemlist_email_sent": "emailSent", + "lemlist_interested": "interested", + "lemlist_linkedin_replied": "linkedinReplied", + "lemlist_not_interested": "notInterested", + "lemlist_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "linear": { + "namespace": "legacy.linear", + "methods": { + "linear_add_label_to_issue": "addLabelToIssue", + "linear_add_label_to_project": "addLabelToProject", + "linear_archive_issue": "archiveIssue", + "linear_archive_label": "archiveLabel", + "linear_archive_project": "archiveProject", + "linear_create_attachment": "createAttachment", + "linear_create_comment": "createComment", + "linear_create_customer": "createCustomer", + "linear_create_customer_request": "createCustomerRequest", + "linear_create_customer_status": "createCustomerStatus", + "linear_create_customer_tier": "createCustomerTier", + "linear_create_cycle": "createCycle", + "linear_create_favorite": "createFavorite", + "linear_create_issue": "createIssue", + "linear_create_issue_relation": "createIssueRelation", + "linear_create_label": "createLabel", + "linear_create_project": "createProject", + "linear_create_project_label": "createProjectLabel", + "linear_create_project_milestone": "createProjectMilestone", + "linear_create_project_status": "createProjectStatus", + "linear_create_project_update": "createProjectUpdate", + "linear_create_workflow_state": "createWorkflowState", + "linear_delete_attachment": "deleteAttachment", + "linear_delete_comment": "deleteComment", + "linear_delete_customer": "deleteCustomer", + "linear_delete_customer_status": "deleteCustomerStatus", + "linear_delete_customer_tier": "deleteCustomerTier", + "linear_delete_issue": "deleteIssue", + "linear_delete_issue_relation": "deleteIssueRelation", + "linear_delete_project": "deleteProject", + "linear_delete_project_label": "deleteProjectLabel", + "linear_delete_project_milestone": "deleteProjectMilestone", + "linear_delete_project_status": "deleteProjectStatus", + "linear_get_active_cycle": "getActiveCycle", + "linear_get_customer": "getCustomer", + "linear_get_cycle": "getCycle", + "linear_get_issue": "getIssue", + "linear_get_project": "getProject", + "linear_get_viewer": "getViewer", + "linear_list_attachments": "listAttachments", + "linear_list_comments": "listComments", + "linear_list_customer_requests": "listCustomerRequests", + "linear_list_customer_statuses": "listCustomerStatuses", + "linear_list_customer_tiers": "listCustomerTiers", + "linear_list_customers": "listCustomers", + "linear_list_cycles": "listCycles", + "linear_list_favorites": "listFavorites", + "linear_list_issue_relations": "listIssueRelations", + "linear_list_labels": "listLabels", + "linear_list_notifications": "listNotifications", + "linear_list_project_labels": "listProjectLabels", + "linear_list_project_milestones": "listProjectMilestones", + "linear_list_project_statuses": "listProjectStatuses", + "linear_list_project_updates": "listProjectUpdates", + "linear_list_projects": "listProjects", + "linear_list_teams": "listTeams", + "linear_list_users": "listUsers", + "linear_list_workflow_states": "listWorkflowStates", + "linear_merge_customers": "mergeCustomers", + "linear_read_issues": "readIssues", + "linear_remove_label_from_issue": "removeLabelFromIssue", + "linear_remove_label_from_project": "removeLabelFromProject", + "linear_search_issues": "searchIssues", + "linear_unarchive_issue": "unarchiveIssue", + "linear_update_attachment": "updateAttachment", + "linear_update_comment": "updateComment", + "linear_update_customer": "updateCustomer", + "linear_update_customer_request": "updateCustomerRequest", + "linear_update_customer_status": "updateCustomerStatus", + "linear_update_customer_tier": "updateCustomerTier", + "linear_update_issue": "updateIssue", + "linear_update_label": "updateLabel", + "linear_update_notification": "updateNotification", + "linear_update_project": "updateProject", + "linear_update_project_label": "updateProjectLabel", + "linear_update_project_milestone": "updateProjectMilestone", + "linear_update_project_status": "updateProjectStatus", + "linear_update_workflow_state": "updateWorkflowState" + }, + "triggers": { + "linear_comment_created": "commentCreated", + "linear_comment_updated": "commentUpdated", + "linear_customer_request_created": "customerRequestCreated", + "linear_customer_request_updated": "customerRequestUpdated", + "linear_cycle_created": "cycleCreated", + "linear_cycle_updated": "cycleUpdated", + "linear_issue_created": "issueCreated", + "linear_issue_removed": "issueRemoved", + "linear_issue_updated": "issueUpdated", + "linear_label_created": "labelCreated", + "linear_label_updated": "labelUpdated", + "linear_project_created": "projectCreated", + "linear_project_update_created": "projectUpdateCreated", + "linear_project_updated": "projectUpdated", + "linear_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "linear_v2": { + "namespace": "linear", + "methods": { + "linear_add_label_to_issue": "addLabelToIssue", + "linear_add_label_to_project": "addLabelToProject", + "linear_archive_issue": "archiveIssue", + "linear_archive_label": "archiveLabel", + "linear_archive_project": "archiveProject", + "linear_create_attachment": "createAttachment", + "linear_create_comment": "createComment", + "linear_create_customer": "createCustomer", + "linear_create_customer_request": "createCustomerRequest", + "linear_create_customer_status": "createCustomerStatus", + "linear_create_customer_tier": "createCustomerTier", + "linear_create_cycle": "createCycle", + "linear_create_favorite": "createFavorite", + "linear_create_issue": "createIssue", + "linear_create_issue_relation": "createIssueRelation", + "linear_create_label": "createLabel", + "linear_create_project": "createProject", + "linear_create_project_label": "createProjectLabel", + "linear_create_project_milestone": "createProjectMilestone", + "linear_create_project_status": "createProjectStatus", + "linear_create_project_update": "createProjectUpdate", + "linear_create_workflow_state": "createWorkflowState", + "linear_delete_attachment": "deleteAttachment", + "linear_delete_comment": "deleteComment", + "linear_delete_customer": "deleteCustomer", + "linear_delete_customer_status": "deleteCustomerStatus", + "linear_delete_customer_tier": "deleteCustomerTier", + "linear_delete_issue": "deleteIssue", + "linear_delete_issue_relation": "deleteIssueRelation", + "linear_delete_project": "deleteProject", + "linear_delete_project_label": "deleteProjectLabel", + "linear_delete_project_milestone": "deleteProjectMilestone", + "linear_delete_project_status": "deleteProjectStatus", + "linear_get_active_cycle": "getActiveCycle", + "linear_get_customer": "getCustomer", + "linear_get_cycle": "getCycle", + "linear_get_issue": "getIssue", + "linear_get_project": "getProject", + "linear_get_viewer": "getViewer", + "linear_list_attachments": "listAttachments", + "linear_list_comments": "listComments", + "linear_list_customer_requests": "listCustomerRequests", + "linear_list_customer_statuses": "listCustomerStatuses", + "linear_list_customer_tiers": "listCustomerTiers", + "linear_list_customers": "listCustomers", + "linear_list_cycles": "listCycles", + "linear_list_favorites": "listFavorites", + "linear_list_issue_relations": "listIssueRelations", + "linear_list_labels": "listLabels", + "linear_list_notifications": "listNotifications", + "linear_list_project_labels": "listProjectLabels", + "linear_list_project_milestones": "listProjectMilestones", + "linear_list_project_statuses": "listProjectStatuses", + "linear_list_project_updates": "listProjectUpdates", + "linear_list_projects": "listProjects", + "linear_list_teams": "listTeams", + "linear_list_users": "listUsers", + "linear_list_workflow_states": "listWorkflowStates", + "linear_merge_customers": "mergeCustomers", + "linear_read_issues": "readIssues", + "linear_remove_label_from_issue": "removeLabelFromIssue", + "linear_remove_label_from_project": "removeLabelFromProject", + "linear_search_issues": "searchIssues", + "linear_unarchive_issue": "unarchiveIssue", + "linear_update_attachment": "updateAttachment", + "linear_update_comment": "updateComment", + "linear_update_customer": "updateCustomer", + "linear_update_customer_request": "updateCustomerRequest", + "linear_update_customer_status": "updateCustomerStatus", + "linear_update_customer_tier": "updateCustomerTier", + "linear_update_issue": "updateIssue", + "linear_update_label": "updateLabel", + "linear_update_notification": "updateNotification", + "linear_update_project": "updateProject", + "linear_update_project_label": "updateProjectLabel", + "linear_update_project_milestone": "updateProjectMilestone", + "linear_update_project_status": "updateProjectStatus", + "linear_update_workflow_state": "updateWorkflowState" + }, + "triggers": { + "linear_comment_created_v2": "commentCreated", + "linear_comment_updated_v2": "commentUpdated", + "linear_customer_request_created_v2": "customerRequestCreated", + "linear_customer_request_updated_v2": "customerRequestUpdated", + "linear_cycle_created_v2": "cycleCreated", + "linear_cycle_updated_v2": "cycleUpdated", + "linear_issue_created_v2": "issueCreated", + "linear_issue_removed_v2": "issueRemoved", + "linear_issue_updated_v2": "issueUpdated", + "linear_label_created_v2": "labelCreated", + "linear_label_updated_v2": "labelUpdated", + "linear_project_created_v2": "projectCreated", + "linear_project_update_created_v2": "projectUpdateCreated", + "linear_project_updated_v2": "projectUpdated", + "linear_webhook_v2": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "linkedin": { + "namespace": "linkedin", + "methods": { + "get_profile": "getProfile", + "share_post": "sharePost" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "linkup": { + "namespace": "linkup" + }, + "linq": { + "namespace": "legacy.linq", + "methods": { + "add_participant": "addParticipant", + "check_imessage": "checkIMessage", + "check_rcs": "checkRcs", + "create_attachment": "createAttachment", + "create_chat": "createChat", + "create_contact_card": "createContactCard", + "create_webhook_subscription": "createWebhookSubscription", + "delete_attachment": "deleteAttachment", + "delete_message": "deleteMessage", + "delete_webhook_subscription": "deleteWebhookSubscription", + "edit_message": "editMessage", + "get_attachment": "getAttachment", + "get_chat": "getChat", + "get_contact_card": "getContactCard", + "get_message": "getMessage", + "get_webhook_subscription": "getWebhookSubscription", + "leave_chat": "leaveChat", + "list_chats": "listChats", + "list_messages": "listMessages", + "list_phone_numbers": "listPhoneNumbers", + "list_thread": "listThread", + "list_webhook_events": "listWebhookEvents", + "list_webhook_subscriptions": "listWebhookSubscriptions", + "mark_chat_read": "markChatAsRead", + "react_to_message": "reactToMessage", + "remove_participant": "removeParticipant", + "send_message": "sendMessage", + "send_voice_memo": "sendVoiceMemo", + "share_contact_card": "shareContactCard", + "start_typing": "startTyping", + "stop_typing": "stopTyping", + "update_chat": "updateChat", + "update_contact_card": "updateContactCard", + "update_webhook_subscription": "updateWebhookSubscription" + }, + "triggers": { + "linq_message_delivered": "messageDelivered", + "linq_message_failed": "messageFailed", + "linq_message_read": "messageRead", + "linq_message_received": "messageReceived", + "linq_reaction_added": "reactionAdded", + "linq_webhook": "webhook" + } + }, + "linq_v2": { + "namespace": "linq", + "methods": { + "add_participant": "addParticipant", + "check_imessage": "checkIMessage", + "check_rcs": "checkRcs", + "create_attachment": "createAttachment", + "create_chat": "createChat", + "create_contact_card": "createContactCard", + "create_webhook_subscription": "createWebhookSubscription", + "delete_attachment": "deleteAttachment", + "delete_message": "deleteMessage", + "delete_webhook_subscription": "deleteWebhookSubscription", + "edit_message": "editMessage", + "get_attachment": "getAttachment", + "get_chat": "getChat", + "get_contact_card": "getContactCard", + "get_message": "getMessage", + "get_webhook_subscription": "getWebhookSubscription", + "leave_chat": "leaveChat", + "list_chats": "listChats", + "list_messages": "listMessages", + "list_phone_numbers": "listPhoneNumbers", + "list_thread": "listThread", + "list_webhook_events": "listWebhookEvents", + "list_webhook_subscriptions": "listWebhookSubscriptions", + "mark_chat_read": "markChatAsRead", + "react_to_message": "reactToMessage", + "remove_participant": "removeParticipant", + "send_message": "sendMessage", + "send_voice_memo": "sendVoiceMemo", + "share_contact_card": "shareContactCard", + "start_typing": "startTyping", + "stop_typing": "stopTyping", + "update_chat": "updateChat", + "update_contact_card": "updateContactCard", + "update_webhook_subscription": "updateWebhookSubscription" + }, + "triggers": { + "linq_message_delivered": "messageDelivered", + "linq_message_failed": "messageFailed", + "linq_message_read": "messageRead", + "linq_message_received": "messageReceived", + "linq_reaction_added": "reactionAdded", + "linq_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "logfire": { + "namespace": "legacy.logfire", + "methods": { + "logfire_get_token_info": "getTokenInfo", + "logfire_get_trace": "getTrace", + "logfire_query": "runSqlQuery", + "logfire_search_records": "searchRecords" + } + }, + "logfire_v2": { + "namespace": "logfire", + "methods": { + "logfire_get_token_info": "getTokenInfo", + "logfire_get_trace": "getTrace", + "logfire_query": "runSqlQuery", + "logfire_search_records": "searchRecords" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "logrocket": { + "namespace": "logrocket", + "methods": { + "create_release": "createRelease", + "get_audit_logs": "getAuditLogs", + "get_highlights": "getHighlights", + "identify_user": "identifyUser", + "list_exported_sessions": "listExportedSessions", + "request_highlights": "requestHighlights" + } + }, + "logs": { + "namespace": "legacy.logs", + "methods": { + "get_execution": "getExecutionDetails", + "get_log": "getLogById", + "query": "queryLogs" + } + }, + "logs_v2": { + "namespace": "logs", + "methods": { + "get_run_details": "getRunDetails", + "query": "queryLogs" + } + }, + "loops": { + "namespace": "legacy.loops", + "methods": { + "check_contact_suppression": "checkContactSuppression", + "create_contact": "createContact", + "create_contact_property": "createContactProperty", + "delete_contact": "deleteContact", + "find_contact": "findContact", + "get_transactional_email": "getTransactionalEmail", + "list_contact_properties": "listContactProperties", + "list_mailing_lists": "listMailingLists", + "list_transactional_emails": "listTransactionalEmails", + "remove_contact_suppression": "removeContactSuppression", + "send_event": "sendEvent", + "send_transactional_email": "sendTransactionalEmail", + "update_contact": "updateContact" + }, + "triggers": { + "loops_campaign_email_sent": "campaignEmailSent", + "loops_email_clicked": "emailClicked", + "loops_email_delivered": "emailDelivered", + "loops_email_hard_bounced": "emailHardBounced", + "loops_email_opened": "emailOpened", + "loops_email_soft_bounced": "emailSoftBounced", + "loops_loop_email_sent": "loopEmailSent", + "loops_transactional_email_sent": "transactionalEmailSent" + } + }, + "loops_v2": { + "namespace": "loops", + "methods": { + "check_contact_suppression": "checkContactSuppression", + "create_contact": "createContact", + "create_contact_property": "createContactProperty", + "delete_contact": "deleteContact", + "find_contact": "findContact", + "get_transactional_email": "getTransactionalEmail", + "list_contact_properties": "listContactProperties", + "list_mailing_lists": "listMailingLists", + "list_transactional_emails": "listTransactionalEmails", + "remove_contact_suppression": "removeContactSuppression", + "send_event": "sendEvent", + "send_transactional_email": "sendTransactionalEmail", + "update_contact": "updateContact" + }, + "triggers": { + "loops_campaign_email_sent": "campaignEmailSent", + "loops_email_clicked": "emailClicked", + "loops_email_delivered": "emailDelivered", + "loops_email_hard_bounced": "emailHardBounced", + "loops_email_opened": "emailOpened", + "loops_email_soft_bounced": "emailSoftBounced", + "loops_loop_email_sent": "loopEmailSent", + "loops_transactional_email_sent": "transactionalEmailSent" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "luma": { + "namespace": "legacy.luma", + "methods": { + "add_guests": "addGuests", + "cancel_event": "cancelEvent", + "create_event": "createEvent", + "get_event": "getEvent", + "get_guest": "getGuest", + "get_guests": "getGuests", + "list_events": "listEvents", + "lookup_event": "lookupEvent", + "send_invites": "sendInvites", + "update_event": "updateEvent", + "update_guest_status": "updateGuestStatus" + } + }, + "luma_v2": { + "namespace": "luma", + "methods": { + "add_guests": "addGuests", + "cancel_event": "cancelEvent", + "create_event": "createEvent", + "get_event": "getEvent", + "get_guest": "getGuest", + "get_guests": "getGuests", + "list_events": "listEvents", + "lookup_event": "lookupEvent", + "send_invites": "sendInvites", + "update_event": "updateEvent", + "update_guest_status": "updateGuestStatus" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "mailchimp": { + "namespace": "legacy.mailchimp", + "methods": { + "add_member": "addMember", + "add_member_tags": "addMemberTags", + "add_or_update_member": "addOrUpdateMember", + "add_segment_member": "addSegmentMember", + "add_subscriber_to_automation": "addSubscriberToAutomation", + "archive_member": "archiveMember", + "create_audience": "createAudience", + "create_batch_operation": "createBatchOperation", + "create_campaign": "createCampaign", + "create_interest": "createInterest", + "create_interest_category": "createInterestCategory", + "create_landing_page": "createLandingPage", + "create_merge_field": "createMergeField", + "create_segment": "createSegment", + "create_template": "createTemplate", + "delete_audience": "deleteAudience", + "delete_batch_operation": "deleteBatchOperation", + "delete_campaign": "deleteCampaign", + "delete_interest": "deleteInterest", + "delete_interest_category": "deleteInterestCategory", + "delete_landing_page": "deleteLandingPage", + "delete_member": "deleteMember", + "delete_member_permanent": "permanentlyDeleteMember", + "delete_merge_field": "deleteMergeField", + "delete_segment": "deleteSegment", + "delete_template": "deleteTemplate", + "get_audience": "getAudience", + "get_audiences": "getAudiences", + "get_automation": "getAutomation", + "get_automations": "getAutomations", + "get_batch_operation": "getBatchOperation", + "get_batch_operations": "getBatchOperations", + "get_campaign": "getCampaign", + "get_campaign_content": "getCampaignContent", + "get_campaign_report": "getCampaignReport", + "get_campaign_reports": "getCampaignReports", + "get_campaigns": "getCampaigns", + "get_interest": "getInterest", + "get_interest_categories": "getInterestCategories", + "get_interest_category": "getInterestCategory", + "get_interests": "getInterests", + "get_landing_page": "getLandingPage", + "get_landing_pages": "getLandingPages", + "get_member": "getMember", + "get_member_tags": "getMemberTags", + "get_members": "getMembers", + "get_merge_field": "getMergeField", + "get_merge_fields": "getMergeFields", + "get_segment": "getSegment", + "get_segment_members": "getSegmentMembers", + "get_segments": "getSegments", + "get_template": "getTemplate", + "get_templates": "getTemplates", + "pause_automation": "pauseAutomation", + "publish_landing_page": "publishLandingPage", + "remove_member_tags": "removeMemberTags", + "remove_segment_member": "removeSegmentMember", + "replicate_campaign": "replicateCampaign", + "schedule_campaign": "scheduleCampaign", + "send_campaign": "sendCampaign", + "set_campaign_content": "setCampaignContent", + "start_automation": "startAutomation", + "unarchive_member": "unarchiveMember", + "unpublish_landing_page": "unpublishLandingPage", + "unschedule_campaign": "unscheduleCampaign", + "update_audience": "updateAudience", + "update_campaign": "updateCampaign", + "update_interest": "updateInterest", + "update_interest_category": "updateInterestCategory", + "update_landing_page": "updateLandingPage", + "update_member": "updateMember", + "update_merge_field": "updateMergeField", + "update_segment": "updateSegment", + "update_template": "updateTemplate" + } + }, + "mailchimp_v2": { + "namespace": "mailchimp", + "methods": { + "add_member": "addMember", + "add_member_tags": "addMemberTags", + "add_or_update_member": "addOrUpdateMember", + "add_segment_member": "addSegmentMember", + "add_subscriber_to_automation": "addSubscriberToAutomation", + "archive_member": "archiveMember", + "create_audience": "createAudience", + "create_batch_operation": "createBatchOperation", + "create_campaign": "createCampaign", + "create_interest": "createInterest", + "create_interest_category": "createInterestCategory", + "create_landing_page": "createLandingPage", + "create_merge_field": "createMergeField", + "create_segment": "createSegment", + "create_template": "createTemplate", + "delete_audience": "deleteAudience", + "delete_batch_operation": "deleteBatchOperation", + "delete_campaign": "deleteCampaign", + "delete_interest": "deleteInterest", + "delete_interest_category": "deleteInterestCategory", + "delete_landing_page": "deleteLandingPage", + "delete_member": "deleteMember", + "delete_member_permanent": "permanentlyDeleteMember", + "delete_merge_field": "deleteMergeField", + "delete_segment": "deleteSegment", + "delete_template": "deleteTemplate", + "get_audience": "getAudience", + "get_audiences": "getAudiences", + "get_automation": "getAutomation", + "get_automations": "getAutomations", + "get_batch_operation": "getBatchOperation", + "get_batch_operations": "getBatchOperations", + "get_campaign": "getCampaign", + "get_campaign_content": "getCampaignContent", + "get_campaign_report": "getCampaignReport", + "get_campaign_reports": "getCampaignReports", + "get_campaigns": "getCampaigns", + "get_interest": "getInterest", + "get_interest_categories": "getInterestCategories", + "get_interest_category": "getInterestCategory", + "get_interests": "getInterests", + "get_landing_page": "getLandingPage", + "get_landing_pages": "getLandingPages", + "get_member": "getMember", + "get_member_tags": "getMemberTags", + "get_members": "getMembers", + "get_merge_field": "getMergeField", + "get_merge_fields": "getMergeFields", + "get_segment": "getSegment", + "get_segment_members": "getSegmentMembers", + "get_segments": "getSegments", + "get_template": "getTemplate", + "get_templates": "getTemplates", + "pause_automation": "pauseAutomation", + "publish_landing_page": "publishLandingPage", + "remove_member_tags": "removeMemberTags", + "remove_segment_member": "removeSegmentMember", + "replicate_campaign": "replicateCampaign", + "schedule_campaign": "scheduleCampaign", + "send_campaign": "sendCampaign", + "set_campaign_content": "setCampaignContent", + "start_automation": "startAutomation", + "unarchive_member": "unarchiveMember", + "unpublish_landing_page": "unpublishLandingPage", + "unschedule_campaign": "unscheduleCampaign", + "update_audience": "updateAudience", + "update_campaign": "updateCampaign", + "update_interest": "updateInterest", + "update_interest_category": "updateInterestCategory", + "update_landing_page": "updateLandingPage", + "update_member": "updateMember", + "update_merge_field": "updateMergeField", + "update_segment": "updateSegment", + "update_template": "updateTemplate" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "mailgun": { + "namespace": "legacy.mailgun", + "methods": { + "add_list_member": "addListMember", + "create_mailing_list": "createMailingList", + "get_domain": "getDomain", + "get_mailing_list": "getMailingList", + "get_message": "getMessage", + "list_domains": "listDomains", + "list_messages": "listMessages", + "send_message": "sendMessage" + } + }, + "mailgun_v2": { + "namespace": "mailgun", + "methods": { + "add_list_member": "addListMember", + "create_mailing_list": "createMailingList", + "get_domain": "getDomain", + "get_mailing_list": "getMailingList", + "get_message": "getMessage", + "list_domains": "listDomains", + "list_messages": "listMessages", + "send_message": "sendMessage" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "managed_agent": { + "namespace": "managedAgent", + "methods": { + "archive_session": "archiveSession", + "create_session": "createSession", + "delete_session": "deleteSession", + "get_session": "getSession", + "interrupt_session": "interruptSession", + "list_events": "listEvents", + "respond_custom_tool": "respondToCustomTool", + "respond_tool_confirmation": "respondToToolConfirmation", + "run_session": "runSessionCreateSendWaitForReply", + "send_message": "sendMessage", + "update_session": "updateSession" + } + }, + "manageengine_sdp": { + "namespace": "manageengineSdp", + "methods": { + "add_change_note": "addChangeNote", + "add_problem_note": "addProblemNote", + "add_request_note": "addRequestNote", + "create_asset": "createAsset", + "create_change": "createChange", + "create_problem": "createProblem", + "create_request": "createRequest", + "create_solution": "createSolution", + "delete_asset": "deleteAsset", + "delete_change": "deleteChange", + "delete_problem": "deleteProblem", + "delete_request": "deleteRequest", + "delete_solution": "deleteSolution", + "get_asset": "getAsset", + "get_change": "getChange", + "get_problem": "getProblem", + "get_request": "getRequest", + "get_solution": "getSolution", + "list_assets": "listAssets", + "list_change_notes": "listChangeNotes", + "list_changes": "listChanges", + "list_problem_notes": "listProblemNotes", + "list_problems": "listProblems", + "list_request_notes": "listRequestNotes", + "list_requests": "listRequests", + "list_solutions": "listSolutions", + "update_asset": "updateAsset", + "update_change": "updateChange", + "update_problem": "updateProblem", + "update_request": "updateRequest", + "update_solution": "updateSolution" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "manual_trigger": { + "namespace": "legacy.manualTrigger" + }, + "mcp": { + "namespace": "mcpBlock", + "methods": { + "list": "listOperations", + "run": "runOperation" + } + }, + "mem0": { + "namespace": "legacy.mem0", + "methods": { + "add": "addMemories", + "get": "getMemories", + "search": "searchMemories" + } + }, + "mem0_v2": { + "namespace": "mem0", + "methods": { + "add": "addMemories", + "get": "getMemories", + "search": "searchMemories" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "memory": { + "namespace": "memory", + "methods": { + "add": "addMemory", + "delete": "deleteMemory", + "get": "getMemory", + "getAll": "getAllMemories" + } + }, + "microsoft_ad": { + "namespace": "microsoftAd", + "methods": { + "add_directory_role_member": "addDirectoryRoleMember", + "add_group_member": "addGroupMember", + "add_user_app_role_assignment": "grantAppRoleToUser", + "assign_license": "assignLicense", + "create_group": "createGroup", + "create_user": "createUser", + "delete_group": "deleteGroup", + "delete_user": "deleteUser", + "get_conditional_access_policy": "getConditionalAccessPolicy", + "get_device": "getDevice", + "get_group": "getGroup", + "get_user": "getUser", + "list_authentication_methods": "listAuthenticationMethods", + "list_conditional_access_policies": "listConditionalAccessPolicies", + "list_devices": "listDevices", + "list_directory_audits": "listDirectoryAudits", + "list_directory_role_members": "listDirectoryRoleMembers", + "list_directory_roles": "listDirectoryRoles", + "list_group_members": "listGroupMembers", + "list_groups": "listGroups", + "list_service_principal_app_role_assignments": "listApplicationAssignments", + "list_service_principals": "listServicePrincipals", + "list_sign_ins": "listSignIns", + "list_subscribed_skus": "listSubscribedSkus", + "list_user_app_role_assignments": "listUserAppRoleAssignments", + "list_user_devices": "listUserDevices", + "list_user_licenses": "listUserLicenses", + "list_user_memberships": "listUserMemberships", + "list_users": "listUsers", + "remove_directory_role_member": "removeDirectoryRoleMember", + "remove_group_member": "removeGroupMember", + "remove_user_app_role_assignment": "revokeAppRoleFromUser", + "reset_password": "resetPassword", + "revoke_sign_in_sessions": "revokeSignInSessions", + "set_password": "setPassword", + "update_group": "updateGroup", + "update_user": "updateUser" + } + }, + "microsoft_dataverse": { + "namespace": "legacy.microsoftDataverse", + "methods": { + "associate": "associateRecords", + "create_multiple": "createMultiple", + "create_record": "createRecord", + "delete_record": "deleteRecord", + "disassociate": "disassociateRecords", + "download_file": "downloadFile", + "execute_action": "executeAction", + "execute_function": "executeFunction", + "fetchxml_query": "fetchXmlQuery", + "get_entity_metadata": "getTableMetadata", + "get_record": "getRecord", + "list_records": "listRecords", + "search": "search", + "update_multiple": "updateMultiple", + "update_record": "updateRecord", + "upload_file": "uploadFile", + "upsert_record": "upsertRecord", + "whoami": "whoAmI" + } + }, + "microsoft_dataverse_v2": { + "namespace": "microsoftDataverse", + "methods": { + "associate": "associateRecords", + "create_multiple": "createMultiple", + "create_record": "createRecord", + "delete_record": "deleteRecord", + "disassociate": "disassociateRecords", + "download_file": "downloadFile", + "execute_action": "executeAction", + "execute_function": "executeFunction", + "fetchxml_query": "fetchXmlQuery", + "get_entity_metadata": "getTableMetadata", + "get_record": "getRecord", + "list_records": "listRecords", + "search": "search", + "update_multiple": "updateMultiple", + "update_record": "updateRecord", + "upload_file": "uploadFile", + "upsert_record": "upsertRecord", + "whoami": "whoAmI" + } + }, + "microsoft_dynamics_365": { + "namespace": "microsoftDynamics365", + "methods": { + "assign_record": "assignRecord", + "close_case": "closeCase", + "close_opportunity": "closeOpportunity", + "create_record": "createRecord", + "get_record": "getRecord", + "list_owners": "listOwners", + "list_records": "listRecords", + "qualify_lead": "qualifyLead", + "search_records": "searchRecords", + "update_record": "updateRecord" + } + }, + "microsoft_excel": { + "namespace": "legacy.microsoftExcel", + "methods": { + "clear_range": "clearRange", + "create_table": "createTable", + "delete_worksheet": "deleteWorksheet", + "format_range": "formatRange", + "read": "readData", + "sort_range": "sortRange", + "table_add": "addToTable", + "worksheet_add": "addWorksheet", + "write": "writeUpdateData" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "microsoft_excel_v2": { + "namespace": "microsoftExcel", + "methods": { + "calculate": "calculateWorkbook", + "clear_range": "clearRange", + "close_session": "closeSession", + "create_session": "createSession", + "create_table": "createTable", + "delete_table": "deleteTable", + "delete_table_row": "deleteTableRow", + "delete_worksheet": "deleteWorksheet", + "format_range": "formatRange", + "get_table": "getTable", + "get_table_row": "getTableRow", + "get_worksheet": "getWorksheet", + "list_table_rows": "listTableRows", + "list_tables": "listTables", + "list_worksheets": "listWorksheets", + "read": "readData", + "refresh_session": "refreshSession", + "sort_range": "sortRange", + "table_add": "addTableRows", + "update_table": "updateTable", + "update_table_row": "updateTableRow", + "update_worksheet": "updateWorksheet", + "worksheet_add": "addWorksheet", + "write": "writeData" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "microsoft_planner": { + "namespace": "microsoftPlanner", + "methods": { + "create_bucket": "createBucket", + "create_plan": "createPlan", + "create_task": "createTask", + "delete_bucket": "deleteBucket", + "delete_plan": "deletePlan", + "delete_task": "deleteTask", + "get_plan_details": "getPlanDetails", + "get_task_details": "getTaskDetails", + "list_buckets": "listBuckets", + "list_plans": "listPlans", + "read_bucket": "readBucket", + "read_plan": "readPlan", + "read_task": "readTask", + "update_bucket": "updateBucket", + "update_plan": "updatePlan", + "update_plan_details": "updatePlanDetails", + "update_task": "updateTask", + "update_task_details": "updateTaskDetails" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "microsoft_teams": { + "namespace": "microsoftTeams", + "methods": { + "delete_channel_message": "deleteChannelMessage", + "delete_chat_message": "deleteChatMessage", + "get_message": "getMessage", + "list_channel_members": "listChannelMembers", + "list_channels": "listChannels", + "list_chat_members": "listChatMembers", + "list_chats": "listChats", + "list_team_members": "listTeamMembers", + "list_teams": "listTeams", + "read_channel": "readChannelMessages", + "read_chat": "readChatMessages", + "reply_to_message": "replyToChannelMessage", + "set_reaction": "addReaction", + "unset_reaction": "removeReaction", + "update_channel_message": "updateChannelMessage", + "update_chat_message": "updateChatMessage", + "write_channel": "writeChannelMessage", + "write_chat": "writeChatMessage" + }, + "triggers": { + "microsoftteams_chat_subscription": "microsoftteamsChatSubscription", + "microsoftteams_webhook": "microsoftteamsWebhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "triggerCredentials": "credential" + } + } + }, + "microsoft_word": { + "namespace": "microsoftWord", + "methods": { + "append": "appendContent", + "create": "createDocument", + "create_from_template": "createFromTemplate", + "export_pdf": "exportAsPdf", + "list": "listDocuments", + "read": "readDocument", + "replace_text": "findAndReplaceText", + "update": "replaceContent" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "millionverifier": { + "namespace": "millionverifier", + "methods": { + "millionverifier_get_credits": "getRemainingCredits", + "millionverifier_verify_email": "verifyEmail" + } + }, + "mintlify": { + "namespace": "mintlify", + "methods": { + "create_agent_job": "createAgentJob", + "create_assistant_message": "askAssistant", + "detect_ai_prose": "detectAiSoundingProse", + "get_agent_job": "getAgentJob", + "get_assistant_caller_stats": "getAssistantCallerStats", + "get_assistant_conversations": "getAssistantConversations", + "get_feedback": "getFeedback", + "get_feedback_by_page": "getFeedbackByPage", + "get_page_content": "getPageContent", + "get_searches": "getSearchQueries", + "get_update_status": "getUpdateStatus", + "get_views": "getPageViews", + "get_visitors": "getUniqueVisitors", + "search": "searchDocumentation", + "send_agent_message": "sendAgentMessage", + "trigger_automation": "triggerAutomation", + "trigger_preview": "triggerPreviewDeployment", + "trigger_update": "triggerUpdate" + } + }, + "mistral_parse": { + "namespace": "legacy.mistralParse" + }, + "mistral_parse_v2": { + "namespace": "legacy.mistralParseV2" + }, + "mistral_parse_v3": { + "namespace": "mistralParse" + }, + "modal": { + "namespace": "modal", + "methods": { + "call_function": "callFunction", + "chat_completion": "chatCompletion", + "list_models": "listModels" + } + }, + "monaco": { + "namespace": "monaco", + "methods": { + "monaco_add_audience_contacts": "addContactsToAudience", + "monaco_add_campaign_audiences": "addAudiencesToCampaign", + "monaco_create_audience": "createAudience", + "monaco_create_contact": "createContact", + "monaco_create_opportunity": "createOpportunity", + "monaco_create_tag": "createTag", + "monaco_create_task": "createTask", + "monaco_delete_account": "deleteAccount", + "monaco_delete_contact": "deleteContact", + "monaco_delete_opportunity": "deleteOpportunity", + "monaco_enroll_campaign_contacts": "enrollContactsInCampaign", + "monaco_get_account": "getAccount", + "monaco_get_audience": "getAudience", + "monaco_get_campaign": "getCampaign", + "monaco_get_contact": "getContact", + "monaco_get_conversation": "getConversation", + "monaco_get_current_user": "getCurrentUser", + "monaco_get_field_schemas": "getFieldSchemas", + "monaco_get_meeting": "getMeeting", + "monaco_get_opportunity": "getOpportunity", + "monaco_get_sequence": "getSequence", + "monaco_get_task": "getTask", + "monaco_link_opportunity_contacts": "linkContactsToOpportunity", + "monaco_list_accounts": "listAccounts", + "monaco_list_audience_contacts": "listAudienceContacts", + "monaco_list_audiences": "listAudiences", + "monaco_list_campaigns": "listCampaigns", + "monaco_list_contacts": "listContacts", + "monaco_list_meetings": "listMeetings", + "monaco_list_messages": "listMessages", + "monaco_list_opportunities": "listOpportunities", + "monaco_list_opportunity_contacts": "listOpportunityContacts", + "monaco_list_pipelines": "listPipelines", + "monaco_list_sequences": "listSequences", + "monaco_list_tags": "listTags", + "monaco_list_tasks": "listTasks", + "monaco_list_users": "listUsers", + "monaco_remove_audience_contacts": "removeContactsFromAudience", + "monaco_unlink_opportunity_contacts": "unlinkContactsFromOpportunity", + "monaco_update_account": "updateAccount", + "monaco_update_contact": "updateContact", + "monaco_update_opportunity": "updateOpportunity", + "monaco_update_sequence": "updateSequence", + "monaco_update_task": "updateTask", + "monaco_upsert_account": "upsertAccount", + "monaco_upsert_contact": "upsertContact" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "monday": { + "namespace": "monday", + "methods": { + "archive_item": "archiveItem", + "change_column_value": "changeColumnValue", + "create_board": "createBoard", + "create_column": "createColumn", + "create_group": "createGroup", + "create_item": "createItem", + "create_subitem": "createSubitem", + "create_update": "createUpdate", + "delete_item": "deleteItem", + "duplicate_item": "duplicateItem", + "get_board": "getBoard", + "get_groups": "getGroups", + "get_item": "getItem", + "get_items": "getItems", + "list_boards": "listBoards", + "move_item_to_group": "moveItemToGroup", + "search_items": "searchItems", + "update_item": "updateItem" + }, + "triggers": { + "monday_column_changed": "columnChanged", + "monday_item_archived": "itemArchived", + "monday_item_created": "itemCreated", + "monday_item_deleted": "itemDeleted", + "monday_item_moved": "itemMoved", + "monday_item_name_changed": "itemNameChanged", + "monday_status_changed": "statusChanged", + "monday_subitem_created": "subitemCreated", + "monday_update_created": "updateCreated" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "triggerCredentials": "credential" + } + } + }, + "mongodb": { + "namespace": "mongodb", + "methods": { + "delete": "deleteDocuments", + "execute": "aggregatePipeline", + "insert": "insertDocuments", + "introspect": "introspectDatabase", + "query": "findDocuments", + "update": "updateDocuments" + } + }, + "mothership": { + "namespace": "mothership" + }, + "mssql": { + "namespace": "legacy.mssql", + "methods": { + "delete": "deleteData", + "execute": "executeRawSql", + "insert": "insertData", + "introspect": "introspectSchema", + "query": "querySelect", + "update": "updateData" + } + }, + "mssql_v2": { + "namespace": "mssql", + "methods": { + "delete": "deleteData", + "execute": "executeRawSql", + "insert": "insertData", + "introspect": "introspectSchema", + "query": "querySelect", + "update": "updateData" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "mysql": { + "namespace": "legacy.mysql", + "methods": { + "delete": "deleteData", + "execute": "executeRawSql", + "insert": "insertData", + "introspect": "introspectSchema", + "query": "querySelect", + "update": "updateData" + } + }, + "mysql_v2": { + "namespace": "mysql", + "methods": { + "delete": "deleteData", + "execute": "executeRawSql", + "insert": "insertData", + "introspect": "introspectSchema", + "query": "querySelect", + "update": "updateData" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "neo4j": { + "namespace": "neo4j", + "methods": { + "create": "createNodesRelationships", + "delete": "deleteNodesRelationships", + "execute": "executeCypher", + "introspect": "introspectSchema", + "merge": "mergeFindOrCreate", + "query": "queryMatch", + "update": "updatePropertiesSet" + } + }, + "netsuite": { + "namespace": "netsuite", + "methods": { + "netsuite_attach_record": "attachRecordOrFile", + "netsuite_batch_create_records": "batchCreateRecords", + "netsuite_batch_delete_records": "batchDeleteRecords", + "netsuite_batch_get_records": "batchGetRecords", + "netsuite_batch_update_records": "batchUpdateRecords", + "netsuite_batch_upsert_records": "batchUpsertRecords", + "netsuite_create_record": "createRecord", + "netsuite_delete_record": "deleteRecord", + "netsuite_detach_record": "detachRecordOrFile", + "netsuite_execute_action": "executeRecordAction", + "netsuite_execute_dataset": "executeSuiteAnalyticsDataset", + "netsuite_execute_suiteql": "executeSuiteQl", + "netsuite_get_async_result": "getAsyncOperationResult", + "netsuite_get_async_status": "getAsyncStatus", + "netsuite_get_governance_limits": "getGovernanceLimits", + "netsuite_get_record": "getRecord", + "netsuite_get_record_form": "getRecordForm", + "netsuite_get_record_metadata": "getRecordMetadata", + "netsuite_get_select_options": "getSelectOptions", + "netsuite_get_server_time": "getServerTime", + "netsuite_get_subresource": "getSubresource", + "netsuite_list_datasets": "listSuiteAnalyticsDatasets", + "netsuite_list_record_types": "listRecordTypes", + "netsuite_list_records": "listSearchRecords", + "netsuite_transform_record": "transformRecord", + "netsuite_update_record": "updateRecord", + "netsuite_upsert_record": "upsertRecord" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "neverbounce": { + "namespace": "neverbounce", + "methods": { + "neverbounce_get_credits": "getRemainingCredits", + "neverbounce_verify_email": "verifyEmail" + } + }, + "new_relic": { + "namespace": "legacy.newRelic", + "methods": { + "new_relic_create_deployment_event": "createDeploymentEvent", + "new_relic_get_entity": "getEntity", + "new_relic_nrql_query": "runNrqlQuery", + "new_relic_search_entities": "searchEntities" + } + }, + "new_relic_v2": { + "namespace": "newRelic", + "methods": { + "new_relic_create_deployment_event": "createDeploymentEvent", + "new_relic_get_entity": "getEntity", + "new_relic_nrql_query": "runNrqlQuery", + "new_relic_search_entities": "searchEntities" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "note": { + "namespace": "note" + }, + "notion": { + "namespace": "legacy.notion", + "methods": { + "notion_add_database_row": "addDatabaseRow", + "notion_append_blocks": "appendBlockChildren", + "notion_create_comment": "createComment", + "notion_create_database": "createDatabase", + "notion_create_page": "createPage", + "notion_delete_block": "deleteBlock", + "notion_list_comments": "listComments", + "notion_list_users": "listUsers", + "notion_query_database": "queryDatabase", + "notion_read": "readPage", + "notion_read_database": "readDatabase", + "notion_retrieve_block": "retrieveBlock", + "notion_retrieve_block_children": "retrieveBlockChildren", + "notion_retrieve_user": "retrieveUser", + "notion_search": "searchWorkspace", + "notion_update_block": "updateBlock", + "notion_update_page": "updatePageProperties", + "notion_write": "appendContent" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "notion_v2": { + "namespace": "notion", + "methods": { + "notion_add_database_row": "addDatabaseRow", + "notion_append_blocks": "appendBlockChildren", + "notion_create_comment": "createComment", + "notion_create_database": "createDatabase", + "notion_create_page": "createPage", + "notion_delete_block": "deleteBlock", + "notion_list_comments": "listComments", + "notion_list_users": "listUsers", + "notion_query_database": "queryDatabase", + "notion_read": "readPage", + "notion_read_database": "readDatabase", + "notion_retrieve_block": "retrieveBlock", + "notion_retrieve_block_children": "retrieveBlockChildren", + "notion_retrieve_user": "retrieveUser", + "notion_search": "searchWorkspace", + "notion_update_block": "updateBlock", + "notion_update_page": "updatePageProperties", + "notion_write": "appendContent" + }, + "triggers": { + "notion_comment_created": "commentCreated", + "notion_database_created": "databaseCreated", + "notion_database_deleted": "databaseDeleted", + "notion_database_schema_updated": "databaseSchemaUpdated", + "notion_page_content_updated": "pageContentUpdated", + "notion_page_created": "pageCreated", + "notion_page_deleted": "pageDeleted", + "notion_page_properties_updated": "pagePropertiesUpdated", + "notion_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "obsidian": { + "namespace": "obsidian", + "methods": { + "append_active": "appendToActiveFile", + "append_note": "appendToNote", + "append_periodic_note": "appendToPeriodicNote", + "create_note": "createNote", + "delete_note": "deleteNote", + "execute_command": "executeCommand", + "get_active": "getActiveFile", + "get_note": "getNote", + "get_periodic_note": "getPeriodicNote", + "list_commands": "listCommands", + "list_files": "listFiles", + "open_file": "openFile", + "patch_active": "patchActiveFile", + "patch_note": "patchNote", + "search": "search" + } + }, + "okta": { + "namespace": "legacy.okta", + "methods": { + "okta_activate_group_rule": "activateGroupRule", + "okta_activate_user": "activateUser", + "okta_add_user_to_group": "addUserToGroup", + "okta_assign_group_to_app": "assignGroupToApplication", + "okta_assign_user_role": "assignUserRole", + "okta_assign_user_to_app": "assignUserToApplication", + "okta_clear_user_sessions": "clearUserSessions", + "okta_create_group": "createGroup", + "okta_create_group_rule": "createGroupRule", + "okta_create_user": "createUser", + "okta_deactivate_group_rule": "deactivateGroupRule", + "okta_deactivate_user": "deactivateUser", + "okta_delete_group": "deleteGroup", + "okta_delete_group_rule": "deleteGroupRule", + "okta_delete_user": "deleteUser", + "okta_enroll_factor": "enrollFactor", + "okta_get_app": "getApplication", + "okta_get_factor": "getFactor", + "okta_get_group": "getGroup", + "okta_get_group_rule": "getGroupRule", + "okta_get_logs": "getSystemLogEvents", + "okta_get_session": "getSession", + "okta_get_user": "getUser", + "okta_list_app_groups": "listApplicationGroups", + "okta_list_app_users": "listApplicationUsers", + "okta_list_apps": "listApplications", + "okta_list_factors": "listFactors", + "okta_list_group_members": "listGroupMembers", + "okta_list_group_rules": "listGroupRules", + "okta_list_groups": "listGroups", + "okta_list_user_roles": "listUserRoles", + "okta_list_users": "listUsers", + "okta_remove_group_from_app": "removeGroupFromApplication", + "okta_remove_user_from_app": "removeUserFromApplication", + "okta_remove_user_from_group": "removeUserFromGroup", + "okta_remove_user_role": "removeUserRole", + "okta_reset_all_factors": "resetAllFactors", + "okta_reset_factor": "resetFactor", + "okta_reset_password": "resetPassword", + "okta_revoke_session": "revokeSession", + "okta_suspend_user": "suspendUser", + "okta_unsuspend_user": "unsuspendUser", + "okta_update_group": "updateGroup", + "okta_update_user": "updateUser" + } + }, + "okta_v2": { + "namespace": "okta", + "methods": { + "okta_activate_group_rule": "activateGroupRule", + "okta_activate_user": "activateUser", + "okta_add_user_to_group": "addUserToGroup", + "okta_assign_group_to_app": "assignGroupToApplication", + "okta_assign_user_role": "assignUserRole", + "okta_assign_user_to_app": "assignUserToApplication", + "okta_clear_user_sessions": "clearUserSessions", + "okta_create_group": "createGroup", + "okta_create_group_rule": "createGroupRule", + "okta_create_user": "createUser", + "okta_deactivate_group_rule": "deactivateGroupRule", + "okta_deactivate_user": "deactivateUser", + "okta_delete_group": "deleteGroup", + "okta_delete_group_rule": "deleteGroupRule", + "okta_delete_user": "deleteUser", + "okta_enroll_factor": "enrollFactor", + "okta_get_app": "getApplication", + "okta_get_factor": "getFactor", + "okta_get_group": "getGroup", + "okta_get_group_rule": "getGroupRule", + "okta_get_logs": "getSystemLogEvents", + "okta_get_session": "getSession", + "okta_get_user": "getUser", + "okta_list_app_groups": "listApplicationGroups", + "okta_list_app_users": "listApplicationUsers", + "okta_list_apps": "listApplications", + "okta_list_factors": "listFactors", + "okta_list_group_members": "listGroupMembers", + "okta_list_group_rules": "listGroupRules", + "okta_list_groups": "listGroups", + "okta_list_user_roles": "listUserRoles", + "okta_list_users": "listUsers", + "okta_remove_group_from_app": "removeGroupFromApplication", + "okta_remove_user_from_app": "removeUserFromApplication", + "okta_remove_user_from_group": "removeUserFromGroup", + "okta_remove_user_role": "removeUserRole", + "okta_reset_all_factors": "resetAllFactors", + "okta_reset_factor": "resetFactor", + "okta_reset_password": "resetPassword", + "okta_revoke_session": "revokeSession", + "okta_suspend_user": "suspendUser", + "okta_unsuspend_user": "unsuspendUser", + "okta_update_group": "updateGroup", + "okta_update_user": "updateUser" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "onedrive": { + "namespace": "onedrive", + "methods": { + "copy": "copyFile", + "create_file": "createFile", + "create_folder": "createFolder", + "create_share_link": "createSharingLink", + "delete": "deleteFile", + "download": "downloadFile", + "get_drive_info": "getDriveInfo", + "get_item": "getItemInfo", + "list": "listFiles", + "move": "moveRenameFile", + "search": "searchFiles", + "upload": "uploadFile" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "onepassword": { + "namespace": "onepassword", + "methods": { + "create_item": "createItem", + "delete_item": "deleteItem", + "get_item": "getItem", + "get_item_file": "getItemFile", + "get_vault": "getVault", + "list_items": "listItems", + "list_vaults": "listVaults", + "replace_item": "replaceItem", + "resolve_secret": "resolveSecret", + "update_item": "updateItem" + } + }, + "openai": { + "namespace": "legacy.openai" + }, + "oracle_fusion_financials": { + "namespace": "oracleFusionFinancials", + "methods": { + "oracle_fusion_financials_apply_receivables_receipt": "applyReceivablesReceipt", + "oracle_fusion_financials_approve_receivables_invoice": "approveReceivablesInvoice", + "oracle_fusion_financials_create_expense_line": "createExpenseLine", + "oracle_fusion_financials_create_expense_report": "createExpenseReport", + "oracle_fusion_financials_create_receivables_credit_memo": "createReceivablesCreditMemo", + "oracle_fusion_financials_create_receivables_invoice": "createReceivablesInvoice", + "oracle_fusion_financials_create_receivables_receipt": "createReceivablesReceipt", + "oracle_fusion_financials_get_expense_line": "getExpenseLine", + "oracle_fusion_financials_get_expense_report": "getExpenseReport", + "oracle_fusion_financials_get_gl_journal_batch": "getGlJournalBatch", + "oracle_fusion_financials_get_gl_ledger": "getGlLedger", + "oracle_fusion_financials_get_payables_invoice": "getPayablesInvoice", + "oracle_fusion_financials_get_payables_invoice_line": "getPayablesInvoiceLine", + "oracle_fusion_financials_get_payables_payment": "getPayablesPayment", + "oracle_fusion_financials_get_receivables_credit_memo": "getReceivablesCreditMemo", + "oracle_fusion_financials_get_receivables_invoice": "getReceivablesInvoice", + "oracle_fusion_financials_get_receivables_invoice_installment": "getReceivablesInvoiceInstallment", + "oracle_fusion_financials_get_receivables_invoice_line": "getReceivablesInvoiceLine", + "oracle_fusion_financials_get_receivables_receipt": "getReceivablesReceipt", + "oracle_fusion_financials_list_expense_lines": "listExpenseLines", + "oracle_fusion_financials_list_expense_reports": "listExpenseReports", + "oracle_fusion_financials_list_gl_balances": "listGlBalances", + "oracle_fusion_financials_list_gl_journal_batches": "listGlJournalBatches", + "oracle_fusion_financials_list_gl_ledgers": "listGlLedgers", + "oracle_fusion_financials_list_payables_invoice_lines": "listPayablesInvoiceLines", + "oracle_fusion_financials_list_payables_invoices": "listPayablesInvoices", + "oracle_fusion_financials_list_payables_payments": "listPayablesPayments", + "oracle_fusion_financials_list_receivables_credit_memos": "listReceivablesCreditMemos", + "oracle_fusion_financials_list_receivables_invoice_installments": "listReceivablesInvoiceInstallments", + "oracle_fusion_financials_list_receivables_invoice_lines": "listReceivablesInvoiceLines", + "oracle_fusion_financials_list_receivables_invoices": "listReceivablesInvoices", + "oracle_fusion_financials_list_receivables_receipts": "listReceivablesReceipts", + "oracle_fusion_financials_submit_expense_report": "submitExpenseReport", + "oracle_fusion_financials_update_expense_line": "updateExpenseLine", + "oracle_fusion_financials_update_expense_report": "updateExpenseReport", + "oracle_fusion_financials_update_receivables_invoice": "updateReceivablesInvoice" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "oracledb": { + "namespace": "oracledb", + "methods": { + "delete": "deleteData", + "execute": "executeSql", + "insert": "insertData", + "introspect": "introspectSchema", + "query": "querySelect", + "update": "updateData" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "otter": { + "namespace": "legacy.otter", + "methods": { + "create_conversation": "importRecording", + "get_conversation": "getConversation", + "get_conversation_audio": "getConversationAudio", + "get_workspace": "getWorkspace", + "list_channel_members": "listChannelMembers", + "list_channels": "listChannels", + "list_conversations": "listConversations", + "list_workspace_conversations": "listWorkspaceConversations" + }, + "triggers": { + "otter_conversation_completed": "conversationCompleted", + "otter_conversation_shared": "conversationShared", + "otter_webhook": "webhook" + } + }, + "otter_v2": { + "namespace": "otter", + "methods": { + "create_conversation": "importRecording", + "get_conversation": "getConversation", + "get_conversation_audio": "getConversationAudio", + "get_workspace": "getWorkspace", + "list_channel_members": "listChannelMembers", + "list_channels": "listChannels", + "list_conversations": "listConversations", + "list_workspace_conversations": "listWorkspaceConversations" + }, + "triggers": { + "otter_conversation_completed": "conversationCompleted", + "otter_conversation_shared": "conversationShared", + "otter_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "outlook": { + "namespace": "outlook", + "methods": { + "copy_outlook": "copyEmail", + "create_event_calendar": "createEvent", + "create_folder_outlook": "createFolder", + "delete_event_calendar": "deleteEvent", + "delete_outlook": "deleteEmail", + "draft_outlook": "draftEmail", + "forward_outlook": "forwardEmail", + "get_attachment_outlook": "getAttachment", + "get_event_calendar": "getCalendarEvent", + "list_attachments_outlook": "listAttachments", + "list_events_calendar": "listCalendarEvents", + "list_folders_outlook": "listFolders", + "mark_read_outlook": "markAsRead", + "mark_unread_outlook": "markAsUnread", + "move_outlook": "moveEmail", + "read_outlook": "readEmail", + "reply_all_outlook": "replyAll", + "reply_outlook": "replyToEmail", + "respond_calendar": "respondToInvite", + "search_outlook": "searchEmail", + "send_outlook": "sendEmail", + "update_event_calendar": "updateEvent", + "update_message_outlook": "setCategoriesFlag" + }, + "triggers": { + "outlook_poller": "poller" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "oauthCredential": "credential" + } + } + }, + "pagerduty": { + "namespace": "legacy.pagerduty", + "methods": { + "add_note": "addNote", + "create_incident": "createIncident", + "get_incident": "getIncident", + "get_service": "getService", + "list_escalation_policies": "listEscalationPolicies", + "list_incident_alerts": "listIncidentAlerts", + "list_incidents": "listIncidents", + "list_oncalls": "listOnCalls", + "list_schedules": "listSchedules", + "list_services": "listServices", + "list_users": "listUsers", + "merge_incidents": "mergeIncidents", + "send_event": "sendEvent", + "snooze_incident": "snoozeIncident", + "update_incident": "updateIncident" + }, + "triggers": { + "pagerduty_incident_acknowledged": "incidentAcknowledged", + "pagerduty_incident_escalated": "incidentEscalated", + "pagerduty_incident_reassigned": "incidentReassigned", + "pagerduty_incident_resolved": "incidentResolved", + "pagerduty_incident_triggered": "incidentTriggered", + "pagerduty_webhook": "webhook" + } + }, + "pagerduty_v2": { + "namespace": "pagerduty", + "methods": { + "add_note": "addNote", + "create_incident": "createIncident", + "get_incident": "getIncident", + "get_service": "getService", + "list_escalation_policies": "listEscalationPolicies", + "list_incident_alerts": "listIncidentAlerts", + "list_incidents": "listIncidents", + "list_oncalls": "listOnCalls", + "list_schedules": "listSchedules", + "list_services": "listServices", + "list_users": "listUsers", + "merge_incidents": "mergeIncidents", + "send_event": "sendEvent", + "snooze_incident": "snoozeIncident", + "update_incident": "updateIncident" + }, + "triggers": { + "pagerduty_incident_acknowledged": "incidentAcknowledged", + "pagerduty_incident_escalated": "incidentEscalated", + "pagerduty_incident_reassigned": "incidentReassigned", + "pagerduty_incident_resolved": "incidentResolved", + "pagerduty_incident_triggered": "incidentTriggered", + "pagerduty_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "parallel_ai": { + "namespace": "parallelAi", + "methods": { + "deep_research": "deepResearch", + "extract": "extractFromUrls", + "search": "search" + } + }, + "peopledatalabs": { + "namespace": "peopledatalabs", + "methods": { + "pdl_autocomplete": "autocomplete", + "pdl_bulk_company_enrich": "bulkCompanyEnrich", + "pdl_bulk_person_enrich": "bulkPersonEnrich", + "pdl_clean_company": "companyCleaner", + "pdl_clean_location": "locationCleaner", + "pdl_clean_school": "schoolCleaner", + "pdl_company_enrich": "companyEnrich", + "pdl_company_search": "companySearch", + "pdl_person_enrich": "personEnrich", + "pdl_person_identify": "personIdentify", + "pdl_person_search": "personSearch" + } + }, + "perplexity": { + "namespace": "perplexity", + "methods": { + "perplexity_chat": "chat", + "perplexity_search": "search" + } + }, + "persona": { + "namespace": "legacy.persona", + "methods": { + "approve_inquiry": "approveInquiry", + "create_account": "createAccount", + "create_inquiry": "createInquiry", + "create_report": "createReport", + "decline_inquiry": "declineInquiry", + "expire_inquiry": "expireInquiry", + "generate_inquiry_link": "generateInquiryLink", + "get_account": "getAccount", + "get_case": "getCase", + "get_document": "getDocument", + "get_inquiry": "getInquiry", + "get_report": "getReport", + "get_verification": "getVerification", + "import_accounts": "importAccountsCsv", + "list_accounts": "listAccounts", + "list_cases": "listCases", + "list_inquiries": "listInquiries", + "list_inquiry_templates": "listInquiryTemplates", + "list_reports": "listReports", + "mark_inquiry_for_review": "markInquiryForReview", + "print_inquiry_pdf": "printInquiryPdf", + "redact_account": "redactAccount", + "redact_inquiry": "redactInquiry", + "resume_inquiry": "resumeInquiry", + "update_account": "updateAccount", + "update_inquiry": "updateInquiry" + } + }, + "persona_v2": { + "namespace": "persona", + "methods": { + "approve_inquiry": "approveInquiry", + "create_account": "createAccount", + "create_inquiry": "createInquiry", + "create_report": "createReport", + "decline_inquiry": "declineInquiry", + "expire_inquiry": "expireInquiry", + "generate_inquiry_link": "generateInquiryLink", + "get_account": "getAccount", + "get_case": "getCase", + "get_document": "getDocument", + "get_inquiry": "getInquiry", + "get_report": "getReport", + "get_verification": "getVerification", + "import_accounts": "importAccountsCsv", + "list_accounts": "listAccounts", + "list_cases": "listCases", + "list_inquiries": "listInquiries", + "list_inquiry_templates": "listInquiryTemplates", + "list_reports": "listReports", + "mark_inquiry_for_review": "markInquiryForReview", + "print_inquiry_pdf": "printInquiryPdf", + "redact_account": "redactAccount", + "redact_inquiry": "redactInquiry", + "resume_inquiry": "resumeInquiry", + "update_account": "updateAccount", + "update_inquiry": "updateInquiry" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "pi": { + "namespace": "pi" + }, + "pinecone": { + "namespace": "pinecone", + "methods": { + "delete_vectors": "deleteVectors", + "describe_index": "describeIndex", + "describe_index_stats": "describeIndexStats", + "fetch": "fetchVectors", + "generate": "generateEmbeddings", + "list_indexes": "listIndexes", + "list_vector_ids": "listVectorIds", + "search_text": "searchWithText", + "search_vector": "searchWithVector", + "update_vector": "updateVector", + "upsert_text": "upsertText" + } + }, + "pipedrive": { + "namespace": "pipedrive", + "methods": { + "create_activity": "createActivity", + "create_deal": "createDeal", + "create_lead": "createLead", + "create_project": "createProject", + "delete_lead": "deleteLead", + "get_activities": "getActivities", + "get_all_deals": "getAllDeals", + "get_deal": "getDeal", + "get_files": "getFiles", + "get_leads": "getLeads", + "get_mail_messages": "getMailThreads", + "get_mail_thread": "getMailThreadMessages", + "get_pipeline_deals": "getPipelineDeals", + "get_pipelines": "getPipelines", + "get_projects": "getProjects", + "update_activity": "updateActivity", + "update_deal": "updateDeal", + "update_lead": "updateLead" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "pitchbook": { + "namespace": "pitchbook", + "methods": { + "company_active_investors": "getCompanyActiveInvestors", + "company_bio": "getCompanyBio", + "company_deal_service_providers": "getCompanyDealServiceProviders", + "company_deals": "getCompanyDeals", + "company_financials": "getCompanyFinancialsHistory", + "company_general_service_providers": "getCompanyServiceProviders", + "company_industries": "getCompanyIndustries", + "company_investors": "getCompanyInvestors", + "company_most_recent_debt_financing": "getCompanyLatestDebtFinancing", + "company_most_recent_financials": "getCompanyLatestFinancials", + "company_most_recent_financing": "getCompanyLatestFinancing", + "company_search": "searchCompanies", + "company_similar_companies": "getSimilarCompanies", + "company_social_analytics": "getCompanySocialAnalytics", + "company_updates": "getCompanyUpdates", + "company_vc_exit_predictions": "getVcExitPredictions", + "contracts_history": "getContractsHistory", + "cost_of_calls": "getCostOfCalls", + "credit_history": "getCreditHistory", + "credit_news": "getCreditNewsArticle", + "credit_news_bulk": "getCreditNewsArticlesInBulk", + "credit_news_most_recent": "getRecentCreditNews", + "credit_news_search": "searchCreditNews", + "deal_bio": "getDealBio", + "deal_cap_table_history": "getDealCapTable", + "deal_debt_lenders": "getDealDebtAndLenders", + "deal_detailed": "getDealDetail", + "deal_investors": "getDealInvestors", + "deal_multiples": "getDealMultiples", + "deal_search": "searchDeals", + "deal_service_providers": "getDealServiceProviders", + "deal_stock_info": "getDealStockInfo", + "deal_tranche_info": "getDealTranches", + "deal_updates": "getDealUpdates", + "deal_valuation": "getDealValuation", + "entity_affiliates": "getEntityAffiliates", + "entity_locations": "getEntityLocations", + "entity_news": "getEntityNews", + "entity_people": "getEntityPeople", + "entity_updates": "getEntityUpdates", + "fund_active_investments": "getFundActiveInvestments", + "fund_benchmark": "getFundBenchmark", + "fund_bio": "getFundBio", + "fund_cash_flows": "getFundCashFlows", + "fund_commitments": "getFundCommitments", + "fund_investment_preferences": "getFundPreferences", + "fund_investments": "getFundInvestments", + "fund_performance": "getFundPerformance", + "fund_search": "searchFunds", + "fund_team": "getFundTeam", + "fund_updates": "getFundUpdates", + "investor_active_investments": "getInvestorActiveInvestments", + "investor_bio": "getInvestorBio", + "investor_board_seats": "getInvestorBoardSeats", + "investor_deal_service_providers": "getInvestorDealServiceProviders", + "investor_funds": "getInvestorFunds", + "investor_general_service_providers": "getInvestorServiceProviders", + "investor_investments": "getInvestorInvestments", + "investor_last_closed_fund": "getInvestorLastClosedFund", + "investor_preferences": "getInvestorPreferences", + "investor_search": "searchInvestors", + "investor_updates": "getInvestorUpdates", + "limited_partner_actual_allocations": "getLpActualAllocations", + "limited_partner_bio": "getLimitedPartnerBio", + "limited_partner_commitment_aggregates": "getLpCommitmentTotals", + "limited_partner_commitment_preferences": "getLpCommitmentPreferences", + "limited_partner_commitments_detailed": "getLpCommitments", + "limited_partner_search": "searchLimitedPartners", + "limited_partner_service_providers": "getLpServiceProviders", + "limited_partner_target_allocations": "getLpTargetAllocations", + "limited_partner_updates": "getLpUpdates", + "lookup_table_structure": "listLookupTables", + "lookup_tables": "getLookupTableCodes", + "patent_detailed": "getPatentDetail", + "patent_search": "searchCompanyPatents", + "people_search": "searchPeople", + "person_bio": "getPersonBio", + "person_contact": "getPersonContact", + "person_education_work": "getPersonHistory", + "sandbox_entities": "listSandboxEntities", + "search": "searchAllEntities", + "service_provider_bio": "getServiceProviderBio", + "service_provider_search": "searchServiceProviders", + "service_provider_updates": "getServiceProviderUpdates", + "serviced_companies": "getServicedCompanies", + "serviced_deals": "getServicedDeals", + "serviced_funds": "getServicedFunds", + "serviced_investors": "getServicedInvestors", + "serviced_limited_partners": "getServicedLimitedPartners", + "shared_search": "sharedSearch", + "usage_report": "getUsageReport" + } + }, + "plane": { + "namespace": "legacy.plane", + "methods": { + "plane_archive_project": "archiveAProject", + "plane_archive_work_item": "archiveAWorkItem", + "plane_confirm_attachment_upload": "confirmAWorkItemAttachmentUpload", + "plane_create_attachment_upload": "createAWorkItemAttachmentUpload", + "plane_create_comment": "createAComment", + "plane_create_cycle": "createACycle", + "plane_create_label": "createALabel", + "plane_create_link": "createALink", + "plane_create_module": "createAModule", + "plane_create_project": "createAProject", + "plane_create_project_page": "createAProjectPage", + "plane_create_state": "createAState", + "plane_create_webhook": "createAWebhook", + "plane_create_work_item": "createAWorkItem", + "plane_delete_attachment": "deleteAnAttachment", + "plane_delete_comment": "deleteAComment", + "plane_delete_cycle": "deleteACycle", + "plane_delete_label": "deleteALabel", + "plane_delete_link": "deleteALink", + "plane_delete_module": "deleteAModule", + "plane_delete_project": "deleteAProject", + "plane_delete_project_page": "deleteAProjectPage", + "plane_delete_state": "deleteAState", + "plane_delete_webhook": "deleteAWebhook", + "plane_delete_work_item": "deleteAWorkItem", + "plane_get_attachment": "getAnAttachment", + "plane_get_comment": "getAComment", + "plane_get_current_user": "getCurrentUser", + "plane_get_cycle": "getACycle", + "plane_get_label": "getALabel", + "plane_get_link": "getALink", + "plane_get_module": "getAModule", + "plane_get_project": "getAProject", + "plane_get_project_page": "getAProjectPage", + "plane_get_project_summary": "getAProjectSummary", + "plane_get_state": "getAState", + "plane_get_webhook": "getAWebhook", + "plane_get_work_item": "getAWorkItem", + "plane_get_work_item_by_identifier": "getAWorkItemByIdentifier", + "plane_list_attachments": "listAttachments", + "plane_list_comments": "listComments", + "plane_list_cycles": "listCycles", + "plane_list_labels": "listLabels", + "plane_list_links": "listLinks", + "plane_list_modules": "listModules", + "plane_list_project_pages": "listProjectPages", + "plane_list_projects": "listProjects", + "plane_list_states": "listStates", + "plane_list_webhooks": "listWebhooks", + "plane_list_work_items": "listWorkItems", + "plane_list_workspace_work_items": "listWorkItemsAcrossAWorkspace", + "plane_manage_cycle_work_items": "addOrRemoveCycleWorkItems", + "plane_manage_module_work_items": "addOrRemoveModuleWorkItems", + "plane_regenerate_webhook_secret": "regenerateAWebhookSecret", + "plane_transfer_cycle_work_items": "transferWorkItemsBetweenCycles", + "plane_unarchive_project": "unarchiveAProject", + "plane_unarchive_work_item": "unarchiveAWorkItem", + "plane_update_comment": "updateAComment", + "plane_update_cycle": "updateACycle", + "plane_update_label": "updateALabel", + "plane_update_link": "updateALink", + "plane_update_module": "updateAModule", + "plane_update_project": "updateAProject", + "plane_update_project_page": "updateAProjectPage", + "plane_update_state": "updateAState", + "plane_update_webhook": "updateAWebhook", + "plane_update_work_item": "updateAWorkItem" + }, + "triggers": { + "plane_cycle_archived": "cycleArchived", + "plane_cycle_created": "cycleCreated", + "plane_cycle_deleted": "cycleDeleted", + "plane_cycle_updated": "cycleUpdated", + "plane_milestone_created": "milestoneCreated", + "plane_milestone_deleted": "milestoneDeleted", + "plane_milestone_updated": "milestoneUpdated", + "plane_module_archived": "moduleArchived", + "plane_module_created": "moduleCreated", + "plane_module_deleted": "moduleDeleted", + "plane_module_updated": "moduleUpdated", + "plane_page_archived": "pageArchived", + "plane_page_comment_created": "pageCommentCreated", + "plane_page_comment_deleted": "pageCommentDeleted", + "plane_page_comment_updated": "pageCommentUpdated", + "plane_page_created": "pageCreated", + "plane_page_deleted": "pageDeleted", + "plane_page_updated": "pageUpdated", + "plane_project_archived": "projectArchived", + "plane_project_created": "projectCreated", + "plane_project_deleted": "projectDeleted", + "plane_project_updated": "projectUpdated", + "plane_webhook": "webhook", + "plane_workitem_archived": "workitemArchived", + "plane_workitem_attachment_created": "workitemAttachmentCreated", + "plane_workitem_attachment_deleted": "workitemAttachmentDeleted", + "plane_workitem_attachment_updated": "workitemAttachmentUpdated", + "plane_workitem_comment_created": "workitemCommentCreated", + "plane_workitem_comment_deleted": "workitemCommentDeleted", + "plane_workitem_comment_updated": "workitemCommentUpdated", + "plane_workitem_created": "workitemCreated", + "plane_workitem_deleted": "workitemDeleted", + "plane_workitem_dependency_created": "workitemDependencyCreated", + "plane_workitem_dependency_deleted": "workitemDependencyDeleted", + "plane_workitem_link_created": "workitemLinkCreated", + "plane_workitem_link_deleted": "workitemLinkDeleted", + "plane_workitem_link_updated": "workitemLinkUpdated", + "plane_workitem_page_link_created": "workitemPageLinkCreated", + "plane_workitem_page_link_deleted": "workitemPageLinkDeleted", + "plane_workitem_relation_created": "workitemRelationCreated", + "plane_workitem_relation_deleted": "workitemRelationDeleted", + "plane_workitem_updated": "workitemUpdated", + "plane_workitem_vote_created": "workitemVoteCreated", + "plane_workitem_vote_deleted": "workitemVoteDeleted" + } + }, + "plane_v2": { + "namespace": "plane", + "methods": { + "plane_archive_project": "archiveAProject", + "plane_archive_work_item": "archiveAWorkItem", + "plane_confirm_attachment_upload": "confirmAWorkItemAttachmentUpload", + "plane_create_attachment_upload": "createAWorkItemAttachmentUpload", + "plane_create_comment": "createAComment", + "plane_create_cycle": "createACycle", + "plane_create_label": "createALabel", + "plane_create_link": "createALink", + "plane_create_module": "createAModule", + "plane_create_project": "createAProject", + "plane_create_project_page": "createAProjectPage", + "plane_create_state": "createAState", + "plane_create_webhook": "createAWebhook", + "plane_create_work_item": "createAWorkItem", + "plane_delete_attachment": "deleteAnAttachment", + "plane_delete_comment": "deleteAComment", + "plane_delete_cycle": "deleteACycle", + "plane_delete_label": "deleteALabel", + "plane_delete_link": "deleteALink", + "plane_delete_module": "deleteAModule", + "plane_delete_project": "deleteAProject", + "plane_delete_project_page": "deleteAProjectPage", + "plane_delete_state": "deleteAState", + "plane_delete_webhook": "deleteAWebhook", + "plane_delete_work_item": "deleteAWorkItem", + "plane_get_attachment": "getAnAttachment", + "plane_get_comment": "getAComment", + "plane_get_current_user": "getCurrentUser", + "plane_get_cycle": "getACycle", + "plane_get_label": "getALabel", + "plane_get_link": "getALink", + "plane_get_module": "getAModule", + "plane_get_project": "getAProject", + "plane_get_project_page": "getAProjectPage", + "plane_get_project_summary": "getAProjectSummary", + "plane_get_state": "getAState", + "plane_get_webhook": "getAWebhook", + "plane_get_work_item": "getAWorkItem", + "plane_get_work_item_by_identifier": "getAWorkItemByIdentifier", + "plane_list_attachments": "listAttachments", + "plane_list_comments": "listComments", + "plane_list_cycles": "listCycles", + "plane_list_labels": "listLabels", + "plane_list_links": "listLinks", + "plane_list_modules": "listModules", + "plane_list_project_pages": "listProjectPages", + "plane_list_projects": "listProjects", + "plane_list_states": "listStates", + "plane_list_webhooks": "listWebhooks", + "plane_list_work_items": "listWorkItems", + "plane_list_workspace_work_items": "listWorkItemsAcrossAWorkspace", + "plane_manage_cycle_work_items": "addOrRemoveCycleWorkItems", + "plane_manage_module_work_items": "addOrRemoveModuleWorkItems", + "plane_regenerate_webhook_secret": "regenerateAWebhookSecret", + "plane_transfer_cycle_work_items": "transferWorkItemsBetweenCycles", + "plane_unarchive_project": "unarchiveAProject", + "plane_unarchive_work_item": "unarchiveAWorkItem", + "plane_update_comment": "updateAComment", + "plane_update_cycle": "updateACycle", + "plane_update_label": "updateALabel", + "plane_update_link": "updateALink", + "plane_update_module": "updateAModule", + "plane_update_project": "updateAProject", + "plane_update_project_page": "updateAProjectPage", + "plane_update_state": "updateAState", + "plane_update_webhook": "updateAWebhook", + "plane_update_work_item": "updateAWorkItem" + }, + "triggers": { + "plane_cycle_archived": "cycleArchived", + "plane_cycle_created": "cycleCreated", + "plane_cycle_deleted": "cycleDeleted", + "plane_cycle_updated": "cycleUpdated", + "plane_milestone_created": "milestoneCreated", + "plane_milestone_deleted": "milestoneDeleted", + "plane_milestone_updated": "milestoneUpdated", + "plane_module_archived": "moduleArchived", + "plane_module_created": "moduleCreated", + "plane_module_deleted": "moduleDeleted", + "plane_module_updated": "moduleUpdated", + "plane_page_archived": "pageArchived", + "plane_page_comment_created": "pageCommentCreated", + "plane_page_comment_deleted": "pageCommentDeleted", + "plane_page_comment_updated": "pageCommentUpdated", + "plane_page_created": "pageCreated", + "plane_page_deleted": "pageDeleted", + "plane_page_updated": "pageUpdated", + "plane_project_archived": "projectArchived", + "plane_project_created": "projectCreated", + "plane_project_deleted": "projectDeleted", + "plane_project_updated": "projectUpdated", + "plane_webhook": "webhook", + "plane_workitem_archived": "workitemArchived", + "plane_workitem_attachment_created": "workitemAttachmentCreated", + "plane_workitem_attachment_deleted": "workitemAttachmentDeleted", + "plane_workitem_attachment_updated": "workitemAttachmentUpdated", + "plane_workitem_comment_created": "workitemCommentCreated", + "plane_workitem_comment_deleted": "workitemCommentDeleted", + "plane_workitem_comment_updated": "workitemCommentUpdated", + "plane_workitem_created": "workitemCreated", + "plane_workitem_deleted": "workitemDeleted", + "plane_workitem_dependency_created": "workitemDependencyCreated", + "plane_workitem_dependency_deleted": "workitemDependencyDeleted", + "plane_workitem_link_created": "workitemLinkCreated", + "plane_workitem_link_deleted": "workitemLinkDeleted", + "plane_workitem_link_updated": "workitemLinkUpdated", + "plane_workitem_page_link_created": "workitemPageLinkCreated", + "plane_workitem_page_link_deleted": "workitemPageLinkDeleted", + "plane_workitem_relation_created": "workitemRelationCreated", + "plane_workitem_relation_deleted": "workitemRelationDeleted", + "plane_workitem_updated": "workitemUpdated", + "plane_workitem_vote_created": "workitemVoteCreated", + "plane_workitem_vote_deleted": "workitemVoteDeleted" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "planetscale": { + "namespace": "legacy.planetscale", + "methods": { + "close_deploy_request": "closeDeployRequestVitess", + "create_backup": "createBackup", + "create_branch": "createBranch", + "create_deploy_request": "createDeployRequestVitess", + "delete_branch": "deleteBranch", + "get_backup": "getBackup", + "get_branch": "getBranch", + "get_database": "getDatabase", + "get_deploy_request": "getDeployRequestVitess", + "list_backups": "listBackups", + "list_branches": "listBranches", + "list_databases": "listDatabases", + "list_deploy_requests": "listDeployRequestsVitess", + "queue_deploy_request": "queueDeployRequestVitess", + "review_deploy_request": "reviewDeployRequestVitess" + } + }, + "planetscale_v2": { + "namespace": "planetscale", + "methods": { + "close_deploy_request": "closeDeployRequestVitess", + "create_backup": "createBackup", + "create_branch": "createBranch", + "create_deploy_request": "createDeployRequestVitess", + "delete_branch": "deleteBranch", + "get_backup": "getBackup", + "get_branch": "getBranch", + "get_database": "getDatabase", + "get_deploy_request": "getDeployRequestVitess", + "list_backups": "listBackups", + "list_branches": "listBranches", + "list_databases": "listDatabases", + "list_deploy_requests": "listDeployRequestsVitess", + "queue_deploy_request": "queueDeployRequestVitess", + "review_deploy_request": "reviewDeployRequestVitess" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "polymarket": { + "namespace": "polymarket", + "methods": { + "get_activity": "getActivity", + "get_event": "getEvent", + "get_events": "getEvents", + "get_holders": "getMarketHolders", + "get_last_trade_price": "getLastTradePrice", + "get_leaderboard": "getLeaderboard", + "get_market": "getMarket", + "get_markets": "getMarkets", + "get_midpoint": "getMidpoint", + "get_orderbook": "getOrderbook", + "get_positions": "getPositions", + "get_price": "getPrice", + "get_price_history": "getPriceHistory", + "get_series": "getSeries", + "get_series_by_id": "getSeriesById", + "get_spread": "getSpread", + "get_tags": "getTags", + "get_tick_size": "getTickSize", + "get_trades": "getTrades", + "search": "search" + } + }, + "postgresql": { + "namespace": "legacy.postgresql", + "methods": { + "delete": "deleteData", + "execute": "executeRawSql", + "insert": "insertData", + "introspect": "introspectSchema", + "query": "querySelect", + "update": "updateData" + } + }, + "postgresql_v2": { + "namespace": "postgresql", + "methods": { + "delete": "deleteData", + "execute": "executeRawSql", + "insert": "insertData", + "introspect": "introspectSchema", + "query": "querySelect", + "update": "updateData" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "posthog": { + "namespace": "posthog", + "methods": { + "posthog_batch_events": "batchEvents", + "posthog_capture_event": "captureEvent", + "posthog_create_annotation": "createAnnotation", + "posthog_create_cohort": "createCohort", + "posthog_create_dashboard": "createDashboard", + "posthog_create_experiment": "createExperiment", + "posthog_create_feature_flag": "createFeatureFlag", + "posthog_create_insight": "createInsight", + "posthog_create_survey": "createSurvey", + "posthog_delete_feature_flag": "deleteFeatureFlag", + "posthog_delete_person": "deletePerson", + "posthog_delete_survey": "deleteSurvey", + "posthog_evaluate_flags": "evaluateFlags", + "posthog_get_cohort": "getCohort", + "posthog_get_dashboard": "getDashboard", + "posthog_get_event_definition": "getEventDefinition", + "posthog_get_experiment": "getExperiment", + "posthog_get_feature_flag": "getFeatureFlag", + "posthog_get_insight": "getInsight", + "posthog_get_organization": "getOrganization", + "posthog_get_person": "getPerson", + "posthog_get_project": "getProject", + "posthog_get_property_definition": "getPropertyDefinition", + "posthog_get_session_recording": "getSessionRecording", + "posthog_get_survey": "getSurvey", + "posthog_list_actions": "listActions", + "posthog_list_annotations": "listAnnotations", + "posthog_list_cohorts": "listCohorts", + "posthog_list_dashboards": "listDashboards", + "posthog_list_event_definitions": "listEventDefinitions", + "posthog_list_experiments": "listExperiments", + "posthog_list_feature_flags": "listFeatureFlags", + "posthog_list_insights": "listInsights", + "posthog_list_organizations": "listOrganizations", + "posthog_list_persons": "listPersons", + "posthog_list_projects": "listProjects", + "posthog_list_property_definitions": "listPropertyDefinitions", + "posthog_list_recording_playlists": "listRecordingPlaylists", + "posthog_list_session_recordings": "listSessionRecordings", + "posthog_list_surveys": "listSurveys", + "posthog_query": "runQueryHogQl", + "posthog_update_cohort": "updateCohort", + "posthog_update_event_definition": "updateEventDefinition", + "posthog_update_experiment": "updateExperiment", + "posthog_update_feature_flag": "updateFeatureFlag", + "posthog_update_insight": "updateInsight", + "posthog_update_property_definition": "updatePropertyDefinition", + "posthog_update_survey": "updateSurvey" + } + }, + "powerbi": { + "namespace": "powerbi", + "methods": { + "powerbi_execute_query": "executeDaxQuery", + "powerbi_get_dataset": "getSemanticModel", + "powerbi_get_refresh_history": "getRefreshHistory", + "powerbi_get_report": "getReport", + "powerbi_list_datasets": "listSemanticModels", + "powerbi_list_reports": "listReports", + "powerbi_list_workspaces": "listWorkspaces", + "powerbi_refresh_dataset": "refreshSemanticModel" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "profound": { + "namespace": "legacy.profound", + "methods": { + "bot_logs": "botLogs", + "bots_report": "botsReport", + "category_assets": "categoryAssets", + "category_personas": "categoryPersonas", + "category_prompts": "categoryPrompts", + "category_tags": "categoryTags", + "category_topics": "categoryTopics", + "citation_prompts": "citationPrompts", + "citations_report": "citationsReport", + "list_assets": "listAssets", + "list_categories": "listCategories", + "list_domains": "listDomains", + "list_models": "listModels", + "list_optimizations": "listOptimizations", + "list_personas": "listPersonas", + "list_regions": "listRegions", + "optimization_analysis": "optimizationAnalysis", + "prompt_answers": "promptAnswers", + "prompt_volume": "promptVolume", + "query_fanouts": "queryFanouts", + "raw_logs": "rawLogs", + "referrals_report": "referralsReport", + "sentiment_report": "sentimentReport", + "visibility_report": "visibilityReport" + } + }, + "profound_v2": { + "namespace": "profound", + "methods": { + "bot_logs": "botLogs", + "bots_report": "botsReport", + "category_assets": "categoryAssets", + "category_personas": "categoryPersonas", + "category_prompts": "categoryPrompts", + "category_tags": "categoryTags", + "category_topics": "categoryTopics", + "citation_prompts": "citationPrompts", + "citations_report": "citationsReport", + "list_assets": "listAssets", + "list_categories": "listCategories", + "list_domains": "listDomains", + "list_models": "listModels", + "list_optimizations": "listOptimizations", + "list_personas": "listPersonas", + "list_regions": "listRegions", + "optimization_analysis": "optimizationAnalysis", + "prompt_answers": "promptAnswers", + "prompt_volume": "promptVolume", + "query_fanouts": "queryFanouts", + "raw_logs": "rawLogs", + "referrals_report": "referralsReport", + "sentiment_report": "sentimentReport", + "visibility_report": "visibilityReport" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "prospeo": { + "namespace": "prospeo", + "methods": { + "prospeo_account_information": "accountInformation", + "prospeo_bulk_enrich_company": "bulkEnrichCompany", + "prospeo_bulk_enrich_person": "bulkEnrichPerson", + "prospeo_enrich_company": "enrichCompany", + "prospeo_enrich_person": "enrichPerson", + "prospeo_search_company": "searchCompany", + "prospeo_search_person": "searchPerson", + "prospeo_search_suggestions": "searchSuggestions" + } + }, + "pulse": { + "namespace": "legacy.pulse" + }, + "pulse_v2": { + "namespace": "legacy.pulseV2" + }, + "pulse_v3": { + "namespace": "pulse", + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "qdrant": { + "namespace": "legacy.qdrant", + "methods": { + "fetch": "fetch", + "search": "search", + "upsert": "upsert" + } + }, + "qdrant_v2": { + "namespace": "qdrant", + "methods": { + "fetch": "fetch", + "search": "search", + "upsert": "upsert" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "quartr": { + "namespace": "legacy.quartr", + "methods": { + "get_audio": "getAudio", + "get_company": "getCompany", + "get_event": "getEvent", + "get_event_summary": "getEventSummary", + "get_report": "getReport", + "get_slide_deck": "getSlideDeck", + "get_transcript": "getTranscript", + "list_audio": "listAudio", + "list_companies": "listCompanies", + "list_document_types": "listDocumentTypes", + "list_documents": "listDocuments", + "list_event_types": "listEventTypes", + "list_events": "listEvents", + "list_live_events": "listLiveEvents", + "list_reports": "listReports", + "list_slide_decks": "listSlideDecks", + "list_transcripts": "listTranscripts" + } + }, + "quartr_v2": { + "namespace": "quartr", + "methods": { + "get_audio": "getAudio", + "get_company": "getCompany", + "get_event": "getEvent", + "get_event_summary": "getEventSummary", + "get_report": "getReport", + "get_slide_deck": "getSlideDeck", + "get_transcript": "getTranscript", + "list_audio": "listAudio", + "list_companies": "listCompanies", + "list_document_types": "listDocumentTypes", + "list_documents": "listDocuments", + "list_event_types": "listEventTypes", + "list_events": "listEvents", + "list_live_events": "listLiveEvents", + "list_reports": "listReports", + "list_slide_decks": "listSlideDecks", + "list_transcripts": "listTranscripts" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "quickbooks": { + "namespace": "quickbooks", + "methods": { + "quickbooks_add_attachment": "addAttachment", + "quickbooks_create_bill": "createBill", + "quickbooks_create_bill_payment": "createBillPayment", + "quickbooks_create_credit_memo": "createCreditMemo", + "quickbooks_create_customer": "createCustomer", + "quickbooks_create_customer_payment": "createCustomerPayment", + "quickbooks_create_deposit": "createDeposit", + "quickbooks_create_employee": "createEmployee", + "quickbooks_create_estimate": "createEstimate", + "quickbooks_create_invoice": "createInvoice", + "quickbooks_create_item": "createItem", + "quickbooks_create_journal_entry": "createJournalEntry", + "quickbooks_create_purchase": "createPurchaseOrExpense", + "quickbooks_create_purchase_order": "createPurchaseOrder", + "quickbooks_create_refund_receipt": "createRefundReceipt", + "quickbooks_create_sales_receipt": "createSalesReceipt", + "quickbooks_create_vendor": "createVendor", + "quickbooks_create_vendor_credit": "createVendorCredit", + "quickbooks_download_attachment": "downloadAttachment", + "quickbooks_download_transaction_pdf": "downloadTransactionPdf", + "quickbooks_email_transaction": "emailTransaction", + "quickbooks_get_company_info": "getCompanyInfo", + "quickbooks_read_accounting_transactions": "readAccountingTransactions", + "quickbooks_read_attachments": "readAttachments", + "quickbooks_read_master_data": "readMasterData", + "quickbooks_read_purchasing_transactions": "readPurchasingTransactions", + "quickbooks_read_sales_transactions": "readSalesTransactions", + "quickbooks_run_financial_report": "runFinancialReport", + "quickbooks_update_bill": "updateBill", + "quickbooks_update_bill_payment": "updateBillPayment", + "quickbooks_update_credit_memo": "updateCreditMemo", + "quickbooks_update_customer": "updateCustomer", + "quickbooks_update_customer_payment": "updateCustomerPayment", + "quickbooks_update_deposit": "updateDeposit", + "quickbooks_update_employee": "updateEmployee", + "quickbooks_update_estimate": "updateEstimate", + "quickbooks_update_invoice": "updateInvoice", + "quickbooks_update_item": "updateItem", + "quickbooks_update_journal_entry": "updateJournalEntry", + "quickbooks_update_purchase": "updatePurchaseOrExpense", + "quickbooks_update_purchase_order": "updatePurchaseOrder", + "quickbooks_update_refund_receipt": "updateRefundReceipt", + "quickbooks_update_sales_receipt": "updateSalesReceipt", + "quickbooks_update_vendor": "updateVendor", + "quickbooks_update_vendor_credit": "updateVendorCredit", + "quickbooks_void_bill_payment": "voidBillPayment", + "quickbooks_void_customer_payment": "voidCustomerPayment", + "quickbooks_void_invoice": "voidInvoice", + "quickbooks_void_sales_receipt": "voidSalesReceipt" + }, + "triggers": { + "quickbooks_account_events": "accountEvents", + "quickbooks_bill_events": "billEvents", + "quickbooks_bill_payment_events": "billPaymentEvents", + "quickbooks_budget_events": "budgetEvents", + "quickbooks_class_events": "classEvents", + "quickbooks_credit_memo_events": "creditMemoEvents", + "quickbooks_currency_events": "currencyEvents", + "quickbooks_customer_events": "customerEvents", + "quickbooks_department_events": "departmentEvents", + "quickbooks_deposit_events": "depositEvents", + "quickbooks_employee_events": "employeeEvents", + "quickbooks_estimate_events": "estimateEvents", + "quickbooks_invoice_events": "invoiceEvents", + "quickbooks_item_events": "itemEvents", + "quickbooks_journal_code_events": "journalCodeEvents", + "quickbooks_journal_entry_events": "journalEntryEvents", + "quickbooks_payment_events": "paymentEvents", + "quickbooks_payment_method_events": "paymentMethodEvents", + "quickbooks_preferences_updated": "preferencesUpdated", + "quickbooks_purchase_events": "purchaseEvents", + "quickbooks_purchase_order_events": "purchaseOrderEvents", + "quickbooks_refund_receipt_events": "refundReceiptEvents", + "quickbooks_sales_receipt_events": "salesReceiptEvents", + "quickbooks_tax_agency_events": "taxAgencyEvents", + "quickbooks_term_events": "termEvents", + "quickbooks_time_activity_events": "timeActivityEvents", + "quickbooks_transfer_events": "transferEvents", + "quickbooks_vendor_credit_events": "vendorCreditEvents", + "quickbooks_vendor_events": "vendorEvents" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "triggerCredentials": "credential" + } + } + }, + "quiver": { + "namespace": "legacy.quiver", + "methods": { + "image_to_svg": "imageToSvg", + "list_models": "listModels", + "text_to_svg": "textToSvg" + } + }, + "quiver_v2": { + "namespace": "legacy.quiverV2", + "methods": { + "image_to_svg": "imageToSvg", + "list_models": "listModels", + "text_to_svg": "textToSvg" + } + }, + "quiver_v3": { + "namespace": "quiver", + "methods": { + "image_to_svg": "imageToSvg", + "list_models": "listModels", + "text_to_svg": "textToSvg" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "rabbitmq": { + "namespace": "rabbitmq", + "methods": { + "rabbitmq_create_binding": "createBinding", + "rabbitmq_create_exchange": "createExchange", + "rabbitmq_create_policy": "createPolicy", + "rabbitmq_create_queue": "createQueue", + "rabbitmq_delete_binding": "deleteBinding", + "rabbitmq_delete_exchange": "deleteExchange", + "rabbitmq_delete_policy": "deletePolicy", + "rabbitmq_delete_queue": "deleteQueue", + "rabbitmq_get_exchange": "getExchange", + "rabbitmq_get_messages": "getMessages", + "rabbitmq_get_overview": "getOverview", + "rabbitmq_get_queue": "getQueue", + "rabbitmq_health_check": "healthCheck", + "rabbitmq_list_bindings": "listQueueBindings", + "rabbitmq_list_channels": "listChannels", + "rabbitmq_list_connections": "listConnections", + "rabbitmq_list_consumers": "listConsumers", + "rabbitmq_list_exchange_bindings": "listExchangeBindings", + "rabbitmq_list_exchanges": "listExchanges", + "rabbitmq_list_nodes": "listNodes", + "rabbitmq_list_policies": "listPolicies", + "rabbitmq_list_queues": "listQueues", + "rabbitmq_list_vhosts": "listVirtualHosts", + "rabbitmq_publish_message": "publishMessage", + "rabbitmq_purge_queue": "purgeQueue" + } + }, + "railway": { + "namespace": "legacy.railway", + "methods": { + "create_environment": "createEnvironment", + "create_project": "createProject", + "create_service": "createService", + "delete_environment": "deleteEnvironment", + "delete_project": "deleteProject", + "delete_service": "deleteService", + "delete_variable": "deleteVariable", + "deploy_service": "deployService", + "get_deployment": "getDeployment", + "get_deployment_logs": "getDeploymentLogs", + "get_project": "getProject", + "list_deployments": "listDeployments", + "list_project_members": "listProjectMembers", + "list_projects": "listProjects", + "list_variables": "listVariables", + "restart_deployment": "restartDeployment", + "rollback_deployment": "rollbackDeployment", + "transfer_project": "transferProject", + "update_project": "updateProject", + "upsert_variable": "upsertVariable" + } + }, + "railway_v2": { + "namespace": "railway", + "methods": { + "create_environment": "createEnvironment", + "create_project": "createProject", + "create_service": "createService", + "delete_environment": "deleteEnvironment", + "delete_project": "deleteProject", + "delete_service": "deleteService", + "delete_variable": "deleteVariable", + "deploy_service": "deployService", + "get_deployment": "getDeployment", + "get_deployment_logs": "getDeploymentLogs", + "get_project": "getProject", + "list_deployments": "listDeployments", + "list_project_members": "listProjectMembers", + "list_projects": "listProjects", + "list_variables": "listVariables", + "restart_deployment": "restartDeployment", + "rollback_deployment": "rollbackDeployment", + "transfer_project": "transferProject", + "update_project": "updateProject", + "upsert_variable": "upsertVariable" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "ramp": { + "namespace": "ramp", + "methods": { + "create_memo": "createMemo", + "get_balance": "getBalance", + "get_bill": "getBill", + "get_business": "getBusiness", + "get_memo": "getMemo", + "get_physical_card": "getPhysicalCard", + "get_reimbursement": "getReimbursement", + "get_transaction": "getTransaction", + "get_user": "getUser", + "get_vendor": "getVendor", + "get_virtual_card": "getVirtualCard", + "list_bills": "listBills", + "list_physical_cards": "listPhysicalCards", + "list_reimbursements": "listReimbursements", + "list_transactions": "listTransactions", + "list_users": "listUsers", + "list_vendors": "listVendors", + "list_virtual_cards": "listVirtualCards" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "rb2b": { + "namespace": "legacy.rb2b", + "methods": { + "credit_check": "creditCheck", + "email_to_activity": "emailToLastActiveDate", + "hem_to_best_linkedin": "emailHemToBestLinkedInUrl", + "hem_to_business_profile": "emailHemToBusinessProfile", + "hem_to_linkedin": "emailHemToLinkedInSlug", + "hem_to_maid": "emailHemToMaid", + "ip_to_company": "ipToCompany", + "ip_to_hem": "ipToHem", + "ip_to_maid": "ipToMaid", + "linkedin_slug_search": "linkedInSlugSearch", + "linkedin_to_best_personal_email": "linkedInToBestPersonalEmail", + "linkedin_to_business_profile": "linkedInToBusinessProfile", + "linkedin_to_hashed_emails": "linkedInToHashedEmails", + "linkedin_to_mobile_phone": "linkedInToMobilePhone", + "linkedin_to_personal_email": "linkedInToPersonalEmail" + } + }, + "rb2b_v2": { + "namespace": "rb2b", + "methods": { + "credit_check": "creditCheck", + "email_to_activity": "emailToLastActiveDate", + "hem_to_best_linkedin": "emailHemToBestLinkedInUrl", + "hem_to_business_profile": "emailHemToBusinessProfile", + "hem_to_linkedin": "emailHemToLinkedInSlug", + "hem_to_maid": "emailHemToMaid", + "ip_to_company": "ipToCompany", + "ip_to_hem": "ipToHem", + "ip_to_maid": "ipToMaid", + "linkedin_slug_search": "linkedInSlugSearch", + "linkedin_to_best_personal_email": "linkedInToBestPersonalEmail", + "linkedin_to_business_profile": "linkedInToBusinessProfile", + "linkedin_to_hashed_emails": "linkedInToHashedEmails", + "linkedin_to_mobile_phone": "linkedInToMobilePhone", + "linkedin_to_personal_email": "linkedInToPersonalEmail" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "rds": { + "namespace": "legacy.rds", + "methods": { + "delete": "deleteData", + "execute": "executeRawSql", + "insert": "insertData", + "introspect": "introspectSchema", + "query": "querySelect", + "update": "updateData" + } + }, + "rds_v2": { + "namespace": "rds", + "methods": { + "delete": "deleteData", + "execute": "executeRawSql", + "insert": "insertData", + "introspect": "introspectSchema", + "query": "querySelect", + "update": "updateData" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "reddit": { + "namespace": "reddit", + "methods": { + "delete": "delete_", + "edit": "edit", + "get_comments": "getComments", + "get_controversial": "getControversialPosts", + "get_info": "getInfoById", + "get_me": "getMyProfile", + "get_messages": "getMessages", + "get_posts": "getPosts", + "get_saved": "getSavedItems", + "get_subreddit_info": "getSubredditInfo", + "get_subreddit_rules": "getSubredditRules", + "get_user": "getUserProfile", + "get_user_comments": "getUserComments", + "get_user_posts": "getUserPosts", + "hide": "hide", + "list_my_subreddits": "listMySubreddits", + "lock": "lockMod", + "mark_all_read": "markAllMessagesRead", + "mark_read": "markMessagesRead", + "marknsfw": "markNsfw", + "mod_approve": "approveMod", + "mod_distinguish": "distinguishMod", + "mod_remove": "removeMod", + "mod_sticky": "stickyMod", + "reply": "reply", + "report": "report", + "save": "save", + "search": "searchSubreddit", + "search_subreddits": "searchSubreddits", + "send_message": "sendMessage", + "submit_post": "submitPost", + "subscribe": "subscribe", + "unhide": "unhide", + "unlock": "unlockMod", + "unmarknsfw": "unmarkNsfw", + "unsave": "unsave", + "vote": "vote" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "redis": { + "namespace": "redis", + "methods": { + "command": "command", + "delete": "delete_", + "exists": "exists", + "expire": "expire", + "get": "get", + "hdel": "hdel", + "hget": "hget", + "hgetall": "hgetall", + "hset": "hset", + "incr": "incr", + "incrby": "incrby", + "keys": "listKeys", + "llen": "llen", + "lpop": "lpop", + "lpush": "lpush", + "lrange": "lrange", + "persist": "persist", + "rpop": "rpop", + "rpush": "rpush", + "set": "set", + "setnx": "setnx", + "ttl": "ttl" + } + }, + "reducto": { + "namespace": "legacy.reducto" + }, + "reducto_v2": { + "namespace": "legacy.reductoV2" + }, + "reducto_v3": { + "namespace": "reducto", + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "resend": { + "namespace": "legacy.resend", + "methods": { + "cancel_email": "cancelEmail", + "create_audience": "createAudience", + "create_broadcast": "createBroadcast", + "create_contact": "createContact", + "delete_audience": "deleteAudience", + "delete_contact": "deleteContact", + "get_audience": "getAudience", + "get_broadcast": "getBroadcast", + "get_contact": "getContact", + "get_email": "getEmail", + "list_audiences": "listAudiences", + "list_contacts": "listContacts", + "list_domains": "listDomains", + "send_broadcast": "sendBroadcast", + "send_email": "sendEmail", + "update_contact": "updateContact" + }, + "triggers": { + "resend_email_bounced": "emailBounced", + "resend_email_clicked": "emailClicked", + "resend_email_complained": "emailComplained", + "resend_email_delivered": "emailDelivered", + "resend_email_failed": "emailFailed", + "resend_email_opened": "emailOpened", + "resend_email_sent": "emailSent", + "resend_webhook": "webhook" + } + }, + "resend_v2": { + "namespace": "resend", + "methods": { + "cancel_email": "cancelEmail", + "create_audience": "createAudience", + "create_broadcast": "createBroadcast", + "create_contact": "createContact", + "delete_audience": "deleteAudience", + "delete_contact": "deleteContact", + "get_audience": "getAudience", + "get_broadcast": "getBroadcast", + "get_contact": "getContact", + "get_email": "getEmail", + "list_audiences": "listAudiences", + "list_contacts": "listContacts", + "list_domains": "listDomains", + "send_broadcast": "sendBroadcast", + "send_email": "sendEmail", + "update_contact": "updateContact" + }, + "triggers": { + "resend_email_bounced": "emailBounced", + "resend_email_clicked": "emailClicked", + "resend_email_complained": "emailComplained", + "resend_email_delivered": "emailDelivered", + "resend_email_failed": "emailFailed", + "resend_email_opened": "emailOpened", + "resend_email_sent": "emailSent", + "resend_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "response": { + "namespace": "response" + }, + "revenuecat": { + "namespace": "revenuecat", + "methods": { + "create_purchase": "createPurchase", + "defer_google_subscription": "deferGoogleSubscription", + "delete_customer": "deleteCustomer", + "get_customer": "getCustomer", + "grant_entitlement": "grantEntitlement", + "list_offerings": "listOfferings", + "refund_google_subscription": "refundGoogleSubscription", + "revoke_entitlement": "revokeEntitlement", + "revoke_google_subscription": "revokeGoogleSubscription", + "update_subscriber_attributes": "updateSubscriberAttributes" + }, + "triggers": { + "revenuecat_cancellation": "cancellation", + "revenuecat_expiration": "expiration", + "revenuecat_initial_purchase": "initialPurchase", + "revenuecat_non_renewing_purchase": "nonRenewingPurchase", + "revenuecat_product_change": "productChange", + "revenuecat_renewal": "renewal" + } + }, + "rippling": { + "namespace": "legacy.rippling", + "methods": { + "bulk_create_custom_object_records": "bulkCreateCustomObjectRecords", + "bulk_delete_custom_object_records": "bulkDeleteCustomObjectRecords", + "bulk_update_custom_object_records": "bulkUpdateCustomObjectRecords", + "create_business_partner": "createBusinessPartner", + "create_business_partner_group": "createBusinessPartnerGroup", + "create_custom_app": "createCustomApp", + "create_custom_object": "createCustomObject", + "create_custom_object_field": "createCustomObjectField", + "create_custom_object_record": "createCustomObjectRecord", + "create_custom_page": "createCustomPage", + "create_custom_setting": "createCustomSetting", + "create_department": "createDepartment", + "create_draft_hires": "createDraftHires", + "create_object_category": "createObjectCategory", + "create_title": "createTitle", + "create_work_location": "createWorkLocation", + "delete_business_partner": "deleteBusinessPartner", + "delete_business_partner_group": "deleteBusinessPartnerGroup", + "delete_custom_app": "deleteCustomApp", + "delete_custom_object": "deleteCustomObject", + "delete_custom_object_field": "deleteCustomObjectField", + "delete_custom_object_record": "deleteCustomObjectRecord", + "delete_custom_page": "deleteCustomPage", + "delete_custom_setting": "deleteCustomSetting", + "delete_object_category": "deleteObjectCategory", + "delete_title": "deleteTitle", + "delete_work_location": "deleteWorkLocation", + "get_business_partner": "getBusinessPartner", + "get_business_partner_group": "getBusinessPartnerGroup", + "get_current_user": "getCurrentUser", + "get_custom_app": "getCustomApp", + "get_custom_object": "getCustomObject", + "get_custom_object_field": "getCustomObjectField", + "get_custom_object_record": "getCustomObjectRecord", + "get_custom_object_record_by_external_id": "getCustomObjectRecordByExternalId", + "get_custom_page": "getCustomPage", + "get_custom_setting": "getCustomSetting", + "get_department": "getDepartment", + "get_employment_type": "getEmploymentType", + "get_job_function": "getJobFunction", + "get_object_category": "getObjectCategory", + "get_report_run": "getReportRun", + "get_supergroup": "getSupergroup", + "get_team": "getTeam", + "get_title": "getTitle", + "get_user": "getUser", + "get_work_location": "getWorkLocation", + "get_worker": "getWorker", + "list_business_partner_groups": "listBusinessPartnerGroups", + "list_business_partners": "listBusinessPartners", + "list_companies": "listCompanies", + "list_custom_apps": "listCustomApps", + "list_custom_fields": "listCustomFields", + "list_custom_object_fields": "listCustomObjectFields", + "list_custom_object_records": "listCustomObjectRecords", + "list_custom_objects": "listCustomObjects", + "list_custom_pages": "listCustomPages", + "list_custom_settings": "listCustomSettings", + "list_departments": "listDepartments", + "list_employment_types": "listEmploymentTypes", + "list_entitlements": "listEntitlements", + "list_job_functions": "listJobFunctions", + "list_object_categories": "listObjectCategories", + "list_supergroup_exclusion_members": "listSupergroupExclusionMembers", + "list_supergroup_inclusion_members": "listSupergroupInclusionMembers", + "list_supergroup_members": "listSupergroupMembers", + "list_supergroups": "listSupergroups", + "list_teams": "listTeams", + "list_titles": "listTitles", + "list_users": "listUsers", + "list_work_locations": "listWorkLocations", + "list_workers": "listWorkers", + "query_custom_object_records": "queryCustomObjectRecords", + "trigger_report_run": "triggerReportRun", + "update_custom_app": "updateCustomApp", + "update_custom_object": "updateCustomObject", + "update_custom_object_field": "updateCustomObjectField", + "update_custom_object_record": "updateCustomObjectRecord", + "update_custom_page": "updateCustomPage", + "update_custom_setting": "updateCustomSetting", + "update_department": "updateDepartment", + "update_object_category": "updateObjectCategory", + "update_supergroup_exclusion_members": "updateSupergroupExclusionMembers", + "update_supergroup_inclusion_members": "updateSupergroupInclusionMembers", + "update_title": "updateTitle", + "update_work_location": "updateWorkLocation" + } + }, + "rippling_v2": { + "namespace": "rippling", + "methods": { + "bulk_create_custom_object_records": "bulkCreateCustomObjectRecords", + "bulk_delete_custom_object_records": "bulkDeleteCustomObjectRecords", + "bulk_update_custom_object_records": "bulkUpdateCustomObjectRecords", + "create_business_partner": "createBusinessPartner", + "create_business_partner_group": "createBusinessPartnerGroup", + "create_custom_app": "createCustomApp", + "create_custom_object": "createCustomObject", + "create_custom_object_field": "createCustomObjectField", + "create_custom_object_record": "createCustomObjectRecord", + "create_custom_page": "createCustomPage", + "create_custom_setting": "createCustomSetting", + "create_department": "createDepartment", + "create_draft_hires": "createDraftHires", + "create_object_category": "createObjectCategory", + "create_title": "createTitle", + "create_work_location": "createWorkLocation", + "delete_business_partner": "deleteBusinessPartner", + "delete_business_partner_group": "deleteBusinessPartnerGroup", + "delete_custom_app": "deleteCustomApp", + "delete_custom_object": "deleteCustomObject", + "delete_custom_object_field": "deleteCustomObjectField", + "delete_custom_object_record": "deleteCustomObjectRecord", + "delete_custom_page": "deleteCustomPage", + "delete_custom_setting": "deleteCustomSetting", + "delete_object_category": "deleteObjectCategory", + "delete_title": "deleteTitle", + "delete_work_location": "deleteWorkLocation", + "get_business_partner": "getBusinessPartner", + "get_business_partner_group": "getBusinessPartnerGroup", + "get_current_user": "getCurrentUser", + "get_custom_app": "getCustomApp", + "get_custom_object": "getCustomObject", + "get_custom_object_field": "getCustomObjectField", + "get_custom_object_record": "getCustomObjectRecord", + "get_custom_object_record_by_external_id": "getCustomObjectRecordByExternalId", + "get_custom_page": "getCustomPage", + "get_custom_setting": "getCustomSetting", + "get_department": "getDepartment", + "get_employment_type": "getEmploymentType", + "get_job_function": "getJobFunction", + "get_object_category": "getObjectCategory", + "get_report_run": "getReportRun", + "get_supergroup": "getSupergroup", + "get_team": "getTeam", + "get_title": "getTitle", + "get_user": "getUser", + "get_work_location": "getWorkLocation", + "get_worker": "getWorker", + "list_business_partner_groups": "listBusinessPartnerGroups", + "list_business_partners": "listBusinessPartners", + "list_companies": "listCompanies", + "list_custom_apps": "listCustomApps", + "list_custom_fields": "listCustomFields", + "list_custom_object_fields": "listCustomObjectFields", + "list_custom_object_records": "listCustomObjectRecords", + "list_custom_objects": "listCustomObjects", + "list_custom_pages": "listCustomPages", + "list_custom_settings": "listCustomSettings", + "list_departments": "listDepartments", + "list_employment_types": "listEmploymentTypes", + "list_entitlements": "listEntitlements", + "list_job_functions": "listJobFunctions", + "list_object_categories": "listObjectCategories", + "list_supergroup_exclusion_members": "listSupergroupExclusionMembers", + "list_supergroup_inclusion_members": "listSupergroupInclusionMembers", + "list_supergroup_members": "listSupergroupMembers", + "list_supergroups": "listSupergroups", + "list_teams": "listTeams", + "list_titles": "listTitles", + "list_users": "listUsers", + "list_work_locations": "listWorkLocations", + "list_workers": "listWorkers", + "query_custom_object_records": "queryCustomObjectRecords", + "trigger_report_run": "triggerReportRun", + "update_custom_app": "updateCustomApp", + "update_custom_object": "updateCustomObject", + "update_custom_object_field": "updateCustomObjectField", + "update_custom_object_record": "updateCustomObjectRecord", + "update_custom_page": "updateCustomPage", + "update_custom_setting": "updateCustomSetting", + "update_department": "updateDepartment", + "update_object_category": "updateObjectCategory", + "update_supergroup_exclusion_members": "updateSupergroupExclusionMembers", + "update_supergroup_inclusion_members": "updateSupergroupInclusionMembers", + "update_title": "updateTitle", + "update_work_location": "updateWorkLocation" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "rocketlane": { + "namespace": "legacy.rocketlane", + "methods": { + "add_field_option": "addFieldOption", + "add_project_members": "addProjectMembers", + "add_task_assignees": "addTaskAssignees", + "add_task_dependencies": "addTaskDependencies", + "add_task_followers": "addTaskFollowers", + "archive_project": "archiveProject", + "assign_placeholders": "assignPlaceholder", + "create_field": "createField", + "create_phase": "createPhase", + "create_project": "createProject", + "create_space": "createSpace", + "create_space_document": "createSpaceDocument", + "create_task": "createTask", + "create_time_entry": "createTimeEntry", + "create_time_off": "createTimeOff", + "delete_field": "deleteField", + "delete_phase": "deletePhase", + "delete_project": "deleteProject", + "delete_space": "deleteSpace", + "delete_space_document": "deleteSpaceDocument", + "delete_task": "deleteTask", + "delete_time_entry": "deleteTimeEntry", + "delete_time_off": "deleteTimeOff", + "get_field": "getField", + "get_invoice": "getInvoice", + "get_invoice_line_items": "getInvoiceLineItems", + "get_invoice_payments": "getInvoicePayments", + "get_phase": "getPhase", + "get_project": "getProject", + "get_space": "getSpace", + "get_space_document": "getSpaceDocument", + "get_task": "getTask", + "get_time_entry": "getTimeEntry", + "get_time_off": "getTimeOff", + "get_user": "getUser", + "import_template": "importTemplate", + "list_fields": "listFields", + "list_invoices": "listInvoices", + "list_phases": "listPhases", + "list_placeholders": "listPlaceholders", + "list_projects": "listProjects", + "list_resource_allocations": "listResourceAllocations", + "list_space_documents": "listSpaceDocuments", + "list_spaces": "listSpaces", + "list_tasks": "listTasks", + "list_time_entries": "listTimeEntries", + "list_time_entry_categories": "listTimeEntryCategories", + "list_time_offs": "listTimeOffs", + "list_users": "listUsers", + "move_task_to_phase": "moveTaskToPhase", + "remove_project_members": "removeProjectMembers", + "remove_task_assignees": "removeTaskAssignees", + "remove_task_dependencies": "removeTaskDependencies", + "remove_task_followers": "removeTaskFollowers", + "search_time_entries": "searchTimeEntries", + "unassign_placeholders": "unassignPlaceholder", + "update_field": "updateField", + "update_field_option": "updateFieldOption", + "update_phase": "updatePhase", + "update_project": "updateProject", + "update_space": "updateSpace", + "update_space_document": "updateSpaceDocument", + "update_task": "updateTask", + "update_time_entry": "updateTimeEntry" + } + }, + "rocketlane_v2": { + "namespace": "rocketlane", + "methods": { + "add_field_option": "addFieldOption", + "add_project_members": "addProjectMembers", + "add_task_assignees": "addTaskAssignees", + "add_task_dependencies": "addTaskDependencies", + "add_task_followers": "addTaskFollowers", + "archive_project": "archiveProject", + "assign_placeholders": "assignPlaceholder", + "create_field": "createField", + "create_phase": "createPhase", + "create_project": "createProject", + "create_space": "createSpace", + "create_space_document": "createSpaceDocument", + "create_task": "createTask", + "create_time_entry": "createTimeEntry", + "create_time_off": "createTimeOff", + "delete_field": "deleteField", + "delete_phase": "deletePhase", + "delete_project": "deleteProject", + "delete_space": "deleteSpace", + "delete_space_document": "deleteSpaceDocument", + "delete_task": "deleteTask", + "delete_time_entry": "deleteTimeEntry", + "delete_time_off": "deleteTimeOff", + "get_field": "getField", + "get_invoice": "getInvoice", + "get_invoice_line_items": "getInvoiceLineItems", + "get_invoice_payments": "getInvoicePayments", + "get_phase": "getPhase", + "get_project": "getProject", + "get_space": "getSpace", + "get_space_document": "getSpaceDocument", + "get_task": "getTask", + "get_time_entry": "getTimeEntry", + "get_time_off": "getTimeOff", + "get_user": "getUser", + "import_template": "importTemplate", + "list_fields": "listFields", + "list_invoices": "listInvoices", + "list_phases": "listPhases", + "list_placeholders": "listPlaceholders", + "list_projects": "listProjects", + "list_resource_allocations": "listResourceAllocations", + "list_space_documents": "listSpaceDocuments", + "list_spaces": "listSpaces", + "list_tasks": "listTasks", + "list_time_entries": "listTimeEntries", + "list_time_entry_categories": "listTimeEntryCategories", + "list_time_offs": "listTimeOffs", + "list_users": "listUsers", + "move_task_to_phase": "moveTaskToPhase", + "remove_project_members": "removeProjectMembers", + "remove_task_assignees": "removeTaskAssignees", + "remove_task_dependencies": "removeTaskDependencies", + "remove_task_followers": "removeTaskFollowers", + "search_time_entries": "searchTimeEntries", + "unassign_placeholders": "unassignPlaceholder", + "update_field": "updateField", + "update_field_option": "updateFieldOption", + "update_phase": "updatePhase", + "update_project": "updateProject", + "update_space": "updateSpace", + "update_space_document": "updateSpaceDocument", + "update_task": "updateTask", + "update_time_entry": "updateTimeEntry" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "rootly": { + "namespace": "legacy.rootly", + "methods": { + "rootly_acknowledge_alert": "acknowledgeAlert", + "rootly_add_incident_event": "addIncidentEvent", + "rootly_add_subscribers": "addSubscribers", + "rootly_assign_incident_role": "assignIncidentRole", + "rootly_create_action_item": "createActionItem", + "rootly_create_alert": "createAlert", + "rootly_create_incident": "createIncident", + "rootly_create_status_page_event": "createStatusPageEvent", + "rootly_delete_action_item": "deleteActionItem", + "rootly_delete_incident": "deleteIncident", + "rootly_escalate_alert": "escalateAlert", + "rootly_get_alert": "getAlert", + "rootly_get_incident": "getIncident", + "rootly_list_action_items": "listActionItems", + "rootly_list_alerts": "listAlerts", + "rootly_list_causes": "listCauses", + "rootly_list_environments": "listEnvironments", + "rootly_list_escalation_policies": "listEscalationPolicies", + "rootly_list_functionalities": "listFunctionalities", + "rootly_list_incident_events": "listIncidentEvents", + "rootly_list_incident_roles": "listIncidentRoles", + "rootly_list_incident_types": "listIncidentTypes", + "rootly_list_incidents": "listIncidents", + "rootly_list_on_calls": "listOnCalls", + "rootly_list_playbooks": "listPlaybooks", + "rootly_list_retrospectives": "listRetrospectives", + "rootly_list_schedules": "listSchedules", + "rootly_list_services": "listServices", + "rootly_list_severities": "listSeverities", + "rootly_list_teams": "listTeams", + "rootly_list_users": "listUsers", + "rootly_mitigate_incident": "mitigateIncident", + "rootly_remove_subscribers": "removeSubscribers", + "rootly_resolve_alert": "resolveAlert", + "rootly_resolve_incident": "resolveIncident", + "rootly_run_workflow": "runWorkflow", + "rootly_snooze_alert": "snoozeAlert", + "rootly_unassign_incident_role": "unassignIncidentRole", + "rootly_update_action_item": "updateActionItem", + "rootly_update_alert": "updateAlert", + "rootly_update_incident": "updateIncident" + }, + "triggers": { + "rootly_alert_created": "alertCreated", + "rootly_incident_created": "incidentCreated", + "rootly_incident_resolved": "incidentResolved", + "rootly_incident_updated": "incidentUpdated" + } + }, + "rootly_v2": { + "namespace": "rootly", + "methods": { + "rootly_acknowledge_alert": "acknowledgeAlert", + "rootly_add_incident_event": "addIncidentEvent", + "rootly_add_subscribers": "addSubscribers", + "rootly_assign_incident_role": "assignIncidentRole", + "rootly_create_action_item": "createActionItem", + "rootly_create_alert": "createAlert", + "rootly_create_incident": "createIncident", + "rootly_create_status_page_event": "createStatusPageEvent", + "rootly_delete_action_item": "deleteActionItem", + "rootly_delete_incident": "deleteIncident", + "rootly_escalate_alert": "escalateAlert", + "rootly_get_alert": "getAlert", + "rootly_get_incident": "getIncident", + "rootly_list_action_items": "listActionItems", + "rootly_list_alerts": "listAlerts", + "rootly_list_causes": "listCauses", + "rootly_list_environments": "listEnvironments", + "rootly_list_escalation_policies": "listEscalationPolicies", + "rootly_list_functionalities": "listFunctionalities", + "rootly_list_incident_events": "listIncidentEvents", + "rootly_list_incident_roles": "listIncidentRoles", + "rootly_list_incident_types": "listIncidentTypes", + "rootly_list_incidents": "listIncidents", + "rootly_list_on_calls": "listOnCalls", + "rootly_list_playbooks": "listPlaybooks", + "rootly_list_retrospectives": "listRetrospectives", + "rootly_list_schedules": "listSchedules", + "rootly_list_services": "listServices", + "rootly_list_severities": "listSeverities", + "rootly_list_teams": "listTeams", + "rootly_list_users": "listUsers", + "rootly_mitigate_incident": "mitigateIncident", + "rootly_remove_subscribers": "removeSubscribers", + "rootly_resolve_alert": "resolveAlert", + "rootly_resolve_incident": "resolveIncident", + "rootly_run_workflow": "runWorkflow", + "rootly_snooze_alert": "snoozeAlert", + "rootly_unassign_incident_role": "unassignIncidentRole", + "rootly_update_action_item": "updateActionItem", + "rootly_update_alert": "updateAlert", + "rootly_update_incident": "updateIncident" + }, + "triggers": { + "rootly_alert_created": "alertCreated", + "rootly_incident_created": "incidentCreated", + "rootly_incident_resolved": "incidentResolved", + "rootly_incident_updated": "incidentUpdated" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "router": { + "namespace": "legacy.router" + }, + "router_v2": { + "namespace": "router" + }, + "rss": { + "namespace": "rss", + "triggers": { + "rss_poller": "poller" + } + }, + "s3": { + "namespace": "legacy.s3", + "methods": { + "copy_object": "copyObject", + "create_bucket": "createBucket", + "delete_bucket": "deleteBucket", + "delete_object": "deleteObject", + "delete_objects": "deleteObjectsBatch", + "get_object": "downloadFile", + "head_object": "headObjectMetadata", + "list_buckets": "listBuckets", + "list_objects": "listObjects", + "presigned_url": "presignedUrl", + "put_object": "uploadFile" + } + }, + "s3_v2": { + "namespace": "s3", + "methods": { + "copy_object": "copyObject", + "create_bucket": "createBucket", + "delete_bucket": "deleteBucket", + "delete_object": "deleteObject", + "delete_objects": "deleteObjectsBatch", + "get_object": "downloadFile", + "head_object": "headObjectMetadata", + "list_buckets": "listBuckets", + "list_objects": "listObjects", + "presigned_url": "presignedUrl", + "put_object": "uploadFile" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "sailpoint": { + "namespace": "legacy.sailpoint", + "methods": { + "sailpoint_approve_access_request": "approveAccessRequest", + "sailpoint_cancel_access_request": "cancelAccessRequest", + "sailpoint_decide_certification_review_items": "decideCertificationReviewItems", + "sailpoint_get_access_profile": "getAccessProfile", + "sailpoint_get_access_profile_entitlements": "getAccessProfileEntitlements", + "sailpoint_get_access_request_config": "getAccessRequestConfig", + "sailpoint_get_access_request_status": "getAccessRequestStatus", + "sailpoint_get_account": "getAccount", + "sailpoint_get_account_activity": "getAccountActivity", + "sailpoint_get_account_entitlements": "getAccountEntitlements", + "sailpoint_get_account_selections": "getAccountSelections", + "sailpoint_get_campaign": "getCampaign", + "sailpoint_get_certification": "getCertification", + "sailpoint_get_entitlement": "getEntitlement", + "sailpoint_get_entitlement_request_config": "getEntitlementRequestConfig", + "sailpoint_get_identity": "getIdentity", + "sailpoint_get_role": "getRole", + "sailpoint_get_role_entitlements": "getRoleEntitlements", + "sailpoint_get_source": "getSource", + "sailpoint_get_task_status": "getTaskStatus", + "sailpoint_list_access_profiles": "listAccessProfiles", + "sailpoint_list_account_activities": "listAccountActivities", + "sailpoint_list_accounts": "listAccounts", + "sailpoint_list_campaigns": "listCampaigns", + "sailpoint_list_certification_review_items": "listCertificationReviewItems", + "sailpoint_list_certifications": "listCertifications", + "sailpoint_list_entitlements": "listEntitlements", + "sailpoint_list_identities": "listIdentities", + "sailpoint_list_identity_entitlements": "listIdentityEntitlements", + "sailpoint_list_pending_access_request_approvals": "listPendingAccessRequestApprovals", + "sailpoint_list_roles": "listRoles", + "sailpoint_list_sources": "listSources", + "sailpoint_load_accounts": "loadAccountsCsv", + "sailpoint_load_entitlements": "loadEntitlementsCsv", + "sailpoint_reject_access_request": "rejectAccessRequest", + "sailpoint_request_access": "requestAccess", + "sailpoint_search": "search", + "sailpoint_search_aggregate": "searchAggregate", + "sailpoint_search_count": "searchCount", + "sailpoint_sign_off_certification": "signOffCertification" + } + }, + "sailpoint_v2": { + "namespace": "sailpoint", + "methods": { + "sailpoint_approve_access_request": "approveAccessRequest", + "sailpoint_cancel_access_request": "cancelAccessRequest", + "sailpoint_decide_certification_review_items": "decideCertificationReviewItems", + "sailpoint_get_access_profile": "getAccessProfile", + "sailpoint_get_access_profile_entitlements": "getAccessProfileEntitlements", + "sailpoint_get_access_request_config": "getAccessRequestConfig", + "sailpoint_get_access_request_status": "getAccessRequestStatus", + "sailpoint_get_account": "getAccount", + "sailpoint_get_account_activity": "getAccountActivity", + "sailpoint_get_account_entitlements": "getAccountEntitlements", + "sailpoint_get_account_selections": "getAccountSelections", + "sailpoint_get_campaign": "getCampaign", + "sailpoint_get_certification": "getCertification", + "sailpoint_get_entitlement": "getEntitlement", + "sailpoint_get_entitlement_request_config": "getEntitlementRequestConfig", + "sailpoint_get_identity": "getIdentity", + "sailpoint_get_role": "getRole", + "sailpoint_get_role_entitlements": "getRoleEntitlements", + "sailpoint_get_source": "getSource", + "sailpoint_get_task_status": "getTaskStatus", + "sailpoint_list_access_profiles": "listAccessProfiles", + "sailpoint_list_account_activities": "listAccountActivities", + "sailpoint_list_accounts": "listAccounts", + "sailpoint_list_campaigns": "listCampaigns", + "sailpoint_list_certification_review_items": "listCertificationReviewItems", + "sailpoint_list_certifications": "listCertifications", + "sailpoint_list_entitlements": "listEntitlements", + "sailpoint_list_identities": "listIdentities", + "sailpoint_list_identity_entitlements": "listIdentityEntitlements", + "sailpoint_list_pending_access_request_approvals": "listPendingAccessRequestApprovals", + "sailpoint_list_roles": "listRoles", + "sailpoint_list_sources": "listSources", + "sailpoint_load_accounts": "loadAccountsCsv", + "sailpoint_load_entitlements": "loadEntitlementsCsv", + "sailpoint_reject_access_request": "rejectAccessRequest", + "sailpoint_request_access": "requestAccess", + "sailpoint_search": "search", + "sailpoint_search_aggregate": "searchAggregate", + "sailpoint_search_count": "searchCount", + "sailpoint_sign_off_certification": "signOffCertification" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "salesforce": { + "namespace": "salesforce", + "methods": { + "create_account": "createAccount", + "create_case": "createCase", + "create_contact": "createContact", + "create_custom_field": "createCustomField", + "create_custom_object": "createCustomObject", + "create_lead": "createLead", + "create_opportunity": "createOpportunity", + "create_task": "createTask", + "delete_account": "deleteAccount", + "delete_case": "deleteCase", + "delete_contact": "deleteContact", + "delete_custom_field": "deleteCustomField", + "delete_lead": "deleteLead", + "delete_opportunity": "deleteOpportunity", + "delete_task": "deleteTask", + "describe_object": "describeObject", + "get_accounts": "getAccounts", + "get_cases": "getCases", + "get_contacts": "getContacts", + "get_dashboard": "getDashboard", + "get_leads": "getLeads", + "get_opportunities": "getOpportunities", + "get_report": "getReport", + "get_tasks": "getTasks", + "list_dashboards": "listDashboards", + "list_objects": "listObjects", + "list_report_types": "listReportTypes", + "list_reports": "listReports", + "query": "runSoqlQuery", + "query_more": "getMoreQueryResults", + "refresh_dashboard": "refreshDashboard", + "run_report": "runReport", + "tooling_query": "runToolingQuery", + "update_account": "updateAccount", + "update_case": "updateCase", + "update_contact": "updateContact", + "update_custom_field": "updateCustomField", + "update_lead": "updateLead", + "update_opportunity": "updateOpportunity", + "update_task": "updateTask" + }, + "triggers": { + "salesforce_case_status_changed": "caseStatusChanged", + "salesforce_opportunity_stage_changed": "opportunityStageChanged", + "salesforce_record_created": "recordCreated", + "salesforce_record_deleted": "recordDeleted", + "salesforce_record_updated": "recordUpdated", + "salesforce_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "sap_concur": { + "namespace": "sapConcur", + "methods": { + "sap_concur_approve_expense_report": "approveExpenseReport", + "sap_concur_associate_attendees": "associateAttendees", + "sap_concur_create_cash_advance": "createCashAdvance", + "sap_concur_create_expected_expense": "createExpectedExpense", + "sap_concur_create_expense_report": "createExpenseReport", + "sap_concur_create_list_item": "createListItem", + "sap_concur_create_purchase_request": "createPurchaseRequest", + "sap_concur_create_quick_expense": "createQuickExpense", + "sap_concur_create_quick_expense_with_image": "createQuickExpenseWithImage", + "sap_concur_create_report_comment": "createReportComment", + "sap_concur_create_travel_request": "createTravelRequest", + "sap_concur_create_user": "createUser", + "sap_concur_delete_expected_expense": "deleteExpectedExpense", + "sap_concur_delete_expense": "deleteExpense", + "sap_concur_delete_expense_report": "deleteExpenseReport", + "sap_concur_delete_list_item": "deleteListItem", + "sap_concur_delete_travel_request": "deleteTravelRequest", + "sap_concur_delete_user": "deleteUser", + "sap_concur_get_allocation": "getAllocation", + "sap_concur_get_budget": "getBudget", + "sap_concur_get_cash_advance": "getCashAdvance", + "sap_concur_get_expected_expense": "getExpectedExpense", + "sap_concur_get_expense": "getExpense", + "sap_concur_get_expense_report": "getExpenseReport", + "sap_concur_get_itemizations": "getItemizations", + "sap_concur_get_itinerary": "getItineraryTrip", + "sap_concur_get_list": "getList", + "sap_concur_get_list_item": "getListItem", + "sap_concur_get_purchase_request": "getPurchaseRequest", + "sap_concur_get_receipt": "getReceipt", + "sap_concur_get_receipt_status": "getReceiptStatus", + "sap_concur_get_request_cash_advance": "getRequestCashAdvance", + "sap_concur_get_travel_profile": "getTravelProfile", + "sap_concur_get_travel_request": "getTravelRequest", + "sap_concur_get_user": "getUser", + "sap_concur_issue_cash_advance": "issueCashAdvance", + "sap_concur_list_allocations": "listAllocations", + "sap_concur_list_attendee_associations": "listAttendeeAssociations", + "sap_concur_list_budget_categories": "listBudgetCategories", + "sap_concur_list_budgets": "listBudgets", + "sap_concur_list_exceptions": "listExceptions", + "sap_concur_list_expected_expenses": "listExpectedExpenses", + "sap_concur_list_expense_reports": "listExpenseReports", + "sap_concur_list_expenses": "listExpenses", + "sap_concur_list_itineraries": "listItinerariesTrips", + "sap_concur_list_list_items": "listListItems", + "sap_concur_list_lists": "listLists", + "sap_concur_list_receipts": "listReceipts", + "sap_concur_list_report_comments": "listReportComments", + "sap_concur_list_reports_to_approve": "listReportsToApprove", + "sap_concur_list_travel_profiles_summary": "listTravelProfilesSummary", + "sap_concur_list_travel_request_comments": "listTravelRequestComments", + "sap_concur_list_travel_requests": "listTravelRequests", + "sap_concur_list_users": "listUsers", + "sap_concur_move_travel_request": "moveTravelRequestWorkflowAction", + "sap_concur_recall_expense_report": "recallExpenseReport", + "sap_concur_remove_all_attendees": "removeAllAttendees", + "sap_concur_search_locations": "searchLocations", + "sap_concur_search_users": "searchUsers", + "sap_concur_send_back_expense_report": "sendBackExpenseReport", + "sap_concur_submit_expense_report": "submitExpenseReport", + "sap_concur_update_allocation": "updateAllocation", + "sap_concur_update_expected_expense": "updateExpectedExpense", + "sap_concur_update_expense": "updateExpense", + "sap_concur_update_expense_report": "updateExpenseReport", + "sap_concur_update_list_item": "updateListItem", + "sap_concur_update_travel_request": "updateTravelRequest", + "sap_concur_update_user": "updateUserPatch", + "sap_concur_upload_exchange_rates": "uploadExchangeRates", + "sap_concur_upload_receipt_image": "uploadReceiptImage" + } + }, + "sap_s4hana": { + "namespace": "sapS4hana", + "methods": { + "sap_s4hana_create_business_partner": "createBusinessPartner", + "sap_s4hana_create_purchase_order": "createPurchaseOrder", + "sap_s4hana_create_purchase_requisition": "createPurchaseRequisition", + "sap_s4hana_create_sales_order": "createSalesOrder", + "sap_s4hana_delete_sales_order": "deleteSalesOrder", + "sap_s4hana_get_billing_document": "getBillingDocument", + "sap_s4hana_get_business_partner": "getBusinessPartner", + "sap_s4hana_get_customer": "getCustomer", + "sap_s4hana_get_inbound_delivery": "getInboundDelivery", + "sap_s4hana_get_material_document": "getMaterialDocument", + "sap_s4hana_get_outbound_delivery": "getOutboundDelivery", + "sap_s4hana_get_product": "getProduct", + "sap_s4hana_get_purchase_order": "getPurchaseOrder", + "sap_s4hana_get_purchase_requisition": "getPurchaseRequisition", + "sap_s4hana_get_sales_order": "getSalesOrder", + "sap_s4hana_get_supplier": "getSupplier", + "sap_s4hana_get_supplier_invoice": "getSupplierInvoice", + "sap_s4hana_list_billing_documents": "listBillingDocuments", + "sap_s4hana_list_business_partners": "listBusinessPartners", + "sap_s4hana_list_customers": "listCustomers", + "sap_s4hana_list_inbound_deliveries": "listInboundDeliveries", + "sap_s4hana_list_material_documents": "listMaterialDocuments", + "sap_s4hana_list_material_stock": "listMaterialStock", + "sap_s4hana_list_outbound_deliveries": "listOutboundDeliveries", + "sap_s4hana_list_products": "listProducts", + "sap_s4hana_list_purchase_orders": "listPurchaseOrders", + "sap_s4hana_list_purchase_requisitions": "listPurchaseRequisitions", + "sap_s4hana_list_sales_orders": "listSalesOrders", + "sap_s4hana_list_supplier_invoices": "listSupplierInvoices", + "sap_s4hana_list_suppliers": "listSuppliers", + "sap_s4hana_odata_query": "odataQueryAdvanced", + "sap_s4hana_update_business_partner": "updateBusinessPartner", + "sap_s4hana_update_customer": "updateCustomer", + "sap_s4hana_update_product": "updateProduct", + "sap_s4hana_update_purchase_order": "updatePurchaseOrder", + "sap_s4hana_update_purchase_requisition": "updatePurchaseRequisition", + "sap_s4hana_update_sales_order": "updateSalesOrder", + "sap_s4hana_update_supplier": "updateSupplier" + } + }, + "schedule": { + "namespace": "schedule" + }, + "search": { + "namespace": "search" + }, + "secrets_manager": { + "namespace": "legacy.secretsManager", + "methods": { + "create_secret": "createSecret", + "delete_secret": "deleteSecret", + "describe_secret": "describeSecret", + "get_secret": "getSecret", + "list_secrets": "listSecrets", + "restore_secret": "restoreSecret", + "rotate_secret": "rotateSecret", + "tag_resource": "tagSecret", + "untag_resource": "untagSecret", + "update_secret": "updateSecret" + } + }, + "secrets_manager_v2": { + "namespace": "secretsManager", + "methods": { + "create_secret": "createSecret", + "delete_secret": "deleteSecret", + "describe_secret": "describeSecret", + "get_secret": "getSecret", + "list_secrets": "listSecrets", + "restore_secret": "restoreSecret", + "rotate_secret": "rotateSecret", + "tag_resource": "tagSecret", + "untag_resource": "untagSecret", + "update_secret": "updateSecret" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "semrush": { + "namespace": "semrush", + "methods": { + "semrush_backlinks": "backlinks", + "semrush_backlinks_anchors": "backlinkAnchors", + "semrush_backlinks_competitors": "backlinkCompetitors", + "semrush_backlinks_geo_distribution": "backlinkCountryDistribution", + "semrush_backlinks_indexed_pages": "indexedPages", + "semrush_backlinks_overview": "backlinksOverview", + "semrush_backlinks_tld_distribution": "backlinkTldDistribution", + "semrush_batch_keyword_overview": "batchKeywordOverview", + "semrush_broad_match_keywords": "broadMatchKeywords", + "semrush_domain_ad_copies": "domainAdCopies", + "semrush_domain_ad_history": "domainAdHistory", + "semrush_domain_organic_competitors": "organicCompetitors", + "semrush_domain_organic_keywords": "domainOrganicKeywords", + "semrush_domain_overview": "domainOverview", + "semrush_domain_overview_all": "domainOverviewAllDatabases", + "semrush_domain_overview_history": "domainOverviewHistory", + "semrush_domain_paid_competitors": "paidCompetitors", + "semrush_domain_paid_keywords": "domainPaidKeywords", + "semrush_domain_pla_copies": "domainPlaCopies", + "semrush_domain_pla_keywords": "domainPlaKeywords", + "semrush_domain_vs_domain": "domainVsDomain", + "semrush_keyword_ad_history": "keywordAdHistory", + "semrush_keyword_difficulty": "keywordDifficulty", + "semrush_keyword_overview": "keywordOverview", + "semrush_keyword_overview_all": "keywordOverviewAllDatabases", + "semrush_keyword_questions": "keywordQuestions", + "semrush_organic_results": "organicResults", + "semrush_paid_results": "paidResults", + "semrush_referring_domains": "referringDomains", + "semrush_referring_ips": "referringIps", + "semrush_related_keywords": "relatedKeywords", + "semrush_subdomain_ad_copies": "subdomainAdCopies", + "semrush_subdomain_organic_keywords": "subdomainOrganicKeywords", + "semrush_subdomain_overview": "subdomainOverview", + "semrush_subdomain_overview_all": "subdomainOverviewAllDatabases", + "semrush_subdomain_overview_history": "subdomainOverviewHistory", + "semrush_subdomain_paid_keywords": "subdomainPaidKeywords", + "semrush_top_domains": "topDomains", + "semrush_url_organic_keywords": "urlOrganicKeywords", + "semrush_url_overview": "urlOverview", + "semrush_url_overview_all": "urlOverviewAllDatabases", + "semrush_url_overview_history": "urlOverviewHistory", + "semrush_url_paid_keywords": "urlPaidKeywords", + "semrush_winners_and_losers": "winnersAndLosers" + } + }, + "sendblue": { + "namespace": "sendblue", + "methods": { + "sendblue_evaluate_service": "evaluateService", + "sendblue_get_message": "getMessage", + "sendblue_send_group_message": "sendGroupMessage", + "sendblue_send_message": "sendMessage", + "sendblue_send_typing_indicator": "sendTypingIndicator" + }, + "triggers": { + "sendblue_message_received": "messageReceived", + "sendblue_message_status_updated": "messageStatusUpdated" + } + }, + "sendgrid": { + "namespace": "legacy.sendgrid", + "methods": { + "add_contact": "addContact", + "add_contacts_to_list": "addContactsToList", + "create_list": "createList", + "create_template": "createTemplate", + "create_template_version": "createTemplateVersion", + "delete_contacts": "deleteContacts", + "delete_list": "deleteList", + "delete_template": "deleteTemplate", + "get_contact": "getContact", + "get_list": "getList", + "get_template": "getTemplate", + "list_all_lists": "listAllLists", + "list_templates": "listTemplates", + "remove_contacts_from_list": "removeContactsFromList", + "search_contacts": "searchContacts", + "send_mail": "sendMail" + } + }, + "sendgrid_v2": { + "namespace": "sendgrid", + "methods": { + "add_contact": "addContact", + "add_contacts_to_list": "addContactsToList", + "create_list": "createList", + "create_template": "createTemplate", + "create_template_version": "createTemplateVersion", + "delete_contacts": "deleteContacts", + "delete_list": "deleteList", + "delete_template": "deleteTemplate", + "get_contact": "getContact", + "get_list": "getList", + "get_template": "getTemplate", + "list_all_lists": "listAllLists", + "list_templates": "listTemplates", + "remove_contacts_from_list": "removeContactsFromList", + "search_contacts": "searchContacts", + "send_mail": "sendMail" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "sentry": { + "namespace": "legacy.sentry", + "methods": { + "sentry_events_get": "getEvent", + "sentry_events_list": "listEvents", + "sentry_issues_get": "getIssue", + "sentry_issues_list": "listIssues", + "sentry_issues_update": "updateIssue", + "sentry_projects_create": "createProject", + "sentry_projects_get": "getProject", + "sentry_projects_list": "listProjects", + "sentry_projects_update": "updateProject", + "sentry_releases_create": "createRelease", + "sentry_releases_deploy": "createDeploy", + "sentry_releases_list": "listReleases", + "sentry_teams_list": "listTeams" + }, + "triggers": { + "sentry_error_created": "errorCreated", + "sentry_issue_alert": "issueAlert", + "sentry_issue_created": "issueCreated", + "sentry_issue_resolved": "issueResolved", + "sentry_metric_alert": "metricAlert" + } + }, + "sentry_v2": { + "namespace": "sentry", + "methods": { + "sentry_events_get": "getEvent", + "sentry_events_list": "listEvents", + "sentry_issues_get": "getIssue", + "sentry_issues_list": "listIssues", + "sentry_issues_update": "updateIssue", + "sentry_projects_create": "createProject", + "sentry_projects_get": "getProject", + "sentry_projects_list": "listProjects", + "sentry_projects_update": "updateProject", + "sentry_releases_create": "createRelease", + "sentry_releases_deploy": "createDeploy", + "sentry_releases_list": "listReleases", + "sentry_teams_list": "listTeams" + }, + "triggers": { + "sentry_error_created": "errorCreated", + "sentry_issue_alert": "issueAlert", + "sentry_issue_created": "issueCreated", + "sentry_issue_resolved": "issueResolved", + "sentry_metric_alert": "metricAlert" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "serper": { + "namespace": "serper" + }, + "servicenow": { + "namespace": "legacy.servicenow", + "methods": { + "servicenow_add_incident_comment": "addIncidentComment", + "servicenow_aggregate": "aggregateRecords", + "servicenow_close_incident": "closeIncident", + "servicenow_create_change_request": "createChangeRequest", + "servicenow_create_incident": "createIncident", + "servicenow_create_record": "createRecord", + "servicenow_delete_record": "deleteRecord", + "servicenow_download_attachment": "downloadAttachment", + "servicenow_find_user": "findUser", + "servicenow_get_change_next_states": "getChangeNextStates", + "servicenow_get_change_request": "getChangeRequest", + "servicenow_get_ci": "getConfigurationItem", + "servicenow_get_incident": "getIncident", + "servicenow_get_knowledge_article": "getKnowledgeArticle", + "servicenow_get_requested_item": "getRequestedItem", + "servicenow_list_approvals": "listApprovals", + "servicenow_list_attachments": "listAttachments", + "servicenow_list_catalog_items": "listCatalogItems", + "servicenow_list_change_requests": "listChangeRequests", + "servicenow_list_change_tasks": "listChangeTasks", + "servicenow_list_ci_relationships": "listCiRelationships", + "servicenow_list_group_members": "listGroupMembers", + "servicenow_list_incidents": "listIncidents", + "servicenow_list_requested_items": "listRequestedItems", + "servicenow_order_catalog_item": "orderCatalogItem", + "servicenow_read_record": "readRecords", + "servicenow_resolve_incident": "resolveIncident", + "servicenow_search_cis": "searchConfigurationItems", + "servicenow_search_knowledge": "searchKnowledge", + "servicenow_update_approval": "approveOrReject", + "servicenow_update_change_request": "updateChangeRequest", + "servicenow_update_change_state": "moveChangeState", + "servicenow_update_incident": "updateIncident", + "servicenow_update_record": "updateRecord", + "servicenow_upload_attachment": "uploadAttachment" + }, + "triggers": { + "servicenow_change_request_created": "changeRequestCreated", + "servicenow_change_request_updated": "changeRequestUpdated", + "servicenow_incident_created": "incidentCreated", + "servicenow_incident_updated": "incidentUpdated", + "servicenow_webhook": "webhook" + } + }, + "servicenow_v2": { + "namespace": "legacy.servicenowV2", + "methods": { + "servicenow_add_incident_comment": "addIncidentComment", + "servicenow_aggregate": "aggregateRecords", + "servicenow_close_incident": "closeIncident", + "servicenow_create_change_request": "createChangeRequest", + "servicenow_create_incident": "createIncident", + "servicenow_create_record": "createRecord", + "servicenow_delete_record": "deleteRecord", + "servicenow_download_attachment": "downloadAttachment", + "servicenow_find_user": "findUser", + "servicenow_get_change_next_states": "getChangeNextStates", + "servicenow_get_change_request": "getChangeRequest", + "servicenow_get_ci": "getConfigurationItem", + "servicenow_get_incident": "getIncident", + "servicenow_get_knowledge_article": "getKnowledgeArticle", + "servicenow_get_requested_item": "getRequestedItem", + "servicenow_list_approvals": "listApprovals", + "servicenow_list_attachments": "listAttachments", + "servicenow_list_catalog_items": "listCatalogItems", + "servicenow_list_change_requests": "listChangeRequests", + "servicenow_list_change_tasks": "listChangeTasks", + "servicenow_list_ci_relationships": "listCiRelationships", + "servicenow_list_group_members": "listGroupMembers", + "servicenow_list_incidents": "listIncidents", + "servicenow_list_requested_items": "listRequestedItems", + "servicenow_order_catalog_item": "orderCatalogItem", + "servicenow_read_record": "readRecords", + "servicenow_resolve_incident": "resolveIncident", + "servicenow_search_cis": "searchConfigurationItems", + "servicenow_search_knowledge": "searchKnowledge", + "servicenow_update_approval": "approveOrReject", + "servicenow_update_change_request": "updateChangeRequest", + "servicenow_update_change_state": "moveChangeState", + "servicenow_update_incident": "updateIncident", + "servicenow_update_record": "updateRecord", + "servicenow_upload_attachment": "uploadAttachment" + }, + "triggers": { + "servicenow_change_request_created": "changeRequestCreated", + "servicenow_change_request_updated": "changeRequestUpdated", + "servicenow_incident_created": "incidentCreated", + "servicenow_incident_updated": "incidentUpdated", + "servicenow_webhook": "webhook" + } + }, + "servicenow_v3": { + "namespace": "servicenow", + "methods": { + "servicenow_add_incident_comment": "addIncidentComment", + "servicenow_aggregate": "aggregateRecords", + "servicenow_close_incident": "closeIncident", + "servicenow_create_change_request": "createChangeRequest", + "servicenow_create_incident": "createIncident", + "servicenow_create_record": "createRecord", + "servicenow_delete_record": "deleteRecord", + "servicenow_download_attachment": "downloadAttachment", + "servicenow_find_user": "findUser", + "servicenow_get_change_next_states": "getChangeNextStates", + "servicenow_get_change_request": "getChangeRequest", + "servicenow_get_ci": "getConfigurationItem", + "servicenow_get_incident": "getIncident", + "servicenow_get_knowledge_article": "getKnowledgeArticle", + "servicenow_get_requested_item": "getRequestedItem", + "servicenow_list_approvals": "listApprovals", + "servicenow_list_attachments": "listAttachments", + "servicenow_list_catalog_items": "listCatalogItems", + "servicenow_list_change_requests": "listChangeRequests", + "servicenow_list_change_tasks": "listChangeTasks", + "servicenow_list_ci_relationships": "listCiRelationships", + "servicenow_list_group_members": "listGroupMembers", + "servicenow_list_incidents": "listIncidents", + "servicenow_list_requested_items": "listRequestedItems", + "servicenow_order_catalog_item": "orderCatalogItem", + "servicenow_read_record": "readRecords", + "servicenow_resolve_incident": "resolveIncident", + "servicenow_search_cis": "searchConfigurationItems", + "servicenow_search_knowledge": "searchKnowledge", + "servicenow_update_approval": "approveOrReject", + "servicenow_update_change_request": "updateChangeRequest", + "servicenow_update_change_state": "moveChangeState", + "servicenow_update_incident": "updateIncident", + "servicenow_update_record": "updateRecord", + "servicenow_upload_attachment": "uploadAttachment" + }, + "triggers": { + "servicenow_change_request_created": "changeRequestCreated", + "servicenow_change_request_updated": "changeRequestUpdated", + "servicenow_incident_created": "incidentCreated", + "servicenow_incident_updated": "incidentUpdated", + "servicenow_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "ses": { + "namespace": "legacy.ses", + "methods": { + "create_configuration_set": "createConfigurationSet", + "create_email_identity": "createEmailIdentity", + "create_template": "createTemplate", + "delete_email_identity": "deleteEmailIdentity", + "delete_suppressed_destination": "deleteSuppressedDestination", + "delete_template": "deleteTemplate", + "get_account": "getAccount", + "get_email_identity": "getEmailIdentity", + "get_suppressed_destination": "getSuppressedDestination", + "get_template": "getTemplate", + "list_identities": "listIdentities", + "list_suppressed_destinations": "listSuppressedDestinations", + "list_templates": "listTemplates", + "put_suppressed_destination": "putSuppressedDestination", + "send_bulk_email": "sendBulkEmail", + "send_custom_verification_email": "sendCustomVerificationEmail", + "send_email": "sendEmail", + "send_templated_email": "sendTemplatedEmail", + "update_template": "updateTemplate" + } + }, + "ses_v2": { + "namespace": "ses", + "methods": { + "create_configuration_set": "createConfigurationSet", + "create_email_identity": "createEmailIdentity", + "create_template": "createTemplate", + "delete_email_identity": "deleteEmailIdentity", + "delete_suppressed_destination": "deleteSuppressedDestination", + "delete_template": "deleteTemplate", + "get_account": "getAccount", + "get_email_identity": "getEmailIdentity", + "get_suppressed_destination": "getSuppressedDestination", + "get_template": "getTemplate", + "list_identities": "listIdentities", + "list_suppressed_destinations": "listSuppressedDestinations", + "list_templates": "listTemplates", + "put_suppressed_destination": "putSuppressedDestination", + "send_bulk_email": "sendBulkEmail", + "send_custom_verification_email": "sendCustomVerificationEmail", + "send_email": "sendEmail", + "send_templated_email": "sendTemplatedEmail", + "update_template": "updateTemplate" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "sftp": { + "namespace": "legacy.sftp", + "methods": { + "sftp_create": "createFile", + "sftp_delete": "deleteFileDirectory", + "sftp_download": "downloadFile", + "sftp_list": "listDirectory", + "sftp_mkdir": "createDirectory", + "sftp_upload": "uploadFiles" + } + }, + "sftp_v2": { + "namespace": "sftp", + "methods": { + "sftp_create": "createFile", + "sftp_delete": "deleteFileDirectory", + "sftp_download": "downloadFile", + "sftp_list": "listDirectory", + "sftp_mkdir": "createDirectory", + "sftp_upload": "uploadFiles" + } + }, + "sharepoint": { + "namespace": "legacy.sharepoint", + "methods": { + "add_list_items": "addListItems", + "create_list": "createList", + "create_page": "createPage", + "delete_file": "deleteFile", + "delete_list_item": "deleteListItem", + "delete_page": "deletePage", + "download_file": "downloadFile", + "get_drive_item": "getDriveItem", + "get_list_item": "getListItem", + "list_sites": "listSites", + "publish_page": "publishPage", + "read_list": "readList", + "read_page": "readPage", + "update_list": "updateList", + "update_page": "updatePage", + "upload_file": "uploadFile" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "sharepoint_v2": { + "namespace": "sharepoint", + "methods": { + "sharepoint_add_list_items": "addListItem", + "sharepoint_create_list": "createList", + "sharepoint_create_page": "createPage", + "sharepoint_delete_file": "deleteFile", + "sharepoint_delete_list_item": "deleteListItem", + "sharepoint_delete_page": "deletePage", + "sharepoint_download_file": "downloadFile", + "sharepoint_get_drive_item": "getDriveItem", + "sharepoint_get_list": "readList", + "sharepoint_get_list_item": "getListItem", + "sharepoint_list_sites": "listSites", + "sharepoint_publish_page": "publishPage", + "sharepoint_read_page": "readPage", + "sharepoint_update_list": "updateListItem", + "sharepoint_update_page": "updatePage", + "sharepoint_upload_file": "uploadFile" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "shopify": { + "namespace": "shopify", + "methods": { + "shopify_adjust_inventory": "adjustInventory", + "shopify_cancel_order": "cancelOrder", + "shopify_create_customer": "createCustomer", + "shopify_create_fulfillment": "createFulfillment", + "shopify_create_product": "createProduct", + "shopify_create_product_variants": "createProductVariants", + "shopify_delete_customer": "deleteCustomer", + "shopify_delete_product": "deleteProduct", + "shopify_get_collection": "getCollection", + "shopify_get_customer": "getCustomer", + "shopify_get_fulfillment": "getFulfillment", + "shopify_get_fulfillment_order": "getFulfillmentOrder", + "shopify_get_inventory_level": "getInventoryLevel", + "shopify_get_job": "getJob", + "shopify_get_order": "getOrder", + "shopify_get_product": "getProduct", + "shopify_list_collections": "listCollections", + "shopify_list_customers": "listCustomers", + "shopify_list_fulfillment_orders": "listFulfillmentOrders", + "shopify_list_inventory_items": "listInventoryItems", + "shopify_list_locations": "listLocations", + "shopify_list_orders": "listOrders", + "shopify_list_products": "listProducts", + "shopify_update_customer": "updateCustomer", + "shopify_update_fulfillment_tracking": "updateFulfillmentTracking", + "shopify_update_order": "updateOrder", + "shopify_update_product": "updateProduct", + "shopify_update_product_variants": "updateProductVariants" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "sim_workspace_event": { + "namespace": "simWorkspaceEvent", + "triggers": { + "sim_workspace_event": "workspaceEvent" + } + }, + "similarweb": { + "namespace": "legacy.similarweb", + "methods": { + "similarweb_bounce_rate": "bounceRate", + "similarweb_page_views": "pageViews", + "similarweb_pages_per_visit": "pagesPerVisit", + "similarweb_traffic_visits": "trafficVisits", + "similarweb_visit_duration": "visitDurationDesktop", + "similarweb_website_overview": "websiteOverview" + } + }, + "similarweb_v2": { + "namespace": "similarweb", + "methods": { + "similarweb_bounce_rate": "bounceRate", + "similarweb_page_views": "pageViews", + "similarweb_pages_per_visit": "pagesPerVisit", + "similarweb_traffic_visits": "trafficVisits", + "similarweb_visit_duration": "visitDurationDesktop", + "similarweb_website_overview": "websiteOverview" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "sixtyfour": { + "namespace": "legacy.sixtyfour", + "methods": { + "enrich_company": "enrichCompany", + "enrich_lead": "enrichLead", + "find_email": "findEmail", + "find_phone": "findPhone" + } + }, + "sixtyfour_v2": { + "namespace": "sixtyfour", + "methods": { + "enrich_company": "enrichCompany", + "enrich_lead": "enrichLead", + "find_email": "findEmail", + "find_phone": "findPhone" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "slack": { + "namespace": "legacy.slack", + "methods": { + "archive_conversation": "archiveConversation", + "canvas": "createCanvas", + "create_channel_canvas": "createChannelCanvas", + "create_conversation": "createConversation", + "delete": "deleteMessage", + "delete_canvas": "deleteCanvas", + "delete_scheduled_message": "deleteScheduledMessage", + "download": "downloadFile", + "edit_canvas": "editCanvas", + "ephemeral": "sendEphemeralMessage", + "get_canvas": "getCanvasInfo", + "get_channel_history": "getChannelHistory", + "get_channel_info": "getChannelInfo", + "get_message": "getMessage", + "get_permalink": "getMessagePermalink", + "get_thread": "getThread", + "get_thread_replies": "getThreadReplies", + "get_user": "getUserInfo", + "get_user_presence": "getUserPresence", + "invite_to_conversation": "inviteToConversation", + "list_canvases": "listCanvases", + "list_channels": "listChannels", + "list_members": "listChannelMembers", + "list_scheduled_messages": "listScheduledMessages", + "list_users": "listUsers", + "lookup_canvas_sections": "lookupCanvasSections", + "open_view": "openView", + "publish_view": "publishView", + "push_view": "pushView", + "react": "addReaction", + "read": "readMessages", + "rename_conversation": "renameConversation", + "schedule_message": "scheduleMessage", + "send": "sendMessage", + "set_conversation_purpose": "setConversationPurpose", + "set_conversation_topic": "setConversationTopic", + "set_status": "setAssistantStatus", + "set_suggested_prompts": "setSuggestedPrompts", + "set_title": "setAssistantTitle", + "unreact": "removeReaction", + "update": "updateMessage", + "update_view": "updateView" + }, + "triggers": { + "slack_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "slack_v2": { + "namespace": "slack", + "methods": { + "add_bookmark": "addBookmark", + "archive_conversation": "archiveConversation", + "canvas": "createCanvas", + "close_conversation": "closeConversation", + "create_channel_canvas": "createChannelCanvas", + "create_conversation": "createConversation", + "create_list": "createList", + "create_list_item": "createListItem", + "create_user_group": "createUserGroup", + "delete": "deleteMessage", + "delete_canvas": "deleteCanvas", + "delete_file": "deleteFile", + "delete_list_item": "deleteListItem", + "delete_list_items": "deleteListItems", + "delete_scheduled_message": "deleteScheduledMessage", + "disable_user_group": "disableUserGroup", + "download": "downloadFile", + "edit_bookmark": "editBookmark", + "edit_canvas": "editCanvas", + "enable_user_group": "enableUserGroup", + "ephemeral": "sendEphemeralMessage", + "get_canvas": "getCanvasInfo", + "get_channel_history": "getChannelHistory", + "get_channel_info": "getChannelInfo", + "get_dnd_info": "getDoNotDisturbInfo", + "get_file_info": "getFileInfo", + "get_list_export": "getListExport", + "get_list_item": "getListItem", + "get_message": "getMessage", + "get_permalink": "getMessagePermalink", + "get_reactions": "getReactions", + "get_team_dnd_info": "getTeamDoNotDisturbInfo", + "get_team_info": "getWorkspaceInfo", + "get_team_profile": "getWorkspaceProfileFields", + "get_thread": "getThread", + "get_thread_replies": "getThreadReplies", + "get_user": "getUserInfo", + "get_user_presence": "getUserPresence", + "get_user_profile": "getUserProfile", + "invite_to_conversation": "inviteToConversation", + "join_conversation": "joinConversation", + "kick_conversation": "removeUserFromConversation", + "leave_conversation": "leaveConversation", + "list_bookmarks": "listBookmarks", + "list_canvases": "listCanvases", + "list_channels": "listChannels", + "list_emoji": "listCustomEmoji", + "list_files": "listFiles", + "list_items": "readListItems", + "list_members": "listChannelMembers", + "list_pins": "listPins", + "list_reactions": "listReactions", + "list_scheduled_messages": "listScheduledMessages", + "list_user_conversations": "listUserConversations", + "list_user_group_members": "listUserGroupMembers", + "list_user_groups": "listUserGroups", + "list_users": "listUsers", + "lookup_canvas_sections": "lookupCanvasSections", + "lookup_user_by_email": "findUserByEmail", + "mark_conversation_read": "markConversationRead", + "open_conversation": "openConversation", + "open_view": "openView", + "pin_message": "pinMessage", + "publish_view": "publishView", + "push_view": "pushView", + "react": "addReaction", + "read": "readMessages", + "remove_bookmark": "removeBookmark", + "rename_agent_session": "renameAgentSession", + "rename_conversation": "renameConversation", + "rename_list": "updateList", + "revoke_canvas_access": "revokeCanvasAccess", + "revoke_list_access": "revokeListAccess", + "schedule_message": "scheduleMessage", + "send": "sendMessage", + "set_agent_session_status": "setAgentSessionStatus", + "set_agent_suggested_prompts": "setAgentSuggestedPrompts", + "set_conversation_purpose": "setConversationPurpose", + "set_conversation_topic": "setConversationTopic", + "set_status": "setAssistantStatus", + "set_suggested_prompts": "setAssistantSuggestedPrompts", + "set_title": "setAssistantTitle", + "set_user_presence": "setBotPresence", + "share_canvas": "shareCanvas", + "share_list": "shareList", + "start_list_export": "startListExport", + "unarchive_conversation": "unarchiveConversation", + "unfurl_links": "unfurlLinks", + "unpin_message": "unpinMessage", + "unreact": "removeReaction", + "update": "updateMessage", + "update_list_items": "updateListItems", + "update_user_group": "updateUserGroup", + "update_user_group_members": "updateUserGroupMembers", + "update_view": "updateView" + }, + "triggers": { + "slack_oauth": "oauth" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "smartlead": { + "namespace": "legacy.smartlead", + "methods": { + "add_email_accounts_to_campaign": "addEmailAccountsToCampaign", + "add_leads_to_campaign": "addLeadsToCampaign", + "create_campaign": "createCampaign", + "create_lead_list": "createLeadList", + "delete_campaign": "deleteCampaign", + "delete_campaign_webhook": "deleteCampaignWebhook", + "delete_lead_from_campaign": "deleteLeadFromCampaign", + "delete_lead_list": "deleteLeadList", + "duplicate_campaign": "duplicateCampaign", + "export_campaign_leads": "exportCampaignLeadsCsv", + "get_campaign": "getCampaign", + "get_campaign_analytics": "getCampaignAnalytics", + "get_campaign_analytics_by_date": "getCampaignAnalyticsByDate", + "get_campaign_lead_statistics": "getCampaignLeadStatistics", + "get_campaign_mailbox_statistics": "getCampaignMailboxStatistics", + "get_campaign_sequences": "getCampaignSequences", + "get_campaign_statistics": "getCampaignStatistics", + "get_campaign_top_level_analytics_by_date": "getTopLevelAnalyticsByDate", + "get_campaign_webhook_summary": "getWebhookSummary", + "get_lead_by_email": "getLeadByEmail", + "get_lead_by_id": "getLeadById", + "get_lead_list": "getLeadList", + "get_lead_message_history": "getLeadMessageHistory", + "list_campaign_email_accounts": "listCampaignEmailAccounts", + "list_campaign_leads": "listCampaignLeads", + "list_campaign_webhooks": "listCampaignWebhooks", + "list_campaigns": "listCampaigns", + "list_clients": "listClients", + "list_email_accounts": "listEmailAccounts", + "list_inbox_replies": "listInboxReplies", + "list_lead_activities": "listLeadActivities", + "list_lead_categories": "listLeadCategories", + "list_lead_lists": "listLeadLists", + "mark_lead_complete": "markLeadComplete", + "pause_lead": "pauseLead", + "remove_email_accounts_from_campaign": "removeEmailAccountsFromCampaign", + "resume_lead": "resumeLead", + "save_campaign_sequences": "saveCampaignSequences", + "unsubscribe_lead_from_campaign": "unsubscribeLeadFromCampaign", + "unsubscribe_lead_globally": "unsubscribeLeadGlobally", + "update_campaign_schedule": "updateCampaignSchedule", + "update_campaign_settings": "updateCampaignSettings", + "update_campaign_status": "updateCampaignStatus", + "update_lead": "updateLead", + "update_lead_category": "updateLeadCategory", + "update_lead_list": "updateLeadList", + "upsert_campaign_webhook": "createOrUpdateWebhook" + } + }, + "smartlead_v2": { + "namespace": "smartlead", + "methods": { + "add_email_accounts_to_campaign": "addEmailAccountsToCampaign", + "add_leads_to_campaign": "addLeadsToCampaign", + "create_campaign": "createCampaign", + "create_lead_list": "createLeadList", + "delete_campaign": "deleteCampaign", + "delete_campaign_webhook": "deleteCampaignWebhook", + "delete_lead_from_campaign": "deleteLeadFromCampaign", + "delete_lead_list": "deleteLeadList", + "duplicate_campaign": "duplicateCampaign", + "export_campaign_leads": "exportCampaignLeadsCsv", + "get_campaign": "getCampaign", + "get_campaign_analytics": "getCampaignAnalytics", + "get_campaign_analytics_by_date": "getCampaignAnalyticsByDate", + "get_campaign_lead_statistics": "getCampaignLeadStatistics", + "get_campaign_mailbox_statistics": "getCampaignMailboxStatistics", + "get_campaign_sequences": "getCampaignSequences", + "get_campaign_statistics": "getCampaignStatistics", + "get_campaign_top_level_analytics_by_date": "getTopLevelAnalyticsByDate", + "get_campaign_webhook_summary": "getWebhookSummary", + "get_lead_by_email": "getLeadByEmail", + "get_lead_by_id": "getLeadById", + "get_lead_list": "getLeadList", + "get_lead_message_history": "getLeadMessageHistory", + "list_campaign_email_accounts": "listCampaignEmailAccounts", + "list_campaign_leads": "listCampaignLeads", + "list_campaign_webhooks": "listCampaignWebhooks", + "list_campaigns": "listCampaigns", + "list_clients": "listClients", + "list_email_accounts": "listEmailAccounts", + "list_inbox_replies": "listInboxReplies", + "list_lead_activities": "listLeadActivities", + "list_lead_categories": "listLeadCategories", + "list_lead_lists": "listLeadLists", + "mark_lead_complete": "markLeadComplete", + "pause_lead": "pauseLead", + "remove_email_accounts_from_campaign": "removeEmailAccountsFromCampaign", + "resume_lead": "resumeLead", + "save_campaign_sequences": "saveCampaignSequences", + "unsubscribe_lead_from_campaign": "unsubscribeLeadFromCampaign", + "unsubscribe_lead_globally": "unsubscribeLeadGlobally", + "update_campaign_schedule": "updateCampaignSchedule", + "update_campaign_settings": "updateCampaignSettings", + "update_campaign_status": "updateCampaignStatus", + "update_lead": "updateLead", + "update_lead_category": "updateLeadCategory", + "update_lead_list": "updateLeadList", + "upsert_campaign_webhook": "createOrUpdateWebhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "smtp": { + "namespace": "smtp" + }, + "snowflake": { + "namespace": "snowflake", + "methods": { + "alter_warehouse": "alterWarehouse", + "call_procedure": "callProcedure", + "cancel_statement": "cancelStatement", + "cancel_task_run": "cancelTaskQuery", + "cortex_analyst_ask": "askCortexAnalyst", + "cortex_analyst_feedback": "sendCortexAnalystFeedback", + "delete_rows": "deleteRows", + "execute_sql": "executeSql", + "get_statement": "getStatement", + "get_task": "getTask", + "get_task_run": "getTaskRun", + "get_task_run_output": "getTaskRunOutput", + "get_warehouse": "getWarehouse", + "insert_rows": "insertRows", + "introspect_schema": "introspectSchema", + "list_copy_history": "listCopyHistory", + "list_databases": "listDatabases", + "list_query_history": "listQueryHistory", + "list_schemas": "listSchemas", + "list_tables": "listTables", + "list_task_runs": "listTaskRuns", + "list_tasks": "listTasks", + "list_warehouses": "listWarehouses", + "load_data": "loadData", + "resume_task": "resumeTask", + "resume_warehouse": "resumeWarehouse", + "run_task": "runTask", + "suspend_task": "suspendTask", + "suspend_warehouse": "suspendWarehouse", + "unload_data": "unloadData", + "update_rows": "updateRows", + "upsert_rows": "upsertRows" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "splunk": { + "namespace": "legacy.splunk", + "methods": { + "splunk_cancel_search_job": "cancelSearchJob", + "splunk_create_search_job": "createSearchJob", + "splunk_dispatch_saved_search": "dispatchSavedSearch", + "splunk_get_fired_alerts": "getFiredAlerts", + "splunk_get_saved_search": "getSavedSearch", + "splunk_get_search_job": "getSearchJob", + "splunk_get_search_results": "getSearchResults", + "splunk_list_apps": "listApps", + "splunk_list_fired_alerts": "listFiredAlerts", + "splunk_list_indexes": "listIndexes", + "splunk_list_saved_searches": "listSavedSearches", + "splunk_run_search": "runSearch" + } + }, + "splunk_v2": { + "namespace": "splunk", + "methods": { + "splunk_cancel_search_job": "cancelSearchJob", + "splunk_create_search_job": "createSearchJob", + "splunk_dispatch_saved_search": "dispatchSavedSearch", + "splunk_get_fired_alerts": "getFiredAlerts", + "splunk_get_saved_search": "getSavedSearch", + "splunk_get_search_job": "getSearchJob", + "splunk_get_search_results": "getSearchResults", + "splunk_list_apps": "listApps", + "splunk_list_fired_alerts": "listFiredAlerts", + "splunk_list_indexes": "listIndexes", + "splunk_list_saved_searches": "listSavedSearches", + "splunk_run_search": "runSearch" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "sportmonks": { + "namespace": "legacy.sportmonks", + "methods": { + "core_get_cities": "coreGetCities", + "core_get_city": "coreGetCityById", + "core_get_continent": "coreGetContinentById", + "core_get_continents": "coreGetContinents", + "core_get_countries": "coreGetCountries", + "core_get_country": "coreGetCountryById", + "core_get_entity_filters": "coreGetAllEntityFilters", + "core_get_my_usage": "coreGetMyUsage", + "core_get_region": "coreGetRegionById", + "core_get_regions": "coreGetRegions", + "core_get_timezones": "coreGetTimezones", + "core_get_type": "coreGetTypeById", + "core_get_type_by_entity": "coreGetTypeByEntity", + "core_get_types": "coreGetTypes", + "core_search_cities": "coreSearchCities", + "core_search_countries": "coreSearchCountries", + "core_search_regions": "coreSearchRegions", + "football_expected_by_player": "footballGetExpectedXGByPlayer", + "football_expected_by_team": "footballGetExpectedXGByTeam", + "football_get_all_commentaries": "footballGetAllCommentaries", + "football_get_all_fixtures": "footballGetAllFixtures", + "football_get_all_players": "footballGetAllPlayers", + "football_get_all_rivals": "footballGetAllRivals", + "football_get_all_teams": "footballGetAllTeams", + "football_get_all_transfer_rumours": "footballGetAllTransferRumours", + "football_get_all_transfers": "footballGetAllTransfers", + "football_get_brackets_by_season": "footballGetBracketsBySeason", + "football_get_coach": "footballGetCoachById", + "football_get_coaches": "footballGetCoaches", + "football_get_coaches_by_country": "footballGetCoachesByCountry", + "football_get_commentaries_by_fixture": "footballGetCommentariesByFixture", + "football_get_current_leagues_by_team": "footballGetCurrentLeaguesByTeam", + "football_get_expected_lineups_by_player": "footballGetExpectedLineupsByPlayer", + "football_get_expected_lineups_by_team": "footballGetExpectedLineupsByTeam", + "football_get_extended_team_squad": "footballGetExtendedTeamSquad", + "football_get_fixture": "footballGetFixtureById", + "football_get_fixtures_by_date": "footballGetFixturesByDate", + "football_get_fixtures_by_date_range": "footballGetFixturesByDateRange", + "football_get_fixtures_by_date_range_for_team": "footballGetFixturesByDateRangeForTeam", + "football_get_fixtures_by_ids": "footballGetFixturesByMultipleIds", + "football_get_grouped_standings_by_round": "footballGetGroupedStandingsByRound", + "football_get_head_to_head": "footballGetHeadToHead", + "football_get_inplay_livescores": "footballGetInplayLivescores", + "football_get_latest_coaches": "footballGetLastUpdatedCoaches", + "football_get_latest_fixtures": "footballGetLatestUpdatedFixtures", + "football_get_latest_livescores": "footballGetLatestUpdatedLivescores", + "football_get_latest_players": "footballGetLastUpdatedPlayers", + "football_get_latest_totw": "footballGetLatestTeamOfTheWeek", + "football_get_latest_transfers": "footballGetLatestTransfers", + "football_get_league": "footballGetLeagueById", + "football_get_leagues": "footballGetLeagues", + "football_get_leagues_by_country": "footballGetLeaguesByCountry", + "football_get_leagues_by_date": "footballGetLeaguesByDate", + "football_get_leagues_by_team": "footballGetLeaguesByTeam", + "football_get_live_leagues": "footballGetLiveLeagues", + "football_get_live_probabilities": "footballGetLiveProbabilities", + "football_get_live_probabilities_by_fixture": "footballGetLiveProbabilitiesByFixture", + "football_get_live_standings_by_league": "footballGetLiveStandingsByLeague", + "football_get_livescores": "footballGetLivescores", + "football_get_match_facts": "footballGetAllMatchFacts", + "football_get_match_facts_by_date_range": "footballGetMatchFactsByDateRange", + "football_get_match_facts_by_fixture": "footballGetMatchFactsByFixture", + "football_get_match_facts_by_league": "footballGetMatchFactsByLeague", + "football_get_past_fixtures_by_tv_station": "footballGetPastFixturesByTvStation", + "football_get_player": "footballGetPlayerById", + "football_get_players_by_country": "footballGetPlayersByCountry", + "football_get_postmatch_news": "footballGetPostMatchNews", + "football_get_postmatch_news_by_season": "footballGetPostMatchNewsBySeason", + "football_get_predictability_by_league": "footballGetPredictabilityByLeague", + "football_get_prematch_news": "footballGetPreMatchNews", + "football_get_prematch_news_by_season": "footballGetPreMatchNewsBySeason", + "football_get_prematch_news_upcoming": "footballGetPreMatchNewsForUpcomingFixtures", + "football_get_probabilities": "footballGetProbabilities", + "football_get_probabilities_by_fixture": "footballGetPredictionsByFixture", + "football_get_referee": "footballGetRefereeById", + "football_get_referees": "footballGetReferees", + "football_get_referees_by_country": "footballGetRefereesByCountry", + "football_get_referees_by_season": "footballGetRefereesBySeason", + "football_get_rivals_by_team": "footballGetRivalsByTeam", + "football_get_round": "footballGetRoundById", + "football_get_round_statistics": "footballGetRoundStatistics", + "football_get_rounds": "footballGetRounds", + "football_get_rounds_by_season": "footballGetRoundsBySeason", + "football_get_schedules_by_season": "footballGetSchedulesBySeason", + "football_get_schedules_by_season_and_team": "footballGetSchedulesBySeasonAndTeam", + "football_get_schedules_by_team": "footballGetSchedulesByTeam", + "football_get_season": "footballGetSeasonById", + "football_get_seasons": "footballGetSeasons", + "football_get_seasons_by_team": "footballGetSeasonsByTeam", + "football_get_stage": "footballGetStageById", + "football_get_stage_statistics": "footballGetStageStatistics", + "football_get_stages": "footballGetStages", + "football_get_stages_by_season": "footballGetStagesBySeason", + "football_get_standing_corrections_by_season": "footballGetStandingCorrectionsBySeason", + "football_get_standings": "footballGetAllStandings", + "football_get_standings_by_round": "footballGetStandingsByRound", + "football_get_standings_by_season": "footballGetStandingsBySeason", + "football_get_state": "footballGetStateById", + "football_get_states": "footballGetStates", + "football_get_team": "footballGetTeamById", + "football_get_team_rankings": "footballGetAllTeamRankings", + "football_get_team_rankings_by_date": "footballGetTeamRankingsByDate", + "football_get_team_rankings_by_team": "footballGetTeamRankingsByTeam", + "football_get_team_squad": "footballGetTeamSquad", + "football_get_team_squad_by_season": "footballGetTeamSquadBySeason", + "football_get_teams_by_country": "footballGetTeamsByCountry", + "football_get_teams_by_season": "footballGetTeamsBySeason", + "football_get_topscorers_by_season": "footballGetTopscorersBySeason", + "football_get_topscorers_by_stage": "footballGetTopscorersByStage", + "football_get_totw": "footballGetAllTeamOfTheWeek", + "football_get_totw_by_round": "footballGetTeamOfTheWeekByRound", + "football_get_transfer": "footballGetTransferById", + "football_get_transfer_rumour": "footballGetTransferRumourById", + "football_get_transfer_rumours_between_dates": "footballGetTransferRumoursBetweenDates", + "football_get_transfer_rumours_by_player": "footballGetTransferRumoursByPlayer", + "football_get_transfer_rumours_by_team": "footballGetTransferRumoursByTeam", + "football_get_transfers_between_dates": "footballGetTransfersBetweenDates", + "football_get_transfers_by_player": "footballGetTransfersByPlayer", + "football_get_transfers_by_team": "footballGetTransfersByTeam", + "football_get_tv_station": "footballGetTvStationById", + "football_get_tv_stations": "footballGetTvStations", + "football_get_tv_stations_by_fixture": "footballGetTvStationsByFixture", + "football_get_upcoming_fixtures_by_market": "footballGetUpcomingFixturesByMarket", + "football_get_upcoming_fixtures_by_tv_station": "footballGetUpcomingFixturesByTvStation", + "football_get_value_bets": "footballGetValueBets", + "football_get_value_bets_by_fixture": "footballGetValueBetsByFixture", + "football_get_venue": "footballGetVenueById", + "football_get_venues": "footballGetVenues", + "football_get_venues_by_season": "footballGetVenuesBySeason", + "football_search_coaches": "footballSearchCoaches", + "football_search_fixtures": "footballSearchFixtures", + "football_search_leagues": "footballSearchLeagues", + "football_search_players": "footballSearchPlayers", + "football_search_referees": "footballSearchReferees", + "football_search_rounds": "footballSearchRounds", + "football_search_seasons": "footballSearchSeasons", + "football_search_stages": "footballSearchStages", + "football_search_teams": "footballSearchTeams", + "football_search_venues": "footballSearchVenues", + "motorsport_get_all_fixtures": "motorsportGetAllFixtures", + "motorsport_get_current_leagues_by_team": "motorsportGetCurrentLeaguesByTeam", + "motorsport_get_driver": "motorsportGetDriverById", + "motorsport_get_driver_standings": "motorsportGetAllDriverStandings", + "motorsport_get_driver_standings_by_season": "motorsportGetDriverStandingsBySeason", + "motorsport_get_drivers": "motorsportGetDrivers", + "motorsport_get_drivers_by_country": "motorsportGetDriversByCountry", + "motorsport_get_drivers_by_season": "motorsportGetDriversBySeason", + "motorsport_get_fixture": "motorsportGetFixtureById", + "motorsport_get_fixtures_by_date": "motorsportGetFixturesByDate", + "motorsport_get_fixtures_by_date_range": "motorsportGetFixturesByDateRange", + "motorsport_get_fixtures_by_ids": "motorsportGetFixturesByIds", + "motorsport_get_laps_by_fixture": "motorsportGetLapsByFixture", + "motorsport_get_laps_by_fixture_and_driver": "motorsportGetLapsByFixtureAndDriver", + "motorsport_get_laps_by_fixture_and_lap": "motorsportGetLapsByFixtureAndLapNumber", + "motorsport_get_latest_laps_by_fixture": "motorsportGetLatestLapsByFixture", + "motorsport_get_latest_pitstops_by_fixture": "motorsportGetLatestPitstopsByFixture", + "motorsport_get_latest_stints_by_fixture": "motorsportGetLatestStintsByFixture", + "motorsport_get_latest_updated_drivers": "motorsportGetLatestUpdatedDrivers", + "motorsport_get_latest_updated_fixtures": "motorsportGetLatestUpdatedFixtures", + "motorsport_get_league": "motorsportGetLeagueById", + "motorsport_get_leagues": "motorsportGetAllLeagues", + "motorsport_get_leagues_by_country": "motorsportGetLeaguesByCountry", + "motorsport_get_leagues_by_date": "motorsportGetLeaguesByFixtureDate", + "motorsport_get_leagues_by_live": "motorsportGetLeaguesByLive", + "motorsport_get_leagues_by_team": "motorsportGetLeaguesByTeam", + "motorsport_get_livescores": "motorsportGetLivescores", + "motorsport_get_pitstops_by_fixture": "motorsportGetPitstopsByFixture", + "motorsport_get_pitstops_by_fixture_and_driver": "motorsportGetPitstopsByFixtureAndDriver", + "motorsport_get_pitstops_by_fixture_and_lap": "motorsportGetPitstopsByFixtureAndLapNumber", + "motorsport_get_race_results_by_season_and_driver": "motorsportGetRaceResultsBySeasonAndDriver", + "motorsport_get_race_results_by_season_and_team": "motorsportGetRaceResultsBySeasonAndTeam", + "motorsport_get_schedules_by_season": "motorsportGetSchedulesBySeason", + "motorsport_get_season": "motorsportGetSeasonById", + "motorsport_get_seasons": "motorsportGetAllSeasons", + "motorsport_get_stage": "motorsportGetStageById", + "motorsport_get_stages": "motorsportGetAllStages", + "motorsport_get_stages_by_season": "motorsportGetStagesBySeason", + "motorsport_get_state": "motorsportGetStateById", + "motorsport_get_states": "motorsportGetAllStates", + "motorsport_get_stints_by_fixture": "motorsportGetStintsByFixture", + "motorsport_get_stints_by_fixture_and_driver": "motorsportGetStintsByFixtureAndDriver", + "motorsport_get_stints_by_fixture_and_stint": "motorsportGetStintsByFixtureAndStintNumber", + "motorsport_get_team": "motorsportGetTeamById", + "motorsport_get_team_standings": "motorsportGetAllTeamStandings", + "motorsport_get_team_standings_by_season": "motorsportGetTeamStandingsBySeason", + "motorsport_get_teams": "motorsportGetTeams", + "motorsport_get_teams_by_country": "motorsportGetTeamsByCountry", + "motorsport_get_teams_by_season": "motorsportGetTeamsBySeason", + "motorsport_get_venue": "motorsportGetVenueById", + "motorsport_get_venues": "motorsportGetVenues", + "motorsport_get_venues_by_season": "motorsportGetVenuesBySeason", + "motorsport_search_drivers": "motorsportSearchDrivers", + "motorsport_search_leagues": "motorsportSearchLeagues", + "motorsport_search_stages": "motorsportSearchStages", + "motorsport_search_teams": "motorsportSearchTeams", + "motorsport_search_venues": "motorsportSearchVenues", + "odds_get_all_historical_odds": "oddsGetAllHistoricalOdds", + "odds_get_all_inplay_odds": "oddsGetAllInPlayOdds", + "odds_get_all_pre_match_odds": "oddsGetAllPreMatchOdds", + "odds_get_all_premium_odds": "oddsGetAllPremiumOdds", + "odds_get_bookmaker": "oddsGetBookmakerById", + "odds_get_bookmaker_event_ids_by_fixture": "oddsGetBookmakerEventIdsByFixture", + "odds_get_bookmakers": "oddsGetBookmakers", + "odds_get_bookmakers_by_fixture": "oddsGetBookmakersByFixture", + "odds_get_inplay_odds_by_fixture": "oddsGetInPlayOddsByFixture", + "odds_get_inplay_odds_by_fixture_and_bookmaker": "oddsGetInPlayOddsByFixtureAndBookmaker", + "odds_get_inplay_odds_by_fixture_and_market": "oddsGetInPlayOddsByFixtureAndMarket", + "odds_get_last_updated_inplay_odds": "oddsGetLastUpdatedInPlayOdds", + "odds_get_last_updated_pre_match_odds": "oddsGetLastUpdatedPreMatchOdds", + "odds_get_market": "oddsGetMarketById", + "odds_get_markets": "oddsGetMarkets", + "odds_get_pre_match_odds_by_fixture": "oddsGetPreMatchOddsByFixture", + "odds_get_pre_match_odds_by_fixture_and_bookmaker": "oddsGetPreMatchOddsByFixtureAndBookmaker", + "odds_get_pre_match_odds_by_fixture_and_market": "oddsGetPreMatchOddsByFixtureAndMarket", + "odds_get_premium_odds_by_fixture": "oddsGetPremiumOddsByFixture", + "odds_get_premium_odds_by_fixture_and_bookmaker": "oddsGetPremiumOddsByFixtureAndBookmaker", + "odds_get_premium_odds_by_fixture_and_market": "oddsGetPremiumOddsByFixtureAndMarket", + "odds_get_updated_historical_odds_between": "oddsGetUpdatedHistoricalOddsBetweenTimeRange", + "odds_get_updated_premium_odds_between": "oddsGetUpdatedPremiumOddsBetweenTimeRange", + "odds_search_bookmakers": "oddsSearchBookmakers", + "odds_search_markets": "oddsSearchMarkets" + } + }, + "sportmonks_v2": { + "namespace": "sportmonks", + "methods": { + "core_get_cities": "coreGetCities", + "core_get_city": "coreGetCityById", + "core_get_continent": "coreGetContinentById", + "core_get_continents": "coreGetContinents", + "core_get_countries": "coreGetCountries", + "core_get_country": "coreGetCountryById", + "core_get_entity_filters": "coreGetAllEntityFilters", + "core_get_my_usage": "coreGetMyUsage", + "core_get_region": "coreGetRegionById", + "core_get_regions": "coreGetRegions", + "core_get_timezones": "coreGetTimezones", + "core_get_type": "coreGetTypeById", + "core_get_type_by_entity": "coreGetTypeByEntity", + "core_get_types": "coreGetTypes", + "core_search_cities": "coreSearchCities", + "core_search_countries": "coreSearchCountries", + "core_search_regions": "coreSearchRegions", + "football_expected_by_player": "footballGetExpectedXGByPlayer", + "football_expected_by_team": "footballGetExpectedXGByTeam", + "football_get_all_commentaries": "footballGetAllCommentaries", + "football_get_all_fixtures": "footballGetAllFixtures", + "football_get_all_players": "footballGetAllPlayers", + "football_get_all_rivals": "footballGetAllRivals", + "football_get_all_teams": "footballGetAllTeams", + "football_get_all_transfer_rumours": "footballGetAllTransferRumours", + "football_get_all_transfers": "footballGetAllTransfers", + "football_get_brackets_by_season": "footballGetBracketsBySeason", + "football_get_coach": "footballGetCoachById", + "football_get_coaches": "footballGetCoaches", + "football_get_coaches_by_country": "footballGetCoachesByCountry", + "football_get_commentaries_by_fixture": "footballGetCommentariesByFixture", + "football_get_current_leagues_by_team": "footballGetCurrentLeaguesByTeam", + "football_get_expected_lineups_by_player": "footballGetExpectedLineupsByPlayer", + "football_get_expected_lineups_by_team": "footballGetExpectedLineupsByTeam", + "football_get_extended_team_squad": "footballGetExtendedTeamSquad", + "football_get_fixture": "footballGetFixtureById", + "football_get_fixtures_by_date": "footballGetFixturesByDate", + "football_get_fixtures_by_date_range": "footballGetFixturesByDateRange", + "football_get_fixtures_by_date_range_for_team": "footballGetFixturesByDateRangeForTeam", + "football_get_fixtures_by_ids": "footballGetFixturesByMultipleIds", + "football_get_grouped_standings_by_round": "footballGetGroupedStandingsByRound", + "football_get_head_to_head": "footballGetHeadToHead", + "football_get_inplay_livescores": "footballGetInplayLivescores", + "football_get_latest_coaches": "footballGetLastUpdatedCoaches", + "football_get_latest_fixtures": "footballGetLatestUpdatedFixtures", + "football_get_latest_livescores": "footballGetLatestUpdatedLivescores", + "football_get_latest_players": "footballGetLastUpdatedPlayers", + "football_get_latest_totw": "footballGetLatestTeamOfTheWeek", + "football_get_latest_transfers": "footballGetLatestTransfers", + "football_get_league": "footballGetLeagueById", + "football_get_leagues": "footballGetLeagues", + "football_get_leagues_by_country": "footballGetLeaguesByCountry", + "football_get_leagues_by_date": "footballGetLeaguesByDate", + "football_get_leagues_by_team": "footballGetLeaguesByTeam", + "football_get_live_leagues": "footballGetLiveLeagues", + "football_get_live_probabilities": "footballGetLiveProbabilities", + "football_get_live_probabilities_by_fixture": "footballGetLiveProbabilitiesByFixture", + "football_get_live_standings_by_league": "footballGetLiveStandingsByLeague", + "football_get_livescores": "footballGetLivescores", + "football_get_match_facts": "footballGetAllMatchFacts", + "football_get_match_facts_by_date_range": "footballGetMatchFactsByDateRange", + "football_get_match_facts_by_fixture": "footballGetMatchFactsByFixture", + "football_get_match_facts_by_league": "footballGetMatchFactsByLeague", + "football_get_past_fixtures_by_tv_station": "footballGetPastFixturesByTvStation", + "football_get_player": "footballGetPlayerById", + "football_get_players_by_country": "footballGetPlayersByCountry", + "football_get_postmatch_news": "footballGetPostMatchNews", + "football_get_postmatch_news_by_season": "footballGetPostMatchNewsBySeason", + "football_get_predictability_by_league": "footballGetPredictabilityByLeague", + "football_get_prematch_news": "footballGetPreMatchNews", + "football_get_prematch_news_by_season": "footballGetPreMatchNewsBySeason", + "football_get_prematch_news_upcoming": "footballGetPreMatchNewsForUpcomingFixtures", + "football_get_probabilities": "footballGetProbabilities", + "football_get_probabilities_by_fixture": "footballGetPredictionsByFixture", + "football_get_referee": "footballGetRefereeById", + "football_get_referees": "footballGetReferees", + "football_get_referees_by_country": "footballGetRefereesByCountry", + "football_get_referees_by_season": "footballGetRefereesBySeason", + "football_get_rivals_by_team": "footballGetRivalsByTeam", + "football_get_round": "footballGetRoundById", + "football_get_round_statistics": "footballGetRoundStatistics", + "football_get_rounds": "footballGetRounds", + "football_get_rounds_by_season": "footballGetRoundsBySeason", + "football_get_schedules_by_season": "footballGetSchedulesBySeason", + "football_get_schedules_by_season_and_team": "footballGetSchedulesBySeasonAndTeam", + "football_get_schedules_by_team": "footballGetSchedulesByTeam", + "football_get_season": "footballGetSeasonById", + "football_get_seasons": "footballGetSeasons", + "football_get_seasons_by_team": "footballGetSeasonsByTeam", + "football_get_stage": "footballGetStageById", + "football_get_stage_statistics": "footballGetStageStatistics", + "football_get_stages": "footballGetStages", + "football_get_stages_by_season": "footballGetStagesBySeason", + "football_get_standing_corrections_by_season": "footballGetStandingCorrectionsBySeason", + "football_get_standings": "footballGetAllStandings", + "football_get_standings_by_round": "footballGetStandingsByRound", + "football_get_standings_by_season": "footballGetStandingsBySeason", + "football_get_state": "footballGetStateById", + "football_get_states": "footballGetStates", + "football_get_team": "footballGetTeamById", + "football_get_team_rankings": "footballGetAllTeamRankings", + "football_get_team_rankings_by_date": "footballGetTeamRankingsByDate", + "football_get_team_rankings_by_team": "footballGetTeamRankingsByTeam", + "football_get_team_squad": "footballGetTeamSquad", + "football_get_team_squad_by_season": "footballGetTeamSquadBySeason", + "football_get_teams_by_country": "footballGetTeamsByCountry", + "football_get_teams_by_season": "footballGetTeamsBySeason", + "football_get_topscorers_by_season": "footballGetTopscorersBySeason", + "football_get_topscorers_by_stage": "footballGetTopscorersByStage", + "football_get_totw": "footballGetAllTeamOfTheWeek", + "football_get_totw_by_round": "footballGetTeamOfTheWeekByRound", + "football_get_transfer": "footballGetTransferById", + "football_get_transfer_rumour": "footballGetTransferRumourById", + "football_get_transfer_rumours_between_dates": "footballGetTransferRumoursBetweenDates", + "football_get_transfer_rumours_by_player": "footballGetTransferRumoursByPlayer", + "football_get_transfer_rumours_by_team": "footballGetTransferRumoursByTeam", + "football_get_transfers_between_dates": "footballGetTransfersBetweenDates", + "football_get_transfers_by_player": "footballGetTransfersByPlayer", + "football_get_transfers_by_team": "footballGetTransfersByTeam", + "football_get_tv_station": "footballGetTvStationById", + "football_get_tv_stations": "footballGetTvStations", + "football_get_tv_stations_by_fixture": "footballGetTvStationsByFixture", + "football_get_upcoming_fixtures_by_market": "footballGetUpcomingFixturesByMarket", + "football_get_upcoming_fixtures_by_tv_station": "footballGetUpcomingFixturesByTvStation", + "football_get_value_bets": "footballGetValueBets", + "football_get_value_bets_by_fixture": "footballGetValueBetsByFixture", + "football_get_venue": "footballGetVenueById", + "football_get_venues": "footballGetVenues", + "football_get_venues_by_season": "footballGetVenuesBySeason", + "football_search_coaches": "footballSearchCoaches", + "football_search_fixtures": "footballSearchFixtures", + "football_search_leagues": "footballSearchLeagues", + "football_search_players": "footballSearchPlayers", + "football_search_referees": "footballSearchReferees", + "football_search_rounds": "footballSearchRounds", + "football_search_seasons": "footballSearchSeasons", + "football_search_stages": "footballSearchStages", + "football_search_teams": "footballSearchTeams", + "football_search_venues": "footballSearchVenues", + "motorsport_get_all_fixtures": "motorsportGetAllFixtures", + "motorsport_get_current_leagues_by_team": "motorsportGetCurrentLeaguesByTeam", + "motorsport_get_driver": "motorsportGetDriverById", + "motorsport_get_driver_standings": "motorsportGetAllDriverStandings", + "motorsport_get_driver_standings_by_season": "motorsportGetDriverStandingsBySeason", + "motorsport_get_drivers": "motorsportGetDrivers", + "motorsport_get_drivers_by_country": "motorsportGetDriversByCountry", + "motorsport_get_drivers_by_season": "motorsportGetDriversBySeason", + "motorsport_get_fixture": "motorsportGetFixtureById", + "motorsport_get_fixtures_by_date": "motorsportGetFixturesByDate", + "motorsport_get_fixtures_by_date_range": "motorsportGetFixturesByDateRange", + "motorsport_get_fixtures_by_ids": "motorsportGetFixturesByIds", + "motorsport_get_laps_by_fixture": "motorsportGetLapsByFixture", + "motorsport_get_laps_by_fixture_and_driver": "motorsportGetLapsByFixtureAndDriver", + "motorsport_get_laps_by_fixture_and_lap": "motorsportGetLapsByFixtureAndLapNumber", + "motorsport_get_latest_laps_by_fixture": "motorsportGetLatestLapsByFixture", + "motorsport_get_latest_pitstops_by_fixture": "motorsportGetLatestPitstopsByFixture", + "motorsport_get_latest_stints_by_fixture": "motorsportGetLatestStintsByFixture", + "motorsport_get_latest_updated_drivers": "motorsportGetLatestUpdatedDrivers", + "motorsport_get_latest_updated_fixtures": "motorsportGetLatestUpdatedFixtures", + "motorsport_get_league": "motorsportGetLeagueById", + "motorsport_get_leagues": "motorsportGetAllLeagues", + "motorsport_get_leagues_by_country": "motorsportGetLeaguesByCountry", + "motorsport_get_leagues_by_date": "motorsportGetLeaguesByFixtureDate", + "motorsport_get_leagues_by_live": "motorsportGetLeaguesByLive", + "motorsport_get_leagues_by_team": "motorsportGetLeaguesByTeam", + "motorsport_get_livescores": "motorsportGetLivescores", + "motorsport_get_pitstops_by_fixture": "motorsportGetPitstopsByFixture", + "motorsport_get_pitstops_by_fixture_and_driver": "motorsportGetPitstopsByFixtureAndDriver", + "motorsport_get_pitstops_by_fixture_and_lap": "motorsportGetPitstopsByFixtureAndLapNumber", + "motorsport_get_race_results_by_season_and_driver": "motorsportGetRaceResultsBySeasonAndDriver", + "motorsport_get_race_results_by_season_and_team": "motorsportGetRaceResultsBySeasonAndTeam", + "motorsport_get_schedules_by_season": "motorsportGetSchedulesBySeason", + "motorsport_get_season": "motorsportGetSeasonById", + "motorsport_get_seasons": "motorsportGetAllSeasons", + "motorsport_get_stage": "motorsportGetStageById", + "motorsport_get_stages": "motorsportGetAllStages", + "motorsport_get_stages_by_season": "motorsportGetStagesBySeason", + "motorsport_get_state": "motorsportGetStateById", + "motorsport_get_states": "motorsportGetAllStates", + "motorsport_get_stints_by_fixture": "motorsportGetStintsByFixture", + "motorsport_get_stints_by_fixture_and_driver": "motorsportGetStintsByFixtureAndDriver", + "motorsport_get_stints_by_fixture_and_stint": "motorsportGetStintsByFixtureAndStintNumber", + "motorsport_get_team": "motorsportGetTeamById", + "motorsport_get_team_standings": "motorsportGetAllTeamStandings", + "motorsport_get_team_standings_by_season": "motorsportGetTeamStandingsBySeason", + "motorsport_get_teams": "motorsportGetTeams", + "motorsport_get_teams_by_country": "motorsportGetTeamsByCountry", + "motorsport_get_teams_by_season": "motorsportGetTeamsBySeason", + "motorsport_get_venue": "motorsportGetVenueById", + "motorsport_get_venues": "motorsportGetVenues", + "motorsport_get_venues_by_season": "motorsportGetVenuesBySeason", + "motorsport_search_drivers": "motorsportSearchDrivers", + "motorsport_search_leagues": "motorsportSearchLeagues", + "motorsport_search_stages": "motorsportSearchStages", + "motorsport_search_teams": "motorsportSearchTeams", + "motorsport_search_venues": "motorsportSearchVenues", + "odds_get_all_historical_odds": "oddsGetAllHistoricalOdds", + "odds_get_all_inplay_odds": "oddsGetAllInPlayOdds", + "odds_get_all_pre_match_odds": "oddsGetAllPreMatchOdds", + "odds_get_all_premium_odds": "oddsGetAllPremiumOdds", + "odds_get_bookmaker": "oddsGetBookmakerById", + "odds_get_bookmaker_event_ids_by_fixture": "oddsGetBookmakerEventIdsByFixture", + "odds_get_bookmakers": "oddsGetBookmakers", + "odds_get_bookmakers_by_fixture": "oddsGetBookmakersByFixture", + "odds_get_inplay_odds_by_fixture": "oddsGetInPlayOddsByFixture", + "odds_get_inplay_odds_by_fixture_and_bookmaker": "oddsGetInPlayOddsByFixtureAndBookmaker", + "odds_get_inplay_odds_by_fixture_and_market": "oddsGetInPlayOddsByFixtureAndMarket", + "odds_get_last_updated_inplay_odds": "oddsGetLastUpdatedInPlayOdds", + "odds_get_last_updated_pre_match_odds": "oddsGetLastUpdatedPreMatchOdds", + "odds_get_market": "oddsGetMarketById", + "odds_get_markets": "oddsGetMarkets", + "odds_get_pre_match_odds_by_fixture": "oddsGetPreMatchOddsByFixture", + "odds_get_pre_match_odds_by_fixture_and_bookmaker": "oddsGetPreMatchOddsByFixtureAndBookmaker", + "odds_get_pre_match_odds_by_fixture_and_market": "oddsGetPreMatchOddsByFixtureAndMarket", + "odds_get_premium_odds_by_fixture": "oddsGetPremiumOddsByFixture", + "odds_get_premium_odds_by_fixture_and_bookmaker": "oddsGetPremiumOddsByFixtureAndBookmaker", + "odds_get_premium_odds_by_fixture_and_market": "oddsGetPremiumOddsByFixtureAndMarket", + "odds_get_updated_historical_odds_between": "oddsGetUpdatedHistoricalOddsBetweenTimeRange", + "odds_get_updated_premium_odds_between": "oddsGetUpdatedPremiumOddsBetweenTimeRange", + "odds_search_bookmakers": "oddsSearchBookmakers", + "odds_search_markets": "oddsSearchMarkets" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "spotify": { + "namespace": "legacy.spotify", + "methods": { + "spotify_add_playlist_cover": "addPlaylistCover", + "spotify_add_to_queue": "addToQueue", + "spotify_add_tracks_to_playlist": "addTracksToPlaylist", + "spotify_check_following": "checkFollowing", + "spotify_check_playlist_followers": "checkPlaylistFollowers", + "spotify_check_saved_albums": "checkSavedAlbums", + "spotify_check_saved_audiobooks": "checkSavedAudiobooks", + "spotify_check_saved_episodes": "checkSavedEpisodes", + "spotify_check_saved_shows": "checkSavedShows", + "spotify_check_saved_tracks": "checkSavedTracks", + "spotify_create_playlist": "createPlaylist", + "spotify_follow_artists": "followArtists", + "spotify_follow_playlist": "followPlaylist", + "spotify_get_album": "getAlbum", + "spotify_get_album_tracks": "getAlbumTracks", + "spotify_get_albums": "getMultipleAlbums", + "spotify_get_artist": "getArtist", + "spotify_get_artist_albums": "getArtistAlbums", + "spotify_get_artist_top_tracks": "getArtistTopTracks", + "spotify_get_artists": "getMultipleArtists", + "spotify_get_audiobook": "getAudiobook", + "spotify_get_audiobook_chapters": "getAudiobookChapters", + "spotify_get_audiobooks": "getMultipleAudiobooks", + "spotify_get_categories": "getCategories", + "spotify_get_current_user": "getMyProfile", + "spotify_get_currently_playing": "getCurrentlyPlaying", + "spotify_get_devices": "getDevices", + "spotify_get_episode": "getEpisode", + "spotify_get_episodes": "getMultipleEpisodes", + "spotify_get_followed_artists": "getFollowedArtists", + "spotify_get_markets": "getAvailableMarkets", + "spotify_get_new_releases": "getNewReleases", + "spotify_get_playback_state": "getPlaybackState", + "spotify_get_playlist": "getPlaylist", + "spotify_get_playlist_cover": "getPlaylistCover", + "spotify_get_playlist_tracks": "getPlaylistTracks", + "spotify_get_queue": "getQueue", + "spotify_get_recently_played": "getRecentlyPlayed", + "spotify_get_saved_albums": "getSavedAlbums", + "spotify_get_saved_audiobooks": "getSavedAudiobooks", + "spotify_get_saved_episodes": "getSavedEpisodes", + "spotify_get_saved_shows": "getSavedShows", + "spotify_get_saved_tracks": "getSavedTracks", + "spotify_get_show": "getShow", + "spotify_get_show_episodes": "getShowEpisodes", + "spotify_get_shows": "getMultipleShows", + "spotify_get_top_artists": "getMyTopArtists", + "spotify_get_top_tracks": "getMyTopTracks", + "spotify_get_track": "getTrack", + "spotify_get_tracks": "getMultipleTracks", + "spotify_get_user_playlists": "getMyPlaylists", + "spotify_get_user_profile": "getUserProfile", + "spotify_pause": "pause", + "spotify_play": "play", + "spotify_remove_saved_albums": "removeSavedAlbums", + "spotify_remove_saved_audiobooks": "removeSavedAudiobooks", + "spotify_remove_saved_episodes": "removeSavedEpisodes", + "spotify_remove_saved_shows": "removeSavedShows", + "spotify_remove_saved_tracks": "removeSavedTracks", + "spotify_remove_tracks_from_playlist": "removeTracksFromPlaylist", + "spotify_reorder_playlist_items": "reorderPlaylistItems", + "spotify_replace_playlist_items": "replacePlaylistItems", + "spotify_save_albums": "saveAlbums", + "spotify_save_audiobooks": "saveAudiobooks", + "spotify_save_episodes": "saveEpisodes", + "spotify_save_shows": "saveShows", + "spotify_save_tracks": "saveTracks", + "spotify_search": "search", + "spotify_seek": "seek", + "spotify_set_repeat": "setRepeat", + "spotify_set_shuffle": "setShuffle", + "spotify_set_volume": "setVolume", + "spotify_skip_next": "skipToNext", + "spotify_skip_previous": "skipToPrevious", + "spotify_transfer_playback": "transferPlayback", + "spotify_unfollow_artists": "unfollowArtists", + "spotify_unfollow_playlist": "unfollowPlaylist", + "spotify_update_playlist": "updatePlaylist" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "sqs": { + "namespace": "legacy.sqs", + "methods": { + "cancel_message_move_task": "cancelMessageMoveTask", + "change_message_visibility": "changeMessageVisibility", + "change_message_visibility_batch": "changeMessageVisibilityBatch", + "create_queue": "createQueue", + "delete_message": "deleteMessage", + "delete_message_batch": "deleteMessageBatch", + "delete_queue": "deleteQueue", + "get_queue_attributes": "getQueueAttributes", + "get_queue_url": "getQueueUrl", + "list_dead_letter_source_queues": "listDeadLetterSourceQueues", + "list_message_move_tasks": "listMessageMoveTasks", + "list_queue_tags": "listQueueTags", + "list_queues": "listQueues", + "purge_queue": "purgeQueue", + "receive_message": "receiveMessage", + "send": "sendMessage", + "send_message_batch": "sendMessageBatch", + "set_queue_attributes": "setQueueAttributes", + "start_message_move_task": "startMessageMoveTask", + "tag_queue": "tagQueue", + "untag_queue": "untagQueue" + } + }, + "sqs_v2": { + "namespace": "sqs", + "methods": { + "cancel_message_move_task": "cancelMessageMoveTask", + "change_message_visibility": "changeMessageVisibility", + "change_message_visibility_batch": "changeMessageVisibilityBatch", + "create_queue": "createQueue", + "delete_message": "deleteMessage", + "delete_message_batch": "deleteMessageBatch", + "delete_queue": "deleteQueue", + "get_queue_attributes": "getQueueAttributes", + "get_queue_url": "getQueueUrl", + "list_dead_letter_source_queues": "listDeadLetterSourceQueues", + "list_message_move_tasks": "listMessageMoveTasks", + "list_queue_tags": "listQueueTags", + "list_queues": "listQueues", + "purge_queue": "purgeQueue", + "receive_message": "receiveMessage", + "send": "sendMessage", + "send_message_batch": "sendMessageBatch", + "set_queue_attributes": "setQueueAttributes", + "start_message_move_task": "startMessageMoveTask", + "tag_queue": "tagQueue", + "untag_queue": "untagQueue" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "square": { + "namespace": "legacy.square", + "methods": { + "batch_retrieve_inventory_counts": "batchRetrieveInventoryCounts", + "cancel_invoice": "cancelInvoice", + "cancel_payment": "cancelPayment", + "complete_payment": "completePayment", + "create_catalog_image": "createCatalogImage", + "create_customer": "createCustomer", + "create_invoice": "createInvoice", + "create_order": "createOrder", + "create_payment": "createPayment", + "delete_catalog_object": "deleteCatalogObject", + "delete_customer": "deleteCustomer", + "delete_invoice": "deleteInvoice", + "get_catalog_object": "getCatalogObject", + "get_customer": "getCustomer", + "get_invoice": "getInvoice", + "get_location": "getLocation", + "get_order": "getOrder", + "get_payment": "getPayment", + "get_refund": "getRefund", + "list_catalog": "listCatalog", + "list_customers": "listCustomers", + "list_invoices": "listInvoices", + "list_locations": "listLocations", + "list_payments": "listPayments", + "list_refunds": "listRefunds", + "pay_order": "payOrder", + "publish_invoice": "publishInvoice", + "refund_payment": "refundPayment", + "search_catalog_objects": "searchCatalogObjects", + "search_customers": "searchCustomers", + "search_invoices": "searchInvoices", + "search_orders": "searchOrders", + "update_customer": "updateCustomer", + "upsert_catalog_object": "upsertCatalogObject" + } + }, + "square_v2": { + "namespace": "square", + "methods": { + "batch_retrieve_inventory_counts": "batchRetrieveInventoryCounts", + "cancel_invoice": "cancelInvoice", + "cancel_payment": "cancelPayment", + "complete_payment": "completePayment", + "create_catalog_image": "createCatalogImage", + "create_customer": "createCustomer", + "create_invoice": "createInvoice", + "create_order": "createOrder", + "create_payment": "createPayment", + "delete_catalog_object": "deleteCatalogObject", + "delete_customer": "deleteCustomer", + "delete_invoice": "deleteInvoice", + "get_catalog_object": "getCatalogObject", + "get_customer": "getCustomer", + "get_invoice": "getInvoice", + "get_location": "getLocation", + "get_order": "getOrder", + "get_payment": "getPayment", + "get_refund": "getRefund", + "list_catalog": "listCatalog", + "list_customers": "listCustomers", + "list_invoices": "listInvoices", + "list_locations": "listLocations", + "list_payments": "listPayments", + "list_refunds": "listRefunds", + "pay_order": "payOrder", + "publish_invoice": "publishInvoice", + "refund_payment": "refundPayment", + "search_catalog_objects": "searchCatalogObjects", + "search_customers": "searchCustomers", + "search_invoices": "searchInvoices", + "search_orders": "searchOrders", + "update_customer": "updateCustomer", + "upsert_catalog_object": "upsertCatalogObject" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "ssh": { + "namespace": "legacy.ssh", + "methods": { + "ssh_check_command_exists": "checkCommandExists", + "ssh_check_file_exists": "checkFileDirectoryExists", + "ssh_create_directory": "createDirectory", + "ssh_delete_file": "deleteFileDirectory", + "ssh_download_file": "downloadFile", + "ssh_execute_command": "executeCommand", + "ssh_execute_script": "executeScript", + "ssh_get_system_info": "getSystemInfo", + "ssh_list_directory": "listDirectory", + "ssh_move_rename": "moveRename", + "ssh_read_file_content": "readFileContent", + "ssh_upload_file": "uploadFile", + "ssh_write_file_content": "writeFileContent" + } + }, + "ssh_v2": { + "namespace": "ssh", + "methods": { + "ssh_check_command_exists": "checkCommandExists", + "ssh_check_file_exists": "checkFileDirectoryExists", + "ssh_create_directory": "createDirectory", + "ssh_delete_file": "deleteFileDirectory", + "ssh_download_file": "downloadFile", + "ssh_execute_command": "executeCommand", + "ssh_execute_script": "executeScript", + "ssh_get_system_info": "getSystemInfo", + "ssh_list_directory": "listDirectory", + "ssh_move_rename": "moveRename", + "ssh_read_file_content": "readFileContent", + "ssh_upload_file": "uploadFile", + "ssh_write_file_content": "writeFileContent" + } + }, + "ssm": { + "namespace": "legacy.ssm", + "methods": { + "cancel_command": "cancelCommand", + "delete_parameter": "deleteParameter", + "describe_automation_executions": "describeAutomationExecutions", + "describe_instance_information": "describeInstanceInformation", + "describe_instance_patch_states": "describeInstancePatchStates", + "describe_instance_patches": "describeInstancePatches", + "describe_parameters": "describeParameters", + "get_automation_execution": "getAutomationExecution", + "get_command_invocation": "getCommandInvocation", + "get_document": "getDocument", + "get_parameter": "getParameter", + "get_parameters": "getParameters", + "get_parameters_by_path": "getParametersByPath", + "list_command_invocations": "listCommandInvocations", + "list_commands": "listCommands", + "list_compliance_items": "listComplianceItems", + "list_compliance_summaries": "listComplianceSummaries", + "list_documents": "listDocuments", + "put_parameter": "putParameter", + "send_command": "sendCommand", + "start_automation_execution": "startAutomationExecution", + "stop_automation_execution": "stopAutomationExecution" + } + }, + "ssm_v2": { + "namespace": "ssm", + "methods": { + "cancel_command": "cancelCommand", + "delete_parameter": "deleteParameter", + "describe_automation_executions": "describeAutomationExecutions", + "describe_instance_information": "describeInstanceInformation", + "describe_instance_patch_states": "describeInstancePatchStates", + "describe_instance_patches": "describeInstancePatches", + "describe_parameters": "describeParameters", + "get_automation_execution": "getAutomationExecution", + "get_command_invocation": "getCommandInvocation", + "get_document": "getDocument", + "get_parameter": "getParameter", + "get_parameters": "getParameters", + "get_parameters_by_path": "getParametersByPath", + "list_command_invocations": "listCommandInvocations", + "list_commands": "listCommands", + "list_compliance_items": "listComplianceItems", + "list_compliance_summaries": "listComplianceSummaries", + "list_documents": "listDocuments", + "put_parameter": "putParameter", + "send_command": "sendCommand", + "start_automation_execution": "startAutomationExecution", + "stop_automation_execution": "stopAutomationExecution" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "stagehand": { + "namespace": "stagehand", + "methods": { + "agent": "runAgent", + "extract": "extractData" + } + }, + "start_trigger": { + "namespace": "startTrigger" + }, + "starter": { + "namespace": "legacy.starter" + }, + "stripe": { + "namespace": "legacy.stripe", + "methods": { + "cancel_payment_intent": "cancelPaymentIntent", + "cancel_subscription": "cancelSubscription", + "capture_charge": "captureCharge", + "capture_payment_intent": "capturePaymentIntent", + "confirm_payment_intent": "confirmPaymentIntent", + "create_charge": "createCharge", + "create_customer": "createCustomer", + "create_invoice": "createInvoice", + "create_payment_intent": "createPaymentIntent", + "create_price": "createPrice", + "create_product": "createProduct", + "create_subscription": "createSubscription", + "delete_customer": "deleteCustomer", + "delete_invoice": "deleteInvoice", + "delete_product": "deleteProduct", + "finalize_invoice": "finalizeInvoice", + "list_charges": "listCharges", + "list_customers": "listCustomers", + "list_events": "listEvents", + "list_invoices": "listInvoices", + "list_payment_intents": "listPaymentIntents", + "list_prices": "listPrices", + "list_products": "listProducts", + "list_subscriptions": "listSubscriptions", + "pay_invoice": "payInvoice", + "resume_subscription": "resumeSubscription", + "retrieve_charge": "retrieveCharge", + "retrieve_customer": "retrieveCustomer", + "retrieve_event": "retrieveEvent", + "retrieve_invoice": "retrieveInvoice", + "retrieve_payment_intent": "retrievePaymentIntent", + "retrieve_price": "retrievePrice", + "retrieve_product": "retrieveProduct", + "retrieve_subscription": "retrieveSubscription", + "search_charges": "searchCharges", + "search_customers": "searchCustomers", + "search_invoices": "searchInvoices", + "search_payment_intents": "searchPaymentIntents", + "search_prices": "searchPrices", + "search_products": "searchProducts", + "search_subscriptions": "searchSubscriptions", + "send_invoice": "sendInvoice", + "update_charge": "updateCharge", + "update_customer": "updateCustomer", + "update_invoice": "updateInvoice", + "update_payment_intent": "updatePaymentIntent", + "update_price": "updatePrice", + "update_product": "updateProduct", + "update_subscription": "updateSubscription", + "void_invoice": "voidInvoice" + }, + "triggers": { + "stripe_webhook": "webhook" + } + }, + "stripe_v2": { + "namespace": "stripe", + "methods": { + "cancel_payment_intent": "cancelPaymentIntent", + "cancel_subscription": "cancelSubscription", + "capture_charge": "captureCharge", + "capture_payment_intent": "capturePaymentIntent", + "confirm_payment_intent": "confirmPaymentIntent", + "create_charge": "createCharge", + "create_customer": "createCustomer", + "create_invoice": "createInvoice", + "create_payment_intent": "createPaymentIntent", + "create_price": "createPrice", + "create_product": "createProduct", + "create_subscription": "createSubscription", + "delete_customer": "deleteCustomer", + "delete_invoice": "deleteInvoice", + "delete_product": "deleteProduct", + "finalize_invoice": "finalizeInvoice", + "list_charges": "listCharges", + "list_customers": "listCustomers", + "list_events": "listEvents", + "list_invoices": "listInvoices", + "list_payment_intents": "listPaymentIntents", + "list_prices": "listPrices", + "list_products": "listProducts", + "list_subscriptions": "listSubscriptions", + "pay_invoice": "payInvoice", + "resume_subscription": "resumeSubscription", + "retrieve_charge": "retrieveCharge", + "retrieve_customer": "retrieveCustomer", + "retrieve_event": "retrieveEvent", + "retrieve_invoice": "retrieveInvoice", + "retrieve_payment_intent": "retrievePaymentIntent", + "retrieve_price": "retrievePrice", + "retrieve_product": "retrieveProduct", + "retrieve_subscription": "retrieveSubscription", + "search_charges": "searchCharges", + "search_customers": "searchCustomers", + "search_invoices": "searchInvoices", + "search_payment_intents": "searchPaymentIntents", + "search_prices": "searchPrices", + "search_products": "searchProducts", + "search_subscriptions": "searchSubscriptions", + "send_invoice": "sendInvoice", + "update_charge": "updateCharge", + "update_customer": "updateCustomer", + "update_invoice": "updateInvoice", + "update_payment_intent": "updatePaymentIntent", + "update_price": "updatePrice", + "update_product": "updateProduct", + "update_subscription": "updateSubscription", + "void_invoice": "voidInvoice" + }, + "triggers": { + "stripe_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "sts": { + "namespace": "legacy.sts", + "methods": { + "assume_role": "assumeRole", + "assume_role_with_saml": "assumeRoleWithSaml", + "assume_role_with_web_identity": "assumeRoleWithWebIdentity", + "get_access_key_info": "getAccessKeyInfo", + "get_caller_identity": "getCallerIdentity", + "get_session_token": "getSessionToken" + } + }, + "sts_v2": { + "namespace": "sts", + "methods": { + "assume_role": "assumeRole", + "assume_role_with_saml": "assumeRoleWithSaml", + "assume_role_with_web_identity": "assumeRoleWithWebIdentity", + "get_access_key_info": "getAccessKeyInfo", + "get_caller_identity": "getCallerIdentity", + "get_session_token": "getSessionToken" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "stt": { + "namespace": "legacy.stt" + }, + "stt_v2": { + "namespace": "stt" + }, + "supabase": { + "namespace": "legacy.supabase", + "methods": { + "count": "countRows", + "delete": "deleteARow", + "get_row": "getARow", + "insert": "createARow", + "introspect": "introspectSchema", + "invoke_function": "invokeEdgeFunction", + "query": "getManyRows", + "rpc": "callRpcFunction", + "storage_copy": "storageCopyFile", + "storage_create_bucket": "storageCreateBucket", + "storage_create_signed_upload_url": "storageCreateSignedUploadUrl", + "storage_create_signed_url": "storageCreateSignedUrl", + "storage_delete": "storageDeleteFiles", + "storage_delete_bucket": "storageDeleteBucket", + "storage_download": "storageDownloadFile", + "storage_empty_bucket": "storageEmptyBucket", + "storage_get_public_url": "storageGetPublicUrl", + "storage_list": "storageListFiles", + "storage_list_buckets": "storageListBuckets", + "storage_move": "storageMoveFile", + "storage_update_bucket": "storageUpdateBucket", + "storage_upload": "storageUploadFile", + "text_search": "fullTextSearch", + "update": "updateARow", + "upsert": "upsertARow", + "vector_search": "vectorSearch" + } + }, + "supabase_v2": { + "namespace": "supabase", + "methods": { + "count": "countRows", + "delete": "deleteARow", + "get_row": "getARow", + "insert": "createARow", + "introspect": "introspectSchema", + "invoke_function": "invokeEdgeFunction", + "query": "getManyRows", + "rpc": "callRpcFunction", + "storage_copy": "storageCopyFile", + "storage_create_bucket": "storageCreateBucket", + "storage_create_signed_upload_url": "storageCreateSignedUploadUrl", + "storage_create_signed_url": "storageCreateSignedUrl", + "storage_delete": "storageDeleteFiles", + "storage_delete_bucket": "storageDeleteBucket", + "storage_download": "storageDownloadFile", + "storage_empty_bucket": "storageEmptyBucket", + "storage_get_public_url": "storageGetPublicUrl", + "storage_list": "storageListFiles", + "storage_list_buckets": "storageListBuckets", + "storage_move": "storageMoveFile", + "storage_update_bucket": "storageUpdateBucket", + "storage_upload": "storageUploadFile", + "text_search": "fullTextSearch", + "update": "updateARow", + "upsert": "upsertARow", + "vector_search": "vectorSearch" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "table": { + "namespace": "legacy.table", + "methods": { + "batch_insert_rows": "batchInsertRows", + "delete_row": "deleteRowById", + "delete_rows_by_filter": "deleteRowsByFilter", + "get_row": "getRowById", + "get_schema": "getSchema", + "insert_row": "insertRow", + "query_rows": "queryRows", + "update_row": "updateRowById", + "update_rows_by_filter": "updateRowsByFilter", + "upsert_row": "upsertRow" + }, + "triggers": { + "table_new_row": "newRow" + } + }, + "table_v2": { + "namespace": "table", + "methods": { + "batch_insert_rows": "batchInsertRows", + "delete_row": "deleteRowById", + "delete_rows_by_filter": "deleteRowsByFilter", + "get_row": "getRowById", + "get_schema": "getSchema", + "insert_row": "insertRow", + "query_rows": "queryRows", + "update_row": "updateRowById", + "update_rows_by_filter": "updateRowsByFilter", + "upsert_row": "upsertRow" + }, + "triggers": { + "table_new_row": "newRow" + } + }, + "tailscale": { + "namespace": "legacy.tailscale", + "methods": { + "approve_user": "approveUser", + "authorize_device": "authorizeDevice", + "create_auth_key": "createAuthKey", + "delete_auth_key": "deleteAuthKey", + "delete_device": "deleteDevice", + "delete_device_attribute": "deleteDeviceAttribute", + "delete_user": "deleteUser", + "expire_device_key": "expireDeviceKey", + "get_acl": "getAcl", + "get_auth_key": "getAuthKey", + "get_device": "getDevice", + "get_device_attributes": "getDeviceAttributes", + "get_device_routes": "getDeviceRoutes", + "get_dns_configuration": "getDnsConfiguration", + "get_dns_preferences": "getDnsPreferences", + "get_dns_searchpaths": "getDnsSearchPaths", + "get_split_dns": "getSplitDns", + "get_tailnet_settings": "getTailnetSettings", + "get_user": "getUser", + "list_auth_keys": "listKeys", + "list_devices": "listDevices", + "list_dns_nameservers": "listDnsNameservers", + "list_users": "listUsers", + "restore_user": "restoreUser", + "set_acl": "setAcl", + "set_device_attribute": "setDeviceAttribute", + "set_device_name": "setDeviceName", + "set_device_routes": "setDeviceRoutes", + "set_device_tags": "setDeviceTags", + "set_dns_configuration": "setDnsConfiguration", + "set_dns_nameservers": "setDnsNameservers", + "set_dns_preferences": "setDnsPreferences", + "set_dns_searchpaths": "setDnsSearchPaths", + "set_split_dns": "setSplitDns", + "set_user_role": "setUserRole", + "suspend_user": "suspendUser", + "update_device_key": "updateDeviceKey", + "update_split_dns": "updateSplitDns", + "update_tailnet_settings": "updateTailnetSettings", + "validate_acl": "validateAcl" + } + }, + "tailscale_v2": { + "namespace": "tailscale", + "methods": { + "approve_user": "approveUser", + "authorize_device": "authorizeDevice", + "create_auth_key": "createAuthKey", + "delete_auth_key": "deleteAuthKey", + "delete_device": "deleteDevice", + "delete_device_attribute": "deleteDeviceAttribute", + "delete_user": "deleteUser", + "expire_device_key": "expireDeviceKey", + "get_acl": "getAcl", + "get_auth_key": "getAuthKey", + "get_device": "getDevice", + "get_device_attributes": "getDeviceAttributes", + "get_device_routes": "getDeviceRoutes", + "get_dns_configuration": "getDnsConfiguration", + "get_dns_preferences": "getDnsPreferences", + "get_dns_searchpaths": "getDnsSearchPaths", + "get_split_dns": "getSplitDns", + "get_tailnet_settings": "getTailnetSettings", + "get_user": "getUser", + "list_auth_keys": "listKeys", + "list_devices": "listDevices", + "list_dns_nameservers": "listDnsNameservers", + "list_users": "listUsers", + "restore_user": "restoreUser", + "set_acl": "setAcl", + "set_device_attribute": "setDeviceAttribute", + "set_device_name": "setDeviceName", + "set_device_routes": "setDeviceRoutes", + "set_device_tags": "setDeviceTags", + "set_dns_configuration": "setDnsConfiguration", + "set_dns_nameservers": "setDnsNameservers", + "set_dns_preferences": "setDnsPreferences", + "set_dns_searchpaths": "setDnsSearchPaths", + "set_split_dns": "setSplitDns", + "set_user_role": "setUserRole", + "suspend_user": "suspendUser", + "update_device_key": "updateDeviceKey", + "update_split_dns": "updateSplitDns", + "update_tailnet_settings": "updateTailnetSettings", + "validate_acl": "validateAcl" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "tavily": { + "namespace": "legacy.tavily", + "methods": { + "tavily_crawl": "crawlWebsite", + "tavily_extract": "extractContent", + "tavily_map": "mapWebsite", + "tavily_search": "search" + } + }, + "tavily_v2": { + "namespace": "tavily", + "methods": { + "tavily_crawl": "crawlWebsite", + "tavily_extract": "extractContent", + "tavily_map": "mapWebsite", + "tavily_search": "search" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "telegram": { + "namespace": "legacy.telegram", + "methods": { + "telegram_copy_message": "copyMessage", + "telegram_delete_message": "deleteMessage", + "telegram_edit_message_text": "editMessageText", + "telegram_forward_message": "forwardMessage", + "telegram_get_chat": "getChat", + "telegram_get_chat_member": "getChatMember", + "telegram_message": "sendMessage", + "telegram_pin_message": "pinMessage", + "telegram_send_animation": "sendAnimation", + "telegram_send_audio": "sendAudio", + "telegram_send_chat_action": "sendChatAction", + "telegram_send_contact": "sendContact", + "telegram_send_document": "sendDocument", + "telegram_send_location": "sendLocation", + "telegram_send_photo": "sendPhoto", + "telegram_send_poll": "sendPoll", + "telegram_send_video": "sendVideo", + "telegram_set_message_reaction": "setMessageReaction", + "telegram_unpin_message": "unpinMessage" + }, + "triggers": { + "telegram_webhook": "webhook" + } + }, + "telegram_v2": { + "namespace": "telegram", + "methods": { + "telegram_copy_message": "copyMessage", + "telegram_delete_message": "deleteMessage", + "telegram_edit_message_text": "editMessageText", + "telegram_forward_message": "forwardMessage", + "telegram_get_chat": "getChat", + "telegram_get_chat_member": "getChatMember", + "telegram_message": "sendMessage", + "telegram_pin_message": "pinMessage", + "telegram_send_animation": "sendAnimation", + "telegram_send_audio": "sendAudio", + "telegram_send_chat_action": "sendChatAction", + "telegram_send_contact": "sendContact", + "telegram_send_document": "sendDocument", + "telegram_send_location": "sendLocation", + "telegram_send_photo": "sendPhoto", + "telegram_send_poll": "sendPoll", + "telegram_send_video": "sendVideo", + "telegram_set_message_reaction": "setMessageReaction", + "telegram_unpin_message": "unpinMessage" + }, + "triggers": { + "telegram_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "temporal": { + "namespace": "temporal", + "methods": { + "cancel_workflow": "cancelWorkflow", + "count_workflows": "countWorkflows", + "create_schedule": "createSchedule", + "delete_schedule": "deleteSchedule", + "describe_schedule": "describeSchedule", + "describe_task_queue": "describeTaskQueue", + "describe_workflow": "describeWorkflow", + "get_workflow_history": "getWorkflowHistory", + "list_schedules": "listSchedules", + "list_workflows": "listWorkflows", + "pause_schedule": "pauseSchedule", + "query_workflow": "queryWorkflow", + "reset_workflow": "resetWorkflow", + "signal_with_start": "signalWithStart", + "signal_workflow": "signalWorkflow", + "start_workflow": "startWorkflow", + "terminate_workflow": "terminateWorkflow", + "trigger_schedule": "triggerSchedule", + "unpause_schedule": "unpauseSchedule", + "update_workflow": "updateWorkflow" + } + }, + "textract": { + "namespace": "legacy.textract" + }, + "textract_v2": { + "namespace": "legacy.textractV2", + "methods": { + "analyze_document": "analyzeDocumentTextTablesForms", + "analyze_expense": "analyzeExpenseInvoicesReceipts", + "analyze_id": "analyzeIdentityDocument" + } + }, + "textract_v3": { + "namespace": "textract", + "methods": { + "analyze_document": "analyzeDocumentTextTablesForms", + "analyze_expense": "analyzeExpenseInvoicesReceipts", + "analyze_id": "analyzeIdentityDocument" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "thinking": { + "namespace": "legacy.thinking" + }, + "thrive": { + "namespace": "legacy.thrive", + "methods": { + "add_audience_managers": "addAudienceManagers", + "add_audience_members": "addAudienceMembers", + "add_user_tags": "addUserTags", + "create_assignment": "createAssignment", + "create_audience": "createAudience", + "create_completion": "createCompletion", + "create_user": "createUser", + "delete_assignment": "deleteAssignment", + "delete_audience": "deleteAudience", + "delete_user": "deleteUser", + "get_activity": "getActivity", + "get_assignment": "getAssignment", + "get_audience": "getAudience", + "get_completion": "getCompletion", + "get_content": "getContent", + "get_cpd_category": "getCpdCategory", + "get_cpd_entry": "getCpdEntry", + "get_cpd_requirement": "getCpdRequirement", + "get_enrolment": "getEnrolment", + "get_skill_levels": "getSkillLevels", + "get_tag": "getTag", + "get_user_by_id": "getUserById", + "get_user_by_ref": "getUserByRef", + "list_assignments": "listAssignments", + "list_audience_managers": "listAudienceManagers", + "list_audience_members": "listAudienceMembers", + "list_audiences": "listAudiences", + "list_completions": "listCompletions", + "list_enrolments": "listEnrolments", + "list_tags": "listTags", + "query_activities": "queryActivities", + "query_content": "queryContent", + "query_cpd_categories": "queryCpdCategories", + "query_cpd_entries": "queryCpdEntries", + "query_cpd_requirements": "queryCpdRequirements", + "query_cpd_user_summaries": "queryCpdUserSummaries", + "remove_audience_manager": "removeAudienceManager", + "remove_audience_member": "removeAudienceMember", + "remove_user_tags": "removeUserTags", + "replace_audience_managers": "replaceAudienceManagers", + "replace_audience_members": "replaceAudienceMembers", + "search_users": "searchUsers", + "suspend_user": "suspendUser", + "update_assignment": "updateAssignment", + "update_audience": "updateAudience", + "update_user": "updateUser", + "update_user_skills": "updateUserSkills" + } + }, + "thrive_v2": { + "namespace": "thrive", + "methods": { + "add_audience_managers": "addAudienceManagers", + "add_audience_members": "addAudienceMembers", + "add_user_tags": "addUserTags", + "create_assignment": "createAssignment", + "create_audience": "createAudience", + "create_completion": "createCompletion", + "create_user": "createUser", + "delete_assignment": "deleteAssignment", + "delete_audience": "deleteAudience", + "delete_user": "deleteUser", + "get_activity": "getActivity", + "get_assignment": "getAssignment", + "get_audience": "getAudience", + "get_completion": "getCompletion", + "get_content": "getContent", + "get_cpd_category": "getCpdCategory", + "get_cpd_entry": "getCpdEntry", + "get_cpd_requirement": "getCpdRequirement", + "get_enrolment": "getEnrolment", + "get_skill_levels": "getSkillLevels", + "get_tag": "getTag", + "get_user_by_id": "getUserById", + "get_user_by_ref": "getUserByRef", + "list_assignments": "listAssignments", + "list_audience_managers": "listAudienceManagers", + "list_audience_members": "listAudienceMembers", + "list_audiences": "listAudiences", + "list_completions": "listCompletions", + "list_enrolments": "listEnrolments", + "list_tags": "listTags", + "query_activities": "queryActivities", + "query_content": "queryContent", + "query_cpd_categories": "queryCpdCategories", + "query_cpd_entries": "queryCpdEntries", + "query_cpd_requirements": "queryCpdRequirements", + "query_cpd_user_summaries": "queryCpdUserSummaries", + "remove_audience_manager": "removeAudienceManager", + "remove_audience_member": "removeAudienceMember", + "remove_user_tags": "removeUserTags", + "replace_audience_managers": "replaceAudienceManagers", + "replace_audience_members": "replaceAudienceMembers", + "search_users": "searchUsers", + "suspend_user": "suspendUser", + "update_assignment": "updateAssignment", + "update_audience": "updateAudience", + "update_user": "updateUser", + "update_user_skills": "updateUserSkills" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "tiktok": { + "namespace": "tiktok", + "methods": { + "tiktok_get_post_status": "getPostStatus", + "tiktok_get_user": "getUserInfo", + "tiktok_list_videos": "listVideos", + "tiktok_query_videos": "queryVideos", + "tiktok_upload_video_draft": "uploadVideoDraft" + }, + "triggers": { + "tiktok_authorization_removed": "authorizationRemoved", + "tiktok_post_inbox_delivered": "postInboxDelivered", + "tiktok_post_no_longer_public": "postNoLongerPublic", + "tiktok_post_publicly_available": "postPubliclyAvailable", + "tiktok_post_publish_complete": "postPublishComplete", + "tiktok_post_publish_failed": "postPublishFailed" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "triggerCredentials": "credential" + } + } + }, + "tinybird": { + "namespace": "legacy.tinybird", + "methods": { + "tinybird_append_datasource": "appendDataSourceFromUrl", + "tinybird_delete_datasource_rows": "deleteDataSourceRows", + "tinybird_events": "sendEvents", + "tinybird_get_job": "getJobStatus", + "tinybird_query": "query", + "tinybird_query_pipe": "queryPipeEndpoint", + "tinybird_truncate_datasource": "truncateDataSource" + } + }, + "tinybird_v2": { + "namespace": "tinybird", + "methods": { + "tinybird_append_datasource": "appendDataSourceFromUrl", + "tinybird_delete_datasource_rows": "deleteDataSourceRows", + "tinybird_events": "sendEvents", + "tinybird_get_job": "getJobStatus", + "tinybird_query": "query", + "tinybird_query_pipe": "queryPipeEndpoint", + "tinybird_truncate_datasource": "truncateDataSource" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "tinyfish": { + "namespace": "tinyfish", + "methods": { + "tinyfish_cancel_run": "cancelRun", + "tinyfish_fetch": "fetchUrls", + "tinyfish_get_run": "getRun", + "tinyfish_list_profiles": "listBrowserProfiles", + "tinyfish_list_runs": "listRuns", + "tinyfish_list_vault_items": "listVaultItems", + "tinyfish_run": "runAgent", + "tinyfish_run_async": "startAgentRun", + "tinyfish_search": "search" + } + }, + "translate": { + "namespace": "translate" + }, + "trello": { + "namespace": "trello", + "methods": { + "trello_add_checklist": "addChecklist", + "trello_add_checklist_item": "addChecklistItem", + "trello_add_comment": "addComment", + "trello_add_label": "addLabel", + "trello_add_member": "addMember", + "trello_create_board": "createBoard", + "trello_create_card": "createCard", + "trello_create_list": "createList", + "trello_delete_card": "deleteCard", + "trello_get_actions": "getActions", + "trello_get_board": "getBoard", + "trello_get_card": "getCard", + "trello_list_cards": "listCards", + "trello_list_lists": "getLists", + "trello_list_members": "listMembers", + "trello_remove_label": "removeLabel", + "trello_remove_member": "removeMember", + "trello_search": "search", + "trello_update_card": "updateCard", + "trello_update_checklist_item": "updateChecklistItem", + "trello_update_list": "updateList" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "trigger_dev": { + "namespace": "legacy.triggerDev", + "methods": { + "trigger_dev_activate_schedule": "activateSchedule", + "trigger_dev_add_run_tags": "addRunTags", + "trigger_dev_batch_trigger_task": "batchTriggerTask", + "trigger_dev_cancel_run": "cancelRun", + "trigger_dev_complete_waitpoint_token": "completeWaitpointToken", + "trigger_dev_create_env_var": "createEnvVar", + "trigger_dev_create_schedule": "createSchedule", + "trigger_dev_create_waitpoint_token": "createWaitpointToken", + "trigger_dev_deactivate_schedule": "deactivateSchedule", + "trigger_dev_delete_env_var": "deleteEnvVar", + "trigger_dev_delete_schedule": "deleteSchedule", + "trigger_dev_execute_query": "executeQuery", + "trigger_dev_get_batch": "getBatch", + "trigger_dev_get_batch_results": "getBatchResults", + "trigger_dev_get_deployment": "getDeployment", + "trigger_dev_get_env_var": "getEnvVar", + "trigger_dev_get_latest_deployment": "getLatestDeployment", + "trigger_dev_get_query_schema": "getQuerySchema", + "trigger_dev_get_queue": "getQueue", + "trigger_dev_get_run": "getRun", + "trigger_dev_get_run_events": "getRunEvents", + "trigger_dev_get_run_result": "getRunResult", + "trigger_dev_get_run_trace": "getRunTrace", + "trigger_dev_get_schedule": "getSchedule", + "trigger_dev_get_waitpoint_token": "getWaitpointToken", + "trigger_dev_import_env_vars": "importEnvVars", + "trigger_dev_list_deployments": "listDeployments", + "trigger_dev_list_env_vars": "listEnvVars", + "trigger_dev_list_queues": "listQueues", + "trigger_dev_list_runs": "listRuns", + "trigger_dev_list_schedules": "listSchedules", + "trigger_dev_list_timezones": "listTimezones", + "trigger_dev_list_waitpoint_tokens": "listWaitpointTokens", + "trigger_dev_override_queue_concurrency": "overrideQueueConcurrency", + "trigger_dev_pause_queue": "pauseQueue", + "trigger_dev_promote_deployment": "promoteDeployment", + "trigger_dev_replay_run": "replayRun", + "trigger_dev_reschedule_run": "rescheduleRun", + "trigger_dev_reset_queue_concurrency": "resetQueueConcurrency", + "trigger_dev_resume_queue": "resumeQueue", + "trigger_dev_trigger_task": "triggerTask", + "trigger_dev_update_env_var": "updateEnvVar", + "trigger_dev_update_run_metadata": "updateRunMetadata", + "trigger_dev_update_schedule": "updateSchedule" + } + }, + "trigger_dev_v2": { + "namespace": "triggerDev", + "methods": { + "trigger_dev_activate_schedule": "activateSchedule", + "trigger_dev_add_run_tags": "addRunTags", + "trigger_dev_batch_trigger_task": "batchTriggerTask", + "trigger_dev_cancel_run": "cancelRun", + "trigger_dev_complete_waitpoint_token": "completeWaitpointToken", + "trigger_dev_create_env_var": "createEnvVar", + "trigger_dev_create_schedule": "createSchedule", + "trigger_dev_create_waitpoint_token": "createWaitpointToken", + "trigger_dev_deactivate_schedule": "deactivateSchedule", + "trigger_dev_delete_env_var": "deleteEnvVar", + "trigger_dev_delete_schedule": "deleteSchedule", + "trigger_dev_execute_query": "executeQuery", + "trigger_dev_get_batch": "getBatch", + "trigger_dev_get_batch_results": "getBatchResults", + "trigger_dev_get_deployment": "getDeployment", + "trigger_dev_get_env_var": "getEnvVar", + "trigger_dev_get_latest_deployment": "getLatestDeployment", + "trigger_dev_get_query_schema": "getQuerySchema", + "trigger_dev_get_queue": "getQueue", + "trigger_dev_get_run": "getRun", + "trigger_dev_get_run_events": "getRunEvents", + "trigger_dev_get_run_result": "getRunResult", + "trigger_dev_get_run_trace": "getRunTrace", + "trigger_dev_get_schedule": "getSchedule", + "trigger_dev_get_waitpoint_token": "getWaitpointToken", + "trigger_dev_import_env_vars": "importEnvVars", + "trigger_dev_list_deployments": "listDeployments", + "trigger_dev_list_env_vars": "listEnvVars", + "trigger_dev_list_queues": "listQueues", + "trigger_dev_list_runs": "listRuns", + "trigger_dev_list_schedules": "listSchedules", + "trigger_dev_list_timezones": "listTimezones", + "trigger_dev_list_waitpoint_tokens": "listWaitpointTokens", + "trigger_dev_override_queue_concurrency": "overrideQueueConcurrency", + "trigger_dev_pause_queue": "pauseQueue", + "trigger_dev_promote_deployment": "promoteDeployment", + "trigger_dev_replay_run": "replayRun", + "trigger_dev_reschedule_run": "rescheduleRun", + "trigger_dev_reset_queue_concurrency": "resetQueueConcurrency", + "trigger_dev_resume_queue": "resumeQueue", + "trigger_dev_trigger_task": "triggerTask", + "trigger_dev_update_env_var": "updateEnvVar", + "trigger_dev_update_run_metadata": "updateRunMetadata", + "trigger_dev_update_schedule": "updateSchedule" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "tts": { + "namespace": "tts" + }, + "twilio_sms": { + "namespace": "legacy.twilioSms", + "triggers": { + "twilio_sms_received": "received", + "twilio_sms_status": "status" + } + }, + "twilio_sms_v2": { + "namespace": "twilioSms", + "triggers": { + "twilio_sms_received": "received", + "twilio_sms_status": "status" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "twilio_voice": { + "namespace": "legacy.twilioVoice", + "methods": { + "get_recording": "getRecording", + "list_calls": "listCalls", + "make_call": "makeCall" + }, + "triggers": { + "twilio_voice_webhook": "webhook" + } + }, + "twilio_voice_v2": { + "namespace": "twilioVoice", + "methods": { + "get_recording": "getRecording", + "list_calls": "listCalls", + "make_call": "makeCall" + }, + "triggers": { + "twilio_voice_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "typeform": { + "namespace": "legacy.typeform", + "methods": { + "typeform_create_form": "createForm", + "typeform_delete_form": "deleteForm", + "typeform_files": "downloadFile", + "typeform_get_form": "getFormDetails", + "typeform_insights": "formInsights", + "typeform_list_forms": "listForms", + "typeform_responses": "retrieveResponses", + "typeform_update_form": "updateForm" + }, + "triggers": { + "typeform_webhook": "webhook" + } + }, + "typeform_v2": { + "namespace": "typeform", + "methods": { + "typeform_create_form": "createForm", + "typeform_delete_form": "deleteForm", + "typeform_files": "downloadFile", + "typeform_get_form": "getFormDetails", + "typeform_insights": "formInsights", + "typeform_list_forms": "listForms", + "typeform_responses": "retrieveResponses", + "typeform_update_form": "updateForm" + }, + "triggers": { + "typeform_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "upstash": { + "namespace": "legacy.upstash", + "methods": { + "command": "command", + "delete": "delete_", + "exists": "exists", + "expire": "expire", + "get": "get", + "hget": "hget", + "hgetall": "hgetall", + "hset": "hset", + "incr": "incr", + "incrby": "incrby", + "keys": "listKeys", + "lpush": "lpush", + "lrange": "lrange", + "set": "set", + "setnx": "setnx", + "ttl": "ttl" + } + }, + "upstash_v2": { + "namespace": "upstash", + "methods": { + "command": "command", + "delete": "delete_", + "exists": "exists", + "expire": "expire", + "get": "get", + "hget": "hget", + "hgetall": "hgetall", + "hset": "hset", + "incr": "incr", + "incrby": "incrby", + "keys": "listKeys", + "lpush": "lpush", + "lrange": "lrange", + "set": "set", + "setnx": "setnx", + "ttl": "ttl" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "uptimerobot": { + "namespace": "legacy.uptimerobot", + "methods": { + "create_alert_contact": "createAlertContact", + "create_maintenance_window": "createMaintenanceWindow", + "create_monitor": "createMonitor", + "create_psp": "createStatusPage", + "delete_alert_contact": "deleteAlertContact", + "delete_maintenance_window": "deleteMaintenanceWindow", + "delete_monitor": "deleteMonitor", + "delete_psp": "deleteStatusPage", + "get_account": "getAccount", + "get_alert_contact": "getAlertContact", + "get_incident": "getIncident", + "get_maintenance_window": "getMaintenanceWindow", + "get_monitor": "getMonitor", + "get_psp": "getStatusPage", + "list_alert_contacts": "listAlertContacts", + "list_incidents": "listIncidents", + "list_maintenance_windows": "listMaintenanceWindows", + "list_monitors": "listMonitors", + "list_psps": "listStatusPages", + "pause_monitor": "pauseMonitor", + "start_monitor": "startMonitor", + "update_maintenance_window": "updateMaintenanceWindow", + "update_monitor": "updateMonitor", + "update_psp": "updateStatusPage" + } + }, + "uptimerobot_v2": { + "namespace": "uptimerobot", + "methods": { + "create_alert_contact": "createAlertContact", + "create_maintenance_window": "createMaintenanceWindow", + "create_monitor": "createMonitor", + "create_psp": "createStatusPage", + "delete_alert_contact": "deleteAlertContact", + "delete_maintenance_window": "deleteMaintenanceWindow", + "delete_monitor": "deleteMonitor", + "delete_psp": "deleteStatusPage", + "get_account": "getAccount", + "get_alert_contact": "getAlertContact", + "get_incident": "getIncident", + "get_maintenance_window": "getMaintenanceWindow", + "get_monitor": "getMonitor", + "get_psp": "getStatusPage", + "list_alert_contacts": "listAlertContacts", + "list_incidents": "listIncidents", + "list_maintenance_windows": "listMaintenanceWindows", + "list_monitors": "listMonitors", + "list_psps": "listStatusPages", + "pause_monitor": "pauseMonitor", + "start_monitor": "startMonitor", + "update_maintenance_window": "updateMaintenanceWindow", + "update_monitor": "updateMonitor", + "update_psp": "updateStatusPage" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "vanta": { + "namespace": "vanta", + "methods": { + "download_document_file": "downloadDocumentFile", + "get_control": "getControl", + "get_document": "getDocument", + "get_framework": "getFramework", + "get_person": "getPerson", + "get_policy": "getPolicy", + "get_risk_scenario": "getRiskScenario", + "get_test": "getTest", + "get_vendor": "getVendor", + "get_vulnerable_asset": "getVulnerableAsset", + "list_control_documents": "listControlDocuments", + "list_control_tests": "listControlTests", + "list_controls": "listControls", + "list_document_uploads": "listDocumentUploads", + "list_documents": "listDocuments", + "list_framework_controls": "listFrameworkControls", + "list_frameworks": "listFrameworks", + "list_monitored_computers": "listMonitoredComputers", + "list_people": "listPeople", + "list_policies": "listPolicies", + "list_risk_scenarios": "listRiskScenarios", + "list_test_entities": "listTestEntities", + "list_tests": "listTests", + "list_vendors": "listVendors", + "list_vulnerabilities": "listVulnerabilities", + "list_vulnerability_remediations": "listVulnerabilityRemediations", + "list_vulnerable_assets": "listVulnerableAssets", + "submit_document": "submitDocument", + "upload_document_file": "uploadDocumentFile" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "variables": { + "namespace": "setVariables" + }, + "vercel": { + "namespace": "legacy.vercel", + "methods": { + "add_domain": "addDomain", + "add_project_domain": "addProjectDomain", + "cancel_deployment": "cancelDeployment", + "create_alias": "createAlias", + "create_check": "createCheck", + "create_deployment": "createDeployment", + "create_dns_record": "createDnsRecord", + "create_edge_config": "createEdgeConfig", + "create_env_var": "createEnvironmentVariable", + "create_project": "createProject", + "create_webhook": "createWebhook", + "delete_alias": "deleteAlias", + "delete_deployment": "deleteDeployment", + "delete_dns_record": "deleteDnsRecord", + "delete_domain": "deleteDomain", + "delete_edge_config": "deleteEdgeConfig", + "delete_env_var": "deleteEnvironmentVariable", + "delete_project": "deleteProject", + "delete_webhook": "deleteWebhook", + "get_alias": "getAlias", + "get_check": "getCheck", + "get_deployment": "getDeployment", + "get_deployment_events": "getDeploymentLogs", + "get_domain": "getDomain", + "get_domain_config": "getDomainConfig", + "get_edge_config": "getEdgeConfig", + "get_edge_config_items": "getEdgeConfigItems", + "get_env_vars": "getEnvironmentVariables", + "get_project": "getProject", + "get_team": "getTeam", + "get_user": "getUser", + "get_webhook": "getWebhook", + "list_aliases": "listAliases", + "list_checks": "listChecks", + "list_deployment_files": "listDeploymentFiles", + "list_deployments": "listDeployments", + "list_dns_records": "listDnsRecords", + "list_domains": "listDomains", + "list_edge_configs": "listEdgeConfigs", + "list_project_domains": "listProjectDomains", + "list_projects": "listProjects", + "list_team_members": "listTeamMembers", + "list_teams": "listTeams", + "list_webhooks": "listWebhooks", + "pause_project": "pauseProject", + "promote_deployment": "promoteDeployment", + "remove_project_domain": "removeProjectDomain", + "rerequest_check": "rerequestCheck", + "unpause_project": "unpauseProject", + "update_check": "updateCheck", + "update_dns_record": "updateDnsRecord", + "update_edge_config_items": "updateEdgeConfigItems", + "update_env_var": "updateEnvironmentVariable", + "update_project": "updateProject", + "update_project_domain": "updateProjectDomain", + "verify_project_domain": "verifyProjectDomain" + }, + "triggers": { + "vercel_deployment_canceled": "deploymentCanceled", + "vercel_deployment_created": "deploymentCreated", + "vercel_deployment_error": "deploymentError", + "vercel_deployment_ready": "deploymentReady", + "vercel_domain_created": "domainCreated", + "vercel_project_created": "projectCreated", + "vercel_project_removed": "projectRemoved", + "vercel_webhook": "webhook" + } + }, + "vercel_v2": { + "namespace": "vercel", + "methods": { + "add_domain": "addDomain", + "add_project_domain": "addProjectDomain", + "cancel_deployment": "cancelDeployment", + "create_alias": "createAlias", + "create_check": "createCheck", + "create_deployment": "createDeployment", + "create_dns_record": "createDnsRecord", + "create_edge_config": "createEdgeConfig", + "create_env_var": "createEnvironmentVariable", + "create_project": "createProject", + "create_webhook": "createWebhook", + "delete_alias": "deleteAlias", + "delete_deployment": "deleteDeployment", + "delete_dns_record": "deleteDnsRecord", + "delete_domain": "deleteDomain", + "delete_edge_config": "deleteEdgeConfig", + "delete_env_var": "deleteEnvironmentVariable", + "delete_project": "deleteProject", + "delete_webhook": "deleteWebhook", + "get_alias": "getAlias", + "get_check": "getCheck", + "get_deployment": "getDeployment", + "get_deployment_events": "getDeploymentLogs", + "get_domain": "getDomain", + "get_domain_config": "getDomainConfig", + "get_edge_config": "getEdgeConfig", + "get_edge_config_items": "getEdgeConfigItems", + "get_env_vars": "getEnvironmentVariables", + "get_project": "getProject", + "get_team": "getTeam", + "get_user": "getUser", + "get_webhook": "getWebhook", + "list_aliases": "listAliases", + "list_checks": "listChecks", + "list_deployment_files": "listDeploymentFiles", + "list_deployments": "listDeployments", + "list_dns_records": "listDnsRecords", + "list_domains": "listDomains", + "list_edge_configs": "listEdgeConfigs", + "list_project_domains": "listProjectDomains", + "list_projects": "listProjects", + "list_team_members": "listTeamMembers", + "list_teams": "listTeams", + "list_webhooks": "listWebhooks", + "pause_project": "pauseProject", + "promote_deployment": "promoteDeployment", + "remove_project_domain": "removeProjectDomain", + "rerequest_check": "rerequestCheck", + "unpause_project": "unpauseProject", + "update_check": "updateCheck", + "update_dns_record": "updateDnsRecord", + "update_edge_config_items": "updateEdgeConfigItems", + "update_env_var": "updateEnvironmentVariable", + "update_project": "updateProject", + "update_project_domain": "updateProjectDomain", + "verify_project_domain": "verifyProjectDomain" + }, + "triggers": { + "vercel_deployment_canceled": "deploymentCanceled", + "vercel_deployment_created": "deploymentCreated", + "vercel_deployment_error": "deploymentError", + "vercel_deployment_ready": "deploymentReady", + "vercel_domain_created": "domainCreated", + "vercel_project_created": "projectCreated", + "vercel_project_removed": "projectRemoved", + "vercel_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "video_generator": { + "namespace": "legacy.videoGenerator" + }, + "video_generator_v2": { + "namespace": "legacy.videoGeneratorV2" + }, + "video_generator_v3": { + "namespace": "videoGenerator" + }, + "vision": { + "namespace": "legacy.vision" + }, + "vision_v2": { + "namespace": "legacy.visionV2" + }, + "wait": { + "namespace": "wait" + }, + "wealthbox": { + "namespace": "wealthbox", + "methods": { + "read_contact": "readContact", + "read_note": "readNote", + "read_task": "readTask", + "write_contact": "writeContact", + "write_note": "writeNote", + "write_task": "writeTask" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "webflow": { + "namespace": "webflow", + "methods": { + "create": "createItem", + "delete": "deleteItem", + "get": "getItem", + "list": "listItems", + "update": "updateItem" + }, + "triggers": { + "webflow_collection_item_changed": "collectionItemChanged", + "webflow_collection_item_created": "collectionItemCreated", + "webflow_collection_item_deleted": "collectionItemDeleted", + "webflow_form_submission": "formSubmission" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "oauthCredential": "credential" + } + } + }, + "webhook_request": { + "namespace": "webhookRequest" + }, + "whatsapp": { + "namespace": "legacy.whatsapp", + "methods": { + "get_media": "downloadMedia", + "mark_read": "markAsRead", + "send_interactive": "sendInteractive", + "send_media": "sendMedia", + "send_message": "sendMessage", + "send_reaction": "sendReaction", + "send_template": "sendTemplate", + "upload_media": "uploadMedia" + }, + "triggers": { + "whatsapp_webhook": "webhook" + } + }, + "whatsapp_v2": { + "namespace": "whatsapp", + "methods": { + "get_media": "downloadMedia", + "mark_read": "markAsRead", + "send_interactive": "sendInteractive", + "send_media": "sendMedia", + "send_message": "sendMessage", + "send_reaction": "sendReaction", + "send_template": "sendTemplate", + "upload_media": "uploadMedia" + }, + "triggers": { + "whatsapp_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "wikipedia": { + "namespace": "wikipedia", + "methods": { + "wikipedia_content": "getPageContent", + "wikipedia_random": "randomPage", + "wikipedia_search": "searchPages", + "wikipedia_summary": "getPageSummary" + } + }, + "windchill": { + "namespace": "windchill", + "methods": { + "windchill_check_in_document": "checkInDocument", + "windchill_check_in_documents": "checkInDocuments", + "windchill_check_out_document": "checkOutDocument", + "windchill_check_out_documents": "checkOutDocuments", + "windchill_create_document": "createDocument", + "windchill_create_documents": "createDocuments", + "windchill_delete_document": "deleteDocument", + "windchill_delete_documents": "deleteDocuments", + "windchill_download_attachment": "downloadAttachment", + "windchill_download_primary_content": "downloadPrimaryContent", + "windchill_get_document": "getDocument", + "windchill_get_document_structure": "getDocumentStructure", + "windchill_get_primary_content": "getPrimaryContent", + "windchill_get_valid_state_transitions": "getValidStateTransitions", + "windchill_list_attachments": "listAttachments", + "windchill_list_documents": "listDocuments", + "windchill_revise_document": "reviseDocument", + "windchill_revise_documents": "reviseDocuments", + "windchill_set_lifecycle_state": "setLifecycleState", + "windchill_undo_check_out_document": "undoCheckOutDocument", + "windchill_undo_check_out_documents": "undoCheckOutDocuments", + "windchill_update_common_properties": "updateCommonProperties", + "windchill_update_document": "updateDocument", + "windchill_update_document_security_labels": "updateDocumentSecurityLabels", + "windchill_update_documents": "updateDocuments", + "windchill_upload_attachments": "uploadAttachments", + "windchill_upload_primary_content": "uploadPrimaryContent" + } + }, + "wiza": { + "namespace": "wiza", + "methods": { + "company_enrichment": "companyEnrichment", + "get_credits": "getCredits", + "individual_reveal": "individualReveal", + "prospect_search": "prospectSearch" + } + }, + "wordpress": { + "namespace": "wordpress", + "methods": { + "wordpress_create_category": "createCategory", + "wordpress_create_comment": "createComment", + "wordpress_create_page": "createPage", + "wordpress_create_post": "createPost", + "wordpress_create_tag": "createTag", + "wordpress_delete_category": "deleteCategory", + "wordpress_delete_comment": "deleteComment", + "wordpress_delete_media": "deleteMedia", + "wordpress_delete_page": "deletePage", + "wordpress_delete_post": "deletePost", + "wordpress_delete_tag": "deleteTag", + "wordpress_get_category": "getCategory", + "wordpress_get_current_user": "getCurrentUser", + "wordpress_get_media": "getMedia", + "wordpress_get_page": "getPage", + "wordpress_get_post": "getPost", + "wordpress_get_tag": "getTag", + "wordpress_get_user": "getUser", + "wordpress_list_categories": "listCategories", + "wordpress_list_comments": "listComments", + "wordpress_list_media": "listMedia", + "wordpress_list_pages": "listPages", + "wordpress_list_posts": "listPosts", + "wordpress_list_tags": "listTags", + "wordpress_list_users": "listUsers", + "wordpress_search_content": "searchContent", + "wordpress_update_category": "updateCategory", + "wordpress_update_comment": "updateComment", + "wordpress_update_page": "updatePage", + "wordpress_update_post": "updatePost", + "wordpress_update_tag": "updateTag", + "wordpress_upload_media": "uploadMedia" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "workday": { + "namespace": "workday", + "methods": { + "assign_onboarding": "assignOnboardingPlan", + "change_job": "changeJob", + "create_prehire": "createPreHire", + "get_compensation": "getCompensation", + "get_organizations": "getOrganizations", + "get_worker": "getWorker", + "hire_employee": "hireEmployee", + "list_workers": "listWorkers", + "terminate_worker": "terminateWorker", + "update_worker": "updatePersonalInformation" + } + }, + "workflow": { + "namespace": "legacy.workflow" + }, + "workflow_input": { + "namespace": "runWorkflow" + }, + "x": { + "namespace": "x", + "methods": { + "x_create_bookmark": "createBookmark", + "x_create_tweet": "createTweet", + "x_delete_bookmark": "deleteBookmark", + "x_delete_tweet": "deleteTweet", + "x_get_blocking": "getBlockedUsers", + "x_get_bookmarks": "getBookmarks", + "x_get_followers": "getFollowers", + "x_get_following": "getFollowing", + "x_get_liked_tweets": "getLikedTweets", + "x_get_liking_users": "getLikingUsers", + "x_get_me": "getMyProfile", + "x_get_personalized_trends": "getPersonalizedTrends", + "x_get_quote_tweets": "getQuoteTweets", + "x_get_retweeted_by": "getRetweetedBy", + "x_get_trends_by_woeid": "getTrendsByLocation", + "x_get_tweets_by_ids": "getTweetsByIds", + "x_get_usage": "getApiUsage", + "x_get_user_mentions": "getUserMentions", + "x_get_user_timeline": "getUserTimeline", + "x_get_user_tweets": "getUserTweets", + "x_hide_reply": "hideReply", + "x_manage_block": "blockUnblock", + "x_manage_follow": "followUnfollow", + "x_manage_like": "likeUnlike", + "x_manage_mute": "muteUnmute", + "x_manage_retweet": "retweetUnretweet", + "x_search_tweets": "searchTweets", + "x_search_users": "searchUsers" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "youcom": { + "namespace": "legacy.youcom", + "methods": { + "youcom_answer": "answer", + "youcom_finance_research": "financeResearch", + "youcom_get_account_balance": "getAccountBalance", + "youcom_get_contents": "getContents", + "youcom_get_research_task": "getResearchTask", + "youcom_research": "research", + "youcom_search": "search", + "youcom_search_images": "searchImages" + } + }, + "youcom_v2": { + "namespace": "youcom", + "methods": { + "youcom_answer": "answer", + "youcom_finance_research": "financeResearch", + "youcom_get_account_balance": "getAccountBalance", + "youcom_get_contents": "getContents", + "youcom_get_research_task": "getResearchTask", + "youcom_research": "research", + "youcom_search": "search", + "youcom_search_images": "searchImages" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "youtube": { + "namespace": "legacy.youtube", + "methods": { + "youtube_channel_info": "getChannelInfo", + "youtube_channel_playlists": "getChannelPlaylists", + "youtube_channel_videos": "getChannelVideos", + "youtube_comments": "getVideoComments", + "youtube_playlist_items": "getPlaylistItems", + "youtube_search": "searchVideos", + "youtube_trending": "getTrendingVideos", + "youtube_video_categories": "getVideoCategories", + "youtube_video_details": "getVideoDetails" + } + }, + "youtube_v2": { + "namespace": "youtube", + "methods": { + "youtube_channel_info": "getChannelInfo", + "youtube_channel_playlists": "getChannelPlaylists", + "youtube_channel_videos": "getChannelVideos", + "youtube_comments": "getVideoComments", + "youtube_playlist_items": "getPlaylistItems", + "youtube_search": "searchVideos", + "youtube_trending": "getTrendingVideos", + "youtube_video_categories": "getVideoCategories", + "youtube_video_details": "getVideoDetails" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "zendesk": { + "namespace": "legacy.zendesk", + "methods": { + "autocomplete_organizations": "autocompleteOrganizations", + "create_organization": "createOrganization", + "create_organizations_bulk": "createOrganizationsBulk", + "create_ticket": "createTicket", + "create_tickets_bulk": "createTicketsBulk", + "create_user": "createUser", + "create_users_bulk": "createUsersBulk", + "delete_organization": "deleteOrganization", + "delete_ticket": "deleteTicket", + "delete_user": "deleteUser", + "get_current_user": "getCurrentUser", + "get_organization": "getOrganization", + "get_organizations": "getOrganizations", + "get_ticket": "getTicket", + "get_tickets": "getTickets", + "get_user": "getUser", + "get_users": "getUsers", + "merge_tickets": "mergeTickets", + "search": "search", + "search_count": "searchCount", + "search_users": "searchUsers", + "update_organization": "updateOrganization", + "update_ticket": "updateTicket", + "update_tickets_bulk": "updateTicketsBulk", + "update_user": "updateUser", + "update_users_bulk": "updateUsersBulk" + }, + "triggers": { + "zendesk_ticket_comment_added": "ticketCommentAdded", + "zendesk_ticket_created": "ticketCreated", + "zendesk_ticket_priority_changed": "ticketPriorityChanged", + "zendesk_ticket_status_changed": "ticketStatusChanged", + "zendesk_webhook": "webhook" + } + }, + "zendesk_v2": { + "namespace": "zendesk", + "methods": { + "autocomplete_organizations": "autocompleteOrganizations", + "create_organization": "createOrganization", + "create_organizations_bulk": "createOrganizationsBulk", + "create_ticket": "createTicket", + "create_tickets_bulk": "createTicketsBulk", + "create_user": "createUser", + "create_users_bulk": "createUsersBulk", + "delete_organization": "deleteOrganization", + "delete_ticket": "deleteTicket", + "delete_user": "deleteUser", + "get_current_user": "getCurrentUser", + "get_organization": "getOrganization", + "get_organizations": "getOrganizations", + "get_ticket": "getTicket", + "get_tickets": "getTickets", + "get_user": "getUser", + "get_users": "getUsers", + "merge_tickets": "mergeTickets", + "search": "search", + "search_count": "searchCount", + "search_users": "searchUsers", + "update_organization": "updateOrganization", + "update_ticket": "updateTicket", + "update_tickets_bulk": "updateTicketsBulk", + "update_user": "updateUser", + "update_users_bulk": "updateUsersBulk" + }, + "triggers": { + "zendesk_ticket_comment_added": "ticketCommentAdded", + "zendesk_ticket_created": "ticketCreated", + "zendesk_ticket_priority_changed": "ticketPriorityChanged", + "zendesk_ticket_status_changed": "ticketStatusChanged", + "zendesk_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "zep": { + "namespace": "legacy.zep", + "methods": { + "add_messages": "addMessages", + "add_user": "addUser", + "create_thread": "createThread", + "delete_thread": "deleteThread", + "get_context": "getContext", + "get_messages": "getMessages", + "get_threads": "getThreads", + "get_user": "getUser", + "get_user_threads": "getUserThreads" + } + }, + "zep_v2": { + "namespace": "zep", + "methods": { + "add_messages": "addMessages", + "add_user": "addUser", + "create_thread": "createThread", + "delete_thread": "deleteThread", + "get_context": "getContext", + "get_messages": "getMessages", + "get_threads": "getThreads", + "get_user": "getUser", + "get_user_threads": "getUserThreads" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "zerobounce": { + "namespace": "zerobounce", + "methods": { + "zerobounce_get_credits": "getRemainingCredits", + "zerobounce_verify_email": "verifyEmail" + } + }, + "zoho_desk": { + "namespace": "zohoDesk", + "methods": { + "add_comment": "addComment", + "create_account": "createAccount", + "create_contact": "createContact", + "create_ticket": "createTicket", + "delete_comment": "deleteComment", + "get_account": "getAccount", + "get_agent": "getAgent", + "get_attachment": "getAttachment", + "get_comment": "getComment", + "get_contact": "getContact", + "get_department": "getDepartment", + "get_thread": "getThread", + "get_ticket": "getTicket", + "list_accounts": "listAccounts", + "list_agents": "listAgents", + "list_comments": "listComments", + "list_contacts": "listContacts", + "list_departments": "listDepartments", + "list_organizations": "listOrganizations", + "list_threads": "listThreads", + "list_tickets": "listTickets", + "move_ticket": "moveTicket", + "search_accounts": "searchAccounts", + "search_contacts": "searchContacts", + "search_tickets": "searchTickets", + "send_reply": "sendReply", + "update_account": "updateAccount", + "update_comment": "updateComment", + "update_contact": "updateContact", + "update_ticket": "updateTicket" + }, + "triggers": { + "zoho_desk": "zohoDesk" + }, + "params": { + "action": { + "oauthCredential": "credential" + }, + "trigger": { + "oauthCredential": "credential" + } + } + }, + "zoom": { + "namespace": "zoom", + "methods": { + "zoom_create_meeting": "createMeeting", + "zoom_delete_meeting": "deleteMeeting", + "zoom_delete_recording": "deleteRecording", + "zoom_get_meeting": "getMeeting", + "zoom_get_meeting_invitation": "getMeetingInvitation", + "zoom_get_meeting_recordings": "getMeetingRecordings", + "zoom_list_meetings": "listMeetings", + "zoom_list_past_participants": "listPastParticipants", + "zoom_list_recordings": "listRecordings", + "zoom_update_meeting": "updateMeeting" + }, + "triggers": { + "zoom_meeting_ended": "meetingEnded", + "zoom_meeting_started": "meetingStarted", + "zoom_participant_joined": "participantJoined", + "zoom_participant_left": "participantLeft", + "zoom_recording_completed": "recordingCompleted", + "zoom_webhook": "webhook" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + }, + "zoominfo": { + "namespace": "legacy.zoominfo", + "methods": { + "enrich_companies": "enrichCompanies", + "enrich_contacts": "enrichContacts", + "search_companies": "searchCompanies", + "search_contacts": "searchContacts", + "search_intent": "searchIntent", + "search_news": "searchNews" + } + }, + "zoominfo_v2": { + "namespace": "zoominfo", + "methods": { + "enrich_companies": "enrichCompanies", + "enrich_contacts": "enrichContacts", + "search_companies": "searchCompanies", + "search_contacts": "searchContacts", + "search_intent": "searchIntent", + "search_news": "searchNews" + }, + "params": { + "action": { + "oauthCredential": "credential" + } + } + } + } +} diff --git a/apps/sim/lib/workflows/code/catalog/registry-sources.ts b/apps/sim/lib/workflows/code/catalog/registry-sources.ts new file mode 100644 index 00000000000..9b534193ded --- /dev/null +++ b/apps/sim/lib/workflows/code/catalog/registry-sources.ts @@ -0,0 +1,27 @@ +import { type SdkNameSource, sdkNameSource } from '@/lib/workflows/code/catalog/sdk-names' +import { getBlockRegistry } from '@/blocks/registry' +import { getTrigger, isTriggerValid } from '@/triggers' +import type { TriggerConfig } from '@/triggers/types' + +/** + * `getTrigger()` builds a fresh namespaced config on every call. The registry is static for the + * life of the process, so each id is resolved once and its identity stays stable, which is what + * lets the catalog builder memoize the projection. + */ +const resolvedTriggers = new Map() + +export function registryTrigger(triggerId: string): TriggerConfig | undefined { + let resolved = resolvedTriggers.get(triggerId) + if (resolved === undefined) { + resolved = isTriggerValid(triggerId) ? getTrigger(triggerId) : null + resolvedTriggers.set(triggerId, resolved) + } + return resolved ?? undefined +} + +/** Name sources for every built-in block, the input of the sdk-names generator and check. */ +export function registrySdkNameSources(): SdkNameSource[] { + return Object.values(getBlockRegistry()).map((block) => + sdkNameSource(block, (id) => registryTrigger(id)?.provider) + ) +} diff --git a/apps/sim/lib/workflows/code/catalog/sdk-names.test.ts b/apps/sim/lib/workflows/code/catalog/sdk-names.test.ts new file mode 100644 index 00000000000..624c483051c --- /dev/null +++ b/apps/sim/lib/workflows/code/catalog/sdk-names.test.ts @@ -0,0 +1,164 @@ +/** + * The frozen-names rules: names only ever get added, collisions resolve deterministically, and the + * check reports every collision or gap. The whole-registry coverage runs as `check:sdk-names`. + */ +import { describe, expect, it } from 'vitest' +import { + extendSdkNames, + type SdkNameSource, + type SdkNamesFile, + validateSdkNames, +} from '@/lib/workflows/code/catalog/sdk-names' + +const EMPTY: SdkNamesFile = { version: 1, blocks: {} } + +function source(overrides: Partial & { type: string }): SdkNameSource { + return { + hidden: false, + operations: [], + triggers: [], + params: { action: [], trigger: [] }, + ...overrides, + } +} + +const param = (name: string, pair = false) => ({ + name, + identity: pair ? `pair:${name}` : `id:${name}`, +}) + +describe('extendSdkNames', () => { + it('never renames an existing method when its option label changes', () => { + const v1 = source({ type: 'slack_v2', operations: [{ id: 'send', label: 'Send Message' }] }) + const first = extendSdkNames(EMPTY, [v1]).names + const relabelled = source({ type: 'slack_v2', operations: [{ id: 'send', label: 'Post' }] }) + const second = extendSdkNames(first, [relabelled]) + expect(second.names.blocks.slack_v2.methods).toEqual({ send: 'sendMessage' }) + expect(second.added).toEqual([]) + }) + + it('gives a new operation whose label collides a distinct method, keeping the old one', () => { + const first = extendSdkNames(EMPTY, [ + source({ type: 'crm', operations: [{ id: 'get_contact', label: 'Get Contact' }] }), + ]).names + const { names } = extendSdkNames(first, [ + source({ + type: 'crm', + operations: [ + { id: 'get_contact', label: 'Get Contact' }, + { id: 'get_contact_v2', label: 'Get Contact' }, + ], + }), + ]) + expect(names.blocks.crm.methods).toEqual({ + get_contact: 'getContact', + get_contact_v2: 'getContactV2', + }) + expect(validateSdkNames(names, [])).toEqual([]) + }) + + it('suffixes a reserved-word method and never takes the namespace member `tool`', () => { + const { names } = extendSdkNames(EMPTY, [ + source({ + type: 'kv', + operations: [ + { id: 'delete', label: 'Delete' }, + { id: 'tool', label: 'Tool' }, + ], + }), + ]) + expect(names.blocks.kv.methods).toEqual({ delete: 'delete_', tool: 'tool2' }) + }) + + it('namespaces visible blocks by unversioned type, hidden ones under legacy, and avoids SDK roots', () => { + const { names } = extendSdkNames(EMPTY, [ + source({ type: 'gmail', hidden: true }), + source({ type: 'gmail_v2' }), + source({ type: 'env' }), + source({ type: 'condition' }), + ]) + expect(names.blocks.gmail_v2.namespace).toBe('gmail') + expect(names.blocks.gmail.namespace).toBe('legacy.gmail') + expect(names.blocks.env.namespace).toBe('envBlock') + expect(names.blocks.condition.namespace).toBe('condition') + }) + + it('aliases oauthCredential to credential per surface, unless that surface has a credential', () => { + const { names } = extendSdkNames(EMPTY, [ + source({ + type: 'drive', + params: { + action: [param('oauthCredential', true)], + trigger: [param('triggerCredentials')], + }, + }), + source({ + type: 'mixed', + params: { action: [param('oauthCredential', true), param('credential')], trigger: [] }, + }), + ]) + expect(names.blocks.drive.params).toEqual({ + action: { oauthCredential: 'credential' }, + trigger: { triggerCredentials: 'credential' }, + }) + expect(names.blocks.mixed.params).toBeUndefined() + }) +}) + +describe('validateSdkNames', () => { + it('reports a block, operation or trigger the file lacks', () => { + const names: SdkNamesFile = { + version: 1, + blocks: { crm: { namespace: 'crm', methods: { a: 'a' } } }, + } + expect( + validateSdkNames(names, [ + source({ + type: 'crm', + operations: [ + { id: 'a', label: 'A' }, + { id: 'b', label: 'B' }, + ], + triggers: [{ id: 'crm_webhook', provider: 'crm' }], + }), + source({ type: 'new_block' }), + ]) + ).toEqual([ + 'crm: missing method for operation b', + 'crm: missing method for trigger crm_webhook', + 'new_block: missing entry', + ]) + }) + + it('reports shared namespaces, shared methods and params that collide after aliasing', () => { + const names: SdkNamesFile = { + version: 1, + blocks: { + a: { namespace: 'shared', methods: { x: 'go', y: 'go' } }, + b: { namespace: 'shared', params: { action: { oauthCredential: 'credential' } } }, + }, + } + const issues = validateSdkNames(names, [ + source({ + type: 'b', + params: { action: [param('oauthCredential', true), param('credential')], trigger: [] }, + }), + ]) + expect(issues).toEqual([ + 'a: method "go" names both x and y', + 'b: action param "credential" names id:credential, pair:oauthCredential', + 'b: namespace "shared" collides with a', + ]) + }) + + it('rejects a namespace on an SDK-owned root or a reserved word', () => { + const names: SdkNamesFile = { + version: 1, + blocks: { a: { namespace: 'trigger' }, b: { namespace: 'legacy.new' } }, + } + expect(validateSdkNames(names, [])).toEqual([ + 'a: namespace "trigger" is not a valid SDK namespace', + 'b: namespace "legacy.new" is not a valid SDK namespace', + ]) + }) +}) diff --git a/apps/sim/lib/workflows/code/catalog/sdk-names.ts b/apps/sim/lib/workflows/code/catalog/sdk-names.ts new file mode 100644 index 00000000000..02165cefe6c --- /dev/null +++ b/apps/sim/lib/workflows/code/catalog/sdk-names.ts @@ -0,0 +1,406 @@ +import { compareStrings, stripVersionSuffix } from '@sim/utils/string' +import { SDK_CORE_EXPORTS, SDK_RESERVED_IDENTIFIERS } from '@sim/workflow-code' +import type { BlockConfig, SubBlockConfig } from '@/blocks/types' + +/** + * The frozen SDK names (`apps/sim/blocks/sdk-names.json`, build-spec decision 7, s2 D3/D4). + * + * A builder's method name is API: once a workflow file says `slack.sendMessage(...)`, renaming the + * option label must not break it. So names are derived once, written to a checked-in file, and + * afterwards only ever added to. The stored operation id is never renamed by any of this. + */ +interface SdkNamesBlockEntry { + /** Dotted builder namespace (`slack`, `legacy.slackV1`). */ + namespace: string + /** Operation dropdown id → method name, for blocks with an `operation` dropdown. */ + methods?: Record + /** Trigger id → method name under `trigger.`. */ + triggers?: Record + /** Param renames per surface (s2 D4: `oauthCredential` / `triggerCredentials` → `credential`). */ + params?: Partial>> +} + +export interface SdkNamesFile { + version: 1 + blocks: Record +} + +type SdkSurface = 'action' | 'trigger' + +/** One parameter as the SDK sees it: a pair is one param named by its `canonicalParamId`. */ +interface SdkParamSource { + name: string + /** `pair:` or `id:`; two identities may not share a name. */ + identity: string +} + +/** The registry facts name derivation reads, so it stays a pure function of data. */ +export interface SdkNameSource { + type: string + /** Hidden from the toolbar: a superseded version or a sunset block. */ + hidden: boolean + operations: Array<{ id: string; label: string }> + triggers: Array<{ id: string; provider: string }> + params: Record +} + +/** Param names aliased to `credential` when the surface has no `credential` of its own. */ +const CREDENTIAL_ALIAS_SOURCES = new Set(['oauthCredential', 'triggerCredentials']) +const CREDENTIAL_ALIAS = 'credential' + +/** + * Core SDK exports that ARE block builders: the core blocks' namespaces (`condition(...)`, + * `table.queryRows(...)` by declaration merging, `fn(...)`). Every other core export is a value + * constructor or tree root (`block`, `trigger`, `legacy`, `env`, `kb`, `loop`, ...), which no block + * namespace may take. + */ +const CORE_BLOCK_BUILDERS = new Set([ + 'condition', + 'fn', + 'human', + 'note', + 'response', + 'router', + 'runWorkflow', + 'setVariables', + 'table', +]) + +const CORE_EXPORTS: ReadonlySet = new Set(SDK_CORE_EXPORTS) + +/** Namespace roots a block may never take; `custom` is the per-org custom block tree. */ +const SDK_OWNED_ROOTS = new Set([ + 'custom', + ...SDK_CORE_EXPORTS.filter((name) => !CORE_BLOCK_BUILDERS.has(name)), +]) + +/** + * Default namespaces that are not the camelCased type, matching the builder names `core.d.ts` + * documents for the core blocks (s2 §2 core types). + */ +const NAMESPACE_SEEDS: Record = { + function: 'fn', + workflow_input: 'runWorkflow', + human_in_the_loop_v2: 'human', + variables: 'setVariables', +} + +/** Members a generated namespace declares besides its methods (s2 §2: `const tool`). */ +const NAMESPACE_MEMBERS = new Set(['tool']) + +const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ + +/** `'Send Message'` → `sendMessage`; `'list_dns_records'` → `listDnsRecords`. */ +export function toCamelIdentifier(text: string): string { + const words = text + .replace(/([a-z0-9])([A-Z])/g, '$1 $2') + .split(/[^A-Za-z0-9]+/) + .filter((word) => word.length > 0) + return words + .map((word, index) => { + const lower = word.toLowerCase() + return index === 0 ? lower : lower.charAt(0).toUpperCase() + lower.slice(1) + }) + .join('') +} + +/** + * A method or trigger name: an identifier that is not a JS reserved word (a generated + * `namespace { function delete() }` does not parse). Core SDK exports are fine here: a method is a + * member, so `helpscout.runWorkflow` never shadows the core `runWorkflow`. + */ +function isUsableIdentifier(name: string): boolean { + return IDENTIFIER.test(name) && (!SDK_RESERVED_IDENTIFIERS.has(name) || CORE_EXPORTS.has(name)) +} + +/** First of `candidates` that is a usable identifier, else the first with a `_` suffix. */ +function firstUsable(candidates: string[]): string | undefined { + for (const candidate of candidates) if (isUsableIdentifier(candidate)) return candidate + for (const candidate of candidates) { + if (IDENTIFIER.test(candidate)) return `${candidate}_` + } + return undefined +} + +/** `base`, else `base2`, `base3`, … — the first not in `taken`. */ +function suffixUntilFree(base: string, taken: ReadonlySet): string { + if (!taken.has(base)) return base + let n = 2 + while (taken.has(`${base}${n}`)) n++ + return `${base}${n}` +} + +function pickFree(candidates: string[], taken: ReadonlySet, fallback: string): string { + const usable = candidates.filter((candidate) => isUsableIdentifier(candidate)) + for (const candidate of usable) if (!taken.has(candidate)) return candidate + return suffixUntilFree(usable[0] ?? firstUsable(candidates) ?? fallback, taken) +} + +/** + * A visible block takes its seed, else its unversioned camelCased type, else the full type; a + * toolbar-hidden one (superseded or sunset) lives under `legacy.` by its full type. The first free + * usable candidate wins, else the first candidate with a numeric suffix. + */ +function defaultNamespace(source: SdkNameSource, taken: ReadonlySet): string { + const full = toCamelIdentifier(source.type) + const prefix = source.hidden ? 'legacy.' : '' + const candidates = ( + source.hidden + ? [full] + : [NAMESPACE_SEEDS[source.type], toCamelIdentifier(stripVersionSuffix(source.type)), full] + ).filter( + (candidate): candidate is string => + candidate !== undefined && + isUsableIdentifier(candidate) && + (source.hidden || !SDK_OWNED_ROOTS.has(candidate)) + ) + const base = candidates[0] ?? `${full.replace(/^(?=\d)/, '_')}Block` + for (const candidate of [...candidates, base]) { + if (!taken.has(`${prefix}${candidate}`)) return `${prefix}${candidate}` + } + let n = 2 + while (taken.has(`${prefix}${base}${n}`)) n++ + return `${prefix}${base}${n}` +} + +function triggerMethodCandidates(blockType: string, trigger: { id: string; provider: string }) { + const id = stripVersionSuffix(trigger.id) + const prefixes = [`${stripVersionSuffix(blockType)}_`, `${trigger.provider}_`] + const stripped = prefixes.reduce( + (current, prefix) => (current.startsWith(prefix) ? current.slice(prefix.length) : current), + id + ) + return [toCamelIdentifier(stripped), toCamelIdentifier(trigger.id)] +} + +/** + * Returns `existing` plus entries for every block, operation, trigger and alias it lacks. + * Existing names are never changed, so a later label edit cannot rename a method. Sources are + * processed in type order, visible blocks first, so a new block's namespace is deterministic. + */ +export function extendSdkNames( + existing: SdkNamesFile, + sources: readonly SdkNameSource[] +): { names: SdkNamesFile; added: string[] } { + const blocks: Record = structuredClone(existing.blocks) + const added: string[] = [] + const takenNamespaces = new Set(Object.values(blocks).map((entry) => entry.namespace)) + + const ordered = [...sources].sort((a, b) => + a.hidden === b.hidden ? compareStrings(a.type, b.type) : a.hidden ? 1 : -1 + ) + + for (const source of ordered) { + let entry = blocks[source.type] + if (!entry) { + const namespace = defaultNamespace(source, takenNamespaces) + takenNamespaces.add(namespace) + entry = { namespace } + blocks[source.type] = entry + added.push(`${source.type}: namespace ${namespace}`) + } + + if (source.operations.length > 0) { + const methods = entry.methods ?? {} + const taken = new Set([...NAMESPACE_MEMBERS, ...Object.values(methods)]) + for (const operation of source.operations) { + if (Object.hasOwn(methods, operation.id)) continue + const method = pickFree( + [toCamelIdentifier(operation.label), toCamelIdentifier(operation.id)], + taken, + 'operation' + ) + methods[operation.id] = method + taken.add(method) + added.push(`${source.type}: method ${operation.id} → ${method}`) + } + entry.methods = methods + } + + if (source.triggers.length > 0) { + const triggers = entry.triggers ?? {} + const taken = new Set(Object.values(triggers)) + for (const trigger of source.triggers) { + if (Object.hasOwn(triggers, trigger.id)) continue + const method = pickFree(triggerMethodCandidates(source.type, trigger), taken, 'trigger') + triggers[trigger.id] = method + taken.add(method) + added.push(`${source.type}: trigger ${trigger.id} → ${method}`) + } + entry.triggers = triggers + } + + for (const surface of ['action', 'trigger'] as const) { + const aliases = entry.params?.[surface] ?? {} + const names = new Set(source.params[surface].map((param) => param.name)) + const used = new Set([...names, ...Object.values(aliases)]) + for (const name of [...names].sort(compareStrings)) { + if (Object.hasOwn(aliases, name) || !CREDENTIAL_ALIAS_SOURCES.has(name)) continue + if (used.has(CREDENTIAL_ALIAS)) continue + aliases[name] = CREDENTIAL_ALIAS + used.add(CREDENTIAL_ALIAS) + added.push(`${source.type}: ${surface} param ${name} → ${CREDENTIAL_ALIAS}`) + } + if (Object.keys(aliases).length > 0) entry.params = { ...entry.params, [surface]: aliases } + } + } + + return { names: { version: 1, blocks: sortEntries(blocks) }, added } +} + +function sortRecord(record: Record): Record { + return Object.fromEntries( + Object.entries(record).sort(([a], [b]) => compareStrings(a, b)) + ) as Record +} + +/** Key-sorted copy so the file diffs one line per added name. */ +function sortEntries( + blocks: Record +): Record { + const sorted: Record = {} + for (const [type, entry] of Object.entries(sortRecord(blocks))) { + const next: SdkNamesBlockEntry = { namespace: entry.namespace } + if (entry.methods) next.methods = sortRecord(entry.methods) + if (entry.triggers) next.triggers = sortRecord(entry.triggers) + if (entry.params) { + const params: Partial>> = {} + if (entry.params.action) params.action = sortRecord(entry.params.action) + if (entry.params.trigger) params.trigger = sortRecord(entry.params.trigger) + next.params = params + } + sorted[type] = next + } + return sorted +} + +function namespaceIsValid(namespace: string): boolean { + const segments = namespace.split('.') + if (segments.some((segment) => !isUsableIdentifier(segment))) return false + if (segments.length === 1) return !SDK_OWNED_ROOTS.has(namespace) + return segments.length === 2 && segments[0] === 'legacy' +} + +/** + * Every problem with `names` against the registry: a missing entry (the generator was not run), + * an invalid identifier, or two things sharing one name. Sorted, so the check output is stable. + */ +export function validateSdkNames(names: SdkNamesFile, sources: readonly SdkNameSource[]): string[] { + const issues: string[] = [] + const namespaceOwners = new Map() + for (const [type, entry] of Object.entries(names.blocks)) { + if (!namespaceIsValid(entry.namespace)) { + issues.push(`${type}: namespace "${entry.namespace}" is not a valid SDK namespace`) + } + const owner = namespaceOwners.get(entry.namespace) + if (owner) issues.push(`${type}: namespace "${entry.namespace}" collides with ${owner}`) + else namespaceOwners.set(entry.namespace, type) + + for (const [kind, record] of [ + ['method', entry.methods], + ['trigger', entry.triggers], + ] as const) { + const seen = new Map() + for (const [id, name] of Object.entries(record ?? {})) { + if (!isUsableIdentifier(name) || (kind === 'method' && NAMESPACE_MEMBERS.has(name))) { + issues.push(`${type}: ${kind} "${name}" (${id}) is not a usable identifier`) + } + const other = seen.get(name) + if (other) issues.push(`${type}: ${kind} "${name}" names both ${other} and ${id}`) + else seen.set(name, id) + } + } + } + + for (const source of sources) { + const entry = names.blocks[source.type] + if (!entry) { + issues.push(`${source.type}: missing entry`) + continue + } + for (const operation of source.operations) { + if (!entry.methods || !Object.hasOwn(entry.methods, operation.id)) { + issues.push(`${source.type}: missing method for operation ${operation.id}`) + } + } + for (const trigger of source.triggers) { + if (!entry.triggers || !Object.hasOwn(entry.triggers, trigger.id)) { + issues.push(`${source.type}: missing method for trigger ${trigger.id}`) + } + } + for (const surface of ['action', 'trigger'] as const) { + const aliases = entry.params?.[surface] ?? {} + const identities = new Map>() + for (const param of source.params[surface]) { + const name = aliases[param.name] ?? param.name + const set = identities.get(name) ?? new Set() + set.add(param.identity) + identities.set(name, set) + } + for (const [name, set] of identities) { + if (set.size > 1) { + issues.push( + `${source.type}: ${surface} param "${name}" names ${[...set].sort(compareStrings).join(', ')}` + ) + } + } + for (const name of Object.keys(aliases)) { + if (!CREDENTIAL_ALIAS_SOURCES.has(name)) { + issues.push(`${source.type}: ${surface} alias for "${name}" is not a credential alias`) + } + } + } + } + + return issues.sort(compareStrings) +} + +function isTriggerSurface(subBlock: SubBlockConfig): boolean { + return subBlock.mode === 'trigger' || subBlock.mode === 'trigger-advanced' +} + +/** The `operation` dropdown's static options across every declaration, in declared order. */ +export function operationOptions(block: BlockConfig): Array<{ id: string; label: string }> { + const seen = new Set() + const operations: Array<{ id: string; label: string }> = [] + for (const subBlock of block.subBlocks) { + if (subBlock.id !== 'operation' || subBlock.type !== 'dropdown') continue + if (isTriggerSurface(subBlock) || !Array.isArray(subBlock.options)) continue + for (const option of subBlock.options) { + const id = String(option.id) + if (seen.has(id)) continue + seen.add(id) + operations.push({ id, label: typeof option.label === 'string' ? option.label : id }) + } + } + return operations +} + +/** Reads the name-relevant facts off one registry block. */ +export function sdkNameSource( + block: BlockConfig, + triggerProvider: (triggerId: string) => string | undefined +): SdkNameSource { + const params: Record = { action: [], trigger: [] } + for (const subBlock of block.subBlocks) { + const surface: SdkSurface = isTriggerSurface(subBlock) ? 'trigger' : 'action' + params[surface].push( + subBlock.canonicalParamId + ? { name: subBlock.canonicalParamId, identity: `pair:${subBlock.canonicalParamId}` } + : { name: subBlock.id, identity: `id:${subBlock.id}` } + ) + } + const triggers = block.triggers?.enabled + ? block.triggers.available.flatMap((id) => { + const provider = triggerProvider(id) + return provider === undefined ? [] : [{ id, provider }] + }) + : [] + return { + type: block.type, + hidden: block.hideFromToolbar === true, + operations: operationOptions(block), + triggers, + params, + } +} diff --git a/apps/sim/package.json b/apps/sim/package.json index 31a53480a53..709f6c26c1d 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -164,6 +164,7 @@ "@sim/security": "workspace:*", "@sim/terminal-protocol": "workspace:*", "@sim/utils": "workspace:*", + "@sim/workflow-code": "workspace:*", "@sim/workflow-persistence": "workspace:*", "@sim/workflow-renderer": "workspace:*", "@sim/workflow-types": "workspace:*", diff --git a/apps/sim/scripts/generate-sdk-names.ts b/apps/sim/scripts/generate-sdk-names.ts new file mode 100644 index 00000000000..4b15bfcf34a --- /dev/null +++ b/apps/sim/scripts/generate-sdk-names.ts @@ -0,0 +1,102 @@ +#!/usr/bin/env bun +/** + * Maintains `apps/sim/blocks/sdk-names.json`, the frozen SDK builder names (build-spec decision 7), + * and its runtime form `apps/sim/blocks/sdk-names.generated.ts`. + * + * A method name is public API the moment a workflow file uses it, so this generator only ever + * ADDS: a new block gets a namespace, a new operation a method, a new trigger a trigger method, + * and a new `oauthCredential` / `triggerCredentials` param its `credential` alias. An existing + * name is never recomputed, so editing an option label cannot rename `slack.sendMessage`. + * + * The runtime module holds the same data as one JSON string parsed at load, never an imported + * `.json`: an imported JSON file this size makes TypeScript infer a type for every entry, which + * is the type-check cost the tool-metadata artifacts document (`tool-registry-boundary` skill). + * + * `--check` (run by `check:audits`) fails when the JSON lacks an entry the registry needs, when any + * two things share a name (two namespaces, two methods or triggers in one block, or two params on + * one surface after aliasing), or when the runtime module is stale. + * + * Usage: + * bun run apps/sim/scripts/generate-sdk-names.ts # add missing names + * bun run apps/sim/scripts/generate-sdk-names.ts --check # fail on drift or collisions + */ +import { readFile, writeFile } from 'node:fs/promises' +import { resolve } from 'node:path' +import { registrySdkNameSources } from '@/lib/workflows/code/catalog/registry-sources' +import { + extendSdkNames, + type SdkNamesFile, + validateSdkNames, +} from '@/lib/workflows/code/catalog/sdk-names' + +const NAMES_PATH = resolve(import.meta.dir, '../blocks/sdk-names.json') +const MODULE_PATH = resolve(import.meta.dir, '../blocks/sdk-names.generated.ts') + +async function readNames(): Promise { + const parsed = JSON.parse(await readFile(NAMES_PATH, 'utf8')) as Partial + if (parsed.version !== 1 || typeof parsed.blocks !== 'object' || parsed.blocks === null) { + throw new Error(`${NAMES_PATH} is not a version 1 sdk-names file`) + } + return { version: 1, blocks: parsed.blocks } +} + +/** A single-quoted JS literal of `json`, escaped the way `sync-tool-metadata.ts` escapes. */ +function toJsStringLiteral(json: string): string { + const escaped = json + .replace(/\\/g, '\\\\') + .replace(/'/g, "\\'") + .replace(/\u2028/g, '\\u2028') + .replace(/\u2029/g, '\\u2029') + return `'${escaped}'` +} + +function renderModule(names: SdkNamesFile): string { + return `// Generated by apps/sim/scripts/generate-sdk-names.ts from blocks/sdk-names.json — do not edit. +// Regenerate with: bun run generate:sdk-names + +import type { SdkNamesFile } from '@/lib/workflows/code/catalog/sdk-names' + +/** The frozen SDK builder names. */ +export const SDK_NAMES: SdkNamesFile = JSON.parse( + ${toJsStringLiteral(JSON.stringify(names))} +) +` +} + +async function readModule(): Promise { + try { + return await readFile(MODULE_PATH, 'utf8') + } catch { + return null + } +} + +const checkOnly = process.argv.includes('--check') +const existing = await readNames() +const sources = registrySdkNameSources() + +if (checkOnly) { + const issues = validateSdkNames(existing, sources) + if ((await readModule()) !== renderModule(existing)) { + issues.push('sdk-names.generated.ts is stale') + } + if (issues.length > 0) { + console.error( + `sdk-names.json is out of date or has collisions (${issues.length}). Run \`bun run generate:sdk-names\`; a collision needs a hand-picked name for the NEW entry, never a rename of an existing one.\n` + ) + for (const issue of issues) console.error(` ${issue}`) + process.exit(1) + } + console.log(`sdk-names.json covers ${sources.length} blocks with no collisions.`) +} else { + const { names, added } = extendSdkNames(existing, sources) + const issues = validateSdkNames(names, sources) + await writeFile(NAMES_PATH, `${JSON.stringify(names, null, 2)}\n`) + await writeFile(MODULE_PATH, renderModule(names)) + console.log(`Added ${added.length} name(s) to sdk-names.json.`) + if (issues.length > 0) { + console.error(`Collisions remain (${issues.length}); resolve them by hand:`) + for (const issue of issues) console.error(` ${issue}`) + process.exit(1) + } +} diff --git a/bun.lock b/bun.lock index f01b284baeb..84084ee029b 100644 --- a/bun.lock +++ b/bun.lock @@ -315,6 +315,7 @@ "@sim/security": "workspace:*", "@sim/terminal-protocol": "workspace:*", "@sim/utils": "workspace:*", + "@sim/workflow-code": "workspace:*", "@sim/workflow-persistence": "workspace:*", "@sim/workflow-renderer": "workspace:*", "@sim/workflow-types": "workspace:*", diff --git a/package.json b/package.json index c47de135725..8c8f23cd249 100644 --- a/package.json +++ b/package.json @@ -99,6 +99,8 @@ "billing-protocol-contract:check": "bun run scripts/sync-billing-protocol-contract.ts --check", "generate:tool-metadata": "bun run scripts/sync-tool-metadata.ts", "check:tool-metadata": "bun run scripts/sync-tool-metadata.ts --check", + "generate:sdk-names": "bun run apps/sim/scripts/generate-sdk-names.ts", + "check:sdk-names": "bun run apps/sim/scripts/generate-sdk-names.ts --check", "generate:deployment-config": "bun run scripts/generate-deployment-config.ts", "check:deployment-config": "bun run scripts/generate-deployment-config.ts --check", "images:generate": "bun run scripts/generate-image-manifest.ts", From 45d01674e38d6b29f0f6716691a2c72063546db5 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:18:12 -0800 Subject: [PATCH 029/428] feat(workflows): project the block registry into the workflow-code block catalog Builds the BlockCatalog core shard from the block, trigger and tool metadata registries: subBlocks in declared order with surface, valueKind and storage, conditions and options as data (deployment-only thunks evaluated once, value-reading ones opaque, operation-only conditions pre-expanded into visibleFor), outputs, legacy ids, lifecycle, builders and a SHA-256 hash over stableStringify. Per-block docs shards carry descriptions and tool schemas. --- .../lib/workflows/code/catalog/build.test.ts | 229 +++++++ apps/sim/lib/workflows/code/catalog/build.ts | 243 ++++++++ apps/sim/lib/workflows/code/catalog/probe.ts | 65 ++ .../sim/lib/workflows/code/catalog/project.ts | 558 ++++++++++++++++++ .../lib/workflows/code/catalog/value-kind.ts | 108 ++++ 5 files changed, 1203 insertions(+) create mode 100644 apps/sim/lib/workflows/code/catalog/build.test.ts create mode 100644 apps/sim/lib/workflows/code/catalog/build.ts create mode 100644 apps/sim/lib/workflows/code/catalog/probe.ts create mode 100644 apps/sim/lib/workflows/code/catalog/project.ts create mode 100644 apps/sim/lib/workflows/code/catalog/value-kind.ts diff --git a/apps/sim/lib/workflows/code/catalog/build.test.ts b/apps/sim/lib/workflows/code/catalog/build.test.ts new file mode 100644 index 00000000000..e05d3b5bd07 --- /dev/null +++ b/apps/sim/lib/workflows/code/catalog/build.test.ts @@ -0,0 +1,229 @@ +/** + * Registry-wide properties of the block catalog projection. + * + * Every assertion runs over the whole live registry rather than fixtures, so a new block that a + * projection rule cannot handle fails here at authoring time. Set `CATALOG_REPORT_PATH` to write + * the opaque-site report and the measured core-shard size as JSON. + */ +import { writeFileSync } from 'node:fs' +import { gzipSync } from 'node:zlib' +import type { CatalogBlock, CatalogSubBlock } from '@sim/workflow-code' +import { describe, expect, it, vi } from 'vitest' + +vi.unmock('@/blocks/registry') + +import { v2BlockCatalogSchema } from '@/lib/api/contracts/v2/block-catalog' +import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' +import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' +import { operationOptions } from '@/lib/workflows/code/catalog/sdk-names' +import { getBlockRegistry } from '@/blocks/registry' +import { SDK_NAMES } from '@/blocks/sdk-names.generated' +import type { BlockConfig } from '@/blocks/types' + +const registryBlocks = Object.values(getBlockRegistry()) +const built = buildBlockCatalog({ + blocks: registryBlocks, + trigger: registryTrigger, + sdkNames: SDK_NAMES, +}) +const { catalog, report } = built + +function isOpaque(value: unknown): boolean { + return typeof value === 'object' && value !== null && 'opaque' in value +} + +function siteKey(block: string, subBlock: string, field: string): string { + return `${block}\u0000${subBlock}\u0000${field}` +} + +describe('block catalog projection over the whole registry', () => { + it('projects every block, subBlock and referenced trigger', () => { + for (const block of registryBlocks) { + const projected = catalog.blocks[block.type] + expect(projected, block.type).toBeDefined() + expect(projected.subBlocks.map((subBlock) => subBlock.id)).toEqual( + block.subBlocks.map((subBlock) => subBlock.id) + ) + if (block.triggers?.enabled) { + for (const id of block.triggers.available) { + if (registryTrigger(id)) + expect(catalog.triggers[id], `${block.type} → ${id}`).toBeDefined() + } + } + } + expect(catalog.blocks.loop.graph.container).toBe('loop') + expect(catalog.blocks.parallel.graph.container).toBe('parallel') + }) + + it('keeps canonicalParamId pairs consistent with the registry', () => { + const problems: string[] = [] + for (const block of registryBlocks) { + const projected = catalog.blocks[block.type] + block.subBlocks.forEach((subBlock, index) => { + if (projected.subBlocks[index].canonicalParamId !== subBlock.canonicalParamId) { + problems.push(`${block.type}.${subBlock.id}: canonicalParamId changed`) + } + }) + const bySurface = new Map() + for (const subBlock of projected.subBlocks) { + const surface = subBlock.surface ?? 'action' + bySurface.set(surface, [...(bySurface.get(surface) ?? []), subBlock]) + } + for (const [surface, subBlocks] of bySurface) { + const groups = new Map() + for (const subBlock of subBlocks) { + if (!subBlock.canonicalParamId) continue + groups.set(subBlock.canonicalParamId, [ + ...(groups.get(subBlock.canonicalParamId) ?? []), + subBlock, + ]) + } + for (const [canonicalId, members] of groups) { + const foreign = subBlocks.find( + (subBlock) => subBlock.id === canonicalId && subBlock.canonicalParamId !== canonicalId + ) + if (foreign) + problems.push(`${block.type} ${surface}: ${canonicalId} is also a foreign id`) + const memberIds = new Set(members.map((member) => member.id)) + if (memberIds.size < 2) continue + const selectorMembers = members.filter((member) => + ['resource', 'picked', 'upload'].includes(member.valueKind) + ) + const basicIds = new Set( + selectorMembers + .filter((member) => member.mode !== 'advanced' && member.mode !== 'trigger-advanced') + .map((member) => member.id) + ) + if (selectorMembers.length > 0 && basicIds.size === 0) { + problems.push(`${block.type} ${surface}: ${canonicalId} has no basic selector member`) + } + } + } + } + expect(problems).toEqual([]) + }) + + it('reports every opaque condition, requirement and option list, and nothing else', () => { + const markers = new Set() + const visit = (owner: string, subBlocks: CatalogSubBlock[]) => { + for (const subBlock of subBlocks) { + if (isOpaque(subBlock.condition)) markers.add(siteKey(owner, subBlock.id, 'condition')) + if (isOpaque(subBlock.required)) markers.add(siteKey(owner, subBlock.id, 'required')) + if (isOpaque(subBlock.options)) markers.add(siteKey(owner, subBlock.id, 'options')) + } + } + for (const block of Object.values(catalog.blocks)) visit(block.type, block.subBlocks) + for (const trigger of Object.values(catalog.triggers)) { + visit(`trigger:${trigger.id}`, trigger.subBlocks) + } + const reported = new Set( + report.opaque + .filter((site) => site.field !== 'tool') + .map((site) => siteKey(site.block, site.subBlock, site.field)) + ) + expect([...reported].sort()).toEqual([...markers].sort()) + + const registryFunctionConditions = registryBlocks.reduce( + (count, block) => + count + + block.subBlocks.filter((subBlock) => typeof subBlock.condition === 'function').length, + 0 + ) + const opaqueConditions = report.opaque.filter( + (site) => site.field === 'condition' && !site.block.startsWith('trigger:') + ) + expect(opaqueConditions.length).toBeLessThanOrEqual(registryFunctionConditions) + }) + + it('pre-expands operation-only conditions for exactly the block operations', () => { + for (const block of registryBlocks) { + const operations = operationOptions(block).map((operation) => operation.id) + for (const subBlock of catalog.blocks[block.type].subBlocks) { + if (!subBlock.visibleFor) continue + expect(isOpaque(subBlock.condition), `${block.type}.${subBlock.id}`).toBe(true) + expect(Object.keys(subBlock.visibleFor)).toEqual(operations) + } + } + }) + + it('gives every operation a builder that pins it', () => { + const missing: string[] = [] + for (const block of registryBlocks) { + const pinned = new Set( + Object.values(catalog.builders) + .filter((builder) => builder.type === block.type && !builder.triggerMode) + .map((builder) => builder.operation) + ) + for (const operation of operationOptions(block)) { + if (!pinned.has(operation.id)) missing.push(`${block.type}.${operation.id}`) + } + } + expect(missing).toEqual([]) + for (const [path, builder] of Object.entries(catalog.builders)) { + expect(catalog.blocks[builder.type], path).toBeDefined() + } + }) + + it('is deterministic: rebuilt from fresh config objects in reverse order, the hash matches', () => { + const fresh: BlockConfig[] = [...registryBlocks].reverse().map((block) => ({ ...block })) + const again = buildBlockCatalog({ + blocks: fresh, + trigger: registryTrigger, + sdkNames: SDK_NAMES, + }) + expect(again.catalog.hash).toBe(catalog.hash) + expect(JSON.stringify(again.catalog)).toBe(JSON.stringify(catalog)) + }) + + it('marks stored-only types not addable without changing anything else about them', () => { + const [first] = registryBlocks.filter((block) => !block.hideFromToolbar) + const scoped = buildBlockCatalog({ + blocks: [first], + notAddable: new Set([first.type]), + trigger: registryTrigger, + sdkNames: SDK_NAMES, + }) + const { addable, ...rest } = scoped.catalog.blocks[first.type] + expect(addable).toBe(false) + const { addable: _ignored, ...original }: CatalogBlock = catalog.blocks[first.type] + expect(rest).toEqual(original) + expect(scoped.catalog.hash).not.toBe(catalog.hash) + }) + + it('passes through the v2 response schema unchanged, so no projected field is stripped', () => { + expect(v2BlockCatalogSchema.parse(catalog)).toEqual(catalog) + }) + + it('records the core shard size', () => { + const raw = Buffer.from(JSON.stringify(catalog)) + const gzipped = gzipSync(raw) + const reportPath = process.env.CATALOG_REPORT_PATH + if (reportPath) { + const byField: Record = {} + for (const site of report.opaque) { + const key = + site.field === 'condition' && site.expanded ? 'condition (expanded)' : site.field + byField[key] = (byField[key] ?? 0) + 1 + } + writeFileSync( + reportPath, + JSON.stringify( + { + hash: catalog.hash, + blocks: Object.keys(catalog.blocks).length, + triggers: Object.keys(catalog.triggers).length, + builders: Object.keys(catalog.builders).length, + subBlocks: Object.values(catalog.blocks).reduce((n, b) => n + b.subBlocks.length, 0), + coreShardBytes: raw.length, + coreShardGzipBytes: gzipped.length, + opaqueByField: byField, + opaque: report.opaque, + }, + null, + 2 + ) + ) + } + expect(gzipped.length).toBeGreaterThan(0) + }) +}) diff --git a/apps/sim/lib/workflows/code/catalog/build.ts b/apps/sim/lib/workflows/code/catalog/build.ts new file mode 100644 index 00000000000..6752a299dbc --- /dev/null +++ b/apps/sim/lib/workflows/code/catalog/build.ts @@ -0,0 +1,243 @@ +import { createHash } from 'node:crypto' +import { compareStrings } from '@sim/utils/string' +import { + type BlockCatalog, + type CatalogBlock, + type CatalogBuilder, + type CatalogTool, + type CatalogTrigger, + stableStringify, +} from '@sim/workflow-code' +import { + containerBlock, + type OpaqueSite, + type ProjectedBlock, + type ProjectionReport, + projectBlock, + projectCatalogTool, + projectTrigger, +} from '@/lib/workflows/code/catalog/project' +import { + operationOptions, + type SdkNamesFile, + toCamelIdentifier, +} from '@/lib/workflows/code/catalog/sdk-names' +import { CUSTOM_BLOCK_TYPE_PREFIX } from '@/blocks/custom/build-config' +import type { BlockConfig } from '@/blocks/types' +import type { ToolMetadata } from '@/tools/metadata' +import type { TriggerConfig } from '@/triggers/types' + +/** The SDK major this catalog serves (`// @sim-sdk 1`). */ +const CATALOG_SDK_MAJOR = 1 + +/** + * SHA-256 over the package's `stableStringify` (sorted keys, and a throw on anything that is not + * plain JSON, so a function leaking into the catalog fails the build instead of hashing). The + * digest uses `node:crypto` rather than the package's pure-JS `sha256Hex` because the core shard + * is megabytes; the bytes hashed are identical, so the two agree. + */ +function catalogHash(value: unknown): string { + return createHash('sha256').update(stableStringify(value)).digest('hex') +} + +/** One block's docs shard: the text and tool schemas the core shard leaves out. */ +interface CatalogDocsShard { + type: string + hash: string + description: string + tools: Record +} + +interface CatalogBuildInput { + /** Every block the catalog serves, in any order. */ + blocks: readonly BlockConfig[] + /** Types placed in the workflow but not addable by this caller (s4: per-workflow catalog). */ + notAddable?: ReadonlySet + /** `getTrigger()`-shaped lookup; `undefined` for an unknown id. */ + trigger: (triggerId: string) => TriggerConfig | undefined + sdkNames: SdkNamesFile + scope?: { organizationId: string } +} + +export interface CatalogBuildResult { + catalog: BlockCatalog + report: ProjectionReport + docs: (type: string) => CatalogDocsShard | undefined +} + +interface ToolMetadataSource { + metadata: (toolId: string) => ToolMetadata | undefined + outputs: (toolId: string) => Record | undefined +} + +interface MemoizedBlock { + projected: ProjectedBlock + opaque: OpaqueSite[] +} + +/** + * Projections of registry block objects, keyed by identity. A built-in block config is a + * process-lifetime constant and every thunk it holds reads only the deployment, so it is projected + * once per process; per-request custom-block configs are new objects and simply miss. + */ +const blockProjections = new WeakMap() +const triggerProjections = new WeakMap() + +interface MemoizedTrigger { + projected: CatalogTrigger + opaque: OpaqueSite[] +} + +function memoizedBlock(block: BlockConfig): MemoizedBlock { + const cached = blockProjections.get(block) + if (cached) return cached + const report: ProjectionReport = { opaque: [] } + const entry = { projected: projectBlock(block, report), opaque: report.opaque } + blockProjections.set(block, entry) + return entry +} + +function memoizedTrigger(trigger: TriggerConfig): MemoizedTrigger { + const cached = triggerProjections.get(trigger) + if (cached) return cached + const report: ProjectionReport = { opaque: [] } + const entry = { projected: projectTrigger(trigger, report), opaque: report.opaque } + triggerProjections.set(trigger, entry) + return entry +} + +function addBuilder( + builders: Record, + path: string, + builder: CatalogBuilder +): void { + if (!Object.hasOwn(builders, path)) builders[path] = builder +} + +/** + * Builder entries for one block from its frozen names: one per operation (`slack.sendMessage`), + * or the bare namespace for a block without an operation dropdown, plus one per trigger + * (`trigger.gmail.poller`) pinning `selectedTriggerId` where the block stores it. A block with no + * names entry gets none; the SDK's generic `block(type, …)` builder reaches it. + */ +function addBlockBuilders( + builders: Record, + block: BlockConfig, + namespace: string, + methods: Record | undefined, + triggerMethods: Record | undefined +): void { + const operations = operationOptions(block) + if (operations.length > 0 && methods) { + for (const operation of operations) { + const method = methods[operation.id] + if (method) + addBuilder(builders, `${namespace}.${method}`, { + type: block.type, + operation: operation.id, + }) + } + } else { + addBuilder(builders, namespace, { type: block.type }) + } + if (!block.triggers?.enabled || !triggerMethods) return + const pinsTrigger = block.subBlocks.some((subBlock) => subBlock.id === 'selectedTriggerId') + for (const triggerId of block.triggers.available) { + const method = triggerMethods[triggerId] + if (!method) continue + const builder: CatalogBuilder = { type: block.type, triggerMode: true } + if (pinsTrigger) builder.fixed = { selectedTriggerId: triggerId } + addBuilder(builders, `trigger.${namespace}.${method}`, builder) + } +} + +/** `custom_block_lead-scorer` → `custom.leadScorer`, suffixed on collision. */ +function customNamespace(type: string, taken: Set): string { + const base = toCamelIdentifier(type.slice(CUSTOM_BLOCK_TYPE_PREFIX.length)) || 'block' + const safe = /^[A-Za-z_$]/.test(base) ? base : `_${base}` + let candidate = `custom.${safe}` + for (let n = 2; taken.has(candidate); n++) candidate = `custom.${safe}${n}` + taken.add(candidate) + return candidate +} + +function sortedRecord(entries: Array<[string, T]>): Record { + return Object.fromEntries(entries.sort(([a], [b]) => compareStrings(a, b))) +} + +/** + * Builds the core shard of a `BlockCatalog` from registry definitions, plus a docs-shard reader. + * Deterministic: the same inputs give the same bytes and the same hash. + */ +export function buildBlockCatalog( + input: CatalogBuildInput, + tools?: ToolMetadataSource +): CatalogBuildResult { + const report: ProjectionReport = { opaque: [] } + const blocks: Array<[string, CatalogBlock]> = [] + const descriptions = new Map() + const builders: Record = {} + const triggerIds = new Set() + const customNamespaces = new Set() + + const ordered = [...input.blocks].sort((a, b) => compareStrings(a.type, b.type)) + for (const block of ordered) { + const { projected, opaque } = memoizedBlock(block) + report.opaque.push(...opaque) + const catalogBlock: CatalogBlock = input.notAddable?.has(block.type) + ? { ...projected.block, addable: false } + : projected.block + blocks.push([block.type, catalogBlock]) + descriptions.set(block.type, { + description: projected.description, + access: catalogBlock.tools.access, + }) + + const names = input.sdkNames.blocks[block.type] + if (names) { + addBlockBuilders(builders, block, names.namespace, names.methods, names.triggers) + } else if (block.type.startsWith(CUSTOM_BLOCK_TYPE_PREFIX)) { + addBuilder(builders, customNamespace(block.type, customNamespaces), { type: block.type }) + } + if (block.triggers?.enabled) for (const id of block.triggers.available) triggerIds.add(id) + } + + for (const type of ['loop', 'parallel'] as const) { + blocks.push([type, containerBlock(type)]) + addBuilder(builders, type, { type }) + } + + const triggers: Array<[string, CatalogTrigger]> = [] + for (const id of triggerIds) { + const config = input.trigger(id) + if (!config) continue + const { projected, opaque } = memoizedTrigger(config) + report.opaque.push(...opaque) + triggers.push([id, projected]) + } + + const core: Omit = { + catalogVersion: 1, + sdkMajor: CATALOG_SDK_MAJOR, + blocks: sortedRecord(blocks), + triggers: sortedRecord(triggers), + builders: sortedRecord(Object.entries(builders)), + } + if (input.scope) core.scope = { organizationId: input.scope.organizationId } + const catalog: BlockCatalog = { ...core, hash: catalogHash(core) } + + const docs = (type: string): CatalogDocsShard | undefined => { + const entry = descriptions.get(type) + if (!entry) return undefined + const shardTools: Record = {} + for (const toolId of entry.access) { + const metadata = tools?.metadata(toolId) + if (metadata) + shardTools[toolId] = projectCatalogTool(toolId, metadata, tools?.outputs(toolId)) + } + const body = { type, description: entry.description, tools: shardTools } + return { ...body, hash: catalogHash(body) } + } + + return { catalog, report, docs } +} diff --git a/apps/sim/lib/workflows/code/catalog/probe.ts b/apps/sim/lib/workflows/code/catalog/probe.ts new file mode 100644 index 00000000000..e6e2c1551e2 --- /dev/null +++ b/apps/sim/lib/workflows/code/catalog/probe.ts @@ -0,0 +1,65 @@ +/** + * Calls a registry thunk (a function-form condition, `required`, `options`, `value()` or + * `tools.config.tool`) against a value bag that records which keys the thunk reads. + * + * The catalog is data, so every thunk is either evaluated here or marked opaque. What decides it + * is the read set: a thunk that reads no block value depends only on the deployment (the agent's + * temperature gates read the model registry), so its result is the same for every workflow and is + * evaluated once. A thunk that reads values is opaque, and when it reads nothing but `operation` + * it can still be expanded per operation, which is the visibility pre-expansion the SDK codegen + * needs (s2 §2). + */ + +type ProbeOutcome = + | { ok: true; result: T; reads: ReadonlySet } + | { ok: false; reads: ReadonlySet } + +/** + * Builds a frozen-looking value bag whose reads are recorded. Symbol reads (`Symbol.toPrimitive`, + * iterator probes from spreading) are answered from the target and never recorded. + */ +function recordingValues( + values: Record, + reads: Set +): Record { + return new Proxy(values, { + get(target, key) { + if (typeof key === 'string') reads.add(key) + return Reflect.get(target, key) + }, + has(target, key) { + if (typeof key === 'string') reads.add(key) + return Reflect.has(target, key) + }, + ownKeys(target) { + reads.add('*') + return Reflect.ownKeys(target) + }, + }) +} + +/** + * Runs `thunk` with recorded `values`. A throw is an outcome, not an error: a thunk that + * dereferences a value it was not given cannot be evaluated without that value, which is exactly + * what "opaque" means. `'*'` in the read set means the thunk enumerated the bag. + */ +export function probeThunk( + thunk: (values: Record) => T, + values: Record = {} +): ProbeOutcome { + const reads = new Set() + try { + const result = thunk(recordingValues({ ...values }, reads)) + return { ok: true, result, reads } + } catch { + return { ok: false, reads } + } +} + +/** Whether a probe read nothing but the keys in `allowed`. */ +export function readsOnly(reads: ReadonlySet, allowed: ReadonlySet): boolean { + for (const key of reads) { + if (!allowed.has(key)) return false + } + return true +} diff --git a/apps/sim/lib/workflows/code/catalog/project.ts b/apps/sim/lib/workflows/code/catalog/project.ts new file mode 100644 index 00000000000..9adee3fcf41 --- /dev/null +++ b/apps/sim/lib/workflows/code/catalog/project.ts @@ -0,0 +1,558 @@ +import type { + CatalogBlock, + CatalogBlockGraph, + CatalogCondition, + CatalogLegacyId, + CatalogOption, + CatalogOutput, + CatalogSubBlock, + CatalogTool, + CatalogTrigger, + Json, + SubBlockConditionClause, +} from '@sim/workflow-code' +import type { OutputCondition, PrimitiveValueType } from '@sim/workflow-types/blocks' +import { isWorkflowAnnotationOnlyBlockType } from '@sim/workflow-types/workflow' +import { resolveSubBlockOptions } from '@/lib/catalog/projection/subblock' +import { probeThunk, readsOnly } from '@/lib/workflows/code/catalog/probe' +import { operationOptions } from '@/lib/workflows/code/catalog/sdk-names' +import { deriveValueShape } from '@/lib/workflows/code/catalog/value-kind' +import { + CANONICAL_ID_MIGRATIONS, + SUBBLOCK_ID_MIGRATIONS, +} from '@/lib/workflows/migrations/subblock-migrations' +import type { BlockConfig, SubBlockConfig } from '@/blocks/types' +import { + isHumanInTheLoopBlock, + isMetadataOnlyBlockType, + isSentinelBlockType, +} from '@/executor/constants' +import type { ToolMetadata } from '@/tools/metadata' +import type { TriggerConfig } from '@/triggers/types' + +/** + * Projects registry definitions into the catalog's pure-data shape (s1 §2, build-spec decision 14). + * + * Every thunk is classified with {@link probeThunk}: one that reads no block value depends only on + * the deployment and is evaluated here; one that reads values becomes `{ opaque: true }`. A + * condition that reads only `operation` is additionally pre-expanded into `visibleFor`, which is + * what the SDK codegen's visibility evaluator runs on (s2 §2). + */ + +/** Where a thunk could not be turned into data; the registry-wide sweep counts these. */ +export interface OpaqueSite { + block: string + subBlock: string + surface: 'action' | 'trigger' + field: 'condition' | 'required' | 'options' | 'tool' + /** For a condition: whether `visibleFor` pre-expanded it per operation. */ + expanded?: boolean +} + +export interface ProjectionReport { + opaque: OpaqueSite[] +} + +const OPAQUE = { opaque: true } as const + +const PRIMITIVE_TYPES = new Set([ + 'string', + 'number', + 'boolean', + 'json', + 'array', + 'file', + 'file[]', + 'any', +]) + +const OPERATION_ONLY = new Set(['operation']) + +type RegistryClause = Exclude, (...args: never) => unknown> + +function copyClause(clause: RegistryClause): SubBlockConditionClause { + const copy: SubBlockConditionClause = { + field: clause.field, + value: Array.isArray(clause.value) ? [...clause.value] : clause.value, + } + if (clause.not !== undefined) copy.not = clause.not + if (clause.and) { + copy.and = { + field: clause.and.field, + value: Array.isArray(clause.and.value) ? [...clause.and.value] : clause.and.value, + } + if (clause.and.not !== undefined) copy.and.not = clause.and.not + } + return copy +} + +/** + * Whether a clause is decided false by the operation alone. A clause on another field (Slack's + * `destinationType`) is undecided, which counts as visible: the field can apply to that operation. + */ +function excludedByOperation(clause: SubBlockConditionClause, operation: string): boolean { + const decided = (field: string, value: unknown, not: boolean | undefined): boolean | null => { + if (field !== 'operation') return null + const matches = Array.isArray(value) ? value.includes(operation) : value === operation + return not ? !matches : matches + } + const main = decided(clause.field, clause.value, clause.not) + const and = clause.and ? decided(clause.and.field, clause.and.value, clause.and.not) : null + return main === false || and === false +} + +type ConditionThunk = (values: Record) => RegistryClause + +function projectConditionThunk( + thunk: ConditionThunk, + operations: readonly string[] +): { condition: CatalogCondition; visibleFor?: Record } { + const probe = probeThunk(thunk) + if (probe.ok && probe.reads.size === 0) return { condition: copyClause(probe.result) } + if (operations.length === 0 || !readsOnly(probe.reads, OPERATION_ONLY)) { + return { condition: OPAQUE } + } + const visibleFor: Record = {} + for (const operation of operations) { + const perOperation = probeThunk(thunk, { operation }) + if (!perOperation.ok || !readsOnly(perOperation.reads, OPERATION_ONLY)) { + return { condition: OPAQUE } + } + visibleFor[operation] = !excludedByOperation(copyClause(perOperation.result), operation) + } + return { condition: OPAQUE, visibleFor } +} + +function projectRequired( + required: NonNullable +): boolean | CatalogCondition { + if (typeof required === 'boolean') return required + if (typeof required !== 'function') return copyClause(required) + const probe = probeThunk(required as ConditionThunk) + return probe.ok && probe.reads.size === 0 ? copyClause(probe.result) : OPAQUE +} + +function copyOptions( + options: ReadonlyArray<{ id: unknown; label?: unknown }> | undefined +): CatalogOption[] { + const projected: CatalogOption[] = [] + for (const option of options ?? []) { + if (option?.id === undefined || option.id === null) continue + const id = String(option.id) + projected.push({ id, label: typeof option.label === 'string' ? option.label : id }) + } + return projected +} + +type OptionsThunk = (params?: { values: Record }) => unknown + +/** + * Static options are copied. A `selectorKey` field fetches its list per workspace, so it is + * `dynamic`. An options function that ignores block values is a deployment-shaped list (the model + * pickers) and is evaluated once through the shared resolver, which substitutes the code-defined + * model list for the browser store; one that reads values stays opaque. + */ +function projectOptions(subBlock: SubBlockConfig): CatalogSubBlock['options'] { + if (subBlock.selectorKey) return { dynamic: true } + if (subBlock.options === undefined) return undefined + if (typeof subBlock.options !== 'function') return copyOptions(subBlock.options) + const optionsThunk = subBlock.options as OptionsThunk + const probe = probeThunk((values) => optionsThunk({ values })) + if (probe.reads.size > 0) return OPAQUE + const resolved = resolveSubBlockOptions(subBlock) + return resolved === undefined ? OPAQUE : copyOptions(resolved) +} + +function isJson(value: unknown): value is Json { + if (value === null) return true + switch (typeof value) { + case 'string': + case 'boolean': + return true + case 'number': + return Number.isFinite(value) + case 'object': + return Array.isArray(value) + ? value.every(isJson) + : Object.values(value as Record).every(isJson) + default: + return false + } +} + +/** + * A `value()` thunk is a constant when it reads no param and returns the same value twice (some + * thunks mint ids, which must never be frozen into the catalog); anything else is `computed`. + */ +function projectValueDefault( + thunk: NonNullable +): CatalogSubBlock['valueDefault'] { + const first = probeThunk(thunk) + if (!first.ok || first.reads.size > 0) return { computed: true } + if (first.result === undefined) return undefined + const second = probeThunk(thunk) + if (!second.ok || second.result !== first.result || !isJson(first.result)) { + return { computed: true } + } + return { constant: first.result } +} + +function subBlockSurface(subBlock: SubBlockConfig): 'action' | 'trigger' { + return subBlock.mode === 'trigger' || subBlock.mode === 'trigger-advanced' ? 'trigger' : 'action' +} + +interface SubBlockContext { + blockType: string + operations: readonly string[] + /** Whether this block has trigger-surface subBlocks, so every subBlock records its surface. */ + tagSurface: boolean + report: ProjectionReport +} + +function assign(target: T, key: K, value: T[K] | null): void { + if (value !== undefined && value !== null) target[key] = value +} + +function projectSubBlock(subBlock: SubBlockConfig, ctx: SubBlockContext): CatalogSubBlock { + const shape = deriveValueShape(subBlock) + const surface = subBlockSurface(subBlock) + const projected: CatalogSubBlock = { id: subBlock.id, type: subBlock.type, ...shape } + const site = (field: OpaqueSite['field'], expanded?: boolean) => { + const entry: OpaqueSite = { block: ctx.blockType, subBlock: subBlock.id, surface, field } + if (expanded !== undefined) entry.expanded = expanded + ctx.report.opaque.push(entry) + } + + assign(projected, 'title', subBlock.title) + assign(projected, 'mode', subBlock.mode) + assign(projected, 'canonicalParamId', subBlock.canonicalParamId) + if (ctx.tagSurface) projected.surface = surface + + if (subBlock.condition !== undefined) { + if (typeof subBlock.condition === 'function') { + const { condition, visibleFor } = projectConditionThunk( + subBlock.condition as ConditionThunk, + ctx.operations + ) + projected.condition = condition + if (visibleFor) projected.visibleFor = visibleFor + if ('opaque' in condition) site('condition', visibleFor !== undefined) + } else { + projected.condition = copyClause(subBlock.condition) + } + } + if (subBlock.required !== undefined) { + const required = projectRequired(subBlock.required) + projected.required = required + if (typeof required === 'object' && 'opaque' in required) site('required') + } + if (subBlock.dependsOn) { + projected.dependsOn = Array.isArray(subBlock.dependsOn) + ? { all: [...subBlock.dependsOn], any: [] } + : { all: [...(subBlock.dependsOn.all ?? [])], any: [...(subBlock.dependsOn.any ?? [])] } + } + const writable = shape.valueKind !== 'none' + if (writable && subBlock.defaultValue !== undefined && isJson(subBlock.defaultValue)) { + projected.defaultValue = structuredClone(subBlock.defaultValue) + } + if (writable && typeof subBlock.value === 'function') { + assign(projected, 'valueDefault', projectValueDefault(subBlock.value)) + } + const options = projectOptions(subBlock) + if (options !== undefined) { + projected.options = options + if (!Array.isArray(options) && 'opaque' in options) site('options') + } + + assign(projected, 'hidden', subBlock.hidden) + assign(projected, 'readOnly', subBlock.readOnly) + assign(projected, 'password', subBlock.password) + assign(projected, 'hideFromCopilot', subBlock.hideFromCopilot) + assign(projected, 'context', subBlock.context) + assign(projected, 'paramVisibility', subBlock.paramVisibility) + assign(projected, 'emptyIsValid', subBlock.emptyIsValid) + assign(projected, 'language', subBlock.language) + assign(projected, 'multiple', subBlock.multiple) + assign(projected, 'min', subBlock.min) + assign(projected, 'max', subBlock.max) + assign(projected, 'step', subBlock.step) + assign(projected, 'integer', subBlock.integer) + if (subBlock.columns) projected.columns = [...subBlock.columns] + assign(projected, 'selectorKey', subBlock.selectorKey) + assign(projected, 'serviceId', subBlock.serviceId) + return projected +} + +function primitiveType(type: unknown): PrimitiveValueType { + if (type === 'object') return 'json' + return typeof type === 'string' && PRIMITIVE_TYPES.has(type) + ? (type as PrimitiveValueType) + : 'any' +} + +const OUTPUT_META_KEYS = new Set([ + 'type', + 'description', + 'condition', + 'hiddenFromDisplay', + 'nullable', + 'properties', + 'items', +]) + +/** + * An output condition's `and.value` may list `undefined` for "unset" (google_forms). JSON has no + * `undefined`, so it is written as `null`; a catalog consumer reads a listed `null` as "unset or + * null", which is what the editor's `evaluateOutputCondition` matches for those entries. + */ +function copyOutputCondition(condition: OutputCondition): OutputCondition { + const copy = structuredClone(condition) + if (copy.and && Array.isArray(copy.and.value)) { + copy.and.value = copy.and.value.map((value) => (value === undefined ? null : value)) + } + return copy +} + +function projectOutputRecord(record: Record): Record { + const projected: Record = {} + for (const [key, definition] of Object.entries(record)) { + const output = projectOutput(definition) + if (output) projected[key] = output + } + return projected +} + +/** + * One output definition, recursively. Block outputs are `OutputFieldDefinition`s (a type name or + * `{ type, description, condition }`), possibly nesting plain records; trigger outputs are the + * open, self-nesting `TriggerOutput`, where a key that is not a meta key is a nested output. + */ +function projectOutput(definition: unknown): CatalogOutput | undefined { + if (typeof definition === 'string') return { type: primitiveType(definition) } + if (!definition || typeof definition !== 'object' || Array.isArray(definition)) return undefined + const record = definition as Record + const typed = typeof record.type === 'string' + const output: CatalogOutput = { type: typed ? primitiveType(record.type) : 'json' } + if (typed && typeof record.description === 'string') output.description = record.description + if (typed && record.condition && typeof record.condition === 'object') { + output.condition = copyOutputCondition(record.condition as OutputCondition) + } + if (typed && record.hiddenFromDisplay === true) output.hiddenFromDisplay = true + + const nested: Record = {} + if (record.properties && typeof record.properties === 'object') { + Object.assign(nested, record.properties) + } + for (const [key, value] of Object.entries(record)) { + if (typed && OUTPUT_META_KEYS.has(key)) continue + if (value && typeof value === 'object') nested[key] = value + } + const properties = projectOutputRecord(nested) + if (Object.keys(properties).length > 0) output.properties = properties + if (typed && record.items !== undefined) { + const items = projectOutput(record.items) + if (items) output.items = items + } + return output +} + +function projectTools( + block: BlockConfig, + operations: readonly string[], + report: ProjectionReport +): CatalogBlock['tools'] { + const access = [...block.tools.access] + const selectTool = block.tools.config?.tool + if (!selectTool) return { access, selector: 'single' } + const accessSet = new Set(access) + const perOperation = + operations.length > 0 && + operations.every((operation) => { + const probe = probeThunk(selectTool, { operation }) + return ( + probe.ok && + readsOnly(probe.reads, OPERATION_ONLY) && + typeof probe.result === 'string' && + accessSet.has(probe.result) + ) + }) + if (perOperation) return { access, selector: 'operation' } + report.opaque.push({ block: block.type, subBlock: '', surface: 'action', field: 'tool' }) + return { access, selector: 'opaque' } +} + +function projectGraph(block: BlockConfig): CatalogBlockGraph { + const annotationOnly = isWorkflowAnnotationOnlyBlockType(block.type) + const graph: CatalogBlockGraph = { + canBeTarget: block.category !== 'triggers' && !annotationOnly, + errorPort: + block.category !== 'triggers' && + !annotationOnly && + !isSentinelBlockType(block.type) && + !isMetadataOnlyBlockType(block.type), + container: null, + annotationOnly, + } + const branchSubBlock = block.subBlocks.find( + (subBlock) => subBlock.type === 'condition-input' || subBlock.type === 'router-input' + ) + if (branchSubBlock) { + graph.branches = { + subBlockId: branchSubBlock.id, + kind: branchSubBlock.type === 'condition-input' ? 'condition' : 'router', + } + } + return graph +} + +/** + * Outputs derived from params at run time, mirroring `getEffectiveBlockOutputs`: the agent's + * `responseFormat`, the human-in-the-loop resume form, and any block whose Start-style + * `input-format` field adds outputs. + */ +function projectDynamicOutputs(block: BlockConfig): CatalogBlock['dynamicOutputs'] { + if (block.type === 'agent') return { source: 'responseFormat', param: 'responseFormat' } + const inputFormat = block.subBlocks.find( + (subBlock) => subBlock.type === 'input-format' && subBlockSurface(subBlock) === 'action' + ) + if (!inputFormat) return undefined + return isHumanInTheLoopBlock(block.type) + ? { source: 'humanForm', param: inputFormat.id } + : { source: 'inputFormat', param: inputFormat.id } +} + +function projectLegacyIds(type: string): CatalogLegacyId[] | undefined { + const migrations = SUBBLOCK_ID_MIGRATIONS[type] + if (!migrations?.length) return undefined + return migrations.map((migration) => { + const legacy: CatalogLegacyId = { + from: migration.from, + to: migration.to.startsWith('_removed_') ? null : migration.to, + } + if (migration.whenOperation) legacy.whenOperation = [...migration.whenOperation] + if (migration.whenValue) legacy.conditional = true + return legacy + }) +} + +export interface ProjectedBlock { + block: CatalogBlock + /** Docs-shard text, kept out of the core shard. */ + description: string +} + +/** Projects one registry block (built-in or custom) into the core-shard shape. */ +export function projectBlock(block: BlockConfig, report: ProjectionReport): ProjectedBlock { + const operations = operationOptions(block).map((operation) => operation.id) + const tagSurface = block.subBlocks.some((subBlock) => subBlockSurface(subBlock) === 'trigger') + const ctx: SubBlockContext = { blockType: block.type, operations, tagSurface, report } + + const projected: CatalogBlock = { + type: block.type, + name: block.name, + category: block.category, + subBlocks: block.subBlocks.map((subBlock) => projectSubBlock(subBlock, ctx)), + tools: projectTools(block, operations, report), + inputs: Object.fromEntries( + Object.entries(block.inputs ?? {}).map(([key, input]) => [ + key, + input.schema && isJson(input.schema) + ? { type: input.type, schema: structuredClone(input.schema) as Json } + : { type: input.type }, + ]) + ), + outputs: projectOutputRecord(block.outputs ?? {}), + graph: projectGraph(block), + } + + const lifecycle: NonNullable = {} + if (block.hideFromToolbar) lifecycle.hidden = true + if (block.preview) lifecycle.preview = true + if (block.sunset) { + lifecycle.sunset = block.sunset.replacedBy + ? { status: block.sunset.status, replacedBy: block.sunset.replacedBy } + : { status: block.sunset.status } + } + if (Object.keys(lifecycle).length > 0) projected.lifecycle = lifecycle + if (block.hideFromToolbar) projected.addable = false + assign(projected, 'triggerAllowed', block.triggerAllowed) + if (block.triggers) { + projected.triggers = { + enabled: block.triggers.enabled, + available: [...block.triggers.available], + } + } + assign(projected, 'singleInstance', block.singleInstance) + const dynamicOutputs = projectDynamicOutputs(block) + if (dynamicOutputs) projected.dynamicOutputs = dynamicOutputs + const legacyIds = projectLegacyIds(block.type) + if (legacyIds) projected.legacyIds = legacyIds + const legacyCanonicalIds = CANONICAL_ID_MIGRATIONS[block.type] + if (legacyCanonicalIds?.length) { + projected.legacyCanonicalIds = legacyCanonicalIds.map(({ from, to }) => ({ from, to })) + } + if (block.sourceWorkflowId !== undefined) { + projected.custom = { sourceWorkflowId: block.sourceWorkflowId } + } + return { block: projected, description: block.description } +} + +/** + * The two subflow containers. They live outside the block registry (the editor stores their + * config in block `data`, which canonicalize reads into `LoopSpec` / `ParallelSpec`), so the + * catalog declares them here to give compile one vocabulary for every placeable type. + */ +export function containerBlock(type: 'loop' | 'parallel'): CatalogBlock { + return { + type, + name: type === 'loop' ? 'Loop' : 'Parallel', + category: 'blocks', + subBlocks: [], + tools: { access: [], selector: 'single' }, + inputs: {}, + outputs: { results: { type: 'array' } }, + graph: { canBeTarget: true, errorPort: false, container: type, annotationOnly: false }, + } +} + +/** Projects one trigger as `getTrigger()` returns it (namespaced display subBlocks). */ +export function projectTrigger(trigger: TriggerConfig, report: ProjectionReport): CatalogTrigger { + const ctx: SubBlockContext = { + blockType: `trigger:${trigger.id}`, + operations: [], + tagSurface: false, + report, + } + const projected: CatalogTrigger = { + id: trigger.id, + provider: trigger.provider, + name: trigger.name, + subBlocks: trigger.subBlocks.map((subBlock) => projectSubBlock(subBlock, ctx)), + outputs: projectOutputRecord(trigger.outputs ?? {}), + } + if (trigger.polling) projected.polling = true + if (trigger.webhook) projected.webhook = true + return projected +} + +/** Docs-shard projection of one tool from its generated metadata (never the executable registry). */ +export function projectCatalogTool( + id: string, + metadata: ToolMetadata, + outputs: Record | undefined +): CatalogTool { + const params: CatalogTool['params'] = {} + for (const [name, param] of Object.entries(metadata.params ?? {})) { + const entry: CatalogTool['params'][string] = { + type: String(param.type ?? 'any'), + visibility: param.visibility ?? 'user-or-llm', + } + if (param.required !== undefined) entry.required = param.required + if (param.default !== undefined && isJson(param.default)) { + entry.default = structuredClone(param.default) + } + if (typeof param.description === 'string') entry.description = param.description + params[name] = entry + } + return { id, params, outputs: projectOutputRecord(outputs ?? {}) } +} diff --git a/apps/sim/lib/workflows/code/catalog/value-kind.ts b/apps/sim/lib/workflows/code/catalog/value-kind.ts new file mode 100644 index 00000000000..2ccb7fa76a3 --- /dev/null +++ b/apps/sim/lib/workflows/code/catalog/value-kind.ts @@ -0,0 +1,108 @@ +import type { + CatalogStructuredKind, + CatalogValueKind, + ParamStorage, + ResourceKind, +} from '@sim/workflow-code' +import type { SubBlockConfig, SubBlockType } from '@/blocks/types' + +/** + * How a subBlock's value is written in source, checked, and preferably stored (build-spec + * decision 14; s2 §2 mapping table; s1 quirk 9 for the JSON-in-string encodings). + */ +interface SubBlockValueShape { + valueKind: CatalogValueKind + resourceKind?: ResourceKind + storage: ParamStorage + structured?: CatalogStructuredKind +} + +interface TypeRule { + valueKind: CatalogValueKind + resourceKind?: ResourceKind + storage?: ParamStorage + structured?: CatalogStructuredKind +} + +/** + * One rule per subBlock type. `Record` makes a new registry type a type error + * here rather than a silent `string`. + */ +const TYPE_RULES: Record = { + 'short-input': { valueKind: 'string' }, + 'long-input': { valueKind: 'string' }, + 'time-input': { valueKind: 'string' }, + dropdown: { valueKind: 'string' }, + combobox: { valueKind: 'string' }, + slider: { valueKind: 'number' }, + switch: { valueKind: 'boolean' }, + table: { valueKind: 'array', structured: 'tableRows' }, + code: { valueKind: 'code' }, + 'tool-input': { valueKind: 'tools', structured: 'tools' }, + 'skill-input': { valueKind: 'array' }, + 'checkbox-list': { valueKind: 'array' }, + 'grouped-checkbox-list': { valueKind: 'array' }, + 'condition-input': { valueKind: 'branches', storage: 'json-string', structured: 'branches' }, + 'router-input': { valueKind: 'branches', storage: 'json-string', structured: 'branches' }, + 'eval-input': { valueKind: 'array' }, + 'oauth-input': { valueKind: 'resource', resourceKind: 'credential' }, + 'webhook-config': { valueKind: 'none' }, + 'schedule-info': { valueKind: 'none' }, + 'file-selector': { valueKind: 'picked' }, + 'sheet-selector': { valueKind: 'picked' }, + 'project-selector': { valueKind: 'picked' }, + 'channel-selector': { valueKind: 'picked' }, + 'user-selector': { valueKind: 'picked' }, + 'folder-selector': { valueKind: 'picked' }, + 'document-selector': { valueKind: 'picked' }, + 'column-selector': { valueKind: 'picked' }, + 'mcp-tool-selector': { valueKind: 'picked' }, + 'mcp-server-selector': { valueKind: 'resource', resourceKind: 'mcp-server' }, + 'knowledge-base-selector': { valueKind: 'resource', resourceKind: 'knowledge-base' }, + 'table-selector': { valueKind: 'resource', resourceKind: 'table' }, + 'workflow-selector': { valueKind: 'resource', resourceKind: 'workflow' }, + 'knowledge-tag-filters': { valueKind: 'array', storage: 'json-string' }, + 'document-tag-entry': { valueKind: 'array', storage: 'json-string' }, + 'mcp-dynamic-args': { valueKind: 'object' }, + 'input-format': { valueKind: 'array', structured: 'inputFormat' }, + 'response-format': { valueKind: 'json' }, + 'filter-builder': { valueKind: 'json' }, + 'sort-builder': { valueKind: 'json' }, + 'file-upload': { valueKind: 'upload' }, + 'input-mapping': { valueKind: 'object' }, + 'workflow-input-mapper': { valueKind: 'object' }, + 'variables-input': { valueKind: 'array', structured: 'variables' }, + 'messages-input': { valueKind: 'array' }, + 'workflow-output-selector': { valueKind: 'none' }, + text: { valueKind: 'none' }, + 'model-fallback-list': { valueKind: 'array' }, + modal: { valueKind: 'none' }, +} + +/** + * Derives a subBlock's value shape from its type plus the few config flags that change it: + * a JSON-language code field holds JSON, a multi-select dropdown holds an array, a `readOnly` + * field is display-only (`isDisplayOnlySubBlock` in triggers/index.ts), and a folder + * selector bound to workspace files (`resourceType: 'file'`) points at a Sim file folder rather than a provider id. + */ +export function deriveValueShape(subBlock: SubBlockConfig): SubBlockValueShape { + const rule = TYPE_RULES[subBlock.type] ?? { valueKind: 'json' } + let valueKind = rule.valueKind + let resourceKind = rule.resourceKind + + if (subBlock.type === 'code' && subBlock.language === 'json') valueKind = 'json' + if ((subBlock.type === 'dropdown' || subBlock.type === 'combobox') && subBlock.multiSelect) { + valueKind = 'array' + } + if (subBlock.type === 'folder-selector' && subBlock.resourceType === 'file') { + valueKind = 'resource' + resourceKind = 'file-folder' + } + + if (subBlock.readOnly === true) valueKind = 'none' + + const shape: SubBlockValueShape = { valueKind, storage: rule.storage ?? 'native' } + if (valueKind === 'resource' && resourceKind) shape.resourceKind = resourceKind + if (rule.structured) shape.structured = rule.structured + return shape +} From 7083d40be6a8f503b68cf35ae2550be67a597958 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:18:21 -0800 Subject: [PATCH 030/428] feat(api): v2 block catalog route with etag revalidation behind workflow-code GET /api/v2/workspaces/{workspaceId}/block-catalog returns the caller's workspace catalog, or with ?workflowId= the per-workflow compile catalog (stored types the caller cannot add are marked addable: false). The response carries ETag = hash and a matching If-None-Match answers 304; the v2 JSON route builder gains an opt-in entityTag for that. Gated by the new global workflow-code feature flag. Regenerates the route table, OpenAPI, CLI and MCP artifacts. --- apps/docs/content/docs/cli/reference.mdx | 31 + apps/docs/content/docs/cli/workspaces.mdx | 31 + apps/docs/openapi-v2-resources.json | 1686 +++++++++++++++++ .../[workspaceId]/block-catalog/route.test.ts | 142 ++ .../[workspaceId]/block-catalog/route.ts | 27 + .../sim/lib/api/contracts/v2/block-catalog.ts | 370 ++++ .../api/contracts/v2/openapi/block-catalog.ts | 79 + .../lib/api/contracts/v2/openapi/resources.ts | 2 + .../lib/api/mcp/generated/v2-operations.ts | 11 + .../lib/api/server/routes/v2-json-route.ts | 29 +- .../server/routes/v2-route-table.generated.ts | 4 + apps/sim/lib/core/config/env.ts | 1 + apps/sim/lib/core/config/feature-flags.ts | 5 + .../lib/workflows/code/catalog/operations.ts | 28 + .../code/catalog/read-block-catalog.ts | 73 + .../code/catalog/workspace-catalog.ts | 56 + apps/sim/lib/workflows/code/feature-flag.ts | 12 + packages/sim-cli/src/generated/v2-api.ts | 338 ++++ 18 files changed, 2924 insertions(+), 1 deletion(-) create mode 100644 apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.test.ts create mode 100644 apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.ts create mode 100644 apps/sim/lib/api/contracts/v2/block-catalog.ts create mode 100644 apps/sim/lib/api/contracts/v2/openapi/block-catalog.ts create mode 100644 apps/sim/lib/workflows/code/catalog/operations.ts create mode 100644 apps/sim/lib/workflows/code/catalog/read-block-catalog.ts create mode 100644 apps/sim/lib/workflows/code/catalog/workspace-catalog.ts create mode 100644 apps/sim/lib/workflows/code/feature-flag.ts diff --git a/apps/docs/content/docs/cli/reference.mdx b/apps/docs/content/docs/cli/reference.mdx index f4db68fe284..7c6b39511d1 100644 --- a/apps/docs/content/docs/cli/reference.mdx +++ b/apps/docs/content/docs/cli/reference.mdx @@ -8841,6 +8841,37 @@ sim workspaces fork [options] API request and response schemas: [forkWorkspace](/api-reference/workspace-sync/forkWorkspace). +### sim workspaces block-catalog list + +Get block catalog + +```bash +sim workspaces block-catalog list [options] +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `workspaceId` | Yes | Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what the catalog contains. | + + + +**Options** + + + +| Option | Required | Description | +| --- | --- | --- | +| `--workflow-id ` | No | Return the compile catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`. | +| `--if-none-match ` | No | A catalog `hash` (quoted, as sent in `ETag`) the caller already holds. | + + + +API request and response schemas: [getBlockCatalog](/api-reference/catalog/getBlockCatalog). + ### sim workspaces get Get workspace diff --git a/apps/docs/content/docs/cli/workspaces.mdx b/apps/docs/content/docs/cli/workspaces.mdx index b3d5f9b4306..63765c1f2a6 100644 --- a/apps/docs/content/docs/cli/workspaces.mdx +++ b/apps/docs/content/docs/cli/workspaces.mdx @@ -686,6 +686,37 @@ sim workspaces unlink [options] API request and response schemas: [unlinkWorkspaceFork](/api-reference/workspace-sync/unlinkWorkspaceFork). +## Other commands + +### Get block catalog + +```bash +sim workspaces block-catalog list [options] +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `workspaceId` | Yes | Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what the catalog contains. | + + + +**Options** + + + +| Option | Required | Description | +| --- | --- | --- | +| `--workflow-id ` | No | Return the compile catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`. | +| `--if-none-match ` | No | A catalog `hash` (quoted, as sent in `ETag`) the caller already holds. | + + + +API request and response schemas: [getBlockCatalog](/api-reference/catalog/getBlockCatalog). + ## Related docs - [Workspace sync](/cli/workflow-sync) diff --git a/apps/docs/openapi-v2-resources.json b/apps/docs/openapi-v2-resources.json index 5350eac6cd8..48be313cbe3 100644 --- a/apps/docs/openapi-v2-resources.json +++ b/apps/docs/openapi-v2-resources.json @@ -14749,6 +14749,161 @@ } } } + }, + "/api/v2/workspaces/{workspaceId}/block-catalog": { + "get": { + "operationId": "getBlockCatalog", + "summary": "Get block catalog", + "description": "Get the block catalog that workflow source is compiled and type-checked against: every block type the caller may place in the workspace, with its fields, visibility conditions, outputs, triggers, and SDK builder names. Pass `workflowId` to add the block types already placed in that workflow. The response carries the catalog `hash` as an `ETag`; send it back in `If-None-Match` to receive `304 Not Modified` with no body when the catalog is unchanged. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.", + "x-sim-operation": "workflows.code.catalog.read", + "x-oauth-scope": "api:read", + "tags": ["Catalog"], + "security": [ + { + "apiKey": [] + }, + { + "oauthBearer": ["api:read"] + } + ], + "parameters": [ + { + "name": "workspaceId", + "in": "path", + "required": true, + "description": "Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what the catalog contains.", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 128, + "description": "Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what the catalog contains." + } + }, + { + "name": "workflowId", + "in": "query", + "required": false, + "description": "Return the compile catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`.", + "schema": { + "description": "Return the compile catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`.", + "type": "string", + "minLength": 1 + } + }, + { + "name": "if-none-match", + "in": "header", + "required": false, + "description": "A catalog `hash` (quoted, as sent in `ETag`) the caller already holds.", + "schema": { + "description": "A catalog `hash` (quoted, as sent in `ETag`) the caller already holds.", + "type": "string", + "maxLength": 1024 + } + } + ], + "responses": { + "200": { + "description": "The block catalog.", + "headers": { + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetBlockCatalogResponse" + }, + "examples": { + "example1": { + "summary": "Response example 1", + "value": { + "data": { + "catalogVersion": 1, + "hash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a", + "sdkMajor": 1, + "blocks": { + "slack_v2": { + "type": "slack_v2", + "name": "Slack", + "category": "tools", + "subBlocks": [ + { + "id": "operation", + "type": "dropdown", + "valueKind": "string", + "storage": "native", + "options": [ + { + "id": "send", + "label": "Send Message" + } + ] + } + ], + "tools": { + "access": ["slack_message"], + "selector": "operation" + }, + "inputs": {}, + "outputs": { + "ts": { + "type": "string", + "description": "Message timestamp" + } + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false + } + } + }, + "triggers": {}, + "builders": { + "slack.sendMessage": { + "type": "slack_v2", + "operation": "send" + } + } + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "429": { + "$ref": "#/components/responses/RateLimited" + }, + "500": { + "$ref": "#/components/responses/InternalError" + }, + "503": { + "$ref": "#/components/responses/ServiceUnavailable" + } + } + } } }, "components": { @@ -29517,6 +29672,1537 @@ "allowRequests": false } ] + }, + "GetBlockCatalogResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "catalogVersion": { + "type": "number", + "const": 1, + "description": "Catalog format version." + }, + "hash": { + "type": "string", + "description": "SHA-256 of the catalog content; the response `ETag`." + }, + "sdkMajor": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Workflow SDK major version this catalog serves." + }, + "blocks": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Block type id." + }, + "name": { + "type": "string", + "description": "Display name." + }, + "category": { + "type": "string", + "enum": ["blocks", "tools", "triggers"], + "description": "Block category." + }, + "addable": { + "description": "Present when new blocks of this type are refused; existing ones still compile.", + "type": "boolean", + "const": false + }, + "lifecycle": { + "description": "Lifecycle flags.", + "type": "object", + "properties": { + "hidden": { + "description": "Hidden from the toolbar.", + "type": "boolean", + "const": true + }, + "preview": { + "description": "Unreleased preview block.", + "type": "boolean", + "const": true + }, + "sunset": { + "description": "Post-GA lifecycle state.", + "type": "object", + "properties": { + "status": { + "type": "string", + "enum": ["legacy", "deprecated"], + "description": "Lifecycle state." + }, + "replacedBy": { + "description": "Successor block type.", + "type": "string" + } + }, + "required": ["status"], + "additionalProperties": false + } + }, + "additionalProperties": false + }, + "triggerAllowed": { + "description": "Whether the block can start a workflow.", + "type": "boolean" + }, + "triggers": { + "description": "Trigger mode support.", + "type": "object", + "properties": { + "enabled": { + "type": "boolean", + "description": "Whether trigger mode is available." + }, + "available": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Trigger ids the block supports." + } + }, + "required": ["enabled", "available"], + "additionalProperties": false + }, + "singleInstance": { + "description": "At most one per workflow.", + "type": "boolean" + }, + "subBlocks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Field id; the param name unless the field is in a basic/advanced pair." + }, + "type": { + "type": "string", + "description": "Editor control type, e.g. `short-input`." + }, + "title": { + "description": "Display title.", + "type": "string" + }, + "mode": { + "description": "Which editor mode shows the field.", + "type": "string", + "enum": ["basic", "advanced", "both", "trigger", "trigger-advanced"] + }, + "canonicalParamId": { + "description": "Shared param name of a basic/advanced pair.", + "type": "string" + }, + "surface": { + "description": "Whether this declaration belongs to action or trigger mode.", + "type": "string", + "enum": ["action", "trigger"] + }, + "condition": { + "anyOf": [ + { + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Sibling field id whose value decides the condition." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ], + "description": "Value, or set of accepted values, the named field must hold." + }, + "not": { + "description": "Invert the match.", + "type": "boolean" + }, + "and": { + "description": "A second clause that must hold as well.", + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Second field id." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ], + "description": "Value, or set of accepted values, the named field must hold." + }, + "not": { + "description": "Invert the second match.", + "type": "boolean" + } + }, + "required": ["field"], + "additionalProperties": false + } + }, + "required": ["field", "value"], + "additionalProperties": false, + "description": "Holds when `field` holds `value`." + }, + { + "type": "object", + "properties": { + "opaque": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["opaque"], + "additionalProperties": false, + "description": "A function the catalog could not evaluate to data." + } + ], + "description": "A condition clause, or `{ opaque: true }` (treat as possibly holding)." + }, + "visibleFor": { + "description": "Per operation id: whether an opaque condition can show this field.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "boolean" + } + }, + "required": { + "description": "Whether a value is required, or the condition under which it is.", + "anyOf": [ + { + "type": "boolean" + }, + { + "anyOf": [ + { + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Sibling field id whose value decides the condition." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ], + "description": "Value, or set of accepted values, the named field must hold." + }, + "not": { + "description": "Invert the match.", + "type": "boolean" + }, + "and": { + "description": "A second clause that must hold as well.", + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Second field id." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ], + "description": "Value, or set of accepted values, the named field must hold." + }, + "not": { + "description": "Invert the second match.", + "type": "boolean" + } + }, + "required": ["field"], + "additionalProperties": false + } + }, + "required": ["field", "value"], + "additionalProperties": false, + "description": "Holds when `field` holds `value`." + }, + { + "type": "object", + "properties": { + "opaque": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["opaque"], + "additionalProperties": false, + "description": "A function the catalog could not evaluate to data." + } + ], + "description": "A condition clause, or `{ opaque: true }` (treat as possibly holding)." + } + ] + }, + "dependsOn": { + "description": "Editor clearing and fetch ordering hints; never visibility.", + "type": "object", + "properties": { + "all": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Fields that must all hold values." + }, + "any": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Fields of which one must hold a value." + } + }, + "required": ["all", "any"], + "additionalProperties": false + }, + "defaultValue": { + "description": "Editor default value (any JSON)." + }, + "valueDefault": { + "description": "The registry value thunk, evaluated where it is constant.", + "anyOf": [ + { + "type": "object", + "properties": { + "computed": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["computed"], + "additionalProperties": false, + "description": "A value thunk derived from other params." + }, + { + "type": "object", + "properties": { + "constant": { + "description": "The constant value (any JSON)." + } + }, + "required": ["constant"], + "additionalProperties": false, + "description": "A value thunk that always returns this." + } + ] + }, + "options": { + "description": "Selectable options.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stored option id." + }, + "label": { + "type": "string", + "description": "Display label." + } + }, + "required": ["id", "label"], + "additionalProperties": false, + "description": "One static option." + } + }, + { + "type": "object", + "properties": { + "dynamic": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["dynamic"], + "additionalProperties": false, + "description": "Options fetched per workspace through `selectorKey`." + }, + { + "type": "object", + "properties": { + "opaque": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["opaque"], + "additionalProperties": false, + "description": "A function the catalog could not evaluate to data." + } + ] + }, + "hidden": { + "description": "Hidden from the editor.", + "type": "boolean" + }, + "readOnly": { + "description": "Display-only.", + "type": "boolean" + }, + "password": { + "description": "Holds a secret.", + "type": "boolean" + }, + "hideFromCopilot": { + "description": "Not offered to Copilot.", + "type": "boolean" + }, + "context": { + "description": "Only meaningful as an agent tool.", + "type": "string", + "const": "tool-input" + }, + "paramVisibility": { + "description": "Tool param visibility override.", + "type": "string" + }, + "emptyIsValid": { + "description": "An empty value satisfies `required`.", + "type": "boolean" + }, + "language": { + "description": "Code field language.", + "type": "string" + }, + "multiple": { + "description": "Accepts several files.", + "type": "boolean" + }, + "min": { + "description": "Minimum numeric value.", + "type": "number" + }, + "max": { + "description": "Maximum numeric value.", + "type": "number" + }, + "step": { + "description": "Slider increment.", + "type": "number" + }, + "integer": { + "description": "Integers only.", + "type": "boolean" + }, + "columns": { + "description": "Table column headers.", + "type": "array", + "items": { + "type": "string" + } + }, + "selectorKey": { + "description": "Selector that lists the options.", + "type": "string" + }, + "serviceId": { + "description": "OAuth service the field binds.", + "type": "string" + }, + "valueKind": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "array", + "object", + "json", + "code", + "branches", + "tools", + "resource", + "picked", + "upload", + "none" + ], + "description": "How a value for this field is written in source." + }, + "resourceKind": { + "description": "Workspace resource kind, for `resource` fields.", + "type": "string" + }, + "storage": { + "type": "string", + "enum": ["native", "json-string"], + "description": "Encoding a new value is stored with." + }, + "structured": { + "description": "Structured value the canonical model decodes.", + "type": "string", + "enum": ["tools", "branches", "tableRows", "inputFormat", "variables"] + } + }, + "required": ["id", "type", "valueKind", "storage"], + "additionalProperties": false, + "description": "One configuration field, in declared order; duplicate ids are kept with `surface`." + }, + "description": "Configuration fields in declared order." + }, + "tools": { + "type": "object", + "properties": { + "access": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Tool ids the block can call." + }, + "selector": { + "type": "string", + "enum": ["single", "operation", "opaque"], + "description": "How the tool is chosen: fixed, by operation, or by an unevaluated function." + } + }, + "required": ["access", "selector"], + "additionalProperties": false, + "description": "Tools the block calls." + }, + "inputs": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Input value type." + }, + "schema": { + "description": "JSON schema of the input." + } + }, + "required": ["type"], + "additionalProperties": false, + "description": "One declared input." + }, + "description": "Declared inputs by name." + }, + "outputs": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Output value type." + }, + "description": { + "description": "What the output holds.", + "type": "string" + }, + "condition": { + "description": "When the output is present: `{ field, value, not?, and? }`." + }, + "hiddenFromDisplay": { + "description": "Hidden from the output picker.", + "type": "boolean" + }, + "properties": { + "description": "Nested outputs by name, each of this same shape.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "description": "A nested output, of this same shape." + } + }, + "items": { + "description": "Array element output, of this same shape." + } + }, + "required": ["type"], + "additionalProperties": false, + "description": "One output field." + }, + "description": "Declared outputs by name." + }, + "dynamicOutputs": { + "description": "Present when outputs derive from a param at run time.", + "type": "object", + "properties": { + "source": { + "type": "string", + "enum": ["responseFormat", "inputFormat", "humanForm", "tableRows"], + "description": "What shapes the outputs." + }, + "param": { + "type": "string", + "description": "Param holding that shape." + } + }, + "required": ["source", "param"], + "additionalProperties": false + }, + "graph": { + "type": "object", + "properties": { + "canBeTarget": { + "type": "boolean", + "description": "Whether an edge may connect into the block." + }, + "errorPort": { + "type": "boolean", + "description": "Whether the block has an error port." + }, + "container": { + "anyOf": [ + { + "type": "string", + "enum": ["loop", "parallel"] + }, + { + "type": "null" + } + ], + "description": "The subflow kind for a container, else null." + }, + "annotationOnly": { + "type": "boolean", + "description": "A canvas note: no edges at all." + }, + "branches": { + "description": "The field lifted into named branches.", + "type": "object", + "properties": { + "subBlockId": { + "type": "string", + "description": "Field holding the branches." + }, + "kind": { + "type": "string", + "enum": ["condition", "router"], + "description": "Branch kind." + } + }, + "required": ["subBlockId", "kind"], + "additionalProperties": false + } + }, + "required": ["canBeTarget", "errorPort", "container", "annotationOnly"], + "additionalProperties": false, + "description": "Edge rules for the block." + }, + "legacyIds": { + "description": "Field id renames applied on load.", + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "Legacy field id." + }, + "to": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Current field id, or null when removed." + }, + "whenOperation": { + "description": "Operations the rename applies to.", + "type": "array", + "items": { + "type": "string" + } + }, + "conditional": { + "description": "Applies only to some values.", + "type": "boolean", + "const": true + } + }, + "required": ["from", "to"], + "additionalProperties": false, + "description": "One field id rename." + } + }, + "legacyCanonicalIds": { + "description": "Basic/advanced pair id renames applied on load.", + "type": "array", + "items": { + "type": "object", + "properties": { + "from": { + "type": "string", + "description": "Legacy pair id." + }, + "to": { + "type": "string", + "description": "Current pair id." + } + }, + "required": ["from", "to"], + "additionalProperties": false, + "description": "One pair id rename." + } + }, + "custom": { + "description": "Present for organization custom blocks.", + "type": "object", + "properties": { + "sourceWorkflowId": { + "description": "Workflow the custom block runs.", + "type": "string" + } + }, + "additionalProperties": false + } + }, + "required": [ + "type", + "name", + "category", + "subBlocks", + "tools", + "inputs", + "outputs", + "graph" + ], + "additionalProperties": false, + "description": "One placeable block type." + }, + "description": "Placeable block types by type id." + }, + "triggers": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Trigger id." + }, + "provider": { + "type": "string", + "description": "Provider the trigger belongs to." + }, + "name": { + "type": "string", + "description": "Display name." + }, + "polling": { + "description": "Poll-based rather than webhook-based.", + "type": "boolean" + }, + "webhook": { + "description": "Receives webhooks.", + "type": "boolean" + }, + "subBlocks": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Field id; the param name unless the field is in a basic/advanced pair." + }, + "type": { + "type": "string", + "description": "Editor control type, e.g. `short-input`." + }, + "title": { + "description": "Display title.", + "type": "string" + }, + "mode": { + "description": "Which editor mode shows the field.", + "type": "string", + "enum": ["basic", "advanced", "both", "trigger", "trigger-advanced"] + }, + "canonicalParamId": { + "description": "Shared param name of a basic/advanced pair.", + "type": "string" + }, + "surface": { + "description": "Whether this declaration belongs to action or trigger mode.", + "type": "string", + "enum": ["action", "trigger"] + }, + "condition": { + "anyOf": [ + { + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Sibling field id whose value decides the condition." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ], + "description": "Value, or set of accepted values, the named field must hold." + }, + "not": { + "description": "Invert the match.", + "type": "boolean" + }, + "and": { + "description": "A second clause that must hold as well.", + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Second field id." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ], + "description": "Value, or set of accepted values, the named field must hold." + }, + "not": { + "description": "Invert the second match.", + "type": "boolean" + } + }, + "required": ["field"], + "additionalProperties": false + } + }, + "required": ["field", "value"], + "additionalProperties": false, + "description": "Holds when `field` holds `value`." + }, + { + "type": "object", + "properties": { + "opaque": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["opaque"], + "additionalProperties": false, + "description": "A function the catalog could not evaluate to data." + } + ], + "description": "A condition clause, or `{ opaque: true }` (treat as possibly holding)." + }, + "visibleFor": { + "description": "Per operation id: whether an opaque condition can show this field.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "boolean" + } + }, + "required": { + "description": "Whether a value is required, or the condition under which it is.", + "anyOf": [ + { + "type": "boolean" + }, + { + "anyOf": [ + { + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Sibling field id whose value decides the condition." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ], + "description": "Value, or set of accepted values, the named field must hold." + }, + "not": { + "description": "Invert the match.", + "type": "boolean" + }, + "and": { + "description": "A second clause that must hold as well.", + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Second field id." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + ], + "description": "Value, or set of accepted values, the named field must hold." + }, + "not": { + "description": "Invert the second match.", + "type": "boolean" + } + }, + "required": ["field"], + "additionalProperties": false + } + }, + "required": ["field", "value"], + "additionalProperties": false, + "description": "Holds when `field` holds `value`." + }, + { + "type": "object", + "properties": { + "opaque": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["opaque"], + "additionalProperties": false, + "description": "A function the catalog could not evaluate to data." + } + ], + "description": "A condition clause, or `{ opaque: true }` (treat as possibly holding)." + } + ] + }, + "dependsOn": { + "description": "Editor clearing and fetch ordering hints; never visibility.", + "type": "object", + "properties": { + "all": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Fields that must all hold values." + }, + "any": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Fields of which one must hold a value." + } + }, + "required": ["all", "any"], + "additionalProperties": false + }, + "defaultValue": { + "description": "Editor default value (any JSON)." + }, + "valueDefault": { + "description": "The registry value thunk, evaluated where it is constant.", + "anyOf": [ + { + "type": "object", + "properties": { + "computed": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["computed"], + "additionalProperties": false, + "description": "A value thunk derived from other params." + }, + { + "type": "object", + "properties": { + "constant": { + "description": "The constant value (any JSON)." + } + }, + "required": ["constant"], + "additionalProperties": false, + "description": "A value thunk that always returns this." + } + ] + }, + "options": { + "description": "Selectable options.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stored option id." + }, + "label": { + "type": "string", + "description": "Display label." + } + }, + "required": ["id", "label"], + "additionalProperties": false, + "description": "One static option." + } + }, + { + "type": "object", + "properties": { + "dynamic": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["dynamic"], + "additionalProperties": false, + "description": "Options fetched per workspace through `selectorKey`." + }, + { + "type": "object", + "properties": { + "opaque": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["opaque"], + "additionalProperties": false, + "description": "A function the catalog could not evaluate to data." + } + ] + }, + "hidden": { + "description": "Hidden from the editor.", + "type": "boolean" + }, + "readOnly": { + "description": "Display-only.", + "type": "boolean" + }, + "password": { + "description": "Holds a secret.", + "type": "boolean" + }, + "hideFromCopilot": { + "description": "Not offered to Copilot.", + "type": "boolean" + }, + "context": { + "description": "Only meaningful as an agent tool.", + "type": "string", + "const": "tool-input" + }, + "paramVisibility": { + "description": "Tool param visibility override.", + "type": "string" + }, + "emptyIsValid": { + "description": "An empty value satisfies `required`.", + "type": "boolean" + }, + "language": { + "description": "Code field language.", + "type": "string" + }, + "multiple": { + "description": "Accepts several files.", + "type": "boolean" + }, + "min": { + "description": "Minimum numeric value.", + "type": "number" + }, + "max": { + "description": "Maximum numeric value.", + "type": "number" + }, + "step": { + "description": "Slider increment.", + "type": "number" + }, + "integer": { + "description": "Integers only.", + "type": "boolean" + }, + "columns": { + "description": "Table column headers.", + "type": "array", + "items": { + "type": "string" + } + }, + "selectorKey": { + "description": "Selector that lists the options.", + "type": "string" + }, + "serviceId": { + "description": "OAuth service the field binds.", + "type": "string" + }, + "valueKind": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "array", + "object", + "json", + "code", + "branches", + "tools", + "resource", + "picked", + "upload", + "none" + ], + "description": "How a value for this field is written in source." + }, + "resourceKind": { + "description": "Workspace resource kind, for `resource` fields.", + "type": "string" + }, + "storage": { + "type": "string", + "enum": ["native", "json-string"], + "description": "Encoding a new value is stored with." + }, + "structured": { + "description": "Structured value the canonical model decodes.", + "type": "string", + "enum": ["tools", "branches", "tableRows", "inputFormat", "variables"] + } + }, + "required": ["id", "type", "valueKind", "storage"], + "additionalProperties": false, + "description": "One configuration field, in declared order; duplicate ids are kept with `surface`." + }, + "description": "Configuration fields in declared order." + }, + "outputs": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Output value type." + }, + "description": { + "description": "What the output holds.", + "type": "string" + }, + "condition": { + "description": "When the output is present: `{ field, value, not?, and? }`." + }, + "hiddenFromDisplay": { + "description": "Hidden from the output picker.", + "type": "boolean" + }, + "properties": { + "description": "Nested outputs by name, each of this same shape.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "description": "A nested output, of this same shape." + } + }, + "items": { + "description": "Array element output, of this same shape." + } + }, + "required": ["type"], + "additionalProperties": false, + "description": "One output field." + }, + "description": "Declared outputs by name." + } + }, + "required": ["id", "provider", "name", "subBlocks", "outputs"], + "additionalProperties": false, + "description": "One trigger a block can run in trigger mode." + }, + "description": "Triggers the listed blocks can run, by trigger id." + }, + "builders": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Block type the builder creates." + }, + "operation": { + "description": "Stored operation id the builder pins.", + "type": "string" + }, + "triggerMode": { + "description": "Whether the builder creates a trigger-mode block.", + "type": "boolean" + }, + "fixed": { + "description": "Other field values the builder pins, such as the selected trigger.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + } + } + }, + "required": ["type"], + "additionalProperties": false, + "description": "One SDK builder method." + }, + "description": "SDK builder methods keyed by dotted path, e.g. `slack.sendMessage`." + }, + "scope": { + "description": "Present when the catalog includes an organization’s custom blocks.", + "type": "object", + "properties": { + "organizationId": { + "type": "string", + "description": "Organization whose custom blocks are included." + } + }, + "required": ["organizationId"], + "additionalProperties": false + } + }, + "required": ["catalogVersion", "hash", "sdkMajor", "blocks", "triggers", "builders"], + "additionalProperties": false, + "description": "Response data." + } + }, + "required": ["data"], + "additionalProperties": false, + "title": "Get block catalog response", + "description": "The block catalog core shard.", + "examples": [ + { + "data": { + "catalogVersion": 1, + "hash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a", + "sdkMajor": 1, + "blocks": { + "slack_v2": { + "type": "slack_v2", + "name": "Slack", + "category": "tools", + "subBlocks": [ + { + "id": "operation", + "type": "dropdown", + "valueKind": "string", + "storage": "native", + "options": [ + { + "id": "send", + "label": "Send Message" + } + ] + } + ], + "tools": { + "access": ["slack_message"], + "selector": "operation" + }, + "inputs": {}, + "outputs": { + "ts": { + "type": "string", + "description": "Message timestamp" + } + }, + "graph": { + "canBeTarget": true, + "errorPort": true, + "container": null, + "annotationOnly": false + } + } + }, + "triggers": {}, + "builders": { + "slack.sendMessage": { + "type": "slack_v2", + "operation": "send" + } + } + } + } + ] } } }, diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.test.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.test.ts new file mode 100644 index 00000000000..059b0a5d660 --- /dev/null +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.test.ts @@ -0,0 +1,142 @@ +import { + V2_OPERATION_RATE_LIMIT_ALLOWED, + V2_PREAUTH_RATE_LIMIT_ALLOWED, + v2ApiKeyAuthModuleMock, + v2RateLimiterModuleMock, + v2RouteMocks, +} from '@sim/testing' +import { NextRequest } from 'next/server' +import { beforeEach, describe, expect, it, vi } from 'vitest' + +const mocks = vi.hoisted(() => ({ read: vi.fn() })) + +vi.mock('@/lib/api/server/routes/v2-api-key-auth', () => v2ApiKeyAuthModuleMock) +vi.mock('@/lib/core/rate-limiter', () => v2RateLimiterModuleMock) +vi.mock('@/lib/workflows/code/catalog/read-block-catalog', () => ({ + readWorkflowCodeCatalog: { + operation: { id: 'workflows.code.catalog.read' }, + execute: mocks.read, + }, +})) + +import { OrchestrationError } from '@/lib/core/orchestration/types' +import { GET } from '@/app/api/v2/workspaces/[workspaceId]/block-catalog/route' + +const WORKSPACE_ID = '11111111-2222-4333-8444-555555555555' +const HASH = 'a'.repeat(64) + +const auth = { + principal: { + kind: 'workspace_api_key' as const, + workspaceId: WORKSPACE_ID, + keyId: 'key-1', + access: 'write' as const, + }, + rateLimitSubjectIds: ['api-key:key-1', `workspace:${WORKSPACE_ID}`] as const, + rateLimitSubscription: null, + keyType: 'workspace' as const, +} + +const catalog = { + catalogVersion: 1 as const, + hash: HASH, + sdkMajor: 1, + blocks: { + slack_v2: { + type: 'slack_v2', + name: 'Slack', + category: 'tools', + subBlocks: [ + { + id: 'channel', + type: 'channel-selector', + valueKind: 'picked', + storage: 'native', + condition: { opaque: true }, + visibleFor: { send: true, list_users: false }, + selectorKey: 'slack.channels', + }, + ], + tools: { access: ['slack_message'], selector: 'operation' }, + inputs: {}, + outputs: { ts: { type: 'string' } }, + graph: { canBeTarget: true, errorPort: true, container: null, annotationOnly: false }, + }, + }, + triggers: {}, + builders: { 'slack.sendMessage': { type: 'slack_v2', operation: 'send' } }, +} + +function request(query = '', headers: Record = {}) { + return new NextRequest( + `http://localhost:3000/api/v2/workspaces/${WORKSPACE_ID}/block-catalog${query}`, + { headers: { 'x-api-key': 'key', ...headers } } + ) +} + +const context = { params: Promise.resolve({ workspaceId: WORKSPACE_ID }) } + +describe('GET /api/v2/workspaces/{workspaceId}/block-catalog', () => { + beforeEach(() => { + v2RouteMocks.authenticate.mockResolvedValue(auth) + v2RouteMocks.preauthRate.mockResolvedValue(V2_PREAUTH_RATE_LIMIT_ALLOWED) + v2RouteMocks.operationRate.mockResolvedValue(V2_OPERATION_RATE_LIMIT_ALLOWED) + mocks.read.mockResolvedValue(catalog) + }) + + it('returns the catalog with its hash as a strong ETag, keeping fields the schema does not name', async () => { + const response = await GET(request(), context) + + expect(response.status).toBe(200) + expect(response.headers.get('etag')).toBe(`"${HASH}"`) + expect(response.headers.get('cache-control')).toBe('private, no-store') + const body = await response.json() + expect(body.data.blocks.slack_v2.subBlocks[0].selectorKey).toBe('slack.channels') + expect(body.data).toEqual(catalog) + }) + + it.each([`"${HASH}"`, `W/"${HASH}"`, `"stale", "${HASH}"`, '*'])( + 'answers 304 with no body when If-None-Match is %s', + async (ifNoneMatch) => { + const response = await GET(request('', { 'if-none-match': ifNoneMatch }), context) + + expect(response.status).toBe(304) + expect(response.headers.get('etag')).toBe(`"${HASH}"`) + expect(await response.text()).toBe('') + } + ) + + it('answers 200 with the body when If-None-Match names another catalog', async () => { + const response = await GET(request('', { 'if-none-match': `"${'b'.repeat(64)}"` }), context) + + expect(response.status).toBe(200) + expect((await response.json()).data.hash).toBe(HASH) + }) + + it('asks for the per-workflow compile catalog only when workflowId is given', async () => { + await GET(request('?workflowId=wf-1'), context) + await GET(request(), context) + + expect(mocks.read.mock.calls[0][0].input).toEqual({ + workspaceId: WORKSPACE_ID, + workflowId: 'wf-1', + }) + expect(mocks.read.mock.calls[1][0].input).toEqual({ workspaceId: WORKSPACE_ID }) + }) + + it('rejects an unknown query parameter before reading the catalog', async () => { + const response = await GET(request('?shard=docs'), context) + + expect(response.status).toBe(400) + expect(mocks.read).not.toHaveBeenCalled() + }) + + it('answers 404 for a workflow outside the workspace', async () => { + mocks.read.mockRejectedValue(new OrchestrationError('not_found', 'Workflow not found')) + + const response = await GET(request('?workflowId=elsewhere'), context) + + expect(response.status).toBe(404) + expect((await response.json()).error.code).toBe('NOT_FOUND') + }) +}) diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.ts new file mode 100644 index 00000000000..8a1540c113f --- /dev/null +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.ts @@ -0,0 +1,27 @@ +import { v2GetBlockCatalogContract } from '@/lib/api/contracts/v2/block-catalog' +import { defineV2JsonRoute, v2ApiKeyAuth, v2RateLimits } from '@/lib/api/server/routes' +import { workflowCodeCatalogOperations } from '@/lib/workflows/code/catalog/operations' +import { readWorkflowCodeCatalog } from '@/lib/workflows/code/catalog/read-block-catalog' +import { catalogErrorPolicy } from '@/app/api/v2/lib/catalog' + +export const dynamic = 'force-dynamic' +export const revalidate = 0 + +/** + * GET /api/v2/workspaces/{workspaceId}/block-catalog — the workflow-SDK block catalog. The + * response carries `ETag: ""`; a matching `If-None-Match` answers `304` with no body. + */ +export const GET = defineV2JsonRoute({ + contract: v2GetBlockCatalogContract, + operation: workflowCodeCatalogOperations.read, + auth: v2ApiKeyAuth, + rateLimit: v2RateLimits.publicApi, + errorPolicy: catalogErrorPolicy, + mapInput: ({ params, query }) => ({ + workspaceId: params.workspaceId, + ...(query.workflowId ? { workflowId: query.workflowId } : {}), + }), + useCase: readWorkflowCodeCatalog, + entityTag: (catalog) => catalog.hash, + present: (catalog) => ({ data: catalog }), +}) diff --git a/apps/sim/lib/api/contracts/v2/block-catalog.ts b/apps/sim/lib/api/contracts/v2/block-catalog.ts new file mode 100644 index 00000000000..2ba15d51821 --- /dev/null +++ b/apps/sim/lib/api/contracts/v2/block-catalog.ts @@ -0,0 +1,370 @@ +import { z } from 'zod' +import { workflowIdSchema, workspaceIdSchema } from '@/lib/api/contracts/primitives' +import { defineRouteContract } from '@/lib/api/contracts/types' +import { v2DataResponse } from '@/lib/api/contracts/v2/shared' + +/** + * The workflow-SDK block catalog: one content-hashed JSON document the compiler, printer, and + * type generator read instead of the block, trigger, and tool registries (build-spec decision 14). + * + * The response is the catalog's core shard (`BlockCatalog` in `@sim/workflow-code`, which owns + * the shape; this schema mirrors it field for field, and the registry-wide catalog test parses + * the whole projection through it so a field added there and missed here fails CI instead of + * being stripped). Its `hash` is the content hash of everything else in it, and the route sends it + * as a strong `ETag`; a caller holding a copy sends it back as `If-None-Match` and gets `304` with + * no body when nothing changed. That is a deliberate exception to v2's no-ETag rule: the document + * is megabytes, is already content-addressed, and is what a workflow lock pins, so revalidating by + * hash is the read's whole purpose. + */ + +export const v2BlockCatalogQuerySchema = z + .object({ + workflowId: workflowIdSchema + .optional() + .describe( + 'Return the compile catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`.' + ), + }) + .strict() + +export const v2BlockCatalogParamsSchema = z.object({ + workspaceId: workspaceIdSchema.describe( + 'Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what the catalog contains.' + ), +}) + +export const v2BlockCatalogHeadersSchema = z.object({ + 'if-none-match': z + .string() + .max(1024, 'if-none-match must be at most 1024 characters') + .optional() + .describe('A catalog `hash` (quoted, as sent in `ETag`) the caller already holds.'), +}) + +const scalarSchema = z.union([z.string(), z.number(), z.boolean()]) + +const conditionValueSchema = z + .union([scalarSchema, z.array(scalarSchema)]) + .describe('Value, or set of accepted values, the named field must hold.') + +const opaqueSchema = z + .object({ opaque: z.literal(true).describe('Always true.') }) + .describe('A function the catalog could not evaluate to data.') + +const conditionClauseSchema = z + .object({ + field: z.string().describe('Sibling field id whose value decides the condition.'), + value: conditionValueSchema, + not: z.boolean().optional().describe('Invert the match.'), + and: z + .object({ + field: z.string().describe('Second field id.'), + value: conditionValueSchema.optional(), + not: z.boolean().optional().describe('Invert the second match.'), + }) + .optional() + .describe('A second clause that must hold as well.'), + }) + .describe('Holds when `field` holds `value`.') + +const catalogConditionSchema = z + .union([conditionClauseSchema, opaqueSchema]) + .describe('A condition clause, or `{ opaque: true }` (treat as possibly holding).') + +const catalogOptionSchema = z + .object({ + id: z.string().describe('Stored option id.'), + label: z.string().describe('Display label.'), + }) + .describe('One static option.') + +const catalogSubBlockSchema = z + .object({ + id: z + .string() + .describe('Field id; the param name unless the field is in a basic/advanced pair.'), + type: z.string().describe('Editor control type, e.g. `short-input`.'), + title: z.string().optional().describe('Display title.'), + mode: z + .enum(['basic', 'advanced', 'both', 'trigger', 'trigger-advanced']) + .optional() + .describe('Which editor mode shows the field.'), + canonicalParamId: z.string().optional().describe('Shared param name of a basic/advanced pair.'), + surface: z + .enum(['action', 'trigger']) + .optional() + .describe('Whether this declaration belongs to action or trigger mode.'), + condition: catalogConditionSchema.optional(), + visibleFor: z + .record(z.string(), z.boolean()) + .optional() + .describe('Per operation id: whether an opaque condition can show this field.'), + required: z + .union([z.boolean(), catalogConditionSchema]) + .optional() + .describe('Whether a value is required, or the condition under which it is.'), + dependsOn: z + .object({ + all: z.array(z.string()).describe('Fields that must all hold values.'), + any: z.array(z.string()).describe('Fields of which one must hold a value.'), + }) + .optional() + .describe('Editor clearing and fetch ordering hints; never visibility.'), + defaultValue: z.unknown().optional().describe('Editor default value (any JSON).'), + valueDefault: z + .union([ + z + .object({ computed: z.literal(true).describe('Always true.') }) + .describe('A value thunk derived from other params.'), + z + .strictObject({ constant: z.unknown().describe('The constant value (any JSON).') }) + .describe('A value thunk that always returns this.'), + ]) + .optional() + .describe('The registry value thunk, evaluated where it is constant.'), + options: z + .union([ + z.array(catalogOptionSchema), + z + .object({ dynamic: z.literal(true).describe('Always true.') }) + .describe('Options fetched per workspace through `selectorKey`.'), + opaqueSchema, + ]) + .optional() + .describe('Selectable options.'), + hidden: z.boolean().optional().describe('Hidden from the editor.'), + readOnly: z.boolean().optional().describe('Display-only.'), + password: z.boolean().optional().describe('Holds a secret.'), + hideFromCopilot: z.boolean().optional().describe('Not offered to Copilot.'), + context: z.literal('tool-input').optional().describe('Only meaningful as an agent tool.'), + paramVisibility: z.string().optional().describe('Tool param visibility override.'), + emptyIsValid: z.boolean().optional().describe('An empty value satisfies `required`.'), + language: z.string().optional().describe('Code field language.'), + multiple: z.boolean().optional().describe('Accepts several files.'), + min: z.number().optional().describe('Minimum numeric value.'), + max: z.number().optional().describe('Maximum numeric value.'), + step: z.number().optional().describe('Slider increment.'), + integer: z.boolean().optional().describe('Integers only.'), + columns: z.array(z.string()).optional().describe('Table column headers.'), + selectorKey: z.string().optional().describe('Selector that lists the options.'), + serviceId: z.string().optional().describe('OAuth service the field binds.'), + valueKind: z + .enum([ + 'string', + 'number', + 'boolean', + 'array', + 'object', + 'json', + 'code', + 'branches', + 'tools', + 'resource', + 'picked', + 'upload', + 'none', + ]) + .describe('How a value for this field is written in source.'), + resourceKind: z.string().optional().describe('Workspace resource kind, for `resource` fields.'), + storage: z.enum(['native', 'json-string']).describe('Encoding a new value is stored with.'), + structured: z + .enum(['tools', 'branches', 'tableRows', 'inputFormat', 'variables']) + .optional() + .describe('Structured value the canonical model decodes.'), + }) + .describe('One configuration field, in declared order; duplicate ids are kept with `surface`.') + +const catalogOutputSchema = z + .object({ + type: z.string().describe('Output value type.'), + description: z.string().optional().describe('What the output holds.'), + condition: z + .unknown() + .optional() + .describe('When the output is present: `{ field, value, not?, and? }`.'), + hiddenFromDisplay: z.boolean().optional().describe('Hidden from the output picker.'), + properties: z + .record(z.string(), z.unknown().describe('A nested output, of this same shape.')) + .optional() + .describe('Nested outputs by name, each of this same shape.'), + items: z.unknown().optional().describe('Array element output, of this same shape.'), + }) + .describe('One output field.') + +const catalogOutputsSchema = z + .record(z.string(), catalogOutputSchema) + .describe('Declared outputs by name.') + +const catalogBlockSchema = z + .object({ + type: z.string().describe('Block type id.'), + name: z.string().describe('Display name.'), + category: z.enum(['blocks', 'tools', 'triggers']).describe('Block category.'), + addable: z + .literal(false) + .optional() + .describe('Present when new blocks of this type are refused; existing ones still compile.'), + lifecycle: z + .object({ + hidden: z.literal(true).optional().describe('Hidden from the toolbar.'), + preview: z.literal(true).optional().describe('Unreleased preview block.'), + sunset: z + .object({ + status: z.enum(['legacy', 'deprecated']).describe('Lifecycle state.'), + replacedBy: z.string().optional().describe('Successor block type.'), + }) + .optional() + .describe('Post-GA lifecycle state.'), + }) + .optional() + .describe('Lifecycle flags.'), + triggerAllowed: z.boolean().optional().describe('Whether the block can start a workflow.'), + triggers: z + .object({ + enabled: z.boolean().describe('Whether trigger mode is available.'), + available: z.array(z.string()).describe('Trigger ids the block supports.'), + }) + .optional() + .describe('Trigger mode support.'), + singleInstance: z.boolean().optional().describe('At most one per workflow.'), + subBlocks: z.array(catalogSubBlockSchema).describe('Configuration fields in declared order.'), + tools: z + .object({ + access: z.array(z.string()).describe('Tool ids the block can call.'), + selector: z + .enum(['single', 'operation', 'opaque']) + .describe('How the tool is chosen: fixed, by operation, or by an unevaluated function.'), + }) + .describe('Tools the block calls.'), + inputs: z + .record( + z.string(), + z + .object({ + type: z.string().describe('Input value type.'), + // untyped-response: a block input's JSON schema is block-authored, arbitrary JSON Schema + schema: z.unknown().optional().describe('JSON schema of the input.'), + }) + .describe('One declared input.') + ) + .describe('Declared inputs by name.'), + outputs: catalogOutputsSchema, + dynamicOutputs: z + .object({ + source: z + .enum(['responseFormat', 'inputFormat', 'humanForm', 'tableRows']) + .describe('What shapes the outputs.'), + param: z.string().describe('Param holding that shape.'), + }) + .optional() + .describe('Present when outputs derive from a param at run time.'), + graph: z + .object({ + canBeTarget: z.boolean().describe('Whether an edge may connect into the block.'), + errorPort: z.boolean().describe('Whether the block has an error port.'), + container: z + .enum(['loop', 'parallel']) + .nullable() + .describe('The subflow kind for a container, else null.'), + annotationOnly: z.boolean().describe('A canvas note: no edges at all.'), + branches: z + .object({ + subBlockId: z.string().describe('Field holding the branches.'), + kind: z.enum(['condition', 'router']).describe('Branch kind.'), + }) + .optional() + .describe('The field lifted into named branches.'), + }) + .describe('Edge rules for the block.'), + legacyIds: z + .array( + z + .object({ + from: z.string().describe('Legacy field id.'), + to: z.string().nullable().describe('Current field id, or null when removed.'), + whenOperation: z + .array(z.string()) + .optional() + .describe('Operations the rename applies to.'), + conditional: z.literal(true).optional().describe('Applies only to some values.'), + }) + .describe('One field id rename.') + ) + .optional() + .describe('Field id renames applied on load.'), + legacyCanonicalIds: z + .array( + z + .object({ + from: z.string().describe('Legacy pair id.'), + to: z.string().describe('Current pair id.'), + }) + .describe('One pair id rename.') + ) + .optional() + .describe('Basic/advanced pair id renames applied on load.'), + custom: z + .object({ + sourceWorkflowId: z.string().optional().describe('Workflow the custom block runs.'), + }) + .optional() + .describe('Present for organization custom blocks.'), + }) + .describe('One placeable block type.') + +const catalogTriggerSchema = z + .object({ + id: z.string().describe('Trigger id.'), + provider: z.string().describe('Provider the trigger belongs to.'), + name: z.string().describe('Display name.'), + polling: z.boolean().optional().describe('Poll-based rather than webhook-based.'), + webhook: z.boolean().optional().describe('Receives webhooks.'), + subBlocks: z.array(catalogSubBlockSchema).describe('Configuration fields in declared order.'), + outputs: catalogOutputsSchema, + }) + .describe('One trigger a block can run in trigger mode.') + +const catalogBuilderSchema = z + .object({ + type: z.string().describe('Block type the builder creates.'), + operation: z.string().optional().describe('Stored operation id the builder pins.'), + triggerMode: z + .boolean() + .optional() + .describe('Whether the builder creates a trigger-mode block.'), + fixed: z + .record(z.string(), z.string()) + .optional() + .describe('Other field values the builder pins, such as the selected trigger.'), + }) + .describe('One SDK builder method.') + +export const v2BlockCatalogSchema = z + .object({ + catalogVersion: z.literal(1).describe('Catalog format version.'), + hash: z.string().describe('SHA-256 of the catalog content; the response `ETag`.'), + sdkMajor: z.number().int().describe('Workflow SDK major version this catalog serves.'), + blocks: z.record(z.string(), catalogBlockSchema).describe('Placeable block types by type id.'), + triggers: z + .record(z.string(), catalogTriggerSchema) + .describe('Triggers the listed blocks can run, by trigger id.'), + builders: z + .record(z.string(), catalogBuilderSchema) + .describe('SDK builder methods keyed by dotted path, e.g. `slack.sendMessage`.'), + scope: z + .object({ + organizationId: z.string().describe('Organization whose custom blocks are included.'), + }) + .optional() + .describe('Present when the catalog includes an organization’s custom blocks.'), + }) + .describe('Block catalog core shard.') + +export const v2GetBlockCatalogContract = defineRouteContract({ + method: 'GET', + path: '/api/v2/workspaces/[workspaceId]/block-catalog', + params: v2BlockCatalogParamsSchema, + query: v2BlockCatalogQuerySchema, + headers: v2BlockCatalogHeadersSchema, + response: { mode: 'json', schema: v2DataResponse(v2BlockCatalogSchema) }, +}) diff --git a/apps/sim/lib/api/contracts/v2/openapi/block-catalog.ts b/apps/sim/lib/api/contracts/v2/openapi/block-catalog.ts new file mode 100644 index 00000000000..b1461f5766a --- /dev/null +++ b/apps/sim/lib/api/contracts/v2/openapi/block-catalog.ts @@ -0,0 +1,79 @@ +import { v2GetBlockCatalogContract } from '@/lib/api/contracts/v2/block-catalog' +import { + documentedSchema, + RATE_LIMIT_HEADERS, + RESOURCE_ERRORS, +} from '@/lib/api/contracts/v2/openapi/shared' +import { defineOpenApiRoute } from '@/lib/api/openapi/types' +import { workflowCodeCatalogOperations } from '@/lib/workflows/code/catalog/operations' + +const BLOCK_CATALOG_EXAMPLE = { + catalogVersion: 1, + hash: '3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a', + sdkMajor: 1, + blocks: { + slack_v2: { + type: 'slack_v2', + name: 'Slack', + category: 'tools', + subBlocks: [ + { + id: 'operation', + type: 'dropdown', + valueKind: 'string', + storage: 'native', + options: [{ id: 'send', label: 'Send Message' }], + }, + ], + tools: { access: ['slack_message'], selector: 'operation' }, + inputs: {}, + outputs: { ts: { type: 'string', description: 'Message timestamp' } }, + graph: { canBeTarget: true, errorPort: true, container: null, annotationOnly: false }, + }, + }, + triggers: {}, + builders: { 'slack.sendMessage': { type: 'slack_v2', operation: 'send' } }, +} + +export const blockCatalogOpenApiRoutes = [ + defineOpenApiRoute( + v2GetBlockCatalogContract, + { + applicationOperation: workflowCodeCatalogOperations.read, + operationId: 'getBlockCatalog', + summary: 'Get block catalog', + description: + 'Get the block catalog that workflow source is compiled and type-checked against: every block type the caller may place in the workspace, with its fields, visibility conditions, outputs, triggers, and SDK builder names. Pass `workflowId` to add the block types already placed in that workflow. The response carries the catalog `hash` as an `ETag`; send it back in `If-None-Match` to receive `304 Not Modified` with no body when the catalog is unchanged. Returns `403` while code-first workflows are not enabled.', + tags: ['Catalog'], + errors: RESOURCE_ERRORS, + success: { description: 'The block catalog.', headers: RATE_LIMIT_HEADERS }, + }, + { + params: documentedSchema( + v2GetBlockCatalogContract.params, + 'GetBlockCatalogParams', + 'Get block catalog path parameters', + 'Workspace whose block availability is applied.' + ), + query: documentedSchema( + v2GetBlockCatalogContract.query, + 'GetBlockCatalogQuery', + 'Get block catalog query', + 'Optional workflow whose placed block types are added.' + ), + headers: documentedSchema( + v2GetBlockCatalogContract.headers, + 'GetBlockCatalogHeaders', + 'Get block catalog headers', + 'Conditional request header.' + ), + response: documentedSchema( + v2GetBlockCatalogContract.response.schema, + 'GetBlockCatalogResponse', + 'Get block catalog response', + 'The block catalog core shard.', + [{ data: BLOCK_CATALOG_EXAMPLE }] + ), + } + ), +] diff --git a/apps/sim/lib/api/contracts/v2/openapi/resources.ts b/apps/sim/lib/api/contracts/v2/openapi/resources.ts index e0d79e9531f..eb22668067b 100644 --- a/apps/sim/lib/api/contracts/v2/openapi/resources.ts +++ b/apps/sim/lib/api/contracts/v2/openapi/resources.ts @@ -33,6 +33,7 @@ import { } from '@/lib/api/contracts/v2/mcp-servers' import { v2GetMetaContract } from '@/lib/api/contracts/v2/meta' import { accessRequestOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/access-requests' +import { blockCatalogOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/block-catalog' import { credentialMemberOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/credential-members' import { organizationUsageOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/organization-usage' import { organizationOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/organizations' @@ -2502,6 +2503,7 @@ const declaredRoutes = [ ...workspaceInvitationOpenApiRoutes, ...organizationUsageOpenApiRoutes, ...accessRequestOpenApiRoutes, + ...blockCatalogOpenApiRoutes, ] as const const routes = declaredRoutes.map(withRequestBodyErrors) diff --git a/apps/sim/lib/api/mcp/generated/v2-operations.ts b/apps/sim/lib/api/mcp/generated/v2-operations.ts index 1e766adb85d..51cf9a9dabd 100644 --- a/apps/sim/lib/api/mcp/generated/v2-operations.ts +++ b/apps/sim/lib/api/mcp/generated/v2-operations.ts @@ -26,6 +26,7 @@ import { v2GetBillingStatusContract, v2ListBillingLogsContract, } from '@/lib/api/contracts/v2/billing' +import { v2GetBlockCatalogContract } from '@/lib/api/contracts/v2/block-catalog' import { v2ExecuteToolContract, v2GetBlockContract, @@ -1311,6 +1312,16 @@ export const V2_MCP_OPERATIONS = { "Get a block's fields, conditions, operations, tool schemas, and triggers. Unversioned types resolve to the newest visible version; the returned `id` identifies that version. Hidden or missing blocks return `404`.\n\nOAuth scope: `api:read`.", handler: () => import('@/app/api/v2/blocks/[blockId]/route').then((route) => route.GET), }, + getBlockCatalog: { + contract: v2GetBlockCatalogContract, + summary: 'Get block catalog', + description: + 'Get the block catalog that workflow source is compiled and type-checked against: every block type the caller may place in the workspace, with its fields, visibility conditions, outputs, triggers, and SDK builder names. Pass `workflowId` to add the block types already placed in that workflow. The response carries the catalog `hash` as an `ETag`; send it back in `If-None-Match` to receive `304 Not Modified` with no body when the catalog is unchanged. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.', + handler: () => + import('@/app/api/v2/workspaces/[workspaceId]/block-catalog/route').then( + (route) => route.GET + ), + }, getCustomTool: { contract: v2GetCustomToolContract, summary: 'Get custom tool', diff --git a/apps/sim/lib/api/server/routes/v2-json-route.ts b/apps/sim/lib/api/server/routes/v2-json-route.ts index 8e1a7a642fb..1d9cec6ebd1 100644 --- a/apps/sim/lib/api/server/routes/v2-json-route.ts +++ b/apps/sim/lib/api/server/routes/v2-json-route.ts @@ -497,6 +497,22 @@ interface V2JsonRouteOptions }): void | Promise statusForResult?(result: NoInfer): number + /** + * A strong validator for a result whose content is already content-addressed (the block + * catalog's hash). When set, a success carries `ETag`, and a request whose `If-None-Match` + * names that tag (or `*`) is answered `304` with no body, after the use case ran, so + * authorization is unchanged. Every other route leaves it unset (`v2-api-conventions`). + */ + entityTag?(result: NoInfer): string +} + +/** `If-None-Match` uses weak comparison (RFC 9110 §13.1.2), so `W/` prefixes are ignored. */ +function ifNoneMatchSatisfied(header: string | null, tag: string): boolean { + if (!header) return false + return header + .split(',') + .map((candidate) => candidate.trim().replace(/^W\//, '')) + .some((candidate) => candidate === '*' || candidate === tag) } /** @@ -594,6 +610,14 @@ export function defineV2JsonRoute< input, request, }) + const entityTag = options.entityTag ? `"${options.entityTag(result)}"` : undefined + if (entityTag && ifNoneMatchSatisfied(request.headers.get('if-none-match'), entityTag)) { + await options.onSuccess?.({ principal: auth.principal, input, result }) + return new NextResponse(null, { + status: 304, + headers: { 'Cache-Control': 'private, no-store', ETag: entityTag }, + }) + } const body = await options.present(result, parsed.data) const responseSchema = options.contract.response if (responseSchema.mode !== 'json') { @@ -609,7 +633,10 @@ export function defineV2JsonRoute< await options.onSuccess?.({ principal: auth.principal, input, result }) return NextResponse.json(validatedBody, { status: responseStatus, - headers: { 'Cache-Control': 'private, no-store' }, + headers: { + 'Cache-Control': 'private, no-store', + ...(entityTag ? { ETag: entityTag } : {}), + }, }) } catch (error) { const response = options.errorPolicy.render(error) diff --git a/apps/sim/lib/api/server/routes/v2-route-table.generated.ts b/apps/sim/lib/api/server/routes/v2-route-table.generated.ts index 2419cea30ab..6da3bbcba32 100644 --- a/apps/sim/lib/api/server/routes/v2-route-table.generated.ts +++ b/apps/sim/lib/api/server/routes/v2-route-table.generated.ts @@ -924,6 +924,10 @@ export const V2_ROUTES: readonly V2RouteEntry[] = [ pattern: '/api/v2/workspaces/{workspaceId}/access-requests/discovery', load: () => import('@/app/api/v2/workspaces/[workspaceId]/access-requests/discovery/route'), }, + { + pattern: '/api/v2/workspaces/{workspaceId}/block-catalog', + load: () => import('@/app/api/v2/workspaces/[workspaceId]/block-catalog/route'), + }, { pattern: '/api/v2/workspaces/{workspaceId}/fork', load: () => import('@/app/api/v2/workspaces/[workspaceId]/fork/route'), diff --git a/apps/sim/lib/core/config/env.ts b/apps/sim/lib/core/config/env.ts index 5606ea7b2c2..335020ae680 100644 --- a/apps/sim/lib/core/config/env.ts +++ b/apps/sim/lib/core/config/env.ts @@ -620,6 +620,7 @@ export const env = createEnv({ DASHBOARDS: z.boolean().optional(), PROJECTS: z.boolean().optional(), // Fallback for the `projects` feature flag off AppConfig WORKFLOW_TESTS: z.boolean().optional(), // Fallback for the `workflow-tests` feature flag off AppConfig + WORKFLOW_CODE: z.boolean().optional(), // Fallback for the `workflow-code` feature flag off AppConfig CHANGELOG: z.boolean().optional(), // Fallback for the `changelog` feature flag off AppConfig SIM_LINKS: z.boolean().optional(), // Fallback for the `sim-links` feature flag off AppConfig PEOPLE: z.boolean().optional(), // Fallback for the `people` feature flag off AppConfig diff --git a/apps/sim/lib/core/config/feature-flags.ts b/apps/sim/lib/core/config/feature-flags.ts index 7e17073ae8b..cb0c0f65a9d 100644 --- a/apps/sim/lib/core/config/feature-flags.ts +++ b/apps/sim/lib/core/config/feature-flags.ts @@ -56,6 +56,11 @@ const FEATURE_FLAGS = { 'Enable workflow tests: the workspace Tests page, tests/.test.js files, and the Sim tests tool. Supports global and organization rollout; disabled by default.', fallback: 'WORKFLOW_TESTS', }, + 'workflow-code': { + description: + 'Enable code-first workflows: the block catalog for the workflow SDK, workflow source read and apply, and the read-only Code tab. Global on/off; disabled by default.', + fallback: 'WORKFLOW_CODE', + }, changelog: { description: 'Enable the workspace Changelog: the Changelog page, changelog/.md release bodies, and the Sim changelog tool. Supports global and organization rollout; disabled by default.', diff --git a/apps/sim/lib/workflows/code/catalog/operations.ts b/apps/sim/lib/workflows/code/catalog/operations.ts new file mode 100644 index 00000000000..b578d6fe8bb --- /dev/null +++ b/apps/sim/lib/workflows/code/catalog/operations.ts @@ -0,0 +1,28 @@ +import { defineWorkspaceOperation } from '@/lib/core/application/workspace-operation' + +/** + * Semantic operations for the workflow-SDK block catalog. + * + * Same policy as `catalog.blocks.list` (s4 §2): a workspace read at the `read` role, reachable by + * a workspace API key and by Copilot delegation, because it is the same per-workspace block + * availability projected into the shape the workflow compiler reads. + */ +export const workflowCodeCatalogOperations = { + // permission-group-exempt: the compile catalog is the block catalog in another shape; withholding it hides the product rather than restricting it + read: defineWorkspaceOperation({ + id: 'workflows.code.catalog.read', + oauthScope: 'api:read', + minimumRole: 'read', + workspaceApiKey: 'allow', + capability: 'none', + contentDelivery: 'none', + principalKinds: [ + 'session', + 'personal_api_key', + 'oauth_access_token', + 'workspace_api_key', + 'delegated', + ], + delegatedServices: ['copilot'], + }), +} as const diff --git a/apps/sim/lib/workflows/code/catalog/read-block-catalog.ts b/apps/sim/lib/workflows/code/catalog/read-block-catalog.ts new file mode 100644 index 00000000000..b11e38dfd3c --- /dev/null +++ b/apps/sim/lib/workflows/code/catalog/read-block-catalog.ts @@ -0,0 +1,73 @@ +import { db } from '@sim/db' +import { workflow, workflowBlocks } from '@sim/db/schema' +import type { BlockCatalog } from '@sim/workflow-code' +import { and, eq, isNull } from 'drizzle-orm' +import { catalogDelegationPolicy } from '@/lib/catalog/application/authorization' +import { + loadCatalogWorkspaceContext, + resolveCatalogGate, + withCatalogBlockScope, +} from '@/lib/catalog/application/context' +import { defineAuthorizedWorkspaceUseCase } from '@/lib/core/application' +import { OrchestrationError } from '@/lib/core/orchestration/types' +import { workflowCodeCatalogOperations } from '@/lib/workflows/code/catalog/operations' +import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog' +import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' + +interface ReadBlockCatalogInput { + workspaceId: string + /** Adds this workflow's stored block types (the per-workflow compile catalog, s4 §2). */ + workflowId?: string +} + +/** + * The distinct block types placed in an active workflow of this workspace. A workflow in another + * workspace, or archived, answers as absent so the read cannot probe workflow ids. + */ +async function loadStoredBlockTypes(workspaceId: string, workflowId: string): Promise { + const [owned] = await db + .select({ id: workflow.id }) + .from(workflow) + .where( + and( + eq(workflow.id, workflowId), + eq(workflow.workspaceId, workspaceId), + isNull(workflow.archivedAt) + ) + ) + .limit(1) + if (!owned) throw new OrchestrationError('not_found', 'Workflow not found') + const rows = await db + .selectDistinct({ type: workflowBlocks.type }) + .from(workflowBlocks) + .where(eq(workflowBlocks.workflowId, workflowId)) + return rows.map((row) => row.type) +} + +/** + * The block catalog the workflow compiler, printer and SDK type generator read: the blocks this + * caller may place in the workspace (the same allowlist, preview reveals and custom blocks as the + * block list), or with `workflowId` the compile catalog for that workflow. Not audited: reading a + * catalog is not a semantic event, matching the other catalog reads. + */ +export const readWorkflowCodeCatalog = defineAuthorizedWorkspaceUseCase({ + operation: workflowCodeCatalogOperations.read, + resolveContext: ({ input }: { input: ReadBlockCatalogInput }) => + loadCatalogWorkspaceContext(input.workspaceId), + authorizationOptions: { delegation: catalogDelegationPolicy }, + execute: async ({ principal, input, context }): Promise => { + await requireWorkflowCodeEnabled() + const [gate, storedTypes] = await Promise.all([ + resolveCatalogGate(principal, context, { customBlockInputs: true }), + input.workflowId ? loadStoredBlockTypes(context.workspaceId, input.workflowId) : undefined, + ]) + return withCatalogBlockScope(gate, async () => { + const { catalog } = buildCodeCatalog({ + gate, + organizationId: context.workspaceOrganizationId, + ...(storedTypes ? { storedTypes } : {}), + }) + return catalog + }) + }, +}) diff --git a/apps/sim/lib/workflows/code/catalog/workspace-catalog.ts b/apps/sim/lib/workflows/code/catalog/workspace-catalog.ts new file mode 100644 index 00000000000..d64ac56b6dd --- /dev/null +++ b/apps/sim/lib/workflows/code/catalog/workspace-catalog.ts @@ -0,0 +1,56 @@ +import type { CatalogGate } from '@/lib/catalog/application/context' +import { isBlockVisibleToCaller } from '@/lib/catalog/application/context' +import { buildBlockCatalog, type CatalogBuildResult } from '@/lib/workflows/code/catalog/build' +import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' +import { getAllBlocks, getBlock, getBlockRegistry } from '@/blocks/registry' +import { SDK_NAMES } from '@/blocks/sdk-names.generated' +import type { BlockConfig } from '@/blocks/types' +import { getToolMetadata } from '@/tools/metadata' +import { getToolOutputsMetadata } from '@/tools/metadata-outputs' + +interface CodeCatalogScope { + gate: CatalogGate + organizationId: string | null + /** Block types stored in the workflow, for the per-workflow compile catalog (s4 step 2). */ + storedTypes?: readonly string[] +} + +/** + * The workspace catalog, or with `storedTypes` the per-workflow compile catalog: the blocks this + * caller may place, sunset blocks included (existing placements must still compile), plus every + * type already stored in the workflow that the caller could not place, marked `addable: false`. + * + * MUST run inside `withCatalogBlockScope(gate, …)`: visibility and the org's custom blocks are + * resolved from that scope. Built-in blocks are projected from the raw registry config, not the + * viewer projection, so a revealed preview block's display suffix never changes the hash. + */ +export function buildCodeCatalog(scope: CodeCatalogScope): CatalogBuildResult { + const registry = getBlockRegistry() + const included = new Map() + for (const block of getAllBlocks()) { + if (!isBlockVisibleToCaller(block, scope.gate, { includeSunset: true })) continue + included.set(block.type, Object.hasOwn(registry, block.type) ? registry[block.type] : block) + } + + const notAddable = new Set() + for (const type of scope.storedTypes ?? []) { + if (included.has(type)) continue + const block = Object.hasOwn(registry, type) ? registry[type] : getBlock(type) + if (!block) continue + included.set(type, block) + notAddable.add(type) + } + + return buildBlockCatalog( + { + blocks: [...included.values()], + notAddable, + trigger: registryTrigger, + sdkNames: SDK_NAMES, + ...(scope.organizationId && scope.gate.customBlockRows.length > 0 + ? { scope: { organizationId: scope.organizationId } } + : {}), + }, + { metadata: getToolMetadata, outputs: getToolOutputsMetadata } + ) +} diff --git a/apps/sim/lib/workflows/code/feature-flag.ts b/apps/sim/lib/workflows/code/feature-flag.ts new file mode 100644 index 00000000000..3a375de31d8 --- /dev/null +++ b/apps/sim/lib/workflows/code/feature-flag.ts @@ -0,0 +1,12 @@ +import { isFeatureEnabled } from '@/lib/core/config/feature-flags' +import { OrchestrationError } from '@/lib/core/orchestration/types' + +/** + * Code-first workflows (the SDK block catalog, workflow source read and apply, the Code tab) ship + * behind one global `workflow-code` flag; every surface of the feature gates through here. + */ +export async function requireWorkflowCodeEnabled(): Promise { + if (!(await isFeatureEnabled('workflow-code'))) { + throw new OrchestrationError('forbidden', 'Code-first workflows are not enabled') + } +} diff --git a/packages/sim-cli/src/generated/v2-api.ts b/packages/sim-cli/src/generated/v2-api.ts index 9671fb4c610..afb519f6b6d 100644 --- a/packages/sim-cli/src/generated/v2-api.ts +++ b/packages/sim-cli/src/generated/v2-api.ts @@ -6095,6 +6095,320 @@ export type GetBlockResponse = { data: GetBlockResponseRef6 } +/** `GET /api/v2/workspaces/[workspaceId]/block-catalog` */ +export type GetBlockCatalogParams = { + workspaceId: string +} + +export type GetBlockCatalogQuery = { + workflowId?: string +} + +export type GetBlockCatalogHeaders = { + 'if-none-match'?: string +} + +export type GetBlockCatalogResponse = { + data: { + catalogVersion: 1 + hash: string + sdkMajor: number + blocks: Record< + string, + { + type: string + name: string + category: 'blocks' | 'tools' | 'triggers' + addable?: false + lifecycle?: { + hidden?: true + preview?: true + sunset?: { + status: 'legacy' | 'deprecated' + replacedBy?: string + } + } + triggerAllowed?: boolean + triggers?: { + enabled: boolean + available: Array + } + singleInstance?: boolean + subBlocks: Array<{ + id: string + type: string + title?: string + mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' + canonicalParamId?: string + surface?: 'action' | 'trigger' + condition?: + | { + field: string + value: string | number | boolean | Array + not?: boolean + and?: { + field: string + value?: string | number | boolean | Array + not?: boolean + } + } + | { + opaque: true + } + visibleFor?: Record + required?: + | boolean + | { + field: string + value: string | number | boolean | Array + not?: boolean + and?: { + field: string + value?: string | number | boolean | Array + not?: boolean + } + } + | { + opaque: true + } + dependsOn?: { + all: Array + any: Array + } + defaultValue?: unknown + valueDefault?: + | { + computed: true + } + | { + constant: unknown + } + options?: + | Array<{ + id: string + label: string + }> + | { + dynamic: true + } + | { + opaque: true + } + hidden?: boolean + readOnly?: boolean + password?: boolean + hideFromCopilot?: boolean + context?: 'tool-input' + paramVisibility?: string + emptyIsValid?: boolean + language?: string + multiple?: boolean + min?: number + max?: number + step?: number + integer?: boolean + columns?: Array + selectorKey?: string + serviceId?: string + valueKind: + | 'string' + | 'number' + | 'boolean' + | 'array' + | 'object' + | 'json' + | 'code' + | 'branches' + | 'tools' + | 'resource' + | 'picked' + | 'upload' + | 'none' + resourceKind?: string + storage: 'native' | 'json-string' + structured?: 'tools' | 'branches' | 'tableRows' | 'inputFormat' | 'variables' + }> + tools: { + access: Array + selector: 'single' | 'operation' | 'opaque' + } + inputs: Record< + string, + { + type: string + schema?: unknown + } + > + outputs: Record< + string, + { + type: string + description?: string + condition?: unknown + hiddenFromDisplay?: boolean + properties?: Record + items?: unknown + } + > + dynamicOutputs?: { + source: 'responseFormat' | 'inputFormat' | 'humanForm' | 'tableRows' + param: string + } + graph: { + canBeTarget: boolean + errorPort: boolean + container: 'loop' | 'parallel' | null + annotationOnly: boolean + branches?: { + subBlockId: string + kind: 'condition' | 'router' + } + } + legacyIds?: Array<{ + from: string + to: string | null + whenOperation?: Array + conditional?: true + }> + legacyCanonicalIds?: Array<{ + from: string + to: string + }> + custom?: { + sourceWorkflowId?: string + } + } + > + triggers: Record< + string, + { + id: string + provider: string + name: string + polling?: boolean + webhook?: boolean + subBlocks: Array<{ + id: string + type: string + title?: string + mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' + canonicalParamId?: string + surface?: 'action' | 'trigger' + condition?: + | { + field: string + value: string | number | boolean | Array + not?: boolean + and?: { + field: string + value?: string | number | boolean | Array + not?: boolean + } + } + | { + opaque: true + } + visibleFor?: Record + required?: + | boolean + | { + field: string + value: string | number | boolean | Array + not?: boolean + and?: { + field: string + value?: string | number | boolean | Array + not?: boolean + } + } + | { + opaque: true + } + dependsOn?: { + all: Array + any: Array + } + defaultValue?: unknown + valueDefault?: + | { + computed: true + } + | { + constant: unknown + } + options?: + | Array<{ + id: string + label: string + }> + | { + dynamic: true + } + | { + opaque: true + } + hidden?: boolean + readOnly?: boolean + password?: boolean + hideFromCopilot?: boolean + context?: 'tool-input' + paramVisibility?: string + emptyIsValid?: boolean + language?: string + multiple?: boolean + min?: number + max?: number + step?: number + integer?: boolean + columns?: Array + selectorKey?: string + serviceId?: string + valueKind: + | 'string' + | 'number' + | 'boolean' + | 'array' + | 'object' + | 'json' + | 'code' + | 'branches' + | 'tools' + | 'resource' + | 'picked' + | 'upload' + | 'none' + resourceKind?: string + storage: 'native' | 'json-string' + structured?: 'tools' | 'branches' | 'tableRows' | 'inputFormat' | 'variables' + }> + outputs: Record< + string, + { + type: string + description?: string + condition?: unknown + hiddenFromDisplay?: boolean + properties?: Record + items?: unknown + } + > + } + > + builders: Record< + string, + { + type: string + operation?: string + triggerMode?: boolean + fixed?: Record + } + > + scope?: { + organizationId: string + } + } +} + /** `GET /api/v2/custom-tools/[customToolId]` */ export type GetCustomToolParams = { customToolId: string @@ -19205,6 +19519,30 @@ export const V2_OPERATIONS = { }, }, }, + getBlockCatalog: { + method: 'GET', + path: '/api/v2/workspaces/[workspaceId]/block-catalog', + pathParams: ['workspaceId'] as const, + pathParamDocs: { + workspaceId: + 'Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what the catalog contains.', + }, + responseMode: 'json', + summary: 'Get block catalog', + query: { + workflowId: { + kind: 'string', + describe: + 'Return the compile catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`.', + }, + }, + headers: { + 'if-none-match': { + kind: 'string', + describe: 'A catalog `hash` (quoted, as sent in `ETag`) the caller already holds.', + }, + }, + }, getCustomTool: { method: 'GET', path: '/api/v2/custom-tools/[customToolId]', From 5580f0c7d71367584289a919e98c8689e7427d07 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:32:20 -0800 Subject: [PATCH 031/428] feat(workflow-code): code-file codec for the printer's self-check --- .../{code-files.test.ts => bijection.test.ts} | 22 ++++++++++++++++++- .../workflow-code/src/code-files/bijection.ts | 21 ++++++++++++++++++ .../workflow-code/src/code-files/index.ts | 8 +++++-- .../workflow-code/src/code-files/to-file.ts | 4 ---- 4 files changed, 48 insertions(+), 7 deletions(-) rename packages/workflow-code/src/code-files/{code-files.test.ts => bijection.test.ts} (88%) diff --git a/packages/workflow-code/src/code-files/code-files.test.ts b/packages/workflow-code/src/code-files/bijection.test.ts similarity index 88% rename from packages/workflow-code/src/code-files/code-files.test.ts rename to packages/workflow-code/src/code-files/bijection.test.ts index d5a819166cc..cd4a8dccaaa 100644 --- a/packages/workflow-code/src/code-files/code-files.test.ts +++ b/packages/workflow-code/src/code-files/bijection.test.ts @@ -1,6 +1,12 @@ import fc from 'fast-check' import { describe, expect, it } from 'vitest' -import { checkCodeFileBijection, codeFileLanguage, fromCodeFile, toCodeFile } from './index' +import { + checkCodeFileBijection, + codeFileCodec, + codeFileLanguage, + fromCodeFile, + toCodeFile, +} from './index' describe('toCodeFile rewrites only code-position tokens', () => { it.each([ @@ -106,6 +112,20 @@ describe('checkCodeFileBijection', () => { }) }) +describe('codeFileCodec (the printer interface)', () => { + it('returns the file form only when it reads back exactly', () => { + expect(codeFileCodec.toFile('return ', 'javascript')).toBe('return $ref.a.b') + expect(codeFileCodec.toFile('return .length', 'javascript')).toBeNull() + expect(codeFileCodec.toFile('return (', 'javascript')).toBeNull() + }) + + it('reads a file back, or null when it does not parse', () => { + expect(codeFileCodec.fromFile('return $ref.a.b', 'javascript')).toBe('return ') + expect(codeFileCodec.fromFile('return (', 'javascript')).toBeNull() + expect(codeFileCodec.fromFile('return (', 'shell')).toBe('return (') + }) +}) + describe('codeFileLanguage', () => { it.each([ ['fns/a.js', 'javascript'], diff --git a/packages/workflow-code/src/code-files/bijection.ts b/packages/workflow-code/src/code-files/bijection.ts index 7951e197c75..08702a60523 100644 --- a/packages/workflow-code/src/code-files/bijection.ts +++ b/packages/workflow-code/src/code-files/bijection.ts @@ -25,3 +25,24 @@ export function checkCodeFileBijection( if (!back.ok) return { ok: false, reason: 'syntax' } return back.code === code ? { ok: true, file } : { ok: false, reason: 'lossy' } } + +/** + * The code-file codec the printer takes (`createPrintWorkflow(codec)`, src/print/printer.ts): + * `toFile` is `null` unless the file form reads back to the stored code exactly, and `fromFile` + * is `null` for a file that does not parse. + */ +export interface CodeFileCodec { + toFile(code: string, language: CodeFileLanguage): string | null + fromFile(text: string, language: CodeFileLanguage): string | null +} + +export const codeFileCodec: CodeFileCodec = { + toFile(code, language) { + const check = checkCodeFileBijection(code, language) + return check.ok ? check.file : null + }, + fromFile(text, language) { + const back = fromCodeFile(text, language) + return back.ok ? back.code : null + }, +} diff --git a/packages/workflow-code/src/code-files/index.ts b/packages/workflow-code/src/code-files/index.ts index 750e30a9768..a6f12fd57dd 100644 --- a/packages/workflow-code/src/code-files/index.ts +++ b/packages/workflow-code/src/code-files/index.ts @@ -1,8 +1,12 @@ -export { type CodeFileBijection, checkCodeFileBijection } from './bijection' +export { + type CodeFileBijection, + type CodeFileCodec, + checkCodeFileBijection, + codeFileCodec, +} from './bijection' export { type CodeFileSyntaxError, type FromCodeFileResult, fromCodeFile } from './from-file' export { type CodeFileLanguage, - codeFileExtension, codeFileLanguage, toCodeFile, } from './to-file' diff --git a/packages/workflow-code/src/code-files/to-file.ts b/packages/workflow-code/src/code-files/to-file.ts index c61d919fe19..26cf384ce14 100644 --- a/packages/workflow-code/src/code-files/to-file.ts +++ b/packages/workflow-code/src/code-files/to-file.ts @@ -17,10 +17,6 @@ const CODE_FILE_EXTENSIONS: Record = { /** Candidate tokens: `` on one line, or `{{NAME}}`. */ const TOKEN = /<([^<>\s]+)>|\{\{([^{}\s]+)\}\}/g -export function codeFileExtension(language: CodeFileLanguage): string { - return CODE_FILE_EXTENSIONS[language] -} - /** The language a code file's extension names, or `null` for any other extension. */ export function codeFileLanguage(path: string): CodeFileLanguage | null { for (const [language, extension] of Object.entries(CODE_FILE_EXTENSIONS)) { From e2dbeb5ec1b85cd144be55fafb16287b00530cca Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:32:21 -0800 Subject: [PATCH 032/428] feat(workflow-code): compile workflow sources to the canonical model --- packages/workflow-code/src/compile/SYNTAX.md | 120 ++ .../src/compile/__printer__/cases.ts | 838 +++++++++++++ .../src/compile/__printer__/catalog.ts | 299 +++++ .../src/compile/__printer__/goldens.ts | 71 ++ packages/workflow-code/src/compile/blocks.ts | 1058 +++++++++++++++++ .../workflow-code/src/compile/comments.ts | 153 +++ packages/workflow-code/src/compile/context.ts | 156 +++ packages/workflow-code/src/compile/edges.ts | 359 ++++++ .../workflow-code/src/compile/grammar.test.ts | 905 ++++++++++++++ packages/workflow-code/src/compile/hints.ts | 148 +++ .../workflow-code/src/compile/hostile.test.ts | 161 +++ packages/workflow-code/src/compile/index.ts | 459 +++++++ packages/workflow-code/src/compile/parse.ts | 243 ++++ .../src/compile/printer-goldens.test.ts | 120 ++ packages/workflow-code/src/compile/report.ts | 108 ++ packages/workflow-code/src/compile/scope.ts | 392 ++++++ .../workflow-code/src/compile/test-catalog.ts | 236 ++++ .../src/compile/throughput.bench.ts | 89 ++ packages/workflow-code/src/compile/tools.ts | 349 ++++++ .../src/compile/validate-catalog.ts | 162 +++ packages/workflow-code/src/compile/values.ts | 895 ++++++++++++++ 21 files changed, 7321 insertions(+) create mode 100644 packages/workflow-code/src/compile/SYNTAX.md create mode 100644 packages/workflow-code/src/compile/__printer__/cases.ts create mode 100644 packages/workflow-code/src/compile/__printer__/catalog.ts create mode 100644 packages/workflow-code/src/compile/__printer__/goldens.ts create mode 100644 packages/workflow-code/src/compile/blocks.ts create mode 100644 packages/workflow-code/src/compile/comments.ts create mode 100644 packages/workflow-code/src/compile/context.ts create mode 100644 packages/workflow-code/src/compile/edges.ts create mode 100644 packages/workflow-code/src/compile/grammar.test.ts create mode 100644 packages/workflow-code/src/compile/hints.ts create mode 100644 packages/workflow-code/src/compile/hostile.test.ts create mode 100644 packages/workflow-code/src/compile/index.ts create mode 100644 packages/workflow-code/src/compile/parse.ts create mode 100644 packages/workflow-code/src/compile/printer-goldens.test.ts create mode 100644 packages/workflow-code/src/compile/report.ts create mode 100644 packages/workflow-code/src/compile/scope.ts create mode 100644 packages/workflow-code/src/compile/test-catalog.ts create mode 100644 packages/workflow-code/src/compile/throughput.bench.ts create mode 100644 packages/workflow-code/src/compile/tools.ts create mode 100644 packages/workflow-code/src/compile/validate-catalog.ts create mode 100644 packages/workflow-code/src/compile/values.ts diff --git a/packages/workflow-code/src/compile/SYNTAX.md b/packages/workflow-code/src/compile/SYNTAX.md new file mode 100644 index 00000000000..05461b43de1 --- /dev/null +++ b/packages/workflow-code/src/compile/SYNTAX.md @@ -0,0 +1,120 @@ +# Workflow source syntax the compiler accepts + +The compiler (`compileWorkflow`) accepts exactly what the Wave 2C printer emits, plus a few +hand-written conveniences listed under "Also accepted". `printer-goldens.test.ts` compiles every +printer golden with zero errors back to its canonical workflow. Where s2 and s3 disagreed, the +printer's choice (build-spec first, then s2) was taken. + +## File + +- Line 1 is `// @sim-sdk N`; a missing header is `E_SDK_HEADER`, `N` above the caller's major is + `E_SDK_MAJOR`. +- Imports: named imports from `'@sim/workflow-sdk'` only (aliases allowed). Anything else is + `E_UNSUPPORTED_SYNTAX`. +- Exactly one `export default workflow(name, options?, body)`. `options` is + `{ description?, variables? }`. `body` is `() => { ... }` or `({ vars }) => { ... }`. +- Variables: `variables: { : { name?, type, value } }`. The property key is the variable + key; `name` is written only when it differs from the key. `value` is plain JSON. + +## Blocks + +- `const x = builder('Name', params?, meta?)`, or a bare `builder(...)` statement (no binding). + The builder is the dotted catalog path (`slack.sendMessage`, `trigger.gmail.poller`). +- `block(type, 'Name', params?, meta?)` for any type: unknown, legacy, or a builder that does not + fit. With a catalog type, params are checked against its fields; without one, they are kept + verbatim. +- Params: a subBlock id, or the `canonicalParamId` for every subBlock group sharing one (even a + group of one). Writing a group member by its own id is `E_UNKNOWN_PARAM` with a hint. A pinned + id (`operation`, a builder's `fixed`) is `E_FIXED_PARAM`; the compiler adds pinned values. +- Pair mode: a selector call (`binding`, `table`, `kb`, `workflow`, `skill`, `customTool`, `mcp`, + `sandbox`, `folder`, `upload`, `picked`) or a non-empty array of them is basic, anything else + advanced. `meta.modes` always wins (it is printed exactly when derivation would be wrong), so + the compiler never emits `E_MODE_CONFLICT`. Every group on the block gets a mode; an unwritten + group without `meta.modes` is `basic`. +- `meta`: `disabled`, `locked`, `advancedMode`, `triggerMode` (any builder), `errorPort`, + `retry: { enabled, maxTries, waitBetweenTriesMs }`, `modes`, `branches`, `inactive`, + `$unknown` (opaque `block.data`, plain JSON). +- `errorPort` in the CWM is `meta.errorPort || the block has an error edge`. +- `inactive: { : value }` accepts any id (annotated stale values, the non-effective + pair member, ids the catalog does not know). Each id becomes a param and is listed in + `annotations.inactive`. + +## Values + +- Literals, objects, arrays, `-number`. `null` as a whole param means absent; nested `null` is + kept. A plain object with a `$sim` key is data and compiles to `{ $sim: 'literal', value }`. +- `raw(v)`: the CWM value verbatim (literals only). `$sim` objects inside are canonical nodes, + shape-checked; a `literal` node's `value` is not inspected. +- `todo()`: absent, with `W_REQUIRED_MISSING` when the field is required. +- Strings: `'...'`, untagged templates without `${}`, and `t`/`js`/`py`/`sh`/`json`/`md` tagged + templates (cooked text). Interpolations: refs, `env.X`, `vars.x`, loop params, `ref('raw')`, + string and number literals. +- Refs: `blk.a.b` → ``, `blk['x-y']` → ``, `blk.items[0]` → ``, + `blk.items['0']` → ``. `env.X` / `env['X']` → `{{X}}` (name must match + `[A-Za-z_][A-Za-z0-9_]*`). `ref('Raw.path')` → ``. +- `vars.x`: inside a variables-input field (`structured: 'variables'`) a bare `vars.x` is the + variable node `{ $sim: 'var', key }`; everywhere else, and inside any template, it is the text + ``. +- A JSON code field (subBlock type `code`) written as an object or array literal compiles to + `JSON.stringify(value, null, 2)`. +- inputFormat (`structured: 'inputFormat'`) as a record: `name: 'string'` → + `{ name, type: 'string', value: '' }`; `name: { type, ... }` → `{ name, type, ... }`. Arrays + pass through. +- Function code: `code: file('./functions/x.js')`, relative to the entry file, extension matching + `language` (default `javascript`). JavaScript files have `$ref`/`$env` chains rewritten back + (`src/code-files`); Python and shell are verbatim. +- Tools (`valueKind: 'tools'`): an array of `ns.tool.method(params, options?)` / + `method.tool(params, options?)` and `raw(tool)`. Options: `operation`, `toolId`, `title`, + `usageControl`, `usageControlExpression`, `modes`, `customTool`, `operationPolicy`, `extra`. + +## Branches + +- Condition builder: the params object holds the rows; a key that is a catalog field is a param + instead. `else: true` (last row) is the empty else. Rows are strings or templates. +- Router: `routes: { key: text }`. `block('condition', ...)` uses `conditions: { ... }`. +- `{}` (or `routes: {}`) is `rows: null`; the implicit ports `if`/`else` and `route0` stay + addressable. +- Per-row `title`/`extra` go in `meta.branches: { key: { title?, extra? } }`. +- Two or more condition rows must end with `else` (`E_BRANCH_ELSE_LAST`). A key equal to an output + name, `to` or `onError` is `E_BRANCH_KEY_COLLIDES`. + +## Containers + +- `loop.for('N', { count })`, `loop.forEach('N', { collection })`, + `loop.while('N', { condition })`, `loop.doWhile('N', { condition })`, + `parallel.count('N', { count, batchSize })`, `parallel.collection('N', { collection, batchSize })`, + and bare `parallel('N', { count, collection, batchSize })` (no `parallelType`). +- Third argument: `(p) => { ... }`, or `(p) => block(...)` which implies `p.to(block)`. +- The type's other stored fields go under `meta.inactive` by CWM name (`iterations`, + `forEachItems`, `whileCondition`, `doWhileCondition`, `count`, `distribution`); other inactive + keys are container params. A loop with no `iterations` anywhere gets 5. +- `p.x` is `` / `` when `p`'s container is the innermost of its kind around + the block, else the named ``. `container.results` / `container.index` are named + refs. + +## Wiring + +- `a.to(b, c)` (fan-out), chains `a.to(b).to(c)`, groups `a.to(b, c).to(d)` (fan-in), + `a.onError(b)` (not chainable), `cond.key.to(x)`, `p.to(x)` / `p.start.to(x)`, and + `container.to(x)` (end port). +- `edge(a, 'handle', b)`: `'source'` is the out port (how the printer writes it for a condition, + router or container), `'loop-start-source'`/`'parallel-start-source'` the start port, + `'loop-end-source'`/`'parallel-end-source'` the end port, anything else a raw port. + `W_RAW_HANDLE` either way; the start/end child checks do not apply to `edge()`. + +## Comments + +- Before the first import, and between imports: `header`. After the export: `footer`. +- Same line after an item: trailing on it; otherwise leading on the next item; after the last + item: `footer` in a body, trailing on the last param in a params object. +- Items: statements (`block` / `edges` anchors), params (`param`, the written name, so the + canonical id for pairs), `inactive` entries, variables (`var`). +- The group above the first top-level wiring statement goes to `wiring` only when a blank line + separates it from the statement; otherwise it goes to that statement's `edges` anchor. +- Anything inside an expression is hoisted to the enclosing anchor with `W_COMMENT_MOVED`. +- Branch rows take `param` anchors keyed by the branch key. + +## Also accepted (hand-written conveniences) + +- `p.start.to(x)` alongside `p.to(x)`; `env['X']`; `blk['to']` and non-call `blk.to` as refs. +- `raw([...])` for a whole tool list. diff --git a/packages/workflow-code/src/compile/__printer__/cases.ts b/packages/workflow-code/src/compile/__printer__/cases.ts new file mode 100644 index 00000000000..7e323ece03f --- /dev/null +++ b/packages/workflow-code/src/compile/__printer__/cases.ts @@ -0,0 +1,838 @@ +/** + * Hand-built canonical workflows, one per printer construct (golden snapshots in `__golden__/`). + * Each case names the behavior it pins so a golden diff points at the construct that changed. + */ + +import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' +import { encodeAnchor } from '../../anchors' +import type { LockHints } from '../../api' +import type { + AnchorKey, + CanonicalBlock, + CanonicalEdge, + CanonicalParam, + CanonicalTool, + CanonicalVariable, + CanonicalWorkflow, + CodeComment, + Port, + Value, +} from '../../model' + +export interface PrintCase { + name: string + workflow: CanonicalWorkflow + hints?: LockHints +} + +type BlockInit = Partial> & { + params?: Record + tools?: Record +} + +function blk(name: string, type: string, init: BlockInit = {}): CanonicalBlock { + const { params = {}, tools = {}, ...rest } = init + const canonicalParams: Record = {} + for (const [id, value] of Object.entries(params)) canonicalParams[id] = { kind: 'value', value } + for (const [id, list] of Object.entries(tools)) + canonicalParams[id] = { kind: 'tools', tools: list } + return { + key: normalizeWorkflowBlockName(name), + name, + type, + parent: null, + enabled: true, + locked: false, + triggerMode: false, + advancedMode: false, + errorPort: false, + retry: null, + params: canonicalParams, + modes: {}, + ...rest, + } +} + +function edge(from: string, to: string, port: Port = { kind: 'out' }): CanonicalEdge { + return { from, port, to } +} + +interface WorkflowInit { + name?: string + description?: string | null + blocks: CanonicalBlock[] + edges?: CanonicalEdge[] + variables?: CanonicalVariable[] + inactive?: Record + comments?: Array<[AnchorKey, CodeComment[]]> +} + +function wf(init: WorkflowInit): CanonicalWorkflow { + return { + modelVersion: 1, + meta: { name: init.name ?? 'Fixture', description: init.description ?? null }, + blocks: Object.fromEntries(init.blocks.map((block) => [block.key, block])), + edges: init.edges ?? [], + variables: Object.fromEntries( + (init.variables ?? []).map((variable) => [variable.key, variable]) + ), + annotations: { + inactive: init.inactive ?? {}, + comments: Object.fromEntries(init.comments ?? []), + }, + } +} + +const line = (text: string, placement: 'leading' | 'trailing' = 'leading'): CodeComment => ({ + text: ` ${text}`, + kind: 'line', + placement, +}) + +const start = (name = 'Start', inputFormat: Value = []) => + blk(name, 'start_trigger', { params: { inputFormat } }) + +export const cases: PrintCase[] = [ + { + name: 'minimal-trigger', + workflow: wf({ name: 'Hello', blocks: [start()] }), + }, + { + name: 'support-triage', + workflow: wf({ + name: 'Support triage', + description: 'Classifies inbound tickets and routes them.', + variables: [{ key: 'escalations', name: 'escalations', type: 'number', value: 0 }], + blocks: [ + blk('Ticket in', 'webhook', { + params: { + requireAuth: true, + token: '{{TICKETS_WEBHOOK_TOKEN}}', + inputFormat: [ + { name: 'subject', type: 'string', value: '' }, + { name: 'body', type: 'string', value: '' }, + ], + }, + }), + blk('Classify', 'agent', { + params: { + model: 'claude-sonnet-5-5', + messages: [ + { role: 'system', content: 'Classify support tickets.' }, + { role: 'user', content: '\n\n' }, + ], + temperature: 0.2, + }, + }), + blk('By category', 'condition', { + branches: { + kind: 'condition', + rows: [ + { key: 'billing', value: " === 'billing'" }, + { + key: 'urgent', + value: '.includes("urgent") && < 3', + }, + { key: 'else', value: '' }, + ], + }, + }), + blk('Log ticket', 'table', { + params: { + operation: 'insert_row', + tableSelector: { $sim: 'resource', kind: 'table', key: 'tickets' }, + data: '{\n "subject": ""\n}', + }, + modes: { tableId: 'basic' }, + }), + blk('Notify', 'slack', { + params: { + operation: 'send', + authMethod: 'oauth', + credential: { $sim: 'resource', kind: 'credential', key: 'support-slack' }, + channel: 'C0SUPPORT', + text: 'New ticket: ', + }, + modes: { channel: 'basic' }, + errorPort: true, + }), + blk('Reply', 'response', { + params: { dataMode: 'structured', builderData: { ok: true } }, + }), + ], + edges: [ + edge('bycategory', 'logticket', { kind: 'branch', key: 'billing' }), + edge('bycategory', 'notify', { kind: 'branch', key: 'urgent' }), + edge('bycategory', 'reply', { kind: 'branch', key: 'else' }), + edge('classify', 'bycategory'), + edge('logticket', 'notify'), + edge('logticket', 'notify', { kind: 'error' }), + edge('notify', 'reply'), + edge('ticketin', 'classify'), + ], + }), + }, + { + name: 'string-escapes', + workflow: wf({ + blocks: [ + start(), + blk('Escapes', 'agent', { + params: { + model: "it's a \"model\" with 'quotes'", + systemPrompt: + 'back\\slash `tick` $\u007bnotInterp} tab\there\r\ncrlf line\u2028ls\u2029ps \ud800 lone 漢字 🎉', + messages: [{ role: 'user', content: "single 'quote' only" }], + }, + }), + ], + }), + }, + { + name: 'templates-and-paths', + workflow: wf({ + blocks: [ + start(), + blk('Writer', 'agent', { + params: { + model: 'gpt-5.5', + systemPrompt: 'Line one\nLine two without refs', + messages: [ + { + role: 'user', + content: + 'Items: / / / \nnext', + }, + ], + conversationId: '', + }, + }), + ], + edges: [edge('start', 'writer')], + }), + }, + { + name: 'unresolved-tokens', + workflow: wf({ + blocks: [ + start(), + blk('Html', 'agent', { + params: { + model: '{{ not valid }}', + systemPrompt: + '
hello
{{lower_ok}} ', + }, + }), + ], + edges: [edge('start', 'html')], + }), + }, + { + name: 'ref-cycle-literalized', + workflow: wf({ + blocks: [ + start(), + blk('Alpha', 'agent', { params: { model: 'm', systemPrompt: 'See ' } }), + blk('Beta', 'agent', { params: { model: 'm', systemPrompt: 'See ' } }), + blk('Self', 'agent', { params: { model: 'm', systemPrompt: 'Me: ' } }), + ], + edges: [edge('start', 'alpha'), edge('alpha', 'beta')], + }), + }, + { + name: 'loop-foreach', + workflow: wf({ + blocks: [ + start('Start', [{ name: 'leads', type: 'array', value: '' }]), + blk('Each lead', 'loop', { + subflow: { + kind: 'loop', + loopType: 'forEach', + iterations: 5, + forEachItems: '', + }, + }), + blk('Lookup', 'api', { + parent: 'eachlead', + params: { + url: 'https://crm.example.com/c/?i=', + method: 'GET', + }, + }), + blk('Score', 'function', { + parent: 'eachlead', + params: { language: 'javascript', code: 'return .score * 2' }, + }), + blk('Summary', 'agent', { + params: { model: 'm', systemPrompt: 'Results: and ' }, + }), + ], + edges: [ + edge('eachlead', 'lookup', { kind: 'subflowStart' }), + edge('eachlead', 'summary', { kind: 'subflowEnd' }), + edge('lookup', 'score'), + edge('start', 'eachlead'), + ], + }), + }, + { + name: 'nested-subflows', + workflow: wf({ + blocks: [ + start(), + blk('Outer', 'loop', { + subflow: { kind: 'loop', loopType: 'for', iterations: 3 }, + }), + blk('Fan', 'parallel', { + parent: 'outer', + subflow: { + kind: 'parallel', + parallelType: 'collection', + distribution: '', + batchSize: 5, + }, + }), + blk('Work', 'agent', { + parent: 'fan', + params: { + model: 'm', + systemPrompt: + 'loop parallel named fan ', + }, + }), + blk('Sibling', 'loop', { + subflow: { + kind: 'loop', + loopType: 'while', + iterations: 5, + whileCondition: ' < 3', + doWhileCondition: '', + }, + }), + blk('Inside sibling', 'agent', { + parent: 'sibling', + params: { model: 'm', systemPrompt: 'cannot see ' }, + }), + ], + edges: [ + edge('fan', 'work', { kind: 'subflowStart' }), + edge('outer', 'fan', { kind: 'subflowStart' }), + edge('outer', 'sibling', { kind: 'subflowEnd' }), + edge('sibling', 'insidesibling', { kind: 'subflowStart' }), + edge('start', 'outer'), + ], + }), + }, + { + name: 'parallel-untyped', + workflow: wf({ + blocks: [ + start(), + blk('Batch', 'parallel', { subflow: { kind: 'parallel', count: 4 } }), + blk('Ping', 'api', { parent: 'batch', params: { url: 'https://x.test/' } }), + ], + edges: [edge('batch', 'ping', { kind: 'subflowStart' }), edge('start', 'batch')], + }), + }, + { + name: 'branches-null-rows', + workflow: wf({ + blocks: [ + start(), + blk('Gate', 'condition', { branches: { kind: 'condition', rows: null } }), + blk('Pick', 'router', { + params: { context: 'ctx', model: 'm' }, + branches: { kind: 'router', rows: null }, + }), + blk('Yes', 'response', { params: { dataMode: 'structured' } }), + ], + edges: [ + edge('gate', 'pick', { kind: 'branch', key: 'if' }), + edge('pick', 'yes', { kind: 'branch', key: 'route0' }), + edge('start', 'gate'), + ], + }), + }, + { + name: 'branch-titles-and-extra', + workflow: wf({ + blocks: [ + start(), + blk('Check', 'condition', { + branches: { + kind: 'condition', + rows: [ + { key: 'big', value: ' > 100', titleOverride: 'Large amount' }, + { key: 'elseIf0', value: '', extra: { legacyFlag: true } }, + { key: 'else', value: 'true' }, + ], + }, + }), + blk('Done', 'response', {}), + ], + edges: [ + edge('check', 'done', { kind: 'branch', key: 'big' }), + edge('check', 'done', { kind: 'branch', key: 'else' }), + edge('check', 'done', { kind: 'branch', key: 'elseIf0' }), + edge('start', 'check'), + ], + }), + }, + { + name: 'router-routes', + workflow: wf({ + blocks: [ + start('Start', [ + { name: 'amount', type: 'number', value: '' }, + { name: 'reason', type: 'string', value: '' }, + ]), + blk('Triage', 'router', { + params: { context: ' for ', model: 'claude-sonnet-5-5' }, + branches: { + kind: 'router', + rows: [ + { key: 'small', value: 'Under $100, auto-approve' }, + { key: 'review', value: 'Needs a manager' }, + ], + }, + }), + blk('Approve', 'response', {}), + blk('Escalate', 'response', {}), + ], + edges: [ + edge('start', 'triage'), + edge('triage', 'approve', { kind: 'branch', key: 'small' }), + edge('triage', 'escalate', { kind: 'branch', key: 'review' }), + ], + }), + }, + { + name: 'pair-modes', + workflow: wf({ + blocks: [ + start(), + blk('Picked basic', 'slack', { + params: { operation: 'send', channel: 'C0ONE', text: 'a' }, + modes: { channel: 'basic' }, + }), + blk('Manual advanced', 'slack', { + params: { operation: 'send', manualChannel: '', text: 'b' }, + modes: { channel: 'advanced' }, + }), + blk('Basic holding text', 'slack', { + params: { operation: 'send', channel: '', text: 'c' }, + modes: { channel: 'basic' }, + }), + blk('Advanced empty', 'slack', { + params: { operation: 'send', text: 'd' }, + modes: { channel: 'advanced' }, + }), + blk('Both members', 'slack', { + params: { operation: 'send', channel: 'C0OLD', manualChannel: 'C0NEW', text: 'e' }, + modes: { channel: 'advanced' }, + }), + ], + }), + }, + { + name: 'resource-nodes', + workflow: wf({ + variables: [ + { key: 'retries', name: 'retries', type: 'number', value: 2 }, + { key: 'lastrun', name: 'Last Run', type: 'string', value: 'never' }, + ], + blocks: [ + start(), + blk('Query', 'table', { + params: { + operation: 'query_rows', + tableSelector: { $sim: 'unresolved', kind: 'table', id: 'tbl_deleted' }, + knowledgeBases: [ + { $sim: 'resource', kind: 'knowledge-base', key: 'docs' }, + { $sim: 'resource', kind: 'knowledge-base', key: 'faq' }, + ], + limit: { + $sim: 'csv', + items: [ + { $sim: 'resource', kind: 'knowledge-document', key: 'a' }, + { $sim: 'unresolved', kind: 'knowledge-document', id: 'doc_9' }, + ], + }, + data: { $sim: 'literal', value: { $sim: 'user data', n: 1 } }, + }, + modes: { tableId: 'basic' }, + }), + blk('Set vars', 'variables', { + params: { + variables: [ + { variable: { $sim: 'var', key: 'retries' }, value: '' }, + { variable: { $sim: 'var', key: 'lastrun' }, value: '' }, + ], + }, + }), + ], + edges: [edge('query', 'setvars'), edge('start', 'query')], + }), + }, + { + name: 'inactive-values', + workflow: wf({ + blocks: [ + start(), + blk('Remember', 'agent', { + params: { + model: 'm', + memoryType: 'none', + conversationId: 'stale-id', + legacyField: 'kept', + }, + }), + ], + inactive: { remember: ['conversationId'] }, + edges: [edge('start', 'remember')], + }), + }, + { + name: 'generic-block-unknown-type', + workflow: wf({ + blocks: [ + start(), + blk('Mystery', 'custom_block_acme', { + params: { zeta: 1, alpha: 'a ' }, + triggerMode: true, + modes: { someCid: 'advanced' }, + }), + ], + }), + }, + { + name: 'generic-block-legacy-operation', + workflow: wf({ + blocks: [ + start(), + blk('Old table op', 'table', { + params: { operation: 'delete_everything', limit: '10' }, + }), + ], + }), + }, + { + name: 'block-meta', + workflow: wf({ + blocks: [ + start(), + blk('Guarded', 'api', { + params: { url: 'https://a.test', method: 'POST' }, + enabled: false, + locked: true, + advancedMode: true, + errorPort: true, + retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 }, + opaque: { data: { canvasNote: 'x', width: 300 } }, + }), + blk('Flaky', 'api', { + params: { url: 'https://b.test' }, + errorPort: true, + }), + blk('Fallback', 'response', {}), + ], + edges: [ + edge('flaky', 'fallback', { kind: 'error' }), + edge('start', 'guarded'), + edge('start', 'flaky'), + ], + }), + }, + { + name: 'agent-tools', + workflow: wf({ + blocks: [ + start(), + blk('Assistant', 'agent', { + params: { model: 'claude-sonnet-5-5' }, + tools: { + tools: [ + { + type: 'slack', + operation: 'send', + params: { channel: 'C0OPS', text: 'Approve: ' }, + modes: { channel: 'basic' }, + usageControl: 'auto', + }, + { + type: 'custom-tool-type', + title: 'Lookup vendor', + params: { query: '' }, + modes: {}, + customTool: { + ref: { $sim: 'resource', kind: 'custom-tool', key: 'lookup-vendor' }, + }, + }, + ], + }, + }), + ], + edges: [edge('start', 'assistant')], + }), + }, + { + name: 'input-format-sugar', + workflow: wf({ + blocks: [ + start('Start', [ + { name: 'question', type: 'string', value: '' }, + { name: 'limit', type: 'number', value: 10, description: 'Max results', required: true }, + { name: 'tags', type: 'array' }, + ]), + blk('Hook', 'webhook', { + params: { + inputFormat: [ + { name: '1', type: 'string', value: '' }, + { name: 'id', type: 'string', value: '', extraKey: true }, + ], + }, + }), + ], + }), + }, + { + name: 'json-code-fields', + workflow: wf({ + blocks: [ + start(), + blk('Sugared', 'agent', { + params: { model: 'm', responseFormat: '{\n "name": "ticket",\n "strict": true\n}' }, + }), + blk('Compact', 'agent', { + params: { model: 'm', responseFormat: '{"name":"ticket"}' }, + }), + blk('Refs in json', 'api', { + params: { url: 'https://x.test', body: '{\n "q": \n}' }, + }), + ], + edges: [edge('start', 'sugared')], + }), + }, + { + name: 'function-languages', + workflow: wf({ + blocks: [ + start(), + blk('Js code', 'function', { + params: { + language: 'javascript', + code: 'const total = + {{TAX_RATE}}\n// keep `ticks` and $\u007bbraces}\nreturn total', + }, + }), + blk('Py code', 'function', { + params: { language: 'python', code: 'def main():\n return \n' }, + }), + blk('Sh code', 'function', { params: { language: 'shell', code: 'echo "{{HOME_DIR}}"' } }), + ], + edges: [edge('jscode', 'pycode'), edge('pycode', 'shcode'), edge('start', 'jscode')], + }), + }, + { + name: 'comments-at-anchors', + workflow: wf({ + blocks: [ + start(), + blk('Classify', 'agent', { params: { model: 'm', temperature: 0.5 } }), + blk('Done', 'response', {}), + ], + variables: [{ key: 'count', name: 'count', type: 'number', value: 1 }], + edges: [edge('classify', 'done'), edge('start', 'classify')], + comments: [ + [encodeAnchor({ kind: 'header' }), [line('Owned by the support team.')]], + [ + encodeAnchor({ kind: 'block', block: 'classify' }), + [line('Cheap model first.'), line('see runbook', 'trailing')], + ], + [ + encodeAnchor({ kind: 'param', block: 'classify', param: 'temperature' }), + [line('tuned 2026-10')], + ], + [ + encodeAnchor({ kind: 'param', block: 'classify', param: 'systemPrompt' }), + [line('param not printed')], + ], + [ + encodeAnchor({ kind: 'edges', block: 'classify', port: 'out' }), + [line('happy path', 'trailing')], + ], + [encodeAnchor({ kind: 'wiring' }), [line('Wiring')]], + [encodeAnchor({ kind: 'var', variable: 'count' }), [line('starts at one')]], + [encodeAnchor({ kind: 'block', block: 'deleted' }), [line('dropped')]], + [ + encodeAnchor({ kind: 'block', block: 'done' }), + [{ text: '*\n * Final reply.\n ', kind: 'block', placement: 'leading' }], + ], + [encodeAnchor({ kind: 'footer' }), [line('end of file')]], + ], + }), + }, + { + name: 'identifier-collisions', + workflow: wf({ + blocks: [ + start(), + blk('Default', 'api', { params: { url: 'https://a.test' } }), + blk('Table', 'api', { params: { url: 'https://b.test' } }), + blk('Workflow', 'api', { params: { url: 'https://c.test' } }), + blk('Slack', 'api', { params: { url: 'https://d.test' } }), + blk('Send Email', 'api', { params: { url: 'https://e.test' } }), + blk('send-email', 'api', { params: { url: 'https://f.test' } }), + blk('1st step', 'api', { params: { url: 'https://g.test' } }), + blk('日本語', 'api', { params: { url: 'https://h.test' } }), + blk('Hinted', 'api', { params: { url: 'https://i.test ' } }), + blk('Bad hint', 'api', { params: { url: 'https://j.test' } }), + ], + }), + hints: { blocks: { hinted: { binding: 'myHinted' }, badhint: { binding: 'class' } } }, + }, + { + name: 'lock-order', + workflow: wf({ + blocks: [ + blk('Zeta', 'api', { params: { url: 'https://z.test' } }), + blk('Alpha', 'api', { params: { url: 'https://a.test' } }), + blk('Mid', 'api', { params: { url: 'https://m.test ' } }), + start(), + ], + edges: [edge('start', 'zeta')], + }), + hints: { blocks: { zeta: { order: 0 }, mid: { order: 1 }, alpha: { order: 2 } } }, + }, + { + name: 'raw-and-odd-edges', + workflow: wf({ + blocks: [ + start(), + blk('Gate', 'condition', { + branches: { + kind: 'condition', + rows: [ + { key: 'if', value: 'true' }, + { key: 'else', value: '' }, + ], + }, + }), + blk('A', 'api', { params: { url: 'https://a.test' } }), + blk('B', 'api', { params: { url: 'https://b.test' } }), + ], + edges: [ + edge('a', 'b', { kind: 'raw', handle: 'right-legacy' }), + edge('gate', 'a', { kind: 'out' }), + edge('gate', 'b', { kind: 'branch', key: 'if' }), + edge('start', 'gate'), + ], + }), + }, + { + name: 'fan-out-wrapping', + workflow: wf({ + blocks: [ + start(), + ...[ + 'Enrich company profile', + 'Enrich contact details', + 'Score lead quality', + 'Notify sales channel', + 'Archive raw payload', + ].map((name) => blk(name, 'api', { params: { url: 'https://x.test' } })), + ], + edges: [ + 'enrichcompanyprofile', + 'enrichcontactdetails', + 'scoreleadquality', + 'notifysaleschannel', + 'archiverawpayload', + ].map((to) => edge('start', to)), + }), + }, + { + name: 'legacy-dropdown-and-todo', + workflow: wf({ + blocks: [ + start(), + blk('Legacy method', 'api', { params: { method: 'PATCH' } }), + blk('Drafted', 'agent', { params: {} }), + ], + }), + }, + { + name: 'layout-widths', + workflow: wf({ + blocks: [ + start(), + blk('Widths', 'api', { + params: { + url: 'https://example.com/a/very/long/path/that/keeps/going/and/going/until/it/overflows/the/line', + headers: [ + { key: 'Authorization', value: 'Bearer {{API_TOKEN}}' }, + { key: 'Accept', value: 'application/json' }, + ], + method: 'GET', + }, + }), + blk('Numbers', 'agent', { + params: { + model: 'm', + temperature: 1e21, + messages: [ + 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, + 25, 26, 27, 28, 29, 30, -0.5, + ], + }, + }), + blk('Short key', 'slack', { + params: { + operation: 'send', + text: 'a very long message body that will never fit on the same line as its very short key', + }, + }), + ], + }), + }, + { + name: 'trigger-mode-builders', + workflow: wf({ + blocks: [ + blk('Invoice email', 'gmail', { + triggerMode: true, + params: { + selectedTriggerId: 'gmail_poller', + credential: { $sim: 'resource', kind: 'credential', key: 'finance-gmail' }, + labelIds: ['INBOX'], + markAsRead: true, + }, + }), + blk('Send summary', 'gmail', { + params: { + operation: 'send_gmail', + credential: { $sim: 'resource', kind: 'credential', key: 'finance-gmail' }, + to: 'cfo@acme.test', + subject: 'Invoices', + body: '', + }, + }), + blk('Odd trigger', 'gmail', { + triggerMode: true, + params: { selectedTriggerId: 'gmail_other', markAsRead: false }, + }), + ], + edges: [edge('invoiceemail', 'sendsummary')], + }), + }, + { + name: 'note-markdown', + workflow: wf({ + blocks: [ + start(), + blk('How this works', 'note', { + params: { content: 'Polls **INBOX**;\nappends to the `finance` sheet.' }, + }), + ], + }), + }, +] diff --git a/packages/workflow-code/src/compile/__printer__/catalog.ts b/packages/workflow-code/src/compile/__printer__/catalog.ts new file mode 100644 index 00000000000..d17d4507eba --- /dev/null +++ b/packages/workflow-code/src/compile/__printer__/catalog.ts @@ -0,0 +1,299 @@ +/** + * A small hand-built catalog covering every construct the printer handles: triggers, an operation + * namespace, basic/advanced pairs, selectors, code fields, branches, tools, containers, a note and + * a trigger-mode builder. Shapes follow `catalog/types.ts`; values are illustrative only. + */ + +import type { + BlockCatalog, + CatalogBlock, + CatalogSubBlock, + CatalogValueKind, +} from '../../catalog/types' + +type SubBlockInit = Partial & Pick + +function sb(init: SubBlockInit & { valueKind?: CatalogValueKind }): CatalogSubBlock { + return { valueKind: 'string', storage: 'native', ...init } +} + +function block( + type: string, + subBlocks: CatalogSubBlock[], + extra: Partial = {} +): CatalogBlock { + return { + type, + name: type, + category: 'blocks', + subBlocks, + tools: { access: [], selector: 'single' }, + inputs: {}, + outputs: {}, + graph: { canBeTarget: true, errorPort: true, container: null, annotationOnly: false }, + ...extra, + } +} + +const trigger = (type: string, subBlocks: CatalogSubBlock[]) => + block(type, subBlocks, { + category: 'triggers', + graph: { canBeTarget: false, errorPort: false, container: null, annotationOnly: false }, + }) + +export const catalog: BlockCatalog = { + catalogVersion: 1, + hash: 'fixture', + sdkMajor: 1, + blocks: { + start_trigger: trigger('start_trigger', [ + sb({ + id: 'inputFormat', + type: 'input-format', + valueKind: 'array', + structured: 'inputFormat', + }), + ]), + webhook: trigger('webhook', [ + sb({ id: 'requireAuth', type: 'switch', valueKind: 'boolean' }), + sb({ id: 'token', type: 'short-input', password: true }), + sb({ + id: 'inputFormat', + type: 'input-format', + valueKind: 'array', + structured: 'inputFormat', + }), + ]), + agent: block('agent', [ + sb({ id: 'model', type: 'combobox', required: true }), + sb({ id: 'messages', type: 'messages-input', valueKind: 'array' }), + sb({ id: 'systemPrompt', type: 'long-input' }), + sb({ id: 'responseFormat', type: 'code', valueKind: 'code', language: 'json' }), + sb({ id: 'tools', type: 'tool-input', valueKind: 'tools', structured: 'tools' }), + sb({ id: 'temperature', type: 'slider', valueKind: 'number', min: 0, max: 2 }), + sb({ + id: 'memoryType', + type: 'dropdown', + options: [ + { id: 'none', label: 'None' }, + { id: 'conversation', label: 'Conversation' }, + ], + }), + sb({ + id: 'conversationId', + type: 'short-input', + condition: { field: 'memoryType', value: 'conversation' }, + }), + ]), + slack: block('slack', [ + sb({ + id: 'operation', + type: 'dropdown', + options: [ + { id: 'send', label: 'Send Message' }, + { id: 'read', label: 'Read Messages' }, + ], + }), + sb({ + id: 'authMethod', + type: 'dropdown', + options: [ + { id: 'oauth', label: 'OAuth' }, + { id: 'bot_token', label: 'Bot token' }, + ], + }), + sb({ + id: 'credential', + type: 'oauth-input', + valueKind: 'resource', + resourceKind: 'credential', + }), + sb({ id: 'botToken', type: 'short-input', password: true }), + sb({ + id: 'channel', + type: 'channel-selector', + valueKind: 'picked', + mode: 'basic', + canonicalParamId: 'channel', + }), + sb({ + id: 'manualChannel', + type: 'short-input', + mode: 'advanced', + canonicalParamId: 'channel', + }), + sb({ id: 'text', type: 'long-input', required: true }), + sb({ id: 'limit', type: 'short-input', condition: { field: 'operation', value: 'read' } }), + ]), + function: block('function', [ + sb({ + id: 'language', + type: 'dropdown', + options: [ + { id: 'javascript', label: 'JavaScript' }, + { id: 'python', label: 'Python' }, + { id: 'shell', label: 'Shell' }, + ], + }), + sb({ id: 'code', type: 'code', valueKind: 'code', language: 'javascript' }), + ]), + condition: block( + 'condition', + [ + sb({ + id: 'conditions', + type: 'condition-input', + valueKind: 'branches', + structured: 'branches', + }), + ], + { + graph: { + canBeTarget: true, + errorPort: false, + container: null, + annotationOnly: false, + branches: { subBlockId: 'conditions', kind: 'condition' }, + }, + } + ), + router: block( + 'router', + [ + sb({ id: 'context', type: 'long-input' }), + sb({ id: 'model', type: 'combobox' }), + sb({ id: 'routes', type: 'router-input', valueKind: 'branches', structured: 'branches' }), + ], + { + graph: { + canBeTarget: true, + errorPort: false, + container: null, + annotationOnly: false, + branches: { subBlockId: 'routes', kind: 'router' }, + }, + } + ), + table: block('table', [ + sb({ + id: 'operation', + type: 'dropdown', + options: [ + { id: 'insert_row', label: 'Insert Row' }, + { id: 'query_rows', label: 'Query Rows' }, + ], + }), + sb({ + id: 'tableSelector', + type: 'table-selector', + valueKind: 'resource', + resourceKind: 'table', + mode: 'basic', + canonicalParamId: 'tableId', + }), + sb({ + id: 'manualTableId', + type: 'short-input', + mode: 'advanced', + canonicalParamId: 'tableId', + }), + sb({ id: 'data', type: 'code', valueKind: 'code', language: 'json' }), + sb({ id: 'limit', type: 'short-input' }), + sb({ + id: 'knowledgeBases', + type: 'knowledge-base-selector', + valueKind: 'resource', + resourceKind: 'knowledge-base', + multiple: true, + }), + ]), + note: block('note', [sb({ id: 'content', type: 'long-input' })], { + graph: { canBeTarget: false, errorPort: false, container: null, annotationOnly: true }, + }), + variables: block('variables', [ + sb({ id: 'variables', type: 'variables-input', valueKind: 'array', structured: 'variables' }), + ]), + api: block('api', [ + sb({ id: 'url', type: 'short-input', required: true }), + sb({ + id: 'method', + type: 'dropdown', + options: [ + { id: 'GET', label: 'GET' }, + { id: 'POST', label: 'POST' }, + ], + }), + sb({ id: 'headers', type: 'table', valueKind: 'array' }), + sb({ id: 'body', type: 'code', valueKind: 'code', language: 'json' }), + ]), + gmail: block( + 'gmail', + [ + sb({ + id: 'operation', + type: 'dropdown', + surface: 'action', + options: [{ id: 'send_gmail', label: 'Send Email' }], + }), + sb({ + id: 'credential', + type: 'oauth-input', + valueKind: 'resource', + resourceKind: 'credential', + }), + sb({ id: 'to', type: 'short-input', surface: 'action' }), + sb({ id: 'subject', type: 'short-input', surface: 'action' }), + sb({ id: 'body', type: 'long-input', surface: 'action' }), + sb({ id: 'selectedTriggerId', type: 'dropdown', surface: 'trigger', mode: 'trigger' }), + sb({ + id: 'labelIds', + type: 'dropdown', + surface: 'trigger', + mode: 'trigger', + multiple: true, + }), + sb({ + id: 'markAsRead', + type: 'switch', + valueKind: 'boolean', + surface: 'trigger', + mode: 'trigger', + }), + ], + { triggerAllowed: true } + ), + response: block('response', [ + sb({ id: 'dataMode', type: 'dropdown', options: [{ id: 'structured', label: 'Builder' }] }), + sb({ id: 'builderData', type: 'response-format', valueKind: 'object' }), + ]), + loop: block('loop', [], { + graph: { canBeTarget: true, errorPort: false, container: 'loop', annotationOnly: false }, + }), + parallel: block('parallel', [], { + graph: { canBeTarget: true, errorPort: false, container: 'parallel', annotationOnly: false }, + }), + }, + triggers: {}, + builders: { + 'trigger.start': { type: 'start_trigger' }, + 'trigger.webhook': { type: 'webhook' }, + agent: { type: 'agent' }, + 'slack.sendMessage': { type: 'slack', operation: 'send' }, + 'slack.readMessages': { type: 'slack', operation: 'read' }, + fn: { type: 'function' }, + condition: { type: 'condition' }, + router: { type: 'router' }, + 'table.insertRow': { type: 'table', operation: 'insert_row' }, + 'table.queryRows': { type: 'table', operation: 'query_rows' }, + note: { type: 'note' }, + setVariables: { type: 'variables' }, + api: { type: 'api' }, + 'gmail.sendEmail': { type: 'gmail', operation: 'send_gmail' }, + 'trigger.gmail.poller': { + type: 'gmail', + triggerMode: true, + fixed: { selectedTriggerId: 'gmail_poller' }, + }, + response: { type: 'response' }, + }, +} diff --git a/packages/workflow-code/src/compile/__printer__/goldens.ts b/packages/workflow-code/src/compile/__printer__/goldens.ts new file mode 100644 index 00000000000..12b3a5cc6d3 --- /dev/null +++ b/packages/workflow-code/src/compile/__printer__/goldens.ts @@ -0,0 +1,71 @@ +/** + * The printer's golden prints (Wave 2C, `src/print/__golden__/*.txt` at f3a46899eb), embedded so + * the compiler can prove it accepts exactly what the printer emits. Regenerate when the printer's + * goldens change; never edit by hand. + */ +export const PRINTER_GOLDENS: Record = { + 'agent-tools': + "// @sim-sdk 1\nimport { agent, picked, raw, slack, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const assistant = agent('Assistant', {\n model: 'claude-sonnet-5-5',\n tools: [\n slack.tool.sendMessage(\n { channel: picked('C0OPS'), text: t`Approve: ${start.input}` },\n { usageControl: 'auto', modes: { channel: 'basic' } }\n ),\n raw({\n type: 'custom-tool-type',\n title: 'Lookup vendor',\n params: { query: '' },\n modes: {},\n customTool: { ref: { $sim: 'resource', kind: 'custom-tool', key: 'lookup-vendor' } },\n }),\n ],\n })\n\n start.to(assistant)\n})\n", + 'block-meta': + "// @sim-sdk 1\nimport { api, response, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const flaky = api('Flaky', { url: 'https://b.test' })\n const fallback = response('Fallback', {})\n const guarded = api(\n 'Guarded',\n { url: 'https://a.test', method: 'POST' },\n {\n disabled: true,\n locked: true,\n advancedMode: true,\n errorPort: true,\n retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 },\n $unknown: { canvasNote: 'x', width: 300 },\n }\n )\n\n start.to(flaky, guarded)\n flaky.onError(fallback)\n})\n", + 'branch-titles-and-extra': + "// @sim-sdk 1\nimport { condition, js, response, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const check = condition(\n 'Check',\n { big: js`${start.amount} > 100`, elseIf0: js``, else: js`true` },\n { branches: { big: { title: 'Large amount' }, elseIf0: { extra: { legacyFlag: true } } } }\n )\n const done = response('Done', {})\n\n start.to(check)\n check.big.to(done)\n check.elseIf0.to(done)\n check.else.to(done)\n})\n", + 'branches-null-rows': + "// @sim-sdk 1\nimport { condition, response, router, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const gate = condition('Gate', {})\n const pick = router('Pick', { context: 'ctx', model: 'm', routes: {} })\n const yes = response('Yes', { dataMode: 'structured' })\n\n start.to(gate)\n gate.if.to(pick)\n pick.route0.to(yes)\n})\n", + 'comments-at-anchors': + "// @sim-sdk 1\n// Owned by the support team.\nimport { agent, response, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow(\n 'Fixture',\n {\n variables: {\n // starts at one\n count: { type: 'number', value: 1 },\n },\n },\n () => {\n const start = trigger.start('Start', { inputFormat: [] })\n // Cheap model first.\n // param not printed\n const classify = agent('Classify', {\n model: 'm',\n // tuned 2026-10\n temperature: 0.5,\n }) // see runbook\n /**\n * Final reply.\n */\n const done = response('Done', {})\n\n // Wiring\n start.to(classify)\n classify.to(done) // happy path\n }\n)\n// end of file\n", + 'fan-out-wrapping': + "// @sim-sdk 1\nimport { api, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const archiveRawPayload = api('Archive raw payload', { url: 'https://x.test' })\n const enrichCompanyProfile = api('Enrich company profile', { url: 'https://x.test' })\n const enrichContactDetails = api('Enrich contact details', { url: 'https://x.test' })\n const notifySalesChannel = api('Notify sales channel', { url: 'https://x.test' })\n const scoreLeadQuality = api('Score lead quality', { url: 'https://x.test' })\n\n start.to(\n archiveRawPayload,\n enrichCompanyProfile,\n enrichContactDetails,\n notifySalesChannel,\n scoreLeadQuality\n )\n})\n", + 'function-files': + "// @sim-sdk 1\nimport { file, fn, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const jsCode = fn('Js code', { language: 'javascript', code: file('./functions/js-code.js') })\n const pyCode = fn('Py code', { language: 'python', code: file('./functions/py-code.py') })\n const shCode = fn('Sh code', { language: 'shell', code: file('./functions/sh-code.sh') })\n\n start.to(jsCode)\n jsCode.to(pyCode)\n pyCode.to(shCode)\n})\n", + 'function-languages': + "// @sim-sdk 1\nimport { env, fn, js, py, sh, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const jsCode = fn('Js code', {\n language: 'javascript',\n code: js`const total = ${start.total} + ${env.TAX_RATE}\n// keep \\`ticks\\` and \\${braces}\nreturn total`,\n })\n const pyCode = fn('Py code', {\n language: 'python',\n code: py`def main():\n return ${start.total}\n`,\n })\n const shCode = fn('Sh code', { language: 'shell', code: sh`echo \"${env.HOME_DIR}\"` })\n\n start.to(jsCode)\n jsCode.to(pyCode)\n pyCode.to(shCode)\n})\n", + 'generic-block-legacy-operation': + "// @sim-sdk 1\nimport { block, raw, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const oldTableOp = block('table', 'Old table op', {\n operation: raw('delete_everything'),\n limit: '10',\n })\n})\n", + 'generic-block-unknown-type': + "// @sim-sdk 1\nimport { block, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const mystery = block(\n 'custom_block_acme',\n 'Mystery',\n { alpha: t`a ${start.input}`, zeta: 1 },\n { triggerMode: true, modes: { someCid: 'advanced' } }\n )\n})\n", + 'identifier-collisions': + "// @sim-sdk 1\nimport { api, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const _1stStep = api('1st step', { url: 'https://g.test' })\n const badHint = api('Bad hint', { url: 'https://j.test' })\n const default2 = api('Default', { url: 'https://a.test' })\n const myHinted = api('Hinted', { url: t`https://i.test ${default2.data}` })\n const sendEmail = api('send-email', { url: 'https://f.test' })\n const sendEmail2 = api('Send Email', { url: 'https://e.test' })\n const slack2 = api('Slack', { url: 'https://d.test' })\n const table2 = api('Table', { url: 'https://b.test' })\n const workflow2 = api('Workflow', { url: 'https://c.test' })\n const block2 = api('\u65e5\u672c\u8a9e', { url: 'https://h.test' })\n})\n", + 'inactive-values': + "// @sim-sdk 1\nimport { agent, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const remember = agent(\n 'Remember',\n { model: 'm', memoryType: 'none' },\n { inactive: { conversationId: 'stale-id', legacyField: 'kept' } }\n )\n\n start.to(remember)\n})\n", + 'input-format-sugar': + "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const hook = trigger.webhook('Hook', {\n inputFormat: [\n { name: '1', type: 'string', value: '' },\n { name: 'id', type: 'string', value: '', extraKey: true },\n ],\n })\n const start = trigger.start('Start', {\n inputFormat: {\n question: 'string',\n limit: { type: 'number', value: 10, description: 'Max results', required: true },\n tags: { type: 'array' },\n },\n })\n})\n", + 'json-code-fields': + "// @sim-sdk 1\nimport { agent, api, json, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const compact = agent('Compact', { model: 'm', responseFormat: json`{\"name\":\"ticket\"}` })\n const refsInJson = api('Refs in json', {\n url: 'https://x.test',\n body: json`{\n \"q\": ${start.input}\n}`,\n })\n const sugared = agent('Sugared', { model: 'm', responseFormat: { name: 'ticket', strict: true } })\n\n start.to(sugared)\n})\n", + 'layout-widths': + "// @sim-sdk 1\nimport { agent, api, env, slack, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const numbers = agent('Numbers', {\n model: 'm',\n messages: [\n 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,\n 27, 28, 29, 30, -0.5,\n ],\n temperature: 1e21,\n })\n const shortKey = slack.sendMessage('Short key', {\n text: 'a very long message body that will never fit on the same line as its very short key',\n })\n const widths = api('Widths', {\n url: 'https://example.com/a/very/long/path/that/keeps/going/and/going/until/it/overflows/the/line',\n method: 'GET',\n headers: [\n { key: 'Authorization', value: t`Bearer ${env.API_TOKEN}` },\n { key: 'Accept', value: 'application/json' },\n ],\n })\n})\n", + 'legacy-dropdown-and-todo': + "// @sim-sdk 1\nimport { agent, api, raw, todo, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const drafted = agent('Drafted', { model: todo() })\n const legacyMethod = api('Legacy method', { url: todo(), method: raw('PATCH') })\n})\n", + 'lock-order': + "// @sim-sdk 1\nimport { api, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const zeta = api('Zeta', { url: 'https://z.test' })\n const alpha = api('Alpha', { url: 'https://a.test' })\n const mid = api('Mid', { url: t`https://m.test ${alpha.data}` })\n\n start.to(zeta)\n})\n", + 'loop-foreach': + "// @sim-sdk 1\nimport { agent, api, fn, js, loop, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: { leads: 'array' } })\n const eachLead = loop.forEach(\n 'Each lead',\n { collection: start.leads },\n (p) => {\n const lookup = api('Lookup', {\n url: t`https://crm.example.com/c/${p.currentItem.email}?i=${p.index}`,\n method: 'GET',\n })\n const score = fn('Score', {\n language: 'javascript',\n code: js`return ${lookup.data}.score * 2`,\n })\n\n p.to(lookup)\n lookup.to(score)\n },\n { inactive: { iterations: 5 } }\n )\n const summary = agent('Summary', {\n model: 'm',\n systemPrompt: t`Results: ${eachLead.results} and `,\n })\n\n start.to(eachLead)\n eachLead.to(summary)\n})\n", + 'minimal-trigger': + "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Hello', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n})\n", + 'nested-subflows': + "// @sim-sdk 1\nimport { agent, js, loop, parallel, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const outer = loop.for('Outer', { count: 3 }, (p) => {\n const fan = parallel.collection('Fan', { collection: start.rows, batchSize: 5 }, (p2) => {\n const work = agent('Work', {\n model: 'm',\n systemPrompt: t`loop ${p.index} parallel ${p2.currentItem} named ${outer.index} fan ${fan.index}`,\n })\n\n p2.to(work)\n })\n\n p.to(fan)\n })\n const sibling = loop.while(\n 'Sibling',\n { condition: js` < 3` },\n (p) => {\n const insideSibling = agent('Inside sibling', {\n model: 'm',\n systemPrompt: 'cannot see ',\n })\n\n p.to(insideSibling)\n },\n { inactive: { iterations: 5, doWhileCondition: js`` } }\n )\n\n start.to(outer)\n outer.to(sibling)\n})\n", + 'note-markdown': + "// @sim-sdk 1\nimport { md, note, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const howThisWorks = note('How this works', {\n content: md`Polls **INBOX**;\nappends to the \\`finance\\` sheet.`,\n })\n})\n", + 'pair-modes': + "// @sim-sdk 1\nimport { picked, slack, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const advancedEmpty = slack.sendMessage(\n 'Advanced empty',\n { text: 'd' },\n { modes: { channel: 'advanced' } }\n )\n const basicHoldingText = slack.sendMessage(\n 'Basic holding text',\n { channel: start.channel, text: 'c' },\n { modes: { channel: 'basic' } }\n )\n const bothMembers = slack.sendMessage(\n 'Both members',\n { channel: 'C0NEW', text: 'e' },\n { inactive: { channel: picked('C0OLD') } }\n )\n const manualAdvanced = slack.sendMessage('Manual advanced', { channel: start.channel, text: 'b' })\n const pickedBasic = slack.sendMessage('Picked basic', { channel: picked('C0ONE'), text: 'a' })\n})\n", + 'parallel-untyped': + "// @sim-sdk 1\nimport { api, parallel, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const batch = parallel('Batch', { count: 4 }, (p) => {\n const ping = api('Ping', { url: t`https://x.test/${p.index}` })\n\n p.to(ping)\n })\n\n start.to(batch)\n})\n", + 'raw-and-odd-edges': + "// @sim-sdk 1\nimport { api, condition, edge, js, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const gate = condition('Gate', { if: js`true`, else: true })\n const a = api('A', { url: 'https://a.test' })\n const b = api('B', { url: 'https://b.test' })\n\n start.to(gate)\n edge(gate, 'source', a)\n gate.if.to(b)\n edge(a, 'right-legacy', b)\n})\n", + 'ref-cycle-literalized': + "// @sim-sdk 1\nimport { agent, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const self = agent('Self', { model: 'm', systemPrompt: 'Me: ' })\n const alpha = agent('Alpha', { model: 'm', systemPrompt: 'See ' })\n const beta = agent('Beta', { model: 'm', systemPrompt: t`See ${alpha.content}` })\n\n start.to(alpha)\n alpha.to(beta)\n})\n", + 'resource-nodes': + "// @sim-sdk 1\nimport { kb, raw, setVariables, t, table, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow(\n 'Fixture',\n {\n variables: {\n lastrun: { name: 'Last Run', type: 'string', value: 'never' },\n retries: { type: 'number', value: 2 },\n },\n },\n ({ vars }) => {\n const start = trigger.start('Start', { inputFormat: [] })\n const query = table.queryRows(\n 'Query',\n {\n tableId: raw({ $sim: 'unresolved', kind: 'table', id: 'tbl_deleted' }),\n data: raw({ $sim: 'literal', value: { $sim: 'user data', n: 1 } }),\n limit: raw({\n $sim: 'csv',\n items: [\n { $sim: 'resource', kind: 'knowledge-document', key: 'a' },\n { $sim: 'unresolved', kind: 'knowledge-document', id: 'doc_9' },\n ],\n }),\n knowledgeBases: [kb('docs'), kb('faq')],\n },\n { modes: { tableId: 'basic' } }\n )\n const setVars = setVariables('Set vars', {\n variables: [\n { variable: vars.retries, value: t`${vars.retries}` },\n { variable: vars.lastrun, value: t`${query.rows}` },\n ],\n })\n\n start.to(query)\n query.to(setVars)\n }\n)\n", + 'router-routes': + "// @sim-sdk 1\nimport { response, router, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: { amount: 'number', reason: 'string' } })\n const triage = router('Triage', {\n context: t`${start.amount} for ${start.reason}`,\n model: 'claude-sonnet-5-5',\n routes: { small: 'Under $100, auto-approve', review: 'Needs a manager' },\n })\n const approve = response('Approve', {})\n const escalate = response('Escalate', {})\n\n start.to(triage)\n triage.small.to(approve)\n triage.review.to(escalate)\n})\n", + 'string-escapes': + "// @sim-sdk 1\nimport { agent, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const escapes = agent('Escapes', {\n model: \"it's a \\\"model\\\" with 'quotes'\",\n messages: [{ role: 'user', content: \"single 'quote' only\" }],\n systemPrompt: `back\\\\slash \\`tick\\` \\${notInterp} tab\there\\r\ncrlf line\\u2028ls\\u2029ps \\uD800 lone \u6f22\u5b57 \ud83c\udf89`,\n })\n})\n", + 'support-triage': + "// @sim-sdk 1\nimport {\n agent,\n binding,\n condition,\n env,\n js,\n json,\n picked,\n response,\n slack,\n t,\n table,\n trigger,\n workflow,\n} from '@sim/workflow-sdk'\n\nexport default workflow(\n 'Support triage',\n {\n description: 'Classifies inbound tickets and routes them.',\n variables: { escalations: { type: 'number', value: 0 } },\n },\n ({ vars }) => {\n const ticketIn = trigger.webhook('Ticket in', {\n requireAuth: true,\n token: env.TICKETS_WEBHOOK_TOKEN,\n inputFormat: { subject: 'string', body: 'string' },\n })\n const classify = agent('Classify', {\n model: 'claude-sonnet-5-5',\n messages: [\n { role: 'system', content: 'Classify support tickets.' },\n {\n role: 'user',\n content: t`${ticketIn.subject}\n\n${ticketIn.body}`,\n },\n ],\n temperature: 0.2,\n })\n const byCategory = condition('By category', {\n billing: js`${classify.content} === 'billing'`,\n urgent: js`${classify.content}.includes(\"urgent\") && ${vars.escalations} < 3`,\n else: true,\n })\n const logTicket = table.insertRow('Log ticket', {\n tableId: table('tickets'),\n data: json`{\n \"subject\": \"${ticketIn.subject}\"\n}`,\n })\n const notify = slack.sendMessage(\n 'Notify',\n {\n authMethod: 'oauth',\n credential: binding('support-slack'),\n channel: picked('C0SUPPORT'),\n text: t`New ${classify.content} ticket: ${ticketIn.subject}`,\n },\n { errorPort: true }\n )\n const reply = response('Reply', { dataMode: 'structured', builderData: { ok: true } })\n\n ticketIn.to(classify)\n classify.to(byCategory)\n byCategory.billing.to(logTicket)\n byCategory.urgent.to(notify)\n byCategory.else.to(reply)\n logTicket.to(notify)\n logTicket.onError(notify)\n notify.to(reply)\n }\n)\n", + 'templates-and-paths': + "// @sim-sdk 1\nimport { agent, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const writer = agent('Writer', {\n model: 'gpt-5.5',\n messages: [\n {\n role: 'user',\n content: t`Items: ${start.items[0].id} / ${start.items['0']} / ${start['some-field']} / ${start.a.b}\nnext`,\n },\n ],\n systemPrompt: `Line one\nLine two without refs`,\n conversationId: start.conversationId,\n })\n\n start.to(writer)\n})\n", + 'trigger-mode-builders': + "// @sim-sdk 1\nimport { binding, block, gmail, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const invoiceEmail = trigger.gmail.poller('Invoice email', {\n credential: binding('finance-gmail'),\n labelIds: ['INBOX'],\n markAsRead: true,\n })\n const oddTrigger = block(\n 'gmail',\n 'Odd trigger',\n { selectedTriggerId: 'gmail_other', markAsRead: false },\n { triggerMode: true }\n )\n const sendSummary = gmail.sendEmail('Send summary', {\n credential: binding('finance-gmail'),\n to: 'cfo@acme.test',\n subject: 'Invoices',\n body: invoiceEmail.email.body_text,\n })\n\n invoiceEmail.to(sendSummary)\n})\n", + 'unresolved-tokens': + "// @sim-sdk 1\nimport { agent, env, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const html = agent('Html', {\n model: '{{ not valid }}',\n systemPrompt: t`
hello
${env.lower_ok} `,\n })\n\n start.to(html)\n})\n", +} diff --git a/packages/workflow-code/src/compile/blocks.ts b/packages/workflow-code/src/compile/blocks.ts new file mode 100644 index 00000000000..1c5de763b02 --- /dev/null +++ b/packages/workflow-code/src/compile/blocks.ts @@ -0,0 +1,1058 @@ +import type { Node, ObjectExpression, ObjectProperty } from '@babel/types' +import { isRecordLike } from '@sim/utils/object' +import type { BlockRetryConfig } from '@sim/workflow-types/workflow' +import { encodeAnchor } from '../anchors' +import type { CatalogBlock, CatalogSubBlock } from '../catalog/types' +import { type CodeFileLanguage, codeFileLanguage, fromCodeFile } from '../code-files' +import type { + AnchorKey, + CanonicalBlock, + CanonicalBranches, + CanonicalBranchRow, + CanonicalParam, + Json, + LoopSpec, + ParallelSpec, + ParamMode, + SubBlockId, + Value, +} from '../model' +import { type BlockDecl, type CompileContext, rangeOf, recordSpan } from './context' +import { didYouMean } from './hints' +import { compileToolList } from './tools' +import { + buildFieldIndex, + type CatalogField, + type FieldIndex, + isRequired, + isVisible, + memberFor, + valueKindMatches, +} from './validate-catalog' +import { + type CompiledValue, + compileJsonLiteral, + compileValue, + isSelectorForm, + literalText, + objectEntries, + setOwn, + type ValueSite, +} from './values' + +export interface CompiledBlock { + block: CanonicalBlock + /** Param ids written under `meta.inactive`. */ + inactive: SubBlockId[] + /** Repo-relative path of the function-code file, when the code came from `file()`. */ + codeFile?: string +} + +const META_KEYS = [ + 'disabled', + 'locked', + 'advancedMode', + 'triggerMode', + 'errorPort', + 'retry', + 'modes', + 'branches', + 'inactive', + '$unknown', +] +const BRANCH_KEY = /^[A-Za-z_$][A-Za-z0-9_$]*$/ +const EDGE_METHOD_NAMES = new Set(['to', 'onError']) +const DEFAULT_LOOP_ITERATIONS = 5 +const CODE_LANGUAGES: ReadonlySet = new Set(['javascript', 'python', 'shell']) + +interface CompiledMeta { + enabled: boolean + locked: boolean + errorPort: boolean + retry: BlockRetryConfig | null + advancedMode: boolean + triggerMode: boolean | null + modes: Map + /** Per-row `title` and `extra` (the printer's meta `branches`). */ + branches: Array<[string, ObjectProperty]> + inactive: Array<[string, ObjectProperty]> + opaque: Record | null +} + +function unsupported( + ctx: CompileContext, + node: Node, + message: string, + hint: string, + decl: BlockDecl +): void { + ctx.reporter.report('E_UNSUPPORTED_SYNTAX', message, rangeOf(ctx, node), { + hint, + blockKey: decl.key, + }) +} + +function withHint(hint: string | undefined): { hint?: string } { + return hint === undefined ? {} : { hint } +} + +function booleanLiteral(ctx: CompileContext, property: ObjectProperty, decl: BlockDecl): boolean { + if (property.value.type === 'BooleanLiteral') return property.value.value + unsupported( + ctx, + property.value, + 'Write true or false.', + 'This meta field is a boolean literal.', + decl + ) + return false +} + +function compileRetry(ctx: CompileContext, node: Node, site: ValueSite): BlockRetryConfig | null { + const json = compileJsonLiteral(ctx, node, site) + if (json === undefined) return null + if ( + isRecordLike(json) && + Object.keys(json).sort().join(',') === 'enabled,maxTries,waitBetweenTriesMs' && + typeof json.enabled === 'boolean' && + typeof json.maxTries === 'number' && + typeof json.waitBetweenTriesMs === 'number' + ) { + return { + enabled: json.enabled, + maxTries: json.maxTries, + waitBetweenTriesMs: json.waitBetweenTriesMs, + } + } + unsupported( + ctx, + node, + 'retry needs enabled, maxTries and waitBetweenTriesMs.', + 'Write retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 }.', + site.decl + ) + return null +} + +function objectValue( + ctx: CompileContext, + property: ObjectProperty, + decl: BlockDecl, + example: string +): ObjectExpression | null { + if (property.value.type === 'ObjectExpression') return property.value + unsupported(ctx, property.value, 'Write an object literal here.', `Write ${example}.`, decl) + return null +} + +/** Registers a properties object as a comment list with one anchor per property. */ +function registerList( + ctx: CompileContext, + node: ObjectExpression, + entries: Array<[string, ObjectProperty]>, + anchorOf: (key: string) => AnchorKey, + decl: BlockDecl +): void { + const owner = encodeAnchor({ kind: 'block', block: decl.key }) + const addItem = ctx.comments.list(node.start ?? 0, node.end ?? 0, { owner, tail: 'last-item' }) + for (const [key, property] of entries) addItem(property, anchorOf(key)) +} + +/** `meta`: block-level fields, in the printer's vocabulary (s2 D2, build-spec decision 2). */ +function compileMeta(ctx: CompileContext, node: Node | undefined, site: ValueSite): CompiledMeta { + const meta: CompiledMeta = { + enabled: true, + locked: false, + errorPort: false, + retry: null, + advancedMode: false, + triggerMode: null, + modes: new Map(), + branches: [], + inactive: [], + opaque: null, + } + if (!node) return meta + const { decl } = site + if (node.type !== 'ObjectExpression') { + unsupported(ctx, node, 'Block meta is an object literal.', 'Write { disabled: true }.', decl) + return meta + } + for (const [key, property] of objectEntries(ctx, node)) { + switch (key) { + case 'disabled': + meta.enabled = !booleanLiteral(ctx, property, decl) + break + case 'locked': + meta.locked = booleanLiteral(ctx, property, decl) + break + case 'errorPort': + meta.errorPort = booleanLiteral(ctx, property, decl) + break + case 'advancedMode': + meta.advancedMode = booleanLiteral(ctx, property, decl) + break + case 'triggerMode': + meta.triggerMode = booleanLiteral(ctx, property, decl) + break + case 'retry': + meta.retry = compileRetry(ctx, property.value, site) + break + case 'modes': { + const modes = objectValue(ctx, property, decl, "modes: { channel: 'basic' }") + if (!modes) break + for (const [param, modeProperty] of objectEntries(ctx, modes)) { + const mode = literalText(modeProperty.value) + if (mode !== 'basic' && mode !== 'advanced') { + unsupported( + ctx, + modeProperty.value, + "A mode is 'basic' or 'advanced'.", + "Write 'basic' or 'advanced'.", + decl + ) + continue + } + meta.modes.set(param, mode) + } + break + } + case 'branches': { + const branches = objectValue(ctx, property, decl, "branches: { key: { title: '...' } }") + if (branches) meta.branches = objectEntries(ctx, branches) + break + } + case 'inactive': { + const inactive = objectValue(ctx, property, decl, 'inactive: { field: value }') + if (!inactive) break + meta.inactive = objectEntries(ctx, inactive) + registerList( + ctx, + inactive, + meta.inactive, + (param) => encodeAnchor({ kind: 'inactive', block: decl.key, param }), + decl + ) + break + } + case '$unknown': { + const json = compileJsonLiteral(ctx, property.value, site) + if (json === undefined) break + if (!isRecordLike(json)) { + unsupported( + ctx, + property.value, + '$unknown is an object.', + 'Write $unknown: { key: value }.', + decl + ) + break + } + meta.opaque = json as Record + break + } + default: + unsupported( + ctx, + property, + `${key} is not a block meta field.`, + `Meta fields are ${META_KEYS.join(', ')}.`, + decl + ) + } + } + return meta +} + +function resolveRelative(base: string, relative: string): string | null { + if (!relative.startsWith('./') && !relative.startsWith('../')) return null + if (relative.includes('\\') || relative.includes('\0')) return null + const parts = base.split('/').slice(0, -1) + for (const [index, segment] of relative.split('/').entries()) { + if (segment === '.' && index === 0) continue + if (segment === '' || segment === '.') return null + if (segment === '..') { + if (parts.length === 0) return null + parts.pop() + } else { + parts.push(segment) + } + } + return parts.join('/') +} + +/** Reads a `file('./x.js')` code file back into stored code (build-spec decision 9). */ +function readCodeFile( + ctx: CompileContext, + compiled: Extract, + language: string, + decl: BlockDecl +): { code: string; path: string } | null { + const at = rangeOf(ctx, compiled.pathNode) + if (!CODE_LANGUAGES.has(language)) { + ctx.reporter.report( + 'E_CODE_FILE_PATH', + `Code files hold javascript, python or shell, not ${language}.`, + at, + { hint: 'Write the code inline with js``, or set language.', blockKey: decl.key } + ) + return null + } + const path = resolveRelative(ctx.file, compiled.path) + if (path === null || codeFileLanguage(compiled.path) !== language) { + ctx.reporter.report( + 'E_CODE_FILE_PATH', + path === null + ? `${compiled.path} is not a relative path inside the repository.` + : `${compiled.path} does not match the block language ${language}.`, + at, + { + hint: "Write file('./functions/name.js') with .js, .py or .sh matching language.", + blockKey: decl.key, + } + ) + return null + } + const text = ctx.files.get(path) + if (text === undefined) { + ctx.reporter.report('E_CODE_FILE_MISSING', `${path} was not provided.`, at, { + hint: 'Create the file, or fix the path.', + blockKey: decl.key, + }) + return null + } + if (text.length > ctx.limits.maxBytes) { + ctx.reporter.report( + 'E_LIMIT_EXCEEDED', + `${path} is larger than ${ctx.limits.maxBytes} bytes.`, + at, + { blockKey: decl.key } + ) + return null + } + ctx.reporter.addFile(path, text) + const back = fromCodeFile(text, language as CodeFileLanguage) + if (!back.ok) { + for (const error of back.errors) { + ctx.reporter.report( + 'E_SYNTAX', + error.message, + { file: path, start: error.start, end: error.start + 1 }, + { blockKey: decl.key } + ) + } + return null + } + return { code: back.code, path } +} + +/** input-format sugar: `{ name: 'string' }` or `{ name: { type, ... } }` → stored item list. */ +function inputFormatItems(value: Value): Value { + if (!isRecordLike(value) || '$sim' in value) return value + return Object.entries(value).map(([name, entry]) => { + if (typeof entry === 'string') return { name, type: entry, value: '' } + const item: Record = { name } + if (isRecordLike(entry) && !('$sim' in entry)) { + for (const [key, field] of Object.entries(entry)) setOwn(item, key, field) + } else { + setOwn(item, 'value', entry) + } + return item + }) +} + +interface WrittenParam { + property: ObjectProperty + param: string + /** The subBlock the value landed in. */ + target: SubBlockId + /** Written as a literal, so `W_VALUE_KIND` applies. */ + checked: boolean + value: Value +} + +/** The site for one field: variables-input fields read bare `vars.k` as the variable itself. */ +function fieldSite(site: ValueSite, sub: CatalogSubBlock | undefined): ValueSite { + return sub?.structured === 'variables' ? { ...site, varNodes: true } : site +} + +/** Rows from branch entries (build-spec decision 5, A7): `else: true` is the empty else. */ +function compileBranchRows( + ctx: CompileContext, + entries: Array<[string, ObjectProperty]>, + kind: 'condition' | 'router', + block: CatalogBlock | undefined, + site: ValueSite +): CanonicalBranchRow[] { + const { decl } = site + const outputs = new Set(Object.keys(block?.outputs ?? {})) + const rows: CanonicalBranchRow[] = [] + for (const [index, [key, property]] of entries.entries()) { + recordSpan(ctx, { kind: 'param', block: decl.key, param: key }, property) + if (!BRANCH_KEY.test(key)) { + unsupported( + ctx, + property, + `${key} is not a valid branch key.`, + 'Branch keys are JS identifiers.', + decl + ) + continue + } + if (outputs.has(key) || EDGE_METHOD_NAMES.has(key)) { + ctx.reporter.report( + 'E_BRANCH_KEY_COLLIDES', + `The branch ${key} collides with ${outputs.has(key) ? 'an output' : 'an edge method'} of this block.`, + rangeOf(ctx, property), + { hint: 'Rename the branch.', blockKey: decl.key } + ) + continue + } + const isLast = index === entries.length - 1 + if ( + kind === 'condition' && + key === 'else' && + isLast && + property.value.type === 'BooleanLiteral' && + property.value.value + ) { + rows.push({ key, value: '' }) + continue + } + const compiled = compileValue(ctx, property.value, site) + if (!compiled) continue + if (compiled.kind === 'value' && typeof compiled.value === 'string') { + rows.push({ key, value: compiled.value }) + continue + } + unsupported( + ctx, + property.value, + 'A branch value is text.', + 'Write a string or a js`` template.', + decl + ) + } + const last = entries[entries.length - 1] + if (kind === 'condition' && entries.length >= 2 && last && last[0] !== 'else') { + ctx.reporter.report( + 'E_BRANCH_ELSE_LAST', + 'A condition with two or more branches ends with else.', + rangeOf(ctx, last[1]), + { hint: 'Add else: true as the last branch.', blockKey: decl.key } + ) + } + return rows +} + +/** Applies meta `branches: { key: { title?, extra? } }` to the rows. */ +function applyBranchMeta( + ctx: CompileContext, + rows: CanonicalBranchRow[] | null, + entries: Array<[string, ObjectProperty]>, + site: ValueSite +): void { + for (const [key, property] of entries) { + const row = rows?.find((candidate) => candidate.key === key) + if (!row) { + ctx.reporter.report( + 'E_UNKNOWN_BRANCH', + `There is no branch ${key} to annotate.`, + rangeOf(ctx, property), + { blockKey: site.decl.key } + ) + continue + } + const json = compileJsonLiteral(ctx, property.value, site) + if ( + !isRecordLike(json) || + Object.keys(json).some((field) => field !== 'title' && field !== 'extra') || + (json.title !== undefined && typeof json.title !== 'string') || + (json.extra !== undefined && !isRecordLike(json.extra)) + ) { + unsupported( + ctx, + property.value, + 'Branch meta is { title?, extra? }.', + "Write { title: 'Label' } or { extra: { key: value } }.", + site.decl + ) + continue + } + if (typeof json.title === 'string') row.titleOverride = json.title + if (isRecordLike(json.extra)) row.extra = json.extra as Record + } +} + +function storedValues(params: Record): Map { + const values = new Map() + for (const [id, param] of Object.entries(params)) { + if (param.kind === 'value') values.set(id, param.value) + } + return values +} + +interface BlockState { + decl: BlockDecl + site: ValueSite + meta: CompiledMeta + params: Record + modes: Record + written: WrittenParam[] + todos: Map + pendingFile: { compiled: Extract; target: SubBlockId } | null +} + +function isJsonContainer(value: Value): boolean { + return Array.isArray(value) || (isRecordLike(value) && !('$sim' in value)) +} + +/** + * Compiles one catalog param into its member subBlock (build-spec decision 7): a selector call + * (or a non-empty array of them) is basic, anything else advanced, and an explicit `meta.modes` + * entry wins either way, as the printer writes one exactly when the derived mode would be wrong. + */ +function compileField( + ctx: CompileContext, + state: BlockState, + field: CatalogField, + property: ObjectProperty +): void { + const { decl, meta, params, modes } = state + const firstSub = field.kind === 'single' ? field.sub : field.members[0] + const site = fieldSite(state.site, firstSub) + if (firstSub?.valueKind === 'tools') { + const tools = compileToolList(ctx, property.value, site) + if (tools) setOwn(params, firstSub.id, { kind: 'tools', tools }) + return + } + const compiled = compileValue(ctx, property.value, site) + if (!compiled || compiled.kind === 'absent') return + if (compiled.kind === 'todo') { + state.todos.set(field.param, property) + return + } + if (compiled.kind === 'file') { + if (field.kind !== 'single' || field.sub.type !== 'code') { + unsupported( + ctx, + property.value, + 'file() holds a function block code.', + "Write code: file('./functions/x.js').", + decl + ) + return + } + state.pendingFile = { compiled, target: field.sub.id } + return + } + + let target: CatalogSubBlock | undefined + if (field.kind === 'pair') { + const mode = + meta.modes.get(field.param) ?? (isSelectorForm(compiled.form) ? 'basic' : 'advanced') + setOwn(modes, field.param, mode) + target = memberFor(field, mode) + } else { + target = field.sub + } + if (!target) return + + let value = compiled.value + let checked = compiled.form === 'literal' + if (target.type === 'code' && compiled.form === 'literal' && isJsonContainer(value)) { + value = JSON.stringify(value, null, 2) + checked = false + } else if (target.structured === 'inputFormat' && compiled.form === 'literal') { + value = inputFormatItems(value) + } + setOwn(params, target.id, { kind: 'value', value }) + state.written.push({ property, param: field.param, target: target.id, checked, value }) +} + +/** Compiles a block call: `builder(name, params, meta?)` or `block(type, name, params, meta?)`. */ +function compileRegularBlock(ctx: CompileContext, decl: BlockDecl): CompiledBlock | null { + const builder = decl.builder + if (builder.kind !== 'catalog' && builder.kind !== 'generic') return null + const site: ValueSite = { decl, scope: decl.scope } + const [paramsNode, metaNode, ...extra] = decl.call.arguments.slice( + builder.kind === 'generic' ? 2 : 1 + ) + for (const node of extra) { + unsupported(ctx, node, 'Too many arguments.', 'Pass (name, params, meta?).', decl) + } + + const catalogBlock = builder.block + const meta = compileMeta(ctx, metaNode, site) + const triggerMode = + meta.triggerMode ?? (builder.kind === 'catalog' && builder.builder.triggerMode === true) + const state: BlockState = { + decl, + site, + meta, + params: {}, + modes: {}, + written: [], + todos: new Map(), + pendingFile: null, + } + const { params, modes } = state + + const pinned = new Set() + if (builder.kind === 'catalog') { + if (builder.builder.operation !== undefined) { + pinned.add('operation') + setOwn(params, 'operation', { kind: 'value', value: builder.builder.operation }) + } + for (const [id, value] of Object.entries(builder.builder.fixed ?? {})) { + pinned.add(id) + setOwn(params, id, { kind: 'value', value }) + } + } + const index = catalogBlock ? buildFieldIndex(catalogBlock, triggerMode, pinned) : null + const branchField = catalogBlock?.graph.branches + const conditionForm = builder.kind === 'catalog' && branchField?.kind === 'condition' + + if (paramsNode && paramsNode.type !== 'ObjectExpression') { + unsupported(ctx, paramsNode, 'Params are an object literal.', 'Write { field: value }.', decl) + } + const paramsObject = paramsNode?.type === 'ObjectExpression' ? paramsNode : undefined + const branchEntries: Array<[string, ObjectProperty]> = [] + let branches: CanonicalBranches | undefined = branchField + ? { kind: branchField.kind, rows: null } + : undefined + + if (paramsObject) { + const entries = objectEntries(ctx, paramsObject, (property, key) => { + ctx.reporter.report( + conditionForm ? 'E_DUPLICATE_BRANCH_KEY' : 'E_UNSUPPORTED_SYNTAX', + `The key ${key} is written twice.`, + rangeOf(ctx, property), + { hint: 'Write each key once.', blockKey: decl.key } + ) + }) + const addItem = ctx.comments.list(paramsObject.start ?? 0, paramsObject.end ?? 0, { + owner: encodeAnchor({ kind: 'block', block: decl.key }), + tail: 'last-item', + }) + for (const [key, property] of entries) { + addItem(property, encodeAnchor({ kind: 'param', block: decl.key, param: key })) + recordSpan(ctx, { kind: 'param', block: decl.key, param: key }, property) + if (branchField && key === branchField.subBlockId) { + if (property.value.type !== 'ObjectExpression') { + unsupported( + ctx, + property.value, + 'Branches are an object literal.', + 'Write { if: js`...`, else: true }.', + decl + ) + continue + } + const rows = objectEntries(ctx, property.value, (duplicate, name) => { + ctx.reporter.report( + 'E_DUPLICATE_BRANCH_KEY', + `The branch ${name} is written twice.`, + rangeOf(ctx, duplicate), + { hint: 'Give each branch a unique key.', blockKey: decl.key } + ) + }) + branches = { + kind: branchField.kind, + rows: + property.value.properties.length === 0 + ? null + : compileBranchRows(ctx, rows, branchField.kind, catalogBlock, site), + } + continue + } + if (conditionForm && !index?.fields.has(key) && !pinned.has(key)) { + branchEntries.push([key, property]) + continue + } + if (pinned.has(key)) { + ctx.reporter.report( + 'E_FIXED_PARAM', + `The builder already sets ${key}.`, + rangeOf(ctx, property), + { hint: `Remove ${key}; the method name pins it.`, blockKey: decl.key, param: key } + ) + continue + } + if (!index) { + const compiled = compileValue(ctx, property.value, site) + if (!compiled || compiled.kind === 'absent' || compiled.kind === 'todo') continue + if (compiled.kind === 'file') { + unsupported( + ctx, + property.value, + 'file() needs a catalog block type.', + 'Write the code inline.', + decl + ) + continue + } + setOwn(params, key, { kind: 'value', value: compiled.value }) + continue + } + const field = index.fields.get(key) + if (!field) { + const alias = index.memberAliases.get(key) + ctx.reporter.report( + 'E_UNKNOWN_PARAM', + `${catalogBlock?.name ?? decl.key} has no param ${key}.`, + rangeOf(ctx, property), + { + ...withHint( + alias + ? `Write it as ${alias}; the value kind picks the basic or advanced field.` + : didYouMean(key, index.fields.keys()) + ), + blockKey: decl.key, + param: key, + } + ) + continue + } + compileField(ctx, state, field, property) + } + } + if (conditionForm && branchField) { + branches = { + kind: 'condition', + rows: + branchEntries.length === 0 + ? null + : compileBranchRows(ctx, branchEntries, 'condition', catalogBlock, site), + } + } + if (branches) { + applyBranchMeta(ctx, branches.rows, meta.branches, site) + } else if (meta.branches[0]) { + unsupported( + ctx, + meta.branches[0][1], + 'This block has no branches.', + 'Remove branches from the meta.', + decl + ) + } + + let codeFile: string | undefined + if (state.pendingFile) { + const languageParam = params.language + const language = + languageParam?.kind === 'value' && typeof languageParam.value === 'string' + ? languageParam.value + : 'javascript' + const read = readCodeFile(ctx, state.pendingFile.compiled, language, decl) + if (read) { + setOwn(params, state.pendingFile.target, { kind: 'value', value: read.code }) + codeFile = read.path + } + } + + for (const [param, mode] of meta.modes) { + if (!Object.hasOwn(modes, param)) setOwn(modes, param, mode) + } + for (const field of index?.fields.values() ?? []) { + if (field.kind === 'pair' && !Object.hasOwn(modes, field.param)) + setOwn(modes, field.param, 'basic') + } + + const inactive = compileInactive(ctx, meta.inactive, params, site) + if (index) checkFields(ctx, index, state, inactive.properties) + + const block: CanonicalBlock = { + key: decl.key, + name: decl.name, + type: builder.type, + parent: decl.parent?.key ?? null, + enabled: meta.enabled, + locked: meta.locked, + triggerMode, + advancedMode: meta.advancedMode, + errorPort: meta.errorPort, + retry: meta.retry, + params, + modes, + ...(branches && { branches }), + ...(meta.opaque && { opaque: { data: meta.opaque } }), + } + return { block, inactive: inactive.ids, ...(codeFile !== undefined && { codeFile }) } +} + +function catalogSubBlock(decl: BlockDecl, id: SubBlockId): CatalogSubBlock | undefined { + const block = + decl.builder.kind === 'catalog' || decl.builder.kind === 'generic' + ? decl.builder.block + : undefined + return block?.subBlocks.find((candidate) => candidate.id === id) +} + +/** + * `meta.inactive`: stored values kept but not effective (build-spec decision 2): annotated stale + * values, the non-effective member of a pair, and ids the catalog does not know. Any id is + * accepted, by subBlock id. + */ +function compileInactive( + ctx: CompileContext, + entries: Array<[string, ObjectProperty]>, + params: Record, + site: ValueSite +): { ids: SubBlockId[]; properties: Map } { + const ids: SubBlockId[] = [] + const properties = new Map() + const { decl } = site + for (const [id, property] of entries) { + if (Object.hasOwn(params, id)) { + unsupported( + ctx, + property, + `${id} is both active and inactive.`, + 'Keep the value in params or in inactive, not both.', + decl + ) + continue + } + recordSpan(ctx, { kind: 'inactive', block: decl.key, param: id }, property) + const sub = catalogSubBlock(decl, id) + if (sub?.valueKind === 'tools') { + const tools = compileToolList(ctx, property.value, fieldSite(site, sub)) + if (!tools) continue + setOwn(params, id, { kind: 'tools', tools }) + } else { + const compiled = compileValue(ctx, property.value, fieldSite(site, sub)) + if (!compiled || compiled.kind !== 'value') continue + setOwn(params, id, { kind: 'value', value: compiled.value }) + } + ids.push(id) + properties.set(id, property) + } + return { ids, properties } +} + +/** Catalog warnings: visibility, required fields, value kinds (s3 §4 "Catalog checks"). */ +function checkFields( + ctx: CompileContext, + index: FieldIndex, + state: BlockState, + inactive: Map +): void { + const { decl, params, modes } = state + const values = storedValues(params) + for (const entry of state.written) { + const sub = index.subBlocks.get(entry.target) + if (!sub) continue + if (!isVisible(sub, values)) { + ctx.reporter.report( + 'W_FIELD_NOT_APPLICABLE', + `${entry.param} is hidden under the block's current values; it is kept but not used.`, + rangeOf(ctx, entry.property), + { + hint: 'Remove it, or move it under meta.inactive.', + blockKey: decl.key, + param: entry.param, + } + ) + } + if (entry.checked && !valueKindMatches(sub.valueKind, entry.value)) { + ctx.reporter.report( + 'W_VALUE_KIND', + `${entry.param} expects a ${sub.valueKind} value; the value is kept as written.`, + rangeOf(ctx, entry.property), + { blockKey: decl.key, param: entry.param } + ) + } + } + for (const [id, property] of inactive) { + const sub = index.subBlocks.get(id) + if (!sub || !isVisible(sub, values)) continue + const group = sub.canonicalParamId ? index.fields.get(sub.canonicalParamId) : undefined + const effective = group?.kind === 'pair' ? memberFor(group, modes[group.param] ?? 'basic') : sub + if (effective !== sub) continue + ctx.reporter.report( + 'W_INACTIVE_IS_ACTIVE', + `${id} is visible, so it is not inactive.`, + rangeOf(ctx, property), + { hint: 'Move it into params.', blockKey: decl.key, param: id } + ) + } + for (const field of index.fields.values()) { + const members = field.kind === 'single' ? [field.sub] : field.members + const required = members.some((sub) => isVisible(sub, values) && isRequired(sub, values)) + if (!required || members.some((sub) => Object.hasOwn(params, sub.id))) continue + const todo = state.todos.get(field.param) + ctx.reporter.report( + 'W_REQUIRED_MISSING', + `${field.param} is required.`, + rangeOf(ctx, todo ?? decl.call), + { + hint: `Set ${field.param} before running the workflow.`, + blockKey: decl.key, + param: field.param, + } + ) + } +} + +/** Config keys per container builder, and the CWM field each fills (the printer's forms). */ +const CONTAINER_CONFIG: Record> = { + 'loop.for': { count: 'iterations' }, + 'loop.forEach': { collection: 'forEachItems' }, + 'loop.while': { condition: 'whileCondition' }, + 'loop.doWhile': { condition: 'doWhileCondition' }, + 'parallel.count': { count: 'count', batchSize: 'batchSize' }, + 'parallel.collection': { collection: 'distribution', batchSize: 'batchSize' }, + parallel: { count: 'count', collection: 'distribution', batchSize: 'batchSize' }, +} +const SUBFLOW_FIELDS: Record<'loop' | 'parallel', readonly string[]> = { + loop: ['iterations', 'forEachItems', 'whileCondition', 'doWhileCondition'], + parallel: ['count', 'distribution', 'batchSize'], +} +const NUMBER_FIELDS = new Set(['iterations', 'count', 'batchSize']) +const TEXT_FIELDS = new Set(['whileCondition', 'doWhileCondition']) + +function numberLiteral(node: Node): number | null { + if (node.type === 'NumericLiteral') return node.value + if ( + node.type === 'UnaryExpression' && + node.operator === '-' && + node.argument.type === 'NumericLiteral' + ) { + return -node.argument.value + } + return null +} + +/** + * `loop.(name, config, body, meta?)` / `parallel[.](...)`. Config holds the fields + * the type uses; the subflow's other stored fields, and any params, sit under `meta.inactive` by + * their CWM names (build-spec decision 2, A9). + */ +function compileContainer(ctx: CompileContext, decl: BlockDecl): CompiledBlock | null { + const builder = decl.builder + if (builder.kind !== 'container') return null + const site: ValueSite = { decl, scope: decl.scope } + const [, configNode, , metaNode, ...extra] = decl.call.arguments + for (const node of extra) { + unsupported(ctx, node, 'Too many arguments.', 'Pass (name, config, body, meta?).', decl) + } + const meta = compileMeta(ctx, metaNode, site) + const builderKey = + builder.method === null ? builder.container : `${builder.container}.${builder.method}` + const configKeys = CONTAINER_CONFIG[builderKey] ?? {} + const fields = new Map() + + const setField = (field: string, node: Node): void => { + if (NUMBER_FIELDS.has(field)) { + const value = numberLiteral(node) + if (value === null) + unsupported(ctx, node, `${field} is a number.`, `Write ${field}: 3.`, decl) + else fields.set(field, value) + return + } + const compiled = compileValue(ctx, node, site) + if (!compiled || compiled.kind !== 'value') return + if (TEXT_FIELDS.has(field) && typeof compiled.value !== 'string') { + unsupported(ctx, node, `${field} is text.`, 'Write js`...`.', decl) + return + } + fields.set(field, compiled.value) + } + + if (configNode && configNode.type !== 'ObjectExpression') { + unsupported(ctx, configNode, 'The config is an object literal.', 'Write { count: 3 }.', decl) + } else if (configNode) { + for (const [key, property] of objectEntries(ctx, configNode)) { + const field = configKeys[key] + if (!field) { + ctx.reporter.report( + 'E_UNKNOWN_PARAM', + `This ${builder.container} has no config ${key}.`, + rangeOf(ctx, property), + { ...withHint(didYouMean(key, Object.keys(configKeys))), blockKey: decl.key } + ) + continue + } + setField(field, property.value) + } + } + + const subflowFields = SUBFLOW_FIELDS[builder.container] + const activeFields = new Set(Object.values(configKeys)) + const paramEntries: Array<[string, ObjectProperty]> = [] + for (const [key, property] of meta.inactive) { + if (subflowFields.includes(key) && !activeFields.has(key)) { + recordSpan(ctx, { kind: 'inactive', block: decl.key, param: key }, property) + setField(key, property.value) + } else { + paramEntries.push([key, property]) + } + } + const params: Record = {} + const inactive = compileInactive(ctx, paramEntries, params, site) + + const json = (field: string): Json | undefined => fields.get(field) as Json | undefined + const text = (field: string): string | undefined => { + const value = fields.get(field) + return typeof value === 'string' ? value : undefined + } + const number = (field: string): number | undefined => { + const value = fields.get(field) + return typeof value === 'number' ? value : undefined + } + let subflow: LoopSpec | ParallelSpec + if (builder.container === 'loop') { + const forEachItems = json('forEachItems') + const whileCondition = text('whileCondition') + const doWhileCondition = text('doWhileCondition') + subflow = { + kind: 'loop', + loopType: builder.method as LoopSpec['loopType'], + iterations: number('iterations') ?? DEFAULT_LOOP_ITERATIONS, + ...(forEachItems !== undefined && { forEachItems }), + ...(whileCondition !== undefined && { whileCondition }), + ...(doWhileCondition !== undefined && { doWhileCondition }), + } + } else { + const count = number('count') + const distribution = json('distribution') + const batchSize = number('batchSize') + subflow = { + kind: 'parallel', + ...(builder.method !== null && { parallelType: builder.method as 'count' | 'collection' }), + ...(count !== undefined && { count }), + ...(distribution !== undefined && { distribution }), + ...(batchSize !== undefined && { batchSize }), + } + } + + const modes: Record = {} + for (const [param, mode] of meta.modes) setOwn(modes, param, mode) + const block: CanonicalBlock = { + key: decl.key, + name: decl.name, + type: builder.container, + parent: decl.parent?.key ?? null, + enabled: meta.enabled, + locked: meta.locked, + triggerMode: meta.triggerMode ?? false, + advancedMode: meta.advancedMode, + errorPort: meta.errorPort, + retry: meta.retry, + params, + modes, + subflow, + ...(meta.opaque && { opaque: { data: meta.opaque } }), + } + return { block, inactive: inactive.ids } +} + +/** Pass 2 for one declaration. `null` for declarations already reported as invalid. */ +export function compileBlock(ctx: CompileContext, decl: BlockDecl): CompiledBlock | null { + if (decl.duplicate || decl.builder.kind === 'unknown') return null + return decl.builder.kind === 'container' + ? compileContainer(ctx, decl) + : compileRegularBlock(ctx, decl) +} diff --git a/packages/workflow-code/src/compile/comments.ts b/packages/workflow-code/src/compile/comments.ts new file mode 100644 index 00000000000..e71fd272800 --- /dev/null +++ b/packages/workflow-code/src/compile/comments.ts @@ -0,0 +1,153 @@ +import type { Comment } from '@babel/types' +import { encodeAnchor } from '../anchors' +import type { AnchorKey, CodeComment } from '../model' +import type { Reporter } from './report' + +/** One anchorable node in a sibling list: a statement, a param property, a variable. */ +interface AnchorItem { + start: number + end: number + startLine: number + endLine: number + /** `null` falls back to the list's owner. */ + anchor: AnchorKey | null + /** The first wiring statement of the workflow body, for the `wiring` anchor. */ + firstWiring: boolean +} + +type TailRule = { anchor: AnchorKey; placement: CodeComment['placement'] } | 'last-item' + +interface SiblingList { + start: number + end: number + items: AnchorItem[] + /** Where a comment goes when the list has no items to attach to. */ + owner: AnchorKey + /** Where a comment after the last item, on its own line, goes. */ + tail: TailRule +} + +export type AddCommentItem = ( + node: { start?: number | null; end?: number | null }, + anchor: AnchorKey | null, + firstWiring?: boolean +) => void + +export interface ListOptions { + owner: AnchorKey + tail: TailRule +} + +/** + * Assigns every comment to an anchor (s3 §4 "Comments", build-spec decision 10). The interpreter + * registers each sibling list it walks (module statements, a body's statements, a params object's + * properties, the variables object) with an anchor per item. A comment between items attaches to + * the previous item when it ends on the same line (trailing), else to the next (leading), else to + * the list's tail. A comment inside an item is hoisted to that item's anchor with + * `W_COMMENT_MOVED`, so after one print every comment sits at an anchor. + * + * Two extra rules: the comment group directly above the first wiring statement goes to `wiring` + * when a blank line separates it from that statement, and everything before the first import goes + * to `header`. + */ +export class CommentCollector { + private readonly lists: SiblingList[] = [] + readonly comments: Partial> = {} + + constructor( + private readonly file: string, + private readonly reporter: Reporter + ) {} + + private line(offset: number): number { + return this.reporter.span({ file: this.file, start: offset, end: offset }).line + } + + /** Starts a sibling list covering `[start, end)`; returns a function that adds items to it. */ + list(start: number, end: number, options: ListOptions): AddCommentItem { + const list: SiblingList = { start, end, items: [], ...options } + this.lists.push(list) + return (node, anchor, firstWiring = false) => { + const itemStart = node.start ?? start + const itemEnd = node.end ?? itemStart + list.items.push({ + start: itemStart, + end: itemEnd, + startLine: this.line(itemStart), + endLine: this.line(itemEnd), + anchor, + firstWiring, + }) + } + } + + private add(anchor: AnchorKey, comment: Comment, placement: CodeComment['placement']): void { + const entry: CodeComment = { + text: comment.value, + kind: comment.type === 'CommentLine' ? 'line' : 'block', + placement, + } + const existing = this.comments[anchor] + if (existing) existing.push(entry) + else + Object.defineProperty(this.comments, anchor, { + value: [entry], + enumerable: true, + writable: true, + configurable: true, + }) + } + + private innermostList(start: number, end: number): SiblingList | null { + let best: SiblingList | null = null + for (const list of this.lists) { + if (list.start <= start && end <= list.end) { + if (!best || list.end - list.start < best.end - best.start) best = list + } + } + return best + } + + /** Assigns `comments` (in source order) once every list is registered. */ + assign(comments: readonly Comment[]): void { + const footer = encodeAnchor({ kind: 'footer' }) + for (const comment of comments) { + const start = comment.start ?? 0 + const end = comment.end ?? start + const list = this.innermostList(start, end) + if (!list) { + this.add(footer, comment, 'leading') + continue + } + const items = [...list.items].sort((a, b) => a.start - b.start) + const container = items.find((item) => item.start <= start && end <= item.end) + if (container) { + this.add(container.anchor ?? list.owner, comment, 'leading') + this.reporter.report( + 'W_COMMENT_MOVED', + 'This comment is inside an expression; it moves to the nearest anchor on the next print.', + { file: this.file, start, end }, + { hint: 'Put comments above a block, a param, or a wiring statement.' } + ) + continue + } + const commentLine = this.line(start) + const commentEndLine = this.line(end) + const previous = [...items].reverse().find((item) => item.end <= start) + const next = items.find((item) => item.start >= end) + if (previous && previous.endLine === commentLine) { + this.add(previous.anchor ?? list.owner, comment, 'trailing') + } else if (next) { + const wiring = next.firstWiring && next.startLine - commentEndLine >= 2 + const anchor = wiring ? encodeAnchor({ kind: 'wiring' }) : (next.anchor ?? list.owner) + this.add(anchor, comment, 'leading') + } else if (previous && list.tail === 'last-item') { + this.add(previous.anchor ?? list.owner, comment, 'trailing') + } else if (list.tail !== 'last-item') { + this.add(list.tail.anchor, comment, list.tail.placement) + } else { + this.add(list.owner, comment, 'leading') + } + } + } +} diff --git a/packages/workflow-code/src/compile/context.ts b/packages/workflow-code/src/compile/context.ts new file mode 100644 index 00000000000..5681fce8ee2 --- /dev/null +++ b/packages/workflow-code/src/compile/context.ts @@ -0,0 +1,156 @@ +import type { + ArrowFunctionExpression, + CallExpression, + ExpressionStatement, + Node, +} from '@babel/types' +import { encodeAnchor } from '../anchors' +import type { CompileLimits } from '../api' +import type { BlockCatalog, CatalogBlock, CatalogBuilder } from '../catalog/types' +import type { SourceSpan } from '../diagnostics/frame' +import type { Anchor, AnchorKey, BlockKey, CanonicalVariable, VarKey } from '../model' +import type { AddCommentItem, CommentCollector } from './comments' +import type { Range, Reporter } from './report' + +/** How a block call was resolved against the SDK surface and the catalog. */ +export type ResolvedBuilder = + | { + kind: 'catalog' + path: string + type: string + builder: CatalogBuilder + block: CatalogBlock | undefined + } + | { kind: 'generic'; type: string; block: CatalogBlock | undefined } + | { + kind: 'container' + container: 'loop' | 'parallel' + /** `null` for the bare `parallel(...)` form, which leaves `parallelType` unset. */ + method: string | null + } + /** `E_UNKNOWN_BUILDER` was reported; the name still claims its key. */ + | { kind: 'unknown' } + +export interface BlockDecl { + key: BlockKey + name: string + /** The `const` identifier, or `null` for a bare statement or an arrow-expression body. */ + binding: string | null + call: CallExpression + /** The node the `block` anchor and span cover. */ + anchorNode: Node + nameNode: Node + /** The scope the declaration sits in. */ + scope: Scope + /** The enclosing loop/parallel declaration. */ + parent: BlockDecl | null + order: number + builder: ResolvedBuilder + /** The body scope, for containers. */ + body: Scope | null + /** A duplicate name: reported, never emitted. */ + duplicate: boolean +} + +export type Binding = + | { kind: 'block'; decl: BlockDecl } + | { kind: 'loopParam'; container: BlockDecl } + | { kind: 'sdk'; name: string } + | { kind: 'vars' } + +export interface Scope { + parent: Scope | null + bindings: Map + /** The loop/parallel whose body this is, or `null` for the workflow body and module scope. */ + container: BlockDecl | null +} + +export interface WiringStatement { + statement: ExpressionStatement + scope: Scope + /** The first wiring statement of the workflow body, for the `wiring` comment anchor. */ + firstWiring: boolean + /** Registers the statement as a comment item once its edge anchor is known. */ + addItem: AddCommentItem +} + +/** An edge implied by an arrow-expression body: `(p) => block(...)` means `p.to(block)`. */ +export interface ImpliedEdge { + container: BlockDecl + child: BlockDecl + body: ArrowFunctionExpression +} + +export interface CompileContext { + file: string + text: string + reporter: Reporter + catalog: BlockCatalog + files: ReadonlyMap + limits: Required + comments: CommentCollector + decls: BlockDecl[] + declsByKey: Map + /** Every block binding by identifier, across scopes, for `E_OUT_OF_SCOPE`. */ + declsByBinding: Map + variables: Map + wiring: WiringStatement[] + implied: ImpliedEdge[] + spans: Map +} + +/** Anything with Babel-style offsets. */ +export interface Located { + start?: number | null + end?: number | null +} + +export function rangeOf(ctx: CompileContext, node: Located): Range { + const start = node.start ?? 0 + return { file: ctx.file, start, end: node.end ?? start } +} + +/** Records an anchor's span the first time it is seen. */ +export function recordSpan(ctx: CompileContext, anchor: Anchor, node: Located): AnchorKey { + const key = encodeAnchor(anchor) + if (!ctx.spans.has(key)) ctx.spans.set(key, ctx.reporter.span(rangeOf(ctx, node))) + return key +} + +export function lookup(scope: Scope, name: string): Binding | null { + for (let current: Scope | null = scope; current; current = current.parent) { + const binding = current.bindings.get(name) + if (binding) return binding + } + return null +} + +/** Every identifier visible from `scope`, innermost first, for did-you-mean. */ +export function visibleNames(scope: Scope): string[] { + const names: string[] = [] + for (let current: Scope | null = scope; current; current = current.parent) { + names.push(...current.bindings.keys()) + } + return names +} + +/** The enclosing containers of a declaration, innermost first (not the declaration itself). */ +export function enclosingContainers(decl: BlockDecl): BlockDecl[] { + const chain: BlockDecl[] = [] + for (let current = decl.parent; current; current = current.parent) chain.push(current) + return chain +} + +export function catalogBlockOf(decl: BlockDecl): CatalogBlock | undefined { + switch (decl.builder.kind) { + case 'catalog': + case 'generic': + return decl.builder.block + default: + return undefined + } +} + +export function containerKindOf(decl: BlockDecl): 'loop' | 'parallel' | null { + return decl.builder.kind === 'container' ? decl.builder.container : null +} diff --git a/packages/workflow-code/src/compile/edges.ts b/packages/workflow-code/src/compile/edges.ts new file mode 100644 index 00000000000..08f178a79ae --- /dev/null +++ b/packages/workflow-code/src/compile/edges.ts @@ -0,0 +1,359 @@ +import type { CallExpression, Expression, Node } from '@babel/types' +import { + getWorkflowEdgeScopeDropReason, + type WorkflowEdgeScopeBlock, +} from '@sim/workflow-types/workflow' +import { portKey } from '../anchors' +import type { AnchorKey, CanonicalBlock, CanonicalEdge, Port } from '../model' +import { + type BlockDecl, + type CompileContext, + catalogBlockOf, + containerKindOf, + lookup, + rangeOf, + recordSpan, + type Scope, + type WiringStatement, +} from './context' +import { HINTS, hintForNode } from './hints' +import { literalText, setOwn } from './values' + +/** A wiring source: a block and, when written explicitly, the port (`cond.key`, `p.start`). */ +interface Endpoint { + decl: BlockDecl + port: Port | null +} + +/** + * The port `edge(a, handle, b)` denotes. The printer writes `edge()` for edges with no fluent form: + * the `out` port of a condition, router or container (`'source'`), and subflow ports on a block + * that is not a container. Every other handle is kept verbatim as a raw port. + */ +function portForHandle(handle: string): Port { + switch (handle) { + case 'source': + return { kind: 'out' } + case 'loop-start-source': + case 'parallel-start-source': + return { kind: 'subflowStart' } + case 'loop-end-source': + case 'parallel-end-source': + return { kind: 'subflowEnd' } + default: + return { kind: 'raw', handle } + } +} + +/** Implicit branch keys of a never-persisted branch list (A7). */ +const IMPLICIT_BRANCHES = { condition: ['if', 'else'], router: ['route0'] } as const + +export class EdgeCollector { + readonly edges: CanonicalEdge[] = [] + private readonly seen = new Set() + private readonly scopeBlocks: Record = {} + + constructor( + private readonly ctx: CompileContext, + private readonly blocks: ReadonlyMap + ) { + for (const decl of ctx.decls) { + if (decl.duplicate) continue + setOwn(this.scopeBlocks, decl.key, { + type: containerKindOf(decl) ?? catalogBlockOf(decl)?.type ?? '', + data: decl.parent ? { parentId: decl.parent.key } : {}, + }) + } + } + + private error( + code: Parameters[0], + message: string, + node: Node, + hint?: string + ) { + this.ctx.reporter.report( + code, + message, + rangeOf(this.ctx, node), + hint === undefined ? {} : { hint } + ) + } + + /** Validates and records one edge (s3 §4 "Edges"); `false` when it was rejected. */ + add( + from: BlockDecl, + port: Port, + to: BlockDecl, + node: Node, + anchors: AnchorKey[], + viaEdgeCall = false + ): boolean { + const source = this.blocks.get(from.key) + const target = this.blocks.get(to.key) + if (!source || !target) return false + const sourceCatalog = catalogBlockOf(from) ?? this.ctx.catalog.blocks[source.type] + const targetCatalog = catalogBlockOf(to) ?? this.ctx.catalog.blocks[target.type] + if (sourceCatalog?.graph.annotationOnly || targetCatalog?.graph.annotationOnly) { + this.error('E_EDGE_NOTE', 'Notes cannot be wired.', node, 'Remove this edge.') + return false + } + if (target.triggerMode || targetCatalog?.graph.canBeTarget === false) { + this.error('E_TARGET_TRIGGER', `${to.name} is a trigger; nothing can connect into it.`, node) + return false + } + if (port.kind === 'error' && sourceCatalog && !sourceCatalog.graph.errorPort) { + this.error('E_ERROR_PORT_UNSUPPORTED', `${from.name} has no error port.`, node) + return false + } + const scopeReason = getWorkflowEdgeScopeDropReason( + { source: from.key, target: to.key }, + this.scopeBlocks + ) + const intoOwnChild = to.parent === from + const startMismatch = !viaEdgeCall && port.kind === 'subflowStart' && !intoOwnChild + const endMismatch = !viaEdgeCall && port.kind !== 'subflowStart' && intoOwnChild + if (scopeReason || startMismatch || endMismatch) { + this.error( + 'E_EDGE_SCOPE', + scopeReason ?? + (startMismatch + ? `${to.name} is not inside ${from.name}.` + : `${to.name} is inside ${from.name}; start it with the loop parameter.`), + node, + 'Wire blocks within one scope; start a subflow body with p.start.to(block).' + ) + return false + } + const tuple = `${from.key}\u0000${portKey(port)}\u0000${to.key}` + if (this.seen.has(tuple)) { + this.error( + 'E_DUPLICATE_EDGE', + `${from.name} is already wired to ${to.name} from this port.`, + node, + 'Remove the repeated edge.' + ) + return false + } + this.seen.add(tuple) + this.edges.push({ from: from.key, port, to: to.key }) + const anchor = { kind: 'edges', block: from.key, port: portKey(port) } as const + anchors.push(recordSpan(this.ctx, anchor, node)) + return true + } + + private blockFor(scope: Scope, node: Node): BlockDecl | null { + if (node.type !== 'Identifier') return null + const binding = lookup(scope, node.name) + return binding?.kind === 'block' ? binding.decl : null + } + + private branchPort(decl: BlockDecl, key: string, node: Node): Port | null { + const block = this.blocks.get(decl.key) + const branches = block?.branches + if (!block || !branches) { + this.error( + 'E_UNKNOWN_BRANCH', + `${decl.name} has no branches.`, + node, + 'Only condition and router blocks have branches.' + ) + return null + } + const keys: readonly string[] = branches.rows + ? branches.rows.map((row) => row.key) + : IMPLICIT_BRANCHES[branches.kind] + if (!keys.includes(key)) { + this.error( + 'E_UNKNOWN_BRANCH', + `${decl.name} has no branch ${key}.`, + node, + `Branches: ${keys.join(', ')}.` + ) + return null + } + return { kind: 'branch', key } + } + + /** The sources a wiring expression denotes, or `null` after reporting. */ + private endpoints( + scope: Scope, + node: Expression, + anchors: AnchorKey[], + statement: Node + ): Endpoint[] | null { + if (node.type === 'Identifier') { + const binding = lookup(scope, node.name) + if (binding?.kind === 'block') return [{ decl: binding.decl, port: null }] + if (binding?.kind === 'loopParam') + return [{ decl: binding.container, port: { kind: 'subflowStart' } }] + this.error('E_UNKNOWN_IDENTIFIER', `${node.name} is not a block.`, node) + return null + } + if (node.type === 'MemberExpression' && !node.computed && node.property.type === 'Identifier') { + const object = node.object + if (object.type === 'Identifier') { + const binding = lookup(scope, object.name) + if (binding?.kind === 'loopParam' && node.property.name === 'start') { + return [{ decl: binding.container, port: { kind: 'subflowStart' } }] + } + if (binding?.kind === 'block') { + const port = this.branchPort(binding.decl, node.property.name, node) + return port ? [{ decl: binding.decl, port }] : null + } + } + } + if (node.type === 'CallExpression') { + const result = this.call(scope, node, anchors, statement) + if (result === 'void') { + this.error( + 'E_UNSUPPORTED_SYNTAX', + 'onError(...) cannot be chained.', + node, + 'Start a new statement.' + ) + return null + } + return result + } + this.error( + 'E_UNSUPPORTED_SYNTAX', + `${node.type} is not a wiring source.`, + node, + hintForNode(node) + ) + return null + } + + private targets(scope: Scope, call: CallExpression): BlockDecl[] | null { + const targets: BlockDecl[] = [] + for (const argument of call.arguments) { + const decl = this.blockFor(scope, argument) + if (!decl) { + this.error( + 'E_UNSUPPORTED_SYNTAX', + 'Wire blocks by their binding.', + argument, + HINTS.bindInline + ) + return null + } + targets.push(decl) + } + if (targets.length === 0) { + this.error('E_UNSUPPORTED_SYNTAX', 'Pass at least one block.', call, 'Write a.to(b).') + return null + } + return targets + } + + private defaultPort(endpoint: Endpoint, statement: Node): Port | null { + if (endpoint.port) return endpoint.port + if (containerKindOf(endpoint.decl)) return { kind: 'subflowEnd' } + if (this.blocks.get(endpoint.decl.key)?.branches) { + this.error( + 'E_NO_DEFAULT_OUTPUT', + `${endpoint.decl.name} routes through named branches.`, + statement, + `Wire a branch: ${endpoint.decl.binding ?? 'block'}..to(...).` + ) + return null + } + return { kind: 'out' } + } + + /** Interprets `x.to(...)`, `x.onError(...)` and `edge(a, handle, b)`. */ + private call( + scope: Scope, + call: CallExpression, + anchors: AnchorKey[], + statement: Node + ): Endpoint[] | 'void' | null { + const callee = call.callee + if (callee.type === 'Identifier') return this.rawEdge(scope, call, anchors, statement) + if ( + callee.type !== 'MemberExpression' || + callee.computed || + callee.property.type !== 'Identifier' + ) { + this.error('E_UNSUPPORTED_SYNTAX', 'Not a wiring call.', call, HINTS.calls) + return null + } + const method = callee.property.name + if (callee.object.type === 'Super') { + this.error('E_UNSUPPORTED_SYNTAX', 'super is not a block.', callee.object, HINTS.calls) + return null + } + const sources = this.endpoints(scope, callee.object, anchors, statement) + const targets = sources ? this.targets(scope, call) : null + if (!sources || !targets) return null + for (const source of sources) { + let port: Port | null + if (method === 'onError') { + port = source.port ? null : { kind: 'error' } + if (!port) { + this.error( + 'E_UNSUPPORTED_SYNTAX', + 'onError(...) applies to a block.', + call, + 'Write block.onError(handler).' + ) + return null + } + } else { + port = this.defaultPort(source, statement) + if (!port) return null + } + for (const target of targets) this.add(source.decl, port, target, statement, anchors) + } + if (method === 'onError') return 'void' + return targets.map((decl) => ({ decl, port: null })) + } + + private rawEdge( + scope: Scope, + call: CallExpression, + anchors: AnchorKey[], + statement: Node + ): 'void' | null { + const [fromNode, handleNode, toNode, ...extra] = call.arguments + const from = fromNode ? this.blockFor(scope, fromNode) : null + const to = toNode ? this.blockFor(scope, toNode) : null + const handle = handleNode ? literalText(handleNode) : null + if (!from || !to || handle === null || handle === '' || extra.length > 0) { + this.error( + 'E_UNSUPPORTED_SYNTAX', + 'edge() takes (from, handle, to).', + call, + "Write edge(a, 'handle', b)." + ) + return null + } + if (this.add(from, portForHandle(handle), to, statement, anchors, true)) { + this.ctx.reporter.report( + 'W_RAW_HANDLE', + `The handle ${handle} is kept verbatim.`, + rangeOf(this.ctx, statement), + { + hint: 'Use .to(), .onError() or a branch when the handle is a standard one.', + blockKey: from.key, + } + ) + } + return 'void' + } + + /** Pass 2 for one wiring statement; registers its comment anchor. */ + statement(entry: WiringStatement): void { + const anchors: AnchorKey[] = [] + const expression = entry.statement.expression + if (expression.type === 'CallExpression') + this.call(entry.scope, expression, anchors, entry.statement) + entry.addItem(entry.statement, anchors[0] ?? null, entry.firstWiring) + if (entry.firstWiring) recordSpan(this.ctx, { kind: 'wiring' }, entry.statement) + } + + implied(container: BlockDecl, child: BlockDecl, node: Node): void { + this.add(container, { kind: 'subflowStart' }, child, node, []) + } +} diff --git a/packages/workflow-code/src/compile/grammar.test.ts b/packages/workflow-code/src/compile/grammar.test.ts new file mode 100644 index 00000000000..713dae8b281 --- /dev/null +++ b/packages/workflow-code/src/compile/grammar.test.ts @@ -0,0 +1,905 @@ +import { describe, expect, it } from 'vitest' +import type { CompileResult } from '../api' +import type { CompileDiagnosticCode } from '../diagnostics/codes' +import type { CanonicalBlock, CanonicalWorkflow } from '../model' +import { compileWorkflow } from './index' +import { TEST_CATALOG } from './test-catalog' + +const IMPORTS = + "import { agent, api, binding, block, condition, edge, env, file, fn, js, json, kb, loop, md, note, parallel, picked, raw, ref, router, slack, t, table, todo, trigger, upload, workflow } from '@sim/workflow-sdk'" + +const DEFAULT_OPTIONS = "{ variables: { retries: { type: 'number', value: 3 } } }" + +/** A workflow file whose body starts on line 5, indented two spaces. */ +function source(body: string, options = DEFAULT_OPTIONS): string { + const indented = body + .split('\n') + .map((line) => (line ? ` ${line}` : line)) + .join('\n') + return `// @sim-sdk 1\n${IMPORTS}\n\nexport default workflow('Test', ${options}, ({ vars }) => {\n${indented}\n})\n` +} + +const ENTRY = 'workflows/test.ts' + +function run(text: string, files: Record = {}, sdkMajor = 1): CompileResult { + return compileWorkflow({ + entry: { path: ENTRY, text }, + files: new Map(Object.entries(files)), + catalog: TEST_CATALOG, + sdkMajor, + }) +} + +function errorsOf(result: CompileResult) { + return result.diagnostics.filter((d) => d.severity === 'error') +} + +/** Compiles and requires zero errors; returns the workflow. */ +function ok(text: string, files: Record = {}): CanonicalWorkflow { + const result = run(text, files) + expect(errorsOf(result).map((d) => `${d.code}: ${d.message}`)).toEqual([]) + if (!result.workflow) throw new Error('expected a workflow') + return result.workflow +} + +function blockOf(workflow: CanonicalWorkflow, key: string): CanonicalBlock { + const found = workflow.blocks[key] + if (!found) throw new Error(`missing block ${key}`) + return found +} + +function paramValue(workflow: CanonicalWorkflow, key: string, param: string): unknown { + const entry = blockOf(workflow, key).params[param] + if (!entry) return undefined + return entry.kind === 'value' ? entry.value : entry.tools +} + +/** 1-based line and column of the first occurrence of `needle` in `text`. */ +function locate(text: string, needle: string, occurrence = 1): { line: number; column: number } { + let index = -1 + for (let n = 0; n < occurrence; n++) { + index = text.indexOf(needle, index + 1) + if (index === -1) throw new Error(`needle not found: ${needle}`) + } + const before = text.slice(0, index).split('\n') + return { line: before.length, column: before[before.length - 1].length + 1 } +} + +function spanOf(result: CompileResult, anchor: string) { + return Object.entries(result.spans).find(([key]) => key === anchor)?.[1] +} + +function expectDiagnostic( + result: CompileResult, + code: CompileDiagnosticCode, + at: { line: number; column: number }, + hint?: string +) { + const matches = result.diagnostics.filter((d) => d.code === code) + expect( + matches.map((d) => ({ line: d.span.line, column: d.span.column })), + `diagnostics: ${result.diagnostics.map((d) => `${d.code}@${d.span.line}:${d.span.column}`).join(', ')}` + ).toContainEqual(at) + const match = matches.find((d) => d.span.line === at.line && d.span.column === at.column) + if (hint !== undefined) expect(match?.hint).toBe(hint) + expect(match?.frame).toContain('^') + if (code.startsWith('E_')) expect(result.workflow).toBeNull() +} + +const START = "const start = trigger.start('Start', {})" + +describe('accepted grammar', () => { + it('compiles literals, objects, arrays, negative numbers and drops a null param', () => { + const wf = ok( + source( + [ + START, + "const call = api('Call', { url: 'https://x', method: 'GET', headers: { Authorization: 'k', 'X-Id': 2, list: [true, null] }, body: { a: 1 } })", + "const think = agent('Think', { model: 'm', temperature: -0.5, messages: null })", + 'start.to(call)', + 'call.to(think)', + ].join('\n') + ) + ) + expect(paramValue(wf, 'call', 'url')).toBe('https://x') + expect(paramValue(wf, 'call', 'headers')).toEqual({ + Authorization: 'k', + 'X-Id': 2, + list: [true, null], + }) + expect(paramValue(wf, 'call', 'body')).toBe(JSON.stringify({ a: 1 }, null, 2)) + expect(paramValue(wf, 'think', 'temperature')).toBe(-0.5) + expect(blockOf(wf, 'think').params).not.toHaveProperty('messages') + }) + + it('compiles tagged templates to text-identical stored strings', () => { + const wf = ok( + source( + [ + START, + "const a = agent('A', { model: t`Hi ${start.input} key ${env.API_KEY} n=${3} s=${'x'}`, temperature: 1 })", + 'const b = agent(\'B\', { model: `multi\\nline `, responseFormat: json`{ "a": ${a.content} }` })', + "const c = agent('C', { model: md`**bold**`, responseFormat: js`${a.content} === 'x'` })", + ].join('\n') + ) + ) + expect(paramValue(wf, 'a', 'model')).toBe('Hi key {{API_KEY}} n=3 s=x') + expect(paramValue(wf, 'b', 'model')).toBe('multi\nline ') + expect(paramValue(wf, 'b', 'responseFormat')).toBe('{ "a": }') + expect(paramValue(wf, 'c', 'model')).toBe('**bold**') + expect(paramValue(wf, 'c', 'responseFormat')).toBe(" === 'x'") + }) + + it('maps every ref path form exactly', () => { + const wf = ok( + source( + [ + START, + "const a = api('A', { url: start.input.items[0].id, headers: { k: start['some-field'], n: start.input['0'], whole: start, v: vars.retries, e: env.TOKEN, r: ref('Start.input') } })", + ].join('\n') + ) + ) + expect(paramValue(wf, 'a', 'url')).toBe('') + expect(paramValue(wf, 'a', 'headers')).toEqual({ + k: '', + n: '', + whole: '', + v: '', + e: '{{TOKEN}}', + r: '', + }) + }) + + it('lifts resources, picked ids, raw values and the generic block builder', () => { + const wf = ok( + source( + [ + "const send = slack.sendMessage('Send', { authMethod: 'oauth', credential: binding('support-slack'), channel: picked('C1'), text: 'hi' })", + "const row = table.insertRow('Row', { tableId: table('leads'), data: raw('{\"a\":1}') })", + "const legacy = block('custom_block_x', 'Legacy', { a: kb('docs'), b: workflow('enrich'), c: upload('files/a.pdf'), d: raw({ $sim: 'unresolved', kind: 'table', id: 't1' }), e: { $sim: 'plain' } }, { triggerMode: true })", + ].join('\n') + ) + ) + expect(paramValue(wf, 'send', 'credential')).toEqual({ + $sim: 'resource', + kind: 'credential', + key: 'support-slack', + }) + expect(paramValue(wf, 'send', 'channel')).toBe('C1') + expect(paramValue(wf, 'send', 'operation')).toBe('send') + expect(paramValue(wf, 'row', 'tableId')).toEqual({ + $sim: 'resource', + kind: 'table', + key: 'leads', + }) + expect(paramValue(wf, 'row', 'data')).toBe('{"a":1}') + const legacy = blockOf(wf, 'legacy') + expect(legacy.type).toBe('custom_block_x') + expect(legacy.triggerMode).toBe(true) + expect(paramValue(wf, 'legacy', 'a')).toEqual({ + $sim: 'resource', + kind: 'knowledge-base', + key: 'docs', + }) + expect(paramValue(wf, 'legacy', 'b')).toEqual({ + $sim: 'resource', + kind: 'workflow', + key: 'enrich', + }) + expect(paramValue(wf, 'legacy', 'c')).toEqual({ + $sim: 'resource', + kind: 'file', + key: 'files/a.pdf', + }) + expect(paramValue(wf, 'legacy', 'd')).toEqual({ $sim: 'unresolved', kind: 'table', id: 't1' }) + expect(paramValue(wf, 'legacy', 'e')).toEqual({ $sim: 'literal', value: { $sim: 'plain' } }) + }) + + it('derives the basic/advanced member from the value kind', () => { + const wf = ok( + source( + [ + "const a = slack.sendMessage('A', { authMethod: 'oauth', channel: picked('C1'), text: 'x' })", + "const b = slack.sendMessage('B', { authMethod: 'oauth', channel: 'C2', text: 'x' })", + "const c = slack.sendMessage('C', { authMethod: 'oauth', channel: 'C3', text: 'x' }, { modes: { channel: 'basic' } })", + "const d = slack.sendMessage('D', { authMethod: 'oauth', text: 'x' })", + "const e = slack.sendMessage('E', { authMethod: 'oauth', text: 'x' }, { advancedMode: true })", + "const f = slack.sendMessage('F', { authMethod: 'oauth', channel: picked('C4'), text: 'x' }, { modes: { channel: 'advanced' } })", + ].join('\n') + ) + ) + expect(blockOf(wf, 'a').modes).toEqual({ channel: 'basic' }) + expect(paramValue(wf, 'a', 'channel')).toBe('C1') + expect(blockOf(wf, 'b').modes).toEqual({ channel: 'advanced' }) + expect(paramValue(wf, 'b', 'manualChannel')).toBe('C2') + expect(blockOf(wf, 'b').params).not.toHaveProperty('channel') + expect(blockOf(wf, 'c').modes).toEqual({ channel: 'basic' }) + expect(paramValue(wf, 'c', 'channel')).toBe('C3') + expect(blockOf(wf, 'd').modes).toEqual({ channel: 'basic' }) + expect(blockOf(wf, 'e').modes).toEqual({ channel: 'basic' }) + expect(blockOf(wf, 'e').advancedMode).toBe(true) + expect(blockOf(wf, 'f').modes).toEqual({ channel: 'advanced' }) + expect(paramValue(wf, 'f', 'manualChannel')).toBe('C4') + }) + + it('compiles named condition branches, an empty branch object and router routes', () => { + const wf = ok( + source( + [ + START, + "const a = agent('A', { model: 'm' })", + "const route = condition('Route', { billing: js`${a.content} === 'billing'`, urgent: 'x > 1', else: '' })", + "const blank = condition('Blank', {})", + "const triage = router('Triage', { context: 'c', routes: { small: 'Under $100', big: 'Over' } })", + 'start.to(a)', + 'a.to(route)', + 'route.billing.to(triage)', + 'route.else.to(blank)', + 'blank.if.to(triage)', + 'triage.big.to(a)', + ].join('\n') + ) + ) + expect(blockOf(wf, 'route').branches).toEqual({ + kind: 'condition', + rows: [ + { key: 'billing', value: " === 'billing'" }, + { key: 'urgent', value: 'x > 1' }, + { key: 'else', value: '' }, + ], + }) + expect(blockOf(wf, 'blank').branches).toEqual({ kind: 'condition', rows: null }) + expect(blockOf(wf, 'triage').branches).toEqual({ + kind: 'router', + rows: [ + { key: 'small', value: 'Under $100' }, + { key: 'big', value: 'Over' }, + ], + }) + expect(blockOf(wf, 'triage').params).not.toHaveProperty('routes') + expect(wf.edges).toContainEqual({ + from: 'route', + port: { kind: 'branch', key: 'billing' }, + to: 'triage', + }) + expect(wf.edges).toContainEqual({ + from: 'blank', + port: { kind: 'branch', key: 'if' }, + to: 'triage', + }) + expect(wf.edges).toContainEqual({ + from: 'triage', + port: { kind: 'branch', key: 'big' }, + to: 'a', + }) + }) + + it('compiles loops and parallels with innermost and named loop params', () => { + const wf = ok( + source( + [ + START, + "const each = loop.forEach('Each', { collection: start.input.items }, (p) => {", + " const inner = api('Inner', { url: t`https://x/${p.currentItem.id}` })", + " const fan = parallel.collection('Fan', { collection: p.items, batchSize: 4 }, (q) => {", + " const leaf = api('Leaf', { url: t`${q.index}/${p.index}/${each.index}` })", + ' q.to(leaf)', + ' })', + " const deep = loop.for('Deep', { count: 2 }, (r) => {", + " const bottom = api('Bottom', { url: t`${p.index}/${r.index}` })", + ' r.start.to(bottom)', + ' })', + ' p.to(inner)', + ' inner.to(fan)', + ' fan.to(deep)', + '})', + "const quick = parallel.count('Quick', { count: 3 }, (s) => api('Solo', { url: 'x' }))", + "const after = api('After', { url: t`${each.results}` })", + 'start.to(each)', + 'each.to(after)', + 'after.to(quick)', + ].join('\n') + ) + ) + expect(blockOf(wf, 'each').subflow).toEqual({ + kind: 'loop', + loopType: 'forEach', + iterations: 5, + forEachItems: '', + }) + expect(blockOf(wf, 'fan').subflow).toEqual({ + kind: 'parallel', + parallelType: 'collection', + distribution: '', + batchSize: 4, + }) + expect(blockOf(wf, 'deep').subflow).toMatchObject({ loopType: 'for', iterations: 2 }) + expect(blockOf(wf, 'inner').parent).toBe('each') + expect(blockOf(wf, 'leaf').parent).toBe('fan') + expect(blockOf(wf, 'solo').parent).toBe('quick') + expect(paramValue(wf, 'inner', 'url')).toBe('https://x/') + expect(paramValue(wf, 'leaf', 'url')).toBe('//') + expect(paramValue(wf, 'bottom', 'url')).toBe('/') + expect(paramValue(wf, 'after', 'url')).toBe('') + expect(wf.edges).toContainEqual({ from: 'each', port: { kind: 'subflowStart' }, to: 'inner' }) + expect(wf.edges).toContainEqual({ from: 'deep', port: { kind: 'subflowStart' }, to: 'bottom' }) + expect(wf.edges).toContainEqual({ from: 'quick', port: { kind: 'subflowStart' }, to: 'solo' }) + expect(wf.edges).toContainEqual({ from: 'each', port: { kind: 'subflowEnd' }, to: 'after' }) + }) + + it('compiles fan-out, chains, fan-in groups, error edges and raw handles', () => { + const text = source( + [ + START, + "const a = api('A', { url: 'a' })", + "const b = api('B', { url: 'b' })", + "const c = api('C', { url: 'c' })", + "const d = api('D', { url: 'd' })", + 'start.to(a, b)', + 'a.to(c).to(d)', + 'b.to(c, d).to(a)', + 'c.onError(d)', + "edge(d, 'legacy-handle', a)", + ].join('\n') + ) + const result = run(text) + expect(errorsOf(result)).toEqual([]) + const wf = result.workflow + if (!wf) throw new Error('expected a workflow') + expect(wf.edges).toEqual([ + { from: 'a', port: { kind: 'out' }, to: 'c' }, + { from: 'b', port: { kind: 'out' }, to: 'c' }, + { from: 'b', port: { kind: 'out' }, to: 'd' }, + { from: 'c', port: { kind: 'error' }, to: 'd' }, + { from: 'c', port: { kind: 'out' }, to: 'a' }, + { from: 'c', port: { kind: 'out' }, to: 'd' }, + { from: 'd', port: { kind: 'out' }, to: 'a' }, + { from: 'd', port: { kind: 'raw', handle: 'legacy-handle' }, to: 'a' }, + { from: 'start', port: { kind: 'out' }, to: 'a' }, + { from: 'start', port: { kind: 'out' }, to: 'b' }, + ]) + expect(blockOf(wf, 'c').errorPort).toBe(true) + expect(blockOf(wf, 'd').errorPort).toBe(false) + expectDiagnostic(result, 'W_RAW_HANDLE', locate(text, 'edge(d')) + }) + + it('compiles block meta, inactive values and opaque residue', () => { + const text = source( + "const s = slack.sendMessage('S', { authMethod: 'oauth', text: 'x' }, { disabled: true, locked: true, errorPort: true, retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 }, inactive: { botToken: 'old' }, $unknown: { width: 300 } })" + ) + const result = run(text) + expect(errorsOf(result)).toEqual([]) + const wf = result.workflow + if (!wf) throw new Error('expected a workflow') + const s = blockOf(wf, 's') + expect(s).toMatchObject({ + enabled: false, + locked: true, + errorPort: true, + retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 }, + opaque: { data: { width: 300 } }, + }) + expect(paramValue(wf, 's', 'botToken')).toBe('old') + expect(wf.annotations.inactive).toEqual({ s: ['botToken'] }) + }) + + it('pins the trigger builder, its fixed values and the operation', () => { + const wf = ok( + source( + "const mail = trigger.gmail.poller('Mail', { credential: binding('g'), labelIds: ['INBOX'], markAsRead: true })" + ) + ) + const mail = blockOf(wf, 'mail') + expect(mail).toMatchObject({ type: 'gmail', triggerMode: true }) + expect(paramValue(wf, 'mail', 'selectedTriggerId')).toBe('gmail_poller') + expect(paramValue(wf, 'mail', 'labelIds')).toEqual(['INBOX']) + }) + + it('reads function code from files, rewriting $ref and $env for JavaScript only', () => { + const result = run( + source( + [ + START, + "const score = fn('Score', { language: 'javascript', code: file('./fns/score.js') })", + "const py = fn('Py', { language: 'python', code: file('./fns/py.py') })", + ].join('\n') + ), + { + 'workflows/fns/score.js': 'return $ref.start.input + $env.KEY // $ref.x', + 'workflows/fns/py.py': 'print($ref.start.input)', + } + ) + expect(errorsOf(result)).toEqual([]) + const wf = result.workflow + if (!wf) throw new Error('expected a workflow') + expect(paramValue(wf, 'score', 'code')).toBe('return + {{KEY}} // $ref.x') + expect(paramValue(wf, 'py', 'code')).toBe('print($ref.start.input)') + expect(result.hints.blocks.score).toEqual({ + binding: 'score', + order: 1, + codeFile: 'workflows/fns/score.js', + }) + }) + + it('accepts a bare builder statement as an unbound block', () => { + const result = run(source("note('How it works', { content: md`**Polls** inbox` })")) + expect(errorsOf(result)).toEqual([]) + expect(result.workflow?.blocks.howitworks?.params.content).toEqual({ + kind: 'value', + value: '**Polls** inbox', + }) + expect(result.hints.blocks.howitworks).toEqual({ order: 0 }) + }) + + it('compiles the workflow header, variables and sdk major', () => { + const result = run( + source( + START, + "{ description: 'Does things', variables: { 'My Count': { type: 'number', value: 0 }, flags: { type: 'object', value: { a: [1] } } } }" + ) + ) + expect(errorsOf(result)).toEqual([]) + expect(result.sdkMajor).toBe(1) + expect(result.workflow?.meta).toEqual({ name: 'Test', description: 'Does things' }) + expect(result.workflow?.variables).toEqual({ + mycount: { key: 'mycount', name: 'My Count', type: 'number', value: 0 }, + flags: { key: 'flags', name: 'flags', type: 'object', value: { a: [1] } }, + }) + }) + + it('collects comments at anchors and reports spans by anchor', () => { + const text = [ + '// @sim-sdk 1', + '// Header note', + IMPORTS, + '', + "export default workflow('Test', {}, () => {", + ' // About start', + " const start = trigger.start('Start', {}) // trailing start", + " const call = api('Call', {", + ' // the endpoint', + " url: 'https://x',", + ' headers: { a: [1 /* inner */] },', + ' })', + '', + ' // Wiring follows', + '', + ' // start feeds call', + ' start.to(call)', + ' // the end', + '})', + '', + ].join('\n') + const result = run(text) + expect(errorsOf(result)).toEqual([]) + expect(result.workflow?.annotations.comments).toEqual({ + header: [{ text: ' Header note', kind: 'line', placement: 'leading' }], + 'block:start': [ + { text: ' About start', kind: 'line', placement: 'leading' }, + { text: ' trailing start', kind: 'line', placement: 'trailing' }, + ], + 'param:call:url': [{ text: ' the endpoint', kind: 'line', placement: 'leading' }], + 'param:call:headers': [{ text: ' inner ', kind: 'block', placement: 'leading' }], + wiring: [{ text: ' Wiring follows', kind: 'line', placement: 'leading' }], + 'edges:start:out': [{ text: ' start feeds call', kind: 'line', placement: 'leading' }], + footer: [{ text: ' the end', kind: 'line', placement: 'leading' }], + }) + expectDiagnostic(result, 'W_COMMENT_MOVED', locate(text, '/* inner */')) + expect(spanOf(result, 'block:call')).toMatchObject({ + file: ENTRY, + line: 8, + column: 3, + endLine: 12, + }) + expect(spanOf(result, 'param:call:url')).toMatchObject({ line: 10, column: 5 }) + expect(spanOf(result, 'edges:start:out')).toMatchObject({ line: 17, column: 3 }) + expect(result.hints.blocks).toEqual({ + start: { binding: 'start', order: 0 }, + call: { binding: 'call', order: 1 }, + }) + }) +}) + +describe('warnings that never block a compile', () => { + it.each([ + [ + 'a ref to a block declared later', + "const a = api('A', { url: b.data })\nconst b = api('B', { url: 'x' })", + 'W_FORWARD_REF', + 'b.data', + ], + [ + 'an output path the block does not declare', + "const a = api('A', { url: 'x' })\nconst b = api('B', { url: a.nope })", + 'W_UNKNOWN_OUTPUT_PATH', + 'a.nope', + ], + [ + 'a nested output path the block does not declare', + "const a = api('A', { url: 'x' })\nconst b = api('B', { url: a.headers.nope })", + 'W_UNKNOWN_OUTPUT_PATH', + 'a.headers.nope', + ], + [ + 'a field hidden under the current operation', + "const s = slack.sendMessage('S', { authMethod: 'oauth', text: 'x', limit: 3 })", + 'W_FIELD_NOT_APPLICABLE', + 'limit: 3', + ], + [ + 'a value of the wrong JSON type', + "const a = agent('A', { model: 'm', temperature: '0.5' })", + 'W_VALUE_KIND', + "temperature: '0.5'", + ], + [ + 'a required field written as todo()', + "const a = api('A', { url: todo() })", + 'W_REQUIRED_MISSING', + 'url: todo()', + ], + ['a required field left out', "const a = api('A', {})", 'W_REQUIRED_MISSING', "api('A'"], + [ + 'an inactive value that is in fact visible', + "const s = slack.sendMessage('S', { authMethod: 'oauth', text: 'x' }, { inactive: { credential: binding('x') } })", + 'W_INACTIVE_IS_ACTIVE', + "credential: binding('x')", + ], + ] as const)('warns on %s', (_label, body, code, needle) => { + const text = source(body) + const result = run(text) + expect(errorsOf(result)).toEqual([]) + expect(result.workflow).not.toBeNull() + expectDiagnostic(result, code, locate(text, needle)) + }) + + it('skips output-path checks on blocks with dynamic outputs', () => { + const result = run( + source("const a = agent('A', { model: 'm' })\nconst b = api('B', { url: a.anything.goes })") + ) + expect(result.diagnostics.map((d) => d.code)).not.toContain('W_UNKNOWN_OUTPUT_PATH') + }) +}) + +describe('errors, each with its code, location and hint', () => { + it.each([ + ['a syntax error', 'const = 1', 'E_SYNTAX', '= 1', undefined], + [ + 'an unknown builder', + "const a = slack.sendMesage('A', {})", + 'E_UNKNOWN_BUILDER', + 'slack.sendMesage', + 'Did you mean slack.sendMessage?', + ], + [ + 'an unknown param', + "const a = api('A', { url: 'x', bodyy: 'y' })", + 'E_UNKNOWN_PARAM', + 'bodyy', + 'Did you mean body?', + ], + [ + 'a pair member written by its own id', + "const a = slack.sendMessage('A', { authMethod: 'oauth', manualChannel: 'C', text: 'x' })", + 'E_UNKNOWN_PARAM', + 'manualChannel', + 'Write it as channel; the value kind picks the basic or advanced field.', + ], + [ + 'a param the builder pins', + "const a = slack.sendMessage('A', { operation: 'send', text: 'x' })", + 'E_FIXED_PARAM', + 'operation', + undefined, + ], + [ + 'two blocks whose names normalize alike', + "const a = api('My Block', { url: 'x' })\nconst b = api('my.block', { url: 'y' })", + 'E_DUPLICATE_NAME', + "'my.block'", + undefined, + ], + [ + 'a reserved name', + "const a = api('Loop', { url: 'x' })", + 'E_RESERVED_NAME', + "'Loop'", + undefined, + ], + ['an empty name', "const a = api(' ', { url: 'x' })", 'E_EMPTY_NAME', "' '", undefined], + [ + 'a name that is not a literal', + "const a = api(t`A${1}`, { url: 'x' })", + 'E_NAME_NOT_LITERAL', + 't`A${1}`', + undefined, + ], + [ + 'an unknown identifier', + "const start = trigger.start('Start', {})\nconst a = api('A', { url: strt.input })", + 'E_UNKNOWN_IDENTIFIER', + 'strt', + 'Did you mean start?', + ], + [ + 'a ref into a sibling subflow child', + "const l = loop.for('L', { count: 1 }, (p) => {\n const inside = api('Inside', { url: 'x' })\n p.to(inside)\n})\nconst out = api('Out', { url: inside.data })", + 'E_OUT_OF_SCOPE', + 'inside.data', + undefined, + ], + [ + 'an undeclared variable', + "const a = api('A', { url: vars.retires })", + 'E_UNKNOWN_VARIABLE', + 'vars.retires', + 'Did you mean vars.retries?', + ], + [ + 'an env name outside the pattern', + "const a = api('A', { url: env['bad-name'] })", + 'E_INVALID_ENV_NAME', + "env['bad-name']", + undefined, + ], + [ + 'an unknown loop property', + "const l = loop.forEach('L', { collection: [] }, (p) => {\n const a = api('A', { url: p.curentItem })\n p.to(a)\n})", + 'E_UNKNOWN_LOOP_PROPERTY', + 'p.curentItem', + 'Did you mean p.currentItem?', + ], + [ + 'a param that is both active and inactive', + "const s = slack.sendMessage('S', { authMethod: 'oauth', text: 'x' }, { inactive: { text: 'stale' } })", + 'E_UNSUPPORTED_SYNTAX', + "text: 'stale'", + 'Keep the value in params or in inactive, not both.', + ], + [ + 'two variables whose names normalize alike', + START, + 'E_DUPLICATE_VARIABLE', + "'A B'", + undefined, + "{ variables: { ab: { type: 'string', value: '' }, 'A B': { type: 'string', value: '' } } }", + ], + ] as const)('reports %s', (_label, body, code, needle, hint, options?: string) => { + const text = source(body, options) + expectDiagnostic(run(text), code, locate(text, needle), hint) + }) + + it.each([ + [ + 'an edge across subflow scopes', + "const out = api('Out', { url: 'x' })\nconst l = loop.for('L', { count: 1 }, (p) => {\n const inside = api('Inside', { url: 'x' })\n p.to(inside)\n inside.to(out)\n})", + 'E_EDGE_SCOPE', + 'inside.to(out)', + ], + [ + 'a container end edge into its own child', + "const l = loop.for('L', { count: 1 }, (p) => {\n const inside = api('Inside', { url: 'x' })\n l.to(inside)\n})", + 'E_EDGE_SCOPE', + 'l.to(inside)', + ], + [ + 'an edge into a note', + "const a = api('A', { url: 'x' })\nconst n = note('N', { content: 'x' })\na.to(n)", + 'E_EDGE_NOTE', + 'a.to(n)', + ], + [ + 'an edge into a trigger', + `${START}\nconst a = api('A', { url: 'x' })\na.to(start)`, + 'E_TARGET_TRIGGER', + 'a.to(start)', + ], + [ + '.to() directly on a condition', + "const c = condition('C', { if: 'true', else: '' })\nconst a = api('A', { url: 'x' })\nc.to(a)", + 'E_NO_DEFAULT_OUTPUT', + 'c.to(a)', + ], + [ + 'a duplicate edge', + "const a = api('A', { url: 'x' })\nconst b = api('B', { url: 'x' })\na.to(b)\na.to(b)", + 'E_DUPLICATE_EDGE', + 'a.to(b)', + ], + [ + 'an error edge from a block without an error port', + `${START}\nconst a = api('A', { url: 'x' })\nstart.onError(a)`, + 'E_ERROR_PORT_UNSUPPORTED', + 'start.onError(a)', + ], + [ + 'an unknown branch', + "const c = condition('C', { if: 'true', else: '' })\nconst a = api('A', { url: 'x' })\nc.nope.to(a)", + 'E_UNKNOWN_BRANCH', + 'c.nope.to(a)', + ], + [ + 'a duplicate branch key', + "const c = condition('C', { yes: 'a', yes: 'b', else: '' })", + 'E_DUPLICATE_BRANCH_KEY', + "yes: 'b'", + ], + [ + 'a branch key colliding with an output', + "const c = condition('C', { selectedPath: 'a', else: '' })", + 'E_BRANCH_KEY_COLLIDES', + 'selectedPath', + ], + [ + 'a branch key colliding with an edge method', + "const c = condition('C', { to: 'a', else: '' })", + 'E_BRANCH_KEY_COLLIDES', + 'to:', + ], + [ + 'a condition that does not end with else', + "const c = condition('C', { a: 'x', b: 'y' })", + 'E_BRANCH_ELSE_LAST', + "b: 'y'", + ], + [ + 'a missing code file', + "const f = fn('F', { code: file('./fns/missing.js') })", + 'E_CODE_FILE_MISSING', + "'./fns/missing.js'", + ], + [ + 'a code file outside the repo', + "const f = fn('F', { code: file('../../../x.js') })", + 'E_CODE_FILE_PATH', + "'../../../x.js'", + ], + [ + 'a code file whose extension does not match the language', + "const f = fn('F', { language: 'python', code: file('./fns/a.js') })", + 'E_CODE_FILE_PATH', + "'./fns/a.js'", + ], + ] as const)('reports %s', (_label, body, code, needle) => { + const text = source(body) + expectDiagnostic( + run(text, { 'workflows/fns/a.js': 'return 1' }), + code, + locate(text, needle, code === 'E_DUPLICATE_EDGE' ? 2 : 1) + ) + }) + + it('points a duplicate name at the first declaration', () => { + const text = source( + "const a = api('My Block', { url: 'x' })\nconst b = api('my.block', { url: 'y' })" + ) + const duplicate = run(text).diagnostics.find((d) => d.code === 'E_DUPLICATE_NAME') + expect(duplicate?.related).toEqual([ + expect.objectContaining({ span: expect.objectContaining(locate(text, "'My Block'")) }), + ]) + }) + + it('reports a syntax error inside a code file at its own location', () => { + const result = run(source("const f = fn('F', { code: file('./fns/bad.js') })"), { + 'workflows/fns/bad.js': 'return (', + }) + const syntax = result.diagnostics.find((d) => d.code === 'E_SYNTAX') + expect(syntax?.span).toMatchObject({ file: 'workflows/fns/bad.js', line: 1 }) + expect(result.workflow).toBeNull() + }) + + it('reports a missing header, a newer major and a missing or repeated default export', () => { + const noHeader = `${IMPORTS}\nexport default workflow('X', {}, () => {})\n` + expectDiagnostic( + run(noHeader), + 'E_SDK_HEADER', + { line: 1, column: 1 }, + 'Start the file with // @sim-sdk 1.' + ) + const newer = `// @sim-sdk 2\n${IMPORTS}\nexport default workflow('X', {}, () => {})\n` + const newerResult = run(newer) + expect(newerResult.sdkMajor).toBe(2) + expectDiagnostic(newerResult, 'E_SDK_MAJOR', { line: 1, column: 1 }) + const none = `// @sim-sdk 1\n${IMPORTS}\n` + expectDiagnostic(run(none), 'E_WORKFLOW_EXPORT', { line: 1, column: 1 }) + const notWorkflow = `// @sim-sdk 1\n${IMPORTS}\nexport default api('X', {})\n` + expectDiagnostic(run(notWorkflow), 'E_WORKFLOW_EXPORT', locate(notWorkflow, "api('X'")) + }) +}) + +describe('rejected constructs (s3 §4 table)', () => { + const LET = 'Use const; blocks are immutable declarations.' + const NON_BUILDER = + 'Only blocks can be named. Inline the value, or declare a workflow variable and use vars.x.' + const DESTRUCTURE = 'Bind the block and use blk.field.' + const HELPERS = + "Helpers aren't supported in workflow files; put logic in a function block with code: file('./fns/x.js')." + const CONTROL = + "Control flow can't create blocks. Use condition()/router() for branching and loop()/parallel() for iteration." + const SPREAD = 'Write each field explicitly.' + const COMPUTED = 'Use a literal key.' + const EXPRESSIONS = + "Expressions aren't evaluated. Use t`` to build strings, or js`` for a condition." + const TYPES = 'Types come from the SDK; remove this.' + const CALLS = 'Only SDK calls are allowed; nothing in a workflow file runs.' + const UNTAGGED = 'Use t`` so interpolations become references.' + const TAG = 'Use t`` for text, js`` for code, json`` for JSON or md`` for markdown.' + const LITERAL_KIND = + "Regex and BigInt literals aren't values; write the pattern or number as a string." + const ELEMENT = "Use a literal key: blk['key'] or blk[0]." + const IMPORT = + "Only '@sim/workflow-sdk' is importable; reference function files with file('./fns/x.js')." + const EXTRA = + 'A workflow file holds imports and one export default workflow(...); move this inside the workflow body or delete it.' + const NAMED_EXPORT = 'Only export default workflow(...) is allowed; remove this export.' + + it.each([ + ['let', "let a = api('A', { url: 'x' })", 'let a', LET], + ['var', "var a = api('A', { url: 'x' })", 'var a', LET], + ['a non-builder const', "const x = 'value'", "const x = 'value'", NON_BUILDER], + ['a resource const', "const x = binding('k')", "const x = binding('k')", NON_BUILDER], + ['destructuring', "const { a } = api('A', { url: 'x' })", '{ a }', DESTRUCTURE], + ['a function declaration', 'function helper() {}', 'function helper', HELPERS], + ['a class', 'class Helper {}', 'class Helper', HELPERS], + ['a helper arrow', 'const h = () => 1', '() => 1', HELPERS], + ['if', 'if (true) {}', 'if (true)', CONTROL], + ['for', 'for (const x of []) {}', 'for (', CONTROL], + ['while', 'while (false) {}', 'while', CONTROL], + ['switch', 'switch (1) {}', 'switch', CONTROL], + ['try', 'try {} catch {}', 'try', CONTROL], + ['spread in params', "const a = api('A', { ...x })", '...x', SPREAD], + [ + 'spread in arrays', + "const a = api('A', { url: 'x', headers: { a: [...x] } })", + '...x', + SPREAD, + ], + ['a computed key', "const a = api('A', { ['url']: 'x' })", "['url']", COMPUTED], + ['a binary expression', "const a = api('A', { url: 'a' + 'b' })", "'a' + 'b'", EXPRESSIONS], + ['a logical expression', "const a = api('A', { url: x || 'b' })", "x || 'b'", EXPRESSIONS], + ['a ternary', "const a = api('A', { url: x ? 'a' : 'b' })", "x ? 'a'", EXPRESSIONS], + ['a unary other than minus', "const a = api('A', { url: !x })", '!x', EXPRESSIONS], + ['minus on a non-number', "const a = api('A', { url: -x })", '-x', EXPRESSIONS], + ['a call to a non-SDK function', "const a = api('A', { url: eval('1') })", "eval('1')", CALLS], + ['new', "const a = api('A', { url: new Date() })", 'new Date()', CALLS], + ['this', "const a = api('A', { url: this })", 'this', CALLS], + ['optional chaining', "const a = api('A', { url: x?.y })", 'x?.y', TYPES], + ['a non-null assertion', "const a = api('A', { url: x! })", 'x!', TYPES], + ['as', "const a = api('A', { url: 'x' as string })", "'x' as string", TYPES], + [ + 'satisfies', + "const a = api('A', { url: 'x' satisfies string })", + "'x' satisfies string", + TYPES, + ], + ['a type annotation', "const a: Block = api('A', { url: 'x' })", ': Block', TYPES], + ['an interface', 'interface X {}', 'interface X', TYPES], + ['a type alias', 'type X = string', 'type X', TYPES], + ['an untagged template with ${}', "const a = api('A', { url: `x${1}` })", '`x${1}`', UNTAGGED], + ['an unknown tag', "const a = api('A', { url: sql`x` })", 'sql`x`', TAG], + ['a regex', "const a = api('A', { url: /x/ })", '/x/', LITERAL_KIND], + ['a BigInt', "const a = api('A', { url: 10n })", '10n', LITERAL_KIND], + [ + 'non-literal element access', + "const start = trigger.start('Start', {})\nconst a = api('A', { url: start[k] })", + 'start[k]', + ELEMENT, + ], + ['a getter', "const a = api('A', { get url() { return 'x' } })", 'get url', HELPERS], + ['a method', "const a = api('A', { url() { return 'x' } })", 'url() {', HELPERS], + ['a dynamic import', "const a = api('A', { url: import('x') })", "import('x')", CALLS], + ['a return statement', 'return 1', 'return 1', EXTRA], + ] as const)('rejects %s', (_label, body, needle, hint) => { + const text = source(body) + expectDiagnostic(run(text), 'E_UNSUPPORTED_SYNTAX', locate(text, needle), hint) + }) + + it('rejects another import, a named export and an extra top-level statement', () => { + const otherImport = `// @sim-sdk 1\nimport fs from 'node:fs'\n${IMPORTS}\nexport default workflow('X', {}, () => {})\n` + expectDiagnostic(run(otherImport), 'E_UNSUPPORTED_SYNTAX', { line: 2, column: 1 }, IMPORT) + const named = `// @sim-sdk 1\n${IMPORTS}\nexport const x = 1\nexport default workflow('X', {}, () => {})\n` + expectDiagnostic(run(named), 'E_UNSUPPORTED_SYNTAX', { line: 3, column: 1 }, NAMED_EXPORT) + const extra = `// @sim-sdk 1\n${IMPORTS}\nconst x = 1\nexport default workflow('X', {}, () => {})\n` + expectDiagnostic(run(extra), 'E_UNSUPPORTED_SYNTAX', { line: 3, column: 1 }, EXTRA) + }) +}) diff --git a/packages/workflow-code/src/compile/hints.ts b/packages/workflow-code/src/compile/hints.ts new file mode 100644 index 00000000000..39bec13886d --- /dev/null +++ b/packages/workflow-code/src/compile/hints.ts @@ -0,0 +1,148 @@ +import type { Node } from '@babel/types' + +/** + * The supported form for each rejected construct (s3 §4 "Rejected constructs"). Tests assert + * these strings, and agents act on them, so change one only on purpose. + */ +export const HINTS = { + let: 'Use const; blocks are immutable declarations.', + nonBuilderConst: + 'Only blocks can be named. Inline the value, or declare a workflow variable and use vars.x.', + destructuring: 'Bind the block and use blk.field.', + helpers: + "Helpers aren't supported in workflow files; put logic in a function block with code: file('./fns/x.js').", + controlFlow: + "Control flow can't create blocks. Use condition()/router() for branching and loop()/parallel() for iteration.", + spread: 'Write each field explicitly.', + computedKey: 'Use a literal key.', + expressions: "Expressions aren't evaluated. Use t`` to build strings, or js`` for a condition.", + types: 'Types come from the SDK; remove this.', + calls: 'Only SDK calls are allowed; nothing in a workflow file runs.', + untaggedTemplate: 'Use t`` so interpolations become references.', + unknownTag: 'Use t`` for text, js`` for code, json`` for JSON or md`` for markdown.', + literalKind: "Regex and BigInt literals aren't values; write the pattern or number as a string.", + elementAccess: "Use a literal key: blk['key'] or blk[0].", + otherImport: + "Only '@sim/workflow-sdk' is importable; reference function files with file('./fns/x.js').", + extraStatement: + 'A workflow file holds imports and one export default workflow(...); move this inside the workflow body or delete it.', + namedExport: 'Only export default workflow(...) is allowed; remove this export.', + duplicateKey: 'Write each key once.', + bindInline: 'Declare the block with const and pass its binding.', +} as const + +/** The hint for an expression or statement outside the accepted grammar. */ +export function hintForNode(node: Node): string { + switch (node.type) { + case 'VariableDeclaration': + return node.kind === 'const' ? HINTS.nonBuilderConst : HINTS.let + case 'FunctionDeclaration': + case 'FunctionExpression': + case 'ArrowFunctionExpression': + case 'ClassDeclaration': + case 'ClassExpression': + case 'ObjectMethod': + return HINTS.helpers + case 'IfStatement': + case 'ForStatement': + case 'ForInStatement': + case 'ForOfStatement': + case 'WhileStatement': + case 'DoWhileStatement': + case 'SwitchStatement': + case 'TryStatement': + case 'LabeledStatement': + case 'BreakStatement': + case 'ContinueStatement': + return HINTS.controlFlow + case 'SpreadElement': + case 'RestElement': + return HINTS.spread + case 'BinaryExpression': + case 'LogicalExpression': + case 'ConditionalExpression': + case 'UnaryExpression': + case 'UpdateExpression': + case 'AssignmentExpression': + case 'SequenceExpression': + return HINTS.expressions + case 'CallExpression': + case 'NewExpression': + case 'AwaitExpression': + case 'YieldExpression': + case 'ThisExpression': + case 'Super': + case 'Import': + case 'ImportExpression': + case 'MetaProperty': + return HINTS.calls + case 'OptionalMemberExpression': + case 'OptionalCallExpression': + case 'TSNonNullExpression': + case 'TSAsExpression': + case 'TSSatisfiesExpression': + case 'TSTypeAssertion': + case 'TSInterfaceDeclaration': + case 'TSTypeAliasDeclaration': + case 'TSEnumDeclaration': + case 'TSModuleDeclaration': + case 'TSDeclareFunction': + case 'TSTypeAnnotation': + case 'TSInstantiationExpression': + return HINTS.types + case 'TemplateLiteral': + return HINTS.untaggedTemplate + case 'TaggedTemplateExpression': + return HINTS.unknownTag + case 'RegExpLiteral': + case 'BigIntLiteral': + return HINTS.literalKind + case 'ExportNamedDeclaration': + case 'ExportAllDeclaration': + return HINTS.namedExport + case 'ImportDeclaration': + return HINTS.otherImport + default: + return HINTS.extraStatement + } +} + +function levenshtein(a: string, b: string, cap: number): number { + if (Math.abs(a.length - b.length) > cap) return cap + 1 + let previous = Array.from({ length: b.length + 1 }, (_, i) => i) + for (let i = 1; i <= a.length; i++) { + const current = [i] + let rowMin = i + for (let j = 1; j <= b.length; j++) { + const cost = a[i - 1] === b[j - 1] ? 0 : 1 + current[j] = Math.min(previous[j] + 1, current[j - 1] + 1, previous[j - 1] + cost) + rowMin = Math.min(rowMin, current[j]) + } + if (rowMin > cap) return cap + 1 + previous = current + } + return previous[b.length] +} + +/** + * The closest candidate within a third of the word's length (at least 1, at most 3 edits), or + * `null`. Ties keep the first candidate, so callers pass candidates in a stable order. + */ +export function closest(word: string, candidates: Iterable): string | null { + const cap = Math.min(3, Math.max(1, Math.floor(word.length / 3))) + let best: string | null = null + let bestDistance = cap + 1 + for (const candidate of candidates) { + const distance = levenshtein(word.toLowerCase(), candidate.toLowerCase(), cap) + if (distance < bestDistance) { + best = candidate + bestDistance = distance + } + } + return best +} + +export function didYouMean(word: string, candidates: Iterable, format = (s: string) => s) { + const match = closest(word, candidates) + return match === null ? undefined : `Did you mean ${format(match)}?` +} diff --git a/packages/workflow-code/src/compile/hostile.test.ts b/packages/workflow-code/src/compile/hostile.test.ts new file mode 100644 index 00000000000..d84fd4f76f4 --- /dev/null +++ b/packages/workflow-code/src/compile/hostile.test.ts @@ -0,0 +1,161 @@ +import { afterEach, describe, expect, it } from 'vitest' +import type { CompileLimits, CompileResult } from '../api' +import { compileWorkflow } from './index' +import { TEST_CATALOG } from './test-catalog' + +/** + * Hostile sources (s4 D7): compile never executes anything and never throws. Each input must come + * back as diagnostics only, with no side effect on the process. A sentinel global is set by every + * payload that would run if the compiler evaluated code. + */ + +const HEADER = "// @sim-sdk 1\nimport { api, raw, workflow } from '@sim/workflow-sdk'\n\n" +const SENTINEL = '__simWorkflowCodePwned' + +function wrap(body: string, options = '{}'): string { + return `${HEADER}export default workflow('Hostile', ${options}, () => {\n${body}\n})\n` +} + +function run( + text: string, + limits?: CompileLimits, + files: Record = {} +): CompileResult { + return compileWorkflow({ + entry: { path: 'workflows/hostile.ts', text }, + files: new Map(Object.entries(files)), + catalog: TEST_CATALOG, + sdkMajor: 1, + ...(limits && { limits }), + }) +} + +function codes(result: CompileResult): string[] { + return result.diagnostics.map((d) => d.code) +} + +function sentinel(): unknown { + return Reflect.get(globalThis, SENTINEL) +} + +afterEach(() => { + Reflect.deleteProperty(globalThis, SENTINEL) + Reflect.deleteProperty(Object.prototype, 'polluted') +}) + +describe('hostile sources produce diagnostics only', () => { + it.each([ + ['eval', `const a = api('A', { url: eval("globalThis.${SENTINEL} = 1") })`], + ['Function', `const a = api('A', { url: Function("globalThis.${SENTINEL} = 1")() })`], + [ + 'dynamic import', + `const a = api('A', { url: import('data:text/javascript,globalThis.${SENTINEL}=1') })`, + ], + ['a getter', `const a = api('A', { get url() { globalThis.${SENTINEL} = 1; return 'x' } })`], + ['an IIFE', `const a = api('A', { url: (() => { globalThis.${SENTINEL} = 1 })() })`], + [ + 'a tagged template from scope', + `const a = api('A', { url: String.raw\`\${globalThis.${SENTINEL} = 1}\` })`, + ], + ['an assignment', `const a = api('A', { url: (globalThis.${SENTINEL} = 1) })`], + ['a top-level statement', `globalThis.${SENTINEL} = 1`], + [ + 'a constructor read', + `const a = api('A', { url: ({}).constructor.constructor("globalThis.${SENTINEL} = 1")() })`, + ], + ])('%s', (_label, body) => { + const result = run(wrap(body)) + expect(result.workflow).toBeNull() + expect(codes(result)).toContain('E_UNSUPPORTED_SYNTAX') + expect(sentinel()).toBeUndefined() + }) + + it('keeps __proto__, constructor and prototype keys as data and never pollutes prototypes', () => { + const result = run( + wrap( + [ + "const a = api('A', { url: 'x', headers: { __proto__: { polluted: true }, constructor: 1, prototype: 2 } })", + "const b = api('B', { url: raw({ __proto__: { polluted: true } }) })", + "const c = api('__proto__', { url: 'x' })", + 'a.to(c)', + ].join('\n'), + "{ variables: { __proto__: { type: 'object', value: { __proto__: { polluted: true } } } } }" + ) + ) + expect(result.diagnostics.filter((d) => d.severity === 'error')).toEqual([]) + const workflow = result.workflow + if (!workflow) throw new Error('expected a workflow') + expect(Reflect.get(Object.prototype, 'polluted')).toBeUndefined() + const headers = workflow.blocks.a?.params.headers + expect(headers?.kind === 'value' && Object.getPrototypeOf(headers.value)).toBe(Object.prototype) + expect(headers?.kind === 'value' && Object.keys(headers.value ?? {})).toEqual([ + '__proto__', + 'constructor', + 'prototype', + ]) + const url = workflow.blocks.b?.params.url + expect(url?.kind === 'value' && Object.keys(url.value ?? {})).toEqual(['__proto__']) + expect(Object.keys(workflow.blocks)).toContain('__proto__') + expect(Object.getPrototypeOf(workflow.blocks)).toBe(Object.prototype) + expect(Object.keys(workflow.variables)).toEqual(['__proto__']) + expect(Object.keys(result.hints.blocks)).toContain('__proto__') + expect(workflow.edges).toEqual([{ from: 'a', port: { kind: 'out' }, to: '__proto__' }]) + }) + + it('rejects a 10 MB input before parsing it', () => { + const text = wrap(`const a = api('A', { url: '${'x'.repeat(10 * 1024 * 1024)}' })`) + const result = run(text) + expect(codes(result)).toEqual(['E_LIMIT_EXCEEDED']) + }) + + it.each([ + ['nested arrays', `const a = api('A', { url: ${'['.repeat(100_000)}${']'.repeat(100_000)} })`], + [ + 'nested objects', + `const a = api('A', { url: ${'{a:'.repeat(50_000)}1${'}'.repeat(50_000)} })`, + ], + [ + 'nested parentheses', + `const a = api('A', { url: ${'('.repeat(100_000)}1${')'.repeat(100_000)} })`, + ], + [ + 'nested template expressions', + `const a = api('A', { url: ${'`${'.repeat(20_000)}1${'}`'.repeat(20_000)} })`, + ], + ])('rejects a depth bomb of %s', (_label, body) => { + const result = run(wrap(body)) + expect(codes(result)).toContain('E_LIMIT_EXCEEDED') + expect(result.workflow).toBeNull() + }) + + it('survives a long operator chain without throwing', () => { + const chain = Array.from({ length: 150_000 }, () => "'a'").join('+') + const result = run(wrap(`const a = api('A', { url: ${chain} })`)) + expect(result.workflow).toBeNull() + expect( + codes(result).some((code) => code === 'E_LIMIT_EXCEEDED' || code === 'E_UNSUPPORTED_SYNTAX') + ).toBe(true) + }) + + it('enforces the node-count cap', () => { + const elements = Array.from({ length: 5_000 }, () => '0').join(',') + const result = run(wrap(`const a = api('A', { url: 'x', headers: { list: [${elements}] } })`), { + maxNodes: 1_000, + }) + expect(codes(result)).toEqual(['E_LIMIT_EXCEEDED']) + }) + + it('never reads a code file outside the repository or past the size cap', () => { + const text = `// @sim-sdk 1\nimport { file, fn, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('X', {}, () => {\n const a = fn('A', { code: file('../../etc/passwd.js') })\n const b = fn('B', { code: file('./big.js') })\n})\n` + const result = run(text, { maxBytes: 1_000 }, { 'workflows/big.js': 'x'.repeat(5_000) }) + expect(codes(result)).toEqual(expect.arrayContaining(['E_CODE_FILE_PATH', 'E_LIMIT_EXCEEDED'])) + }) + + it('returns diagnostics for binary garbage', () => { + const garbage = Array.from({ length: 4_096 }, (_, i) => + String.fromCharCode((i * 7919) % 65_536) + ).join('') + expect(() => run(garbage)).not.toThrow() + expect(run(garbage).workflow).toBeNull() + }) +}) diff --git a/packages/workflow-code/src/compile/index.ts b/packages/workflow-code/src/compile/index.ts new file mode 100644 index 00000000000..1d0104595c0 --- /dev/null +++ b/packages/workflow-code/src/compile/index.ts @@ -0,0 +1,459 @@ +import type { ArrowFunctionExpression, CallExpression, Node } from '@babel/types' +import { compareStrings } from '@sim/utils/string' +import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' +import { encodeAnchor, portKey } from '../anchors' +import type { CompileResult, CompileWorkflowFn, LockHints } from '../api' +import type { SourceSpan } from '../diagnostics/frame' +import type { + AnchorKey, + BlockKey, + CanonicalBlock, + CanonicalVariable, + CanonicalWorkflow, + SubBlockId, + VarKey, +} from '../model' +import { compileBlock } from './blocks' +import { CommentCollector } from './comments' +import { type CompileContext, rangeOf, recordSpan, type Scope } from './context' +import { EdgeCollector } from './edges' +import { didYouMean, HINTS, hintForNode } from './hints' +import { DEFAULT_LIMITS, parseWorkflowSource } from './parse' +import { Reporter } from './report' +import { collectBody } from './scope' +import { compileJsonLiteral, literalText, objectEntries, setOwn } from './values' + +const SDK_MODULE = '@sim/workflow-sdk' +const VARIABLE_TYPES: ReadonlySet = new Set([ + 'string', + 'number', + 'boolean', + 'object', + 'array', + 'plain', +]) +const WORKFLOW_OPTIONS = ['description', 'variables'] + +function unsupported(ctx: CompileContext, node: Node, message: string, hint: string): void { + ctx.reporter.report('E_UNSUPPORTED_SYNTAX', message, rangeOf(ctx, node), { hint }) +} + +/** Module scope: the SDK's named imports (s3 §4 "Accepted grammar"). */ +function collectImports(ctx: CompileContext, node: Node, scope: Scope): void { + if (node.type !== 'ImportDeclaration') return + if (node.source.value !== SDK_MODULE || node.importKind === 'type') { + unsupported( + ctx, + node, + node.importKind === 'type' + ? 'Type imports are not needed.' + : `${node.source.value} cannot be imported.`, + node.importKind === 'type' ? HINTS.types : HINTS.otherImport + ) + return + } + for (const specifier of node.specifiers) { + if (specifier.type !== 'ImportSpecifier' || specifier.importKind === 'type') { + unsupported( + ctx, + specifier, + 'Import named SDK exports only.', + "Write import { workflow } from '@sim/workflow-sdk'." + ) + continue + } + const imported = + specifier.imported.type === 'Identifier' ? specifier.imported.name : specifier.imported.value + scope.bindings.set(specifier.local.name, { kind: 'sdk', name: imported }) + } +} + +function compileVariables(ctx: CompileContext, node: Node): void { + if (node.type !== 'ObjectExpression') { + unsupported( + ctx, + node, + 'variables is an object literal.', + "Write variables: { name: { type: 'string', value: '' } }." + ) + return + } + const entries = objectEntries(ctx, node) + const addItem = ctx.comments.list(node.start ?? 0, node.end ?? 0, { + owner: encodeAnchor({ kind: 'header' }), + tail: 'last-item', + }) + const firstByKey = new Map() + for (const [propertyKey, property] of entries) { + const key = normalizeWorkflowBlockName(propertyKey) + let name = propertyKey + addItem(property, key ? encodeAnchor({ kind: 'var', variable: key }) : null) + const first = firstByKey.get(key) + if (first) { + ctx.reporter.report( + 'E_DUPLICATE_VARIABLE', + `${propertyKey} normalizes to ${key}, which is already declared.`, + rangeOf(ctx, property), + { + hint: 'Variable names are unique after lowercasing and removing spaces and dots.', + related: [{ at: rangeOf(ctx, first), message: 'First declared here.' }], + } + ) + continue + } + if (!key) { + unsupported(ctx, property, 'A variable name cannot be empty.', 'Name the variable.') + continue + } + firstByKey.set(key, property) + recordSpan(ctx, { kind: 'var', variable: key }, property) + const declaration = property.value + if (declaration.type !== 'ObjectExpression') { + unsupported( + ctx, + declaration, + 'A variable is { type, value }.', + "Write { type: 'string', value: '' }." + ) + continue + } + let type: string | null = null + let value: CanonicalVariable['value'] | undefined + for (const [field, fieldProperty] of objectEntries(ctx, declaration)) { + if (field === 'type') { + type = literalText(fieldProperty.value) + if (type === null || !VARIABLE_TYPES.has(type)) { + unsupported( + ctx, + fieldProperty.value, + 'Unknown variable type.', + `Types are ${[...VARIABLE_TYPES].join(', ')}.` + ) + type = null + } + } else if (field === 'name') { + const text = literalText(fieldProperty.value) + if (text === null) { + unsupported( + ctx, + fieldProperty.value, + 'name is a string literal.', + "Write name: 'Display name'." + ) + } else { + name = text + } + } else if (field === 'value') { + value = compileJsonLiteral(ctx, fieldProperty.value) + } else { + unsupported( + ctx, + fieldProperty, + `${field} is not a variable field.`, + 'A variable is { type, value }.' + ) + } + } + if (type === null || value === undefined) { + if (type !== null) + unsupported(ctx, declaration, 'A variable needs a value.', "Write value: ''.") + continue + } + ctx.variables.set(key, { key, name, type: type as CanonicalVariable['type'], value }) + } +} + +interface WorkflowHeader { + name: string + description: string | null +} + +function compileWorkflowCall( + ctx: CompileContext, + call: CallExpression, + moduleScope: Scope +): WorkflowHeader | null { + const [nameNode, second, third, ...extra] = call.arguments + for (const node of extra) + unsupported(ctx, node, 'Too many arguments.', 'Write workflow(name, options, body).') + const name = nameNode ? literalText(nameNode) : null + if (name === null) { + ctx.reporter.report( + 'E_NAME_NOT_LITERAL', + 'The workflow name must be a string literal.', + rangeOf(ctx, nameNode ?? call), + { + hint: "Write workflow('Name', {}, ({ vars }) => { ... }).", + } + ) + } + const optionsNode: Node | undefined = third ? second : undefined + const bodyNode: Node | undefined = third ?? second + + let description: string | null = null + if (optionsNode) { + if (optionsNode.type !== 'ObjectExpression') { + unsupported( + ctx, + optionsNode, + 'Workflow options are an object literal.', + "Write { description: '...' }." + ) + } else { + for (const [key, property] of objectEntries(ctx, optionsNode)) { + if (key === 'description') { + description = literalText(property.value) + if (description === null) + unsupported( + ctx, + property.value, + 'description is a string literal.', + "Write description: '...'." + ) + } else if (key === 'variables') { + compileVariables(ctx, property.value) + } else { + const hint = didYouMean(key, WORKFLOW_OPTIONS) + ctx.reporter.report( + 'E_UNKNOWN_PARAM', + `${key} is not a workflow option.`, + rangeOf(ctx, property), + { + ...(hint !== undefined && { hint }), + } + ) + } + } + } + } + + if ( + !bodyNode || + bodyNode.type !== 'ArrowFunctionExpression' || + bodyNode.async || + bodyNode.body.type !== 'BlockStatement' + ) { + unsupported( + ctx, + bodyNode ?? call, + 'The workflow body is an arrow function with a block body.', + "Write workflow('Name', {}, ({ vars }) => { ... })." + ) + return name === null ? null : { name, description } + } + const scope: Scope = { parent: moduleScope, bindings: new Map(), container: null } + bindBodyParams(ctx, bodyNode, scope) + collectBody(ctx, bodyNode.body.body, scope, bodyNode.body, { + owner: encodeAnchor({ kind: 'footer' }), + tail: { anchor: encodeAnchor({ kind: 'footer' }), placement: 'leading' }, + }) + return name === null ? null : { name, description } +} + +function bindBodyParams(ctx: CompileContext, body: ArrowFunctionExpression, scope: Scope): void { + const [param, ...extra] = body.params + for (const node of extra) + unsupported(ctx, node, 'The body takes one parameter.', 'Write ({ vars }) => { ... }.') + if (!param) return + if (param.type !== 'ObjectPattern') { + unsupported( + ctx, + param, + 'Destructure vars from the body parameter.', + 'Write ({ vars }) => { ... }.' + ) + return + } + for (const property of param.properties) { + if ( + property.type === 'ObjectProperty' && + !property.computed && + property.key.type === 'Identifier' && + property.key.name === 'vars' && + property.value.type === 'Identifier' + ) { + scope.bindings.set(property.value.name, { kind: 'vars' }) + continue + } + unsupported( + ctx, + property, + 'The body parameter offers only vars.', + 'Write ({ vars }) => { ... }.' + ) + } +} + +function emptyResult(reporter: Reporter, sdkMajor: number | null): CompileResult { + return { + workflow: null, + diagnostics: reporter.diagnostics, + spans: {}, + hints: { blocks: {} }, + sdkMajor, + } +} + +/** + * Statically interprets a workflow source file into the canonical model (s3 D2). Pass 1 collects + * imports and every block declaration, nested bodies included; pass 2 evaluates values, + * references, branches and wiring against the catalog. Nothing in the file is executed: values are + * read from literal syntax only, and anything else is a located diagnostic. + */ +export const compileWorkflow: CompileWorkflowFn = (input) => { + const limits = { ...DEFAULT_LIMITS, ...input.limits } + const file = input.entry.path + const text = input.entry.text + const reporter = new Reporter() + reporter.addFile(file, text) + + const parsed = parseWorkflowSource(file, text, limits, reporter) + if (parsed.sdkMajor === null) { + reporter.report( + 'E_SDK_HEADER', + 'The first line must be the SDK header.', + { file, start: 0, end: 0 }, + { + hint: `Start the file with // @sim-sdk ${input.sdkMajor}.`, + } + ) + } else if (parsed.sdkMajor > input.sdkMajor) { + reporter.report( + 'E_SDK_MAJOR', + `This file targets SDK ${parsed.sdkMajor}; this server supports up to ${input.sdkMajor}.`, + { file, start: 0, end: parsed.headerEnd }, + { hint: `Write // @sim-sdk ${input.sdkMajor}, or update Sim.` } + ) + } + const ast = parsed.ast + if (!ast) return emptyResult(reporter, parsed.sdkMajor) + + const ctx: CompileContext = { + file, + text, + reporter, + catalog: input.catalog, + files: input.files, + limits, + comments: new CommentCollector(file, reporter), + decls: [], + declsByKey: new Map(), + declsByBinding: new Map(), + variables: new Map(), + wiring: [], + implied: [], + spans: new Map(), + } + + const moduleScope: Scope = { parent: null, bindings: new Map(), container: null } + const header = encodeAnchor({ kind: 'header' }) + const addModuleItem = ctx.comments.list(0, text.length, { + owner: header, + tail: { anchor: encodeAnchor({ kind: 'footer' }), placement: 'leading' }, + }) + if (parsed.sdkMajor !== null) + recordSpan(ctx, { kind: 'header' }, { start: 0, end: parsed.headerEnd }) + + for (const statement of ast.program.body) collectImports(ctx, statement, moduleScope) + + let workflowHeader: WorkflowHeader | null = null + let exportCount = 0 + for (const statement of ast.program.body) { + if (statement.type === 'ImportDeclaration') { + addModuleItem(statement, header) + continue + } + addModuleItem(statement, null) + if (statement.type === 'ExportDefaultDeclaration') { + exportCount++ + const declaration = statement.declaration + const binding = + declaration.type === 'CallExpression' && declaration.callee.type === 'Identifier' + ? moduleScope.bindings.get(declaration.callee.name) + : undefined + if ( + exportCount > 1 || + declaration.type !== 'CallExpression' || + binding?.kind !== 'sdk' || + binding.name !== 'workflow' + ) { + reporter.report( + 'E_WORKFLOW_EXPORT', + 'The default export must be the one workflow(...) call.', + rangeOf(ctx, declaration), + { + hint: "Write export default workflow('Name', {}, ({ vars }) => { ... }).", + } + ) + continue + } + workflowHeader = compileWorkflowCall(ctx, declaration, moduleScope) ?? workflowHeader + continue + } + const hint = + statement.type === 'ExportNamedDeclaration' || statement.type === 'ExportAllDeclaration' + ? hintForNode(statement) + : HINTS.extraStatement + unsupported(ctx, statement, `${statement.type} is not allowed at the top level.`, hint) + } + if (exportCount === 0) { + reporter.report( + 'E_WORKFLOW_EXPORT', + 'The file has no export default workflow(...).', + { file, start: 0, end: 0 }, + { + hint: "Add export default workflow('Name', {}, ({ vars }) => { ... }).", + } + ) + } + + const compiled = new Map() + const inactive: Record = {} + const hints: LockHints = { blocks: {} } + for (const decl of ctx.decls) { + const result = compileBlock(ctx, decl) + if (!result) continue + compiled.set(decl.key, result.block) + if (result.inactive.length > 0) setOwn(inactive, decl.key, result.inactive) + setOwn(hints.blocks, decl.key, { + ...(decl.binding !== null && { binding: decl.binding }), + order: decl.order, + ...(result.codeFile !== undefined && { codeFile: result.codeFile }), + }) + } + + const edges = new EdgeCollector(ctx, compiled) + for (const entry of ctx.wiring) edges.statement(entry) + for (const implied of ctx.implied) edges.implied(implied.container, implied.child, implied.body) + for (const edge of edges.edges) { + const source = compiled.get(edge.from) + if (edge.port.kind === 'error' && source) source.errorPort = true + } + + ctx.comments.assign( + (ast.comments ?? []).filter((comment) => (comment.start ?? 0) >= parsed.headerEnd) + ) + recordSpan(ctx, { kind: 'footer' }, { start: text.length, end: text.length }) + + const spans: Partial> = {} + for (const [key, span] of ctx.spans) spans[key] = span + + const sortedEdges = [...edges.edges].sort( + (a, b) => + compareStrings(a.from, b.from) || + compareStrings(portKey(a.port), portKey(b.port)) || + compareStrings(a.to, b.to) + ) + const workflow: CanonicalWorkflow | null = + reporter.hasErrors || !workflowHeader + ? null + : { + modelVersion: 1, + meta: workflowHeader, + blocks: Object.fromEntries(compiled), + edges: sortedEdges, + variables: Object.fromEntries(ctx.variables), + annotations: { inactive, comments: ctx.comments.comments }, + } + return { workflow, diagnostics: reporter.diagnostics, spans, hints, sdkMajor: parsed.sdkMajor } +} diff --git a/packages/workflow-code/src/compile/parse.ts b/packages/workflow-code/src/compile/parse.ts new file mode 100644 index 00000000000..253139217b5 --- /dev/null +++ b/packages/workflow-code/src/compile/parse.ts @@ -0,0 +1,243 @@ +import { type ParserOptions, parse } from '@babel/parser' +import type { File, Node } from '@babel/types' +import type { CompileLimits } from '../api' +import type { Reporter } from './report' + +/** + * Default caps on hostile input (s4 D7). A 200-block workflow is about 44 KB, about 25k AST nodes + * and under 20 levels deep, so each default leaves more than an order of magnitude of headroom. + */ +export const DEFAULT_LIMITS: Required = { + maxBytes: 1_000_000, + maxNodes: 500_000, + maxDepth: 200, +} + +const HEADER = /^\/\/ @sim-sdk ([0-9]{1,6})[ \t]*(?=\r\n|[\n\r\u2028\u2029]|$)/ + +const PARSER_OPTIONS: ParserOptions = { + sourceType: 'module', + plugins: ['typescript'], + errorRecovery: true, + attachComment: true, + ranges: false, + tokens: false, +} + +const SKIPPED_KEYS = new Set([ + 'leadingComments', + 'trailingComments', + 'innerComments', + 'loc', + 'extra', +]) + +export function isNode(value: unknown): value is Node { + return ( + typeof value === 'object' && + value !== null && + typeof (value as { type?: unknown }).type === 'string' + ) +} + +/** Every child AST node of `node`, in no particular order. */ +export function childNodes(node: Node): Node[] { + const children: Node[] = [] + for (const [key, value] of Object.entries(node)) { + if (SKIPPED_KEYS.has(key)) continue + if (Array.isArray(value)) { + for (const item of value) if (isNode(item)) children.push(item) + } else if (isNode(value)) { + children.push(value) + } + } + return children +} + +/** UTF-8 length of `text`, counting at most `cap + 1` bytes. */ +function utf8Length(text: string, cap: number): number { + let bytes = 0 + for (let i = 0; i < text.length && bytes <= cap; i++) { + const code = text.charCodeAt(i) + if (code < 0x80) bytes += 1 + else if (code < 0x800) bytes += 2 + else if (code >= 0xd800 && code <= 0xdbff && i + 1 < text.length) { + bytes += 4 + i++ + } else bytes += 3 + } + return bytes +} + +/** + * Offset at which bracket nesting first exceeds `maxDepth`, or -1. Runs before Babel, whose + * recursive descent would otherwise overflow the stack on a depth bomb. Strings, templates and + * comments are skipped well enough that their brackets never count; regex bodies may, which only + * matters for pathological input that is rejected anyway. + */ +function bracketDepthOverflow(text: string, maxDepth: number): number { + const templateDepths: number[] = [] + let depth = 0 + for (let i = 0; i < text.length; i++) { + const char = text[i] + const next = text[i + 1] + if (char === '/' && next === '/') { + const end = text.indexOf('\n', i) + i = end === -1 ? text.length : end + continue + } + if (char === '/' && next === '*') { + const end = text.indexOf('*/', i + 2) + i = end === -1 ? text.length : end + 1 + continue + } + if (char === "'" || char === '"') { + for (i++; i < text.length && text[i] !== char && text[i] !== '\n'; i++) { + if (text[i] === '\\') i++ + } + continue + } + if (char === '`' || (char === '}' && templateDepths[templateDepths.length - 1] === depth)) { + if (char === '}') { + templateDepths.pop() + depth-- + } + for (i++; i < text.length && text[i] !== '`'; i++) { + if (text[i] === '\\') { + i++ + } else if (text[i] === '$' && text[i + 1] === '{') { + depth++ + templateDepths.push(depth) + i++ + break + } + } + if (depth > maxDepth) return i + continue + } + if (char === '(' || char === '[' || char === '{') { + depth++ + if (depth > maxDepth) return i + } else if (char === ')' || char === ']' || char === '}') { + depth = Math.max(0, depth - 1) + } + } + return -1 +} + +/** Node count and depth check, iterative so a deep tree cannot overflow the stack. */ +function treeOverflow( + root: Node, + limits: Required +): { kind: 'nodes' | 'depth'; node: Node } | null { + const stack: Array<{ node: Node; depth: number }> = [{ node: root, depth: 1 }] + let count = 0 + while (stack.length > 0) { + const entry = stack.pop() + if (!entry) break + count++ + if (count > limits.maxNodes) return { kind: 'nodes', node: entry.node } + if (entry.depth > limits.maxDepth) return { kind: 'depth', node: entry.node } + for (const child of childNodes(entry.node)) stack.push({ node: child, depth: entry.depth + 1 }) + } + return null +} + +interface BabelErrorShape { + message?: unknown + pos?: unknown +} + +function babelMessage(error: BabelErrorShape): string { + const message = typeof error.message === 'string' ? error.message : 'Invalid syntax' + return message.replace(/ \(\d+:\d+\)$/, '') +} + +export interface ParsedSource { + ast: File | null + /** The header's major, or `null` when the first line is not `// @sim-sdk N`. */ + sdkMajor: number | null + /** End offset of the header line (0 when there is none). */ + headerEnd: number +} + +/** + * Parses a workflow file with Babel (typescript, errorRecovery, attachComment; s3 D1) after the + * byte and bracket-depth caps, then checks the node-count and depth caps. Babel errors are + * re-coded as `E_SYNTAX`. Nothing is evaluated. + */ +export function parseWorkflowSource( + file: string, + text: string, + limits: Required, + reporter: Reporter +): ParsedSource { + const header = HEADER.exec(text) + const parsed: ParsedSource = { + ast: null, + sdkMajor: header ? Number(header[1]) : null, + headerEnd: header ? header[0].length : 0, + } + + if (utf8Length(text, limits.maxBytes) > limits.maxBytes) { + reporter.report( + 'E_LIMIT_EXCEEDED', + `The file is larger than ${limits.maxBytes} bytes.`, + { file, start: 0, end: 0 }, + { hint: 'Split the workflow, or move large text into a code file.' } + ) + return parsed + } + const overflowAt = bracketDepthOverflow(text, limits.maxDepth) + if (overflowAt !== -1) { + reporter.report( + 'E_LIMIT_EXCEEDED', + `Nesting is deeper than ${limits.maxDepth} levels.`, + { file, start: overflowAt, end: overflowAt + 1 }, + { hint: 'Flatten the value; workflow files nest only a few levels.' } + ) + return parsed + } + + let ast: ReturnType + try { + ast = parse(text, PARSER_OPTIONS) + } catch (error) { + const shape: BabelErrorShape = typeof error === 'object' && error !== null ? error : {} + if (error instanceof RangeError) { + reporter.report( + 'E_LIMIT_EXCEEDED', + 'The file is nested too deeply to parse.', + { file, start: 0, end: 0 }, + { hint: 'Flatten long operator chains and deeply nested values.' } + ) + return parsed + } + const pos = typeof shape.pos === 'number' ? shape.pos : 0 + reporter.report('E_SYNTAX', babelMessage(shape), { file, start: pos, end: pos + 1 }) + return parsed + } + + for (const error of ast.errors ?? []) { + const shape: BabelErrorShape = error + const pos = typeof shape.pos === 'number' ? shape.pos : 0 + reporter.report('E_SYNTAX', babelMessage(shape), { file, start: pos, end: pos + 1 }) + } + + const overflow = treeOverflow(ast, limits) + if (overflow) { + const start = overflow.node.start ?? 0 + reporter.report( + 'E_LIMIT_EXCEEDED', + overflow.kind === 'nodes' + ? `The file has more than ${limits.maxNodes} syntax nodes.` + : `Nesting is deeper than ${limits.maxDepth} levels.`, + { file, start, end: overflow.node.end ?? start }, + { hint: 'Split the workflow or flatten deeply nested values.' } + ) + return parsed + } + + parsed.ast = ast + return parsed +} diff --git a/packages/workflow-code/src/compile/printer-goldens.test.ts b/packages/workflow-code/src/compile/printer-goldens.test.ts new file mode 100644 index 00000000000..e41df0fd86d --- /dev/null +++ b/packages/workflow-code/src/compile/printer-goldens.test.ts @@ -0,0 +1,120 @@ +import { compareStrings } from '@sim/utils/string' +import { describe, expect, it } from 'vitest' +import { portKey } from '../anchors' +import type { CompileResult } from '../api' +import { toCodeFile } from '../code-files' +import type { CanonicalWorkflow } from '../model' +import { cases } from './__printer__/cases' +import { catalog } from './__printer__/catalog' +import { PRINTER_GOLDENS } from './__printer__/goldens' +import { compileWorkflow } from './index' + +/** + * P3/P4 against the printer (Wave 2C): every golden print compiles with zero errors (s3 D12) and + * back to the canonical workflow it was printed from. Annotations are not semantic, so only the + * comment texts are compared: the printer hoists a comment whose anchor it does not print and + * drops one whose block is gone. + * + * The printer's hand-built cases predate two CWM invariants, so the originals are completed + * before comparing, never the compiled side: `errorPort` is effective (`errorEnabled || has an + * error edge`, model.ts), and `modes` holds every canonical pair of the block's surface, with an + * absent entry meaning the default `basic` the printer assumes. + */ + +function compile(text: string, files: Record = {}): CompileResult { + return compileWorkflow({ + entry: { path: 'workflow.ts', text }, + files: new Map(Object.entries(files)), + catalog, + sdkMajor: catalog.sdkMajor, + }) +} + +function completeInvariants(workflow: CanonicalWorkflow): CanonicalWorkflow['blocks'] { + const blocks: CanonicalWorkflow['blocks'] = {} + for (const [key, block] of Object.entries(workflow.blocks)) { + const hasErrorEdge = workflow.edges.some( + (edge) => edge.from === key && edge.port.kind === 'error' + ) + const modes = { ...block.modes } + const surface = block.triggerMode ? 'trigger' : 'action' + for (const sub of catalog.blocks[block.type]?.subBlocks ?? []) { + if (block.subflow || sub.canonicalParamId === undefined) continue + if (sub.surface !== undefined && sub.surface !== surface) continue + modes[sub.canonicalParamId] ??= 'basic' + } + blocks[key] = { ...block, errorPort: block.errorPort || hasErrorEdge, modes } + } + return blocks +} + +function semantic(workflow: CanonicalWorkflow, complete = false) { + return { + meta: workflow.meta, + variables: workflow.variables, + blocks: complete ? completeInvariants(workflow) : workflow.blocks, + edges: [...workflow.edges].sort( + (a, b) => + compareStrings(a.from, b.from) || + compareStrings(portKey(a.port), portKey(b.port)) || + compareStrings(a.to, b.to) + ), + } +} + +function commentTexts(workflow: CanonicalWorkflow): string[] { + return Object.values(workflow.annotations.comments) + .flatMap((comments) => comments?.map((comment) => comment.text) ?? []) + .sort(compareStrings) +} + +function expectRoundTrip(result: CompileResult, original: CanonicalWorkflow, golden: string) { + expect( + result.diagnostics + .filter((d) => d.severity === 'error') + .map((d) => `${d.code} ${d.span.line}:${d.span.column} ${d.message}`) + ).toEqual([]) + if (!result.workflow) throw new Error('expected a workflow') + expect(semantic(result.workflow)).toEqual(semantic(original, true)) + expect(commentTexts(result.workflow)).toEqual( + commentTexts(original).filter((text) => golden.includes(text)) + ) +} + +describe('printer goldens compile back to their canonical workflow', () => { + it('has a golden for every printer case', () => { + expect(cases.map((testCase) => testCase.name).sort(compareStrings)).toEqual( + Object.keys(PRINTER_GOLDENS) + .filter((name) => name !== 'function-files') + .sort(compareStrings) + ) + }) + + for (const testCase of cases) { + it(testCase.name, () => { + const golden = PRINTER_GOLDENS[testCase.name] + if (golden === undefined) throw new Error(`missing golden ${testCase.name}`) + expectRoundTrip(compile(golden), testCase.workflow, golden) + }) + } + + it('function-files, with code files written by the code-file codec', () => { + const testCase = cases.find((candidate) => candidate.name === 'function-languages') + const golden = PRINTER_GOLDENS['function-files'] + if (!testCase || golden === undefined) throw new Error('missing case') + const files: Record = {} + const layout = [ + ['jscode', 'functions/js-code.js', 'javascript'], + ['pycode', 'functions/py-code.py', 'python'], + ['shcode', 'functions/sh-code.sh', 'shell'], + ] as const + for (const [key, path, language] of layout) { + const param = testCase.workflow.blocks[key]?.params.code + if (param?.kind !== 'value' || typeof param.value !== 'string') throw new Error('no code') + files[path] = toCodeFile(param.value, language) + } + const result = compile(golden, files) + expectRoundTrip(result, testCase.workflow, golden) + expect(result.hints.blocks.jscode?.codeFile).toBe('functions/js-code.js') + }) +}) diff --git a/packages/workflow-code/src/compile/report.ts b/packages/workflow-code/src/compile/report.ts new file mode 100644 index 00000000000..cce500bb329 --- /dev/null +++ b/packages/workflow-code/src/compile/report.ts @@ -0,0 +1,108 @@ +import type { CompileDiagnosticCode } from '../diagnostics/codes' +import { codeFrame, type LocatedDiagnostic, type SourceSpan } from '../diagnostics/frame' +import type { BlockKey, SubBlockId } from '../model' + +/** Babel's line terminators (`lineBreak` in @babel/parser), so lines agree with Babel `loc`. */ +const LINE_BREAK = /\r\n|[\n\r\u2028\u2029]/g + +/** Line start offsets of one file, for offset → line/column. */ +class LineIndex { + private readonly starts: number[] = [0] + + constructor(readonly text: string) { + for (const match of text.matchAll(LINE_BREAK)) { + this.starts.push(match.index + match[0].length) + } + } + + /** 1-based line and UTF-16 column of an offset. */ + position(offset: number): { line: number; column: number } { + const clamped = Math.min(Math.max(offset, 0), this.text.length) + let low = 0 + let high = this.starts.length - 1 + while (low < high) { + const mid = (low + high + 1) >> 1 + if (this.starts[mid] <= clamped) low = mid + else high = mid - 1 + } + return { line: low + 1, column: clamped - this.starts[low] + 1 } + } +} + +/** An offset range in one file. */ +export interface Range { + file: string + start: number + end: number +} + +export interface ReportExtras { + hint?: string + blockKey?: BlockKey + param?: SubBlockId + related?: Array<{ at: Range; message: string }> +} + +type SeverityOfCode = LocatedDiagnostic['severity'] + +function severityOf(code: CompileDiagnosticCode): SeverityOfCode { + return code.startsWith('E_') ? 'error' : 'warning' +} + +/** + * Collects located diagnostics for every file a compile reads. Each diagnostic gets its span (from + * offsets) and code frame here, so no other module computes line numbers. + */ +export class Reporter { + readonly diagnostics: LocatedDiagnostic[] = [] + private readonly indexes = new Map() + private errorCount = 0 + + addFile(path: string, text: string): void { + this.indexes.set(path, new LineIndex(text)) + } + + get hasErrors(): boolean { + return this.errorCount > 0 + } + + span(at: Range): SourceSpan { + const index = this.indexes.get(at.file) ?? new LineIndex('') + const end = Math.max(at.end, at.start) + const startPosition = index.position(at.start) + const endPosition = index.position(end) + return { + file: at.file, + line: startPosition.line, + column: startPosition.column, + endLine: endPosition.line, + endColumn: endPosition.column, + start: at.start, + end, + } + } + + report(code: CompileDiagnosticCode, message: string, at: Range, extras: ReportExtras = {}): void { + const span = this.span(at) + const text = this.indexes.get(at.file)?.text ?? '' + const severity = severityOf(code) + if (severity === 'error') this.errorCount++ + const diagnostic = { + code, + severity, + message, + span, + frame: codeFrame(text, span), + ...(extras.hint !== undefined && { hint: extras.hint }), + ...(extras.blockKey !== undefined && { blockKey: extras.blockKey }), + ...(extras.param !== undefined && { param: extras.param }), + ...(extras.related && { + related: extras.related.map((entry) => ({ + span: this.span(entry.at), + message: entry.message, + })), + }), + } as LocatedDiagnostic + this.diagnostics.push(diagnostic) + } +} diff --git a/packages/workflow-code/src/compile/scope.ts b/packages/workflow-code/src/compile/scope.ts new file mode 100644 index 00000000000..d209eb469b3 --- /dev/null +++ b/packages/workflow-code/src/compile/scope.ts @@ -0,0 +1,392 @@ +import type { + ArrowFunctionExpression, + CallExpression, + Node, + Statement, + VariableDeclaration, +} from '@babel/types' +import { + normalizeWorkflowBlockName, + RESERVED_WORKFLOW_BLOCK_NAMES, +} from '@sim/workflow-types/workflow' +import { encodeAnchor } from '../anchors' +import { GENERIC_BUILDER } from '../sdk' +import type { ListOptions } from './comments' +import { + type BlockDecl, + type CompileContext, + lookup, + type ResolvedBuilder, + rangeOf, + recordSpan, + type Scope, +} from './context' +import { didYouMean, HINTS, hintForNode } from './hints' +import { calleePath, literalText, SDK_VALUE_FUNCTIONS } from './values' + +const LOOP_METHODS = new Set(['for', 'forEach', 'while', 'doWhile']) +const PARALLEL_METHODS = new Set(['count', 'collection']) +const EDGE_METHODS = new Set(['to', 'onError']) + +type CallClass = + | { kind: 'builder'; builder: ResolvedBuilder; path: string } + | { kind: 'value' } + | { kind: 'wiring' } + | { kind: 'other' } + +function unsupported(ctx: CompileContext, node: Node, message: string, hint: string): void { + ctx.reporter.report('E_UNSUPPORTED_SYNTAX', message, rangeOf(ctx, node), { hint }) +} + +/** Whether `call` is wiring: `x.to(...)`, `x.onError(...)`, a chain of those, or `edge(...)`. */ +function isWiringCall(scope: Scope, call: CallExpression): boolean { + const callee = call.callee + if (callee.type === 'Identifier') { + const binding = lookup(scope, callee.name) + return binding?.kind === 'sdk' && binding.name === 'edge' + } + return ( + callee.type === 'MemberExpression' && + !callee.computed && + callee.property.type === 'Identifier' && + EDGE_METHODS.has(callee.property.name) + ) +} + +/** Classifies a call against the SDK surface and the catalog's builders. */ +function classifyCall(ctx: CompileContext, scope: Scope, call: CallExpression): CallClass { + if (isWiringCall(scope, call)) return { kind: 'wiring' } + const path = calleePath(call.callee) + if (!path) return { kind: 'other' } + const binding = lookup(scope, path.root) + if (!binding || binding.kind !== 'sdk') return { kind: 'other' } + const root = binding.name + const dotted = [root, ...path.rest].join('.') + + if (root === 'loop' && path.rest.length === 1 && LOOP_METHODS.has(path.rest[0])) { + return { + kind: 'builder', + path: dotted, + builder: { kind: 'container', container: 'loop', method: path.rest[0] }, + } + } + if (root === 'parallel' && path.rest.length <= 1) { + const method = path.rest[0] ?? null + if (method === null || PARALLEL_METHODS.has(method)) { + return { + kind: 'builder', + path: dotted, + builder: { kind: 'container', container: 'parallel', method }, + } + } + } + if (root === GENERIC_BUILDER && path.rest.length === 0) { + const typeArgument = call.arguments[0] + const type = typeArgument ? literalText(typeArgument) : null + if (type === null) return { kind: 'builder', path: dotted, builder: { kind: 'unknown' } } + return { + kind: 'builder', + path: dotted, + builder: { kind: 'generic', type, block: ctx.catalog.blocks[type] }, + } + } + if (path.rest.length === 0 && SDK_VALUE_FUNCTIONS.has(root)) return { kind: 'value' } + + const builder = Object.hasOwn(ctx.catalog.builders, dotted) + ? ctx.catalog.builders[dotted] + : undefined + if (!builder) { + const candidates = [ + ...Object.keys(ctx.catalog.builders), + ...[...LOOP_METHODS].map((method) => `loop.${method}`), + ...[...PARALLEL_METHODS].map((method) => `parallel.${method}`), + ] + ctx.reporter.report( + 'E_UNKNOWN_BUILDER', + `${dotted} is not a block builder.`, + rangeOf(ctx, call.callee), + { + ...withHint(didYouMean(dotted, candidates)), + } + ) + return { kind: 'builder', path: dotted, builder: { kind: 'unknown' } } + } + return { + kind: 'builder', + path: dotted, + builder: { + kind: 'catalog', + path: dotted, + type: builder.type, + builder, + block: ctx.catalog.blocks[builder.type], + }, + } +} + +function withHint(hint: string | undefined): { hint?: string } { + return hint === undefined ? {} : { hint } +} + +/** Index of the name argument: `block(type, name, ...)` takes the type first. */ +function nameArgumentIndex(builder: ResolvedBuilder, path: string): number { + return builder.kind === 'generic' || path === GENERIC_BUILDER ? 1 : 0 +} + +/** Registers one block declaration, checking its name (s3 §4 "Names and scopes"). */ +function declare( + ctx: CompileContext, + scope: Scope, + call: CallExpression, + classified: Extract, + binding: { name: string; node: Node } | null, + anchorNode: Node +): BlockDecl | null { + const nameIndex = nameArgumentIndex(classified.builder, classified.path) + const nameNode = call.arguments[nameIndex] ?? call + const name = call.arguments[nameIndex] ? literalText(call.arguments[nameIndex]) : null + if (name === null) { + ctx.reporter.report( + 'E_NAME_NOT_LITERAL', + 'A block name must be a string literal.', + rangeOf(ctx, nameNode), + { hint: "Write the display name as a literal: api('Fetch user', { ... })." } + ) + return null + } + const key = normalizeWorkflowBlockName(name) + if (!key) { + ctx.reporter.report('E_EMPTY_NAME', 'A block name cannot be empty.', rangeOf(ctx, nameNode), { + hint: 'Give the block a display name.', + }) + return null + } + if ((RESERVED_WORKFLOW_BLOCK_NAMES as readonly string[]).includes(key)) { + ctx.reporter.report( + 'E_RESERVED_NAME', + `${name} is reserved for <${key}.…> references.`, + rangeOf(ctx, nameNode), + { hint: 'Pick another display name.' } + ) + return null + } + + const container = scope.container + const decl: BlockDecl = { + key, + name, + binding: binding?.name ?? null, + call, + anchorNode, + nameNode, + scope, + parent: container, + order: ctx.decls.length, + builder: classified.builder, + body: null, + duplicate: false, + } + const first = ctx.declsByKey.get(key) + if (first) { + decl.duplicate = true + ctx.reporter.report( + 'E_DUPLICATE_NAME', + `${name} normalizes to ${key}, which ${first.name} already uses.`, + rangeOf(ctx, nameNode), + { + hint: 'Block names are unique after lowercasing and removing spaces and dots.', + related: [{ at: rangeOf(ctx, first.nameNode), message: `${first.name} is declared here.` }], + } + ) + } else { + ctx.declsByKey.set(key, decl) + } + ctx.decls.push(decl) + if (binding) { + scope.bindings.set(binding.name, { kind: 'block', decl }) + const all = ctx.declsByBinding.get(binding.name) ?? [] + all.push(decl) + ctx.declsByBinding.set(binding.name, all) + } + if (!decl.duplicate) recordSpan(ctx, { kind: 'block', block: key }, anchorNode) + if (classified.builder.kind === 'container') collectContainerBody(ctx, decl) + return decl +} + +/** `(p) => { ... }` or `(p) => block(...)`, the third argument of loop/parallel. */ +function collectContainerBody(ctx: CompileContext, decl: BlockDecl): void { + const body = decl.call.arguments[2] + if (!body || body.type !== 'ArrowFunctionExpression' || body.async || body.params.length > 1) { + unsupported( + ctx, + body ?? decl.call, + 'A loop or parallel takes its body as an arrow function.', + "Write loop.forEach('Name', { collection }, (p) => { ... })." + ) + return + } + const scope: Scope = { parent: decl.scope, bindings: new Map(), container: decl } + decl.body = scope + const param = body.params[0] + if (param) { + if (param.type !== 'Identifier') { + unsupported(ctx, param, 'The loop parameter must be a plain identifier.', HINTS.destructuring) + } else { + if (param.typeAnnotation) + unsupported(ctx, param.typeAnnotation, 'Type annotations are not supported.', HINTS.types) + scope.bindings.set(param.name, { kind: 'loopParam', container: decl }) + } + } + if (body.body.type === 'BlockStatement') { + collectBody(ctx, body.body.body, scope, body.body, { + owner: encodeAnchor({ kind: 'block', block: decl.key }), + tail: { anchor: encodeAnchor({ kind: 'block', block: decl.key }), placement: 'trailing' }, + }) + return + } + collectArrowExpressionBody(ctx, decl, scope, body) +} + +function collectArrowExpressionBody( + ctx: CompileContext, + container: BlockDecl, + scope: Scope, + body: ArrowFunctionExpression +): void { + const expression = body.body + if (expression.type === 'CallExpression') { + const classified = classifyCall(ctx, scope, expression) + if (classified.kind === 'builder') { + const child = declare(ctx, scope, expression, classified, null, expression) + if (child) ctx.implied.push({ container, child, body }) + return + } + } + unsupported( + ctx, + expression, + 'An arrow-expression body must be one block call.', + 'Use a block body: (p) => { ... }.' + ) +} + +function collectDeclaration( + ctx: CompileContext, + scope: Scope, + statement: VariableDeclaration +): void { + if (statement.kind !== 'const') { + unsupported(ctx, statement, `${statement.kind} is not supported.`, HINTS.let) + return + } + if (statement.declarations.length !== 1) { + unsupported( + ctx, + statement, + 'Declare one block per const.', + 'Split this into one const per block.' + ) + return + } + const [declarator] = statement.declarations + if (declarator.id.type !== 'Identifier') { + unsupported(ctx, declarator.id, 'Destructuring is not supported.', HINTS.destructuring) + return + } + if (declarator.id.typeAnnotation) { + unsupported( + ctx, + declarator.id.typeAnnotation, + 'Type annotations are not supported.', + HINTS.types + ) + return + } + const init = declarator.init + if ( + init && + (init.type === 'ArrowFunctionExpression' || + init.type === 'FunctionExpression' || + init.type === 'ClassExpression') + ) { + unsupported(ctx, init, 'Helpers are not supported.', HINTS.helpers) + return + } + if (!init || init.type !== 'CallExpression') { + unsupported(ctx, statement, 'Only blocks can be named.', HINTS.nonBuilderConst) + return + } + const classified = classifyCall(ctx, scope, init) + if (classified.kind !== 'builder') { + unsupported(ctx, statement, 'Only blocks can be named.', HINTS.nonBuilderConst) + return + } + declare( + ctx, + scope, + init, + classified, + { name: declarator.id.name, node: declarator.id }, + statement + ) +} + +/** + * Pass 1 over one body (the workflow's or a loop's): registers every block declaration in source + * order, nested bodies included, so references resolve regardless of order (s3 D2), and queues + * wiring statements for pass 2. Any other statement is rejected with its s3 hint. + */ +export function collectBody( + ctx: CompileContext, + statements: Statement[], + scope: Scope, + container: Node, + listOptions: ListOptions +): void { + const addItem = ctx.comments.list(container.start ?? 0, container.end ?? 0, listOptions) + let firstWiringSeen = scope.container !== null + for (const statement of statements) { + if (statement.type === 'EmptyStatement') continue + if (statement.type === 'VariableDeclaration') { + const before = ctx.decls.length + collectDeclaration(ctx, scope, statement) + const decl = ctx.decls[before] + addItem( + statement, + decl && !decl.duplicate ? encodeAnchor({ kind: 'block', block: decl.key }) : null + ) + continue + } + if ( + statement.type === 'ExpressionStatement' && + statement.expression.type === 'CallExpression' + ) { + const classified = classifyCall(ctx, scope, statement.expression) + if (classified.kind === 'builder') { + const decl = declare(ctx, scope, statement.expression, classified, null, statement) + addItem( + statement, + decl && !decl.duplicate ? encodeAnchor({ kind: 'block', block: decl.key }) : null + ) + continue + } + if (classified.kind === 'wiring') { + const firstWiring = !firstWiringSeen + firstWiringSeen = true + ctx.wiring.push({ statement, scope, firstWiring, addItem }) + continue + } + unsupported( + ctx, + statement.expression, + `${statement.expression.type} is not supported here.`, + classified.kind === 'value' ? HINTS.bindInline : hintForNode(statement.expression) + ) + addItem(statement, null) + continue + } + const node = statement.type === 'ExpressionStatement' ? statement.expression : statement + unsupported(ctx, node, `${node.type} is not supported in a workflow body.`, hintForNode(node)) + addItem(statement, null) + } +} diff --git a/packages/workflow-code/src/compile/test-catalog.ts b/packages/workflow-code/src/compile/test-catalog.ts new file mode 100644 index 00000000000..abef25c0954 --- /dev/null +++ b/packages/workflow-code/src/compile/test-catalog.ts @@ -0,0 +1,236 @@ +import type { + BlockCatalog, + CatalogBlock, + CatalogBlockGraph, + CatalogOutput, + CatalogSubBlock, +} from '../catalog/types' + +/** + * A small hand-built catalog for compile tests: one block per grammar feature (operation + * builder, basic/advanced pair, branches, containers, triggers, code, notes), shaped exactly like + * the `BlockCatalog` contract so tests never depend on the registry projection. + */ + +function sub( + id: string, + type: CatalogSubBlock['type'], + valueKind: CatalogSubBlock['valueKind'], + extra: Partial = {} +): CatalogSubBlock { + return { id, type, valueKind, storage: 'native', ...extra } +} + +const ANY: CatalogOutput = { type: 'json' } +const TEXT: CatalogOutput = { type: 'string' } + +function graph(extra: Partial = {}): CatalogBlockGraph { + return { + canBeTarget: true, + errorPort: true, + container: null, + annotationOnly: false, + ...extra, + } +} + +function block( + type: string, + subBlocks: CatalogSubBlock[], + outputs: Record, + extra: Partial = {} +): CatalogBlock { + return { + type, + name: type, + category: 'blocks', + subBlocks, + tools: { access: [], selector: 'single' }, + inputs: {}, + outputs, + graph: graph(), + ...extra, + } +} + +export const TEST_CATALOG: BlockCatalog = { + catalogVersion: 1, + hash: 'test', + sdkMajor: 1, + builders: { + 'trigger.start': { type: 'start_trigger' }, + 'trigger.gmail.poller': { + type: 'gmail', + triggerMode: true, + fixed: { selectedTriggerId: 'gmail_poller' }, + }, + agent: { type: 'agent' }, + api: { type: 'api' }, + condition: { type: 'condition' }, + router: { type: 'router_v2' }, + fn: { type: 'function' }, + note: { type: 'note' }, + 'slack.sendMessage': { type: 'slack', operation: 'send' }, + 'slack.listChannels': { type: 'slack', operation: 'list_channels' }, + 'table.insertRow': { type: 'table', operation: 'insert_row' }, + }, + blocks: { + start_trigger: block( + 'start_trigger', + [sub('inputFormat', 'input-format', 'array', { structured: 'inputFormat' })], + { input: ANY, conversationId: TEXT, files: ANY }, + { + category: 'triggers', + dynamicOutputs: { source: 'inputFormat', param: 'inputFormat' }, + graph: graph({ canBeTarget: false, errorPort: false }), + } + ), + agent: block( + 'agent', + [ + sub('model', 'combobox', 'string', { required: true }), + sub('messages', 'messages-input', 'array'), + sub('responseFormat', 'code', 'json', { language: 'json' }), + sub('temperature', 'slider', 'number', { min: 0, max: 1 }), + sub('tools', 'tool-input', 'tools', { structured: 'tools' }), + ], + { content: TEXT, model: TEXT, tokens: ANY }, + { dynamicOutputs: { source: 'responseFormat', param: 'responseFormat' } } + ), + api: block( + 'api', + [ + sub('url', 'short-input', 'string', { required: true }), + sub('method', 'dropdown', 'string', { + options: [ + { id: 'GET', label: 'GET' }, + { id: 'POST', label: 'POST' }, + ], + }), + sub('headers', 'table', 'object'), + sub('body', 'code', 'json', { language: 'json' }), + ], + { + data: ANY, + status: { type: 'number' }, + headers: { type: 'json', properties: { contentType: TEXT } }, + } + ), + condition: block( + 'condition', + [sub('conditions', 'condition-input', 'branches', { structured: 'branches' })], + { conditionResult: { type: 'boolean' }, selectedPath: ANY, selectedOption: TEXT }, + { graph: graph({ branches: { subBlockId: 'conditions', kind: 'condition' } }) } + ), + router_v2: block( + 'router_v2', + [ + sub('context', 'long-input', 'string', { required: true }), + sub('routes', 'router-input', 'branches', { structured: 'branches' }), + sub('model', 'combobox', 'string'), + ], + { selectedRoute: TEXT, reasoning: TEXT }, + { graph: graph({ branches: { subBlockId: 'routes', kind: 'router' } }) } + ), + function: block( + 'function', + [ + sub('language', 'dropdown', 'string', { + options: [ + { id: 'javascript', label: 'JavaScript' }, + { id: 'python', label: 'Python' }, + { id: 'shell', label: 'Shell' }, + ], + }), + sub('code', 'code', 'code', { required: true }), + ], + { result: ANY, stdout: TEXT } + ), + note: block( + 'note', + [sub('content', 'long-input', 'string')], + {}, + { + graph: graph({ annotationOnly: true, canBeTarget: false, errorPort: false }), + } + ), + slack: block( + 'slack', + [ + sub('operation', 'dropdown', 'string', { + options: [ + { id: 'send', label: 'Send Message' }, + { id: 'list_channels', label: 'List Channels' }, + ], + }), + sub('authMethod', 'dropdown', 'string', { + options: [ + { id: 'oauth', label: 'OAuth' }, + { id: 'bot_token', label: 'Bot token' }, + ], + }), + sub('credential', 'oauth-input', 'resource', { + resourceKind: 'credential', + condition: { field: 'authMethod', value: 'oauth' }, + }), + sub('botToken', 'short-input', 'string', { + password: true, + condition: { field: 'authMethod', value: 'bot_token' }, + }), + sub('channel', 'channel-selector', 'picked', { + mode: 'basic', + canonicalParamId: 'channel', + condition: { field: 'operation', value: 'send' }, + }), + sub('manualChannel', 'short-input', 'string', { + mode: 'advanced', + canonicalParamId: 'channel', + condition: { field: 'operation', value: 'send' }, + }), + sub('text', 'long-input', 'string', { + required: { field: 'operation', value: 'send' }, + condition: { field: 'operation', value: 'send' }, + }), + sub('limit', 'short-input', 'number', { + condition: { field: 'operation', value: 'list_channels' }, + }), + sub('threadTs', 'short-input', 'string', { condition: { opaque: true } }), + ], + { ts: TEXT, channel: TEXT, to: TEXT } + ), + table: block( + 'table', + [ + sub('operation', 'dropdown', 'string', { + options: [{ id: 'insert_row', label: 'Insert Row' }], + }), + sub('tableId', 'table-selector', 'resource', { resourceKind: 'table' }), + sub('data', 'code', 'json', { language: 'json' }), + ], + { row: ANY } + ), + gmail: block( + 'gmail', + [ + sub('credential', 'oauth-input', 'resource', { + resourceKind: 'credential', + surface: 'trigger', + mode: 'trigger', + }), + sub('labelIds', 'dropdown', 'array', { + surface: 'trigger', + mode: 'trigger', + multiple: true, + }), + sub('markAsRead', 'switch', 'boolean', { surface: 'trigger', mode: 'trigger' }), + sub('selectedTriggerId', 'dropdown', 'string', { surface: 'trigger', hidden: true }), + sub('to', 'short-input', 'string', { surface: 'action' }), + ], + { email: ANY }, + { triggerAllowed: true } + ), + loop: block('loop', [], { results: ANY }, { graph: graph({ container: 'loop' }) }), + parallel: block('parallel', [], { results: ANY }, { graph: graph({ container: 'parallel' }) }), + }, + triggers: {}, +} diff --git a/packages/workflow-code/src/compile/throughput.bench.ts b/packages/workflow-code/src/compile/throughput.bench.ts new file mode 100644 index 00000000000..5b7b3766b67 --- /dev/null +++ b/packages/workflow-code/src/compile/throughput.bench.ts @@ -0,0 +1,89 @@ +import { test } from 'vitest' +import { compileWorkflow } from './index' +import { TEST_CATALOG } from './test-catalog' + +/** + * Compile latency on a 200-block workflow of about 44 KB (s3 §5 "Performance": p95 under 50 ms + * warm). Not part of `bun run test` (the package runs `*.test.ts` only) and not a CI gate. Run: + * `bun run --cwd packages/workflow-code vitest bench --run src/compile/throughput.bench.ts`. + * With `--reporter=verbose` it prints mean, p75 and p99 latency; p99 bounds the p95 target. + */ + +const BLOCKS = 200 + +function blockSource(index: number): string { + const previous = index === 0 ? 'start' : `step${index - 1}` + const ref = (path: string) => `\${${previous}.${path}}` + switch (index % 4) { + case 0: + return [ + ` const step${index} = api('Step ${index}', {`, + ` url: t\`https://api.example.com/items/${ref('data')}?page=${index}\`,`, + " method: 'GET',", + ` headers: { Authorization: t\`Bearer \${env.API_TOKEN}\`, 'X-Request': '${index}', 'X-Trace': 'bench-trace' },`, + ' })', + ].join('\n') + case 1: + return [ + ` const step${index} = agent('Step ${index}', {`, + " model: 'claude-sonnet-5-5',", + ` messages: [{ role: 'user', content: t\`Summarize ${ref('data')} for run ${index}\` }],`, + ' temperature: 0.2,', + ' })', + ].join('\n') + case 2: + return [ + ` const step${index} = slack.sendMessage('Step ${index}', {`, + " authMethod: 'oauth',", + " credential: binding('support-slack'),", + ` channel: picked('C0${index}'),`, + ` text: t\`Update ${index}: ${ref('content')}\`,`, + ' })', + ].join('\n') + default: + return [ + ` // Score step ${index}`, + ` const step${index} = fn('Step ${index}', {`, + " language: 'javascript',", + ` code: js\`const value = ${ref('ts')}`, + `return { value, index: ${index} }\`,`, + ' })', + ].join('\n') + } +} + +const SOURCE = [ + '// @sim-sdk 1', + "import { agent, api, binding, env, fn, js, picked, slack, t, trigger, workflow } from '@sim/workflow-sdk'", + '', + "export default workflow('Bench', { description: 'Two hundred blocks.' }, () => {", + " const start = trigger.start('Start', { inputFormat: { query: 'string' } })", + ...Array.from({ length: BLOCKS }, (_, index) => blockSource(index)), + '', + ...Array.from({ length: BLOCKS }, (_, index) => + index === 0 ? ' start.to(step0)' : ` step${index - 1}.to(step${index})` + ), + '})', + '', +].join('\n') + +function compile() { + return compileWorkflow({ + entry: { path: 'workflow.ts', text: SOURCE }, + files: new Map(), + catalog: TEST_CATALOG, + sdkMajor: 1, + }) +} + +test(`compile ${BLOCKS} blocks (${Math.round(SOURCE.length / 1024)} KB)`, async ({ + bench, + expect, +}) => { + const warm = compile() + expect(warm.diagnostics.filter((d) => d.severity === 'error')).toEqual([]) + expect(Object.keys(warm.workflow?.blocks ?? {})).toHaveLength(BLOCKS + 1) + await bench('compileWorkflow', () => { + compile() + }).run() +}) diff --git a/packages/workflow-code/src/compile/tools.ts b/packages/workflow-code/src/compile/tools.ts new file mode 100644 index 00000000000..becbdd6e579 --- /dev/null +++ b/packages/workflow-code/src/compile/tools.ts @@ -0,0 +1,349 @@ +import type { CallExpression, Node } from '@babel/types' +import { isRecordLike, toRecordOrNull } from '@sim/utils/object' +import type { CanonicalTool, Json, ParamMode, ResourceNode, UnresolvedNode, Value } from '../model' +import { type CompileContext, lookup, rangeOf } from './context' +import { didYouMean, hintForNode } from './hints' +import { + calleePath, + compileJsonLiteral, + compileNested, + compileValue, + literalText, + objectEntries, + setOwn, + type ValueSite, +} from './values' + +const USAGE_CONTROLS = new Set(['auto', 'force', 'none']) +const TOOL_OPTIONS = [ + 'operation', + 'toolId', + 'title', + 'usageControl', + 'usageControlExpression', + 'modes', + 'customTool', + 'operationPolicy', + 'extra', +] + +function unsupported( + ctx: CompileContext, + node: Node, + message: string, + hint: string, + site: ValueSite +) { + ctx.reporter.report('E_UNSUPPORTED_SYNTAX', message, rangeOf(ctx, node), { + hint, + blockKey: site.decl.key, + }) + return null +} + +/** A `raw(tool)` element: the canonical tool verbatim, checked for the fields every tool has. */ +function isCanonicalTool(value: Value): value is CanonicalTool & Value { + return ( + isRecordLike(value) && + !('$sim' in value) && + typeof value.type === 'string' && + isRecordLike(value.params) && + isRecordLike(value.modes) + ) +} + +function isToolRef(value: Value): value is ResourceNode | UnresolvedNode { + return isRecordLike(value) && (value.$sim === 'resource' || value.$sim === 'unresolved') +} + +/** + * The builder path a tool call names: `slack.tool.sendMessage(...)` → `slack.sendMessage`, + * `agent.tool(...)` → `agent` (the printer's `printTools` forms). + */ +function toolBuilderPath( + ctx: CompileContext, + site: ValueSite, + call: CallExpression +): string | null { + const path = calleePath(call.callee) + if (!path) return null + const binding = lookup(site.scope, path.root) + if (!binding || binding.kind !== 'sdk') return null + const segments = [binding.name, ...path.rest] + const toolIndex = segments.lastIndexOf('tool') + if (toolIndex < 1 || toolIndex < segments.length - 2) return null + segments.splice(toolIndex, 1) + const builderPath = segments.join('.') + return Object.hasOwn(ctx.catalog.builders, builderPath) ? builderPath : null +} + +function compileToolCall( + ctx: CompileContext, + call: CallExpression, + site: ValueSite +): CanonicalTool | null { + const builderPath = toolBuilderPath(ctx, site, call) + if (builderPath === null) { + const path = calleePath(call.callee) + ctx.reporter.report( + 'E_UNKNOWN_BUILDER', + 'This tool names no block builder.', + rangeOf(ctx, call.callee), + { + ...(path && { + hint: + didYouMean( + [path.root, ...path.rest].filter((segment) => segment !== 'tool').join('.'), + Object.keys(ctx.catalog.builders) + ) ?? 'Write namespace.tool.method(params, options), or raw(tool).', + }), + blockKey: site.decl.key, + } + ) + return null + } + const builder = ctx.catalog.builders[builderPath] + const [paramsNode, optionsNode, ...extra] = call.arguments + for (const node of extra) + unsupported(ctx, node, 'Too many arguments.', 'Write tool(params, options).', site) + if (!paramsNode || paramsNode.type !== 'ObjectExpression') { + return unsupported( + ctx, + paramsNode ?? call, + 'Tool params are an object literal.', + 'Write tool({ field: value }).', + site + ) + } + const params: Record = {} + for (const [id, value] of Object.entries(builder.fixed ?? {})) setOwn(params, id, value) + for (const [key, property] of objectEntries(ctx, paramsNode)) { + const value = compileNested(ctx, property.value, site) + if (value === undefined) return null + setOwn(params, key, value) + } + const tool: CanonicalTool = { type: builder.type, params, modes: {} } + if (builder.operation !== undefined) tool.operation = builder.operation + if (!optionsNode) return tool + if (optionsNode.type !== 'ObjectExpression') { + return unsupported( + ctx, + optionsNode, + 'Tool options are an object literal.', + "Write { usageControl: 'auto' }.", + site + ) + } + for (const [key, property] of objectEntries(ctx, optionsNode)) { + const text = literalText(property.value) + switch (key) { + case 'operation': + case 'toolId': + case 'title': + if (text === null) + return unsupported( + ctx, + property.value, + `${key} is a string.`, + `Write ${key}: '...'.`, + site + ) + tool[key] = text + break + case 'usageControl': + if (text !== 'auto' && text !== 'force' && text !== 'none') { + return unsupported( + ctx, + property.value, + 'Unknown usage control.', + `Use ${[...USAGE_CONTROLS].join(', ')}.`, + site + ) + } + tool.usageControl = text + break + case 'usageControlExpression': { + const compiled = compileValue(ctx, property.value, site) + if (!compiled || compiled.kind !== 'value' || typeof compiled.value !== 'string') { + return unsupported( + ctx, + property.value, + 'usageControlExpression is text.', + 'Write js`...`.', + site + ) + } + tool.usageControlExpression = compiled.value + break + } + case 'modes': { + if (property.value.type !== 'ObjectExpression') { + return unsupported( + ctx, + property.value, + 'modes is an object literal.', + "Write modes: { cid: 'basic' }.", + site + ) + } + const modes: Record = {} + for (const [cid, modeProperty] of objectEntries(ctx, property.value)) { + const mode = literalText(modeProperty.value) + if (mode !== 'basic' && mode !== 'advanced') { + return unsupported( + ctx, + modeProperty.value, + "A mode is 'basic' or 'advanced'.", + "Write 'basic' or 'advanced'.", + site + ) + } + setOwn(modes, cid, mode) + } + tool.modes = modes + break + } + case 'customTool': { + const value = compileNested(ctx, property.value, site) + if (value === undefined) return null + if (!isRecordLike(value) || '$sim' in value) { + return unsupported( + ctx, + property.value, + 'customTool is { ref?, snapshot? }.', + 'Write customTool: { ref: customTool(key) }.', + site + ) + } + const { ref, snapshot, ...rest } = value + const snapshotRecord = toRecordOrNull(snapshot) + if ( + Object.keys(rest).length > 0 || + (ref !== undefined && !isToolRef(ref)) || + (snapshot !== undefined && + (!snapshotRecord || + typeof snapshotRecord.code !== 'string' || + !('schema' in snapshotRecord))) + ) { + return unsupported( + ctx, + property.value, + 'customTool is { ref?, snapshot? }.', + 'Write customTool: { ref: customTool(key) }.', + site + ) + } + tool.customTool = { + ...(ref !== undefined && isToolRef(ref) && { ref }), + ...(snapshotRecord && + typeof snapshotRecord.code === 'string' && { + snapshot: { schema: snapshotRecord.schema as Json, code: snapshotRecord.code }, + }), + } + break + } + case 'operationPolicy': { + const json = compileJsonLiteral(ctx, property.value, site) + if (json === undefined) return null + tool.operationPolicy = json + break + } + case 'extra': { + const json = compileJsonLiteral(ctx, property.value, site) + if (json === undefined) return null + if (!isRecordLike(json)) + return unsupported( + ctx, + property.value, + 'extra is an object.', + 'Write extra: { key: value }.', + site + ) + tool.extra = json as Record + break + } + default: + ctx.reporter.report( + 'E_UNKNOWN_PARAM', + `${key} is not a tool option.`, + rangeOf(ctx, property), + { + ...(didYouMean(key, TOOL_OPTIONS) !== undefined && { + hint: didYouMean(key, TOOL_OPTIONS), + }), + blockKey: site.decl.key, + } + ) + return null + } + } + return tool +} + +/** + * A tool-input value: an array of `ns.tool.method(params, options?)` calls (the printer's + * `printTools`) or `raw(tool)` elements. `raw([...])` for the whole list is accepted too. + */ +export function compileToolList( + ctx: CompileContext, + node: Node, + site: ValueSite +): CanonicalTool[] | null { + if (node.type !== 'ArrayExpression') { + const compiled = compileValue(ctx, node, site) + if (compiled?.kind === 'value' && compiled.form === 'raw' && Array.isArray(compiled.value)) { + const tools: CanonicalTool[] = [] + for (const tool of compiled.value) if (isCanonicalTool(tool)) tools.push(tool) + if (tools.length === compiled.value.length) return tools + } + if (compiled) + unsupported( + ctx, + node, + 'A tool list is an array.', + 'Write tools: [slack.tool.sendMessage({ ... })].', + site + ) + return null + } + const tools: CanonicalTool[] = [] + for (const element of node.elements) { + if (!element || element.type === 'SpreadElement') { + return unsupported( + ctx, + element ?? node, + 'Write each tool explicitly.', + 'Write each tool explicitly.', + site + ) + } + if (element.type !== 'CallExpression') { + return unsupported(ctx, element, `${element.type} is not a tool.`, hintForNode(element), site) + } + const compiled = calleePath(element.callee)?.root + const rootBinding = compiled === undefined ? null : lookup(site.scope, compiled) + if ( + rootBinding?.kind === 'sdk' && + rootBinding.name === 'raw' && + element.callee.type === 'Identifier' + ) { + const value = compileValue(ctx, element, site) + if (!value || value.kind !== 'value') return null + if (!isCanonicalTool(value.value)) { + return unsupported( + ctx, + element, + 'raw(tool) needs type, params and modes.', + 'Write raw({ type, params: {}, modes: {} }).', + site + ) + } + tools.push(value.value) + continue + } + const tool = compileToolCall(ctx, element, site) + if (!tool) return null + tools.push(tool) + } + return tools +} diff --git a/packages/workflow-code/src/compile/validate-catalog.ts b/packages/workflow-code/src/compile/validate-catalog.ts new file mode 100644 index 00000000000..1180cd389ba --- /dev/null +++ b/packages/workflow-code/src/compile/validate-catalog.ts @@ -0,0 +1,162 @@ +import { isRecordLike } from '@sim/utils/object' +import type { + CatalogBlock, + CatalogCondition, + CatalogSubBlock, + CatalogValueKind, + SubBlockConditionClause, +} from '../catalog/types' +import type { CanonicalParamId, SubBlockId, Value } from '../model' + +/** + * One source param: a single subBlock, or every subBlock sharing a `canonicalParamId`, written + * once under that id (build-spec decision 7). A group may lack either member. + */ +export type CatalogField = + | { kind: 'single'; param: string; sub: CatalogSubBlock } + | { + kind: 'pair' + param: CanonicalParamId + basic: CatalogSubBlock | undefined + advanced: CatalogSubBlock | undefined + members: CatalogSubBlock[] + } + +export interface FieldIndex { + /** By source param name: subBlock id for singles, canonical id for groups. */ + fields: Map + /** Group member ids whose own id is not the param name, mapped to that name. */ + memberAliases: Map + /** Every subBlock on this surface by id (first declaration wins). */ + subBlocks: Map +} + +function onSurface(sub: CatalogSubBlock, triggerMode: boolean): boolean { + return triggerMode ? sub.surface !== 'action' : sub.surface !== 'trigger' +} + +/** + * The params a builder accepts: subBlock ids, with every `canonicalParamId` group written once + * under its canonical id. The surface (action or trigger copy of a duplicated id) follows the + * block's trigger mode, the first declaration of an id wins, the branches subBlock and the + * builder's pinned ids are excluded. This is exactly the set the printer emits as params. + */ +export function buildFieldIndex( + block: CatalogBlock, + triggerMode: boolean, + pinned: ReadonlySet +): FieldIndex { + const subBlocks = new Map() + for (const sub of block.subBlocks) { + if (onSurface(sub, triggerMode) && !subBlocks.has(sub.id)) subBlocks.set(sub.id, sub) + } + const fields = new Map() + const memberAliases = new Map() + const branchId = block.graph.branches?.subBlockId + for (const sub of subBlocks.values()) { + if (sub.id === branchId || pinned.has(sub.id)) continue + const cid = sub.canonicalParamId + if (cid === undefined) { + fields.set(sub.id, { kind: 'single', param: sub.id, sub }) + continue + } + if (sub.id !== cid) memberAliases.set(sub.id, cid) + if (fields.has(cid)) continue + const members = [...subBlocks.values()].filter( + (member) => member.canonicalParamId === cid && !pinned.has(member.id) + ) + fields.set(cid, { + kind: 'pair', + param: cid, + basic: members.find((member) => member.mode !== 'advanced'), + advanced: members.find((member) => member.mode === 'advanced'), + members, + }) + } + return { fields, memberAliases, subBlocks } +} + +/** The member a group's value lands in for a mode (the printer's effective member). */ +export function memberFor( + field: Extract, + mode: 'basic' | 'advanced' +): CatalogSubBlock | undefined { + return (mode === 'advanced' ? field.advanced : field.basic) ?? field.members[0] +} + +function clauseMatches( + clause: { field: string; value: unknown; not?: boolean }, + values: ReadonlyMap +): boolean { + const actual = values.get(clause.field) + if (Array.isArray(clause.value)) { + if (actual === undefined || actual === null) return false + const included = clause.value.some((candidate) => candidate === actual) + return clause.not ? !included : included + } + return clause.not ? actual !== clause.value : actual === clause.value +} + +/** + * Evaluates a subBlock condition the way the editor does (`evaluateSubBlockCondition`, + * lib/workflows/subblocks/visibility.ts). An opaque function condition uses the projection's + * per-operation answer, and counts as visible when there is none (s1 canonicalize step 9). + */ +export function conditionHolds( + condition: CatalogCondition | undefined, + values: ReadonlyMap, + visibleFor: Record | undefined +): boolean { + if (!condition) return true + if ('opaque' in condition) { + const operation = values.get('operation') + if (typeof operation === 'string' && visibleFor && Object.hasOwn(visibleFor, operation)) { + return visibleFor[operation] + } + return true + } + const clause: SubBlockConditionClause = condition + if (!clauseMatches(clause, values)) return false + return clause.and ? clauseMatches(clause.and, values) : true +} + +export function isVisible(sub: CatalogSubBlock, values: ReadonlyMap): boolean { + return conditionHolds(sub.condition, values, sub.visibleFor) +} + +export function isRequired(sub: CatalogSubBlock, values: ReadonlyMap): boolean { + if (sub.defaultValue !== undefined || sub.valueDefault !== undefined) return false + if (sub.hidden || sub.readOnly) return false + if (sub.required === undefined || sub.required === false) return false + if (sub.required === true) return true + return conditionHolds(sub.required, values, undefined) +} + +function isPlainObject(value: Value): boolean { + return isRecordLike(value) && !('$sim' in value) +} + +/** + * Whether a literal value has the JSON type its field's `valueKind` expects. Never coerced: a + * mismatch is `W_VALUE_KIND` and the exact value is kept (s3 §4 "Catalog checks"). + */ +export function valueKindMatches(kind: CatalogValueKind, value: Value): boolean { + switch (kind) { + case 'string': + case 'code': + case 'picked': + return typeof value === 'string' + case 'number': + return typeof value === 'number' + case 'boolean': + return typeof value === 'boolean' + case 'array': + return Array.isArray(value) + case 'object': + return isPlainObject(value) + case 'resource': + return typeof value === 'object' && value !== null && '$sim' in value + default: + return true + } +} diff --git a/packages/workflow-code/src/compile/values.ts b/packages/workflow-code/src/compile/values.ts new file mode 100644 index 00000000000..132d2f74b6d --- /dev/null +++ b/packages/workflow-code/src/compile/values.ts @@ -0,0 +1,895 @@ +import type { + ArrayExpression, + CallExpression, + Expression, + MemberExpression, + Node, + ObjectExpression, + ObjectProperty, + TaggedTemplateExpression, +} from '@babel/types' +import { isRecordLike } from '@sim/utils/object' +import { WORKFLOW_RESOURCE_KINDS } from '@sim/workflow-types/resources' +import type { CatalogOutput } from '../catalog/types' +import { + ENV_VAR_NAME, + formatStoredPath, + isIndexSegment, + isNameSegment, + type RefSegment, +} from '../code-files/ref-path' +import type { Json, ResourceKind, Value, VarNode } from '../model' +import { + type BlockDecl, + type CompileContext, + catalogBlockOf, + containerKindOf, + enclosingContainers, + lookup, + rangeOf, + type Scope, + visibleNames, +} from './context' +import { didYouMean, HINTS, hintForNode } from './hints' + +/** Where a value is compiled: the block it belongs to and the scope its identifiers resolve in. */ +export interface ValueSite { + decl: BlockDecl + scope: Scope + /** + * Inside a variables-input field (`structured: 'variables'`), a bare `vars.k` is the variable + * itself (`{ $sim: 'var', key }`, the stored `variableId`); everywhere else it is the + * `` reference text. The printer draws the same line (whole-string refs in such a + * field print as templates). + */ + varNodes?: boolean +} + +/** + * How a value was written, which picks the member of a basic/advanced pair (build-spec + * decision 7) and decides whether `W_VALUE_KIND` applies (only to literals). + */ +export type ValueForm = 'literal' | 'ref' | 'template' | 'resource' | 'picked' | 'upload' | 'raw' + +export type CompiledValue = + | { kind: 'value'; value: Value; form: ValueForm } + /** `todo()`: compiles to absent. */ + | { kind: 'todo' } + /** `null` at the top of a param: a stored `null` is absent. */ + | { kind: 'absent' } + /** `file('./x.js')`: only valid as a function block's code. */ + | { kind: 'file'; path: string; pathNode: Node } + +const SELECTOR_FORMS: ReadonlySet = new Set(['resource', 'picked', 'upload']) + +export function isSelectorForm(form: ValueForm): boolean { + return SELECTOR_FORMS.has(form) +} + +/** Call-form resource constructors (s2 D6) and the kind each produces. */ +const RESOURCE_CALLS: Record = { + binding: 'credential', + table: 'table', + kb: 'knowledge-base', + workflow: 'workflow', + skill: 'skill', + customTool: 'custom-tool', + mcp: 'mcp-server', + sandbox: 'sandbox', + folder: 'file-folder', + upload: 'file', +} + +const TEMPLATE_TAGS = new Set(['t', 'js', 'json', 'md', 'py', 'sh']) + +/** SDK functions that are values, not block builders. */ +export const SDK_VALUE_FUNCTIONS = new Set([ + ...Object.keys(RESOURCE_CALLS), + ...TEMPLATE_TAGS, + 'picked', + 'raw', + 'todo', + 'ref', + 'file', + 'edge', + 'env', + 'vars', +]) + +const RESOURCE_KINDS: ReadonlySet = new Set([ + ...WORKFLOW_RESOURCE_KINDS.filter((kind) => kind !== 'env-var'), + 'workflow', +]) + +/** Loop and parallel params (executor/variables/resolvers/loop.ts:44, parallel.ts:45). */ +const LOOP_PROPERTIES = ['index', 'currentItem', 'items', 'iteration', 'item'] +const PARALLEL_PROPERTIES = ['index', 'currentItem', 'items'] +/** Named-form container outputs (loop.ts:43, parallel.ts:44). */ +const CONTAINER_OUTPUTS = ['results', 'result'] + +function report( + ctx: CompileContext, + node: Node, + message: string, + hint: string | undefined, + site?: ValueSite +): null { + ctx.reporter.report('E_UNSUPPORTED_SYNTAX', message, rangeOf(ctx, node), { + ...(hint !== undefined && { hint }), + ...(site && { blockKey: site.decl.key }), + }) + return null +} + +function rejectNode(ctx: CompileContext, node: Node, site?: ValueSite): null { + return report( + ctx, + node, + `${node.type} is not supported in a workflow file.`, + hintForNode(node), + site + ) +} + +/** Sets an own enumerable property, so a `__proto__` key is data and never a prototype. */ +export function setOwn(target: Record, key: string, value: T): void { + Object.defineProperty(target, key, { + value, + enumerable: true, + writable: true, + configurable: true, + }) +} + +/** The literal text of a property key, or `null` (after reporting) for a computed key. */ +export function propertyKey(ctx: CompileContext, property: ObjectProperty): string | null { + if (property.computed) { + report(ctx, property, 'Computed keys are not supported.', HINTS.computedKey) + return null + } + const key = property.key + if (key.type === 'Identifier') return key.name + if (key.type === 'StringLiteral') return key.value + if (key.type === 'NumericLiteral') return String(key.value) + report(ctx, property, 'Use an identifier or string key.', HINTS.computedKey) + return null +} + +/** + * The properties of an object literal as `[key, property]`, rejecting methods, getters, spreads, + * computed keys and duplicate keys. `null` means the object itself was rejected. + */ +export function objectEntries( + ctx: CompileContext, + node: ObjectExpression, + onDuplicate?: (property: ObjectProperty, key: string) => void +): Array<[string, ObjectProperty]> { + const entries: Array<[string, ObjectProperty]> = [] + const seen = new Set() + for (const property of node.properties) { + if (property.type !== 'ObjectProperty') { + rejectNode(ctx, property) + continue + } + const key = propertyKey(ctx, property) + if (key === null) continue + if (seen.has(key)) { + if (onDuplicate) onDuplicate(property, key) + else report(ctx, property, `The key ${key} is written twice.`, HINTS.duplicateKey) + continue + } + seen.add(key) + entries.push([key, property]) + } + return entries +} + +/** A string literal, or a template literal with no `${}`; `null` otherwise. */ +export function literalText(node: Node): string | null { + if (node.type === 'StringLiteral') return node.value + if (node.type === 'TemplateLiteral' && node.expressions.length === 0) { + return node.quasis[0]?.value.cooked ?? null + } + return null +} + +/** Unwraps literal nodes back to stored JSON; `null` when the value holds any other node. */ +function toStoredJson(value: Value): Json | null { + if (value === null || typeof value !== 'object') return value + if (Array.isArray(value)) { + const items: Json[] = [] + for (const item of value) { + const json = toStoredJson(item) + if (json === null && item !== null) return null + items.push(json) + } + return items + } + if ('$sim' in value) { + return value.$sim === 'literal' && 'value' in value ? (value.value as Json) : null + } + const result: Record = {} + for (const [key, entry] of Object.entries(value)) { + const json = toStoredJson(entry) + if (json === null && entry !== null) return null + setOwn(result, key, json) + } + return result +} + +/** Whether an object with a `$sim` key is a well-formed canonical node. */ +function isCanonicalNode(value: Record): boolean { + const keys = Object.keys(value).sort() + const only = (...expected: string[]) => keys.join(',') === [...expected].sort().join(',') + switch (value.$sim) { + case 'var': + return only('$sim', 'key') && typeof value.key === 'string' + case 'resource': + return ( + only('$sim', 'kind', 'key') && + typeof value.kind === 'string' && + RESOURCE_KINDS.has(value.kind) && + typeof value.key === 'string' + ) + case 'unresolved': + return ( + only('$sim', 'kind', 'id') && typeof value.kind === 'string' && typeof value.id === 'string' + ) + case 'csv': + return ( + only('$sim', 'items') && + Array.isArray(value.items) && + value.items.every( + (item) => + isRecordLike(item) && + (item.$sim === 'resource' || item.$sim === 'unresolved') && + isCanonicalNode(item) + ) + ) + case 'literal': + return only('$sim', 'value') + default: + return false + } +} + +/** A literal-only tree (strings, numbers, booleans, null, arrays, objects) as plain JSON. */ +function literalTree(ctx: CompileContext, node: Node, site?: ValueSite): Json | undefined { + switch (node.type) { + case 'StringLiteral': + case 'BooleanLiteral': + case 'NumericLiteral': + return node.value + case 'NullLiteral': + return null + case 'TemplateLiteral': { + const text = literalText(node) + if (text === null) { + report(ctx, node, 'Write literals only here.', HINTS.untaggedTemplate, site) + return undefined + } + return text + } + case 'UnaryExpression': + if (node.operator === '-' && node.argument.type === 'NumericLiteral') { + return -node.argument.value + } + rejectNode(ctx, node, site) + return undefined + case 'ArrayExpression': { + const items: Json[] = [] + for (const element of node.elements) { + if (!element || element.type === 'SpreadElement') { + report(ctx, element ?? node, 'Write each element explicitly.', HINTS.spread, site) + return undefined + } + const item = literalTree(ctx, element, site) + if (item === undefined) return undefined + items.push(item) + } + return items + } + case 'ObjectExpression': { + const result: Record = {} + const entries = objectEntries(ctx, node) + if (entries.length !== node.properties.length) return undefined + for (const [key, property] of entries) { + const item = literalTree(ctx, property.value, site) + if (item === undefined) return undefined + setOwn(result, key, item) + } + return result + } + default: + report(ctx, node, 'Write literals only here.', 'Write the stored value as a literal.', site) + return undefined + } +} + +/** Whether every `$sim` object in a raw value is a well-formed canonical node. */ +function canonicalNodesValid(value: Json): boolean { + if (Array.isArray(value)) return value.every(canonicalNodesValid) + if (value === null || typeof value !== 'object') return true + if (Object.hasOwn(value, '$sim')) { + if (!isCanonicalNode(value)) return false + return value.$sim === 'literal' || Object.values(value).every(canonicalNodesValid) + } + return Object.values(value).every(canonicalNodesValid) +} + +/** + * `raw(v)`: `v` is the canonical value verbatim, so `$sim` objects are canonical nodes (checked + * for shape) rather than data; a `literal` node's `value` is data and is not inspected. Only + * literals are allowed inside. + */ +function rawLiteral(ctx: CompileContext, node: Node, site?: ValueSite): Value | undefined { + const value = literalTree(ctx, node, site) + if (value === undefined) return undefined + if (!canonicalNodesValid(value)) { + report( + ctx, + node, + 'This $sim object is not a canonical node.', + "Use { $sim: 'resource', kind, key }, { $sim: 'unresolved', kind, id }, { $sim: 'var', key }, { $sim: 'csv', items } or { $sim: 'literal', value }.", + site + ) + return undefined + } + return value +} + +/** The identifier at the root of a callee, and the member names after it. */ +export function calleePath(node: Node): { root: string; rest: string[]; rootNode: Node } | null { + const rest: string[] = [] + let current: Node = node + while (current.type === 'MemberExpression') { + if (current.computed || current.property.type !== 'Identifier') return null + rest.unshift(current.property.name) + current = current.object + } + return current.type === 'Identifier' ? { root: current.name, rest, rootNode: current } : null +} + +/** The SDK export a call targets (`binding`, `slack.sendMessage`, ...), or `null`. */ +export function sdkCallPath(scope: Scope, call: CallExpression): string | null { + const path = calleePath(call.callee) + if (!path) return null + const binding = lookup(scope, path.root) + if (!binding || binding.kind !== 'sdk') return null + return [binding.name, ...path.rest].join('.') +} + +function singleStringArgument( + ctx: CompileContext, + call: CallExpression, + name: string, + site: ValueSite +): { text: string; node: Node } | null { + const [argument, ...extra] = call.arguments + const text = argument ? literalText(argument) : null + if (!argument || text === null || extra.length > 0) { + return report(ctx, call, `${name}() takes one string literal.`, `Write ${name}('key').`, site) + } + return { text, node: argument } +} + +function flattenMembers(node: MemberExpression): { root: Expression; members: MemberExpression[] } { + const members: MemberExpression[] = [node] + let object = node.object + while (object.type === 'MemberExpression') { + members.push(object) + object = object.object + } + members.reverse() + return { root: object, members } +} + +function memberSegment( + ctx: CompileContext, + member: MemberExpression, + site: ValueSite +): RefSegment | null { + const property = member.property + if (!member.computed) { + if (property.type === 'Identifier' && isNameSegment(property.name)) { + return { kind: 'name', name: property.name } + } + return rejectNode(ctx, member, site) + } + if (property.type === 'StringLiteral') { + if (isNameSegment(property.value)) return { kind: 'name', name: property.value } + return report( + ctx, + property, + `The path segment '${property.value}' cannot be written as a reference.`, + "Use ref('block.path') for this spelling.", + site + ) + } + if (property.type === 'NumericLiteral' && isIndexSegment(property.value)) { + return { kind: 'index', index: property.value } + } + return report(ctx, member, 'Element access needs a literal key.', HINTS.elementAccess, site) +} + +function memberName(member: MemberExpression): string | null { + const property = member.property + if (!member.computed && property.type === 'Identifier') return property.name + if (member.computed && property.type === 'StringLiteral') return property.value + return null +} + +function outputKnown(outputs: Record, segments: RefSegment[]): boolean { + let level: Record | undefined = outputs + for (const segment of segments) { + if (!level) return true + if (segment.kind === 'index') return true + const output: CatalogOutput | undefined = Object.hasOwn(level, segment.name) + ? level[segment.name] + : undefined + if (!output) return false + if (!output.properties) return true + level = output.properties + } + return true +} + +/** + * Compiles an identifier or member chain to its stored token text (build-spec decision 8, s3 §4 + * "Ref mapping"): a block chain to ``, `vars.x` to ``, `env.X` to `{{X}}`, + * a loop param to `` (innermost loop of its kind) or `` (named form). + */ +export function compileRef( + ctx: CompileContext, + node: Node, + site: ValueSite +): string | VarNode | null { + const { root, members } = + node.type === 'MemberExpression' ? flattenMembers(node) : { root: node, members: [] } + if (root.type !== 'Identifier') return rejectNode(ctx, node, site) + + const binding = lookup(site.scope, root.name) + if (!binding) { + const elsewhere = ctx.declsByBinding.get(root.name) + if (elsewhere && elsewhere.length > 0) { + ctx.reporter.report( + 'E_OUT_OF_SCOPE', + `${root.name} is declared inside another loop or parallel and is not visible here.`, + rangeOf(ctx, node), + { + hint: 'Wire the subflow and reference its results, or move the block into this scope.', + blockKey: site.decl.key, + } + ) + return null + } + ctx.reporter.report( + 'E_UNKNOWN_IDENTIFIER', + `${root.name} is not defined.`, + rangeOf(ctx, root), + { + ...withHint(didYouMean(root.name, visibleNames(site.scope))), + blockKey: site.decl.key, + } + ) + return null + } + + switch (binding.kind) { + case 'vars': { + const first = members[0] + const name = first ? memberName(first) : null + if (!first || name === null) { + return report(ctx, node, 'Reference one variable: vars.name.', 'Write vars.name.', site) + } + if (!ctx.variables.has(name)) { + ctx.reporter.report( + 'E_UNKNOWN_VARIABLE', + `No workflow variable is keyed ${name}.`, + rangeOf(ctx, first), + { + ...withHint(didYouMean(name, ctx.variables.keys(), (key) => `vars.${key}`)), + blockKey: site.decl.key, + } + ) + return null + } + const rest = segmentsOf(ctx, members.slice(1), site) + if (!rest) return null + if (site.varNodes && rest.length === 0) return { $sim: 'var', key: name } + return `<${formatStoredPath([{ kind: 'name', name: 'variable' }, { kind: 'name', name }, ...rest])}>` + } + case 'sdk': { + if (binding.name !== 'env') { + return report(ctx, node, `${root.name} is an SDK function; call it.`, HINTS.calls, site) + } + const first = members[0] + const name = first ? memberName(first) : null + if (!first || name === null || !ENV_VAR_NAME.test(name)) { + ctx.reporter.report( + 'E_INVALID_ENV_NAME', + 'Environment variable names match [A-Za-z_][A-Za-z0-9_]*.', + rangeOf(ctx, first ?? node), + { hint: 'Write env.NAME with a valid name.', blockKey: site.decl.key } + ) + return null + } + if (members.length > 1) { + return report( + ctx, + members[1], + 'env.NAME is a whole value.', + 'Remove the member access.', + site + ) + } + return `{{${name}}}` + } + case 'loopParam': + return loopParamRef(ctx, node, binding.container, members, site) + case 'block': { + const target = binding.decl + const segments = segmentsOf(ctx, members, site) + if (!segments) return null + checkOutputPath(ctx, node, target, segments, site) + if (target.order > site.decl.order && target !== site.decl) { + ctx.reporter.report( + 'W_FORWARD_REF', + `${target.binding ?? target.key} is declared after this block.`, + rangeOf(ctx, node), + { hint: 'Declare blocks before the blocks that read them.', blockKey: site.decl.key } + ) + } + return `<${formatStoredPath([{ kind: 'name', name: target.key }, ...segments])}>` + } + } +} + +function withHint(hint: string | undefined): { hint?: string } { + return hint === undefined ? {} : { hint } +} + +function segmentsOf( + ctx: CompileContext, + members: MemberExpression[], + site: ValueSite +): RefSegment[] | null { + const segments: RefSegment[] = [] + for (const member of members) { + const segment = memberSegment(ctx, member, site) + if (!segment) return null + segments.push(segment) + } + return segments +} + +function checkOutputPath( + ctx: CompileContext, + node: Node, + target: BlockDecl, + segments: RefSegment[], + site: ValueSite +): void { + if (segments.length === 0) return + const containerKind = containerKindOf(target) + if (containerKind) { + const first = segments[0] + const known = [ + ...CONTAINER_OUTPUTS, + ...(containerKind === 'loop' ? LOOP_PROPERTIES : PARALLEL_PROPERTIES), + ] + if (first.kind === 'name' && !known.includes(first.name)) { + ctx.reporter.report( + 'W_UNKNOWN_OUTPUT_PATH', + `A ${containerKind} has no output ${first.name}.`, + rangeOf(ctx, node), + { ...withHint(didYouMean(first.name, known)), blockKey: site.decl.key } + ) + } + return + } + const block = catalogBlockOf(target) + if (!block || block.dynamicOutputs) return + if (!outputKnown(block.outputs, segments)) { + ctx.reporter.report( + 'W_UNKNOWN_OUTPUT_PATH', + `${block.name} has no output ${formatStoredPath(segments)}.`, + rangeOf(ctx, node), + { blockKey: site.decl.key } + ) + } +} + +function loopParamRef( + ctx: CompileContext, + node: Node, + container: BlockDecl, + members: MemberExpression[], + site: ValueSite +): string | null { + const kind = containerKindOf(container) ?? 'loop' + const known = kind === 'loop' ? LOOP_PROPERTIES : PARALLEL_PROPERTIES + const first = members[0] + const property = first ? memberName(first) : null + const paramName = node.type === 'MemberExpression' ? flattenMembers(node).root : node + const label = paramName.type === 'Identifier' ? paramName.name : 'p' + if (!first || property === null || !known.includes(property)) { + ctx.reporter.report( + 'E_UNKNOWN_LOOP_PROPERTY', + property === 'start' + ? `${label}.start is only for wiring the first block.` + : `A ${kind} has no property ${property ?? '(none)'}.`, + rangeOf(ctx, node), + { + ...withHint( + property === 'start' + ? `Write ${label}.start.to(block).` + : didYouMean(property ?? '', known, (name) => `${label}.${name}`) + ), + blockKey: site.decl.key, + } + ) + return null + } + const rest = segmentsOf(ctx, members.slice(1), site) + if (!rest) return null + const innermostOfKind = enclosingContainers(site.decl).find( + (decl) => containerKindOf(decl) === kind + ) + const head = innermostOfKind === container ? kind : container.key + return `<${formatStoredPath([{ kind: 'name', name: head }, { kind: 'name', name: property }, ...rest])}>` +} + +function templateText( + ctx: CompileContext, + node: TaggedTemplateExpression, + site: ValueSite +): string | null { + const { quasis, expressions } = node.quasi + let text = '' + for (const [index, quasi] of quasis.entries()) { + const cooked = quasi.value.cooked + if (cooked == null) { + return report( + ctx, + quasi, + 'This template has an invalid escape sequence.', + 'Escape the backslash: \\\\.', + site + ) + } + text += cooked + const expression = expressions[index] + if (!expression) continue + if (expression.type === 'StringLiteral') { + text += expression.value + } else if (expression.type === 'NumericLiteral') { + text += String(expression.value) + } else if ( + expression.type === 'CallExpression' && + sdkCallPath(site.scope, expression) === 'ref' + ) { + const raw = singleStringArgument(ctx, expression, 'ref', site) + if (!raw) return null + text += `<${raw.text}>` + } else if (expression.type === 'Identifier' || expression.type === 'MemberExpression') { + const ref = compileRef(ctx, expression, { ...site, varNodes: false }) + if (ref === null || typeof ref !== 'string') return null + text += ref + } else { + return rejectNode(ctx, expression, site) + } + } + return text +} + +function compileCall( + ctx: CompileContext, + call: CallExpression, + site: ValueSite +): CompiledValue | null { + const path = sdkCallPath(site.scope, call) + if (path === null) return rejectNode(ctx, call, site) + const resourceKind = RESOURCE_CALLS[path] + if (resourceKind) { + const argument = singleStringArgument(ctx, call, path, site) + if (!argument) return null + const value: Value = { $sim: 'resource', kind: resourceKind, key: argument.text } + return { kind: 'value', value, form: path === 'upload' ? 'upload' : 'resource' } + } + switch (path) { + case 'picked': { + const argument = singleStringArgument(ctx, call, 'picked', site) + return argument ? { kind: 'value', value: argument.text, form: 'picked' } : null + } + case 'ref': { + const argument = singleStringArgument(ctx, call, 'ref', site) + return argument ? { kind: 'value', value: `<${argument.text}>`, form: 'ref' } : null + } + case 'file': { + const argument = singleStringArgument(ctx, call, 'file', site) + return argument ? { kind: 'file', path: argument.text, pathNode: argument.node } : null + } + case 'todo': + if (call.arguments.length > 0) + return report(ctx, call, 'todo() takes no arguments.', 'Write todo().', site) + return { kind: 'todo' } + case 'raw': { + const [argument, ...extra] = call.arguments + if (!argument || extra.length > 0 || argument.type === 'SpreadElement') { + return report(ctx, call, 'raw() takes one literal.', 'Write raw(value).', site) + } + const value = rawLiteral(ctx, argument, site) + return value === undefined ? null : { kind: 'value', value, form: 'raw' } + } + default: + return report(ctx, call, `${path}() is not a value.`, HINTS.bindInline, site) + } +} + +function compileArray( + ctx: CompileContext, + node: ArrayExpression, + site: ValueSite +): { items: Value[]; selector: boolean } | null { + const items: Value[] = [] + let selector = node.elements.length > 0 + for (const element of node.elements) { + if (!element) + return report( + ctx, + node, + 'Array holes are not values.', + 'Write each element explicitly.', + site + ) + if (element.type === 'SpreadElement') return rejectNode(ctx, element, site) + const compiled = compileValue(ctx, element, site) + const item = compiled ? nestedValue(ctx, element, compiled, site) : undefined + if (item === undefined) return null + if (compiled?.kind !== 'value' || !isSelectorForm(compiled.form)) selector = false + items.push(item) + } + return { items, selector } +} + +function compileObject(ctx: CompileContext, node: ObjectExpression, site: ValueSite): Value | null { + const result: Record = {} + const entries = objectEntries(ctx, node) + let failed = entries.length !== node.properties.length + for (const [key, property] of entries) { + const value = compileNested(ctx, property.value, site) + if (value === undefined) { + failed = true + continue + } + setOwn(result, key, value) + } + if (failed) return null + if (Object.hasOwn(result, '$sim')) { + const stored: Record = {} + let plain = true + for (const [key, entry] of Object.entries(result)) { + const json = toStoredJson(entry) + if (json === null && entry !== null) plain = false + setOwn(stored, key, json) + } + if (!plain) { + return report( + ctx, + node, + 'An object with a $sim key must hold plain data.', + 'Write the canonical value with raw(...).', + site + ) + } + return { $sim: 'literal', value: stored } + } + return result +} + +/** A value nested inside an object or array; `undefined` after reporting an error. */ +export function compileNested(ctx: CompileContext, node: Node, site: ValueSite): Value | undefined { + const compiled = compileValue(ctx, node, site) + return compiled ? nestedValue(ctx, node, compiled, site) : undefined +} + +function nestedValue( + ctx: CompileContext, + node: Node, + compiled: CompiledValue, + site: ValueSite +): Value | undefined { + if (compiled.kind === 'value') return compiled.value + if (compiled.kind === 'absent') return null + report( + ctx, + node, + compiled.kind === 'todo' + ? 'todo() stands for a whole param.' + : 'file() holds a whole code param.', + compiled.kind === 'todo' + ? 'Write todo() as the param value.' + : "Write code: file('./fns/x.js').", + site + ) + return undefined +} + +/** + * Statically evaluates one value expression (s3 §4 "Values may be"). Nothing runs: only literal + * syntax, SDK value calls and references are understood; anything else is reported with the hint + * from the s3 rejection table and yields `null`. + */ +export function compileValue( + ctx: CompileContext, + node: Node, + site: ValueSite +): CompiledValue | null { + switch (node.type) { + case 'StringLiteral': + case 'BooleanLiteral': + return { kind: 'value', value: node.value, form: 'literal' } + case 'NumericLiteral': + return { kind: 'value', value: node.value, form: 'literal' } + case 'NullLiteral': + return { kind: 'absent' } + case 'UnaryExpression': + if (node.operator === '-' && node.argument.type === 'NumericLiteral') { + return { kind: 'value', value: -node.argument.value, form: 'literal' } + } + return rejectNode(ctx, node, site) + case 'TemplateLiteral': { + const text = literalText(node) + if (text === null) { + return node.expressions.length > 0 + ? rejectNode(ctx, node, site) + : report( + ctx, + node, + 'This template has an invalid escape sequence.', + 'Escape the backslash: \\\\.', + site + ) + } + return { kind: 'value', value: text, form: 'literal' } + } + case 'TaggedTemplateExpression': { + const tag = node.tag.type === 'Identifier' ? lookup(site.scope, node.tag.name) : null + if (!tag || tag.kind !== 'sdk' || !TEMPLATE_TAGS.has(tag.name)) + return rejectNode(ctx, node, site) + const text = templateText(ctx, node, site) + return text === null ? null : { kind: 'value', value: text, form: 'template' } + } + case 'Identifier': + case 'MemberExpression': { + const text = compileRef(ctx, node, site) + return text === null ? null : { kind: 'value', value: text, form: 'ref' } + } + case 'CallExpression': + return compileCall(ctx, node, site) + case 'ArrayExpression': { + const array = compileArray(ctx, node, site) + if (array === null) return null + return { kind: 'value', value: array.items, form: array.selector ? 'resource' : 'literal' } + } + case 'ObjectExpression': { + const value = compileObject(ctx, node, site) + return value === null ? null : { kind: 'value', value, form: 'literal' } + } + default: + return rejectNode(ctx, node, site) + } +} + +/** + * A literal-only JSON value (variables, `$unknown`, retry, tool policy): plain data, so a `$sim` + * key is just a key. No refs, no SDK calls. + */ +export function compileJsonLiteral( + ctx: CompileContext, + node: Node, + site?: ValueSite +): Json | undefined { + return literalTree(ctx, node, site) +} From b3a8a569716682b3066cf87c3555791c4db4700d Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:32:42 -0800 Subject: [PATCH 033/428] feat(workflow-code): export compileWorkflow and the code-file codec --- packages/workflow-code/src/index.ts | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index adb17b5223d..558f58b70c6 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -50,6 +50,18 @@ export type { ParamStorage, SubBlockConditionClause, } from './catalog/types' +export { + type CodeFileBijection, + type CodeFileLanguage, + type CodeFileSyntaxError, + checkCodeFileBijection, + codeFileCodec, + codeFileLanguage, + type FromCodeFileResult, + fromCodeFile, + toCodeFile, +} from './code-files' +export { compileWorkflow } from './compile' export type { ApplyDiagnosticCode, CanonicalizeDiagnosticCode, From e13c273f692787ad02349bb57f0d2d24c63dc8b5 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:33:36 -0800 Subject: [PATCH 034/428] refactor(workflow-code): keep compiler helpers module-private --- packages/workflow-code/src/code-files/lexer.ts | 4 ++-- packages/workflow-code/src/compile/blocks.ts | 2 +- packages/workflow-code/src/compile/context.ts | 6 +++--- packages/workflow-code/src/compile/hints.ts | 2 +- packages/workflow-code/src/compile/parse.ts | 2 +- packages/workflow-code/src/compile/report.ts | 2 +- packages/workflow-code/src/compile/validate-catalog.ts | 2 +- packages/workflow-code/src/compile/values.ts | 10 +++------- 8 files changed, 13 insertions(+), 17 deletions(-) diff --git a/packages/workflow-code/src/code-files/lexer.ts b/packages/workflow-code/src/code-files/lexer.ts index 77ad67d08ae..b365ec28b18 100644 --- a/packages/workflow-code/src/code-files/lexer.ts +++ b/packages/workflow-code/src/code-files/lexer.ts @@ -10,7 +10,7 @@ * so comments are reported as their own context. */ -export type JsContext = 'code' | 'single' | 'double' | 'template' | 'regex' | 'comment' +type JsContext = 'code' | 'single' | 'double' | 'template' | 'regex' | 'comment' type ScanMode = | { type: 'normal' } @@ -63,7 +63,7 @@ function wordEndingAt(text: string, end: number): string { * A forward-only scanner over one code body. `contextAt` must be called with non-decreasing * offsets; each call resumes where the previous one stopped, so a pass over all tokens is linear. */ -export interface JsContextScanner { +interface JsContextScanner { contextAt(index: number): JsContext } diff --git a/packages/workflow-code/src/compile/blocks.ts b/packages/workflow-code/src/compile/blocks.ts index 1c5de763b02..2c1af947d87 100644 --- a/packages/workflow-code/src/compile/blocks.ts +++ b/packages/workflow-code/src/compile/blocks.ts @@ -40,7 +40,7 @@ import { type ValueSite, } from './values' -export interface CompiledBlock { +interface CompiledBlock { block: CanonicalBlock /** Param ids written under `meta.inactive`. */ inactive: SubBlockId[] diff --git a/packages/workflow-code/src/compile/context.ts b/packages/workflow-code/src/compile/context.ts index 5681fce8ee2..4ca0714662b 100644 --- a/packages/workflow-code/src/compile/context.ts +++ b/packages/workflow-code/src/compile/context.ts @@ -52,7 +52,7 @@ export interface BlockDecl { duplicate: boolean } -export type Binding = +type Binding = | { kind: 'block'; decl: BlockDecl } | { kind: 'loopParam'; container: BlockDecl } | { kind: 'sdk'; name: string } @@ -75,7 +75,7 @@ export interface WiringStatement { } /** An edge implied by an arrow-expression body: `(p) => block(...)` means `p.to(block)`. */ -export interface ImpliedEdge { +interface ImpliedEdge { container: BlockDecl child: BlockDecl body: ArrowFunctionExpression @@ -100,7 +100,7 @@ export interface CompileContext { } /** Anything with Babel-style offsets. */ -export interface Located { +interface Located { start?: number | null end?: number | null } diff --git a/packages/workflow-code/src/compile/hints.ts b/packages/workflow-code/src/compile/hints.ts index 39bec13886d..33fedb85799 100644 --- a/packages/workflow-code/src/compile/hints.ts +++ b/packages/workflow-code/src/compile/hints.ts @@ -128,7 +128,7 @@ function levenshtein(a: string, b: string, cap: number): number { * The closest candidate within a third of the word's length (at least 1, at most 3 edits), or * `null`. Ties keep the first candidate, so callers pass candidates in a stable order. */ -export function closest(word: string, candidates: Iterable): string | null { +function closest(word: string, candidates: Iterable): string | null { const cap = Math.min(3, Math.max(1, Math.floor(word.length / 3))) let best: string | null = null let bestDistance = cap + 1 diff --git a/packages/workflow-code/src/compile/parse.ts b/packages/workflow-code/src/compile/parse.ts index 253139217b5..0b34cc3f7a7 100644 --- a/packages/workflow-code/src/compile/parse.ts +++ b/packages/workflow-code/src/compile/parse.ts @@ -153,7 +153,7 @@ function babelMessage(error: BabelErrorShape): string { return message.replace(/ \(\d+:\d+\)$/, '') } -export interface ParsedSource { +interface ParsedSource { ast: File | null /** The header's major, or `null` when the first line is not `// @sim-sdk N`. */ sdkMajor: number | null diff --git a/packages/workflow-code/src/compile/report.ts b/packages/workflow-code/src/compile/report.ts index cce500bb329..2bc74cb8b35 100644 --- a/packages/workflow-code/src/compile/report.ts +++ b/packages/workflow-code/src/compile/report.ts @@ -36,7 +36,7 @@ export interface Range { end: number } -export interface ReportExtras { +interface ReportExtras { hint?: string blockKey?: BlockKey param?: SubBlockId diff --git a/packages/workflow-code/src/compile/validate-catalog.ts b/packages/workflow-code/src/compile/validate-catalog.ts index 1180cd389ba..b6aebe45207 100644 --- a/packages/workflow-code/src/compile/validate-catalog.ts +++ b/packages/workflow-code/src/compile/validate-catalog.ts @@ -102,7 +102,7 @@ function clauseMatches( * lib/workflows/subblocks/visibility.ts). An opaque function condition uses the projection's * per-operation answer, and counts as visible when there is none (s1 canonicalize step 9). */ -export function conditionHolds( +function conditionHolds( condition: CatalogCondition | undefined, values: ReadonlyMap, visibleFor: Record | undefined diff --git a/packages/workflow-code/src/compile/values.ts b/packages/workflow-code/src/compile/values.ts index 132d2f74b6d..ae7f91296e6 100644 --- a/packages/workflow-code/src/compile/values.ts +++ b/packages/workflow-code/src/compile/values.ts @@ -49,7 +49,7 @@ export interface ValueSite { * How a value was written, which picks the member of a basic/advanced pair (build-spec * decision 7) and decides whether `W_VALUE_KIND` applies (only to literals). */ -export type ValueForm = 'literal' | 'ref' | 'template' | 'resource' | 'picked' | 'upload' | 'raw' +type ValueForm = 'literal' | 'ref' | 'template' | 'resource' | 'picked' | 'upload' | 'raw' export type CompiledValue = | { kind: 'value'; value: Value; form: ValueForm } @@ -351,7 +351,7 @@ export function calleePath(node: Node): { root: string; rest: string[]; rootNode } /** The SDK export a call targets (`binding`, `slack.sendMessage`, ...), or `null`. */ -export function sdkCallPath(scope: Scope, call: CallExpression): string | null { +function sdkCallPath(scope: Scope, call: CallExpression): string | null { const path = calleePath(call.callee) if (!path) return null const binding = lookup(scope, path.root) @@ -439,11 +439,7 @@ function outputKnown(outputs: Record, segments: RefSegmen * "Ref mapping"): a block chain to ``, `vars.x` to ``, `env.X` to `{{X}}`, * a loop param to `` (innermost loop of its kind) or `` (named form). */ -export function compileRef( - ctx: CompileContext, - node: Node, - site: ValueSite -): string | VarNode | null { +function compileRef(ctx: CompileContext, node: Node, site: ValueSite): string | VarNode | null { const { root, members } = node.type === 'MemberExpression' ? flattenMembers(node) : { root: node, members: [] } if (root.type !== 'Identifier') return rejectNode(ctx, node, site) From aaebbe2fdad1ce21163f747cc4e2b2837bf5260f Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:36:24 -0800 Subject: [PATCH 035/428] chore(sim): drop the duplicate @sim/workflow-code dependency left by the wave 2 merges --- apps/sim/package.json | 1 - 1 file changed, 1 deletion(-) diff --git a/apps/sim/package.json b/apps/sim/package.json index 4294751a10c..709f6c26c1d 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -167,7 +167,6 @@ "@sim/workflow-code": "workspace:*", "@sim/workflow-persistence": "workspace:*", "@sim/workflow-renderer": "workspace:*", - "@sim/workflow-code": "workspace:*", "@sim/workflow-types": "workspace:*", "@smithy/node-http-handler": "4.14.1", "@t3-oss/env-nextjs": "0.13.11", From d49ccc2412d1922a2ee440981552a97685fa91ef Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:37:17 -0800 Subject: [PATCH 036/428] fix(workflow-code): read lock records with isRecordLike from @sim/utils --- packages/workflow-code/src/lock.ts | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/packages/workflow-code/src/lock.ts b/packages/workflow-code/src/lock.ts index e1ff836e4d9..e87280ca4c1 100644 --- a/packages/workflow-code/src/lock.ts +++ b/packages/workflow-code/src/lock.ts @@ -15,6 +15,7 @@ * every validator tolerates and preserves. Removing or changing the meaning of a field bumps it. */ +import { isRecordLike } from '@sim/utils/object' import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' import type { Diagnostic } from './diagnostics/frame' import type { BlockKey, BranchKey, Json, SubBlockId, VarKey } from './model' @@ -132,10 +133,6 @@ const ITEM_FIELDS = ['name', 'id'] type JsonObject = Record -function isObject(value: unknown): value is JsonObject { - return typeof value === 'object' && value !== null && !Array.isArray(value) -} - function isNonEmptyString(value: unknown): value is string { return typeof value === 'string' && value.length > 0 } @@ -152,7 +149,7 @@ function isJson(value: unknown): value is Json { if (value === null || typeof value === 'string' || typeof value === 'boolean') return true if (typeof value === 'number') return Number.isFinite(value) if (Array.isArray(value)) return value.every(isJson) - return isObject(value) && Object.values(value).every(isJson) + return isRecordLike(value) && Object.values(value).every(isJson) } /** RFC 6901: `~` → `~0`, `/` → `~1`. */ @@ -197,7 +194,7 @@ class LockReader { /** A string → non-empty-string record whose values are unique within it. */ idRecord(raw: unknown, at: readonly string[]): Record { - if (!isObject(raw)) { + if (!isRecordLike(raw)) { this.report('E_LOCK_SHAPE', at, 'Expected an object of id strings.') return {} } @@ -227,7 +224,7 @@ class LockReader { const items: LockItem[] = [] raw.forEach((entry: unknown, index) => { const itemAt = [...at, String(index)] - if (!isObject(entry)) { + if (!isRecordLike(entry)) { this.report('E_LOCK_SHAPE', itemAt, 'An item must be an object.') return } @@ -255,7 +252,7 @@ class LockReader { } layout(raw: unknown, at: readonly string[]): LockLayout | undefined { - if (!isObject(raw)) { + if (!isRecordLike(raw)) { this.report('E_LOCK_SHAPE', at, '"layout" must be an object.') return undefined } @@ -282,7 +279,7 @@ class LockReader { block(key: string, raw: unknown): WorkflowLockBlock | undefined { const at = ['blocks', key] - if (!isObject(raw)) { + if (!isRecordLike(raw)) { this.report('E_LOCK_SHAPE', at, 'A lock block must be an object.') return undefined } @@ -339,7 +336,7 @@ class LockReader { } if (raw.items !== undefined) { - if (isObject(raw.items)) { + if (isRecordLike(raw.items)) { block.items = Object.fromEntries( Object.entries(raw.items).map(([subBlockId, list]) => [ subBlockId, @@ -453,7 +450,7 @@ export function parseWorkflowLock(input: unknown): ParseWorkflowLockResult { return { diagnostics: reader.diagnostics } } } - if (!isObject(json)) { + if (!isRecordLike(json)) { reader.report('E_LOCK_SHAPE', [], 'The lock must be a JSON object.') return { diagnostics: reader.diagnostics } } @@ -464,7 +461,7 @@ export function parseWorkflowLock(input: unknown): ParseWorkflowLockResult { const extensions = reader.extensions(json, LOCK_FIELDS, []) const blockEntries: Array<[BlockKey, WorkflowLockBlock]> = [] - if (isObject(json.blocks)) { + if (isRecordLike(json.blocks)) { for (const [key, raw] of Object.entries(json.blocks)) { const block = reader.block(key, raw) if (block) blockEntries.push([key, block]) From f9490e4d07cfebe019ef434a9e5a4047c66482c6 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:38:20 -0800 Subject: [PATCH 037/428] refactor(workflow-code): one CodeFileCodec in code-files, and printWorkflow writes code files by default --- packages/workflow-code/src/index.ts | 7 +--- .../workflow-code/src/print/golden.test.ts | 26 ++++++++------- packages/workflow-code/src/print/index.ts | 7 +--- packages/workflow-code/src/print/printer.ts | 32 +++++++------------ 4 files changed, 28 insertions(+), 44 deletions(-) diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index a7c57b46285..7d63baf4054 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -138,10 +138,5 @@ export type { VarNode, WorkflowAnnotations, } from './model' -export { - type CodeFileCodec, - type CodeLanguage, - createPrintWorkflow, - printWorkflow, -} from './print' +export { createPrintWorkflow, printWorkflow } from './print' export { GENERIC_BUILDER, SDK_CORE_EXPORTS, SDK_RESERVED_IDENTIFIERS } from './sdk' diff --git a/packages/workflow-code/src/print/golden.test.ts b/packages/workflow-code/src/print/golden.test.ts index 57b550520f5..ebced2692c7 100644 --- a/packages/workflow-code/src/print/golden.test.ts +++ b/packages/workflow-code/src/print/golden.test.ts @@ -1,16 +1,11 @@ import { describe, expect, it } from 'vitest' +import { type CodeFileCodec, type CodeFileLanguage, codeFileCodec } from '../code-files' import { cases } from './__fixtures__/cases' import { catalog } from './__fixtures__/catalog' -import { type CodeFileCodec, createPrintWorkflow, printWorkflow } from './printer' +import { createPrintWorkflow, printWorkflow } from './printer' const GOLDEN_DIR = './__golden__' -/** A codec whose file form is the stored body itself, standing in for Wave 2D's bijection. */ -const identityCodec: CodeFileCodec = { - toFile: (code) => code, - fromFile: (text) => text, -} - /** A codec whose round trip adds a byte: the printer must fall back to inline code. */ const lossyCodec: CodeFileCodec = { toFile: (code) => code, @@ -51,10 +46,10 @@ describe('printWorkflow golden files', () => { ) }) - it('writes function code to language files when the codec round-trips it', async () => { + it('writes function code to language files through the code-files codec by default', async () => { const testCase = cases.find((c) => c.name === 'function-languages') if (!testCase) throw new Error('missing case') - const result = createPrintWorkflow(identityCodec)({ + const result = printWorkflow({ workflow: testCase.workflow, catalog, options: { functionCode: 'files', codeDir: 'functions' }, @@ -65,12 +60,19 @@ describe('printWorkflow golden files', () => { 'functions/py-code.py', 'functions/sh-code.sh', ]) + const functions: Array<[string, CodeFileLanguage]> = [ + ['jscode', 'javascript'], + ['pycode', 'python'], + ['shcode', 'shell'], + ] expect(result.files.slice(1).map((file) => file.text)).toEqual( - ['jscode', 'pycode', 'shcode'].map((key) => { + functions.map(([key, language]) => { const param = testCase.workflow.blocks[key]?.params.code - return param?.kind === 'value' ? param.value : null + if (param?.kind !== 'value' || typeof param.value !== 'string') return null + return codeFileCodec.toFile(param.value, language) }) ) + expect(result.files[1]?.text).toContain('$ref.start.total + $env.TAX_RATE') expect(result.hints.blocks.jscode?.codeFile).toBe('functions/js-code.js') expect(result.diagnostics.filter((d) => d.code === 'W_CODE_FILE_INLINED')).toEqual([]) await expect(result.files[0].text).toMatchFileSnapshot(`${GOLDEN_DIR}/function-files.txt`) @@ -84,7 +86,7 @@ describe('printWorkflow golden files', () => { catalog, options: { functionCode: 'inline' }, }) - for (const print of [createPrintWorkflow(lossyCodec), printWorkflow]) { + for (const print of [createPrintWorkflow(lossyCodec), createPrintWorkflow()]) { const result = print({ workflow: testCase.workflow, catalog, diff --git a/packages/workflow-code/src/print/index.ts b/packages/workflow-code/src/print/index.ts index 680575a713a..84140ea8edb 100644 --- a/packages/workflow-code/src/print/index.ts +++ b/packages/workflow-code/src/print/index.ts @@ -1,6 +1 @@ -export { - type CodeFileCodec, - type CodeLanguage, - createPrintWorkflow, - printWorkflow, -} from './printer' +export { createPrintWorkflow, printWorkflow } from './printer' diff --git a/packages/workflow-code/src/print/printer.ts b/packages/workflow-code/src/print/printer.ts index c4d6486edee..7c72022e9f4 100644 --- a/packages/workflow-code/src/print/printer.ts +++ b/packages/workflow-code/src/print/printer.ts @@ -9,6 +9,7 @@ import { compareStrings } from '@sim/utils/string' import { portKey } from '../anchors' import type { LockHintBlock, LockHints, PrintInput, PrintResult, PrintWorkflowFn } from '../api' import type { BlockCatalog, CatalogBlock, CatalogBuilder, CatalogSubBlock } from '../catalog/types' +import { type CodeFileCodec, type CodeFileLanguage, codeFileCodec } from '../code-files' import type { PrintDiagnosticCode } from '../diagnostics/codes' import type { Diagnostic } from '../diagnostics/frame' import type { @@ -33,26 +34,13 @@ import { printKey, printMember, quoteString } from './strings' import { arrayExpr, arrowExpr, callExpr, type Expr, objectExpr, type Property } from './syntax' import { type FieldContext, type PrintedValue, type Tag, ValuePrinter } from './values' -/** The function-code languages a code file can hold (`CodeLanguage`, lib/execution/languages.ts). */ -export type CodeLanguage = 'javascript' | 'python' | 'shell' - -/** - * The code-position token bijection owned by `src/code-files` (Wave 2D): `toFile` rewrites a stored - * body's code-position `` / `{{X}}` tokens to `$ref.a.b` / `$env.X`, `fromFile` reverses it. - * Either returns `null` when the body cannot be represented (build-spec decision 9). - */ -export interface CodeFileCodec { - toFile(code: string, language: CodeLanguage): string | null - fromFile(text: string, language: CodeLanguage): string | null -} - const DEFAULT_WIDTH = 100 const DEFAULT_CODE_DIR = 'functions' const ENTRY_PATH = 'workflow.ts' const SDK_MODULE = '@sim/workflow-sdk' -const LANGUAGE_TAGS: Record = { javascript: 'js', python: 'py', shell: 'sh' } -const LANGUAGE_EXTENSIONS: Record = { +const LANGUAGE_TAGS: Record = { javascript: 'js', python: 'py', shell: 'sh' } +const LANGUAGE_EXTENSIONS: Record = { javascript: 'js', python: 'py', shell: 'sh', @@ -60,7 +48,7 @@ const LANGUAGE_EXTENSIONS: Record = { type Diag = Diagnostic -function toLanguage(value: unknown): CodeLanguage | null { +function toLanguage(value: unknown): CodeFileLanguage | null { if (value === 'javascript' || value === 'js') return 'javascript' if (value === 'python' || value === 'py') return 'python' if (value === 'shell' || value === 'bash' || value === 'sh') return 'shell' @@ -454,7 +442,8 @@ class WorkflowPrinter { code: string, tag: 'js' | 'py' | 'sh' ): PrintedValue | null { - const language: CodeLanguage = tag === 'js' ? 'javascript' : tag === 'py' ? 'python' : 'shell' + const language: CodeFileLanguage = + tag === 'js' ? 'javascript' : tag === 'py' ? 'python' : 'shell' const inline = (reason: string): null => { this.diagnostics.push({ code: 'W_CODE_FILE_INLINED', @@ -1131,10 +1120,13 @@ function compareImportNames(a: string, b: string): number { return compareStrings(a, b) } -/** Creates a printer that writes function code to files through `codec` when given. */ +/** + * Creates a printer that writes function code to files through `codec`. Without a codec, files + * mode prints every function body inline with `W_CODE_FILE_INLINED`. + */ export function createPrintWorkflow(codec?: CodeFileCodec): PrintWorkflowFn { return (input) => new WorkflowPrinter(input, codec).print() } -/** Prints function code inline until the code-file codec is wired in (`createPrintWorkflow`). */ -export const printWorkflow: PrintWorkflowFn = createPrintWorkflow() +/** The printer with the code-files bijection (`codeFileCodec`), so files mode works as is. */ +export const printWorkflow: PrintWorkflowFn = createPrintWorkflow(codeFileCodec) From 556e35988ffe39e9b1795d11b4134367e4a3e2de Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:39:46 -0800 Subject: [PATCH 038/428] test(workflow-code): printer fixtures keep the cwm invariants, and the compiler round trip prints them directly --- .../src/compile/__printer__/cases.ts | 838 ------------------ .../src/compile/__printer__/catalog.ts | 299 ------- .../src/compile/__printer__/goldens.ts | 71 -- .../src/compile/printer-goldens.test.ts | 96 +- .../src/print/__fixtures__/cases.ts | 4 + 5 files changed, 39 insertions(+), 1269 deletions(-) delete mode 100644 packages/workflow-code/src/compile/__printer__/cases.ts delete mode 100644 packages/workflow-code/src/compile/__printer__/catalog.ts delete mode 100644 packages/workflow-code/src/compile/__printer__/goldens.ts diff --git a/packages/workflow-code/src/compile/__printer__/cases.ts b/packages/workflow-code/src/compile/__printer__/cases.ts deleted file mode 100644 index 7e323ece03f..00000000000 --- a/packages/workflow-code/src/compile/__printer__/cases.ts +++ /dev/null @@ -1,838 +0,0 @@ -/** - * Hand-built canonical workflows, one per printer construct (golden snapshots in `__golden__/`). - * Each case names the behavior it pins so a golden diff points at the construct that changed. - */ - -import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' -import { encodeAnchor } from '../../anchors' -import type { LockHints } from '../../api' -import type { - AnchorKey, - CanonicalBlock, - CanonicalEdge, - CanonicalParam, - CanonicalTool, - CanonicalVariable, - CanonicalWorkflow, - CodeComment, - Port, - Value, -} from '../../model' - -export interface PrintCase { - name: string - workflow: CanonicalWorkflow - hints?: LockHints -} - -type BlockInit = Partial> & { - params?: Record - tools?: Record -} - -function blk(name: string, type: string, init: BlockInit = {}): CanonicalBlock { - const { params = {}, tools = {}, ...rest } = init - const canonicalParams: Record = {} - for (const [id, value] of Object.entries(params)) canonicalParams[id] = { kind: 'value', value } - for (const [id, list] of Object.entries(tools)) - canonicalParams[id] = { kind: 'tools', tools: list } - return { - key: normalizeWorkflowBlockName(name), - name, - type, - parent: null, - enabled: true, - locked: false, - triggerMode: false, - advancedMode: false, - errorPort: false, - retry: null, - params: canonicalParams, - modes: {}, - ...rest, - } -} - -function edge(from: string, to: string, port: Port = { kind: 'out' }): CanonicalEdge { - return { from, port, to } -} - -interface WorkflowInit { - name?: string - description?: string | null - blocks: CanonicalBlock[] - edges?: CanonicalEdge[] - variables?: CanonicalVariable[] - inactive?: Record - comments?: Array<[AnchorKey, CodeComment[]]> -} - -function wf(init: WorkflowInit): CanonicalWorkflow { - return { - modelVersion: 1, - meta: { name: init.name ?? 'Fixture', description: init.description ?? null }, - blocks: Object.fromEntries(init.blocks.map((block) => [block.key, block])), - edges: init.edges ?? [], - variables: Object.fromEntries( - (init.variables ?? []).map((variable) => [variable.key, variable]) - ), - annotations: { - inactive: init.inactive ?? {}, - comments: Object.fromEntries(init.comments ?? []), - }, - } -} - -const line = (text: string, placement: 'leading' | 'trailing' = 'leading'): CodeComment => ({ - text: ` ${text}`, - kind: 'line', - placement, -}) - -const start = (name = 'Start', inputFormat: Value = []) => - blk(name, 'start_trigger', { params: { inputFormat } }) - -export const cases: PrintCase[] = [ - { - name: 'minimal-trigger', - workflow: wf({ name: 'Hello', blocks: [start()] }), - }, - { - name: 'support-triage', - workflow: wf({ - name: 'Support triage', - description: 'Classifies inbound tickets and routes them.', - variables: [{ key: 'escalations', name: 'escalations', type: 'number', value: 0 }], - blocks: [ - blk('Ticket in', 'webhook', { - params: { - requireAuth: true, - token: '{{TICKETS_WEBHOOK_TOKEN}}', - inputFormat: [ - { name: 'subject', type: 'string', value: '' }, - { name: 'body', type: 'string', value: '' }, - ], - }, - }), - blk('Classify', 'agent', { - params: { - model: 'claude-sonnet-5-5', - messages: [ - { role: 'system', content: 'Classify support tickets.' }, - { role: 'user', content: '\n\n' }, - ], - temperature: 0.2, - }, - }), - blk('By category', 'condition', { - branches: { - kind: 'condition', - rows: [ - { key: 'billing', value: " === 'billing'" }, - { - key: 'urgent', - value: '.includes("urgent") && < 3', - }, - { key: 'else', value: '' }, - ], - }, - }), - blk('Log ticket', 'table', { - params: { - operation: 'insert_row', - tableSelector: { $sim: 'resource', kind: 'table', key: 'tickets' }, - data: '{\n "subject": ""\n}', - }, - modes: { tableId: 'basic' }, - }), - blk('Notify', 'slack', { - params: { - operation: 'send', - authMethod: 'oauth', - credential: { $sim: 'resource', kind: 'credential', key: 'support-slack' }, - channel: 'C0SUPPORT', - text: 'New ticket: ', - }, - modes: { channel: 'basic' }, - errorPort: true, - }), - blk('Reply', 'response', { - params: { dataMode: 'structured', builderData: { ok: true } }, - }), - ], - edges: [ - edge('bycategory', 'logticket', { kind: 'branch', key: 'billing' }), - edge('bycategory', 'notify', { kind: 'branch', key: 'urgent' }), - edge('bycategory', 'reply', { kind: 'branch', key: 'else' }), - edge('classify', 'bycategory'), - edge('logticket', 'notify'), - edge('logticket', 'notify', { kind: 'error' }), - edge('notify', 'reply'), - edge('ticketin', 'classify'), - ], - }), - }, - { - name: 'string-escapes', - workflow: wf({ - blocks: [ - start(), - blk('Escapes', 'agent', { - params: { - model: "it's a \"model\" with 'quotes'", - systemPrompt: - 'back\\slash `tick` $\u007bnotInterp} tab\there\r\ncrlf line\u2028ls\u2029ps \ud800 lone 漢字 🎉', - messages: [{ role: 'user', content: "single 'quote' only" }], - }, - }), - ], - }), - }, - { - name: 'templates-and-paths', - workflow: wf({ - blocks: [ - start(), - blk('Writer', 'agent', { - params: { - model: 'gpt-5.5', - systemPrompt: 'Line one\nLine two without refs', - messages: [ - { - role: 'user', - content: - 'Items: / / / \nnext', - }, - ], - conversationId: '', - }, - }), - ], - edges: [edge('start', 'writer')], - }), - }, - { - name: 'unresolved-tokens', - workflow: wf({ - blocks: [ - start(), - blk('Html', 'agent', { - params: { - model: '{{ not valid }}', - systemPrompt: - '
hello
{{lower_ok}} ', - }, - }), - ], - edges: [edge('start', 'html')], - }), - }, - { - name: 'ref-cycle-literalized', - workflow: wf({ - blocks: [ - start(), - blk('Alpha', 'agent', { params: { model: 'm', systemPrompt: 'See ' } }), - blk('Beta', 'agent', { params: { model: 'm', systemPrompt: 'See ' } }), - blk('Self', 'agent', { params: { model: 'm', systemPrompt: 'Me: ' } }), - ], - edges: [edge('start', 'alpha'), edge('alpha', 'beta')], - }), - }, - { - name: 'loop-foreach', - workflow: wf({ - blocks: [ - start('Start', [{ name: 'leads', type: 'array', value: '' }]), - blk('Each lead', 'loop', { - subflow: { - kind: 'loop', - loopType: 'forEach', - iterations: 5, - forEachItems: '', - }, - }), - blk('Lookup', 'api', { - parent: 'eachlead', - params: { - url: 'https://crm.example.com/c/?i=', - method: 'GET', - }, - }), - blk('Score', 'function', { - parent: 'eachlead', - params: { language: 'javascript', code: 'return .score * 2' }, - }), - blk('Summary', 'agent', { - params: { model: 'm', systemPrompt: 'Results: and ' }, - }), - ], - edges: [ - edge('eachlead', 'lookup', { kind: 'subflowStart' }), - edge('eachlead', 'summary', { kind: 'subflowEnd' }), - edge('lookup', 'score'), - edge('start', 'eachlead'), - ], - }), - }, - { - name: 'nested-subflows', - workflow: wf({ - blocks: [ - start(), - blk('Outer', 'loop', { - subflow: { kind: 'loop', loopType: 'for', iterations: 3 }, - }), - blk('Fan', 'parallel', { - parent: 'outer', - subflow: { - kind: 'parallel', - parallelType: 'collection', - distribution: '', - batchSize: 5, - }, - }), - blk('Work', 'agent', { - parent: 'fan', - params: { - model: 'm', - systemPrompt: - 'loop parallel named fan ', - }, - }), - blk('Sibling', 'loop', { - subflow: { - kind: 'loop', - loopType: 'while', - iterations: 5, - whileCondition: ' < 3', - doWhileCondition: '', - }, - }), - blk('Inside sibling', 'agent', { - parent: 'sibling', - params: { model: 'm', systemPrompt: 'cannot see ' }, - }), - ], - edges: [ - edge('fan', 'work', { kind: 'subflowStart' }), - edge('outer', 'fan', { kind: 'subflowStart' }), - edge('outer', 'sibling', { kind: 'subflowEnd' }), - edge('sibling', 'insidesibling', { kind: 'subflowStart' }), - edge('start', 'outer'), - ], - }), - }, - { - name: 'parallel-untyped', - workflow: wf({ - blocks: [ - start(), - blk('Batch', 'parallel', { subflow: { kind: 'parallel', count: 4 } }), - blk('Ping', 'api', { parent: 'batch', params: { url: 'https://x.test/' } }), - ], - edges: [edge('batch', 'ping', { kind: 'subflowStart' }), edge('start', 'batch')], - }), - }, - { - name: 'branches-null-rows', - workflow: wf({ - blocks: [ - start(), - blk('Gate', 'condition', { branches: { kind: 'condition', rows: null } }), - blk('Pick', 'router', { - params: { context: 'ctx', model: 'm' }, - branches: { kind: 'router', rows: null }, - }), - blk('Yes', 'response', { params: { dataMode: 'structured' } }), - ], - edges: [ - edge('gate', 'pick', { kind: 'branch', key: 'if' }), - edge('pick', 'yes', { kind: 'branch', key: 'route0' }), - edge('start', 'gate'), - ], - }), - }, - { - name: 'branch-titles-and-extra', - workflow: wf({ - blocks: [ - start(), - blk('Check', 'condition', { - branches: { - kind: 'condition', - rows: [ - { key: 'big', value: ' > 100', titleOverride: 'Large amount' }, - { key: 'elseIf0', value: '', extra: { legacyFlag: true } }, - { key: 'else', value: 'true' }, - ], - }, - }), - blk('Done', 'response', {}), - ], - edges: [ - edge('check', 'done', { kind: 'branch', key: 'big' }), - edge('check', 'done', { kind: 'branch', key: 'else' }), - edge('check', 'done', { kind: 'branch', key: 'elseIf0' }), - edge('start', 'check'), - ], - }), - }, - { - name: 'router-routes', - workflow: wf({ - blocks: [ - start('Start', [ - { name: 'amount', type: 'number', value: '' }, - { name: 'reason', type: 'string', value: '' }, - ]), - blk('Triage', 'router', { - params: { context: ' for ', model: 'claude-sonnet-5-5' }, - branches: { - kind: 'router', - rows: [ - { key: 'small', value: 'Under $100, auto-approve' }, - { key: 'review', value: 'Needs a manager' }, - ], - }, - }), - blk('Approve', 'response', {}), - blk('Escalate', 'response', {}), - ], - edges: [ - edge('start', 'triage'), - edge('triage', 'approve', { kind: 'branch', key: 'small' }), - edge('triage', 'escalate', { kind: 'branch', key: 'review' }), - ], - }), - }, - { - name: 'pair-modes', - workflow: wf({ - blocks: [ - start(), - blk('Picked basic', 'slack', { - params: { operation: 'send', channel: 'C0ONE', text: 'a' }, - modes: { channel: 'basic' }, - }), - blk('Manual advanced', 'slack', { - params: { operation: 'send', manualChannel: '', text: 'b' }, - modes: { channel: 'advanced' }, - }), - blk('Basic holding text', 'slack', { - params: { operation: 'send', channel: '', text: 'c' }, - modes: { channel: 'basic' }, - }), - blk('Advanced empty', 'slack', { - params: { operation: 'send', text: 'd' }, - modes: { channel: 'advanced' }, - }), - blk('Both members', 'slack', { - params: { operation: 'send', channel: 'C0OLD', manualChannel: 'C0NEW', text: 'e' }, - modes: { channel: 'advanced' }, - }), - ], - }), - }, - { - name: 'resource-nodes', - workflow: wf({ - variables: [ - { key: 'retries', name: 'retries', type: 'number', value: 2 }, - { key: 'lastrun', name: 'Last Run', type: 'string', value: 'never' }, - ], - blocks: [ - start(), - blk('Query', 'table', { - params: { - operation: 'query_rows', - tableSelector: { $sim: 'unresolved', kind: 'table', id: 'tbl_deleted' }, - knowledgeBases: [ - { $sim: 'resource', kind: 'knowledge-base', key: 'docs' }, - { $sim: 'resource', kind: 'knowledge-base', key: 'faq' }, - ], - limit: { - $sim: 'csv', - items: [ - { $sim: 'resource', kind: 'knowledge-document', key: 'a' }, - { $sim: 'unresolved', kind: 'knowledge-document', id: 'doc_9' }, - ], - }, - data: { $sim: 'literal', value: { $sim: 'user data', n: 1 } }, - }, - modes: { tableId: 'basic' }, - }), - blk('Set vars', 'variables', { - params: { - variables: [ - { variable: { $sim: 'var', key: 'retries' }, value: '' }, - { variable: { $sim: 'var', key: 'lastrun' }, value: '' }, - ], - }, - }), - ], - edges: [edge('query', 'setvars'), edge('start', 'query')], - }), - }, - { - name: 'inactive-values', - workflow: wf({ - blocks: [ - start(), - blk('Remember', 'agent', { - params: { - model: 'm', - memoryType: 'none', - conversationId: 'stale-id', - legacyField: 'kept', - }, - }), - ], - inactive: { remember: ['conversationId'] }, - edges: [edge('start', 'remember')], - }), - }, - { - name: 'generic-block-unknown-type', - workflow: wf({ - blocks: [ - start(), - blk('Mystery', 'custom_block_acme', { - params: { zeta: 1, alpha: 'a ' }, - triggerMode: true, - modes: { someCid: 'advanced' }, - }), - ], - }), - }, - { - name: 'generic-block-legacy-operation', - workflow: wf({ - blocks: [ - start(), - blk('Old table op', 'table', { - params: { operation: 'delete_everything', limit: '10' }, - }), - ], - }), - }, - { - name: 'block-meta', - workflow: wf({ - blocks: [ - start(), - blk('Guarded', 'api', { - params: { url: 'https://a.test', method: 'POST' }, - enabled: false, - locked: true, - advancedMode: true, - errorPort: true, - retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 }, - opaque: { data: { canvasNote: 'x', width: 300 } }, - }), - blk('Flaky', 'api', { - params: { url: 'https://b.test' }, - errorPort: true, - }), - blk('Fallback', 'response', {}), - ], - edges: [ - edge('flaky', 'fallback', { kind: 'error' }), - edge('start', 'guarded'), - edge('start', 'flaky'), - ], - }), - }, - { - name: 'agent-tools', - workflow: wf({ - blocks: [ - start(), - blk('Assistant', 'agent', { - params: { model: 'claude-sonnet-5-5' }, - tools: { - tools: [ - { - type: 'slack', - operation: 'send', - params: { channel: 'C0OPS', text: 'Approve: ' }, - modes: { channel: 'basic' }, - usageControl: 'auto', - }, - { - type: 'custom-tool-type', - title: 'Lookup vendor', - params: { query: '' }, - modes: {}, - customTool: { - ref: { $sim: 'resource', kind: 'custom-tool', key: 'lookup-vendor' }, - }, - }, - ], - }, - }), - ], - edges: [edge('start', 'assistant')], - }), - }, - { - name: 'input-format-sugar', - workflow: wf({ - blocks: [ - start('Start', [ - { name: 'question', type: 'string', value: '' }, - { name: 'limit', type: 'number', value: 10, description: 'Max results', required: true }, - { name: 'tags', type: 'array' }, - ]), - blk('Hook', 'webhook', { - params: { - inputFormat: [ - { name: '1', type: 'string', value: '' }, - { name: 'id', type: 'string', value: '', extraKey: true }, - ], - }, - }), - ], - }), - }, - { - name: 'json-code-fields', - workflow: wf({ - blocks: [ - start(), - blk('Sugared', 'agent', { - params: { model: 'm', responseFormat: '{\n "name": "ticket",\n "strict": true\n}' }, - }), - blk('Compact', 'agent', { - params: { model: 'm', responseFormat: '{"name":"ticket"}' }, - }), - blk('Refs in json', 'api', { - params: { url: 'https://x.test', body: '{\n "q": \n}' }, - }), - ], - edges: [edge('start', 'sugared')], - }), - }, - { - name: 'function-languages', - workflow: wf({ - blocks: [ - start(), - blk('Js code', 'function', { - params: { - language: 'javascript', - code: 'const total = + {{TAX_RATE}}\n// keep `ticks` and $\u007bbraces}\nreturn total', - }, - }), - blk('Py code', 'function', { - params: { language: 'python', code: 'def main():\n return \n' }, - }), - blk('Sh code', 'function', { params: { language: 'shell', code: 'echo "{{HOME_DIR}}"' } }), - ], - edges: [edge('jscode', 'pycode'), edge('pycode', 'shcode'), edge('start', 'jscode')], - }), - }, - { - name: 'comments-at-anchors', - workflow: wf({ - blocks: [ - start(), - blk('Classify', 'agent', { params: { model: 'm', temperature: 0.5 } }), - blk('Done', 'response', {}), - ], - variables: [{ key: 'count', name: 'count', type: 'number', value: 1 }], - edges: [edge('classify', 'done'), edge('start', 'classify')], - comments: [ - [encodeAnchor({ kind: 'header' }), [line('Owned by the support team.')]], - [ - encodeAnchor({ kind: 'block', block: 'classify' }), - [line('Cheap model first.'), line('see runbook', 'trailing')], - ], - [ - encodeAnchor({ kind: 'param', block: 'classify', param: 'temperature' }), - [line('tuned 2026-10')], - ], - [ - encodeAnchor({ kind: 'param', block: 'classify', param: 'systemPrompt' }), - [line('param not printed')], - ], - [ - encodeAnchor({ kind: 'edges', block: 'classify', port: 'out' }), - [line('happy path', 'trailing')], - ], - [encodeAnchor({ kind: 'wiring' }), [line('Wiring')]], - [encodeAnchor({ kind: 'var', variable: 'count' }), [line('starts at one')]], - [encodeAnchor({ kind: 'block', block: 'deleted' }), [line('dropped')]], - [ - encodeAnchor({ kind: 'block', block: 'done' }), - [{ text: '*\n * Final reply.\n ', kind: 'block', placement: 'leading' }], - ], - [encodeAnchor({ kind: 'footer' }), [line('end of file')]], - ], - }), - }, - { - name: 'identifier-collisions', - workflow: wf({ - blocks: [ - start(), - blk('Default', 'api', { params: { url: 'https://a.test' } }), - blk('Table', 'api', { params: { url: 'https://b.test' } }), - blk('Workflow', 'api', { params: { url: 'https://c.test' } }), - blk('Slack', 'api', { params: { url: 'https://d.test' } }), - blk('Send Email', 'api', { params: { url: 'https://e.test' } }), - blk('send-email', 'api', { params: { url: 'https://f.test' } }), - blk('1st step', 'api', { params: { url: 'https://g.test' } }), - blk('日本語', 'api', { params: { url: 'https://h.test' } }), - blk('Hinted', 'api', { params: { url: 'https://i.test ' } }), - blk('Bad hint', 'api', { params: { url: 'https://j.test' } }), - ], - }), - hints: { blocks: { hinted: { binding: 'myHinted' }, badhint: { binding: 'class' } } }, - }, - { - name: 'lock-order', - workflow: wf({ - blocks: [ - blk('Zeta', 'api', { params: { url: 'https://z.test' } }), - blk('Alpha', 'api', { params: { url: 'https://a.test' } }), - blk('Mid', 'api', { params: { url: 'https://m.test ' } }), - start(), - ], - edges: [edge('start', 'zeta')], - }), - hints: { blocks: { zeta: { order: 0 }, mid: { order: 1 }, alpha: { order: 2 } } }, - }, - { - name: 'raw-and-odd-edges', - workflow: wf({ - blocks: [ - start(), - blk('Gate', 'condition', { - branches: { - kind: 'condition', - rows: [ - { key: 'if', value: 'true' }, - { key: 'else', value: '' }, - ], - }, - }), - blk('A', 'api', { params: { url: 'https://a.test' } }), - blk('B', 'api', { params: { url: 'https://b.test' } }), - ], - edges: [ - edge('a', 'b', { kind: 'raw', handle: 'right-legacy' }), - edge('gate', 'a', { kind: 'out' }), - edge('gate', 'b', { kind: 'branch', key: 'if' }), - edge('start', 'gate'), - ], - }), - }, - { - name: 'fan-out-wrapping', - workflow: wf({ - blocks: [ - start(), - ...[ - 'Enrich company profile', - 'Enrich contact details', - 'Score lead quality', - 'Notify sales channel', - 'Archive raw payload', - ].map((name) => blk(name, 'api', { params: { url: 'https://x.test' } })), - ], - edges: [ - 'enrichcompanyprofile', - 'enrichcontactdetails', - 'scoreleadquality', - 'notifysaleschannel', - 'archiverawpayload', - ].map((to) => edge('start', to)), - }), - }, - { - name: 'legacy-dropdown-and-todo', - workflow: wf({ - blocks: [ - start(), - blk('Legacy method', 'api', { params: { method: 'PATCH' } }), - blk('Drafted', 'agent', { params: {} }), - ], - }), - }, - { - name: 'layout-widths', - workflow: wf({ - blocks: [ - start(), - blk('Widths', 'api', { - params: { - url: 'https://example.com/a/very/long/path/that/keeps/going/and/going/until/it/overflows/the/line', - headers: [ - { key: 'Authorization', value: 'Bearer {{API_TOKEN}}' }, - { key: 'Accept', value: 'application/json' }, - ], - method: 'GET', - }, - }), - blk('Numbers', 'agent', { - params: { - model: 'm', - temperature: 1e21, - messages: [ - 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, - 25, 26, 27, 28, 29, 30, -0.5, - ], - }, - }), - blk('Short key', 'slack', { - params: { - operation: 'send', - text: 'a very long message body that will never fit on the same line as its very short key', - }, - }), - ], - }), - }, - { - name: 'trigger-mode-builders', - workflow: wf({ - blocks: [ - blk('Invoice email', 'gmail', { - triggerMode: true, - params: { - selectedTriggerId: 'gmail_poller', - credential: { $sim: 'resource', kind: 'credential', key: 'finance-gmail' }, - labelIds: ['INBOX'], - markAsRead: true, - }, - }), - blk('Send summary', 'gmail', { - params: { - operation: 'send_gmail', - credential: { $sim: 'resource', kind: 'credential', key: 'finance-gmail' }, - to: 'cfo@acme.test', - subject: 'Invoices', - body: '', - }, - }), - blk('Odd trigger', 'gmail', { - triggerMode: true, - params: { selectedTriggerId: 'gmail_other', markAsRead: false }, - }), - ], - edges: [edge('invoiceemail', 'sendsummary')], - }), - }, - { - name: 'note-markdown', - workflow: wf({ - blocks: [ - start(), - blk('How this works', 'note', { - params: { content: 'Polls **INBOX**;\nappends to the `finance` sheet.' }, - }), - ], - }), - }, -] diff --git a/packages/workflow-code/src/compile/__printer__/catalog.ts b/packages/workflow-code/src/compile/__printer__/catalog.ts deleted file mode 100644 index d17d4507eba..00000000000 --- a/packages/workflow-code/src/compile/__printer__/catalog.ts +++ /dev/null @@ -1,299 +0,0 @@ -/** - * A small hand-built catalog covering every construct the printer handles: triggers, an operation - * namespace, basic/advanced pairs, selectors, code fields, branches, tools, containers, a note and - * a trigger-mode builder. Shapes follow `catalog/types.ts`; values are illustrative only. - */ - -import type { - BlockCatalog, - CatalogBlock, - CatalogSubBlock, - CatalogValueKind, -} from '../../catalog/types' - -type SubBlockInit = Partial & Pick - -function sb(init: SubBlockInit & { valueKind?: CatalogValueKind }): CatalogSubBlock { - return { valueKind: 'string', storage: 'native', ...init } -} - -function block( - type: string, - subBlocks: CatalogSubBlock[], - extra: Partial = {} -): CatalogBlock { - return { - type, - name: type, - category: 'blocks', - subBlocks, - tools: { access: [], selector: 'single' }, - inputs: {}, - outputs: {}, - graph: { canBeTarget: true, errorPort: true, container: null, annotationOnly: false }, - ...extra, - } -} - -const trigger = (type: string, subBlocks: CatalogSubBlock[]) => - block(type, subBlocks, { - category: 'triggers', - graph: { canBeTarget: false, errorPort: false, container: null, annotationOnly: false }, - }) - -export const catalog: BlockCatalog = { - catalogVersion: 1, - hash: 'fixture', - sdkMajor: 1, - blocks: { - start_trigger: trigger('start_trigger', [ - sb({ - id: 'inputFormat', - type: 'input-format', - valueKind: 'array', - structured: 'inputFormat', - }), - ]), - webhook: trigger('webhook', [ - sb({ id: 'requireAuth', type: 'switch', valueKind: 'boolean' }), - sb({ id: 'token', type: 'short-input', password: true }), - sb({ - id: 'inputFormat', - type: 'input-format', - valueKind: 'array', - structured: 'inputFormat', - }), - ]), - agent: block('agent', [ - sb({ id: 'model', type: 'combobox', required: true }), - sb({ id: 'messages', type: 'messages-input', valueKind: 'array' }), - sb({ id: 'systemPrompt', type: 'long-input' }), - sb({ id: 'responseFormat', type: 'code', valueKind: 'code', language: 'json' }), - sb({ id: 'tools', type: 'tool-input', valueKind: 'tools', structured: 'tools' }), - sb({ id: 'temperature', type: 'slider', valueKind: 'number', min: 0, max: 2 }), - sb({ - id: 'memoryType', - type: 'dropdown', - options: [ - { id: 'none', label: 'None' }, - { id: 'conversation', label: 'Conversation' }, - ], - }), - sb({ - id: 'conversationId', - type: 'short-input', - condition: { field: 'memoryType', value: 'conversation' }, - }), - ]), - slack: block('slack', [ - sb({ - id: 'operation', - type: 'dropdown', - options: [ - { id: 'send', label: 'Send Message' }, - { id: 'read', label: 'Read Messages' }, - ], - }), - sb({ - id: 'authMethod', - type: 'dropdown', - options: [ - { id: 'oauth', label: 'OAuth' }, - { id: 'bot_token', label: 'Bot token' }, - ], - }), - sb({ - id: 'credential', - type: 'oauth-input', - valueKind: 'resource', - resourceKind: 'credential', - }), - sb({ id: 'botToken', type: 'short-input', password: true }), - sb({ - id: 'channel', - type: 'channel-selector', - valueKind: 'picked', - mode: 'basic', - canonicalParamId: 'channel', - }), - sb({ - id: 'manualChannel', - type: 'short-input', - mode: 'advanced', - canonicalParamId: 'channel', - }), - sb({ id: 'text', type: 'long-input', required: true }), - sb({ id: 'limit', type: 'short-input', condition: { field: 'operation', value: 'read' } }), - ]), - function: block('function', [ - sb({ - id: 'language', - type: 'dropdown', - options: [ - { id: 'javascript', label: 'JavaScript' }, - { id: 'python', label: 'Python' }, - { id: 'shell', label: 'Shell' }, - ], - }), - sb({ id: 'code', type: 'code', valueKind: 'code', language: 'javascript' }), - ]), - condition: block( - 'condition', - [ - sb({ - id: 'conditions', - type: 'condition-input', - valueKind: 'branches', - structured: 'branches', - }), - ], - { - graph: { - canBeTarget: true, - errorPort: false, - container: null, - annotationOnly: false, - branches: { subBlockId: 'conditions', kind: 'condition' }, - }, - } - ), - router: block( - 'router', - [ - sb({ id: 'context', type: 'long-input' }), - sb({ id: 'model', type: 'combobox' }), - sb({ id: 'routes', type: 'router-input', valueKind: 'branches', structured: 'branches' }), - ], - { - graph: { - canBeTarget: true, - errorPort: false, - container: null, - annotationOnly: false, - branches: { subBlockId: 'routes', kind: 'router' }, - }, - } - ), - table: block('table', [ - sb({ - id: 'operation', - type: 'dropdown', - options: [ - { id: 'insert_row', label: 'Insert Row' }, - { id: 'query_rows', label: 'Query Rows' }, - ], - }), - sb({ - id: 'tableSelector', - type: 'table-selector', - valueKind: 'resource', - resourceKind: 'table', - mode: 'basic', - canonicalParamId: 'tableId', - }), - sb({ - id: 'manualTableId', - type: 'short-input', - mode: 'advanced', - canonicalParamId: 'tableId', - }), - sb({ id: 'data', type: 'code', valueKind: 'code', language: 'json' }), - sb({ id: 'limit', type: 'short-input' }), - sb({ - id: 'knowledgeBases', - type: 'knowledge-base-selector', - valueKind: 'resource', - resourceKind: 'knowledge-base', - multiple: true, - }), - ]), - note: block('note', [sb({ id: 'content', type: 'long-input' })], { - graph: { canBeTarget: false, errorPort: false, container: null, annotationOnly: true }, - }), - variables: block('variables', [ - sb({ id: 'variables', type: 'variables-input', valueKind: 'array', structured: 'variables' }), - ]), - api: block('api', [ - sb({ id: 'url', type: 'short-input', required: true }), - sb({ - id: 'method', - type: 'dropdown', - options: [ - { id: 'GET', label: 'GET' }, - { id: 'POST', label: 'POST' }, - ], - }), - sb({ id: 'headers', type: 'table', valueKind: 'array' }), - sb({ id: 'body', type: 'code', valueKind: 'code', language: 'json' }), - ]), - gmail: block( - 'gmail', - [ - sb({ - id: 'operation', - type: 'dropdown', - surface: 'action', - options: [{ id: 'send_gmail', label: 'Send Email' }], - }), - sb({ - id: 'credential', - type: 'oauth-input', - valueKind: 'resource', - resourceKind: 'credential', - }), - sb({ id: 'to', type: 'short-input', surface: 'action' }), - sb({ id: 'subject', type: 'short-input', surface: 'action' }), - sb({ id: 'body', type: 'long-input', surface: 'action' }), - sb({ id: 'selectedTriggerId', type: 'dropdown', surface: 'trigger', mode: 'trigger' }), - sb({ - id: 'labelIds', - type: 'dropdown', - surface: 'trigger', - mode: 'trigger', - multiple: true, - }), - sb({ - id: 'markAsRead', - type: 'switch', - valueKind: 'boolean', - surface: 'trigger', - mode: 'trigger', - }), - ], - { triggerAllowed: true } - ), - response: block('response', [ - sb({ id: 'dataMode', type: 'dropdown', options: [{ id: 'structured', label: 'Builder' }] }), - sb({ id: 'builderData', type: 'response-format', valueKind: 'object' }), - ]), - loop: block('loop', [], { - graph: { canBeTarget: true, errorPort: false, container: 'loop', annotationOnly: false }, - }), - parallel: block('parallel', [], { - graph: { canBeTarget: true, errorPort: false, container: 'parallel', annotationOnly: false }, - }), - }, - triggers: {}, - builders: { - 'trigger.start': { type: 'start_trigger' }, - 'trigger.webhook': { type: 'webhook' }, - agent: { type: 'agent' }, - 'slack.sendMessage': { type: 'slack', operation: 'send' }, - 'slack.readMessages': { type: 'slack', operation: 'read' }, - fn: { type: 'function' }, - condition: { type: 'condition' }, - router: { type: 'router' }, - 'table.insertRow': { type: 'table', operation: 'insert_row' }, - 'table.queryRows': { type: 'table', operation: 'query_rows' }, - note: { type: 'note' }, - setVariables: { type: 'variables' }, - api: { type: 'api' }, - 'gmail.sendEmail': { type: 'gmail', operation: 'send_gmail' }, - 'trigger.gmail.poller': { - type: 'gmail', - triggerMode: true, - fixed: { selectedTriggerId: 'gmail_poller' }, - }, - response: { type: 'response' }, - }, -} diff --git a/packages/workflow-code/src/compile/__printer__/goldens.ts b/packages/workflow-code/src/compile/__printer__/goldens.ts deleted file mode 100644 index 12b3a5cc6d3..00000000000 --- a/packages/workflow-code/src/compile/__printer__/goldens.ts +++ /dev/null @@ -1,71 +0,0 @@ -/** - * The printer's golden prints (Wave 2C, `src/print/__golden__/*.txt` at f3a46899eb), embedded so - * the compiler can prove it accepts exactly what the printer emits. Regenerate when the printer's - * goldens change; never edit by hand. - */ -export const PRINTER_GOLDENS: Record = { - 'agent-tools': - "// @sim-sdk 1\nimport { agent, picked, raw, slack, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const assistant = agent('Assistant', {\n model: 'claude-sonnet-5-5',\n tools: [\n slack.tool.sendMessage(\n { channel: picked('C0OPS'), text: t`Approve: ${start.input}` },\n { usageControl: 'auto', modes: { channel: 'basic' } }\n ),\n raw({\n type: 'custom-tool-type',\n title: 'Lookup vendor',\n params: { query: '' },\n modes: {},\n customTool: { ref: { $sim: 'resource', kind: 'custom-tool', key: 'lookup-vendor' } },\n }),\n ],\n })\n\n start.to(assistant)\n})\n", - 'block-meta': - "// @sim-sdk 1\nimport { api, response, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const flaky = api('Flaky', { url: 'https://b.test' })\n const fallback = response('Fallback', {})\n const guarded = api(\n 'Guarded',\n { url: 'https://a.test', method: 'POST' },\n {\n disabled: true,\n locked: true,\n advancedMode: true,\n errorPort: true,\n retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 },\n $unknown: { canvasNote: 'x', width: 300 },\n }\n )\n\n start.to(flaky, guarded)\n flaky.onError(fallback)\n})\n", - 'branch-titles-and-extra': - "// @sim-sdk 1\nimport { condition, js, response, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const check = condition(\n 'Check',\n { big: js`${start.amount} > 100`, elseIf0: js``, else: js`true` },\n { branches: { big: { title: 'Large amount' }, elseIf0: { extra: { legacyFlag: true } } } }\n )\n const done = response('Done', {})\n\n start.to(check)\n check.big.to(done)\n check.elseIf0.to(done)\n check.else.to(done)\n})\n", - 'branches-null-rows': - "// @sim-sdk 1\nimport { condition, response, router, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const gate = condition('Gate', {})\n const pick = router('Pick', { context: 'ctx', model: 'm', routes: {} })\n const yes = response('Yes', { dataMode: 'structured' })\n\n start.to(gate)\n gate.if.to(pick)\n pick.route0.to(yes)\n})\n", - 'comments-at-anchors': - "// @sim-sdk 1\n// Owned by the support team.\nimport { agent, response, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow(\n 'Fixture',\n {\n variables: {\n // starts at one\n count: { type: 'number', value: 1 },\n },\n },\n () => {\n const start = trigger.start('Start', { inputFormat: [] })\n // Cheap model first.\n // param not printed\n const classify = agent('Classify', {\n model: 'm',\n // tuned 2026-10\n temperature: 0.5,\n }) // see runbook\n /**\n * Final reply.\n */\n const done = response('Done', {})\n\n // Wiring\n start.to(classify)\n classify.to(done) // happy path\n }\n)\n// end of file\n", - 'fan-out-wrapping': - "// @sim-sdk 1\nimport { api, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const archiveRawPayload = api('Archive raw payload', { url: 'https://x.test' })\n const enrichCompanyProfile = api('Enrich company profile', { url: 'https://x.test' })\n const enrichContactDetails = api('Enrich contact details', { url: 'https://x.test' })\n const notifySalesChannel = api('Notify sales channel', { url: 'https://x.test' })\n const scoreLeadQuality = api('Score lead quality', { url: 'https://x.test' })\n\n start.to(\n archiveRawPayload,\n enrichCompanyProfile,\n enrichContactDetails,\n notifySalesChannel,\n scoreLeadQuality\n )\n})\n", - 'function-files': - "// @sim-sdk 1\nimport { file, fn, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const jsCode = fn('Js code', { language: 'javascript', code: file('./functions/js-code.js') })\n const pyCode = fn('Py code', { language: 'python', code: file('./functions/py-code.py') })\n const shCode = fn('Sh code', { language: 'shell', code: file('./functions/sh-code.sh') })\n\n start.to(jsCode)\n jsCode.to(pyCode)\n pyCode.to(shCode)\n})\n", - 'function-languages': - "// @sim-sdk 1\nimport { env, fn, js, py, sh, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const jsCode = fn('Js code', {\n language: 'javascript',\n code: js`const total = ${start.total} + ${env.TAX_RATE}\n// keep \\`ticks\\` and \\${braces}\nreturn total`,\n })\n const pyCode = fn('Py code', {\n language: 'python',\n code: py`def main():\n return ${start.total}\n`,\n })\n const shCode = fn('Sh code', { language: 'shell', code: sh`echo \"${env.HOME_DIR}\"` })\n\n start.to(jsCode)\n jsCode.to(pyCode)\n pyCode.to(shCode)\n})\n", - 'generic-block-legacy-operation': - "// @sim-sdk 1\nimport { block, raw, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const oldTableOp = block('table', 'Old table op', {\n operation: raw('delete_everything'),\n limit: '10',\n })\n})\n", - 'generic-block-unknown-type': - "// @sim-sdk 1\nimport { block, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const mystery = block(\n 'custom_block_acme',\n 'Mystery',\n { alpha: t`a ${start.input}`, zeta: 1 },\n { triggerMode: true, modes: { someCid: 'advanced' } }\n )\n})\n", - 'identifier-collisions': - "// @sim-sdk 1\nimport { api, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const _1stStep = api('1st step', { url: 'https://g.test' })\n const badHint = api('Bad hint', { url: 'https://j.test' })\n const default2 = api('Default', { url: 'https://a.test' })\n const myHinted = api('Hinted', { url: t`https://i.test ${default2.data}` })\n const sendEmail = api('send-email', { url: 'https://f.test' })\n const sendEmail2 = api('Send Email', { url: 'https://e.test' })\n const slack2 = api('Slack', { url: 'https://d.test' })\n const table2 = api('Table', { url: 'https://b.test' })\n const workflow2 = api('Workflow', { url: 'https://c.test' })\n const block2 = api('\u65e5\u672c\u8a9e', { url: 'https://h.test' })\n})\n", - 'inactive-values': - "// @sim-sdk 1\nimport { agent, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const remember = agent(\n 'Remember',\n { model: 'm', memoryType: 'none' },\n { inactive: { conversationId: 'stale-id', legacyField: 'kept' } }\n )\n\n start.to(remember)\n})\n", - 'input-format-sugar': - "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const hook = trigger.webhook('Hook', {\n inputFormat: [\n { name: '1', type: 'string', value: '' },\n { name: 'id', type: 'string', value: '', extraKey: true },\n ],\n })\n const start = trigger.start('Start', {\n inputFormat: {\n question: 'string',\n limit: { type: 'number', value: 10, description: 'Max results', required: true },\n tags: { type: 'array' },\n },\n })\n})\n", - 'json-code-fields': - "// @sim-sdk 1\nimport { agent, api, json, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const compact = agent('Compact', { model: 'm', responseFormat: json`{\"name\":\"ticket\"}` })\n const refsInJson = api('Refs in json', {\n url: 'https://x.test',\n body: json`{\n \"q\": ${start.input}\n}`,\n })\n const sugared = agent('Sugared', { model: 'm', responseFormat: { name: 'ticket', strict: true } })\n\n start.to(sugared)\n})\n", - 'layout-widths': - "// @sim-sdk 1\nimport { agent, api, env, slack, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const numbers = agent('Numbers', {\n model: 'm',\n messages: [\n 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26,\n 27, 28, 29, 30, -0.5,\n ],\n temperature: 1e21,\n })\n const shortKey = slack.sendMessage('Short key', {\n text: 'a very long message body that will never fit on the same line as its very short key',\n })\n const widths = api('Widths', {\n url: 'https://example.com/a/very/long/path/that/keeps/going/and/going/until/it/overflows/the/line',\n method: 'GET',\n headers: [\n { key: 'Authorization', value: t`Bearer ${env.API_TOKEN}` },\n { key: 'Accept', value: 'application/json' },\n ],\n })\n})\n", - 'legacy-dropdown-and-todo': - "// @sim-sdk 1\nimport { agent, api, raw, todo, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const drafted = agent('Drafted', { model: todo() })\n const legacyMethod = api('Legacy method', { url: todo(), method: raw('PATCH') })\n})\n", - 'lock-order': - "// @sim-sdk 1\nimport { api, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const zeta = api('Zeta', { url: 'https://z.test' })\n const alpha = api('Alpha', { url: 'https://a.test' })\n const mid = api('Mid', { url: t`https://m.test ${alpha.data}` })\n\n start.to(zeta)\n})\n", - 'loop-foreach': - "// @sim-sdk 1\nimport { agent, api, fn, js, loop, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: { leads: 'array' } })\n const eachLead = loop.forEach(\n 'Each lead',\n { collection: start.leads },\n (p) => {\n const lookup = api('Lookup', {\n url: t`https://crm.example.com/c/${p.currentItem.email}?i=${p.index}`,\n method: 'GET',\n })\n const score = fn('Score', {\n language: 'javascript',\n code: js`return ${lookup.data}.score * 2`,\n })\n\n p.to(lookup)\n lookup.to(score)\n },\n { inactive: { iterations: 5 } }\n )\n const summary = agent('Summary', {\n model: 'm',\n systemPrompt: t`Results: ${eachLead.results} and `,\n })\n\n start.to(eachLead)\n eachLead.to(summary)\n})\n", - 'minimal-trigger': - "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Hello', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n})\n", - 'nested-subflows': - "// @sim-sdk 1\nimport { agent, js, loop, parallel, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const outer = loop.for('Outer', { count: 3 }, (p) => {\n const fan = parallel.collection('Fan', { collection: start.rows, batchSize: 5 }, (p2) => {\n const work = agent('Work', {\n model: 'm',\n systemPrompt: t`loop ${p.index} parallel ${p2.currentItem} named ${outer.index} fan ${fan.index}`,\n })\n\n p2.to(work)\n })\n\n p.to(fan)\n })\n const sibling = loop.while(\n 'Sibling',\n { condition: js` < 3` },\n (p) => {\n const insideSibling = agent('Inside sibling', {\n model: 'm',\n systemPrompt: 'cannot see ',\n })\n\n p.to(insideSibling)\n },\n { inactive: { iterations: 5, doWhileCondition: js`` } }\n )\n\n start.to(outer)\n outer.to(sibling)\n})\n", - 'note-markdown': - "// @sim-sdk 1\nimport { md, note, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const howThisWorks = note('How this works', {\n content: md`Polls **INBOX**;\nappends to the \\`finance\\` sheet.`,\n })\n})\n", - 'pair-modes': - "// @sim-sdk 1\nimport { picked, slack, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const advancedEmpty = slack.sendMessage(\n 'Advanced empty',\n { text: 'd' },\n { modes: { channel: 'advanced' } }\n )\n const basicHoldingText = slack.sendMessage(\n 'Basic holding text',\n { channel: start.channel, text: 'c' },\n { modes: { channel: 'basic' } }\n )\n const bothMembers = slack.sendMessage(\n 'Both members',\n { channel: 'C0NEW', text: 'e' },\n { inactive: { channel: picked('C0OLD') } }\n )\n const manualAdvanced = slack.sendMessage('Manual advanced', { channel: start.channel, text: 'b' })\n const pickedBasic = slack.sendMessage('Picked basic', { channel: picked('C0ONE'), text: 'a' })\n})\n", - 'parallel-untyped': - "// @sim-sdk 1\nimport { api, parallel, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const batch = parallel('Batch', { count: 4 }, (p) => {\n const ping = api('Ping', { url: t`https://x.test/${p.index}` })\n\n p.to(ping)\n })\n\n start.to(batch)\n})\n", - 'raw-and-odd-edges': - "// @sim-sdk 1\nimport { api, condition, edge, js, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const gate = condition('Gate', { if: js`true`, else: true })\n const a = api('A', { url: 'https://a.test' })\n const b = api('B', { url: 'https://b.test' })\n\n start.to(gate)\n edge(gate, 'source', a)\n gate.if.to(b)\n edge(a, 'right-legacy', b)\n})\n", - 'ref-cycle-literalized': - "// @sim-sdk 1\nimport { agent, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const self = agent('Self', { model: 'm', systemPrompt: 'Me: ' })\n const alpha = agent('Alpha', { model: 'm', systemPrompt: 'See ' })\n const beta = agent('Beta', { model: 'm', systemPrompt: t`See ${alpha.content}` })\n\n start.to(alpha)\n alpha.to(beta)\n})\n", - 'resource-nodes': - "// @sim-sdk 1\nimport { kb, raw, setVariables, t, table, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow(\n 'Fixture',\n {\n variables: {\n lastrun: { name: 'Last Run', type: 'string', value: 'never' },\n retries: { type: 'number', value: 2 },\n },\n },\n ({ vars }) => {\n const start = trigger.start('Start', { inputFormat: [] })\n const query = table.queryRows(\n 'Query',\n {\n tableId: raw({ $sim: 'unresolved', kind: 'table', id: 'tbl_deleted' }),\n data: raw({ $sim: 'literal', value: { $sim: 'user data', n: 1 } }),\n limit: raw({\n $sim: 'csv',\n items: [\n { $sim: 'resource', kind: 'knowledge-document', key: 'a' },\n { $sim: 'unresolved', kind: 'knowledge-document', id: 'doc_9' },\n ],\n }),\n knowledgeBases: [kb('docs'), kb('faq')],\n },\n { modes: { tableId: 'basic' } }\n )\n const setVars = setVariables('Set vars', {\n variables: [\n { variable: vars.retries, value: t`${vars.retries}` },\n { variable: vars.lastrun, value: t`${query.rows}` },\n ],\n })\n\n start.to(query)\n query.to(setVars)\n }\n)\n", - 'router-routes': - "// @sim-sdk 1\nimport { response, router, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: { amount: 'number', reason: 'string' } })\n const triage = router('Triage', {\n context: t`${start.amount} for ${start.reason}`,\n model: 'claude-sonnet-5-5',\n routes: { small: 'Under $100, auto-approve', review: 'Needs a manager' },\n })\n const approve = response('Approve', {})\n const escalate = response('Escalate', {})\n\n start.to(triage)\n triage.small.to(approve)\n triage.review.to(escalate)\n})\n", - 'string-escapes': - "// @sim-sdk 1\nimport { agent, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const escapes = agent('Escapes', {\n model: \"it's a \\\"model\\\" with 'quotes'\",\n messages: [{ role: 'user', content: \"single 'quote' only\" }],\n systemPrompt: `back\\\\slash \\`tick\\` \\${notInterp} tab\there\\r\ncrlf line\\u2028ls\\u2029ps \\uD800 lone \u6f22\u5b57 \ud83c\udf89`,\n })\n})\n", - 'support-triage': - "// @sim-sdk 1\nimport {\n agent,\n binding,\n condition,\n env,\n js,\n json,\n picked,\n response,\n slack,\n t,\n table,\n trigger,\n workflow,\n} from '@sim/workflow-sdk'\n\nexport default workflow(\n 'Support triage',\n {\n description: 'Classifies inbound tickets and routes them.',\n variables: { escalations: { type: 'number', value: 0 } },\n },\n ({ vars }) => {\n const ticketIn = trigger.webhook('Ticket in', {\n requireAuth: true,\n token: env.TICKETS_WEBHOOK_TOKEN,\n inputFormat: { subject: 'string', body: 'string' },\n })\n const classify = agent('Classify', {\n model: 'claude-sonnet-5-5',\n messages: [\n { role: 'system', content: 'Classify support tickets.' },\n {\n role: 'user',\n content: t`${ticketIn.subject}\n\n${ticketIn.body}`,\n },\n ],\n temperature: 0.2,\n })\n const byCategory = condition('By category', {\n billing: js`${classify.content} === 'billing'`,\n urgent: js`${classify.content}.includes(\"urgent\") && ${vars.escalations} < 3`,\n else: true,\n })\n const logTicket = table.insertRow('Log ticket', {\n tableId: table('tickets'),\n data: json`{\n \"subject\": \"${ticketIn.subject}\"\n}`,\n })\n const notify = slack.sendMessage(\n 'Notify',\n {\n authMethod: 'oauth',\n credential: binding('support-slack'),\n channel: picked('C0SUPPORT'),\n text: t`New ${classify.content} ticket: ${ticketIn.subject}`,\n },\n { errorPort: true }\n )\n const reply = response('Reply', { dataMode: 'structured', builderData: { ok: true } })\n\n ticketIn.to(classify)\n classify.to(byCategory)\n byCategory.billing.to(logTicket)\n byCategory.urgent.to(notify)\n byCategory.else.to(reply)\n logTicket.to(notify)\n logTicket.onError(notify)\n notify.to(reply)\n }\n)\n", - 'templates-and-paths': - "// @sim-sdk 1\nimport { agent, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const writer = agent('Writer', {\n model: 'gpt-5.5',\n messages: [\n {\n role: 'user',\n content: t`Items: ${start.items[0].id} / ${start.items['0']} / ${start['some-field']} / ${start.a.b}\nnext`,\n },\n ],\n systemPrompt: `Line one\nLine two without refs`,\n conversationId: start.conversationId,\n })\n\n start.to(writer)\n})\n", - 'trigger-mode-builders': - "// @sim-sdk 1\nimport { binding, block, gmail, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const invoiceEmail = trigger.gmail.poller('Invoice email', {\n credential: binding('finance-gmail'),\n labelIds: ['INBOX'],\n markAsRead: true,\n })\n const oddTrigger = block(\n 'gmail',\n 'Odd trigger',\n { selectedTriggerId: 'gmail_other', markAsRead: false },\n { triggerMode: true }\n )\n const sendSummary = gmail.sendEmail('Send summary', {\n credential: binding('finance-gmail'),\n to: 'cfo@acme.test',\n subject: 'Invoices',\n body: invoiceEmail.email.body_text,\n })\n\n invoiceEmail.to(sendSummary)\n})\n", - 'unresolved-tokens': - "// @sim-sdk 1\nimport { agent, env, t, trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Fixture', {}, () => {\n const start = trigger.start('Start', { inputFormat: [] })\n const html = agent('Html', {\n model: '{{ not valid }}',\n systemPrompt: t`
hello
${env.lower_ok} `,\n })\n\n start.to(html)\n})\n", -} diff --git a/packages/workflow-code/src/compile/printer-goldens.test.ts b/packages/workflow-code/src/compile/printer-goldens.test.ts index e41df0fd86d..332a15ee3f0 100644 --- a/packages/workflow-code/src/compile/printer-goldens.test.ts +++ b/packages/workflow-code/src/compile/printer-goldens.test.ts @@ -2,23 +2,18 @@ import { compareStrings } from '@sim/utils/string' import { describe, expect, it } from 'vitest' import { portKey } from '../anchors' import type { CompileResult } from '../api' -import { toCodeFile } from '../code-files' import type { CanonicalWorkflow } from '../model' -import { cases } from './__printer__/cases' -import { catalog } from './__printer__/catalog' -import { PRINTER_GOLDENS } from './__printer__/goldens' +import { printWorkflow } from '../print' +import { cases } from '../print/__fixtures__/cases' +import { catalog } from '../print/__fixtures__/catalog' import { compileWorkflow } from './index' /** - * P3/P4 against the printer (Wave 2C): every golden print compiles with zero errors (s3 D12) and - * back to the canonical workflow it was printed from. Annotations are not semantic, so only the - * comment texts are compared: the printer hoists a comment whose anchor it does not print and - * drops one whose block is gone. - * - * The printer's hand-built cases predate two CWM invariants, so the originals are completed - * before comparing, never the compiled side: `errorPort` is effective (`errorEnabled || has an - * error edge`, model.ts), and `modes` holds every canonical pair of the block's surface, with an - * absent entry meaning the default `basic` the printer assumes. + * P3/P4 against the printer (Wave 2C): every printer case prints to source that compiles with zero + * errors (s3 D12) and back to the canonical workflow it was printed from. The printer's golden + * test pins these prints byte for byte. Annotations are not semantic, so only the comment texts + * are compared: the printer hoists a comment whose anchor it does not print and drops one whose + * block is gone. */ function compile(text: string, files: Record = {}): CompileResult { @@ -30,29 +25,11 @@ function compile(text: string, files: Record = {}): CompileResul }) } -function completeInvariants(workflow: CanonicalWorkflow): CanonicalWorkflow['blocks'] { - const blocks: CanonicalWorkflow['blocks'] = {} - for (const [key, block] of Object.entries(workflow.blocks)) { - const hasErrorEdge = workflow.edges.some( - (edge) => edge.from === key && edge.port.kind === 'error' - ) - const modes = { ...block.modes } - const surface = block.triggerMode ? 'trigger' : 'action' - for (const sub of catalog.blocks[block.type]?.subBlocks ?? []) { - if (block.subflow || sub.canonicalParamId === undefined) continue - if (sub.surface !== undefined && sub.surface !== surface) continue - modes[sub.canonicalParamId] ??= 'basic' - } - blocks[key] = { ...block, errorPort: block.errorPort || hasErrorEdge, modes } - } - return blocks -} - -function semantic(workflow: CanonicalWorkflow, complete = false) { +function semantic(workflow: CanonicalWorkflow) { return { meta: workflow.meta, variables: workflow.variables, - blocks: complete ? completeInvariants(workflow) : workflow.blocks, + blocks: workflow.blocks, edges: [...workflow.edges].sort( (a, b) => compareStrings(a.from, b.from) || @@ -75,46 +52,43 @@ function expectRoundTrip(result: CompileResult, original: CanonicalWorkflow, gol .map((d) => `${d.code} ${d.span.line}:${d.span.column} ${d.message}`) ).toEqual([]) if (!result.workflow) throw new Error('expected a workflow') - expect(semantic(result.workflow)).toEqual(semantic(original, true)) + expect(semantic(result.workflow)).toEqual(semantic(original)) expect(commentTexts(result.workflow)).toEqual( commentTexts(original).filter((text) => golden.includes(text)) ) } -describe('printer goldens compile back to their canonical workflow', () => { - it('has a golden for every printer case', () => { - expect(cases.map((testCase) => testCase.name).sort(compareStrings)).toEqual( - Object.keys(PRINTER_GOLDENS) - .filter((name) => name !== 'function-files') - .sort(compareStrings) - ) - }) - +describe('printer cases compile back to their canonical workflow', () => { for (const testCase of cases) { it(testCase.name, () => { - const golden = PRINTER_GOLDENS[testCase.name] - if (golden === undefined) throw new Error(`missing golden ${testCase.name}`) + const printed = printWorkflow({ + workflow: testCase.workflow, + catalog, + hints: testCase.hints, + options: { functionCode: 'inline' }, + }) + const golden = printed.files[0].text expectRoundTrip(compile(golden), testCase.workflow, golden) }) } - it('function-files, with code files written by the code-file codec', () => { + it('function-languages in files mode, with code files written by the code-file codec', () => { const testCase = cases.find((candidate) => candidate.name === 'function-languages') - const golden = PRINTER_GOLDENS['function-files'] - if (!testCase || golden === undefined) throw new Error('missing case') - const files: Record = {} - const layout = [ - ['jscode', 'functions/js-code.js', 'javascript'], - ['pycode', 'functions/py-code.py', 'python'], - ['shcode', 'functions/sh-code.sh', 'shell'], - ] as const - for (const [key, path, language] of layout) { - const param = testCase.workflow.blocks[key]?.params.code - if (param?.kind !== 'value' || typeof param.value !== 'string') throw new Error('no code') - files[path] = toCodeFile(param.value, language) - } - const result = compile(golden, files) - expectRoundTrip(result, testCase.workflow, golden) + if (!testCase) throw new Error('missing case') + const printed = printWorkflow({ + workflow: testCase.workflow, + catalog, + options: { functionCode: 'files', codeDir: 'functions' }, + }) + const [entry, ...codeFiles] = printed.files + expect(codeFiles.map((file) => file.path)).toEqual([ + 'functions/js-code.js', + 'functions/py-code.py', + 'functions/sh-code.sh', + ]) + const files = Object.fromEntries(codeFiles.map((file) => [file.path, file.text])) + const result = compile(entry.text, files) + expectRoundTrip(result, testCase.workflow, entry.text) expect(result.hints.blocks.jscode?.codeFile).toBe('functions/js-code.js') }) }) diff --git a/packages/workflow-code/src/print/__fixtures__/cases.ts b/packages/workflow-code/src/print/__fixtures__/cases.ts index 7e323ece03f..cc994842097 100644 --- a/packages/workflow-code/src/print/__fixtures__/cases.ts +++ b/packages/workflow-code/src/print/__fixtures__/cases.ts @@ -144,6 +144,8 @@ export const cases: PrintCase[] = [ data: '{\n "subject": ""\n}', }, modes: { tableId: 'basic' }, + + errorPort: true, }), blk('Notify', 'slack', { params: { @@ -512,6 +514,7 @@ export const cases: PrintCase[] = [ start(), blk('Old table op', 'table', { params: { operation: 'delete_everything', limit: '10' }, + modes: { tableId: 'basic' }, }), ], }), @@ -790,6 +793,7 @@ export const cases: PrintCase[] = [ operation: 'send', text: 'a very long message body that will never fit on the same line as its very short key', }, + modes: { channel: 'basic' }, }), ], }), From 15802995f7266322ced9fed0af6f9da9614af0d8 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:41:19 -0800 Subject: [PATCH 039/428] fix(workflow-code): print a var node bare only in variables-input fields, matching the compiler's vars.x rule --- packages/workflow-code/src/compile/SYNTAX.md | 9 ++++-- .../src/print/__fixtures__/cases.ts | 28 +++++++++++++++++++ .../src/print/__golden__/diagnostics.json | 1 + .../src/print/__golden__/vars-by-field.txt | 24 ++++++++++++++++ packages/workflow-code/src/print/printer.ts | 2 +- packages/workflow-code/src/print/values.ts | 17 +++++++---- 6 files changed, 71 insertions(+), 10 deletions(-) create mode 100644 packages/workflow-code/src/print/__golden__/vars-by-field.txt diff --git a/packages/workflow-code/src/compile/SYNTAX.md b/packages/workflow-code/src/compile/SYNTAX.md index 05461b43de1..2b31b3b550a 100644 --- a/packages/workflow-code/src/compile/SYNTAX.md +++ b/packages/workflow-code/src/compile/SYNTAX.md @@ -52,9 +52,12 @@ printer's choice (build-spec first, then s2) was taken. - Refs: `blk.a.b` → ``, `blk['x-y']` → ``, `blk.items[0]` → ``, `blk.items['0']` → ``. `env.X` / `env['X']` → `{{X}}` (name must match `[A-Za-z_][A-Za-z0-9_]*`). `ref('Raw.path')` → ``. -- `vars.x`: inside a variables-input field (`structured: 'variables'`) a bare `vars.x` is the - variable node `{ $sim: 'var', key }`; everywhere else, and inside any template, it is the text - ``. +- `vars.x` is decided by field, and the printer and compiler share the rule. Inside a + variables-input field (`structured: 'variables'`, at any depth of its value), a bare `vars.x` is + the variable node `{ $sim: 'var', key }`. Everywhere else, and inside any template, it is the + text ``. So the printer prints a var node bare only in such a field (elsewhere it is + `raw({ $sim: 'var', key })`), and prints whole-string `` text there as + `` t`${vars.x}` `` (elsewhere bare). Golden: `print/__golden__/vars-by-field.txt`. - A JSON code field (subBlock type `code`) written as an object or array literal compiles to `JSON.stringify(value, null, 2)`. - inputFormat (`structured: 'inputFormat'`) as a record: `name: 'string'` → diff --git a/packages/workflow-code/src/print/__fixtures__/cases.ts b/packages/workflow-code/src/print/__fixtures__/cases.ts index cc994842097..31b5dee92f4 100644 --- a/packages/workflow-code/src/print/__fixtures__/cases.ts +++ b/packages/workflow-code/src/print/__fixtures__/cases.ts @@ -476,6 +476,34 @@ export const cases: PrintCase[] = [ edges: [edge('query', 'setvars'), edge('start', 'query')], }), }, + { + // `vars.x` by field: in a variables-input field a var node prints bare and compiles back to the + // node, while `` text prints as a template; elsewhere the text prints bare and a var + // node needs `raw()`. + name: 'vars-by-field', + workflow: wf({ + variables: [{ key: 'count', name: 'count', type: 'number', value: 0 }], + blocks: [ + start(), + blk('Set count', 'variables', { + params: { + variables: [ + { variableId: { $sim: 'var', key: 'count' }, value: '' }, + { variableId: { $sim: 'var', key: 'count' }, value: 'count is ' }, + ], + }, + }), + blk('Echo', 'agent', { + params: { + model: { $sim: 'var', key: 'count' }, + systemPrompt: '', + temperature: 'count is ', + }, + }), + ], + edges: [edge('start', 'setcount'), edge('setcount', 'echo')], + }), + }, { name: 'inactive-values', workflow: wf({ diff --git a/packages/workflow-code/src/print/__golden__/diagnostics.json b/packages/workflow-code/src/print/__golden__/diagnostics.json index 70ba334ca49..a68a9cb2c2b 100644 --- a/packages/workflow-code/src/print/__golden__/diagnostics.json +++ b/packages/workflow-code/src/print/__golden__/diagnostics.json @@ -26,6 +26,7 @@ "router-routes": [], "pair-modes": [], "resource-nodes": [], + "vars-by-field": [], "inactive-values": [], "generic-block-unknown-type": [], "generic-block-legacy-operation": [], diff --git a/packages/workflow-code/src/print/__golden__/vars-by-field.txt b/packages/workflow-code/src/print/__golden__/vars-by-field.txt new file mode 100644 index 00000000000..d6cc56abc13 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/vars-by-field.txt @@ -0,0 +1,24 @@ +// @sim-sdk 1 +import { agent, raw, setVariables, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow( + 'Fixture', + { variables: { count: { type: 'number', value: 0 } } }, + ({ vars }) => { + const start = trigger.start('Start', { inputFormat: [] }) + const setCount = setVariables('Set count', { + variables: [ + { variableId: vars.count, value: t`${vars.count}` }, + { variableId: vars.count, value: t`count is ${vars.count}` }, + ], + }) + const echo = agent('Echo', { + model: raw({ $sim: 'var', key: 'count' }), + systemPrompt: vars.count, + temperature: t`count is ${vars.count}`, + }) + + start.to(setCount) + setCount.to(echo) + } +) diff --git a/packages/workflow-code/src/print/printer.ts b/packages/workflow-code/src/print/printer.ts index 7c72022e9f4..1fecafaf64d 100644 --- a/packages/workflow-code/src/print/printer.ts +++ b/packages/workflow-code/src/print/printer.ts @@ -381,7 +381,7 @@ class WorkflowPrinter { return { tag: this.tagFor(block, catalogBlock, sb), from: block.key, - templateWholeRefs: sb?.structured === 'variables', + variablesField: sb?.structured === 'variables', ...(sb ? { subBlock: sb } : {}), } } diff --git a/packages/workflow-code/src/print/values.ts b/packages/workflow-code/src/print/values.ts index 0d854b69c1c..6a40a4d22a2 100644 --- a/packages/workflow-code/src/print/values.ts +++ b/packages/workflow-code/src/print/values.ts @@ -19,8 +19,13 @@ export interface FieldContext { tag: Tag /** The block whose param is printed, for scope; `null` at workflow level. */ from: BlockKey | null - /** Whole-string refs print as templates instead of bare refs (variables-input values). */ - templateWholeRefs?: boolean + /** + * A variables-input field (`structured: 'variables'`), where a bare `vars.x` compiles to the + * variable node (compile/SYNTAX.md, `vars.x`). There a var node prints as bare `vars.x` and a + * whole-string `` prints as a `t` template; elsewhere a var node prints as `raw()` + * and a whole-string ref prints bare. + */ + variablesField?: boolean subBlock?: CatalogSubBlock } @@ -104,7 +109,7 @@ export class ValuePrinter { const selector = items.length > 0 && items.every((item) => item.selector === true) return { ...arrayExpr(items), selector } } - if (isSimNode(value)) return this.simNode(value) + if (isSimNode(value)) return this.simNode(value, context) const properties: Property[] = Object.entries(value).map(([key, item]) => ({ key: printKey(key), value: this.value(item, { ...context, tag: nestedTag(context) }), @@ -131,8 +136,8 @@ export class ValuePrinter { return { doc: ['`', literalText(escapeTemplateText(text)), '`'], shape: 'template' } } - private simNode(node: SimNode): PrintedValue { - if (node.$sim === 'var') { + private simNode(node: SimNode, context: FieldContext): PrintedValue { + if (node.$sim === 'var' && context.variablesField === true) { this.useVars() return { doc: `vars${memberOf(node.key)}`, shape: 'member' } } @@ -151,7 +156,7 @@ export class ValuePrinter { parts.length === 1 && only?.kind === 'ref' && context.tag === 't' && - context.templateWholeRefs !== true + context.variablesField !== true ) { return { doc: only.expr, shape: /[.[]/.test(only.expr) ? 'member' : 'identifier' } } From 9d26794cdf7d9970cb74002dcecb8ead824f8f7c Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:50:31 -0800 Subject: [PATCH 040/428] fix(workflows): catalog names trigger blocks under trigger., maps multiSelect to multiple, and leaves container builders to the sdk core --- apps/sim/blocks/sdk-names.generated.ts | 2 +- apps/sim/blocks/sdk-names.json | 24 ++----- apps/sim/lib/workflows/code/catalog/build.ts | 14 ++--- .../sim/lib/workflows/code/catalog/project.ts | 9 ++- .../workflows/code/catalog/sdk-names.test.ts | 34 ++++++++++ .../lib/workflows/code/catalog/sdk-names.ts | 62 +++++++++++++++---- packages/workflow-code/src/catalog/types.ts | 1 + 7 files changed, 106 insertions(+), 40 deletions(-) diff --git a/apps/sim/blocks/sdk-names.generated.ts b/apps/sim/blocks/sdk-names.generated.ts index bf4e0dc510b..6dd830ac589 100644 --- a/apps/sim/blocks/sdk-names.generated.ts +++ b/apps/sim/blocks/sdk-names.generated.ts @@ -5,5 +5,5 @@ import type { SdkNamesFile } from '@/lib/workflows/code/catalog/sdk-names' /** The frozen SDK builder names. */ export const SDK_NAMES: SdkNamesFile = JSON.parse( - '{"version":1,"blocks":{"a2a":{"namespace":"a2a","methods":{"a2a_cancel_task":"cancelTask","a2a_get_agent_card":"getAgentCard","a2a_get_task":"getTask","a2a_send_message":"sendMessage"}},"affinity":{"namespace":"legacy.affinity","methods":{"batch_update_entity_fields":"batchUpdateEntityFields","batch_update_list_entry_fields":"batchUpdateListEntryFields","create_list":"createList","create_list_field_dropdown_option":"createListFieldDropdownOption","create_merge":"createMerge","create_note":"createNote","create_reminder":"createReminder","delete_list_field_dropdown_option":"deleteListFieldDropdownOption","delete_note":"deleteNote","get_company":"getCompany","get_current_user":"getCurrentUser","get_entity_field_value":"getEntityFieldValue","get_list":"getList","get_list_entry":"getListEntry","get_list_entry_field":"getListEntryField","get_list_field_dropdown_option":"getListFieldDropdownOption","get_merge":"getMerge","get_merge_task":"getMergeTask","get_note":"getNote","get_opportunity":"getOpportunity","get_person":"getPerson","get_saved_view":"getSavedView","get_transcript":"getTranscript","get_user":"getUser","list_calls":"listCalls","list_chat_messages":"listChatMessages","list_companies":"listCompanies","list_coworker_connections":"listCoworkerConnections","list_emails":"listEmails","list_entity_field_values":"listEntityFieldValues","list_entity_list_entries":"listRowsHoldingEntity","list_entity_lists":"listListsHoldingEntity","list_entity_notes":"listNotesOnEntity","list_entity_relationships":"listEntityRelationships","list_field_dropdown_options":"listFieldDropdownOptions","list_field_metadata":"listFieldMetadata","list_field_value_changes":"listFieldValueChanges","list_investor_executive_connections":"listInvestorExecutiveConnections","list_list_entries":"listListEntries","list_list_entry_field_value_changes":"listListEntryFieldValueChanges","list_list_entry_fields":"listListEntryFields","list_list_field_dropdown_options":"listListFieldDropdownOptions","list_list_fields":"listListFields","list_lists":"listLists","list_meetings":"listMeetings","list_merge_tasks":"listMergeTasks","list_merges":"listMerges","list_note_attached_companies":"listNoteAttachedCompanies","list_note_attached_opportunities":"listNoteAttachedOpportunities","list_note_attached_persons":"listNoteAttachedPeople","list_note_replies":"listNoteReplies","list_notes":"listNotes","list_opportunities":"listOpportunities","list_persons":"listPeople","list_reminders":"listReminders","list_saved_view_entries":"listSavedViewEntries","list_saved_views":"listSavedViews","list_transcript_fragments":"listTranscriptFragments","list_transcripts":"listTranscripts","list_users":"listUsers","search_companies":"searchCompanies","search_files":"searchFiles","search_list_entries":"searchListEntries","search_notes":"searchNotes","search_persons":"searchPeople","semantic_search":"semanticSearch","update_entity_field_value":"updateEntityFieldValue","update_list_entry_field":"updateListEntryField","update_list_field_dropdown_option":"updateListFieldDropdownOption","update_note":"updateNote"}},"affinity_v2":{"namespace":"affinity","methods":{"batch_update_entity_fields":"batchUpdateEntityFields","batch_update_list_entry_fields":"batchUpdateListEntryFields","create_list":"createList","create_list_field_dropdown_option":"createListFieldDropdownOption","create_merge":"createMerge","create_note":"createNote","create_reminder":"createReminder","delete_list_field_dropdown_option":"deleteListFieldDropdownOption","delete_note":"deleteNote","get_company":"getCompany","get_current_user":"getCurrentUser","get_entity_field_value":"getEntityFieldValue","get_list":"getList","get_list_entry":"getListEntry","get_list_entry_field":"getListEntryField","get_list_field_dropdown_option":"getListFieldDropdownOption","get_merge":"getMerge","get_merge_task":"getMergeTask","get_note":"getNote","get_opportunity":"getOpportunity","get_person":"getPerson","get_saved_view":"getSavedView","get_transcript":"getTranscript","get_user":"getUser","list_calls":"listCalls","list_chat_messages":"listChatMessages","list_companies":"listCompanies","list_coworker_connections":"listCoworkerConnections","list_emails":"listEmails","list_entity_field_values":"listEntityFieldValues","list_entity_list_entries":"listRowsHoldingEntity","list_entity_lists":"listListsHoldingEntity","list_entity_notes":"listNotesOnEntity","list_entity_relationships":"listEntityRelationships","list_field_dropdown_options":"listFieldDropdownOptions","list_field_metadata":"listFieldMetadata","list_field_value_changes":"listFieldValueChanges","list_investor_executive_connections":"listInvestorExecutiveConnections","list_list_entries":"listListEntries","list_list_entry_field_value_changes":"listListEntryFieldValueChanges","list_list_entry_fields":"listListEntryFields","list_list_field_dropdown_options":"listListFieldDropdownOptions","list_list_fields":"listListFields","list_lists":"listLists","list_meetings":"listMeetings","list_merge_tasks":"listMergeTasks","list_merges":"listMerges","list_note_attached_companies":"listNoteAttachedCompanies","list_note_attached_opportunities":"listNoteAttachedOpportunities","list_note_attached_persons":"listNoteAttachedPeople","list_note_replies":"listNoteReplies","list_notes":"listNotes","list_opportunities":"listOpportunities","list_persons":"listPeople","list_reminders":"listReminders","list_saved_view_entries":"listSavedViewEntries","list_saved_views":"listSavedViews","list_transcript_fragments":"listTranscriptFragments","list_transcripts":"listTranscripts","list_users":"listUsers","search_companies":"searchCompanies","search_files":"searchFiles","search_list_entries":"searchListEntries","search_notes":"searchNotes","search_persons":"searchPeople","semantic_search":"semanticSearch","update_entity_field_value":"updateEntityFieldValue","update_list_entry_field":"updateListEntryField","update_list_field_dropdown_option":"updateListFieldDropdownOption","update_note":"updateNote"},"params":{"action":{"oauthCredential":"credential"}}},"agent":{"namespace":"agent"},"agentmail":{"namespace":"legacy.agentmail","methods":{"create_draft":"createDraft","create_inbox":"createInbox","delete_draft":"deleteDraft","delete_inbox":"deleteInbox","delete_thread":"deleteThread","forward_message":"forwardMessage","get_draft":"getDraft","get_inbox":"getInbox","get_message":"getMessage","get_thread":"getThread","list_drafts":"listDrafts","list_inboxes":"listInboxes","list_messages":"listMessages","list_threads":"listThreads","reply_message":"replyToMessage","send_draft":"sendDraft","send_message":"sendMessage","update_draft":"updateDraft","update_inbox":"updateInbox","update_message":"updateMessageLabels","update_thread":"updateThreadLabels"}},"agentmail_v2":{"namespace":"agentmail","methods":{"create_draft":"createDraft","create_inbox":"createInbox","delete_draft":"deleteDraft","delete_inbox":"deleteInbox","delete_thread":"deleteThread","forward_message":"forwardMessage","get_draft":"getDraft","get_inbox":"getInbox","get_message":"getMessage","get_thread":"getThread","list_drafts":"listDrafts","list_inboxes":"listInboxes","list_messages":"listMessages","list_threads":"listThreads","reply_message":"replyToMessage","send_draft":"sendDraft","send_message":"sendMessage","update_draft":"updateDraft","update_inbox":"updateInbox","update_message":"updateMessageLabels","update_thread":"updateThreadLabels"},"params":{"action":{"oauthCredential":"credential"}}},"agentphone":{"namespace":"legacy.agentphone","methods":{"create_call":"createCall","create_contact":"createContact","create_number":"createNumber","delete_contact":"deleteContact","get_call":"getCall","get_call_transcript":"getCallTranscript","get_contact":"getContact","get_conversation":"getConversation","get_conversation_messages":"getConversationMessages","get_number_messages":"getNumberMessages","get_usage":"getUsage","get_usage_daily":"getDailyUsage","get_usage_monthly":"getMonthlyUsage","list_calls":"listCalls","list_contacts":"listContacts","list_conversations":"listConversations","list_numbers":"listNumbers","react_to_message":"reactToMessage","release_number":"releaseNumber","send_message":"sendMessage","update_contact":"updateContact","update_conversation":"updateConversation"}},"agentphone_v2":{"namespace":"agentphone","methods":{"create_call":"createCall","create_contact":"createContact","create_number":"createNumber","delete_contact":"deleteContact","get_call":"getCall","get_call_transcript":"getCallTranscript","get_contact":"getContact","get_conversation":"getConversation","get_conversation_messages":"getConversationMessages","get_number_messages":"getNumberMessages","get_usage":"getUsage","get_usage_daily":"getDailyUsage","get_usage_monthly":"getMonthlyUsage","list_calls":"listCalls","list_contacts":"listContacts","list_conversations":"listConversations","list_numbers":"listNumbers","react_to_message":"reactToMessage","release_number":"releaseNumber","send_message":"sendMessage","update_contact":"updateContact","update_conversation":"updateConversation"},"params":{"action":{"oauthCredential":"credential"}}},"agiloft":{"namespace":"agiloft","methods":{"async_status":"asyncStatus","attach_file":"attachFile","attachment_info":"attachmentInfo","create_record":"createRecord","delete_record":"deleteRecord","get_choice_line_id":"getChoiceLineId","list_tables":"listTablesFields","lock_record":"lockRecord","nlp_search":"naturalLanguageSearch","read_record":"readRecord","remove_attachment":"removeAttachment","retrieve_attachment":"retrieveAttachment","run_action_button":"runActionButton","saved_search":"savedSearch","search_records":"searchRecords","select_records":"selectRecords","update_record":"updateRecord","upsert_record":"upsertRecord"}},"ahrefs":{"namespace":"legacy.ahrefs","methods":{"ahrefs_anchors":"anchors","ahrefs_backlinks":"backlinks","ahrefs_backlinks_stats":"backlinksStats","ahrefs_batch_analysis":"batchAnalysis","ahrefs_broken_backlinks":"brokenBacklinks","ahrefs_domain_rating":"domainRating","ahrefs_domain_rating_history":"domainRatingHistory","ahrefs_keyword_overview":"keywordOverview","ahrefs_keywords_history":"keywordsHistory","ahrefs_metrics":"metricsOverview","ahrefs_metrics_history":"metricsHistory","ahrefs_organic_competitors":"organicCompetitors","ahrefs_organic_keywords":"organicKeywords","ahrefs_paid_pages":"paidPages","ahrefs_rank_tracker_competitors_overview":"rankTrackerCompetitorsOverview","ahrefs_rank_tracker_competitors_stats":"rankTrackerCompetitorsStats","ahrefs_rank_tracker_overview":"rankTrackerOverview","ahrefs_rank_tracker_serp_overview":"rankTrackerSerpOverview","ahrefs_refdomains_history":"referringDomainsHistory","ahrefs_referring_domains":"referringDomains","ahrefs_related_terms":"relatedTerms","ahrefs_site_audit_page_explorer":"siteAuditPageExplorer","ahrefs_top_pages":"topPages"}},"ahrefs_v2":{"namespace":"ahrefs","methods":{"ahrefs_anchors":"anchors","ahrefs_backlinks":"backlinks","ahrefs_backlinks_stats":"backlinksStats","ahrefs_batch_analysis":"batchAnalysis","ahrefs_broken_backlinks":"brokenBacklinks","ahrefs_domain_rating":"domainRating","ahrefs_domain_rating_history":"domainRatingHistory","ahrefs_keyword_overview":"keywordOverview","ahrefs_keywords_history":"keywordsHistory","ahrefs_metrics":"metricsOverview","ahrefs_metrics_history":"metricsHistory","ahrefs_organic_competitors":"organicCompetitors","ahrefs_organic_keywords":"organicKeywords","ahrefs_paid_pages":"paidPages","ahrefs_rank_tracker_competitors_overview":"rankTrackerCompetitorsOverview","ahrefs_rank_tracker_competitors_stats":"rankTrackerCompetitorsStats","ahrefs_rank_tracker_overview":"rankTrackerOverview","ahrefs_rank_tracker_serp_overview":"rankTrackerSerpOverview","ahrefs_refdomains_history":"referringDomainsHistory","ahrefs_referring_domains":"referringDomains","ahrefs_related_terms":"relatedTerms","ahrefs_site_audit_page_explorer":"siteAuditPageExplorer","ahrefs_top_pages":"topPages"},"params":{"action":{"oauthCredential":"credential"}}},"airtable":{"namespace":"airtable","methods":{"create":"createRecords","delete":"deleteRecords","get":"getRecord","getSchema":"getBaseSchema","list":"listRecords","listBases":"listBases","listTables":"listTables","update":"updateRecord","updateMultiple":"updateMultipleRecords","upsert":"upsertRecords"},"triggers":{"airtable_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"algolia":{"namespace":"legacy.algolia","methods":{"add_record":"addRecord","batch_operations":"batchOperations","browse_records":"browseRecords","clear_records":"clearRecords","copy_move_index":"copyMoveIndex","delete_by_filter":"deleteByFilter","delete_index":"deleteIndex","delete_record":"deleteRecord","get_record":"getRecord","get_records":"getRecords","get_settings":"getSettings","get_task_status":"getTaskStatus","list_indices":"listIndices","partial_update_record":"partialUpdateRecord","search":"search","update_settings":"updateSettings"}},"algolia_v2":{"namespace":"algolia","methods":{"add_record":"addRecord","batch_operations":"batchOperations","browse_records":"browseRecords","clear_records":"clearRecords","copy_move_index":"copyMoveIndex","delete_by_filter":"deleteByFilter","delete_index":"deleteIndex","delete_record":"deleteRecord","get_record":"getRecord","get_records":"getRecords","get_settings":"getSettings","get_task_status":"getTaskStatus","list_indices":"listIndices","partial_update_record":"partialUpdateRecord","search":"search","update_settings":"updateSettings"},"params":{"action":{"oauthCredential":"credential"}}},"amplitude":{"namespace":"legacy.amplitude","methods":{"event_segmentation":"eventSegmentation","funnels":"funnels","get_active_users":"getActiveUsers","get_revenue":"getRevenue","group_identify":"groupIdentify","identify_user":"identifyUser","list_events":"listEvents","realtime_active_users":"realTimeActiveUsers","retention":"retention","send_event":"sendEvent","user_activity":"userActivity","user_profile":"userProfile","user_search":"userSearch"}},"amplitude_v2":{"namespace":"amplitude","methods":{"event_segmentation":"eventSegmentation","funnels":"funnels","get_active_users":"getActiveUsers","get_revenue":"getRevenue","group_identify":"groupIdentify","identify_user":"identifyUser","list_events":"listEvents","realtime_active_users":"realTimeActiveUsers","retention":"retention","send_event":"sendEvent","user_activity":"userActivity","user_profile":"userProfile","user_search":"userSearch"},"params":{"action":{"oauthCredential":"credential"}}},"api":{"namespace":"api"},"api_trigger":{"namespace":"legacy.apiTrigger"},"apify":{"namespace":"legacy.apify","methods":{"apify_get_dataset_items":"getDatasetItems","apify_get_run":"getRun","apify_run_actor_async":"runActorAsync","apify_run_actor_sync":"runActor","apify_run_task":"runTask"}},"apify_v2":{"namespace":"apify","methods":{"apify_get_dataset_items":"getDatasetItems","apify_get_run":"getRun","apify_run_actor_async":"runActorAsync","apify_run_actor_sync":"runActor","apify_run_task":"runTask"},"params":{"action":{"oauthCredential":"credential"}}},"apollo":{"namespace":"legacy.apollo","methods":{"account_bulk_create":"bulkCreateAccounts","account_bulk_update":"bulkUpdateAccounts","account_create":"createAccount","account_search":"searchAccounts","account_update":"updateAccount","contact_bulk_create":"bulkCreateContacts","contact_bulk_update":"bulkUpdateContacts","contact_create":"createContact","contact_search":"searchContacts","contact_update":"updateContact","email_accounts":"getEmailAccounts","opportunity_create":"createOpportunity","opportunity_get":"getOpportunity","opportunity_search":"searchOpportunities","opportunity_update":"updateOpportunity","organization_bulk_enrich":"bulkEnrichOrganizations","organization_enrich":"enrichOrganization","organization_search":"searchOrganizations","people_bulk_enrich":"bulkEnrichPeople","people_enrich":"enrichPerson","people_search":"searchPeople","sequence_add":"addToSequence","sequence_search":"searchSequences","task_create":"createTask","task_search":"searchTasks"}},"apollo_v2":{"namespace":"apollo","methods":{"account_bulk_create":"bulkCreateAccounts","account_bulk_update":"bulkUpdateAccounts","account_create":"createAccount","account_search":"searchAccounts","account_update":"updateAccount","contact_bulk_create":"bulkCreateContacts","contact_bulk_update":"bulkUpdateContacts","contact_create":"createContact","contact_search":"searchContacts","contact_update":"updateContact","email_accounts":"getEmailAccounts","opportunity_create":"createOpportunity","opportunity_get":"getOpportunity","opportunity_search":"searchOpportunities","opportunity_update":"updateOpportunity","organization_bulk_enrich":"bulkEnrichOrganizations","organization_enrich":"enrichOrganization","organization_search":"searchOrganizations","people_bulk_enrich":"bulkEnrichPeople","people_enrich":"enrichPerson","people_search":"searchPeople","sequence_add":"addToSequence","sequence_search":"searchSequences","task_create":"createTask","task_search":"searchTasks"},"params":{"action":{"oauthCredential":"credential"}}},"appconfig":{"namespace":"legacy.appconfig","methods":{"create_application":"createApplication","create_configuration_profile":"createConfigurationProfile","create_environment":"createEnvironment","create_hosted_configuration_version":"createHostedConfigurationVersion","delete_application":"deleteApplication","delete_configuration_profile":"deleteConfigurationProfile","delete_environment":"deleteEnvironment","delete_hosted_configuration_version":"deleteHostedConfigurationVersion","get_application":"getApplication","get_configuration":"getConfiguration","get_configuration_profile":"getConfigurationProfile","get_deployment":"getDeployment","get_environment":"getEnvironment","get_hosted_configuration_version":"getHostedConfigurationVersion","list_applications":"listApplications","list_configuration_profiles":"listConfigurationProfiles","list_deployment_strategies":"listDeploymentStrategies","list_deployments":"listDeployments","list_environments":"listEnvironments","list_hosted_configuration_versions":"listHostedConfigurationVersions","start_deployment":"startDeployment","stop_deployment":"stopDeployment","update_application":"updateApplication","update_configuration_profile":"updateConfigurationProfile","update_environment":"updateEnvironment"}},"appconfig_v2":{"namespace":"appconfig","methods":{"create_application":"createApplication","create_configuration_profile":"createConfigurationProfile","create_environment":"createEnvironment","create_hosted_configuration_version":"createHostedConfigurationVersion","delete_application":"deleteApplication","delete_configuration_profile":"deleteConfigurationProfile","delete_environment":"deleteEnvironment","delete_hosted_configuration_version":"deleteHostedConfigurationVersion","get_application":"getApplication","get_configuration":"getConfiguration","get_configuration_profile":"getConfigurationProfile","get_deployment":"getDeployment","get_environment":"getEnvironment","get_hosted_configuration_version":"getHostedConfigurationVersion","list_applications":"listApplications","list_configuration_profiles":"listConfigurationProfiles","list_deployment_strategies":"listDeploymentStrategies","list_deployments":"listDeployments","list_environments":"listEnvironments","list_hosted_configuration_versions":"listHostedConfigurationVersions","start_deployment":"startDeployment","stop_deployment":"stopDeployment","update_application":"updateApplication","update_configuration_profile":"updateConfigurationProfile","update_environment":"updateEnvironment"},"params":{"action":{"oauthCredential":"credential"}}},"arxiv":{"namespace":"arxiv","methods":{"arxiv_get_author_papers":"getAuthorPapers","arxiv_get_paper":"getPaperDetails","arxiv_search":"searchPapers"}},"asana":{"namespace":"asana","methods":{"add_comment":"addComment","add_followers":"addFollowers","create_project":"createProject","create_section":"createSection","create_subtask":"createSubtask","create_task":"createTask","delete_task":"deleteTask","get_project":"getProject","get_projects":"getProjects","get_task":"getTask","list_sections":"listSections","list_workspaces":"listWorkspaces","search_tasks":"searchTasks","update_task":"updateTask"},"params":{"action":{"oauthCredential":"credential"}}},"ashby":{"namespace":"legacy.ashby","methods":{"add_candidate_tag":"addCandidateTag","anonymize_candidate":"anonymizeCandidate","change_application_source":"changeApplicationSource","change_application_stage":"changeApplicationStage","create_application":"createApplication","create_candidate":"createCandidate","create_note":"createNote","delete_application":"deleteApplication","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_job_posting":"getJobPosting","get_offer":"getOffer","get_opening":"getOpening","list_application_feedback":"listApplicationFeedback","list_application_history":"listApplicationHistory","list_applications":"listApplications","list_archive_reasons":"listArchiveReasons","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_interview_plans":"listInterviewPlans","list_interview_stages":"listInterviewStages","list_interviews":"listInterviews","list_job_postings":"listJobPostings","list_jobs":"listJobs","list_locations":"listLocations","list_notes":"listNotes","list_offers":"listOffers","list_openings":"listOpenings","list_sources":"listSources","list_users":"listUsers","remove_candidate_tag":"removeCandidateTag","search_candidates":"searchCandidates","search_jobs":"searchJobs","search_openings":"searchOpenings","search_users":"searchUsers","set_custom_field_value":"setCustomFieldValue","set_custom_field_values":"setCustomFieldValues","transfer_application":"transferApplication","update_candidate":"updateCandidate","upload_candidate_file":"uploadCandidateFile","upload_resume":"uploadResume"},"triggers":{"ashby_application_submit":"applicationSubmit","ashby_application_update":"applicationUpdate","ashby_candidate_delete":"candidateDelete","ashby_candidate_hire":"candidateHire","ashby_candidate_merge":"candidateMerge","ashby_candidate_stage_change":"candidateStageChange","ashby_interview_schedule_create":"interviewScheduleCreate","ashby_interview_schedule_update":"interviewScheduleUpdate","ashby_job_create":"jobCreate","ashby_job_posting_delete":"jobPostingDelete","ashby_job_posting_update":"jobPostingUpdate","ashby_job_update":"jobUpdate","ashby_offer_create":"offerCreate","ashby_offer_delete":"offerDelete","ashby_offer_update":"offerUpdate","ashby_opening_create":"openingCreate","ashby_signature_request_update":"signatureRequestUpdate"}},"ashby_v2":{"namespace":"ashby","methods":{"add_candidate_tag":"addCandidateTag","anonymize_candidate":"anonymizeCandidate","change_application_source":"changeApplicationSource","change_application_stage":"changeApplicationStage","create_application":"createApplication","create_candidate":"createCandidate","create_note":"createNote","delete_application":"deleteApplication","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_job_posting":"getJobPosting","get_offer":"getOffer","get_opening":"getOpening","list_application_feedback":"listApplicationFeedback","list_application_history":"listApplicationHistory","list_applications":"listApplications","list_archive_reasons":"listArchiveReasons","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_interview_plans":"listInterviewPlans","list_interview_stages":"listInterviewStages","list_interviews":"listInterviews","list_job_postings":"listJobPostings","list_jobs":"listJobs","list_locations":"listLocations","list_notes":"listNotes","list_offers":"listOffers","list_openings":"listOpenings","list_sources":"listSources","list_users":"listUsers","remove_candidate_tag":"removeCandidateTag","search_candidates":"searchCandidates","search_jobs":"searchJobs","search_openings":"searchOpenings","search_users":"searchUsers","set_custom_field_value":"setCustomFieldValue","set_custom_field_values":"setCustomFieldValues","transfer_application":"transferApplication","update_candidate":"updateCandidate","upload_candidate_file":"uploadCandidateFile","upload_resume":"uploadResume"},"triggers":{"ashby_application_submit":"applicationSubmit","ashby_application_update":"applicationUpdate","ashby_candidate_delete":"candidateDelete","ashby_candidate_hire":"candidateHire","ashby_candidate_merge":"candidateMerge","ashby_candidate_stage_change":"candidateStageChange","ashby_interview_schedule_create":"interviewScheduleCreate","ashby_interview_schedule_update":"interviewScheduleUpdate","ashby_job_create":"jobCreate","ashby_job_posting_delete":"jobPostingDelete","ashby_job_posting_update":"jobPostingUpdate","ashby_job_update":"jobUpdate","ashby_offer_create":"offerCreate","ashby_offer_delete":"offerDelete","ashby_offer_update":"offerUpdate","ashby_opening_create":"openingCreate","ashby_signature_request_update":"signatureRequestUpdate"},"params":{"action":{"oauthCredential":"credential"}}},"athena":{"namespace":"legacy.athena","methods":{"batch_get_named_query":"batchGetNamedQueries","batch_get_prepared_statement":"batchGetPreparedStatements","batch_get_query_execution":"batchGetQueryExecutions","create_named_query":"createNamedQuery","create_prepared_statement":"createPreparedStatement","delete_named_query":"deleteNamedQuery","delete_prepared_statement":"deletePreparedStatement","get_data_catalog":"getDataCatalog","get_database":"getDatabase","get_named_query":"getNamedQuery","get_prepared_statement":"getPreparedStatement","get_query_execution":"getQueryExecution","get_query_results":"getQueryResults","get_query_runtime_statistics":"getQueryRuntimeStatistics","get_table_metadata":"getTableMetadata","get_work_group":"getWorkgroup","list_data_catalogs":"listDataCatalogs","list_databases":"listDatabases","list_named_queries":"listNamedQueries","list_prepared_statements":"listPreparedStatements","list_query_executions":"listQueryExecutions","list_table_metadata":"listTableMetadata","list_work_groups":"listWorkgroups","start_query":"startQuery","stop_query":"stopQuery","update_named_query":"updateNamedQuery","update_prepared_statement":"updatePreparedStatement"}},"athena_v2":{"namespace":"athena","methods":{"batch_get_named_query":"batchGetNamedQueries","batch_get_prepared_statement":"batchGetPreparedStatements","batch_get_query_execution":"batchGetQueryExecutions","create_named_query":"createNamedQuery","create_prepared_statement":"createPreparedStatement","delete_named_query":"deleteNamedQuery","delete_prepared_statement":"deletePreparedStatement","get_data_catalog":"getDataCatalog","get_database":"getDatabase","get_named_query":"getNamedQuery","get_prepared_statement":"getPreparedStatement","get_query_execution":"getQueryExecution","get_query_results":"getQueryResults","get_query_runtime_statistics":"getQueryRuntimeStatistics","get_table_metadata":"getTableMetadata","get_work_group":"getWorkgroup","list_data_catalogs":"listDataCatalogs","list_databases":"listDatabases","list_named_queries":"listNamedQueries","list_prepared_statements":"listPreparedStatements","list_query_executions":"listQueryExecutions","list_table_metadata":"listTableMetadata","list_work_groups":"listWorkgroups","start_query":"startQuery","stop_query":"stopQuery","update_named_query":"updateNamedQuery","update_prepared_statement":"updatePreparedStatement"},"params":{"action":{"oauthCredential":"credential"}}},"attio":{"namespace":"attio","methods":{"assert_record":"assertRecordUpsert","create_attribute":"createAttribute","create_comment":"createComment","create_list":"createList","create_list_entry":"createListEntry","create_note":"createNote","create_object":"createObject","create_record":"createRecord","create_task":"createTask","create_webhook":"createWebhook","delete_comment":"deleteComment","delete_list_entry":"deleteListEntry","delete_note":"deleteNote","delete_record":"deleteRecord","delete_task":"deleteTask","delete_webhook":"deleteWebhook","get_attribute":"getAttribute","get_comment":"getComment","get_list":"getList","get_list_entry":"getListEntry","get_member":"getMember","get_note":"getNote","get_object":"getObject","get_record":"getRecord","get_task":"getTask","get_thread":"getThread","get_webhook":"getWebhook","list_attributes":"listAttributes","list_lists":"listLists","list_members":"listMembers","list_notes":"listNotes","list_objects":"listObjects","list_records":"listRecords","list_tasks":"listTasks","list_threads":"listThreads","list_webhooks":"listWebhooks","query_list_entries":"queryListEntries","search_records":"searchRecords","update_attribute":"updateAttribute","update_list":"updateList","update_list_entry":"updateListEntry","update_object":"updateObject","update_record":"updateRecord","update_task":"updateTask","update_webhook":"updateWebhook"},"triggers":{"attio_comment_created":"commentCreated","attio_comment_deleted":"commentDeleted","attio_comment_resolved":"commentResolved","attio_comment_unresolved":"commentUnresolved","attio_list_created":"listCreated","attio_list_deleted":"listDeleted","attio_list_entry_created":"listEntryCreated","attio_list_entry_deleted":"listEntryDeleted","attio_list_entry_updated":"listEntryUpdated","attio_list_updated":"listUpdated","attio_note_created":"noteCreated","attio_note_deleted":"noteDeleted","attio_note_updated":"noteUpdated","attio_record_created":"recordCreated","attio_record_deleted":"recordDeleted","attio_record_merged":"recordMerged","attio_record_updated":"recordUpdated","attio_task_created":"taskCreated","attio_task_deleted":"taskDeleted","attio_task_updated":"taskUpdated","attio_webhook":"webhook","attio_workspace_member_created":"workspaceMemberCreated"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"azure_data_explorer":{"namespace":"legacy.azureDataExplorer","methods":{"azure_data_explorer_create_table":"createTable","azure_data_explorer_drop_table":"dropTable","azure_data_explorer_ingest_from_query":"ingestFromQuery","azure_data_explorer_ingest_inline":"ingestRowsInline","azure_data_explorer_list_databases":"listDatabases","azure_data_explorer_list_functions":"listFunctions","azure_data_explorer_list_tables":"listTables","azure_data_explorer_management":"managementCommandAdvanced","azure_data_explorer_query":"runQuery","azure_data_explorer_show_database_schema":"showDatabaseSchema","azure_data_explorer_show_ingestion_failures":"showIngestionFailures","azure_data_explorer_show_operations":"showOperations","azure_data_explorer_show_table_details":"showTableDetails","azure_data_explorer_show_table_schema":"showTableSchema"}},"azure_data_explorer_v2":{"namespace":"azureDataExplorer","methods":{"azure_data_explorer_create_table":"createTable","azure_data_explorer_drop_table":"dropTable","azure_data_explorer_ingest_from_query":"ingestFromQuery","azure_data_explorer_ingest_inline":"ingestRowsInline","azure_data_explorer_list_databases":"listDatabases","azure_data_explorer_list_functions":"listFunctions","azure_data_explorer_list_tables":"listTables","azure_data_explorer_management":"managementCommandAdvanced","azure_data_explorer_query":"runQuery","azure_data_explorer_show_database_schema":"showDatabaseSchema","azure_data_explorer_show_ingestion_failures":"showIngestionFailures","azure_data_explorer_show_operations":"showOperations","azure_data_explorer_show_table_details":"showTableDetails","azure_data_explorer_show_table_schema":"showTableSchema"},"params":{"action":{"oauthCredential":"credential"}}},"azure_devops":{"namespace":"legacy.azureDevops","methods":{"azure_devops_add_comment":"addComment","azure_devops_create_work_item":"createWorkItem","azure_devops_get_build_log":"getBuildLog","azure_devops_get_build_timeline":"getBuildTimeline","azure_devops_get_comments":"getComments","azure_devops_get_pipeline":"getPipeline","azure_devops_get_pipeline_run":"getPipelineRun","azure_devops_get_work_item":"getWorkItem","azure_devops_get_work_items_batch":"getWorkItemsBatch","azure_devops_get_work_items_between_builds":"getWorkItemsBetweenBuilds","azure_devops_list_build_logs":"listBuildLogs","azure_devops_list_builds":"listBuilds","azure_devops_list_pipeline_runs":"listPipelineRuns","azure_devops_list_pipelines":"listPipelines","azure_devops_query_work_items":"queryWorkItems","azure_devops_update_work_item":"updateWorkItem"},"triggers":{"azure_devops_build_failed":"buildFailed","azure_devops_webhook":"webhook","azure_devops_work_item_created":"workItemCreated"}},"azure_devops_v2":{"namespace":"azureDevops","methods":{"azure_devops_add_comment":"addComment","azure_devops_create_work_item":"createWorkItem","azure_devops_get_build_log":"getBuildLog","azure_devops_get_build_timeline":"getBuildTimeline","azure_devops_get_comments":"getComments","azure_devops_get_pipeline":"getPipeline","azure_devops_get_pipeline_run":"getPipelineRun","azure_devops_get_work_item":"getWorkItem","azure_devops_get_work_items_batch":"getWorkItemsBatch","azure_devops_get_work_items_between_builds":"getWorkItemsBetweenBuilds","azure_devops_list_build_logs":"listBuildLogs","azure_devops_list_builds":"listBuilds","azure_devops_list_pipeline_runs":"listPipelineRuns","azure_devops_list_pipelines":"listPipelines","azure_devops_query_work_items":"queryWorkItems","azure_devops_update_work_item":"updateWorkItem"},"triggers":{"azure_devops_build_failed":"buildFailed","azure_devops_webhook":"webhook","azure_devops_work_item_created":"workItemCreated"},"params":{"action":{"oauthCredential":"credential"}}},"bitbucket":{"namespace":"bitbucket","methods":{"bitbucket_approve_pull_request":"approvePullRequest","bitbucket_create_branch":"createBranch","bitbucket_create_pull_request":"createPullRequest","bitbucket_create_pull_request_comment":"createPullRequestComment","bitbucket_decline_pull_request":"declinePullRequest","bitbucket_delete_branch":"deleteBranch","bitbucket_get_commit":"getCommit","bitbucket_get_file":"getFile","bitbucket_get_file_metadata":"getFileMetadata","bitbucket_get_pipeline":"getPipeline","bitbucket_get_pipeline_step_log":"getPipelineStepLog","bitbucket_get_pull_request":"getPullRequest","bitbucket_get_pull_request_diff":"getPullRequestDiff","bitbucket_get_pull_request_diffstat":"getPullRequestDiffstat","bitbucket_get_pull_request_merge_task_status":"getPullRequestMergeTaskStatus","bitbucket_get_repository":"getRepository","bitbucket_list_branches":"listBranches","bitbucket_list_commits":"listCommits","bitbucket_list_directory":"listDirectory","bitbucket_list_pipeline_steps":"listPipelineSteps","bitbucket_list_pipelines":"listPipelines","bitbucket_list_pull_request_comments":"listPullRequestComments","bitbucket_list_pull_request_commit_statuses":"listPullRequestCommitStatuses","bitbucket_list_pull_requests":"listPullRequests","bitbucket_list_repositories":"listRepositories","bitbucket_list_workspaces":"listWorkspaces","bitbucket_merge_pull_request":"mergePullRequest","bitbucket_request_pull_request_changes":"requestPullRequestChanges","bitbucket_stop_pipeline":"stopPipeline","bitbucket_trigger_pipeline":"triggerPipeline"},"triggers":{"bitbucket_build_status_created":"buildStatusCreated","bitbucket_build_status_updated":"buildStatusUpdated","bitbucket_commit_comment_created":"commitCommentCreated","bitbucket_pull_request_approval_removed":"pullRequestApprovalRemoved","bitbucket_pull_request_approved":"pullRequestApproved","bitbucket_pull_request_changes_request_removed":"pullRequestChangesRequestRemoved","bitbucket_pull_request_changes_requested":"pullRequestChangesRequested","bitbucket_pull_request_comment_created":"pullRequestCommentCreated","bitbucket_pull_request_comment_deleted":"pullRequestCommentDeleted","bitbucket_pull_request_comment_reopened":"pullRequestCommentReopened","bitbucket_pull_request_comment_resolved":"pullRequestCommentResolved","bitbucket_pull_request_comment_updated":"pullRequestCommentUpdated","bitbucket_pull_request_created":"pullRequestCreated","bitbucket_pull_request_declined":"pullRequestDeclined","bitbucket_pull_request_merged":"pullRequestMerged","bitbucket_pull_request_updated":"pullRequestUpdated","bitbucket_push":"push","bitbucket_repository_forked":"repositoryForked","bitbucket_repository_updated":"repositoryUpdated"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"box":{"namespace":"legacy.box","methods":{"copy_file":"copyFile","create_folder":"createFolder","delete_file":"deleteFile","delete_folder":"deleteFolder","download_file":"downloadFile","get_file_info":"getFileInfo","list_folder_items":"listFolderItems","search":"search","sign_cancel_request":"cancelSignRequest","sign_create_request":"createSignRequest","sign_get_request":"getSignRequest","sign_list_requests":"listSignRequests","sign_resend_request":"resendSignRequest","update_file":"updateFile","upload_file":"uploadFile"}},"box_v2":{"namespace":"box","methods":{"copy_file":"copyFile","create_folder":"createFolder","delete_file":"deleteFile","delete_folder":"deleteFolder","download_file":"downloadFile","get_file_info":"getFileInfo","list_folder_items":"listFolderItems","search":"search","sign_cancel_request":"cancelSignRequest","sign_create_request":"createSignRequest","sign_get_request":"getSignRequest","sign_list_requests":"listSignRequests","sign_resend_request":"resendSignRequest","update_file":"updateFile","upload_file":"uploadFile"}},"brandfetch":{"namespace":"brandfetch","methods":{"get_brand":"getBrand","search":"searchBrands"}},"brex":{"namespace":"legacy.brex","methods":{"archive_budget":"archiveBudget","create_budget":"createBudget","create_spend_limit":"createSpendLimit","create_transfer":"createTransfer","create_vendor":"createVendor","get_budget":"getBudget","get_cash_account":"getCashAccount","get_company":"getCompany","get_current_user":"getCurrentUser","get_expense":"getExpense","get_spend_limit":"getSpendLimit","get_transfer":"getTransfer","get_user":"getUser","get_vendor":"getVendor","list_budgets":"listBudgets","list_card_accounts":"listCardAccounts","list_card_statements":"listCardStatements","list_card_transactions":"listCardTransactions","list_cards":"listCards","list_cash_accounts":"listCashAccounts","list_cash_statements":"listCashStatements","list_cash_transactions":"listCashTransactions","list_departments":"listDepartments","list_expenses":"listExpenses","list_locations":"listLocations","list_spend_limits":"listSpendLimits","list_titles":"listTitles","list_transfers":"listTransfers","list_users":"listUsers","list_vendors":"listVendors","match_receipt":"matchReceipt","update_expense":"updateExpenseMemo","update_vendor":"updateVendor","upload_receipt":"uploadReceipt"}},"brex_v2":{"namespace":"brex","methods":{"archive_budget":"archiveBudget","create_budget":"createBudget","create_spend_limit":"createSpendLimit","create_transfer":"createTransfer","create_vendor":"createVendor","get_budget":"getBudget","get_cash_account":"getCashAccount","get_company":"getCompany","get_current_user":"getCurrentUser","get_expense":"getExpense","get_spend_limit":"getSpendLimit","get_transfer":"getTransfer","get_user":"getUser","get_vendor":"getVendor","list_budgets":"listBudgets","list_card_accounts":"listCardAccounts","list_card_statements":"listCardStatements","list_card_transactions":"listCardTransactions","list_cards":"listCards","list_cash_accounts":"listCashAccounts","list_cash_statements":"listCashStatements","list_cash_transactions":"listCashTransactions","list_departments":"listDepartments","list_expenses":"listExpenses","list_locations":"listLocations","list_spend_limits":"listSpendLimits","list_titles":"listTitles","list_transfers":"listTransfers","list_users":"listUsers","list_vendors":"listVendors","match_receipt":"matchReceipt","update_expense":"updateExpenseMemo","update_vendor":"updateVendor","upload_receipt":"uploadReceipt"},"params":{"action":{"oauthCredential":"credential"}}},"brightdata":{"namespace":"legacy.brightdata","methods":{"cancel_snapshot":"cancelSnapshot","discover":"discover","download_snapshot":"downloadSnapshot","scrape_dataset":"scrapeDataset","scrape_url":"scrapeUrl","serp_search":"serpSearch","snapshot_status":"snapshotStatus","sync_scrape":"syncScrape"}},"brightdata_v2":{"namespace":"brightdata","methods":{"cancel_snapshot":"cancelSnapshot","discover":"discover","download_snapshot":"downloadSnapshot","scrape_dataset":"scrapeDataset","scrape_url":"scrapeUrl","serp_search":"serpSearch","snapshot_status":"snapshotStatus","sync_scrape":"syncScrape"},"params":{"action":{"oauthCredential":"credential"}}},"browser_use":{"namespace":"legacy.browserUse"},"browser_use_v2":{"namespace":"browserUse","params":{"action":{"oauthCredential":"credential"}}},"buffer":{"namespace":"legacy.buffer","methods":{"create_idea":"createIdea","create_post":"createPost","delete_post":"deletePost","edit_post":"editPost","get_account":"getAccount","get_aggregated_post_metrics":"getAggregatedPostMetrics","get_channel":"getChannel","get_channels":"getChannels","get_daily_posting_limits":"getDailyPostingLimits","get_idea_groups":"getIdeaGroups","get_ideas":"getIdeas","get_post":"getPost","get_posts":"getPosts"}},"buffer_v2":{"namespace":"buffer","methods":{"create_idea":"createIdea","create_post":"createPost","delete_post":"deletePost","edit_post":"editPost","get_account":"getAccount","get_aggregated_post_metrics":"getAggregatedPostMetrics","get_channel":"getChannel","get_channels":"getChannels","get_daily_posting_limits":"getDailyPostingLimits","get_idea_groups":"getIdeaGroups","get_ideas":"getIdeas","get_post":"getPost","get_posts":"getPosts"},"params":{"action":{"oauthCredential":"credential"}}},"calcom":{"namespace":"calcom","methods":{"calcom_cancel_booking":"cancelBooking","calcom_confirm_booking":"confirmBooking","calcom_create_booking":"createBooking","calcom_create_event_type":"createEventType","calcom_create_schedule":"createSchedule","calcom_decline_booking":"declineBooking","calcom_delete_event_type":"deleteEventType","calcom_delete_schedule":"deleteSchedule","calcom_get_booking":"getBooking","calcom_get_default_schedule":"getDefaultSchedule","calcom_get_event_type":"getEventType","calcom_get_schedule":"getSchedule","calcom_get_slots":"getAvailableSlots","calcom_list_bookings":"listBookings","calcom_list_event_types":"listEventTypes","calcom_list_schedules":"listSchedules","calcom_reschedule_booking":"rescheduleBooking","calcom_update_event_type":"updateEventType","calcom_update_schedule":"updateSchedule"},"triggers":{"calcom_booking_cancelled":"bookingCancelled","calcom_booking_created":"bookingCreated","calcom_booking_paid":"bookingPaid","calcom_booking_rejected":"bookingRejected","calcom_booking_requested":"bookingRequested","calcom_booking_rescheduled":"bookingRescheduled","calcom_meeting_ended":"meetingEnded","calcom_recording_ready":"recordingReady","calcom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"calendly":{"namespace":"legacy.calendly","methods":{"calendly_cancel_event":"cancelEvent","calendly_create_event_invitee":"bookMeeting","calendly_create_invitee_no_show":"markInviteeNoShow","calendly_create_scheduling_link":"createSchedulingLink","calendly_delete_invitee_no_show":"unmarkInviteeNoShow","calendly_get_current_user":"getCurrentUser","calendly_get_event_invitee":"getEventInvitee","calendly_get_event_type":"getEventType","calendly_get_scheduled_event":"getScheduledEvent","calendly_get_user":"getUser","calendly_list_event_invitees":"listEventInvitees","calendly_list_event_type_available_times":"listEventTypeAvailableTimes","calendly_list_event_types":"listEventTypes","calendly_list_organization_memberships":"listOrganizationMemberships","calendly_list_routing_form_submissions":"listRoutingFormSubmissions","calendly_list_routing_forms":"listRoutingForms","calendly_list_scheduled_events":"listScheduledEvents","calendly_list_user_availability_schedules":"listUserAvailabilitySchedules","calendly_list_user_busy_times":"listUserBusyTimes"},"triggers":{"calendly_invitee_canceled":"inviteeCanceled","calendly_invitee_created":"inviteeCreated","calendly_routing_form_submitted":"routingFormSubmitted","calendly_webhook":"webhook"}},"calendly_v2":{"namespace":"calendly","methods":{"calendly_cancel_event":"cancelEvent","calendly_create_event_invitee":"bookMeeting","calendly_create_invitee_no_show":"markInviteeNoShow","calendly_create_scheduling_link":"createSchedulingLink","calendly_delete_invitee_no_show":"unmarkInviteeNoShow","calendly_get_current_user":"getCurrentUser","calendly_get_event_invitee":"getEventInvitee","calendly_get_event_type":"getEventType","calendly_get_scheduled_event":"getScheduledEvent","calendly_get_user":"getUser","calendly_list_event_invitees":"listEventInvitees","calendly_list_event_type_available_times":"listEventTypeAvailableTimes","calendly_list_event_types":"listEventTypes","calendly_list_organization_memberships":"listOrganizationMemberships","calendly_list_routing_form_submissions":"listRoutingFormSubmissions","calendly_list_routing_forms":"listRoutingForms","calendly_list_scheduled_events":"listScheduledEvents","calendly_list_user_availability_schedules":"listUserAvailabilitySchedules","calendly_list_user_busy_times":"listUserBusyTimes"},"triggers":{"calendly_invitee_canceled":"inviteeCanceled","calendly_invitee_created":"inviteeCreated","calendly_routing_form_submitted":"routingFormSubmitted","calendly_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"cbinsights":{"namespace":"legacy.cbinsights","methods":{"chat":"askChatCbi","get_commercial_maturity_history":"getCommercialMaturityHistory","get_exit_probability_history":"getExitProbabilityHistory","get_mosaic_history":"getMosaicHistory","get_org_business_relationships":"getOrganizationBusinessRelationships","get_org_funding_window":"getOrganizationFundingWindow","get_org_fundings":"getOrganizationFundings","get_org_investments":"getOrganizationInvestments","get_org_management_and_board":"getOrganizationManagementAndBoard","get_org_outlook":"getOrganizationOutlook","get_org_portfolio_exits":"getOrganizationPortfolioExits","get_org_revenue":"getOrganizationRevenue","get_scouting_report":"getScoutingReport","get_strategy_map":"getStrategyMap","list_business_relationships":"listBusinessRelationships","list_funding_window":"listFundingWindows","list_fundings":"listFundings","list_investments":"listInvestments","list_management_and_board":"listManagementAndBoard","list_outlook":"listOutlook","list_portfolio_exits":"listPortfolioExits","list_revenue":"listRevenue","lookup_organizations":"lookUpOrganizations","rag":"retrieveContext","search_firmographics":"searchFirmographics"}},"cbinsights_v2":{"namespace":"cbinsights","methods":{"chat":"askChatCbi","get_commercial_maturity_history":"getCommercialMaturityHistory","get_exit_probability_history":"getExitProbabilityHistory","get_mosaic_history":"getMosaicHistory","get_org_business_relationships":"getOrganizationBusinessRelationships","get_org_funding_window":"getOrganizationFundingWindow","get_org_fundings":"getOrganizationFundings","get_org_investments":"getOrganizationInvestments","get_org_management_and_board":"getOrganizationManagementAndBoard","get_org_outlook":"getOrganizationOutlook","get_org_portfolio_exits":"getOrganizationPortfolioExits","get_org_revenue":"getOrganizationRevenue","get_scouting_report":"getScoutingReport","get_strategy_map":"getStrategyMap","list_business_relationships":"listBusinessRelationships","list_funding_window":"listFundingWindows","list_fundings":"listFundings","list_investments":"listInvestments","list_management_and_board":"listManagementAndBoard","list_outlook":"listOutlook","list_portfolio_exits":"listPortfolioExits","list_revenue":"listRevenue","lookup_organizations":"lookUpOrganizations","rag":"retrieveContext","search_firmographics":"searchFirmographics"},"params":{"action":{"oauthCredential":"credential"}}},"chat_trigger":{"namespace":"legacy.chatTrigger"},"checkr":{"namespace":"legacy.checkr","methods":{"add_report_tag":"addReportTag","apply_report_review_action":"applyReportReviewAction","cancel_adverse_action":"cancelAdverseAction","cancel_continuous_check":"cancelContinuousCheck","cancel_invitation":"cancelInvitation","cancel_subscription":"cancelSubscription","complete_report":"completeReport","create_adverse_action":"createAdverseAction","create_candidate":"createCandidate","create_continuous_check":"createContinuousCheck","create_geo":"createGeo","create_invitation":"inviteCandidate","create_report":"orderReport","create_subscription":"scheduleRecurringCheck","delete_candidate_pii":"deleteCandidatePii","delete_geo":"deleteGeo","get_account":"getAccount","get_adverse_action":"getAdverseAction","get_candidate":"getCandidate","get_continuous_check":"getContinuousCheck","get_document":"getDocument","get_geo":"getGeo","get_invitation":"getInvitation","get_node":"getNode","get_package":"getPackage","get_program":"getProgram","get_report":"getReport","get_report_eta":"getReportEta","get_report_progressive_status":"getReportCheckpoints","get_report_tags":"getReportTags","get_screening":"getScreening","get_subscription":"getSubscription","get_verification":"getVerification","list_adverse_actions":"listAdverseActions","list_adverse_items":"listAdverseItems","list_assessments":"listAssessments","list_candidate_documents":"listCandidateDocuments","list_candidates":"listCandidates","list_continuous_checks":"listContinuousChecks","list_counties":"listCounties","list_geos":"listGeos","list_invitations":"listInvitations","list_nodes":"listNodes","list_packages":"listPackages","list_programs":"listPrograms","list_report_addresses":"listReportAddresses","list_subscriptions":"listSubscriptions","list_users":"listUsers","list_verifications":"listVerifications","remove_report_tag":"removeReportTag","set_report_tags":"setReportTags","update_candidate":"updateCandidate","update_continuous_check":"updateContinuousCheck","update_geo":"updateGeo","update_report":"updateReport","update_subscription":"updateSubscription"},"triggers":{"checkr_adverse_action_canceled":"adverseActionCanceled","checkr_adverse_action_completed":"adverseActionCompleted","checkr_adverse_action_created":"adverseActionCreated","checkr_adverse_action_notice_not_delivered":"adverseActionNoticeNotDelivered","checkr_adverse_action_paused":"adverseActionPaused","checkr_adverse_action_resumed":"adverseActionResumed","checkr_candidate_created":"candidateCreated","checkr_candidate_updated":"candidateUpdated","checkr_continuous_check_confirmation_required":"continuousCheckConfirmationRequired","checkr_continuous_check_subscription_error":"continuousCheckSubscriptionError","checkr_invitation_completed":"invitationCompleted","checkr_invitation_created":"invitationCreated","checkr_invitation_deleted":"invitationDeleted","checkr_invitation_expired":"invitationExpired","checkr_report_canceled":"reportCanceled","checkr_report_completed":"reportCompleted","checkr_report_created":"reportCreated","checkr_report_dispute_completed":"reportDisputeCompleted","checkr_report_disputed":"reportDisputed","checkr_report_engaged":"reportEngaged","checkr_report_paused":"reportPaused","checkr_report_post_adverse_action":"reportPostAdverseAction","checkr_report_pre_adverse_action":"reportPreAdverseAction","checkr_report_resumed":"reportResumed","checkr_report_suspended":"reportSuspended","checkr_report_updated":"reportUpdated","checkr_report_upgraded":"reportUpgraded","checkr_verification_completed":"verificationCompleted","checkr_verification_created":"verificationCreated","checkr_verification_processed":"verificationProcessed","checkr_webhook":"webhook"}},"checkr_v2":{"namespace":"checkr","methods":{"add_report_tag":"addReportTag","apply_report_review_action":"applyReportReviewAction","cancel_adverse_action":"cancelAdverseAction","cancel_continuous_check":"cancelContinuousCheck","cancel_invitation":"cancelInvitation","cancel_subscription":"cancelSubscription","complete_report":"completeReport","create_adverse_action":"createAdverseAction","create_candidate":"createCandidate","create_continuous_check":"createContinuousCheck","create_geo":"createGeo","create_invitation":"inviteCandidate","create_report":"orderReport","create_subscription":"scheduleRecurringCheck","delete_candidate_pii":"deleteCandidatePii","delete_geo":"deleteGeo","get_account":"getAccount","get_adverse_action":"getAdverseAction","get_candidate":"getCandidate","get_continuous_check":"getContinuousCheck","get_document":"getDocument","get_geo":"getGeo","get_invitation":"getInvitation","get_node":"getNode","get_package":"getPackage","get_program":"getProgram","get_report":"getReport","get_report_eta":"getReportEta","get_report_progressive_status":"getReportCheckpoints","get_report_tags":"getReportTags","get_screening":"getScreening","get_subscription":"getSubscription","get_verification":"getVerification","list_adverse_actions":"listAdverseActions","list_adverse_items":"listAdverseItems","list_assessments":"listAssessments","list_candidate_documents":"listCandidateDocuments","list_candidates":"listCandidates","list_continuous_checks":"listContinuousChecks","list_counties":"listCounties","list_geos":"listGeos","list_invitations":"listInvitations","list_nodes":"listNodes","list_packages":"listPackages","list_programs":"listPrograms","list_report_addresses":"listReportAddresses","list_subscriptions":"listSubscriptions","list_users":"listUsers","list_verifications":"listVerifications","remove_report_tag":"removeReportTag","set_report_tags":"setReportTags","update_candidate":"updateCandidate","update_continuous_check":"updateContinuousCheck","update_geo":"updateGeo","update_report":"updateReport","update_subscription":"updateSubscription"},"triggers":{"checkr_adverse_action_canceled":"adverseActionCanceled","checkr_adverse_action_completed":"adverseActionCompleted","checkr_adverse_action_created":"adverseActionCreated","checkr_adverse_action_notice_not_delivered":"adverseActionNoticeNotDelivered","checkr_adverse_action_paused":"adverseActionPaused","checkr_adverse_action_resumed":"adverseActionResumed","checkr_candidate_created":"candidateCreated","checkr_candidate_updated":"candidateUpdated","checkr_continuous_check_confirmation_required":"continuousCheckConfirmationRequired","checkr_continuous_check_subscription_error":"continuousCheckSubscriptionError","checkr_invitation_completed":"invitationCompleted","checkr_invitation_created":"invitationCreated","checkr_invitation_deleted":"invitationDeleted","checkr_invitation_expired":"invitationExpired","checkr_report_canceled":"reportCanceled","checkr_report_completed":"reportCompleted","checkr_report_created":"reportCreated","checkr_report_dispute_completed":"reportDisputeCompleted","checkr_report_disputed":"reportDisputed","checkr_report_engaged":"reportEngaged","checkr_report_paused":"reportPaused","checkr_report_post_adverse_action":"reportPostAdverseAction","checkr_report_pre_adverse_action":"reportPreAdverseAction","checkr_report_resumed":"reportResumed","checkr_report_suspended":"reportSuspended","checkr_report_updated":"reportUpdated","checkr_report_upgraded":"reportUpgraded","checkr_verification_completed":"verificationCompleted","checkr_verification_created":"verificationCreated","checkr_verification_processed":"verificationProcessed","checkr_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"circleback":{"namespace":"legacy.circleback","methods":{"add_tag_to_meetings":"addTagToMeetings","create_tag":"createTag","delete_action_item":"deleteActionItem","delete_meeting":"deleteMeeting","delete_tag":"deleteTag","get_company":"getCompany","get_meeting":"getMeeting","get_person":"getPerson","get_transcript":"getTranscript","list_action_items":"listActionItems","list_calendar_events":"listCalendarEvents","list_companies":"listCompanies","list_meetings":"listMeetings","list_people":"listPeople","list_tags":"listTags","remove_tag_from_meetings":"removeTagFromMeetings","search_meetings":"searchMeetings","update_action_item":"updateActionItem","update_meeting":"updateMeeting","update_tag":"updateTag"},"triggers":{"circleback_meeting_completed":"meetingCompleted","circleback_meeting_notes":"meetingNotes","circleback_webhook":"webhook"}},"circleback_v2":{"namespace":"circleback","methods":{"add_tag_to_meetings":"addTagToMeetings","create_tag":"createTag","delete_action_item":"deleteActionItem","delete_meeting":"deleteMeeting","delete_tag":"deleteTag","get_company":"getCompany","get_meeting":"getMeeting","get_person":"getPerson","get_transcript":"getTranscript","list_action_items":"listActionItems","list_calendar_events":"listCalendarEvents","list_companies":"listCompanies","list_meetings":"listMeetings","list_people":"listPeople","list_tags":"listTags","remove_tag_from_meetings":"removeTagFromMeetings","search_meetings":"searchMeetings","update_action_item":"updateActionItem","update_meeting":"updateMeeting","update_tag":"updateTag"},"triggers":{"circleback_meeting_completed":"meetingCompleted","circleback_meeting_notes":"meetingNotes","circleback_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"clay":{"namespace":"clay"},"clerk":{"namespace":"legacy.clerk","methods":{"clerk_add_organization_member":"addOrganizationMember","clerk_ban_user":"banUser","clerk_create_actor_token":"createActorToken","clerk_create_allowlist_identifier":"createAllowlistIdentifier","clerk_create_blocklist_identifier":"createBlocklistIdentifier","clerk_create_organization":"createOrganization","clerk_create_organization_invitation":"createOrganizationInvitation","clerk_create_user":"createUser","clerk_delete_allowlist_identifier":"deleteAllowlistIdentifier","clerk_delete_blocklist_identifier":"deleteBlocklistIdentifier","clerk_delete_organization":"deleteOrganization","clerk_delete_user":"deleteUser","clerk_get_jwt_template":"getJwtTemplate","clerk_get_organization":"getOrganization","clerk_get_session":"getSession","clerk_get_user":"getUser","clerk_get_user_oauth_token":"getUserOauthToken","clerk_list_allowlist_identifiers":"listAllowlistIdentifiers","clerk_list_blocklist_identifiers":"listBlocklistIdentifiers","clerk_list_jwt_templates":"listJwtTemplates","clerk_list_organization_invitations":"listOrganizationInvitations","clerk_list_organization_memberships":"listOrganizationMemberships","clerk_list_organizations":"listOrganizations","clerk_list_sessions":"listSessions","clerk_list_users":"listUsers","clerk_lock_user":"lockUser","clerk_remove_organization_member":"removeOrganizationMember","clerk_revoke_actor_token":"revokeActorToken","clerk_revoke_session":"revokeSession","clerk_unban_user":"unbanUser","clerk_unlock_user":"unlockUser","clerk_update_organization":"updateOrganization","clerk_update_organization_membership":"updateOrganizationMembership","clerk_update_user":"updateUser"},"triggers":{"clerk_organization_created":"organizationCreated","clerk_organization_deleted":"organizationDeleted","clerk_organization_membership_created":"organizationMembershipCreated","clerk_organization_membership_deleted":"organizationMembershipDeleted","clerk_organization_membership_updated":"organizationMembershipUpdated","clerk_organization_updated":"organizationUpdated","clerk_session_created":"sessionCreated","clerk_session_ended":"sessionEnded","clerk_session_removed":"sessionRemoved","clerk_session_revoked":"sessionRevoked","clerk_user_created":"userCreated","clerk_user_deleted":"userDeleted","clerk_user_updated":"userUpdated","clerk_webhook":"webhook"}},"clerk_v2":{"namespace":"clerk","methods":{"clerk_add_organization_member":"addOrganizationMember","clerk_ban_user":"banUser","clerk_create_actor_token":"createActorToken","clerk_create_allowlist_identifier":"createAllowlistIdentifier","clerk_create_blocklist_identifier":"createBlocklistIdentifier","clerk_create_organization":"createOrganization","clerk_create_organization_invitation":"createOrganizationInvitation","clerk_create_user":"createUser","clerk_delete_allowlist_identifier":"deleteAllowlistIdentifier","clerk_delete_blocklist_identifier":"deleteBlocklistIdentifier","clerk_delete_organization":"deleteOrganization","clerk_delete_user":"deleteUser","clerk_get_jwt_template":"getJwtTemplate","clerk_get_organization":"getOrganization","clerk_get_session":"getSession","clerk_get_user":"getUser","clerk_get_user_oauth_token":"getUserOauthToken","clerk_list_allowlist_identifiers":"listAllowlistIdentifiers","clerk_list_blocklist_identifiers":"listBlocklistIdentifiers","clerk_list_jwt_templates":"listJwtTemplates","clerk_list_organization_invitations":"listOrganizationInvitations","clerk_list_organization_memberships":"listOrganizationMemberships","clerk_list_organizations":"listOrganizations","clerk_list_sessions":"listSessions","clerk_list_users":"listUsers","clerk_lock_user":"lockUser","clerk_remove_organization_member":"removeOrganizationMember","clerk_revoke_actor_token":"revokeActorToken","clerk_revoke_session":"revokeSession","clerk_unban_user":"unbanUser","clerk_unlock_user":"unlockUser","clerk_update_organization":"updateOrganization","clerk_update_organization_membership":"updateOrganizationMembership","clerk_update_user":"updateUser"},"triggers":{"clerk_organization_created":"organizationCreated","clerk_organization_deleted":"organizationDeleted","clerk_organization_membership_created":"organizationMembershipCreated","clerk_organization_membership_deleted":"organizationMembershipDeleted","clerk_organization_membership_updated":"organizationMembershipUpdated","clerk_organization_updated":"organizationUpdated","clerk_session_created":"sessionCreated","clerk_session_ended":"sessionEnded","clerk_session_removed":"sessionRemoved","clerk_session_revoked":"sessionRevoked","clerk_user_created":"userCreated","clerk_user_deleted":"userDeleted","clerk_user_updated":"userUpdated","clerk_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"clickhouse":{"namespace":"clickhouse","methods":{"count_rows":"countRows","create_database":"createDatabase","create_table":"createTable","delete":"deleteData","describe_table":"describeTable","drop_database":"dropDatabase","drop_partition":"dropPartition","drop_table":"dropTable","execute":"executeRawSql","insert":"insertRow","insert_rows":"insertRowsBulk","introspect":"introspectSchema","kill_query":"killQuery","list_clusters":"listClusters","list_databases":"listDatabases","list_mutations":"listMutations","list_partitions":"listPartitions","list_running_queries":"listRunningQueries","list_tables":"listTables","optimize_table":"optimizeTable","query":"querySelect","rename_table":"renameTable","show_create_table":"showCreateTable","table_stats":"tableStats","truncate_table":"truncateTable","update":"updateData"}},"clickup":{"namespace":"clickup","methods":{"add_tag_to_task":"addTagToTask","create_checklist":"createChecklist","create_checklist_item":"createChecklistItem","create_comment":"createComment","create_folder":"createFolder","create_list":"createList","create_task":"createTask","create_time_entry":"createTimeEntry","delete_checklist":"deleteChecklist","delete_checklist_item":"deleteChecklistItem","delete_comment":"deleteComment","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","get_comments":"getComments","get_custom_fields":"getCustomFields","get_folders":"getFolders","get_list_members":"getListMembers","get_lists":"getLists","get_running_timer":"getRunningTimer","get_space_tags":"getSpaceTags","get_spaces":"getSpaces","get_task":"getTask","get_task_members":"getTaskMembers","get_tasks":"getTasks","get_time_entries":"getTimeEntries","get_workspaces":"getWorkspaces","remove_custom_field_value":"removeCustomFieldValue","remove_tag_from_task":"removeTagFromTask","search_tasks":"searchTasks","set_custom_field_value":"setCustomFieldValue","start_timer":"startTimer","stop_timer":"stopTimer","update_checklist":"updateChecklist","update_checklist_item":"updateChecklistItem","update_comment":"updateComment","update_task":"updateTask","update_time_entry":"updateTimeEntry","upload_attachment":"uploadAttachment"},"triggers":{"clickup_folder_created":"folderCreated","clickup_folder_deleted":"folderDeleted","clickup_folder_updated":"folderUpdated","clickup_goal_created":"goalCreated","clickup_goal_deleted":"goalDeleted","clickup_goal_updated":"goalUpdated","clickup_key_result_created":"keyResultCreated","clickup_key_result_deleted":"keyResultDeleted","clickup_key_result_updated":"keyResultUpdated","clickup_list_created":"listCreated","clickup_list_deleted":"listDeleted","clickup_list_updated":"listUpdated","clickup_space_created":"spaceCreated","clickup_space_deleted":"spaceDeleted","clickup_space_updated":"spaceUpdated","clickup_task_assignee_updated":"taskAssigneeUpdated","clickup_task_comment_posted":"taskCommentPosted","clickup_task_comment_updated":"taskCommentUpdated","clickup_task_created":"taskCreated","clickup_task_deleted":"taskDeleted","clickup_task_due_date_updated":"taskDueDateUpdated","clickup_task_moved":"taskMoved","clickup_task_priority_updated":"taskPriorityUpdated","clickup_task_status_updated":"taskStatusUpdated","clickup_task_tag_updated":"taskTagUpdated","clickup_task_time_estimate_updated":"taskTimeEstimateUpdated","clickup_task_time_tracked_updated":"taskTimeTrackedUpdated","clickup_task_updated":"taskUpdated","clickup_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"cloudflare":{"namespace":"legacy.cloudflare","methods":{"create_access_application":"createAccessApplication","create_access_group":"createAccessGroup","create_access_policy":"createAccessPolicy","create_access_service_token":"createAccessServiceToken","create_dns_record":"createDnsRecord","create_r2_bucket":"createR2Bucket","create_rate_limit_rule":"createRateLimitingRule","create_ruleset":"createRuleset","create_ruleset_rule":"createRulesetRule","create_tunnel":"createTunnel","create_worker_route":"createWorkerRoute","create_zone":"createZone","delete_access_application":"deleteAccessApplication","delete_access_group":"deleteAccessGroup","delete_access_policy":"deleteAccessPolicy","delete_dns_record":"deleteDnsRecord","delete_r2_bucket":"deleteR2Bucket","delete_r2_bucket_cors":"deleteR2BucketCors","delete_ruleset":"deleteRuleset","delete_ruleset_rule":"deleteRulesetRule","delete_tunnel":"deleteTunnel","delete_worker_route":"deleteWorkerRoute","delete_worker_script":"deleteWorkerScript","delete_zone":"deleteZone","dns_analytics":"dnsAnalytics","get_access_application":"getAccessApplication","get_access_group":"getAccessGroup","get_access_policy":"getAccessPolicy","get_access_service_token":"getAccessServiceToken","get_dns_record":"getDnsRecord","get_r2_bucket":"getR2Bucket","get_r2_bucket_cors":"getR2BucketCors","get_r2_bucket_lifecycle":"getR2BucketLifecycle","get_ruleset":"getRuleset","get_ruleset_entrypoint":"getPhaseEntryPointRuleset","get_tunnel":"getTunnel","get_tunnel_configuration":"getTunnelConfiguration","get_tunnel_token":"getTunnelToken","get_worker_route":"getWorkerRoute","get_worker_script_settings":"getWorkerScriptSettings","get_zone":"getZoneDetails","get_zone_settings":"getZoneSettings","list_access_applications":"listAccessApplications","list_access_groups":"listAccessGroups","list_access_identity_providers":"listAccessIdentityProviders","list_access_policies":"listAccessPolicies","list_access_service_tokens":"listAccessServiceTokens","list_certificates":"listCertificates","list_dns_records":"listDnsRecords","list_managed_ruleset_overrides":"listManagedRulesetOverrides","list_r2_buckets":"listR2Buckets","list_rate_limit_rules":"listRateLimitingRules","list_rulesets":"listRulesets","list_tunnels":"listTunnels","list_worker_routes":"listWorkerRoutes","list_worker_scripts":"listWorkerScripts","list_zones":"listZones","purge_cache":"purgeCache","refresh_access_service_token":"refreshAccessServiceToken","revoke_access_service_token":"revokeAccessServiceToken","rotate_access_service_token":"rotateAccessServiceToken","update_access_application":"updateAccessApplication","update_access_group":"updateAccessGroup","update_access_policy":"updateAccessPolicy","update_access_service_token":"updateAccessServiceToken","update_dns_record":"updateDnsRecord","update_r2_bucket_cors":"updateR2BucketCors","update_r2_bucket_lifecycle":"updateR2BucketLifecycle","update_rate_limit_rule":"updateRateLimitingRule","update_ruleset":"updateRuleset","update_ruleset_rule":"updateRulesetRule","update_tunnel":"updateTunnel","update_tunnel_configuration":"updateTunnelConfiguration","update_worker_route":"updateWorkerRoute","update_zone":"updateZone","update_zone_setting":"updateZoneSetting"}},"cloudflare_v2":{"namespace":"cloudflare","methods":{"create_access_application":"createAccessApplication","create_access_group":"createAccessGroup","create_access_policy":"createAccessPolicy","create_access_service_token":"createAccessServiceToken","create_dns_record":"createDnsRecord","create_r2_bucket":"createR2Bucket","create_rate_limit_rule":"createRateLimitingRule","create_ruleset":"createRuleset","create_ruleset_rule":"createRulesetRule","create_tunnel":"createTunnel","create_worker_route":"createWorkerRoute","create_zone":"createZone","delete_access_application":"deleteAccessApplication","delete_access_group":"deleteAccessGroup","delete_access_policy":"deleteAccessPolicy","delete_dns_record":"deleteDnsRecord","delete_r2_bucket":"deleteR2Bucket","delete_r2_bucket_cors":"deleteR2BucketCors","delete_ruleset":"deleteRuleset","delete_ruleset_rule":"deleteRulesetRule","delete_tunnel":"deleteTunnel","delete_worker_route":"deleteWorkerRoute","delete_worker_script":"deleteWorkerScript","delete_zone":"deleteZone","dns_analytics":"dnsAnalytics","get_access_application":"getAccessApplication","get_access_group":"getAccessGroup","get_access_policy":"getAccessPolicy","get_access_service_token":"getAccessServiceToken","get_dns_record":"getDnsRecord","get_r2_bucket":"getR2Bucket","get_r2_bucket_cors":"getR2BucketCors","get_r2_bucket_lifecycle":"getR2BucketLifecycle","get_ruleset":"getRuleset","get_ruleset_entrypoint":"getPhaseEntryPointRuleset","get_tunnel":"getTunnel","get_tunnel_configuration":"getTunnelConfiguration","get_tunnel_token":"getTunnelToken","get_worker_route":"getWorkerRoute","get_worker_script_settings":"getWorkerScriptSettings","get_zone":"getZoneDetails","get_zone_settings":"getZoneSettings","list_access_applications":"listAccessApplications","list_access_groups":"listAccessGroups","list_access_identity_providers":"listAccessIdentityProviders","list_access_policies":"listAccessPolicies","list_access_service_tokens":"listAccessServiceTokens","list_certificates":"listCertificates","list_dns_records":"listDnsRecords","list_managed_ruleset_overrides":"listManagedRulesetOverrides","list_r2_buckets":"listR2Buckets","list_rate_limit_rules":"listRateLimitingRules","list_rulesets":"listRulesets","list_tunnels":"listTunnels","list_worker_routes":"listWorkerRoutes","list_worker_scripts":"listWorkerScripts","list_zones":"listZones","purge_cache":"purgeCache","refresh_access_service_token":"refreshAccessServiceToken","revoke_access_service_token":"revokeAccessServiceToken","rotate_access_service_token":"rotateAccessServiceToken","update_access_application":"updateAccessApplication","update_access_group":"updateAccessGroup","update_access_policy":"updateAccessPolicy","update_access_service_token":"updateAccessServiceToken","update_dns_record":"updateDnsRecord","update_r2_bucket_cors":"updateR2BucketCors","update_r2_bucket_lifecycle":"updateR2BucketLifecycle","update_rate_limit_rule":"updateRateLimitingRule","update_ruleset":"updateRuleset","update_ruleset_rule":"updateRulesetRule","update_tunnel":"updateTunnel","update_tunnel_configuration":"updateTunnelConfiguration","update_worker_route":"updateWorkerRoute","update_zone":"updateZone","update_zone_setting":"updateZoneSetting"},"params":{"action":{"oauthCredential":"credential"}}},"cloudformation":{"namespace":"legacy.cloudformation","methods":{"cancel_update_stack":"cancelUpdateStack","create_change_set":"createChangeSet","create_stack":"createStack","delete_stack":"deleteStack","describe_change_set":"describeChangeSet","describe_stack_drift_detection_status":"driftDetectionStatus","describe_stack_events":"describeStackEvents","describe_stacks":"describeStacks","detect_stack_drift":"detectStackDrift","execute_change_set":"executeChangeSet","get_template":"getTemplate","get_template_summary":"getTemplateSummary","list_stack_resources":"listStackResources","update_stack":"updateStack","validate_template":"validateTemplate"}},"cloudformation_v2":{"namespace":"cloudformation","methods":{"cancel_update_stack":"cancelUpdateStack","create_change_set":"createChangeSet","create_stack":"createStack","delete_stack":"deleteStack","describe_change_set":"describeChangeSet","describe_stack_drift_detection_status":"driftDetectionStatus","describe_stack_events":"describeStackEvents","describe_stacks":"describeStacks","detect_stack_drift":"detectStackDrift","execute_change_set":"executeChangeSet","get_template":"getTemplate","get_template_summary":"getTemplateSummary","list_stack_resources":"listStackResources","update_stack":"updateStack","validate_template":"validateTemplate"},"params":{"action":{"oauthCredential":"credential"}}},"cloudtrail":{"namespace":"legacy.cloudtrail","methods":{"cancel_query":"cancelLakeQuery","describe_query":"describeLakeQuery","describe_trails":"describeTrails","get_event_data_store":"getEventDataStore","get_event_selectors":"getEventSelectors","get_insight_selectors":"getInsightSelectors","get_query_results":"getLakeQueryResults","get_trail":"getTrail","get_trail_status":"getTrailStatus","list_event_data_stores":"listEventDataStores","list_tags":"listTags","list_trails":"listTrails","lookup_events":"lookUpEvents","start_query":"startLakeQuery"}},"cloudtrail_v2":{"namespace":"cloudtrail","methods":{"cancel_query":"cancelLakeQuery","describe_query":"describeLakeQuery","describe_trails":"describeTrails","get_event_data_store":"getEventDataStore","get_event_selectors":"getEventSelectors","get_insight_selectors":"getInsightSelectors","get_query_results":"getLakeQueryResults","get_trail":"getTrail","get_trail_status":"getTrailStatus","list_event_data_stores":"listEventDataStores","list_tags":"listTags","list_trails":"listTrails","lookup_events":"lookUpEvents","start_query":"startLakeQuery"},"params":{"action":{"oauthCredential":"credential"}}},"cloudwatch":{"namespace":"legacy.cloudwatch","methods":{"describe_alarm_history":"describeAlarmHistory","describe_alarms":"describeAlarms","describe_log_groups":"describeLogGroups","describe_log_streams":"describeLogStreams","filter_log_events":"filterLogEvents","get_log_events":"getLogEvents","get_metric_statistics":"getMetricStatistics","list_metrics":"listMetrics","mute_alarm":"muteAlarm","put_log_group_retention":"setLogGroupRetention","put_metric_data":"publishMetric","query_logs":"queryLogsInsights","unmute_alarm":"unmuteAlarm"}},"cloudwatch_v2":{"namespace":"cloudwatch","methods":{"describe_alarm_history":"describeAlarmHistory","describe_alarms":"describeAlarms","describe_log_groups":"describeLogGroups","describe_log_streams":"describeLogStreams","filter_log_events":"filterLogEvents","get_log_events":"getLogEvents","get_metric_statistics":"getMetricStatistics","list_metrics":"listMetrics","mute_alarm":"muteAlarm","put_log_group_retention":"setLogGroupRetention","put_metric_data":"publishMetric","query_logs":"queryLogsInsights","unmute_alarm":"unmuteAlarm"},"params":{"action":{"oauthCredential":"credential"}}},"coda":{"namespace":"coda","methods":{"add_custom_domain":"addCustomDomain","add_permission":"shareDoc","change_user_role":"changeUserRole","create_doc":"createDoc","create_folder":"createFolder","create_page":"createPage","delete_custom_domain":"deleteCustomDomain","delete_doc":"deleteDoc","delete_folder":"deleteFolder","delete_page":"deletePage","delete_page_content":"deletePageContent","delete_permission":"removePermission","delete_row":"deleteRow","delete_rows":"deleteRows","export_page":"exportPage","get_acl_settings":"getSharingSettings","get_analytics_last_updated":"getAnalyticsLastUpdated","get_column":"getColumn","get_control":"getControl","get_custom_domain_provider":"getCustomDomainProvider","get_doc":"getDoc","get_doc_analytics_summary":"getDocAnalyticsSummary","get_folder":"getFolder","get_formula":"getFormula","get_mutation_status":"getMutationStatus","get_page":"getPage","get_page_content":"getPageContent","get_page_export_status":"getPageExportStatus","get_row":"getRow","get_sharing_metadata":"getSharingMetadata","get_table":"getTable","list_categories":"listDocCategories","list_columns":"listColumns","list_controls":"listControls","list_custom_domains":"listCustomDomains","list_doc_analytics":"listDocAnalytics","list_docs":"listDocs","list_folder_children":"listSubfolders","list_folders":"listFolders","list_formulas":"listFormulas","list_page_analytics":"listPageAnalytics","list_pages":"listPages","list_permissions":"listPermissions","list_rows":"listRows","list_tables":"listTables","list_workspace_members":"listWorkspaceMembers","list_workspace_roles":"listWorkspaceRoleActivity","publish_doc":"publishDoc","push_button":"pushButton","resolve_browser_link":"resolveBrowserLink","search_principals":"searchUsersAndGroups","trigger_automation":"triggerAutomation","unpublish_doc":"unpublishDoc","update_acl_settings":"updateSharingSettings","update_doc":"updateDoc","update_folder":"updateFolder","update_page":"updatePage","update_row":"updateRow","upsert_rows":"insertOrUpsertRows","whoami":"getCurrentUser"},"params":{"action":{"oauthCredential":"credential"}}},"codepipeline":{"namespace":"legacy.codepipeline","methods":{"disable_stage_transition":"disableStageTransition","enable_stage_transition":"enableStageTransition","get_pipeline":"getPipelineStructure","get_pipeline_execution":"getExecution","get_pipeline_state":"getPipelineState","list_action_executions":"listActionExecutions","list_pipeline_executions":"listExecutions","list_pipelines":"listPipelines","put_approval_result":"approveRejectApproval","retry_stage_execution":"retryStage","start_execution":"startExecution","stop_execution":"stopExecution"}},"codepipeline_v2":{"namespace":"codepipeline","methods":{"disable_stage_transition":"disableStageTransition","enable_stage_transition":"enableStageTransition","get_pipeline":"getPipelineStructure","get_pipeline_execution":"getExecution","get_pipeline_state":"getPipelineState","list_action_executions":"listActionExecutions","list_pipeline_executions":"listExecutions","list_pipelines":"listPipelines","put_approval_result":"approveRejectApproval","retry_stage_execution":"retryStage","start_execution":"startExecution","stop_execution":"stopExecution"},"params":{"action":{"oauthCredential":"credential"}}},"condition":{"namespace":"condition"},"confluence":{"namespace":"legacy.confluence","methods":{"create":"createPage","create_comment":"createComment","delete":"deletePage","delete_attachment":"deleteAttachment","delete_comment":"deleteComment","get_space":"getSpace","list_attachments":"listAttachments","list_comments":"listComments","list_labels":"listLabels","list_spaces":"listSpaces","read":"readPage","search":"searchContent","update":"updatePage","update_comment":"updateComment","upload_attachment":"uploadAttachment"},"params":{"action":{"oauthCredential":"credential"}}},"confluence_v2":{"namespace":"confluence","methods":{"add_label":"addLabel","create":"createPage","create_blogpost":"createBlogPost","create_comment":"createComment","create_page_property":"createPageProperty","create_space":"createSpace","create_space_property":"createSpaceProperty","delete":"deletePage","delete_attachment":"deleteAttachment","delete_blogpost":"deleteBlogPost","delete_comment":"deleteComment","delete_label":"deleteLabel","delete_page_property":"deletePageProperty","delete_space":"deleteSpace","delete_space_property":"deleteSpaceProperty","get_blogpost":"getBlogPost","get_page_ancestors":"getPageAncestors","get_page_children":"getPageChildren","get_page_descendants":"getPageDescendants","get_page_version":"getPageVersion","get_pages_by_label":"getPagesByLabel","get_space":"getSpace","get_task":"getTask","get_user":"getUser","list_attachments":"listAttachments","list_blogposts":"listBlogPosts","list_blogposts_in_space":"listBlogPostsInSpace","list_comments":"listComments","list_labels":"listLabels","list_page_properties":"listPageProperties","list_page_versions":"listPageVersions","list_pages_in_space":"listPagesInSpace","list_space_labels":"listSpaceLabels","list_space_permissions":"listSpacePermissions","list_space_properties":"listSpaceProperties","list_spaces":"listSpaces","list_tasks":"listTasks","read":"readPage","search":"searchContent","search_in_space":"searchInSpace","update":"updatePage","update_blogpost":"updateBlogPost","update_comment":"updateComment","update_space":"updateSpace","update_task":"updateTask","upload_attachment":"uploadAttachment"},"triggers":{"confluence_attachment_created":"attachmentCreated","confluence_attachment_removed":"attachmentRemoved","confluence_attachment_updated":"attachmentUpdated","confluence_blog_created":"blogCreated","confluence_blog_removed":"blogRemoved","confluence_blog_restored":"blogRestored","confluence_blog_updated":"blogUpdated","confluence_comment_created":"commentCreated","confluence_comment_removed":"commentRemoved","confluence_comment_updated":"commentUpdated","confluence_label_added":"labelAdded","confluence_label_removed":"labelRemoved","confluence_page_created":"pageCreated","confluence_page_moved":"pageMoved","confluence_page_permissions_updated":"pagePermissionsUpdated","confluence_page_removed":"pageRemoved","confluence_page_restored":"pageRestored","confluence_page_updated":"pageUpdated","confluence_space_created":"spaceCreated","confluence_space_removed":"spaceRemoved","confluence_space_updated":"spaceUpdated","confluence_user_created":"userCreated","confluence_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"context_dev":{"namespace":"contextDev","methods":{"classify_naics":"classifyNaics","classify_sic":"classifySic","crawl":"crawlWebsite","extract":"extractStructuredData","extract_product":"extractProduct","extract_products":"extractProducts","get_brand":"getBrandByDomain","get_brand_by_email":"getBrandByEmail","get_brand_by_name":"getBrandByName","get_brand_by_ticker":"getBrandByTicker","identify_transaction":"identifyTransaction","map":"mapSitemap","scrape_fonts":"scrapeFonts","scrape_html":"scrapeHtml","scrape_images":"scrapeImages","scrape_markdown":"scrapeMarkdown","scrape_styleguide":"scrapeStyleguide","screenshot":"screenshot","search":"webSearch"}},"convex":{"namespace":"legacy.convex","methods":{"action":"runAction","document_deltas":"documentDeltas","list_documents":"listDocuments","list_tables":"listTables","mutation":"runMutation","query":"runQuery","run_function":"runFunction"}},"convex_v2":{"namespace":"convex","methods":{"action":"runAction","document_deltas":"documentDeltas","list_documents":"listDocuments","list_tables":"listTables","mutation":"runMutation","query":"runQuery","run_function":"runFunction"},"params":{"action":{"oauthCredential":"credential"}}},"credential":{"namespace":"credential","methods":{"find_organization_account":"findOrganizationAccount","find_organization_mcp_connection":"findOrganizationMcpConnection","list":"listCredentials","list_organization_accounts":"listOrganizationAccounts","list_organization_mcp_connections":"listOrganizationMcpConnections","select":"selectCredential"},"triggers":{"credential_group_event":"groupEvent"}},"credential_group":{"namespace":"legacy.credentialGroup","methods":{"get_invite_link":"getInviteLink","list_credentials":"listCredentials","list_mcp_connections":"listMcpConnections","list_people":"listPeople","send_invite":"sendInvite"},"triggers":{"credential_group_event":"event"}},"crowdstrike":{"namespace":"legacy.crowdstrike","methods":{"crowdstrike_create_indicators":"createIndicators","crowdstrike_delete_indicators":"deleteIndicators","crowdstrike_delete_rtr_session":"deleteRtrSession","crowdstrike_execute_rtr_command":"executeRtrCommand","crowdstrike_get_alert_details":"getAlertDetails","crowdstrike_get_case_details":"getCaseDetails","crowdstrike_get_host_group_details":"getHostGroupDetails","crowdstrike_get_indicator_details":"getIndicatorDetails","crowdstrike_get_rtr_command_status":"getRtrCommandStatus","crowdstrike_get_sensor_aggregates":"getSensorAggregates","crowdstrike_get_sensor_details":"getSensorDetails","crowdstrike_get_vulnerability_details":"getVulnerabilityDetails","crowdstrike_init_rtr_session":"initRtrSession","crowdstrike_perform_host_action":"performHostAction","crowdstrike_perform_host_group_action":"performHostGroupAction","crowdstrike_query_alerts":"queryAlerts","crowdstrike_query_cases":"queryCases","crowdstrike_query_host_groups":"queryHostGroups","crowdstrike_query_indicators":"queryIndicators","crowdstrike_query_sensors":"querySensors","crowdstrike_query_vulnerabilities":"queryVulnerabilities","crowdstrike_update_alerts":"updateAlerts","crowdstrike_update_indicators":"updateIndicators"}},"crowdstrike_v2":{"namespace":"crowdstrike","methods":{"crowdstrike_create_indicators":"createIndicators","crowdstrike_delete_indicators":"deleteIndicators","crowdstrike_delete_rtr_session":"deleteRtrSession","crowdstrike_execute_rtr_command":"executeRtrCommand","crowdstrike_get_alert_details":"getAlertDetails","crowdstrike_get_case_details":"getCaseDetails","crowdstrike_get_host_group_details":"getHostGroupDetails","crowdstrike_get_indicator_details":"getIndicatorDetails","crowdstrike_get_rtr_command_status":"getRtrCommandStatus","crowdstrike_get_sensor_aggregates":"getSensorAggregates","crowdstrike_get_sensor_details":"getSensorDetails","crowdstrike_get_vulnerability_details":"getVulnerabilityDetails","crowdstrike_init_rtr_session":"initRtrSession","crowdstrike_perform_host_action":"performHostAction","crowdstrike_perform_host_group_action":"performHostGroupAction","crowdstrike_query_alerts":"queryAlerts","crowdstrike_query_cases":"queryCases","crowdstrike_query_host_groups":"queryHostGroups","crowdstrike_query_indicators":"queryIndicators","crowdstrike_query_sensors":"querySensors","crowdstrike_query_vulnerabilities":"queryVulnerabilities","crowdstrike_update_alerts":"updateAlerts","crowdstrike_update_indicators":"updateIndicators"},"params":{"action":{"oauthCredential":"credential"}}},"crunchbase":{"namespace":"legacy.crunchbase","methods":{"autocomplete":"autocomplete","get_acquisition":"getAcquisition","get_entity":"getAnyEntity","get_entity_card":"getEntityCard","get_fields_metadata":"getFieldsMetadata","get_funding_round":"getFundingRound","get_organization":"getOrganization","get_person":"getPerson","list_deleted_entities":"listDeletedEntities","search_acquisitions":"searchAcquisitions","search_entities":"searchAnyCollection","search_funding_rounds":"searchFundingRounds","search_organizations":"searchOrganizations","search_people":"searchPeople"}},"crunchbase_v2":{"namespace":"crunchbase","methods":{"autocomplete":"autocomplete","get_acquisition":"getAcquisition","get_entity":"getAnyEntity","get_entity_card":"getEntityCard","get_fields_metadata":"getFieldsMetadata","get_funding_round":"getFundingRound","get_organization":"getOrganization","get_person":"getPerson","list_deleted_entities":"listDeletedEntities","search_acquisitions":"searchAcquisitions","search_entities":"searchAnyCollection","search_funding_rounds":"searchFundingRounds","search_organizations":"searchOrganizations","search_people":"searchPeople"},"params":{"action":{"oauthCredential":"credential"}}},"cursor":{"namespace":"legacy.cursor","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"}},"cursor_v2":{"namespace":"legacy.cursorV2","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"}},"cursor_v3":{"namespace":"cursor","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"},"params":{"action":{"oauthCredential":"credential"}}},"dagster":{"namespace":"dagster","methods":{"delete_run":"deleteRun","get_asset":"getAsset","get_run":"getRun","get_run_logs":"getRunLogs","launch_run":"launchRun","list_assets":"listAssets","list_jobs":"listJobs","list_runs":"listRuns","list_schedules":"listSchedules","list_sensors":"listSensors","materialize_assets":"materializeAssets","reexecute_run":"reexecuteRun","report_asset_materialization":"reportAssetMaterialization","start_schedule":"startSchedule","start_sensor":"startSensor","stop_schedule":"stopSchedule","stop_sensor":"stopSensor","terminate_run":"terminateRun","wipe_asset":"wipeAsset"}},"databricks":{"namespace":"legacy.databricks","methods":{"cancel_all_runs":"cancelAllRuns","cancel_run":"cancelRun","cancel_statement":"cancelStatement","create_cluster":"createCluster","create_job":"createJob","create_warehouse":"createWarehouse","delete_cluster":"deleteCluster","delete_job":"deleteJob","delete_run":"deleteRun","delete_warehouse":"deleteWarehouse","edit_cluster":"editCluster","edit_warehouse":"editWarehouse","execute_sql":"executeSql","genie_agent_ask":"askGenieAgent","genie_agent_cancel":"cancelGenieAgentResponse","genie_agent_list_items":"listGenieAgentItems","genie_ask":"askGenie","genie_create_space":"createGenieSpace","genie_delete_conversation":"deleteGenieConversation","genie_delete_message":"deleteGenieMessage","genie_delete_space":"trashGenieSpace","genie_download_visualization":"downloadGenieVisualization","genie_execute_query":"executeGenieQuery","genie_get_message":"getGenieMessage","genie_get_query_result":"getGenieQueryResult","genie_get_space":"getGenieSpace","genie_list_conversations":"listGenieConversations","genie_list_messages":"listGenieMessages","genie_list_spaces":"listGenieSpaces","genie_send_feedback":"sendGenieFeedback","genie_update_space":"updateGenieSpace","get_cluster":"getCluster","get_job":"getJob","get_run":"getRun","get_run_output":"getRunOutput","get_statement":"getStatement","get_statement_chunk":"getStatementChunk","get_warehouse":"getWarehouse","list_clusters":"listClusters","list_jobs":"listJobs","list_runs":"listRuns","list_warehouses":"listWarehouses","repair_run":"repairRun","reset_job":"resetJob","resize_cluster":"resizeCluster","restart_cluster":"restartCluster","run_job":"runJob","start_cluster":"startCluster","start_warehouse":"startWarehouse","stop_warehouse":"stopWarehouse","submit_run":"submitRun","terminate_cluster":"terminateCluster","update_job":"updateJob"}},"databricks_v2":{"namespace":"databricks","methods":{"cancel_all_runs":"cancelAllRuns","cancel_run":"cancelRun","cancel_statement":"cancelStatement","create_cluster":"createCluster","create_job":"createJob","create_warehouse":"createWarehouse","delete_cluster":"deleteCluster","delete_job":"deleteJob","delete_run":"deleteRun","delete_warehouse":"deleteWarehouse","edit_cluster":"editCluster","edit_warehouse":"editWarehouse","execute_sql":"executeSql","genie_agent_ask":"askGenieAgent","genie_agent_cancel":"cancelGenieAgentResponse","genie_agent_list_items":"listGenieAgentItems","genie_ask":"askGenie","genie_create_space":"createGenieSpace","genie_delete_conversation":"deleteGenieConversation","genie_delete_message":"deleteGenieMessage","genie_delete_space":"trashGenieSpace","genie_download_visualization":"downloadGenieVisualization","genie_execute_query":"executeGenieQuery","genie_get_message":"getGenieMessage","genie_get_query_result":"getGenieQueryResult","genie_get_space":"getGenieSpace","genie_list_conversations":"listGenieConversations","genie_list_messages":"listGenieMessages","genie_list_spaces":"listGenieSpaces","genie_send_feedback":"sendGenieFeedback","genie_update_space":"updateGenieSpace","get_cluster":"getCluster","get_job":"getJob","get_run":"getRun","get_run_output":"getRunOutput","get_statement":"getStatement","get_statement_chunk":"getStatementChunk","get_warehouse":"getWarehouse","list_clusters":"listClusters","list_jobs":"listJobs","list_runs":"listRuns","list_warehouses":"listWarehouses","repair_run":"repairRun","reset_job":"resetJob","resize_cluster":"resizeCluster","restart_cluster":"restartCluster","run_job":"runJob","start_cluster":"startCluster","start_warehouse":"startWarehouse","stop_warehouse":"stopWarehouse","submit_run":"submitRun","terminate_cluster":"terminateCluster","update_job":"updateJob"},"params":{"action":{"oauthCredential":"credential"}}},"datadog":{"namespace":"legacy.datadog","methods":{"datadog_add_incident_todo":"addIncidentTodo","datadog_cancel_downtime":"cancelDowntime","datadog_create_dashboard":"createDashboard","datadog_create_downtime":"createDowntime","datadog_create_event":"createEvent","datadog_create_incident":"createIncident","datadog_create_monitor":"createMonitor","datadog_create_slo":"createSlo","datadog_delete_dashboard":"deleteDashboard","datadog_delete_slo":"deleteSlo","datadog_get_browser_synthetics_results":"getBrowserSyntheticTestResults","datadog_get_dashboard":"getDashboard","datadog_get_incident":"getIncident","datadog_get_monitor":"getMonitor","datadog_get_security_signal":"getSecuritySignal","datadog_get_slo":"getSlo","datadog_get_slo_history":"getSloHistory","datadog_get_synthetics_results":"getSyntheticTestResults","datadog_get_synthetics_test":"getSyntheticTest","datadog_list_dashboards":"listDashboards","datadog_list_downtimes":"listDowntimes","datadog_list_incidents":"listIncidents","datadog_list_monitors":"listMonitors","datadog_list_security_rules":"listSecurityRules","datadog_list_security_signals":"listSecuritySignals","datadog_list_services":"listServices","datadog_list_slos":"listSlos","datadog_list_synthetics_tests":"listSyntheticTests","datadog_mute_monitor":"muteMonitor","datadog_query_logs":"queryLogs","datadog_query_timeseries":"queryTimeseries","datadog_search_spans":"searchSpans","datadog_send_logs":"sendLogs","datadog_submit_metrics":"submitMetrics","datadog_trigger_synthetics_tests":"triggerSyntheticTests","datadog_unmute_monitor":"unmuteMonitor","datadog_update_incident":"updateIncident","datadog_update_security_signal_assignee":"assignSecuritySignal","datadog_update_security_signal_state":"updateSecuritySignalState","datadog_update_slo":"updateSlo","datadog_update_synthetics_status":"pauseOrStartSyntheticTest"}},"datadog_v2":{"namespace":"datadog","methods":{"datadog_add_incident_todo":"addIncidentTodo","datadog_cancel_downtime":"cancelDowntime","datadog_create_dashboard":"createDashboard","datadog_create_downtime":"createDowntime","datadog_create_event":"createEvent","datadog_create_incident":"createIncident","datadog_create_monitor":"createMonitor","datadog_create_slo":"createSlo","datadog_delete_dashboard":"deleteDashboard","datadog_delete_slo":"deleteSlo","datadog_get_browser_synthetics_results":"getBrowserSyntheticTestResults","datadog_get_dashboard":"getDashboard","datadog_get_incident":"getIncident","datadog_get_monitor":"getMonitor","datadog_get_security_signal":"getSecuritySignal","datadog_get_slo":"getSlo","datadog_get_slo_history":"getSloHistory","datadog_get_synthetics_results":"getSyntheticTestResults","datadog_get_synthetics_test":"getSyntheticTest","datadog_list_dashboards":"listDashboards","datadog_list_downtimes":"listDowntimes","datadog_list_incidents":"listIncidents","datadog_list_monitors":"listMonitors","datadog_list_security_rules":"listSecurityRules","datadog_list_security_signals":"listSecuritySignals","datadog_list_services":"listServices","datadog_list_slos":"listSlos","datadog_list_synthetics_tests":"listSyntheticTests","datadog_mute_monitor":"muteMonitor","datadog_query_logs":"queryLogs","datadog_query_timeseries":"queryTimeseries","datadog_search_spans":"searchSpans","datadog_send_logs":"sendLogs","datadog_submit_metrics":"submitMetrics","datadog_trigger_synthetics_tests":"triggerSyntheticTests","datadog_unmute_monitor":"unmuteMonitor","datadog_update_incident":"updateIncident","datadog_update_security_signal_assignee":"assignSecuritySignal","datadog_update_security_signal_state":"updateSecuritySignalState","datadog_update_slo":"updateSlo","datadog_update_synthetics_status":"pauseOrStartSyntheticTest"},"params":{"action":{"oauthCredential":"credential"}}},"datagma":{"namespace":"datagma","methods":{"datagma_enrich_company":"enrichCompany","datagma_enrich_person":"enrichPerson","datagma_find_email":"findEmail","datagma_find_phone":"findPhone","datagma_get_credits":"getRemainingCredits"}},"daytona":{"namespace":"legacy.daytona","methods":{"create_sandbox":"createSandbox","delete_sandbox":"deleteSandbox","download_file":"downloadFile","execute_command":"executeCommand","get_sandbox":"getSandbox","git_clone":"gitClone","list_files":"listFiles","list_sandboxes":"listSandboxes","run_code":"runCode","start_sandbox":"startSandbox","stop_sandbox":"stopSandbox","upload_file":"uploadFile"}},"daytona_v2":{"namespace":"daytona","methods":{"create_sandbox":"createSandbox","delete_sandbox":"deleteSandbox","download_file":"downloadFile","execute_command":"executeCommand","get_sandbox":"getSandbox","git_clone":"gitClone","list_files":"listFiles","list_sandboxes":"listSandboxes","run_code":"runCode","start_sandbox":"startSandbox","stop_sandbox":"stopSandbox","upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"deployments":{"namespace":"deployments","methods":{"deployments_deploy":"deploy","deployments_get_version":"getVersionDetails","deployments_list_versions":"listVersions","deployments_promote":"promoteVersionToLive","deployments_undeploy":"undeploy"}},"devin":{"namespace":"legacy.devin","methods":{"append_session_tags":"appendSessionTags","archive_session":"archiveSession","create_session":"createSession","get_session":"getSession","get_session_tags":"getSessionTags","list_session_attachments":"listSessionAttachments","list_session_messages":"listSessionMessages","list_sessions":"listSessions","replace_session_tags":"replaceSessionTags","send_message":"sendMessage","terminate_session":"terminateSession"}},"devin_v2":{"namespace":"devin","methods":{"append_session_tags":"appendSessionTags","archive_session":"archiveSession","create_session":"createSession","get_session":"getSession","get_session_tags":"getSessionTags","list_session_attachments":"listSessionAttachments","list_session_messages":"listSessionMessages","list_sessions":"listSessions","replace_session_tags":"replaceSessionTags","send_message":"sendMessage","terminate_session":"terminateSession"},"params":{"action":{"oauthCredential":"credential"}}},"discord":{"namespace":"legacy.discord","methods":{"discord_add_reaction":"addReaction","discord_archive_thread":"archiveThread","discord_assign_role":"assignRole","discord_ban_member":"banMember","discord_bulk_delete_messages":"bulkDeleteMessages","discord_create_channel":"createChannel","discord_create_invite":"createInvite","discord_create_role":"createRole","discord_create_thread":"createThread","discord_create_webhook":"createWebhook","discord_delete_channel":"deleteChannel","discord_delete_invite":"deleteInvite","discord_delete_message":"deleteMessage","discord_delete_role":"deleteRole","discord_delete_webhook":"deleteWebhook","discord_edit_message":"editMessage","discord_execute_webhook":"executeWebhook","discord_get_channel":"getChannel","discord_get_invite":"getInvite","discord_get_member":"getMember","discord_get_messages":"getChannelMessages","discord_get_pinned_messages":"getPinnedMessages","discord_get_server":"getServerInformation","discord_get_user":"getUserInformation","discord_get_webhook":"getWebhook","discord_join_thread":"joinThread","discord_kick_member":"kickMember","discord_leave_thread":"leaveThread","discord_list_channels":"listChannels","discord_list_roles":"listRoles","discord_pin_message":"pinMessage","discord_remove_reaction":"removeReaction","discord_remove_role":"removeRole","discord_send_message":"sendMessage","discord_unban_member":"unbanMember","discord_unpin_message":"unpinMessage","discord_update_channel":"updateChannel","discord_update_member":"updateMember","discord_update_role":"updateRole"}},"discord_v2":{"namespace":"discord","methods":{"discord_add_reaction":"addReaction","discord_archive_thread":"archiveThread","discord_assign_role":"assignRole","discord_ban_member":"banMember","discord_bulk_delete_messages":"bulkDeleteMessages","discord_create_channel":"createChannel","discord_create_invite":"createInvite","discord_create_role":"createRole","discord_create_thread":"createThread","discord_create_webhook":"createWebhook","discord_delete_channel":"deleteChannel","discord_delete_invite":"deleteInvite","discord_delete_message":"deleteMessage","discord_delete_role":"deleteRole","discord_delete_webhook":"deleteWebhook","discord_edit_message":"editMessage","discord_execute_webhook":"executeWebhook","discord_get_channel":"getChannel","discord_get_invite":"getInvite","discord_get_member":"getMember","discord_get_messages":"getChannelMessages","discord_get_pinned_messages":"getPinnedMessages","discord_get_server":"getServerInformation","discord_get_user":"getUserInformation","discord_get_webhook":"getWebhook","discord_join_thread":"joinThread","discord_kick_member":"kickMember","discord_leave_thread":"leaveThread","discord_list_channels":"listChannels","discord_list_roles":"listRoles","discord_pin_message":"pinMessage","discord_remove_reaction":"removeReaction","discord_remove_role":"removeRole","discord_send_message":"sendMessage","discord_unban_member":"unbanMember","discord_unpin_message":"unpinMessage","discord_update_channel":"updateChannel","discord_update_member":"updateMember","discord_update_role":"updateRole"},"params":{"action":{"oauthCredential":"credential"}}},"docusign":{"namespace":"docusign","methods":{"create_from_template":"sendFromTemplate","download_document":"downloadDocument","get_envelope":"getEnvelope","list_envelopes":"listEnvelopes","list_recipients":"listRecipients","list_templates":"listTemplates","send_envelope":"sendEnvelope","void_envelope":"voidEnvelope"},"params":{"action":{"oauthCredential":"credential"}}},"downdetector":{"namespace":"downdetector","methods":{"downdetector_get_company":"getCompany","downdetector_get_company_attribution":"getCompanyAttribution","downdetector_get_company_baseline":"getCompanyBaseline","downdetector_get_company_events":"getCompanyEvents","downdetector_get_company_incidents":"getCompanyIncidents","downdetector_get_company_indicators":"getCompanyIndicators","downdetector_get_company_last_15":"getCompanyLast15Minutes","downdetector_get_company_status":"getCompanyStatus","downdetector_get_provider":"getProvider","downdetector_get_reports":"getReports","downdetector_get_site_companies":"getSiteCompanies","downdetector_list_categories":"listCategories","downdetector_list_incidents":"listIncidents","downdetector_list_sites":"listSites","downdetector_search_companies":"searchCompanies"}},"dropbox":{"namespace":"legacy.dropbox","methods":{"dropbox_copy":"copyFileFolder","dropbox_create_folder":"createFolder","dropbox_create_shared_link":"createSharedLink","dropbox_delete":"deleteFileFolder","dropbox_download":"downloadFile","dropbox_get_metadata":"getMetadata","dropbox_list_folder":"listFolder","dropbox_list_revisions":"listRevisions","dropbox_list_shared_links":"listSharedLinks","dropbox_move":"moveFileFolder","dropbox_restore":"restoreFile","dropbox_search":"searchFiles","dropbox_upload":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"dropbox_v2":{"namespace":"dropbox","methods":{"dropbox_copy":"copyFileFolder","dropbox_create_folder":"createFolder","dropbox_create_shared_link":"createSharedLink","dropbox_delete":"deleteFileFolder","dropbox_download":"downloadFile","dropbox_get_metadata":"getMetadata","dropbox_list_folder":"listFolder","dropbox_list_revisions":"listRevisions","dropbox_list_shared_links":"listSharedLinks","dropbox_move":"moveFileFolder","dropbox_restore":"restoreFile","dropbox_search":"searchFiles","dropbox_upload":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"dropcontact":{"namespace":"dropcontact","methods":{"dropcontact_enrich_contact":"enrichContact"}},"dspy":{"namespace":"dspy","methods":{"chain_of_thought":"chainOfThought","predict":"predict","react":"reActAgent"}},"dub":{"namespace":"legacy.dub","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"}},"dub_v2":{"namespace":"legacy.dubV2","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"}},"dub_v3":{"namespace":"dub","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"},"params":{"action":{"oauthCredential":"credential"}}},"duckduckgo":{"namespace":"duckduckgo"},"dynamodb":{"namespace":"legacy.dynamodb","methods":{"delete":"deleteItem","get":"getItem","introspect":"introspect","put":"putItem","query":"query","scan":"scan","update":"updateItem"}},"dynamodb_v2":{"namespace":"dynamodb","methods":{"delete":"deleteItem","get":"getItem","introspect":"introspect","put":"putItem","query":"query","scan":"scan","update":"updateItem"},"params":{"action":{"oauthCredential":"credential"}}},"dynatrace":{"namespace":"legacy.dynatrace","methods":{"dynatrace_add_problem_comment":"addProblemComment","dynatrace_add_tags":"addTags","dynatrace_close_problem":"closeProblem","dynatrace_create_settings_object":"createSettingsObject","dynatrace_create_slo":"createSlo","dynatrace_delete_problem_comment":"deleteProblemComment","dynatrace_delete_settings_object":"deleteSettingsObject","dynatrace_delete_slo":"deleteSlo","dynatrace_delete_tag":"deleteTag","dynatrace_execute_synthetic_monitors":"executeSyntheticMonitors","dynatrace_get_attack":"getAttack","dynatrace_get_audit_logs":"getAuditLogs","dynatrace_get_entity":"getEntity","dynatrace_get_event":"getEvent","dynatrace_get_metric":"getMetricDescriptor","dynatrace_get_problem":"getProblem","dynatrace_get_problem_comment":"getProblemComment","dynatrace_get_security_problem":"getSecurityProblem","dynatrace_get_settings_object":"getSettingsObject","dynatrace_get_slo":"getSlo","dynatrace_get_synthetic_batch":"getSyntheticBatch","dynatrace_ingest_event":"ingestEvent","dynatrace_ingest_logs":"ingestLogs","dynatrace_ingest_metrics":"ingestMetrics","dynatrace_list_attacks":"listAttacks","dynatrace_list_entities":"listEntities","dynatrace_list_entity_types":"listEntityTypes","dynatrace_list_events":"listEvents","dynatrace_list_metrics":"listMetrics","dynatrace_list_problem_comments":"listProblemComments","dynatrace_list_problems":"listProblems","dynatrace_list_remediation_items":"listRemediationItems","dynatrace_list_security_problems":"listSecurityProblems","dynatrace_list_settings_objects":"listSettingsObjects","dynatrace_list_settings_schemas":"listSettingsSchemas","dynatrace_list_slos":"listSlos","dynatrace_list_synthetic_monitors":"listSyntheticMonitors","dynatrace_list_tags":"listTags","dynatrace_mute_security_problem":"muteSecurityProblem","dynatrace_mute_security_problems":"muteSecurityProblemsBulk","dynatrace_query_metrics":"queryMetrics","dynatrace_search_logs":"searchLogs","dynatrace_unmute_security_problem":"unmuteSecurityProblem","dynatrace_unmute_security_problems":"unmuteSecurityProblemsBulk","dynatrace_update_problem_comment":"updateProblemComment","dynatrace_update_settings_object":"updateSettingsObject","dynatrace_update_slo":"updateSlo"}},"dynatrace_v2":{"namespace":"dynatrace","methods":{"dynatrace_add_problem_comment":"addProblemComment","dynatrace_add_tags":"addTags","dynatrace_close_problem":"closeProblem","dynatrace_create_settings_object":"createSettingsObject","dynatrace_create_slo":"createSlo","dynatrace_delete_problem_comment":"deleteProblemComment","dynatrace_delete_settings_object":"deleteSettingsObject","dynatrace_delete_slo":"deleteSlo","dynatrace_delete_tag":"deleteTag","dynatrace_execute_synthetic_monitors":"executeSyntheticMonitors","dynatrace_get_attack":"getAttack","dynatrace_get_audit_logs":"getAuditLogs","dynatrace_get_entity":"getEntity","dynatrace_get_event":"getEvent","dynatrace_get_metric":"getMetricDescriptor","dynatrace_get_problem":"getProblem","dynatrace_get_problem_comment":"getProblemComment","dynatrace_get_security_problem":"getSecurityProblem","dynatrace_get_settings_object":"getSettingsObject","dynatrace_get_slo":"getSlo","dynatrace_get_synthetic_batch":"getSyntheticBatch","dynatrace_ingest_event":"ingestEvent","dynatrace_ingest_logs":"ingestLogs","dynatrace_ingest_metrics":"ingestMetrics","dynatrace_list_attacks":"listAttacks","dynatrace_list_entities":"listEntities","dynatrace_list_entity_types":"listEntityTypes","dynatrace_list_events":"listEvents","dynatrace_list_metrics":"listMetrics","dynatrace_list_problem_comments":"listProblemComments","dynatrace_list_problems":"listProblems","dynatrace_list_remediation_items":"listRemediationItems","dynatrace_list_security_problems":"listSecurityProblems","dynatrace_list_settings_objects":"listSettingsObjects","dynatrace_list_settings_schemas":"listSettingsSchemas","dynatrace_list_slos":"listSlos","dynatrace_list_synthetic_monitors":"listSyntheticMonitors","dynatrace_list_tags":"listTags","dynatrace_mute_security_problem":"muteSecurityProblem","dynatrace_mute_security_problems":"muteSecurityProblemsBulk","dynatrace_query_metrics":"queryMetrics","dynatrace_search_logs":"searchLogs","dynatrace_unmute_security_problem":"unmuteSecurityProblem","dynatrace_unmute_security_problems":"unmuteSecurityProblemsBulk","dynatrace_update_problem_comment":"updateProblemComment","dynatrace_update_settings_object":"updateSettingsObject","dynatrace_update_slo":"updateSlo"},"params":{"action":{"oauthCredential":"credential"}}},"ec2":{"namespace":"legacy.ec2","methods":{"allocate_address":"allocateElasticIp","associate_address":"associateElasticIp","authorize_security_group_ingress":"authorizeSecurityGroupIngress","create_snapshot":"createEbsSnapshot","create_tags":"createTags","delete_snapshot":"deleteEbsSnapshot","delete_tags":"deleteTags","delete_volume":"deleteEbsVolume","describe_addresses":"describeElasticIps","describe_availability_zones":"describeAvailabilityZones","describe_images":"describeAmis","describe_instance_status":"describeInstanceStatus","describe_instances":"describeInstances","describe_internet_gateways":"describeInternetGateways","describe_key_pairs":"describeKeyPairs","describe_nat_gateways":"describeNatGateways","describe_network_acls":"describeNetworkAcls","describe_network_interfaces":"describeNetworkInterfaces","describe_regions":"describeRegions","describe_route_tables":"describeRouteTables","describe_security_groups":"describeSecurityGroups","describe_snapshots":"describeEbsSnapshots","describe_subnets":"describeSubnets","describe_volumes":"describeEbsVolumes","describe_vpc_endpoints":"describeVpcEndpoints","describe_vpc_peering_connections":"describeVpcPeeringConnections","describe_vpcs":"describeVpcs","disassociate_address":"disassociateElasticIp","reboot_instances":"rebootInstances","release_address":"releaseElasticIp","revoke_security_group_ingress":"revokeSecurityGroupIngress","start_instances":"startInstances","stop_instances":"stopInstances","terminate_instances":"terminateInstances"}},"ec2_v2":{"namespace":"ec2","methods":{"allocate_address":"allocateElasticIp","associate_address":"associateElasticIp","authorize_security_group_ingress":"authorizeSecurityGroupIngress","create_snapshot":"createEbsSnapshot","create_tags":"createTags","delete_snapshot":"deleteEbsSnapshot","delete_tags":"deleteTags","delete_volume":"deleteEbsVolume","describe_addresses":"describeElasticIps","describe_availability_zones":"describeAvailabilityZones","describe_images":"describeAmis","describe_instance_status":"describeInstanceStatus","describe_instances":"describeInstances","describe_internet_gateways":"describeInternetGateways","describe_key_pairs":"describeKeyPairs","describe_nat_gateways":"describeNatGateways","describe_network_acls":"describeNetworkAcls","describe_network_interfaces":"describeNetworkInterfaces","describe_regions":"describeRegions","describe_route_tables":"describeRouteTables","describe_security_groups":"describeSecurityGroups","describe_snapshots":"describeEbsSnapshots","describe_subnets":"describeSubnets","describe_volumes":"describeEbsVolumes","describe_vpc_endpoints":"describeVpcEndpoints","describe_vpc_peering_connections":"describeVpcPeeringConnections","describe_vpcs":"describeVpcs","disassociate_address":"disassociateElasticIp","reboot_instances":"rebootInstances","release_address":"releaseElasticIp","revoke_security_group_ingress":"revokeSecurityGroupIngress","start_instances":"startInstances","stop_instances":"stopInstances","terminate_instances":"terminateInstances"},"params":{"action":{"oauthCredential":"credential"}}},"elasticsearch":{"namespace":"elasticsearch","methods":{"elasticsearch_bulk":"bulkOperations","elasticsearch_cluster_health":"clusterHealth","elasticsearch_cluster_stats":"clusterStats","elasticsearch_count":"countDocuments","elasticsearch_create_index":"createIndex","elasticsearch_delete_document":"deleteDocument","elasticsearch_delete_index":"deleteIndex","elasticsearch_get_document":"getDocument","elasticsearch_get_index":"getIndexInfo","elasticsearch_index_document":"indexDocument","elasticsearch_list_indices":"listIndices","elasticsearch_search":"search","elasticsearch_update_document":"updateDocument"}},"elevenlabs":{"namespace":"legacy.elevenlabs","methods":{"audio_isolation":"audioIsolation","edit_voice_settings":"editVoiceSettings","get_user":"getUserInfo","get_voice":"getVoice","get_voice_settings":"getVoiceSettings","list_models":"listModels","list_voices":"listVoices","sound_effects":"soundEffects","speech_to_speech":"speechToSpeech","tts":"textToSpeech"}},"elevenlabs_v2":{"namespace":"elevenlabs","methods":{"audio_isolation":"audioIsolation","edit_voice_settings":"editVoiceSettings","get_user":"getUserInfo","get_voice":"getVoice","get_voice_settings":"getVoiceSettings","list_models":"listModels","list_voices":"listVoices","sound_effects":"soundEffects","speech_to_speech":"speechToSpeech","tts":"textToSpeech"},"params":{"action":{"oauthCredential":"credential"}}},"emailbison":{"namespace":"legacy.emailbison","methods":{"attach_leads_to_campaign":"attachLeadsToCampaign","attach_tags_to_leads":"attachTagsToLeads","create_campaign":"createCampaign","create_lead":"createLead","create_tag":"createTag","get_lead":"getLead","list_campaigns":"listCampaigns","list_leads":"listLeads","list_replies":"listReplies","list_tags":"listTags","update_campaign":"updateCampaign","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead"},"triggers":{"emailbison_email_account_added":"emailAccountAdded","emailbison_email_account_disconnected":"emailAccountDisconnected","emailbison_email_account_reconnected":"emailAccountReconnected","emailbison_email_account_removed":"emailAccountRemoved","emailbison_email_bounced":"emailBounced","emailbison_email_opened":"emailOpened","emailbison_email_sent":"emailSent","emailbison_lead_first_contacted":"leadFirstContacted","emailbison_lead_interested":"leadInterested","emailbison_lead_replied":"leadReplied","emailbison_lead_unsubscribed":"leadUnsubscribed","emailbison_manual_email_sent":"manualEmailSent","emailbison_tag_attached":"tagAttached","emailbison_tag_removed":"tagRemoved","emailbison_untracked_reply_received":"untrackedReplyReceived","emailbison_warmup_disabled_causing_bounces":"warmupDisabledCausingBounces","emailbison_warmup_disabled_receiving_bounces":"warmupDisabledReceivingBounces"}},"emailbison_v2":{"namespace":"emailbison","methods":{"attach_leads_to_campaign":"attachLeadsToCampaign","attach_tags_to_leads":"attachTagsToLeads","create_campaign":"createCampaign","create_lead":"createLead","create_tag":"createTag","get_lead":"getLead","list_campaigns":"listCampaigns","list_leads":"listLeads","list_replies":"listReplies","list_tags":"listTags","update_campaign":"updateCampaign","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead"},"triggers":{"emailbison_email_account_added":"emailAccountAdded","emailbison_email_account_disconnected":"emailAccountDisconnected","emailbison_email_account_reconnected":"emailAccountReconnected","emailbison_email_account_removed":"emailAccountRemoved","emailbison_email_bounced":"emailBounced","emailbison_email_opened":"emailOpened","emailbison_email_sent":"emailSent","emailbison_lead_first_contacted":"leadFirstContacted","emailbison_lead_interested":"leadInterested","emailbison_lead_replied":"leadReplied","emailbison_lead_unsubscribed":"leadUnsubscribed","emailbison_manual_email_sent":"manualEmailSent","emailbison_tag_attached":"tagAttached","emailbison_tag_removed":"tagRemoved","emailbison_untracked_reply_received":"untrackedReplyReceived","emailbison_warmup_disabled_causing_bounces":"warmupDisabledCausingBounces","emailbison_warmup_disabled_receiving_bounces":"warmupDisabledReceivingBounces"},"params":{"action":{"oauthCredential":"credential"}}},"embeddings":{"namespace":"embeddings"},"enrich":{"namespace":"legacy.enrich","methods":{"check_credits":"checkCredits","company_funding":"companyFundingTraffic","company_lookup":"companyLookup","company_revenue":"companyRevenue","disposable_email_check":"disposableEmailCheck","email_to_ip":"emailToIp","email_to_person_lite":"emailToPersonLite","email_to_phone":"emailToPhone","email_to_profile":"emailToProfile","find_email":"findEmail","get_post_details":"getPostDetails","ip_to_company":"ipToCompany","linkedin_profile":"linkedInProfileEnrichment","linkedin_to_personal_email":"linkedInToPersonalEmail","linkedin_to_work_email":"linkedInToWorkEmail","phone_finder":"phoneFinderLinkedIn","reverse_hash_lookup":"reverseHashLookup","sales_pointer_people":"salesPointerPeople","search_company":"searchCompany","search_company_activities":"searchCompanyActivities","search_company_employees":"searchCompanyEmployees","search_jobs":"searchJobs","search_logo":"searchLogo","search_people":"searchPeople","search_people_activities":"searchPeopleActivities","search_post_comments":"searchPostComments","search_post_comments_by_url":"searchPostCommentsByUrl","search_post_reactions":"searchPostReactions","search_post_reactions_by_url":"searchPostReactionsByUrl","search_posts":"searchPosts","search_similar_companies":"searchSimilarCompanies","verify_email":"verifyEmail"}},"enrich_v2":{"namespace":"enrich","methods":{"check_credits":"checkCredits","company_funding":"companyFundingTraffic","company_lookup":"companyLookup","company_revenue":"companyRevenue","disposable_email_check":"disposableEmailCheck","email_to_ip":"emailToIp","email_to_person_lite":"emailToPersonLite","email_to_phone":"emailToPhone","email_to_profile":"emailToProfile","find_email":"findEmail","get_post_details":"getPostDetails","ip_to_company":"ipToCompany","linkedin_profile":"linkedInProfileEnrichment","linkedin_to_personal_email":"linkedInToPersonalEmail","linkedin_to_work_email":"linkedInToWorkEmail","phone_finder":"phoneFinderLinkedIn","reverse_hash_lookup":"reverseHashLookup","sales_pointer_people":"salesPointerPeople","search_company":"searchCompany","search_company_activities":"searchCompanyActivities","search_company_employees":"searchCompanyEmployees","search_jobs":"searchJobs","search_logo":"searchLogo","search_people":"searchPeople","search_people_activities":"searchPeopleActivities","search_post_comments":"searchPostComments","search_post_comments_by_url":"searchPostCommentsByUrl","search_post_reactions":"searchPostReactions","search_post_reactions_by_url":"searchPostReactionsByUrl","search_posts":"searchPosts","search_similar_companies":"searchSimilarCompanies","verify_email":"verifyEmail"},"params":{"action":{"oauthCredential":"credential"}}},"enrichment":{"namespace":"enrichment","methods":{"company-domain":"companyDomain","company-info":"companyInfo","email-verification":"emailVerification","linkedin-profile":"linkedInProfile","phone-number":"phoneNumber","work-email":"workEmail"}},"enrow":{"namespace":"enrow","methods":{"enrow_find_email":"findEmail","enrow_verify_email":"verifyEmail"}},"evaluator":{"namespace":"evaluator"},"exa":{"namespace":"exa","methods":{"exa_agent":"agent","exa_answer":"answer","exa_find_similar_links":"findSimilarLinks","exa_get_contents":"getContents","exa_search":"search"}},"extend":{"namespace":"legacy.extend"},"extend_v2":{"namespace":"legacy.extendV2"},"extend_v3":{"namespace":"extend","params":{"action":{"oauthCredential":"credential"}}},"fathom":{"namespace":"legacy.fathom","methods":{"fathom_get_summary":"getSummary","fathom_get_transcript":"getTranscript","fathom_list_meeting_types":"listMeetingTypes","fathom_list_meetings":"listMeetings","fathom_list_team_members":"listTeamMembers","fathom_list_teams":"listTeams"},"triggers":{"fathom_new_meeting":"newMeeting","fathom_webhook":"webhook"}},"fathom_v2":{"namespace":"fathom","methods":{"fathom_get_summary":"getSummary","fathom_get_transcript":"getTranscript","fathom_list_meeting_types":"listMeetingTypes","fathom_list_meetings":"listMeetings","fathom_list_team_members":"listTeamMembers","fathom_list_teams":"listTeams"},"triggers":{"fathom_new_meeting":"newMeeting","fathom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"file":{"namespace":"legacy.file"},"file_v2":{"namespace":"legacy.fileV2"},"file_v3":{"namespace":"legacy.fileV3","methods":{"file_append":"append","file_get":"get","file_parser_v3":"read","file_write":"write"}},"file_v4":{"namespace":"legacy.fileV4","methods":{"file_append":"append","file_fetch":"fetch","file_read":"read","file_write":"write"}},"file_v5":{"namespace":"fileV5","methods":{"file_append":"append","file_compress":"compress","file_create_folder":"createFolder","file_decompress":"decompress","file_delete_folder":"deleteFolder","file_edit":"applyEdit","file_fetch":"fetch","file_get_content":"getContent","file_list":"list","file_manage_sharing":"manageSharing","file_move":"moveFile","file_read":"read","file_restore_folder":"restoreFolder","file_search":"search","file_update_folder":"moveFolder","file_write":"write"}},"findymail":{"namespace":"findymail","methods":{"findymail_find_email_from_linkedin":"findEmailFromLinkedIn","findymail_find_email_from_name":"findEmailFromName","findymail_find_emails_by_domain":"findEmailsByDomain","findymail_find_employees":"findEmployees","findymail_find_phone":"findPhone","findymail_get_company":"getCompanyInfo","findymail_get_credits":"getRemainingCredits","findymail_lookup_technologies":"lookupTechnologiesByDomain","findymail_reverse_email_lookup":"reverseEmailLookup","findymail_search_technologies":"searchTechnologies","findymail_verify_email":"verifyEmail"}},"firecrawl":{"namespace":"firecrawl","methods":{"agent":"agent","batch_scrape":"batchScrape","batch_scrape_status":"batchScrapeStatus","cancel_crawl":"cancelCrawl","crawl":"crawl","crawl_status":"crawlStatus","credit_usage":"creditUsage","enrich":"enrichContactOrCompany","extract":"extract","extract_status":"extractStatus","map":"map","parse":"parseDocument","scrape":"scrape","search":"search"}},"fireflies":{"namespace":"legacy.fireflies","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"}},"fireflies_v2":{"namespace":"legacy.firefliesV2","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"}},"fireflies_v3":{"namespace":"fireflies","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"},"params":{"action":{"oauthCredential":"credential"}}},"fivetran":{"namespace":"fivetran","methods":{"cancel_transformation":"cancelTransformation","create_connect_card":"createConnectCard","create_connection":"createConnection","create_destination":"createDestination","create_group":"createGroup","delete_connection":"deleteConnection","get_account_info":"getAccountInfo","get_connection":"getConnection","get_connection_schema_config":"getSchemaConfig","get_connection_warnings":"getConnectionWarnings","get_connector_type":"getConnectorType","get_destination":"getDestination","get_group":"getGroup","get_sync_history":"getSyncHistory","get_transformation":"getTransformation","list_connections":"listConnections","list_connector_types":"listConnectorTypes","list_destinations":"listDestinations","list_groups":"listGroups","list_transformations":"listTransformations","list_users":"listUsers","pause_connection":"pauseConnection","reload_connection_schema":"reloadSchema","resume_connection":"resumeConnection","resync_connection":"reSyncConnection","resync_tables":"reSyncTables","run_connection_setup_tests":"runConnectionSetupTests","run_destination_setup_tests":"runDestinationSetupTests","run_transformation":"runTransformation","sync_connection":"syncConnection","update_connection":"updateConnection","update_connection_schema":"updateSchemaSync","update_connection_table":"updateTableSync","update_schema_config":"updateSchemaConfig"},"triggers":{"fivetran_connection_failure":"connectionFailure","fivetran_connection_successful":"connectionSuccessful","fivetran_create_connector":"createConnector","fivetran_delete_connector":"deleteConnector","fivetran_edit_connector":"editConnector","fivetran_force_update_connector":"forceUpdateConnector","fivetran_pause_connector":"pauseConnector","fivetran_resume_connector":"resumeConnector","fivetran_resync_connector":"resyncConnector","fivetran_resync_table":"resyncTable","fivetran_sync_end":"syncEnd","fivetran_sync_start":"syncStart","fivetran_transformation_failed":"transformationFailed","fivetran_transformation_start":"transformationStart","fivetran_transformation_succeeded":"transformationSucceeded","fivetran_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"flint":{"namespace":"legacy.flint","methods":{"flint_create_task":"createTask","flint_generate_pages":"generatePages","flint_get_task":"getTask"}},"flint_v2":{"namespace":"flint","methods":{"flint_create_task":"createTask","flint_generate_pages":"generatePages","flint_get_task":"getTask"},"params":{"action":{"oauthCredential":"credential"}}},"flow":{"namespace":"flow","methods":{"add_link":"addLink","create_branch":"createBranch","create_comment":"createComment","create_entities":"createEntities","create_entity":"createEntity","delete_comment":"deleteComment","delete_entity":"deleteEntity","filter_entities":"filterEntities","get_comment":"getComment","get_data_model":"getDataModel","get_entities":"getEntities","get_entity_history":"getEntityHistory","get_project":"getProject","list_branches":"listBranches","list_comments":"listComments","list_entities":"listEntities","list_projects":"listProjects","remove_link":"removeLink","restore_entity":"restoreEntity","search_entities":"searchEntities","set_value":"setValue","set_values":"setValues","update_comment":"updateComment"},"params":{"action":{"oauthCredential":"credential"}}},"function":{"namespace":"fn"},"gamma":{"namespace":"legacy.gamma","methods":{"check_status":"checkStatus","generate":"generate","generate_from_template":"generateFromTemplate","list_folders":"listFolders","list_themes":"listThemes"}},"gamma_v2":{"namespace":"gamma","methods":{"check_status":"checkStatus","generate":"generate","generate_from_template":"generateFromTemplate","list_folders":"listFolders","list_themes":"listThemes"},"params":{"action":{"oauthCredential":"credential"}}},"gauge":{"namespace":"gauge","methods":{"gauge_add_tags_to_prompts":"addTagsToPrompts","gauge_bulk_update_prompts":"bulkUpdatePrompts","gauge_create_prompts":"createPrompts","gauge_create_tag":"createTag","gauge_create_topic":"createTopic","gauge_delete_tag":"deleteTag","gauge_get_answer":"getAnswer","gauge_get_category":"getCategory","gauge_get_current_credential":"getCurrentCredential","gauge_get_organization":"getOrganization","gauge_get_prompt":"getPrompt","gauge_get_query_metadata":"getQueryCatalog","gauge_get_tag":"getTag","gauge_get_topic":"getTopic","gauge_list_answers":"listAnswers","gauge_list_brands":"listBrands","gauge_list_categories":"listCategories","gauge_list_citations":"listCitations","gauge_list_organizations":"listOrganizations","gauge_list_prompts":"listPrompts","gauge_list_tags":"listTags","gauge_list_topics":"listTopics","gauge_query":"runReportQuery","gauge_remove_tags_from_prompts":"removeTagsFromPrompts","gauge_rename_topic":"renameTopic","gauge_update_prompt":"updatePrompt","gauge_update_tag":"updateTag"},"params":{"action":{"oauthCredential":"credential"}}},"generic_webhook":{"namespace":"genericWebhook","triggers":{"generic_webhook":"webhook"}},"github":{"namespace":"legacy.github","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"}},"github_v2":{"namespace":"legacy.githubV2","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"}},"github_v3":{"namespace":"github","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"},"params":{"action":{"oauthCredential":"credential"}}},"gitlab":{"namespace":"legacy.gitlab","methods":{"gitlab_activate_user":"activateUser","gitlab_add_member":"addMember","gitlab_add_saml_group_link":"addSamlGroupLink","gitlab_approve_access_request":"approveAccessRequest","gitlab_approve_merge_request":"approveMergeRequest","gitlab_approve_user":"approveUserSignup","gitlab_ban_user":"banUser","gitlab_block_user":"blockUser","gitlab_cancel_pipeline":"cancelPipeline","gitlab_compare_branches":"compareBranches","gitlab_create_branch":"createBranch","gitlab_create_file":"createFile","gitlab_create_issue":"createIssue","gitlab_create_issue_note":"addIssueComment","gitlab_create_merge_request":"createMergeRequest","gitlab_create_merge_request_note":"addMrComment","gitlab_create_pipeline":"createPipeline","gitlab_create_release":"createRelease","gitlab_create_user":"createUser","gitlab_deactivate_user":"deactivateUser","gitlab_delete_branch":"deleteBranch","gitlab_delete_issue":"deleteIssue","gitlab_delete_saml_group_link":"deleteSamlGroupLink","gitlab_delete_user":"deleteUser","gitlab_delete_user_identity":"deleteUserIdentity","gitlab_deny_access_request":"denyAccessRequest","gitlab_get_file":"getFile","gitlab_get_group":"getGroup","gitlab_get_issue":"getIssue","gitlab_get_job_log":"getJobLog","gitlab_get_merge_request":"getMergeRequest","gitlab_get_merge_request_changes":"getMrChanges","gitlab_get_pipeline":"getPipeline","gitlab_get_project":"getProject","gitlab_invite_member":"inviteMemberByEmail","gitlab_list_access_requests":"listAccessRequests","gitlab_list_branches":"listBranches","gitlab_list_commits":"listCommits","gitlab_list_groups":"listGroups","gitlab_list_invitations":"listInvitations","gitlab_list_issues":"listIssues","gitlab_list_members":"listMembers","gitlab_list_merge_requests":"listMergeRequests","gitlab_list_pipeline_jobs":"listPipelineJobs","gitlab_list_pipelines":"listPipelines","gitlab_list_projects":"listProjects","gitlab_list_releases":"listReleases","gitlab_list_repository_tree":"listRepositoryTree","gitlab_list_saml_group_links":"listSamlGroupLinks","gitlab_list_user_memberships":"listUserMemberships","gitlab_merge_merge_request":"mergeMergeRequest","gitlab_play_job":"playJob","gitlab_reject_user":"rejectUserSignup","gitlab_remove_member":"removeMember","gitlab_retry_pipeline":"retryPipeline","gitlab_revoke_invitation":"revokeInvitation","gitlab_search_users":"searchUsers","gitlab_unban_user":"unbanUser","gitlab_unblock_user":"unblockUser","gitlab_update_file":"updateFile","gitlab_update_invitation":"updateInvitation","gitlab_update_issue":"updateIssue","gitlab_update_member":"updateMember","gitlab_update_merge_request":"updateMergeRequest","gitlab_update_user":"updateUser"},"triggers":{"gitlab_comment":"comment","gitlab_issue":"issue","gitlab_merge_request":"mergeRequest","gitlab_pipeline":"pipeline","gitlab_push":"push","gitlab_webhook":"webhook"}},"gitlab_v2":{"namespace":"gitlab","methods":{"gitlab_activate_user":"activateUser","gitlab_add_member":"addMember","gitlab_add_saml_group_link":"addSamlGroupLink","gitlab_approve_access_request":"approveAccessRequest","gitlab_approve_merge_request":"approveMergeRequest","gitlab_approve_user":"approveUserSignup","gitlab_ban_user":"banUser","gitlab_block_user":"blockUser","gitlab_cancel_pipeline":"cancelPipeline","gitlab_compare_branches":"compareBranches","gitlab_create_branch":"createBranch","gitlab_create_file":"createFile","gitlab_create_issue":"createIssue","gitlab_create_issue_note":"addIssueComment","gitlab_create_merge_request":"createMergeRequest","gitlab_create_merge_request_note":"addMrComment","gitlab_create_pipeline":"createPipeline","gitlab_create_release":"createRelease","gitlab_create_user":"createUser","gitlab_deactivate_user":"deactivateUser","gitlab_delete_branch":"deleteBranch","gitlab_delete_issue":"deleteIssue","gitlab_delete_saml_group_link":"deleteSamlGroupLink","gitlab_delete_user":"deleteUser","gitlab_delete_user_identity":"deleteUserIdentity","gitlab_deny_access_request":"denyAccessRequest","gitlab_get_file":"getFile","gitlab_get_group":"getGroup","gitlab_get_issue":"getIssue","gitlab_get_job_log":"getJobLog","gitlab_get_merge_request":"getMergeRequest","gitlab_get_merge_request_changes":"getMrChanges","gitlab_get_pipeline":"getPipeline","gitlab_get_project":"getProject","gitlab_invite_member":"inviteMemberByEmail","gitlab_list_access_requests":"listAccessRequests","gitlab_list_branches":"listBranches","gitlab_list_commits":"listCommits","gitlab_list_groups":"listGroups","gitlab_list_invitations":"listInvitations","gitlab_list_issues":"listIssues","gitlab_list_members":"listMembers","gitlab_list_merge_requests":"listMergeRequests","gitlab_list_pipeline_jobs":"listPipelineJobs","gitlab_list_pipelines":"listPipelines","gitlab_list_projects":"listProjects","gitlab_list_releases":"listReleases","gitlab_list_repository_tree":"listRepositoryTree","gitlab_list_saml_group_links":"listSamlGroupLinks","gitlab_list_user_memberships":"listUserMemberships","gitlab_merge_merge_request":"mergeMergeRequest","gitlab_play_job":"playJob","gitlab_reject_user":"rejectUserSignup","gitlab_remove_member":"removeMember","gitlab_retry_pipeline":"retryPipeline","gitlab_revoke_invitation":"revokeInvitation","gitlab_search_users":"searchUsers","gitlab_unban_user":"unbanUser","gitlab_unblock_user":"unblockUser","gitlab_update_file":"updateFile","gitlab_update_invitation":"updateInvitation","gitlab_update_issue":"updateIssue","gitlab_update_member":"updateMember","gitlab_update_merge_request":"updateMergeRequest","gitlab_update_user":"updateUser"},"triggers":{"gitlab_comment":"comment","gitlab_issue":"issue","gitlab_merge_request":"mergeRequest","gitlab_pipeline":"pipeline","gitlab_push":"push","gitlab_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"gmail":{"namespace":"legacy.gmail","methods":{"add_label_gmail":"addLabel","archive_gmail":"archiveEmail","delete_gmail":"deleteEmail","draft_gmail":"draftEmail","edit_draft_gmail":"editDraft","mark_read_gmail":"markAsRead","mark_unread_gmail":"markAsUnread","move_gmail":"moveEmail","read_gmail":"readEmail","remove_label_gmail":"removeLabel","search_gmail":"searchEmail","send_gmail":"sendEmail","unarchive_gmail":"unarchiveEmail"},"triggers":{"gmail_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"gmail_v2":{"namespace":"gmail","methods":{"add_label_gmail":"addLabel","archive_gmail":"archiveEmail","create_label_gmail":"createLabel","delete_draft_gmail":"deleteDraft","delete_gmail":"deleteEmail","delete_label_gmail":"deleteLabel","draft_gmail":"draftEmail","edit_draft_gmail":"editDraft","get_draft_gmail":"getDraft","get_thread_gmail":"getThread","list_drafts_gmail":"listDrafts","list_labels_gmail":"listLabels","list_threads_gmail":"listThreads","mark_read_gmail":"markAsRead","mark_unread_gmail":"markAsUnread","move_gmail":"moveEmail","read_gmail":"readEmail","remove_label_gmail":"removeLabel","search_gmail":"searchEmail","send_gmail":"sendEmail","trash_thread_gmail":"trashThread","unarchive_gmail":"unarchiveEmail","untrash_thread_gmail":"untrashThread","update_label_gmail":"updateLabel"},"triggers":{"gmail_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"gong":{"namespace":"legacy.gong","methods":{"aggregate_activity":"aggregateActivity","aggregate_by_period":"aggregateByPeriod","answered_scorecards":"answeredScorecards","ask_anything":"askAnything","assign_flow_prospects":"assignFlowProspects","create_call":"createCall","day_by_day_activity":"dayByDayActivity","get_brief":"getBrief","get_call":"getCall","get_call_transcript":"getCallTranscript","get_coaching":"getCoaching","get_extensive_calls":"getExtensiveCalls","get_folder_content":"getFolderContent","get_logs":"getLogs","get_prospect_flows":"getProspectFlows","get_user":"getUser","interaction_stats":"interactionStats","list_calls":"listCalls","list_flows":"listFlows","list_library_folders":"listLibraryFolders","list_scorecards":"listScorecards","list_trackers":"listTrackers","list_users":"listUsers","list_workspaces":"listWorkspaces","lookup_email":"lookupEmail","lookup_phone":"lookupPhone","purge_email_address":"purgeEmailAddress","purge_phone_number":"purgePhoneNumber","unassign_flow_prospects":"unassignFlowProspects"},"triggers":{"gong_call_completed":"callCompleted","gong_webhook":"webhook"}},"gong_v2":{"namespace":"gong","methods":{"aggregate_activity":"aggregateActivity","aggregate_by_period":"aggregateByPeriod","answered_scorecards":"answeredScorecards","ask_anything":"askAnything","assign_flow_prospects":"assignFlowProspects","create_call":"createCall","day_by_day_activity":"dayByDayActivity","get_brief":"getBrief","get_call":"getCall","get_call_transcript":"getCallTranscript","get_coaching":"getCoaching","get_extensive_calls":"getExtensiveCalls","get_folder_content":"getFolderContent","get_logs":"getLogs","get_prospect_flows":"getProspectFlows","get_user":"getUser","interaction_stats":"interactionStats","list_calls":"listCalls","list_flows":"listFlows","list_library_folders":"listLibraryFolders","list_scorecards":"listScorecards","list_trackers":"listTrackers","list_users":"listUsers","list_workspaces":"listWorkspaces","lookup_email":"lookupEmail","lookup_phone":"lookupPhone","purge_email_address":"purgeEmailAddress","purge_phone_number":"purgePhoneNumber","unassign_flow_prospects":"unassignFlowProspects"},"triggers":{"gong_call_completed":"callCompleted","gong_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"google_ads":{"namespace":"googleAds","methods":{"ad_performance":"adPerformance","campaign_performance":"campaignPerformance","list_ad_groups":"listAdGroups","list_campaigns":"listCampaigns","list_customers":"listCustomers","search":"customQueryGaql"},"params":{"action":{"oauthCredential":"credential"}}},"google_appsheet":{"namespace":"googleAppsheet","methods":{"google_appsheet_add_rows":"addRows","google_appsheet_delete_rows":"deleteRows","google_appsheet_edit_rows":"editRows","google_appsheet_find_rows":"findRows"}},"google_bigquery":{"namespace":"googleBigquery","methods":{"create_dataset":"createDataset","create_table":"createTable","delete_dataset":"deleteDataset","delete_table":"deleteTable","get_query_results":"getQueryResults","get_table":"getTable","insert_rows":"insertRows","list_datasets":"listDatasets","list_table_data":"listTableData","list_tables":"listTables","query":"runQuery"},"params":{"action":{"oauthCredential":"credential"}}},"google_books":{"namespace":"googleBooks","methods":{"volume_details":"getVolumeDetails","volume_search":"searchVolumes"}},"google_calendar":{"namespace":"legacy.googleCalendar","methods":{"create":"createEvent","create_calendar":"createCalendar","delete":"deleteEvent","delete_calendar":"deleteCalendar","freebusy":"checkFreeBusy","get":"getEvent","instances":"getRecurringInstances","invite":"inviteAttendees","list":"listEvents","list_acl":"listSharing","list_calendars":"listCalendars","move":"moveEvent","quick_add":"quickAddNaturalLanguage","respond":"respondToInvitationRsvp","share_calendar":"shareCalendar","unshare_calendar":"removeSharing","update":"updateEvent","update_acl":"updateSharing","update_calendar":"updateCalendar"},"triggers":{"google_calendar_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_calendar_v2":{"namespace":"googleCalendar","methods":{"create":"createEvent","create_calendar":"createCalendar","delete":"deleteEvent","delete_calendar":"deleteCalendar","freebusy":"checkFreeBusy","get":"getEvent","instances":"getRecurringInstances","invite":"inviteAttendees","list":"listEvents","list_acl":"listSharing","list_calendars":"listCalendars","move":"moveEvent","quick_add":"quickAddNaturalLanguage","respond":"respondToInvitationRsvp","share_calendar":"shareCalendar","unshare_calendar":"removeSharing","update":"updateEvent","update_acl":"updateSharing","update_calendar":"updateCalendar"},"triggers":{"google_calendar_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_contacts":{"namespace":"googleContacts","methods":{"create":"createContact","delete":"deleteContact","get":"getContact","list":"listContacts","search":"searchContacts","update":"updateContact"},"params":{"action":{"oauthCredential":"credential"}}},"google_docs":{"namespace":"googleDocs","methods":{"create":"createDocument","create_named_range":"createNamedRange","create_paragraph_bullets":"createBullets","delete_content_range":"deleteContentRange","delete_named_range":"deleteNamedRange","delete_paragraph_bullets":"deleteBullets","insert_image":"insertImage","insert_page_break":"insertPageBreak","insert_table":"insertTable","insert_text":"insertText","read":"readDocument","replace_text":"findReplaceText","update_paragraph_style":"applyParagraphStyle","update_text_style":"applyTextStyle","write":"writeToDocument"},"params":{"action":{"oauthCredential":"credential"}}},"google_drive":{"namespace":"googleDrive","methods":{"copy":"copyFile","create_comment":"createComment","create_file":"createFile","create_folder":"createFolder","delete":"deletePermanently","delete_comment":"deleteComment","download":"downloadFile","export":"exportFile","get_about":"getDriveInfo","get_content":"getFileContent","get_file":"getFileInfo","get_revision":"getRevision","list":"listFiles","list_comments":"listComments","list_permissions":"listPermissions","list_revisions":"listRevisions","move":"moveFile","search":"searchFiles","share":"shareFile","trash":"moveToTrash","unshare":"removeSharing","untrash":"restoreFromTrash","update":"updateFile","upload":"uploadFile"},"triggers":{"google_drive_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_forms":{"namespace":"googleForms","methods":{"batch_update":"batchUpdate","create_form":"createForm","create_watch":"createWatch","delete_watch":"deleteWatch","get_form":"getForm","get_responses":"getResponses","list_watches":"listWatches","renew_watch":"renewWatch","set_publish_settings":"setPublishSettings"},"triggers":{"google_forms_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"google_groups":{"namespace":"googleGroups","methods":{"add_alias":"addAlias","add_member":"addMember","create_group":"createGroup","delete_group":"deleteGroup","get_group":"getGroup","get_member":"getMember","get_settings":"getSettings","has_member":"checkMembership","list_aliases":"listAliases","list_groups":"listGroups","list_members":"listMembers","remove_alias":"removeAlias","remove_member":"removeMember","update_group":"updateGroup","update_member":"updateMemberRole","update_settings":"updateSettings"},"params":{"action":{"oauthCredential":"credential"}}},"google_maps":{"namespace":"googleMaps","methods":{"air_quality":"airQuality","directions":"getDirections","distance_matrix":"distanceMatrix","elevation":"getElevation","geocode":"geocodeAddress","geolocate":"geolocateWiFiCell","place_details":"placeDetails","places_nearby":"nearbyPlaces","places_search":"searchPlaces","pollen":"pollenForecast","reverse_geocode":"reverseGeocode","snap_to_roads":"snapToRoads","solar":"solarPotential","speed_limits":"speedLimits","timezone":"getTimezone","validate_address":"validateAddress"}},"google_meet":{"namespace":"googleMeet","methods":{"create_space":"createSpace","end_conference":"endConference","get_conference_record":"getConferenceRecord","get_space":"getSpace","list_conference_records":"listConferenceRecords","list_participants":"listParticipants"},"params":{"action":{"oauthCredential":"credential"}}},"google_pagespeed":{"namespace":"googlePagespeed"},"google_search":{"namespace":"googleSearch"},"google_sheets":{"namespace":"legacy.googleSheets","methods":{"append":"appendData","read":"readData","update":"updateData","write":"writeData"},"params":{"action":{"oauthCredential":"credential"}}},"google_sheets_v2":{"namespace":"googleSheets","methods":{"append":"appendData","batch_clear":"batchClear","batch_get":"batchRead","batch_update":"batchUpdate","clear":"clearData","copy_sheet":"copySheet","create":"createSpreadsheet","delete_rows":"deleteRows","delete_sheet":"deleteSheet","delete_spreadsheet":"deleteSpreadsheet","get_info":"getSpreadsheetInfo","read":"readData","update":"updateData","write":"writeData"},"triggers":{"google_sheets_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_slides":{"namespace":"legacy.googleSlides","methods":{"add_image":"addImage","add_slide":"addSlide","batch_update":"batchUpdateRaw","copy_presentation":"copyPresentation","create":"createPresentation","create_line":"createLine","create_paragraph_bullets":"createParagraphBullets","create_shape":"createShape","create_sheets_chart":"embedSheetsChart","create_table":"createTable","create_video":"embedVideo","delete_object":"deleteObject","delete_paragraph_bullets":"deleteParagraphBullets","delete_table_column":"deleteTableColumn","delete_table_row":"deleteTableRow","delete_text":"deleteText","duplicate_object":"duplicateObject","export_presentation":"exportPresentation","get_page":"getPage","get_thumbnail":"getThumbnail","group_objects":"groupObjects","insert_table_columns":"insertTableColumns","insert_table_rows":"insertTableRows","insert_text":"insertText","merge_table_cells":"mergeTableCells","read":"readPresentation","refresh_sheets_chart":"refreshSheetsChart","reorder_slides":"reorderSlides","replace_all_shapes_with_image":"replaceAllShapesWithImage","replace_all_shapes_with_sheets_chart":"replaceAllShapesWithSheetsChart","replace_all_text":"replaceAllText","replace_image":"replaceImage","reroute_line":"rerouteLine","ungroup_objects":"ungroupObjects","unmerge_table_cells":"unmergeTableCells","update_image_properties":"updateImageProperties","update_line_category":"updateLineCategory","update_line_properties":"updateLineProperties","update_page_element_alt_text":"updateAltText","update_page_element_transform":"updateElementTransform","update_page_elements_z_order":"updateZOrder","update_page_properties":"updatePageProperties","update_paragraph_style":"updateParagraphStyle","update_shape_properties":"updateShapeProperties","update_slide_properties":"updateSlideProperties","update_table_border_properties":"updateTableBorderProperties","update_table_cell_properties":"updateTableCellProperties","update_table_column_properties":"updateTableColumnProperties","update_table_row_properties":"updateTableRowProperties","update_text_style":"updateTextStyle","update_video_properties":"updateVideoProperties","write":"writeToPresentation"},"params":{"action":{"oauthCredential":"credential"}}},"google_slides_v2":{"namespace":"googleSlides","methods":{"add_image":"addImage","add_slide":"addSlide","batch_update":"batchUpdateRaw","copy_presentation":"copyPresentation","create":"createPresentation","create_line":"createLine","create_paragraph_bullets":"createParagraphBullets","create_shape":"createShape","create_sheets_chart":"embedSheetsChart","create_table":"createTable","create_video":"embedVideo","delete_object":"deleteObject","delete_paragraph_bullets":"deleteParagraphBullets","delete_table_column":"deleteTableColumn","delete_table_row":"deleteTableRow","delete_text":"deleteText","duplicate_object":"duplicateObject","export_presentation":"exportPresentation","get_page":"getPage","get_thumbnail":"getThumbnail","group_objects":"groupObjects","insert_table_columns":"insertTableColumns","insert_table_rows":"insertTableRows","insert_text":"insertText","merge_table_cells":"mergeTableCells","read":"readPresentation","refresh_sheets_chart":"refreshSheetsChart","reorder_slides":"reorderSlides","replace_all_shapes_with_image":"replaceAllShapesWithImage","replace_all_shapes_with_sheets_chart":"replaceAllShapesWithSheetsChart","replace_all_text":"replaceAllText","replace_image":"replaceImage","reroute_line":"rerouteLine","ungroup_objects":"ungroupObjects","unmerge_table_cells":"unmergeTableCells","update_image_properties":"updateImageProperties","update_line_category":"updateLineCategory","update_line_properties":"updateLineProperties","update_page_element_alt_text":"updateAltText","update_page_element_transform":"updateElementTransform","update_page_elements_z_order":"updateZOrder","update_page_properties":"updatePageProperties","update_paragraph_style":"updateParagraphStyle","update_shape_properties":"updateShapeProperties","update_slide_properties":"updateSlideProperties","update_table_border_properties":"updateTableBorderProperties","update_table_cell_properties":"updateTableCellProperties","update_table_column_properties":"updateTableColumnProperties","update_table_row_properties":"updateTableRowProperties","update_text_style":"updateTextStyle","update_video_properties":"updateVideoProperties","write":"writeToPresentation"},"params":{"action":{"oauthCredential":"credential"}}},"google_tasks":{"namespace":"googleTasks","methods":{"create":"createTask","delete":"deleteTask","get":"getTask","list":"listTasks","list_task_lists":"listTaskLists","update":"updateTask"},"params":{"action":{"oauthCredential":"credential"}}},"google_translate":{"namespace":"googleTranslate","methods":{"detect":"detectLanguage","text":"translateText"}},"google_vault":{"namespace":"googleVault","methods":{"add_held_accounts":"addHeldAccounts","add_matters_permissions":"addMatterCollaborator","close_matters":"closeMatter","create_matters":"createMatter","create_matters_export":"createExport","create_matters_holds":"createHold","create_saved_query":"createSavedQuery","delete_matters":"deleteMatter","delete_matters_export":"deleteExport","delete_matters_holds":"deleteHold","delete_saved_query":"deleteSavedQuery","download_export_file":"downloadExportFile","list_matters":"listMatters","list_matters_export":"listExports","list_matters_holds":"listHolds","list_saved_queries":"listSavedQueries","remove_held_accounts":"removeHeldAccounts","remove_matters_permissions":"removeMatterCollaborator","reopen_matters":"reopenMatter","undelete_matters":"undeleteMatter","update_matters":"updateMatter","update_matters_holds":"updateHold"},"params":{"action":{"oauthCredential":"credential"}}},"grafana":{"namespace":"legacy.grafana","methods":{"grafana_check_data_source_health":"checkDataSourceHealth","grafana_create_alert_rule":"createAlertRule","grafana_create_annotation":"createAnnotation","grafana_create_contact_point":"createContactPoint","grafana_create_dashboard":"createDashboard","grafana_create_folder":"createFolder","grafana_delete_alert_rule":"deleteAlertRule","grafana_delete_annotation":"deleteAnnotation","grafana_delete_contact_point":"deleteContactPoint","grafana_delete_dashboard":"deleteDashboard","grafana_delete_folder":"deleteFolder","grafana_get_alert_rule":"getAlertRule","grafana_get_alert_rule_group":"getAlertRuleGroup","grafana_get_dashboard":"getDashboard","grafana_get_data_source":"getDataSource","grafana_get_folder":"getFolder","grafana_get_health":"getHealth","grafana_list_alert_rules":"listAlertRules","grafana_list_annotations":"listAnnotations","grafana_list_contact_points":"listContactPoints","grafana_list_dashboards":"listDashboards","grafana_list_data_sources":"listDataSources","grafana_list_folders":"listFolders","grafana_move_folder":"moveFolder","grafana_query_data_source":"queryDataSource","grafana_update_alert_rule":"updateAlertRule","grafana_update_annotation":"updateAnnotation","grafana_update_contact_point":"updateContactPoint","grafana_update_dashboard":"updateDashboard","grafana_update_folder":"updateFolder"}},"grafana_v2":{"namespace":"grafana","methods":{"grafana_check_data_source_health":"checkDataSourceHealth","grafana_create_alert_rule":"createAlertRule","grafana_create_annotation":"createAnnotation","grafana_create_contact_point":"createContactPoint","grafana_create_dashboard":"createDashboard","grafana_create_folder":"createFolder","grafana_delete_alert_rule":"deleteAlertRule","grafana_delete_annotation":"deleteAnnotation","grafana_delete_contact_point":"deleteContactPoint","grafana_delete_dashboard":"deleteDashboard","grafana_delete_folder":"deleteFolder","grafana_get_alert_rule":"getAlertRule","grafana_get_alert_rule_group":"getAlertRuleGroup","grafana_get_dashboard":"getDashboard","grafana_get_data_source":"getDataSource","grafana_get_folder":"getFolder","grafana_get_health":"getHealth","grafana_list_alert_rules":"listAlertRules","grafana_list_annotations":"listAnnotations","grafana_list_contact_points":"listContactPoints","grafana_list_dashboards":"listDashboards","grafana_list_data_sources":"listDataSources","grafana_list_folders":"listFolders","grafana_move_folder":"moveFolder","grafana_query_data_source":"queryDataSource","grafana_update_alert_rule":"updateAlertRule","grafana_update_annotation":"updateAnnotation","grafana_update_contact_point":"updateContactPoint","grafana_update_dashboard":"updateDashboard","grafana_update_folder":"updateFolder"},"params":{"action":{"oauthCredential":"credential"}}},"grain":{"namespace":"legacy.grain","methods":{"grain_create_hook":"createWebhook","grain_delete_hook":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams","grain_list_views":"listViews"},"triggers":{"grain_highlight_created":"highlightCreated","grain_highlight_updated":"highlightUpdated","grain_item_added":"itemAdded","grain_item_updated":"itemUpdated","grain_recording_created":"recordingCreated","grain_recording_updated":"recordingUpdated","grain_story_created":"storyCreated","grain_webhook":"webhook"}},"grain_v2":{"namespace":"legacy.grainV2","methods":{"grain_create_hook_v2":"createWebhook","grain_delete_hook_v2":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks_v2":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams"},"triggers":{"grain_all_events_v2":"allEvents","grain_highlight_added_v2":"highlightAdded","grain_highlight_deleted_v2":"highlightDeleted","grain_highlight_updated_v2":"highlightUpdated","grain_recording_added_v2":"recordingAdded","grain_recording_deleted_v2":"recordingDeleted","grain_recording_updated_v2":"recordingUpdated","grain_story_added_v2":"storyAdded","grain_story_deleted_v2":"storyDeleted","grain_story_updated_v2":"storyUpdated","grain_upload_status_v2":"uploadStatus"}},"grain_v3":{"namespace":"grain","methods":{"grain_create_hook_v2":"createWebhook","grain_delete_hook_v2":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks_v2":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams"},"triggers":{"grain_all_events_v2":"allEvents","grain_highlight_added_v2":"highlightAdded","grain_highlight_deleted_v2":"highlightDeleted","grain_highlight_updated_v2":"highlightUpdated","grain_recording_added_v2":"recordingAdded","grain_recording_deleted_v2":"recordingDeleted","grain_recording_updated_v2":"recordingUpdated","grain_story_added_v2":"storyAdded","grain_story_deleted_v2":"storyDeleted","grain_story_updated_v2":"storyUpdated","grain_upload_status_v2":"uploadStatus"},"params":{"action":{"oauthCredential":"credential"}}},"granola":{"namespace":"legacy.granola","methods":{"create_webhook_endpoint":"createWebhookEndpoint","delete_webhook_endpoint":"deleteWebhookEndpoint","get_note":"getNote","get_transcript":"getTranscript","list_audit_events":"listAuditEvents","list_folders":"listFolders","list_notes":"listNotes","list_webhook_endpoints":"listWebhookEndpoints","update_webhook_endpoint":"updateWebhookEndpoint"},"triggers":{"granola_note_access_granted":"noteAccessGranted","granola_note_edited":"noteEdited","granola_note_generated":"noteGenerated","granola_webhook":"webhook"}},"granola_v2":{"namespace":"granola","methods":{"create_webhook_endpoint":"createWebhookEndpoint","delete_webhook_endpoint":"deleteWebhookEndpoint","get_note":"getNote","get_transcript":"getTranscript","list_audit_events":"listAuditEvents","list_folders":"listFolders","list_notes":"listNotes","list_webhook_endpoints":"listWebhookEndpoints","update_webhook_endpoint":"updateWebhookEndpoint"},"triggers":{"granola_note_access_granted":"noteAccessGranted","granola_note_edited":"noteEdited","granola_note_generated":"noteGenerated","granola_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"greenhouse":{"namespace":"legacy.greenhouse","methods":{"greenhouse_get_application":"getApplication","greenhouse_get_candidate":"getCandidate","greenhouse_get_job":"getJob","greenhouse_get_user":"getUser","greenhouse_list_applications":"listApplications","greenhouse_list_candidates":"listCandidates","greenhouse_list_departments":"listDepartments","greenhouse_list_job_stages":"listJobStages","greenhouse_list_jobs":"listJobs","greenhouse_list_offices":"listOffices","greenhouse_list_users":"listUsers"},"triggers":{"greenhouse_candidate_hired":"candidateHired","greenhouse_candidate_rejected":"candidateRejected","greenhouse_candidate_stage_change":"candidateStageChange","greenhouse_job_created":"jobCreated","greenhouse_job_updated":"jobUpdated","greenhouse_new_application":"newApplication","greenhouse_offer_created":"offerCreated","greenhouse_webhook":"webhook"}},"greenhouse_v2":{"namespace":"greenhouse","methods":{"apply_candidate_tag":"applyCandidateTag","convert_prospect":"convertProspect","create_application":"createApplication","create_attachment":"createAttachment","create_candidate":"createCandidate","create_candidate_tag":"createCandidateTag","create_note":"createNote","delete_application":"deleteApplication","delete_attachment":"deleteAttachment","delete_candidate":"deleteCandidate","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_user":"getUser","hire_application":"hireApplication","list_application_stages":"listApplicationStages","list_applications":"listApplications","list_applied_candidate_tags":"listAppliedCandidateTags","list_attachments":"listAttachments","list_candidate_educations":"listCandidateEducations","list_candidate_employments":"listCandidateEmployments","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_close_reasons":"listCloseReasons","list_custom_field_options":"listCustomFieldOptions","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_email_templates":"listEmailTemplates","list_interviews":"listInterviews","list_job_hiring_managers":"listJobHiringManagers","list_job_interview_stages":"listJobInterviewStages","list_job_owners":"listJobOwners","list_jobs":"listJobs","list_notes":"listNotes","list_offers":"listOffers","list_offices":"listOffices","list_openings":"listOpenings","list_prospect_pool_stages":"listProspectPoolStages","list_prospect_pools":"listProspectPools","list_referrers":"listReferrers","list_rejection_reasons":"listRejectionReasons","list_scorecards":"listScorecards","list_sources":"listSources","list_users":"listUsers","move_application":"moveApplication","reject_application":"rejectApplication","remove_candidate_tag":"removeCandidateTag","unreject_application":"unrejectApplication","update_application":"updateApplication","update_candidate":"updateCandidate"},"triggers":{"greenhouse_candidate_hired":"candidateHired","greenhouse_candidate_rejected":"candidateRejected","greenhouse_candidate_stage_change":"candidateStageChange","greenhouse_job_created":"jobCreated","greenhouse_job_updated":"jobUpdated","greenhouse_new_application":"newApplication","greenhouse_offer_created":"offerCreated","greenhouse_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"greptile":{"namespace":"greptile","methods":{"greptile_index_repo":"indexRepository","greptile_query":"query","greptile_status":"checkStatus"}},"guardrails":{"namespace":"guardrails"},"harmonic":{"namespace":"harmonic","methods":{"harmonic_batch_get_people":"batchGetPeople","harmonic_clear_people_saved_search_net_new_results":"clearPeopleSavedSearchNetNewResults","harmonic_enrich_person":"enrichPerson","harmonic_get_company_employees":"getCompanyEmployees","harmonic_get_email_enrichment_job":"getEmailEnrichmentJob","harmonic_get_email_enrichment_usage":"getEmailEnrichmentUsage","harmonic_get_enrichment_status":"getEnrichmentStatus","harmonic_get_people_saved_search_net_new_results":"getPeopleSavedSearchNetNewResults","harmonic_get_people_saved_search_results":"getPeopleSavedSearchResults","harmonic_get_person":"getPerson","harmonic_list_people_saved_searches":"listPeopleSavedSearches","harmonic_search_people_scout":"searchPeopleWithScout","harmonic_submit_email_enrichment_job":"submitEmailEnrichmentJob"},"params":{"action":{"oauthCredential":"credential"}}},"helpscout":{"namespace":"helpscout","methods":{"assign_conversation":"assignConversation","create_conversation":"createConversation","create_customer":"createCustomer","create_customer_thread":"addCustomerMessage","create_note":"addNote","create_reply":"replyToConversation","delete_conversation":"deleteConversation","get_conversation":"getConversation","get_current_user":"getCurrentUser","get_customer":"getCustomer","get_organization":"getOrganization","get_saved_reply":"getSavedReply","list_conversations":"listConversations","list_custom_fields":"listCustomFields","list_customer_properties":"listCustomerProperties","list_customers":"listCustomers","list_folders":"listFolders","list_mailboxes":"listInboxes","list_organizations":"listOrganizations","list_saved_replies":"listSavedReplies","list_tags":"listTags","list_teams":"listTeams","list_threads":"listThreads","list_users":"listUsers","list_workflows":"listWorkflows","move_conversation":"moveConversation","run_workflow":"runWorkflow","set_conversation_tags":"setConversationTags","snooze_conversation":"snoozeConversation","unassign_conversation":"unassignConversation","unsnooze_conversation":"unsnoozeConversation","update_conversation_customer":"changeConversationCustomer","update_conversation_status":"updateConversationStatus","update_conversation_subject":"updateConversationSubject","update_custom_fields":"updateCustomFields","update_customer":"updateCustomer","update_customer_properties":"updateCustomerProperties"},"triggers":{"helpscout_agent_replied":"agentReplied","helpscout_conversation_assigned":"conversationAssigned","helpscout_conversation_created":"conversationCreated","helpscout_conversation_deleted":"conversationDeleted","helpscout_conversation_merged":"conversationMerged","helpscout_conversation_moved":"conversationMoved","helpscout_conversation_status_changed":"conversationStatusChanged","helpscout_conversation_tags_updated":"conversationTagsUpdated","helpscout_customer_created":"customerCreated","helpscout_customer_replied":"customerReplied","helpscout_customer_updated":"customerUpdated","helpscout_note_created":"noteCreated","helpscout_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"hex":{"namespace":"legacy.hex","methods":{"cancel_run":"cancelRun","create_collection":"createCollection","create_group":"createGroup","deactivate_user":"deactivateUser","delete_group":"deleteGroup","get_collection":"getCollection","get_data_connection":"getDataConnection","get_group":"getGroup","get_project":"getProject","get_project_runs":"getProjectRuns","get_queried_tables":"getQueriedTables","get_run_status":"getRunStatus","list_collections":"listCollections","list_data_connections":"listDataConnections","list_groups":"listGroups","list_projects":"listProjects","list_users":"listUsers","run_project":"runProject","update_collection":"updateCollection","update_group":"updateGroup","update_project":"updateProject"}},"hex_v2":{"namespace":"hex","methods":{"cancel_run":"cancelRun","create_collection":"createCollection","create_group":"createGroup","deactivate_user":"deactivateUser","delete_group":"deleteGroup","get_collection":"getCollection","get_data_connection":"getDataConnection","get_group":"getGroup","get_project":"getProject","get_project_runs":"getProjectRuns","get_queried_tables":"getQueriedTables","get_run_status":"getRunStatus","list_collections":"listCollections","list_data_connections":"listDataConnections","list_groups":"listGroups","list_projects":"listProjects","list_users":"listUsers","run_project":"runProject","update_collection":"updateCollection","update_group":"updateGroup","update_project":"updateProject"},"params":{"action":{"oauthCredential":"credential"}}},"higgsfield":{"namespace":"higgsfield","methods":{"higgsfield_cancel_request":"cancelRequest","higgsfield_create_character":"createCharacter","higgsfield_delete_character":"deleteCharacter","higgsfield_delete_request":"deleteRequest","higgsfield_generate":"generateAnyModel","higgsfield_generate_soul_image":"generateSoulImage","higgsfield_get_character":"getCharacter","higgsfield_get_request_status":"getRequestStatus","higgsfield_list_characters":"listCharacters"},"params":{"action":{"oauthCredential":"credential"}}},"hubspot":{"namespace":"hubspot","methods":{"add_list_memberships":"addListMembers","create_appointment":"createAppointment","create_association":"createAssociation","create_company":"createCompany","create_contact":"createContact","create_deal":"createDeal","create_email":"createEmail","create_line_item":"createLineItem","create_list":"createList","create_note":"createNote","create_ticket":"createTicket","delete_association":"deleteAssociation","delete_company":"deleteCompany","delete_contact":"deleteContact","delete_deal":"deleteDeal","delete_line_item":"deleteLineItem","delete_ticket":"deleteTicket","get_appointments":"getAppointments","get_association_labels":"getAssociationLabels","get_carts":"getCarts","get_companies":"getCompanies","get_contacts":"getContacts","get_deals":"getDeals","get_emails":"getEmails","get_line_items":"getLineItems","get_list_memberships":"getListMembers","get_lists":"getLists","get_marketing_events":"getMarketingEvents","get_notes":"getNotes","get_properties":"getProperties","get_quotes":"getQuotes","get_tickets":"getTickets","get_users":"getUsers","list_associations":"listAssociations","list_owners":"listOwners","remove_list_memberships":"removeListMembers","search_companies":"searchCompanies","search_contacts":"searchContacts","search_deals":"searchDeals","search_emails":"searchEmails","search_line_items":"searchLineItems","search_notes":"searchNotes","search_quotes":"searchQuotes","search_tickets":"searchTickets","update_appointment":"updateAppointment","update_company":"updateCompany","update_contact":"updateContact","update_deal":"updateDeal","update_line_item":"updateLineItem","update_ticket":"updateTicket"},"triggers":{"hubspot_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"huggingface":{"namespace":"legacy.huggingface"},"huggingface_v2":{"namespace":"huggingface","params":{"action":{"oauthCredential":"credential"}}},"human_in_the_loop":{"namespace":"legacy.humanInTheLoop"},"human_in_the_loop_v2":{"namespace":"human"},"hunter":{"namespace":"hunter","methods":{"hunter_companies_find":"findCompany","hunter_discover":"discoverCompanies","hunter_domain_search":"domainSearch","hunter_email_count":"emailCount","hunter_email_finder":"emailFinder","hunter_email_verifier":"emailVerifier"}},"iam":{"namespace":"legacy.iam","methods":{"add_user_to_group":"addUserToGroup","attach_role_policy":"attachRolePolicy","attach_user_policy":"attachUserPolicy","create_access_key":"createAccessKey","create_role":"createRole","create_user":"createUser","delete_access_key":"deleteAccessKey","delete_role":"deleteRole","delete_user":"deleteUser","detach_role_policy":"detachRolePolicy","detach_user_policy":"detachUserPolicy","get_policy":"getPolicy","get_role":"getRole","get_user":"getUser","list_access_keys":"listAccessKeys","list_attached_role_policies":"listAttachedRolePolicies","list_attached_user_policies":"listAttachedUserPolicies","list_groups":"listGroups","list_policies":"listPolicies","list_roles":"listRoles","list_users":"listUsers","remove_user_from_group":"removeUserFromGroup","simulate_principal_policy":"simulatePrincipalPolicy","update_access_key":"updateAccessKey"}},"iam_v2":{"namespace":"iam","methods":{"add_user_to_group":"addUserToGroup","attach_role_policy":"attachRolePolicy","attach_user_policy":"attachUserPolicy","create_access_key":"createAccessKey","create_role":"createRole","create_user":"createUser","delete_access_key":"deleteAccessKey","delete_role":"deleteRole","delete_user":"deleteUser","detach_role_policy":"detachRolePolicy","detach_user_policy":"detachUserPolicy","get_policy":"getPolicy","get_role":"getRole","get_user":"getUser","list_access_keys":"listAccessKeys","list_attached_role_policies":"listAttachedRolePolicies","list_attached_user_policies":"listAttachedUserPolicies","list_groups":"listGroups","list_policies":"listPolicies","list_roles":"listRoles","list_users":"listUsers","remove_user_from_group":"removeUserFromGroup","simulate_principal_policy":"simulatePrincipalPolicy","update_access_key":"updateAccessKey"},"params":{"action":{"oauthCredential":"credential"}}},"icypeas":{"namespace":"icypeas","methods":{"icypeas_find_email":"findEmail","icypeas_verify_email":"verifyEmail"}},"identity_center":{"namespace":"legacy.identityCenter","methods":{"check_assignment_deletion_status":"checkAssignmentDeletionStatus","check_assignment_status":"checkAssignmentStatus","create_account_assignment":"createAccountAssignment","delete_account_assignment":"deleteAccountAssignment","describe_account":"describeAccount","describe_group":"describeGroup","describe_user":"describeUser","get_group":"getGroup","get_user":"getUser","list_account_assignments":"listAccountAssignmentsForPrincipal","list_accounts":"listAccounts","list_assignments_for_account":"listAssignmentsForAccount","list_group_memberships":"listGroupMemberships","list_groups":"listGroups","list_instances":"listInstances","list_permission_sets":"listPermissionSets"}},"identity_center_v2":{"namespace":"identityCenter","methods":{"check_assignment_deletion_status":"checkAssignmentDeletionStatus","check_assignment_status":"checkAssignmentStatus","create_account_assignment":"createAccountAssignment","delete_account_assignment":"deleteAccountAssignment","describe_account":"describeAccount","describe_group":"describeGroup","describe_user":"describeUser","get_group":"getGroup","get_user":"getUser","list_account_assignments":"listAccountAssignmentsForPrincipal","list_accounts":"listAccounts","list_assignments_for_account":"listAssignmentsForAccount","list_group_memberships":"listGroupMemberships","list_groups":"listGroups","list_instances":"listInstances","list_permission_sets":"listPermissionSets"},"params":{"action":{"oauthCredential":"credential"}}},"image_generator":{"namespace":"legacy.imageGenerator"},"image_generator_v2":{"namespace":"imageGenerator"},"imap":{"namespace":"imap","triggers":{"imap_poller":"poller"}},"incidentio":{"namespace":"legacy.incidentio","methods":{"incidentio_actions_create":"createAction","incidentio_actions_list":"listActions","incidentio_actions_show":"showAction","incidentio_actions_update":"updateAction","incidentio_alert_events_create":"createAlertEvent","incidentio_alerts_list":"listAlerts","incidentio_alerts_resolve":"resolveAlert","incidentio_alerts_show":"showAlert","incidentio_catalog_entries_list":"listCatalogEntries","incidentio_catalog_types_list":"listCatalogTypes","incidentio_custom_fields_create":"createCustomField","incidentio_custom_fields_delete":"deleteCustomField","incidentio_custom_fields_list":"listCustomFields","incidentio_custom_fields_show":"showCustomField","incidentio_custom_fields_update":"updateCustomField","incidentio_escalation_paths_create":"createEscalationPath","incidentio_escalation_paths_delete":"deleteEscalationPath","incidentio_escalation_paths_list":"listEscalationPaths","incidentio_escalation_paths_show":"showEscalationPath","incidentio_escalation_paths_update":"updateEscalationPath","incidentio_escalations_cancel":"cancelEscalation","incidentio_escalations_create":"createEscalation","incidentio_escalations_list":"listEscalations","incidentio_escalations_show":"showEscalation","incidentio_follow_ups_create":"createFollowUp","incidentio_follow_ups_list":"listFollowUps","incidentio_follow_ups_show":"showFollowUp","incidentio_follow_ups_update":"updateFollowUp","incidentio_incident_alerts_list":"listIncidentAlerts","incidentio_incident_memberships_create":"grantIncidentMembership","incidentio_incident_memberships_revoke":"revokeIncidentMembership","incidentio_incident_participants_list":"listIncidentParticipants","incidentio_incident_roles_create":"createIncidentRole","incidentio_incident_roles_delete":"deleteIncidentRole","incidentio_incident_roles_list":"listIncidentRoles","incidentio_incident_roles_show":"showIncidentRole","incidentio_incident_roles_update":"updateIncidentRole","incidentio_incident_statuses_list":"listIncidentStatuses","incidentio_incident_timestamps_list":"listIncidentTimestamps","incidentio_incident_timestamps_show":"showIncidentTimestamp","incidentio_incident_types_list":"listIncidentTypes","incidentio_incident_updates_list":"listIncidentUpdates","incidentio_incidents_create":"createIncident","incidentio_incidents_list":"listIncidents","incidentio_incidents_show":"showIncident","incidentio_incidents_update":"updateIncident","incidentio_on_call_now":"getWhoIsOnCall","incidentio_schedule_entries_list":"listScheduleEntries","incidentio_schedule_overrides_create":"createScheduleOverride","incidentio_schedule_overrides_list":"listScheduleOverrides","incidentio_schedules_create":"createSchedule","incidentio_schedules_delete":"deleteSchedule","incidentio_schedules_list":"listSchedules","incidentio_schedules_show":"showSchedule","incidentio_schedules_update":"updateSchedule","incidentio_severities_list":"listSeverities","incidentio_teams_list":"listTeams","incidentio_teams_show":"showTeam","incidentio_users_list":"listUsers","incidentio_users_show":"showUser","incidentio_workflows_create":"createWorkflow","incidentio_workflows_delete":"deleteWorkflow","incidentio_workflows_list":"listWorkflows","incidentio_workflows_show":"showWorkflow","incidentio_workflows_update":"updateWorkflow"},"triggers":{"incidentio_alert_created":"alertCreated","incidentio_incident_created":"incidentCreated","incidentio_incident_status_updated":"incidentStatusUpdated","incidentio_incident_updated":"incidentUpdated"}},"incidentio_v2":{"namespace":"incidentio","methods":{"incidentio_actions_create":"createAction","incidentio_actions_list":"listActions","incidentio_actions_show":"showAction","incidentio_actions_update":"updateAction","incidentio_alert_events_create":"createAlertEvent","incidentio_alerts_list":"listAlerts","incidentio_alerts_resolve":"resolveAlert","incidentio_alerts_show":"showAlert","incidentio_catalog_entries_list":"listCatalogEntries","incidentio_catalog_types_list":"listCatalogTypes","incidentio_custom_fields_create":"createCustomField","incidentio_custom_fields_delete":"deleteCustomField","incidentio_custom_fields_list":"listCustomFields","incidentio_custom_fields_show":"showCustomField","incidentio_custom_fields_update":"updateCustomField","incidentio_escalation_paths_create":"createEscalationPath","incidentio_escalation_paths_delete":"deleteEscalationPath","incidentio_escalation_paths_list":"listEscalationPaths","incidentio_escalation_paths_show":"showEscalationPath","incidentio_escalation_paths_update":"updateEscalationPath","incidentio_escalations_cancel":"cancelEscalation","incidentio_escalations_create":"createEscalation","incidentio_escalations_list":"listEscalations","incidentio_escalations_show":"showEscalation","incidentio_follow_ups_create":"createFollowUp","incidentio_follow_ups_list":"listFollowUps","incidentio_follow_ups_show":"showFollowUp","incidentio_follow_ups_update":"updateFollowUp","incidentio_incident_alerts_list":"listIncidentAlerts","incidentio_incident_memberships_create":"grantIncidentMembership","incidentio_incident_memberships_revoke":"revokeIncidentMembership","incidentio_incident_participants_list":"listIncidentParticipants","incidentio_incident_roles_create":"createIncidentRole","incidentio_incident_roles_delete":"deleteIncidentRole","incidentio_incident_roles_list":"listIncidentRoles","incidentio_incident_roles_show":"showIncidentRole","incidentio_incident_roles_update":"updateIncidentRole","incidentio_incident_statuses_list":"listIncidentStatuses","incidentio_incident_timestamps_list":"listIncidentTimestamps","incidentio_incident_timestamps_show":"showIncidentTimestamp","incidentio_incident_types_list":"listIncidentTypes","incidentio_incident_updates_list":"listIncidentUpdates","incidentio_incidents_create":"createIncident","incidentio_incidents_list":"listIncidents","incidentio_incidents_show":"showIncident","incidentio_incidents_update":"updateIncident","incidentio_on_call_now":"getWhoIsOnCall","incidentio_schedule_entries_list":"listScheduleEntries","incidentio_schedule_overrides_create":"createScheduleOverride","incidentio_schedule_overrides_list":"listScheduleOverrides","incidentio_schedules_create":"createSchedule","incidentio_schedules_delete":"deleteSchedule","incidentio_schedules_list":"listSchedules","incidentio_schedules_show":"showSchedule","incidentio_schedules_update":"updateSchedule","incidentio_severities_list":"listSeverities","incidentio_teams_list":"listTeams","incidentio_teams_show":"showTeam","incidentio_users_list":"listUsers","incidentio_users_show":"showUser","incidentio_workflows_create":"createWorkflow","incidentio_workflows_delete":"deleteWorkflow","incidentio_workflows_list":"listWorkflows","incidentio_workflows_show":"showWorkflow","incidentio_workflows_update":"updateWorkflow"},"triggers":{"incidentio_alert_created":"alertCreated","incidentio_incident_created":"incidentCreated","incidentio_incident_status_updated":"incidentStatusUpdated","incidentio_incident_updated":"incidentUpdated"},"params":{"action":{"oauthCredential":"credential"}}},"infisical":{"namespace":"legacy.infisical","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","get_secret":"getSecret","list_secrets":"listSecrets","update_secret":"updateSecret"}},"infisical_v2":{"namespace":"infisical","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","get_secret":"getSecret","list_secrets":"listSecrets","update_secret":"updateSecret"},"params":{"action":{"oauthCredential":"credential"}}},"input_trigger":{"namespace":"legacy.inputTrigger"},"instagram":{"namespace":"legacy.instagram","methods":{"instagram_delete_comment":"deleteComment","instagram_download_media":"downloadMedia","instagram_get_account_insights":"getAccountInsights","instagram_get_container_status":"getContainerStatus","instagram_get_conversation_messages":"getConversationMessages","instagram_get_media":"getMedia","instagram_get_media_insights":"getMediaInsights","instagram_get_message":"getMessage","instagram_get_profile":"getProfile","instagram_get_publishing_limit":"getPublishingLimit","instagram_hide_comment":"hideComment","instagram_list_comments":"listComments","instagram_list_conversations":"listConversations","instagram_list_media":"listMedia","instagram_list_stories":"listStories","instagram_private_reply":"privateReply","instagram_publish_carousel":"publishCarousel","instagram_publish_image":"publishImage","instagram_publish_reel":"publishReel","instagram_publish_story":"publishStory","instagram_publish_video":"publishVideo","instagram_reply_to_comment":"replyToComment","instagram_send_text_message":"sendTextMessage","instagram_set_comments_enabled":"setCommentsEnabled"},"params":{"action":{"oauthCredential":"credential"}}},"instantly":{"namespace":"legacy.instantly","methods":{"activate_campaign":"activateCampaign","create_campaign":"createCampaign","create_lead":"createLead","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_leads":"deleteLeads","get_lead":"getLead","list_campaigns":"listCampaigns","list_emails":"listEmails","list_lead_lists":"listLeadLists","list_leads":"listLeads","patch_campaign":"patchCampaign","patch_lead":"patchLead","pause_campaign":"pauseCampaign","reply_to_email":"replyToEmail","update_lead_interest_status":"updateLeadInterestStatus"},"triggers":{"instantly_account_error":"accountError","instantly_auto_reply_received":"autoReplyReceived","instantly_campaign_completed":"campaignCompleted","instantly_email_bounced":"emailBounced","instantly_email_opened":"emailOpened","instantly_email_sent":"emailSent","instantly_lead_closed":"leadClosed","instantly_lead_interested":"leadInterested","instantly_lead_meeting_booked":"leadMeetingBooked","instantly_lead_meeting_completed":"leadMeetingCompleted","instantly_lead_neutral":"leadNeutral","instantly_lead_no_show":"leadNoShow","instantly_lead_not_interested":"leadNotInterested","instantly_lead_out_of_office":"leadOutOfOffice","instantly_lead_unsubscribed":"leadUnsubscribed","instantly_lead_wrong_person":"leadWrongPerson","instantly_link_clicked":"linkClicked","instantly_reply_received":"replyReceived","instantly_supersearch_enrichment_completed":"supersearchEnrichmentCompleted","instantly_webhook":"webhook"}},"instantly_v2":{"namespace":"instantly","methods":{"activate_campaign":"activateCampaign","create_campaign":"createCampaign","create_lead":"createLead","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_leads":"deleteLeads","get_lead":"getLead","list_campaigns":"listCampaigns","list_emails":"listEmails","list_lead_lists":"listLeadLists","list_leads":"listLeads","patch_campaign":"patchCampaign","patch_lead":"patchLead","pause_campaign":"pauseCampaign","reply_to_email":"replyToEmail","update_lead_interest_status":"updateLeadInterestStatus"},"triggers":{"instantly_account_error":"accountError","instantly_auto_reply_received":"autoReplyReceived","instantly_campaign_completed":"campaignCompleted","instantly_email_bounced":"emailBounced","instantly_email_opened":"emailOpened","instantly_email_sent":"emailSent","instantly_lead_closed":"leadClosed","instantly_lead_interested":"leadInterested","instantly_lead_meeting_booked":"leadMeetingBooked","instantly_lead_meeting_completed":"leadMeetingCompleted","instantly_lead_neutral":"leadNeutral","instantly_lead_no_show":"leadNoShow","instantly_lead_not_interested":"leadNotInterested","instantly_lead_out_of_office":"leadOutOfOffice","instantly_lead_unsubscribed":"leadUnsubscribed","instantly_lead_wrong_person":"leadWrongPerson","instantly_link_clicked":"linkClicked","instantly_reply_received":"replyReceived","instantly_supersearch_enrichment_completed":"supersearchEnrichmentCompleted","instantly_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"intercom":{"namespace":"legacy.intercom","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"}},"intercom_v2":{"namespace":"legacy.intercomV2","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"intercom_contact_created":"contactCreated","intercom_conversation_closed":"conversationClosed","intercom_conversation_created":"conversationCreated","intercom_conversation_reply":"conversationReply","intercom_user_created":"userCreated","intercom_webhook":"webhook"}},"intercom_v3":{"namespace":"intercom","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"intercom_contact_created":"contactCreated","intercom_conversation_closed":"conversationClosed","intercom_conversation_created":"conversationCreated","intercom_conversation_reply":"conversationReply","intercom_user_created":"userCreated","intercom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"intune":{"namespace":"intune","methods":{"intune_get_compliance_policy":"getCompliancePolicy","intune_get_detected_app":"getDetectedApp","intune_get_device":"getDevice","intune_get_device_configuration":"getDeviceConfiguration","intune_list_app_devices":"listAppDevices","intune_list_compliance_policies":"listCompliancePolicies","intune_list_compliance_policy_device_statuses":"listCompliancePolicyDeviceStatuses","intune_list_detected_apps":"listDetectedApps","intune_list_device_configurations":"listDeviceConfigurations","intune_list_devices":"listDevices","intune_reboot_device":"rebootDevice","intune_remote_lock_device":"remoteLockDevice","intune_retire_device":"retireDevice","intune_sync_device":"syncDevice"},"params":{"action":{"oauthCredential":"credential"}}},"jama":{"namespace":"jama","methods":{"create_comment":"createComment","create_item":"createItem","create_relationship":"createRelationship","delete_item":"deleteItem","delete_relationship":"deleteRelationship","get_baseline":"getBaseline","get_current_user":"getCurrentUser","get_filter":"getFilter","get_item":"getItem","get_item_type":"getItemType","get_item_version":"getItemVersion","get_project":"getProject","get_relationship":"getRelationship","get_test_cycle":"getTestCycle","get_test_plan":"getTestPlan","get_test_run":"getTestRun","list_baseline_items":"listBaselineItems","list_baselines":"listBaselines","list_downstream_items":"listDownstreamItems","list_filter_results":"listFilterResults","list_filters":"listFilters","list_item_children":"listItemChildren","list_item_comments":"listItemComments","list_item_types":"listItemTypes","list_item_versions":"listItemVersions","list_items":"listItems","list_pick_list_options":"listPickListOptions","list_pick_lists":"listPickLists","list_projects":"listProjects","list_relationship_types":"listRelationshipTypes","list_relationships":"listRelationships","list_releases":"listReleases","list_tags":"listTags","list_test_cycles":"listTestCycles","list_test_plans":"listTestPlans","list_test_runs":"listTestRuns","list_upstream_items":"listUpstreamItems","search_items":"searchItems","update_item":"updateItem","update_test_run":"updateTestRun"},"params":{"action":{"oauthCredential":"credential"}}},"jina":{"namespace":"jina","methods":{"jina_read_url":"readUrl","jina_search":"search"}},"jira":{"namespace":"jira","methods":{"add_attachment":"addAttachment","add_comment":"addComment","add_watcher":"addWatcher","add_worklog":"addWorklog","assign":"assignIssue","create_link":"createIssueLink","create_sprint":"createSprint","delete":"deleteIssue","delete_attachment":"deleteAttachment","delete_comment":"deleteComment","delete_link":"deleteIssueLink","delete_worklog":"deleteWorklog","get_attachments":"getAttachments","get_comments":"getComments","get_fields":"getFields","get_project":"getProject","get_transitions":"getTransitions","get_users":"getUsers","get_worklogs":"getWorklogs","list_issue_types":"listIssueTypes","list_projects":"listProjects","read":"readIssue","read-bulk":"readBulkIssues","remove_watcher":"removeWatcher","search":"searchIssues","search_users":"searchUsers","transition":"transitionIssue","update":"updateIssue","update_comment":"updateComment","update_worklog":"updateWorklog","write":"writeIssue"},"triggers":{"jira_comment_deleted":"commentDeleted","jira_comment_updated":"commentUpdated","jira_issue_commented":"issueCommented","jira_issue_created":"issueCreated","jira_issue_deleted":"issueDeleted","jira_issue_updated":"issueUpdated","jira_project_created":"projectCreated","jira_sprint_closed":"sprintClosed","jira_sprint_created":"sprintCreated","jira_sprint_started":"sprintStarted","jira_version_released":"versionReleased","jira_webhook":"webhook","jira_worklog_created":"worklogCreated","jira_worklog_deleted":"worklogDeleted","jira_worklog_updated":"worklogUpdated"},"params":{"action":{"oauthCredential":"credential"}}},"jira_service_management":{"namespace":"jiraServiceManagement","methods":{"add_comment":"addComment","add_customer":"addCustomer","add_organization":"addOrganization","add_participants":"addParticipants","answer_approval":"answerApproval","attach_form":"attachForm","copy_forms":"copyForms","create_object":"createAssetObject","create_organization":"createOrganization","create_request":"createRequest","delete_form":"deleteForm","delete_object":"deleteAssetObject","externalise_form":"externaliseForm","get_approvals":"getApprovals","get_comments":"getComments","get_customers":"getCustomers","get_form":"getForm","get_form_answers":"getFormAnswers","get_form_structure":"getFormStructure","get_form_templates":"getFormTemplates","get_issue_forms":"getIssueForms","get_object":"getAssetObject","get_object_schema":"getAssetSchema","get_object_type_attributes":"getAssetObjectTypeAttributes","get_organizations":"getOrganizations","get_participants":"getParticipants","get_queues":"getQueues","get_request":"getRequest","get_request_type_fields":"getRequestTypeFields","get_request_types":"getRequestTypes","get_requests":"getRequests","get_service_desks":"getServiceDesks","get_sla":"getSla","get_transitions":"getTransitions","internalise_form":"internaliseForm","list_object_schemas":"listAssetSchemas","list_object_types":"listAssetObjectTypes","reopen_form":"reopenForm","save_form_answers":"saveFormAnswers","search_objects_aql":"searchAssetsAql","submit_form":"submitForm","transition_request":"transitionRequest","update_object":"updateAssetObject"},"triggers":{"jsm_request_commented":"requestCommented","jsm_request_created":"requestCreated","jsm_request_resolved":"requestResolved","jsm_request_updated":"requestUpdated","jsm_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"jotform":{"namespace":"legacy.jotform","methods":{"add_label_resources":"addLabelResources","clone_form":"cloneForm","create_form":"createForm","create_label":"createLabel","create_question":"createQuestion","create_questions":"createQuestions","create_report":"createReport","create_submission":"createSubmission","create_submissions":"createSubmissions","create_webhook":"createWebhook","delete_form":"deleteForm","delete_label":"deleteLabel","delete_question":"deleteQuestion","delete_report":"deleteReport","delete_submission":"deleteSubmission","delete_webhook":"deleteWebhook","get_form":"getForm","get_form_properties":"getFormProperties","get_history":"getHistory","get_label":"getLabel","get_question":"getQuestion","get_report":"getReport","get_settings":"getSettings","get_submission":"getSubmission","get_usage":"getUsage","get_user":"getAccount","list_form_files":"listFormFiles","list_form_reports":"listFormReports","list_form_submissions":"listFormSubmissions","list_forms":"listForms","list_label_resources":"listLabelResources","list_labels":"listLabels","list_questions":"listQuestions","list_reports":"listReports","list_submissions":"listSubmissions","list_subusers":"listSubUsers","list_webhooks":"listWebhooks","remove_label_resources":"removeLabelResources","update_form_properties":"updateFormProperties","update_label":"updateLabel","update_question":"updateQuestion","update_settings":"updateSettings","update_submission":"updateSubmission"},"triggers":{"jotform_webhook":"webhook"}},"jotform_v2":{"namespace":"jotform","methods":{"add_label_resources":"addLabelResources","clone_form":"cloneForm","create_form":"createForm","create_label":"createLabel","create_question":"createQuestion","create_questions":"createQuestions","create_report":"createReport","create_submission":"createSubmission","create_submissions":"createSubmissions","create_webhook":"createWebhook","delete_form":"deleteForm","delete_label":"deleteLabel","delete_question":"deleteQuestion","delete_report":"deleteReport","delete_submission":"deleteSubmission","delete_webhook":"deleteWebhook","get_form":"getForm","get_form_properties":"getFormProperties","get_history":"getHistory","get_label":"getLabel","get_question":"getQuestion","get_report":"getReport","get_settings":"getSettings","get_submission":"getSubmission","get_usage":"getUsage","get_user":"getAccount","list_form_files":"listFormFiles","list_form_reports":"listFormReports","list_form_submissions":"listFormSubmissions","list_forms":"listForms","list_label_resources":"listLabelResources","list_labels":"listLabels","list_questions":"listQuestions","list_reports":"listReports","list_submissions":"listSubmissions","list_subusers":"listSubUsers","list_webhooks":"listWebhooks","remove_label_resources":"removeLabelResources","update_form_properties":"updateFormProperties","update_label":"updateLabel","update_question":"updateQuestion","update_settings":"updateSettings","update_submission":"updateSubmission"},"triggers":{"jotform_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"jupyter":{"namespace":"legacy.jupyter","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"}},"jupyter_v2":{"namespace":"legacy.jupyterV2","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"}},"jupyter_v3":{"namespace":"jupyter","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"kalshi":{"namespace":"legacy.kalshi","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"}},"kalshi_v2":{"namespace":"legacy.kalshiV2","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"}},"kalshi_v3":{"namespace":"kalshi","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"},"params":{"action":{"oauthCredential":"credential"}}},"ketch":{"namespace":"ketch","methods":{"get_consent":"getConsent","get_subscriptions":"getSubscriptions","invoke_right":"invokeRight","set_consent":"setConsent","set_subscriptions":"setSubscriptions"}},"knowledge":{"namespace":"knowledge","methods":{"create_document":"createDocument","delete_chunk":"deleteChunk","delete_document":"deleteDocument","get_connector":"getConnector","get_document":"getDocument","list_chunks":"listChunks","list_connectors":"listConnectors","list_documents":"listDocuments","list_tags":"listTags","search":"search","trigger_sync":"triggerSync","update_chunk":"updateChunk","upload_chunk":"uploadChunk","upsert_document":"upsertDocument"}},"lambda":{"namespace":"legacy.lambda","methods":{"add_permission":"addPermission","create_alias":"createAlias","create_event_source_mapping":"createEventSourceMapping","create_function":"createFunction","create_function_url_config":"createFunctionUrl","delete_alias":"deleteAlias","delete_event_source_mapping":"deleteEventSourceMapping","delete_function":"deleteFunction","delete_function_concurrency":"deleteFunctionConcurrency","delete_function_event_invoke_config":"deleteAsyncInvokeConfig","delete_function_url_config":"deleteFunctionUrl","delete_provisioned_concurrency_config":"deleteProvisionedConcurrency","get_account_settings":"getAccountSettings","get_alias":"getAlias","get_event_source_mapping":"getEventSourceMapping","get_function":"getFunction","get_function_concurrency":"getFunctionConcurrency","get_function_configuration":"getFunctionConfiguration","get_function_event_invoke_config":"getAsyncInvokeConfig","get_function_recursion_config":"getRecursionConfig","get_function_url_config":"getFunctionUrl","get_layer_version":"getLayerVersion","get_policy":"getPolicy","get_provisioned_concurrency_config":"getProvisionedConcurrency","get_runtime_management_config":"getRuntimeManagementConfig","invoke":"invokeFunction","list_aliases":"listAliases","list_event_source_mappings":"listEventSourceMappings","list_function_event_invoke_configs":"listAsyncInvokeConfigs","list_function_url_configs":"listFunctionUrls","list_functions":"listFunctions","list_layer_versions":"listLayerVersions","list_layers":"listLayers","list_provisioned_concurrency_configs":"listProvisionedConcurrency","list_tags":"listTags","list_versions_by_function":"listFunctionVersions","publish_version":"publishVersion","put_function_concurrency":"setFunctionConcurrency","put_function_event_invoke_config":"setAsyncInvokeConfig","put_function_recursion_config":"setRecursionConfig","put_provisioned_concurrency_config":"setProvisionedConcurrency","put_runtime_management_config":"setRuntimeManagementConfig","remove_permission":"removePermission","tag_resource":"tagResource","untag_resource":"untagResource","update_alias":"updateAlias","update_event_source_mapping":"updateEventSourceMapping","update_function_code":"updateFunctionCode","update_function_configuration":"updateFunctionConfiguration","update_function_url_config":"updateFunctionUrl"}},"lambda_v2":{"namespace":"lambda","methods":{"add_permission":"addPermission","create_alias":"createAlias","create_event_source_mapping":"createEventSourceMapping","create_function":"createFunction","create_function_url_config":"createFunctionUrl","delete_alias":"deleteAlias","delete_event_source_mapping":"deleteEventSourceMapping","delete_function":"deleteFunction","delete_function_concurrency":"deleteFunctionConcurrency","delete_function_event_invoke_config":"deleteAsyncInvokeConfig","delete_function_url_config":"deleteFunctionUrl","delete_provisioned_concurrency_config":"deleteProvisionedConcurrency","get_account_settings":"getAccountSettings","get_alias":"getAlias","get_event_source_mapping":"getEventSourceMapping","get_function":"getFunction","get_function_concurrency":"getFunctionConcurrency","get_function_configuration":"getFunctionConfiguration","get_function_event_invoke_config":"getAsyncInvokeConfig","get_function_recursion_config":"getRecursionConfig","get_function_url_config":"getFunctionUrl","get_layer_version":"getLayerVersion","get_policy":"getPolicy","get_provisioned_concurrency_config":"getProvisionedConcurrency","get_runtime_management_config":"getRuntimeManagementConfig","invoke":"invokeFunction","list_aliases":"listAliases","list_event_source_mappings":"listEventSourceMappings","list_function_event_invoke_configs":"listAsyncInvokeConfigs","list_function_url_configs":"listFunctionUrls","list_functions":"listFunctions","list_layer_versions":"listLayerVersions","list_layers":"listLayers","list_provisioned_concurrency_configs":"listProvisionedConcurrency","list_tags":"listTags","list_versions_by_function":"listFunctionVersions","publish_version":"publishVersion","put_function_concurrency":"setFunctionConcurrency","put_function_event_invoke_config":"setAsyncInvokeConfig","put_function_recursion_config":"setRecursionConfig","put_provisioned_concurrency_config":"setProvisionedConcurrency","put_runtime_management_config":"setRuntimeManagementConfig","remove_permission":"removePermission","tag_resource":"tagResource","untag_resource":"untagResource","update_alias":"updateAlias","update_event_source_mapping":"updateEventSourceMapping","update_function_code":"updateFunctionCode","update_function_configuration":"updateFunctionConfiguration","update_function_url_config":"updateFunctionUrl"},"params":{"action":{"oauthCredential":"credential"}}},"langsmith":{"namespace":"legacy.langsmith","methods":{"langsmith_create_feedback":"createFeedback","langsmith_create_run":"createRun","langsmith_create_runs_batch":"createRunsBatch","langsmith_get_run":"getRun","langsmith_update_run":"updateRun"}},"langsmith_v2":{"namespace":"langsmith","methods":{"langsmith_create_feedback":"createFeedback","langsmith_create_run":"createRun","langsmith_create_runs_batch":"createRunsBatch","langsmith_get_run":"getRun","langsmith_update_run":"updateRun"},"params":{"action":{"oauthCredential":"credential"}}},"latex":{"namespace":"latex","methods":{"latex_compile":"compileDocument","latex_get_package":"getPackageDetails","latex_list_fonts":"listFonts","latex_search_packages":"searchPackages"}},"launchdarkly":{"namespace":"legacy.launchdarkly","methods":{"create_flag":"createFlag","delete_flag":"deleteFlag","get_audit_log":"getAuditLog","get_flag":"getFlag","get_flag_status":"getFlagStatus","list_environments":"listEnvironments","list_flags":"listFlags","list_members":"listMembers","list_projects":"listProjects","list_segments":"listSegments","toggle_flag":"toggleFlag","update_flag":"updateFlag"}},"launchdarkly_v2":{"namespace":"launchdarkly","methods":{"create_flag":"createFlag","delete_flag":"deleteFlag","get_audit_log":"getAuditLog","get_flag":"getFlag","get_flag_status":"getFlagStatus","list_environments":"listEnvironments","list_flags":"listFlags","list_members":"listMembers","list_projects":"listProjects","list_segments":"listSegments","toggle_flag":"toggleFlag","update_flag":"updateFlag"},"params":{"action":{"oauthCredential":"credential"}}},"leadmagic":{"namespace":"leadmagic","methods":{"leadmagic_company_search":"companySearch","leadmagic_email_to_profile":"emailToProfile","leadmagic_find_email":"findEmail","leadmagic_find_mobile":"findMobile","leadmagic_get_credits":"getCredits","leadmagic_profile_search":"profileSearch","leadmagic_profile_to_email":"profileToEmail","leadmagic_role_finder":"roleFinder","leadmagic_validate_email":"validateEmail"}},"lemlist":{"namespace":"legacy.lemlist","methods":{"get_activities":"getActivities","get_lead":"getLead","send_email":"sendEmail"},"triggers":{"lemlist_email_bounced":"emailBounced","lemlist_email_clicked":"emailClicked","lemlist_email_opened":"emailOpened","lemlist_email_replied":"emailReplied","lemlist_email_sent":"emailSent","lemlist_interested":"interested","lemlist_linkedin_replied":"linkedinReplied","lemlist_not_interested":"notInterested","lemlist_webhook":"webhook"}},"lemlist_v2":{"namespace":"lemlist","methods":{"get_activities":"getActivities","get_lead":"getLead","send_email":"sendEmail"},"triggers":{"lemlist_email_bounced":"emailBounced","lemlist_email_clicked":"emailClicked","lemlist_email_opened":"emailOpened","lemlist_email_replied":"emailReplied","lemlist_email_sent":"emailSent","lemlist_interested":"interested","lemlist_linkedin_replied":"linkedinReplied","lemlist_not_interested":"notInterested","lemlist_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"linear":{"namespace":"legacy.linear","methods":{"linear_add_label_to_issue":"addLabelToIssue","linear_add_label_to_project":"addLabelToProject","linear_archive_issue":"archiveIssue","linear_archive_label":"archiveLabel","linear_archive_project":"archiveProject","linear_create_attachment":"createAttachment","linear_create_comment":"createComment","linear_create_customer":"createCustomer","linear_create_customer_request":"createCustomerRequest","linear_create_customer_status":"createCustomerStatus","linear_create_customer_tier":"createCustomerTier","linear_create_cycle":"createCycle","linear_create_favorite":"createFavorite","linear_create_issue":"createIssue","linear_create_issue_relation":"createIssueRelation","linear_create_label":"createLabel","linear_create_project":"createProject","linear_create_project_label":"createProjectLabel","linear_create_project_milestone":"createProjectMilestone","linear_create_project_status":"createProjectStatus","linear_create_project_update":"createProjectUpdate","linear_create_workflow_state":"createWorkflowState","linear_delete_attachment":"deleteAttachment","linear_delete_comment":"deleteComment","linear_delete_customer":"deleteCustomer","linear_delete_customer_status":"deleteCustomerStatus","linear_delete_customer_tier":"deleteCustomerTier","linear_delete_issue":"deleteIssue","linear_delete_issue_relation":"deleteIssueRelation","linear_delete_project":"deleteProject","linear_delete_project_label":"deleteProjectLabel","linear_delete_project_milestone":"deleteProjectMilestone","linear_delete_project_status":"deleteProjectStatus","linear_get_active_cycle":"getActiveCycle","linear_get_customer":"getCustomer","linear_get_cycle":"getCycle","linear_get_issue":"getIssue","linear_get_project":"getProject","linear_get_viewer":"getViewer","linear_list_attachments":"listAttachments","linear_list_comments":"listComments","linear_list_customer_requests":"listCustomerRequests","linear_list_customer_statuses":"listCustomerStatuses","linear_list_customer_tiers":"listCustomerTiers","linear_list_customers":"listCustomers","linear_list_cycles":"listCycles","linear_list_favorites":"listFavorites","linear_list_issue_relations":"listIssueRelations","linear_list_labels":"listLabels","linear_list_notifications":"listNotifications","linear_list_project_labels":"listProjectLabels","linear_list_project_milestones":"listProjectMilestones","linear_list_project_statuses":"listProjectStatuses","linear_list_project_updates":"listProjectUpdates","linear_list_projects":"listProjects","linear_list_teams":"listTeams","linear_list_users":"listUsers","linear_list_workflow_states":"listWorkflowStates","linear_merge_customers":"mergeCustomers","linear_read_issues":"readIssues","linear_remove_label_from_issue":"removeLabelFromIssue","linear_remove_label_from_project":"removeLabelFromProject","linear_search_issues":"searchIssues","linear_unarchive_issue":"unarchiveIssue","linear_update_attachment":"updateAttachment","linear_update_comment":"updateComment","linear_update_customer":"updateCustomer","linear_update_customer_request":"updateCustomerRequest","linear_update_customer_status":"updateCustomerStatus","linear_update_customer_tier":"updateCustomerTier","linear_update_issue":"updateIssue","linear_update_label":"updateLabel","linear_update_notification":"updateNotification","linear_update_project":"updateProject","linear_update_project_label":"updateProjectLabel","linear_update_project_milestone":"updateProjectMilestone","linear_update_project_status":"updateProjectStatus","linear_update_workflow_state":"updateWorkflowState"},"triggers":{"linear_comment_created":"commentCreated","linear_comment_updated":"commentUpdated","linear_customer_request_created":"customerRequestCreated","linear_customer_request_updated":"customerRequestUpdated","linear_cycle_created":"cycleCreated","linear_cycle_updated":"cycleUpdated","linear_issue_created":"issueCreated","linear_issue_removed":"issueRemoved","linear_issue_updated":"issueUpdated","linear_label_created":"labelCreated","linear_label_updated":"labelUpdated","linear_project_created":"projectCreated","linear_project_update_created":"projectUpdateCreated","linear_project_updated":"projectUpdated","linear_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"linear_v2":{"namespace":"linear","methods":{"linear_add_label_to_issue":"addLabelToIssue","linear_add_label_to_project":"addLabelToProject","linear_archive_issue":"archiveIssue","linear_archive_label":"archiveLabel","linear_archive_project":"archiveProject","linear_create_attachment":"createAttachment","linear_create_comment":"createComment","linear_create_customer":"createCustomer","linear_create_customer_request":"createCustomerRequest","linear_create_customer_status":"createCustomerStatus","linear_create_customer_tier":"createCustomerTier","linear_create_cycle":"createCycle","linear_create_favorite":"createFavorite","linear_create_issue":"createIssue","linear_create_issue_relation":"createIssueRelation","linear_create_label":"createLabel","linear_create_project":"createProject","linear_create_project_label":"createProjectLabel","linear_create_project_milestone":"createProjectMilestone","linear_create_project_status":"createProjectStatus","linear_create_project_update":"createProjectUpdate","linear_create_workflow_state":"createWorkflowState","linear_delete_attachment":"deleteAttachment","linear_delete_comment":"deleteComment","linear_delete_customer":"deleteCustomer","linear_delete_customer_status":"deleteCustomerStatus","linear_delete_customer_tier":"deleteCustomerTier","linear_delete_issue":"deleteIssue","linear_delete_issue_relation":"deleteIssueRelation","linear_delete_project":"deleteProject","linear_delete_project_label":"deleteProjectLabel","linear_delete_project_milestone":"deleteProjectMilestone","linear_delete_project_status":"deleteProjectStatus","linear_get_active_cycle":"getActiveCycle","linear_get_customer":"getCustomer","linear_get_cycle":"getCycle","linear_get_issue":"getIssue","linear_get_project":"getProject","linear_get_viewer":"getViewer","linear_list_attachments":"listAttachments","linear_list_comments":"listComments","linear_list_customer_requests":"listCustomerRequests","linear_list_customer_statuses":"listCustomerStatuses","linear_list_customer_tiers":"listCustomerTiers","linear_list_customers":"listCustomers","linear_list_cycles":"listCycles","linear_list_favorites":"listFavorites","linear_list_issue_relations":"listIssueRelations","linear_list_labels":"listLabels","linear_list_notifications":"listNotifications","linear_list_project_labels":"listProjectLabels","linear_list_project_milestones":"listProjectMilestones","linear_list_project_statuses":"listProjectStatuses","linear_list_project_updates":"listProjectUpdates","linear_list_projects":"listProjects","linear_list_teams":"listTeams","linear_list_users":"listUsers","linear_list_workflow_states":"listWorkflowStates","linear_merge_customers":"mergeCustomers","linear_read_issues":"readIssues","linear_remove_label_from_issue":"removeLabelFromIssue","linear_remove_label_from_project":"removeLabelFromProject","linear_search_issues":"searchIssues","linear_unarchive_issue":"unarchiveIssue","linear_update_attachment":"updateAttachment","linear_update_comment":"updateComment","linear_update_customer":"updateCustomer","linear_update_customer_request":"updateCustomerRequest","linear_update_customer_status":"updateCustomerStatus","linear_update_customer_tier":"updateCustomerTier","linear_update_issue":"updateIssue","linear_update_label":"updateLabel","linear_update_notification":"updateNotification","linear_update_project":"updateProject","linear_update_project_label":"updateProjectLabel","linear_update_project_milestone":"updateProjectMilestone","linear_update_project_status":"updateProjectStatus","linear_update_workflow_state":"updateWorkflowState"},"triggers":{"linear_comment_created_v2":"commentCreated","linear_comment_updated_v2":"commentUpdated","linear_customer_request_created_v2":"customerRequestCreated","linear_customer_request_updated_v2":"customerRequestUpdated","linear_cycle_created_v2":"cycleCreated","linear_cycle_updated_v2":"cycleUpdated","linear_issue_created_v2":"issueCreated","linear_issue_removed_v2":"issueRemoved","linear_issue_updated_v2":"issueUpdated","linear_label_created_v2":"labelCreated","linear_label_updated_v2":"labelUpdated","linear_project_created_v2":"projectCreated","linear_project_update_created_v2":"projectUpdateCreated","linear_project_updated_v2":"projectUpdated","linear_webhook_v2":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"linkedin":{"namespace":"linkedin","methods":{"get_profile":"getProfile","share_post":"sharePost"},"params":{"action":{"oauthCredential":"credential"}}},"linkup":{"namespace":"linkup"},"linq":{"namespace":"legacy.linq","methods":{"add_participant":"addParticipant","check_imessage":"checkIMessage","check_rcs":"checkRcs","create_attachment":"createAttachment","create_chat":"createChat","create_contact_card":"createContactCard","create_webhook_subscription":"createWebhookSubscription","delete_attachment":"deleteAttachment","delete_message":"deleteMessage","delete_webhook_subscription":"deleteWebhookSubscription","edit_message":"editMessage","get_attachment":"getAttachment","get_chat":"getChat","get_contact_card":"getContactCard","get_message":"getMessage","get_webhook_subscription":"getWebhookSubscription","leave_chat":"leaveChat","list_chats":"listChats","list_messages":"listMessages","list_phone_numbers":"listPhoneNumbers","list_thread":"listThread","list_webhook_events":"listWebhookEvents","list_webhook_subscriptions":"listWebhookSubscriptions","mark_chat_read":"markChatAsRead","react_to_message":"reactToMessage","remove_participant":"removeParticipant","send_message":"sendMessage","send_voice_memo":"sendVoiceMemo","share_contact_card":"shareContactCard","start_typing":"startTyping","stop_typing":"stopTyping","update_chat":"updateChat","update_contact_card":"updateContactCard","update_webhook_subscription":"updateWebhookSubscription"},"triggers":{"linq_message_delivered":"messageDelivered","linq_message_failed":"messageFailed","linq_message_read":"messageRead","linq_message_received":"messageReceived","linq_reaction_added":"reactionAdded","linq_webhook":"webhook"}},"linq_v2":{"namespace":"linq","methods":{"add_participant":"addParticipant","check_imessage":"checkIMessage","check_rcs":"checkRcs","create_attachment":"createAttachment","create_chat":"createChat","create_contact_card":"createContactCard","create_webhook_subscription":"createWebhookSubscription","delete_attachment":"deleteAttachment","delete_message":"deleteMessage","delete_webhook_subscription":"deleteWebhookSubscription","edit_message":"editMessage","get_attachment":"getAttachment","get_chat":"getChat","get_contact_card":"getContactCard","get_message":"getMessage","get_webhook_subscription":"getWebhookSubscription","leave_chat":"leaveChat","list_chats":"listChats","list_messages":"listMessages","list_phone_numbers":"listPhoneNumbers","list_thread":"listThread","list_webhook_events":"listWebhookEvents","list_webhook_subscriptions":"listWebhookSubscriptions","mark_chat_read":"markChatAsRead","react_to_message":"reactToMessage","remove_participant":"removeParticipant","send_message":"sendMessage","send_voice_memo":"sendVoiceMemo","share_contact_card":"shareContactCard","start_typing":"startTyping","stop_typing":"stopTyping","update_chat":"updateChat","update_contact_card":"updateContactCard","update_webhook_subscription":"updateWebhookSubscription"},"triggers":{"linq_message_delivered":"messageDelivered","linq_message_failed":"messageFailed","linq_message_read":"messageRead","linq_message_received":"messageReceived","linq_reaction_added":"reactionAdded","linq_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"logfire":{"namespace":"legacy.logfire","methods":{"logfire_get_token_info":"getTokenInfo","logfire_get_trace":"getTrace","logfire_query":"runSqlQuery","logfire_search_records":"searchRecords"}},"logfire_v2":{"namespace":"logfire","methods":{"logfire_get_token_info":"getTokenInfo","logfire_get_trace":"getTrace","logfire_query":"runSqlQuery","logfire_search_records":"searchRecords"},"params":{"action":{"oauthCredential":"credential"}}},"logrocket":{"namespace":"logrocket","methods":{"create_release":"createRelease","get_audit_logs":"getAuditLogs","get_highlights":"getHighlights","identify_user":"identifyUser","list_exported_sessions":"listExportedSessions","request_highlights":"requestHighlights"}},"logs":{"namespace":"legacy.logs","methods":{"get_execution":"getExecutionDetails","get_log":"getLogById","query":"queryLogs"}},"logs_v2":{"namespace":"logs","methods":{"get_run_details":"getRunDetails","query":"queryLogs"}},"loops":{"namespace":"legacy.loops","methods":{"check_contact_suppression":"checkContactSuppression","create_contact":"createContact","create_contact_property":"createContactProperty","delete_contact":"deleteContact","find_contact":"findContact","get_transactional_email":"getTransactionalEmail","list_contact_properties":"listContactProperties","list_mailing_lists":"listMailingLists","list_transactional_emails":"listTransactionalEmails","remove_contact_suppression":"removeContactSuppression","send_event":"sendEvent","send_transactional_email":"sendTransactionalEmail","update_contact":"updateContact"},"triggers":{"loops_campaign_email_sent":"campaignEmailSent","loops_email_clicked":"emailClicked","loops_email_delivered":"emailDelivered","loops_email_hard_bounced":"emailHardBounced","loops_email_opened":"emailOpened","loops_email_soft_bounced":"emailSoftBounced","loops_loop_email_sent":"loopEmailSent","loops_transactional_email_sent":"transactionalEmailSent"}},"loops_v2":{"namespace":"loops","methods":{"check_contact_suppression":"checkContactSuppression","create_contact":"createContact","create_contact_property":"createContactProperty","delete_contact":"deleteContact","find_contact":"findContact","get_transactional_email":"getTransactionalEmail","list_contact_properties":"listContactProperties","list_mailing_lists":"listMailingLists","list_transactional_emails":"listTransactionalEmails","remove_contact_suppression":"removeContactSuppression","send_event":"sendEvent","send_transactional_email":"sendTransactionalEmail","update_contact":"updateContact"},"triggers":{"loops_campaign_email_sent":"campaignEmailSent","loops_email_clicked":"emailClicked","loops_email_delivered":"emailDelivered","loops_email_hard_bounced":"emailHardBounced","loops_email_opened":"emailOpened","loops_email_soft_bounced":"emailSoftBounced","loops_loop_email_sent":"loopEmailSent","loops_transactional_email_sent":"transactionalEmailSent"},"params":{"action":{"oauthCredential":"credential"}}},"luma":{"namespace":"legacy.luma","methods":{"add_guests":"addGuests","cancel_event":"cancelEvent","create_event":"createEvent","get_event":"getEvent","get_guest":"getGuest","get_guests":"getGuests","list_events":"listEvents","lookup_event":"lookupEvent","send_invites":"sendInvites","update_event":"updateEvent","update_guest_status":"updateGuestStatus"}},"luma_v2":{"namespace":"luma","methods":{"add_guests":"addGuests","cancel_event":"cancelEvent","create_event":"createEvent","get_event":"getEvent","get_guest":"getGuest","get_guests":"getGuests","list_events":"listEvents","lookup_event":"lookupEvent","send_invites":"sendInvites","update_event":"updateEvent","update_guest_status":"updateGuestStatus"},"params":{"action":{"oauthCredential":"credential"}}},"mailchimp":{"namespace":"legacy.mailchimp","methods":{"add_member":"addMember","add_member_tags":"addMemberTags","add_or_update_member":"addOrUpdateMember","add_segment_member":"addSegmentMember","add_subscriber_to_automation":"addSubscriberToAutomation","archive_member":"archiveMember","create_audience":"createAudience","create_batch_operation":"createBatchOperation","create_campaign":"createCampaign","create_interest":"createInterest","create_interest_category":"createInterestCategory","create_landing_page":"createLandingPage","create_merge_field":"createMergeField","create_segment":"createSegment","create_template":"createTemplate","delete_audience":"deleteAudience","delete_batch_operation":"deleteBatchOperation","delete_campaign":"deleteCampaign","delete_interest":"deleteInterest","delete_interest_category":"deleteInterestCategory","delete_landing_page":"deleteLandingPage","delete_member":"deleteMember","delete_member_permanent":"permanentlyDeleteMember","delete_merge_field":"deleteMergeField","delete_segment":"deleteSegment","delete_template":"deleteTemplate","get_audience":"getAudience","get_audiences":"getAudiences","get_automation":"getAutomation","get_automations":"getAutomations","get_batch_operation":"getBatchOperation","get_batch_operations":"getBatchOperations","get_campaign":"getCampaign","get_campaign_content":"getCampaignContent","get_campaign_report":"getCampaignReport","get_campaign_reports":"getCampaignReports","get_campaigns":"getCampaigns","get_interest":"getInterest","get_interest_categories":"getInterestCategories","get_interest_category":"getInterestCategory","get_interests":"getInterests","get_landing_page":"getLandingPage","get_landing_pages":"getLandingPages","get_member":"getMember","get_member_tags":"getMemberTags","get_members":"getMembers","get_merge_field":"getMergeField","get_merge_fields":"getMergeFields","get_segment":"getSegment","get_segment_members":"getSegmentMembers","get_segments":"getSegments","get_template":"getTemplate","get_templates":"getTemplates","pause_automation":"pauseAutomation","publish_landing_page":"publishLandingPage","remove_member_tags":"removeMemberTags","remove_segment_member":"removeSegmentMember","replicate_campaign":"replicateCampaign","schedule_campaign":"scheduleCampaign","send_campaign":"sendCampaign","set_campaign_content":"setCampaignContent","start_automation":"startAutomation","unarchive_member":"unarchiveMember","unpublish_landing_page":"unpublishLandingPage","unschedule_campaign":"unscheduleCampaign","update_audience":"updateAudience","update_campaign":"updateCampaign","update_interest":"updateInterest","update_interest_category":"updateInterestCategory","update_landing_page":"updateLandingPage","update_member":"updateMember","update_merge_field":"updateMergeField","update_segment":"updateSegment","update_template":"updateTemplate"}},"mailchimp_v2":{"namespace":"mailchimp","methods":{"add_member":"addMember","add_member_tags":"addMemberTags","add_or_update_member":"addOrUpdateMember","add_segment_member":"addSegmentMember","add_subscriber_to_automation":"addSubscriberToAutomation","archive_member":"archiveMember","create_audience":"createAudience","create_batch_operation":"createBatchOperation","create_campaign":"createCampaign","create_interest":"createInterest","create_interest_category":"createInterestCategory","create_landing_page":"createLandingPage","create_merge_field":"createMergeField","create_segment":"createSegment","create_template":"createTemplate","delete_audience":"deleteAudience","delete_batch_operation":"deleteBatchOperation","delete_campaign":"deleteCampaign","delete_interest":"deleteInterest","delete_interest_category":"deleteInterestCategory","delete_landing_page":"deleteLandingPage","delete_member":"deleteMember","delete_member_permanent":"permanentlyDeleteMember","delete_merge_field":"deleteMergeField","delete_segment":"deleteSegment","delete_template":"deleteTemplate","get_audience":"getAudience","get_audiences":"getAudiences","get_automation":"getAutomation","get_automations":"getAutomations","get_batch_operation":"getBatchOperation","get_batch_operations":"getBatchOperations","get_campaign":"getCampaign","get_campaign_content":"getCampaignContent","get_campaign_report":"getCampaignReport","get_campaign_reports":"getCampaignReports","get_campaigns":"getCampaigns","get_interest":"getInterest","get_interest_categories":"getInterestCategories","get_interest_category":"getInterestCategory","get_interests":"getInterests","get_landing_page":"getLandingPage","get_landing_pages":"getLandingPages","get_member":"getMember","get_member_tags":"getMemberTags","get_members":"getMembers","get_merge_field":"getMergeField","get_merge_fields":"getMergeFields","get_segment":"getSegment","get_segment_members":"getSegmentMembers","get_segments":"getSegments","get_template":"getTemplate","get_templates":"getTemplates","pause_automation":"pauseAutomation","publish_landing_page":"publishLandingPage","remove_member_tags":"removeMemberTags","remove_segment_member":"removeSegmentMember","replicate_campaign":"replicateCampaign","schedule_campaign":"scheduleCampaign","send_campaign":"sendCampaign","set_campaign_content":"setCampaignContent","start_automation":"startAutomation","unarchive_member":"unarchiveMember","unpublish_landing_page":"unpublishLandingPage","unschedule_campaign":"unscheduleCampaign","update_audience":"updateAudience","update_campaign":"updateCampaign","update_interest":"updateInterest","update_interest_category":"updateInterestCategory","update_landing_page":"updateLandingPage","update_member":"updateMember","update_merge_field":"updateMergeField","update_segment":"updateSegment","update_template":"updateTemplate"},"params":{"action":{"oauthCredential":"credential"}}},"mailgun":{"namespace":"legacy.mailgun","methods":{"add_list_member":"addListMember","create_mailing_list":"createMailingList","get_domain":"getDomain","get_mailing_list":"getMailingList","get_message":"getMessage","list_domains":"listDomains","list_messages":"listMessages","send_message":"sendMessage"}},"mailgun_v2":{"namespace":"mailgun","methods":{"add_list_member":"addListMember","create_mailing_list":"createMailingList","get_domain":"getDomain","get_mailing_list":"getMailingList","get_message":"getMessage","list_domains":"listDomains","list_messages":"listMessages","send_message":"sendMessage"},"params":{"action":{"oauthCredential":"credential"}}},"managed_agent":{"namespace":"managedAgent","methods":{"archive_session":"archiveSession","create_session":"createSession","delete_session":"deleteSession","get_session":"getSession","interrupt_session":"interruptSession","list_events":"listEvents","respond_custom_tool":"respondToCustomTool","respond_tool_confirmation":"respondToToolConfirmation","run_session":"runSessionCreateSendWaitForReply","send_message":"sendMessage","update_session":"updateSession"}},"manageengine_sdp":{"namespace":"manageengineSdp","methods":{"add_change_note":"addChangeNote","add_problem_note":"addProblemNote","add_request_note":"addRequestNote","create_asset":"createAsset","create_change":"createChange","create_problem":"createProblem","create_request":"createRequest","create_solution":"createSolution","delete_asset":"deleteAsset","delete_change":"deleteChange","delete_problem":"deleteProblem","delete_request":"deleteRequest","delete_solution":"deleteSolution","get_asset":"getAsset","get_change":"getChange","get_problem":"getProblem","get_request":"getRequest","get_solution":"getSolution","list_assets":"listAssets","list_change_notes":"listChangeNotes","list_changes":"listChanges","list_problem_notes":"listProblemNotes","list_problems":"listProblems","list_request_notes":"listRequestNotes","list_requests":"listRequests","list_solutions":"listSolutions","update_asset":"updateAsset","update_change":"updateChange","update_problem":"updateProblem","update_request":"updateRequest","update_solution":"updateSolution"},"params":{"action":{"oauthCredential":"credential"}}},"manual_trigger":{"namespace":"legacy.manualTrigger"},"mcp":{"namespace":"mcpBlock","methods":{"list":"listOperations","run":"runOperation"}},"mem0":{"namespace":"legacy.mem0","methods":{"add":"addMemories","get":"getMemories","search":"searchMemories"}},"mem0_v2":{"namespace":"mem0","methods":{"add":"addMemories","get":"getMemories","search":"searchMemories"},"params":{"action":{"oauthCredential":"credential"}}},"memory":{"namespace":"memory","methods":{"add":"addMemory","delete":"deleteMemory","get":"getMemory","getAll":"getAllMemories"}},"microsoft_ad":{"namespace":"microsoftAd","methods":{"add_directory_role_member":"addDirectoryRoleMember","add_group_member":"addGroupMember","add_user_app_role_assignment":"grantAppRoleToUser","assign_license":"assignLicense","create_group":"createGroup","create_user":"createUser","delete_group":"deleteGroup","delete_user":"deleteUser","get_conditional_access_policy":"getConditionalAccessPolicy","get_device":"getDevice","get_group":"getGroup","get_user":"getUser","list_authentication_methods":"listAuthenticationMethods","list_conditional_access_policies":"listConditionalAccessPolicies","list_devices":"listDevices","list_directory_audits":"listDirectoryAudits","list_directory_role_members":"listDirectoryRoleMembers","list_directory_roles":"listDirectoryRoles","list_group_members":"listGroupMembers","list_groups":"listGroups","list_service_principal_app_role_assignments":"listApplicationAssignments","list_service_principals":"listServicePrincipals","list_sign_ins":"listSignIns","list_subscribed_skus":"listSubscribedSkus","list_user_app_role_assignments":"listUserAppRoleAssignments","list_user_devices":"listUserDevices","list_user_licenses":"listUserLicenses","list_user_memberships":"listUserMemberships","list_users":"listUsers","remove_directory_role_member":"removeDirectoryRoleMember","remove_group_member":"removeGroupMember","remove_user_app_role_assignment":"revokeAppRoleFromUser","reset_password":"resetPassword","revoke_sign_in_sessions":"revokeSignInSessions","set_password":"setPassword","update_group":"updateGroup","update_user":"updateUser"}},"microsoft_dataverse":{"namespace":"legacy.microsoftDataverse","methods":{"associate":"associateRecords","create_multiple":"createMultiple","create_record":"createRecord","delete_record":"deleteRecord","disassociate":"disassociateRecords","download_file":"downloadFile","execute_action":"executeAction","execute_function":"executeFunction","fetchxml_query":"fetchXmlQuery","get_entity_metadata":"getTableMetadata","get_record":"getRecord","list_records":"listRecords","search":"search","update_multiple":"updateMultiple","update_record":"updateRecord","upload_file":"uploadFile","upsert_record":"upsertRecord","whoami":"whoAmI"}},"microsoft_dataverse_v2":{"namespace":"microsoftDataverse","methods":{"associate":"associateRecords","create_multiple":"createMultiple","create_record":"createRecord","delete_record":"deleteRecord","disassociate":"disassociateRecords","download_file":"downloadFile","execute_action":"executeAction","execute_function":"executeFunction","fetchxml_query":"fetchXmlQuery","get_entity_metadata":"getTableMetadata","get_record":"getRecord","list_records":"listRecords","search":"search","update_multiple":"updateMultiple","update_record":"updateRecord","upload_file":"uploadFile","upsert_record":"upsertRecord","whoami":"whoAmI"}},"microsoft_dynamics_365":{"namespace":"microsoftDynamics365","methods":{"assign_record":"assignRecord","close_case":"closeCase","close_opportunity":"closeOpportunity","create_record":"createRecord","get_record":"getRecord","list_owners":"listOwners","list_records":"listRecords","qualify_lead":"qualifyLead","search_records":"searchRecords","update_record":"updateRecord"}},"microsoft_excel":{"namespace":"legacy.microsoftExcel","methods":{"clear_range":"clearRange","create_table":"createTable","delete_worksheet":"deleteWorksheet","format_range":"formatRange","read":"readData","sort_range":"sortRange","table_add":"addToTable","worksheet_add":"addWorksheet","write":"writeUpdateData"},"params":{"action":{"oauthCredential":"credential"}}},"microsoft_excel_v2":{"namespace":"microsoftExcel","methods":{"calculate":"calculateWorkbook","clear_range":"clearRange","close_session":"closeSession","create_session":"createSession","create_table":"createTable","delete_table":"deleteTable","delete_table_row":"deleteTableRow","delete_worksheet":"deleteWorksheet","format_range":"formatRange","get_table":"getTable","get_table_row":"getTableRow","get_worksheet":"getWorksheet","list_table_rows":"listTableRows","list_tables":"listTables","list_worksheets":"listWorksheets","read":"readData","refresh_session":"refreshSession","sort_range":"sortRange","table_add":"addTableRows","update_table":"updateTable","update_table_row":"updateTableRow","update_worksheet":"updateWorksheet","worksheet_add":"addWorksheet","write":"writeData"},"params":{"action":{"oauthCredential":"credential"}}},"microsoft_planner":{"namespace":"microsoftPlanner","methods":{"create_bucket":"createBucket","create_plan":"createPlan","create_task":"createTask","delete_bucket":"deleteBucket","delete_plan":"deletePlan","delete_task":"deleteTask","get_plan_details":"getPlanDetails","get_task_details":"getTaskDetails","list_buckets":"listBuckets","list_plans":"listPlans","read_bucket":"readBucket","read_plan":"readPlan","read_task":"readTask","update_bucket":"updateBucket","update_plan":"updatePlan","update_plan_details":"updatePlanDetails","update_task":"updateTask","update_task_details":"updateTaskDetails"},"params":{"action":{"oauthCredential":"credential"}}},"microsoft_teams":{"namespace":"microsoftTeams","methods":{"delete_channel_message":"deleteChannelMessage","delete_chat_message":"deleteChatMessage","get_message":"getMessage","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_chat_members":"listChatMembers","list_chats":"listChats","list_team_members":"listTeamMembers","list_teams":"listTeams","read_channel":"readChannelMessages","read_chat":"readChatMessages","reply_to_message":"replyToChannelMessage","set_reaction":"addReaction","unset_reaction":"removeReaction","update_channel_message":"updateChannelMessage","update_chat_message":"updateChatMessage","write_channel":"writeChannelMessage","write_chat":"writeChatMessage"},"triggers":{"microsoftteams_chat_subscription":"microsoftteamsChatSubscription","microsoftteams_webhook":"microsoftteamsWebhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"microsoft_word":{"namespace":"microsoftWord","methods":{"append":"appendContent","create":"createDocument","create_from_template":"createFromTemplate","export_pdf":"exportAsPdf","list":"listDocuments","read":"readDocument","replace_text":"findAndReplaceText","update":"replaceContent"},"params":{"action":{"oauthCredential":"credential"}}},"millionverifier":{"namespace":"millionverifier","methods":{"millionverifier_get_credits":"getRemainingCredits","millionverifier_verify_email":"verifyEmail"}},"mintlify":{"namespace":"mintlify","methods":{"create_agent_job":"createAgentJob","create_assistant_message":"askAssistant","detect_ai_prose":"detectAiSoundingProse","get_agent_job":"getAgentJob","get_assistant_caller_stats":"getAssistantCallerStats","get_assistant_conversations":"getAssistantConversations","get_feedback":"getFeedback","get_feedback_by_page":"getFeedbackByPage","get_page_content":"getPageContent","get_searches":"getSearchQueries","get_update_status":"getUpdateStatus","get_views":"getPageViews","get_visitors":"getUniqueVisitors","search":"searchDocumentation","send_agent_message":"sendAgentMessage","trigger_automation":"triggerAutomation","trigger_preview":"triggerPreviewDeployment","trigger_update":"triggerUpdate"}},"mistral_parse":{"namespace":"legacy.mistralParse"},"mistral_parse_v2":{"namespace":"legacy.mistralParseV2"},"mistral_parse_v3":{"namespace":"mistralParse"},"modal":{"namespace":"modal","methods":{"call_function":"callFunction","chat_completion":"chatCompletion","list_models":"listModels"}},"monaco":{"namespace":"monaco","methods":{"monaco_add_audience_contacts":"addContactsToAudience","monaco_add_campaign_audiences":"addAudiencesToCampaign","monaco_create_audience":"createAudience","monaco_create_contact":"createContact","monaco_create_opportunity":"createOpportunity","monaco_create_tag":"createTag","monaco_create_task":"createTask","monaco_delete_account":"deleteAccount","monaco_delete_contact":"deleteContact","monaco_delete_opportunity":"deleteOpportunity","monaco_enroll_campaign_contacts":"enrollContactsInCampaign","monaco_get_account":"getAccount","monaco_get_audience":"getAudience","monaco_get_campaign":"getCampaign","monaco_get_contact":"getContact","monaco_get_conversation":"getConversation","monaco_get_current_user":"getCurrentUser","monaco_get_field_schemas":"getFieldSchemas","monaco_get_meeting":"getMeeting","monaco_get_opportunity":"getOpportunity","monaco_get_sequence":"getSequence","monaco_get_task":"getTask","monaco_link_opportunity_contacts":"linkContactsToOpportunity","monaco_list_accounts":"listAccounts","monaco_list_audience_contacts":"listAudienceContacts","monaco_list_audiences":"listAudiences","monaco_list_campaigns":"listCampaigns","monaco_list_contacts":"listContacts","monaco_list_meetings":"listMeetings","monaco_list_messages":"listMessages","monaco_list_opportunities":"listOpportunities","monaco_list_opportunity_contacts":"listOpportunityContacts","monaco_list_pipelines":"listPipelines","monaco_list_sequences":"listSequences","monaco_list_tags":"listTags","monaco_list_tasks":"listTasks","monaco_list_users":"listUsers","monaco_remove_audience_contacts":"removeContactsFromAudience","monaco_unlink_opportunity_contacts":"unlinkContactsFromOpportunity","monaco_update_account":"updateAccount","monaco_update_contact":"updateContact","monaco_update_opportunity":"updateOpportunity","monaco_update_sequence":"updateSequence","monaco_update_task":"updateTask","monaco_upsert_account":"upsertAccount","monaco_upsert_contact":"upsertContact"},"params":{"action":{"oauthCredential":"credential"}}},"monday":{"namespace":"monday","methods":{"archive_item":"archiveItem","change_column_value":"changeColumnValue","create_board":"createBoard","create_column":"createColumn","create_group":"createGroup","create_item":"createItem","create_subitem":"createSubitem","create_update":"createUpdate","delete_item":"deleteItem","duplicate_item":"duplicateItem","get_board":"getBoard","get_groups":"getGroups","get_item":"getItem","get_items":"getItems","list_boards":"listBoards","move_item_to_group":"moveItemToGroup","search_items":"searchItems","update_item":"updateItem"},"triggers":{"monday_column_changed":"columnChanged","monday_item_archived":"itemArchived","monday_item_created":"itemCreated","monday_item_deleted":"itemDeleted","monday_item_moved":"itemMoved","monday_item_name_changed":"itemNameChanged","monday_status_changed":"statusChanged","monday_subitem_created":"subitemCreated","monday_update_created":"updateCreated"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"mongodb":{"namespace":"mongodb","methods":{"delete":"deleteDocuments","execute":"aggregatePipeline","insert":"insertDocuments","introspect":"introspectDatabase","query":"findDocuments","update":"updateDocuments"}},"mothership":{"namespace":"mothership"},"mssql":{"namespace":"legacy.mssql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"mssql_v2":{"namespace":"mssql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"mysql":{"namespace":"legacy.mysql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"mysql_v2":{"namespace":"mysql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"neo4j":{"namespace":"neo4j","methods":{"create":"createNodesRelationships","delete":"deleteNodesRelationships","execute":"executeCypher","introspect":"introspectSchema","merge":"mergeFindOrCreate","query":"queryMatch","update":"updatePropertiesSet"}},"netsuite":{"namespace":"netsuite","methods":{"netsuite_attach_record":"attachRecordOrFile","netsuite_batch_create_records":"batchCreateRecords","netsuite_batch_delete_records":"batchDeleteRecords","netsuite_batch_get_records":"batchGetRecords","netsuite_batch_update_records":"batchUpdateRecords","netsuite_batch_upsert_records":"batchUpsertRecords","netsuite_create_record":"createRecord","netsuite_delete_record":"deleteRecord","netsuite_detach_record":"detachRecordOrFile","netsuite_execute_action":"executeRecordAction","netsuite_execute_dataset":"executeSuiteAnalyticsDataset","netsuite_execute_suiteql":"executeSuiteQl","netsuite_get_async_result":"getAsyncOperationResult","netsuite_get_async_status":"getAsyncStatus","netsuite_get_governance_limits":"getGovernanceLimits","netsuite_get_record":"getRecord","netsuite_get_record_form":"getRecordForm","netsuite_get_record_metadata":"getRecordMetadata","netsuite_get_select_options":"getSelectOptions","netsuite_get_server_time":"getServerTime","netsuite_get_subresource":"getSubresource","netsuite_list_datasets":"listSuiteAnalyticsDatasets","netsuite_list_record_types":"listRecordTypes","netsuite_list_records":"listSearchRecords","netsuite_transform_record":"transformRecord","netsuite_update_record":"updateRecord","netsuite_upsert_record":"upsertRecord"},"params":{"action":{"oauthCredential":"credential"}}},"neverbounce":{"namespace":"neverbounce","methods":{"neverbounce_get_credits":"getRemainingCredits","neverbounce_verify_email":"verifyEmail"}},"new_relic":{"namespace":"legacy.newRelic","methods":{"new_relic_create_deployment_event":"createDeploymentEvent","new_relic_get_entity":"getEntity","new_relic_nrql_query":"runNrqlQuery","new_relic_search_entities":"searchEntities"}},"new_relic_v2":{"namespace":"newRelic","methods":{"new_relic_create_deployment_event":"createDeploymentEvent","new_relic_get_entity":"getEntity","new_relic_nrql_query":"runNrqlQuery","new_relic_search_entities":"searchEntities"},"params":{"action":{"oauthCredential":"credential"}}},"note":{"namespace":"note"},"notion":{"namespace":"legacy.notion","methods":{"notion_add_database_row":"addDatabaseRow","notion_append_blocks":"appendBlockChildren","notion_create_comment":"createComment","notion_create_database":"createDatabase","notion_create_page":"createPage","notion_delete_block":"deleteBlock","notion_list_comments":"listComments","notion_list_users":"listUsers","notion_query_database":"queryDatabase","notion_read":"readPage","notion_read_database":"readDatabase","notion_retrieve_block":"retrieveBlock","notion_retrieve_block_children":"retrieveBlockChildren","notion_retrieve_user":"retrieveUser","notion_search":"searchWorkspace","notion_update_block":"updateBlock","notion_update_page":"updatePageProperties","notion_write":"appendContent"},"params":{"action":{"oauthCredential":"credential"}}},"notion_v2":{"namespace":"notion","methods":{"notion_add_database_row":"addDatabaseRow","notion_append_blocks":"appendBlockChildren","notion_create_comment":"createComment","notion_create_database":"createDatabase","notion_create_page":"createPage","notion_delete_block":"deleteBlock","notion_list_comments":"listComments","notion_list_users":"listUsers","notion_query_database":"queryDatabase","notion_read":"readPage","notion_read_database":"readDatabase","notion_retrieve_block":"retrieveBlock","notion_retrieve_block_children":"retrieveBlockChildren","notion_retrieve_user":"retrieveUser","notion_search":"searchWorkspace","notion_update_block":"updateBlock","notion_update_page":"updatePageProperties","notion_write":"appendContent"},"triggers":{"notion_comment_created":"commentCreated","notion_database_created":"databaseCreated","notion_database_deleted":"databaseDeleted","notion_database_schema_updated":"databaseSchemaUpdated","notion_page_content_updated":"pageContentUpdated","notion_page_created":"pageCreated","notion_page_deleted":"pageDeleted","notion_page_properties_updated":"pagePropertiesUpdated","notion_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"obsidian":{"namespace":"obsidian","methods":{"append_active":"appendToActiveFile","append_note":"appendToNote","append_periodic_note":"appendToPeriodicNote","create_note":"createNote","delete_note":"deleteNote","execute_command":"executeCommand","get_active":"getActiveFile","get_note":"getNote","get_periodic_note":"getPeriodicNote","list_commands":"listCommands","list_files":"listFiles","open_file":"openFile","patch_active":"patchActiveFile","patch_note":"patchNote","search":"search"}},"okta":{"namespace":"legacy.okta","methods":{"okta_activate_group_rule":"activateGroupRule","okta_activate_user":"activateUser","okta_add_user_to_group":"addUserToGroup","okta_assign_group_to_app":"assignGroupToApplication","okta_assign_user_role":"assignUserRole","okta_assign_user_to_app":"assignUserToApplication","okta_clear_user_sessions":"clearUserSessions","okta_create_group":"createGroup","okta_create_group_rule":"createGroupRule","okta_create_user":"createUser","okta_deactivate_group_rule":"deactivateGroupRule","okta_deactivate_user":"deactivateUser","okta_delete_group":"deleteGroup","okta_delete_group_rule":"deleteGroupRule","okta_delete_user":"deleteUser","okta_enroll_factor":"enrollFactor","okta_get_app":"getApplication","okta_get_factor":"getFactor","okta_get_group":"getGroup","okta_get_group_rule":"getGroupRule","okta_get_logs":"getSystemLogEvents","okta_get_session":"getSession","okta_get_user":"getUser","okta_list_app_groups":"listApplicationGroups","okta_list_app_users":"listApplicationUsers","okta_list_apps":"listApplications","okta_list_factors":"listFactors","okta_list_group_members":"listGroupMembers","okta_list_group_rules":"listGroupRules","okta_list_groups":"listGroups","okta_list_user_roles":"listUserRoles","okta_list_users":"listUsers","okta_remove_group_from_app":"removeGroupFromApplication","okta_remove_user_from_app":"removeUserFromApplication","okta_remove_user_from_group":"removeUserFromGroup","okta_remove_user_role":"removeUserRole","okta_reset_all_factors":"resetAllFactors","okta_reset_factor":"resetFactor","okta_reset_password":"resetPassword","okta_revoke_session":"revokeSession","okta_suspend_user":"suspendUser","okta_unsuspend_user":"unsuspendUser","okta_update_group":"updateGroup","okta_update_user":"updateUser"}},"okta_v2":{"namespace":"okta","methods":{"okta_activate_group_rule":"activateGroupRule","okta_activate_user":"activateUser","okta_add_user_to_group":"addUserToGroup","okta_assign_group_to_app":"assignGroupToApplication","okta_assign_user_role":"assignUserRole","okta_assign_user_to_app":"assignUserToApplication","okta_clear_user_sessions":"clearUserSessions","okta_create_group":"createGroup","okta_create_group_rule":"createGroupRule","okta_create_user":"createUser","okta_deactivate_group_rule":"deactivateGroupRule","okta_deactivate_user":"deactivateUser","okta_delete_group":"deleteGroup","okta_delete_group_rule":"deleteGroupRule","okta_delete_user":"deleteUser","okta_enroll_factor":"enrollFactor","okta_get_app":"getApplication","okta_get_factor":"getFactor","okta_get_group":"getGroup","okta_get_group_rule":"getGroupRule","okta_get_logs":"getSystemLogEvents","okta_get_session":"getSession","okta_get_user":"getUser","okta_list_app_groups":"listApplicationGroups","okta_list_app_users":"listApplicationUsers","okta_list_apps":"listApplications","okta_list_factors":"listFactors","okta_list_group_members":"listGroupMembers","okta_list_group_rules":"listGroupRules","okta_list_groups":"listGroups","okta_list_user_roles":"listUserRoles","okta_list_users":"listUsers","okta_remove_group_from_app":"removeGroupFromApplication","okta_remove_user_from_app":"removeUserFromApplication","okta_remove_user_from_group":"removeUserFromGroup","okta_remove_user_role":"removeUserRole","okta_reset_all_factors":"resetAllFactors","okta_reset_factor":"resetFactor","okta_reset_password":"resetPassword","okta_revoke_session":"revokeSession","okta_suspend_user":"suspendUser","okta_unsuspend_user":"unsuspendUser","okta_update_group":"updateGroup","okta_update_user":"updateUser"},"params":{"action":{"oauthCredential":"credential"}}},"onedrive":{"namespace":"onedrive","methods":{"copy":"copyFile","create_file":"createFile","create_folder":"createFolder","create_share_link":"createSharingLink","delete":"deleteFile","download":"downloadFile","get_drive_info":"getDriveInfo","get_item":"getItemInfo","list":"listFiles","move":"moveRenameFile","search":"searchFiles","upload":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"onepassword":{"namespace":"onepassword","methods":{"create_item":"createItem","delete_item":"deleteItem","get_item":"getItem","get_item_file":"getItemFile","get_vault":"getVault","list_items":"listItems","list_vaults":"listVaults","replace_item":"replaceItem","resolve_secret":"resolveSecret","update_item":"updateItem"}},"openai":{"namespace":"legacy.openai"},"oracle_fusion_financials":{"namespace":"oracleFusionFinancials","methods":{"oracle_fusion_financials_apply_receivables_receipt":"applyReceivablesReceipt","oracle_fusion_financials_approve_receivables_invoice":"approveReceivablesInvoice","oracle_fusion_financials_create_expense_line":"createExpenseLine","oracle_fusion_financials_create_expense_report":"createExpenseReport","oracle_fusion_financials_create_receivables_credit_memo":"createReceivablesCreditMemo","oracle_fusion_financials_create_receivables_invoice":"createReceivablesInvoice","oracle_fusion_financials_create_receivables_receipt":"createReceivablesReceipt","oracle_fusion_financials_get_expense_line":"getExpenseLine","oracle_fusion_financials_get_expense_report":"getExpenseReport","oracle_fusion_financials_get_gl_journal_batch":"getGlJournalBatch","oracle_fusion_financials_get_gl_ledger":"getGlLedger","oracle_fusion_financials_get_payables_invoice":"getPayablesInvoice","oracle_fusion_financials_get_payables_invoice_line":"getPayablesInvoiceLine","oracle_fusion_financials_get_payables_payment":"getPayablesPayment","oracle_fusion_financials_get_receivables_credit_memo":"getReceivablesCreditMemo","oracle_fusion_financials_get_receivables_invoice":"getReceivablesInvoice","oracle_fusion_financials_get_receivables_invoice_installment":"getReceivablesInvoiceInstallment","oracle_fusion_financials_get_receivables_invoice_line":"getReceivablesInvoiceLine","oracle_fusion_financials_get_receivables_receipt":"getReceivablesReceipt","oracle_fusion_financials_list_expense_lines":"listExpenseLines","oracle_fusion_financials_list_expense_reports":"listExpenseReports","oracle_fusion_financials_list_gl_balances":"listGlBalances","oracle_fusion_financials_list_gl_journal_batches":"listGlJournalBatches","oracle_fusion_financials_list_gl_ledgers":"listGlLedgers","oracle_fusion_financials_list_payables_invoice_lines":"listPayablesInvoiceLines","oracle_fusion_financials_list_payables_invoices":"listPayablesInvoices","oracle_fusion_financials_list_payables_payments":"listPayablesPayments","oracle_fusion_financials_list_receivables_credit_memos":"listReceivablesCreditMemos","oracle_fusion_financials_list_receivables_invoice_installments":"listReceivablesInvoiceInstallments","oracle_fusion_financials_list_receivables_invoice_lines":"listReceivablesInvoiceLines","oracle_fusion_financials_list_receivables_invoices":"listReceivablesInvoices","oracle_fusion_financials_list_receivables_receipts":"listReceivablesReceipts","oracle_fusion_financials_submit_expense_report":"submitExpenseReport","oracle_fusion_financials_update_expense_line":"updateExpenseLine","oracle_fusion_financials_update_expense_report":"updateExpenseReport","oracle_fusion_financials_update_receivables_invoice":"updateReceivablesInvoice"},"params":{"action":{"oauthCredential":"credential"}}},"oracledb":{"namespace":"oracledb","methods":{"delete":"deleteData","execute":"executeSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"otter":{"namespace":"legacy.otter","methods":{"create_conversation":"importRecording","get_conversation":"getConversation","get_conversation_audio":"getConversationAudio","get_workspace":"getWorkspace","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_conversations":"listConversations","list_workspace_conversations":"listWorkspaceConversations"},"triggers":{"otter_conversation_completed":"conversationCompleted","otter_conversation_shared":"conversationShared","otter_webhook":"webhook"}},"otter_v2":{"namespace":"otter","methods":{"create_conversation":"importRecording","get_conversation":"getConversation","get_conversation_audio":"getConversationAudio","get_workspace":"getWorkspace","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_conversations":"listConversations","list_workspace_conversations":"listWorkspaceConversations"},"triggers":{"otter_conversation_completed":"conversationCompleted","otter_conversation_shared":"conversationShared","otter_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"outlook":{"namespace":"outlook","methods":{"copy_outlook":"copyEmail","create_event_calendar":"createEvent","create_folder_outlook":"createFolder","delete_event_calendar":"deleteEvent","delete_outlook":"deleteEmail","draft_outlook":"draftEmail","forward_outlook":"forwardEmail","get_attachment_outlook":"getAttachment","get_event_calendar":"getCalendarEvent","list_attachments_outlook":"listAttachments","list_events_calendar":"listCalendarEvents","list_folders_outlook":"listFolders","mark_read_outlook":"markAsRead","mark_unread_outlook":"markAsUnread","move_outlook":"moveEmail","read_outlook":"readEmail","reply_all_outlook":"replyAll","reply_outlook":"replyToEmail","respond_calendar":"respondToInvite","search_outlook":"searchEmail","send_outlook":"sendEmail","update_event_calendar":"updateEvent","update_message_outlook":"setCategoriesFlag"},"triggers":{"outlook_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"pagerduty":{"namespace":"legacy.pagerduty","methods":{"add_note":"addNote","create_incident":"createIncident","get_incident":"getIncident","get_service":"getService","list_escalation_policies":"listEscalationPolicies","list_incident_alerts":"listIncidentAlerts","list_incidents":"listIncidents","list_oncalls":"listOnCalls","list_schedules":"listSchedules","list_services":"listServices","list_users":"listUsers","merge_incidents":"mergeIncidents","send_event":"sendEvent","snooze_incident":"snoozeIncident","update_incident":"updateIncident"},"triggers":{"pagerduty_incident_acknowledged":"incidentAcknowledged","pagerduty_incident_escalated":"incidentEscalated","pagerduty_incident_reassigned":"incidentReassigned","pagerduty_incident_resolved":"incidentResolved","pagerduty_incident_triggered":"incidentTriggered","pagerduty_webhook":"webhook"}},"pagerduty_v2":{"namespace":"pagerduty","methods":{"add_note":"addNote","create_incident":"createIncident","get_incident":"getIncident","get_service":"getService","list_escalation_policies":"listEscalationPolicies","list_incident_alerts":"listIncidentAlerts","list_incidents":"listIncidents","list_oncalls":"listOnCalls","list_schedules":"listSchedules","list_services":"listServices","list_users":"listUsers","merge_incidents":"mergeIncidents","send_event":"sendEvent","snooze_incident":"snoozeIncident","update_incident":"updateIncident"},"triggers":{"pagerduty_incident_acknowledged":"incidentAcknowledged","pagerduty_incident_escalated":"incidentEscalated","pagerduty_incident_reassigned":"incidentReassigned","pagerduty_incident_resolved":"incidentResolved","pagerduty_incident_triggered":"incidentTriggered","pagerduty_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"parallel_ai":{"namespace":"parallelAi","methods":{"deep_research":"deepResearch","extract":"extractFromUrls","search":"search"}},"peopledatalabs":{"namespace":"peopledatalabs","methods":{"pdl_autocomplete":"autocomplete","pdl_bulk_company_enrich":"bulkCompanyEnrich","pdl_bulk_person_enrich":"bulkPersonEnrich","pdl_clean_company":"companyCleaner","pdl_clean_location":"locationCleaner","pdl_clean_school":"schoolCleaner","pdl_company_enrich":"companyEnrich","pdl_company_search":"companySearch","pdl_person_enrich":"personEnrich","pdl_person_identify":"personIdentify","pdl_person_search":"personSearch"}},"perplexity":{"namespace":"perplexity","methods":{"perplexity_chat":"chat","perplexity_search":"search"}},"persona":{"namespace":"legacy.persona","methods":{"approve_inquiry":"approveInquiry","create_account":"createAccount","create_inquiry":"createInquiry","create_report":"createReport","decline_inquiry":"declineInquiry","expire_inquiry":"expireInquiry","generate_inquiry_link":"generateInquiryLink","get_account":"getAccount","get_case":"getCase","get_document":"getDocument","get_inquiry":"getInquiry","get_report":"getReport","get_verification":"getVerification","import_accounts":"importAccountsCsv","list_accounts":"listAccounts","list_cases":"listCases","list_inquiries":"listInquiries","list_inquiry_templates":"listInquiryTemplates","list_reports":"listReports","mark_inquiry_for_review":"markInquiryForReview","print_inquiry_pdf":"printInquiryPdf","redact_account":"redactAccount","redact_inquiry":"redactInquiry","resume_inquiry":"resumeInquiry","update_account":"updateAccount","update_inquiry":"updateInquiry"}},"persona_v2":{"namespace":"persona","methods":{"approve_inquiry":"approveInquiry","create_account":"createAccount","create_inquiry":"createInquiry","create_report":"createReport","decline_inquiry":"declineInquiry","expire_inquiry":"expireInquiry","generate_inquiry_link":"generateInquiryLink","get_account":"getAccount","get_case":"getCase","get_document":"getDocument","get_inquiry":"getInquiry","get_report":"getReport","get_verification":"getVerification","import_accounts":"importAccountsCsv","list_accounts":"listAccounts","list_cases":"listCases","list_inquiries":"listInquiries","list_inquiry_templates":"listInquiryTemplates","list_reports":"listReports","mark_inquiry_for_review":"markInquiryForReview","print_inquiry_pdf":"printInquiryPdf","redact_account":"redactAccount","redact_inquiry":"redactInquiry","resume_inquiry":"resumeInquiry","update_account":"updateAccount","update_inquiry":"updateInquiry"},"params":{"action":{"oauthCredential":"credential"}}},"pi":{"namespace":"pi"},"pinecone":{"namespace":"pinecone","methods":{"delete_vectors":"deleteVectors","describe_index":"describeIndex","describe_index_stats":"describeIndexStats","fetch":"fetchVectors","generate":"generateEmbeddings","list_indexes":"listIndexes","list_vector_ids":"listVectorIds","search_text":"searchWithText","search_vector":"searchWithVector","update_vector":"updateVector","upsert_text":"upsertText"}},"pipedrive":{"namespace":"pipedrive","methods":{"create_activity":"createActivity","create_deal":"createDeal","create_lead":"createLead","create_project":"createProject","delete_lead":"deleteLead","get_activities":"getActivities","get_all_deals":"getAllDeals","get_deal":"getDeal","get_files":"getFiles","get_leads":"getLeads","get_mail_messages":"getMailThreads","get_mail_thread":"getMailThreadMessages","get_pipeline_deals":"getPipelineDeals","get_pipelines":"getPipelines","get_projects":"getProjects","update_activity":"updateActivity","update_deal":"updateDeal","update_lead":"updateLead"},"params":{"action":{"oauthCredential":"credential"}}},"pitchbook":{"namespace":"pitchbook","methods":{"company_active_investors":"getCompanyActiveInvestors","company_bio":"getCompanyBio","company_deal_service_providers":"getCompanyDealServiceProviders","company_deals":"getCompanyDeals","company_financials":"getCompanyFinancialsHistory","company_general_service_providers":"getCompanyServiceProviders","company_industries":"getCompanyIndustries","company_investors":"getCompanyInvestors","company_most_recent_debt_financing":"getCompanyLatestDebtFinancing","company_most_recent_financials":"getCompanyLatestFinancials","company_most_recent_financing":"getCompanyLatestFinancing","company_search":"searchCompanies","company_similar_companies":"getSimilarCompanies","company_social_analytics":"getCompanySocialAnalytics","company_updates":"getCompanyUpdates","company_vc_exit_predictions":"getVcExitPredictions","contracts_history":"getContractsHistory","cost_of_calls":"getCostOfCalls","credit_history":"getCreditHistory","credit_news":"getCreditNewsArticle","credit_news_bulk":"getCreditNewsArticlesInBulk","credit_news_most_recent":"getRecentCreditNews","credit_news_search":"searchCreditNews","deal_bio":"getDealBio","deal_cap_table_history":"getDealCapTable","deal_debt_lenders":"getDealDebtAndLenders","deal_detailed":"getDealDetail","deal_investors":"getDealInvestors","deal_multiples":"getDealMultiples","deal_search":"searchDeals","deal_service_providers":"getDealServiceProviders","deal_stock_info":"getDealStockInfo","deal_tranche_info":"getDealTranches","deal_updates":"getDealUpdates","deal_valuation":"getDealValuation","entity_affiliates":"getEntityAffiliates","entity_locations":"getEntityLocations","entity_news":"getEntityNews","entity_people":"getEntityPeople","entity_updates":"getEntityUpdates","fund_active_investments":"getFundActiveInvestments","fund_benchmark":"getFundBenchmark","fund_bio":"getFundBio","fund_cash_flows":"getFundCashFlows","fund_commitments":"getFundCommitments","fund_investment_preferences":"getFundPreferences","fund_investments":"getFundInvestments","fund_performance":"getFundPerformance","fund_search":"searchFunds","fund_team":"getFundTeam","fund_updates":"getFundUpdates","investor_active_investments":"getInvestorActiveInvestments","investor_bio":"getInvestorBio","investor_board_seats":"getInvestorBoardSeats","investor_deal_service_providers":"getInvestorDealServiceProviders","investor_funds":"getInvestorFunds","investor_general_service_providers":"getInvestorServiceProviders","investor_investments":"getInvestorInvestments","investor_last_closed_fund":"getInvestorLastClosedFund","investor_preferences":"getInvestorPreferences","investor_search":"searchInvestors","investor_updates":"getInvestorUpdates","limited_partner_actual_allocations":"getLpActualAllocations","limited_partner_bio":"getLimitedPartnerBio","limited_partner_commitment_aggregates":"getLpCommitmentTotals","limited_partner_commitment_preferences":"getLpCommitmentPreferences","limited_partner_commitments_detailed":"getLpCommitments","limited_partner_search":"searchLimitedPartners","limited_partner_service_providers":"getLpServiceProviders","limited_partner_target_allocations":"getLpTargetAllocations","limited_partner_updates":"getLpUpdates","lookup_table_structure":"listLookupTables","lookup_tables":"getLookupTableCodes","patent_detailed":"getPatentDetail","patent_search":"searchCompanyPatents","people_search":"searchPeople","person_bio":"getPersonBio","person_contact":"getPersonContact","person_education_work":"getPersonHistory","sandbox_entities":"listSandboxEntities","search":"searchAllEntities","service_provider_bio":"getServiceProviderBio","service_provider_search":"searchServiceProviders","service_provider_updates":"getServiceProviderUpdates","serviced_companies":"getServicedCompanies","serviced_deals":"getServicedDeals","serviced_funds":"getServicedFunds","serviced_investors":"getServicedInvestors","serviced_limited_partners":"getServicedLimitedPartners","shared_search":"sharedSearch","usage_report":"getUsageReport"}},"plane":{"namespace":"legacy.plane","methods":{"plane_archive_project":"archiveAProject","plane_archive_work_item":"archiveAWorkItem","plane_confirm_attachment_upload":"confirmAWorkItemAttachmentUpload","plane_create_attachment_upload":"createAWorkItemAttachmentUpload","plane_create_comment":"createAComment","plane_create_cycle":"createACycle","plane_create_label":"createALabel","plane_create_link":"createALink","plane_create_module":"createAModule","plane_create_project":"createAProject","plane_create_project_page":"createAProjectPage","plane_create_state":"createAState","plane_create_webhook":"createAWebhook","plane_create_work_item":"createAWorkItem","plane_delete_attachment":"deleteAnAttachment","plane_delete_comment":"deleteAComment","plane_delete_cycle":"deleteACycle","plane_delete_label":"deleteALabel","plane_delete_link":"deleteALink","plane_delete_module":"deleteAModule","plane_delete_project":"deleteAProject","plane_delete_project_page":"deleteAProjectPage","plane_delete_state":"deleteAState","plane_delete_webhook":"deleteAWebhook","plane_delete_work_item":"deleteAWorkItem","plane_get_attachment":"getAnAttachment","plane_get_comment":"getAComment","plane_get_current_user":"getCurrentUser","plane_get_cycle":"getACycle","plane_get_label":"getALabel","plane_get_link":"getALink","plane_get_module":"getAModule","plane_get_project":"getAProject","plane_get_project_page":"getAProjectPage","plane_get_project_summary":"getAProjectSummary","plane_get_state":"getAState","plane_get_webhook":"getAWebhook","plane_get_work_item":"getAWorkItem","plane_get_work_item_by_identifier":"getAWorkItemByIdentifier","plane_list_attachments":"listAttachments","plane_list_comments":"listComments","plane_list_cycles":"listCycles","plane_list_labels":"listLabels","plane_list_links":"listLinks","plane_list_modules":"listModules","plane_list_project_pages":"listProjectPages","plane_list_projects":"listProjects","plane_list_states":"listStates","plane_list_webhooks":"listWebhooks","plane_list_work_items":"listWorkItems","plane_list_workspace_work_items":"listWorkItemsAcrossAWorkspace","plane_manage_cycle_work_items":"addOrRemoveCycleWorkItems","plane_manage_module_work_items":"addOrRemoveModuleWorkItems","plane_regenerate_webhook_secret":"regenerateAWebhookSecret","plane_transfer_cycle_work_items":"transferWorkItemsBetweenCycles","plane_unarchive_project":"unarchiveAProject","plane_unarchive_work_item":"unarchiveAWorkItem","plane_update_comment":"updateAComment","plane_update_cycle":"updateACycle","plane_update_label":"updateALabel","plane_update_link":"updateALink","plane_update_module":"updateAModule","plane_update_project":"updateAProject","plane_update_project_page":"updateAProjectPage","plane_update_state":"updateAState","plane_update_webhook":"updateAWebhook","plane_update_work_item":"updateAWorkItem"},"triggers":{"plane_cycle_archived":"cycleArchived","plane_cycle_created":"cycleCreated","plane_cycle_deleted":"cycleDeleted","plane_cycle_updated":"cycleUpdated","plane_milestone_created":"milestoneCreated","plane_milestone_deleted":"milestoneDeleted","plane_milestone_updated":"milestoneUpdated","plane_module_archived":"moduleArchived","plane_module_created":"moduleCreated","plane_module_deleted":"moduleDeleted","plane_module_updated":"moduleUpdated","plane_page_archived":"pageArchived","plane_page_comment_created":"pageCommentCreated","plane_page_comment_deleted":"pageCommentDeleted","plane_page_comment_updated":"pageCommentUpdated","plane_page_created":"pageCreated","plane_page_deleted":"pageDeleted","plane_page_updated":"pageUpdated","plane_project_archived":"projectArchived","plane_project_created":"projectCreated","plane_project_deleted":"projectDeleted","plane_project_updated":"projectUpdated","plane_webhook":"webhook","plane_workitem_archived":"workitemArchived","plane_workitem_attachment_created":"workitemAttachmentCreated","plane_workitem_attachment_deleted":"workitemAttachmentDeleted","plane_workitem_attachment_updated":"workitemAttachmentUpdated","plane_workitem_comment_created":"workitemCommentCreated","plane_workitem_comment_deleted":"workitemCommentDeleted","plane_workitem_comment_updated":"workitemCommentUpdated","plane_workitem_created":"workitemCreated","plane_workitem_deleted":"workitemDeleted","plane_workitem_dependency_created":"workitemDependencyCreated","plane_workitem_dependency_deleted":"workitemDependencyDeleted","plane_workitem_link_created":"workitemLinkCreated","plane_workitem_link_deleted":"workitemLinkDeleted","plane_workitem_link_updated":"workitemLinkUpdated","plane_workitem_page_link_created":"workitemPageLinkCreated","plane_workitem_page_link_deleted":"workitemPageLinkDeleted","plane_workitem_relation_created":"workitemRelationCreated","plane_workitem_relation_deleted":"workitemRelationDeleted","plane_workitem_updated":"workitemUpdated","plane_workitem_vote_created":"workitemVoteCreated","plane_workitem_vote_deleted":"workitemVoteDeleted"}},"plane_v2":{"namespace":"plane","methods":{"plane_archive_project":"archiveAProject","plane_archive_work_item":"archiveAWorkItem","plane_confirm_attachment_upload":"confirmAWorkItemAttachmentUpload","plane_create_attachment_upload":"createAWorkItemAttachmentUpload","plane_create_comment":"createAComment","plane_create_cycle":"createACycle","plane_create_label":"createALabel","plane_create_link":"createALink","plane_create_module":"createAModule","plane_create_project":"createAProject","plane_create_project_page":"createAProjectPage","plane_create_state":"createAState","plane_create_webhook":"createAWebhook","plane_create_work_item":"createAWorkItem","plane_delete_attachment":"deleteAnAttachment","plane_delete_comment":"deleteAComment","plane_delete_cycle":"deleteACycle","plane_delete_label":"deleteALabel","plane_delete_link":"deleteALink","plane_delete_module":"deleteAModule","plane_delete_project":"deleteAProject","plane_delete_project_page":"deleteAProjectPage","plane_delete_state":"deleteAState","plane_delete_webhook":"deleteAWebhook","plane_delete_work_item":"deleteAWorkItem","plane_get_attachment":"getAnAttachment","plane_get_comment":"getAComment","plane_get_current_user":"getCurrentUser","plane_get_cycle":"getACycle","plane_get_label":"getALabel","plane_get_link":"getALink","plane_get_module":"getAModule","plane_get_project":"getAProject","plane_get_project_page":"getAProjectPage","plane_get_project_summary":"getAProjectSummary","plane_get_state":"getAState","plane_get_webhook":"getAWebhook","plane_get_work_item":"getAWorkItem","plane_get_work_item_by_identifier":"getAWorkItemByIdentifier","plane_list_attachments":"listAttachments","plane_list_comments":"listComments","plane_list_cycles":"listCycles","plane_list_labels":"listLabels","plane_list_links":"listLinks","plane_list_modules":"listModules","plane_list_project_pages":"listProjectPages","plane_list_projects":"listProjects","plane_list_states":"listStates","plane_list_webhooks":"listWebhooks","plane_list_work_items":"listWorkItems","plane_list_workspace_work_items":"listWorkItemsAcrossAWorkspace","plane_manage_cycle_work_items":"addOrRemoveCycleWorkItems","plane_manage_module_work_items":"addOrRemoveModuleWorkItems","plane_regenerate_webhook_secret":"regenerateAWebhookSecret","plane_transfer_cycle_work_items":"transferWorkItemsBetweenCycles","plane_unarchive_project":"unarchiveAProject","plane_unarchive_work_item":"unarchiveAWorkItem","plane_update_comment":"updateAComment","plane_update_cycle":"updateACycle","plane_update_label":"updateALabel","plane_update_link":"updateALink","plane_update_module":"updateAModule","plane_update_project":"updateAProject","plane_update_project_page":"updateAProjectPage","plane_update_state":"updateAState","plane_update_webhook":"updateAWebhook","plane_update_work_item":"updateAWorkItem"},"triggers":{"plane_cycle_archived":"cycleArchived","plane_cycle_created":"cycleCreated","plane_cycle_deleted":"cycleDeleted","plane_cycle_updated":"cycleUpdated","plane_milestone_created":"milestoneCreated","plane_milestone_deleted":"milestoneDeleted","plane_milestone_updated":"milestoneUpdated","plane_module_archived":"moduleArchived","plane_module_created":"moduleCreated","plane_module_deleted":"moduleDeleted","plane_module_updated":"moduleUpdated","plane_page_archived":"pageArchived","plane_page_comment_created":"pageCommentCreated","plane_page_comment_deleted":"pageCommentDeleted","plane_page_comment_updated":"pageCommentUpdated","plane_page_created":"pageCreated","plane_page_deleted":"pageDeleted","plane_page_updated":"pageUpdated","plane_project_archived":"projectArchived","plane_project_created":"projectCreated","plane_project_deleted":"projectDeleted","plane_project_updated":"projectUpdated","plane_webhook":"webhook","plane_workitem_archived":"workitemArchived","plane_workitem_attachment_created":"workitemAttachmentCreated","plane_workitem_attachment_deleted":"workitemAttachmentDeleted","plane_workitem_attachment_updated":"workitemAttachmentUpdated","plane_workitem_comment_created":"workitemCommentCreated","plane_workitem_comment_deleted":"workitemCommentDeleted","plane_workitem_comment_updated":"workitemCommentUpdated","plane_workitem_created":"workitemCreated","plane_workitem_deleted":"workitemDeleted","plane_workitem_dependency_created":"workitemDependencyCreated","plane_workitem_dependency_deleted":"workitemDependencyDeleted","plane_workitem_link_created":"workitemLinkCreated","plane_workitem_link_deleted":"workitemLinkDeleted","plane_workitem_link_updated":"workitemLinkUpdated","plane_workitem_page_link_created":"workitemPageLinkCreated","plane_workitem_page_link_deleted":"workitemPageLinkDeleted","plane_workitem_relation_created":"workitemRelationCreated","plane_workitem_relation_deleted":"workitemRelationDeleted","plane_workitem_updated":"workitemUpdated","plane_workitem_vote_created":"workitemVoteCreated","plane_workitem_vote_deleted":"workitemVoteDeleted"},"params":{"action":{"oauthCredential":"credential"}}},"planetscale":{"namespace":"legacy.planetscale","methods":{"close_deploy_request":"closeDeployRequestVitess","create_backup":"createBackup","create_branch":"createBranch","create_deploy_request":"createDeployRequestVitess","delete_branch":"deleteBranch","get_backup":"getBackup","get_branch":"getBranch","get_database":"getDatabase","get_deploy_request":"getDeployRequestVitess","list_backups":"listBackups","list_branches":"listBranches","list_databases":"listDatabases","list_deploy_requests":"listDeployRequestsVitess","queue_deploy_request":"queueDeployRequestVitess","review_deploy_request":"reviewDeployRequestVitess"}},"planetscale_v2":{"namespace":"planetscale","methods":{"close_deploy_request":"closeDeployRequestVitess","create_backup":"createBackup","create_branch":"createBranch","create_deploy_request":"createDeployRequestVitess","delete_branch":"deleteBranch","get_backup":"getBackup","get_branch":"getBranch","get_database":"getDatabase","get_deploy_request":"getDeployRequestVitess","list_backups":"listBackups","list_branches":"listBranches","list_databases":"listDatabases","list_deploy_requests":"listDeployRequestsVitess","queue_deploy_request":"queueDeployRequestVitess","review_deploy_request":"reviewDeployRequestVitess"},"params":{"action":{"oauthCredential":"credential"}}},"polymarket":{"namespace":"polymarket","methods":{"get_activity":"getActivity","get_event":"getEvent","get_events":"getEvents","get_holders":"getMarketHolders","get_last_trade_price":"getLastTradePrice","get_leaderboard":"getLeaderboard","get_market":"getMarket","get_markets":"getMarkets","get_midpoint":"getMidpoint","get_orderbook":"getOrderbook","get_positions":"getPositions","get_price":"getPrice","get_price_history":"getPriceHistory","get_series":"getSeries","get_series_by_id":"getSeriesById","get_spread":"getSpread","get_tags":"getTags","get_tick_size":"getTickSize","get_trades":"getTrades","search":"search"}},"postgresql":{"namespace":"legacy.postgresql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"postgresql_v2":{"namespace":"postgresql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"posthog":{"namespace":"posthog","methods":{"posthog_batch_events":"batchEvents","posthog_capture_event":"captureEvent","posthog_create_annotation":"createAnnotation","posthog_create_cohort":"createCohort","posthog_create_dashboard":"createDashboard","posthog_create_experiment":"createExperiment","posthog_create_feature_flag":"createFeatureFlag","posthog_create_insight":"createInsight","posthog_create_survey":"createSurvey","posthog_delete_feature_flag":"deleteFeatureFlag","posthog_delete_person":"deletePerson","posthog_delete_survey":"deleteSurvey","posthog_evaluate_flags":"evaluateFlags","posthog_get_cohort":"getCohort","posthog_get_dashboard":"getDashboard","posthog_get_event_definition":"getEventDefinition","posthog_get_experiment":"getExperiment","posthog_get_feature_flag":"getFeatureFlag","posthog_get_insight":"getInsight","posthog_get_organization":"getOrganization","posthog_get_person":"getPerson","posthog_get_project":"getProject","posthog_get_property_definition":"getPropertyDefinition","posthog_get_session_recording":"getSessionRecording","posthog_get_survey":"getSurvey","posthog_list_actions":"listActions","posthog_list_annotations":"listAnnotations","posthog_list_cohorts":"listCohorts","posthog_list_dashboards":"listDashboards","posthog_list_event_definitions":"listEventDefinitions","posthog_list_experiments":"listExperiments","posthog_list_feature_flags":"listFeatureFlags","posthog_list_insights":"listInsights","posthog_list_organizations":"listOrganizations","posthog_list_persons":"listPersons","posthog_list_projects":"listProjects","posthog_list_property_definitions":"listPropertyDefinitions","posthog_list_recording_playlists":"listRecordingPlaylists","posthog_list_session_recordings":"listSessionRecordings","posthog_list_surveys":"listSurveys","posthog_query":"runQueryHogQl","posthog_update_cohort":"updateCohort","posthog_update_event_definition":"updateEventDefinition","posthog_update_experiment":"updateExperiment","posthog_update_feature_flag":"updateFeatureFlag","posthog_update_insight":"updateInsight","posthog_update_property_definition":"updatePropertyDefinition","posthog_update_survey":"updateSurvey"}},"powerbi":{"namespace":"powerbi","methods":{"powerbi_execute_query":"executeDaxQuery","powerbi_get_dataset":"getSemanticModel","powerbi_get_refresh_history":"getRefreshHistory","powerbi_get_report":"getReport","powerbi_list_datasets":"listSemanticModels","powerbi_list_reports":"listReports","powerbi_list_workspaces":"listWorkspaces","powerbi_refresh_dataset":"refreshSemanticModel"},"params":{"action":{"oauthCredential":"credential"}}},"profound":{"namespace":"legacy.profound","methods":{"bot_logs":"botLogs","bots_report":"botsReport","category_assets":"categoryAssets","category_personas":"categoryPersonas","category_prompts":"categoryPrompts","category_tags":"categoryTags","category_topics":"categoryTopics","citation_prompts":"citationPrompts","citations_report":"citationsReport","list_assets":"listAssets","list_categories":"listCategories","list_domains":"listDomains","list_models":"listModels","list_optimizations":"listOptimizations","list_personas":"listPersonas","list_regions":"listRegions","optimization_analysis":"optimizationAnalysis","prompt_answers":"promptAnswers","prompt_volume":"promptVolume","query_fanouts":"queryFanouts","raw_logs":"rawLogs","referrals_report":"referralsReport","sentiment_report":"sentimentReport","visibility_report":"visibilityReport"}},"profound_v2":{"namespace":"profound","methods":{"bot_logs":"botLogs","bots_report":"botsReport","category_assets":"categoryAssets","category_personas":"categoryPersonas","category_prompts":"categoryPrompts","category_tags":"categoryTags","category_topics":"categoryTopics","citation_prompts":"citationPrompts","citations_report":"citationsReport","list_assets":"listAssets","list_categories":"listCategories","list_domains":"listDomains","list_models":"listModels","list_optimizations":"listOptimizations","list_personas":"listPersonas","list_regions":"listRegions","optimization_analysis":"optimizationAnalysis","prompt_answers":"promptAnswers","prompt_volume":"promptVolume","query_fanouts":"queryFanouts","raw_logs":"rawLogs","referrals_report":"referralsReport","sentiment_report":"sentimentReport","visibility_report":"visibilityReport"},"params":{"action":{"oauthCredential":"credential"}}},"prospeo":{"namespace":"prospeo","methods":{"prospeo_account_information":"accountInformation","prospeo_bulk_enrich_company":"bulkEnrichCompany","prospeo_bulk_enrich_person":"bulkEnrichPerson","prospeo_enrich_company":"enrichCompany","prospeo_enrich_person":"enrichPerson","prospeo_search_company":"searchCompany","prospeo_search_person":"searchPerson","prospeo_search_suggestions":"searchSuggestions"}},"pulse":{"namespace":"legacy.pulse"},"pulse_v2":{"namespace":"legacy.pulseV2"},"pulse_v3":{"namespace":"pulse","params":{"action":{"oauthCredential":"credential"}}},"qdrant":{"namespace":"legacy.qdrant","methods":{"fetch":"fetch","search":"search","upsert":"upsert"}},"qdrant_v2":{"namespace":"qdrant","methods":{"fetch":"fetch","search":"search","upsert":"upsert"},"params":{"action":{"oauthCredential":"credential"}}},"quartr":{"namespace":"legacy.quartr","methods":{"get_audio":"getAudio","get_company":"getCompany","get_event":"getEvent","get_event_summary":"getEventSummary","get_report":"getReport","get_slide_deck":"getSlideDeck","get_transcript":"getTranscript","list_audio":"listAudio","list_companies":"listCompanies","list_document_types":"listDocumentTypes","list_documents":"listDocuments","list_event_types":"listEventTypes","list_events":"listEvents","list_live_events":"listLiveEvents","list_reports":"listReports","list_slide_decks":"listSlideDecks","list_transcripts":"listTranscripts"}},"quartr_v2":{"namespace":"quartr","methods":{"get_audio":"getAudio","get_company":"getCompany","get_event":"getEvent","get_event_summary":"getEventSummary","get_report":"getReport","get_slide_deck":"getSlideDeck","get_transcript":"getTranscript","list_audio":"listAudio","list_companies":"listCompanies","list_document_types":"listDocumentTypes","list_documents":"listDocuments","list_event_types":"listEventTypes","list_events":"listEvents","list_live_events":"listLiveEvents","list_reports":"listReports","list_slide_decks":"listSlideDecks","list_transcripts":"listTranscripts"},"params":{"action":{"oauthCredential":"credential"}}},"quickbooks":{"namespace":"quickbooks","methods":{"quickbooks_add_attachment":"addAttachment","quickbooks_create_bill":"createBill","quickbooks_create_bill_payment":"createBillPayment","quickbooks_create_credit_memo":"createCreditMemo","quickbooks_create_customer":"createCustomer","quickbooks_create_customer_payment":"createCustomerPayment","quickbooks_create_deposit":"createDeposit","quickbooks_create_employee":"createEmployee","quickbooks_create_estimate":"createEstimate","quickbooks_create_invoice":"createInvoice","quickbooks_create_item":"createItem","quickbooks_create_journal_entry":"createJournalEntry","quickbooks_create_purchase":"createPurchaseOrExpense","quickbooks_create_purchase_order":"createPurchaseOrder","quickbooks_create_refund_receipt":"createRefundReceipt","quickbooks_create_sales_receipt":"createSalesReceipt","quickbooks_create_vendor":"createVendor","quickbooks_create_vendor_credit":"createVendorCredit","quickbooks_download_attachment":"downloadAttachment","quickbooks_download_transaction_pdf":"downloadTransactionPdf","quickbooks_email_transaction":"emailTransaction","quickbooks_get_company_info":"getCompanyInfo","quickbooks_read_accounting_transactions":"readAccountingTransactions","quickbooks_read_attachments":"readAttachments","quickbooks_read_master_data":"readMasterData","quickbooks_read_purchasing_transactions":"readPurchasingTransactions","quickbooks_read_sales_transactions":"readSalesTransactions","quickbooks_run_financial_report":"runFinancialReport","quickbooks_update_bill":"updateBill","quickbooks_update_bill_payment":"updateBillPayment","quickbooks_update_credit_memo":"updateCreditMemo","quickbooks_update_customer":"updateCustomer","quickbooks_update_customer_payment":"updateCustomerPayment","quickbooks_update_deposit":"updateDeposit","quickbooks_update_employee":"updateEmployee","quickbooks_update_estimate":"updateEstimate","quickbooks_update_invoice":"updateInvoice","quickbooks_update_item":"updateItem","quickbooks_update_journal_entry":"updateJournalEntry","quickbooks_update_purchase":"updatePurchaseOrExpense","quickbooks_update_purchase_order":"updatePurchaseOrder","quickbooks_update_refund_receipt":"updateRefundReceipt","quickbooks_update_sales_receipt":"updateSalesReceipt","quickbooks_update_vendor":"updateVendor","quickbooks_update_vendor_credit":"updateVendorCredit","quickbooks_void_bill_payment":"voidBillPayment","quickbooks_void_customer_payment":"voidCustomerPayment","quickbooks_void_invoice":"voidInvoice","quickbooks_void_sales_receipt":"voidSalesReceipt"},"triggers":{"quickbooks_account_events":"accountEvents","quickbooks_bill_events":"billEvents","quickbooks_bill_payment_events":"billPaymentEvents","quickbooks_budget_events":"budgetEvents","quickbooks_class_events":"classEvents","quickbooks_credit_memo_events":"creditMemoEvents","quickbooks_currency_events":"currencyEvents","quickbooks_customer_events":"customerEvents","quickbooks_department_events":"departmentEvents","quickbooks_deposit_events":"depositEvents","quickbooks_employee_events":"employeeEvents","quickbooks_estimate_events":"estimateEvents","quickbooks_invoice_events":"invoiceEvents","quickbooks_item_events":"itemEvents","quickbooks_journal_code_events":"journalCodeEvents","quickbooks_journal_entry_events":"journalEntryEvents","quickbooks_payment_events":"paymentEvents","quickbooks_payment_method_events":"paymentMethodEvents","quickbooks_preferences_updated":"preferencesUpdated","quickbooks_purchase_events":"purchaseEvents","quickbooks_purchase_order_events":"purchaseOrderEvents","quickbooks_refund_receipt_events":"refundReceiptEvents","quickbooks_sales_receipt_events":"salesReceiptEvents","quickbooks_tax_agency_events":"taxAgencyEvents","quickbooks_term_events":"termEvents","quickbooks_time_activity_events":"timeActivityEvents","quickbooks_transfer_events":"transferEvents","quickbooks_vendor_credit_events":"vendorCreditEvents","quickbooks_vendor_events":"vendorEvents"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"quiver":{"namespace":"legacy.quiver","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"}},"quiver_v2":{"namespace":"legacy.quiverV2","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"}},"quiver_v3":{"namespace":"quiver","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"},"params":{"action":{"oauthCredential":"credential"}}},"rabbitmq":{"namespace":"rabbitmq","methods":{"rabbitmq_create_binding":"createBinding","rabbitmq_create_exchange":"createExchange","rabbitmq_create_policy":"createPolicy","rabbitmq_create_queue":"createQueue","rabbitmq_delete_binding":"deleteBinding","rabbitmq_delete_exchange":"deleteExchange","rabbitmq_delete_policy":"deletePolicy","rabbitmq_delete_queue":"deleteQueue","rabbitmq_get_exchange":"getExchange","rabbitmq_get_messages":"getMessages","rabbitmq_get_overview":"getOverview","rabbitmq_get_queue":"getQueue","rabbitmq_health_check":"healthCheck","rabbitmq_list_bindings":"listQueueBindings","rabbitmq_list_channels":"listChannels","rabbitmq_list_connections":"listConnections","rabbitmq_list_consumers":"listConsumers","rabbitmq_list_exchange_bindings":"listExchangeBindings","rabbitmq_list_exchanges":"listExchanges","rabbitmq_list_nodes":"listNodes","rabbitmq_list_policies":"listPolicies","rabbitmq_list_queues":"listQueues","rabbitmq_list_vhosts":"listVirtualHosts","rabbitmq_publish_message":"publishMessage","rabbitmq_purge_queue":"purgeQueue"}},"railway":{"namespace":"legacy.railway","methods":{"create_environment":"createEnvironment","create_project":"createProject","create_service":"createService","delete_environment":"deleteEnvironment","delete_project":"deleteProject","delete_service":"deleteService","delete_variable":"deleteVariable","deploy_service":"deployService","get_deployment":"getDeployment","get_deployment_logs":"getDeploymentLogs","get_project":"getProject","list_deployments":"listDeployments","list_project_members":"listProjectMembers","list_projects":"listProjects","list_variables":"listVariables","restart_deployment":"restartDeployment","rollback_deployment":"rollbackDeployment","transfer_project":"transferProject","update_project":"updateProject","upsert_variable":"upsertVariable"}},"railway_v2":{"namespace":"railway","methods":{"create_environment":"createEnvironment","create_project":"createProject","create_service":"createService","delete_environment":"deleteEnvironment","delete_project":"deleteProject","delete_service":"deleteService","delete_variable":"deleteVariable","deploy_service":"deployService","get_deployment":"getDeployment","get_deployment_logs":"getDeploymentLogs","get_project":"getProject","list_deployments":"listDeployments","list_project_members":"listProjectMembers","list_projects":"listProjects","list_variables":"listVariables","restart_deployment":"restartDeployment","rollback_deployment":"rollbackDeployment","transfer_project":"transferProject","update_project":"updateProject","upsert_variable":"upsertVariable"},"params":{"action":{"oauthCredential":"credential"}}},"ramp":{"namespace":"ramp","methods":{"create_memo":"createMemo","get_balance":"getBalance","get_bill":"getBill","get_business":"getBusiness","get_memo":"getMemo","get_physical_card":"getPhysicalCard","get_reimbursement":"getReimbursement","get_transaction":"getTransaction","get_user":"getUser","get_vendor":"getVendor","get_virtual_card":"getVirtualCard","list_bills":"listBills","list_physical_cards":"listPhysicalCards","list_reimbursements":"listReimbursements","list_transactions":"listTransactions","list_users":"listUsers","list_vendors":"listVendors","list_virtual_cards":"listVirtualCards"},"params":{"action":{"oauthCredential":"credential"}}},"rb2b":{"namespace":"legacy.rb2b","methods":{"credit_check":"creditCheck","email_to_activity":"emailToLastActiveDate","hem_to_best_linkedin":"emailHemToBestLinkedInUrl","hem_to_business_profile":"emailHemToBusinessProfile","hem_to_linkedin":"emailHemToLinkedInSlug","hem_to_maid":"emailHemToMaid","ip_to_company":"ipToCompany","ip_to_hem":"ipToHem","ip_to_maid":"ipToMaid","linkedin_slug_search":"linkedInSlugSearch","linkedin_to_best_personal_email":"linkedInToBestPersonalEmail","linkedin_to_business_profile":"linkedInToBusinessProfile","linkedin_to_hashed_emails":"linkedInToHashedEmails","linkedin_to_mobile_phone":"linkedInToMobilePhone","linkedin_to_personal_email":"linkedInToPersonalEmail"}},"rb2b_v2":{"namespace":"rb2b","methods":{"credit_check":"creditCheck","email_to_activity":"emailToLastActiveDate","hem_to_best_linkedin":"emailHemToBestLinkedInUrl","hem_to_business_profile":"emailHemToBusinessProfile","hem_to_linkedin":"emailHemToLinkedInSlug","hem_to_maid":"emailHemToMaid","ip_to_company":"ipToCompany","ip_to_hem":"ipToHem","ip_to_maid":"ipToMaid","linkedin_slug_search":"linkedInSlugSearch","linkedin_to_best_personal_email":"linkedInToBestPersonalEmail","linkedin_to_business_profile":"linkedInToBusinessProfile","linkedin_to_hashed_emails":"linkedInToHashedEmails","linkedin_to_mobile_phone":"linkedInToMobilePhone","linkedin_to_personal_email":"linkedInToPersonalEmail"},"params":{"action":{"oauthCredential":"credential"}}},"rds":{"namespace":"legacy.rds","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"rds_v2":{"namespace":"rds","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"reddit":{"namespace":"reddit","methods":{"delete":"delete_","edit":"edit","get_comments":"getComments","get_controversial":"getControversialPosts","get_info":"getInfoById","get_me":"getMyProfile","get_messages":"getMessages","get_posts":"getPosts","get_saved":"getSavedItems","get_subreddit_info":"getSubredditInfo","get_subreddit_rules":"getSubredditRules","get_user":"getUserProfile","get_user_comments":"getUserComments","get_user_posts":"getUserPosts","hide":"hide","list_my_subreddits":"listMySubreddits","lock":"lockMod","mark_all_read":"markAllMessagesRead","mark_read":"markMessagesRead","marknsfw":"markNsfw","mod_approve":"approveMod","mod_distinguish":"distinguishMod","mod_remove":"removeMod","mod_sticky":"stickyMod","reply":"reply","report":"report","save":"save","search":"searchSubreddit","search_subreddits":"searchSubreddits","send_message":"sendMessage","submit_post":"submitPost","subscribe":"subscribe","unhide":"unhide","unlock":"unlockMod","unmarknsfw":"unmarkNsfw","unsave":"unsave","vote":"vote"},"params":{"action":{"oauthCredential":"credential"}}},"redis":{"namespace":"redis","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hdel":"hdel","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","llen":"llen","lpop":"lpop","lpush":"lpush","lrange":"lrange","persist":"persist","rpop":"rpop","rpush":"rpush","set":"set","setnx":"setnx","ttl":"ttl"}},"reducto":{"namespace":"legacy.reducto"},"reducto_v2":{"namespace":"legacy.reductoV2"},"reducto_v3":{"namespace":"reducto","params":{"action":{"oauthCredential":"credential"}}},"resend":{"namespace":"legacy.resend","methods":{"cancel_email":"cancelEmail","create_audience":"createAudience","create_broadcast":"createBroadcast","create_contact":"createContact","delete_audience":"deleteAudience","delete_contact":"deleteContact","get_audience":"getAudience","get_broadcast":"getBroadcast","get_contact":"getContact","get_email":"getEmail","list_audiences":"listAudiences","list_contacts":"listContacts","list_domains":"listDomains","send_broadcast":"sendBroadcast","send_email":"sendEmail","update_contact":"updateContact"},"triggers":{"resend_email_bounced":"emailBounced","resend_email_clicked":"emailClicked","resend_email_complained":"emailComplained","resend_email_delivered":"emailDelivered","resend_email_failed":"emailFailed","resend_email_opened":"emailOpened","resend_email_sent":"emailSent","resend_webhook":"webhook"}},"resend_v2":{"namespace":"resend","methods":{"cancel_email":"cancelEmail","create_audience":"createAudience","create_broadcast":"createBroadcast","create_contact":"createContact","delete_audience":"deleteAudience","delete_contact":"deleteContact","get_audience":"getAudience","get_broadcast":"getBroadcast","get_contact":"getContact","get_email":"getEmail","list_audiences":"listAudiences","list_contacts":"listContacts","list_domains":"listDomains","send_broadcast":"sendBroadcast","send_email":"sendEmail","update_contact":"updateContact"},"triggers":{"resend_email_bounced":"emailBounced","resend_email_clicked":"emailClicked","resend_email_complained":"emailComplained","resend_email_delivered":"emailDelivered","resend_email_failed":"emailFailed","resend_email_opened":"emailOpened","resend_email_sent":"emailSent","resend_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"response":{"namespace":"response"},"revenuecat":{"namespace":"revenuecat","methods":{"create_purchase":"createPurchase","defer_google_subscription":"deferGoogleSubscription","delete_customer":"deleteCustomer","get_customer":"getCustomer","grant_entitlement":"grantEntitlement","list_offerings":"listOfferings","refund_google_subscription":"refundGoogleSubscription","revoke_entitlement":"revokeEntitlement","revoke_google_subscription":"revokeGoogleSubscription","update_subscriber_attributes":"updateSubscriberAttributes"},"triggers":{"revenuecat_cancellation":"cancellation","revenuecat_expiration":"expiration","revenuecat_initial_purchase":"initialPurchase","revenuecat_non_renewing_purchase":"nonRenewingPurchase","revenuecat_product_change":"productChange","revenuecat_renewal":"renewal"}},"rippling":{"namespace":"legacy.rippling","methods":{"bulk_create_custom_object_records":"bulkCreateCustomObjectRecords","bulk_delete_custom_object_records":"bulkDeleteCustomObjectRecords","bulk_update_custom_object_records":"bulkUpdateCustomObjectRecords","create_business_partner":"createBusinessPartner","create_business_partner_group":"createBusinessPartnerGroup","create_custom_app":"createCustomApp","create_custom_object":"createCustomObject","create_custom_object_field":"createCustomObjectField","create_custom_object_record":"createCustomObjectRecord","create_custom_page":"createCustomPage","create_custom_setting":"createCustomSetting","create_department":"createDepartment","create_draft_hires":"createDraftHires","create_object_category":"createObjectCategory","create_title":"createTitle","create_work_location":"createWorkLocation","delete_business_partner":"deleteBusinessPartner","delete_business_partner_group":"deleteBusinessPartnerGroup","delete_custom_app":"deleteCustomApp","delete_custom_object":"deleteCustomObject","delete_custom_object_field":"deleteCustomObjectField","delete_custom_object_record":"deleteCustomObjectRecord","delete_custom_page":"deleteCustomPage","delete_custom_setting":"deleteCustomSetting","delete_object_category":"deleteObjectCategory","delete_title":"deleteTitle","delete_work_location":"deleteWorkLocation","get_business_partner":"getBusinessPartner","get_business_partner_group":"getBusinessPartnerGroup","get_current_user":"getCurrentUser","get_custom_app":"getCustomApp","get_custom_object":"getCustomObject","get_custom_object_field":"getCustomObjectField","get_custom_object_record":"getCustomObjectRecord","get_custom_object_record_by_external_id":"getCustomObjectRecordByExternalId","get_custom_page":"getCustomPage","get_custom_setting":"getCustomSetting","get_department":"getDepartment","get_employment_type":"getEmploymentType","get_job_function":"getJobFunction","get_object_category":"getObjectCategory","get_report_run":"getReportRun","get_supergroup":"getSupergroup","get_team":"getTeam","get_title":"getTitle","get_user":"getUser","get_work_location":"getWorkLocation","get_worker":"getWorker","list_business_partner_groups":"listBusinessPartnerGroups","list_business_partners":"listBusinessPartners","list_companies":"listCompanies","list_custom_apps":"listCustomApps","list_custom_fields":"listCustomFields","list_custom_object_fields":"listCustomObjectFields","list_custom_object_records":"listCustomObjectRecords","list_custom_objects":"listCustomObjects","list_custom_pages":"listCustomPages","list_custom_settings":"listCustomSettings","list_departments":"listDepartments","list_employment_types":"listEmploymentTypes","list_entitlements":"listEntitlements","list_job_functions":"listJobFunctions","list_object_categories":"listObjectCategories","list_supergroup_exclusion_members":"listSupergroupExclusionMembers","list_supergroup_inclusion_members":"listSupergroupInclusionMembers","list_supergroup_members":"listSupergroupMembers","list_supergroups":"listSupergroups","list_teams":"listTeams","list_titles":"listTitles","list_users":"listUsers","list_work_locations":"listWorkLocations","list_workers":"listWorkers","query_custom_object_records":"queryCustomObjectRecords","trigger_report_run":"triggerReportRun","update_custom_app":"updateCustomApp","update_custom_object":"updateCustomObject","update_custom_object_field":"updateCustomObjectField","update_custom_object_record":"updateCustomObjectRecord","update_custom_page":"updateCustomPage","update_custom_setting":"updateCustomSetting","update_department":"updateDepartment","update_object_category":"updateObjectCategory","update_supergroup_exclusion_members":"updateSupergroupExclusionMembers","update_supergroup_inclusion_members":"updateSupergroupInclusionMembers","update_title":"updateTitle","update_work_location":"updateWorkLocation"}},"rippling_v2":{"namespace":"rippling","methods":{"bulk_create_custom_object_records":"bulkCreateCustomObjectRecords","bulk_delete_custom_object_records":"bulkDeleteCustomObjectRecords","bulk_update_custom_object_records":"bulkUpdateCustomObjectRecords","create_business_partner":"createBusinessPartner","create_business_partner_group":"createBusinessPartnerGroup","create_custom_app":"createCustomApp","create_custom_object":"createCustomObject","create_custom_object_field":"createCustomObjectField","create_custom_object_record":"createCustomObjectRecord","create_custom_page":"createCustomPage","create_custom_setting":"createCustomSetting","create_department":"createDepartment","create_draft_hires":"createDraftHires","create_object_category":"createObjectCategory","create_title":"createTitle","create_work_location":"createWorkLocation","delete_business_partner":"deleteBusinessPartner","delete_business_partner_group":"deleteBusinessPartnerGroup","delete_custom_app":"deleteCustomApp","delete_custom_object":"deleteCustomObject","delete_custom_object_field":"deleteCustomObjectField","delete_custom_object_record":"deleteCustomObjectRecord","delete_custom_page":"deleteCustomPage","delete_custom_setting":"deleteCustomSetting","delete_object_category":"deleteObjectCategory","delete_title":"deleteTitle","delete_work_location":"deleteWorkLocation","get_business_partner":"getBusinessPartner","get_business_partner_group":"getBusinessPartnerGroup","get_current_user":"getCurrentUser","get_custom_app":"getCustomApp","get_custom_object":"getCustomObject","get_custom_object_field":"getCustomObjectField","get_custom_object_record":"getCustomObjectRecord","get_custom_object_record_by_external_id":"getCustomObjectRecordByExternalId","get_custom_page":"getCustomPage","get_custom_setting":"getCustomSetting","get_department":"getDepartment","get_employment_type":"getEmploymentType","get_job_function":"getJobFunction","get_object_category":"getObjectCategory","get_report_run":"getReportRun","get_supergroup":"getSupergroup","get_team":"getTeam","get_title":"getTitle","get_user":"getUser","get_work_location":"getWorkLocation","get_worker":"getWorker","list_business_partner_groups":"listBusinessPartnerGroups","list_business_partners":"listBusinessPartners","list_companies":"listCompanies","list_custom_apps":"listCustomApps","list_custom_fields":"listCustomFields","list_custom_object_fields":"listCustomObjectFields","list_custom_object_records":"listCustomObjectRecords","list_custom_objects":"listCustomObjects","list_custom_pages":"listCustomPages","list_custom_settings":"listCustomSettings","list_departments":"listDepartments","list_employment_types":"listEmploymentTypes","list_entitlements":"listEntitlements","list_job_functions":"listJobFunctions","list_object_categories":"listObjectCategories","list_supergroup_exclusion_members":"listSupergroupExclusionMembers","list_supergroup_inclusion_members":"listSupergroupInclusionMembers","list_supergroup_members":"listSupergroupMembers","list_supergroups":"listSupergroups","list_teams":"listTeams","list_titles":"listTitles","list_users":"listUsers","list_work_locations":"listWorkLocations","list_workers":"listWorkers","query_custom_object_records":"queryCustomObjectRecords","trigger_report_run":"triggerReportRun","update_custom_app":"updateCustomApp","update_custom_object":"updateCustomObject","update_custom_object_field":"updateCustomObjectField","update_custom_object_record":"updateCustomObjectRecord","update_custom_page":"updateCustomPage","update_custom_setting":"updateCustomSetting","update_department":"updateDepartment","update_object_category":"updateObjectCategory","update_supergroup_exclusion_members":"updateSupergroupExclusionMembers","update_supergroup_inclusion_members":"updateSupergroupInclusionMembers","update_title":"updateTitle","update_work_location":"updateWorkLocation"},"params":{"action":{"oauthCredential":"credential"}}},"rocketlane":{"namespace":"legacy.rocketlane","methods":{"add_field_option":"addFieldOption","add_project_members":"addProjectMembers","add_task_assignees":"addTaskAssignees","add_task_dependencies":"addTaskDependencies","add_task_followers":"addTaskFollowers","archive_project":"archiveProject","assign_placeholders":"assignPlaceholder","create_field":"createField","create_phase":"createPhase","create_project":"createProject","create_space":"createSpace","create_space_document":"createSpaceDocument","create_task":"createTask","create_time_entry":"createTimeEntry","create_time_off":"createTimeOff","delete_field":"deleteField","delete_phase":"deletePhase","delete_project":"deleteProject","delete_space":"deleteSpace","delete_space_document":"deleteSpaceDocument","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","delete_time_off":"deleteTimeOff","get_field":"getField","get_invoice":"getInvoice","get_invoice_line_items":"getInvoiceLineItems","get_invoice_payments":"getInvoicePayments","get_phase":"getPhase","get_project":"getProject","get_space":"getSpace","get_space_document":"getSpaceDocument","get_task":"getTask","get_time_entry":"getTimeEntry","get_time_off":"getTimeOff","get_user":"getUser","import_template":"importTemplate","list_fields":"listFields","list_invoices":"listInvoices","list_phases":"listPhases","list_placeholders":"listPlaceholders","list_projects":"listProjects","list_resource_allocations":"listResourceAllocations","list_space_documents":"listSpaceDocuments","list_spaces":"listSpaces","list_tasks":"listTasks","list_time_entries":"listTimeEntries","list_time_entry_categories":"listTimeEntryCategories","list_time_offs":"listTimeOffs","list_users":"listUsers","move_task_to_phase":"moveTaskToPhase","remove_project_members":"removeProjectMembers","remove_task_assignees":"removeTaskAssignees","remove_task_dependencies":"removeTaskDependencies","remove_task_followers":"removeTaskFollowers","search_time_entries":"searchTimeEntries","unassign_placeholders":"unassignPlaceholder","update_field":"updateField","update_field_option":"updateFieldOption","update_phase":"updatePhase","update_project":"updateProject","update_space":"updateSpace","update_space_document":"updateSpaceDocument","update_task":"updateTask","update_time_entry":"updateTimeEntry"}},"rocketlane_v2":{"namespace":"rocketlane","methods":{"add_field_option":"addFieldOption","add_project_members":"addProjectMembers","add_task_assignees":"addTaskAssignees","add_task_dependencies":"addTaskDependencies","add_task_followers":"addTaskFollowers","archive_project":"archiveProject","assign_placeholders":"assignPlaceholder","create_field":"createField","create_phase":"createPhase","create_project":"createProject","create_space":"createSpace","create_space_document":"createSpaceDocument","create_task":"createTask","create_time_entry":"createTimeEntry","create_time_off":"createTimeOff","delete_field":"deleteField","delete_phase":"deletePhase","delete_project":"deleteProject","delete_space":"deleteSpace","delete_space_document":"deleteSpaceDocument","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","delete_time_off":"deleteTimeOff","get_field":"getField","get_invoice":"getInvoice","get_invoice_line_items":"getInvoiceLineItems","get_invoice_payments":"getInvoicePayments","get_phase":"getPhase","get_project":"getProject","get_space":"getSpace","get_space_document":"getSpaceDocument","get_task":"getTask","get_time_entry":"getTimeEntry","get_time_off":"getTimeOff","get_user":"getUser","import_template":"importTemplate","list_fields":"listFields","list_invoices":"listInvoices","list_phases":"listPhases","list_placeholders":"listPlaceholders","list_projects":"listProjects","list_resource_allocations":"listResourceAllocations","list_space_documents":"listSpaceDocuments","list_spaces":"listSpaces","list_tasks":"listTasks","list_time_entries":"listTimeEntries","list_time_entry_categories":"listTimeEntryCategories","list_time_offs":"listTimeOffs","list_users":"listUsers","move_task_to_phase":"moveTaskToPhase","remove_project_members":"removeProjectMembers","remove_task_assignees":"removeTaskAssignees","remove_task_dependencies":"removeTaskDependencies","remove_task_followers":"removeTaskFollowers","search_time_entries":"searchTimeEntries","unassign_placeholders":"unassignPlaceholder","update_field":"updateField","update_field_option":"updateFieldOption","update_phase":"updatePhase","update_project":"updateProject","update_space":"updateSpace","update_space_document":"updateSpaceDocument","update_task":"updateTask","update_time_entry":"updateTimeEntry"},"params":{"action":{"oauthCredential":"credential"}}},"rootly":{"namespace":"legacy.rootly","methods":{"rootly_acknowledge_alert":"acknowledgeAlert","rootly_add_incident_event":"addIncidentEvent","rootly_add_subscribers":"addSubscribers","rootly_assign_incident_role":"assignIncidentRole","rootly_create_action_item":"createActionItem","rootly_create_alert":"createAlert","rootly_create_incident":"createIncident","rootly_create_status_page_event":"createStatusPageEvent","rootly_delete_action_item":"deleteActionItem","rootly_delete_incident":"deleteIncident","rootly_escalate_alert":"escalateAlert","rootly_get_alert":"getAlert","rootly_get_incident":"getIncident","rootly_list_action_items":"listActionItems","rootly_list_alerts":"listAlerts","rootly_list_causes":"listCauses","rootly_list_environments":"listEnvironments","rootly_list_escalation_policies":"listEscalationPolicies","rootly_list_functionalities":"listFunctionalities","rootly_list_incident_events":"listIncidentEvents","rootly_list_incident_roles":"listIncidentRoles","rootly_list_incident_types":"listIncidentTypes","rootly_list_incidents":"listIncidents","rootly_list_on_calls":"listOnCalls","rootly_list_playbooks":"listPlaybooks","rootly_list_retrospectives":"listRetrospectives","rootly_list_schedules":"listSchedules","rootly_list_services":"listServices","rootly_list_severities":"listSeverities","rootly_list_teams":"listTeams","rootly_list_users":"listUsers","rootly_mitigate_incident":"mitigateIncident","rootly_remove_subscribers":"removeSubscribers","rootly_resolve_alert":"resolveAlert","rootly_resolve_incident":"resolveIncident","rootly_run_workflow":"runWorkflow","rootly_snooze_alert":"snoozeAlert","rootly_unassign_incident_role":"unassignIncidentRole","rootly_update_action_item":"updateActionItem","rootly_update_alert":"updateAlert","rootly_update_incident":"updateIncident"},"triggers":{"rootly_alert_created":"alertCreated","rootly_incident_created":"incidentCreated","rootly_incident_resolved":"incidentResolved","rootly_incident_updated":"incidentUpdated"}},"rootly_v2":{"namespace":"rootly","methods":{"rootly_acknowledge_alert":"acknowledgeAlert","rootly_add_incident_event":"addIncidentEvent","rootly_add_subscribers":"addSubscribers","rootly_assign_incident_role":"assignIncidentRole","rootly_create_action_item":"createActionItem","rootly_create_alert":"createAlert","rootly_create_incident":"createIncident","rootly_create_status_page_event":"createStatusPageEvent","rootly_delete_action_item":"deleteActionItem","rootly_delete_incident":"deleteIncident","rootly_escalate_alert":"escalateAlert","rootly_get_alert":"getAlert","rootly_get_incident":"getIncident","rootly_list_action_items":"listActionItems","rootly_list_alerts":"listAlerts","rootly_list_causes":"listCauses","rootly_list_environments":"listEnvironments","rootly_list_escalation_policies":"listEscalationPolicies","rootly_list_functionalities":"listFunctionalities","rootly_list_incident_events":"listIncidentEvents","rootly_list_incident_roles":"listIncidentRoles","rootly_list_incident_types":"listIncidentTypes","rootly_list_incidents":"listIncidents","rootly_list_on_calls":"listOnCalls","rootly_list_playbooks":"listPlaybooks","rootly_list_retrospectives":"listRetrospectives","rootly_list_schedules":"listSchedules","rootly_list_services":"listServices","rootly_list_severities":"listSeverities","rootly_list_teams":"listTeams","rootly_list_users":"listUsers","rootly_mitigate_incident":"mitigateIncident","rootly_remove_subscribers":"removeSubscribers","rootly_resolve_alert":"resolveAlert","rootly_resolve_incident":"resolveIncident","rootly_run_workflow":"runWorkflow","rootly_snooze_alert":"snoozeAlert","rootly_unassign_incident_role":"unassignIncidentRole","rootly_update_action_item":"updateActionItem","rootly_update_alert":"updateAlert","rootly_update_incident":"updateIncident"},"triggers":{"rootly_alert_created":"alertCreated","rootly_incident_created":"incidentCreated","rootly_incident_resolved":"incidentResolved","rootly_incident_updated":"incidentUpdated"},"params":{"action":{"oauthCredential":"credential"}}},"router":{"namespace":"legacy.router"},"router_v2":{"namespace":"router"},"rss":{"namespace":"rss","triggers":{"rss_poller":"poller"}},"s3":{"namespace":"legacy.s3","methods":{"copy_object":"copyObject","create_bucket":"createBucket","delete_bucket":"deleteBucket","delete_object":"deleteObject","delete_objects":"deleteObjectsBatch","get_object":"downloadFile","head_object":"headObjectMetadata","list_buckets":"listBuckets","list_objects":"listObjects","presigned_url":"presignedUrl","put_object":"uploadFile"}},"s3_v2":{"namespace":"s3","methods":{"copy_object":"copyObject","create_bucket":"createBucket","delete_bucket":"deleteBucket","delete_object":"deleteObject","delete_objects":"deleteObjectsBatch","get_object":"downloadFile","head_object":"headObjectMetadata","list_buckets":"listBuckets","list_objects":"listObjects","presigned_url":"presignedUrl","put_object":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"sailpoint":{"namespace":"legacy.sailpoint","methods":{"sailpoint_approve_access_request":"approveAccessRequest","sailpoint_cancel_access_request":"cancelAccessRequest","sailpoint_decide_certification_review_items":"decideCertificationReviewItems","sailpoint_get_access_profile":"getAccessProfile","sailpoint_get_access_profile_entitlements":"getAccessProfileEntitlements","sailpoint_get_access_request_config":"getAccessRequestConfig","sailpoint_get_access_request_status":"getAccessRequestStatus","sailpoint_get_account":"getAccount","sailpoint_get_account_activity":"getAccountActivity","sailpoint_get_account_entitlements":"getAccountEntitlements","sailpoint_get_account_selections":"getAccountSelections","sailpoint_get_campaign":"getCampaign","sailpoint_get_certification":"getCertification","sailpoint_get_entitlement":"getEntitlement","sailpoint_get_entitlement_request_config":"getEntitlementRequestConfig","sailpoint_get_identity":"getIdentity","sailpoint_get_role":"getRole","sailpoint_get_role_entitlements":"getRoleEntitlements","sailpoint_get_source":"getSource","sailpoint_get_task_status":"getTaskStatus","sailpoint_list_access_profiles":"listAccessProfiles","sailpoint_list_account_activities":"listAccountActivities","sailpoint_list_accounts":"listAccounts","sailpoint_list_campaigns":"listCampaigns","sailpoint_list_certification_review_items":"listCertificationReviewItems","sailpoint_list_certifications":"listCertifications","sailpoint_list_entitlements":"listEntitlements","sailpoint_list_identities":"listIdentities","sailpoint_list_identity_entitlements":"listIdentityEntitlements","sailpoint_list_pending_access_request_approvals":"listPendingAccessRequestApprovals","sailpoint_list_roles":"listRoles","sailpoint_list_sources":"listSources","sailpoint_load_accounts":"loadAccountsCsv","sailpoint_load_entitlements":"loadEntitlementsCsv","sailpoint_reject_access_request":"rejectAccessRequest","sailpoint_request_access":"requestAccess","sailpoint_search":"search","sailpoint_search_aggregate":"searchAggregate","sailpoint_search_count":"searchCount","sailpoint_sign_off_certification":"signOffCertification"}},"sailpoint_v2":{"namespace":"sailpoint","methods":{"sailpoint_approve_access_request":"approveAccessRequest","sailpoint_cancel_access_request":"cancelAccessRequest","sailpoint_decide_certification_review_items":"decideCertificationReviewItems","sailpoint_get_access_profile":"getAccessProfile","sailpoint_get_access_profile_entitlements":"getAccessProfileEntitlements","sailpoint_get_access_request_config":"getAccessRequestConfig","sailpoint_get_access_request_status":"getAccessRequestStatus","sailpoint_get_account":"getAccount","sailpoint_get_account_activity":"getAccountActivity","sailpoint_get_account_entitlements":"getAccountEntitlements","sailpoint_get_account_selections":"getAccountSelections","sailpoint_get_campaign":"getCampaign","sailpoint_get_certification":"getCertification","sailpoint_get_entitlement":"getEntitlement","sailpoint_get_entitlement_request_config":"getEntitlementRequestConfig","sailpoint_get_identity":"getIdentity","sailpoint_get_role":"getRole","sailpoint_get_role_entitlements":"getRoleEntitlements","sailpoint_get_source":"getSource","sailpoint_get_task_status":"getTaskStatus","sailpoint_list_access_profiles":"listAccessProfiles","sailpoint_list_account_activities":"listAccountActivities","sailpoint_list_accounts":"listAccounts","sailpoint_list_campaigns":"listCampaigns","sailpoint_list_certification_review_items":"listCertificationReviewItems","sailpoint_list_certifications":"listCertifications","sailpoint_list_entitlements":"listEntitlements","sailpoint_list_identities":"listIdentities","sailpoint_list_identity_entitlements":"listIdentityEntitlements","sailpoint_list_pending_access_request_approvals":"listPendingAccessRequestApprovals","sailpoint_list_roles":"listRoles","sailpoint_list_sources":"listSources","sailpoint_load_accounts":"loadAccountsCsv","sailpoint_load_entitlements":"loadEntitlementsCsv","sailpoint_reject_access_request":"rejectAccessRequest","sailpoint_request_access":"requestAccess","sailpoint_search":"search","sailpoint_search_aggregate":"searchAggregate","sailpoint_search_count":"searchCount","sailpoint_sign_off_certification":"signOffCertification"},"params":{"action":{"oauthCredential":"credential"}}},"salesforce":{"namespace":"salesforce","methods":{"create_account":"createAccount","create_case":"createCase","create_contact":"createContact","create_custom_field":"createCustomField","create_custom_object":"createCustomObject","create_lead":"createLead","create_opportunity":"createOpportunity","create_task":"createTask","delete_account":"deleteAccount","delete_case":"deleteCase","delete_contact":"deleteContact","delete_custom_field":"deleteCustomField","delete_lead":"deleteLead","delete_opportunity":"deleteOpportunity","delete_task":"deleteTask","describe_object":"describeObject","get_accounts":"getAccounts","get_cases":"getCases","get_contacts":"getContacts","get_dashboard":"getDashboard","get_leads":"getLeads","get_opportunities":"getOpportunities","get_report":"getReport","get_tasks":"getTasks","list_dashboards":"listDashboards","list_objects":"listObjects","list_report_types":"listReportTypes","list_reports":"listReports","query":"runSoqlQuery","query_more":"getMoreQueryResults","refresh_dashboard":"refreshDashboard","run_report":"runReport","tooling_query":"runToolingQuery","update_account":"updateAccount","update_case":"updateCase","update_contact":"updateContact","update_custom_field":"updateCustomField","update_lead":"updateLead","update_opportunity":"updateOpportunity","update_task":"updateTask"},"triggers":{"salesforce_case_status_changed":"caseStatusChanged","salesforce_opportunity_stage_changed":"opportunityStageChanged","salesforce_record_created":"recordCreated","salesforce_record_deleted":"recordDeleted","salesforce_record_updated":"recordUpdated","salesforce_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"sap_concur":{"namespace":"sapConcur","methods":{"sap_concur_approve_expense_report":"approveExpenseReport","sap_concur_associate_attendees":"associateAttendees","sap_concur_create_cash_advance":"createCashAdvance","sap_concur_create_expected_expense":"createExpectedExpense","sap_concur_create_expense_report":"createExpenseReport","sap_concur_create_list_item":"createListItem","sap_concur_create_purchase_request":"createPurchaseRequest","sap_concur_create_quick_expense":"createQuickExpense","sap_concur_create_quick_expense_with_image":"createQuickExpenseWithImage","sap_concur_create_report_comment":"createReportComment","sap_concur_create_travel_request":"createTravelRequest","sap_concur_create_user":"createUser","sap_concur_delete_expected_expense":"deleteExpectedExpense","sap_concur_delete_expense":"deleteExpense","sap_concur_delete_expense_report":"deleteExpenseReport","sap_concur_delete_list_item":"deleteListItem","sap_concur_delete_travel_request":"deleteTravelRequest","sap_concur_delete_user":"deleteUser","sap_concur_get_allocation":"getAllocation","sap_concur_get_budget":"getBudget","sap_concur_get_cash_advance":"getCashAdvance","sap_concur_get_expected_expense":"getExpectedExpense","sap_concur_get_expense":"getExpense","sap_concur_get_expense_report":"getExpenseReport","sap_concur_get_itemizations":"getItemizations","sap_concur_get_itinerary":"getItineraryTrip","sap_concur_get_list":"getList","sap_concur_get_list_item":"getListItem","sap_concur_get_purchase_request":"getPurchaseRequest","sap_concur_get_receipt":"getReceipt","sap_concur_get_receipt_status":"getReceiptStatus","sap_concur_get_request_cash_advance":"getRequestCashAdvance","sap_concur_get_travel_profile":"getTravelProfile","sap_concur_get_travel_request":"getTravelRequest","sap_concur_get_user":"getUser","sap_concur_issue_cash_advance":"issueCashAdvance","sap_concur_list_allocations":"listAllocations","sap_concur_list_attendee_associations":"listAttendeeAssociations","sap_concur_list_budget_categories":"listBudgetCategories","sap_concur_list_budgets":"listBudgets","sap_concur_list_exceptions":"listExceptions","sap_concur_list_expected_expenses":"listExpectedExpenses","sap_concur_list_expense_reports":"listExpenseReports","sap_concur_list_expenses":"listExpenses","sap_concur_list_itineraries":"listItinerariesTrips","sap_concur_list_list_items":"listListItems","sap_concur_list_lists":"listLists","sap_concur_list_receipts":"listReceipts","sap_concur_list_report_comments":"listReportComments","sap_concur_list_reports_to_approve":"listReportsToApprove","sap_concur_list_travel_profiles_summary":"listTravelProfilesSummary","sap_concur_list_travel_request_comments":"listTravelRequestComments","sap_concur_list_travel_requests":"listTravelRequests","sap_concur_list_users":"listUsers","sap_concur_move_travel_request":"moveTravelRequestWorkflowAction","sap_concur_recall_expense_report":"recallExpenseReport","sap_concur_remove_all_attendees":"removeAllAttendees","sap_concur_search_locations":"searchLocations","sap_concur_search_users":"searchUsers","sap_concur_send_back_expense_report":"sendBackExpenseReport","sap_concur_submit_expense_report":"submitExpenseReport","sap_concur_update_allocation":"updateAllocation","sap_concur_update_expected_expense":"updateExpectedExpense","sap_concur_update_expense":"updateExpense","sap_concur_update_expense_report":"updateExpenseReport","sap_concur_update_list_item":"updateListItem","sap_concur_update_travel_request":"updateTravelRequest","sap_concur_update_user":"updateUserPatch","sap_concur_upload_exchange_rates":"uploadExchangeRates","sap_concur_upload_receipt_image":"uploadReceiptImage"}},"sap_s4hana":{"namespace":"sapS4hana","methods":{"sap_s4hana_create_business_partner":"createBusinessPartner","sap_s4hana_create_purchase_order":"createPurchaseOrder","sap_s4hana_create_purchase_requisition":"createPurchaseRequisition","sap_s4hana_create_sales_order":"createSalesOrder","sap_s4hana_delete_sales_order":"deleteSalesOrder","sap_s4hana_get_billing_document":"getBillingDocument","sap_s4hana_get_business_partner":"getBusinessPartner","sap_s4hana_get_customer":"getCustomer","sap_s4hana_get_inbound_delivery":"getInboundDelivery","sap_s4hana_get_material_document":"getMaterialDocument","sap_s4hana_get_outbound_delivery":"getOutboundDelivery","sap_s4hana_get_product":"getProduct","sap_s4hana_get_purchase_order":"getPurchaseOrder","sap_s4hana_get_purchase_requisition":"getPurchaseRequisition","sap_s4hana_get_sales_order":"getSalesOrder","sap_s4hana_get_supplier":"getSupplier","sap_s4hana_get_supplier_invoice":"getSupplierInvoice","sap_s4hana_list_billing_documents":"listBillingDocuments","sap_s4hana_list_business_partners":"listBusinessPartners","sap_s4hana_list_customers":"listCustomers","sap_s4hana_list_inbound_deliveries":"listInboundDeliveries","sap_s4hana_list_material_documents":"listMaterialDocuments","sap_s4hana_list_material_stock":"listMaterialStock","sap_s4hana_list_outbound_deliveries":"listOutboundDeliveries","sap_s4hana_list_products":"listProducts","sap_s4hana_list_purchase_orders":"listPurchaseOrders","sap_s4hana_list_purchase_requisitions":"listPurchaseRequisitions","sap_s4hana_list_sales_orders":"listSalesOrders","sap_s4hana_list_supplier_invoices":"listSupplierInvoices","sap_s4hana_list_suppliers":"listSuppliers","sap_s4hana_odata_query":"odataQueryAdvanced","sap_s4hana_update_business_partner":"updateBusinessPartner","sap_s4hana_update_customer":"updateCustomer","sap_s4hana_update_product":"updateProduct","sap_s4hana_update_purchase_order":"updatePurchaseOrder","sap_s4hana_update_purchase_requisition":"updatePurchaseRequisition","sap_s4hana_update_sales_order":"updateSalesOrder","sap_s4hana_update_supplier":"updateSupplier"}},"schedule":{"namespace":"schedule"},"search":{"namespace":"search"},"secrets_manager":{"namespace":"legacy.secretsManager","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","describe_secret":"describeSecret","get_secret":"getSecret","list_secrets":"listSecrets","restore_secret":"restoreSecret","rotate_secret":"rotateSecret","tag_resource":"tagSecret","untag_resource":"untagSecret","update_secret":"updateSecret"}},"secrets_manager_v2":{"namespace":"secretsManager","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","describe_secret":"describeSecret","get_secret":"getSecret","list_secrets":"listSecrets","restore_secret":"restoreSecret","rotate_secret":"rotateSecret","tag_resource":"tagSecret","untag_resource":"untagSecret","update_secret":"updateSecret"},"params":{"action":{"oauthCredential":"credential"}}},"semrush":{"namespace":"semrush","methods":{"semrush_backlinks":"backlinks","semrush_backlinks_anchors":"backlinkAnchors","semrush_backlinks_competitors":"backlinkCompetitors","semrush_backlinks_geo_distribution":"backlinkCountryDistribution","semrush_backlinks_indexed_pages":"indexedPages","semrush_backlinks_overview":"backlinksOverview","semrush_backlinks_tld_distribution":"backlinkTldDistribution","semrush_batch_keyword_overview":"batchKeywordOverview","semrush_broad_match_keywords":"broadMatchKeywords","semrush_domain_ad_copies":"domainAdCopies","semrush_domain_ad_history":"domainAdHistory","semrush_domain_organic_competitors":"organicCompetitors","semrush_domain_organic_keywords":"domainOrganicKeywords","semrush_domain_overview":"domainOverview","semrush_domain_overview_all":"domainOverviewAllDatabases","semrush_domain_overview_history":"domainOverviewHistory","semrush_domain_paid_competitors":"paidCompetitors","semrush_domain_paid_keywords":"domainPaidKeywords","semrush_domain_pla_copies":"domainPlaCopies","semrush_domain_pla_keywords":"domainPlaKeywords","semrush_domain_vs_domain":"domainVsDomain","semrush_keyword_ad_history":"keywordAdHistory","semrush_keyword_difficulty":"keywordDifficulty","semrush_keyword_overview":"keywordOverview","semrush_keyword_overview_all":"keywordOverviewAllDatabases","semrush_keyword_questions":"keywordQuestions","semrush_organic_results":"organicResults","semrush_paid_results":"paidResults","semrush_referring_domains":"referringDomains","semrush_referring_ips":"referringIps","semrush_related_keywords":"relatedKeywords","semrush_subdomain_ad_copies":"subdomainAdCopies","semrush_subdomain_organic_keywords":"subdomainOrganicKeywords","semrush_subdomain_overview":"subdomainOverview","semrush_subdomain_overview_all":"subdomainOverviewAllDatabases","semrush_subdomain_overview_history":"subdomainOverviewHistory","semrush_subdomain_paid_keywords":"subdomainPaidKeywords","semrush_top_domains":"topDomains","semrush_url_organic_keywords":"urlOrganicKeywords","semrush_url_overview":"urlOverview","semrush_url_overview_all":"urlOverviewAllDatabases","semrush_url_overview_history":"urlOverviewHistory","semrush_url_paid_keywords":"urlPaidKeywords","semrush_winners_and_losers":"winnersAndLosers"}},"sendblue":{"namespace":"sendblue","methods":{"sendblue_evaluate_service":"evaluateService","sendblue_get_message":"getMessage","sendblue_send_group_message":"sendGroupMessage","sendblue_send_message":"sendMessage","sendblue_send_typing_indicator":"sendTypingIndicator"},"triggers":{"sendblue_message_received":"messageReceived","sendblue_message_status_updated":"messageStatusUpdated"}},"sendgrid":{"namespace":"legacy.sendgrid","methods":{"add_contact":"addContact","add_contacts_to_list":"addContactsToList","create_list":"createList","create_template":"createTemplate","create_template_version":"createTemplateVersion","delete_contacts":"deleteContacts","delete_list":"deleteList","delete_template":"deleteTemplate","get_contact":"getContact","get_list":"getList","get_template":"getTemplate","list_all_lists":"listAllLists","list_templates":"listTemplates","remove_contacts_from_list":"removeContactsFromList","search_contacts":"searchContacts","send_mail":"sendMail"}},"sendgrid_v2":{"namespace":"sendgrid","methods":{"add_contact":"addContact","add_contacts_to_list":"addContactsToList","create_list":"createList","create_template":"createTemplate","create_template_version":"createTemplateVersion","delete_contacts":"deleteContacts","delete_list":"deleteList","delete_template":"deleteTemplate","get_contact":"getContact","get_list":"getList","get_template":"getTemplate","list_all_lists":"listAllLists","list_templates":"listTemplates","remove_contacts_from_list":"removeContactsFromList","search_contacts":"searchContacts","send_mail":"sendMail"},"params":{"action":{"oauthCredential":"credential"}}},"sentry":{"namespace":"legacy.sentry","methods":{"sentry_events_get":"getEvent","sentry_events_list":"listEvents","sentry_issues_get":"getIssue","sentry_issues_list":"listIssues","sentry_issues_update":"updateIssue","sentry_projects_create":"createProject","sentry_projects_get":"getProject","sentry_projects_list":"listProjects","sentry_projects_update":"updateProject","sentry_releases_create":"createRelease","sentry_releases_deploy":"createDeploy","sentry_releases_list":"listReleases","sentry_teams_list":"listTeams"},"triggers":{"sentry_error_created":"errorCreated","sentry_issue_alert":"issueAlert","sentry_issue_created":"issueCreated","sentry_issue_resolved":"issueResolved","sentry_metric_alert":"metricAlert"}},"sentry_v2":{"namespace":"sentry","methods":{"sentry_events_get":"getEvent","sentry_events_list":"listEvents","sentry_issues_get":"getIssue","sentry_issues_list":"listIssues","sentry_issues_update":"updateIssue","sentry_projects_create":"createProject","sentry_projects_get":"getProject","sentry_projects_list":"listProjects","sentry_projects_update":"updateProject","sentry_releases_create":"createRelease","sentry_releases_deploy":"createDeploy","sentry_releases_list":"listReleases","sentry_teams_list":"listTeams"},"triggers":{"sentry_error_created":"errorCreated","sentry_issue_alert":"issueAlert","sentry_issue_created":"issueCreated","sentry_issue_resolved":"issueResolved","sentry_metric_alert":"metricAlert"},"params":{"action":{"oauthCredential":"credential"}}},"serper":{"namespace":"serper"},"servicenow":{"namespace":"legacy.servicenow","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"}},"servicenow_v2":{"namespace":"legacy.servicenowV2","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"}},"servicenow_v3":{"namespace":"servicenow","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"ses":{"namespace":"legacy.ses","methods":{"create_configuration_set":"createConfigurationSet","create_email_identity":"createEmailIdentity","create_template":"createTemplate","delete_email_identity":"deleteEmailIdentity","delete_suppressed_destination":"deleteSuppressedDestination","delete_template":"deleteTemplate","get_account":"getAccount","get_email_identity":"getEmailIdentity","get_suppressed_destination":"getSuppressedDestination","get_template":"getTemplate","list_identities":"listIdentities","list_suppressed_destinations":"listSuppressedDestinations","list_templates":"listTemplates","put_suppressed_destination":"putSuppressedDestination","send_bulk_email":"sendBulkEmail","send_custom_verification_email":"sendCustomVerificationEmail","send_email":"sendEmail","send_templated_email":"sendTemplatedEmail","update_template":"updateTemplate"}},"ses_v2":{"namespace":"ses","methods":{"create_configuration_set":"createConfigurationSet","create_email_identity":"createEmailIdentity","create_template":"createTemplate","delete_email_identity":"deleteEmailIdentity","delete_suppressed_destination":"deleteSuppressedDestination","delete_template":"deleteTemplate","get_account":"getAccount","get_email_identity":"getEmailIdentity","get_suppressed_destination":"getSuppressedDestination","get_template":"getTemplate","list_identities":"listIdentities","list_suppressed_destinations":"listSuppressedDestinations","list_templates":"listTemplates","put_suppressed_destination":"putSuppressedDestination","send_bulk_email":"sendBulkEmail","send_custom_verification_email":"sendCustomVerificationEmail","send_email":"sendEmail","send_templated_email":"sendTemplatedEmail","update_template":"updateTemplate"},"params":{"action":{"oauthCredential":"credential"}}},"sftp":{"namespace":"legacy.sftp","methods":{"sftp_create":"createFile","sftp_delete":"deleteFileDirectory","sftp_download":"downloadFile","sftp_list":"listDirectory","sftp_mkdir":"createDirectory","sftp_upload":"uploadFiles"}},"sftp_v2":{"namespace":"sftp","methods":{"sftp_create":"createFile","sftp_delete":"deleteFileDirectory","sftp_download":"downloadFile","sftp_list":"listDirectory","sftp_mkdir":"createDirectory","sftp_upload":"uploadFiles"}},"sharepoint":{"namespace":"legacy.sharepoint","methods":{"add_list_items":"addListItems","create_list":"createList","create_page":"createPage","delete_file":"deleteFile","delete_list_item":"deleteListItem","delete_page":"deletePage","download_file":"downloadFile","get_drive_item":"getDriveItem","get_list_item":"getListItem","list_sites":"listSites","publish_page":"publishPage","read_list":"readList","read_page":"readPage","update_list":"updateList","update_page":"updatePage","upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"sharepoint_v2":{"namespace":"sharepoint","methods":{"sharepoint_add_list_items":"addListItem","sharepoint_create_list":"createList","sharepoint_create_page":"createPage","sharepoint_delete_file":"deleteFile","sharepoint_delete_list_item":"deleteListItem","sharepoint_delete_page":"deletePage","sharepoint_download_file":"downloadFile","sharepoint_get_drive_item":"getDriveItem","sharepoint_get_list":"readList","sharepoint_get_list_item":"getListItem","sharepoint_list_sites":"listSites","sharepoint_publish_page":"publishPage","sharepoint_read_page":"readPage","sharepoint_update_list":"updateListItem","sharepoint_update_page":"updatePage","sharepoint_upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"shopify":{"namespace":"shopify","methods":{"shopify_adjust_inventory":"adjustInventory","shopify_cancel_order":"cancelOrder","shopify_create_customer":"createCustomer","shopify_create_fulfillment":"createFulfillment","shopify_create_product":"createProduct","shopify_create_product_variants":"createProductVariants","shopify_delete_customer":"deleteCustomer","shopify_delete_product":"deleteProduct","shopify_get_collection":"getCollection","shopify_get_customer":"getCustomer","shopify_get_fulfillment":"getFulfillment","shopify_get_fulfillment_order":"getFulfillmentOrder","shopify_get_inventory_level":"getInventoryLevel","shopify_get_job":"getJob","shopify_get_order":"getOrder","shopify_get_product":"getProduct","shopify_list_collections":"listCollections","shopify_list_customers":"listCustomers","shopify_list_fulfillment_orders":"listFulfillmentOrders","shopify_list_inventory_items":"listInventoryItems","shopify_list_locations":"listLocations","shopify_list_orders":"listOrders","shopify_list_products":"listProducts","shopify_update_customer":"updateCustomer","shopify_update_fulfillment_tracking":"updateFulfillmentTracking","shopify_update_order":"updateOrder","shopify_update_product":"updateProduct","shopify_update_product_variants":"updateProductVariants"},"params":{"action":{"oauthCredential":"credential"}}},"sim_workspace_event":{"namespace":"simWorkspaceEvent","triggers":{"sim_workspace_event":"workspaceEvent"}},"similarweb":{"namespace":"legacy.similarweb","methods":{"similarweb_bounce_rate":"bounceRate","similarweb_page_views":"pageViews","similarweb_pages_per_visit":"pagesPerVisit","similarweb_traffic_visits":"trafficVisits","similarweb_visit_duration":"visitDurationDesktop","similarweb_website_overview":"websiteOverview"}},"similarweb_v2":{"namespace":"similarweb","methods":{"similarweb_bounce_rate":"bounceRate","similarweb_page_views":"pageViews","similarweb_pages_per_visit":"pagesPerVisit","similarweb_traffic_visits":"trafficVisits","similarweb_visit_duration":"visitDurationDesktop","similarweb_website_overview":"websiteOverview"},"params":{"action":{"oauthCredential":"credential"}}},"sixtyfour":{"namespace":"legacy.sixtyfour","methods":{"enrich_company":"enrichCompany","enrich_lead":"enrichLead","find_email":"findEmail","find_phone":"findPhone"}},"sixtyfour_v2":{"namespace":"sixtyfour","methods":{"enrich_company":"enrichCompany","enrich_lead":"enrichLead","find_email":"findEmail","find_phone":"findPhone"},"params":{"action":{"oauthCredential":"credential"}}},"slack":{"namespace":"legacy.slack","methods":{"archive_conversation":"archiveConversation","canvas":"createCanvas","create_channel_canvas":"createChannelCanvas","create_conversation":"createConversation","delete":"deleteMessage","delete_canvas":"deleteCanvas","delete_scheduled_message":"deleteScheduledMessage","download":"downloadFile","edit_canvas":"editCanvas","ephemeral":"sendEphemeralMessage","get_canvas":"getCanvasInfo","get_channel_history":"getChannelHistory","get_channel_info":"getChannelInfo","get_message":"getMessage","get_permalink":"getMessagePermalink","get_thread":"getThread","get_thread_replies":"getThreadReplies","get_user":"getUserInfo","get_user_presence":"getUserPresence","invite_to_conversation":"inviteToConversation","list_canvases":"listCanvases","list_channels":"listChannels","list_members":"listChannelMembers","list_scheduled_messages":"listScheduledMessages","list_users":"listUsers","lookup_canvas_sections":"lookupCanvasSections","open_view":"openView","publish_view":"publishView","push_view":"pushView","react":"addReaction","read":"readMessages","rename_conversation":"renameConversation","schedule_message":"scheduleMessage","send":"sendMessage","set_conversation_purpose":"setConversationPurpose","set_conversation_topic":"setConversationTopic","set_status":"setAssistantStatus","set_suggested_prompts":"setSuggestedPrompts","set_title":"setAssistantTitle","unreact":"removeReaction","update":"updateMessage","update_view":"updateView"},"triggers":{"slack_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"slack_v2":{"namespace":"slack","methods":{"add_bookmark":"addBookmark","archive_conversation":"archiveConversation","canvas":"createCanvas","close_conversation":"closeConversation","create_channel_canvas":"createChannelCanvas","create_conversation":"createConversation","create_list":"createList","create_list_item":"createListItem","create_user_group":"createUserGroup","delete":"deleteMessage","delete_canvas":"deleteCanvas","delete_file":"deleteFile","delete_list_item":"deleteListItem","delete_list_items":"deleteListItems","delete_scheduled_message":"deleteScheduledMessage","disable_user_group":"disableUserGroup","download":"downloadFile","edit_bookmark":"editBookmark","edit_canvas":"editCanvas","enable_user_group":"enableUserGroup","ephemeral":"sendEphemeralMessage","get_canvas":"getCanvasInfo","get_channel_history":"getChannelHistory","get_channel_info":"getChannelInfo","get_dnd_info":"getDoNotDisturbInfo","get_file_info":"getFileInfo","get_list_export":"getListExport","get_list_item":"getListItem","get_message":"getMessage","get_permalink":"getMessagePermalink","get_reactions":"getReactions","get_team_dnd_info":"getTeamDoNotDisturbInfo","get_team_info":"getWorkspaceInfo","get_team_profile":"getWorkspaceProfileFields","get_thread":"getThread","get_thread_replies":"getThreadReplies","get_user":"getUserInfo","get_user_presence":"getUserPresence","get_user_profile":"getUserProfile","invite_to_conversation":"inviteToConversation","join_conversation":"joinConversation","kick_conversation":"removeUserFromConversation","leave_conversation":"leaveConversation","list_bookmarks":"listBookmarks","list_canvases":"listCanvases","list_channels":"listChannels","list_emoji":"listCustomEmoji","list_files":"listFiles","list_items":"readListItems","list_members":"listChannelMembers","list_pins":"listPins","list_reactions":"listReactions","list_scheduled_messages":"listScheduledMessages","list_user_conversations":"listUserConversations","list_user_group_members":"listUserGroupMembers","list_user_groups":"listUserGroups","list_users":"listUsers","lookup_canvas_sections":"lookupCanvasSections","lookup_user_by_email":"findUserByEmail","mark_conversation_read":"markConversationRead","open_conversation":"openConversation","open_view":"openView","pin_message":"pinMessage","publish_view":"publishView","push_view":"pushView","react":"addReaction","read":"readMessages","remove_bookmark":"removeBookmark","rename_agent_session":"renameAgentSession","rename_conversation":"renameConversation","rename_list":"updateList","revoke_canvas_access":"revokeCanvasAccess","revoke_list_access":"revokeListAccess","schedule_message":"scheduleMessage","send":"sendMessage","set_agent_session_status":"setAgentSessionStatus","set_agent_suggested_prompts":"setAgentSuggestedPrompts","set_conversation_purpose":"setConversationPurpose","set_conversation_topic":"setConversationTopic","set_status":"setAssistantStatus","set_suggested_prompts":"setAssistantSuggestedPrompts","set_title":"setAssistantTitle","set_user_presence":"setBotPresence","share_canvas":"shareCanvas","share_list":"shareList","start_list_export":"startListExport","unarchive_conversation":"unarchiveConversation","unfurl_links":"unfurlLinks","unpin_message":"unpinMessage","unreact":"removeReaction","update":"updateMessage","update_list_items":"updateListItems","update_user_group":"updateUserGroup","update_user_group_members":"updateUserGroupMembers","update_view":"updateView"},"triggers":{"slack_oauth":"oauth"},"params":{"action":{"oauthCredential":"credential"}}},"smartlead":{"namespace":"legacy.smartlead","methods":{"add_email_accounts_to_campaign":"addEmailAccountsToCampaign","add_leads_to_campaign":"addLeadsToCampaign","create_campaign":"createCampaign","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_campaign_webhook":"deleteCampaignWebhook","delete_lead_from_campaign":"deleteLeadFromCampaign","delete_lead_list":"deleteLeadList","duplicate_campaign":"duplicateCampaign","export_campaign_leads":"exportCampaignLeadsCsv","get_campaign":"getCampaign","get_campaign_analytics":"getCampaignAnalytics","get_campaign_analytics_by_date":"getCampaignAnalyticsByDate","get_campaign_lead_statistics":"getCampaignLeadStatistics","get_campaign_mailbox_statistics":"getCampaignMailboxStatistics","get_campaign_sequences":"getCampaignSequences","get_campaign_statistics":"getCampaignStatistics","get_campaign_top_level_analytics_by_date":"getTopLevelAnalyticsByDate","get_campaign_webhook_summary":"getWebhookSummary","get_lead_by_email":"getLeadByEmail","get_lead_by_id":"getLeadById","get_lead_list":"getLeadList","get_lead_message_history":"getLeadMessageHistory","list_campaign_email_accounts":"listCampaignEmailAccounts","list_campaign_leads":"listCampaignLeads","list_campaign_webhooks":"listCampaignWebhooks","list_campaigns":"listCampaigns","list_clients":"listClients","list_email_accounts":"listEmailAccounts","list_inbox_replies":"listInboxReplies","list_lead_activities":"listLeadActivities","list_lead_categories":"listLeadCategories","list_lead_lists":"listLeadLists","mark_lead_complete":"markLeadComplete","pause_lead":"pauseLead","remove_email_accounts_from_campaign":"removeEmailAccountsFromCampaign","resume_lead":"resumeLead","save_campaign_sequences":"saveCampaignSequences","unsubscribe_lead_from_campaign":"unsubscribeLeadFromCampaign","unsubscribe_lead_globally":"unsubscribeLeadGlobally","update_campaign_schedule":"updateCampaignSchedule","update_campaign_settings":"updateCampaignSettings","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead","update_lead_category":"updateLeadCategory","update_lead_list":"updateLeadList","upsert_campaign_webhook":"createOrUpdateWebhook"}},"smartlead_v2":{"namespace":"smartlead","methods":{"add_email_accounts_to_campaign":"addEmailAccountsToCampaign","add_leads_to_campaign":"addLeadsToCampaign","create_campaign":"createCampaign","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_campaign_webhook":"deleteCampaignWebhook","delete_lead_from_campaign":"deleteLeadFromCampaign","delete_lead_list":"deleteLeadList","duplicate_campaign":"duplicateCampaign","export_campaign_leads":"exportCampaignLeadsCsv","get_campaign":"getCampaign","get_campaign_analytics":"getCampaignAnalytics","get_campaign_analytics_by_date":"getCampaignAnalyticsByDate","get_campaign_lead_statistics":"getCampaignLeadStatistics","get_campaign_mailbox_statistics":"getCampaignMailboxStatistics","get_campaign_sequences":"getCampaignSequences","get_campaign_statistics":"getCampaignStatistics","get_campaign_top_level_analytics_by_date":"getTopLevelAnalyticsByDate","get_campaign_webhook_summary":"getWebhookSummary","get_lead_by_email":"getLeadByEmail","get_lead_by_id":"getLeadById","get_lead_list":"getLeadList","get_lead_message_history":"getLeadMessageHistory","list_campaign_email_accounts":"listCampaignEmailAccounts","list_campaign_leads":"listCampaignLeads","list_campaign_webhooks":"listCampaignWebhooks","list_campaigns":"listCampaigns","list_clients":"listClients","list_email_accounts":"listEmailAccounts","list_inbox_replies":"listInboxReplies","list_lead_activities":"listLeadActivities","list_lead_categories":"listLeadCategories","list_lead_lists":"listLeadLists","mark_lead_complete":"markLeadComplete","pause_lead":"pauseLead","remove_email_accounts_from_campaign":"removeEmailAccountsFromCampaign","resume_lead":"resumeLead","save_campaign_sequences":"saveCampaignSequences","unsubscribe_lead_from_campaign":"unsubscribeLeadFromCampaign","unsubscribe_lead_globally":"unsubscribeLeadGlobally","update_campaign_schedule":"updateCampaignSchedule","update_campaign_settings":"updateCampaignSettings","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead","update_lead_category":"updateLeadCategory","update_lead_list":"updateLeadList","upsert_campaign_webhook":"createOrUpdateWebhook"},"params":{"action":{"oauthCredential":"credential"}}},"smtp":{"namespace":"smtp"},"snowflake":{"namespace":"snowflake","methods":{"alter_warehouse":"alterWarehouse","call_procedure":"callProcedure","cancel_statement":"cancelStatement","cancel_task_run":"cancelTaskQuery","cortex_analyst_ask":"askCortexAnalyst","cortex_analyst_feedback":"sendCortexAnalystFeedback","delete_rows":"deleteRows","execute_sql":"executeSql","get_statement":"getStatement","get_task":"getTask","get_task_run":"getTaskRun","get_task_run_output":"getTaskRunOutput","get_warehouse":"getWarehouse","insert_rows":"insertRows","introspect_schema":"introspectSchema","list_copy_history":"listCopyHistory","list_databases":"listDatabases","list_query_history":"listQueryHistory","list_schemas":"listSchemas","list_tables":"listTables","list_task_runs":"listTaskRuns","list_tasks":"listTasks","list_warehouses":"listWarehouses","load_data":"loadData","resume_task":"resumeTask","resume_warehouse":"resumeWarehouse","run_task":"runTask","suspend_task":"suspendTask","suspend_warehouse":"suspendWarehouse","unload_data":"unloadData","update_rows":"updateRows","upsert_rows":"upsertRows"},"params":{"action":{"oauthCredential":"credential"}}},"splunk":{"namespace":"legacy.splunk","methods":{"splunk_cancel_search_job":"cancelSearchJob","splunk_create_search_job":"createSearchJob","splunk_dispatch_saved_search":"dispatchSavedSearch","splunk_get_fired_alerts":"getFiredAlerts","splunk_get_saved_search":"getSavedSearch","splunk_get_search_job":"getSearchJob","splunk_get_search_results":"getSearchResults","splunk_list_apps":"listApps","splunk_list_fired_alerts":"listFiredAlerts","splunk_list_indexes":"listIndexes","splunk_list_saved_searches":"listSavedSearches","splunk_run_search":"runSearch"}},"splunk_v2":{"namespace":"splunk","methods":{"splunk_cancel_search_job":"cancelSearchJob","splunk_create_search_job":"createSearchJob","splunk_dispatch_saved_search":"dispatchSavedSearch","splunk_get_fired_alerts":"getFiredAlerts","splunk_get_saved_search":"getSavedSearch","splunk_get_search_job":"getSearchJob","splunk_get_search_results":"getSearchResults","splunk_list_apps":"listApps","splunk_list_fired_alerts":"listFiredAlerts","splunk_list_indexes":"listIndexes","splunk_list_saved_searches":"listSavedSearches","splunk_run_search":"runSearch"},"params":{"action":{"oauthCredential":"credential"}}},"sportmonks":{"namespace":"legacy.sportmonks","methods":{"core_get_cities":"coreGetCities","core_get_city":"coreGetCityById","core_get_continent":"coreGetContinentById","core_get_continents":"coreGetContinents","core_get_countries":"coreGetCountries","core_get_country":"coreGetCountryById","core_get_entity_filters":"coreGetAllEntityFilters","core_get_my_usage":"coreGetMyUsage","core_get_region":"coreGetRegionById","core_get_regions":"coreGetRegions","core_get_timezones":"coreGetTimezones","core_get_type":"coreGetTypeById","core_get_type_by_entity":"coreGetTypeByEntity","core_get_types":"coreGetTypes","core_search_cities":"coreSearchCities","core_search_countries":"coreSearchCountries","core_search_regions":"coreSearchRegions","football_expected_by_player":"footballGetExpectedXGByPlayer","football_expected_by_team":"footballGetExpectedXGByTeam","football_get_all_commentaries":"footballGetAllCommentaries","football_get_all_fixtures":"footballGetAllFixtures","football_get_all_players":"footballGetAllPlayers","football_get_all_rivals":"footballGetAllRivals","football_get_all_teams":"footballGetAllTeams","football_get_all_transfer_rumours":"footballGetAllTransferRumours","football_get_all_transfers":"footballGetAllTransfers","football_get_brackets_by_season":"footballGetBracketsBySeason","football_get_coach":"footballGetCoachById","football_get_coaches":"footballGetCoaches","football_get_coaches_by_country":"footballGetCoachesByCountry","football_get_commentaries_by_fixture":"footballGetCommentariesByFixture","football_get_current_leagues_by_team":"footballGetCurrentLeaguesByTeam","football_get_expected_lineups_by_player":"footballGetExpectedLineupsByPlayer","football_get_expected_lineups_by_team":"footballGetExpectedLineupsByTeam","football_get_extended_team_squad":"footballGetExtendedTeamSquad","football_get_fixture":"footballGetFixtureById","football_get_fixtures_by_date":"footballGetFixturesByDate","football_get_fixtures_by_date_range":"footballGetFixturesByDateRange","football_get_fixtures_by_date_range_for_team":"footballGetFixturesByDateRangeForTeam","football_get_fixtures_by_ids":"footballGetFixturesByMultipleIds","football_get_grouped_standings_by_round":"footballGetGroupedStandingsByRound","football_get_head_to_head":"footballGetHeadToHead","football_get_inplay_livescores":"footballGetInplayLivescores","football_get_latest_coaches":"footballGetLastUpdatedCoaches","football_get_latest_fixtures":"footballGetLatestUpdatedFixtures","football_get_latest_livescores":"footballGetLatestUpdatedLivescores","football_get_latest_players":"footballGetLastUpdatedPlayers","football_get_latest_totw":"footballGetLatestTeamOfTheWeek","football_get_latest_transfers":"footballGetLatestTransfers","football_get_league":"footballGetLeagueById","football_get_leagues":"footballGetLeagues","football_get_leagues_by_country":"footballGetLeaguesByCountry","football_get_leagues_by_date":"footballGetLeaguesByDate","football_get_leagues_by_team":"footballGetLeaguesByTeam","football_get_live_leagues":"footballGetLiveLeagues","football_get_live_probabilities":"footballGetLiveProbabilities","football_get_live_probabilities_by_fixture":"footballGetLiveProbabilitiesByFixture","football_get_live_standings_by_league":"footballGetLiveStandingsByLeague","football_get_livescores":"footballGetLivescores","football_get_match_facts":"footballGetAllMatchFacts","football_get_match_facts_by_date_range":"footballGetMatchFactsByDateRange","football_get_match_facts_by_fixture":"footballGetMatchFactsByFixture","football_get_match_facts_by_league":"footballGetMatchFactsByLeague","football_get_past_fixtures_by_tv_station":"footballGetPastFixturesByTvStation","football_get_player":"footballGetPlayerById","football_get_players_by_country":"footballGetPlayersByCountry","football_get_postmatch_news":"footballGetPostMatchNews","football_get_postmatch_news_by_season":"footballGetPostMatchNewsBySeason","football_get_predictability_by_league":"footballGetPredictabilityByLeague","football_get_prematch_news":"footballGetPreMatchNews","football_get_prematch_news_by_season":"footballGetPreMatchNewsBySeason","football_get_prematch_news_upcoming":"footballGetPreMatchNewsForUpcomingFixtures","football_get_probabilities":"footballGetProbabilities","football_get_probabilities_by_fixture":"footballGetPredictionsByFixture","football_get_referee":"footballGetRefereeById","football_get_referees":"footballGetReferees","football_get_referees_by_country":"footballGetRefereesByCountry","football_get_referees_by_season":"footballGetRefereesBySeason","football_get_rivals_by_team":"footballGetRivalsByTeam","football_get_round":"footballGetRoundById","football_get_round_statistics":"footballGetRoundStatistics","football_get_rounds":"footballGetRounds","football_get_rounds_by_season":"footballGetRoundsBySeason","football_get_schedules_by_season":"footballGetSchedulesBySeason","football_get_schedules_by_season_and_team":"footballGetSchedulesBySeasonAndTeam","football_get_schedules_by_team":"footballGetSchedulesByTeam","football_get_season":"footballGetSeasonById","football_get_seasons":"footballGetSeasons","football_get_seasons_by_team":"footballGetSeasonsByTeam","football_get_stage":"footballGetStageById","football_get_stage_statistics":"footballGetStageStatistics","football_get_stages":"footballGetStages","football_get_stages_by_season":"footballGetStagesBySeason","football_get_standing_corrections_by_season":"footballGetStandingCorrectionsBySeason","football_get_standings":"footballGetAllStandings","football_get_standings_by_round":"footballGetStandingsByRound","football_get_standings_by_season":"footballGetStandingsBySeason","football_get_state":"footballGetStateById","football_get_states":"footballGetStates","football_get_team":"footballGetTeamById","football_get_team_rankings":"footballGetAllTeamRankings","football_get_team_rankings_by_date":"footballGetTeamRankingsByDate","football_get_team_rankings_by_team":"footballGetTeamRankingsByTeam","football_get_team_squad":"footballGetTeamSquad","football_get_team_squad_by_season":"footballGetTeamSquadBySeason","football_get_teams_by_country":"footballGetTeamsByCountry","football_get_teams_by_season":"footballGetTeamsBySeason","football_get_topscorers_by_season":"footballGetTopscorersBySeason","football_get_topscorers_by_stage":"footballGetTopscorersByStage","football_get_totw":"footballGetAllTeamOfTheWeek","football_get_totw_by_round":"footballGetTeamOfTheWeekByRound","football_get_transfer":"footballGetTransferById","football_get_transfer_rumour":"footballGetTransferRumourById","football_get_transfer_rumours_between_dates":"footballGetTransferRumoursBetweenDates","football_get_transfer_rumours_by_player":"footballGetTransferRumoursByPlayer","football_get_transfer_rumours_by_team":"footballGetTransferRumoursByTeam","football_get_transfers_between_dates":"footballGetTransfersBetweenDates","football_get_transfers_by_player":"footballGetTransfersByPlayer","football_get_transfers_by_team":"footballGetTransfersByTeam","football_get_tv_station":"footballGetTvStationById","football_get_tv_stations":"footballGetTvStations","football_get_tv_stations_by_fixture":"footballGetTvStationsByFixture","football_get_upcoming_fixtures_by_market":"footballGetUpcomingFixturesByMarket","football_get_upcoming_fixtures_by_tv_station":"footballGetUpcomingFixturesByTvStation","football_get_value_bets":"footballGetValueBets","football_get_value_bets_by_fixture":"footballGetValueBetsByFixture","football_get_venue":"footballGetVenueById","football_get_venues":"footballGetVenues","football_get_venues_by_season":"footballGetVenuesBySeason","football_search_coaches":"footballSearchCoaches","football_search_fixtures":"footballSearchFixtures","football_search_leagues":"footballSearchLeagues","football_search_players":"footballSearchPlayers","football_search_referees":"footballSearchReferees","football_search_rounds":"footballSearchRounds","football_search_seasons":"footballSearchSeasons","football_search_stages":"footballSearchStages","football_search_teams":"footballSearchTeams","football_search_venues":"footballSearchVenues","motorsport_get_all_fixtures":"motorsportGetAllFixtures","motorsport_get_current_leagues_by_team":"motorsportGetCurrentLeaguesByTeam","motorsport_get_driver":"motorsportGetDriverById","motorsport_get_driver_standings":"motorsportGetAllDriverStandings","motorsport_get_driver_standings_by_season":"motorsportGetDriverStandingsBySeason","motorsport_get_drivers":"motorsportGetDrivers","motorsport_get_drivers_by_country":"motorsportGetDriversByCountry","motorsport_get_drivers_by_season":"motorsportGetDriversBySeason","motorsport_get_fixture":"motorsportGetFixtureById","motorsport_get_fixtures_by_date":"motorsportGetFixturesByDate","motorsport_get_fixtures_by_date_range":"motorsportGetFixturesByDateRange","motorsport_get_fixtures_by_ids":"motorsportGetFixturesByIds","motorsport_get_laps_by_fixture":"motorsportGetLapsByFixture","motorsport_get_laps_by_fixture_and_driver":"motorsportGetLapsByFixtureAndDriver","motorsport_get_laps_by_fixture_and_lap":"motorsportGetLapsByFixtureAndLapNumber","motorsport_get_latest_laps_by_fixture":"motorsportGetLatestLapsByFixture","motorsport_get_latest_pitstops_by_fixture":"motorsportGetLatestPitstopsByFixture","motorsport_get_latest_stints_by_fixture":"motorsportGetLatestStintsByFixture","motorsport_get_latest_updated_drivers":"motorsportGetLatestUpdatedDrivers","motorsport_get_latest_updated_fixtures":"motorsportGetLatestUpdatedFixtures","motorsport_get_league":"motorsportGetLeagueById","motorsport_get_leagues":"motorsportGetAllLeagues","motorsport_get_leagues_by_country":"motorsportGetLeaguesByCountry","motorsport_get_leagues_by_date":"motorsportGetLeaguesByFixtureDate","motorsport_get_leagues_by_live":"motorsportGetLeaguesByLive","motorsport_get_leagues_by_team":"motorsportGetLeaguesByTeam","motorsport_get_livescores":"motorsportGetLivescores","motorsport_get_pitstops_by_fixture":"motorsportGetPitstopsByFixture","motorsport_get_pitstops_by_fixture_and_driver":"motorsportGetPitstopsByFixtureAndDriver","motorsport_get_pitstops_by_fixture_and_lap":"motorsportGetPitstopsByFixtureAndLapNumber","motorsport_get_race_results_by_season_and_driver":"motorsportGetRaceResultsBySeasonAndDriver","motorsport_get_race_results_by_season_and_team":"motorsportGetRaceResultsBySeasonAndTeam","motorsport_get_schedules_by_season":"motorsportGetSchedulesBySeason","motorsport_get_season":"motorsportGetSeasonById","motorsport_get_seasons":"motorsportGetAllSeasons","motorsport_get_stage":"motorsportGetStageById","motorsport_get_stages":"motorsportGetAllStages","motorsport_get_stages_by_season":"motorsportGetStagesBySeason","motorsport_get_state":"motorsportGetStateById","motorsport_get_states":"motorsportGetAllStates","motorsport_get_stints_by_fixture":"motorsportGetStintsByFixture","motorsport_get_stints_by_fixture_and_driver":"motorsportGetStintsByFixtureAndDriver","motorsport_get_stints_by_fixture_and_stint":"motorsportGetStintsByFixtureAndStintNumber","motorsport_get_team":"motorsportGetTeamById","motorsport_get_team_standings":"motorsportGetAllTeamStandings","motorsport_get_team_standings_by_season":"motorsportGetTeamStandingsBySeason","motorsport_get_teams":"motorsportGetTeams","motorsport_get_teams_by_country":"motorsportGetTeamsByCountry","motorsport_get_teams_by_season":"motorsportGetTeamsBySeason","motorsport_get_venue":"motorsportGetVenueById","motorsport_get_venues":"motorsportGetVenues","motorsport_get_venues_by_season":"motorsportGetVenuesBySeason","motorsport_search_drivers":"motorsportSearchDrivers","motorsport_search_leagues":"motorsportSearchLeagues","motorsport_search_stages":"motorsportSearchStages","motorsport_search_teams":"motorsportSearchTeams","motorsport_search_venues":"motorsportSearchVenues","odds_get_all_historical_odds":"oddsGetAllHistoricalOdds","odds_get_all_inplay_odds":"oddsGetAllInPlayOdds","odds_get_all_pre_match_odds":"oddsGetAllPreMatchOdds","odds_get_all_premium_odds":"oddsGetAllPremiumOdds","odds_get_bookmaker":"oddsGetBookmakerById","odds_get_bookmaker_event_ids_by_fixture":"oddsGetBookmakerEventIdsByFixture","odds_get_bookmakers":"oddsGetBookmakers","odds_get_bookmakers_by_fixture":"oddsGetBookmakersByFixture","odds_get_inplay_odds_by_fixture":"oddsGetInPlayOddsByFixture","odds_get_inplay_odds_by_fixture_and_bookmaker":"oddsGetInPlayOddsByFixtureAndBookmaker","odds_get_inplay_odds_by_fixture_and_market":"oddsGetInPlayOddsByFixtureAndMarket","odds_get_last_updated_inplay_odds":"oddsGetLastUpdatedInPlayOdds","odds_get_last_updated_pre_match_odds":"oddsGetLastUpdatedPreMatchOdds","odds_get_market":"oddsGetMarketById","odds_get_markets":"oddsGetMarkets","odds_get_pre_match_odds_by_fixture":"oddsGetPreMatchOddsByFixture","odds_get_pre_match_odds_by_fixture_and_bookmaker":"oddsGetPreMatchOddsByFixtureAndBookmaker","odds_get_pre_match_odds_by_fixture_and_market":"oddsGetPreMatchOddsByFixtureAndMarket","odds_get_premium_odds_by_fixture":"oddsGetPremiumOddsByFixture","odds_get_premium_odds_by_fixture_and_bookmaker":"oddsGetPremiumOddsByFixtureAndBookmaker","odds_get_premium_odds_by_fixture_and_market":"oddsGetPremiumOddsByFixtureAndMarket","odds_get_updated_historical_odds_between":"oddsGetUpdatedHistoricalOddsBetweenTimeRange","odds_get_updated_premium_odds_between":"oddsGetUpdatedPremiumOddsBetweenTimeRange","odds_search_bookmakers":"oddsSearchBookmakers","odds_search_markets":"oddsSearchMarkets"}},"sportmonks_v2":{"namespace":"sportmonks","methods":{"core_get_cities":"coreGetCities","core_get_city":"coreGetCityById","core_get_continent":"coreGetContinentById","core_get_continents":"coreGetContinents","core_get_countries":"coreGetCountries","core_get_country":"coreGetCountryById","core_get_entity_filters":"coreGetAllEntityFilters","core_get_my_usage":"coreGetMyUsage","core_get_region":"coreGetRegionById","core_get_regions":"coreGetRegions","core_get_timezones":"coreGetTimezones","core_get_type":"coreGetTypeById","core_get_type_by_entity":"coreGetTypeByEntity","core_get_types":"coreGetTypes","core_search_cities":"coreSearchCities","core_search_countries":"coreSearchCountries","core_search_regions":"coreSearchRegions","football_expected_by_player":"footballGetExpectedXGByPlayer","football_expected_by_team":"footballGetExpectedXGByTeam","football_get_all_commentaries":"footballGetAllCommentaries","football_get_all_fixtures":"footballGetAllFixtures","football_get_all_players":"footballGetAllPlayers","football_get_all_rivals":"footballGetAllRivals","football_get_all_teams":"footballGetAllTeams","football_get_all_transfer_rumours":"footballGetAllTransferRumours","football_get_all_transfers":"footballGetAllTransfers","football_get_brackets_by_season":"footballGetBracketsBySeason","football_get_coach":"footballGetCoachById","football_get_coaches":"footballGetCoaches","football_get_coaches_by_country":"footballGetCoachesByCountry","football_get_commentaries_by_fixture":"footballGetCommentariesByFixture","football_get_current_leagues_by_team":"footballGetCurrentLeaguesByTeam","football_get_expected_lineups_by_player":"footballGetExpectedLineupsByPlayer","football_get_expected_lineups_by_team":"footballGetExpectedLineupsByTeam","football_get_extended_team_squad":"footballGetExtendedTeamSquad","football_get_fixture":"footballGetFixtureById","football_get_fixtures_by_date":"footballGetFixturesByDate","football_get_fixtures_by_date_range":"footballGetFixturesByDateRange","football_get_fixtures_by_date_range_for_team":"footballGetFixturesByDateRangeForTeam","football_get_fixtures_by_ids":"footballGetFixturesByMultipleIds","football_get_grouped_standings_by_round":"footballGetGroupedStandingsByRound","football_get_head_to_head":"footballGetHeadToHead","football_get_inplay_livescores":"footballGetInplayLivescores","football_get_latest_coaches":"footballGetLastUpdatedCoaches","football_get_latest_fixtures":"footballGetLatestUpdatedFixtures","football_get_latest_livescores":"footballGetLatestUpdatedLivescores","football_get_latest_players":"footballGetLastUpdatedPlayers","football_get_latest_totw":"footballGetLatestTeamOfTheWeek","football_get_latest_transfers":"footballGetLatestTransfers","football_get_league":"footballGetLeagueById","football_get_leagues":"footballGetLeagues","football_get_leagues_by_country":"footballGetLeaguesByCountry","football_get_leagues_by_date":"footballGetLeaguesByDate","football_get_leagues_by_team":"footballGetLeaguesByTeam","football_get_live_leagues":"footballGetLiveLeagues","football_get_live_probabilities":"footballGetLiveProbabilities","football_get_live_probabilities_by_fixture":"footballGetLiveProbabilitiesByFixture","football_get_live_standings_by_league":"footballGetLiveStandingsByLeague","football_get_livescores":"footballGetLivescores","football_get_match_facts":"footballGetAllMatchFacts","football_get_match_facts_by_date_range":"footballGetMatchFactsByDateRange","football_get_match_facts_by_fixture":"footballGetMatchFactsByFixture","football_get_match_facts_by_league":"footballGetMatchFactsByLeague","football_get_past_fixtures_by_tv_station":"footballGetPastFixturesByTvStation","football_get_player":"footballGetPlayerById","football_get_players_by_country":"footballGetPlayersByCountry","football_get_postmatch_news":"footballGetPostMatchNews","football_get_postmatch_news_by_season":"footballGetPostMatchNewsBySeason","football_get_predictability_by_league":"footballGetPredictabilityByLeague","football_get_prematch_news":"footballGetPreMatchNews","football_get_prematch_news_by_season":"footballGetPreMatchNewsBySeason","football_get_prematch_news_upcoming":"footballGetPreMatchNewsForUpcomingFixtures","football_get_probabilities":"footballGetProbabilities","football_get_probabilities_by_fixture":"footballGetPredictionsByFixture","football_get_referee":"footballGetRefereeById","football_get_referees":"footballGetReferees","football_get_referees_by_country":"footballGetRefereesByCountry","football_get_referees_by_season":"footballGetRefereesBySeason","football_get_rivals_by_team":"footballGetRivalsByTeam","football_get_round":"footballGetRoundById","football_get_round_statistics":"footballGetRoundStatistics","football_get_rounds":"footballGetRounds","football_get_rounds_by_season":"footballGetRoundsBySeason","football_get_schedules_by_season":"footballGetSchedulesBySeason","football_get_schedules_by_season_and_team":"footballGetSchedulesBySeasonAndTeam","football_get_schedules_by_team":"footballGetSchedulesByTeam","football_get_season":"footballGetSeasonById","football_get_seasons":"footballGetSeasons","football_get_seasons_by_team":"footballGetSeasonsByTeam","football_get_stage":"footballGetStageById","football_get_stage_statistics":"footballGetStageStatistics","football_get_stages":"footballGetStages","football_get_stages_by_season":"footballGetStagesBySeason","football_get_standing_corrections_by_season":"footballGetStandingCorrectionsBySeason","football_get_standings":"footballGetAllStandings","football_get_standings_by_round":"footballGetStandingsByRound","football_get_standings_by_season":"footballGetStandingsBySeason","football_get_state":"footballGetStateById","football_get_states":"footballGetStates","football_get_team":"footballGetTeamById","football_get_team_rankings":"footballGetAllTeamRankings","football_get_team_rankings_by_date":"footballGetTeamRankingsByDate","football_get_team_rankings_by_team":"footballGetTeamRankingsByTeam","football_get_team_squad":"footballGetTeamSquad","football_get_team_squad_by_season":"footballGetTeamSquadBySeason","football_get_teams_by_country":"footballGetTeamsByCountry","football_get_teams_by_season":"footballGetTeamsBySeason","football_get_topscorers_by_season":"footballGetTopscorersBySeason","football_get_topscorers_by_stage":"footballGetTopscorersByStage","football_get_totw":"footballGetAllTeamOfTheWeek","football_get_totw_by_round":"footballGetTeamOfTheWeekByRound","football_get_transfer":"footballGetTransferById","football_get_transfer_rumour":"footballGetTransferRumourById","football_get_transfer_rumours_between_dates":"footballGetTransferRumoursBetweenDates","football_get_transfer_rumours_by_player":"footballGetTransferRumoursByPlayer","football_get_transfer_rumours_by_team":"footballGetTransferRumoursByTeam","football_get_transfers_between_dates":"footballGetTransfersBetweenDates","football_get_transfers_by_player":"footballGetTransfersByPlayer","football_get_transfers_by_team":"footballGetTransfersByTeam","football_get_tv_station":"footballGetTvStationById","football_get_tv_stations":"footballGetTvStations","football_get_tv_stations_by_fixture":"footballGetTvStationsByFixture","football_get_upcoming_fixtures_by_market":"footballGetUpcomingFixturesByMarket","football_get_upcoming_fixtures_by_tv_station":"footballGetUpcomingFixturesByTvStation","football_get_value_bets":"footballGetValueBets","football_get_value_bets_by_fixture":"footballGetValueBetsByFixture","football_get_venue":"footballGetVenueById","football_get_venues":"footballGetVenues","football_get_venues_by_season":"footballGetVenuesBySeason","football_search_coaches":"footballSearchCoaches","football_search_fixtures":"footballSearchFixtures","football_search_leagues":"footballSearchLeagues","football_search_players":"footballSearchPlayers","football_search_referees":"footballSearchReferees","football_search_rounds":"footballSearchRounds","football_search_seasons":"footballSearchSeasons","football_search_stages":"footballSearchStages","football_search_teams":"footballSearchTeams","football_search_venues":"footballSearchVenues","motorsport_get_all_fixtures":"motorsportGetAllFixtures","motorsport_get_current_leagues_by_team":"motorsportGetCurrentLeaguesByTeam","motorsport_get_driver":"motorsportGetDriverById","motorsport_get_driver_standings":"motorsportGetAllDriverStandings","motorsport_get_driver_standings_by_season":"motorsportGetDriverStandingsBySeason","motorsport_get_drivers":"motorsportGetDrivers","motorsport_get_drivers_by_country":"motorsportGetDriversByCountry","motorsport_get_drivers_by_season":"motorsportGetDriversBySeason","motorsport_get_fixture":"motorsportGetFixtureById","motorsport_get_fixtures_by_date":"motorsportGetFixturesByDate","motorsport_get_fixtures_by_date_range":"motorsportGetFixturesByDateRange","motorsport_get_fixtures_by_ids":"motorsportGetFixturesByIds","motorsport_get_laps_by_fixture":"motorsportGetLapsByFixture","motorsport_get_laps_by_fixture_and_driver":"motorsportGetLapsByFixtureAndDriver","motorsport_get_laps_by_fixture_and_lap":"motorsportGetLapsByFixtureAndLapNumber","motorsport_get_latest_laps_by_fixture":"motorsportGetLatestLapsByFixture","motorsport_get_latest_pitstops_by_fixture":"motorsportGetLatestPitstopsByFixture","motorsport_get_latest_stints_by_fixture":"motorsportGetLatestStintsByFixture","motorsport_get_latest_updated_drivers":"motorsportGetLatestUpdatedDrivers","motorsport_get_latest_updated_fixtures":"motorsportGetLatestUpdatedFixtures","motorsport_get_league":"motorsportGetLeagueById","motorsport_get_leagues":"motorsportGetAllLeagues","motorsport_get_leagues_by_country":"motorsportGetLeaguesByCountry","motorsport_get_leagues_by_date":"motorsportGetLeaguesByFixtureDate","motorsport_get_leagues_by_live":"motorsportGetLeaguesByLive","motorsport_get_leagues_by_team":"motorsportGetLeaguesByTeam","motorsport_get_livescores":"motorsportGetLivescores","motorsport_get_pitstops_by_fixture":"motorsportGetPitstopsByFixture","motorsport_get_pitstops_by_fixture_and_driver":"motorsportGetPitstopsByFixtureAndDriver","motorsport_get_pitstops_by_fixture_and_lap":"motorsportGetPitstopsByFixtureAndLapNumber","motorsport_get_race_results_by_season_and_driver":"motorsportGetRaceResultsBySeasonAndDriver","motorsport_get_race_results_by_season_and_team":"motorsportGetRaceResultsBySeasonAndTeam","motorsport_get_schedules_by_season":"motorsportGetSchedulesBySeason","motorsport_get_season":"motorsportGetSeasonById","motorsport_get_seasons":"motorsportGetAllSeasons","motorsport_get_stage":"motorsportGetStageById","motorsport_get_stages":"motorsportGetAllStages","motorsport_get_stages_by_season":"motorsportGetStagesBySeason","motorsport_get_state":"motorsportGetStateById","motorsport_get_states":"motorsportGetAllStates","motorsport_get_stints_by_fixture":"motorsportGetStintsByFixture","motorsport_get_stints_by_fixture_and_driver":"motorsportGetStintsByFixtureAndDriver","motorsport_get_stints_by_fixture_and_stint":"motorsportGetStintsByFixtureAndStintNumber","motorsport_get_team":"motorsportGetTeamById","motorsport_get_team_standings":"motorsportGetAllTeamStandings","motorsport_get_team_standings_by_season":"motorsportGetTeamStandingsBySeason","motorsport_get_teams":"motorsportGetTeams","motorsport_get_teams_by_country":"motorsportGetTeamsByCountry","motorsport_get_teams_by_season":"motorsportGetTeamsBySeason","motorsport_get_venue":"motorsportGetVenueById","motorsport_get_venues":"motorsportGetVenues","motorsport_get_venues_by_season":"motorsportGetVenuesBySeason","motorsport_search_drivers":"motorsportSearchDrivers","motorsport_search_leagues":"motorsportSearchLeagues","motorsport_search_stages":"motorsportSearchStages","motorsport_search_teams":"motorsportSearchTeams","motorsport_search_venues":"motorsportSearchVenues","odds_get_all_historical_odds":"oddsGetAllHistoricalOdds","odds_get_all_inplay_odds":"oddsGetAllInPlayOdds","odds_get_all_pre_match_odds":"oddsGetAllPreMatchOdds","odds_get_all_premium_odds":"oddsGetAllPremiumOdds","odds_get_bookmaker":"oddsGetBookmakerById","odds_get_bookmaker_event_ids_by_fixture":"oddsGetBookmakerEventIdsByFixture","odds_get_bookmakers":"oddsGetBookmakers","odds_get_bookmakers_by_fixture":"oddsGetBookmakersByFixture","odds_get_inplay_odds_by_fixture":"oddsGetInPlayOddsByFixture","odds_get_inplay_odds_by_fixture_and_bookmaker":"oddsGetInPlayOddsByFixtureAndBookmaker","odds_get_inplay_odds_by_fixture_and_market":"oddsGetInPlayOddsByFixtureAndMarket","odds_get_last_updated_inplay_odds":"oddsGetLastUpdatedInPlayOdds","odds_get_last_updated_pre_match_odds":"oddsGetLastUpdatedPreMatchOdds","odds_get_market":"oddsGetMarketById","odds_get_markets":"oddsGetMarkets","odds_get_pre_match_odds_by_fixture":"oddsGetPreMatchOddsByFixture","odds_get_pre_match_odds_by_fixture_and_bookmaker":"oddsGetPreMatchOddsByFixtureAndBookmaker","odds_get_pre_match_odds_by_fixture_and_market":"oddsGetPreMatchOddsByFixtureAndMarket","odds_get_premium_odds_by_fixture":"oddsGetPremiumOddsByFixture","odds_get_premium_odds_by_fixture_and_bookmaker":"oddsGetPremiumOddsByFixtureAndBookmaker","odds_get_premium_odds_by_fixture_and_market":"oddsGetPremiumOddsByFixtureAndMarket","odds_get_updated_historical_odds_between":"oddsGetUpdatedHistoricalOddsBetweenTimeRange","odds_get_updated_premium_odds_between":"oddsGetUpdatedPremiumOddsBetweenTimeRange","odds_search_bookmakers":"oddsSearchBookmakers","odds_search_markets":"oddsSearchMarkets"},"params":{"action":{"oauthCredential":"credential"}}},"spotify":{"namespace":"legacy.spotify","methods":{"spotify_add_playlist_cover":"addPlaylistCover","spotify_add_to_queue":"addToQueue","spotify_add_tracks_to_playlist":"addTracksToPlaylist","spotify_check_following":"checkFollowing","spotify_check_playlist_followers":"checkPlaylistFollowers","spotify_check_saved_albums":"checkSavedAlbums","spotify_check_saved_audiobooks":"checkSavedAudiobooks","spotify_check_saved_episodes":"checkSavedEpisodes","spotify_check_saved_shows":"checkSavedShows","spotify_check_saved_tracks":"checkSavedTracks","spotify_create_playlist":"createPlaylist","spotify_follow_artists":"followArtists","spotify_follow_playlist":"followPlaylist","spotify_get_album":"getAlbum","spotify_get_album_tracks":"getAlbumTracks","spotify_get_albums":"getMultipleAlbums","spotify_get_artist":"getArtist","spotify_get_artist_albums":"getArtistAlbums","spotify_get_artist_top_tracks":"getArtistTopTracks","spotify_get_artists":"getMultipleArtists","spotify_get_audiobook":"getAudiobook","spotify_get_audiobook_chapters":"getAudiobookChapters","spotify_get_audiobooks":"getMultipleAudiobooks","spotify_get_categories":"getCategories","spotify_get_current_user":"getMyProfile","spotify_get_currently_playing":"getCurrentlyPlaying","spotify_get_devices":"getDevices","spotify_get_episode":"getEpisode","spotify_get_episodes":"getMultipleEpisodes","spotify_get_followed_artists":"getFollowedArtists","spotify_get_markets":"getAvailableMarkets","spotify_get_new_releases":"getNewReleases","spotify_get_playback_state":"getPlaybackState","spotify_get_playlist":"getPlaylist","spotify_get_playlist_cover":"getPlaylistCover","spotify_get_playlist_tracks":"getPlaylistTracks","spotify_get_queue":"getQueue","spotify_get_recently_played":"getRecentlyPlayed","spotify_get_saved_albums":"getSavedAlbums","spotify_get_saved_audiobooks":"getSavedAudiobooks","spotify_get_saved_episodes":"getSavedEpisodes","spotify_get_saved_shows":"getSavedShows","spotify_get_saved_tracks":"getSavedTracks","spotify_get_show":"getShow","spotify_get_show_episodes":"getShowEpisodes","spotify_get_shows":"getMultipleShows","spotify_get_top_artists":"getMyTopArtists","spotify_get_top_tracks":"getMyTopTracks","spotify_get_track":"getTrack","spotify_get_tracks":"getMultipleTracks","spotify_get_user_playlists":"getMyPlaylists","spotify_get_user_profile":"getUserProfile","spotify_pause":"pause","spotify_play":"play","spotify_remove_saved_albums":"removeSavedAlbums","spotify_remove_saved_audiobooks":"removeSavedAudiobooks","spotify_remove_saved_episodes":"removeSavedEpisodes","spotify_remove_saved_shows":"removeSavedShows","spotify_remove_saved_tracks":"removeSavedTracks","spotify_remove_tracks_from_playlist":"removeTracksFromPlaylist","spotify_reorder_playlist_items":"reorderPlaylistItems","spotify_replace_playlist_items":"replacePlaylistItems","spotify_save_albums":"saveAlbums","spotify_save_audiobooks":"saveAudiobooks","spotify_save_episodes":"saveEpisodes","spotify_save_shows":"saveShows","spotify_save_tracks":"saveTracks","spotify_search":"search","spotify_seek":"seek","spotify_set_repeat":"setRepeat","spotify_set_shuffle":"setShuffle","spotify_set_volume":"setVolume","spotify_skip_next":"skipToNext","spotify_skip_previous":"skipToPrevious","spotify_transfer_playback":"transferPlayback","spotify_unfollow_artists":"unfollowArtists","spotify_unfollow_playlist":"unfollowPlaylist","spotify_update_playlist":"updatePlaylist"},"params":{"action":{"oauthCredential":"credential"}}},"sqs":{"namespace":"legacy.sqs","methods":{"cancel_message_move_task":"cancelMessageMoveTask","change_message_visibility":"changeMessageVisibility","change_message_visibility_batch":"changeMessageVisibilityBatch","create_queue":"createQueue","delete_message":"deleteMessage","delete_message_batch":"deleteMessageBatch","delete_queue":"deleteQueue","get_queue_attributes":"getQueueAttributes","get_queue_url":"getQueueUrl","list_dead_letter_source_queues":"listDeadLetterSourceQueues","list_message_move_tasks":"listMessageMoveTasks","list_queue_tags":"listQueueTags","list_queues":"listQueues","purge_queue":"purgeQueue","receive_message":"receiveMessage","send":"sendMessage","send_message_batch":"sendMessageBatch","set_queue_attributes":"setQueueAttributes","start_message_move_task":"startMessageMoveTask","tag_queue":"tagQueue","untag_queue":"untagQueue"}},"sqs_v2":{"namespace":"sqs","methods":{"cancel_message_move_task":"cancelMessageMoveTask","change_message_visibility":"changeMessageVisibility","change_message_visibility_batch":"changeMessageVisibilityBatch","create_queue":"createQueue","delete_message":"deleteMessage","delete_message_batch":"deleteMessageBatch","delete_queue":"deleteQueue","get_queue_attributes":"getQueueAttributes","get_queue_url":"getQueueUrl","list_dead_letter_source_queues":"listDeadLetterSourceQueues","list_message_move_tasks":"listMessageMoveTasks","list_queue_tags":"listQueueTags","list_queues":"listQueues","purge_queue":"purgeQueue","receive_message":"receiveMessage","send":"sendMessage","send_message_batch":"sendMessageBatch","set_queue_attributes":"setQueueAttributes","start_message_move_task":"startMessageMoveTask","tag_queue":"tagQueue","untag_queue":"untagQueue"},"params":{"action":{"oauthCredential":"credential"}}},"square":{"namespace":"legacy.square","methods":{"batch_retrieve_inventory_counts":"batchRetrieveInventoryCounts","cancel_invoice":"cancelInvoice","cancel_payment":"cancelPayment","complete_payment":"completePayment","create_catalog_image":"createCatalogImage","create_customer":"createCustomer","create_invoice":"createInvoice","create_order":"createOrder","create_payment":"createPayment","delete_catalog_object":"deleteCatalogObject","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","get_catalog_object":"getCatalogObject","get_customer":"getCustomer","get_invoice":"getInvoice","get_location":"getLocation","get_order":"getOrder","get_payment":"getPayment","get_refund":"getRefund","list_catalog":"listCatalog","list_customers":"listCustomers","list_invoices":"listInvoices","list_locations":"listLocations","list_payments":"listPayments","list_refunds":"listRefunds","pay_order":"payOrder","publish_invoice":"publishInvoice","refund_payment":"refundPayment","search_catalog_objects":"searchCatalogObjects","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_orders":"searchOrders","update_customer":"updateCustomer","upsert_catalog_object":"upsertCatalogObject"}},"square_v2":{"namespace":"square","methods":{"batch_retrieve_inventory_counts":"batchRetrieveInventoryCounts","cancel_invoice":"cancelInvoice","cancel_payment":"cancelPayment","complete_payment":"completePayment","create_catalog_image":"createCatalogImage","create_customer":"createCustomer","create_invoice":"createInvoice","create_order":"createOrder","create_payment":"createPayment","delete_catalog_object":"deleteCatalogObject","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","get_catalog_object":"getCatalogObject","get_customer":"getCustomer","get_invoice":"getInvoice","get_location":"getLocation","get_order":"getOrder","get_payment":"getPayment","get_refund":"getRefund","list_catalog":"listCatalog","list_customers":"listCustomers","list_invoices":"listInvoices","list_locations":"listLocations","list_payments":"listPayments","list_refunds":"listRefunds","pay_order":"payOrder","publish_invoice":"publishInvoice","refund_payment":"refundPayment","search_catalog_objects":"searchCatalogObjects","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_orders":"searchOrders","update_customer":"updateCustomer","upsert_catalog_object":"upsertCatalogObject"},"params":{"action":{"oauthCredential":"credential"}}},"ssh":{"namespace":"legacy.ssh","methods":{"ssh_check_command_exists":"checkCommandExists","ssh_check_file_exists":"checkFileDirectoryExists","ssh_create_directory":"createDirectory","ssh_delete_file":"deleteFileDirectory","ssh_download_file":"downloadFile","ssh_execute_command":"executeCommand","ssh_execute_script":"executeScript","ssh_get_system_info":"getSystemInfo","ssh_list_directory":"listDirectory","ssh_move_rename":"moveRename","ssh_read_file_content":"readFileContent","ssh_upload_file":"uploadFile","ssh_write_file_content":"writeFileContent"}},"ssh_v2":{"namespace":"ssh","methods":{"ssh_check_command_exists":"checkCommandExists","ssh_check_file_exists":"checkFileDirectoryExists","ssh_create_directory":"createDirectory","ssh_delete_file":"deleteFileDirectory","ssh_download_file":"downloadFile","ssh_execute_command":"executeCommand","ssh_execute_script":"executeScript","ssh_get_system_info":"getSystemInfo","ssh_list_directory":"listDirectory","ssh_move_rename":"moveRename","ssh_read_file_content":"readFileContent","ssh_upload_file":"uploadFile","ssh_write_file_content":"writeFileContent"}},"ssm":{"namespace":"legacy.ssm","methods":{"cancel_command":"cancelCommand","delete_parameter":"deleteParameter","describe_automation_executions":"describeAutomationExecutions","describe_instance_information":"describeInstanceInformation","describe_instance_patch_states":"describeInstancePatchStates","describe_instance_patches":"describeInstancePatches","describe_parameters":"describeParameters","get_automation_execution":"getAutomationExecution","get_command_invocation":"getCommandInvocation","get_document":"getDocument","get_parameter":"getParameter","get_parameters":"getParameters","get_parameters_by_path":"getParametersByPath","list_command_invocations":"listCommandInvocations","list_commands":"listCommands","list_compliance_items":"listComplianceItems","list_compliance_summaries":"listComplianceSummaries","list_documents":"listDocuments","put_parameter":"putParameter","send_command":"sendCommand","start_automation_execution":"startAutomationExecution","stop_automation_execution":"stopAutomationExecution"}},"ssm_v2":{"namespace":"ssm","methods":{"cancel_command":"cancelCommand","delete_parameter":"deleteParameter","describe_automation_executions":"describeAutomationExecutions","describe_instance_information":"describeInstanceInformation","describe_instance_patch_states":"describeInstancePatchStates","describe_instance_patches":"describeInstancePatches","describe_parameters":"describeParameters","get_automation_execution":"getAutomationExecution","get_command_invocation":"getCommandInvocation","get_document":"getDocument","get_parameter":"getParameter","get_parameters":"getParameters","get_parameters_by_path":"getParametersByPath","list_command_invocations":"listCommandInvocations","list_commands":"listCommands","list_compliance_items":"listComplianceItems","list_compliance_summaries":"listComplianceSummaries","list_documents":"listDocuments","put_parameter":"putParameter","send_command":"sendCommand","start_automation_execution":"startAutomationExecution","stop_automation_execution":"stopAutomationExecution"},"params":{"action":{"oauthCredential":"credential"}}},"stagehand":{"namespace":"stagehand","methods":{"agent":"runAgent","extract":"extractData"}},"start_trigger":{"namespace":"startTrigger"},"starter":{"namespace":"legacy.starter"},"stripe":{"namespace":"legacy.stripe","methods":{"cancel_payment_intent":"cancelPaymentIntent","cancel_subscription":"cancelSubscription","capture_charge":"captureCharge","capture_payment_intent":"capturePaymentIntent","confirm_payment_intent":"confirmPaymentIntent","create_charge":"createCharge","create_customer":"createCustomer","create_invoice":"createInvoice","create_payment_intent":"createPaymentIntent","create_price":"createPrice","create_product":"createProduct","create_subscription":"createSubscription","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","delete_product":"deleteProduct","finalize_invoice":"finalizeInvoice","list_charges":"listCharges","list_customers":"listCustomers","list_events":"listEvents","list_invoices":"listInvoices","list_payment_intents":"listPaymentIntents","list_prices":"listPrices","list_products":"listProducts","list_subscriptions":"listSubscriptions","pay_invoice":"payInvoice","resume_subscription":"resumeSubscription","retrieve_charge":"retrieveCharge","retrieve_customer":"retrieveCustomer","retrieve_event":"retrieveEvent","retrieve_invoice":"retrieveInvoice","retrieve_payment_intent":"retrievePaymentIntent","retrieve_price":"retrievePrice","retrieve_product":"retrieveProduct","retrieve_subscription":"retrieveSubscription","search_charges":"searchCharges","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_payment_intents":"searchPaymentIntents","search_prices":"searchPrices","search_products":"searchProducts","search_subscriptions":"searchSubscriptions","send_invoice":"sendInvoice","update_charge":"updateCharge","update_customer":"updateCustomer","update_invoice":"updateInvoice","update_payment_intent":"updatePaymentIntent","update_price":"updatePrice","update_product":"updateProduct","update_subscription":"updateSubscription","void_invoice":"voidInvoice"},"triggers":{"stripe_webhook":"webhook"}},"stripe_v2":{"namespace":"stripe","methods":{"cancel_payment_intent":"cancelPaymentIntent","cancel_subscription":"cancelSubscription","capture_charge":"captureCharge","capture_payment_intent":"capturePaymentIntent","confirm_payment_intent":"confirmPaymentIntent","create_charge":"createCharge","create_customer":"createCustomer","create_invoice":"createInvoice","create_payment_intent":"createPaymentIntent","create_price":"createPrice","create_product":"createProduct","create_subscription":"createSubscription","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","delete_product":"deleteProduct","finalize_invoice":"finalizeInvoice","list_charges":"listCharges","list_customers":"listCustomers","list_events":"listEvents","list_invoices":"listInvoices","list_payment_intents":"listPaymentIntents","list_prices":"listPrices","list_products":"listProducts","list_subscriptions":"listSubscriptions","pay_invoice":"payInvoice","resume_subscription":"resumeSubscription","retrieve_charge":"retrieveCharge","retrieve_customer":"retrieveCustomer","retrieve_event":"retrieveEvent","retrieve_invoice":"retrieveInvoice","retrieve_payment_intent":"retrievePaymentIntent","retrieve_price":"retrievePrice","retrieve_product":"retrieveProduct","retrieve_subscription":"retrieveSubscription","search_charges":"searchCharges","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_payment_intents":"searchPaymentIntents","search_prices":"searchPrices","search_products":"searchProducts","search_subscriptions":"searchSubscriptions","send_invoice":"sendInvoice","update_charge":"updateCharge","update_customer":"updateCustomer","update_invoice":"updateInvoice","update_payment_intent":"updatePaymentIntent","update_price":"updatePrice","update_product":"updateProduct","update_subscription":"updateSubscription","void_invoice":"voidInvoice"},"triggers":{"stripe_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"sts":{"namespace":"legacy.sts","methods":{"assume_role":"assumeRole","assume_role_with_saml":"assumeRoleWithSaml","assume_role_with_web_identity":"assumeRoleWithWebIdentity","get_access_key_info":"getAccessKeyInfo","get_caller_identity":"getCallerIdentity","get_session_token":"getSessionToken"}},"sts_v2":{"namespace":"sts","methods":{"assume_role":"assumeRole","assume_role_with_saml":"assumeRoleWithSaml","assume_role_with_web_identity":"assumeRoleWithWebIdentity","get_access_key_info":"getAccessKeyInfo","get_caller_identity":"getCallerIdentity","get_session_token":"getSessionToken"},"params":{"action":{"oauthCredential":"credential"}}},"stt":{"namespace":"legacy.stt"},"stt_v2":{"namespace":"stt"},"supabase":{"namespace":"legacy.supabase","methods":{"count":"countRows","delete":"deleteARow","get_row":"getARow","insert":"createARow","introspect":"introspectSchema","invoke_function":"invokeEdgeFunction","query":"getManyRows","rpc":"callRpcFunction","storage_copy":"storageCopyFile","storage_create_bucket":"storageCreateBucket","storage_create_signed_upload_url":"storageCreateSignedUploadUrl","storage_create_signed_url":"storageCreateSignedUrl","storage_delete":"storageDeleteFiles","storage_delete_bucket":"storageDeleteBucket","storage_download":"storageDownloadFile","storage_empty_bucket":"storageEmptyBucket","storage_get_public_url":"storageGetPublicUrl","storage_list":"storageListFiles","storage_list_buckets":"storageListBuckets","storage_move":"storageMoveFile","storage_update_bucket":"storageUpdateBucket","storage_upload":"storageUploadFile","text_search":"fullTextSearch","update":"updateARow","upsert":"upsertARow","vector_search":"vectorSearch"}},"supabase_v2":{"namespace":"supabase","methods":{"count":"countRows","delete":"deleteARow","get_row":"getARow","insert":"createARow","introspect":"introspectSchema","invoke_function":"invokeEdgeFunction","query":"getManyRows","rpc":"callRpcFunction","storage_copy":"storageCopyFile","storage_create_bucket":"storageCreateBucket","storage_create_signed_upload_url":"storageCreateSignedUploadUrl","storage_create_signed_url":"storageCreateSignedUrl","storage_delete":"storageDeleteFiles","storage_delete_bucket":"storageDeleteBucket","storage_download":"storageDownloadFile","storage_empty_bucket":"storageEmptyBucket","storage_get_public_url":"storageGetPublicUrl","storage_list":"storageListFiles","storage_list_buckets":"storageListBuckets","storage_move":"storageMoveFile","storage_update_bucket":"storageUpdateBucket","storage_upload":"storageUploadFile","text_search":"fullTextSearch","update":"updateARow","upsert":"upsertARow","vector_search":"vectorSearch"},"params":{"action":{"oauthCredential":"credential"}}},"table":{"namespace":"legacy.table","methods":{"batch_insert_rows":"batchInsertRows","delete_row":"deleteRowById","delete_rows_by_filter":"deleteRowsByFilter","get_row":"getRowById","get_schema":"getSchema","insert_row":"insertRow","query_rows":"queryRows","update_row":"updateRowById","update_rows_by_filter":"updateRowsByFilter","upsert_row":"upsertRow"},"triggers":{"table_new_row":"newRow"}},"table_v2":{"namespace":"table","methods":{"batch_insert_rows":"batchInsertRows","delete_row":"deleteRowById","delete_rows_by_filter":"deleteRowsByFilter","get_row":"getRowById","get_schema":"getSchema","insert_row":"insertRow","query_rows":"queryRows","update_row":"updateRowById","update_rows_by_filter":"updateRowsByFilter","upsert_row":"upsertRow"},"triggers":{"table_new_row":"newRow"}},"tailscale":{"namespace":"legacy.tailscale","methods":{"approve_user":"approveUser","authorize_device":"authorizeDevice","create_auth_key":"createAuthKey","delete_auth_key":"deleteAuthKey","delete_device":"deleteDevice","delete_device_attribute":"deleteDeviceAttribute","delete_user":"deleteUser","expire_device_key":"expireDeviceKey","get_acl":"getAcl","get_auth_key":"getAuthKey","get_device":"getDevice","get_device_attributes":"getDeviceAttributes","get_device_routes":"getDeviceRoutes","get_dns_configuration":"getDnsConfiguration","get_dns_preferences":"getDnsPreferences","get_dns_searchpaths":"getDnsSearchPaths","get_split_dns":"getSplitDns","get_tailnet_settings":"getTailnetSettings","get_user":"getUser","list_auth_keys":"listKeys","list_devices":"listDevices","list_dns_nameservers":"listDnsNameservers","list_users":"listUsers","restore_user":"restoreUser","set_acl":"setAcl","set_device_attribute":"setDeviceAttribute","set_device_name":"setDeviceName","set_device_routes":"setDeviceRoutes","set_device_tags":"setDeviceTags","set_dns_configuration":"setDnsConfiguration","set_dns_nameservers":"setDnsNameservers","set_dns_preferences":"setDnsPreferences","set_dns_searchpaths":"setDnsSearchPaths","set_split_dns":"setSplitDns","set_user_role":"setUserRole","suspend_user":"suspendUser","update_device_key":"updateDeviceKey","update_split_dns":"updateSplitDns","update_tailnet_settings":"updateTailnetSettings","validate_acl":"validateAcl"}},"tailscale_v2":{"namespace":"tailscale","methods":{"approve_user":"approveUser","authorize_device":"authorizeDevice","create_auth_key":"createAuthKey","delete_auth_key":"deleteAuthKey","delete_device":"deleteDevice","delete_device_attribute":"deleteDeviceAttribute","delete_user":"deleteUser","expire_device_key":"expireDeviceKey","get_acl":"getAcl","get_auth_key":"getAuthKey","get_device":"getDevice","get_device_attributes":"getDeviceAttributes","get_device_routes":"getDeviceRoutes","get_dns_configuration":"getDnsConfiguration","get_dns_preferences":"getDnsPreferences","get_dns_searchpaths":"getDnsSearchPaths","get_split_dns":"getSplitDns","get_tailnet_settings":"getTailnetSettings","get_user":"getUser","list_auth_keys":"listKeys","list_devices":"listDevices","list_dns_nameservers":"listDnsNameservers","list_users":"listUsers","restore_user":"restoreUser","set_acl":"setAcl","set_device_attribute":"setDeviceAttribute","set_device_name":"setDeviceName","set_device_routes":"setDeviceRoutes","set_device_tags":"setDeviceTags","set_dns_configuration":"setDnsConfiguration","set_dns_nameservers":"setDnsNameservers","set_dns_preferences":"setDnsPreferences","set_dns_searchpaths":"setDnsSearchPaths","set_split_dns":"setSplitDns","set_user_role":"setUserRole","suspend_user":"suspendUser","update_device_key":"updateDeviceKey","update_split_dns":"updateSplitDns","update_tailnet_settings":"updateTailnetSettings","validate_acl":"validateAcl"},"params":{"action":{"oauthCredential":"credential"}}},"tavily":{"namespace":"legacy.tavily","methods":{"tavily_crawl":"crawlWebsite","tavily_extract":"extractContent","tavily_map":"mapWebsite","tavily_search":"search"}},"tavily_v2":{"namespace":"tavily","methods":{"tavily_crawl":"crawlWebsite","tavily_extract":"extractContent","tavily_map":"mapWebsite","tavily_search":"search"},"params":{"action":{"oauthCredential":"credential"}}},"telegram":{"namespace":"legacy.telegram","methods":{"telegram_copy_message":"copyMessage","telegram_delete_message":"deleteMessage","telegram_edit_message_text":"editMessageText","telegram_forward_message":"forwardMessage","telegram_get_chat":"getChat","telegram_get_chat_member":"getChatMember","telegram_message":"sendMessage","telegram_pin_message":"pinMessage","telegram_send_animation":"sendAnimation","telegram_send_audio":"sendAudio","telegram_send_chat_action":"sendChatAction","telegram_send_contact":"sendContact","telegram_send_document":"sendDocument","telegram_send_location":"sendLocation","telegram_send_photo":"sendPhoto","telegram_send_poll":"sendPoll","telegram_send_video":"sendVideo","telegram_set_message_reaction":"setMessageReaction","telegram_unpin_message":"unpinMessage"},"triggers":{"telegram_webhook":"webhook"}},"telegram_v2":{"namespace":"telegram","methods":{"telegram_copy_message":"copyMessage","telegram_delete_message":"deleteMessage","telegram_edit_message_text":"editMessageText","telegram_forward_message":"forwardMessage","telegram_get_chat":"getChat","telegram_get_chat_member":"getChatMember","telegram_message":"sendMessage","telegram_pin_message":"pinMessage","telegram_send_animation":"sendAnimation","telegram_send_audio":"sendAudio","telegram_send_chat_action":"sendChatAction","telegram_send_contact":"sendContact","telegram_send_document":"sendDocument","telegram_send_location":"sendLocation","telegram_send_photo":"sendPhoto","telegram_send_poll":"sendPoll","telegram_send_video":"sendVideo","telegram_set_message_reaction":"setMessageReaction","telegram_unpin_message":"unpinMessage"},"triggers":{"telegram_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"temporal":{"namespace":"temporal","methods":{"cancel_workflow":"cancelWorkflow","count_workflows":"countWorkflows","create_schedule":"createSchedule","delete_schedule":"deleteSchedule","describe_schedule":"describeSchedule","describe_task_queue":"describeTaskQueue","describe_workflow":"describeWorkflow","get_workflow_history":"getWorkflowHistory","list_schedules":"listSchedules","list_workflows":"listWorkflows","pause_schedule":"pauseSchedule","query_workflow":"queryWorkflow","reset_workflow":"resetWorkflow","signal_with_start":"signalWithStart","signal_workflow":"signalWorkflow","start_workflow":"startWorkflow","terminate_workflow":"terminateWorkflow","trigger_schedule":"triggerSchedule","unpause_schedule":"unpauseSchedule","update_workflow":"updateWorkflow"}},"textract":{"namespace":"legacy.textract"},"textract_v2":{"namespace":"legacy.textractV2","methods":{"analyze_document":"analyzeDocumentTextTablesForms","analyze_expense":"analyzeExpenseInvoicesReceipts","analyze_id":"analyzeIdentityDocument"}},"textract_v3":{"namespace":"textract","methods":{"analyze_document":"analyzeDocumentTextTablesForms","analyze_expense":"analyzeExpenseInvoicesReceipts","analyze_id":"analyzeIdentityDocument"},"params":{"action":{"oauthCredential":"credential"}}},"thinking":{"namespace":"legacy.thinking"},"thrive":{"namespace":"legacy.thrive","methods":{"add_audience_managers":"addAudienceManagers","add_audience_members":"addAudienceMembers","add_user_tags":"addUserTags","create_assignment":"createAssignment","create_audience":"createAudience","create_completion":"createCompletion","create_user":"createUser","delete_assignment":"deleteAssignment","delete_audience":"deleteAudience","delete_user":"deleteUser","get_activity":"getActivity","get_assignment":"getAssignment","get_audience":"getAudience","get_completion":"getCompletion","get_content":"getContent","get_cpd_category":"getCpdCategory","get_cpd_entry":"getCpdEntry","get_cpd_requirement":"getCpdRequirement","get_enrolment":"getEnrolment","get_skill_levels":"getSkillLevels","get_tag":"getTag","get_user_by_id":"getUserById","get_user_by_ref":"getUserByRef","list_assignments":"listAssignments","list_audience_managers":"listAudienceManagers","list_audience_members":"listAudienceMembers","list_audiences":"listAudiences","list_completions":"listCompletions","list_enrolments":"listEnrolments","list_tags":"listTags","query_activities":"queryActivities","query_content":"queryContent","query_cpd_categories":"queryCpdCategories","query_cpd_entries":"queryCpdEntries","query_cpd_requirements":"queryCpdRequirements","query_cpd_user_summaries":"queryCpdUserSummaries","remove_audience_manager":"removeAudienceManager","remove_audience_member":"removeAudienceMember","remove_user_tags":"removeUserTags","replace_audience_managers":"replaceAudienceManagers","replace_audience_members":"replaceAudienceMembers","search_users":"searchUsers","suspend_user":"suspendUser","update_assignment":"updateAssignment","update_audience":"updateAudience","update_user":"updateUser","update_user_skills":"updateUserSkills"}},"thrive_v2":{"namespace":"thrive","methods":{"add_audience_managers":"addAudienceManagers","add_audience_members":"addAudienceMembers","add_user_tags":"addUserTags","create_assignment":"createAssignment","create_audience":"createAudience","create_completion":"createCompletion","create_user":"createUser","delete_assignment":"deleteAssignment","delete_audience":"deleteAudience","delete_user":"deleteUser","get_activity":"getActivity","get_assignment":"getAssignment","get_audience":"getAudience","get_completion":"getCompletion","get_content":"getContent","get_cpd_category":"getCpdCategory","get_cpd_entry":"getCpdEntry","get_cpd_requirement":"getCpdRequirement","get_enrolment":"getEnrolment","get_skill_levels":"getSkillLevels","get_tag":"getTag","get_user_by_id":"getUserById","get_user_by_ref":"getUserByRef","list_assignments":"listAssignments","list_audience_managers":"listAudienceManagers","list_audience_members":"listAudienceMembers","list_audiences":"listAudiences","list_completions":"listCompletions","list_enrolments":"listEnrolments","list_tags":"listTags","query_activities":"queryActivities","query_content":"queryContent","query_cpd_categories":"queryCpdCategories","query_cpd_entries":"queryCpdEntries","query_cpd_requirements":"queryCpdRequirements","query_cpd_user_summaries":"queryCpdUserSummaries","remove_audience_manager":"removeAudienceManager","remove_audience_member":"removeAudienceMember","remove_user_tags":"removeUserTags","replace_audience_managers":"replaceAudienceManagers","replace_audience_members":"replaceAudienceMembers","search_users":"searchUsers","suspend_user":"suspendUser","update_assignment":"updateAssignment","update_audience":"updateAudience","update_user":"updateUser","update_user_skills":"updateUserSkills"},"params":{"action":{"oauthCredential":"credential"}}},"tiktok":{"namespace":"tiktok","methods":{"tiktok_get_post_status":"getPostStatus","tiktok_get_user":"getUserInfo","tiktok_list_videos":"listVideos","tiktok_query_videos":"queryVideos","tiktok_upload_video_draft":"uploadVideoDraft"},"triggers":{"tiktok_authorization_removed":"authorizationRemoved","tiktok_post_inbox_delivered":"postInboxDelivered","tiktok_post_no_longer_public":"postNoLongerPublic","tiktok_post_publicly_available":"postPubliclyAvailable","tiktok_post_publish_complete":"postPublishComplete","tiktok_post_publish_failed":"postPublishFailed"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"tinybird":{"namespace":"legacy.tinybird","methods":{"tinybird_append_datasource":"appendDataSourceFromUrl","tinybird_delete_datasource_rows":"deleteDataSourceRows","tinybird_events":"sendEvents","tinybird_get_job":"getJobStatus","tinybird_query":"query","tinybird_query_pipe":"queryPipeEndpoint","tinybird_truncate_datasource":"truncateDataSource"}},"tinybird_v2":{"namespace":"tinybird","methods":{"tinybird_append_datasource":"appendDataSourceFromUrl","tinybird_delete_datasource_rows":"deleteDataSourceRows","tinybird_events":"sendEvents","tinybird_get_job":"getJobStatus","tinybird_query":"query","tinybird_query_pipe":"queryPipeEndpoint","tinybird_truncate_datasource":"truncateDataSource"},"params":{"action":{"oauthCredential":"credential"}}},"tinyfish":{"namespace":"tinyfish","methods":{"tinyfish_cancel_run":"cancelRun","tinyfish_fetch":"fetchUrls","tinyfish_get_run":"getRun","tinyfish_list_profiles":"listBrowserProfiles","tinyfish_list_runs":"listRuns","tinyfish_list_vault_items":"listVaultItems","tinyfish_run":"runAgent","tinyfish_run_async":"startAgentRun","tinyfish_search":"search"}},"translate":{"namespace":"translate"},"trello":{"namespace":"trello","methods":{"trello_add_checklist":"addChecklist","trello_add_checklist_item":"addChecklistItem","trello_add_comment":"addComment","trello_add_label":"addLabel","trello_add_member":"addMember","trello_create_board":"createBoard","trello_create_card":"createCard","trello_create_list":"createList","trello_delete_card":"deleteCard","trello_get_actions":"getActions","trello_get_board":"getBoard","trello_get_card":"getCard","trello_list_cards":"listCards","trello_list_lists":"getLists","trello_list_members":"listMembers","trello_remove_label":"removeLabel","trello_remove_member":"removeMember","trello_search":"search","trello_update_card":"updateCard","trello_update_checklist_item":"updateChecklistItem","trello_update_list":"updateList"},"params":{"action":{"oauthCredential":"credential"}}},"trigger_dev":{"namespace":"legacy.triggerDev","methods":{"trigger_dev_activate_schedule":"activateSchedule","trigger_dev_add_run_tags":"addRunTags","trigger_dev_batch_trigger_task":"batchTriggerTask","trigger_dev_cancel_run":"cancelRun","trigger_dev_complete_waitpoint_token":"completeWaitpointToken","trigger_dev_create_env_var":"createEnvVar","trigger_dev_create_schedule":"createSchedule","trigger_dev_create_waitpoint_token":"createWaitpointToken","trigger_dev_deactivate_schedule":"deactivateSchedule","trigger_dev_delete_env_var":"deleteEnvVar","trigger_dev_delete_schedule":"deleteSchedule","trigger_dev_execute_query":"executeQuery","trigger_dev_get_batch":"getBatch","trigger_dev_get_batch_results":"getBatchResults","trigger_dev_get_deployment":"getDeployment","trigger_dev_get_env_var":"getEnvVar","trigger_dev_get_latest_deployment":"getLatestDeployment","trigger_dev_get_query_schema":"getQuerySchema","trigger_dev_get_queue":"getQueue","trigger_dev_get_run":"getRun","trigger_dev_get_run_events":"getRunEvents","trigger_dev_get_run_result":"getRunResult","trigger_dev_get_run_trace":"getRunTrace","trigger_dev_get_schedule":"getSchedule","trigger_dev_get_waitpoint_token":"getWaitpointToken","trigger_dev_import_env_vars":"importEnvVars","trigger_dev_list_deployments":"listDeployments","trigger_dev_list_env_vars":"listEnvVars","trigger_dev_list_queues":"listQueues","trigger_dev_list_runs":"listRuns","trigger_dev_list_schedules":"listSchedules","trigger_dev_list_timezones":"listTimezones","trigger_dev_list_waitpoint_tokens":"listWaitpointTokens","trigger_dev_override_queue_concurrency":"overrideQueueConcurrency","trigger_dev_pause_queue":"pauseQueue","trigger_dev_promote_deployment":"promoteDeployment","trigger_dev_replay_run":"replayRun","trigger_dev_reschedule_run":"rescheduleRun","trigger_dev_reset_queue_concurrency":"resetQueueConcurrency","trigger_dev_resume_queue":"resumeQueue","trigger_dev_trigger_task":"triggerTask","trigger_dev_update_env_var":"updateEnvVar","trigger_dev_update_run_metadata":"updateRunMetadata","trigger_dev_update_schedule":"updateSchedule"}},"trigger_dev_v2":{"namespace":"triggerDev","methods":{"trigger_dev_activate_schedule":"activateSchedule","trigger_dev_add_run_tags":"addRunTags","trigger_dev_batch_trigger_task":"batchTriggerTask","trigger_dev_cancel_run":"cancelRun","trigger_dev_complete_waitpoint_token":"completeWaitpointToken","trigger_dev_create_env_var":"createEnvVar","trigger_dev_create_schedule":"createSchedule","trigger_dev_create_waitpoint_token":"createWaitpointToken","trigger_dev_deactivate_schedule":"deactivateSchedule","trigger_dev_delete_env_var":"deleteEnvVar","trigger_dev_delete_schedule":"deleteSchedule","trigger_dev_execute_query":"executeQuery","trigger_dev_get_batch":"getBatch","trigger_dev_get_batch_results":"getBatchResults","trigger_dev_get_deployment":"getDeployment","trigger_dev_get_env_var":"getEnvVar","trigger_dev_get_latest_deployment":"getLatestDeployment","trigger_dev_get_query_schema":"getQuerySchema","trigger_dev_get_queue":"getQueue","trigger_dev_get_run":"getRun","trigger_dev_get_run_events":"getRunEvents","trigger_dev_get_run_result":"getRunResult","trigger_dev_get_run_trace":"getRunTrace","trigger_dev_get_schedule":"getSchedule","trigger_dev_get_waitpoint_token":"getWaitpointToken","trigger_dev_import_env_vars":"importEnvVars","trigger_dev_list_deployments":"listDeployments","trigger_dev_list_env_vars":"listEnvVars","trigger_dev_list_queues":"listQueues","trigger_dev_list_runs":"listRuns","trigger_dev_list_schedules":"listSchedules","trigger_dev_list_timezones":"listTimezones","trigger_dev_list_waitpoint_tokens":"listWaitpointTokens","trigger_dev_override_queue_concurrency":"overrideQueueConcurrency","trigger_dev_pause_queue":"pauseQueue","trigger_dev_promote_deployment":"promoteDeployment","trigger_dev_replay_run":"replayRun","trigger_dev_reschedule_run":"rescheduleRun","trigger_dev_reset_queue_concurrency":"resetQueueConcurrency","trigger_dev_resume_queue":"resumeQueue","trigger_dev_trigger_task":"triggerTask","trigger_dev_update_env_var":"updateEnvVar","trigger_dev_update_run_metadata":"updateRunMetadata","trigger_dev_update_schedule":"updateSchedule"},"params":{"action":{"oauthCredential":"credential"}}},"tts":{"namespace":"tts"},"twilio_sms":{"namespace":"legacy.twilioSms","triggers":{"twilio_sms_received":"received","twilio_sms_status":"status"}},"twilio_sms_v2":{"namespace":"twilioSms","triggers":{"twilio_sms_received":"received","twilio_sms_status":"status"},"params":{"action":{"oauthCredential":"credential"}}},"twilio_voice":{"namespace":"legacy.twilioVoice","methods":{"get_recording":"getRecording","list_calls":"listCalls","make_call":"makeCall"},"triggers":{"twilio_voice_webhook":"webhook"}},"twilio_voice_v2":{"namespace":"twilioVoice","methods":{"get_recording":"getRecording","list_calls":"listCalls","make_call":"makeCall"},"triggers":{"twilio_voice_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"typeform":{"namespace":"legacy.typeform","methods":{"typeform_create_form":"createForm","typeform_delete_form":"deleteForm","typeform_files":"downloadFile","typeform_get_form":"getFormDetails","typeform_insights":"formInsights","typeform_list_forms":"listForms","typeform_responses":"retrieveResponses","typeform_update_form":"updateForm"},"triggers":{"typeform_webhook":"webhook"}},"typeform_v2":{"namespace":"typeform","methods":{"typeform_create_form":"createForm","typeform_delete_form":"deleteForm","typeform_files":"downloadFile","typeform_get_form":"getFormDetails","typeform_insights":"formInsights","typeform_list_forms":"listForms","typeform_responses":"retrieveResponses","typeform_update_form":"updateForm"},"triggers":{"typeform_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"upstash":{"namespace":"legacy.upstash","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","lpush":"lpush","lrange":"lrange","set":"set","setnx":"setnx","ttl":"ttl"}},"upstash_v2":{"namespace":"upstash","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","lpush":"lpush","lrange":"lrange","set":"set","setnx":"setnx","ttl":"ttl"},"params":{"action":{"oauthCredential":"credential"}}},"uptimerobot":{"namespace":"legacy.uptimerobot","methods":{"create_alert_contact":"createAlertContact","create_maintenance_window":"createMaintenanceWindow","create_monitor":"createMonitor","create_psp":"createStatusPage","delete_alert_contact":"deleteAlertContact","delete_maintenance_window":"deleteMaintenanceWindow","delete_monitor":"deleteMonitor","delete_psp":"deleteStatusPage","get_account":"getAccount","get_alert_contact":"getAlertContact","get_incident":"getIncident","get_maintenance_window":"getMaintenanceWindow","get_monitor":"getMonitor","get_psp":"getStatusPage","list_alert_contacts":"listAlertContacts","list_incidents":"listIncidents","list_maintenance_windows":"listMaintenanceWindows","list_monitors":"listMonitors","list_psps":"listStatusPages","pause_monitor":"pauseMonitor","start_monitor":"startMonitor","update_maintenance_window":"updateMaintenanceWindow","update_monitor":"updateMonitor","update_psp":"updateStatusPage"}},"uptimerobot_v2":{"namespace":"uptimerobot","methods":{"create_alert_contact":"createAlertContact","create_maintenance_window":"createMaintenanceWindow","create_monitor":"createMonitor","create_psp":"createStatusPage","delete_alert_contact":"deleteAlertContact","delete_maintenance_window":"deleteMaintenanceWindow","delete_monitor":"deleteMonitor","delete_psp":"deleteStatusPage","get_account":"getAccount","get_alert_contact":"getAlertContact","get_incident":"getIncident","get_maintenance_window":"getMaintenanceWindow","get_monitor":"getMonitor","get_psp":"getStatusPage","list_alert_contacts":"listAlertContacts","list_incidents":"listIncidents","list_maintenance_windows":"listMaintenanceWindows","list_monitors":"listMonitors","list_psps":"listStatusPages","pause_monitor":"pauseMonitor","start_monitor":"startMonitor","update_maintenance_window":"updateMaintenanceWindow","update_monitor":"updateMonitor","update_psp":"updateStatusPage"},"params":{"action":{"oauthCredential":"credential"}}},"vanta":{"namespace":"vanta","methods":{"download_document_file":"downloadDocumentFile","get_control":"getControl","get_document":"getDocument","get_framework":"getFramework","get_person":"getPerson","get_policy":"getPolicy","get_risk_scenario":"getRiskScenario","get_test":"getTest","get_vendor":"getVendor","get_vulnerable_asset":"getVulnerableAsset","list_control_documents":"listControlDocuments","list_control_tests":"listControlTests","list_controls":"listControls","list_document_uploads":"listDocumentUploads","list_documents":"listDocuments","list_framework_controls":"listFrameworkControls","list_frameworks":"listFrameworks","list_monitored_computers":"listMonitoredComputers","list_people":"listPeople","list_policies":"listPolicies","list_risk_scenarios":"listRiskScenarios","list_test_entities":"listTestEntities","list_tests":"listTests","list_vendors":"listVendors","list_vulnerabilities":"listVulnerabilities","list_vulnerability_remediations":"listVulnerabilityRemediations","list_vulnerable_assets":"listVulnerableAssets","submit_document":"submitDocument","upload_document_file":"uploadDocumentFile"},"params":{"action":{"oauthCredential":"credential"}}},"variables":{"namespace":"setVariables"},"vercel":{"namespace":"legacy.vercel","methods":{"add_domain":"addDomain","add_project_domain":"addProjectDomain","cancel_deployment":"cancelDeployment","create_alias":"createAlias","create_check":"createCheck","create_deployment":"createDeployment","create_dns_record":"createDnsRecord","create_edge_config":"createEdgeConfig","create_env_var":"createEnvironmentVariable","create_project":"createProject","create_webhook":"createWebhook","delete_alias":"deleteAlias","delete_deployment":"deleteDeployment","delete_dns_record":"deleteDnsRecord","delete_domain":"deleteDomain","delete_edge_config":"deleteEdgeConfig","delete_env_var":"deleteEnvironmentVariable","delete_project":"deleteProject","delete_webhook":"deleteWebhook","get_alias":"getAlias","get_check":"getCheck","get_deployment":"getDeployment","get_deployment_events":"getDeploymentLogs","get_domain":"getDomain","get_domain_config":"getDomainConfig","get_edge_config":"getEdgeConfig","get_edge_config_items":"getEdgeConfigItems","get_env_vars":"getEnvironmentVariables","get_project":"getProject","get_team":"getTeam","get_user":"getUser","get_webhook":"getWebhook","list_aliases":"listAliases","list_checks":"listChecks","list_deployment_files":"listDeploymentFiles","list_deployments":"listDeployments","list_dns_records":"listDnsRecords","list_domains":"listDomains","list_edge_configs":"listEdgeConfigs","list_project_domains":"listProjectDomains","list_projects":"listProjects","list_team_members":"listTeamMembers","list_teams":"listTeams","list_webhooks":"listWebhooks","pause_project":"pauseProject","promote_deployment":"promoteDeployment","remove_project_domain":"removeProjectDomain","rerequest_check":"rerequestCheck","unpause_project":"unpauseProject","update_check":"updateCheck","update_dns_record":"updateDnsRecord","update_edge_config_items":"updateEdgeConfigItems","update_env_var":"updateEnvironmentVariable","update_project":"updateProject","update_project_domain":"updateProjectDomain","verify_project_domain":"verifyProjectDomain"},"triggers":{"vercel_deployment_canceled":"deploymentCanceled","vercel_deployment_created":"deploymentCreated","vercel_deployment_error":"deploymentError","vercel_deployment_ready":"deploymentReady","vercel_domain_created":"domainCreated","vercel_project_created":"projectCreated","vercel_project_removed":"projectRemoved","vercel_webhook":"webhook"}},"vercel_v2":{"namespace":"vercel","methods":{"add_domain":"addDomain","add_project_domain":"addProjectDomain","cancel_deployment":"cancelDeployment","create_alias":"createAlias","create_check":"createCheck","create_deployment":"createDeployment","create_dns_record":"createDnsRecord","create_edge_config":"createEdgeConfig","create_env_var":"createEnvironmentVariable","create_project":"createProject","create_webhook":"createWebhook","delete_alias":"deleteAlias","delete_deployment":"deleteDeployment","delete_dns_record":"deleteDnsRecord","delete_domain":"deleteDomain","delete_edge_config":"deleteEdgeConfig","delete_env_var":"deleteEnvironmentVariable","delete_project":"deleteProject","delete_webhook":"deleteWebhook","get_alias":"getAlias","get_check":"getCheck","get_deployment":"getDeployment","get_deployment_events":"getDeploymentLogs","get_domain":"getDomain","get_domain_config":"getDomainConfig","get_edge_config":"getEdgeConfig","get_edge_config_items":"getEdgeConfigItems","get_env_vars":"getEnvironmentVariables","get_project":"getProject","get_team":"getTeam","get_user":"getUser","get_webhook":"getWebhook","list_aliases":"listAliases","list_checks":"listChecks","list_deployment_files":"listDeploymentFiles","list_deployments":"listDeployments","list_dns_records":"listDnsRecords","list_domains":"listDomains","list_edge_configs":"listEdgeConfigs","list_project_domains":"listProjectDomains","list_projects":"listProjects","list_team_members":"listTeamMembers","list_teams":"listTeams","list_webhooks":"listWebhooks","pause_project":"pauseProject","promote_deployment":"promoteDeployment","remove_project_domain":"removeProjectDomain","rerequest_check":"rerequestCheck","unpause_project":"unpauseProject","update_check":"updateCheck","update_dns_record":"updateDnsRecord","update_edge_config_items":"updateEdgeConfigItems","update_env_var":"updateEnvironmentVariable","update_project":"updateProject","update_project_domain":"updateProjectDomain","verify_project_domain":"verifyProjectDomain"},"triggers":{"vercel_deployment_canceled":"deploymentCanceled","vercel_deployment_created":"deploymentCreated","vercel_deployment_error":"deploymentError","vercel_deployment_ready":"deploymentReady","vercel_domain_created":"domainCreated","vercel_project_created":"projectCreated","vercel_project_removed":"projectRemoved","vercel_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"video_generator":{"namespace":"legacy.videoGenerator"},"video_generator_v2":{"namespace":"legacy.videoGeneratorV2"},"video_generator_v3":{"namespace":"videoGenerator"},"vision":{"namespace":"legacy.vision"},"vision_v2":{"namespace":"legacy.visionV2"},"wait":{"namespace":"wait"},"wealthbox":{"namespace":"wealthbox","methods":{"read_contact":"readContact","read_note":"readNote","read_task":"readTask","write_contact":"writeContact","write_note":"writeNote","write_task":"writeTask"},"params":{"action":{"oauthCredential":"credential"}}},"webflow":{"namespace":"webflow","methods":{"create":"createItem","delete":"deleteItem","get":"getItem","list":"listItems","update":"updateItem"},"triggers":{"webflow_collection_item_changed":"collectionItemChanged","webflow_collection_item_created":"collectionItemCreated","webflow_collection_item_deleted":"collectionItemDeleted","webflow_form_submission":"formSubmission"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"webhook_request":{"namespace":"webhookRequest"},"whatsapp":{"namespace":"legacy.whatsapp","methods":{"get_media":"downloadMedia","mark_read":"markAsRead","send_interactive":"sendInteractive","send_media":"sendMedia","send_message":"sendMessage","send_reaction":"sendReaction","send_template":"sendTemplate","upload_media":"uploadMedia"},"triggers":{"whatsapp_webhook":"webhook"}},"whatsapp_v2":{"namespace":"whatsapp","methods":{"get_media":"downloadMedia","mark_read":"markAsRead","send_interactive":"sendInteractive","send_media":"sendMedia","send_message":"sendMessage","send_reaction":"sendReaction","send_template":"sendTemplate","upload_media":"uploadMedia"},"triggers":{"whatsapp_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"wikipedia":{"namespace":"wikipedia","methods":{"wikipedia_content":"getPageContent","wikipedia_random":"randomPage","wikipedia_search":"searchPages","wikipedia_summary":"getPageSummary"}},"windchill":{"namespace":"windchill","methods":{"windchill_check_in_document":"checkInDocument","windchill_check_in_documents":"checkInDocuments","windchill_check_out_document":"checkOutDocument","windchill_check_out_documents":"checkOutDocuments","windchill_create_document":"createDocument","windchill_create_documents":"createDocuments","windchill_delete_document":"deleteDocument","windchill_delete_documents":"deleteDocuments","windchill_download_attachment":"downloadAttachment","windchill_download_primary_content":"downloadPrimaryContent","windchill_get_document":"getDocument","windchill_get_document_structure":"getDocumentStructure","windchill_get_primary_content":"getPrimaryContent","windchill_get_valid_state_transitions":"getValidStateTransitions","windchill_list_attachments":"listAttachments","windchill_list_documents":"listDocuments","windchill_revise_document":"reviseDocument","windchill_revise_documents":"reviseDocuments","windchill_set_lifecycle_state":"setLifecycleState","windchill_undo_check_out_document":"undoCheckOutDocument","windchill_undo_check_out_documents":"undoCheckOutDocuments","windchill_update_common_properties":"updateCommonProperties","windchill_update_document":"updateDocument","windchill_update_document_security_labels":"updateDocumentSecurityLabels","windchill_update_documents":"updateDocuments","windchill_upload_attachments":"uploadAttachments","windchill_upload_primary_content":"uploadPrimaryContent"}},"wiza":{"namespace":"wiza","methods":{"company_enrichment":"companyEnrichment","get_credits":"getCredits","individual_reveal":"individualReveal","prospect_search":"prospectSearch"}},"wordpress":{"namespace":"wordpress","methods":{"wordpress_create_category":"createCategory","wordpress_create_comment":"createComment","wordpress_create_page":"createPage","wordpress_create_post":"createPost","wordpress_create_tag":"createTag","wordpress_delete_category":"deleteCategory","wordpress_delete_comment":"deleteComment","wordpress_delete_media":"deleteMedia","wordpress_delete_page":"deletePage","wordpress_delete_post":"deletePost","wordpress_delete_tag":"deleteTag","wordpress_get_category":"getCategory","wordpress_get_current_user":"getCurrentUser","wordpress_get_media":"getMedia","wordpress_get_page":"getPage","wordpress_get_post":"getPost","wordpress_get_tag":"getTag","wordpress_get_user":"getUser","wordpress_list_categories":"listCategories","wordpress_list_comments":"listComments","wordpress_list_media":"listMedia","wordpress_list_pages":"listPages","wordpress_list_posts":"listPosts","wordpress_list_tags":"listTags","wordpress_list_users":"listUsers","wordpress_search_content":"searchContent","wordpress_update_category":"updateCategory","wordpress_update_comment":"updateComment","wordpress_update_page":"updatePage","wordpress_update_post":"updatePost","wordpress_update_tag":"updateTag","wordpress_upload_media":"uploadMedia"},"params":{"action":{"oauthCredential":"credential"}}},"workday":{"namespace":"workday","methods":{"assign_onboarding":"assignOnboardingPlan","change_job":"changeJob","create_prehire":"createPreHire","get_compensation":"getCompensation","get_organizations":"getOrganizations","get_worker":"getWorker","hire_employee":"hireEmployee","list_workers":"listWorkers","terminate_worker":"terminateWorker","update_worker":"updatePersonalInformation"}},"workflow":{"namespace":"legacy.workflow"},"workflow_input":{"namespace":"runWorkflow"},"x":{"namespace":"x","methods":{"x_create_bookmark":"createBookmark","x_create_tweet":"createTweet","x_delete_bookmark":"deleteBookmark","x_delete_tweet":"deleteTweet","x_get_blocking":"getBlockedUsers","x_get_bookmarks":"getBookmarks","x_get_followers":"getFollowers","x_get_following":"getFollowing","x_get_liked_tweets":"getLikedTweets","x_get_liking_users":"getLikingUsers","x_get_me":"getMyProfile","x_get_personalized_trends":"getPersonalizedTrends","x_get_quote_tweets":"getQuoteTweets","x_get_retweeted_by":"getRetweetedBy","x_get_trends_by_woeid":"getTrendsByLocation","x_get_tweets_by_ids":"getTweetsByIds","x_get_usage":"getApiUsage","x_get_user_mentions":"getUserMentions","x_get_user_timeline":"getUserTimeline","x_get_user_tweets":"getUserTweets","x_hide_reply":"hideReply","x_manage_block":"blockUnblock","x_manage_follow":"followUnfollow","x_manage_like":"likeUnlike","x_manage_mute":"muteUnmute","x_manage_retweet":"retweetUnretweet","x_search_tweets":"searchTweets","x_search_users":"searchUsers"},"params":{"action":{"oauthCredential":"credential"}}},"youcom":{"namespace":"legacy.youcom","methods":{"youcom_answer":"answer","youcom_finance_research":"financeResearch","youcom_get_account_balance":"getAccountBalance","youcom_get_contents":"getContents","youcom_get_research_task":"getResearchTask","youcom_research":"research","youcom_search":"search","youcom_search_images":"searchImages"}},"youcom_v2":{"namespace":"youcom","methods":{"youcom_answer":"answer","youcom_finance_research":"financeResearch","youcom_get_account_balance":"getAccountBalance","youcom_get_contents":"getContents","youcom_get_research_task":"getResearchTask","youcom_research":"research","youcom_search":"search","youcom_search_images":"searchImages"},"params":{"action":{"oauthCredential":"credential"}}},"youtube":{"namespace":"legacy.youtube","methods":{"youtube_channel_info":"getChannelInfo","youtube_channel_playlists":"getChannelPlaylists","youtube_channel_videos":"getChannelVideos","youtube_comments":"getVideoComments","youtube_playlist_items":"getPlaylistItems","youtube_search":"searchVideos","youtube_trending":"getTrendingVideos","youtube_video_categories":"getVideoCategories","youtube_video_details":"getVideoDetails"}},"youtube_v2":{"namespace":"youtube","methods":{"youtube_channel_info":"getChannelInfo","youtube_channel_playlists":"getChannelPlaylists","youtube_channel_videos":"getChannelVideos","youtube_comments":"getVideoComments","youtube_playlist_items":"getPlaylistItems","youtube_search":"searchVideos","youtube_trending":"getTrendingVideos","youtube_video_categories":"getVideoCategories","youtube_video_details":"getVideoDetails"},"params":{"action":{"oauthCredential":"credential"}}},"zendesk":{"namespace":"legacy.zendesk","methods":{"autocomplete_organizations":"autocompleteOrganizations","create_organization":"createOrganization","create_organizations_bulk":"createOrganizationsBulk","create_ticket":"createTicket","create_tickets_bulk":"createTicketsBulk","create_user":"createUser","create_users_bulk":"createUsersBulk","delete_organization":"deleteOrganization","delete_ticket":"deleteTicket","delete_user":"deleteUser","get_current_user":"getCurrentUser","get_organization":"getOrganization","get_organizations":"getOrganizations","get_ticket":"getTicket","get_tickets":"getTickets","get_user":"getUser","get_users":"getUsers","merge_tickets":"mergeTickets","search":"search","search_count":"searchCount","search_users":"searchUsers","update_organization":"updateOrganization","update_ticket":"updateTicket","update_tickets_bulk":"updateTicketsBulk","update_user":"updateUser","update_users_bulk":"updateUsersBulk"},"triggers":{"zendesk_ticket_comment_added":"ticketCommentAdded","zendesk_ticket_created":"ticketCreated","zendesk_ticket_priority_changed":"ticketPriorityChanged","zendesk_ticket_status_changed":"ticketStatusChanged","zendesk_webhook":"webhook"}},"zendesk_v2":{"namespace":"zendesk","methods":{"autocomplete_organizations":"autocompleteOrganizations","create_organization":"createOrganization","create_organizations_bulk":"createOrganizationsBulk","create_ticket":"createTicket","create_tickets_bulk":"createTicketsBulk","create_user":"createUser","create_users_bulk":"createUsersBulk","delete_organization":"deleteOrganization","delete_ticket":"deleteTicket","delete_user":"deleteUser","get_current_user":"getCurrentUser","get_organization":"getOrganization","get_organizations":"getOrganizations","get_ticket":"getTicket","get_tickets":"getTickets","get_user":"getUser","get_users":"getUsers","merge_tickets":"mergeTickets","search":"search","search_count":"searchCount","search_users":"searchUsers","update_organization":"updateOrganization","update_ticket":"updateTicket","update_tickets_bulk":"updateTicketsBulk","update_user":"updateUser","update_users_bulk":"updateUsersBulk"},"triggers":{"zendesk_ticket_comment_added":"ticketCommentAdded","zendesk_ticket_created":"ticketCreated","zendesk_ticket_priority_changed":"ticketPriorityChanged","zendesk_ticket_status_changed":"ticketStatusChanged","zendesk_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"zep":{"namespace":"legacy.zep","methods":{"add_messages":"addMessages","add_user":"addUser","create_thread":"createThread","delete_thread":"deleteThread","get_context":"getContext","get_messages":"getMessages","get_threads":"getThreads","get_user":"getUser","get_user_threads":"getUserThreads"}},"zep_v2":{"namespace":"zep","methods":{"add_messages":"addMessages","add_user":"addUser","create_thread":"createThread","delete_thread":"deleteThread","get_context":"getContext","get_messages":"getMessages","get_threads":"getThreads","get_user":"getUser","get_user_threads":"getUserThreads"},"params":{"action":{"oauthCredential":"credential"}}},"zerobounce":{"namespace":"zerobounce","methods":{"zerobounce_get_credits":"getRemainingCredits","zerobounce_verify_email":"verifyEmail"}},"zoho_desk":{"namespace":"zohoDesk","methods":{"add_comment":"addComment","create_account":"createAccount","create_contact":"createContact","create_ticket":"createTicket","delete_comment":"deleteComment","get_account":"getAccount","get_agent":"getAgent","get_attachment":"getAttachment","get_comment":"getComment","get_contact":"getContact","get_department":"getDepartment","get_thread":"getThread","get_ticket":"getTicket","list_accounts":"listAccounts","list_agents":"listAgents","list_comments":"listComments","list_contacts":"listContacts","list_departments":"listDepartments","list_organizations":"listOrganizations","list_threads":"listThreads","list_tickets":"listTickets","move_ticket":"moveTicket","search_accounts":"searchAccounts","search_contacts":"searchContacts","search_tickets":"searchTickets","send_reply":"sendReply","update_account":"updateAccount","update_comment":"updateComment","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"zoho_desk":"zohoDesk"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"zoom":{"namespace":"zoom","methods":{"zoom_create_meeting":"createMeeting","zoom_delete_meeting":"deleteMeeting","zoom_delete_recording":"deleteRecording","zoom_get_meeting":"getMeeting","zoom_get_meeting_invitation":"getMeetingInvitation","zoom_get_meeting_recordings":"getMeetingRecordings","zoom_list_meetings":"listMeetings","zoom_list_past_participants":"listPastParticipants","zoom_list_recordings":"listRecordings","zoom_update_meeting":"updateMeeting"},"triggers":{"zoom_meeting_ended":"meetingEnded","zoom_meeting_started":"meetingStarted","zoom_participant_joined":"participantJoined","zoom_participant_left":"participantLeft","zoom_recording_completed":"recordingCompleted","zoom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"zoominfo":{"namespace":"legacy.zoominfo","methods":{"enrich_companies":"enrichCompanies","enrich_contacts":"enrichContacts","search_companies":"searchCompanies","search_contacts":"searchContacts","search_intent":"searchIntent","search_news":"searchNews"}},"zoominfo_v2":{"namespace":"zoominfo","methods":{"enrich_companies":"enrichCompanies","enrich_contacts":"enrichContacts","search_companies":"searchCompanies","search_contacts":"searchContacts","search_intent":"searchIntent","search_news":"searchNews"},"params":{"action":{"oauthCredential":"credential"}}}}}' + '{"version":1,"blocks":{"a2a":{"namespace":"a2a","methods":{"a2a_cancel_task":"cancelTask","a2a_get_agent_card":"getAgentCard","a2a_get_task":"getTask","a2a_send_message":"sendMessage"}},"affinity":{"namespace":"legacy.affinity","methods":{"batch_update_entity_fields":"batchUpdateEntityFields","batch_update_list_entry_fields":"batchUpdateListEntryFields","create_list":"createList","create_list_field_dropdown_option":"createListFieldDropdownOption","create_merge":"createMerge","create_note":"createNote","create_reminder":"createReminder","delete_list_field_dropdown_option":"deleteListFieldDropdownOption","delete_note":"deleteNote","get_company":"getCompany","get_current_user":"getCurrentUser","get_entity_field_value":"getEntityFieldValue","get_list":"getList","get_list_entry":"getListEntry","get_list_entry_field":"getListEntryField","get_list_field_dropdown_option":"getListFieldDropdownOption","get_merge":"getMerge","get_merge_task":"getMergeTask","get_note":"getNote","get_opportunity":"getOpportunity","get_person":"getPerson","get_saved_view":"getSavedView","get_transcript":"getTranscript","get_user":"getUser","list_calls":"listCalls","list_chat_messages":"listChatMessages","list_companies":"listCompanies","list_coworker_connections":"listCoworkerConnections","list_emails":"listEmails","list_entity_field_values":"listEntityFieldValues","list_entity_list_entries":"listRowsHoldingEntity","list_entity_lists":"listListsHoldingEntity","list_entity_notes":"listNotesOnEntity","list_entity_relationships":"listEntityRelationships","list_field_dropdown_options":"listFieldDropdownOptions","list_field_metadata":"listFieldMetadata","list_field_value_changes":"listFieldValueChanges","list_investor_executive_connections":"listInvestorExecutiveConnections","list_list_entries":"listListEntries","list_list_entry_field_value_changes":"listListEntryFieldValueChanges","list_list_entry_fields":"listListEntryFields","list_list_field_dropdown_options":"listListFieldDropdownOptions","list_list_fields":"listListFields","list_lists":"listLists","list_meetings":"listMeetings","list_merge_tasks":"listMergeTasks","list_merges":"listMerges","list_note_attached_companies":"listNoteAttachedCompanies","list_note_attached_opportunities":"listNoteAttachedOpportunities","list_note_attached_persons":"listNoteAttachedPeople","list_note_replies":"listNoteReplies","list_notes":"listNotes","list_opportunities":"listOpportunities","list_persons":"listPeople","list_reminders":"listReminders","list_saved_view_entries":"listSavedViewEntries","list_saved_views":"listSavedViews","list_transcript_fragments":"listTranscriptFragments","list_transcripts":"listTranscripts","list_users":"listUsers","search_companies":"searchCompanies","search_files":"searchFiles","search_list_entries":"searchListEntries","search_notes":"searchNotes","search_persons":"searchPeople","semantic_search":"semanticSearch","update_entity_field_value":"updateEntityFieldValue","update_list_entry_field":"updateListEntryField","update_list_field_dropdown_option":"updateListFieldDropdownOption","update_note":"updateNote"}},"affinity_v2":{"namespace":"affinity","methods":{"batch_update_entity_fields":"batchUpdateEntityFields","batch_update_list_entry_fields":"batchUpdateListEntryFields","create_list":"createList","create_list_field_dropdown_option":"createListFieldDropdownOption","create_merge":"createMerge","create_note":"createNote","create_reminder":"createReminder","delete_list_field_dropdown_option":"deleteListFieldDropdownOption","delete_note":"deleteNote","get_company":"getCompany","get_current_user":"getCurrentUser","get_entity_field_value":"getEntityFieldValue","get_list":"getList","get_list_entry":"getListEntry","get_list_entry_field":"getListEntryField","get_list_field_dropdown_option":"getListFieldDropdownOption","get_merge":"getMerge","get_merge_task":"getMergeTask","get_note":"getNote","get_opportunity":"getOpportunity","get_person":"getPerson","get_saved_view":"getSavedView","get_transcript":"getTranscript","get_user":"getUser","list_calls":"listCalls","list_chat_messages":"listChatMessages","list_companies":"listCompanies","list_coworker_connections":"listCoworkerConnections","list_emails":"listEmails","list_entity_field_values":"listEntityFieldValues","list_entity_list_entries":"listRowsHoldingEntity","list_entity_lists":"listListsHoldingEntity","list_entity_notes":"listNotesOnEntity","list_entity_relationships":"listEntityRelationships","list_field_dropdown_options":"listFieldDropdownOptions","list_field_metadata":"listFieldMetadata","list_field_value_changes":"listFieldValueChanges","list_investor_executive_connections":"listInvestorExecutiveConnections","list_list_entries":"listListEntries","list_list_entry_field_value_changes":"listListEntryFieldValueChanges","list_list_entry_fields":"listListEntryFields","list_list_field_dropdown_options":"listListFieldDropdownOptions","list_list_fields":"listListFields","list_lists":"listLists","list_meetings":"listMeetings","list_merge_tasks":"listMergeTasks","list_merges":"listMerges","list_note_attached_companies":"listNoteAttachedCompanies","list_note_attached_opportunities":"listNoteAttachedOpportunities","list_note_attached_persons":"listNoteAttachedPeople","list_note_replies":"listNoteReplies","list_notes":"listNotes","list_opportunities":"listOpportunities","list_persons":"listPeople","list_reminders":"listReminders","list_saved_view_entries":"listSavedViewEntries","list_saved_views":"listSavedViews","list_transcript_fragments":"listTranscriptFragments","list_transcripts":"listTranscripts","list_users":"listUsers","search_companies":"searchCompanies","search_files":"searchFiles","search_list_entries":"searchListEntries","search_notes":"searchNotes","search_persons":"searchPeople","semantic_search":"semanticSearch","update_entity_field_value":"updateEntityFieldValue","update_list_entry_field":"updateListEntryField","update_list_field_dropdown_option":"updateListFieldDropdownOption","update_note":"updateNote"},"params":{"action":{"oauthCredential":"credential"}}},"agent":{"namespace":"agent"},"agentmail":{"namespace":"legacy.agentmail","methods":{"create_draft":"createDraft","create_inbox":"createInbox","delete_draft":"deleteDraft","delete_inbox":"deleteInbox","delete_thread":"deleteThread","forward_message":"forwardMessage","get_draft":"getDraft","get_inbox":"getInbox","get_message":"getMessage","get_thread":"getThread","list_drafts":"listDrafts","list_inboxes":"listInboxes","list_messages":"listMessages","list_threads":"listThreads","reply_message":"replyToMessage","send_draft":"sendDraft","send_message":"sendMessage","update_draft":"updateDraft","update_inbox":"updateInbox","update_message":"updateMessageLabels","update_thread":"updateThreadLabels"}},"agentmail_v2":{"namespace":"agentmail","methods":{"create_draft":"createDraft","create_inbox":"createInbox","delete_draft":"deleteDraft","delete_inbox":"deleteInbox","delete_thread":"deleteThread","forward_message":"forwardMessage","get_draft":"getDraft","get_inbox":"getInbox","get_message":"getMessage","get_thread":"getThread","list_drafts":"listDrafts","list_inboxes":"listInboxes","list_messages":"listMessages","list_threads":"listThreads","reply_message":"replyToMessage","send_draft":"sendDraft","send_message":"sendMessage","update_draft":"updateDraft","update_inbox":"updateInbox","update_message":"updateMessageLabels","update_thread":"updateThreadLabels"},"params":{"action":{"oauthCredential":"credential"}}},"agentphone":{"namespace":"legacy.agentphone","methods":{"create_call":"createCall","create_contact":"createContact","create_number":"createNumber","delete_contact":"deleteContact","get_call":"getCall","get_call_transcript":"getCallTranscript","get_contact":"getContact","get_conversation":"getConversation","get_conversation_messages":"getConversationMessages","get_number_messages":"getNumberMessages","get_usage":"getUsage","get_usage_daily":"getDailyUsage","get_usage_monthly":"getMonthlyUsage","list_calls":"listCalls","list_contacts":"listContacts","list_conversations":"listConversations","list_numbers":"listNumbers","react_to_message":"reactToMessage","release_number":"releaseNumber","send_message":"sendMessage","update_contact":"updateContact","update_conversation":"updateConversation"}},"agentphone_v2":{"namespace":"agentphone","methods":{"create_call":"createCall","create_contact":"createContact","create_number":"createNumber","delete_contact":"deleteContact","get_call":"getCall","get_call_transcript":"getCallTranscript","get_contact":"getContact","get_conversation":"getConversation","get_conversation_messages":"getConversationMessages","get_number_messages":"getNumberMessages","get_usage":"getUsage","get_usage_daily":"getDailyUsage","get_usage_monthly":"getMonthlyUsage","list_calls":"listCalls","list_contacts":"listContacts","list_conversations":"listConversations","list_numbers":"listNumbers","react_to_message":"reactToMessage","release_number":"releaseNumber","send_message":"sendMessage","update_contact":"updateContact","update_conversation":"updateConversation"},"params":{"action":{"oauthCredential":"credential"}}},"agiloft":{"namespace":"agiloft","methods":{"async_status":"asyncStatus","attach_file":"attachFile","attachment_info":"attachmentInfo","create_record":"createRecord","delete_record":"deleteRecord","get_choice_line_id":"getChoiceLineId","list_tables":"listTablesFields","lock_record":"lockRecord","nlp_search":"naturalLanguageSearch","read_record":"readRecord","remove_attachment":"removeAttachment","retrieve_attachment":"retrieveAttachment","run_action_button":"runActionButton","saved_search":"savedSearch","search_records":"searchRecords","select_records":"selectRecords","update_record":"updateRecord","upsert_record":"upsertRecord"}},"ahrefs":{"namespace":"legacy.ahrefs","methods":{"ahrefs_anchors":"anchors","ahrefs_backlinks":"backlinks","ahrefs_backlinks_stats":"backlinksStats","ahrefs_batch_analysis":"batchAnalysis","ahrefs_broken_backlinks":"brokenBacklinks","ahrefs_domain_rating":"domainRating","ahrefs_domain_rating_history":"domainRatingHistory","ahrefs_keyword_overview":"keywordOverview","ahrefs_keywords_history":"keywordsHistory","ahrefs_metrics":"metricsOverview","ahrefs_metrics_history":"metricsHistory","ahrefs_organic_competitors":"organicCompetitors","ahrefs_organic_keywords":"organicKeywords","ahrefs_paid_pages":"paidPages","ahrefs_rank_tracker_competitors_overview":"rankTrackerCompetitorsOverview","ahrefs_rank_tracker_competitors_stats":"rankTrackerCompetitorsStats","ahrefs_rank_tracker_overview":"rankTrackerOverview","ahrefs_rank_tracker_serp_overview":"rankTrackerSerpOverview","ahrefs_refdomains_history":"referringDomainsHistory","ahrefs_referring_domains":"referringDomains","ahrefs_related_terms":"relatedTerms","ahrefs_site_audit_page_explorer":"siteAuditPageExplorer","ahrefs_top_pages":"topPages"}},"ahrefs_v2":{"namespace":"ahrefs","methods":{"ahrefs_anchors":"anchors","ahrefs_backlinks":"backlinks","ahrefs_backlinks_stats":"backlinksStats","ahrefs_batch_analysis":"batchAnalysis","ahrefs_broken_backlinks":"brokenBacklinks","ahrefs_domain_rating":"domainRating","ahrefs_domain_rating_history":"domainRatingHistory","ahrefs_keyword_overview":"keywordOverview","ahrefs_keywords_history":"keywordsHistory","ahrefs_metrics":"metricsOverview","ahrefs_metrics_history":"metricsHistory","ahrefs_organic_competitors":"organicCompetitors","ahrefs_organic_keywords":"organicKeywords","ahrefs_paid_pages":"paidPages","ahrefs_rank_tracker_competitors_overview":"rankTrackerCompetitorsOverview","ahrefs_rank_tracker_competitors_stats":"rankTrackerCompetitorsStats","ahrefs_rank_tracker_overview":"rankTrackerOverview","ahrefs_rank_tracker_serp_overview":"rankTrackerSerpOverview","ahrefs_refdomains_history":"referringDomainsHistory","ahrefs_referring_domains":"referringDomains","ahrefs_related_terms":"relatedTerms","ahrefs_site_audit_page_explorer":"siteAuditPageExplorer","ahrefs_top_pages":"topPages"},"params":{"action":{"oauthCredential":"credential"}}},"airtable":{"namespace":"airtable","methods":{"create":"createRecords","delete":"deleteRecords","get":"getRecord","getSchema":"getBaseSchema","list":"listRecords","listBases":"listBases","listTables":"listTables","update":"updateRecord","updateMultiple":"updateMultipleRecords","upsert":"upsertRecords"},"triggers":{"airtable_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"algolia":{"namespace":"legacy.algolia","methods":{"add_record":"addRecord","batch_operations":"batchOperations","browse_records":"browseRecords","clear_records":"clearRecords","copy_move_index":"copyMoveIndex","delete_by_filter":"deleteByFilter","delete_index":"deleteIndex","delete_record":"deleteRecord","get_record":"getRecord","get_records":"getRecords","get_settings":"getSettings","get_task_status":"getTaskStatus","list_indices":"listIndices","partial_update_record":"partialUpdateRecord","search":"search","update_settings":"updateSettings"}},"algolia_v2":{"namespace":"algolia","methods":{"add_record":"addRecord","batch_operations":"batchOperations","browse_records":"browseRecords","clear_records":"clearRecords","copy_move_index":"copyMoveIndex","delete_by_filter":"deleteByFilter","delete_index":"deleteIndex","delete_record":"deleteRecord","get_record":"getRecord","get_records":"getRecords","get_settings":"getSettings","get_task_status":"getTaskStatus","list_indices":"listIndices","partial_update_record":"partialUpdateRecord","search":"search","update_settings":"updateSettings"},"params":{"action":{"oauthCredential":"credential"}}},"amplitude":{"namespace":"legacy.amplitude","methods":{"event_segmentation":"eventSegmentation","funnels":"funnels","get_active_users":"getActiveUsers","get_revenue":"getRevenue","group_identify":"groupIdentify","identify_user":"identifyUser","list_events":"listEvents","realtime_active_users":"realTimeActiveUsers","retention":"retention","send_event":"sendEvent","user_activity":"userActivity","user_profile":"userProfile","user_search":"userSearch"}},"amplitude_v2":{"namespace":"amplitude","methods":{"event_segmentation":"eventSegmentation","funnels":"funnels","get_active_users":"getActiveUsers","get_revenue":"getRevenue","group_identify":"groupIdentify","identify_user":"identifyUser","list_events":"listEvents","realtime_active_users":"realTimeActiveUsers","retention":"retention","send_event":"sendEvent","user_activity":"userActivity","user_profile":"userProfile","user_search":"userSearch"},"params":{"action":{"oauthCredential":"credential"}}},"api":{"namespace":"api"},"api_trigger":{"namespace":"legacy.apiTrigger"},"apify":{"namespace":"legacy.apify","methods":{"apify_get_dataset_items":"getDatasetItems","apify_get_run":"getRun","apify_run_actor_async":"runActorAsync","apify_run_actor_sync":"runActor","apify_run_task":"runTask"}},"apify_v2":{"namespace":"apify","methods":{"apify_get_dataset_items":"getDatasetItems","apify_get_run":"getRun","apify_run_actor_async":"runActorAsync","apify_run_actor_sync":"runActor","apify_run_task":"runTask"},"params":{"action":{"oauthCredential":"credential"}}},"apollo":{"namespace":"legacy.apollo","methods":{"account_bulk_create":"bulkCreateAccounts","account_bulk_update":"bulkUpdateAccounts","account_create":"createAccount","account_search":"searchAccounts","account_update":"updateAccount","contact_bulk_create":"bulkCreateContacts","contact_bulk_update":"bulkUpdateContacts","contact_create":"createContact","contact_search":"searchContacts","contact_update":"updateContact","email_accounts":"getEmailAccounts","opportunity_create":"createOpportunity","opportunity_get":"getOpportunity","opportunity_search":"searchOpportunities","opportunity_update":"updateOpportunity","organization_bulk_enrich":"bulkEnrichOrganizations","organization_enrich":"enrichOrganization","organization_search":"searchOrganizations","people_bulk_enrich":"bulkEnrichPeople","people_enrich":"enrichPerson","people_search":"searchPeople","sequence_add":"addToSequence","sequence_search":"searchSequences","task_create":"createTask","task_search":"searchTasks"}},"apollo_v2":{"namespace":"apollo","methods":{"account_bulk_create":"bulkCreateAccounts","account_bulk_update":"bulkUpdateAccounts","account_create":"createAccount","account_search":"searchAccounts","account_update":"updateAccount","contact_bulk_create":"bulkCreateContacts","contact_bulk_update":"bulkUpdateContacts","contact_create":"createContact","contact_search":"searchContacts","contact_update":"updateContact","email_accounts":"getEmailAccounts","opportunity_create":"createOpportunity","opportunity_get":"getOpportunity","opportunity_search":"searchOpportunities","opportunity_update":"updateOpportunity","organization_bulk_enrich":"bulkEnrichOrganizations","organization_enrich":"enrichOrganization","organization_search":"searchOrganizations","people_bulk_enrich":"bulkEnrichPeople","people_enrich":"enrichPerson","people_search":"searchPeople","sequence_add":"addToSequence","sequence_search":"searchSequences","task_create":"createTask","task_search":"searchTasks"},"params":{"action":{"oauthCredential":"credential"}}},"appconfig":{"namespace":"legacy.appconfig","methods":{"create_application":"createApplication","create_configuration_profile":"createConfigurationProfile","create_environment":"createEnvironment","create_hosted_configuration_version":"createHostedConfigurationVersion","delete_application":"deleteApplication","delete_configuration_profile":"deleteConfigurationProfile","delete_environment":"deleteEnvironment","delete_hosted_configuration_version":"deleteHostedConfigurationVersion","get_application":"getApplication","get_configuration":"getConfiguration","get_configuration_profile":"getConfigurationProfile","get_deployment":"getDeployment","get_environment":"getEnvironment","get_hosted_configuration_version":"getHostedConfigurationVersion","list_applications":"listApplications","list_configuration_profiles":"listConfigurationProfiles","list_deployment_strategies":"listDeploymentStrategies","list_deployments":"listDeployments","list_environments":"listEnvironments","list_hosted_configuration_versions":"listHostedConfigurationVersions","start_deployment":"startDeployment","stop_deployment":"stopDeployment","update_application":"updateApplication","update_configuration_profile":"updateConfigurationProfile","update_environment":"updateEnvironment"}},"appconfig_v2":{"namespace":"appconfig","methods":{"create_application":"createApplication","create_configuration_profile":"createConfigurationProfile","create_environment":"createEnvironment","create_hosted_configuration_version":"createHostedConfigurationVersion","delete_application":"deleteApplication","delete_configuration_profile":"deleteConfigurationProfile","delete_environment":"deleteEnvironment","delete_hosted_configuration_version":"deleteHostedConfigurationVersion","get_application":"getApplication","get_configuration":"getConfiguration","get_configuration_profile":"getConfigurationProfile","get_deployment":"getDeployment","get_environment":"getEnvironment","get_hosted_configuration_version":"getHostedConfigurationVersion","list_applications":"listApplications","list_configuration_profiles":"listConfigurationProfiles","list_deployment_strategies":"listDeploymentStrategies","list_deployments":"listDeployments","list_environments":"listEnvironments","list_hosted_configuration_versions":"listHostedConfigurationVersions","start_deployment":"startDeployment","stop_deployment":"stopDeployment","update_application":"updateApplication","update_configuration_profile":"updateConfigurationProfile","update_environment":"updateEnvironment"},"params":{"action":{"oauthCredential":"credential"}}},"arxiv":{"namespace":"arxiv","methods":{"arxiv_get_author_papers":"getAuthorPapers","arxiv_get_paper":"getPaperDetails","arxiv_search":"searchPapers"}},"asana":{"namespace":"asana","methods":{"add_comment":"addComment","add_followers":"addFollowers","create_project":"createProject","create_section":"createSection","create_subtask":"createSubtask","create_task":"createTask","delete_task":"deleteTask","get_project":"getProject","get_projects":"getProjects","get_task":"getTask","list_sections":"listSections","list_workspaces":"listWorkspaces","search_tasks":"searchTasks","update_task":"updateTask"},"params":{"action":{"oauthCredential":"credential"}}},"ashby":{"namespace":"legacy.ashby","methods":{"add_candidate_tag":"addCandidateTag","anonymize_candidate":"anonymizeCandidate","change_application_source":"changeApplicationSource","change_application_stage":"changeApplicationStage","create_application":"createApplication","create_candidate":"createCandidate","create_note":"createNote","delete_application":"deleteApplication","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_job_posting":"getJobPosting","get_offer":"getOffer","get_opening":"getOpening","list_application_feedback":"listApplicationFeedback","list_application_history":"listApplicationHistory","list_applications":"listApplications","list_archive_reasons":"listArchiveReasons","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_interview_plans":"listInterviewPlans","list_interview_stages":"listInterviewStages","list_interviews":"listInterviews","list_job_postings":"listJobPostings","list_jobs":"listJobs","list_locations":"listLocations","list_notes":"listNotes","list_offers":"listOffers","list_openings":"listOpenings","list_sources":"listSources","list_users":"listUsers","remove_candidate_tag":"removeCandidateTag","search_candidates":"searchCandidates","search_jobs":"searchJobs","search_openings":"searchOpenings","search_users":"searchUsers","set_custom_field_value":"setCustomFieldValue","set_custom_field_values":"setCustomFieldValues","transfer_application":"transferApplication","update_candidate":"updateCandidate","upload_candidate_file":"uploadCandidateFile","upload_resume":"uploadResume"},"triggers":{"ashby_application_submit":"applicationSubmit","ashby_application_update":"applicationUpdate","ashby_candidate_delete":"candidateDelete","ashby_candidate_hire":"candidateHire","ashby_candidate_merge":"candidateMerge","ashby_candidate_stage_change":"candidateStageChange","ashby_interview_schedule_create":"interviewScheduleCreate","ashby_interview_schedule_update":"interviewScheduleUpdate","ashby_job_create":"jobCreate","ashby_job_posting_delete":"jobPostingDelete","ashby_job_posting_update":"jobPostingUpdate","ashby_job_update":"jobUpdate","ashby_offer_create":"offerCreate","ashby_offer_delete":"offerDelete","ashby_offer_update":"offerUpdate","ashby_opening_create":"openingCreate","ashby_signature_request_update":"signatureRequestUpdate"}},"ashby_v2":{"namespace":"ashby","methods":{"add_candidate_tag":"addCandidateTag","anonymize_candidate":"anonymizeCandidate","change_application_source":"changeApplicationSource","change_application_stage":"changeApplicationStage","create_application":"createApplication","create_candidate":"createCandidate","create_note":"createNote","delete_application":"deleteApplication","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_job_posting":"getJobPosting","get_offer":"getOffer","get_opening":"getOpening","list_application_feedback":"listApplicationFeedback","list_application_history":"listApplicationHistory","list_applications":"listApplications","list_archive_reasons":"listArchiveReasons","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_interview_plans":"listInterviewPlans","list_interview_stages":"listInterviewStages","list_interviews":"listInterviews","list_job_postings":"listJobPostings","list_jobs":"listJobs","list_locations":"listLocations","list_notes":"listNotes","list_offers":"listOffers","list_openings":"listOpenings","list_sources":"listSources","list_users":"listUsers","remove_candidate_tag":"removeCandidateTag","search_candidates":"searchCandidates","search_jobs":"searchJobs","search_openings":"searchOpenings","search_users":"searchUsers","set_custom_field_value":"setCustomFieldValue","set_custom_field_values":"setCustomFieldValues","transfer_application":"transferApplication","update_candidate":"updateCandidate","upload_candidate_file":"uploadCandidateFile","upload_resume":"uploadResume"},"triggers":{"ashby_application_submit":"applicationSubmit","ashby_application_update":"applicationUpdate","ashby_candidate_delete":"candidateDelete","ashby_candidate_hire":"candidateHire","ashby_candidate_merge":"candidateMerge","ashby_candidate_stage_change":"candidateStageChange","ashby_interview_schedule_create":"interviewScheduleCreate","ashby_interview_schedule_update":"interviewScheduleUpdate","ashby_job_create":"jobCreate","ashby_job_posting_delete":"jobPostingDelete","ashby_job_posting_update":"jobPostingUpdate","ashby_job_update":"jobUpdate","ashby_offer_create":"offerCreate","ashby_offer_delete":"offerDelete","ashby_offer_update":"offerUpdate","ashby_opening_create":"openingCreate","ashby_signature_request_update":"signatureRequestUpdate"},"params":{"action":{"oauthCredential":"credential"}}},"athena":{"namespace":"legacy.athena","methods":{"batch_get_named_query":"batchGetNamedQueries","batch_get_prepared_statement":"batchGetPreparedStatements","batch_get_query_execution":"batchGetQueryExecutions","create_named_query":"createNamedQuery","create_prepared_statement":"createPreparedStatement","delete_named_query":"deleteNamedQuery","delete_prepared_statement":"deletePreparedStatement","get_data_catalog":"getDataCatalog","get_database":"getDatabase","get_named_query":"getNamedQuery","get_prepared_statement":"getPreparedStatement","get_query_execution":"getQueryExecution","get_query_results":"getQueryResults","get_query_runtime_statistics":"getQueryRuntimeStatistics","get_table_metadata":"getTableMetadata","get_work_group":"getWorkgroup","list_data_catalogs":"listDataCatalogs","list_databases":"listDatabases","list_named_queries":"listNamedQueries","list_prepared_statements":"listPreparedStatements","list_query_executions":"listQueryExecutions","list_table_metadata":"listTableMetadata","list_work_groups":"listWorkgroups","start_query":"startQuery","stop_query":"stopQuery","update_named_query":"updateNamedQuery","update_prepared_statement":"updatePreparedStatement"}},"athena_v2":{"namespace":"athena","methods":{"batch_get_named_query":"batchGetNamedQueries","batch_get_prepared_statement":"batchGetPreparedStatements","batch_get_query_execution":"batchGetQueryExecutions","create_named_query":"createNamedQuery","create_prepared_statement":"createPreparedStatement","delete_named_query":"deleteNamedQuery","delete_prepared_statement":"deletePreparedStatement","get_data_catalog":"getDataCatalog","get_database":"getDatabase","get_named_query":"getNamedQuery","get_prepared_statement":"getPreparedStatement","get_query_execution":"getQueryExecution","get_query_results":"getQueryResults","get_query_runtime_statistics":"getQueryRuntimeStatistics","get_table_metadata":"getTableMetadata","get_work_group":"getWorkgroup","list_data_catalogs":"listDataCatalogs","list_databases":"listDatabases","list_named_queries":"listNamedQueries","list_prepared_statements":"listPreparedStatements","list_query_executions":"listQueryExecutions","list_table_metadata":"listTableMetadata","list_work_groups":"listWorkgroups","start_query":"startQuery","stop_query":"stopQuery","update_named_query":"updateNamedQuery","update_prepared_statement":"updatePreparedStatement"},"params":{"action":{"oauthCredential":"credential"}}},"attio":{"namespace":"attio","methods":{"assert_record":"assertRecordUpsert","create_attribute":"createAttribute","create_comment":"createComment","create_list":"createList","create_list_entry":"createListEntry","create_note":"createNote","create_object":"createObject","create_record":"createRecord","create_task":"createTask","create_webhook":"createWebhook","delete_comment":"deleteComment","delete_list_entry":"deleteListEntry","delete_note":"deleteNote","delete_record":"deleteRecord","delete_task":"deleteTask","delete_webhook":"deleteWebhook","get_attribute":"getAttribute","get_comment":"getComment","get_list":"getList","get_list_entry":"getListEntry","get_member":"getMember","get_note":"getNote","get_object":"getObject","get_record":"getRecord","get_task":"getTask","get_thread":"getThread","get_webhook":"getWebhook","list_attributes":"listAttributes","list_lists":"listLists","list_members":"listMembers","list_notes":"listNotes","list_objects":"listObjects","list_records":"listRecords","list_tasks":"listTasks","list_threads":"listThreads","list_webhooks":"listWebhooks","query_list_entries":"queryListEntries","search_records":"searchRecords","update_attribute":"updateAttribute","update_list":"updateList","update_list_entry":"updateListEntry","update_object":"updateObject","update_record":"updateRecord","update_task":"updateTask","update_webhook":"updateWebhook"},"triggers":{"attio_comment_created":"commentCreated","attio_comment_deleted":"commentDeleted","attio_comment_resolved":"commentResolved","attio_comment_unresolved":"commentUnresolved","attio_list_created":"listCreated","attio_list_deleted":"listDeleted","attio_list_entry_created":"listEntryCreated","attio_list_entry_deleted":"listEntryDeleted","attio_list_entry_updated":"listEntryUpdated","attio_list_updated":"listUpdated","attio_note_created":"noteCreated","attio_note_deleted":"noteDeleted","attio_note_updated":"noteUpdated","attio_record_created":"recordCreated","attio_record_deleted":"recordDeleted","attio_record_merged":"recordMerged","attio_record_updated":"recordUpdated","attio_task_created":"taskCreated","attio_task_deleted":"taskDeleted","attio_task_updated":"taskUpdated","attio_webhook":"webhook","attio_workspace_member_created":"workspaceMemberCreated"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"azure_data_explorer":{"namespace":"legacy.azureDataExplorer","methods":{"azure_data_explorer_create_table":"createTable","azure_data_explorer_drop_table":"dropTable","azure_data_explorer_ingest_from_query":"ingestFromQuery","azure_data_explorer_ingest_inline":"ingestRowsInline","azure_data_explorer_list_databases":"listDatabases","azure_data_explorer_list_functions":"listFunctions","azure_data_explorer_list_tables":"listTables","azure_data_explorer_management":"managementCommandAdvanced","azure_data_explorer_query":"runQuery","azure_data_explorer_show_database_schema":"showDatabaseSchema","azure_data_explorer_show_ingestion_failures":"showIngestionFailures","azure_data_explorer_show_operations":"showOperations","azure_data_explorer_show_table_details":"showTableDetails","azure_data_explorer_show_table_schema":"showTableSchema"}},"azure_data_explorer_v2":{"namespace":"azureDataExplorer","methods":{"azure_data_explorer_create_table":"createTable","azure_data_explorer_drop_table":"dropTable","azure_data_explorer_ingest_from_query":"ingestFromQuery","azure_data_explorer_ingest_inline":"ingestRowsInline","azure_data_explorer_list_databases":"listDatabases","azure_data_explorer_list_functions":"listFunctions","azure_data_explorer_list_tables":"listTables","azure_data_explorer_management":"managementCommandAdvanced","azure_data_explorer_query":"runQuery","azure_data_explorer_show_database_schema":"showDatabaseSchema","azure_data_explorer_show_ingestion_failures":"showIngestionFailures","azure_data_explorer_show_operations":"showOperations","azure_data_explorer_show_table_details":"showTableDetails","azure_data_explorer_show_table_schema":"showTableSchema"},"params":{"action":{"oauthCredential":"credential"}}},"azure_devops":{"namespace":"legacy.azureDevops","methods":{"azure_devops_add_comment":"addComment","azure_devops_create_work_item":"createWorkItem","azure_devops_get_build_log":"getBuildLog","azure_devops_get_build_timeline":"getBuildTimeline","azure_devops_get_comments":"getComments","azure_devops_get_pipeline":"getPipeline","azure_devops_get_pipeline_run":"getPipelineRun","azure_devops_get_work_item":"getWorkItem","azure_devops_get_work_items_batch":"getWorkItemsBatch","azure_devops_get_work_items_between_builds":"getWorkItemsBetweenBuilds","azure_devops_list_build_logs":"listBuildLogs","azure_devops_list_builds":"listBuilds","azure_devops_list_pipeline_runs":"listPipelineRuns","azure_devops_list_pipelines":"listPipelines","azure_devops_query_work_items":"queryWorkItems","azure_devops_update_work_item":"updateWorkItem"},"triggers":{"azure_devops_build_failed":"buildFailed","azure_devops_webhook":"webhook","azure_devops_work_item_created":"workItemCreated"}},"azure_devops_v2":{"namespace":"azureDevops","methods":{"azure_devops_add_comment":"addComment","azure_devops_create_work_item":"createWorkItem","azure_devops_get_build_log":"getBuildLog","azure_devops_get_build_timeline":"getBuildTimeline","azure_devops_get_comments":"getComments","azure_devops_get_pipeline":"getPipeline","azure_devops_get_pipeline_run":"getPipelineRun","azure_devops_get_work_item":"getWorkItem","azure_devops_get_work_items_batch":"getWorkItemsBatch","azure_devops_get_work_items_between_builds":"getWorkItemsBetweenBuilds","azure_devops_list_build_logs":"listBuildLogs","azure_devops_list_builds":"listBuilds","azure_devops_list_pipeline_runs":"listPipelineRuns","azure_devops_list_pipelines":"listPipelines","azure_devops_query_work_items":"queryWorkItems","azure_devops_update_work_item":"updateWorkItem"},"triggers":{"azure_devops_build_failed":"buildFailed","azure_devops_webhook":"webhook","azure_devops_work_item_created":"workItemCreated"},"params":{"action":{"oauthCredential":"credential"}}},"bitbucket":{"namespace":"bitbucket","methods":{"bitbucket_approve_pull_request":"approvePullRequest","bitbucket_create_branch":"createBranch","bitbucket_create_pull_request":"createPullRequest","bitbucket_create_pull_request_comment":"createPullRequestComment","bitbucket_decline_pull_request":"declinePullRequest","bitbucket_delete_branch":"deleteBranch","bitbucket_get_commit":"getCommit","bitbucket_get_file":"getFile","bitbucket_get_file_metadata":"getFileMetadata","bitbucket_get_pipeline":"getPipeline","bitbucket_get_pipeline_step_log":"getPipelineStepLog","bitbucket_get_pull_request":"getPullRequest","bitbucket_get_pull_request_diff":"getPullRequestDiff","bitbucket_get_pull_request_diffstat":"getPullRequestDiffstat","bitbucket_get_pull_request_merge_task_status":"getPullRequestMergeTaskStatus","bitbucket_get_repository":"getRepository","bitbucket_list_branches":"listBranches","bitbucket_list_commits":"listCommits","bitbucket_list_directory":"listDirectory","bitbucket_list_pipeline_steps":"listPipelineSteps","bitbucket_list_pipelines":"listPipelines","bitbucket_list_pull_request_comments":"listPullRequestComments","bitbucket_list_pull_request_commit_statuses":"listPullRequestCommitStatuses","bitbucket_list_pull_requests":"listPullRequests","bitbucket_list_repositories":"listRepositories","bitbucket_list_workspaces":"listWorkspaces","bitbucket_merge_pull_request":"mergePullRequest","bitbucket_request_pull_request_changes":"requestPullRequestChanges","bitbucket_stop_pipeline":"stopPipeline","bitbucket_trigger_pipeline":"triggerPipeline"},"triggers":{"bitbucket_build_status_created":"buildStatusCreated","bitbucket_build_status_updated":"buildStatusUpdated","bitbucket_commit_comment_created":"commitCommentCreated","bitbucket_pull_request_approval_removed":"pullRequestApprovalRemoved","bitbucket_pull_request_approved":"pullRequestApproved","bitbucket_pull_request_changes_request_removed":"pullRequestChangesRequestRemoved","bitbucket_pull_request_changes_requested":"pullRequestChangesRequested","bitbucket_pull_request_comment_created":"pullRequestCommentCreated","bitbucket_pull_request_comment_deleted":"pullRequestCommentDeleted","bitbucket_pull_request_comment_reopened":"pullRequestCommentReopened","bitbucket_pull_request_comment_resolved":"pullRequestCommentResolved","bitbucket_pull_request_comment_updated":"pullRequestCommentUpdated","bitbucket_pull_request_created":"pullRequestCreated","bitbucket_pull_request_declined":"pullRequestDeclined","bitbucket_pull_request_merged":"pullRequestMerged","bitbucket_pull_request_updated":"pullRequestUpdated","bitbucket_push":"push","bitbucket_repository_forked":"repositoryForked","bitbucket_repository_updated":"repositoryUpdated"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"box":{"namespace":"legacy.box","methods":{"copy_file":"copyFile","create_folder":"createFolder","delete_file":"deleteFile","delete_folder":"deleteFolder","download_file":"downloadFile","get_file_info":"getFileInfo","list_folder_items":"listFolderItems","search":"search","sign_cancel_request":"cancelSignRequest","sign_create_request":"createSignRequest","sign_get_request":"getSignRequest","sign_list_requests":"listSignRequests","sign_resend_request":"resendSignRequest","update_file":"updateFile","upload_file":"uploadFile"}},"box_v2":{"namespace":"box","methods":{"copy_file":"copyFile","create_folder":"createFolder","delete_file":"deleteFile","delete_folder":"deleteFolder","download_file":"downloadFile","get_file_info":"getFileInfo","list_folder_items":"listFolderItems","search":"search","sign_cancel_request":"cancelSignRequest","sign_create_request":"createSignRequest","sign_get_request":"getSignRequest","sign_list_requests":"listSignRequests","sign_resend_request":"resendSignRequest","update_file":"updateFile","upload_file":"uploadFile"}},"brandfetch":{"namespace":"brandfetch","methods":{"get_brand":"getBrand","search":"searchBrands"}},"brex":{"namespace":"legacy.brex","methods":{"archive_budget":"archiveBudget","create_budget":"createBudget","create_spend_limit":"createSpendLimit","create_transfer":"createTransfer","create_vendor":"createVendor","get_budget":"getBudget","get_cash_account":"getCashAccount","get_company":"getCompany","get_current_user":"getCurrentUser","get_expense":"getExpense","get_spend_limit":"getSpendLimit","get_transfer":"getTransfer","get_user":"getUser","get_vendor":"getVendor","list_budgets":"listBudgets","list_card_accounts":"listCardAccounts","list_card_statements":"listCardStatements","list_card_transactions":"listCardTransactions","list_cards":"listCards","list_cash_accounts":"listCashAccounts","list_cash_statements":"listCashStatements","list_cash_transactions":"listCashTransactions","list_departments":"listDepartments","list_expenses":"listExpenses","list_locations":"listLocations","list_spend_limits":"listSpendLimits","list_titles":"listTitles","list_transfers":"listTransfers","list_users":"listUsers","list_vendors":"listVendors","match_receipt":"matchReceipt","update_expense":"updateExpenseMemo","update_vendor":"updateVendor","upload_receipt":"uploadReceipt"}},"brex_v2":{"namespace":"brex","methods":{"archive_budget":"archiveBudget","create_budget":"createBudget","create_spend_limit":"createSpendLimit","create_transfer":"createTransfer","create_vendor":"createVendor","get_budget":"getBudget","get_cash_account":"getCashAccount","get_company":"getCompany","get_current_user":"getCurrentUser","get_expense":"getExpense","get_spend_limit":"getSpendLimit","get_transfer":"getTransfer","get_user":"getUser","get_vendor":"getVendor","list_budgets":"listBudgets","list_card_accounts":"listCardAccounts","list_card_statements":"listCardStatements","list_card_transactions":"listCardTransactions","list_cards":"listCards","list_cash_accounts":"listCashAccounts","list_cash_statements":"listCashStatements","list_cash_transactions":"listCashTransactions","list_departments":"listDepartments","list_expenses":"listExpenses","list_locations":"listLocations","list_spend_limits":"listSpendLimits","list_titles":"listTitles","list_transfers":"listTransfers","list_users":"listUsers","list_vendors":"listVendors","match_receipt":"matchReceipt","update_expense":"updateExpenseMemo","update_vendor":"updateVendor","upload_receipt":"uploadReceipt"},"params":{"action":{"oauthCredential":"credential"}}},"brightdata":{"namespace":"legacy.brightdata","methods":{"cancel_snapshot":"cancelSnapshot","discover":"discover","download_snapshot":"downloadSnapshot","scrape_dataset":"scrapeDataset","scrape_url":"scrapeUrl","serp_search":"serpSearch","snapshot_status":"snapshotStatus","sync_scrape":"syncScrape"}},"brightdata_v2":{"namespace":"brightdata","methods":{"cancel_snapshot":"cancelSnapshot","discover":"discover","download_snapshot":"downloadSnapshot","scrape_dataset":"scrapeDataset","scrape_url":"scrapeUrl","serp_search":"serpSearch","snapshot_status":"snapshotStatus","sync_scrape":"syncScrape"},"params":{"action":{"oauthCredential":"credential"}}},"browser_use":{"namespace":"legacy.browserUse"},"browser_use_v2":{"namespace":"browserUse","params":{"action":{"oauthCredential":"credential"}}},"buffer":{"namespace":"legacy.buffer","methods":{"create_idea":"createIdea","create_post":"createPost","delete_post":"deletePost","edit_post":"editPost","get_account":"getAccount","get_aggregated_post_metrics":"getAggregatedPostMetrics","get_channel":"getChannel","get_channels":"getChannels","get_daily_posting_limits":"getDailyPostingLimits","get_idea_groups":"getIdeaGroups","get_ideas":"getIdeas","get_post":"getPost","get_posts":"getPosts"}},"buffer_v2":{"namespace":"buffer","methods":{"create_idea":"createIdea","create_post":"createPost","delete_post":"deletePost","edit_post":"editPost","get_account":"getAccount","get_aggregated_post_metrics":"getAggregatedPostMetrics","get_channel":"getChannel","get_channels":"getChannels","get_daily_posting_limits":"getDailyPostingLimits","get_idea_groups":"getIdeaGroups","get_ideas":"getIdeas","get_post":"getPost","get_posts":"getPosts"},"params":{"action":{"oauthCredential":"credential"}}},"calcom":{"namespace":"calcom","methods":{"calcom_cancel_booking":"cancelBooking","calcom_confirm_booking":"confirmBooking","calcom_create_booking":"createBooking","calcom_create_event_type":"createEventType","calcom_create_schedule":"createSchedule","calcom_decline_booking":"declineBooking","calcom_delete_event_type":"deleteEventType","calcom_delete_schedule":"deleteSchedule","calcom_get_booking":"getBooking","calcom_get_default_schedule":"getDefaultSchedule","calcom_get_event_type":"getEventType","calcom_get_schedule":"getSchedule","calcom_get_slots":"getAvailableSlots","calcom_list_bookings":"listBookings","calcom_list_event_types":"listEventTypes","calcom_list_schedules":"listSchedules","calcom_reschedule_booking":"rescheduleBooking","calcom_update_event_type":"updateEventType","calcom_update_schedule":"updateSchedule"},"triggers":{"calcom_booking_cancelled":"bookingCancelled","calcom_booking_created":"bookingCreated","calcom_booking_paid":"bookingPaid","calcom_booking_rejected":"bookingRejected","calcom_booking_requested":"bookingRequested","calcom_booking_rescheduled":"bookingRescheduled","calcom_meeting_ended":"meetingEnded","calcom_recording_ready":"recordingReady","calcom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"calendly":{"namespace":"legacy.calendly","methods":{"calendly_cancel_event":"cancelEvent","calendly_create_event_invitee":"bookMeeting","calendly_create_invitee_no_show":"markInviteeNoShow","calendly_create_scheduling_link":"createSchedulingLink","calendly_delete_invitee_no_show":"unmarkInviteeNoShow","calendly_get_current_user":"getCurrentUser","calendly_get_event_invitee":"getEventInvitee","calendly_get_event_type":"getEventType","calendly_get_scheduled_event":"getScheduledEvent","calendly_get_user":"getUser","calendly_list_event_invitees":"listEventInvitees","calendly_list_event_type_available_times":"listEventTypeAvailableTimes","calendly_list_event_types":"listEventTypes","calendly_list_organization_memberships":"listOrganizationMemberships","calendly_list_routing_form_submissions":"listRoutingFormSubmissions","calendly_list_routing_forms":"listRoutingForms","calendly_list_scheduled_events":"listScheduledEvents","calendly_list_user_availability_schedules":"listUserAvailabilitySchedules","calendly_list_user_busy_times":"listUserBusyTimes"},"triggers":{"calendly_invitee_canceled":"inviteeCanceled","calendly_invitee_created":"inviteeCreated","calendly_routing_form_submitted":"routingFormSubmitted","calendly_webhook":"webhook"}},"calendly_v2":{"namespace":"calendly","methods":{"calendly_cancel_event":"cancelEvent","calendly_create_event_invitee":"bookMeeting","calendly_create_invitee_no_show":"markInviteeNoShow","calendly_create_scheduling_link":"createSchedulingLink","calendly_delete_invitee_no_show":"unmarkInviteeNoShow","calendly_get_current_user":"getCurrentUser","calendly_get_event_invitee":"getEventInvitee","calendly_get_event_type":"getEventType","calendly_get_scheduled_event":"getScheduledEvent","calendly_get_user":"getUser","calendly_list_event_invitees":"listEventInvitees","calendly_list_event_type_available_times":"listEventTypeAvailableTimes","calendly_list_event_types":"listEventTypes","calendly_list_organization_memberships":"listOrganizationMemberships","calendly_list_routing_form_submissions":"listRoutingFormSubmissions","calendly_list_routing_forms":"listRoutingForms","calendly_list_scheduled_events":"listScheduledEvents","calendly_list_user_availability_schedules":"listUserAvailabilitySchedules","calendly_list_user_busy_times":"listUserBusyTimes"},"triggers":{"calendly_invitee_canceled":"inviteeCanceled","calendly_invitee_created":"inviteeCreated","calendly_routing_form_submitted":"routingFormSubmitted","calendly_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"cbinsights":{"namespace":"legacy.cbinsights","methods":{"chat":"askChatCbi","get_commercial_maturity_history":"getCommercialMaturityHistory","get_exit_probability_history":"getExitProbabilityHistory","get_mosaic_history":"getMosaicHistory","get_org_business_relationships":"getOrganizationBusinessRelationships","get_org_funding_window":"getOrganizationFundingWindow","get_org_fundings":"getOrganizationFundings","get_org_investments":"getOrganizationInvestments","get_org_management_and_board":"getOrganizationManagementAndBoard","get_org_outlook":"getOrganizationOutlook","get_org_portfolio_exits":"getOrganizationPortfolioExits","get_org_revenue":"getOrganizationRevenue","get_scouting_report":"getScoutingReport","get_strategy_map":"getStrategyMap","list_business_relationships":"listBusinessRelationships","list_funding_window":"listFundingWindows","list_fundings":"listFundings","list_investments":"listInvestments","list_management_and_board":"listManagementAndBoard","list_outlook":"listOutlook","list_portfolio_exits":"listPortfolioExits","list_revenue":"listRevenue","lookup_organizations":"lookUpOrganizations","rag":"retrieveContext","search_firmographics":"searchFirmographics"}},"cbinsights_v2":{"namespace":"cbinsights","methods":{"chat":"askChatCbi","get_commercial_maturity_history":"getCommercialMaturityHistory","get_exit_probability_history":"getExitProbabilityHistory","get_mosaic_history":"getMosaicHistory","get_org_business_relationships":"getOrganizationBusinessRelationships","get_org_funding_window":"getOrganizationFundingWindow","get_org_fundings":"getOrganizationFundings","get_org_investments":"getOrganizationInvestments","get_org_management_and_board":"getOrganizationManagementAndBoard","get_org_outlook":"getOrganizationOutlook","get_org_portfolio_exits":"getOrganizationPortfolioExits","get_org_revenue":"getOrganizationRevenue","get_scouting_report":"getScoutingReport","get_strategy_map":"getStrategyMap","list_business_relationships":"listBusinessRelationships","list_funding_window":"listFundingWindows","list_fundings":"listFundings","list_investments":"listInvestments","list_management_and_board":"listManagementAndBoard","list_outlook":"listOutlook","list_portfolio_exits":"listPortfolioExits","list_revenue":"listRevenue","lookup_organizations":"lookUpOrganizations","rag":"retrieveContext","search_firmographics":"searchFirmographics"},"params":{"action":{"oauthCredential":"credential"}}},"chat_trigger":{"namespace":"legacy.chatTrigger"},"checkr":{"namespace":"legacy.checkr","methods":{"add_report_tag":"addReportTag","apply_report_review_action":"applyReportReviewAction","cancel_adverse_action":"cancelAdverseAction","cancel_continuous_check":"cancelContinuousCheck","cancel_invitation":"cancelInvitation","cancel_subscription":"cancelSubscription","complete_report":"completeReport","create_adverse_action":"createAdverseAction","create_candidate":"createCandidate","create_continuous_check":"createContinuousCheck","create_geo":"createGeo","create_invitation":"inviteCandidate","create_report":"orderReport","create_subscription":"scheduleRecurringCheck","delete_candidate_pii":"deleteCandidatePii","delete_geo":"deleteGeo","get_account":"getAccount","get_adverse_action":"getAdverseAction","get_candidate":"getCandidate","get_continuous_check":"getContinuousCheck","get_document":"getDocument","get_geo":"getGeo","get_invitation":"getInvitation","get_node":"getNode","get_package":"getPackage","get_program":"getProgram","get_report":"getReport","get_report_eta":"getReportEta","get_report_progressive_status":"getReportCheckpoints","get_report_tags":"getReportTags","get_screening":"getScreening","get_subscription":"getSubscription","get_verification":"getVerification","list_adverse_actions":"listAdverseActions","list_adverse_items":"listAdverseItems","list_assessments":"listAssessments","list_candidate_documents":"listCandidateDocuments","list_candidates":"listCandidates","list_continuous_checks":"listContinuousChecks","list_counties":"listCounties","list_geos":"listGeos","list_invitations":"listInvitations","list_nodes":"listNodes","list_packages":"listPackages","list_programs":"listPrograms","list_report_addresses":"listReportAddresses","list_subscriptions":"listSubscriptions","list_users":"listUsers","list_verifications":"listVerifications","remove_report_tag":"removeReportTag","set_report_tags":"setReportTags","update_candidate":"updateCandidate","update_continuous_check":"updateContinuousCheck","update_geo":"updateGeo","update_report":"updateReport","update_subscription":"updateSubscription"},"triggers":{"checkr_adverse_action_canceled":"adverseActionCanceled","checkr_adverse_action_completed":"adverseActionCompleted","checkr_adverse_action_created":"adverseActionCreated","checkr_adverse_action_notice_not_delivered":"adverseActionNoticeNotDelivered","checkr_adverse_action_paused":"adverseActionPaused","checkr_adverse_action_resumed":"adverseActionResumed","checkr_candidate_created":"candidateCreated","checkr_candidate_updated":"candidateUpdated","checkr_continuous_check_confirmation_required":"continuousCheckConfirmationRequired","checkr_continuous_check_subscription_error":"continuousCheckSubscriptionError","checkr_invitation_completed":"invitationCompleted","checkr_invitation_created":"invitationCreated","checkr_invitation_deleted":"invitationDeleted","checkr_invitation_expired":"invitationExpired","checkr_report_canceled":"reportCanceled","checkr_report_completed":"reportCompleted","checkr_report_created":"reportCreated","checkr_report_dispute_completed":"reportDisputeCompleted","checkr_report_disputed":"reportDisputed","checkr_report_engaged":"reportEngaged","checkr_report_paused":"reportPaused","checkr_report_post_adverse_action":"reportPostAdverseAction","checkr_report_pre_adverse_action":"reportPreAdverseAction","checkr_report_resumed":"reportResumed","checkr_report_suspended":"reportSuspended","checkr_report_updated":"reportUpdated","checkr_report_upgraded":"reportUpgraded","checkr_verification_completed":"verificationCompleted","checkr_verification_created":"verificationCreated","checkr_verification_processed":"verificationProcessed","checkr_webhook":"webhook"}},"checkr_v2":{"namespace":"checkr","methods":{"add_report_tag":"addReportTag","apply_report_review_action":"applyReportReviewAction","cancel_adverse_action":"cancelAdverseAction","cancel_continuous_check":"cancelContinuousCheck","cancel_invitation":"cancelInvitation","cancel_subscription":"cancelSubscription","complete_report":"completeReport","create_adverse_action":"createAdverseAction","create_candidate":"createCandidate","create_continuous_check":"createContinuousCheck","create_geo":"createGeo","create_invitation":"inviteCandidate","create_report":"orderReport","create_subscription":"scheduleRecurringCheck","delete_candidate_pii":"deleteCandidatePii","delete_geo":"deleteGeo","get_account":"getAccount","get_adverse_action":"getAdverseAction","get_candidate":"getCandidate","get_continuous_check":"getContinuousCheck","get_document":"getDocument","get_geo":"getGeo","get_invitation":"getInvitation","get_node":"getNode","get_package":"getPackage","get_program":"getProgram","get_report":"getReport","get_report_eta":"getReportEta","get_report_progressive_status":"getReportCheckpoints","get_report_tags":"getReportTags","get_screening":"getScreening","get_subscription":"getSubscription","get_verification":"getVerification","list_adverse_actions":"listAdverseActions","list_adverse_items":"listAdverseItems","list_assessments":"listAssessments","list_candidate_documents":"listCandidateDocuments","list_candidates":"listCandidates","list_continuous_checks":"listContinuousChecks","list_counties":"listCounties","list_geos":"listGeos","list_invitations":"listInvitations","list_nodes":"listNodes","list_packages":"listPackages","list_programs":"listPrograms","list_report_addresses":"listReportAddresses","list_subscriptions":"listSubscriptions","list_users":"listUsers","list_verifications":"listVerifications","remove_report_tag":"removeReportTag","set_report_tags":"setReportTags","update_candidate":"updateCandidate","update_continuous_check":"updateContinuousCheck","update_geo":"updateGeo","update_report":"updateReport","update_subscription":"updateSubscription"},"triggers":{"checkr_adverse_action_canceled":"adverseActionCanceled","checkr_adverse_action_completed":"adverseActionCompleted","checkr_adverse_action_created":"adverseActionCreated","checkr_adverse_action_notice_not_delivered":"adverseActionNoticeNotDelivered","checkr_adverse_action_paused":"adverseActionPaused","checkr_adverse_action_resumed":"adverseActionResumed","checkr_candidate_created":"candidateCreated","checkr_candidate_updated":"candidateUpdated","checkr_continuous_check_confirmation_required":"continuousCheckConfirmationRequired","checkr_continuous_check_subscription_error":"continuousCheckSubscriptionError","checkr_invitation_completed":"invitationCompleted","checkr_invitation_created":"invitationCreated","checkr_invitation_deleted":"invitationDeleted","checkr_invitation_expired":"invitationExpired","checkr_report_canceled":"reportCanceled","checkr_report_completed":"reportCompleted","checkr_report_created":"reportCreated","checkr_report_dispute_completed":"reportDisputeCompleted","checkr_report_disputed":"reportDisputed","checkr_report_engaged":"reportEngaged","checkr_report_paused":"reportPaused","checkr_report_post_adverse_action":"reportPostAdverseAction","checkr_report_pre_adverse_action":"reportPreAdverseAction","checkr_report_resumed":"reportResumed","checkr_report_suspended":"reportSuspended","checkr_report_updated":"reportUpdated","checkr_report_upgraded":"reportUpgraded","checkr_verification_completed":"verificationCompleted","checkr_verification_created":"verificationCreated","checkr_verification_processed":"verificationProcessed","checkr_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"circleback":{"namespace":"legacy.circleback","methods":{"add_tag_to_meetings":"addTagToMeetings","create_tag":"createTag","delete_action_item":"deleteActionItem","delete_meeting":"deleteMeeting","delete_tag":"deleteTag","get_company":"getCompany","get_meeting":"getMeeting","get_person":"getPerson","get_transcript":"getTranscript","list_action_items":"listActionItems","list_calendar_events":"listCalendarEvents","list_companies":"listCompanies","list_meetings":"listMeetings","list_people":"listPeople","list_tags":"listTags","remove_tag_from_meetings":"removeTagFromMeetings","search_meetings":"searchMeetings","update_action_item":"updateActionItem","update_meeting":"updateMeeting","update_tag":"updateTag"},"triggers":{"circleback_meeting_completed":"meetingCompleted","circleback_meeting_notes":"meetingNotes","circleback_webhook":"webhook"}},"circleback_v2":{"namespace":"circleback","methods":{"add_tag_to_meetings":"addTagToMeetings","create_tag":"createTag","delete_action_item":"deleteActionItem","delete_meeting":"deleteMeeting","delete_tag":"deleteTag","get_company":"getCompany","get_meeting":"getMeeting","get_person":"getPerson","get_transcript":"getTranscript","list_action_items":"listActionItems","list_calendar_events":"listCalendarEvents","list_companies":"listCompanies","list_meetings":"listMeetings","list_people":"listPeople","list_tags":"listTags","remove_tag_from_meetings":"removeTagFromMeetings","search_meetings":"searchMeetings","update_action_item":"updateActionItem","update_meeting":"updateMeeting","update_tag":"updateTag"},"triggers":{"circleback_meeting_completed":"meetingCompleted","circleback_meeting_notes":"meetingNotes","circleback_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"clay":{"namespace":"clay"},"clerk":{"namespace":"legacy.clerk","methods":{"clerk_add_organization_member":"addOrganizationMember","clerk_ban_user":"banUser","clerk_create_actor_token":"createActorToken","clerk_create_allowlist_identifier":"createAllowlistIdentifier","clerk_create_blocklist_identifier":"createBlocklistIdentifier","clerk_create_organization":"createOrganization","clerk_create_organization_invitation":"createOrganizationInvitation","clerk_create_user":"createUser","clerk_delete_allowlist_identifier":"deleteAllowlistIdentifier","clerk_delete_blocklist_identifier":"deleteBlocklistIdentifier","clerk_delete_organization":"deleteOrganization","clerk_delete_user":"deleteUser","clerk_get_jwt_template":"getJwtTemplate","clerk_get_organization":"getOrganization","clerk_get_session":"getSession","clerk_get_user":"getUser","clerk_get_user_oauth_token":"getUserOauthToken","clerk_list_allowlist_identifiers":"listAllowlistIdentifiers","clerk_list_blocklist_identifiers":"listBlocklistIdentifiers","clerk_list_jwt_templates":"listJwtTemplates","clerk_list_organization_invitations":"listOrganizationInvitations","clerk_list_organization_memberships":"listOrganizationMemberships","clerk_list_organizations":"listOrganizations","clerk_list_sessions":"listSessions","clerk_list_users":"listUsers","clerk_lock_user":"lockUser","clerk_remove_organization_member":"removeOrganizationMember","clerk_revoke_actor_token":"revokeActorToken","clerk_revoke_session":"revokeSession","clerk_unban_user":"unbanUser","clerk_unlock_user":"unlockUser","clerk_update_organization":"updateOrganization","clerk_update_organization_membership":"updateOrganizationMembership","clerk_update_user":"updateUser"},"triggers":{"clerk_organization_created":"organizationCreated","clerk_organization_deleted":"organizationDeleted","clerk_organization_membership_created":"organizationMembershipCreated","clerk_organization_membership_deleted":"organizationMembershipDeleted","clerk_organization_membership_updated":"organizationMembershipUpdated","clerk_organization_updated":"organizationUpdated","clerk_session_created":"sessionCreated","clerk_session_ended":"sessionEnded","clerk_session_removed":"sessionRemoved","clerk_session_revoked":"sessionRevoked","clerk_user_created":"userCreated","clerk_user_deleted":"userDeleted","clerk_user_updated":"userUpdated","clerk_webhook":"webhook"}},"clerk_v2":{"namespace":"clerk","methods":{"clerk_add_organization_member":"addOrganizationMember","clerk_ban_user":"banUser","clerk_create_actor_token":"createActorToken","clerk_create_allowlist_identifier":"createAllowlistIdentifier","clerk_create_blocklist_identifier":"createBlocklistIdentifier","clerk_create_organization":"createOrganization","clerk_create_organization_invitation":"createOrganizationInvitation","clerk_create_user":"createUser","clerk_delete_allowlist_identifier":"deleteAllowlistIdentifier","clerk_delete_blocklist_identifier":"deleteBlocklistIdentifier","clerk_delete_organization":"deleteOrganization","clerk_delete_user":"deleteUser","clerk_get_jwt_template":"getJwtTemplate","clerk_get_organization":"getOrganization","clerk_get_session":"getSession","clerk_get_user":"getUser","clerk_get_user_oauth_token":"getUserOauthToken","clerk_list_allowlist_identifiers":"listAllowlistIdentifiers","clerk_list_blocklist_identifiers":"listBlocklistIdentifiers","clerk_list_jwt_templates":"listJwtTemplates","clerk_list_organization_invitations":"listOrganizationInvitations","clerk_list_organization_memberships":"listOrganizationMemberships","clerk_list_organizations":"listOrganizations","clerk_list_sessions":"listSessions","clerk_list_users":"listUsers","clerk_lock_user":"lockUser","clerk_remove_organization_member":"removeOrganizationMember","clerk_revoke_actor_token":"revokeActorToken","clerk_revoke_session":"revokeSession","clerk_unban_user":"unbanUser","clerk_unlock_user":"unlockUser","clerk_update_organization":"updateOrganization","clerk_update_organization_membership":"updateOrganizationMembership","clerk_update_user":"updateUser"},"triggers":{"clerk_organization_created":"organizationCreated","clerk_organization_deleted":"organizationDeleted","clerk_organization_membership_created":"organizationMembershipCreated","clerk_organization_membership_deleted":"organizationMembershipDeleted","clerk_organization_membership_updated":"organizationMembershipUpdated","clerk_organization_updated":"organizationUpdated","clerk_session_created":"sessionCreated","clerk_session_ended":"sessionEnded","clerk_session_removed":"sessionRemoved","clerk_session_revoked":"sessionRevoked","clerk_user_created":"userCreated","clerk_user_deleted":"userDeleted","clerk_user_updated":"userUpdated","clerk_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"clickhouse":{"namespace":"clickhouse","methods":{"count_rows":"countRows","create_database":"createDatabase","create_table":"createTable","delete":"deleteData","describe_table":"describeTable","drop_database":"dropDatabase","drop_partition":"dropPartition","drop_table":"dropTable","execute":"executeRawSql","insert":"insertRow","insert_rows":"insertRowsBulk","introspect":"introspectSchema","kill_query":"killQuery","list_clusters":"listClusters","list_databases":"listDatabases","list_mutations":"listMutations","list_partitions":"listPartitions","list_running_queries":"listRunningQueries","list_tables":"listTables","optimize_table":"optimizeTable","query":"querySelect","rename_table":"renameTable","show_create_table":"showCreateTable","table_stats":"tableStats","truncate_table":"truncateTable","update":"updateData"}},"clickup":{"namespace":"clickup","methods":{"add_tag_to_task":"addTagToTask","create_checklist":"createChecklist","create_checklist_item":"createChecklistItem","create_comment":"createComment","create_folder":"createFolder","create_list":"createList","create_task":"createTask","create_time_entry":"createTimeEntry","delete_checklist":"deleteChecklist","delete_checklist_item":"deleteChecklistItem","delete_comment":"deleteComment","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","get_comments":"getComments","get_custom_fields":"getCustomFields","get_folders":"getFolders","get_list_members":"getListMembers","get_lists":"getLists","get_running_timer":"getRunningTimer","get_space_tags":"getSpaceTags","get_spaces":"getSpaces","get_task":"getTask","get_task_members":"getTaskMembers","get_tasks":"getTasks","get_time_entries":"getTimeEntries","get_workspaces":"getWorkspaces","remove_custom_field_value":"removeCustomFieldValue","remove_tag_from_task":"removeTagFromTask","search_tasks":"searchTasks","set_custom_field_value":"setCustomFieldValue","start_timer":"startTimer","stop_timer":"stopTimer","update_checklist":"updateChecklist","update_checklist_item":"updateChecklistItem","update_comment":"updateComment","update_task":"updateTask","update_time_entry":"updateTimeEntry","upload_attachment":"uploadAttachment"},"triggers":{"clickup_folder_created":"folderCreated","clickup_folder_deleted":"folderDeleted","clickup_folder_updated":"folderUpdated","clickup_goal_created":"goalCreated","clickup_goal_deleted":"goalDeleted","clickup_goal_updated":"goalUpdated","clickup_key_result_created":"keyResultCreated","clickup_key_result_deleted":"keyResultDeleted","clickup_key_result_updated":"keyResultUpdated","clickup_list_created":"listCreated","clickup_list_deleted":"listDeleted","clickup_list_updated":"listUpdated","clickup_space_created":"spaceCreated","clickup_space_deleted":"spaceDeleted","clickup_space_updated":"spaceUpdated","clickup_task_assignee_updated":"taskAssigneeUpdated","clickup_task_comment_posted":"taskCommentPosted","clickup_task_comment_updated":"taskCommentUpdated","clickup_task_created":"taskCreated","clickup_task_deleted":"taskDeleted","clickup_task_due_date_updated":"taskDueDateUpdated","clickup_task_moved":"taskMoved","clickup_task_priority_updated":"taskPriorityUpdated","clickup_task_status_updated":"taskStatusUpdated","clickup_task_tag_updated":"taskTagUpdated","clickup_task_time_estimate_updated":"taskTimeEstimateUpdated","clickup_task_time_tracked_updated":"taskTimeTrackedUpdated","clickup_task_updated":"taskUpdated","clickup_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"cloudflare":{"namespace":"legacy.cloudflare","methods":{"create_access_application":"createAccessApplication","create_access_group":"createAccessGroup","create_access_policy":"createAccessPolicy","create_access_service_token":"createAccessServiceToken","create_dns_record":"createDnsRecord","create_r2_bucket":"createR2Bucket","create_rate_limit_rule":"createRateLimitingRule","create_ruleset":"createRuleset","create_ruleset_rule":"createRulesetRule","create_tunnel":"createTunnel","create_worker_route":"createWorkerRoute","create_zone":"createZone","delete_access_application":"deleteAccessApplication","delete_access_group":"deleteAccessGroup","delete_access_policy":"deleteAccessPolicy","delete_dns_record":"deleteDnsRecord","delete_r2_bucket":"deleteR2Bucket","delete_r2_bucket_cors":"deleteR2BucketCors","delete_ruleset":"deleteRuleset","delete_ruleset_rule":"deleteRulesetRule","delete_tunnel":"deleteTunnel","delete_worker_route":"deleteWorkerRoute","delete_worker_script":"deleteWorkerScript","delete_zone":"deleteZone","dns_analytics":"dnsAnalytics","get_access_application":"getAccessApplication","get_access_group":"getAccessGroup","get_access_policy":"getAccessPolicy","get_access_service_token":"getAccessServiceToken","get_dns_record":"getDnsRecord","get_r2_bucket":"getR2Bucket","get_r2_bucket_cors":"getR2BucketCors","get_r2_bucket_lifecycle":"getR2BucketLifecycle","get_ruleset":"getRuleset","get_ruleset_entrypoint":"getPhaseEntryPointRuleset","get_tunnel":"getTunnel","get_tunnel_configuration":"getTunnelConfiguration","get_tunnel_token":"getTunnelToken","get_worker_route":"getWorkerRoute","get_worker_script_settings":"getWorkerScriptSettings","get_zone":"getZoneDetails","get_zone_settings":"getZoneSettings","list_access_applications":"listAccessApplications","list_access_groups":"listAccessGroups","list_access_identity_providers":"listAccessIdentityProviders","list_access_policies":"listAccessPolicies","list_access_service_tokens":"listAccessServiceTokens","list_certificates":"listCertificates","list_dns_records":"listDnsRecords","list_managed_ruleset_overrides":"listManagedRulesetOverrides","list_r2_buckets":"listR2Buckets","list_rate_limit_rules":"listRateLimitingRules","list_rulesets":"listRulesets","list_tunnels":"listTunnels","list_worker_routes":"listWorkerRoutes","list_worker_scripts":"listWorkerScripts","list_zones":"listZones","purge_cache":"purgeCache","refresh_access_service_token":"refreshAccessServiceToken","revoke_access_service_token":"revokeAccessServiceToken","rotate_access_service_token":"rotateAccessServiceToken","update_access_application":"updateAccessApplication","update_access_group":"updateAccessGroup","update_access_policy":"updateAccessPolicy","update_access_service_token":"updateAccessServiceToken","update_dns_record":"updateDnsRecord","update_r2_bucket_cors":"updateR2BucketCors","update_r2_bucket_lifecycle":"updateR2BucketLifecycle","update_rate_limit_rule":"updateRateLimitingRule","update_ruleset":"updateRuleset","update_ruleset_rule":"updateRulesetRule","update_tunnel":"updateTunnel","update_tunnel_configuration":"updateTunnelConfiguration","update_worker_route":"updateWorkerRoute","update_zone":"updateZone","update_zone_setting":"updateZoneSetting"}},"cloudflare_v2":{"namespace":"cloudflare","methods":{"create_access_application":"createAccessApplication","create_access_group":"createAccessGroup","create_access_policy":"createAccessPolicy","create_access_service_token":"createAccessServiceToken","create_dns_record":"createDnsRecord","create_r2_bucket":"createR2Bucket","create_rate_limit_rule":"createRateLimitingRule","create_ruleset":"createRuleset","create_ruleset_rule":"createRulesetRule","create_tunnel":"createTunnel","create_worker_route":"createWorkerRoute","create_zone":"createZone","delete_access_application":"deleteAccessApplication","delete_access_group":"deleteAccessGroup","delete_access_policy":"deleteAccessPolicy","delete_dns_record":"deleteDnsRecord","delete_r2_bucket":"deleteR2Bucket","delete_r2_bucket_cors":"deleteR2BucketCors","delete_ruleset":"deleteRuleset","delete_ruleset_rule":"deleteRulesetRule","delete_tunnel":"deleteTunnel","delete_worker_route":"deleteWorkerRoute","delete_worker_script":"deleteWorkerScript","delete_zone":"deleteZone","dns_analytics":"dnsAnalytics","get_access_application":"getAccessApplication","get_access_group":"getAccessGroup","get_access_policy":"getAccessPolicy","get_access_service_token":"getAccessServiceToken","get_dns_record":"getDnsRecord","get_r2_bucket":"getR2Bucket","get_r2_bucket_cors":"getR2BucketCors","get_r2_bucket_lifecycle":"getR2BucketLifecycle","get_ruleset":"getRuleset","get_ruleset_entrypoint":"getPhaseEntryPointRuleset","get_tunnel":"getTunnel","get_tunnel_configuration":"getTunnelConfiguration","get_tunnel_token":"getTunnelToken","get_worker_route":"getWorkerRoute","get_worker_script_settings":"getWorkerScriptSettings","get_zone":"getZoneDetails","get_zone_settings":"getZoneSettings","list_access_applications":"listAccessApplications","list_access_groups":"listAccessGroups","list_access_identity_providers":"listAccessIdentityProviders","list_access_policies":"listAccessPolicies","list_access_service_tokens":"listAccessServiceTokens","list_certificates":"listCertificates","list_dns_records":"listDnsRecords","list_managed_ruleset_overrides":"listManagedRulesetOverrides","list_r2_buckets":"listR2Buckets","list_rate_limit_rules":"listRateLimitingRules","list_rulesets":"listRulesets","list_tunnels":"listTunnels","list_worker_routes":"listWorkerRoutes","list_worker_scripts":"listWorkerScripts","list_zones":"listZones","purge_cache":"purgeCache","refresh_access_service_token":"refreshAccessServiceToken","revoke_access_service_token":"revokeAccessServiceToken","rotate_access_service_token":"rotateAccessServiceToken","update_access_application":"updateAccessApplication","update_access_group":"updateAccessGroup","update_access_policy":"updateAccessPolicy","update_access_service_token":"updateAccessServiceToken","update_dns_record":"updateDnsRecord","update_r2_bucket_cors":"updateR2BucketCors","update_r2_bucket_lifecycle":"updateR2BucketLifecycle","update_rate_limit_rule":"updateRateLimitingRule","update_ruleset":"updateRuleset","update_ruleset_rule":"updateRulesetRule","update_tunnel":"updateTunnel","update_tunnel_configuration":"updateTunnelConfiguration","update_worker_route":"updateWorkerRoute","update_zone":"updateZone","update_zone_setting":"updateZoneSetting"},"params":{"action":{"oauthCredential":"credential"}}},"cloudformation":{"namespace":"legacy.cloudformation","methods":{"cancel_update_stack":"cancelUpdateStack","create_change_set":"createChangeSet","create_stack":"createStack","delete_stack":"deleteStack","describe_change_set":"describeChangeSet","describe_stack_drift_detection_status":"driftDetectionStatus","describe_stack_events":"describeStackEvents","describe_stacks":"describeStacks","detect_stack_drift":"detectStackDrift","execute_change_set":"executeChangeSet","get_template":"getTemplate","get_template_summary":"getTemplateSummary","list_stack_resources":"listStackResources","update_stack":"updateStack","validate_template":"validateTemplate"}},"cloudformation_v2":{"namespace":"cloudformation","methods":{"cancel_update_stack":"cancelUpdateStack","create_change_set":"createChangeSet","create_stack":"createStack","delete_stack":"deleteStack","describe_change_set":"describeChangeSet","describe_stack_drift_detection_status":"driftDetectionStatus","describe_stack_events":"describeStackEvents","describe_stacks":"describeStacks","detect_stack_drift":"detectStackDrift","execute_change_set":"executeChangeSet","get_template":"getTemplate","get_template_summary":"getTemplateSummary","list_stack_resources":"listStackResources","update_stack":"updateStack","validate_template":"validateTemplate"},"params":{"action":{"oauthCredential":"credential"}}},"cloudtrail":{"namespace":"legacy.cloudtrail","methods":{"cancel_query":"cancelLakeQuery","describe_query":"describeLakeQuery","describe_trails":"describeTrails","get_event_data_store":"getEventDataStore","get_event_selectors":"getEventSelectors","get_insight_selectors":"getInsightSelectors","get_query_results":"getLakeQueryResults","get_trail":"getTrail","get_trail_status":"getTrailStatus","list_event_data_stores":"listEventDataStores","list_tags":"listTags","list_trails":"listTrails","lookup_events":"lookUpEvents","start_query":"startLakeQuery"}},"cloudtrail_v2":{"namespace":"cloudtrail","methods":{"cancel_query":"cancelLakeQuery","describe_query":"describeLakeQuery","describe_trails":"describeTrails","get_event_data_store":"getEventDataStore","get_event_selectors":"getEventSelectors","get_insight_selectors":"getInsightSelectors","get_query_results":"getLakeQueryResults","get_trail":"getTrail","get_trail_status":"getTrailStatus","list_event_data_stores":"listEventDataStores","list_tags":"listTags","list_trails":"listTrails","lookup_events":"lookUpEvents","start_query":"startLakeQuery"},"params":{"action":{"oauthCredential":"credential"}}},"cloudwatch":{"namespace":"legacy.cloudwatch","methods":{"describe_alarm_history":"describeAlarmHistory","describe_alarms":"describeAlarms","describe_log_groups":"describeLogGroups","describe_log_streams":"describeLogStreams","filter_log_events":"filterLogEvents","get_log_events":"getLogEvents","get_metric_statistics":"getMetricStatistics","list_metrics":"listMetrics","mute_alarm":"muteAlarm","put_log_group_retention":"setLogGroupRetention","put_metric_data":"publishMetric","query_logs":"queryLogsInsights","unmute_alarm":"unmuteAlarm"}},"cloudwatch_v2":{"namespace":"cloudwatch","methods":{"describe_alarm_history":"describeAlarmHistory","describe_alarms":"describeAlarms","describe_log_groups":"describeLogGroups","describe_log_streams":"describeLogStreams","filter_log_events":"filterLogEvents","get_log_events":"getLogEvents","get_metric_statistics":"getMetricStatistics","list_metrics":"listMetrics","mute_alarm":"muteAlarm","put_log_group_retention":"setLogGroupRetention","put_metric_data":"publishMetric","query_logs":"queryLogsInsights","unmute_alarm":"unmuteAlarm"},"params":{"action":{"oauthCredential":"credential"}}},"coda":{"namespace":"coda","methods":{"add_custom_domain":"addCustomDomain","add_permission":"shareDoc","change_user_role":"changeUserRole","create_doc":"createDoc","create_folder":"createFolder","create_page":"createPage","delete_custom_domain":"deleteCustomDomain","delete_doc":"deleteDoc","delete_folder":"deleteFolder","delete_page":"deletePage","delete_page_content":"deletePageContent","delete_permission":"removePermission","delete_row":"deleteRow","delete_rows":"deleteRows","export_page":"exportPage","get_acl_settings":"getSharingSettings","get_analytics_last_updated":"getAnalyticsLastUpdated","get_column":"getColumn","get_control":"getControl","get_custom_domain_provider":"getCustomDomainProvider","get_doc":"getDoc","get_doc_analytics_summary":"getDocAnalyticsSummary","get_folder":"getFolder","get_formula":"getFormula","get_mutation_status":"getMutationStatus","get_page":"getPage","get_page_content":"getPageContent","get_page_export_status":"getPageExportStatus","get_row":"getRow","get_sharing_metadata":"getSharingMetadata","get_table":"getTable","list_categories":"listDocCategories","list_columns":"listColumns","list_controls":"listControls","list_custom_domains":"listCustomDomains","list_doc_analytics":"listDocAnalytics","list_docs":"listDocs","list_folder_children":"listSubfolders","list_folders":"listFolders","list_formulas":"listFormulas","list_page_analytics":"listPageAnalytics","list_pages":"listPages","list_permissions":"listPermissions","list_rows":"listRows","list_tables":"listTables","list_workspace_members":"listWorkspaceMembers","list_workspace_roles":"listWorkspaceRoleActivity","publish_doc":"publishDoc","push_button":"pushButton","resolve_browser_link":"resolveBrowserLink","search_principals":"searchUsersAndGroups","trigger_automation":"triggerAutomation","unpublish_doc":"unpublishDoc","update_acl_settings":"updateSharingSettings","update_doc":"updateDoc","update_folder":"updateFolder","update_page":"updatePage","update_row":"updateRow","upsert_rows":"insertOrUpsertRows","whoami":"getCurrentUser"},"params":{"action":{"oauthCredential":"credential"}}},"codepipeline":{"namespace":"legacy.codepipeline","methods":{"disable_stage_transition":"disableStageTransition","enable_stage_transition":"enableStageTransition","get_pipeline":"getPipelineStructure","get_pipeline_execution":"getExecution","get_pipeline_state":"getPipelineState","list_action_executions":"listActionExecutions","list_pipeline_executions":"listExecutions","list_pipelines":"listPipelines","put_approval_result":"approveRejectApproval","retry_stage_execution":"retryStage","start_execution":"startExecution","stop_execution":"stopExecution"}},"codepipeline_v2":{"namespace":"codepipeline","methods":{"disable_stage_transition":"disableStageTransition","enable_stage_transition":"enableStageTransition","get_pipeline":"getPipelineStructure","get_pipeline_execution":"getExecution","get_pipeline_state":"getPipelineState","list_action_executions":"listActionExecutions","list_pipeline_executions":"listExecutions","list_pipelines":"listPipelines","put_approval_result":"approveRejectApproval","retry_stage_execution":"retryStage","start_execution":"startExecution","stop_execution":"stopExecution"},"params":{"action":{"oauthCredential":"credential"}}},"condition":{"namespace":"condition"},"confluence":{"namespace":"legacy.confluence","methods":{"create":"createPage","create_comment":"createComment","delete":"deletePage","delete_attachment":"deleteAttachment","delete_comment":"deleteComment","get_space":"getSpace","list_attachments":"listAttachments","list_comments":"listComments","list_labels":"listLabels","list_spaces":"listSpaces","read":"readPage","search":"searchContent","update":"updatePage","update_comment":"updateComment","upload_attachment":"uploadAttachment"},"params":{"action":{"oauthCredential":"credential"}}},"confluence_v2":{"namespace":"confluence","methods":{"add_label":"addLabel","create":"createPage","create_blogpost":"createBlogPost","create_comment":"createComment","create_page_property":"createPageProperty","create_space":"createSpace","create_space_property":"createSpaceProperty","delete":"deletePage","delete_attachment":"deleteAttachment","delete_blogpost":"deleteBlogPost","delete_comment":"deleteComment","delete_label":"deleteLabel","delete_page_property":"deletePageProperty","delete_space":"deleteSpace","delete_space_property":"deleteSpaceProperty","get_blogpost":"getBlogPost","get_page_ancestors":"getPageAncestors","get_page_children":"getPageChildren","get_page_descendants":"getPageDescendants","get_page_version":"getPageVersion","get_pages_by_label":"getPagesByLabel","get_space":"getSpace","get_task":"getTask","get_user":"getUser","list_attachments":"listAttachments","list_blogposts":"listBlogPosts","list_blogposts_in_space":"listBlogPostsInSpace","list_comments":"listComments","list_labels":"listLabels","list_page_properties":"listPageProperties","list_page_versions":"listPageVersions","list_pages_in_space":"listPagesInSpace","list_space_labels":"listSpaceLabels","list_space_permissions":"listSpacePermissions","list_space_properties":"listSpaceProperties","list_spaces":"listSpaces","list_tasks":"listTasks","read":"readPage","search":"searchContent","search_in_space":"searchInSpace","update":"updatePage","update_blogpost":"updateBlogPost","update_comment":"updateComment","update_space":"updateSpace","update_task":"updateTask","upload_attachment":"uploadAttachment"},"triggers":{"confluence_attachment_created":"attachmentCreated","confluence_attachment_removed":"attachmentRemoved","confluence_attachment_updated":"attachmentUpdated","confluence_blog_created":"blogCreated","confluence_blog_removed":"blogRemoved","confluence_blog_restored":"blogRestored","confluence_blog_updated":"blogUpdated","confluence_comment_created":"commentCreated","confluence_comment_removed":"commentRemoved","confluence_comment_updated":"commentUpdated","confluence_label_added":"labelAdded","confluence_label_removed":"labelRemoved","confluence_page_created":"pageCreated","confluence_page_moved":"pageMoved","confluence_page_permissions_updated":"pagePermissionsUpdated","confluence_page_removed":"pageRemoved","confluence_page_restored":"pageRestored","confluence_page_updated":"pageUpdated","confluence_space_created":"spaceCreated","confluence_space_removed":"spaceRemoved","confluence_space_updated":"spaceUpdated","confluence_user_created":"userCreated","confluence_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"context_dev":{"namespace":"contextDev","methods":{"classify_naics":"classifyNaics","classify_sic":"classifySic","crawl":"crawlWebsite","extract":"extractStructuredData","extract_product":"extractProduct","extract_products":"extractProducts","get_brand":"getBrandByDomain","get_brand_by_email":"getBrandByEmail","get_brand_by_name":"getBrandByName","get_brand_by_ticker":"getBrandByTicker","identify_transaction":"identifyTransaction","map":"mapSitemap","scrape_fonts":"scrapeFonts","scrape_html":"scrapeHtml","scrape_images":"scrapeImages","scrape_markdown":"scrapeMarkdown","scrape_styleguide":"scrapeStyleguide","screenshot":"screenshot","search":"webSearch"}},"convex":{"namespace":"legacy.convex","methods":{"action":"runAction","document_deltas":"documentDeltas","list_documents":"listDocuments","list_tables":"listTables","mutation":"runMutation","query":"runQuery","run_function":"runFunction"}},"convex_v2":{"namespace":"convex","methods":{"action":"runAction","document_deltas":"documentDeltas","list_documents":"listDocuments","list_tables":"listTables","mutation":"runMutation","query":"runQuery","run_function":"runFunction"},"params":{"action":{"oauthCredential":"credential"}}},"credential":{"namespace":"credential","methods":{"find_organization_account":"findOrganizationAccount","find_organization_mcp_connection":"findOrganizationMcpConnection","list":"listCredentials","list_organization_accounts":"listOrganizationAccounts","list_organization_mcp_connections":"listOrganizationMcpConnections","select":"selectCredential"},"triggers":{"credential_group_event":"groupEvent"}},"credential_group":{"namespace":"legacy.credentialGroup","methods":{"get_invite_link":"getInviteLink","list_credentials":"listCredentials","list_mcp_connections":"listMcpConnections","list_people":"listPeople","send_invite":"sendInvite"},"triggers":{"credential_group_event":"event"}},"crowdstrike":{"namespace":"legacy.crowdstrike","methods":{"crowdstrike_create_indicators":"createIndicators","crowdstrike_delete_indicators":"deleteIndicators","crowdstrike_delete_rtr_session":"deleteRtrSession","crowdstrike_execute_rtr_command":"executeRtrCommand","crowdstrike_get_alert_details":"getAlertDetails","crowdstrike_get_case_details":"getCaseDetails","crowdstrike_get_host_group_details":"getHostGroupDetails","crowdstrike_get_indicator_details":"getIndicatorDetails","crowdstrike_get_rtr_command_status":"getRtrCommandStatus","crowdstrike_get_sensor_aggregates":"getSensorAggregates","crowdstrike_get_sensor_details":"getSensorDetails","crowdstrike_get_vulnerability_details":"getVulnerabilityDetails","crowdstrike_init_rtr_session":"initRtrSession","crowdstrike_perform_host_action":"performHostAction","crowdstrike_perform_host_group_action":"performHostGroupAction","crowdstrike_query_alerts":"queryAlerts","crowdstrike_query_cases":"queryCases","crowdstrike_query_host_groups":"queryHostGroups","crowdstrike_query_indicators":"queryIndicators","crowdstrike_query_sensors":"querySensors","crowdstrike_query_vulnerabilities":"queryVulnerabilities","crowdstrike_update_alerts":"updateAlerts","crowdstrike_update_indicators":"updateIndicators"}},"crowdstrike_v2":{"namespace":"crowdstrike","methods":{"crowdstrike_create_indicators":"createIndicators","crowdstrike_delete_indicators":"deleteIndicators","crowdstrike_delete_rtr_session":"deleteRtrSession","crowdstrike_execute_rtr_command":"executeRtrCommand","crowdstrike_get_alert_details":"getAlertDetails","crowdstrike_get_case_details":"getCaseDetails","crowdstrike_get_host_group_details":"getHostGroupDetails","crowdstrike_get_indicator_details":"getIndicatorDetails","crowdstrike_get_rtr_command_status":"getRtrCommandStatus","crowdstrike_get_sensor_aggregates":"getSensorAggregates","crowdstrike_get_sensor_details":"getSensorDetails","crowdstrike_get_vulnerability_details":"getVulnerabilityDetails","crowdstrike_init_rtr_session":"initRtrSession","crowdstrike_perform_host_action":"performHostAction","crowdstrike_perform_host_group_action":"performHostGroupAction","crowdstrike_query_alerts":"queryAlerts","crowdstrike_query_cases":"queryCases","crowdstrike_query_host_groups":"queryHostGroups","crowdstrike_query_indicators":"queryIndicators","crowdstrike_query_sensors":"querySensors","crowdstrike_query_vulnerabilities":"queryVulnerabilities","crowdstrike_update_alerts":"updateAlerts","crowdstrike_update_indicators":"updateIndicators"},"params":{"action":{"oauthCredential":"credential"}}},"crunchbase":{"namespace":"legacy.crunchbase","methods":{"autocomplete":"autocomplete","get_acquisition":"getAcquisition","get_entity":"getAnyEntity","get_entity_card":"getEntityCard","get_fields_metadata":"getFieldsMetadata","get_funding_round":"getFundingRound","get_organization":"getOrganization","get_person":"getPerson","list_deleted_entities":"listDeletedEntities","search_acquisitions":"searchAcquisitions","search_entities":"searchAnyCollection","search_funding_rounds":"searchFundingRounds","search_organizations":"searchOrganizations","search_people":"searchPeople"}},"crunchbase_v2":{"namespace":"crunchbase","methods":{"autocomplete":"autocomplete","get_acquisition":"getAcquisition","get_entity":"getAnyEntity","get_entity_card":"getEntityCard","get_fields_metadata":"getFieldsMetadata","get_funding_round":"getFundingRound","get_organization":"getOrganization","get_person":"getPerson","list_deleted_entities":"listDeletedEntities","search_acquisitions":"searchAcquisitions","search_entities":"searchAnyCollection","search_funding_rounds":"searchFundingRounds","search_organizations":"searchOrganizations","search_people":"searchPeople"},"params":{"action":{"oauthCredential":"credential"}}},"cursor":{"namespace":"legacy.cursor","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"}},"cursor_v2":{"namespace":"legacy.cursorV2","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"}},"cursor_v3":{"namespace":"cursor","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"},"params":{"action":{"oauthCredential":"credential"}}},"dagster":{"namespace":"dagster","methods":{"delete_run":"deleteRun","get_asset":"getAsset","get_run":"getRun","get_run_logs":"getRunLogs","launch_run":"launchRun","list_assets":"listAssets","list_jobs":"listJobs","list_runs":"listRuns","list_schedules":"listSchedules","list_sensors":"listSensors","materialize_assets":"materializeAssets","reexecute_run":"reexecuteRun","report_asset_materialization":"reportAssetMaterialization","start_schedule":"startSchedule","start_sensor":"startSensor","stop_schedule":"stopSchedule","stop_sensor":"stopSensor","terminate_run":"terminateRun","wipe_asset":"wipeAsset"}},"databricks":{"namespace":"legacy.databricks","methods":{"cancel_all_runs":"cancelAllRuns","cancel_run":"cancelRun","cancel_statement":"cancelStatement","create_cluster":"createCluster","create_job":"createJob","create_warehouse":"createWarehouse","delete_cluster":"deleteCluster","delete_job":"deleteJob","delete_run":"deleteRun","delete_warehouse":"deleteWarehouse","edit_cluster":"editCluster","edit_warehouse":"editWarehouse","execute_sql":"executeSql","genie_agent_ask":"askGenieAgent","genie_agent_cancel":"cancelGenieAgentResponse","genie_agent_list_items":"listGenieAgentItems","genie_ask":"askGenie","genie_create_space":"createGenieSpace","genie_delete_conversation":"deleteGenieConversation","genie_delete_message":"deleteGenieMessage","genie_delete_space":"trashGenieSpace","genie_download_visualization":"downloadGenieVisualization","genie_execute_query":"executeGenieQuery","genie_get_message":"getGenieMessage","genie_get_query_result":"getGenieQueryResult","genie_get_space":"getGenieSpace","genie_list_conversations":"listGenieConversations","genie_list_messages":"listGenieMessages","genie_list_spaces":"listGenieSpaces","genie_send_feedback":"sendGenieFeedback","genie_update_space":"updateGenieSpace","get_cluster":"getCluster","get_job":"getJob","get_run":"getRun","get_run_output":"getRunOutput","get_statement":"getStatement","get_statement_chunk":"getStatementChunk","get_warehouse":"getWarehouse","list_clusters":"listClusters","list_jobs":"listJobs","list_runs":"listRuns","list_warehouses":"listWarehouses","repair_run":"repairRun","reset_job":"resetJob","resize_cluster":"resizeCluster","restart_cluster":"restartCluster","run_job":"runJob","start_cluster":"startCluster","start_warehouse":"startWarehouse","stop_warehouse":"stopWarehouse","submit_run":"submitRun","terminate_cluster":"terminateCluster","update_job":"updateJob"}},"databricks_v2":{"namespace":"databricks","methods":{"cancel_all_runs":"cancelAllRuns","cancel_run":"cancelRun","cancel_statement":"cancelStatement","create_cluster":"createCluster","create_job":"createJob","create_warehouse":"createWarehouse","delete_cluster":"deleteCluster","delete_job":"deleteJob","delete_run":"deleteRun","delete_warehouse":"deleteWarehouse","edit_cluster":"editCluster","edit_warehouse":"editWarehouse","execute_sql":"executeSql","genie_agent_ask":"askGenieAgent","genie_agent_cancel":"cancelGenieAgentResponse","genie_agent_list_items":"listGenieAgentItems","genie_ask":"askGenie","genie_create_space":"createGenieSpace","genie_delete_conversation":"deleteGenieConversation","genie_delete_message":"deleteGenieMessage","genie_delete_space":"trashGenieSpace","genie_download_visualization":"downloadGenieVisualization","genie_execute_query":"executeGenieQuery","genie_get_message":"getGenieMessage","genie_get_query_result":"getGenieQueryResult","genie_get_space":"getGenieSpace","genie_list_conversations":"listGenieConversations","genie_list_messages":"listGenieMessages","genie_list_spaces":"listGenieSpaces","genie_send_feedback":"sendGenieFeedback","genie_update_space":"updateGenieSpace","get_cluster":"getCluster","get_job":"getJob","get_run":"getRun","get_run_output":"getRunOutput","get_statement":"getStatement","get_statement_chunk":"getStatementChunk","get_warehouse":"getWarehouse","list_clusters":"listClusters","list_jobs":"listJobs","list_runs":"listRuns","list_warehouses":"listWarehouses","repair_run":"repairRun","reset_job":"resetJob","resize_cluster":"resizeCluster","restart_cluster":"restartCluster","run_job":"runJob","start_cluster":"startCluster","start_warehouse":"startWarehouse","stop_warehouse":"stopWarehouse","submit_run":"submitRun","terminate_cluster":"terminateCluster","update_job":"updateJob"},"params":{"action":{"oauthCredential":"credential"}}},"datadog":{"namespace":"legacy.datadog","methods":{"datadog_add_incident_todo":"addIncidentTodo","datadog_cancel_downtime":"cancelDowntime","datadog_create_dashboard":"createDashboard","datadog_create_downtime":"createDowntime","datadog_create_event":"createEvent","datadog_create_incident":"createIncident","datadog_create_monitor":"createMonitor","datadog_create_slo":"createSlo","datadog_delete_dashboard":"deleteDashboard","datadog_delete_slo":"deleteSlo","datadog_get_browser_synthetics_results":"getBrowserSyntheticTestResults","datadog_get_dashboard":"getDashboard","datadog_get_incident":"getIncident","datadog_get_monitor":"getMonitor","datadog_get_security_signal":"getSecuritySignal","datadog_get_slo":"getSlo","datadog_get_slo_history":"getSloHistory","datadog_get_synthetics_results":"getSyntheticTestResults","datadog_get_synthetics_test":"getSyntheticTest","datadog_list_dashboards":"listDashboards","datadog_list_downtimes":"listDowntimes","datadog_list_incidents":"listIncidents","datadog_list_monitors":"listMonitors","datadog_list_security_rules":"listSecurityRules","datadog_list_security_signals":"listSecuritySignals","datadog_list_services":"listServices","datadog_list_slos":"listSlos","datadog_list_synthetics_tests":"listSyntheticTests","datadog_mute_monitor":"muteMonitor","datadog_query_logs":"queryLogs","datadog_query_timeseries":"queryTimeseries","datadog_search_spans":"searchSpans","datadog_send_logs":"sendLogs","datadog_submit_metrics":"submitMetrics","datadog_trigger_synthetics_tests":"triggerSyntheticTests","datadog_unmute_monitor":"unmuteMonitor","datadog_update_incident":"updateIncident","datadog_update_security_signal_assignee":"assignSecuritySignal","datadog_update_security_signal_state":"updateSecuritySignalState","datadog_update_slo":"updateSlo","datadog_update_synthetics_status":"pauseOrStartSyntheticTest"}},"datadog_v2":{"namespace":"datadog","methods":{"datadog_add_incident_todo":"addIncidentTodo","datadog_cancel_downtime":"cancelDowntime","datadog_create_dashboard":"createDashboard","datadog_create_downtime":"createDowntime","datadog_create_event":"createEvent","datadog_create_incident":"createIncident","datadog_create_monitor":"createMonitor","datadog_create_slo":"createSlo","datadog_delete_dashboard":"deleteDashboard","datadog_delete_slo":"deleteSlo","datadog_get_browser_synthetics_results":"getBrowserSyntheticTestResults","datadog_get_dashboard":"getDashboard","datadog_get_incident":"getIncident","datadog_get_monitor":"getMonitor","datadog_get_security_signal":"getSecuritySignal","datadog_get_slo":"getSlo","datadog_get_slo_history":"getSloHistory","datadog_get_synthetics_results":"getSyntheticTestResults","datadog_get_synthetics_test":"getSyntheticTest","datadog_list_dashboards":"listDashboards","datadog_list_downtimes":"listDowntimes","datadog_list_incidents":"listIncidents","datadog_list_monitors":"listMonitors","datadog_list_security_rules":"listSecurityRules","datadog_list_security_signals":"listSecuritySignals","datadog_list_services":"listServices","datadog_list_slos":"listSlos","datadog_list_synthetics_tests":"listSyntheticTests","datadog_mute_monitor":"muteMonitor","datadog_query_logs":"queryLogs","datadog_query_timeseries":"queryTimeseries","datadog_search_spans":"searchSpans","datadog_send_logs":"sendLogs","datadog_submit_metrics":"submitMetrics","datadog_trigger_synthetics_tests":"triggerSyntheticTests","datadog_unmute_monitor":"unmuteMonitor","datadog_update_incident":"updateIncident","datadog_update_security_signal_assignee":"assignSecuritySignal","datadog_update_security_signal_state":"updateSecuritySignalState","datadog_update_slo":"updateSlo","datadog_update_synthetics_status":"pauseOrStartSyntheticTest"},"params":{"action":{"oauthCredential":"credential"}}},"datagma":{"namespace":"datagma","methods":{"datagma_enrich_company":"enrichCompany","datagma_enrich_person":"enrichPerson","datagma_find_email":"findEmail","datagma_find_phone":"findPhone","datagma_get_credits":"getRemainingCredits"}},"daytona":{"namespace":"legacy.daytona","methods":{"create_sandbox":"createSandbox","delete_sandbox":"deleteSandbox","download_file":"downloadFile","execute_command":"executeCommand","get_sandbox":"getSandbox","git_clone":"gitClone","list_files":"listFiles","list_sandboxes":"listSandboxes","run_code":"runCode","start_sandbox":"startSandbox","stop_sandbox":"stopSandbox","upload_file":"uploadFile"}},"daytona_v2":{"namespace":"daytona","methods":{"create_sandbox":"createSandbox","delete_sandbox":"deleteSandbox","download_file":"downloadFile","execute_command":"executeCommand","get_sandbox":"getSandbox","git_clone":"gitClone","list_files":"listFiles","list_sandboxes":"listSandboxes","run_code":"runCode","start_sandbox":"startSandbox","stop_sandbox":"stopSandbox","upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"deployments":{"namespace":"deployments","methods":{"deployments_deploy":"deploy","deployments_get_version":"getVersionDetails","deployments_list_versions":"listVersions","deployments_promote":"promoteVersionToLive","deployments_undeploy":"undeploy"}},"devin":{"namespace":"legacy.devin","methods":{"append_session_tags":"appendSessionTags","archive_session":"archiveSession","create_session":"createSession","get_session":"getSession","get_session_tags":"getSessionTags","list_session_attachments":"listSessionAttachments","list_session_messages":"listSessionMessages","list_sessions":"listSessions","replace_session_tags":"replaceSessionTags","send_message":"sendMessage","terminate_session":"terminateSession"}},"devin_v2":{"namespace":"devin","methods":{"append_session_tags":"appendSessionTags","archive_session":"archiveSession","create_session":"createSession","get_session":"getSession","get_session_tags":"getSessionTags","list_session_attachments":"listSessionAttachments","list_session_messages":"listSessionMessages","list_sessions":"listSessions","replace_session_tags":"replaceSessionTags","send_message":"sendMessage","terminate_session":"terminateSession"},"params":{"action":{"oauthCredential":"credential"}}},"discord":{"namespace":"legacy.discord","methods":{"discord_add_reaction":"addReaction","discord_archive_thread":"archiveThread","discord_assign_role":"assignRole","discord_ban_member":"banMember","discord_bulk_delete_messages":"bulkDeleteMessages","discord_create_channel":"createChannel","discord_create_invite":"createInvite","discord_create_role":"createRole","discord_create_thread":"createThread","discord_create_webhook":"createWebhook","discord_delete_channel":"deleteChannel","discord_delete_invite":"deleteInvite","discord_delete_message":"deleteMessage","discord_delete_role":"deleteRole","discord_delete_webhook":"deleteWebhook","discord_edit_message":"editMessage","discord_execute_webhook":"executeWebhook","discord_get_channel":"getChannel","discord_get_invite":"getInvite","discord_get_member":"getMember","discord_get_messages":"getChannelMessages","discord_get_pinned_messages":"getPinnedMessages","discord_get_server":"getServerInformation","discord_get_user":"getUserInformation","discord_get_webhook":"getWebhook","discord_join_thread":"joinThread","discord_kick_member":"kickMember","discord_leave_thread":"leaveThread","discord_list_channels":"listChannels","discord_list_roles":"listRoles","discord_pin_message":"pinMessage","discord_remove_reaction":"removeReaction","discord_remove_role":"removeRole","discord_send_message":"sendMessage","discord_unban_member":"unbanMember","discord_unpin_message":"unpinMessage","discord_update_channel":"updateChannel","discord_update_member":"updateMember","discord_update_role":"updateRole"}},"discord_v2":{"namespace":"discord","methods":{"discord_add_reaction":"addReaction","discord_archive_thread":"archiveThread","discord_assign_role":"assignRole","discord_ban_member":"banMember","discord_bulk_delete_messages":"bulkDeleteMessages","discord_create_channel":"createChannel","discord_create_invite":"createInvite","discord_create_role":"createRole","discord_create_thread":"createThread","discord_create_webhook":"createWebhook","discord_delete_channel":"deleteChannel","discord_delete_invite":"deleteInvite","discord_delete_message":"deleteMessage","discord_delete_role":"deleteRole","discord_delete_webhook":"deleteWebhook","discord_edit_message":"editMessage","discord_execute_webhook":"executeWebhook","discord_get_channel":"getChannel","discord_get_invite":"getInvite","discord_get_member":"getMember","discord_get_messages":"getChannelMessages","discord_get_pinned_messages":"getPinnedMessages","discord_get_server":"getServerInformation","discord_get_user":"getUserInformation","discord_get_webhook":"getWebhook","discord_join_thread":"joinThread","discord_kick_member":"kickMember","discord_leave_thread":"leaveThread","discord_list_channels":"listChannels","discord_list_roles":"listRoles","discord_pin_message":"pinMessage","discord_remove_reaction":"removeReaction","discord_remove_role":"removeRole","discord_send_message":"sendMessage","discord_unban_member":"unbanMember","discord_unpin_message":"unpinMessage","discord_update_channel":"updateChannel","discord_update_member":"updateMember","discord_update_role":"updateRole"},"params":{"action":{"oauthCredential":"credential"}}},"docusign":{"namespace":"docusign","methods":{"create_from_template":"sendFromTemplate","download_document":"downloadDocument","get_envelope":"getEnvelope","list_envelopes":"listEnvelopes","list_recipients":"listRecipients","list_templates":"listTemplates","send_envelope":"sendEnvelope","void_envelope":"voidEnvelope"},"params":{"action":{"oauthCredential":"credential"}}},"downdetector":{"namespace":"downdetector","methods":{"downdetector_get_company":"getCompany","downdetector_get_company_attribution":"getCompanyAttribution","downdetector_get_company_baseline":"getCompanyBaseline","downdetector_get_company_events":"getCompanyEvents","downdetector_get_company_incidents":"getCompanyIncidents","downdetector_get_company_indicators":"getCompanyIndicators","downdetector_get_company_last_15":"getCompanyLast15Minutes","downdetector_get_company_status":"getCompanyStatus","downdetector_get_provider":"getProvider","downdetector_get_reports":"getReports","downdetector_get_site_companies":"getSiteCompanies","downdetector_list_categories":"listCategories","downdetector_list_incidents":"listIncidents","downdetector_list_sites":"listSites","downdetector_search_companies":"searchCompanies"}},"dropbox":{"namespace":"legacy.dropbox","methods":{"dropbox_copy":"copyFileFolder","dropbox_create_folder":"createFolder","dropbox_create_shared_link":"createSharedLink","dropbox_delete":"deleteFileFolder","dropbox_download":"downloadFile","dropbox_get_metadata":"getMetadata","dropbox_list_folder":"listFolder","dropbox_list_revisions":"listRevisions","dropbox_list_shared_links":"listSharedLinks","dropbox_move":"moveFileFolder","dropbox_restore":"restoreFile","dropbox_search":"searchFiles","dropbox_upload":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"dropbox_v2":{"namespace":"dropbox","methods":{"dropbox_copy":"copyFileFolder","dropbox_create_folder":"createFolder","dropbox_create_shared_link":"createSharedLink","dropbox_delete":"deleteFileFolder","dropbox_download":"downloadFile","dropbox_get_metadata":"getMetadata","dropbox_list_folder":"listFolder","dropbox_list_revisions":"listRevisions","dropbox_list_shared_links":"listSharedLinks","dropbox_move":"moveFileFolder","dropbox_restore":"restoreFile","dropbox_search":"searchFiles","dropbox_upload":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"dropcontact":{"namespace":"dropcontact","methods":{"dropcontact_enrich_contact":"enrichContact"}},"dspy":{"namespace":"dspy","methods":{"chain_of_thought":"chainOfThought","predict":"predict","react":"reActAgent"}},"dub":{"namespace":"legacy.dub","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"}},"dub_v2":{"namespace":"legacy.dubV2","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"}},"dub_v3":{"namespace":"dub","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"},"params":{"action":{"oauthCredential":"credential"}}},"duckduckgo":{"namespace":"duckduckgo"},"dynamodb":{"namespace":"legacy.dynamodb","methods":{"delete":"deleteItem","get":"getItem","introspect":"introspect","put":"putItem","query":"query","scan":"scan","update":"updateItem"}},"dynamodb_v2":{"namespace":"dynamodb","methods":{"delete":"deleteItem","get":"getItem","introspect":"introspect","put":"putItem","query":"query","scan":"scan","update":"updateItem"},"params":{"action":{"oauthCredential":"credential"}}},"dynatrace":{"namespace":"legacy.dynatrace","methods":{"dynatrace_add_problem_comment":"addProblemComment","dynatrace_add_tags":"addTags","dynatrace_close_problem":"closeProblem","dynatrace_create_settings_object":"createSettingsObject","dynatrace_create_slo":"createSlo","dynatrace_delete_problem_comment":"deleteProblemComment","dynatrace_delete_settings_object":"deleteSettingsObject","dynatrace_delete_slo":"deleteSlo","dynatrace_delete_tag":"deleteTag","dynatrace_execute_synthetic_monitors":"executeSyntheticMonitors","dynatrace_get_attack":"getAttack","dynatrace_get_audit_logs":"getAuditLogs","dynatrace_get_entity":"getEntity","dynatrace_get_event":"getEvent","dynatrace_get_metric":"getMetricDescriptor","dynatrace_get_problem":"getProblem","dynatrace_get_problem_comment":"getProblemComment","dynatrace_get_security_problem":"getSecurityProblem","dynatrace_get_settings_object":"getSettingsObject","dynatrace_get_slo":"getSlo","dynatrace_get_synthetic_batch":"getSyntheticBatch","dynatrace_ingest_event":"ingestEvent","dynatrace_ingest_logs":"ingestLogs","dynatrace_ingest_metrics":"ingestMetrics","dynatrace_list_attacks":"listAttacks","dynatrace_list_entities":"listEntities","dynatrace_list_entity_types":"listEntityTypes","dynatrace_list_events":"listEvents","dynatrace_list_metrics":"listMetrics","dynatrace_list_problem_comments":"listProblemComments","dynatrace_list_problems":"listProblems","dynatrace_list_remediation_items":"listRemediationItems","dynatrace_list_security_problems":"listSecurityProblems","dynatrace_list_settings_objects":"listSettingsObjects","dynatrace_list_settings_schemas":"listSettingsSchemas","dynatrace_list_slos":"listSlos","dynatrace_list_synthetic_monitors":"listSyntheticMonitors","dynatrace_list_tags":"listTags","dynatrace_mute_security_problem":"muteSecurityProblem","dynatrace_mute_security_problems":"muteSecurityProblemsBulk","dynatrace_query_metrics":"queryMetrics","dynatrace_search_logs":"searchLogs","dynatrace_unmute_security_problem":"unmuteSecurityProblem","dynatrace_unmute_security_problems":"unmuteSecurityProblemsBulk","dynatrace_update_problem_comment":"updateProblemComment","dynatrace_update_settings_object":"updateSettingsObject","dynatrace_update_slo":"updateSlo"}},"dynatrace_v2":{"namespace":"dynatrace","methods":{"dynatrace_add_problem_comment":"addProblemComment","dynatrace_add_tags":"addTags","dynatrace_close_problem":"closeProblem","dynatrace_create_settings_object":"createSettingsObject","dynatrace_create_slo":"createSlo","dynatrace_delete_problem_comment":"deleteProblemComment","dynatrace_delete_settings_object":"deleteSettingsObject","dynatrace_delete_slo":"deleteSlo","dynatrace_delete_tag":"deleteTag","dynatrace_execute_synthetic_monitors":"executeSyntheticMonitors","dynatrace_get_attack":"getAttack","dynatrace_get_audit_logs":"getAuditLogs","dynatrace_get_entity":"getEntity","dynatrace_get_event":"getEvent","dynatrace_get_metric":"getMetricDescriptor","dynatrace_get_problem":"getProblem","dynatrace_get_problem_comment":"getProblemComment","dynatrace_get_security_problem":"getSecurityProblem","dynatrace_get_settings_object":"getSettingsObject","dynatrace_get_slo":"getSlo","dynatrace_get_synthetic_batch":"getSyntheticBatch","dynatrace_ingest_event":"ingestEvent","dynatrace_ingest_logs":"ingestLogs","dynatrace_ingest_metrics":"ingestMetrics","dynatrace_list_attacks":"listAttacks","dynatrace_list_entities":"listEntities","dynatrace_list_entity_types":"listEntityTypes","dynatrace_list_events":"listEvents","dynatrace_list_metrics":"listMetrics","dynatrace_list_problem_comments":"listProblemComments","dynatrace_list_problems":"listProblems","dynatrace_list_remediation_items":"listRemediationItems","dynatrace_list_security_problems":"listSecurityProblems","dynatrace_list_settings_objects":"listSettingsObjects","dynatrace_list_settings_schemas":"listSettingsSchemas","dynatrace_list_slos":"listSlos","dynatrace_list_synthetic_monitors":"listSyntheticMonitors","dynatrace_list_tags":"listTags","dynatrace_mute_security_problem":"muteSecurityProblem","dynatrace_mute_security_problems":"muteSecurityProblemsBulk","dynatrace_query_metrics":"queryMetrics","dynatrace_search_logs":"searchLogs","dynatrace_unmute_security_problem":"unmuteSecurityProblem","dynatrace_unmute_security_problems":"unmuteSecurityProblemsBulk","dynatrace_update_problem_comment":"updateProblemComment","dynatrace_update_settings_object":"updateSettingsObject","dynatrace_update_slo":"updateSlo"},"params":{"action":{"oauthCredential":"credential"}}},"ec2":{"namespace":"legacy.ec2","methods":{"allocate_address":"allocateElasticIp","associate_address":"associateElasticIp","authorize_security_group_ingress":"authorizeSecurityGroupIngress","create_snapshot":"createEbsSnapshot","create_tags":"createTags","delete_snapshot":"deleteEbsSnapshot","delete_tags":"deleteTags","delete_volume":"deleteEbsVolume","describe_addresses":"describeElasticIps","describe_availability_zones":"describeAvailabilityZones","describe_images":"describeAmis","describe_instance_status":"describeInstanceStatus","describe_instances":"describeInstances","describe_internet_gateways":"describeInternetGateways","describe_key_pairs":"describeKeyPairs","describe_nat_gateways":"describeNatGateways","describe_network_acls":"describeNetworkAcls","describe_network_interfaces":"describeNetworkInterfaces","describe_regions":"describeRegions","describe_route_tables":"describeRouteTables","describe_security_groups":"describeSecurityGroups","describe_snapshots":"describeEbsSnapshots","describe_subnets":"describeSubnets","describe_volumes":"describeEbsVolumes","describe_vpc_endpoints":"describeVpcEndpoints","describe_vpc_peering_connections":"describeVpcPeeringConnections","describe_vpcs":"describeVpcs","disassociate_address":"disassociateElasticIp","reboot_instances":"rebootInstances","release_address":"releaseElasticIp","revoke_security_group_ingress":"revokeSecurityGroupIngress","start_instances":"startInstances","stop_instances":"stopInstances","terminate_instances":"terminateInstances"}},"ec2_v2":{"namespace":"ec2","methods":{"allocate_address":"allocateElasticIp","associate_address":"associateElasticIp","authorize_security_group_ingress":"authorizeSecurityGroupIngress","create_snapshot":"createEbsSnapshot","create_tags":"createTags","delete_snapshot":"deleteEbsSnapshot","delete_tags":"deleteTags","delete_volume":"deleteEbsVolume","describe_addresses":"describeElasticIps","describe_availability_zones":"describeAvailabilityZones","describe_images":"describeAmis","describe_instance_status":"describeInstanceStatus","describe_instances":"describeInstances","describe_internet_gateways":"describeInternetGateways","describe_key_pairs":"describeKeyPairs","describe_nat_gateways":"describeNatGateways","describe_network_acls":"describeNetworkAcls","describe_network_interfaces":"describeNetworkInterfaces","describe_regions":"describeRegions","describe_route_tables":"describeRouteTables","describe_security_groups":"describeSecurityGroups","describe_snapshots":"describeEbsSnapshots","describe_subnets":"describeSubnets","describe_volumes":"describeEbsVolumes","describe_vpc_endpoints":"describeVpcEndpoints","describe_vpc_peering_connections":"describeVpcPeeringConnections","describe_vpcs":"describeVpcs","disassociate_address":"disassociateElasticIp","reboot_instances":"rebootInstances","release_address":"releaseElasticIp","revoke_security_group_ingress":"revokeSecurityGroupIngress","start_instances":"startInstances","stop_instances":"stopInstances","terminate_instances":"terminateInstances"},"params":{"action":{"oauthCredential":"credential"}}},"elasticsearch":{"namespace":"elasticsearch","methods":{"elasticsearch_bulk":"bulkOperations","elasticsearch_cluster_health":"clusterHealth","elasticsearch_cluster_stats":"clusterStats","elasticsearch_count":"countDocuments","elasticsearch_create_index":"createIndex","elasticsearch_delete_document":"deleteDocument","elasticsearch_delete_index":"deleteIndex","elasticsearch_get_document":"getDocument","elasticsearch_get_index":"getIndexInfo","elasticsearch_index_document":"indexDocument","elasticsearch_list_indices":"listIndices","elasticsearch_search":"search","elasticsearch_update_document":"updateDocument"}},"elevenlabs":{"namespace":"legacy.elevenlabs","methods":{"audio_isolation":"audioIsolation","edit_voice_settings":"editVoiceSettings","get_user":"getUserInfo","get_voice":"getVoice","get_voice_settings":"getVoiceSettings","list_models":"listModels","list_voices":"listVoices","sound_effects":"soundEffects","speech_to_speech":"speechToSpeech","tts":"textToSpeech"}},"elevenlabs_v2":{"namespace":"elevenlabs","methods":{"audio_isolation":"audioIsolation","edit_voice_settings":"editVoiceSettings","get_user":"getUserInfo","get_voice":"getVoice","get_voice_settings":"getVoiceSettings","list_models":"listModels","list_voices":"listVoices","sound_effects":"soundEffects","speech_to_speech":"speechToSpeech","tts":"textToSpeech"},"params":{"action":{"oauthCredential":"credential"}}},"emailbison":{"namespace":"legacy.emailbison","methods":{"attach_leads_to_campaign":"attachLeadsToCampaign","attach_tags_to_leads":"attachTagsToLeads","create_campaign":"createCampaign","create_lead":"createLead","create_tag":"createTag","get_lead":"getLead","list_campaigns":"listCampaigns","list_leads":"listLeads","list_replies":"listReplies","list_tags":"listTags","update_campaign":"updateCampaign","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead"},"triggers":{"emailbison_email_account_added":"emailAccountAdded","emailbison_email_account_disconnected":"emailAccountDisconnected","emailbison_email_account_reconnected":"emailAccountReconnected","emailbison_email_account_removed":"emailAccountRemoved","emailbison_email_bounced":"emailBounced","emailbison_email_opened":"emailOpened","emailbison_email_sent":"emailSent","emailbison_lead_first_contacted":"leadFirstContacted","emailbison_lead_interested":"leadInterested","emailbison_lead_replied":"leadReplied","emailbison_lead_unsubscribed":"leadUnsubscribed","emailbison_manual_email_sent":"manualEmailSent","emailbison_tag_attached":"tagAttached","emailbison_tag_removed":"tagRemoved","emailbison_untracked_reply_received":"untrackedReplyReceived","emailbison_warmup_disabled_causing_bounces":"warmupDisabledCausingBounces","emailbison_warmup_disabled_receiving_bounces":"warmupDisabledReceivingBounces"}},"emailbison_v2":{"namespace":"emailbison","methods":{"attach_leads_to_campaign":"attachLeadsToCampaign","attach_tags_to_leads":"attachTagsToLeads","create_campaign":"createCampaign","create_lead":"createLead","create_tag":"createTag","get_lead":"getLead","list_campaigns":"listCampaigns","list_leads":"listLeads","list_replies":"listReplies","list_tags":"listTags","update_campaign":"updateCampaign","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead"},"triggers":{"emailbison_email_account_added":"emailAccountAdded","emailbison_email_account_disconnected":"emailAccountDisconnected","emailbison_email_account_reconnected":"emailAccountReconnected","emailbison_email_account_removed":"emailAccountRemoved","emailbison_email_bounced":"emailBounced","emailbison_email_opened":"emailOpened","emailbison_email_sent":"emailSent","emailbison_lead_first_contacted":"leadFirstContacted","emailbison_lead_interested":"leadInterested","emailbison_lead_replied":"leadReplied","emailbison_lead_unsubscribed":"leadUnsubscribed","emailbison_manual_email_sent":"manualEmailSent","emailbison_tag_attached":"tagAttached","emailbison_tag_removed":"tagRemoved","emailbison_untracked_reply_received":"untrackedReplyReceived","emailbison_warmup_disabled_causing_bounces":"warmupDisabledCausingBounces","emailbison_warmup_disabled_receiving_bounces":"warmupDisabledReceivingBounces"},"params":{"action":{"oauthCredential":"credential"}}},"embeddings":{"namespace":"embeddings"},"enrich":{"namespace":"legacy.enrich","methods":{"check_credits":"checkCredits","company_funding":"companyFundingTraffic","company_lookup":"companyLookup","company_revenue":"companyRevenue","disposable_email_check":"disposableEmailCheck","email_to_ip":"emailToIp","email_to_person_lite":"emailToPersonLite","email_to_phone":"emailToPhone","email_to_profile":"emailToProfile","find_email":"findEmail","get_post_details":"getPostDetails","ip_to_company":"ipToCompany","linkedin_profile":"linkedInProfileEnrichment","linkedin_to_personal_email":"linkedInToPersonalEmail","linkedin_to_work_email":"linkedInToWorkEmail","phone_finder":"phoneFinderLinkedIn","reverse_hash_lookup":"reverseHashLookup","sales_pointer_people":"salesPointerPeople","search_company":"searchCompany","search_company_activities":"searchCompanyActivities","search_company_employees":"searchCompanyEmployees","search_jobs":"searchJobs","search_logo":"searchLogo","search_people":"searchPeople","search_people_activities":"searchPeopleActivities","search_post_comments":"searchPostComments","search_post_comments_by_url":"searchPostCommentsByUrl","search_post_reactions":"searchPostReactions","search_post_reactions_by_url":"searchPostReactionsByUrl","search_posts":"searchPosts","search_similar_companies":"searchSimilarCompanies","verify_email":"verifyEmail"}},"enrich_v2":{"namespace":"enrich","methods":{"check_credits":"checkCredits","company_funding":"companyFundingTraffic","company_lookup":"companyLookup","company_revenue":"companyRevenue","disposable_email_check":"disposableEmailCheck","email_to_ip":"emailToIp","email_to_person_lite":"emailToPersonLite","email_to_phone":"emailToPhone","email_to_profile":"emailToProfile","find_email":"findEmail","get_post_details":"getPostDetails","ip_to_company":"ipToCompany","linkedin_profile":"linkedInProfileEnrichment","linkedin_to_personal_email":"linkedInToPersonalEmail","linkedin_to_work_email":"linkedInToWorkEmail","phone_finder":"phoneFinderLinkedIn","reverse_hash_lookup":"reverseHashLookup","sales_pointer_people":"salesPointerPeople","search_company":"searchCompany","search_company_activities":"searchCompanyActivities","search_company_employees":"searchCompanyEmployees","search_jobs":"searchJobs","search_logo":"searchLogo","search_people":"searchPeople","search_people_activities":"searchPeopleActivities","search_post_comments":"searchPostComments","search_post_comments_by_url":"searchPostCommentsByUrl","search_post_reactions":"searchPostReactions","search_post_reactions_by_url":"searchPostReactionsByUrl","search_posts":"searchPosts","search_similar_companies":"searchSimilarCompanies","verify_email":"verifyEmail"},"params":{"action":{"oauthCredential":"credential"}}},"enrichment":{"namespace":"enrichment","methods":{"company-domain":"companyDomain","company-info":"companyInfo","email-verification":"emailVerification","linkedin-profile":"linkedInProfile","phone-number":"phoneNumber","work-email":"workEmail"}},"enrow":{"namespace":"enrow","methods":{"enrow_find_email":"findEmail","enrow_verify_email":"verifyEmail"}},"evaluator":{"namespace":"evaluator"},"exa":{"namespace":"exa","methods":{"exa_agent":"agent","exa_answer":"answer","exa_find_similar_links":"findSimilarLinks","exa_get_contents":"getContents","exa_search":"search"}},"extend":{"namespace":"legacy.extend"},"extend_v2":{"namespace":"legacy.extendV2"},"extend_v3":{"namespace":"extend","params":{"action":{"oauthCredential":"credential"}}},"fathom":{"namespace":"legacy.fathom","methods":{"fathom_get_summary":"getSummary","fathom_get_transcript":"getTranscript","fathom_list_meeting_types":"listMeetingTypes","fathom_list_meetings":"listMeetings","fathom_list_team_members":"listTeamMembers","fathom_list_teams":"listTeams"},"triggers":{"fathom_new_meeting":"newMeeting","fathom_webhook":"webhook"}},"fathom_v2":{"namespace":"fathom","methods":{"fathom_get_summary":"getSummary","fathom_get_transcript":"getTranscript","fathom_list_meeting_types":"listMeetingTypes","fathom_list_meetings":"listMeetings","fathom_list_team_members":"listTeamMembers","fathom_list_teams":"listTeams"},"triggers":{"fathom_new_meeting":"newMeeting","fathom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"file":{"namespace":"legacy.file"},"file_v2":{"namespace":"legacy.fileV2"},"file_v3":{"namespace":"legacy.fileV3","methods":{"file_append":"append","file_get":"get","file_parser_v3":"read","file_write":"write"}},"file_v4":{"namespace":"legacy.fileV4","methods":{"file_append":"append","file_fetch":"fetch","file_read":"read","file_write":"write"}},"file_v5":{"namespace":"fileV5","methods":{"file_append":"append","file_compress":"compress","file_create_folder":"createFolder","file_decompress":"decompress","file_delete_folder":"deleteFolder","file_edit":"applyEdit","file_fetch":"fetch","file_get_content":"getContent","file_list":"list","file_manage_sharing":"manageSharing","file_move":"moveFile","file_read":"read","file_restore_folder":"restoreFolder","file_search":"search","file_update_folder":"moveFolder","file_write":"write"}},"findymail":{"namespace":"findymail","methods":{"findymail_find_email_from_linkedin":"findEmailFromLinkedIn","findymail_find_email_from_name":"findEmailFromName","findymail_find_emails_by_domain":"findEmailsByDomain","findymail_find_employees":"findEmployees","findymail_find_phone":"findPhone","findymail_get_company":"getCompanyInfo","findymail_get_credits":"getRemainingCredits","findymail_lookup_technologies":"lookupTechnologiesByDomain","findymail_reverse_email_lookup":"reverseEmailLookup","findymail_search_technologies":"searchTechnologies","findymail_verify_email":"verifyEmail"}},"firecrawl":{"namespace":"firecrawl","methods":{"agent":"agent","batch_scrape":"batchScrape","batch_scrape_status":"batchScrapeStatus","cancel_crawl":"cancelCrawl","crawl":"crawl","crawl_status":"crawlStatus","credit_usage":"creditUsage","enrich":"enrichContactOrCompany","extract":"extract","extract_status":"extractStatus","map":"map","parse":"parseDocument","scrape":"scrape","search":"search"}},"fireflies":{"namespace":"legacy.fireflies","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"}},"fireflies_v2":{"namespace":"legacy.firefliesV2","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"}},"fireflies_v3":{"namespace":"fireflies","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"},"params":{"action":{"oauthCredential":"credential"}}},"fivetran":{"namespace":"fivetran","methods":{"cancel_transformation":"cancelTransformation","create_connect_card":"createConnectCard","create_connection":"createConnection","create_destination":"createDestination","create_group":"createGroup","delete_connection":"deleteConnection","get_account_info":"getAccountInfo","get_connection":"getConnection","get_connection_schema_config":"getSchemaConfig","get_connection_warnings":"getConnectionWarnings","get_connector_type":"getConnectorType","get_destination":"getDestination","get_group":"getGroup","get_sync_history":"getSyncHistory","get_transformation":"getTransformation","list_connections":"listConnections","list_connector_types":"listConnectorTypes","list_destinations":"listDestinations","list_groups":"listGroups","list_transformations":"listTransformations","list_users":"listUsers","pause_connection":"pauseConnection","reload_connection_schema":"reloadSchema","resume_connection":"resumeConnection","resync_connection":"reSyncConnection","resync_tables":"reSyncTables","run_connection_setup_tests":"runConnectionSetupTests","run_destination_setup_tests":"runDestinationSetupTests","run_transformation":"runTransformation","sync_connection":"syncConnection","update_connection":"updateConnection","update_connection_schema":"updateSchemaSync","update_connection_table":"updateTableSync","update_schema_config":"updateSchemaConfig"},"triggers":{"fivetran_connection_failure":"connectionFailure","fivetran_connection_successful":"connectionSuccessful","fivetran_create_connector":"createConnector","fivetran_delete_connector":"deleteConnector","fivetran_edit_connector":"editConnector","fivetran_force_update_connector":"forceUpdateConnector","fivetran_pause_connector":"pauseConnector","fivetran_resume_connector":"resumeConnector","fivetran_resync_connector":"resyncConnector","fivetran_resync_table":"resyncTable","fivetran_sync_end":"syncEnd","fivetran_sync_start":"syncStart","fivetran_transformation_failed":"transformationFailed","fivetran_transformation_start":"transformationStart","fivetran_transformation_succeeded":"transformationSucceeded","fivetran_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"flint":{"namespace":"legacy.flint","methods":{"flint_create_task":"createTask","flint_generate_pages":"generatePages","flint_get_task":"getTask"}},"flint_v2":{"namespace":"flint","methods":{"flint_create_task":"createTask","flint_generate_pages":"generatePages","flint_get_task":"getTask"},"params":{"action":{"oauthCredential":"credential"}}},"flow":{"namespace":"flow","methods":{"add_link":"addLink","create_branch":"createBranch","create_comment":"createComment","create_entities":"createEntities","create_entity":"createEntity","delete_comment":"deleteComment","delete_entity":"deleteEntity","filter_entities":"filterEntities","get_comment":"getComment","get_data_model":"getDataModel","get_entities":"getEntities","get_entity_history":"getEntityHistory","get_project":"getProject","list_branches":"listBranches","list_comments":"listComments","list_entities":"listEntities","list_projects":"listProjects","remove_link":"removeLink","restore_entity":"restoreEntity","search_entities":"searchEntities","set_value":"setValue","set_values":"setValues","update_comment":"updateComment"},"params":{"action":{"oauthCredential":"credential"}}},"function":{"namespace":"fn"},"gamma":{"namespace":"legacy.gamma","methods":{"check_status":"checkStatus","generate":"generate","generate_from_template":"generateFromTemplate","list_folders":"listFolders","list_themes":"listThemes"}},"gamma_v2":{"namespace":"gamma","methods":{"check_status":"checkStatus","generate":"generate","generate_from_template":"generateFromTemplate","list_folders":"listFolders","list_themes":"listThemes"},"params":{"action":{"oauthCredential":"credential"}}},"gauge":{"namespace":"gauge","methods":{"gauge_add_tags_to_prompts":"addTagsToPrompts","gauge_bulk_update_prompts":"bulkUpdatePrompts","gauge_create_prompts":"createPrompts","gauge_create_tag":"createTag","gauge_create_topic":"createTopic","gauge_delete_tag":"deleteTag","gauge_get_answer":"getAnswer","gauge_get_category":"getCategory","gauge_get_current_credential":"getCurrentCredential","gauge_get_organization":"getOrganization","gauge_get_prompt":"getPrompt","gauge_get_query_metadata":"getQueryCatalog","gauge_get_tag":"getTag","gauge_get_topic":"getTopic","gauge_list_answers":"listAnswers","gauge_list_brands":"listBrands","gauge_list_categories":"listCategories","gauge_list_citations":"listCitations","gauge_list_organizations":"listOrganizations","gauge_list_prompts":"listPrompts","gauge_list_tags":"listTags","gauge_list_topics":"listTopics","gauge_query":"runReportQuery","gauge_remove_tags_from_prompts":"removeTagsFromPrompts","gauge_rename_topic":"renameTopic","gauge_update_prompt":"updatePrompt","gauge_update_tag":"updateTag"},"params":{"action":{"oauthCredential":"credential"}}},"generic_webhook":{"namespace":"trigger.webhook"},"github":{"namespace":"legacy.github","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"}},"github_v2":{"namespace":"legacy.githubV2","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"}},"github_v3":{"namespace":"github","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"},"params":{"action":{"oauthCredential":"credential"}}},"gitlab":{"namespace":"legacy.gitlab","methods":{"gitlab_activate_user":"activateUser","gitlab_add_member":"addMember","gitlab_add_saml_group_link":"addSamlGroupLink","gitlab_approve_access_request":"approveAccessRequest","gitlab_approve_merge_request":"approveMergeRequest","gitlab_approve_user":"approveUserSignup","gitlab_ban_user":"banUser","gitlab_block_user":"blockUser","gitlab_cancel_pipeline":"cancelPipeline","gitlab_compare_branches":"compareBranches","gitlab_create_branch":"createBranch","gitlab_create_file":"createFile","gitlab_create_issue":"createIssue","gitlab_create_issue_note":"addIssueComment","gitlab_create_merge_request":"createMergeRequest","gitlab_create_merge_request_note":"addMrComment","gitlab_create_pipeline":"createPipeline","gitlab_create_release":"createRelease","gitlab_create_user":"createUser","gitlab_deactivate_user":"deactivateUser","gitlab_delete_branch":"deleteBranch","gitlab_delete_issue":"deleteIssue","gitlab_delete_saml_group_link":"deleteSamlGroupLink","gitlab_delete_user":"deleteUser","gitlab_delete_user_identity":"deleteUserIdentity","gitlab_deny_access_request":"denyAccessRequest","gitlab_get_file":"getFile","gitlab_get_group":"getGroup","gitlab_get_issue":"getIssue","gitlab_get_job_log":"getJobLog","gitlab_get_merge_request":"getMergeRequest","gitlab_get_merge_request_changes":"getMrChanges","gitlab_get_pipeline":"getPipeline","gitlab_get_project":"getProject","gitlab_invite_member":"inviteMemberByEmail","gitlab_list_access_requests":"listAccessRequests","gitlab_list_branches":"listBranches","gitlab_list_commits":"listCommits","gitlab_list_groups":"listGroups","gitlab_list_invitations":"listInvitations","gitlab_list_issues":"listIssues","gitlab_list_members":"listMembers","gitlab_list_merge_requests":"listMergeRequests","gitlab_list_pipeline_jobs":"listPipelineJobs","gitlab_list_pipelines":"listPipelines","gitlab_list_projects":"listProjects","gitlab_list_releases":"listReleases","gitlab_list_repository_tree":"listRepositoryTree","gitlab_list_saml_group_links":"listSamlGroupLinks","gitlab_list_user_memberships":"listUserMemberships","gitlab_merge_merge_request":"mergeMergeRequest","gitlab_play_job":"playJob","gitlab_reject_user":"rejectUserSignup","gitlab_remove_member":"removeMember","gitlab_retry_pipeline":"retryPipeline","gitlab_revoke_invitation":"revokeInvitation","gitlab_search_users":"searchUsers","gitlab_unban_user":"unbanUser","gitlab_unblock_user":"unblockUser","gitlab_update_file":"updateFile","gitlab_update_invitation":"updateInvitation","gitlab_update_issue":"updateIssue","gitlab_update_member":"updateMember","gitlab_update_merge_request":"updateMergeRequest","gitlab_update_user":"updateUser"},"triggers":{"gitlab_comment":"comment","gitlab_issue":"issue","gitlab_merge_request":"mergeRequest","gitlab_pipeline":"pipeline","gitlab_push":"push","gitlab_webhook":"webhook"}},"gitlab_v2":{"namespace":"gitlab","methods":{"gitlab_activate_user":"activateUser","gitlab_add_member":"addMember","gitlab_add_saml_group_link":"addSamlGroupLink","gitlab_approve_access_request":"approveAccessRequest","gitlab_approve_merge_request":"approveMergeRequest","gitlab_approve_user":"approveUserSignup","gitlab_ban_user":"banUser","gitlab_block_user":"blockUser","gitlab_cancel_pipeline":"cancelPipeline","gitlab_compare_branches":"compareBranches","gitlab_create_branch":"createBranch","gitlab_create_file":"createFile","gitlab_create_issue":"createIssue","gitlab_create_issue_note":"addIssueComment","gitlab_create_merge_request":"createMergeRequest","gitlab_create_merge_request_note":"addMrComment","gitlab_create_pipeline":"createPipeline","gitlab_create_release":"createRelease","gitlab_create_user":"createUser","gitlab_deactivate_user":"deactivateUser","gitlab_delete_branch":"deleteBranch","gitlab_delete_issue":"deleteIssue","gitlab_delete_saml_group_link":"deleteSamlGroupLink","gitlab_delete_user":"deleteUser","gitlab_delete_user_identity":"deleteUserIdentity","gitlab_deny_access_request":"denyAccessRequest","gitlab_get_file":"getFile","gitlab_get_group":"getGroup","gitlab_get_issue":"getIssue","gitlab_get_job_log":"getJobLog","gitlab_get_merge_request":"getMergeRequest","gitlab_get_merge_request_changes":"getMrChanges","gitlab_get_pipeline":"getPipeline","gitlab_get_project":"getProject","gitlab_invite_member":"inviteMemberByEmail","gitlab_list_access_requests":"listAccessRequests","gitlab_list_branches":"listBranches","gitlab_list_commits":"listCommits","gitlab_list_groups":"listGroups","gitlab_list_invitations":"listInvitations","gitlab_list_issues":"listIssues","gitlab_list_members":"listMembers","gitlab_list_merge_requests":"listMergeRequests","gitlab_list_pipeline_jobs":"listPipelineJobs","gitlab_list_pipelines":"listPipelines","gitlab_list_projects":"listProjects","gitlab_list_releases":"listReleases","gitlab_list_repository_tree":"listRepositoryTree","gitlab_list_saml_group_links":"listSamlGroupLinks","gitlab_list_user_memberships":"listUserMemberships","gitlab_merge_merge_request":"mergeMergeRequest","gitlab_play_job":"playJob","gitlab_reject_user":"rejectUserSignup","gitlab_remove_member":"removeMember","gitlab_retry_pipeline":"retryPipeline","gitlab_revoke_invitation":"revokeInvitation","gitlab_search_users":"searchUsers","gitlab_unban_user":"unbanUser","gitlab_unblock_user":"unblockUser","gitlab_update_file":"updateFile","gitlab_update_invitation":"updateInvitation","gitlab_update_issue":"updateIssue","gitlab_update_member":"updateMember","gitlab_update_merge_request":"updateMergeRequest","gitlab_update_user":"updateUser"},"triggers":{"gitlab_comment":"comment","gitlab_issue":"issue","gitlab_merge_request":"mergeRequest","gitlab_pipeline":"pipeline","gitlab_push":"push","gitlab_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"gmail":{"namespace":"legacy.gmail","methods":{"add_label_gmail":"addLabel","archive_gmail":"archiveEmail","delete_gmail":"deleteEmail","draft_gmail":"draftEmail","edit_draft_gmail":"editDraft","mark_read_gmail":"markAsRead","mark_unread_gmail":"markAsUnread","move_gmail":"moveEmail","read_gmail":"readEmail","remove_label_gmail":"removeLabel","search_gmail":"searchEmail","send_gmail":"sendEmail","unarchive_gmail":"unarchiveEmail"},"triggers":{"gmail_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"gmail_v2":{"namespace":"gmail","methods":{"add_label_gmail":"addLabel","archive_gmail":"archiveEmail","create_label_gmail":"createLabel","delete_draft_gmail":"deleteDraft","delete_gmail":"deleteEmail","delete_label_gmail":"deleteLabel","draft_gmail":"draftEmail","edit_draft_gmail":"editDraft","get_draft_gmail":"getDraft","get_thread_gmail":"getThread","list_drafts_gmail":"listDrafts","list_labels_gmail":"listLabels","list_threads_gmail":"listThreads","mark_read_gmail":"markAsRead","mark_unread_gmail":"markAsUnread","move_gmail":"moveEmail","read_gmail":"readEmail","remove_label_gmail":"removeLabel","search_gmail":"searchEmail","send_gmail":"sendEmail","trash_thread_gmail":"trashThread","unarchive_gmail":"unarchiveEmail","untrash_thread_gmail":"untrashThread","update_label_gmail":"updateLabel"},"triggers":{"gmail_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"gong":{"namespace":"legacy.gong","methods":{"aggregate_activity":"aggregateActivity","aggregate_by_period":"aggregateByPeriod","answered_scorecards":"answeredScorecards","ask_anything":"askAnything","assign_flow_prospects":"assignFlowProspects","create_call":"createCall","day_by_day_activity":"dayByDayActivity","get_brief":"getBrief","get_call":"getCall","get_call_transcript":"getCallTranscript","get_coaching":"getCoaching","get_extensive_calls":"getExtensiveCalls","get_folder_content":"getFolderContent","get_logs":"getLogs","get_prospect_flows":"getProspectFlows","get_user":"getUser","interaction_stats":"interactionStats","list_calls":"listCalls","list_flows":"listFlows","list_library_folders":"listLibraryFolders","list_scorecards":"listScorecards","list_trackers":"listTrackers","list_users":"listUsers","list_workspaces":"listWorkspaces","lookup_email":"lookupEmail","lookup_phone":"lookupPhone","purge_email_address":"purgeEmailAddress","purge_phone_number":"purgePhoneNumber","unassign_flow_prospects":"unassignFlowProspects"},"triggers":{"gong_call_completed":"callCompleted","gong_webhook":"webhook"}},"gong_v2":{"namespace":"gong","methods":{"aggregate_activity":"aggregateActivity","aggregate_by_period":"aggregateByPeriod","answered_scorecards":"answeredScorecards","ask_anything":"askAnything","assign_flow_prospects":"assignFlowProspects","create_call":"createCall","day_by_day_activity":"dayByDayActivity","get_brief":"getBrief","get_call":"getCall","get_call_transcript":"getCallTranscript","get_coaching":"getCoaching","get_extensive_calls":"getExtensiveCalls","get_folder_content":"getFolderContent","get_logs":"getLogs","get_prospect_flows":"getProspectFlows","get_user":"getUser","interaction_stats":"interactionStats","list_calls":"listCalls","list_flows":"listFlows","list_library_folders":"listLibraryFolders","list_scorecards":"listScorecards","list_trackers":"listTrackers","list_users":"listUsers","list_workspaces":"listWorkspaces","lookup_email":"lookupEmail","lookup_phone":"lookupPhone","purge_email_address":"purgeEmailAddress","purge_phone_number":"purgePhoneNumber","unassign_flow_prospects":"unassignFlowProspects"},"triggers":{"gong_call_completed":"callCompleted","gong_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"google_ads":{"namespace":"googleAds","methods":{"ad_performance":"adPerformance","campaign_performance":"campaignPerformance","list_ad_groups":"listAdGroups","list_campaigns":"listCampaigns","list_customers":"listCustomers","search":"customQueryGaql"},"params":{"action":{"oauthCredential":"credential"}}},"google_appsheet":{"namespace":"googleAppsheet","methods":{"google_appsheet_add_rows":"addRows","google_appsheet_delete_rows":"deleteRows","google_appsheet_edit_rows":"editRows","google_appsheet_find_rows":"findRows"}},"google_bigquery":{"namespace":"googleBigquery","methods":{"create_dataset":"createDataset","create_table":"createTable","delete_dataset":"deleteDataset","delete_table":"deleteTable","get_query_results":"getQueryResults","get_table":"getTable","insert_rows":"insertRows","list_datasets":"listDatasets","list_table_data":"listTableData","list_tables":"listTables","query":"runQuery"},"params":{"action":{"oauthCredential":"credential"}}},"google_books":{"namespace":"googleBooks","methods":{"volume_details":"getVolumeDetails","volume_search":"searchVolumes"}},"google_calendar":{"namespace":"legacy.googleCalendar","methods":{"create":"createEvent","create_calendar":"createCalendar","delete":"deleteEvent","delete_calendar":"deleteCalendar","freebusy":"checkFreeBusy","get":"getEvent","instances":"getRecurringInstances","invite":"inviteAttendees","list":"listEvents","list_acl":"listSharing","list_calendars":"listCalendars","move":"moveEvent","quick_add":"quickAddNaturalLanguage","respond":"respondToInvitationRsvp","share_calendar":"shareCalendar","unshare_calendar":"removeSharing","update":"updateEvent","update_acl":"updateSharing","update_calendar":"updateCalendar"},"triggers":{"google_calendar_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_calendar_v2":{"namespace":"googleCalendar","methods":{"create":"createEvent","create_calendar":"createCalendar","delete":"deleteEvent","delete_calendar":"deleteCalendar","freebusy":"checkFreeBusy","get":"getEvent","instances":"getRecurringInstances","invite":"inviteAttendees","list":"listEvents","list_acl":"listSharing","list_calendars":"listCalendars","move":"moveEvent","quick_add":"quickAddNaturalLanguage","respond":"respondToInvitationRsvp","share_calendar":"shareCalendar","unshare_calendar":"removeSharing","update":"updateEvent","update_acl":"updateSharing","update_calendar":"updateCalendar"},"triggers":{"google_calendar_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_contacts":{"namespace":"googleContacts","methods":{"create":"createContact","delete":"deleteContact","get":"getContact","list":"listContacts","search":"searchContacts","update":"updateContact"},"params":{"action":{"oauthCredential":"credential"}}},"google_docs":{"namespace":"googleDocs","methods":{"create":"createDocument","create_named_range":"createNamedRange","create_paragraph_bullets":"createBullets","delete_content_range":"deleteContentRange","delete_named_range":"deleteNamedRange","delete_paragraph_bullets":"deleteBullets","insert_image":"insertImage","insert_page_break":"insertPageBreak","insert_table":"insertTable","insert_text":"insertText","read":"readDocument","replace_text":"findReplaceText","update_paragraph_style":"applyParagraphStyle","update_text_style":"applyTextStyle","write":"writeToDocument"},"params":{"action":{"oauthCredential":"credential"}}},"google_drive":{"namespace":"googleDrive","methods":{"copy":"copyFile","create_comment":"createComment","create_file":"createFile","create_folder":"createFolder","delete":"deletePermanently","delete_comment":"deleteComment","download":"downloadFile","export":"exportFile","get_about":"getDriveInfo","get_content":"getFileContent","get_file":"getFileInfo","get_revision":"getRevision","list":"listFiles","list_comments":"listComments","list_permissions":"listPermissions","list_revisions":"listRevisions","move":"moveFile","search":"searchFiles","share":"shareFile","trash":"moveToTrash","unshare":"removeSharing","untrash":"restoreFromTrash","update":"updateFile","upload":"uploadFile"},"triggers":{"google_drive_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_forms":{"namespace":"googleForms","methods":{"batch_update":"batchUpdate","create_form":"createForm","create_watch":"createWatch","delete_watch":"deleteWatch","get_form":"getForm","get_responses":"getResponses","list_watches":"listWatches","renew_watch":"renewWatch","set_publish_settings":"setPublishSettings"},"triggers":{"google_forms_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"google_groups":{"namespace":"googleGroups","methods":{"add_alias":"addAlias","add_member":"addMember","create_group":"createGroup","delete_group":"deleteGroup","get_group":"getGroup","get_member":"getMember","get_settings":"getSettings","has_member":"checkMembership","list_aliases":"listAliases","list_groups":"listGroups","list_members":"listMembers","remove_alias":"removeAlias","remove_member":"removeMember","update_group":"updateGroup","update_member":"updateMemberRole","update_settings":"updateSettings"},"params":{"action":{"oauthCredential":"credential"}}},"google_maps":{"namespace":"googleMaps","methods":{"air_quality":"airQuality","directions":"getDirections","distance_matrix":"distanceMatrix","elevation":"getElevation","geocode":"geocodeAddress","geolocate":"geolocateWiFiCell","place_details":"placeDetails","places_nearby":"nearbyPlaces","places_search":"searchPlaces","pollen":"pollenForecast","reverse_geocode":"reverseGeocode","snap_to_roads":"snapToRoads","solar":"solarPotential","speed_limits":"speedLimits","timezone":"getTimezone","validate_address":"validateAddress"}},"google_meet":{"namespace":"googleMeet","methods":{"create_space":"createSpace","end_conference":"endConference","get_conference_record":"getConferenceRecord","get_space":"getSpace","list_conference_records":"listConferenceRecords","list_participants":"listParticipants"},"params":{"action":{"oauthCredential":"credential"}}},"google_pagespeed":{"namespace":"googlePagespeed"},"google_search":{"namespace":"googleSearch"},"google_sheets":{"namespace":"legacy.googleSheets","methods":{"append":"appendData","read":"readData","update":"updateData","write":"writeData"},"params":{"action":{"oauthCredential":"credential"}}},"google_sheets_v2":{"namespace":"googleSheets","methods":{"append":"appendData","batch_clear":"batchClear","batch_get":"batchRead","batch_update":"batchUpdate","clear":"clearData","copy_sheet":"copySheet","create":"createSpreadsheet","delete_rows":"deleteRows","delete_sheet":"deleteSheet","delete_spreadsheet":"deleteSpreadsheet","get_info":"getSpreadsheetInfo","read":"readData","update":"updateData","write":"writeData"},"triggers":{"google_sheets_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_slides":{"namespace":"legacy.googleSlides","methods":{"add_image":"addImage","add_slide":"addSlide","batch_update":"batchUpdateRaw","copy_presentation":"copyPresentation","create":"createPresentation","create_line":"createLine","create_paragraph_bullets":"createParagraphBullets","create_shape":"createShape","create_sheets_chart":"embedSheetsChart","create_table":"createTable","create_video":"embedVideo","delete_object":"deleteObject","delete_paragraph_bullets":"deleteParagraphBullets","delete_table_column":"deleteTableColumn","delete_table_row":"deleteTableRow","delete_text":"deleteText","duplicate_object":"duplicateObject","export_presentation":"exportPresentation","get_page":"getPage","get_thumbnail":"getThumbnail","group_objects":"groupObjects","insert_table_columns":"insertTableColumns","insert_table_rows":"insertTableRows","insert_text":"insertText","merge_table_cells":"mergeTableCells","read":"readPresentation","refresh_sheets_chart":"refreshSheetsChart","reorder_slides":"reorderSlides","replace_all_shapes_with_image":"replaceAllShapesWithImage","replace_all_shapes_with_sheets_chart":"replaceAllShapesWithSheetsChart","replace_all_text":"replaceAllText","replace_image":"replaceImage","reroute_line":"rerouteLine","ungroup_objects":"ungroupObjects","unmerge_table_cells":"unmergeTableCells","update_image_properties":"updateImageProperties","update_line_category":"updateLineCategory","update_line_properties":"updateLineProperties","update_page_element_alt_text":"updateAltText","update_page_element_transform":"updateElementTransform","update_page_elements_z_order":"updateZOrder","update_page_properties":"updatePageProperties","update_paragraph_style":"updateParagraphStyle","update_shape_properties":"updateShapeProperties","update_slide_properties":"updateSlideProperties","update_table_border_properties":"updateTableBorderProperties","update_table_cell_properties":"updateTableCellProperties","update_table_column_properties":"updateTableColumnProperties","update_table_row_properties":"updateTableRowProperties","update_text_style":"updateTextStyle","update_video_properties":"updateVideoProperties","write":"writeToPresentation"},"params":{"action":{"oauthCredential":"credential"}}},"google_slides_v2":{"namespace":"googleSlides","methods":{"add_image":"addImage","add_slide":"addSlide","batch_update":"batchUpdateRaw","copy_presentation":"copyPresentation","create":"createPresentation","create_line":"createLine","create_paragraph_bullets":"createParagraphBullets","create_shape":"createShape","create_sheets_chart":"embedSheetsChart","create_table":"createTable","create_video":"embedVideo","delete_object":"deleteObject","delete_paragraph_bullets":"deleteParagraphBullets","delete_table_column":"deleteTableColumn","delete_table_row":"deleteTableRow","delete_text":"deleteText","duplicate_object":"duplicateObject","export_presentation":"exportPresentation","get_page":"getPage","get_thumbnail":"getThumbnail","group_objects":"groupObjects","insert_table_columns":"insertTableColumns","insert_table_rows":"insertTableRows","insert_text":"insertText","merge_table_cells":"mergeTableCells","read":"readPresentation","refresh_sheets_chart":"refreshSheetsChart","reorder_slides":"reorderSlides","replace_all_shapes_with_image":"replaceAllShapesWithImage","replace_all_shapes_with_sheets_chart":"replaceAllShapesWithSheetsChart","replace_all_text":"replaceAllText","replace_image":"replaceImage","reroute_line":"rerouteLine","ungroup_objects":"ungroupObjects","unmerge_table_cells":"unmergeTableCells","update_image_properties":"updateImageProperties","update_line_category":"updateLineCategory","update_line_properties":"updateLineProperties","update_page_element_alt_text":"updateAltText","update_page_element_transform":"updateElementTransform","update_page_elements_z_order":"updateZOrder","update_page_properties":"updatePageProperties","update_paragraph_style":"updateParagraphStyle","update_shape_properties":"updateShapeProperties","update_slide_properties":"updateSlideProperties","update_table_border_properties":"updateTableBorderProperties","update_table_cell_properties":"updateTableCellProperties","update_table_column_properties":"updateTableColumnProperties","update_table_row_properties":"updateTableRowProperties","update_text_style":"updateTextStyle","update_video_properties":"updateVideoProperties","write":"writeToPresentation"},"params":{"action":{"oauthCredential":"credential"}}},"google_tasks":{"namespace":"googleTasks","methods":{"create":"createTask","delete":"deleteTask","get":"getTask","list":"listTasks","list_task_lists":"listTaskLists","update":"updateTask"},"params":{"action":{"oauthCredential":"credential"}}},"google_translate":{"namespace":"googleTranslate","methods":{"detect":"detectLanguage","text":"translateText"}},"google_vault":{"namespace":"googleVault","methods":{"add_held_accounts":"addHeldAccounts","add_matters_permissions":"addMatterCollaborator","close_matters":"closeMatter","create_matters":"createMatter","create_matters_export":"createExport","create_matters_holds":"createHold","create_saved_query":"createSavedQuery","delete_matters":"deleteMatter","delete_matters_export":"deleteExport","delete_matters_holds":"deleteHold","delete_saved_query":"deleteSavedQuery","download_export_file":"downloadExportFile","list_matters":"listMatters","list_matters_export":"listExports","list_matters_holds":"listHolds","list_saved_queries":"listSavedQueries","remove_held_accounts":"removeHeldAccounts","remove_matters_permissions":"removeMatterCollaborator","reopen_matters":"reopenMatter","undelete_matters":"undeleteMatter","update_matters":"updateMatter","update_matters_holds":"updateHold"},"params":{"action":{"oauthCredential":"credential"}}},"grafana":{"namespace":"legacy.grafana","methods":{"grafana_check_data_source_health":"checkDataSourceHealth","grafana_create_alert_rule":"createAlertRule","grafana_create_annotation":"createAnnotation","grafana_create_contact_point":"createContactPoint","grafana_create_dashboard":"createDashboard","grafana_create_folder":"createFolder","grafana_delete_alert_rule":"deleteAlertRule","grafana_delete_annotation":"deleteAnnotation","grafana_delete_contact_point":"deleteContactPoint","grafana_delete_dashboard":"deleteDashboard","grafana_delete_folder":"deleteFolder","grafana_get_alert_rule":"getAlertRule","grafana_get_alert_rule_group":"getAlertRuleGroup","grafana_get_dashboard":"getDashboard","grafana_get_data_source":"getDataSource","grafana_get_folder":"getFolder","grafana_get_health":"getHealth","grafana_list_alert_rules":"listAlertRules","grafana_list_annotations":"listAnnotations","grafana_list_contact_points":"listContactPoints","grafana_list_dashboards":"listDashboards","grafana_list_data_sources":"listDataSources","grafana_list_folders":"listFolders","grafana_move_folder":"moveFolder","grafana_query_data_source":"queryDataSource","grafana_update_alert_rule":"updateAlertRule","grafana_update_annotation":"updateAnnotation","grafana_update_contact_point":"updateContactPoint","grafana_update_dashboard":"updateDashboard","grafana_update_folder":"updateFolder"}},"grafana_v2":{"namespace":"grafana","methods":{"grafana_check_data_source_health":"checkDataSourceHealth","grafana_create_alert_rule":"createAlertRule","grafana_create_annotation":"createAnnotation","grafana_create_contact_point":"createContactPoint","grafana_create_dashboard":"createDashboard","grafana_create_folder":"createFolder","grafana_delete_alert_rule":"deleteAlertRule","grafana_delete_annotation":"deleteAnnotation","grafana_delete_contact_point":"deleteContactPoint","grafana_delete_dashboard":"deleteDashboard","grafana_delete_folder":"deleteFolder","grafana_get_alert_rule":"getAlertRule","grafana_get_alert_rule_group":"getAlertRuleGroup","grafana_get_dashboard":"getDashboard","grafana_get_data_source":"getDataSource","grafana_get_folder":"getFolder","grafana_get_health":"getHealth","grafana_list_alert_rules":"listAlertRules","grafana_list_annotations":"listAnnotations","grafana_list_contact_points":"listContactPoints","grafana_list_dashboards":"listDashboards","grafana_list_data_sources":"listDataSources","grafana_list_folders":"listFolders","grafana_move_folder":"moveFolder","grafana_query_data_source":"queryDataSource","grafana_update_alert_rule":"updateAlertRule","grafana_update_annotation":"updateAnnotation","grafana_update_contact_point":"updateContactPoint","grafana_update_dashboard":"updateDashboard","grafana_update_folder":"updateFolder"},"params":{"action":{"oauthCredential":"credential"}}},"grain":{"namespace":"legacy.grain","methods":{"grain_create_hook":"createWebhook","grain_delete_hook":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams","grain_list_views":"listViews"},"triggers":{"grain_highlight_created":"highlightCreated","grain_highlight_updated":"highlightUpdated","grain_item_added":"itemAdded","grain_item_updated":"itemUpdated","grain_recording_created":"recordingCreated","grain_recording_updated":"recordingUpdated","grain_story_created":"storyCreated","grain_webhook":"webhook"}},"grain_v2":{"namespace":"legacy.grainV2","methods":{"grain_create_hook_v2":"createWebhook","grain_delete_hook_v2":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks_v2":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams"},"triggers":{"grain_all_events_v2":"allEvents","grain_highlight_added_v2":"highlightAdded","grain_highlight_deleted_v2":"highlightDeleted","grain_highlight_updated_v2":"highlightUpdated","grain_recording_added_v2":"recordingAdded","grain_recording_deleted_v2":"recordingDeleted","grain_recording_updated_v2":"recordingUpdated","grain_story_added_v2":"storyAdded","grain_story_deleted_v2":"storyDeleted","grain_story_updated_v2":"storyUpdated","grain_upload_status_v2":"uploadStatus"}},"grain_v3":{"namespace":"grain","methods":{"grain_create_hook_v2":"createWebhook","grain_delete_hook_v2":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks_v2":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams"},"triggers":{"grain_all_events_v2":"allEvents","grain_highlight_added_v2":"highlightAdded","grain_highlight_deleted_v2":"highlightDeleted","grain_highlight_updated_v2":"highlightUpdated","grain_recording_added_v2":"recordingAdded","grain_recording_deleted_v2":"recordingDeleted","grain_recording_updated_v2":"recordingUpdated","grain_story_added_v2":"storyAdded","grain_story_deleted_v2":"storyDeleted","grain_story_updated_v2":"storyUpdated","grain_upload_status_v2":"uploadStatus"},"params":{"action":{"oauthCredential":"credential"}}},"granola":{"namespace":"legacy.granola","methods":{"create_webhook_endpoint":"createWebhookEndpoint","delete_webhook_endpoint":"deleteWebhookEndpoint","get_note":"getNote","get_transcript":"getTranscript","list_audit_events":"listAuditEvents","list_folders":"listFolders","list_notes":"listNotes","list_webhook_endpoints":"listWebhookEndpoints","update_webhook_endpoint":"updateWebhookEndpoint"},"triggers":{"granola_note_access_granted":"noteAccessGranted","granola_note_edited":"noteEdited","granola_note_generated":"noteGenerated","granola_webhook":"webhook"}},"granola_v2":{"namespace":"granola","methods":{"create_webhook_endpoint":"createWebhookEndpoint","delete_webhook_endpoint":"deleteWebhookEndpoint","get_note":"getNote","get_transcript":"getTranscript","list_audit_events":"listAuditEvents","list_folders":"listFolders","list_notes":"listNotes","list_webhook_endpoints":"listWebhookEndpoints","update_webhook_endpoint":"updateWebhookEndpoint"},"triggers":{"granola_note_access_granted":"noteAccessGranted","granola_note_edited":"noteEdited","granola_note_generated":"noteGenerated","granola_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"greenhouse":{"namespace":"legacy.greenhouse","methods":{"greenhouse_get_application":"getApplication","greenhouse_get_candidate":"getCandidate","greenhouse_get_job":"getJob","greenhouse_get_user":"getUser","greenhouse_list_applications":"listApplications","greenhouse_list_candidates":"listCandidates","greenhouse_list_departments":"listDepartments","greenhouse_list_job_stages":"listJobStages","greenhouse_list_jobs":"listJobs","greenhouse_list_offices":"listOffices","greenhouse_list_users":"listUsers"},"triggers":{"greenhouse_candidate_hired":"candidateHired","greenhouse_candidate_rejected":"candidateRejected","greenhouse_candidate_stage_change":"candidateStageChange","greenhouse_job_created":"jobCreated","greenhouse_job_updated":"jobUpdated","greenhouse_new_application":"newApplication","greenhouse_offer_created":"offerCreated","greenhouse_webhook":"webhook"}},"greenhouse_v2":{"namespace":"greenhouse","methods":{"apply_candidate_tag":"applyCandidateTag","convert_prospect":"convertProspect","create_application":"createApplication","create_attachment":"createAttachment","create_candidate":"createCandidate","create_candidate_tag":"createCandidateTag","create_note":"createNote","delete_application":"deleteApplication","delete_attachment":"deleteAttachment","delete_candidate":"deleteCandidate","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_user":"getUser","hire_application":"hireApplication","list_application_stages":"listApplicationStages","list_applications":"listApplications","list_applied_candidate_tags":"listAppliedCandidateTags","list_attachments":"listAttachments","list_candidate_educations":"listCandidateEducations","list_candidate_employments":"listCandidateEmployments","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_close_reasons":"listCloseReasons","list_custom_field_options":"listCustomFieldOptions","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_email_templates":"listEmailTemplates","list_interviews":"listInterviews","list_job_hiring_managers":"listJobHiringManagers","list_job_interview_stages":"listJobInterviewStages","list_job_owners":"listJobOwners","list_jobs":"listJobs","list_notes":"listNotes","list_offers":"listOffers","list_offices":"listOffices","list_openings":"listOpenings","list_prospect_pool_stages":"listProspectPoolStages","list_prospect_pools":"listProspectPools","list_referrers":"listReferrers","list_rejection_reasons":"listRejectionReasons","list_scorecards":"listScorecards","list_sources":"listSources","list_users":"listUsers","move_application":"moveApplication","reject_application":"rejectApplication","remove_candidate_tag":"removeCandidateTag","unreject_application":"unrejectApplication","update_application":"updateApplication","update_candidate":"updateCandidate"},"triggers":{"greenhouse_candidate_hired":"candidateHired","greenhouse_candidate_rejected":"candidateRejected","greenhouse_candidate_stage_change":"candidateStageChange","greenhouse_job_created":"jobCreated","greenhouse_job_updated":"jobUpdated","greenhouse_new_application":"newApplication","greenhouse_offer_created":"offerCreated","greenhouse_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"greptile":{"namespace":"greptile","methods":{"greptile_index_repo":"indexRepository","greptile_query":"query","greptile_status":"checkStatus"}},"guardrails":{"namespace":"guardrails"},"harmonic":{"namespace":"harmonic","methods":{"harmonic_batch_get_people":"batchGetPeople","harmonic_clear_people_saved_search_net_new_results":"clearPeopleSavedSearchNetNewResults","harmonic_enrich_person":"enrichPerson","harmonic_get_company_employees":"getCompanyEmployees","harmonic_get_email_enrichment_job":"getEmailEnrichmentJob","harmonic_get_email_enrichment_usage":"getEmailEnrichmentUsage","harmonic_get_enrichment_status":"getEnrichmentStatus","harmonic_get_people_saved_search_net_new_results":"getPeopleSavedSearchNetNewResults","harmonic_get_people_saved_search_results":"getPeopleSavedSearchResults","harmonic_get_person":"getPerson","harmonic_list_people_saved_searches":"listPeopleSavedSearches","harmonic_search_people_scout":"searchPeopleWithScout","harmonic_submit_email_enrichment_job":"submitEmailEnrichmentJob"},"params":{"action":{"oauthCredential":"credential"}}},"helpscout":{"namespace":"helpscout","methods":{"assign_conversation":"assignConversation","create_conversation":"createConversation","create_customer":"createCustomer","create_customer_thread":"addCustomerMessage","create_note":"addNote","create_reply":"replyToConversation","delete_conversation":"deleteConversation","get_conversation":"getConversation","get_current_user":"getCurrentUser","get_customer":"getCustomer","get_organization":"getOrganization","get_saved_reply":"getSavedReply","list_conversations":"listConversations","list_custom_fields":"listCustomFields","list_customer_properties":"listCustomerProperties","list_customers":"listCustomers","list_folders":"listFolders","list_mailboxes":"listInboxes","list_organizations":"listOrganizations","list_saved_replies":"listSavedReplies","list_tags":"listTags","list_teams":"listTeams","list_threads":"listThreads","list_users":"listUsers","list_workflows":"listWorkflows","move_conversation":"moveConversation","run_workflow":"runWorkflow","set_conversation_tags":"setConversationTags","snooze_conversation":"snoozeConversation","unassign_conversation":"unassignConversation","unsnooze_conversation":"unsnoozeConversation","update_conversation_customer":"changeConversationCustomer","update_conversation_status":"updateConversationStatus","update_conversation_subject":"updateConversationSubject","update_custom_fields":"updateCustomFields","update_customer":"updateCustomer","update_customer_properties":"updateCustomerProperties"},"triggers":{"helpscout_agent_replied":"agentReplied","helpscout_conversation_assigned":"conversationAssigned","helpscout_conversation_created":"conversationCreated","helpscout_conversation_deleted":"conversationDeleted","helpscout_conversation_merged":"conversationMerged","helpscout_conversation_moved":"conversationMoved","helpscout_conversation_status_changed":"conversationStatusChanged","helpscout_conversation_tags_updated":"conversationTagsUpdated","helpscout_customer_created":"customerCreated","helpscout_customer_replied":"customerReplied","helpscout_customer_updated":"customerUpdated","helpscout_note_created":"noteCreated","helpscout_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"hex":{"namespace":"legacy.hex","methods":{"cancel_run":"cancelRun","create_collection":"createCollection","create_group":"createGroup","deactivate_user":"deactivateUser","delete_group":"deleteGroup","get_collection":"getCollection","get_data_connection":"getDataConnection","get_group":"getGroup","get_project":"getProject","get_project_runs":"getProjectRuns","get_queried_tables":"getQueriedTables","get_run_status":"getRunStatus","list_collections":"listCollections","list_data_connections":"listDataConnections","list_groups":"listGroups","list_projects":"listProjects","list_users":"listUsers","run_project":"runProject","update_collection":"updateCollection","update_group":"updateGroup","update_project":"updateProject"}},"hex_v2":{"namespace":"hex","methods":{"cancel_run":"cancelRun","create_collection":"createCollection","create_group":"createGroup","deactivate_user":"deactivateUser","delete_group":"deleteGroup","get_collection":"getCollection","get_data_connection":"getDataConnection","get_group":"getGroup","get_project":"getProject","get_project_runs":"getProjectRuns","get_queried_tables":"getQueriedTables","get_run_status":"getRunStatus","list_collections":"listCollections","list_data_connections":"listDataConnections","list_groups":"listGroups","list_projects":"listProjects","list_users":"listUsers","run_project":"runProject","update_collection":"updateCollection","update_group":"updateGroup","update_project":"updateProject"},"params":{"action":{"oauthCredential":"credential"}}},"higgsfield":{"namespace":"higgsfield","methods":{"higgsfield_cancel_request":"cancelRequest","higgsfield_create_character":"createCharacter","higgsfield_delete_character":"deleteCharacter","higgsfield_delete_request":"deleteRequest","higgsfield_generate":"generateAnyModel","higgsfield_generate_soul_image":"generateSoulImage","higgsfield_get_character":"getCharacter","higgsfield_get_request_status":"getRequestStatus","higgsfield_list_characters":"listCharacters"},"params":{"action":{"oauthCredential":"credential"}}},"hubspot":{"namespace":"hubspot","methods":{"add_list_memberships":"addListMembers","create_appointment":"createAppointment","create_association":"createAssociation","create_company":"createCompany","create_contact":"createContact","create_deal":"createDeal","create_email":"createEmail","create_line_item":"createLineItem","create_list":"createList","create_note":"createNote","create_ticket":"createTicket","delete_association":"deleteAssociation","delete_company":"deleteCompany","delete_contact":"deleteContact","delete_deal":"deleteDeal","delete_line_item":"deleteLineItem","delete_ticket":"deleteTicket","get_appointments":"getAppointments","get_association_labels":"getAssociationLabels","get_carts":"getCarts","get_companies":"getCompanies","get_contacts":"getContacts","get_deals":"getDeals","get_emails":"getEmails","get_line_items":"getLineItems","get_list_memberships":"getListMembers","get_lists":"getLists","get_marketing_events":"getMarketingEvents","get_notes":"getNotes","get_properties":"getProperties","get_quotes":"getQuotes","get_tickets":"getTickets","get_users":"getUsers","list_associations":"listAssociations","list_owners":"listOwners","remove_list_memberships":"removeListMembers","search_companies":"searchCompanies","search_contacts":"searchContacts","search_deals":"searchDeals","search_emails":"searchEmails","search_line_items":"searchLineItems","search_notes":"searchNotes","search_quotes":"searchQuotes","search_tickets":"searchTickets","update_appointment":"updateAppointment","update_company":"updateCompany","update_contact":"updateContact","update_deal":"updateDeal","update_line_item":"updateLineItem","update_ticket":"updateTicket"},"triggers":{"hubspot_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"huggingface":{"namespace":"legacy.huggingface"},"huggingface_v2":{"namespace":"huggingface","params":{"action":{"oauthCredential":"credential"}}},"human_in_the_loop":{"namespace":"legacy.humanInTheLoop"},"human_in_the_loop_v2":{"namespace":"human"},"hunter":{"namespace":"hunter","methods":{"hunter_companies_find":"findCompany","hunter_discover":"discoverCompanies","hunter_domain_search":"domainSearch","hunter_email_count":"emailCount","hunter_email_finder":"emailFinder","hunter_email_verifier":"emailVerifier"}},"iam":{"namespace":"legacy.iam","methods":{"add_user_to_group":"addUserToGroup","attach_role_policy":"attachRolePolicy","attach_user_policy":"attachUserPolicy","create_access_key":"createAccessKey","create_role":"createRole","create_user":"createUser","delete_access_key":"deleteAccessKey","delete_role":"deleteRole","delete_user":"deleteUser","detach_role_policy":"detachRolePolicy","detach_user_policy":"detachUserPolicy","get_policy":"getPolicy","get_role":"getRole","get_user":"getUser","list_access_keys":"listAccessKeys","list_attached_role_policies":"listAttachedRolePolicies","list_attached_user_policies":"listAttachedUserPolicies","list_groups":"listGroups","list_policies":"listPolicies","list_roles":"listRoles","list_users":"listUsers","remove_user_from_group":"removeUserFromGroup","simulate_principal_policy":"simulatePrincipalPolicy","update_access_key":"updateAccessKey"}},"iam_v2":{"namespace":"iam","methods":{"add_user_to_group":"addUserToGroup","attach_role_policy":"attachRolePolicy","attach_user_policy":"attachUserPolicy","create_access_key":"createAccessKey","create_role":"createRole","create_user":"createUser","delete_access_key":"deleteAccessKey","delete_role":"deleteRole","delete_user":"deleteUser","detach_role_policy":"detachRolePolicy","detach_user_policy":"detachUserPolicy","get_policy":"getPolicy","get_role":"getRole","get_user":"getUser","list_access_keys":"listAccessKeys","list_attached_role_policies":"listAttachedRolePolicies","list_attached_user_policies":"listAttachedUserPolicies","list_groups":"listGroups","list_policies":"listPolicies","list_roles":"listRoles","list_users":"listUsers","remove_user_from_group":"removeUserFromGroup","simulate_principal_policy":"simulatePrincipalPolicy","update_access_key":"updateAccessKey"},"params":{"action":{"oauthCredential":"credential"}}},"icypeas":{"namespace":"icypeas","methods":{"icypeas_find_email":"findEmail","icypeas_verify_email":"verifyEmail"}},"identity_center":{"namespace":"legacy.identityCenter","methods":{"check_assignment_deletion_status":"checkAssignmentDeletionStatus","check_assignment_status":"checkAssignmentStatus","create_account_assignment":"createAccountAssignment","delete_account_assignment":"deleteAccountAssignment","describe_account":"describeAccount","describe_group":"describeGroup","describe_user":"describeUser","get_group":"getGroup","get_user":"getUser","list_account_assignments":"listAccountAssignmentsForPrincipal","list_accounts":"listAccounts","list_assignments_for_account":"listAssignmentsForAccount","list_group_memberships":"listGroupMemberships","list_groups":"listGroups","list_instances":"listInstances","list_permission_sets":"listPermissionSets"}},"identity_center_v2":{"namespace":"identityCenter","methods":{"check_assignment_deletion_status":"checkAssignmentDeletionStatus","check_assignment_status":"checkAssignmentStatus","create_account_assignment":"createAccountAssignment","delete_account_assignment":"deleteAccountAssignment","describe_account":"describeAccount","describe_group":"describeGroup","describe_user":"describeUser","get_group":"getGroup","get_user":"getUser","list_account_assignments":"listAccountAssignmentsForPrincipal","list_accounts":"listAccounts","list_assignments_for_account":"listAssignmentsForAccount","list_group_memberships":"listGroupMemberships","list_groups":"listGroups","list_instances":"listInstances","list_permission_sets":"listPermissionSets"},"params":{"action":{"oauthCredential":"credential"}}},"image_generator":{"namespace":"legacy.imageGenerator"},"image_generator_v2":{"namespace":"imageGenerator"},"imap":{"namespace":"trigger.imap"},"incidentio":{"namespace":"legacy.incidentio","methods":{"incidentio_actions_create":"createAction","incidentio_actions_list":"listActions","incidentio_actions_show":"showAction","incidentio_actions_update":"updateAction","incidentio_alert_events_create":"createAlertEvent","incidentio_alerts_list":"listAlerts","incidentio_alerts_resolve":"resolveAlert","incidentio_alerts_show":"showAlert","incidentio_catalog_entries_list":"listCatalogEntries","incidentio_catalog_types_list":"listCatalogTypes","incidentio_custom_fields_create":"createCustomField","incidentio_custom_fields_delete":"deleteCustomField","incidentio_custom_fields_list":"listCustomFields","incidentio_custom_fields_show":"showCustomField","incidentio_custom_fields_update":"updateCustomField","incidentio_escalation_paths_create":"createEscalationPath","incidentio_escalation_paths_delete":"deleteEscalationPath","incidentio_escalation_paths_list":"listEscalationPaths","incidentio_escalation_paths_show":"showEscalationPath","incidentio_escalation_paths_update":"updateEscalationPath","incidentio_escalations_cancel":"cancelEscalation","incidentio_escalations_create":"createEscalation","incidentio_escalations_list":"listEscalations","incidentio_escalations_show":"showEscalation","incidentio_follow_ups_create":"createFollowUp","incidentio_follow_ups_list":"listFollowUps","incidentio_follow_ups_show":"showFollowUp","incidentio_follow_ups_update":"updateFollowUp","incidentio_incident_alerts_list":"listIncidentAlerts","incidentio_incident_memberships_create":"grantIncidentMembership","incidentio_incident_memberships_revoke":"revokeIncidentMembership","incidentio_incident_participants_list":"listIncidentParticipants","incidentio_incident_roles_create":"createIncidentRole","incidentio_incident_roles_delete":"deleteIncidentRole","incidentio_incident_roles_list":"listIncidentRoles","incidentio_incident_roles_show":"showIncidentRole","incidentio_incident_roles_update":"updateIncidentRole","incidentio_incident_statuses_list":"listIncidentStatuses","incidentio_incident_timestamps_list":"listIncidentTimestamps","incidentio_incident_timestamps_show":"showIncidentTimestamp","incidentio_incident_types_list":"listIncidentTypes","incidentio_incident_updates_list":"listIncidentUpdates","incidentio_incidents_create":"createIncident","incidentio_incidents_list":"listIncidents","incidentio_incidents_show":"showIncident","incidentio_incidents_update":"updateIncident","incidentio_on_call_now":"getWhoIsOnCall","incidentio_schedule_entries_list":"listScheduleEntries","incidentio_schedule_overrides_create":"createScheduleOverride","incidentio_schedule_overrides_list":"listScheduleOverrides","incidentio_schedules_create":"createSchedule","incidentio_schedules_delete":"deleteSchedule","incidentio_schedules_list":"listSchedules","incidentio_schedules_show":"showSchedule","incidentio_schedules_update":"updateSchedule","incidentio_severities_list":"listSeverities","incidentio_teams_list":"listTeams","incidentio_teams_show":"showTeam","incidentio_users_list":"listUsers","incidentio_users_show":"showUser","incidentio_workflows_create":"createWorkflow","incidentio_workflows_delete":"deleteWorkflow","incidentio_workflows_list":"listWorkflows","incidentio_workflows_show":"showWorkflow","incidentio_workflows_update":"updateWorkflow"},"triggers":{"incidentio_alert_created":"alertCreated","incidentio_incident_created":"incidentCreated","incidentio_incident_status_updated":"incidentStatusUpdated","incidentio_incident_updated":"incidentUpdated"}},"incidentio_v2":{"namespace":"incidentio","methods":{"incidentio_actions_create":"createAction","incidentio_actions_list":"listActions","incidentio_actions_show":"showAction","incidentio_actions_update":"updateAction","incidentio_alert_events_create":"createAlertEvent","incidentio_alerts_list":"listAlerts","incidentio_alerts_resolve":"resolveAlert","incidentio_alerts_show":"showAlert","incidentio_catalog_entries_list":"listCatalogEntries","incidentio_catalog_types_list":"listCatalogTypes","incidentio_custom_fields_create":"createCustomField","incidentio_custom_fields_delete":"deleteCustomField","incidentio_custom_fields_list":"listCustomFields","incidentio_custom_fields_show":"showCustomField","incidentio_custom_fields_update":"updateCustomField","incidentio_escalation_paths_create":"createEscalationPath","incidentio_escalation_paths_delete":"deleteEscalationPath","incidentio_escalation_paths_list":"listEscalationPaths","incidentio_escalation_paths_show":"showEscalationPath","incidentio_escalation_paths_update":"updateEscalationPath","incidentio_escalations_cancel":"cancelEscalation","incidentio_escalations_create":"createEscalation","incidentio_escalations_list":"listEscalations","incidentio_escalations_show":"showEscalation","incidentio_follow_ups_create":"createFollowUp","incidentio_follow_ups_list":"listFollowUps","incidentio_follow_ups_show":"showFollowUp","incidentio_follow_ups_update":"updateFollowUp","incidentio_incident_alerts_list":"listIncidentAlerts","incidentio_incident_memberships_create":"grantIncidentMembership","incidentio_incident_memberships_revoke":"revokeIncidentMembership","incidentio_incident_participants_list":"listIncidentParticipants","incidentio_incident_roles_create":"createIncidentRole","incidentio_incident_roles_delete":"deleteIncidentRole","incidentio_incident_roles_list":"listIncidentRoles","incidentio_incident_roles_show":"showIncidentRole","incidentio_incident_roles_update":"updateIncidentRole","incidentio_incident_statuses_list":"listIncidentStatuses","incidentio_incident_timestamps_list":"listIncidentTimestamps","incidentio_incident_timestamps_show":"showIncidentTimestamp","incidentio_incident_types_list":"listIncidentTypes","incidentio_incident_updates_list":"listIncidentUpdates","incidentio_incidents_create":"createIncident","incidentio_incidents_list":"listIncidents","incidentio_incidents_show":"showIncident","incidentio_incidents_update":"updateIncident","incidentio_on_call_now":"getWhoIsOnCall","incidentio_schedule_entries_list":"listScheduleEntries","incidentio_schedule_overrides_create":"createScheduleOverride","incidentio_schedule_overrides_list":"listScheduleOverrides","incidentio_schedules_create":"createSchedule","incidentio_schedules_delete":"deleteSchedule","incidentio_schedules_list":"listSchedules","incidentio_schedules_show":"showSchedule","incidentio_schedules_update":"updateSchedule","incidentio_severities_list":"listSeverities","incidentio_teams_list":"listTeams","incidentio_teams_show":"showTeam","incidentio_users_list":"listUsers","incidentio_users_show":"showUser","incidentio_workflows_create":"createWorkflow","incidentio_workflows_delete":"deleteWorkflow","incidentio_workflows_list":"listWorkflows","incidentio_workflows_show":"showWorkflow","incidentio_workflows_update":"updateWorkflow"},"triggers":{"incidentio_alert_created":"alertCreated","incidentio_incident_created":"incidentCreated","incidentio_incident_status_updated":"incidentStatusUpdated","incidentio_incident_updated":"incidentUpdated"},"params":{"action":{"oauthCredential":"credential"}}},"infisical":{"namespace":"legacy.infisical","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","get_secret":"getSecret","list_secrets":"listSecrets","update_secret":"updateSecret"}},"infisical_v2":{"namespace":"infisical","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","get_secret":"getSecret","list_secrets":"listSecrets","update_secret":"updateSecret"},"params":{"action":{"oauthCredential":"credential"}}},"input_trigger":{"namespace":"legacy.inputTrigger"},"instagram":{"namespace":"legacy.instagram","methods":{"instagram_delete_comment":"deleteComment","instagram_download_media":"downloadMedia","instagram_get_account_insights":"getAccountInsights","instagram_get_container_status":"getContainerStatus","instagram_get_conversation_messages":"getConversationMessages","instagram_get_media":"getMedia","instagram_get_media_insights":"getMediaInsights","instagram_get_message":"getMessage","instagram_get_profile":"getProfile","instagram_get_publishing_limit":"getPublishingLimit","instagram_hide_comment":"hideComment","instagram_list_comments":"listComments","instagram_list_conversations":"listConversations","instagram_list_media":"listMedia","instagram_list_stories":"listStories","instagram_private_reply":"privateReply","instagram_publish_carousel":"publishCarousel","instagram_publish_image":"publishImage","instagram_publish_reel":"publishReel","instagram_publish_story":"publishStory","instagram_publish_video":"publishVideo","instagram_reply_to_comment":"replyToComment","instagram_send_text_message":"sendTextMessage","instagram_set_comments_enabled":"setCommentsEnabled"},"params":{"action":{"oauthCredential":"credential"}}},"instantly":{"namespace":"legacy.instantly","methods":{"activate_campaign":"activateCampaign","create_campaign":"createCampaign","create_lead":"createLead","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_leads":"deleteLeads","get_lead":"getLead","list_campaigns":"listCampaigns","list_emails":"listEmails","list_lead_lists":"listLeadLists","list_leads":"listLeads","patch_campaign":"patchCampaign","patch_lead":"patchLead","pause_campaign":"pauseCampaign","reply_to_email":"replyToEmail","update_lead_interest_status":"updateLeadInterestStatus"},"triggers":{"instantly_account_error":"accountError","instantly_auto_reply_received":"autoReplyReceived","instantly_campaign_completed":"campaignCompleted","instantly_email_bounced":"emailBounced","instantly_email_opened":"emailOpened","instantly_email_sent":"emailSent","instantly_lead_closed":"leadClosed","instantly_lead_interested":"leadInterested","instantly_lead_meeting_booked":"leadMeetingBooked","instantly_lead_meeting_completed":"leadMeetingCompleted","instantly_lead_neutral":"leadNeutral","instantly_lead_no_show":"leadNoShow","instantly_lead_not_interested":"leadNotInterested","instantly_lead_out_of_office":"leadOutOfOffice","instantly_lead_unsubscribed":"leadUnsubscribed","instantly_lead_wrong_person":"leadWrongPerson","instantly_link_clicked":"linkClicked","instantly_reply_received":"replyReceived","instantly_supersearch_enrichment_completed":"supersearchEnrichmentCompleted","instantly_webhook":"webhook"}},"instantly_v2":{"namespace":"instantly","methods":{"activate_campaign":"activateCampaign","create_campaign":"createCampaign","create_lead":"createLead","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_leads":"deleteLeads","get_lead":"getLead","list_campaigns":"listCampaigns","list_emails":"listEmails","list_lead_lists":"listLeadLists","list_leads":"listLeads","patch_campaign":"patchCampaign","patch_lead":"patchLead","pause_campaign":"pauseCampaign","reply_to_email":"replyToEmail","update_lead_interest_status":"updateLeadInterestStatus"},"triggers":{"instantly_account_error":"accountError","instantly_auto_reply_received":"autoReplyReceived","instantly_campaign_completed":"campaignCompleted","instantly_email_bounced":"emailBounced","instantly_email_opened":"emailOpened","instantly_email_sent":"emailSent","instantly_lead_closed":"leadClosed","instantly_lead_interested":"leadInterested","instantly_lead_meeting_booked":"leadMeetingBooked","instantly_lead_meeting_completed":"leadMeetingCompleted","instantly_lead_neutral":"leadNeutral","instantly_lead_no_show":"leadNoShow","instantly_lead_not_interested":"leadNotInterested","instantly_lead_out_of_office":"leadOutOfOffice","instantly_lead_unsubscribed":"leadUnsubscribed","instantly_lead_wrong_person":"leadWrongPerson","instantly_link_clicked":"linkClicked","instantly_reply_received":"replyReceived","instantly_supersearch_enrichment_completed":"supersearchEnrichmentCompleted","instantly_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"intercom":{"namespace":"legacy.intercom","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"}},"intercom_v2":{"namespace":"legacy.intercomV2","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"intercom_contact_created":"contactCreated","intercom_conversation_closed":"conversationClosed","intercom_conversation_created":"conversationCreated","intercom_conversation_reply":"conversationReply","intercom_user_created":"userCreated","intercom_webhook":"webhook"}},"intercom_v3":{"namespace":"intercom","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"intercom_contact_created":"contactCreated","intercom_conversation_closed":"conversationClosed","intercom_conversation_created":"conversationCreated","intercom_conversation_reply":"conversationReply","intercom_user_created":"userCreated","intercom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"intune":{"namespace":"intune","methods":{"intune_get_compliance_policy":"getCompliancePolicy","intune_get_detected_app":"getDetectedApp","intune_get_device":"getDevice","intune_get_device_configuration":"getDeviceConfiguration","intune_list_app_devices":"listAppDevices","intune_list_compliance_policies":"listCompliancePolicies","intune_list_compliance_policy_device_statuses":"listCompliancePolicyDeviceStatuses","intune_list_detected_apps":"listDetectedApps","intune_list_device_configurations":"listDeviceConfigurations","intune_list_devices":"listDevices","intune_reboot_device":"rebootDevice","intune_remote_lock_device":"remoteLockDevice","intune_retire_device":"retireDevice","intune_sync_device":"syncDevice"},"params":{"action":{"oauthCredential":"credential"}}},"jama":{"namespace":"jama","methods":{"create_comment":"createComment","create_item":"createItem","create_relationship":"createRelationship","delete_item":"deleteItem","delete_relationship":"deleteRelationship","get_baseline":"getBaseline","get_current_user":"getCurrentUser","get_filter":"getFilter","get_item":"getItem","get_item_type":"getItemType","get_item_version":"getItemVersion","get_project":"getProject","get_relationship":"getRelationship","get_test_cycle":"getTestCycle","get_test_plan":"getTestPlan","get_test_run":"getTestRun","list_baseline_items":"listBaselineItems","list_baselines":"listBaselines","list_downstream_items":"listDownstreamItems","list_filter_results":"listFilterResults","list_filters":"listFilters","list_item_children":"listItemChildren","list_item_comments":"listItemComments","list_item_types":"listItemTypes","list_item_versions":"listItemVersions","list_items":"listItems","list_pick_list_options":"listPickListOptions","list_pick_lists":"listPickLists","list_projects":"listProjects","list_relationship_types":"listRelationshipTypes","list_relationships":"listRelationships","list_releases":"listReleases","list_tags":"listTags","list_test_cycles":"listTestCycles","list_test_plans":"listTestPlans","list_test_runs":"listTestRuns","list_upstream_items":"listUpstreamItems","search_items":"searchItems","update_item":"updateItem","update_test_run":"updateTestRun"},"params":{"action":{"oauthCredential":"credential"}}},"jina":{"namespace":"jina","methods":{"jina_read_url":"readUrl","jina_search":"search"}},"jira":{"namespace":"jira","methods":{"add_attachment":"addAttachment","add_comment":"addComment","add_watcher":"addWatcher","add_worklog":"addWorklog","assign":"assignIssue","create_link":"createIssueLink","create_sprint":"createSprint","delete":"deleteIssue","delete_attachment":"deleteAttachment","delete_comment":"deleteComment","delete_link":"deleteIssueLink","delete_worklog":"deleteWorklog","get_attachments":"getAttachments","get_comments":"getComments","get_fields":"getFields","get_project":"getProject","get_transitions":"getTransitions","get_users":"getUsers","get_worklogs":"getWorklogs","list_issue_types":"listIssueTypes","list_projects":"listProjects","read":"readIssue","read-bulk":"readBulkIssues","remove_watcher":"removeWatcher","search":"searchIssues","search_users":"searchUsers","transition":"transitionIssue","update":"updateIssue","update_comment":"updateComment","update_worklog":"updateWorklog","write":"writeIssue"},"triggers":{"jira_comment_deleted":"commentDeleted","jira_comment_updated":"commentUpdated","jira_issue_commented":"issueCommented","jira_issue_created":"issueCreated","jira_issue_deleted":"issueDeleted","jira_issue_updated":"issueUpdated","jira_project_created":"projectCreated","jira_sprint_closed":"sprintClosed","jira_sprint_created":"sprintCreated","jira_sprint_started":"sprintStarted","jira_version_released":"versionReleased","jira_webhook":"webhook","jira_worklog_created":"worklogCreated","jira_worklog_deleted":"worklogDeleted","jira_worklog_updated":"worklogUpdated"},"params":{"action":{"oauthCredential":"credential"}}},"jira_service_management":{"namespace":"jiraServiceManagement","methods":{"add_comment":"addComment","add_customer":"addCustomer","add_organization":"addOrganization","add_participants":"addParticipants","answer_approval":"answerApproval","attach_form":"attachForm","copy_forms":"copyForms","create_object":"createAssetObject","create_organization":"createOrganization","create_request":"createRequest","delete_form":"deleteForm","delete_object":"deleteAssetObject","externalise_form":"externaliseForm","get_approvals":"getApprovals","get_comments":"getComments","get_customers":"getCustomers","get_form":"getForm","get_form_answers":"getFormAnswers","get_form_structure":"getFormStructure","get_form_templates":"getFormTemplates","get_issue_forms":"getIssueForms","get_object":"getAssetObject","get_object_schema":"getAssetSchema","get_object_type_attributes":"getAssetObjectTypeAttributes","get_organizations":"getOrganizations","get_participants":"getParticipants","get_queues":"getQueues","get_request":"getRequest","get_request_type_fields":"getRequestTypeFields","get_request_types":"getRequestTypes","get_requests":"getRequests","get_service_desks":"getServiceDesks","get_sla":"getSla","get_transitions":"getTransitions","internalise_form":"internaliseForm","list_object_schemas":"listAssetSchemas","list_object_types":"listAssetObjectTypes","reopen_form":"reopenForm","save_form_answers":"saveFormAnswers","search_objects_aql":"searchAssetsAql","submit_form":"submitForm","transition_request":"transitionRequest","update_object":"updateAssetObject"},"triggers":{"jsm_request_commented":"requestCommented","jsm_request_created":"requestCreated","jsm_request_resolved":"requestResolved","jsm_request_updated":"requestUpdated","jsm_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"jotform":{"namespace":"legacy.jotform","methods":{"add_label_resources":"addLabelResources","clone_form":"cloneForm","create_form":"createForm","create_label":"createLabel","create_question":"createQuestion","create_questions":"createQuestions","create_report":"createReport","create_submission":"createSubmission","create_submissions":"createSubmissions","create_webhook":"createWebhook","delete_form":"deleteForm","delete_label":"deleteLabel","delete_question":"deleteQuestion","delete_report":"deleteReport","delete_submission":"deleteSubmission","delete_webhook":"deleteWebhook","get_form":"getForm","get_form_properties":"getFormProperties","get_history":"getHistory","get_label":"getLabel","get_question":"getQuestion","get_report":"getReport","get_settings":"getSettings","get_submission":"getSubmission","get_usage":"getUsage","get_user":"getAccount","list_form_files":"listFormFiles","list_form_reports":"listFormReports","list_form_submissions":"listFormSubmissions","list_forms":"listForms","list_label_resources":"listLabelResources","list_labels":"listLabels","list_questions":"listQuestions","list_reports":"listReports","list_submissions":"listSubmissions","list_subusers":"listSubUsers","list_webhooks":"listWebhooks","remove_label_resources":"removeLabelResources","update_form_properties":"updateFormProperties","update_label":"updateLabel","update_question":"updateQuestion","update_settings":"updateSettings","update_submission":"updateSubmission"},"triggers":{"jotform_webhook":"webhook"}},"jotform_v2":{"namespace":"jotform","methods":{"add_label_resources":"addLabelResources","clone_form":"cloneForm","create_form":"createForm","create_label":"createLabel","create_question":"createQuestion","create_questions":"createQuestions","create_report":"createReport","create_submission":"createSubmission","create_submissions":"createSubmissions","create_webhook":"createWebhook","delete_form":"deleteForm","delete_label":"deleteLabel","delete_question":"deleteQuestion","delete_report":"deleteReport","delete_submission":"deleteSubmission","delete_webhook":"deleteWebhook","get_form":"getForm","get_form_properties":"getFormProperties","get_history":"getHistory","get_label":"getLabel","get_question":"getQuestion","get_report":"getReport","get_settings":"getSettings","get_submission":"getSubmission","get_usage":"getUsage","get_user":"getAccount","list_form_files":"listFormFiles","list_form_reports":"listFormReports","list_form_submissions":"listFormSubmissions","list_forms":"listForms","list_label_resources":"listLabelResources","list_labels":"listLabels","list_questions":"listQuestions","list_reports":"listReports","list_submissions":"listSubmissions","list_subusers":"listSubUsers","list_webhooks":"listWebhooks","remove_label_resources":"removeLabelResources","update_form_properties":"updateFormProperties","update_label":"updateLabel","update_question":"updateQuestion","update_settings":"updateSettings","update_submission":"updateSubmission"},"triggers":{"jotform_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"jupyter":{"namespace":"legacy.jupyter","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"}},"jupyter_v2":{"namespace":"legacy.jupyterV2","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"}},"jupyter_v3":{"namespace":"jupyter","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"kalshi":{"namespace":"legacy.kalshi","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"}},"kalshi_v2":{"namespace":"legacy.kalshiV2","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"}},"kalshi_v3":{"namespace":"kalshi","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"},"params":{"action":{"oauthCredential":"credential"}}},"ketch":{"namespace":"ketch","methods":{"get_consent":"getConsent","get_subscriptions":"getSubscriptions","invoke_right":"invokeRight","set_consent":"setConsent","set_subscriptions":"setSubscriptions"}},"knowledge":{"namespace":"knowledge","methods":{"create_document":"createDocument","delete_chunk":"deleteChunk","delete_document":"deleteDocument","get_connector":"getConnector","get_document":"getDocument","list_chunks":"listChunks","list_connectors":"listConnectors","list_documents":"listDocuments","list_tags":"listTags","search":"search","trigger_sync":"triggerSync","update_chunk":"updateChunk","upload_chunk":"uploadChunk","upsert_document":"upsertDocument"}},"lambda":{"namespace":"legacy.lambda","methods":{"add_permission":"addPermission","create_alias":"createAlias","create_event_source_mapping":"createEventSourceMapping","create_function":"createFunction","create_function_url_config":"createFunctionUrl","delete_alias":"deleteAlias","delete_event_source_mapping":"deleteEventSourceMapping","delete_function":"deleteFunction","delete_function_concurrency":"deleteFunctionConcurrency","delete_function_event_invoke_config":"deleteAsyncInvokeConfig","delete_function_url_config":"deleteFunctionUrl","delete_provisioned_concurrency_config":"deleteProvisionedConcurrency","get_account_settings":"getAccountSettings","get_alias":"getAlias","get_event_source_mapping":"getEventSourceMapping","get_function":"getFunction","get_function_concurrency":"getFunctionConcurrency","get_function_configuration":"getFunctionConfiguration","get_function_event_invoke_config":"getAsyncInvokeConfig","get_function_recursion_config":"getRecursionConfig","get_function_url_config":"getFunctionUrl","get_layer_version":"getLayerVersion","get_policy":"getPolicy","get_provisioned_concurrency_config":"getProvisionedConcurrency","get_runtime_management_config":"getRuntimeManagementConfig","invoke":"invokeFunction","list_aliases":"listAliases","list_event_source_mappings":"listEventSourceMappings","list_function_event_invoke_configs":"listAsyncInvokeConfigs","list_function_url_configs":"listFunctionUrls","list_functions":"listFunctions","list_layer_versions":"listLayerVersions","list_layers":"listLayers","list_provisioned_concurrency_configs":"listProvisionedConcurrency","list_tags":"listTags","list_versions_by_function":"listFunctionVersions","publish_version":"publishVersion","put_function_concurrency":"setFunctionConcurrency","put_function_event_invoke_config":"setAsyncInvokeConfig","put_function_recursion_config":"setRecursionConfig","put_provisioned_concurrency_config":"setProvisionedConcurrency","put_runtime_management_config":"setRuntimeManagementConfig","remove_permission":"removePermission","tag_resource":"tagResource","untag_resource":"untagResource","update_alias":"updateAlias","update_event_source_mapping":"updateEventSourceMapping","update_function_code":"updateFunctionCode","update_function_configuration":"updateFunctionConfiguration","update_function_url_config":"updateFunctionUrl"}},"lambda_v2":{"namespace":"lambda","methods":{"add_permission":"addPermission","create_alias":"createAlias","create_event_source_mapping":"createEventSourceMapping","create_function":"createFunction","create_function_url_config":"createFunctionUrl","delete_alias":"deleteAlias","delete_event_source_mapping":"deleteEventSourceMapping","delete_function":"deleteFunction","delete_function_concurrency":"deleteFunctionConcurrency","delete_function_event_invoke_config":"deleteAsyncInvokeConfig","delete_function_url_config":"deleteFunctionUrl","delete_provisioned_concurrency_config":"deleteProvisionedConcurrency","get_account_settings":"getAccountSettings","get_alias":"getAlias","get_event_source_mapping":"getEventSourceMapping","get_function":"getFunction","get_function_concurrency":"getFunctionConcurrency","get_function_configuration":"getFunctionConfiguration","get_function_event_invoke_config":"getAsyncInvokeConfig","get_function_recursion_config":"getRecursionConfig","get_function_url_config":"getFunctionUrl","get_layer_version":"getLayerVersion","get_policy":"getPolicy","get_provisioned_concurrency_config":"getProvisionedConcurrency","get_runtime_management_config":"getRuntimeManagementConfig","invoke":"invokeFunction","list_aliases":"listAliases","list_event_source_mappings":"listEventSourceMappings","list_function_event_invoke_configs":"listAsyncInvokeConfigs","list_function_url_configs":"listFunctionUrls","list_functions":"listFunctions","list_layer_versions":"listLayerVersions","list_layers":"listLayers","list_provisioned_concurrency_configs":"listProvisionedConcurrency","list_tags":"listTags","list_versions_by_function":"listFunctionVersions","publish_version":"publishVersion","put_function_concurrency":"setFunctionConcurrency","put_function_event_invoke_config":"setAsyncInvokeConfig","put_function_recursion_config":"setRecursionConfig","put_provisioned_concurrency_config":"setProvisionedConcurrency","put_runtime_management_config":"setRuntimeManagementConfig","remove_permission":"removePermission","tag_resource":"tagResource","untag_resource":"untagResource","update_alias":"updateAlias","update_event_source_mapping":"updateEventSourceMapping","update_function_code":"updateFunctionCode","update_function_configuration":"updateFunctionConfiguration","update_function_url_config":"updateFunctionUrl"},"params":{"action":{"oauthCredential":"credential"}}},"langsmith":{"namespace":"legacy.langsmith","methods":{"langsmith_create_feedback":"createFeedback","langsmith_create_run":"createRun","langsmith_create_runs_batch":"createRunsBatch","langsmith_get_run":"getRun","langsmith_update_run":"updateRun"}},"langsmith_v2":{"namespace":"langsmith","methods":{"langsmith_create_feedback":"createFeedback","langsmith_create_run":"createRun","langsmith_create_runs_batch":"createRunsBatch","langsmith_get_run":"getRun","langsmith_update_run":"updateRun"},"params":{"action":{"oauthCredential":"credential"}}},"latex":{"namespace":"latex","methods":{"latex_compile":"compileDocument","latex_get_package":"getPackageDetails","latex_list_fonts":"listFonts","latex_search_packages":"searchPackages"}},"launchdarkly":{"namespace":"legacy.launchdarkly","methods":{"create_flag":"createFlag","delete_flag":"deleteFlag","get_audit_log":"getAuditLog","get_flag":"getFlag","get_flag_status":"getFlagStatus","list_environments":"listEnvironments","list_flags":"listFlags","list_members":"listMembers","list_projects":"listProjects","list_segments":"listSegments","toggle_flag":"toggleFlag","update_flag":"updateFlag"}},"launchdarkly_v2":{"namespace":"launchdarkly","methods":{"create_flag":"createFlag","delete_flag":"deleteFlag","get_audit_log":"getAuditLog","get_flag":"getFlag","get_flag_status":"getFlagStatus","list_environments":"listEnvironments","list_flags":"listFlags","list_members":"listMembers","list_projects":"listProjects","list_segments":"listSegments","toggle_flag":"toggleFlag","update_flag":"updateFlag"},"params":{"action":{"oauthCredential":"credential"}}},"leadmagic":{"namespace":"leadmagic","methods":{"leadmagic_company_search":"companySearch","leadmagic_email_to_profile":"emailToProfile","leadmagic_find_email":"findEmail","leadmagic_find_mobile":"findMobile","leadmagic_get_credits":"getCredits","leadmagic_profile_search":"profileSearch","leadmagic_profile_to_email":"profileToEmail","leadmagic_role_finder":"roleFinder","leadmagic_validate_email":"validateEmail"}},"lemlist":{"namespace":"legacy.lemlist","methods":{"get_activities":"getActivities","get_lead":"getLead","send_email":"sendEmail"},"triggers":{"lemlist_email_bounced":"emailBounced","lemlist_email_clicked":"emailClicked","lemlist_email_opened":"emailOpened","lemlist_email_replied":"emailReplied","lemlist_email_sent":"emailSent","lemlist_interested":"interested","lemlist_linkedin_replied":"linkedinReplied","lemlist_not_interested":"notInterested","lemlist_webhook":"webhook"}},"lemlist_v2":{"namespace":"lemlist","methods":{"get_activities":"getActivities","get_lead":"getLead","send_email":"sendEmail"},"triggers":{"lemlist_email_bounced":"emailBounced","lemlist_email_clicked":"emailClicked","lemlist_email_opened":"emailOpened","lemlist_email_replied":"emailReplied","lemlist_email_sent":"emailSent","lemlist_interested":"interested","lemlist_linkedin_replied":"linkedinReplied","lemlist_not_interested":"notInterested","lemlist_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"linear":{"namespace":"legacy.linear","methods":{"linear_add_label_to_issue":"addLabelToIssue","linear_add_label_to_project":"addLabelToProject","linear_archive_issue":"archiveIssue","linear_archive_label":"archiveLabel","linear_archive_project":"archiveProject","linear_create_attachment":"createAttachment","linear_create_comment":"createComment","linear_create_customer":"createCustomer","linear_create_customer_request":"createCustomerRequest","linear_create_customer_status":"createCustomerStatus","linear_create_customer_tier":"createCustomerTier","linear_create_cycle":"createCycle","linear_create_favorite":"createFavorite","linear_create_issue":"createIssue","linear_create_issue_relation":"createIssueRelation","linear_create_label":"createLabel","linear_create_project":"createProject","linear_create_project_label":"createProjectLabel","linear_create_project_milestone":"createProjectMilestone","linear_create_project_status":"createProjectStatus","linear_create_project_update":"createProjectUpdate","linear_create_workflow_state":"createWorkflowState","linear_delete_attachment":"deleteAttachment","linear_delete_comment":"deleteComment","linear_delete_customer":"deleteCustomer","linear_delete_customer_status":"deleteCustomerStatus","linear_delete_customer_tier":"deleteCustomerTier","linear_delete_issue":"deleteIssue","linear_delete_issue_relation":"deleteIssueRelation","linear_delete_project":"deleteProject","linear_delete_project_label":"deleteProjectLabel","linear_delete_project_milestone":"deleteProjectMilestone","linear_delete_project_status":"deleteProjectStatus","linear_get_active_cycle":"getActiveCycle","linear_get_customer":"getCustomer","linear_get_cycle":"getCycle","linear_get_issue":"getIssue","linear_get_project":"getProject","linear_get_viewer":"getViewer","linear_list_attachments":"listAttachments","linear_list_comments":"listComments","linear_list_customer_requests":"listCustomerRequests","linear_list_customer_statuses":"listCustomerStatuses","linear_list_customer_tiers":"listCustomerTiers","linear_list_customers":"listCustomers","linear_list_cycles":"listCycles","linear_list_favorites":"listFavorites","linear_list_issue_relations":"listIssueRelations","linear_list_labels":"listLabels","linear_list_notifications":"listNotifications","linear_list_project_labels":"listProjectLabels","linear_list_project_milestones":"listProjectMilestones","linear_list_project_statuses":"listProjectStatuses","linear_list_project_updates":"listProjectUpdates","linear_list_projects":"listProjects","linear_list_teams":"listTeams","linear_list_users":"listUsers","linear_list_workflow_states":"listWorkflowStates","linear_merge_customers":"mergeCustomers","linear_read_issues":"readIssues","linear_remove_label_from_issue":"removeLabelFromIssue","linear_remove_label_from_project":"removeLabelFromProject","linear_search_issues":"searchIssues","linear_unarchive_issue":"unarchiveIssue","linear_update_attachment":"updateAttachment","linear_update_comment":"updateComment","linear_update_customer":"updateCustomer","linear_update_customer_request":"updateCustomerRequest","linear_update_customer_status":"updateCustomerStatus","linear_update_customer_tier":"updateCustomerTier","linear_update_issue":"updateIssue","linear_update_label":"updateLabel","linear_update_notification":"updateNotification","linear_update_project":"updateProject","linear_update_project_label":"updateProjectLabel","linear_update_project_milestone":"updateProjectMilestone","linear_update_project_status":"updateProjectStatus","linear_update_workflow_state":"updateWorkflowState"},"triggers":{"linear_comment_created":"commentCreated","linear_comment_updated":"commentUpdated","linear_customer_request_created":"customerRequestCreated","linear_customer_request_updated":"customerRequestUpdated","linear_cycle_created":"cycleCreated","linear_cycle_updated":"cycleUpdated","linear_issue_created":"issueCreated","linear_issue_removed":"issueRemoved","linear_issue_updated":"issueUpdated","linear_label_created":"labelCreated","linear_label_updated":"labelUpdated","linear_project_created":"projectCreated","linear_project_update_created":"projectUpdateCreated","linear_project_updated":"projectUpdated","linear_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"linear_v2":{"namespace":"linear","methods":{"linear_add_label_to_issue":"addLabelToIssue","linear_add_label_to_project":"addLabelToProject","linear_archive_issue":"archiveIssue","linear_archive_label":"archiveLabel","linear_archive_project":"archiveProject","linear_create_attachment":"createAttachment","linear_create_comment":"createComment","linear_create_customer":"createCustomer","linear_create_customer_request":"createCustomerRequest","linear_create_customer_status":"createCustomerStatus","linear_create_customer_tier":"createCustomerTier","linear_create_cycle":"createCycle","linear_create_favorite":"createFavorite","linear_create_issue":"createIssue","linear_create_issue_relation":"createIssueRelation","linear_create_label":"createLabel","linear_create_project":"createProject","linear_create_project_label":"createProjectLabel","linear_create_project_milestone":"createProjectMilestone","linear_create_project_status":"createProjectStatus","linear_create_project_update":"createProjectUpdate","linear_create_workflow_state":"createWorkflowState","linear_delete_attachment":"deleteAttachment","linear_delete_comment":"deleteComment","linear_delete_customer":"deleteCustomer","linear_delete_customer_status":"deleteCustomerStatus","linear_delete_customer_tier":"deleteCustomerTier","linear_delete_issue":"deleteIssue","linear_delete_issue_relation":"deleteIssueRelation","linear_delete_project":"deleteProject","linear_delete_project_label":"deleteProjectLabel","linear_delete_project_milestone":"deleteProjectMilestone","linear_delete_project_status":"deleteProjectStatus","linear_get_active_cycle":"getActiveCycle","linear_get_customer":"getCustomer","linear_get_cycle":"getCycle","linear_get_issue":"getIssue","linear_get_project":"getProject","linear_get_viewer":"getViewer","linear_list_attachments":"listAttachments","linear_list_comments":"listComments","linear_list_customer_requests":"listCustomerRequests","linear_list_customer_statuses":"listCustomerStatuses","linear_list_customer_tiers":"listCustomerTiers","linear_list_customers":"listCustomers","linear_list_cycles":"listCycles","linear_list_favorites":"listFavorites","linear_list_issue_relations":"listIssueRelations","linear_list_labels":"listLabels","linear_list_notifications":"listNotifications","linear_list_project_labels":"listProjectLabels","linear_list_project_milestones":"listProjectMilestones","linear_list_project_statuses":"listProjectStatuses","linear_list_project_updates":"listProjectUpdates","linear_list_projects":"listProjects","linear_list_teams":"listTeams","linear_list_users":"listUsers","linear_list_workflow_states":"listWorkflowStates","linear_merge_customers":"mergeCustomers","linear_read_issues":"readIssues","linear_remove_label_from_issue":"removeLabelFromIssue","linear_remove_label_from_project":"removeLabelFromProject","linear_search_issues":"searchIssues","linear_unarchive_issue":"unarchiveIssue","linear_update_attachment":"updateAttachment","linear_update_comment":"updateComment","linear_update_customer":"updateCustomer","linear_update_customer_request":"updateCustomerRequest","linear_update_customer_status":"updateCustomerStatus","linear_update_customer_tier":"updateCustomerTier","linear_update_issue":"updateIssue","linear_update_label":"updateLabel","linear_update_notification":"updateNotification","linear_update_project":"updateProject","linear_update_project_label":"updateProjectLabel","linear_update_project_milestone":"updateProjectMilestone","linear_update_project_status":"updateProjectStatus","linear_update_workflow_state":"updateWorkflowState"},"triggers":{"linear_comment_created_v2":"commentCreated","linear_comment_updated_v2":"commentUpdated","linear_customer_request_created_v2":"customerRequestCreated","linear_customer_request_updated_v2":"customerRequestUpdated","linear_cycle_created_v2":"cycleCreated","linear_cycle_updated_v2":"cycleUpdated","linear_issue_created_v2":"issueCreated","linear_issue_removed_v2":"issueRemoved","linear_issue_updated_v2":"issueUpdated","linear_label_created_v2":"labelCreated","linear_label_updated_v2":"labelUpdated","linear_project_created_v2":"projectCreated","linear_project_update_created_v2":"projectUpdateCreated","linear_project_updated_v2":"projectUpdated","linear_webhook_v2":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"linkedin":{"namespace":"linkedin","methods":{"get_profile":"getProfile","share_post":"sharePost"},"params":{"action":{"oauthCredential":"credential"}}},"linkup":{"namespace":"linkup"},"linq":{"namespace":"legacy.linq","methods":{"add_participant":"addParticipant","check_imessage":"checkIMessage","check_rcs":"checkRcs","create_attachment":"createAttachment","create_chat":"createChat","create_contact_card":"createContactCard","create_webhook_subscription":"createWebhookSubscription","delete_attachment":"deleteAttachment","delete_message":"deleteMessage","delete_webhook_subscription":"deleteWebhookSubscription","edit_message":"editMessage","get_attachment":"getAttachment","get_chat":"getChat","get_contact_card":"getContactCard","get_message":"getMessage","get_webhook_subscription":"getWebhookSubscription","leave_chat":"leaveChat","list_chats":"listChats","list_messages":"listMessages","list_phone_numbers":"listPhoneNumbers","list_thread":"listThread","list_webhook_events":"listWebhookEvents","list_webhook_subscriptions":"listWebhookSubscriptions","mark_chat_read":"markChatAsRead","react_to_message":"reactToMessage","remove_participant":"removeParticipant","send_message":"sendMessage","send_voice_memo":"sendVoiceMemo","share_contact_card":"shareContactCard","start_typing":"startTyping","stop_typing":"stopTyping","update_chat":"updateChat","update_contact_card":"updateContactCard","update_webhook_subscription":"updateWebhookSubscription"},"triggers":{"linq_message_delivered":"messageDelivered","linq_message_failed":"messageFailed","linq_message_read":"messageRead","linq_message_received":"messageReceived","linq_reaction_added":"reactionAdded","linq_webhook":"webhook"}},"linq_v2":{"namespace":"linq","methods":{"add_participant":"addParticipant","check_imessage":"checkIMessage","check_rcs":"checkRcs","create_attachment":"createAttachment","create_chat":"createChat","create_contact_card":"createContactCard","create_webhook_subscription":"createWebhookSubscription","delete_attachment":"deleteAttachment","delete_message":"deleteMessage","delete_webhook_subscription":"deleteWebhookSubscription","edit_message":"editMessage","get_attachment":"getAttachment","get_chat":"getChat","get_contact_card":"getContactCard","get_message":"getMessage","get_webhook_subscription":"getWebhookSubscription","leave_chat":"leaveChat","list_chats":"listChats","list_messages":"listMessages","list_phone_numbers":"listPhoneNumbers","list_thread":"listThread","list_webhook_events":"listWebhookEvents","list_webhook_subscriptions":"listWebhookSubscriptions","mark_chat_read":"markChatAsRead","react_to_message":"reactToMessage","remove_participant":"removeParticipant","send_message":"sendMessage","send_voice_memo":"sendVoiceMemo","share_contact_card":"shareContactCard","start_typing":"startTyping","stop_typing":"stopTyping","update_chat":"updateChat","update_contact_card":"updateContactCard","update_webhook_subscription":"updateWebhookSubscription"},"triggers":{"linq_message_delivered":"messageDelivered","linq_message_failed":"messageFailed","linq_message_read":"messageRead","linq_message_received":"messageReceived","linq_reaction_added":"reactionAdded","linq_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"logfire":{"namespace":"legacy.logfire","methods":{"logfire_get_token_info":"getTokenInfo","logfire_get_trace":"getTrace","logfire_query":"runSqlQuery","logfire_search_records":"searchRecords"}},"logfire_v2":{"namespace":"logfire","methods":{"logfire_get_token_info":"getTokenInfo","logfire_get_trace":"getTrace","logfire_query":"runSqlQuery","logfire_search_records":"searchRecords"},"params":{"action":{"oauthCredential":"credential"}}},"logrocket":{"namespace":"logrocket","methods":{"create_release":"createRelease","get_audit_logs":"getAuditLogs","get_highlights":"getHighlights","identify_user":"identifyUser","list_exported_sessions":"listExportedSessions","request_highlights":"requestHighlights"}},"logs":{"namespace":"legacy.logs","methods":{"get_execution":"getExecutionDetails","get_log":"getLogById","query":"queryLogs"}},"logs_v2":{"namespace":"logs","methods":{"get_run_details":"getRunDetails","query":"queryLogs"}},"loops":{"namespace":"legacy.loops","methods":{"check_contact_suppression":"checkContactSuppression","create_contact":"createContact","create_contact_property":"createContactProperty","delete_contact":"deleteContact","find_contact":"findContact","get_transactional_email":"getTransactionalEmail","list_contact_properties":"listContactProperties","list_mailing_lists":"listMailingLists","list_transactional_emails":"listTransactionalEmails","remove_contact_suppression":"removeContactSuppression","send_event":"sendEvent","send_transactional_email":"sendTransactionalEmail","update_contact":"updateContact"},"triggers":{"loops_campaign_email_sent":"campaignEmailSent","loops_email_clicked":"emailClicked","loops_email_delivered":"emailDelivered","loops_email_hard_bounced":"emailHardBounced","loops_email_opened":"emailOpened","loops_email_soft_bounced":"emailSoftBounced","loops_loop_email_sent":"loopEmailSent","loops_transactional_email_sent":"transactionalEmailSent"}},"loops_v2":{"namespace":"loops","methods":{"check_contact_suppression":"checkContactSuppression","create_contact":"createContact","create_contact_property":"createContactProperty","delete_contact":"deleteContact","find_contact":"findContact","get_transactional_email":"getTransactionalEmail","list_contact_properties":"listContactProperties","list_mailing_lists":"listMailingLists","list_transactional_emails":"listTransactionalEmails","remove_contact_suppression":"removeContactSuppression","send_event":"sendEvent","send_transactional_email":"sendTransactionalEmail","update_contact":"updateContact"},"triggers":{"loops_campaign_email_sent":"campaignEmailSent","loops_email_clicked":"emailClicked","loops_email_delivered":"emailDelivered","loops_email_hard_bounced":"emailHardBounced","loops_email_opened":"emailOpened","loops_email_soft_bounced":"emailSoftBounced","loops_loop_email_sent":"loopEmailSent","loops_transactional_email_sent":"transactionalEmailSent"},"params":{"action":{"oauthCredential":"credential"}}},"luma":{"namespace":"legacy.luma","methods":{"add_guests":"addGuests","cancel_event":"cancelEvent","create_event":"createEvent","get_event":"getEvent","get_guest":"getGuest","get_guests":"getGuests","list_events":"listEvents","lookup_event":"lookupEvent","send_invites":"sendInvites","update_event":"updateEvent","update_guest_status":"updateGuestStatus"}},"luma_v2":{"namespace":"luma","methods":{"add_guests":"addGuests","cancel_event":"cancelEvent","create_event":"createEvent","get_event":"getEvent","get_guest":"getGuest","get_guests":"getGuests","list_events":"listEvents","lookup_event":"lookupEvent","send_invites":"sendInvites","update_event":"updateEvent","update_guest_status":"updateGuestStatus"},"params":{"action":{"oauthCredential":"credential"}}},"mailchimp":{"namespace":"legacy.mailchimp","methods":{"add_member":"addMember","add_member_tags":"addMemberTags","add_or_update_member":"addOrUpdateMember","add_segment_member":"addSegmentMember","add_subscriber_to_automation":"addSubscriberToAutomation","archive_member":"archiveMember","create_audience":"createAudience","create_batch_operation":"createBatchOperation","create_campaign":"createCampaign","create_interest":"createInterest","create_interest_category":"createInterestCategory","create_landing_page":"createLandingPage","create_merge_field":"createMergeField","create_segment":"createSegment","create_template":"createTemplate","delete_audience":"deleteAudience","delete_batch_operation":"deleteBatchOperation","delete_campaign":"deleteCampaign","delete_interest":"deleteInterest","delete_interest_category":"deleteInterestCategory","delete_landing_page":"deleteLandingPage","delete_member":"deleteMember","delete_member_permanent":"permanentlyDeleteMember","delete_merge_field":"deleteMergeField","delete_segment":"deleteSegment","delete_template":"deleteTemplate","get_audience":"getAudience","get_audiences":"getAudiences","get_automation":"getAutomation","get_automations":"getAutomations","get_batch_operation":"getBatchOperation","get_batch_operations":"getBatchOperations","get_campaign":"getCampaign","get_campaign_content":"getCampaignContent","get_campaign_report":"getCampaignReport","get_campaign_reports":"getCampaignReports","get_campaigns":"getCampaigns","get_interest":"getInterest","get_interest_categories":"getInterestCategories","get_interest_category":"getInterestCategory","get_interests":"getInterests","get_landing_page":"getLandingPage","get_landing_pages":"getLandingPages","get_member":"getMember","get_member_tags":"getMemberTags","get_members":"getMembers","get_merge_field":"getMergeField","get_merge_fields":"getMergeFields","get_segment":"getSegment","get_segment_members":"getSegmentMembers","get_segments":"getSegments","get_template":"getTemplate","get_templates":"getTemplates","pause_automation":"pauseAutomation","publish_landing_page":"publishLandingPage","remove_member_tags":"removeMemberTags","remove_segment_member":"removeSegmentMember","replicate_campaign":"replicateCampaign","schedule_campaign":"scheduleCampaign","send_campaign":"sendCampaign","set_campaign_content":"setCampaignContent","start_automation":"startAutomation","unarchive_member":"unarchiveMember","unpublish_landing_page":"unpublishLandingPage","unschedule_campaign":"unscheduleCampaign","update_audience":"updateAudience","update_campaign":"updateCampaign","update_interest":"updateInterest","update_interest_category":"updateInterestCategory","update_landing_page":"updateLandingPage","update_member":"updateMember","update_merge_field":"updateMergeField","update_segment":"updateSegment","update_template":"updateTemplate"}},"mailchimp_v2":{"namespace":"mailchimp","methods":{"add_member":"addMember","add_member_tags":"addMemberTags","add_or_update_member":"addOrUpdateMember","add_segment_member":"addSegmentMember","add_subscriber_to_automation":"addSubscriberToAutomation","archive_member":"archiveMember","create_audience":"createAudience","create_batch_operation":"createBatchOperation","create_campaign":"createCampaign","create_interest":"createInterest","create_interest_category":"createInterestCategory","create_landing_page":"createLandingPage","create_merge_field":"createMergeField","create_segment":"createSegment","create_template":"createTemplate","delete_audience":"deleteAudience","delete_batch_operation":"deleteBatchOperation","delete_campaign":"deleteCampaign","delete_interest":"deleteInterest","delete_interest_category":"deleteInterestCategory","delete_landing_page":"deleteLandingPage","delete_member":"deleteMember","delete_member_permanent":"permanentlyDeleteMember","delete_merge_field":"deleteMergeField","delete_segment":"deleteSegment","delete_template":"deleteTemplate","get_audience":"getAudience","get_audiences":"getAudiences","get_automation":"getAutomation","get_automations":"getAutomations","get_batch_operation":"getBatchOperation","get_batch_operations":"getBatchOperations","get_campaign":"getCampaign","get_campaign_content":"getCampaignContent","get_campaign_report":"getCampaignReport","get_campaign_reports":"getCampaignReports","get_campaigns":"getCampaigns","get_interest":"getInterest","get_interest_categories":"getInterestCategories","get_interest_category":"getInterestCategory","get_interests":"getInterests","get_landing_page":"getLandingPage","get_landing_pages":"getLandingPages","get_member":"getMember","get_member_tags":"getMemberTags","get_members":"getMembers","get_merge_field":"getMergeField","get_merge_fields":"getMergeFields","get_segment":"getSegment","get_segment_members":"getSegmentMembers","get_segments":"getSegments","get_template":"getTemplate","get_templates":"getTemplates","pause_automation":"pauseAutomation","publish_landing_page":"publishLandingPage","remove_member_tags":"removeMemberTags","remove_segment_member":"removeSegmentMember","replicate_campaign":"replicateCampaign","schedule_campaign":"scheduleCampaign","send_campaign":"sendCampaign","set_campaign_content":"setCampaignContent","start_automation":"startAutomation","unarchive_member":"unarchiveMember","unpublish_landing_page":"unpublishLandingPage","unschedule_campaign":"unscheduleCampaign","update_audience":"updateAudience","update_campaign":"updateCampaign","update_interest":"updateInterest","update_interest_category":"updateInterestCategory","update_landing_page":"updateLandingPage","update_member":"updateMember","update_merge_field":"updateMergeField","update_segment":"updateSegment","update_template":"updateTemplate"},"params":{"action":{"oauthCredential":"credential"}}},"mailgun":{"namespace":"legacy.mailgun","methods":{"add_list_member":"addListMember","create_mailing_list":"createMailingList","get_domain":"getDomain","get_mailing_list":"getMailingList","get_message":"getMessage","list_domains":"listDomains","list_messages":"listMessages","send_message":"sendMessage"}},"mailgun_v2":{"namespace":"mailgun","methods":{"add_list_member":"addListMember","create_mailing_list":"createMailingList","get_domain":"getDomain","get_mailing_list":"getMailingList","get_message":"getMessage","list_domains":"listDomains","list_messages":"listMessages","send_message":"sendMessage"},"params":{"action":{"oauthCredential":"credential"}}},"managed_agent":{"namespace":"managedAgent","methods":{"archive_session":"archiveSession","create_session":"createSession","delete_session":"deleteSession","get_session":"getSession","interrupt_session":"interruptSession","list_events":"listEvents","respond_custom_tool":"respondToCustomTool","respond_tool_confirmation":"respondToToolConfirmation","run_session":"runSessionCreateSendWaitForReply","send_message":"sendMessage","update_session":"updateSession"}},"manageengine_sdp":{"namespace":"manageengineSdp","methods":{"add_change_note":"addChangeNote","add_problem_note":"addProblemNote","add_request_note":"addRequestNote","create_asset":"createAsset","create_change":"createChange","create_problem":"createProblem","create_request":"createRequest","create_solution":"createSolution","delete_asset":"deleteAsset","delete_change":"deleteChange","delete_problem":"deleteProblem","delete_request":"deleteRequest","delete_solution":"deleteSolution","get_asset":"getAsset","get_change":"getChange","get_problem":"getProblem","get_request":"getRequest","get_solution":"getSolution","list_assets":"listAssets","list_change_notes":"listChangeNotes","list_changes":"listChanges","list_problem_notes":"listProblemNotes","list_problems":"listProblems","list_request_notes":"listRequestNotes","list_requests":"listRequests","list_solutions":"listSolutions","update_asset":"updateAsset","update_change":"updateChange","update_problem":"updateProblem","update_request":"updateRequest","update_solution":"updateSolution"},"params":{"action":{"oauthCredential":"credential"}}},"manual_trigger":{"namespace":"legacy.manualTrigger"},"mcp":{"namespace":"mcpBlock","methods":{"list":"listOperations","run":"runOperation"}},"mem0":{"namespace":"legacy.mem0","methods":{"add":"addMemories","get":"getMemories","search":"searchMemories"}},"mem0_v2":{"namespace":"mem0","methods":{"add":"addMemories","get":"getMemories","search":"searchMemories"},"params":{"action":{"oauthCredential":"credential"}}},"memory":{"namespace":"memory","methods":{"add":"addMemory","delete":"deleteMemory","get":"getMemory","getAll":"getAllMemories"}},"microsoft_ad":{"namespace":"microsoftAd","methods":{"add_directory_role_member":"addDirectoryRoleMember","add_group_member":"addGroupMember","add_user_app_role_assignment":"grantAppRoleToUser","assign_license":"assignLicense","create_group":"createGroup","create_user":"createUser","delete_group":"deleteGroup","delete_user":"deleteUser","get_conditional_access_policy":"getConditionalAccessPolicy","get_device":"getDevice","get_group":"getGroup","get_user":"getUser","list_authentication_methods":"listAuthenticationMethods","list_conditional_access_policies":"listConditionalAccessPolicies","list_devices":"listDevices","list_directory_audits":"listDirectoryAudits","list_directory_role_members":"listDirectoryRoleMembers","list_directory_roles":"listDirectoryRoles","list_group_members":"listGroupMembers","list_groups":"listGroups","list_service_principal_app_role_assignments":"listApplicationAssignments","list_service_principals":"listServicePrincipals","list_sign_ins":"listSignIns","list_subscribed_skus":"listSubscribedSkus","list_user_app_role_assignments":"listUserAppRoleAssignments","list_user_devices":"listUserDevices","list_user_licenses":"listUserLicenses","list_user_memberships":"listUserMemberships","list_users":"listUsers","remove_directory_role_member":"removeDirectoryRoleMember","remove_group_member":"removeGroupMember","remove_user_app_role_assignment":"revokeAppRoleFromUser","reset_password":"resetPassword","revoke_sign_in_sessions":"revokeSignInSessions","set_password":"setPassword","update_group":"updateGroup","update_user":"updateUser"}},"microsoft_dataverse":{"namespace":"legacy.microsoftDataverse","methods":{"associate":"associateRecords","create_multiple":"createMultiple","create_record":"createRecord","delete_record":"deleteRecord","disassociate":"disassociateRecords","download_file":"downloadFile","execute_action":"executeAction","execute_function":"executeFunction","fetchxml_query":"fetchXmlQuery","get_entity_metadata":"getTableMetadata","get_record":"getRecord","list_records":"listRecords","search":"search","update_multiple":"updateMultiple","update_record":"updateRecord","upload_file":"uploadFile","upsert_record":"upsertRecord","whoami":"whoAmI"}},"microsoft_dataverse_v2":{"namespace":"microsoftDataverse","methods":{"associate":"associateRecords","create_multiple":"createMultiple","create_record":"createRecord","delete_record":"deleteRecord","disassociate":"disassociateRecords","download_file":"downloadFile","execute_action":"executeAction","execute_function":"executeFunction","fetchxml_query":"fetchXmlQuery","get_entity_metadata":"getTableMetadata","get_record":"getRecord","list_records":"listRecords","search":"search","update_multiple":"updateMultiple","update_record":"updateRecord","upload_file":"uploadFile","upsert_record":"upsertRecord","whoami":"whoAmI"}},"microsoft_dynamics_365":{"namespace":"microsoftDynamics365","methods":{"assign_record":"assignRecord","close_case":"closeCase","close_opportunity":"closeOpportunity","create_record":"createRecord","get_record":"getRecord","list_owners":"listOwners","list_records":"listRecords","qualify_lead":"qualifyLead","search_records":"searchRecords","update_record":"updateRecord"}},"microsoft_excel":{"namespace":"legacy.microsoftExcel","methods":{"clear_range":"clearRange","create_table":"createTable","delete_worksheet":"deleteWorksheet","format_range":"formatRange","read":"readData","sort_range":"sortRange","table_add":"addToTable","worksheet_add":"addWorksheet","write":"writeUpdateData"},"params":{"action":{"oauthCredential":"credential"}}},"microsoft_excel_v2":{"namespace":"microsoftExcel","methods":{"calculate":"calculateWorkbook","clear_range":"clearRange","close_session":"closeSession","create_session":"createSession","create_table":"createTable","delete_table":"deleteTable","delete_table_row":"deleteTableRow","delete_worksheet":"deleteWorksheet","format_range":"formatRange","get_table":"getTable","get_table_row":"getTableRow","get_worksheet":"getWorksheet","list_table_rows":"listTableRows","list_tables":"listTables","list_worksheets":"listWorksheets","read":"readData","refresh_session":"refreshSession","sort_range":"sortRange","table_add":"addTableRows","update_table":"updateTable","update_table_row":"updateTableRow","update_worksheet":"updateWorksheet","worksheet_add":"addWorksheet","write":"writeData"},"params":{"action":{"oauthCredential":"credential"}}},"microsoft_planner":{"namespace":"microsoftPlanner","methods":{"create_bucket":"createBucket","create_plan":"createPlan","create_task":"createTask","delete_bucket":"deleteBucket","delete_plan":"deletePlan","delete_task":"deleteTask","get_plan_details":"getPlanDetails","get_task_details":"getTaskDetails","list_buckets":"listBuckets","list_plans":"listPlans","read_bucket":"readBucket","read_plan":"readPlan","read_task":"readTask","update_bucket":"updateBucket","update_plan":"updatePlan","update_plan_details":"updatePlanDetails","update_task":"updateTask","update_task_details":"updateTaskDetails"},"params":{"action":{"oauthCredential":"credential"}}},"microsoft_teams":{"namespace":"microsoftTeams","methods":{"delete_channel_message":"deleteChannelMessage","delete_chat_message":"deleteChatMessage","get_message":"getMessage","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_chat_members":"listChatMembers","list_chats":"listChats","list_team_members":"listTeamMembers","list_teams":"listTeams","read_channel":"readChannelMessages","read_chat":"readChatMessages","reply_to_message":"replyToChannelMessage","set_reaction":"addReaction","unset_reaction":"removeReaction","update_channel_message":"updateChannelMessage","update_chat_message":"updateChatMessage","write_channel":"writeChannelMessage","write_chat":"writeChatMessage"},"triggers":{"microsoftteams_chat_subscription":"microsoftteamsChatSubscription","microsoftteams_webhook":"microsoftteamsWebhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"microsoft_word":{"namespace":"microsoftWord","methods":{"append":"appendContent","create":"createDocument","create_from_template":"createFromTemplate","export_pdf":"exportAsPdf","list":"listDocuments","read":"readDocument","replace_text":"findAndReplaceText","update":"replaceContent"},"params":{"action":{"oauthCredential":"credential"}}},"millionverifier":{"namespace":"millionverifier","methods":{"millionverifier_get_credits":"getRemainingCredits","millionverifier_verify_email":"verifyEmail"}},"mintlify":{"namespace":"mintlify","methods":{"create_agent_job":"createAgentJob","create_assistant_message":"askAssistant","detect_ai_prose":"detectAiSoundingProse","get_agent_job":"getAgentJob","get_assistant_caller_stats":"getAssistantCallerStats","get_assistant_conversations":"getAssistantConversations","get_feedback":"getFeedback","get_feedback_by_page":"getFeedbackByPage","get_page_content":"getPageContent","get_searches":"getSearchQueries","get_update_status":"getUpdateStatus","get_views":"getPageViews","get_visitors":"getUniqueVisitors","search":"searchDocumentation","send_agent_message":"sendAgentMessage","trigger_automation":"triggerAutomation","trigger_preview":"triggerPreviewDeployment","trigger_update":"triggerUpdate"}},"mistral_parse":{"namespace":"legacy.mistralParse"},"mistral_parse_v2":{"namespace":"legacy.mistralParseV2"},"mistral_parse_v3":{"namespace":"mistralParse"},"modal":{"namespace":"modal","methods":{"call_function":"callFunction","chat_completion":"chatCompletion","list_models":"listModels"}},"monaco":{"namespace":"monaco","methods":{"monaco_add_audience_contacts":"addContactsToAudience","monaco_add_campaign_audiences":"addAudiencesToCampaign","monaco_create_audience":"createAudience","monaco_create_contact":"createContact","monaco_create_opportunity":"createOpportunity","monaco_create_tag":"createTag","monaco_create_task":"createTask","monaco_delete_account":"deleteAccount","monaco_delete_contact":"deleteContact","monaco_delete_opportunity":"deleteOpportunity","monaco_enroll_campaign_contacts":"enrollContactsInCampaign","monaco_get_account":"getAccount","monaco_get_audience":"getAudience","monaco_get_campaign":"getCampaign","monaco_get_contact":"getContact","monaco_get_conversation":"getConversation","monaco_get_current_user":"getCurrentUser","monaco_get_field_schemas":"getFieldSchemas","monaco_get_meeting":"getMeeting","monaco_get_opportunity":"getOpportunity","monaco_get_sequence":"getSequence","monaco_get_task":"getTask","monaco_link_opportunity_contacts":"linkContactsToOpportunity","monaco_list_accounts":"listAccounts","monaco_list_audience_contacts":"listAudienceContacts","monaco_list_audiences":"listAudiences","monaco_list_campaigns":"listCampaigns","monaco_list_contacts":"listContacts","monaco_list_meetings":"listMeetings","monaco_list_messages":"listMessages","monaco_list_opportunities":"listOpportunities","monaco_list_opportunity_contacts":"listOpportunityContacts","monaco_list_pipelines":"listPipelines","monaco_list_sequences":"listSequences","monaco_list_tags":"listTags","monaco_list_tasks":"listTasks","monaco_list_users":"listUsers","monaco_remove_audience_contacts":"removeContactsFromAudience","monaco_unlink_opportunity_contacts":"unlinkContactsFromOpportunity","monaco_update_account":"updateAccount","monaco_update_contact":"updateContact","monaco_update_opportunity":"updateOpportunity","monaco_update_sequence":"updateSequence","monaco_update_task":"updateTask","monaco_upsert_account":"upsertAccount","monaco_upsert_contact":"upsertContact"},"params":{"action":{"oauthCredential":"credential"}}},"monday":{"namespace":"monday","methods":{"archive_item":"archiveItem","change_column_value":"changeColumnValue","create_board":"createBoard","create_column":"createColumn","create_group":"createGroup","create_item":"createItem","create_subitem":"createSubitem","create_update":"createUpdate","delete_item":"deleteItem","duplicate_item":"duplicateItem","get_board":"getBoard","get_groups":"getGroups","get_item":"getItem","get_items":"getItems","list_boards":"listBoards","move_item_to_group":"moveItemToGroup","search_items":"searchItems","update_item":"updateItem"},"triggers":{"monday_column_changed":"columnChanged","monday_item_archived":"itemArchived","monday_item_created":"itemCreated","monday_item_deleted":"itemDeleted","monday_item_moved":"itemMoved","monday_item_name_changed":"itemNameChanged","monday_status_changed":"statusChanged","monday_subitem_created":"subitemCreated","monday_update_created":"updateCreated"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"mongodb":{"namespace":"mongodb","methods":{"delete":"deleteDocuments","execute":"aggregatePipeline","insert":"insertDocuments","introspect":"introspectDatabase","query":"findDocuments","update":"updateDocuments"}},"mothership":{"namespace":"mothership"},"mssql":{"namespace":"legacy.mssql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"mssql_v2":{"namespace":"mssql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"mysql":{"namespace":"legacy.mysql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"mysql_v2":{"namespace":"mysql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"neo4j":{"namespace":"neo4j","methods":{"create":"createNodesRelationships","delete":"deleteNodesRelationships","execute":"executeCypher","introspect":"introspectSchema","merge":"mergeFindOrCreate","query":"queryMatch","update":"updatePropertiesSet"}},"netsuite":{"namespace":"netsuite","methods":{"netsuite_attach_record":"attachRecordOrFile","netsuite_batch_create_records":"batchCreateRecords","netsuite_batch_delete_records":"batchDeleteRecords","netsuite_batch_get_records":"batchGetRecords","netsuite_batch_update_records":"batchUpdateRecords","netsuite_batch_upsert_records":"batchUpsertRecords","netsuite_create_record":"createRecord","netsuite_delete_record":"deleteRecord","netsuite_detach_record":"detachRecordOrFile","netsuite_execute_action":"executeRecordAction","netsuite_execute_dataset":"executeSuiteAnalyticsDataset","netsuite_execute_suiteql":"executeSuiteQl","netsuite_get_async_result":"getAsyncOperationResult","netsuite_get_async_status":"getAsyncStatus","netsuite_get_governance_limits":"getGovernanceLimits","netsuite_get_record":"getRecord","netsuite_get_record_form":"getRecordForm","netsuite_get_record_metadata":"getRecordMetadata","netsuite_get_select_options":"getSelectOptions","netsuite_get_server_time":"getServerTime","netsuite_get_subresource":"getSubresource","netsuite_list_datasets":"listSuiteAnalyticsDatasets","netsuite_list_record_types":"listRecordTypes","netsuite_list_records":"listSearchRecords","netsuite_transform_record":"transformRecord","netsuite_update_record":"updateRecord","netsuite_upsert_record":"upsertRecord"},"params":{"action":{"oauthCredential":"credential"}}},"neverbounce":{"namespace":"neverbounce","methods":{"neverbounce_get_credits":"getRemainingCredits","neverbounce_verify_email":"verifyEmail"}},"new_relic":{"namespace":"legacy.newRelic","methods":{"new_relic_create_deployment_event":"createDeploymentEvent","new_relic_get_entity":"getEntity","new_relic_nrql_query":"runNrqlQuery","new_relic_search_entities":"searchEntities"}},"new_relic_v2":{"namespace":"newRelic","methods":{"new_relic_create_deployment_event":"createDeploymentEvent","new_relic_get_entity":"getEntity","new_relic_nrql_query":"runNrqlQuery","new_relic_search_entities":"searchEntities"},"params":{"action":{"oauthCredential":"credential"}}},"note":{"namespace":"note"},"notion":{"namespace":"legacy.notion","methods":{"notion_add_database_row":"addDatabaseRow","notion_append_blocks":"appendBlockChildren","notion_create_comment":"createComment","notion_create_database":"createDatabase","notion_create_page":"createPage","notion_delete_block":"deleteBlock","notion_list_comments":"listComments","notion_list_users":"listUsers","notion_query_database":"queryDatabase","notion_read":"readPage","notion_read_database":"readDatabase","notion_retrieve_block":"retrieveBlock","notion_retrieve_block_children":"retrieveBlockChildren","notion_retrieve_user":"retrieveUser","notion_search":"searchWorkspace","notion_update_block":"updateBlock","notion_update_page":"updatePageProperties","notion_write":"appendContent"},"params":{"action":{"oauthCredential":"credential"}}},"notion_v2":{"namespace":"notion","methods":{"notion_add_database_row":"addDatabaseRow","notion_append_blocks":"appendBlockChildren","notion_create_comment":"createComment","notion_create_database":"createDatabase","notion_create_page":"createPage","notion_delete_block":"deleteBlock","notion_list_comments":"listComments","notion_list_users":"listUsers","notion_query_database":"queryDatabase","notion_read":"readPage","notion_read_database":"readDatabase","notion_retrieve_block":"retrieveBlock","notion_retrieve_block_children":"retrieveBlockChildren","notion_retrieve_user":"retrieveUser","notion_search":"searchWorkspace","notion_update_block":"updateBlock","notion_update_page":"updatePageProperties","notion_write":"appendContent"},"triggers":{"notion_comment_created":"commentCreated","notion_database_created":"databaseCreated","notion_database_deleted":"databaseDeleted","notion_database_schema_updated":"databaseSchemaUpdated","notion_page_content_updated":"pageContentUpdated","notion_page_created":"pageCreated","notion_page_deleted":"pageDeleted","notion_page_properties_updated":"pagePropertiesUpdated","notion_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"obsidian":{"namespace":"obsidian","methods":{"append_active":"appendToActiveFile","append_note":"appendToNote","append_periodic_note":"appendToPeriodicNote","create_note":"createNote","delete_note":"deleteNote","execute_command":"executeCommand","get_active":"getActiveFile","get_note":"getNote","get_periodic_note":"getPeriodicNote","list_commands":"listCommands","list_files":"listFiles","open_file":"openFile","patch_active":"patchActiveFile","patch_note":"patchNote","search":"search"}},"okta":{"namespace":"legacy.okta","methods":{"okta_activate_group_rule":"activateGroupRule","okta_activate_user":"activateUser","okta_add_user_to_group":"addUserToGroup","okta_assign_group_to_app":"assignGroupToApplication","okta_assign_user_role":"assignUserRole","okta_assign_user_to_app":"assignUserToApplication","okta_clear_user_sessions":"clearUserSessions","okta_create_group":"createGroup","okta_create_group_rule":"createGroupRule","okta_create_user":"createUser","okta_deactivate_group_rule":"deactivateGroupRule","okta_deactivate_user":"deactivateUser","okta_delete_group":"deleteGroup","okta_delete_group_rule":"deleteGroupRule","okta_delete_user":"deleteUser","okta_enroll_factor":"enrollFactor","okta_get_app":"getApplication","okta_get_factor":"getFactor","okta_get_group":"getGroup","okta_get_group_rule":"getGroupRule","okta_get_logs":"getSystemLogEvents","okta_get_session":"getSession","okta_get_user":"getUser","okta_list_app_groups":"listApplicationGroups","okta_list_app_users":"listApplicationUsers","okta_list_apps":"listApplications","okta_list_factors":"listFactors","okta_list_group_members":"listGroupMembers","okta_list_group_rules":"listGroupRules","okta_list_groups":"listGroups","okta_list_user_roles":"listUserRoles","okta_list_users":"listUsers","okta_remove_group_from_app":"removeGroupFromApplication","okta_remove_user_from_app":"removeUserFromApplication","okta_remove_user_from_group":"removeUserFromGroup","okta_remove_user_role":"removeUserRole","okta_reset_all_factors":"resetAllFactors","okta_reset_factor":"resetFactor","okta_reset_password":"resetPassword","okta_revoke_session":"revokeSession","okta_suspend_user":"suspendUser","okta_unsuspend_user":"unsuspendUser","okta_update_group":"updateGroup","okta_update_user":"updateUser"}},"okta_v2":{"namespace":"okta","methods":{"okta_activate_group_rule":"activateGroupRule","okta_activate_user":"activateUser","okta_add_user_to_group":"addUserToGroup","okta_assign_group_to_app":"assignGroupToApplication","okta_assign_user_role":"assignUserRole","okta_assign_user_to_app":"assignUserToApplication","okta_clear_user_sessions":"clearUserSessions","okta_create_group":"createGroup","okta_create_group_rule":"createGroupRule","okta_create_user":"createUser","okta_deactivate_group_rule":"deactivateGroupRule","okta_deactivate_user":"deactivateUser","okta_delete_group":"deleteGroup","okta_delete_group_rule":"deleteGroupRule","okta_delete_user":"deleteUser","okta_enroll_factor":"enrollFactor","okta_get_app":"getApplication","okta_get_factor":"getFactor","okta_get_group":"getGroup","okta_get_group_rule":"getGroupRule","okta_get_logs":"getSystemLogEvents","okta_get_session":"getSession","okta_get_user":"getUser","okta_list_app_groups":"listApplicationGroups","okta_list_app_users":"listApplicationUsers","okta_list_apps":"listApplications","okta_list_factors":"listFactors","okta_list_group_members":"listGroupMembers","okta_list_group_rules":"listGroupRules","okta_list_groups":"listGroups","okta_list_user_roles":"listUserRoles","okta_list_users":"listUsers","okta_remove_group_from_app":"removeGroupFromApplication","okta_remove_user_from_app":"removeUserFromApplication","okta_remove_user_from_group":"removeUserFromGroup","okta_remove_user_role":"removeUserRole","okta_reset_all_factors":"resetAllFactors","okta_reset_factor":"resetFactor","okta_reset_password":"resetPassword","okta_revoke_session":"revokeSession","okta_suspend_user":"suspendUser","okta_unsuspend_user":"unsuspendUser","okta_update_group":"updateGroup","okta_update_user":"updateUser"},"params":{"action":{"oauthCredential":"credential"}}},"onedrive":{"namespace":"onedrive","methods":{"copy":"copyFile","create_file":"createFile","create_folder":"createFolder","create_share_link":"createSharingLink","delete":"deleteFile","download":"downloadFile","get_drive_info":"getDriveInfo","get_item":"getItemInfo","list":"listFiles","move":"moveRenameFile","search":"searchFiles","upload":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"onepassword":{"namespace":"onepassword","methods":{"create_item":"createItem","delete_item":"deleteItem","get_item":"getItem","get_item_file":"getItemFile","get_vault":"getVault","list_items":"listItems","list_vaults":"listVaults","replace_item":"replaceItem","resolve_secret":"resolveSecret","update_item":"updateItem"}},"openai":{"namespace":"legacy.openai"},"oracle_fusion_financials":{"namespace":"oracleFusionFinancials","methods":{"oracle_fusion_financials_apply_receivables_receipt":"applyReceivablesReceipt","oracle_fusion_financials_approve_receivables_invoice":"approveReceivablesInvoice","oracle_fusion_financials_create_expense_line":"createExpenseLine","oracle_fusion_financials_create_expense_report":"createExpenseReport","oracle_fusion_financials_create_receivables_credit_memo":"createReceivablesCreditMemo","oracle_fusion_financials_create_receivables_invoice":"createReceivablesInvoice","oracle_fusion_financials_create_receivables_receipt":"createReceivablesReceipt","oracle_fusion_financials_get_expense_line":"getExpenseLine","oracle_fusion_financials_get_expense_report":"getExpenseReport","oracle_fusion_financials_get_gl_journal_batch":"getGlJournalBatch","oracle_fusion_financials_get_gl_ledger":"getGlLedger","oracle_fusion_financials_get_payables_invoice":"getPayablesInvoice","oracle_fusion_financials_get_payables_invoice_line":"getPayablesInvoiceLine","oracle_fusion_financials_get_payables_payment":"getPayablesPayment","oracle_fusion_financials_get_receivables_credit_memo":"getReceivablesCreditMemo","oracle_fusion_financials_get_receivables_invoice":"getReceivablesInvoice","oracle_fusion_financials_get_receivables_invoice_installment":"getReceivablesInvoiceInstallment","oracle_fusion_financials_get_receivables_invoice_line":"getReceivablesInvoiceLine","oracle_fusion_financials_get_receivables_receipt":"getReceivablesReceipt","oracle_fusion_financials_list_expense_lines":"listExpenseLines","oracle_fusion_financials_list_expense_reports":"listExpenseReports","oracle_fusion_financials_list_gl_balances":"listGlBalances","oracle_fusion_financials_list_gl_journal_batches":"listGlJournalBatches","oracle_fusion_financials_list_gl_ledgers":"listGlLedgers","oracle_fusion_financials_list_payables_invoice_lines":"listPayablesInvoiceLines","oracle_fusion_financials_list_payables_invoices":"listPayablesInvoices","oracle_fusion_financials_list_payables_payments":"listPayablesPayments","oracle_fusion_financials_list_receivables_credit_memos":"listReceivablesCreditMemos","oracle_fusion_financials_list_receivables_invoice_installments":"listReceivablesInvoiceInstallments","oracle_fusion_financials_list_receivables_invoice_lines":"listReceivablesInvoiceLines","oracle_fusion_financials_list_receivables_invoices":"listReceivablesInvoices","oracle_fusion_financials_list_receivables_receipts":"listReceivablesReceipts","oracle_fusion_financials_submit_expense_report":"submitExpenseReport","oracle_fusion_financials_update_expense_line":"updateExpenseLine","oracle_fusion_financials_update_expense_report":"updateExpenseReport","oracle_fusion_financials_update_receivables_invoice":"updateReceivablesInvoice"},"params":{"action":{"oauthCredential":"credential"}}},"oracledb":{"namespace":"oracledb","methods":{"delete":"deleteData","execute":"executeSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"otter":{"namespace":"legacy.otter","methods":{"create_conversation":"importRecording","get_conversation":"getConversation","get_conversation_audio":"getConversationAudio","get_workspace":"getWorkspace","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_conversations":"listConversations","list_workspace_conversations":"listWorkspaceConversations"},"triggers":{"otter_conversation_completed":"conversationCompleted","otter_conversation_shared":"conversationShared","otter_webhook":"webhook"}},"otter_v2":{"namespace":"otter","methods":{"create_conversation":"importRecording","get_conversation":"getConversation","get_conversation_audio":"getConversationAudio","get_workspace":"getWorkspace","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_conversations":"listConversations","list_workspace_conversations":"listWorkspaceConversations"},"triggers":{"otter_conversation_completed":"conversationCompleted","otter_conversation_shared":"conversationShared","otter_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"outlook":{"namespace":"outlook","methods":{"copy_outlook":"copyEmail","create_event_calendar":"createEvent","create_folder_outlook":"createFolder","delete_event_calendar":"deleteEvent","delete_outlook":"deleteEmail","draft_outlook":"draftEmail","forward_outlook":"forwardEmail","get_attachment_outlook":"getAttachment","get_event_calendar":"getCalendarEvent","list_attachments_outlook":"listAttachments","list_events_calendar":"listCalendarEvents","list_folders_outlook":"listFolders","mark_read_outlook":"markAsRead","mark_unread_outlook":"markAsUnread","move_outlook":"moveEmail","read_outlook":"readEmail","reply_all_outlook":"replyAll","reply_outlook":"replyToEmail","respond_calendar":"respondToInvite","search_outlook":"searchEmail","send_outlook":"sendEmail","update_event_calendar":"updateEvent","update_message_outlook":"setCategoriesFlag"},"triggers":{"outlook_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"pagerduty":{"namespace":"legacy.pagerduty","methods":{"add_note":"addNote","create_incident":"createIncident","get_incident":"getIncident","get_service":"getService","list_escalation_policies":"listEscalationPolicies","list_incident_alerts":"listIncidentAlerts","list_incidents":"listIncidents","list_oncalls":"listOnCalls","list_schedules":"listSchedules","list_services":"listServices","list_users":"listUsers","merge_incidents":"mergeIncidents","send_event":"sendEvent","snooze_incident":"snoozeIncident","update_incident":"updateIncident"},"triggers":{"pagerduty_incident_acknowledged":"incidentAcknowledged","pagerduty_incident_escalated":"incidentEscalated","pagerduty_incident_reassigned":"incidentReassigned","pagerduty_incident_resolved":"incidentResolved","pagerduty_incident_triggered":"incidentTriggered","pagerduty_webhook":"webhook"}},"pagerduty_v2":{"namespace":"pagerduty","methods":{"add_note":"addNote","create_incident":"createIncident","get_incident":"getIncident","get_service":"getService","list_escalation_policies":"listEscalationPolicies","list_incident_alerts":"listIncidentAlerts","list_incidents":"listIncidents","list_oncalls":"listOnCalls","list_schedules":"listSchedules","list_services":"listServices","list_users":"listUsers","merge_incidents":"mergeIncidents","send_event":"sendEvent","snooze_incident":"snoozeIncident","update_incident":"updateIncident"},"triggers":{"pagerduty_incident_acknowledged":"incidentAcknowledged","pagerduty_incident_escalated":"incidentEscalated","pagerduty_incident_reassigned":"incidentReassigned","pagerduty_incident_resolved":"incidentResolved","pagerduty_incident_triggered":"incidentTriggered","pagerduty_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"parallel_ai":{"namespace":"parallelAi","methods":{"deep_research":"deepResearch","extract":"extractFromUrls","search":"search"}},"peopledatalabs":{"namespace":"peopledatalabs","methods":{"pdl_autocomplete":"autocomplete","pdl_bulk_company_enrich":"bulkCompanyEnrich","pdl_bulk_person_enrich":"bulkPersonEnrich","pdl_clean_company":"companyCleaner","pdl_clean_location":"locationCleaner","pdl_clean_school":"schoolCleaner","pdl_company_enrich":"companyEnrich","pdl_company_search":"companySearch","pdl_person_enrich":"personEnrich","pdl_person_identify":"personIdentify","pdl_person_search":"personSearch"}},"perplexity":{"namespace":"perplexity","methods":{"perplexity_chat":"chat","perplexity_search":"search"}},"persona":{"namespace":"legacy.persona","methods":{"approve_inquiry":"approveInquiry","create_account":"createAccount","create_inquiry":"createInquiry","create_report":"createReport","decline_inquiry":"declineInquiry","expire_inquiry":"expireInquiry","generate_inquiry_link":"generateInquiryLink","get_account":"getAccount","get_case":"getCase","get_document":"getDocument","get_inquiry":"getInquiry","get_report":"getReport","get_verification":"getVerification","import_accounts":"importAccountsCsv","list_accounts":"listAccounts","list_cases":"listCases","list_inquiries":"listInquiries","list_inquiry_templates":"listInquiryTemplates","list_reports":"listReports","mark_inquiry_for_review":"markInquiryForReview","print_inquiry_pdf":"printInquiryPdf","redact_account":"redactAccount","redact_inquiry":"redactInquiry","resume_inquiry":"resumeInquiry","update_account":"updateAccount","update_inquiry":"updateInquiry"}},"persona_v2":{"namespace":"persona","methods":{"approve_inquiry":"approveInquiry","create_account":"createAccount","create_inquiry":"createInquiry","create_report":"createReport","decline_inquiry":"declineInquiry","expire_inquiry":"expireInquiry","generate_inquiry_link":"generateInquiryLink","get_account":"getAccount","get_case":"getCase","get_document":"getDocument","get_inquiry":"getInquiry","get_report":"getReport","get_verification":"getVerification","import_accounts":"importAccountsCsv","list_accounts":"listAccounts","list_cases":"listCases","list_inquiries":"listInquiries","list_inquiry_templates":"listInquiryTemplates","list_reports":"listReports","mark_inquiry_for_review":"markInquiryForReview","print_inquiry_pdf":"printInquiryPdf","redact_account":"redactAccount","redact_inquiry":"redactInquiry","resume_inquiry":"resumeInquiry","update_account":"updateAccount","update_inquiry":"updateInquiry"},"params":{"action":{"oauthCredential":"credential"}}},"pi":{"namespace":"pi"},"pinecone":{"namespace":"pinecone","methods":{"delete_vectors":"deleteVectors","describe_index":"describeIndex","describe_index_stats":"describeIndexStats","fetch":"fetchVectors","generate":"generateEmbeddings","list_indexes":"listIndexes","list_vector_ids":"listVectorIds","search_text":"searchWithText","search_vector":"searchWithVector","update_vector":"updateVector","upsert_text":"upsertText"}},"pipedrive":{"namespace":"pipedrive","methods":{"create_activity":"createActivity","create_deal":"createDeal","create_lead":"createLead","create_project":"createProject","delete_lead":"deleteLead","get_activities":"getActivities","get_all_deals":"getAllDeals","get_deal":"getDeal","get_files":"getFiles","get_leads":"getLeads","get_mail_messages":"getMailThreads","get_mail_thread":"getMailThreadMessages","get_pipeline_deals":"getPipelineDeals","get_pipelines":"getPipelines","get_projects":"getProjects","update_activity":"updateActivity","update_deal":"updateDeal","update_lead":"updateLead"},"params":{"action":{"oauthCredential":"credential"}}},"pitchbook":{"namespace":"pitchbook","methods":{"company_active_investors":"getCompanyActiveInvestors","company_bio":"getCompanyBio","company_deal_service_providers":"getCompanyDealServiceProviders","company_deals":"getCompanyDeals","company_financials":"getCompanyFinancialsHistory","company_general_service_providers":"getCompanyServiceProviders","company_industries":"getCompanyIndustries","company_investors":"getCompanyInvestors","company_most_recent_debt_financing":"getCompanyLatestDebtFinancing","company_most_recent_financials":"getCompanyLatestFinancials","company_most_recent_financing":"getCompanyLatestFinancing","company_search":"searchCompanies","company_similar_companies":"getSimilarCompanies","company_social_analytics":"getCompanySocialAnalytics","company_updates":"getCompanyUpdates","company_vc_exit_predictions":"getVcExitPredictions","contracts_history":"getContractsHistory","cost_of_calls":"getCostOfCalls","credit_history":"getCreditHistory","credit_news":"getCreditNewsArticle","credit_news_bulk":"getCreditNewsArticlesInBulk","credit_news_most_recent":"getRecentCreditNews","credit_news_search":"searchCreditNews","deal_bio":"getDealBio","deal_cap_table_history":"getDealCapTable","deal_debt_lenders":"getDealDebtAndLenders","deal_detailed":"getDealDetail","deal_investors":"getDealInvestors","deal_multiples":"getDealMultiples","deal_search":"searchDeals","deal_service_providers":"getDealServiceProviders","deal_stock_info":"getDealStockInfo","deal_tranche_info":"getDealTranches","deal_updates":"getDealUpdates","deal_valuation":"getDealValuation","entity_affiliates":"getEntityAffiliates","entity_locations":"getEntityLocations","entity_news":"getEntityNews","entity_people":"getEntityPeople","entity_updates":"getEntityUpdates","fund_active_investments":"getFundActiveInvestments","fund_benchmark":"getFundBenchmark","fund_bio":"getFundBio","fund_cash_flows":"getFundCashFlows","fund_commitments":"getFundCommitments","fund_investment_preferences":"getFundPreferences","fund_investments":"getFundInvestments","fund_performance":"getFundPerformance","fund_search":"searchFunds","fund_team":"getFundTeam","fund_updates":"getFundUpdates","investor_active_investments":"getInvestorActiveInvestments","investor_bio":"getInvestorBio","investor_board_seats":"getInvestorBoardSeats","investor_deal_service_providers":"getInvestorDealServiceProviders","investor_funds":"getInvestorFunds","investor_general_service_providers":"getInvestorServiceProviders","investor_investments":"getInvestorInvestments","investor_last_closed_fund":"getInvestorLastClosedFund","investor_preferences":"getInvestorPreferences","investor_search":"searchInvestors","investor_updates":"getInvestorUpdates","limited_partner_actual_allocations":"getLpActualAllocations","limited_partner_bio":"getLimitedPartnerBio","limited_partner_commitment_aggregates":"getLpCommitmentTotals","limited_partner_commitment_preferences":"getLpCommitmentPreferences","limited_partner_commitments_detailed":"getLpCommitments","limited_partner_search":"searchLimitedPartners","limited_partner_service_providers":"getLpServiceProviders","limited_partner_target_allocations":"getLpTargetAllocations","limited_partner_updates":"getLpUpdates","lookup_table_structure":"listLookupTables","lookup_tables":"getLookupTableCodes","patent_detailed":"getPatentDetail","patent_search":"searchCompanyPatents","people_search":"searchPeople","person_bio":"getPersonBio","person_contact":"getPersonContact","person_education_work":"getPersonHistory","sandbox_entities":"listSandboxEntities","search":"searchAllEntities","service_provider_bio":"getServiceProviderBio","service_provider_search":"searchServiceProviders","service_provider_updates":"getServiceProviderUpdates","serviced_companies":"getServicedCompanies","serviced_deals":"getServicedDeals","serviced_funds":"getServicedFunds","serviced_investors":"getServicedInvestors","serviced_limited_partners":"getServicedLimitedPartners","shared_search":"sharedSearch","usage_report":"getUsageReport"}},"plane":{"namespace":"legacy.plane","methods":{"plane_archive_project":"archiveAProject","plane_archive_work_item":"archiveAWorkItem","plane_confirm_attachment_upload":"confirmAWorkItemAttachmentUpload","plane_create_attachment_upload":"createAWorkItemAttachmentUpload","plane_create_comment":"createAComment","plane_create_cycle":"createACycle","plane_create_label":"createALabel","plane_create_link":"createALink","plane_create_module":"createAModule","plane_create_project":"createAProject","plane_create_project_page":"createAProjectPage","plane_create_state":"createAState","plane_create_webhook":"createAWebhook","plane_create_work_item":"createAWorkItem","plane_delete_attachment":"deleteAnAttachment","plane_delete_comment":"deleteAComment","plane_delete_cycle":"deleteACycle","plane_delete_label":"deleteALabel","plane_delete_link":"deleteALink","plane_delete_module":"deleteAModule","plane_delete_project":"deleteAProject","plane_delete_project_page":"deleteAProjectPage","plane_delete_state":"deleteAState","plane_delete_webhook":"deleteAWebhook","plane_delete_work_item":"deleteAWorkItem","plane_get_attachment":"getAnAttachment","plane_get_comment":"getAComment","plane_get_current_user":"getCurrentUser","plane_get_cycle":"getACycle","plane_get_label":"getALabel","plane_get_link":"getALink","plane_get_module":"getAModule","plane_get_project":"getAProject","plane_get_project_page":"getAProjectPage","plane_get_project_summary":"getAProjectSummary","plane_get_state":"getAState","plane_get_webhook":"getAWebhook","plane_get_work_item":"getAWorkItem","plane_get_work_item_by_identifier":"getAWorkItemByIdentifier","plane_list_attachments":"listAttachments","plane_list_comments":"listComments","plane_list_cycles":"listCycles","plane_list_labels":"listLabels","plane_list_links":"listLinks","plane_list_modules":"listModules","plane_list_project_pages":"listProjectPages","plane_list_projects":"listProjects","plane_list_states":"listStates","plane_list_webhooks":"listWebhooks","plane_list_work_items":"listWorkItems","plane_list_workspace_work_items":"listWorkItemsAcrossAWorkspace","plane_manage_cycle_work_items":"addOrRemoveCycleWorkItems","plane_manage_module_work_items":"addOrRemoveModuleWorkItems","plane_regenerate_webhook_secret":"regenerateAWebhookSecret","plane_transfer_cycle_work_items":"transferWorkItemsBetweenCycles","plane_unarchive_project":"unarchiveAProject","plane_unarchive_work_item":"unarchiveAWorkItem","plane_update_comment":"updateAComment","plane_update_cycle":"updateACycle","plane_update_label":"updateALabel","plane_update_link":"updateALink","plane_update_module":"updateAModule","plane_update_project":"updateAProject","plane_update_project_page":"updateAProjectPage","plane_update_state":"updateAState","plane_update_webhook":"updateAWebhook","plane_update_work_item":"updateAWorkItem"},"triggers":{"plane_cycle_archived":"cycleArchived","plane_cycle_created":"cycleCreated","plane_cycle_deleted":"cycleDeleted","plane_cycle_updated":"cycleUpdated","plane_milestone_created":"milestoneCreated","plane_milestone_deleted":"milestoneDeleted","plane_milestone_updated":"milestoneUpdated","plane_module_archived":"moduleArchived","plane_module_created":"moduleCreated","plane_module_deleted":"moduleDeleted","plane_module_updated":"moduleUpdated","plane_page_archived":"pageArchived","plane_page_comment_created":"pageCommentCreated","plane_page_comment_deleted":"pageCommentDeleted","plane_page_comment_updated":"pageCommentUpdated","plane_page_created":"pageCreated","plane_page_deleted":"pageDeleted","plane_page_updated":"pageUpdated","plane_project_archived":"projectArchived","plane_project_created":"projectCreated","plane_project_deleted":"projectDeleted","plane_project_updated":"projectUpdated","plane_webhook":"webhook","plane_workitem_archived":"workitemArchived","plane_workitem_attachment_created":"workitemAttachmentCreated","plane_workitem_attachment_deleted":"workitemAttachmentDeleted","plane_workitem_attachment_updated":"workitemAttachmentUpdated","plane_workitem_comment_created":"workitemCommentCreated","plane_workitem_comment_deleted":"workitemCommentDeleted","plane_workitem_comment_updated":"workitemCommentUpdated","plane_workitem_created":"workitemCreated","plane_workitem_deleted":"workitemDeleted","plane_workitem_dependency_created":"workitemDependencyCreated","plane_workitem_dependency_deleted":"workitemDependencyDeleted","plane_workitem_link_created":"workitemLinkCreated","plane_workitem_link_deleted":"workitemLinkDeleted","plane_workitem_link_updated":"workitemLinkUpdated","plane_workitem_page_link_created":"workitemPageLinkCreated","plane_workitem_page_link_deleted":"workitemPageLinkDeleted","plane_workitem_relation_created":"workitemRelationCreated","plane_workitem_relation_deleted":"workitemRelationDeleted","plane_workitem_updated":"workitemUpdated","plane_workitem_vote_created":"workitemVoteCreated","plane_workitem_vote_deleted":"workitemVoteDeleted"}},"plane_v2":{"namespace":"plane","methods":{"plane_archive_project":"archiveAProject","plane_archive_work_item":"archiveAWorkItem","plane_confirm_attachment_upload":"confirmAWorkItemAttachmentUpload","plane_create_attachment_upload":"createAWorkItemAttachmentUpload","plane_create_comment":"createAComment","plane_create_cycle":"createACycle","plane_create_label":"createALabel","plane_create_link":"createALink","plane_create_module":"createAModule","plane_create_project":"createAProject","plane_create_project_page":"createAProjectPage","plane_create_state":"createAState","plane_create_webhook":"createAWebhook","plane_create_work_item":"createAWorkItem","plane_delete_attachment":"deleteAnAttachment","plane_delete_comment":"deleteAComment","plane_delete_cycle":"deleteACycle","plane_delete_label":"deleteALabel","plane_delete_link":"deleteALink","plane_delete_module":"deleteAModule","plane_delete_project":"deleteAProject","plane_delete_project_page":"deleteAProjectPage","plane_delete_state":"deleteAState","plane_delete_webhook":"deleteAWebhook","plane_delete_work_item":"deleteAWorkItem","plane_get_attachment":"getAnAttachment","plane_get_comment":"getAComment","plane_get_current_user":"getCurrentUser","plane_get_cycle":"getACycle","plane_get_label":"getALabel","plane_get_link":"getALink","plane_get_module":"getAModule","plane_get_project":"getAProject","plane_get_project_page":"getAProjectPage","plane_get_project_summary":"getAProjectSummary","plane_get_state":"getAState","plane_get_webhook":"getAWebhook","plane_get_work_item":"getAWorkItem","plane_get_work_item_by_identifier":"getAWorkItemByIdentifier","plane_list_attachments":"listAttachments","plane_list_comments":"listComments","plane_list_cycles":"listCycles","plane_list_labels":"listLabels","plane_list_links":"listLinks","plane_list_modules":"listModules","plane_list_project_pages":"listProjectPages","plane_list_projects":"listProjects","plane_list_states":"listStates","plane_list_webhooks":"listWebhooks","plane_list_work_items":"listWorkItems","plane_list_workspace_work_items":"listWorkItemsAcrossAWorkspace","plane_manage_cycle_work_items":"addOrRemoveCycleWorkItems","plane_manage_module_work_items":"addOrRemoveModuleWorkItems","plane_regenerate_webhook_secret":"regenerateAWebhookSecret","plane_transfer_cycle_work_items":"transferWorkItemsBetweenCycles","plane_unarchive_project":"unarchiveAProject","plane_unarchive_work_item":"unarchiveAWorkItem","plane_update_comment":"updateAComment","plane_update_cycle":"updateACycle","plane_update_label":"updateALabel","plane_update_link":"updateALink","plane_update_module":"updateAModule","plane_update_project":"updateAProject","plane_update_project_page":"updateAProjectPage","plane_update_state":"updateAState","plane_update_webhook":"updateAWebhook","plane_update_work_item":"updateAWorkItem"},"triggers":{"plane_cycle_archived":"cycleArchived","plane_cycle_created":"cycleCreated","plane_cycle_deleted":"cycleDeleted","plane_cycle_updated":"cycleUpdated","plane_milestone_created":"milestoneCreated","plane_milestone_deleted":"milestoneDeleted","plane_milestone_updated":"milestoneUpdated","plane_module_archived":"moduleArchived","plane_module_created":"moduleCreated","plane_module_deleted":"moduleDeleted","plane_module_updated":"moduleUpdated","plane_page_archived":"pageArchived","plane_page_comment_created":"pageCommentCreated","plane_page_comment_deleted":"pageCommentDeleted","plane_page_comment_updated":"pageCommentUpdated","plane_page_created":"pageCreated","plane_page_deleted":"pageDeleted","plane_page_updated":"pageUpdated","plane_project_archived":"projectArchived","plane_project_created":"projectCreated","plane_project_deleted":"projectDeleted","plane_project_updated":"projectUpdated","plane_webhook":"webhook","plane_workitem_archived":"workitemArchived","plane_workitem_attachment_created":"workitemAttachmentCreated","plane_workitem_attachment_deleted":"workitemAttachmentDeleted","plane_workitem_attachment_updated":"workitemAttachmentUpdated","plane_workitem_comment_created":"workitemCommentCreated","plane_workitem_comment_deleted":"workitemCommentDeleted","plane_workitem_comment_updated":"workitemCommentUpdated","plane_workitem_created":"workitemCreated","plane_workitem_deleted":"workitemDeleted","plane_workitem_dependency_created":"workitemDependencyCreated","plane_workitem_dependency_deleted":"workitemDependencyDeleted","plane_workitem_link_created":"workitemLinkCreated","plane_workitem_link_deleted":"workitemLinkDeleted","plane_workitem_link_updated":"workitemLinkUpdated","plane_workitem_page_link_created":"workitemPageLinkCreated","plane_workitem_page_link_deleted":"workitemPageLinkDeleted","plane_workitem_relation_created":"workitemRelationCreated","plane_workitem_relation_deleted":"workitemRelationDeleted","plane_workitem_updated":"workitemUpdated","plane_workitem_vote_created":"workitemVoteCreated","plane_workitem_vote_deleted":"workitemVoteDeleted"},"params":{"action":{"oauthCredential":"credential"}}},"planetscale":{"namespace":"legacy.planetscale","methods":{"close_deploy_request":"closeDeployRequestVitess","create_backup":"createBackup","create_branch":"createBranch","create_deploy_request":"createDeployRequestVitess","delete_branch":"deleteBranch","get_backup":"getBackup","get_branch":"getBranch","get_database":"getDatabase","get_deploy_request":"getDeployRequestVitess","list_backups":"listBackups","list_branches":"listBranches","list_databases":"listDatabases","list_deploy_requests":"listDeployRequestsVitess","queue_deploy_request":"queueDeployRequestVitess","review_deploy_request":"reviewDeployRequestVitess"}},"planetscale_v2":{"namespace":"planetscale","methods":{"close_deploy_request":"closeDeployRequestVitess","create_backup":"createBackup","create_branch":"createBranch","create_deploy_request":"createDeployRequestVitess","delete_branch":"deleteBranch","get_backup":"getBackup","get_branch":"getBranch","get_database":"getDatabase","get_deploy_request":"getDeployRequestVitess","list_backups":"listBackups","list_branches":"listBranches","list_databases":"listDatabases","list_deploy_requests":"listDeployRequestsVitess","queue_deploy_request":"queueDeployRequestVitess","review_deploy_request":"reviewDeployRequestVitess"},"params":{"action":{"oauthCredential":"credential"}}},"polymarket":{"namespace":"polymarket","methods":{"get_activity":"getActivity","get_event":"getEvent","get_events":"getEvents","get_holders":"getMarketHolders","get_last_trade_price":"getLastTradePrice","get_leaderboard":"getLeaderboard","get_market":"getMarket","get_markets":"getMarkets","get_midpoint":"getMidpoint","get_orderbook":"getOrderbook","get_positions":"getPositions","get_price":"getPrice","get_price_history":"getPriceHistory","get_series":"getSeries","get_series_by_id":"getSeriesById","get_spread":"getSpread","get_tags":"getTags","get_tick_size":"getTickSize","get_trades":"getTrades","search":"search"}},"postgresql":{"namespace":"legacy.postgresql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"postgresql_v2":{"namespace":"postgresql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"posthog":{"namespace":"posthog","methods":{"posthog_batch_events":"batchEvents","posthog_capture_event":"captureEvent","posthog_create_annotation":"createAnnotation","posthog_create_cohort":"createCohort","posthog_create_dashboard":"createDashboard","posthog_create_experiment":"createExperiment","posthog_create_feature_flag":"createFeatureFlag","posthog_create_insight":"createInsight","posthog_create_survey":"createSurvey","posthog_delete_feature_flag":"deleteFeatureFlag","posthog_delete_person":"deletePerson","posthog_delete_survey":"deleteSurvey","posthog_evaluate_flags":"evaluateFlags","posthog_get_cohort":"getCohort","posthog_get_dashboard":"getDashboard","posthog_get_event_definition":"getEventDefinition","posthog_get_experiment":"getExperiment","posthog_get_feature_flag":"getFeatureFlag","posthog_get_insight":"getInsight","posthog_get_organization":"getOrganization","posthog_get_person":"getPerson","posthog_get_project":"getProject","posthog_get_property_definition":"getPropertyDefinition","posthog_get_session_recording":"getSessionRecording","posthog_get_survey":"getSurvey","posthog_list_actions":"listActions","posthog_list_annotations":"listAnnotations","posthog_list_cohorts":"listCohorts","posthog_list_dashboards":"listDashboards","posthog_list_event_definitions":"listEventDefinitions","posthog_list_experiments":"listExperiments","posthog_list_feature_flags":"listFeatureFlags","posthog_list_insights":"listInsights","posthog_list_organizations":"listOrganizations","posthog_list_persons":"listPersons","posthog_list_projects":"listProjects","posthog_list_property_definitions":"listPropertyDefinitions","posthog_list_recording_playlists":"listRecordingPlaylists","posthog_list_session_recordings":"listSessionRecordings","posthog_list_surveys":"listSurveys","posthog_query":"runQueryHogQl","posthog_update_cohort":"updateCohort","posthog_update_event_definition":"updateEventDefinition","posthog_update_experiment":"updateExperiment","posthog_update_feature_flag":"updateFeatureFlag","posthog_update_insight":"updateInsight","posthog_update_property_definition":"updatePropertyDefinition","posthog_update_survey":"updateSurvey"}},"powerbi":{"namespace":"powerbi","methods":{"powerbi_execute_query":"executeDaxQuery","powerbi_get_dataset":"getSemanticModel","powerbi_get_refresh_history":"getRefreshHistory","powerbi_get_report":"getReport","powerbi_list_datasets":"listSemanticModels","powerbi_list_reports":"listReports","powerbi_list_workspaces":"listWorkspaces","powerbi_refresh_dataset":"refreshSemanticModel"},"params":{"action":{"oauthCredential":"credential"}}},"profound":{"namespace":"legacy.profound","methods":{"bot_logs":"botLogs","bots_report":"botsReport","category_assets":"categoryAssets","category_personas":"categoryPersonas","category_prompts":"categoryPrompts","category_tags":"categoryTags","category_topics":"categoryTopics","citation_prompts":"citationPrompts","citations_report":"citationsReport","list_assets":"listAssets","list_categories":"listCategories","list_domains":"listDomains","list_models":"listModels","list_optimizations":"listOptimizations","list_personas":"listPersonas","list_regions":"listRegions","optimization_analysis":"optimizationAnalysis","prompt_answers":"promptAnswers","prompt_volume":"promptVolume","query_fanouts":"queryFanouts","raw_logs":"rawLogs","referrals_report":"referralsReport","sentiment_report":"sentimentReport","visibility_report":"visibilityReport"}},"profound_v2":{"namespace":"profound","methods":{"bot_logs":"botLogs","bots_report":"botsReport","category_assets":"categoryAssets","category_personas":"categoryPersonas","category_prompts":"categoryPrompts","category_tags":"categoryTags","category_topics":"categoryTopics","citation_prompts":"citationPrompts","citations_report":"citationsReport","list_assets":"listAssets","list_categories":"listCategories","list_domains":"listDomains","list_models":"listModels","list_optimizations":"listOptimizations","list_personas":"listPersonas","list_regions":"listRegions","optimization_analysis":"optimizationAnalysis","prompt_answers":"promptAnswers","prompt_volume":"promptVolume","query_fanouts":"queryFanouts","raw_logs":"rawLogs","referrals_report":"referralsReport","sentiment_report":"sentimentReport","visibility_report":"visibilityReport"},"params":{"action":{"oauthCredential":"credential"}}},"prospeo":{"namespace":"prospeo","methods":{"prospeo_account_information":"accountInformation","prospeo_bulk_enrich_company":"bulkEnrichCompany","prospeo_bulk_enrich_person":"bulkEnrichPerson","prospeo_enrich_company":"enrichCompany","prospeo_enrich_person":"enrichPerson","prospeo_search_company":"searchCompany","prospeo_search_person":"searchPerson","prospeo_search_suggestions":"searchSuggestions"}},"pulse":{"namespace":"legacy.pulse"},"pulse_v2":{"namespace":"legacy.pulseV2"},"pulse_v3":{"namespace":"pulse","params":{"action":{"oauthCredential":"credential"}}},"qdrant":{"namespace":"legacy.qdrant","methods":{"fetch":"fetch","search":"search","upsert":"upsert"}},"qdrant_v2":{"namespace":"qdrant","methods":{"fetch":"fetch","search":"search","upsert":"upsert"},"params":{"action":{"oauthCredential":"credential"}}},"quartr":{"namespace":"legacy.quartr","methods":{"get_audio":"getAudio","get_company":"getCompany","get_event":"getEvent","get_event_summary":"getEventSummary","get_report":"getReport","get_slide_deck":"getSlideDeck","get_transcript":"getTranscript","list_audio":"listAudio","list_companies":"listCompanies","list_document_types":"listDocumentTypes","list_documents":"listDocuments","list_event_types":"listEventTypes","list_events":"listEvents","list_live_events":"listLiveEvents","list_reports":"listReports","list_slide_decks":"listSlideDecks","list_transcripts":"listTranscripts"}},"quartr_v2":{"namespace":"quartr","methods":{"get_audio":"getAudio","get_company":"getCompany","get_event":"getEvent","get_event_summary":"getEventSummary","get_report":"getReport","get_slide_deck":"getSlideDeck","get_transcript":"getTranscript","list_audio":"listAudio","list_companies":"listCompanies","list_document_types":"listDocumentTypes","list_documents":"listDocuments","list_event_types":"listEventTypes","list_events":"listEvents","list_live_events":"listLiveEvents","list_reports":"listReports","list_slide_decks":"listSlideDecks","list_transcripts":"listTranscripts"},"params":{"action":{"oauthCredential":"credential"}}},"quickbooks":{"namespace":"quickbooks","methods":{"quickbooks_add_attachment":"addAttachment","quickbooks_create_bill":"createBill","quickbooks_create_bill_payment":"createBillPayment","quickbooks_create_credit_memo":"createCreditMemo","quickbooks_create_customer":"createCustomer","quickbooks_create_customer_payment":"createCustomerPayment","quickbooks_create_deposit":"createDeposit","quickbooks_create_employee":"createEmployee","quickbooks_create_estimate":"createEstimate","quickbooks_create_invoice":"createInvoice","quickbooks_create_item":"createItem","quickbooks_create_journal_entry":"createJournalEntry","quickbooks_create_purchase":"createPurchaseOrExpense","quickbooks_create_purchase_order":"createPurchaseOrder","quickbooks_create_refund_receipt":"createRefundReceipt","quickbooks_create_sales_receipt":"createSalesReceipt","quickbooks_create_vendor":"createVendor","quickbooks_create_vendor_credit":"createVendorCredit","quickbooks_download_attachment":"downloadAttachment","quickbooks_download_transaction_pdf":"downloadTransactionPdf","quickbooks_email_transaction":"emailTransaction","quickbooks_get_company_info":"getCompanyInfo","quickbooks_read_accounting_transactions":"readAccountingTransactions","quickbooks_read_attachments":"readAttachments","quickbooks_read_master_data":"readMasterData","quickbooks_read_purchasing_transactions":"readPurchasingTransactions","quickbooks_read_sales_transactions":"readSalesTransactions","quickbooks_run_financial_report":"runFinancialReport","quickbooks_update_bill":"updateBill","quickbooks_update_bill_payment":"updateBillPayment","quickbooks_update_credit_memo":"updateCreditMemo","quickbooks_update_customer":"updateCustomer","quickbooks_update_customer_payment":"updateCustomerPayment","quickbooks_update_deposit":"updateDeposit","quickbooks_update_employee":"updateEmployee","quickbooks_update_estimate":"updateEstimate","quickbooks_update_invoice":"updateInvoice","quickbooks_update_item":"updateItem","quickbooks_update_journal_entry":"updateJournalEntry","quickbooks_update_purchase":"updatePurchaseOrExpense","quickbooks_update_purchase_order":"updatePurchaseOrder","quickbooks_update_refund_receipt":"updateRefundReceipt","quickbooks_update_sales_receipt":"updateSalesReceipt","quickbooks_update_vendor":"updateVendor","quickbooks_update_vendor_credit":"updateVendorCredit","quickbooks_void_bill_payment":"voidBillPayment","quickbooks_void_customer_payment":"voidCustomerPayment","quickbooks_void_invoice":"voidInvoice","quickbooks_void_sales_receipt":"voidSalesReceipt"},"triggers":{"quickbooks_account_events":"accountEvents","quickbooks_bill_events":"billEvents","quickbooks_bill_payment_events":"billPaymentEvents","quickbooks_budget_events":"budgetEvents","quickbooks_class_events":"classEvents","quickbooks_credit_memo_events":"creditMemoEvents","quickbooks_currency_events":"currencyEvents","quickbooks_customer_events":"customerEvents","quickbooks_department_events":"departmentEvents","quickbooks_deposit_events":"depositEvents","quickbooks_employee_events":"employeeEvents","quickbooks_estimate_events":"estimateEvents","quickbooks_invoice_events":"invoiceEvents","quickbooks_item_events":"itemEvents","quickbooks_journal_code_events":"journalCodeEvents","quickbooks_journal_entry_events":"journalEntryEvents","quickbooks_payment_events":"paymentEvents","quickbooks_payment_method_events":"paymentMethodEvents","quickbooks_preferences_updated":"preferencesUpdated","quickbooks_purchase_events":"purchaseEvents","quickbooks_purchase_order_events":"purchaseOrderEvents","quickbooks_refund_receipt_events":"refundReceiptEvents","quickbooks_sales_receipt_events":"salesReceiptEvents","quickbooks_tax_agency_events":"taxAgencyEvents","quickbooks_term_events":"termEvents","quickbooks_time_activity_events":"timeActivityEvents","quickbooks_transfer_events":"transferEvents","quickbooks_vendor_credit_events":"vendorCreditEvents","quickbooks_vendor_events":"vendorEvents"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"quiver":{"namespace":"legacy.quiver","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"}},"quiver_v2":{"namespace":"legacy.quiverV2","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"}},"quiver_v3":{"namespace":"quiver","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"},"params":{"action":{"oauthCredential":"credential"}}},"rabbitmq":{"namespace":"rabbitmq","methods":{"rabbitmq_create_binding":"createBinding","rabbitmq_create_exchange":"createExchange","rabbitmq_create_policy":"createPolicy","rabbitmq_create_queue":"createQueue","rabbitmq_delete_binding":"deleteBinding","rabbitmq_delete_exchange":"deleteExchange","rabbitmq_delete_policy":"deletePolicy","rabbitmq_delete_queue":"deleteQueue","rabbitmq_get_exchange":"getExchange","rabbitmq_get_messages":"getMessages","rabbitmq_get_overview":"getOverview","rabbitmq_get_queue":"getQueue","rabbitmq_health_check":"healthCheck","rabbitmq_list_bindings":"listQueueBindings","rabbitmq_list_channels":"listChannels","rabbitmq_list_connections":"listConnections","rabbitmq_list_consumers":"listConsumers","rabbitmq_list_exchange_bindings":"listExchangeBindings","rabbitmq_list_exchanges":"listExchanges","rabbitmq_list_nodes":"listNodes","rabbitmq_list_policies":"listPolicies","rabbitmq_list_queues":"listQueues","rabbitmq_list_vhosts":"listVirtualHosts","rabbitmq_publish_message":"publishMessage","rabbitmq_purge_queue":"purgeQueue"}},"railway":{"namespace":"legacy.railway","methods":{"create_environment":"createEnvironment","create_project":"createProject","create_service":"createService","delete_environment":"deleteEnvironment","delete_project":"deleteProject","delete_service":"deleteService","delete_variable":"deleteVariable","deploy_service":"deployService","get_deployment":"getDeployment","get_deployment_logs":"getDeploymentLogs","get_project":"getProject","list_deployments":"listDeployments","list_project_members":"listProjectMembers","list_projects":"listProjects","list_variables":"listVariables","restart_deployment":"restartDeployment","rollback_deployment":"rollbackDeployment","transfer_project":"transferProject","update_project":"updateProject","upsert_variable":"upsertVariable"}},"railway_v2":{"namespace":"railway","methods":{"create_environment":"createEnvironment","create_project":"createProject","create_service":"createService","delete_environment":"deleteEnvironment","delete_project":"deleteProject","delete_service":"deleteService","delete_variable":"deleteVariable","deploy_service":"deployService","get_deployment":"getDeployment","get_deployment_logs":"getDeploymentLogs","get_project":"getProject","list_deployments":"listDeployments","list_project_members":"listProjectMembers","list_projects":"listProjects","list_variables":"listVariables","restart_deployment":"restartDeployment","rollback_deployment":"rollbackDeployment","transfer_project":"transferProject","update_project":"updateProject","upsert_variable":"upsertVariable"},"params":{"action":{"oauthCredential":"credential"}}},"ramp":{"namespace":"ramp","methods":{"create_memo":"createMemo","get_balance":"getBalance","get_bill":"getBill","get_business":"getBusiness","get_memo":"getMemo","get_physical_card":"getPhysicalCard","get_reimbursement":"getReimbursement","get_transaction":"getTransaction","get_user":"getUser","get_vendor":"getVendor","get_virtual_card":"getVirtualCard","list_bills":"listBills","list_physical_cards":"listPhysicalCards","list_reimbursements":"listReimbursements","list_transactions":"listTransactions","list_users":"listUsers","list_vendors":"listVendors","list_virtual_cards":"listVirtualCards"},"params":{"action":{"oauthCredential":"credential"}}},"rb2b":{"namespace":"legacy.rb2b","methods":{"credit_check":"creditCheck","email_to_activity":"emailToLastActiveDate","hem_to_best_linkedin":"emailHemToBestLinkedInUrl","hem_to_business_profile":"emailHemToBusinessProfile","hem_to_linkedin":"emailHemToLinkedInSlug","hem_to_maid":"emailHemToMaid","ip_to_company":"ipToCompany","ip_to_hem":"ipToHem","ip_to_maid":"ipToMaid","linkedin_slug_search":"linkedInSlugSearch","linkedin_to_best_personal_email":"linkedInToBestPersonalEmail","linkedin_to_business_profile":"linkedInToBusinessProfile","linkedin_to_hashed_emails":"linkedInToHashedEmails","linkedin_to_mobile_phone":"linkedInToMobilePhone","linkedin_to_personal_email":"linkedInToPersonalEmail"}},"rb2b_v2":{"namespace":"rb2b","methods":{"credit_check":"creditCheck","email_to_activity":"emailToLastActiveDate","hem_to_best_linkedin":"emailHemToBestLinkedInUrl","hem_to_business_profile":"emailHemToBusinessProfile","hem_to_linkedin":"emailHemToLinkedInSlug","hem_to_maid":"emailHemToMaid","ip_to_company":"ipToCompany","ip_to_hem":"ipToHem","ip_to_maid":"ipToMaid","linkedin_slug_search":"linkedInSlugSearch","linkedin_to_best_personal_email":"linkedInToBestPersonalEmail","linkedin_to_business_profile":"linkedInToBusinessProfile","linkedin_to_hashed_emails":"linkedInToHashedEmails","linkedin_to_mobile_phone":"linkedInToMobilePhone","linkedin_to_personal_email":"linkedInToPersonalEmail"},"params":{"action":{"oauthCredential":"credential"}}},"rds":{"namespace":"legacy.rds","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"rds_v2":{"namespace":"rds","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"reddit":{"namespace":"reddit","methods":{"delete":"delete_","edit":"edit","get_comments":"getComments","get_controversial":"getControversialPosts","get_info":"getInfoById","get_me":"getMyProfile","get_messages":"getMessages","get_posts":"getPosts","get_saved":"getSavedItems","get_subreddit_info":"getSubredditInfo","get_subreddit_rules":"getSubredditRules","get_user":"getUserProfile","get_user_comments":"getUserComments","get_user_posts":"getUserPosts","hide":"hide","list_my_subreddits":"listMySubreddits","lock":"lockMod","mark_all_read":"markAllMessagesRead","mark_read":"markMessagesRead","marknsfw":"markNsfw","mod_approve":"approveMod","mod_distinguish":"distinguishMod","mod_remove":"removeMod","mod_sticky":"stickyMod","reply":"reply","report":"report","save":"save","search":"searchSubreddit","search_subreddits":"searchSubreddits","send_message":"sendMessage","submit_post":"submitPost","subscribe":"subscribe","unhide":"unhide","unlock":"unlockMod","unmarknsfw":"unmarkNsfw","unsave":"unsave","vote":"vote"},"params":{"action":{"oauthCredential":"credential"}}},"redis":{"namespace":"redis","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hdel":"hdel","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","llen":"llen","lpop":"lpop","lpush":"lpush","lrange":"lrange","persist":"persist","rpop":"rpop","rpush":"rpush","set":"set","setnx":"setnx","ttl":"ttl"}},"reducto":{"namespace":"legacy.reducto"},"reducto_v2":{"namespace":"legacy.reductoV2"},"reducto_v3":{"namespace":"reducto","params":{"action":{"oauthCredential":"credential"}}},"resend":{"namespace":"legacy.resend","methods":{"cancel_email":"cancelEmail","create_audience":"createAudience","create_broadcast":"createBroadcast","create_contact":"createContact","delete_audience":"deleteAudience","delete_contact":"deleteContact","get_audience":"getAudience","get_broadcast":"getBroadcast","get_contact":"getContact","get_email":"getEmail","list_audiences":"listAudiences","list_contacts":"listContacts","list_domains":"listDomains","send_broadcast":"sendBroadcast","send_email":"sendEmail","update_contact":"updateContact"},"triggers":{"resend_email_bounced":"emailBounced","resend_email_clicked":"emailClicked","resend_email_complained":"emailComplained","resend_email_delivered":"emailDelivered","resend_email_failed":"emailFailed","resend_email_opened":"emailOpened","resend_email_sent":"emailSent","resend_webhook":"webhook"}},"resend_v2":{"namespace":"resend","methods":{"cancel_email":"cancelEmail","create_audience":"createAudience","create_broadcast":"createBroadcast","create_contact":"createContact","delete_audience":"deleteAudience","delete_contact":"deleteContact","get_audience":"getAudience","get_broadcast":"getBroadcast","get_contact":"getContact","get_email":"getEmail","list_audiences":"listAudiences","list_contacts":"listContacts","list_domains":"listDomains","send_broadcast":"sendBroadcast","send_email":"sendEmail","update_contact":"updateContact"},"triggers":{"resend_email_bounced":"emailBounced","resend_email_clicked":"emailClicked","resend_email_complained":"emailComplained","resend_email_delivered":"emailDelivered","resend_email_failed":"emailFailed","resend_email_opened":"emailOpened","resend_email_sent":"emailSent","resend_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"response":{"namespace":"response"},"revenuecat":{"namespace":"revenuecat","methods":{"create_purchase":"createPurchase","defer_google_subscription":"deferGoogleSubscription","delete_customer":"deleteCustomer","get_customer":"getCustomer","grant_entitlement":"grantEntitlement","list_offerings":"listOfferings","refund_google_subscription":"refundGoogleSubscription","revoke_entitlement":"revokeEntitlement","revoke_google_subscription":"revokeGoogleSubscription","update_subscriber_attributes":"updateSubscriberAttributes"},"triggers":{"revenuecat_cancellation":"cancellation","revenuecat_expiration":"expiration","revenuecat_initial_purchase":"initialPurchase","revenuecat_non_renewing_purchase":"nonRenewingPurchase","revenuecat_product_change":"productChange","revenuecat_renewal":"renewal"}},"rippling":{"namespace":"legacy.rippling","methods":{"bulk_create_custom_object_records":"bulkCreateCustomObjectRecords","bulk_delete_custom_object_records":"bulkDeleteCustomObjectRecords","bulk_update_custom_object_records":"bulkUpdateCustomObjectRecords","create_business_partner":"createBusinessPartner","create_business_partner_group":"createBusinessPartnerGroup","create_custom_app":"createCustomApp","create_custom_object":"createCustomObject","create_custom_object_field":"createCustomObjectField","create_custom_object_record":"createCustomObjectRecord","create_custom_page":"createCustomPage","create_custom_setting":"createCustomSetting","create_department":"createDepartment","create_draft_hires":"createDraftHires","create_object_category":"createObjectCategory","create_title":"createTitle","create_work_location":"createWorkLocation","delete_business_partner":"deleteBusinessPartner","delete_business_partner_group":"deleteBusinessPartnerGroup","delete_custom_app":"deleteCustomApp","delete_custom_object":"deleteCustomObject","delete_custom_object_field":"deleteCustomObjectField","delete_custom_object_record":"deleteCustomObjectRecord","delete_custom_page":"deleteCustomPage","delete_custom_setting":"deleteCustomSetting","delete_object_category":"deleteObjectCategory","delete_title":"deleteTitle","delete_work_location":"deleteWorkLocation","get_business_partner":"getBusinessPartner","get_business_partner_group":"getBusinessPartnerGroup","get_current_user":"getCurrentUser","get_custom_app":"getCustomApp","get_custom_object":"getCustomObject","get_custom_object_field":"getCustomObjectField","get_custom_object_record":"getCustomObjectRecord","get_custom_object_record_by_external_id":"getCustomObjectRecordByExternalId","get_custom_page":"getCustomPage","get_custom_setting":"getCustomSetting","get_department":"getDepartment","get_employment_type":"getEmploymentType","get_job_function":"getJobFunction","get_object_category":"getObjectCategory","get_report_run":"getReportRun","get_supergroup":"getSupergroup","get_team":"getTeam","get_title":"getTitle","get_user":"getUser","get_work_location":"getWorkLocation","get_worker":"getWorker","list_business_partner_groups":"listBusinessPartnerGroups","list_business_partners":"listBusinessPartners","list_companies":"listCompanies","list_custom_apps":"listCustomApps","list_custom_fields":"listCustomFields","list_custom_object_fields":"listCustomObjectFields","list_custom_object_records":"listCustomObjectRecords","list_custom_objects":"listCustomObjects","list_custom_pages":"listCustomPages","list_custom_settings":"listCustomSettings","list_departments":"listDepartments","list_employment_types":"listEmploymentTypes","list_entitlements":"listEntitlements","list_job_functions":"listJobFunctions","list_object_categories":"listObjectCategories","list_supergroup_exclusion_members":"listSupergroupExclusionMembers","list_supergroup_inclusion_members":"listSupergroupInclusionMembers","list_supergroup_members":"listSupergroupMembers","list_supergroups":"listSupergroups","list_teams":"listTeams","list_titles":"listTitles","list_users":"listUsers","list_work_locations":"listWorkLocations","list_workers":"listWorkers","query_custom_object_records":"queryCustomObjectRecords","trigger_report_run":"triggerReportRun","update_custom_app":"updateCustomApp","update_custom_object":"updateCustomObject","update_custom_object_field":"updateCustomObjectField","update_custom_object_record":"updateCustomObjectRecord","update_custom_page":"updateCustomPage","update_custom_setting":"updateCustomSetting","update_department":"updateDepartment","update_object_category":"updateObjectCategory","update_supergroup_exclusion_members":"updateSupergroupExclusionMembers","update_supergroup_inclusion_members":"updateSupergroupInclusionMembers","update_title":"updateTitle","update_work_location":"updateWorkLocation"}},"rippling_v2":{"namespace":"rippling","methods":{"bulk_create_custom_object_records":"bulkCreateCustomObjectRecords","bulk_delete_custom_object_records":"bulkDeleteCustomObjectRecords","bulk_update_custom_object_records":"bulkUpdateCustomObjectRecords","create_business_partner":"createBusinessPartner","create_business_partner_group":"createBusinessPartnerGroup","create_custom_app":"createCustomApp","create_custom_object":"createCustomObject","create_custom_object_field":"createCustomObjectField","create_custom_object_record":"createCustomObjectRecord","create_custom_page":"createCustomPage","create_custom_setting":"createCustomSetting","create_department":"createDepartment","create_draft_hires":"createDraftHires","create_object_category":"createObjectCategory","create_title":"createTitle","create_work_location":"createWorkLocation","delete_business_partner":"deleteBusinessPartner","delete_business_partner_group":"deleteBusinessPartnerGroup","delete_custom_app":"deleteCustomApp","delete_custom_object":"deleteCustomObject","delete_custom_object_field":"deleteCustomObjectField","delete_custom_object_record":"deleteCustomObjectRecord","delete_custom_page":"deleteCustomPage","delete_custom_setting":"deleteCustomSetting","delete_object_category":"deleteObjectCategory","delete_title":"deleteTitle","delete_work_location":"deleteWorkLocation","get_business_partner":"getBusinessPartner","get_business_partner_group":"getBusinessPartnerGroup","get_current_user":"getCurrentUser","get_custom_app":"getCustomApp","get_custom_object":"getCustomObject","get_custom_object_field":"getCustomObjectField","get_custom_object_record":"getCustomObjectRecord","get_custom_object_record_by_external_id":"getCustomObjectRecordByExternalId","get_custom_page":"getCustomPage","get_custom_setting":"getCustomSetting","get_department":"getDepartment","get_employment_type":"getEmploymentType","get_job_function":"getJobFunction","get_object_category":"getObjectCategory","get_report_run":"getReportRun","get_supergroup":"getSupergroup","get_team":"getTeam","get_title":"getTitle","get_user":"getUser","get_work_location":"getWorkLocation","get_worker":"getWorker","list_business_partner_groups":"listBusinessPartnerGroups","list_business_partners":"listBusinessPartners","list_companies":"listCompanies","list_custom_apps":"listCustomApps","list_custom_fields":"listCustomFields","list_custom_object_fields":"listCustomObjectFields","list_custom_object_records":"listCustomObjectRecords","list_custom_objects":"listCustomObjects","list_custom_pages":"listCustomPages","list_custom_settings":"listCustomSettings","list_departments":"listDepartments","list_employment_types":"listEmploymentTypes","list_entitlements":"listEntitlements","list_job_functions":"listJobFunctions","list_object_categories":"listObjectCategories","list_supergroup_exclusion_members":"listSupergroupExclusionMembers","list_supergroup_inclusion_members":"listSupergroupInclusionMembers","list_supergroup_members":"listSupergroupMembers","list_supergroups":"listSupergroups","list_teams":"listTeams","list_titles":"listTitles","list_users":"listUsers","list_work_locations":"listWorkLocations","list_workers":"listWorkers","query_custom_object_records":"queryCustomObjectRecords","trigger_report_run":"triggerReportRun","update_custom_app":"updateCustomApp","update_custom_object":"updateCustomObject","update_custom_object_field":"updateCustomObjectField","update_custom_object_record":"updateCustomObjectRecord","update_custom_page":"updateCustomPage","update_custom_setting":"updateCustomSetting","update_department":"updateDepartment","update_object_category":"updateObjectCategory","update_supergroup_exclusion_members":"updateSupergroupExclusionMembers","update_supergroup_inclusion_members":"updateSupergroupInclusionMembers","update_title":"updateTitle","update_work_location":"updateWorkLocation"},"params":{"action":{"oauthCredential":"credential"}}},"rocketlane":{"namespace":"legacy.rocketlane","methods":{"add_field_option":"addFieldOption","add_project_members":"addProjectMembers","add_task_assignees":"addTaskAssignees","add_task_dependencies":"addTaskDependencies","add_task_followers":"addTaskFollowers","archive_project":"archiveProject","assign_placeholders":"assignPlaceholder","create_field":"createField","create_phase":"createPhase","create_project":"createProject","create_space":"createSpace","create_space_document":"createSpaceDocument","create_task":"createTask","create_time_entry":"createTimeEntry","create_time_off":"createTimeOff","delete_field":"deleteField","delete_phase":"deletePhase","delete_project":"deleteProject","delete_space":"deleteSpace","delete_space_document":"deleteSpaceDocument","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","delete_time_off":"deleteTimeOff","get_field":"getField","get_invoice":"getInvoice","get_invoice_line_items":"getInvoiceLineItems","get_invoice_payments":"getInvoicePayments","get_phase":"getPhase","get_project":"getProject","get_space":"getSpace","get_space_document":"getSpaceDocument","get_task":"getTask","get_time_entry":"getTimeEntry","get_time_off":"getTimeOff","get_user":"getUser","import_template":"importTemplate","list_fields":"listFields","list_invoices":"listInvoices","list_phases":"listPhases","list_placeholders":"listPlaceholders","list_projects":"listProjects","list_resource_allocations":"listResourceAllocations","list_space_documents":"listSpaceDocuments","list_spaces":"listSpaces","list_tasks":"listTasks","list_time_entries":"listTimeEntries","list_time_entry_categories":"listTimeEntryCategories","list_time_offs":"listTimeOffs","list_users":"listUsers","move_task_to_phase":"moveTaskToPhase","remove_project_members":"removeProjectMembers","remove_task_assignees":"removeTaskAssignees","remove_task_dependencies":"removeTaskDependencies","remove_task_followers":"removeTaskFollowers","search_time_entries":"searchTimeEntries","unassign_placeholders":"unassignPlaceholder","update_field":"updateField","update_field_option":"updateFieldOption","update_phase":"updatePhase","update_project":"updateProject","update_space":"updateSpace","update_space_document":"updateSpaceDocument","update_task":"updateTask","update_time_entry":"updateTimeEntry"}},"rocketlane_v2":{"namespace":"rocketlane","methods":{"add_field_option":"addFieldOption","add_project_members":"addProjectMembers","add_task_assignees":"addTaskAssignees","add_task_dependencies":"addTaskDependencies","add_task_followers":"addTaskFollowers","archive_project":"archiveProject","assign_placeholders":"assignPlaceholder","create_field":"createField","create_phase":"createPhase","create_project":"createProject","create_space":"createSpace","create_space_document":"createSpaceDocument","create_task":"createTask","create_time_entry":"createTimeEntry","create_time_off":"createTimeOff","delete_field":"deleteField","delete_phase":"deletePhase","delete_project":"deleteProject","delete_space":"deleteSpace","delete_space_document":"deleteSpaceDocument","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","delete_time_off":"deleteTimeOff","get_field":"getField","get_invoice":"getInvoice","get_invoice_line_items":"getInvoiceLineItems","get_invoice_payments":"getInvoicePayments","get_phase":"getPhase","get_project":"getProject","get_space":"getSpace","get_space_document":"getSpaceDocument","get_task":"getTask","get_time_entry":"getTimeEntry","get_time_off":"getTimeOff","get_user":"getUser","import_template":"importTemplate","list_fields":"listFields","list_invoices":"listInvoices","list_phases":"listPhases","list_placeholders":"listPlaceholders","list_projects":"listProjects","list_resource_allocations":"listResourceAllocations","list_space_documents":"listSpaceDocuments","list_spaces":"listSpaces","list_tasks":"listTasks","list_time_entries":"listTimeEntries","list_time_entry_categories":"listTimeEntryCategories","list_time_offs":"listTimeOffs","list_users":"listUsers","move_task_to_phase":"moveTaskToPhase","remove_project_members":"removeProjectMembers","remove_task_assignees":"removeTaskAssignees","remove_task_dependencies":"removeTaskDependencies","remove_task_followers":"removeTaskFollowers","search_time_entries":"searchTimeEntries","unassign_placeholders":"unassignPlaceholder","update_field":"updateField","update_field_option":"updateFieldOption","update_phase":"updatePhase","update_project":"updateProject","update_space":"updateSpace","update_space_document":"updateSpaceDocument","update_task":"updateTask","update_time_entry":"updateTimeEntry"},"params":{"action":{"oauthCredential":"credential"}}},"rootly":{"namespace":"legacy.rootly","methods":{"rootly_acknowledge_alert":"acknowledgeAlert","rootly_add_incident_event":"addIncidentEvent","rootly_add_subscribers":"addSubscribers","rootly_assign_incident_role":"assignIncidentRole","rootly_create_action_item":"createActionItem","rootly_create_alert":"createAlert","rootly_create_incident":"createIncident","rootly_create_status_page_event":"createStatusPageEvent","rootly_delete_action_item":"deleteActionItem","rootly_delete_incident":"deleteIncident","rootly_escalate_alert":"escalateAlert","rootly_get_alert":"getAlert","rootly_get_incident":"getIncident","rootly_list_action_items":"listActionItems","rootly_list_alerts":"listAlerts","rootly_list_causes":"listCauses","rootly_list_environments":"listEnvironments","rootly_list_escalation_policies":"listEscalationPolicies","rootly_list_functionalities":"listFunctionalities","rootly_list_incident_events":"listIncidentEvents","rootly_list_incident_roles":"listIncidentRoles","rootly_list_incident_types":"listIncidentTypes","rootly_list_incidents":"listIncidents","rootly_list_on_calls":"listOnCalls","rootly_list_playbooks":"listPlaybooks","rootly_list_retrospectives":"listRetrospectives","rootly_list_schedules":"listSchedules","rootly_list_services":"listServices","rootly_list_severities":"listSeverities","rootly_list_teams":"listTeams","rootly_list_users":"listUsers","rootly_mitigate_incident":"mitigateIncident","rootly_remove_subscribers":"removeSubscribers","rootly_resolve_alert":"resolveAlert","rootly_resolve_incident":"resolveIncident","rootly_run_workflow":"runWorkflow","rootly_snooze_alert":"snoozeAlert","rootly_unassign_incident_role":"unassignIncidentRole","rootly_update_action_item":"updateActionItem","rootly_update_alert":"updateAlert","rootly_update_incident":"updateIncident"},"triggers":{"rootly_alert_created":"alertCreated","rootly_incident_created":"incidentCreated","rootly_incident_resolved":"incidentResolved","rootly_incident_updated":"incidentUpdated"}},"rootly_v2":{"namespace":"rootly","methods":{"rootly_acknowledge_alert":"acknowledgeAlert","rootly_add_incident_event":"addIncidentEvent","rootly_add_subscribers":"addSubscribers","rootly_assign_incident_role":"assignIncidentRole","rootly_create_action_item":"createActionItem","rootly_create_alert":"createAlert","rootly_create_incident":"createIncident","rootly_create_status_page_event":"createStatusPageEvent","rootly_delete_action_item":"deleteActionItem","rootly_delete_incident":"deleteIncident","rootly_escalate_alert":"escalateAlert","rootly_get_alert":"getAlert","rootly_get_incident":"getIncident","rootly_list_action_items":"listActionItems","rootly_list_alerts":"listAlerts","rootly_list_causes":"listCauses","rootly_list_environments":"listEnvironments","rootly_list_escalation_policies":"listEscalationPolicies","rootly_list_functionalities":"listFunctionalities","rootly_list_incident_events":"listIncidentEvents","rootly_list_incident_roles":"listIncidentRoles","rootly_list_incident_types":"listIncidentTypes","rootly_list_incidents":"listIncidents","rootly_list_on_calls":"listOnCalls","rootly_list_playbooks":"listPlaybooks","rootly_list_retrospectives":"listRetrospectives","rootly_list_schedules":"listSchedules","rootly_list_services":"listServices","rootly_list_severities":"listSeverities","rootly_list_teams":"listTeams","rootly_list_users":"listUsers","rootly_mitigate_incident":"mitigateIncident","rootly_remove_subscribers":"removeSubscribers","rootly_resolve_alert":"resolveAlert","rootly_resolve_incident":"resolveIncident","rootly_run_workflow":"runWorkflow","rootly_snooze_alert":"snoozeAlert","rootly_unassign_incident_role":"unassignIncidentRole","rootly_update_action_item":"updateActionItem","rootly_update_alert":"updateAlert","rootly_update_incident":"updateIncident"},"triggers":{"rootly_alert_created":"alertCreated","rootly_incident_created":"incidentCreated","rootly_incident_resolved":"incidentResolved","rootly_incident_updated":"incidentUpdated"},"params":{"action":{"oauthCredential":"credential"}}},"router":{"namespace":"legacy.router"},"router_v2":{"namespace":"router"},"rss":{"namespace":"trigger.rss"},"s3":{"namespace":"legacy.s3","methods":{"copy_object":"copyObject","create_bucket":"createBucket","delete_bucket":"deleteBucket","delete_object":"deleteObject","delete_objects":"deleteObjectsBatch","get_object":"downloadFile","head_object":"headObjectMetadata","list_buckets":"listBuckets","list_objects":"listObjects","presigned_url":"presignedUrl","put_object":"uploadFile"}},"s3_v2":{"namespace":"s3","methods":{"copy_object":"copyObject","create_bucket":"createBucket","delete_bucket":"deleteBucket","delete_object":"deleteObject","delete_objects":"deleteObjectsBatch","get_object":"downloadFile","head_object":"headObjectMetadata","list_buckets":"listBuckets","list_objects":"listObjects","presigned_url":"presignedUrl","put_object":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"sailpoint":{"namespace":"legacy.sailpoint","methods":{"sailpoint_approve_access_request":"approveAccessRequest","sailpoint_cancel_access_request":"cancelAccessRequest","sailpoint_decide_certification_review_items":"decideCertificationReviewItems","sailpoint_get_access_profile":"getAccessProfile","sailpoint_get_access_profile_entitlements":"getAccessProfileEntitlements","sailpoint_get_access_request_config":"getAccessRequestConfig","sailpoint_get_access_request_status":"getAccessRequestStatus","sailpoint_get_account":"getAccount","sailpoint_get_account_activity":"getAccountActivity","sailpoint_get_account_entitlements":"getAccountEntitlements","sailpoint_get_account_selections":"getAccountSelections","sailpoint_get_campaign":"getCampaign","sailpoint_get_certification":"getCertification","sailpoint_get_entitlement":"getEntitlement","sailpoint_get_entitlement_request_config":"getEntitlementRequestConfig","sailpoint_get_identity":"getIdentity","sailpoint_get_role":"getRole","sailpoint_get_role_entitlements":"getRoleEntitlements","sailpoint_get_source":"getSource","sailpoint_get_task_status":"getTaskStatus","sailpoint_list_access_profiles":"listAccessProfiles","sailpoint_list_account_activities":"listAccountActivities","sailpoint_list_accounts":"listAccounts","sailpoint_list_campaigns":"listCampaigns","sailpoint_list_certification_review_items":"listCertificationReviewItems","sailpoint_list_certifications":"listCertifications","sailpoint_list_entitlements":"listEntitlements","sailpoint_list_identities":"listIdentities","sailpoint_list_identity_entitlements":"listIdentityEntitlements","sailpoint_list_pending_access_request_approvals":"listPendingAccessRequestApprovals","sailpoint_list_roles":"listRoles","sailpoint_list_sources":"listSources","sailpoint_load_accounts":"loadAccountsCsv","sailpoint_load_entitlements":"loadEntitlementsCsv","sailpoint_reject_access_request":"rejectAccessRequest","sailpoint_request_access":"requestAccess","sailpoint_search":"search","sailpoint_search_aggregate":"searchAggregate","sailpoint_search_count":"searchCount","sailpoint_sign_off_certification":"signOffCertification"}},"sailpoint_v2":{"namespace":"sailpoint","methods":{"sailpoint_approve_access_request":"approveAccessRequest","sailpoint_cancel_access_request":"cancelAccessRequest","sailpoint_decide_certification_review_items":"decideCertificationReviewItems","sailpoint_get_access_profile":"getAccessProfile","sailpoint_get_access_profile_entitlements":"getAccessProfileEntitlements","sailpoint_get_access_request_config":"getAccessRequestConfig","sailpoint_get_access_request_status":"getAccessRequestStatus","sailpoint_get_account":"getAccount","sailpoint_get_account_activity":"getAccountActivity","sailpoint_get_account_entitlements":"getAccountEntitlements","sailpoint_get_account_selections":"getAccountSelections","sailpoint_get_campaign":"getCampaign","sailpoint_get_certification":"getCertification","sailpoint_get_entitlement":"getEntitlement","sailpoint_get_entitlement_request_config":"getEntitlementRequestConfig","sailpoint_get_identity":"getIdentity","sailpoint_get_role":"getRole","sailpoint_get_role_entitlements":"getRoleEntitlements","sailpoint_get_source":"getSource","sailpoint_get_task_status":"getTaskStatus","sailpoint_list_access_profiles":"listAccessProfiles","sailpoint_list_account_activities":"listAccountActivities","sailpoint_list_accounts":"listAccounts","sailpoint_list_campaigns":"listCampaigns","sailpoint_list_certification_review_items":"listCertificationReviewItems","sailpoint_list_certifications":"listCertifications","sailpoint_list_entitlements":"listEntitlements","sailpoint_list_identities":"listIdentities","sailpoint_list_identity_entitlements":"listIdentityEntitlements","sailpoint_list_pending_access_request_approvals":"listPendingAccessRequestApprovals","sailpoint_list_roles":"listRoles","sailpoint_list_sources":"listSources","sailpoint_load_accounts":"loadAccountsCsv","sailpoint_load_entitlements":"loadEntitlementsCsv","sailpoint_reject_access_request":"rejectAccessRequest","sailpoint_request_access":"requestAccess","sailpoint_search":"search","sailpoint_search_aggregate":"searchAggregate","sailpoint_search_count":"searchCount","sailpoint_sign_off_certification":"signOffCertification"},"params":{"action":{"oauthCredential":"credential"}}},"salesforce":{"namespace":"salesforce","methods":{"create_account":"createAccount","create_case":"createCase","create_contact":"createContact","create_custom_field":"createCustomField","create_custom_object":"createCustomObject","create_lead":"createLead","create_opportunity":"createOpportunity","create_task":"createTask","delete_account":"deleteAccount","delete_case":"deleteCase","delete_contact":"deleteContact","delete_custom_field":"deleteCustomField","delete_lead":"deleteLead","delete_opportunity":"deleteOpportunity","delete_task":"deleteTask","describe_object":"describeObject","get_accounts":"getAccounts","get_cases":"getCases","get_contacts":"getContacts","get_dashboard":"getDashboard","get_leads":"getLeads","get_opportunities":"getOpportunities","get_report":"getReport","get_tasks":"getTasks","list_dashboards":"listDashboards","list_objects":"listObjects","list_report_types":"listReportTypes","list_reports":"listReports","query":"runSoqlQuery","query_more":"getMoreQueryResults","refresh_dashboard":"refreshDashboard","run_report":"runReport","tooling_query":"runToolingQuery","update_account":"updateAccount","update_case":"updateCase","update_contact":"updateContact","update_custom_field":"updateCustomField","update_lead":"updateLead","update_opportunity":"updateOpportunity","update_task":"updateTask"},"triggers":{"salesforce_case_status_changed":"caseStatusChanged","salesforce_opportunity_stage_changed":"opportunityStageChanged","salesforce_record_created":"recordCreated","salesforce_record_deleted":"recordDeleted","salesforce_record_updated":"recordUpdated","salesforce_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"sap_concur":{"namespace":"sapConcur","methods":{"sap_concur_approve_expense_report":"approveExpenseReport","sap_concur_associate_attendees":"associateAttendees","sap_concur_create_cash_advance":"createCashAdvance","sap_concur_create_expected_expense":"createExpectedExpense","sap_concur_create_expense_report":"createExpenseReport","sap_concur_create_list_item":"createListItem","sap_concur_create_purchase_request":"createPurchaseRequest","sap_concur_create_quick_expense":"createQuickExpense","sap_concur_create_quick_expense_with_image":"createQuickExpenseWithImage","sap_concur_create_report_comment":"createReportComment","sap_concur_create_travel_request":"createTravelRequest","sap_concur_create_user":"createUser","sap_concur_delete_expected_expense":"deleteExpectedExpense","sap_concur_delete_expense":"deleteExpense","sap_concur_delete_expense_report":"deleteExpenseReport","sap_concur_delete_list_item":"deleteListItem","sap_concur_delete_travel_request":"deleteTravelRequest","sap_concur_delete_user":"deleteUser","sap_concur_get_allocation":"getAllocation","sap_concur_get_budget":"getBudget","sap_concur_get_cash_advance":"getCashAdvance","sap_concur_get_expected_expense":"getExpectedExpense","sap_concur_get_expense":"getExpense","sap_concur_get_expense_report":"getExpenseReport","sap_concur_get_itemizations":"getItemizations","sap_concur_get_itinerary":"getItineraryTrip","sap_concur_get_list":"getList","sap_concur_get_list_item":"getListItem","sap_concur_get_purchase_request":"getPurchaseRequest","sap_concur_get_receipt":"getReceipt","sap_concur_get_receipt_status":"getReceiptStatus","sap_concur_get_request_cash_advance":"getRequestCashAdvance","sap_concur_get_travel_profile":"getTravelProfile","sap_concur_get_travel_request":"getTravelRequest","sap_concur_get_user":"getUser","sap_concur_issue_cash_advance":"issueCashAdvance","sap_concur_list_allocations":"listAllocations","sap_concur_list_attendee_associations":"listAttendeeAssociations","sap_concur_list_budget_categories":"listBudgetCategories","sap_concur_list_budgets":"listBudgets","sap_concur_list_exceptions":"listExceptions","sap_concur_list_expected_expenses":"listExpectedExpenses","sap_concur_list_expense_reports":"listExpenseReports","sap_concur_list_expenses":"listExpenses","sap_concur_list_itineraries":"listItinerariesTrips","sap_concur_list_list_items":"listListItems","sap_concur_list_lists":"listLists","sap_concur_list_receipts":"listReceipts","sap_concur_list_report_comments":"listReportComments","sap_concur_list_reports_to_approve":"listReportsToApprove","sap_concur_list_travel_profiles_summary":"listTravelProfilesSummary","sap_concur_list_travel_request_comments":"listTravelRequestComments","sap_concur_list_travel_requests":"listTravelRequests","sap_concur_list_users":"listUsers","sap_concur_move_travel_request":"moveTravelRequestWorkflowAction","sap_concur_recall_expense_report":"recallExpenseReport","sap_concur_remove_all_attendees":"removeAllAttendees","sap_concur_search_locations":"searchLocations","sap_concur_search_users":"searchUsers","sap_concur_send_back_expense_report":"sendBackExpenseReport","sap_concur_submit_expense_report":"submitExpenseReport","sap_concur_update_allocation":"updateAllocation","sap_concur_update_expected_expense":"updateExpectedExpense","sap_concur_update_expense":"updateExpense","sap_concur_update_expense_report":"updateExpenseReport","sap_concur_update_list_item":"updateListItem","sap_concur_update_travel_request":"updateTravelRequest","sap_concur_update_user":"updateUserPatch","sap_concur_upload_exchange_rates":"uploadExchangeRates","sap_concur_upload_receipt_image":"uploadReceiptImage"}},"sap_s4hana":{"namespace":"sapS4hana","methods":{"sap_s4hana_create_business_partner":"createBusinessPartner","sap_s4hana_create_purchase_order":"createPurchaseOrder","sap_s4hana_create_purchase_requisition":"createPurchaseRequisition","sap_s4hana_create_sales_order":"createSalesOrder","sap_s4hana_delete_sales_order":"deleteSalesOrder","sap_s4hana_get_billing_document":"getBillingDocument","sap_s4hana_get_business_partner":"getBusinessPartner","sap_s4hana_get_customer":"getCustomer","sap_s4hana_get_inbound_delivery":"getInboundDelivery","sap_s4hana_get_material_document":"getMaterialDocument","sap_s4hana_get_outbound_delivery":"getOutboundDelivery","sap_s4hana_get_product":"getProduct","sap_s4hana_get_purchase_order":"getPurchaseOrder","sap_s4hana_get_purchase_requisition":"getPurchaseRequisition","sap_s4hana_get_sales_order":"getSalesOrder","sap_s4hana_get_supplier":"getSupplier","sap_s4hana_get_supplier_invoice":"getSupplierInvoice","sap_s4hana_list_billing_documents":"listBillingDocuments","sap_s4hana_list_business_partners":"listBusinessPartners","sap_s4hana_list_customers":"listCustomers","sap_s4hana_list_inbound_deliveries":"listInboundDeliveries","sap_s4hana_list_material_documents":"listMaterialDocuments","sap_s4hana_list_material_stock":"listMaterialStock","sap_s4hana_list_outbound_deliveries":"listOutboundDeliveries","sap_s4hana_list_products":"listProducts","sap_s4hana_list_purchase_orders":"listPurchaseOrders","sap_s4hana_list_purchase_requisitions":"listPurchaseRequisitions","sap_s4hana_list_sales_orders":"listSalesOrders","sap_s4hana_list_supplier_invoices":"listSupplierInvoices","sap_s4hana_list_suppliers":"listSuppliers","sap_s4hana_odata_query":"odataQueryAdvanced","sap_s4hana_update_business_partner":"updateBusinessPartner","sap_s4hana_update_customer":"updateCustomer","sap_s4hana_update_product":"updateProduct","sap_s4hana_update_purchase_order":"updatePurchaseOrder","sap_s4hana_update_purchase_requisition":"updatePurchaseRequisition","sap_s4hana_update_sales_order":"updateSalesOrder","sap_s4hana_update_supplier":"updateSupplier"}},"schedule":{"namespace":"trigger.schedule"},"search":{"namespace":"search"},"secrets_manager":{"namespace":"legacy.secretsManager","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","describe_secret":"describeSecret","get_secret":"getSecret","list_secrets":"listSecrets","restore_secret":"restoreSecret","rotate_secret":"rotateSecret","tag_resource":"tagSecret","untag_resource":"untagSecret","update_secret":"updateSecret"}},"secrets_manager_v2":{"namespace":"secretsManager","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","describe_secret":"describeSecret","get_secret":"getSecret","list_secrets":"listSecrets","restore_secret":"restoreSecret","rotate_secret":"rotateSecret","tag_resource":"tagSecret","untag_resource":"untagSecret","update_secret":"updateSecret"},"params":{"action":{"oauthCredential":"credential"}}},"semrush":{"namespace":"semrush","methods":{"semrush_backlinks":"backlinks","semrush_backlinks_anchors":"backlinkAnchors","semrush_backlinks_competitors":"backlinkCompetitors","semrush_backlinks_geo_distribution":"backlinkCountryDistribution","semrush_backlinks_indexed_pages":"indexedPages","semrush_backlinks_overview":"backlinksOverview","semrush_backlinks_tld_distribution":"backlinkTldDistribution","semrush_batch_keyword_overview":"batchKeywordOverview","semrush_broad_match_keywords":"broadMatchKeywords","semrush_domain_ad_copies":"domainAdCopies","semrush_domain_ad_history":"domainAdHistory","semrush_domain_organic_competitors":"organicCompetitors","semrush_domain_organic_keywords":"domainOrganicKeywords","semrush_domain_overview":"domainOverview","semrush_domain_overview_all":"domainOverviewAllDatabases","semrush_domain_overview_history":"domainOverviewHistory","semrush_domain_paid_competitors":"paidCompetitors","semrush_domain_paid_keywords":"domainPaidKeywords","semrush_domain_pla_copies":"domainPlaCopies","semrush_domain_pla_keywords":"domainPlaKeywords","semrush_domain_vs_domain":"domainVsDomain","semrush_keyword_ad_history":"keywordAdHistory","semrush_keyword_difficulty":"keywordDifficulty","semrush_keyword_overview":"keywordOverview","semrush_keyword_overview_all":"keywordOverviewAllDatabases","semrush_keyword_questions":"keywordQuestions","semrush_organic_results":"organicResults","semrush_paid_results":"paidResults","semrush_referring_domains":"referringDomains","semrush_referring_ips":"referringIps","semrush_related_keywords":"relatedKeywords","semrush_subdomain_ad_copies":"subdomainAdCopies","semrush_subdomain_organic_keywords":"subdomainOrganicKeywords","semrush_subdomain_overview":"subdomainOverview","semrush_subdomain_overview_all":"subdomainOverviewAllDatabases","semrush_subdomain_overview_history":"subdomainOverviewHistory","semrush_subdomain_paid_keywords":"subdomainPaidKeywords","semrush_top_domains":"topDomains","semrush_url_organic_keywords":"urlOrganicKeywords","semrush_url_overview":"urlOverview","semrush_url_overview_all":"urlOverviewAllDatabases","semrush_url_overview_history":"urlOverviewHistory","semrush_url_paid_keywords":"urlPaidKeywords","semrush_winners_and_losers":"winnersAndLosers"}},"sendblue":{"namespace":"sendblue","methods":{"sendblue_evaluate_service":"evaluateService","sendblue_get_message":"getMessage","sendblue_send_group_message":"sendGroupMessage","sendblue_send_message":"sendMessage","sendblue_send_typing_indicator":"sendTypingIndicator"},"triggers":{"sendblue_message_received":"messageReceived","sendblue_message_status_updated":"messageStatusUpdated"}},"sendgrid":{"namespace":"legacy.sendgrid","methods":{"add_contact":"addContact","add_contacts_to_list":"addContactsToList","create_list":"createList","create_template":"createTemplate","create_template_version":"createTemplateVersion","delete_contacts":"deleteContacts","delete_list":"deleteList","delete_template":"deleteTemplate","get_contact":"getContact","get_list":"getList","get_template":"getTemplate","list_all_lists":"listAllLists","list_templates":"listTemplates","remove_contacts_from_list":"removeContactsFromList","search_contacts":"searchContacts","send_mail":"sendMail"}},"sendgrid_v2":{"namespace":"sendgrid","methods":{"add_contact":"addContact","add_contacts_to_list":"addContactsToList","create_list":"createList","create_template":"createTemplate","create_template_version":"createTemplateVersion","delete_contacts":"deleteContacts","delete_list":"deleteList","delete_template":"deleteTemplate","get_contact":"getContact","get_list":"getList","get_template":"getTemplate","list_all_lists":"listAllLists","list_templates":"listTemplates","remove_contacts_from_list":"removeContactsFromList","search_contacts":"searchContacts","send_mail":"sendMail"},"params":{"action":{"oauthCredential":"credential"}}},"sentry":{"namespace":"legacy.sentry","methods":{"sentry_events_get":"getEvent","sentry_events_list":"listEvents","sentry_issues_get":"getIssue","sentry_issues_list":"listIssues","sentry_issues_update":"updateIssue","sentry_projects_create":"createProject","sentry_projects_get":"getProject","sentry_projects_list":"listProjects","sentry_projects_update":"updateProject","sentry_releases_create":"createRelease","sentry_releases_deploy":"createDeploy","sentry_releases_list":"listReleases","sentry_teams_list":"listTeams"},"triggers":{"sentry_error_created":"errorCreated","sentry_issue_alert":"issueAlert","sentry_issue_created":"issueCreated","sentry_issue_resolved":"issueResolved","sentry_metric_alert":"metricAlert"}},"sentry_v2":{"namespace":"sentry","methods":{"sentry_events_get":"getEvent","sentry_events_list":"listEvents","sentry_issues_get":"getIssue","sentry_issues_list":"listIssues","sentry_issues_update":"updateIssue","sentry_projects_create":"createProject","sentry_projects_get":"getProject","sentry_projects_list":"listProjects","sentry_projects_update":"updateProject","sentry_releases_create":"createRelease","sentry_releases_deploy":"createDeploy","sentry_releases_list":"listReleases","sentry_teams_list":"listTeams"},"triggers":{"sentry_error_created":"errorCreated","sentry_issue_alert":"issueAlert","sentry_issue_created":"issueCreated","sentry_issue_resolved":"issueResolved","sentry_metric_alert":"metricAlert"},"params":{"action":{"oauthCredential":"credential"}}},"serper":{"namespace":"serper"},"servicenow":{"namespace":"legacy.servicenow","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"}},"servicenow_v2":{"namespace":"legacy.servicenowV2","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"}},"servicenow_v3":{"namespace":"servicenow","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"ses":{"namespace":"legacy.ses","methods":{"create_configuration_set":"createConfigurationSet","create_email_identity":"createEmailIdentity","create_template":"createTemplate","delete_email_identity":"deleteEmailIdentity","delete_suppressed_destination":"deleteSuppressedDestination","delete_template":"deleteTemplate","get_account":"getAccount","get_email_identity":"getEmailIdentity","get_suppressed_destination":"getSuppressedDestination","get_template":"getTemplate","list_identities":"listIdentities","list_suppressed_destinations":"listSuppressedDestinations","list_templates":"listTemplates","put_suppressed_destination":"putSuppressedDestination","send_bulk_email":"sendBulkEmail","send_custom_verification_email":"sendCustomVerificationEmail","send_email":"sendEmail","send_templated_email":"sendTemplatedEmail","update_template":"updateTemplate"}},"ses_v2":{"namespace":"ses","methods":{"create_configuration_set":"createConfigurationSet","create_email_identity":"createEmailIdentity","create_template":"createTemplate","delete_email_identity":"deleteEmailIdentity","delete_suppressed_destination":"deleteSuppressedDestination","delete_template":"deleteTemplate","get_account":"getAccount","get_email_identity":"getEmailIdentity","get_suppressed_destination":"getSuppressedDestination","get_template":"getTemplate","list_identities":"listIdentities","list_suppressed_destinations":"listSuppressedDestinations","list_templates":"listTemplates","put_suppressed_destination":"putSuppressedDestination","send_bulk_email":"sendBulkEmail","send_custom_verification_email":"sendCustomVerificationEmail","send_email":"sendEmail","send_templated_email":"sendTemplatedEmail","update_template":"updateTemplate"},"params":{"action":{"oauthCredential":"credential"}}},"sftp":{"namespace":"legacy.sftp","methods":{"sftp_create":"createFile","sftp_delete":"deleteFileDirectory","sftp_download":"downloadFile","sftp_list":"listDirectory","sftp_mkdir":"createDirectory","sftp_upload":"uploadFiles"}},"sftp_v2":{"namespace":"sftp","methods":{"sftp_create":"createFile","sftp_delete":"deleteFileDirectory","sftp_download":"downloadFile","sftp_list":"listDirectory","sftp_mkdir":"createDirectory","sftp_upload":"uploadFiles"}},"sharepoint":{"namespace":"legacy.sharepoint","methods":{"add_list_items":"addListItems","create_list":"createList","create_page":"createPage","delete_file":"deleteFile","delete_list_item":"deleteListItem","delete_page":"deletePage","download_file":"downloadFile","get_drive_item":"getDriveItem","get_list_item":"getListItem","list_sites":"listSites","publish_page":"publishPage","read_list":"readList","read_page":"readPage","update_list":"updateList","update_page":"updatePage","upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"sharepoint_v2":{"namespace":"sharepoint","methods":{"sharepoint_add_list_items":"addListItem","sharepoint_create_list":"createList","sharepoint_create_page":"createPage","sharepoint_delete_file":"deleteFile","sharepoint_delete_list_item":"deleteListItem","sharepoint_delete_page":"deletePage","sharepoint_download_file":"downloadFile","sharepoint_get_drive_item":"getDriveItem","sharepoint_get_list":"readList","sharepoint_get_list_item":"getListItem","sharepoint_list_sites":"listSites","sharepoint_publish_page":"publishPage","sharepoint_read_page":"readPage","sharepoint_update_list":"updateListItem","sharepoint_update_page":"updatePage","sharepoint_upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"shopify":{"namespace":"shopify","methods":{"shopify_adjust_inventory":"adjustInventory","shopify_cancel_order":"cancelOrder","shopify_create_customer":"createCustomer","shopify_create_fulfillment":"createFulfillment","shopify_create_product":"createProduct","shopify_create_product_variants":"createProductVariants","shopify_delete_customer":"deleteCustomer","shopify_delete_product":"deleteProduct","shopify_get_collection":"getCollection","shopify_get_customer":"getCustomer","shopify_get_fulfillment":"getFulfillment","shopify_get_fulfillment_order":"getFulfillmentOrder","shopify_get_inventory_level":"getInventoryLevel","shopify_get_job":"getJob","shopify_get_order":"getOrder","shopify_get_product":"getProduct","shopify_list_collections":"listCollections","shopify_list_customers":"listCustomers","shopify_list_fulfillment_orders":"listFulfillmentOrders","shopify_list_inventory_items":"listInventoryItems","shopify_list_locations":"listLocations","shopify_list_orders":"listOrders","shopify_list_products":"listProducts","shopify_update_customer":"updateCustomer","shopify_update_fulfillment_tracking":"updateFulfillmentTracking","shopify_update_order":"updateOrder","shopify_update_product":"updateProduct","shopify_update_product_variants":"updateProductVariants"},"params":{"action":{"oauthCredential":"credential"}}},"sim_workspace_event":{"namespace":"trigger.simWorkspaceEvent"},"similarweb":{"namespace":"legacy.similarweb","methods":{"similarweb_bounce_rate":"bounceRate","similarweb_page_views":"pageViews","similarweb_pages_per_visit":"pagesPerVisit","similarweb_traffic_visits":"trafficVisits","similarweb_visit_duration":"visitDurationDesktop","similarweb_website_overview":"websiteOverview"}},"similarweb_v2":{"namespace":"similarweb","methods":{"similarweb_bounce_rate":"bounceRate","similarweb_page_views":"pageViews","similarweb_pages_per_visit":"pagesPerVisit","similarweb_traffic_visits":"trafficVisits","similarweb_visit_duration":"visitDurationDesktop","similarweb_website_overview":"websiteOverview"},"params":{"action":{"oauthCredential":"credential"}}},"sixtyfour":{"namespace":"legacy.sixtyfour","methods":{"enrich_company":"enrichCompany","enrich_lead":"enrichLead","find_email":"findEmail","find_phone":"findPhone"}},"sixtyfour_v2":{"namespace":"sixtyfour","methods":{"enrich_company":"enrichCompany","enrich_lead":"enrichLead","find_email":"findEmail","find_phone":"findPhone"},"params":{"action":{"oauthCredential":"credential"}}},"slack":{"namespace":"legacy.slack","methods":{"archive_conversation":"archiveConversation","canvas":"createCanvas","create_channel_canvas":"createChannelCanvas","create_conversation":"createConversation","delete":"deleteMessage","delete_canvas":"deleteCanvas","delete_scheduled_message":"deleteScheduledMessage","download":"downloadFile","edit_canvas":"editCanvas","ephemeral":"sendEphemeralMessage","get_canvas":"getCanvasInfo","get_channel_history":"getChannelHistory","get_channel_info":"getChannelInfo","get_message":"getMessage","get_permalink":"getMessagePermalink","get_thread":"getThread","get_thread_replies":"getThreadReplies","get_user":"getUserInfo","get_user_presence":"getUserPresence","invite_to_conversation":"inviteToConversation","list_canvases":"listCanvases","list_channels":"listChannels","list_members":"listChannelMembers","list_scheduled_messages":"listScheduledMessages","list_users":"listUsers","lookup_canvas_sections":"lookupCanvasSections","open_view":"openView","publish_view":"publishView","push_view":"pushView","react":"addReaction","read":"readMessages","rename_conversation":"renameConversation","schedule_message":"scheduleMessage","send":"sendMessage","set_conversation_purpose":"setConversationPurpose","set_conversation_topic":"setConversationTopic","set_status":"setAssistantStatus","set_suggested_prompts":"setSuggestedPrompts","set_title":"setAssistantTitle","unreact":"removeReaction","update":"updateMessage","update_view":"updateView"},"triggers":{"slack_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"slack_v2":{"namespace":"slack","methods":{"add_bookmark":"addBookmark","archive_conversation":"archiveConversation","canvas":"createCanvas","close_conversation":"closeConversation","create_channel_canvas":"createChannelCanvas","create_conversation":"createConversation","create_list":"createList","create_list_item":"createListItem","create_user_group":"createUserGroup","delete":"deleteMessage","delete_canvas":"deleteCanvas","delete_file":"deleteFile","delete_list_item":"deleteListItem","delete_list_items":"deleteListItems","delete_scheduled_message":"deleteScheduledMessage","disable_user_group":"disableUserGroup","download":"downloadFile","edit_bookmark":"editBookmark","edit_canvas":"editCanvas","enable_user_group":"enableUserGroup","ephemeral":"sendEphemeralMessage","get_canvas":"getCanvasInfo","get_channel_history":"getChannelHistory","get_channel_info":"getChannelInfo","get_dnd_info":"getDoNotDisturbInfo","get_file_info":"getFileInfo","get_list_export":"getListExport","get_list_item":"getListItem","get_message":"getMessage","get_permalink":"getMessagePermalink","get_reactions":"getReactions","get_team_dnd_info":"getTeamDoNotDisturbInfo","get_team_info":"getWorkspaceInfo","get_team_profile":"getWorkspaceProfileFields","get_thread":"getThread","get_thread_replies":"getThreadReplies","get_user":"getUserInfo","get_user_presence":"getUserPresence","get_user_profile":"getUserProfile","invite_to_conversation":"inviteToConversation","join_conversation":"joinConversation","kick_conversation":"removeUserFromConversation","leave_conversation":"leaveConversation","list_bookmarks":"listBookmarks","list_canvases":"listCanvases","list_channels":"listChannels","list_emoji":"listCustomEmoji","list_files":"listFiles","list_items":"readListItems","list_members":"listChannelMembers","list_pins":"listPins","list_reactions":"listReactions","list_scheduled_messages":"listScheduledMessages","list_user_conversations":"listUserConversations","list_user_group_members":"listUserGroupMembers","list_user_groups":"listUserGroups","list_users":"listUsers","lookup_canvas_sections":"lookupCanvasSections","lookup_user_by_email":"findUserByEmail","mark_conversation_read":"markConversationRead","open_conversation":"openConversation","open_view":"openView","pin_message":"pinMessage","publish_view":"publishView","push_view":"pushView","react":"addReaction","read":"readMessages","remove_bookmark":"removeBookmark","rename_agent_session":"renameAgentSession","rename_conversation":"renameConversation","rename_list":"updateList","revoke_canvas_access":"revokeCanvasAccess","revoke_list_access":"revokeListAccess","schedule_message":"scheduleMessage","send":"sendMessage","set_agent_session_status":"setAgentSessionStatus","set_agent_suggested_prompts":"setAgentSuggestedPrompts","set_conversation_purpose":"setConversationPurpose","set_conversation_topic":"setConversationTopic","set_status":"setAssistantStatus","set_suggested_prompts":"setAssistantSuggestedPrompts","set_title":"setAssistantTitle","set_user_presence":"setBotPresence","share_canvas":"shareCanvas","share_list":"shareList","start_list_export":"startListExport","unarchive_conversation":"unarchiveConversation","unfurl_links":"unfurlLinks","unpin_message":"unpinMessage","unreact":"removeReaction","update":"updateMessage","update_list_items":"updateListItems","update_user_group":"updateUserGroup","update_user_group_members":"updateUserGroupMembers","update_view":"updateView"},"triggers":{"slack_oauth":"oauth"},"params":{"action":{"oauthCredential":"credential"}}},"smartlead":{"namespace":"legacy.smartlead","methods":{"add_email_accounts_to_campaign":"addEmailAccountsToCampaign","add_leads_to_campaign":"addLeadsToCampaign","create_campaign":"createCampaign","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_campaign_webhook":"deleteCampaignWebhook","delete_lead_from_campaign":"deleteLeadFromCampaign","delete_lead_list":"deleteLeadList","duplicate_campaign":"duplicateCampaign","export_campaign_leads":"exportCampaignLeadsCsv","get_campaign":"getCampaign","get_campaign_analytics":"getCampaignAnalytics","get_campaign_analytics_by_date":"getCampaignAnalyticsByDate","get_campaign_lead_statistics":"getCampaignLeadStatistics","get_campaign_mailbox_statistics":"getCampaignMailboxStatistics","get_campaign_sequences":"getCampaignSequences","get_campaign_statistics":"getCampaignStatistics","get_campaign_top_level_analytics_by_date":"getTopLevelAnalyticsByDate","get_campaign_webhook_summary":"getWebhookSummary","get_lead_by_email":"getLeadByEmail","get_lead_by_id":"getLeadById","get_lead_list":"getLeadList","get_lead_message_history":"getLeadMessageHistory","list_campaign_email_accounts":"listCampaignEmailAccounts","list_campaign_leads":"listCampaignLeads","list_campaign_webhooks":"listCampaignWebhooks","list_campaigns":"listCampaigns","list_clients":"listClients","list_email_accounts":"listEmailAccounts","list_inbox_replies":"listInboxReplies","list_lead_activities":"listLeadActivities","list_lead_categories":"listLeadCategories","list_lead_lists":"listLeadLists","mark_lead_complete":"markLeadComplete","pause_lead":"pauseLead","remove_email_accounts_from_campaign":"removeEmailAccountsFromCampaign","resume_lead":"resumeLead","save_campaign_sequences":"saveCampaignSequences","unsubscribe_lead_from_campaign":"unsubscribeLeadFromCampaign","unsubscribe_lead_globally":"unsubscribeLeadGlobally","update_campaign_schedule":"updateCampaignSchedule","update_campaign_settings":"updateCampaignSettings","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead","update_lead_category":"updateLeadCategory","update_lead_list":"updateLeadList","upsert_campaign_webhook":"createOrUpdateWebhook"}},"smartlead_v2":{"namespace":"smartlead","methods":{"add_email_accounts_to_campaign":"addEmailAccountsToCampaign","add_leads_to_campaign":"addLeadsToCampaign","create_campaign":"createCampaign","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_campaign_webhook":"deleteCampaignWebhook","delete_lead_from_campaign":"deleteLeadFromCampaign","delete_lead_list":"deleteLeadList","duplicate_campaign":"duplicateCampaign","export_campaign_leads":"exportCampaignLeadsCsv","get_campaign":"getCampaign","get_campaign_analytics":"getCampaignAnalytics","get_campaign_analytics_by_date":"getCampaignAnalyticsByDate","get_campaign_lead_statistics":"getCampaignLeadStatistics","get_campaign_mailbox_statistics":"getCampaignMailboxStatistics","get_campaign_sequences":"getCampaignSequences","get_campaign_statistics":"getCampaignStatistics","get_campaign_top_level_analytics_by_date":"getTopLevelAnalyticsByDate","get_campaign_webhook_summary":"getWebhookSummary","get_lead_by_email":"getLeadByEmail","get_lead_by_id":"getLeadById","get_lead_list":"getLeadList","get_lead_message_history":"getLeadMessageHistory","list_campaign_email_accounts":"listCampaignEmailAccounts","list_campaign_leads":"listCampaignLeads","list_campaign_webhooks":"listCampaignWebhooks","list_campaigns":"listCampaigns","list_clients":"listClients","list_email_accounts":"listEmailAccounts","list_inbox_replies":"listInboxReplies","list_lead_activities":"listLeadActivities","list_lead_categories":"listLeadCategories","list_lead_lists":"listLeadLists","mark_lead_complete":"markLeadComplete","pause_lead":"pauseLead","remove_email_accounts_from_campaign":"removeEmailAccountsFromCampaign","resume_lead":"resumeLead","save_campaign_sequences":"saveCampaignSequences","unsubscribe_lead_from_campaign":"unsubscribeLeadFromCampaign","unsubscribe_lead_globally":"unsubscribeLeadGlobally","update_campaign_schedule":"updateCampaignSchedule","update_campaign_settings":"updateCampaignSettings","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead","update_lead_category":"updateLeadCategory","update_lead_list":"updateLeadList","upsert_campaign_webhook":"createOrUpdateWebhook"},"params":{"action":{"oauthCredential":"credential"}}},"smtp":{"namespace":"smtp"},"snowflake":{"namespace":"snowflake","methods":{"alter_warehouse":"alterWarehouse","call_procedure":"callProcedure","cancel_statement":"cancelStatement","cancel_task_run":"cancelTaskQuery","cortex_analyst_ask":"askCortexAnalyst","cortex_analyst_feedback":"sendCortexAnalystFeedback","delete_rows":"deleteRows","execute_sql":"executeSql","get_statement":"getStatement","get_task":"getTask","get_task_run":"getTaskRun","get_task_run_output":"getTaskRunOutput","get_warehouse":"getWarehouse","insert_rows":"insertRows","introspect_schema":"introspectSchema","list_copy_history":"listCopyHistory","list_databases":"listDatabases","list_query_history":"listQueryHistory","list_schemas":"listSchemas","list_tables":"listTables","list_task_runs":"listTaskRuns","list_tasks":"listTasks","list_warehouses":"listWarehouses","load_data":"loadData","resume_task":"resumeTask","resume_warehouse":"resumeWarehouse","run_task":"runTask","suspend_task":"suspendTask","suspend_warehouse":"suspendWarehouse","unload_data":"unloadData","update_rows":"updateRows","upsert_rows":"upsertRows"},"params":{"action":{"oauthCredential":"credential"}}},"splunk":{"namespace":"legacy.splunk","methods":{"splunk_cancel_search_job":"cancelSearchJob","splunk_create_search_job":"createSearchJob","splunk_dispatch_saved_search":"dispatchSavedSearch","splunk_get_fired_alerts":"getFiredAlerts","splunk_get_saved_search":"getSavedSearch","splunk_get_search_job":"getSearchJob","splunk_get_search_results":"getSearchResults","splunk_list_apps":"listApps","splunk_list_fired_alerts":"listFiredAlerts","splunk_list_indexes":"listIndexes","splunk_list_saved_searches":"listSavedSearches","splunk_run_search":"runSearch"}},"splunk_v2":{"namespace":"splunk","methods":{"splunk_cancel_search_job":"cancelSearchJob","splunk_create_search_job":"createSearchJob","splunk_dispatch_saved_search":"dispatchSavedSearch","splunk_get_fired_alerts":"getFiredAlerts","splunk_get_saved_search":"getSavedSearch","splunk_get_search_job":"getSearchJob","splunk_get_search_results":"getSearchResults","splunk_list_apps":"listApps","splunk_list_fired_alerts":"listFiredAlerts","splunk_list_indexes":"listIndexes","splunk_list_saved_searches":"listSavedSearches","splunk_run_search":"runSearch"},"params":{"action":{"oauthCredential":"credential"}}},"sportmonks":{"namespace":"legacy.sportmonks","methods":{"core_get_cities":"coreGetCities","core_get_city":"coreGetCityById","core_get_continent":"coreGetContinentById","core_get_continents":"coreGetContinents","core_get_countries":"coreGetCountries","core_get_country":"coreGetCountryById","core_get_entity_filters":"coreGetAllEntityFilters","core_get_my_usage":"coreGetMyUsage","core_get_region":"coreGetRegionById","core_get_regions":"coreGetRegions","core_get_timezones":"coreGetTimezones","core_get_type":"coreGetTypeById","core_get_type_by_entity":"coreGetTypeByEntity","core_get_types":"coreGetTypes","core_search_cities":"coreSearchCities","core_search_countries":"coreSearchCountries","core_search_regions":"coreSearchRegions","football_expected_by_player":"footballGetExpectedXGByPlayer","football_expected_by_team":"footballGetExpectedXGByTeam","football_get_all_commentaries":"footballGetAllCommentaries","football_get_all_fixtures":"footballGetAllFixtures","football_get_all_players":"footballGetAllPlayers","football_get_all_rivals":"footballGetAllRivals","football_get_all_teams":"footballGetAllTeams","football_get_all_transfer_rumours":"footballGetAllTransferRumours","football_get_all_transfers":"footballGetAllTransfers","football_get_brackets_by_season":"footballGetBracketsBySeason","football_get_coach":"footballGetCoachById","football_get_coaches":"footballGetCoaches","football_get_coaches_by_country":"footballGetCoachesByCountry","football_get_commentaries_by_fixture":"footballGetCommentariesByFixture","football_get_current_leagues_by_team":"footballGetCurrentLeaguesByTeam","football_get_expected_lineups_by_player":"footballGetExpectedLineupsByPlayer","football_get_expected_lineups_by_team":"footballGetExpectedLineupsByTeam","football_get_extended_team_squad":"footballGetExtendedTeamSquad","football_get_fixture":"footballGetFixtureById","football_get_fixtures_by_date":"footballGetFixturesByDate","football_get_fixtures_by_date_range":"footballGetFixturesByDateRange","football_get_fixtures_by_date_range_for_team":"footballGetFixturesByDateRangeForTeam","football_get_fixtures_by_ids":"footballGetFixturesByMultipleIds","football_get_grouped_standings_by_round":"footballGetGroupedStandingsByRound","football_get_head_to_head":"footballGetHeadToHead","football_get_inplay_livescores":"footballGetInplayLivescores","football_get_latest_coaches":"footballGetLastUpdatedCoaches","football_get_latest_fixtures":"footballGetLatestUpdatedFixtures","football_get_latest_livescores":"footballGetLatestUpdatedLivescores","football_get_latest_players":"footballGetLastUpdatedPlayers","football_get_latest_totw":"footballGetLatestTeamOfTheWeek","football_get_latest_transfers":"footballGetLatestTransfers","football_get_league":"footballGetLeagueById","football_get_leagues":"footballGetLeagues","football_get_leagues_by_country":"footballGetLeaguesByCountry","football_get_leagues_by_date":"footballGetLeaguesByDate","football_get_leagues_by_team":"footballGetLeaguesByTeam","football_get_live_leagues":"footballGetLiveLeagues","football_get_live_probabilities":"footballGetLiveProbabilities","football_get_live_probabilities_by_fixture":"footballGetLiveProbabilitiesByFixture","football_get_live_standings_by_league":"footballGetLiveStandingsByLeague","football_get_livescores":"footballGetLivescores","football_get_match_facts":"footballGetAllMatchFacts","football_get_match_facts_by_date_range":"footballGetMatchFactsByDateRange","football_get_match_facts_by_fixture":"footballGetMatchFactsByFixture","football_get_match_facts_by_league":"footballGetMatchFactsByLeague","football_get_past_fixtures_by_tv_station":"footballGetPastFixturesByTvStation","football_get_player":"footballGetPlayerById","football_get_players_by_country":"footballGetPlayersByCountry","football_get_postmatch_news":"footballGetPostMatchNews","football_get_postmatch_news_by_season":"footballGetPostMatchNewsBySeason","football_get_predictability_by_league":"footballGetPredictabilityByLeague","football_get_prematch_news":"footballGetPreMatchNews","football_get_prematch_news_by_season":"footballGetPreMatchNewsBySeason","football_get_prematch_news_upcoming":"footballGetPreMatchNewsForUpcomingFixtures","football_get_probabilities":"footballGetProbabilities","football_get_probabilities_by_fixture":"footballGetPredictionsByFixture","football_get_referee":"footballGetRefereeById","football_get_referees":"footballGetReferees","football_get_referees_by_country":"footballGetRefereesByCountry","football_get_referees_by_season":"footballGetRefereesBySeason","football_get_rivals_by_team":"footballGetRivalsByTeam","football_get_round":"footballGetRoundById","football_get_round_statistics":"footballGetRoundStatistics","football_get_rounds":"footballGetRounds","football_get_rounds_by_season":"footballGetRoundsBySeason","football_get_schedules_by_season":"footballGetSchedulesBySeason","football_get_schedules_by_season_and_team":"footballGetSchedulesBySeasonAndTeam","football_get_schedules_by_team":"footballGetSchedulesByTeam","football_get_season":"footballGetSeasonById","football_get_seasons":"footballGetSeasons","football_get_seasons_by_team":"footballGetSeasonsByTeam","football_get_stage":"footballGetStageById","football_get_stage_statistics":"footballGetStageStatistics","football_get_stages":"footballGetStages","football_get_stages_by_season":"footballGetStagesBySeason","football_get_standing_corrections_by_season":"footballGetStandingCorrectionsBySeason","football_get_standings":"footballGetAllStandings","football_get_standings_by_round":"footballGetStandingsByRound","football_get_standings_by_season":"footballGetStandingsBySeason","football_get_state":"footballGetStateById","football_get_states":"footballGetStates","football_get_team":"footballGetTeamById","football_get_team_rankings":"footballGetAllTeamRankings","football_get_team_rankings_by_date":"footballGetTeamRankingsByDate","football_get_team_rankings_by_team":"footballGetTeamRankingsByTeam","football_get_team_squad":"footballGetTeamSquad","football_get_team_squad_by_season":"footballGetTeamSquadBySeason","football_get_teams_by_country":"footballGetTeamsByCountry","football_get_teams_by_season":"footballGetTeamsBySeason","football_get_topscorers_by_season":"footballGetTopscorersBySeason","football_get_topscorers_by_stage":"footballGetTopscorersByStage","football_get_totw":"footballGetAllTeamOfTheWeek","football_get_totw_by_round":"footballGetTeamOfTheWeekByRound","football_get_transfer":"footballGetTransferById","football_get_transfer_rumour":"footballGetTransferRumourById","football_get_transfer_rumours_between_dates":"footballGetTransferRumoursBetweenDates","football_get_transfer_rumours_by_player":"footballGetTransferRumoursByPlayer","football_get_transfer_rumours_by_team":"footballGetTransferRumoursByTeam","football_get_transfers_between_dates":"footballGetTransfersBetweenDates","football_get_transfers_by_player":"footballGetTransfersByPlayer","football_get_transfers_by_team":"footballGetTransfersByTeam","football_get_tv_station":"footballGetTvStationById","football_get_tv_stations":"footballGetTvStations","football_get_tv_stations_by_fixture":"footballGetTvStationsByFixture","football_get_upcoming_fixtures_by_market":"footballGetUpcomingFixturesByMarket","football_get_upcoming_fixtures_by_tv_station":"footballGetUpcomingFixturesByTvStation","football_get_value_bets":"footballGetValueBets","football_get_value_bets_by_fixture":"footballGetValueBetsByFixture","football_get_venue":"footballGetVenueById","football_get_venues":"footballGetVenues","football_get_venues_by_season":"footballGetVenuesBySeason","football_search_coaches":"footballSearchCoaches","football_search_fixtures":"footballSearchFixtures","football_search_leagues":"footballSearchLeagues","football_search_players":"footballSearchPlayers","football_search_referees":"footballSearchReferees","football_search_rounds":"footballSearchRounds","football_search_seasons":"footballSearchSeasons","football_search_stages":"footballSearchStages","football_search_teams":"footballSearchTeams","football_search_venues":"footballSearchVenues","motorsport_get_all_fixtures":"motorsportGetAllFixtures","motorsport_get_current_leagues_by_team":"motorsportGetCurrentLeaguesByTeam","motorsport_get_driver":"motorsportGetDriverById","motorsport_get_driver_standings":"motorsportGetAllDriverStandings","motorsport_get_driver_standings_by_season":"motorsportGetDriverStandingsBySeason","motorsport_get_drivers":"motorsportGetDrivers","motorsport_get_drivers_by_country":"motorsportGetDriversByCountry","motorsport_get_drivers_by_season":"motorsportGetDriversBySeason","motorsport_get_fixture":"motorsportGetFixtureById","motorsport_get_fixtures_by_date":"motorsportGetFixturesByDate","motorsport_get_fixtures_by_date_range":"motorsportGetFixturesByDateRange","motorsport_get_fixtures_by_ids":"motorsportGetFixturesByIds","motorsport_get_laps_by_fixture":"motorsportGetLapsByFixture","motorsport_get_laps_by_fixture_and_driver":"motorsportGetLapsByFixtureAndDriver","motorsport_get_laps_by_fixture_and_lap":"motorsportGetLapsByFixtureAndLapNumber","motorsport_get_latest_laps_by_fixture":"motorsportGetLatestLapsByFixture","motorsport_get_latest_pitstops_by_fixture":"motorsportGetLatestPitstopsByFixture","motorsport_get_latest_stints_by_fixture":"motorsportGetLatestStintsByFixture","motorsport_get_latest_updated_drivers":"motorsportGetLatestUpdatedDrivers","motorsport_get_latest_updated_fixtures":"motorsportGetLatestUpdatedFixtures","motorsport_get_league":"motorsportGetLeagueById","motorsport_get_leagues":"motorsportGetAllLeagues","motorsport_get_leagues_by_country":"motorsportGetLeaguesByCountry","motorsport_get_leagues_by_date":"motorsportGetLeaguesByFixtureDate","motorsport_get_leagues_by_live":"motorsportGetLeaguesByLive","motorsport_get_leagues_by_team":"motorsportGetLeaguesByTeam","motorsport_get_livescores":"motorsportGetLivescores","motorsport_get_pitstops_by_fixture":"motorsportGetPitstopsByFixture","motorsport_get_pitstops_by_fixture_and_driver":"motorsportGetPitstopsByFixtureAndDriver","motorsport_get_pitstops_by_fixture_and_lap":"motorsportGetPitstopsByFixtureAndLapNumber","motorsport_get_race_results_by_season_and_driver":"motorsportGetRaceResultsBySeasonAndDriver","motorsport_get_race_results_by_season_and_team":"motorsportGetRaceResultsBySeasonAndTeam","motorsport_get_schedules_by_season":"motorsportGetSchedulesBySeason","motorsport_get_season":"motorsportGetSeasonById","motorsport_get_seasons":"motorsportGetAllSeasons","motorsport_get_stage":"motorsportGetStageById","motorsport_get_stages":"motorsportGetAllStages","motorsport_get_stages_by_season":"motorsportGetStagesBySeason","motorsport_get_state":"motorsportGetStateById","motorsport_get_states":"motorsportGetAllStates","motorsport_get_stints_by_fixture":"motorsportGetStintsByFixture","motorsport_get_stints_by_fixture_and_driver":"motorsportGetStintsByFixtureAndDriver","motorsport_get_stints_by_fixture_and_stint":"motorsportGetStintsByFixtureAndStintNumber","motorsport_get_team":"motorsportGetTeamById","motorsport_get_team_standings":"motorsportGetAllTeamStandings","motorsport_get_team_standings_by_season":"motorsportGetTeamStandingsBySeason","motorsport_get_teams":"motorsportGetTeams","motorsport_get_teams_by_country":"motorsportGetTeamsByCountry","motorsport_get_teams_by_season":"motorsportGetTeamsBySeason","motorsport_get_venue":"motorsportGetVenueById","motorsport_get_venues":"motorsportGetVenues","motorsport_get_venues_by_season":"motorsportGetVenuesBySeason","motorsport_search_drivers":"motorsportSearchDrivers","motorsport_search_leagues":"motorsportSearchLeagues","motorsport_search_stages":"motorsportSearchStages","motorsport_search_teams":"motorsportSearchTeams","motorsport_search_venues":"motorsportSearchVenues","odds_get_all_historical_odds":"oddsGetAllHistoricalOdds","odds_get_all_inplay_odds":"oddsGetAllInPlayOdds","odds_get_all_pre_match_odds":"oddsGetAllPreMatchOdds","odds_get_all_premium_odds":"oddsGetAllPremiumOdds","odds_get_bookmaker":"oddsGetBookmakerById","odds_get_bookmaker_event_ids_by_fixture":"oddsGetBookmakerEventIdsByFixture","odds_get_bookmakers":"oddsGetBookmakers","odds_get_bookmakers_by_fixture":"oddsGetBookmakersByFixture","odds_get_inplay_odds_by_fixture":"oddsGetInPlayOddsByFixture","odds_get_inplay_odds_by_fixture_and_bookmaker":"oddsGetInPlayOddsByFixtureAndBookmaker","odds_get_inplay_odds_by_fixture_and_market":"oddsGetInPlayOddsByFixtureAndMarket","odds_get_last_updated_inplay_odds":"oddsGetLastUpdatedInPlayOdds","odds_get_last_updated_pre_match_odds":"oddsGetLastUpdatedPreMatchOdds","odds_get_market":"oddsGetMarketById","odds_get_markets":"oddsGetMarkets","odds_get_pre_match_odds_by_fixture":"oddsGetPreMatchOddsByFixture","odds_get_pre_match_odds_by_fixture_and_bookmaker":"oddsGetPreMatchOddsByFixtureAndBookmaker","odds_get_pre_match_odds_by_fixture_and_market":"oddsGetPreMatchOddsByFixtureAndMarket","odds_get_premium_odds_by_fixture":"oddsGetPremiumOddsByFixture","odds_get_premium_odds_by_fixture_and_bookmaker":"oddsGetPremiumOddsByFixtureAndBookmaker","odds_get_premium_odds_by_fixture_and_market":"oddsGetPremiumOddsByFixtureAndMarket","odds_get_updated_historical_odds_between":"oddsGetUpdatedHistoricalOddsBetweenTimeRange","odds_get_updated_premium_odds_between":"oddsGetUpdatedPremiumOddsBetweenTimeRange","odds_search_bookmakers":"oddsSearchBookmakers","odds_search_markets":"oddsSearchMarkets"}},"sportmonks_v2":{"namespace":"sportmonks","methods":{"core_get_cities":"coreGetCities","core_get_city":"coreGetCityById","core_get_continent":"coreGetContinentById","core_get_continents":"coreGetContinents","core_get_countries":"coreGetCountries","core_get_country":"coreGetCountryById","core_get_entity_filters":"coreGetAllEntityFilters","core_get_my_usage":"coreGetMyUsage","core_get_region":"coreGetRegionById","core_get_regions":"coreGetRegions","core_get_timezones":"coreGetTimezones","core_get_type":"coreGetTypeById","core_get_type_by_entity":"coreGetTypeByEntity","core_get_types":"coreGetTypes","core_search_cities":"coreSearchCities","core_search_countries":"coreSearchCountries","core_search_regions":"coreSearchRegions","football_expected_by_player":"footballGetExpectedXGByPlayer","football_expected_by_team":"footballGetExpectedXGByTeam","football_get_all_commentaries":"footballGetAllCommentaries","football_get_all_fixtures":"footballGetAllFixtures","football_get_all_players":"footballGetAllPlayers","football_get_all_rivals":"footballGetAllRivals","football_get_all_teams":"footballGetAllTeams","football_get_all_transfer_rumours":"footballGetAllTransferRumours","football_get_all_transfers":"footballGetAllTransfers","football_get_brackets_by_season":"footballGetBracketsBySeason","football_get_coach":"footballGetCoachById","football_get_coaches":"footballGetCoaches","football_get_coaches_by_country":"footballGetCoachesByCountry","football_get_commentaries_by_fixture":"footballGetCommentariesByFixture","football_get_current_leagues_by_team":"footballGetCurrentLeaguesByTeam","football_get_expected_lineups_by_player":"footballGetExpectedLineupsByPlayer","football_get_expected_lineups_by_team":"footballGetExpectedLineupsByTeam","football_get_extended_team_squad":"footballGetExtendedTeamSquad","football_get_fixture":"footballGetFixtureById","football_get_fixtures_by_date":"footballGetFixturesByDate","football_get_fixtures_by_date_range":"footballGetFixturesByDateRange","football_get_fixtures_by_date_range_for_team":"footballGetFixturesByDateRangeForTeam","football_get_fixtures_by_ids":"footballGetFixturesByMultipleIds","football_get_grouped_standings_by_round":"footballGetGroupedStandingsByRound","football_get_head_to_head":"footballGetHeadToHead","football_get_inplay_livescores":"footballGetInplayLivescores","football_get_latest_coaches":"footballGetLastUpdatedCoaches","football_get_latest_fixtures":"footballGetLatestUpdatedFixtures","football_get_latest_livescores":"footballGetLatestUpdatedLivescores","football_get_latest_players":"footballGetLastUpdatedPlayers","football_get_latest_totw":"footballGetLatestTeamOfTheWeek","football_get_latest_transfers":"footballGetLatestTransfers","football_get_league":"footballGetLeagueById","football_get_leagues":"footballGetLeagues","football_get_leagues_by_country":"footballGetLeaguesByCountry","football_get_leagues_by_date":"footballGetLeaguesByDate","football_get_leagues_by_team":"footballGetLeaguesByTeam","football_get_live_leagues":"footballGetLiveLeagues","football_get_live_probabilities":"footballGetLiveProbabilities","football_get_live_probabilities_by_fixture":"footballGetLiveProbabilitiesByFixture","football_get_live_standings_by_league":"footballGetLiveStandingsByLeague","football_get_livescores":"footballGetLivescores","football_get_match_facts":"footballGetAllMatchFacts","football_get_match_facts_by_date_range":"footballGetMatchFactsByDateRange","football_get_match_facts_by_fixture":"footballGetMatchFactsByFixture","football_get_match_facts_by_league":"footballGetMatchFactsByLeague","football_get_past_fixtures_by_tv_station":"footballGetPastFixturesByTvStation","football_get_player":"footballGetPlayerById","football_get_players_by_country":"footballGetPlayersByCountry","football_get_postmatch_news":"footballGetPostMatchNews","football_get_postmatch_news_by_season":"footballGetPostMatchNewsBySeason","football_get_predictability_by_league":"footballGetPredictabilityByLeague","football_get_prematch_news":"footballGetPreMatchNews","football_get_prematch_news_by_season":"footballGetPreMatchNewsBySeason","football_get_prematch_news_upcoming":"footballGetPreMatchNewsForUpcomingFixtures","football_get_probabilities":"footballGetProbabilities","football_get_probabilities_by_fixture":"footballGetPredictionsByFixture","football_get_referee":"footballGetRefereeById","football_get_referees":"footballGetReferees","football_get_referees_by_country":"footballGetRefereesByCountry","football_get_referees_by_season":"footballGetRefereesBySeason","football_get_rivals_by_team":"footballGetRivalsByTeam","football_get_round":"footballGetRoundById","football_get_round_statistics":"footballGetRoundStatistics","football_get_rounds":"footballGetRounds","football_get_rounds_by_season":"footballGetRoundsBySeason","football_get_schedules_by_season":"footballGetSchedulesBySeason","football_get_schedules_by_season_and_team":"footballGetSchedulesBySeasonAndTeam","football_get_schedules_by_team":"footballGetSchedulesByTeam","football_get_season":"footballGetSeasonById","football_get_seasons":"footballGetSeasons","football_get_seasons_by_team":"footballGetSeasonsByTeam","football_get_stage":"footballGetStageById","football_get_stage_statistics":"footballGetStageStatistics","football_get_stages":"footballGetStages","football_get_stages_by_season":"footballGetStagesBySeason","football_get_standing_corrections_by_season":"footballGetStandingCorrectionsBySeason","football_get_standings":"footballGetAllStandings","football_get_standings_by_round":"footballGetStandingsByRound","football_get_standings_by_season":"footballGetStandingsBySeason","football_get_state":"footballGetStateById","football_get_states":"footballGetStates","football_get_team":"footballGetTeamById","football_get_team_rankings":"footballGetAllTeamRankings","football_get_team_rankings_by_date":"footballGetTeamRankingsByDate","football_get_team_rankings_by_team":"footballGetTeamRankingsByTeam","football_get_team_squad":"footballGetTeamSquad","football_get_team_squad_by_season":"footballGetTeamSquadBySeason","football_get_teams_by_country":"footballGetTeamsByCountry","football_get_teams_by_season":"footballGetTeamsBySeason","football_get_topscorers_by_season":"footballGetTopscorersBySeason","football_get_topscorers_by_stage":"footballGetTopscorersByStage","football_get_totw":"footballGetAllTeamOfTheWeek","football_get_totw_by_round":"footballGetTeamOfTheWeekByRound","football_get_transfer":"footballGetTransferById","football_get_transfer_rumour":"footballGetTransferRumourById","football_get_transfer_rumours_between_dates":"footballGetTransferRumoursBetweenDates","football_get_transfer_rumours_by_player":"footballGetTransferRumoursByPlayer","football_get_transfer_rumours_by_team":"footballGetTransferRumoursByTeam","football_get_transfers_between_dates":"footballGetTransfersBetweenDates","football_get_transfers_by_player":"footballGetTransfersByPlayer","football_get_transfers_by_team":"footballGetTransfersByTeam","football_get_tv_station":"footballGetTvStationById","football_get_tv_stations":"footballGetTvStations","football_get_tv_stations_by_fixture":"footballGetTvStationsByFixture","football_get_upcoming_fixtures_by_market":"footballGetUpcomingFixturesByMarket","football_get_upcoming_fixtures_by_tv_station":"footballGetUpcomingFixturesByTvStation","football_get_value_bets":"footballGetValueBets","football_get_value_bets_by_fixture":"footballGetValueBetsByFixture","football_get_venue":"footballGetVenueById","football_get_venues":"footballGetVenues","football_get_venues_by_season":"footballGetVenuesBySeason","football_search_coaches":"footballSearchCoaches","football_search_fixtures":"footballSearchFixtures","football_search_leagues":"footballSearchLeagues","football_search_players":"footballSearchPlayers","football_search_referees":"footballSearchReferees","football_search_rounds":"footballSearchRounds","football_search_seasons":"footballSearchSeasons","football_search_stages":"footballSearchStages","football_search_teams":"footballSearchTeams","football_search_venues":"footballSearchVenues","motorsport_get_all_fixtures":"motorsportGetAllFixtures","motorsport_get_current_leagues_by_team":"motorsportGetCurrentLeaguesByTeam","motorsport_get_driver":"motorsportGetDriverById","motorsport_get_driver_standings":"motorsportGetAllDriverStandings","motorsport_get_driver_standings_by_season":"motorsportGetDriverStandingsBySeason","motorsport_get_drivers":"motorsportGetDrivers","motorsport_get_drivers_by_country":"motorsportGetDriversByCountry","motorsport_get_drivers_by_season":"motorsportGetDriversBySeason","motorsport_get_fixture":"motorsportGetFixtureById","motorsport_get_fixtures_by_date":"motorsportGetFixturesByDate","motorsport_get_fixtures_by_date_range":"motorsportGetFixturesByDateRange","motorsport_get_fixtures_by_ids":"motorsportGetFixturesByIds","motorsport_get_laps_by_fixture":"motorsportGetLapsByFixture","motorsport_get_laps_by_fixture_and_driver":"motorsportGetLapsByFixtureAndDriver","motorsport_get_laps_by_fixture_and_lap":"motorsportGetLapsByFixtureAndLapNumber","motorsport_get_latest_laps_by_fixture":"motorsportGetLatestLapsByFixture","motorsport_get_latest_pitstops_by_fixture":"motorsportGetLatestPitstopsByFixture","motorsport_get_latest_stints_by_fixture":"motorsportGetLatestStintsByFixture","motorsport_get_latest_updated_drivers":"motorsportGetLatestUpdatedDrivers","motorsport_get_latest_updated_fixtures":"motorsportGetLatestUpdatedFixtures","motorsport_get_league":"motorsportGetLeagueById","motorsport_get_leagues":"motorsportGetAllLeagues","motorsport_get_leagues_by_country":"motorsportGetLeaguesByCountry","motorsport_get_leagues_by_date":"motorsportGetLeaguesByFixtureDate","motorsport_get_leagues_by_live":"motorsportGetLeaguesByLive","motorsport_get_leagues_by_team":"motorsportGetLeaguesByTeam","motorsport_get_livescores":"motorsportGetLivescores","motorsport_get_pitstops_by_fixture":"motorsportGetPitstopsByFixture","motorsport_get_pitstops_by_fixture_and_driver":"motorsportGetPitstopsByFixtureAndDriver","motorsport_get_pitstops_by_fixture_and_lap":"motorsportGetPitstopsByFixtureAndLapNumber","motorsport_get_race_results_by_season_and_driver":"motorsportGetRaceResultsBySeasonAndDriver","motorsport_get_race_results_by_season_and_team":"motorsportGetRaceResultsBySeasonAndTeam","motorsport_get_schedules_by_season":"motorsportGetSchedulesBySeason","motorsport_get_season":"motorsportGetSeasonById","motorsport_get_seasons":"motorsportGetAllSeasons","motorsport_get_stage":"motorsportGetStageById","motorsport_get_stages":"motorsportGetAllStages","motorsport_get_stages_by_season":"motorsportGetStagesBySeason","motorsport_get_state":"motorsportGetStateById","motorsport_get_states":"motorsportGetAllStates","motorsport_get_stints_by_fixture":"motorsportGetStintsByFixture","motorsport_get_stints_by_fixture_and_driver":"motorsportGetStintsByFixtureAndDriver","motorsport_get_stints_by_fixture_and_stint":"motorsportGetStintsByFixtureAndStintNumber","motorsport_get_team":"motorsportGetTeamById","motorsport_get_team_standings":"motorsportGetAllTeamStandings","motorsport_get_team_standings_by_season":"motorsportGetTeamStandingsBySeason","motorsport_get_teams":"motorsportGetTeams","motorsport_get_teams_by_country":"motorsportGetTeamsByCountry","motorsport_get_teams_by_season":"motorsportGetTeamsBySeason","motorsport_get_venue":"motorsportGetVenueById","motorsport_get_venues":"motorsportGetVenues","motorsport_get_venues_by_season":"motorsportGetVenuesBySeason","motorsport_search_drivers":"motorsportSearchDrivers","motorsport_search_leagues":"motorsportSearchLeagues","motorsport_search_stages":"motorsportSearchStages","motorsport_search_teams":"motorsportSearchTeams","motorsport_search_venues":"motorsportSearchVenues","odds_get_all_historical_odds":"oddsGetAllHistoricalOdds","odds_get_all_inplay_odds":"oddsGetAllInPlayOdds","odds_get_all_pre_match_odds":"oddsGetAllPreMatchOdds","odds_get_all_premium_odds":"oddsGetAllPremiumOdds","odds_get_bookmaker":"oddsGetBookmakerById","odds_get_bookmaker_event_ids_by_fixture":"oddsGetBookmakerEventIdsByFixture","odds_get_bookmakers":"oddsGetBookmakers","odds_get_bookmakers_by_fixture":"oddsGetBookmakersByFixture","odds_get_inplay_odds_by_fixture":"oddsGetInPlayOddsByFixture","odds_get_inplay_odds_by_fixture_and_bookmaker":"oddsGetInPlayOddsByFixtureAndBookmaker","odds_get_inplay_odds_by_fixture_and_market":"oddsGetInPlayOddsByFixtureAndMarket","odds_get_last_updated_inplay_odds":"oddsGetLastUpdatedInPlayOdds","odds_get_last_updated_pre_match_odds":"oddsGetLastUpdatedPreMatchOdds","odds_get_market":"oddsGetMarketById","odds_get_markets":"oddsGetMarkets","odds_get_pre_match_odds_by_fixture":"oddsGetPreMatchOddsByFixture","odds_get_pre_match_odds_by_fixture_and_bookmaker":"oddsGetPreMatchOddsByFixtureAndBookmaker","odds_get_pre_match_odds_by_fixture_and_market":"oddsGetPreMatchOddsByFixtureAndMarket","odds_get_premium_odds_by_fixture":"oddsGetPremiumOddsByFixture","odds_get_premium_odds_by_fixture_and_bookmaker":"oddsGetPremiumOddsByFixtureAndBookmaker","odds_get_premium_odds_by_fixture_and_market":"oddsGetPremiumOddsByFixtureAndMarket","odds_get_updated_historical_odds_between":"oddsGetUpdatedHistoricalOddsBetweenTimeRange","odds_get_updated_premium_odds_between":"oddsGetUpdatedPremiumOddsBetweenTimeRange","odds_search_bookmakers":"oddsSearchBookmakers","odds_search_markets":"oddsSearchMarkets"},"params":{"action":{"oauthCredential":"credential"}}},"spotify":{"namespace":"legacy.spotify","methods":{"spotify_add_playlist_cover":"addPlaylistCover","spotify_add_to_queue":"addToQueue","spotify_add_tracks_to_playlist":"addTracksToPlaylist","spotify_check_following":"checkFollowing","spotify_check_playlist_followers":"checkPlaylistFollowers","spotify_check_saved_albums":"checkSavedAlbums","spotify_check_saved_audiobooks":"checkSavedAudiobooks","spotify_check_saved_episodes":"checkSavedEpisodes","spotify_check_saved_shows":"checkSavedShows","spotify_check_saved_tracks":"checkSavedTracks","spotify_create_playlist":"createPlaylist","spotify_follow_artists":"followArtists","spotify_follow_playlist":"followPlaylist","spotify_get_album":"getAlbum","spotify_get_album_tracks":"getAlbumTracks","spotify_get_albums":"getMultipleAlbums","spotify_get_artist":"getArtist","spotify_get_artist_albums":"getArtistAlbums","spotify_get_artist_top_tracks":"getArtistTopTracks","spotify_get_artists":"getMultipleArtists","spotify_get_audiobook":"getAudiobook","spotify_get_audiobook_chapters":"getAudiobookChapters","spotify_get_audiobooks":"getMultipleAudiobooks","spotify_get_categories":"getCategories","spotify_get_current_user":"getMyProfile","spotify_get_currently_playing":"getCurrentlyPlaying","spotify_get_devices":"getDevices","spotify_get_episode":"getEpisode","spotify_get_episodes":"getMultipleEpisodes","spotify_get_followed_artists":"getFollowedArtists","spotify_get_markets":"getAvailableMarkets","spotify_get_new_releases":"getNewReleases","spotify_get_playback_state":"getPlaybackState","spotify_get_playlist":"getPlaylist","spotify_get_playlist_cover":"getPlaylistCover","spotify_get_playlist_tracks":"getPlaylistTracks","spotify_get_queue":"getQueue","spotify_get_recently_played":"getRecentlyPlayed","spotify_get_saved_albums":"getSavedAlbums","spotify_get_saved_audiobooks":"getSavedAudiobooks","spotify_get_saved_episodes":"getSavedEpisodes","spotify_get_saved_shows":"getSavedShows","spotify_get_saved_tracks":"getSavedTracks","spotify_get_show":"getShow","spotify_get_show_episodes":"getShowEpisodes","spotify_get_shows":"getMultipleShows","spotify_get_top_artists":"getMyTopArtists","spotify_get_top_tracks":"getMyTopTracks","spotify_get_track":"getTrack","spotify_get_tracks":"getMultipleTracks","spotify_get_user_playlists":"getMyPlaylists","spotify_get_user_profile":"getUserProfile","spotify_pause":"pause","spotify_play":"play","spotify_remove_saved_albums":"removeSavedAlbums","spotify_remove_saved_audiobooks":"removeSavedAudiobooks","spotify_remove_saved_episodes":"removeSavedEpisodes","spotify_remove_saved_shows":"removeSavedShows","spotify_remove_saved_tracks":"removeSavedTracks","spotify_remove_tracks_from_playlist":"removeTracksFromPlaylist","spotify_reorder_playlist_items":"reorderPlaylistItems","spotify_replace_playlist_items":"replacePlaylistItems","spotify_save_albums":"saveAlbums","spotify_save_audiobooks":"saveAudiobooks","spotify_save_episodes":"saveEpisodes","spotify_save_shows":"saveShows","spotify_save_tracks":"saveTracks","spotify_search":"search","spotify_seek":"seek","spotify_set_repeat":"setRepeat","spotify_set_shuffle":"setShuffle","spotify_set_volume":"setVolume","spotify_skip_next":"skipToNext","spotify_skip_previous":"skipToPrevious","spotify_transfer_playback":"transferPlayback","spotify_unfollow_artists":"unfollowArtists","spotify_unfollow_playlist":"unfollowPlaylist","spotify_update_playlist":"updatePlaylist"},"params":{"action":{"oauthCredential":"credential"}}},"sqs":{"namespace":"legacy.sqs","methods":{"cancel_message_move_task":"cancelMessageMoveTask","change_message_visibility":"changeMessageVisibility","change_message_visibility_batch":"changeMessageVisibilityBatch","create_queue":"createQueue","delete_message":"deleteMessage","delete_message_batch":"deleteMessageBatch","delete_queue":"deleteQueue","get_queue_attributes":"getQueueAttributes","get_queue_url":"getQueueUrl","list_dead_letter_source_queues":"listDeadLetterSourceQueues","list_message_move_tasks":"listMessageMoveTasks","list_queue_tags":"listQueueTags","list_queues":"listQueues","purge_queue":"purgeQueue","receive_message":"receiveMessage","send":"sendMessage","send_message_batch":"sendMessageBatch","set_queue_attributes":"setQueueAttributes","start_message_move_task":"startMessageMoveTask","tag_queue":"tagQueue","untag_queue":"untagQueue"}},"sqs_v2":{"namespace":"sqs","methods":{"cancel_message_move_task":"cancelMessageMoveTask","change_message_visibility":"changeMessageVisibility","change_message_visibility_batch":"changeMessageVisibilityBatch","create_queue":"createQueue","delete_message":"deleteMessage","delete_message_batch":"deleteMessageBatch","delete_queue":"deleteQueue","get_queue_attributes":"getQueueAttributes","get_queue_url":"getQueueUrl","list_dead_letter_source_queues":"listDeadLetterSourceQueues","list_message_move_tasks":"listMessageMoveTasks","list_queue_tags":"listQueueTags","list_queues":"listQueues","purge_queue":"purgeQueue","receive_message":"receiveMessage","send":"sendMessage","send_message_batch":"sendMessageBatch","set_queue_attributes":"setQueueAttributes","start_message_move_task":"startMessageMoveTask","tag_queue":"tagQueue","untag_queue":"untagQueue"},"params":{"action":{"oauthCredential":"credential"}}},"square":{"namespace":"legacy.square","methods":{"batch_retrieve_inventory_counts":"batchRetrieveInventoryCounts","cancel_invoice":"cancelInvoice","cancel_payment":"cancelPayment","complete_payment":"completePayment","create_catalog_image":"createCatalogImage","create_customer":"createCustomer","create_invoice":"createInvoice","create_order":"createOrder","create_payment":"createPayment","delete_catalog_object":"deleteCatalogObject","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","get_catalog_object":"getCatalogObject","get_customer":"getCustomer","get_invoice":"getInvoice","get_location":"getLocation","get_order":"getOrder","get_payment":"getPayment","get_refund":"getRefund","list_catalog":"listCatalog","list_customers":"listCustomers","list_invoices":"listInvoices","list_locations":"listLocations","list_payments":"listPayments","list_refunds":"listRefunds","pay_order":"payOrder","publish_invoice":"publishInvoice","refund_payment":"refundPayment","search_catalog_objects":"searchCatalogObjects","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_orders":"searchOrders","update_customer":"updateCustomer","upsert_catalog_object":"upsertCatalogObject"}},"square_v2":{"namespace":"square","methods":{"batch_retrieve_inventory_counts":"batchRetrieveInventoryCounts","cancel_invoice":"cancelInvoice","cancel_payment":"cancelPayment","complete_payment":"completePayment","create_catalog_image":"createCatalogImage","create_customer":"createCustomer","create_invoice":"createInvoice","create_order":"createOrder","create_payment":"createPayment","delete_catalog_object":"deleteCatalogObject","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","get_catalog_object":"getCatalogObject","get_customer":"getCustomer","get_invoice":"getInvoice","get_location":"getLocation","get_order":"getOrder","get_payment":"getPayment","get_refund":"getRefund","list_catalog":"listCatalog","list_customers":"listCustomers","list_invoices":"listInvoices","list_locations":"listLocations","list_payments":"listPayments","list_refunds":"listRefunds","pay_order":"payOrder","publish_invoice":"publishInvoice","refund_payment":"refundPayment","search_catalog_objects":"searchCatalogObjects","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_orders":"searchOrders","update_customer":"updateCustomer","upsert_catalog_object":"upsertCatalogObject"},"params":{"action":{"oauthCredential":"credential"}}},"ssh":{"namespace":"legacy.ssh","methods":{"ssh_check_command_exists":"checkCommandExists","ssh_check_file_exists":"checkFileDirectoryExists","ssh_create_directory":"createDirectory","ssh_delete_file":"deleteFileDirectory","ssh_download_file":"downloadFile","ssh_execute_command":"executeCommand","ssh_execute_script":"executeScript","ssh_get_system_info":"getSystemInfo","ssh_list_directory":"listDirectory","ssh_move_rename":"moveRename","ssh_read_file_content":"readFileContent","ssh_upload_file":"uploadFile","ssh_write_file_content":"writeFileContent"}},"ssh_v2":{"namespace":"ssh","methods":{"ssh_check_command_exists":"checkCommandExists","ssh_check_file_exists":"checkFileDirectoryExists","ssh_create_directory":"createDirectory","ssh_delete_file":"deleteFileDirectory","ssh_download_file":"downloadFile","ssh_execute_command":"executeCommand","ssh_execute_script":"executeScript","ssh_get_system_info":"getSystemInfo","ssh_list_directory":"listDirectory","ssh_move_rename":"moveRename","ssh_read_file_content":"readFileContent","ssh_upload_file":"uploadFile","ssh_write_file_content":"writeFileContent"}},"ssm":{"namespace":"legacy.ssm","methods":{"cancel_command":"cancelCommand","delete_parameter":"deleteParameter","describe_automation_executions":"describeAutomationExecutions","describe_instance_information":"describeInstanceInformation","describe_instance_patch_states":"describeInstancePatchStates","describe_instance_patches":"describeInstancePatches","describe_parameters":"describeParameters","get_automation_execution":"getAutomationExecution","get_command_invocation":"getCommandInvocation","get_document":"getDocument","get_parameter":"getParameter","get_parameters":"getParameters","get_parameters_by_path":"getParametersByPath","list_command_invocations":"listCommandInvocations","list_commands":"listCommands","list_compliance_items":"listComplianceItems","list_compliance_summaries":"listComplianceSummaries","list_documents":"listDocuments","put_parameter":"putParameter","send_command":"sendCommand","start_automation_execution":"startAutomationExecution","stop_automation_execution":"stopAutomationExecution"}},"ssm_v2":{"namespace":"ssm","methods":{"cancel_command":"cancelCommand","delete_parameter":"deleteParameter","describe_automation_executions":"describeAutomationExecutions","describe_instance_information":"describeInstanceInformation","describe_instance_patch_states":"describeInstancePatchStates","describe_instance_patches":"describeInstancePatches","describe_parameters":"describeParameters","get_automation_execution":"getAutomationExecution","get_command_invocation":"getCommandInvocation","get_document":"getDocument","get_parameter":"getParameter","get_parameters":"getParameters","get_parameters_by_path":"getParametersByPath","list_command_invocations":"listCommandInvocations","list_commands":"listCommands","list_compliance_items":"listComplianceItems","list_compliance_summaries":"listComplianceSummaries","list_documents":"listDocuments","put_parameter":"putParameter","send_command":"sendCommand","start_automation_execution":"startAutomationExecution","stop_automation_execution":"stopAutomationExecution"},"params":{"action":{"oauthCredential":"credential"}}},"stagehand":{"namespace":"stagehand","methods":{"agent":"runAgent","extract":"extractData"}},"start_trigger":{"namespace":"trigger.start"},"starter":{"namespace":"legacy.starter"},"stripe":{"namespace":"legacy.stripe","methods":{"cancel_payment_intent":"cancelPaymentIntent","cancel_subscription":"cancelSubscription","capture_charge":"captureCharge","capture_payment_intent":"capturePaymentIntent","confirm_payment_intent":"confirmPaymentIntent","create_charge":"createCharge","create_customer":"createCustomer","create_invoice":"createInvoice","create_payment_intent":"createPaymentIntent","create_price":"createPrice","create_product":"createProduct","create_subscription":"createSubscription","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","delete_product":"deleteProduct","finalize_invoice":"finalizeInvoice","list_charges":"listCharges","list_customers":"listCustomers","list_events":"listEvents","list_invoices":"listInvoices","list_payment_intents":"listPaymentIntents","list_prices":"listPrices","list_products":"listProducts","list_subscriptions":"listSubscriptions","pay_invoice":"payInvoice","resume_subscription":"resumeSubscription","retrieve_charge":"retrieveCharge","retrieve_customer":"retrieveCustomer","retrieve_event":"retrieveEvent","retrieve_invoice":"retrieveInvoice","retrieve_payment_intent":"retrievePaymentIntent","retrieve_price":"retrievePrice","retrieve_product":"retrieveProduct","retrieve_subscription":"retrieveSubscription","search_charges":"searchCharges","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_payment_intents":"searchPaymentIntents","search_prices":"searchPrices","search_products":"searchProducts","search_subscriptions":"searchSubscriptions","send_invoice":"sendInvoice","update_charge":"updateCharge","update_customer":"updateCustomer","update_invoice":"updateInvoice","update_payment_intent":"updatePaymentIntent","update_price":"updatePrice","update_product":"updateProduct","update_subscription":"updateSubscription","void_invoice":"voidInvoice"},"triggers":{"stripe_webhook":"webhook"}},"stripe_v2":{"namespace":"stripe","methods":{"cancel_payment_intent":"cancelPaymentIntent","cancel_subscription":"cancelSubscription","capture_charge":"captureCharge","capture_payment_intent":"capturePaymentIntent","confirm_payment_intent":"confirmPaymentIntent","create_charge":"createCharge","create_customer":"createCustomer","create_invoice":"createInvoice","create_payment_intent":"createPaymentIntent","create_price":"createPrice","create_product":"createProduct","create_subscription":"createSubscription","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","delete_product":"deleteProduct","finalize_invoice":"finalizeInvoice","list_charges":"listCharges","list_customers":"listCustomers","list_events":"listEvents","list_invoices":"listInvoices","list_payment_intents":"listPaymentIntents","list_prices":"listPrices","list_products":"listProducts","list_subscriptions":"listSubscriptions","pay_invoice":"payInvoice","resume_subscription":"resumeSubscription","retrieve_charge":"retrieveCharge","retrieve_customer":"retrieveCustomer","retrieve_event":"retrieveEvent","retrieve_invoice":"retrieveInvoice","retrieve_payment_intent":"retrievePaymentIntent","retrieve_price":"retrievePrice","retrieve_product":"retrieveProduct","retrieve_subscription":"retrieveSubscription","search_charges":"searchCharges","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_payment_intents":"searchPaymentIntents","search_prices":"searchPrices","search_products":"searchProducts","search_subscriptions":"searchSubscriptions","send_invoice":"sendInvoice","update_charge":"updateCharge","update_customer":"updateCustomer","update_invoice":"updateInvoice","update_payment_intent":"updatePaymentIntent","update_price":"updatePrice","update_product":"updateProduct","update_subscription":"updateSubscription","void_invoice":"voidInvoice"},"triggers":{"stripe_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"sts":{"namespace":"legacy.sts","methods":{"assume_role":"assumeRole","assume_role_with_saml":"assumeRoleWithSaml","assume_role_with_web_identity":"assumeRoleWithWebIdentity","get_access_key_info":"getAccessKeyInfo","get_caller_identity":"getCallerIdentity","get_session_token":"getSessionToken"}},"sts_v2":{"namespace":"sts","methods":{"assume_role":"assumeRole","assume_role_with_saml":"assumeRoleWithSaml","assume_role_with_web_identity":"assumeRoleWithWebIdentity","get_access_key_info":"getAccessKeyInfo","get_caller_identity":"getCallerIdentity","get_session_token":"getSessionToken"},"params":{"action":{"oauthCredential":"credential"}}},"stt":{"namespace":"legacy.stt"},"stt_v2":{"namespace":"stt"},"supabase":{"namespace":"legacy.supabase","methods":{"count":"countRows","delete":"deleteARow","get_row":"getARow","insert":"createARow","introspect":"introspectSchema","invoke_function":"invokeEdgeFunction","query":"getManyRows","rpc":"callRpcFunction","storage_copy":"storageCopyFile","storage_create_bucket":"storageCreateBucket","storage_create_signed_upload_url":"storageCreateSignedUploadUrl","storage_create_signed_url":"storageCreateSignedUrl","storage_delete":"storageDeleteFiles","storage_delete_bucket":"storageDeleteBucket","storage_download":"storageDownloadFile","storage_empty_bucket":"storageEmptyBucket","storage_get_public_url":"storageGetPublicUrl","storage_list":"storageListFiles","storage_list_buckets":"storageListBuckets","storage_move":"storageMoveFile","storage_update_bucket":"storageUpdateBucket","storage_upload":"storageUploadFile","text_search":"fullTextSearch","update":"updateARow","upsert":"upsertARow","vector_search":"vectorSearch"}},"supabase_v2":{"namespace":"supabase","methods":{"count":"countRows","delete":"deleteARow","get_row":"getARow","insert":"createARow","introspect":"introspectSchema","invoke_function":"invokeEdgeFunction","query":"getManyRows","rpc":"callRpcFunction","storage_copy":"storageCopyFile","storage_create_bucket":"storageCreateBucket","storage_create_signed_upload_url":"storageCreateSignedUploadUrl","storage_create_signed_url":"storageCreateSignedUrl","storage_delete":"storageDeleteFiles","storage_delete_bucket":"storageDeleteBucket","storage_download":"storageDownloadFile","storage_empty_bucket":"storageEmptyBucket","storage_get_public_url":"storageGetPublicUrl","storage_list":"storageListFiles","storage_list_buckets":"storageListBuckets","storage_move":"storageMoveFile","storage_update_bucket":"storageUpdateBucket","storage_upload":"storageUploadFile","text_search":"fullTextSearch","update":"updateARow","upsert":"upsertARow","vector_search":"vectorSearch"},"params":{"action":{"oauthCredential":"credential"}}},"table":{"namespace":"legacy.table","methods":{"batch_insert_rows":"batchInsertRows","delete_row":"deleteRowById","delete_rows_by_filter":"deleteRowsByFilter","get_row":"getRowById","get_schema":"getSchema","insert_row":"insertRow","query_rows":"queryRows","update_row":"updateRowById","update_rows_by_filter":"updateRowsByFilter","upsert_row":"upsertRow"},"triggers":{"table_new_row":"newRow"}},"table_v2":{"namespace":"table","methods":{"batch_insert_rows":"batchInsertRows","delete_row":"deleteRowById","delete_rows_by_filter":"deleteRowsByFilter","get_row":"getRowById","get_schema":"getSchema","insert_row":"insertRow","query_rows":"queryRows","update_row":"updateRowById","update_rows_by_filter":"updateRowsByFilter","upsert_row":"upsertRow"},"triggers":{"table_new_row":"newRow"}},"tailscale":{"namespace":"legacy.tailscale","methods":{"approve_user":"approveUser","authorize_device":"authorizeDevice","create_auth_key":"createAuthKey","delete_auth_key":"deleteAuthKey","delete_device":"deleteDevice","delete_device_attribute":"deleteDeviceAttribute","delete_user":"deleteUser","expire_device_key":"expireDeviceKey","get_acl":"getAcl","get_auth_key":"getAuthKey","get_device":"getDevice","get_device_attributes":"getDeviceAttributes","get_device_routes":"getDeviceRoutes","get_dns_configuration":"getDnsConfiguration","get_dns_preferences":"getDnsPreferences","get_dns_searchpaths":"getDnsSearchPaths","get_split_dns":"getSplitDns","get_tailnet_settings":"getTailnetSettings","get_user":"getUser","list_auth_keys":"listKeys","list_devices":"listDevices","list_dns_nameservers":"listDnsNameservers","list_users":"listUsers","restore_user":"restoreUser","set_acl":"setAcl","set_device_attribute":"setDeviceAttribute","set_device_name":"setDeviceName","set_device_routes":"setDeviceRoutes","set_device_tags":"setDeviceTags","set_dns_configuration":"setDnsConfiguration","set_dns_nameservers":"setDnsNameservers","set_dns_preferences":"setDnsPreferences","set_dns_searchpaths":"setDnsSearchPaths","set_split_dns":"setSplitDns","set_user_role":"setUserRole","suspend_user":"suspendUser","update_device_key":"updateDeviceKey","update_split_dns":"updateSplitDns","update_tailnet_settings":"updateTailnetSettings","validate_acl":"validateAcl"}},"tailscale_v2":{"namespace":"tailscale","methods":{"approve_user":"approveUser","authorize_device":"authorizeDevice","create_auth_key":"createAuthKey","delete_auth_key":"deleteAuthKey","delete_device":"deleteDevice","delete_device_attribute":"deleteDeviceAttribute","delete_user":"deleteUser","expire_device_key":"expireDeviceKey","get_acl":"getAcl","get_auth_key":"getAuthKey","get_device":"getDevice","get_device_attributes":"getDeviceAttributes","get_device_routes":"getDeviceRoutes","get_dns_configuration":"getDnsConfiguration","get_dns_preferences":"getDnsPreferences","get_dns_searchpaths":"getDnsSearchPaths","get_split_dns":"getSplitDns","get_tailnet_settings":"getTailnetSettings","get_user":"getUser","list_auth_keys":"listKeys","list_devices":"listDevices","list_dns_nameservers":"listDnsNameservers","list_users":"listUsers","restore_user":"restoreUser","set_acl":"setAcl","set_device_attribute":"setDeviceAttribute","set_device_name":"setDeviceName","set_device_routes":"setDeviceRoutes","set_device_tags":"setDeviceTags","set_dns_configuration":"setDnsConfiguration","set_dns_nameservers":"setDnsNameservers","set_dns_preferences":"setDnsPreferences","set_dns_searchpaths":"setDnsSearchPaths","set_split_dns":"setSplitDns","set_user_role":"setUserRole","suspend_user":"suspendUser","update_device_key":"updateDeviceKey","update_split_dns":"updateSplitDns","update_tailnet_settings":"updateTailnetSettings","validate_acl":"validateAcl"},"params":{"action":{"oauthCredential":"credential"}}},"tavily":{"namespace":"legacy.tavily","methods":{"tavily_crawl":"crawlWebsite","tavily_extract":"extractContent","tavily_map":"mapWebsite","tavily_search":"search"}},"tavily_v2":{"namespace":"tavily","methods":{"tavily_crawl":"crawlWebsite","tavily_extract":"extractContent","tavily_map":"mapWebsite","tavily_search":"search"},"params":{"action":{"oauthCredential":"credential"}}},"telegram":{"namespace":"legacy.telegram","methods":{"telegram_copy_message":"copyMessage","telegram_delete_message":"deleteMessage","telegram_edit_message_text":"editMessageText","telegram_forward_message":"forwardMessage","telegram_get_chat":"getChat","telegram_get_chat_member":"getChatMember","telegram_message":"sendMessage","telegram_pin_message":"pinMessage","telegram_send_animation":"sendAnimation","telegram_send_audio":"sendAudio","telegram_send_chat_action":"sendChatAction","telegram_send_contact":"sendContact","telegram_send_document":"sendDocument","telegram_send_location":"sendLocation","telegram_send_photo":"sendPhoto","telegram_send_poll":"sendPoll","telegram_send_video":"sendVideo","telegram_set_message_reaction":"setMessageReaction","telegram_unpin_message":"unpinMessage"},"triggers":{"telegram_webhook":"webhook"}},"telegram_v2":{"namespace":"telegram","methods":{"telegram_copy_message":"copyMessage","telegram_delete_message":"deleteMessage","telegram_edit_message_text":"editMessageText","telegram_forward_message":"forwardMessage","telegram_get_chat":"getChat","telegram_get_chat_member":"getChatMember","telegram_message":"sendMessage","telegram_pin_message":"pinMessage","telegram_send_animation":"sendAnimation","telegram_send_audio":"sendAudio","telegram_send_chat_action":"sendChatAction","telegram_send_contact":"sendContact","telegram_send_document":"sendDocument","telegram_send_location":"sendLocation","telegram_send_photo":"sendPhoto","telegram_send_poll":"sendPoll","telegram_send_video":"sendVideo","telegram_set_message_reaction":"setMessageReaction","telegram_unpin_message":"unpinMessage"},"triggers":{"telegram_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"temporal":{"namespace":"temporal","methods":{"cancel_workflow":"cancelWorkflow","count_workflows":"countWorkflows","create_schedule":"createSchedule","delete_schedule":"deleteSchedule","describe_schedule":"describeSchedule","describe_task_queue":"describeTaskQueue","describe_workflow":"describeWorkflow","get_workflow_history":"getWorkflowHistory","list_schedules":"listSchedules","list_workflows":"listWorkflows","pause_schedule":"pauseSchedule","query_workflow":"queryWorkflow","reset_workflow":"resetWorkflow","signal_with_start":"signalWithStart","signal_workflow":"signalWorkflow","start_workflow":"startWorkflow","terminate_workflow":"terminateWorkflow","trigger_schedule":"triggerSchedule","unpause_schedule":"unpauseSchedule","update_workflow":"updateWorkflow"}},"textract":{"namespace":"legacy.textract"},"textract_v2":{"namespace":"legacy.textractV2","methods":{"analyze_document":"analyzeDocumentTextTablesForms","analyze_expense":"analyzeExpenseInvoicesReceipts","analyze_id":"analyzeIdentityDocument"}},"textract_v3":{"namespace":"textract","methods":{"analyze_document":"analyzeDocumentTextTablesForms","analyze_expense":"analyzeExpenseInvoicesReceipts","analyze_id":"analyzeIdentityDocument"},"params":{"action":{"oauthCredential":"credential"}}},"thinking":{"namespace":"legacy.thinking"},"thrive":{"namespace":"legacy.thrive","methods":{"add_audience_managers":"addAudienceManagers","add_audience_members":"addAudienceMembers","add_user_tags":"addUserTags","create_assignment":"createAssignment","create_audience":"createAudience","create_completion":"createCompletion","create_user":"createUser","delete_assignment":"deleteAssignment","delete_audience":"deleteAudience","delete_user":"deleteUser","get_activity":"getActivity","get_assignment":"getAssignment","get_audience":"getAudience","get_completion":"getCompletion","get_content":"getContent","get_cpd_category":"getCpdCategory","get_cpd_entry":"getCpdEntry","get_cpd_requirement":"getCpdRequirement","get_enrolment":"getEnrolment","get_skill_levels":"getSkillLevels","get_tag":"getTag","get_user_by_id":"getUserById","get_user_by_ref":"getUserByRef","list_assignments":"listAssignments","list_audience_managers":"listAudienceManagers","list_audience_members":"listAudienceMembers","list_audiences":"listAudiences","list_completions":"listCompletions","list_enrolments":"listEnrolments","list_tags":"listTags","query_activities":"queryActivities","query_content":"queryContent","query_cpd_categories":"queryCpdCategories","query_cpd_entries":"queryCpdEntries","query_cpd_requirements":"queryCpdRequirements","query_cpd_user_summaries":"queryCpdUserSummaries","remove_audience_manager":"removeAudienceManager","remove_audience_member":"removeAudienceMember","remove_user_tags":"removeUserTags","replace_audience_managers":"replaceAudienceManagers","replace_audience_members":"replaceAudienceMembers","search_users":"searchUsers","suspend_user":"suspendUser","update_assignment":"updateAssignment","update_audience":"updateAudience","update_user":"updateUser","update_user_skills":"updateUserSkills"}},"thrive_v2":{"namespace":"thrive","methods":{"add_audience_managers":"addAudienceManagers","add_audience_members":"addAudienceMembers","add_user_tags":"addUserTags","create_assignment":"createAssignment","create_audience":"createAudience","create_completion":"createCompletion","create_user":"createUser","delete_assignment":"deleteAssignment","delete_audience":"deleteAudience","delete_user":"deleteUser","get_activity":"getActivity","get_assignment":"getAssignment","get_audience":"getAudience","get_completion":"getCompletion","get_content":"getContent","get_cpd_category":"getCpdCategory","get_cpd_entry":"getCpdEntry","get_cpd_requirement":"getCpdRequirement","get_enrolment":"getEnrolment","get_skill_levels":"getSkillLevels","get_tag":"getTag","get_user_by_id":"getUserById","get_user_by_ref":"getUserByRef","list_assignments":"listAssignments","list_audience_managers":"listAudienceManagers","list_audience_members":"listAudienceMembers","list_audiences":"listAudiences","list_completions":"listCompletions","list_enrolments":"listEnrolments","list_tags":"listTags","query_activities":"queryActivities","query_content":"queryContent","query_cpd_categories":"queryCpdCategories","query_cpd_entries":"queryCpdEntries","query_cpd_requirements":"queryCpdRequirements","query_cpd_user_summaries":"queryCpdUserSummaries","remove_audience_manager":"removeAudienceManager","remove_audience_member":"removeAudienceMember","remove_user_tags":"removeUserTags","replace_audience_managers":"replaceAudienceManagers","replace_audience_members":"replaceAudienceMembers","search_users":"searchUsers","suspend_user":"suspendUser","update_assignment":"updateAssignment","update_audience":"updateAudience","update_user":"updateUser","update_user_skills":"updateUserSkills"},"params":{"action":{"oauthCredential":"credential"}}},"tiktok":{"namespace":"tiktok","methods":{"tiktok_get_post_status":"getPostStatus","tiktok_get_user":"getUserInfo","tiktok_list_videos":"listVideos","tiktok_query_videos":"queryVideos","tiktok_upload_video_draft":"uploadVideoDraft"},"triggers":{"tiktok_authorization_removed":"authorizationRemoved","tiktok_post_inbox_delivered":"postInboxDelivered","tiktok_post_no_longer_public":"postNoLongerPublic","tiktok_post_publicly_available":"postPubliclyAvailable","tiktok_post_publish_complete":"postPublishComplete","tiktok_post_publish_failed":"postPublishFailed"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"tinybird":{"namespace":"legacy.tinybird","methods":{"tinybird_append_datasource":"appendDataSourceFromUrl","tinybird_delete_datasource_rows":"deleteDataSourceRows","tinybird_events":"sendEvents","tinybird_get_job":"getJobStatus","tinybird_query":"query","tinybird_query_pipe":"queryPipeEndpoint","tinybird_truncate_datasource":"truncateDataSource"}},"tinybird_v2":{"namespace":"tinybird","methods":{"tinybird_append_datasource":"appendDataSourceFromUrl","tinybird_delete_datasource_rows":"deleteDataSourceRows","tinybird_events":"sendEvents","tinybird_get_job":"getJobStatus","tinybird_query":"query","tinybird_query_pipe":"queryPipeEndpoint","tinybird_truncate_datasource":"truncateDataSource"},"params":{"action":{"oauthCredential":"credential"}}},"tinyfish":{"namespace":"tinyfish","methods":{"tinyfish_cancel_run":"cancelRun","tinyfish_fetch":"fetchUrls","tinyfish_get_run":"getRun","tinyfish_list_profiles":"listBrowserProfiles","tinyfish_list_runs":"listRuns","tinyfish_list_vault_items":"listVaultItems","tinyfish_run":"runAgent","tinyfish_run_async":"startAgentRun","tinyfish_search":"search"}},"translate":{"namespace":"translate"},"trello":{"namespace":"trello","methods":{"trello_add_checklist":"addChecklist","trello_add_checklist_item":"addChecklistItem","trello_add_comment":"addComment","trello_add_label":"addLabel","trello_add_member":"addMember","trello_create_board":"createBoard","trello_create_card":"createCard","trello_create_list":"createList","trello_delete_card":"deleteCard","trello_get_actions":"getActions","trello_get_board":"getBoard","trello_get_card":"getCard","trello_list_cards":"listCards","trello_list_lists":"getLists","trello_list_members":"listMembers","trello_remove_label":"removeLabel","trello_remove_member":"removeMember","trello_search":"search","trello_update_card":"updateCard","trello_update_checklist_item":"updateChecklistItem","trello_update_list":"updateList"},"params":{"action":{"oauthCredential":"credential"}}},"trigger_dev":{"namespace":"legacy.triggerDev","methods":{"trigger_dev_activate_schedule":"activateSchedule","trigger_dev_add_run_tags":"addRunTags","trigger_dev_batch_trigger_task":"batchTriggerTask","trigger_dev_cancel_run":"cancelRun","trigger_dev_complete_waitpoint_token":"completeWaitpointToken","trigger_dev_create_env_var":"createEnvVar","trigger_dev_create_schedule":"createSchedule","trigger_dev_create_waitpoint_token":"createWaitpointToken","trigger_dev_deactivate_schedule":"deactivateSchedule","trigger_dev_delete_env_var":"deleteEnvVar","trigger_dev_delete_schedule":"deleteSchedule","trigger_dev_execute_query":"executeQuery","trigger_dev_get_batch":"getBatch","trigger_dev_get_batch_results":"getBatchResults","trigger_dev_get_deployment":"getDeployment","trigger_dev_get_env_var":"getEnvVar","trigger_dev_get_latest_deployment":"getLatestDeployment","trigger_dev_get_query_schema":"getQuerySchema","trigger_dev_get_queue":"getQueue","trigger_dev_get_run":"getRun","trigger_dev_get_run_events":"getRunEvents","trigger_dev_get_run_result":"getRunResult","trigger_dev_get_run_trace":"getRunTrace","trigger_dev_get_schedule":"getSchedule","trigger_dev_get_waitpoint_token":"getWaitpointToken","trigger_dev_import_env_vars":"importEnvVars","trigger_dev_list_deployments":"listDeployments","trigger_dev_list_env_vars":"listEnvVars","trigger_dev_list_queues":"listQueues","trigger_dev_list_runs":"listRuns","trigger_dev_list_schedules":"listSchedules","trigger_dev_list_timezones":"listTimezones","trigger_dev_list_waitpoint_tokens":"listWaitpointTokens","trigger_dev_override_queue_concurrency":"overrideQueueConcurrency","trigger_dev_pause_queue":"pauseQueue","trigger_dev_promote_deployment":"promoteDeployment","trigger_dev_replay_run":"replayRun","trigger_dev_reschedule_run":"rescheduleRun","trigger_dev_reset_queue_concurrency":"resetQueueConcurrency","trigger_dev_resume_queue":"resumeQueue","trigger_dev_trigger_task":"triggerTask","trigger_dev_update_env_var":"updateEnvVar","trigger_dev_update_run_metadata":"updateRunMetadata","trigger_dev_update_schedule":"updateSchedule"}},"trigger_dev_v2":{"namespace":"triggerDev","methods":{"trigger_dev_activate_schedule":"activateSchedule","trigger_dev_add_run_tags":"addRunTags","trigger_dev_batch_trigger_task":"batchTriggerTask","trigger_dev_cancel_run":"cancelRun","trigger_dev_complete_waitpoint_token":"completeWaitpointToken","trigger_dev_create_env_var":"createEnvVar","trigger_dev_create_schedule":"createSchedule","trigger_dev_create_waitpoint_token":"createWaitpointToken","trigger_dev_deactivate_schedule":"deactivateSchedule","trigger_dev_delete_env_var":"deleteEnvVar","trigger_dev_delete_schedule":"deleteSchedule","trigger_dev_execute_query":"executeQuery","trigger_dev_get_batch":"getBatch","trigger_dev_get_batch_results":"getBatchResults","trigger_dev_get_deployment":"getDeployment","trigger_dev_get_env_var":"getEnvVar","trigger_dev_get_latest_deployment":"getLatestDeployment","trigger_dev_get_query_schema":"getQuerySchema","trigger_dev_get_queue":"getQueue","trigger_dev_get_run":"getRun","trigger_dev_get_run_events":"getRunEvents","trigger_dev_get_run_result":"getRunResult","trigger_dev_get_run_trace":"getRunTrace","trigger_dev_get_schedule":"getSchedule","trigger_dev_get_waitpoint_token":"getWaitpointToken","trigger_dev_import_env_vars":"importEnvVars","trigger_dev_list_deployments":"listDeployments","trigger_dev_list_env_vars":"listEnvVars","trigger_dev_list_queues":"listQueues","trigger_dev_list_runs":"listRuns","trigger_dev_list_schedules":"listSchedules","trigger_dev_list_timezones":"listTimezones","trigger_dev_list_waitpoint_tokens":"listWaitpointTokens","trigger_dev_override_queue_concurrency":"overrideQueueConcurrency","trigger_dev_pause_queue":"pauseQueue","trigger_dev_promote_deployment":"promoteDeployment","trigger_dev_replay_run":"replayRun","trigger_dev_reschedule_run":"rescheduleRun","trigger_dev_reset_queue_concurrency":"resetQueueConcurrency","trigger_dev_resume_queue":"resumeQueue","trigger_dev_trigger_task":"triggerTask","trigger_dev_update_env_var":"updateEnvVar","trigger_dev_update_run_metadata":"updateRunMetadata","trigger_dev_update_schedule":"updateSchedule"},"params":{"action":{"oauthCredential":"credential"}}},"tts":{"namespace":"tts"},"twilio_sms":{"namespace":"legacy.twilioSms","triggers":{"twilio_sms_received":"received","twilio_sms_status":"status"}},"twilio_sms_v2":{"namespace":"twilioSms","triggers":{"twilio_sms_received":"received","twilio_sms_status":"status"},"params":{"action":{"oauthCredential":"credential"}}},"twilio_voice":{"namespace":"legacy.twilioVoice","methods":{"get_recording":"getRecording","list_calls":"listCalls","make_call":"makeCall"},"triggers":{"twilio_voice_webhook":"webhook"}},"twilio_voice_v2":{"namespace":"twilioVoice","methods":{"get_recording":"getRecording","list_calls":"listCalls","make_call":"makeCall"},"triggers":{"twilio_voice_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"typeform":{"namespace":"legacy.typeform","methods":{"typeform_create_form":"createForm","typeform_delete_form":"deleteForm","typeform_files":"downloadFile","typeform_get_form":"getFormDetails","typeform_insights":"formInsights","typeform_list_forms":"listForms","typeform_responses":"retrieveResponses","typeform_update_form":"updateForm"},"triggers":{"typeform_webhook":"webhook"}},"typeform_v2":{"namespace":"typeform","methods":{"typeform_create_form":"createForm","typeform_delete_form":"deleteForm","typeform_files":"downloadFile","typeform_get_form":"getFormDetails","typeform_insights":"formInsights","typeform_list_forms":"listForms","typeform_responses":"retrieveResponses","typeform_update_form":"updateForm"},"triggers":{"typeform_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"upstash":{"namespace":"legacy.upstash","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","lpush":"lpush","lrange":"lrange","set":"set","setnx":"setnx","ttl":"ttl"}},"upstash_v2":{"namespace":"upstash","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","lpush":"lpush","lrange":"lrange","set":"set","setnx":"setnx","ttl":"ttl"},"params":{"action":{"oauthCredential":"credential"}}},"uptimerobot":{"namespace":"legacy.uptimerobot","methods":{"create_alert_contact":"createAlertContact","create_maintenance_window":"createMaintenanceWindow","create_monitor":"createMonitor","create_psp":"createStatusPage","delete_alert_contact":"deleteAlertContact","delete_maintenance_window":"deleteMaintenanceWindow","delete_monitor":"deleteMonitor","delete_psp":"deleteStatusPage","get_account":"getAccount","get_alert_contact":"getAlertContact","get_incident":"getIncident","get_maintenance_window":"getMaintenanceWindow","get_monitor":"getMonitor","get_psp":"getStatusPage","list_alert_contacts":"listAlertContacts","list_incidents":"listIncidents","list_maintenance_windows":"listMaintenanceWindows","list_monitors":"listMonitors","list_psps":"listStatusPages","pause_monitor":"pauseMonitor","start_monitor":"startMonitor","update_maintenance_window":"updateMaintenanceWindow","update_monitor":"updateMonitor","update_psp":"updateStatusPage"}},"uptimerobot_v2":{"namespace":"uptimerobot","methods":{"create_alert_contact":"createAlertContact","create_maintenance_window":"createMaintenanceWindow","create_monitor":"createMonitor","create_psp":"createStatusPage","delete_alert_contact":"deleteAlertContact","delete_maintenance_window":"deleteMaintenanceWindow","delete_monitor":"deleteMonitor","delete_psp":"deleteStatusPage","get_account":"getAccount","get_alert_contact":"getAlertContact","get_incident":"getIncident","get_maintenance_window":"getMaintenanceWindow","get_monitor":"getMonitor","get_psp":"getStatusPage","list_alert_contacts":"listAlertContacts","list_incidents":"listIncidents","list_maintenance_windows":"listMaintenanceWindows","list_monitors":"listMonitors","list_psps":"listStatusPages","pause_monitor":"pauseMonitor","start_monitor":"startMonitor","update_maintenance_window":"updateMaintenanceWindow","update_monitor":"updateMonitor","update_psp":"updateStatusPage"},"params":{"action":{"oauthCredential":"credential"}}},"vanta":{"namespace":"vanta","methods":{"download_document_file":"downloadDocumentFile","get_control":"getControl","get_document":"getDocument","get_framework":"getFramework","get_person":"getPerson","get_policy":"getPolicy","get_risk_scenario":"getRiskScenario","get_test":"getTest","get_vendor":"getVendor","get_vulnerable_asset":"getVulnerableAsset","list_control_documents":"listControlDocuments","list_control_tests":"listControlTests","list_controls":"listControls","list_document_uploads":"listDocumentUploads","list_documents":"listDocuments","list_framework_controls":"listFrameworkControls","list_frameworks":"listFrameworks","list_monitored_computers":"listMonitoredComputers","list_people":"listPeople","list_policies":"listPolicies","list_risk_scenarios":"listRiskScenarios","list_test_entities":"listTestEntities","list_tests":"listTests","list_vendors":"listVendors","list_vulnerabilities":"listVulnerabilities","list_vulnerability_remediations":"listVulnerabilityRemediations","list_vulnerable_assets":"listVulnerableAssets","submit_document":"submitDocument","upload_document_file":"uploadDocumentFile"},"params":{"action":{"oauthCredential":"credential"}}},"variables":{"namespace":"setVariables"},"vercel":{"namespace":"legacy.vercel","methods":{"add_domain":"addDomain","add_project_domain":"addProjectDomain","cancel_deployment":"cancelDeployment","create_alias":"createAlias","create_check":"createCheck","create_deployment":"createDeployment","create_dns_record":"createDnsRecord","create_edge_config":"createEdgeConfig","create_env_var":"createEnvironmentVariable","create_project":"createProject","create_webhook":"createWebhook","delete_alias":"deleteAlias","delete_deployment":"deleteDeployment","delete_dns_record":"deleteDnsRecord","delete_domain":"deleteDomain","delete_edge_config":"deleteEdgeConfig","delete_env_var":"deleteEnvironmentVariable","delete_project":"deleteProject","delete_webhook":"deleteWebhook","get_alias":"getAlias","get_check":"getCheck","get_deployment":"getDeployment","get_deployment_events":"getDeploymentLogs","get_domain":"getDomain","get_domain_config":"getDomainConfig","get_edge_config":"getEdgeConfig","get_edge_config_items":"getEdgeConfigItems","get_env_vars":"getEnvironmentVariables","get_project":"getProject","get_team":"getTeam","get_user":"getUser","get_webhook":"getWebhook","list_aliases":"listAliases","list_checks":"listChecks","list_deployment_files":"listDeploymentFiles","list_deployments":"listDeployments","list_dns_records":"listDnsRecords","list_domains":"listDomains","list_edge_configs":"listEdgeConfigs","list_project_domains":"listProjectDomains","list_projects":"listProjects","list_team_members":"listTeamMembers","list_teams":"listTeams","list_webhooks":"listWebhooks","pause_project":"pauseProject","promote_deployment":"promoteDeployment","remove_project_domain":"removeProjectDomain","rerequest_check":"rerequestCheck","unpause_project":"unpauseProject","update_check":"updateCheck","update_dns_record":"updateDnsRecord","update_edge_config_items":"updateEdgeConfigItems","update_env_var":"updateEnvironmentVariable","update_project":"updateProject","update_project_domain":"updateProjectDomain","verify_project_domain":"verifyProjectDomain"},"triggers":{"vercel_deployment_canceled":"deploymentCanceled","vercel_deployment_created":"deploymentCreated","vercel_deployment_error":"deploymentError","vercel_deployment_ready":"deploymentReady","vercel_domain_created":"domainCreated","vercel_project_created":"projectCreated","vercel_project_removed":"projectRemoved","vercel_webhook":"webhook"}},"vercel_v2":{"namespace":"vercel","methods":{"add_domain":"addDomain","add_project_domain":"addProjectDomain","cancel_deployment":"cancelDeployment","create_alias":"createAlias","create_check":"createCheck","create_deployment":"createDeployment","create_dns_record":"createDnsRecord","create_edge_config":"createEdgeConfig","create_env_var":"createEnvironmentVariable","create_project":"createProject","create_webhook":"createWebhook","delete_alias":"deleteAlias","delete_deployment":"deleteDeployment","delete_dns_record":"deleteDnsRecord","delete_domain":"deleteDomain","delete_edge_config":"deleteEdgeConfig","delete_env_var":"deleteEnvironmentVariable","delete_project":"deleteProject","delete_webhook":"deleteWebhook","get_alias":"getAlias","get_check":"getCheck","get_deployment":"getDeployment","get_deployment_events":"getDeploymentLogs","get_domain":"getDomain","get_domain_config":"getDomainConfig","get_edge_config":"getEdgeConfig","get_edge_config_items":"getEdgeConfigItems","get_env_vars":"getEnvironmentVariables","get_project":"getProject","get_team":"getTeam","get_user":"getUser","get_webhook":"getWebhook","list_aliases":"listAliases","list_checks":"listChecks","list_deployment_files":"listDeploymentFiles","list_deployments":"listDeployments","list_dns_records":"listDnsRecords","list_domains":"listDomains","list_edge_configs":"listEdgeConfigs","list_project_domains":"listProjectDomains","list_projects":"listProjects","list_team_members":"listTeamMembers","list_teams":"listTeams","list_webhooks":"listWebhooks","pause_project":"pauseProject","promote_deployment":"promoteDeployment","remove_project_domain":"removeProjectDomain","rerequest_check":"rerequestCheck","unpause_project":"unpauseProject","update_check":"updateCheck","update_dns_record":"updateDnsRecord","update_edge_config_items":"updateEdgeConfigItems","update_env_var":"updateEnvironmentVariable","update_project":"updateProject","update_project_domain":"updateProjectDomain","verify_project_domain":"verifyProjectDomain"},"triggers":{"vercel_deployment_canceled":"deploymentCanceled","vercel_deployment_created":"deploymentCreated","vercel_deployment_error":"deploymentError","vercel_deployment_ready":"deploymentReady","vercel_domain_created":"domainCreated","vercel_project_created":"projectCreated","vercel_project_removed":"projectRemoved","vercel_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"video_generator":{"namespace":"legacy.videoGenerator"},"video_generator_v2":{"namespace":"legacy.videoGeneratorV2"},"video_generator_v3":{"namespace":"videoGenerator"},"vision":{"namespace":"legacy.vision"},"vision_v2":{"namespace":"legacy.visionV2"},"wait":{"namespace":"wait"},"wealthbox":{"namespace":"wealthbox","methods":{"read_contact":"readContact","read_note":"readNote","read_task":"readTask","write_contact":"writeContact","write_note":"writeNote","write_task":"writeTask"},"params":{"action":{"oauthCredential":"credential"}}},"webflow":{"namespace":"webflow","methods":{"create":"createItem","delete":"deleteItem","get":"getItem","list":"listItems","update":"updateItem"},"triggers":{"webflow_collection_item_changed":"collectionItemChanged","webflow_collection_item_created":"collectionItemCreated","webflow_collection_item_deleted":"collectionItemDeleted","webflow_form_submission":"formSubmission"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"webhook_request":{"namespace":"webhookRequest"},"whatsapp":{"namespace":"legacy.whatsapp","methods":{"get_media":"downloadMedia","mark_read":"markAsRead","send_interactive":"sendInteractive","send_media":"sendMedia","send_message":"sendMessage","send_reaction":"sendReaction","send_template":"sendTemplate","upload_media":"uploadMedia"},"triggers":{"whatsapp_webhook":"webhook"}},"whatsapp_v2":{"namespace":"whatsapp","methods":{"get_media":"downloadMedia","mark_read":"markAsRead","send_interactive":"sendInteractive","send_media":"sendMedia","send_message":"sendMessage","send_reaction":"sendReaction","send_template":"sendTemplate","upload_media":"uploadMedia"},"triggers":{"whatsapp_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"wikipedia":{"namespace":"wikipedia","methods":{"wikipedia_content":"getPageContent","wikipedia_random":"randomPage","wikipedia_search":"searchPages","wikipedia_summary":"getPageSummary"}},"windchill":{"namespace":"windchill","methods":{"windchill_check_in_document":"checkInDocument","windchill_check_in_documents":"checkInDocuments","windchill_check_out_document":"checkOutDocument","windchill_check_out_documents":"checkOutDocuments","windchill_create_document":"createDocument","windchill_create_documents":"createDocuments","windchill_delete_document":"deleteDocument","windchill_delete_documents":"deleteDocuments","windchill_download_attachment":"downloadAttachment","windchill_download_primary_content":"downloadPrimaryContent","windchill_get_document":"getDocument","windchill_get_document_structure":"getDocumentStructure","windchill_get_primary_content":"getPrimaryContent","windchill_get_valid_state_transitions":"getValidStateTransitions","windchill_list_attachments":"listAttachments","windchill_list_documents":"listDocuments","windchill_revise_document":"reviseDocument","windchill_revise_documents":"reviseDocuments","windchill_set_lifecycle_state":"setLifecycleState","windchill_undo_check_out_document":"undoCheckOutDocument","windchill_undo_check_out_documents":"undoCheckOutDocuments","windchill_update_common_properties":"updateCommonProperties","windchill_update_document":"updateDocument","windchill_update_document_security_labels":"updateDocumentSecurityLabels","windchill_update_documents":"updateDocuments","windchill_upload_attachments":"uploadAttachments","windchill_upload_primary_content":"uploadPrimaryContent"}},"wiza":{"namespace":"wiza","methods":{"company_enrichment":"companyEnrichment","get_credits":"getCredits","individual_reveal":"individualReveal","prospect_search":"prospectSearch"}},"wordpress":{"namespace":"wordpress","methods":{"wordpress_create_category":"createCategory","wordpress_create_comment":"createComment","wordpress_create_page":"createPage","wordpress_create_post":"createPost","wordpress_create_tag":"createTag","wordpress_delete_category":"deleteCategory","wordpress_delete_comment":"deleteComment","wordpress_delete_media":"deleteMedia","wordpress_delete_page":"deletePage","wordpress_delete_post":"deletePost","wordpress_delete_tag":"deleteTag","wordpress_get_category":"getCategory","wordpress_get_current_user":"getCurrentUser","wordpress_get_media":"getMedia","wordpress_get_page":"getPage","wordpress_get_post":"getPost","wordpress_get_tag":"getTag","wordpress_get_user":"getUser","wordpress_list_categories":"listCategories","wordpress_list_comments":"listComments","wordpress_list_media":"listMedia","wordpress_list_pages":"listPages","wordpress_list_posts":"listPosts","wordpress_list_tags":"listTags","wordpress_list_users":"listUsers","wordpress_search_content":"searchContent","wordpress_update_category":"updateCategory","wordpress_update_comment":"updateComment","wordpress_update_page":"updatePage","wordpress_update_post":"updatePost","wordpress_update_tag":"updateTag","wordpress_upload_media":"uploadMedia"},"params":{"action":{"oauthCredential":"credential"}}},"workday":{"namespace":"workday","methods":{"assign_onboarding":"assignOnboardingPlan","change_job":"changeJob","create_prehire":"createPreHire","get_compensation":"getCompensation","get_organizations":"getOrganizations","get_worker":"getWorker","hire_employee":"hireEmployee","list_workers":"listWorkers","terminate_worker":"terminateWorker","update_worker":"updatePersonalInformation"}},"workflow":{"namespace":"legacy.workflow"},"workflow_input":{"namespace":"runWorkflow"},"x":{"namespace":"x","methods":{"x_create_bookmark":"createBookmark","x_create_tweet":"createTweet","x_delete_bookmark":"deleteBookmark","x_delete_tweet":"deleteTweet","x_get_blocking":"getBlockedUsers","x_get_bookmarks":"getBookmarks","x_get_followers":"getFollowers","x_get_following":"getFollowing","x_get_liked_tweets":"getLikedTweets","x_get_liking_users":"getLikingUsers","x_get_me":"getMyProfile","x_get_personalized_trends":"getPersonalizedTrends","x_get_quote_tweets":"getQuoteTweets","x_get_retweeted_by":"getRetweetedBy","x_get_trends_by_woeid":"getTrendsByLocation","x_get_tweets_by_ids":"getTweetsByIds","x_get_usage":"getApiUsage","x_get_user_mentions":"getUserMentions","x_get_user_timeline":"getUserTimeline","x_get_user_tweets":"getUserTweets","x_hide_reply":"hideReply","x_manage_block":"blockUnblock","x_manage_follow":"followUnfollow","x_manage_like":"likeUnlike","x_manage_mute":"muteUnmute","x_manage_retweet":"retweetUnretweet","x_search_tweets":"searchTweets","x_search_users":"searchUsers"},"params":{"action":{"oauthCredential":"credential"}}},"youcom":{"namespace":"legacy.youcom","methods":{"youcom_answer":"answer","youcom_finance_research":"financeResearch","youcom_get_account_balance":"getAccountBalance","youcom_get_contents":"getContents","youcom_get_research_task":"getResearchTask","youcom_research":"research","youcom_search":"search","youcom_search_images":"searchImages"}},"youcom_v2":{"namespace":"youcom","methods":{"youcom_answer":"answer","youcom_finance_research":"financeResearch","youcom_get_account_balance":"getAccountBalance","youcom_get_contents":"getContents","youcom_get_research_task":"getResearchTask","youcom_research":"research","youcom_search":"search","youcom_search_images":"searchImages"},"params":{"action":{"oauthCredential":"credential"}}},"youtube":{"namespace":"legacy.youtube","methods":{"youtube_channel_info":"getChannelInfo","youtube_channel_playlists":"getChannelPlaylists","youtube_channel_videos":"getChannelVideos","youtube_comments":"getVideoComments","youtube_playlist_items":"getPlaylistItems","youtube_search":"searchVideos","youtube_trending":"getTrendingVideos","youtube_video_categories":"getVideoCategories","youtube_video_details":"getVideoDetails"}},"youtube_v2":{"namespace":"youtube","methods":{"youtube_channel_info":"getChannelInfo","youtube_channel_playlists":"getChannelPlaylists","youtube_channel_videos":"getChannelVideos","youtube_comments":"getVideoComments","youtube_playlist_items":"getPlaylistItems","youtube_search":"searchVideos","youtube_trending":"getTrendingVideos","youtube_video_categories":"getVideoCategories","youtube_video_details":"getVideoDetails"},"params":{"action":{"oauthCredential":"credential"}}},"zendesk":{"namespace":"legacy.zendesk","methods":{"autocomplete_organizations":"autocompleteOrganizations","create_organization":"createOrganization","create_organizations_bulk":"createOrganizationsBulk","create_ticket":"createTicket","create_tickets_bulk":"createTicketsBulk","create_user":"createUser","create_users_bulk":"createUsersBulk","delete_organization":"deleteOrganization","delete_ticket":"deleteTicket","delete_user":"deleteUser","get_current_user":"getCurrentUser","get_organization":"getOrganization","get_organizations":"getOrganizations","get_ticket":"getTicket","get_tickets":"getTickets","get_user":"getUser","get_users":"getUsers","merge_tickets":"mergeTickets","search":"search","search_count":"searchCount","search_users":"searchUsers","update_organization":"updateOrganization","update_ticket":"updateTicket","update_tickets_bulk":"updateTicketsBulk","update_user":"updateUser","update_users_bulk":"updateUsersBulk"},"triggers":{"zendesk_ticket_comment_added":"ticketCommentAdded","zendesk_ticket_created":"ticketCreated","zendesk_ticket_priority_changed":"ticketPriorityChanged","zendesk_ticket_status_changed":"ticketStatusChanged","zendesk_webhook":"webhook"}},"zendesk_v2":{"namespace":"zendesk","methods":{"autocomplete_organizations":"autocompleteOrganizations","create_organization":"createOrganization","create_organizations_bulk":"createOrganizationsBulk","create_ticket":"createTicket","create_tickets_bulk":"createTicketsBulk","create_user":"createUser","create_users_bulk":"createUsersBulk","delete_organization":"deleteOrganization","delete_ticket":"deleteTicket","delete_user":"deleteUser","get_current_user":"getCurrentUser","get_organization":"getOrganization","get_organizations":"getOrganizations","get_ticket":"getTicket","get_tickets":"getTickets","get_user":"getUser","get_users":"getUsers","merge_tickets":"mergeTickets","search":"search","search_count":"searchCount","search_users":"searchUsers","update_organization":"updateOrganization","update_ticket":"updateTicket","update_tickets_bulk":"updateTicketsBulk","update_user":"updateUser","update_users_bulk":"updateUsersBulk"},"triggers":{"zendesk_ticket_comment_added":"ticketCommentAdded","zendesk_ticket_created":"ticketCreated","zendesk_ticket_priority_changed":"ticketPriorityChanged","zendesk_ticket_status_changed":"ticketStatusChanged","zendesk_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"zep":{"namespace":"legacy.zep","methods":{"add_messages":"addMessages","add_user":"addUser","create_thread":"createThread","delete_thread":"deleteThread","get_context":"getContext","get_messages":"getMessages","get_threads":"getThreads","get_user":"getUser","get_user_threads":"getUserThreads"}},"zep_v2":{"namespace":"zep","methods":{"add_messages":"addMessages","add_user":"addUser","create_thread":"createThread","delete_thread":"deleteThread","get_context":"getContext","get_messages":"getMessages","get_threads":"getThreads","get_user":"getUser","get_user_threads":"getUserThreads"},"params":{"action":{"oauthCredential":"credential"}}},"zerobounce":{"namespace":"zerobounce","methods":{"zerobounce_get_credits":"getRemainingCredits","zerobounce_verify_email":"verifyEmail"}},"zoho_desk":{"namespace":"zohoDesk","methods":{"add_comment":"addComment","create_account":"createAccount","create_contact":"createContact","create_ticket":"createTicket","delete_comment":"deleteComment","get_account":"getAccount","get_agent":"getAgent","get_attachment":"getAttachment","get_comment":"getComment","get_contact":"getContact","get_department":"getDepartment","get_thread":"getThread","get_ticket":"getTicket","list_accounts":"listAccounts","list_agents":"listAgents","list_comments":"listComments","list_contacts":"listContacts","list_departments":"listDepartments","list_organizations":"listOrganizations","list_threads":"listThreads","list_tickets":"listTickets","move_ticket":"moveTicket","search_accounts":"searchAccounts","search_contacts":"searchContacts","search_tickets":"searchTickets","send_reply":"sendReply","update_account":"updateAccount","update_comment":"updateComment","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"zoho_desk":"zohoDesk"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"zoom":{"namespace":"zoom","methods":{"zoom_create_meeting":"createMeeting","zoom_delete_meeting":"deleteMeeting","zoom_delete_recording":"deleteRecording","zoom_get_meeting":"getMeeting","zoom_get_meeting_invitation":"getMeetingInvitation","zoom_get_meeting_recordings":"getMeetingRecordings","zoom_list_meetings":"listMeetings","zoom_list_past_participants":"listPastParticipants","zoom_list_recordings":"listRecordings","zoom_update_meeting":"updateMeeting"},"triggers":{"zoom_meeting_ended":"meetingEnded","zoom_meeting_started":"meetingStarted","zoom_participant_joined":"participantJoined","zoom_participant_left":"participantLeft","zoom_recording_completed":"recordingCompleted","zoom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"zoominfo":{"namespace":"legacy.zoominfo","methods":{"enrich_companies":"enrichCompanies","enrich_contacts":"enrichContacts","search_companies":"searchCompanies","search_contacts":"searchContacts","search_intent":"searchIntent","search_news":"searchNews"}},"zoominfo_v2":{"namespace":"zoominfo","methods":{"enrich_companies":"enrichCompanies","enrich_contacts":"enrichContacts","search_companies":"searchCompanies","search_contacts":"searchContacts","search_intent":"searchIntent","search_news":"searchNews"},"params":{"action":{"oauthCredential":"credential"}}}}}' ) diff --git a/apps/sim/blocks/sdk-names.json b/apps/sim/blocks/sdk-names.json index 4509e5daec1..c0f20ee0318 100644 --- a/apps/sim/blocks/sdk-names.json +++ b/apps/sim/blocks/sdk-names.json @@ -4199,10 +4199,7 @@ } }, "generic_webhook": { - "namespace": "genericWebhook", - "triggers": { - "generic_webhook": "webhook" - } + "namespace": "trigger.webhook" }, "github": { "namespace": "legacy.github", @@ -6043,10 +6040,7 @@ "namespace": "imageGenerator" }, "imap": { - "namespace": "imap", - "triggers": { - "imap_poller": "poller" - } + "namespace": "trigger.imap" }, "incidentio": { "namespace": "legacy.incidentio", @@ -10692,10 +10686,7 @@ "namespace": "router" }, "rss": { - "namespace": "rss", - "triggers": { - "rss_poller": "poller" - } + "namespace": "trigger.rss" }, "s3": { "namespace": "legacy.s3", @@ -11006,7 +10997,7 @@ } }, "schedule": { - "namespace": "schedule" + "namespace": "trigger.schedule" }, "search": { "namespace": "search" @@ -11526,10 +11517,7 @@ } }, "sim_workspace_event": { - "namespace": "simWorkspaceEvent", - "triggers": { - "sim_workspace_event": "workspaceEvent" - } + "namespace": "trigger.simWorkspaceEvent" }, "similarweb": { "namespace": "legacy.similarweb", @@ -12725,7 +12713,7 @@ } }, "start_trigger": { - "namespace": "startTrigger" + "namespace": "trigger.start" }, "starter": { "namespace": "legacy.starter" diff --git a/apps/sim/lib/workflows/code/catalog/build.ts b/apps/sim/lib/workflows/code/catalog/build.ts index 6752a299dbc..4156261d31e 100644 --- a/apps/sim/lib/workflows/code/catalog/build.ts +++ b/apps/sim/lib/workflows/code/catalog/build.ts @@ -117,8 +117,9 @@ function addBuilder( /** * Builder entries for one block from its frozen names: one per operation (`slack.sendMessage`), * or the bare namespace for a block without an operation dropdown, plus one per trigger - * (`trigger.gmail.poller`) pinning `selectedTriggerId` where the block stores it. A block with no - * names entry gets none; the SDK's generic `block(type, …)` builder reaches it. + * (`trigger.gmail.poller`) pinning `selectedTriggerId` where the block stores it. A trigger block + * (`category: 'triggers'`) is its own trigger: its namespace already sits under `trigger.`. A block + * with no names entry gets none; the SDK's generic `block(type, …)` builder reaches it. */ function addBlockBuilders( builders: Record, @@ -140,7 +141,7 @@ function addBlockBuilders( } else { addBuilder(builders, namespace, { type: block.type }) } - if (!block.triggers?.enabled || !triggerMethods) return + if (!block.triggers?.enabled || !triggerMethods || block.category === 'triggers') return const pinsTrigger = block.subBlocks.some((subBlock) => subBlock.id === 'selectedTriggerId') for (const triggerId of block.triggers.available) { const method = triggerMethods[triggerId] @@ -202,10 +203,9 @@ export function buildBlockCatalog( if (block.triggers?.enabled) for (const id of block.triggers.available) triggerIds.add(id) } - for (const type of ['loop', 'parallel'] as const) { - blocks.push([type, containerBlock(type)]) - addBuilder(builders, type, { type }) - } + // `core.d.ts` declares the container builders (`loop.forEach`, `parallel.collection`, ...), and + // print and compile resolve them without the builders map. + for (const type of ['loop', 'parallel'] as const) blocks.push([type, containerBlock(type)]) const triggers: Array<[string, CatalogTrigger]> = [] for (const id of triggerIds) { diff --git a/apps/sim/lib/workflows/code/catalog/project.ts b/apps/sim/lib/workflows/code/catalog/project.ts index 9adee3fcf41..84046c65289 100644 --- a/apps/sim/lib/workflows/code/catalog/project.ts +++ b/apps/sim/lib/workflows/code/catalog/project.ts @@ -272,7 +272,7 @@ function projectSubBlock(subBlock: SubBlockConfig, ctx: SubBlockContext): Catalo assign(projected, 'paramVisibility', subBlock.paramVisibility) assign(projected, 'emptyIsValid', subBlock.emptyIsValid) assign(projected, 'language', subBlock.language) - assign(projected, 'multiple', subBlock.multiple) + if (subBlock.multiple === true || subBlock.multiSelect === true) projected.multiple = true assign(projected, 'min', subBlock.min) assign(projected, 'max', subBlock.max) assign(projected, 'step', subBlock.step) @@ -408,12 +408,15 @@ function projectGraph(block: BlockConfig): CatalogBlockGraph { /** * Outputs derived from params at run time, mirroring `getEffectiveBlockOutputs`: the agent's * `responseFormat`, the human-in-the-loop resume form, and any block whose Start-style - * `input-format` field adds outputs. + * `input-format` field adds outputs. A trigger block (`category: 'triggers'`, such as the generic + * webhook) declares that field on the trigger surface, and it still adds outputs. */ function projectDynamicOutputs(block: BlockConfig): CatalogBlock['dynamicOutputs'] { if (block.type === 'agent') return { source: 'responseFormat', param: 'responseFormat' } const inputFormat = block.subBlocks.find( - (subBlock) => subBlock.type === 'input-format' && subBlockSurface(subBlock) === 'action' + (subBlock) => + subBlock.type === 'input-format' && + (subBlockSurface(subBlock) === 'action' || block.category === 'triggers') ) if (!inputFormat) return undefined return isHumanInTheLoopBlock(block.type) diff --git a/apps/sim/lib/workflows/code/catalog/sdk-names.test.ts b/apps/sim/lib/workflows/code/catalog/sdk-names.test.ts index 624c483051c..f35f948d755 100644 --- a/apps/sim/lib/workflows/code/catalog/sdk-names.test.ts +++ b/apps/sim/lib/workflows/code/catalog/sdk-names.test.ts @@ -15,6 +15,7 @@ const EMPTY: SdkNamesFile = { version: 1, blocks: {} } function source(overrides: Partial & { type: string }): SdkNameSource { return { hidden: false, + triggerBlock: false, operations: [], triggers: [], params: { action: [], trigger: [] }, @@ -83,6 +84,19 @@ describe('extendSdkNames', () => { expect(names.blocks.condition.namespace).toBe('condition') }) + it('names visible trigger blocks under trigger, and hidden ones under legacy', () => { + const { names } = extendSdkNames(EMPTY, [ + source({ type: 'start_trigger', triggerBlock: true }), + source({ type: 'generic_webhook', triggerBlock: true }), + source({ type: 'schedule', triggerBlock: true }), + source({ type: 'api_trigger', triggerBlock: true, hidden: true }), + ]) + expect(names.blocks.start_trigger.namespace).toBe('trigger.start') + expect(names.blocks.generic_webhook.namespace).toBe('trigger.webhook') + expect(names.blocks.schedule.namespace).toBe('trigger.schedule') + expect(names.blocks.api_trigger.namespace).toBe('legacy.apiTrigger') + }) + it('aliases oauthCredential to credential per surface, unless that surface has a credential', () => { const { names } = extendSdkNames(EMPTY, [ source({ @@ -151,6 +165,26 @@ describe('validateSdkNames', () => { ]) }) + it('keeps trigger namespaces to trigger blocks and clear of trigger methods', () => { + const names: SdkNamesFile = { + version: 1, + blocks: { + crm: { namespace: 'trigger.crm' }, + mail: { namespace: 'mail', triggers: { mail_poller: 'poller' } }, + mail_watch: { namespace: 'trigger.mail' }, + }, + } + expect( + validateSdkNames(names, [ + source({ type: 'crm' }), + source({ type: 'mail_watch', triggerBlock: true }), + ]) + ).toEqual([ + 'crm: namespace "trigger.crm" is only for trigger blocks', + 'mail_watch: namespace "trigger.mail" collides with mail\'s trigger methods', + ]) + }) + it('rejects a namespace on an SDK-owned root or a reserved word', () => { const names: SdkNamesFile = { version: 1, diff --git a/apps/sim/lib/workflows/code/catalog/sdk-names.ts b/apps/sim/lib/workflows/code/catalog/sdk-names.ts index 02165cefe6c..0f7e1c041e7 100644 --- a/apps/sim/lib/workflows/code/catalog/sdk-names.ts +++ b/apps/sim/lib/workflows/code/catalog/sdk-names.ts @@ -10,7 +10,7 @@ import type { BlockConfig, SubBlockConfig } from '@/blocks/types' * afterwards only ever added to. The stored operation id is never renamed by any of this. */ interface SdkNamesBlockEntry { - /** Dotted builder namespace (`slack`, `legacy.slackV1`). */ + /** Dotted builder namespace (`slack`, `legacy.slackV1`, `trigger.webhook`). */ namespace: string /** Operation dropdown id → method name, for blocks with an `operation` dropdown. */ methods?: Record @@ -39,6 +39,11 @@ export interface SdkNameSource { type: string /** Hidden from the toolbar: a superseded version or a sunset block. */ hidden: boolean + /** + * A trigger block (registry `category: 'triggers'`): its builder is itself a trigger, named under + * `trigger.` (`trigger.start`, `trigger.webhook`; s2 §2), with no per-trigger methods. + */ + triggerBlock: boolean operations: Array<{ id: string; label: string }> triggers: Array<{ id: string; provider: string }> params: Record @@ -83,8 +88,13 @@ const NAMESPACE_SEEDS: Record = { workflow_input: 'runWorkflow', human_in_the_loop_v2: 'human', variables: 'setVariables', + generic_webhook: 'webhook', } +/** The root a visible trigger block's namespace sits under. */ +const TRIGGER_ROOT = 'trigger' +const TRIGGER_TYPE_SUFFIX = /_trigger$/ + /** Members a generated namespace declares besides its methods (s2 §2: `const tool`). */ const NAMESPACE_MEMBERS = new Set(['tool']) @@ -138,21 +148,30 @@ function pickFree(candidates: string[], taken: ReadonlySet, fallback: st /** * A visible block takes its seed, else its unversioned camelCased type, else the full type; a + * visible trigger block takes the same under `trigger.`, with a `_trigger` suffix dropped; a * toolbar-hidden one (superseded or sunset) lives under `legacy.` by its full type. The first free * usable candidate wins, else the first candidate with a numeric suffix. */ function defaultNamespace(source: SdkNameSource, taken: ReadonlySet): string { const full = toCamelIdentifier(source.type) - const prefix = source.hidden ? 'legacy.' : '' + const underTrigger = source.triggerBlock && !source.hidden + const prefix = source.hidden ? 'legacy.' : underTrigger ? `${TRIGGER_ROOT}.` : '' + const unversioned = stripVersionSuffix(source.type) const candidates = ( source.hidden ? [full] - : [NAMESPACE_SEEDS[source.type], toCamelIdentifier(stripVersionSuffix(source.type)), full] + : [ + NAMESPACE_SEEDS[source.type], + toCamelIdentifier( + underTrigger ? unversioned.replace(TRIGGER_TYPE_SUFFIX, '') : unversioned + ), + full, + ] ).filter( (candidate): candidate is string => candidate !== undefined && isUsableIdentifier(candidate) && - (source.hidden || !SDK_OWNED_ROOTS.has(candidate)) + (source.hidden || underTrigger || !SDK_OWNED_ROOTS.has(candidate)) ) const base = candidates[0] ?? `${full.replace(/^(?=\d)/, '_')}Block` for (const candidate of [...candidates, base]) { @@ -278,7 +297,7 @@ function namespaceIsValid(namespace: string): boolean { const segments = namespace.split('.') if (segments.some((segment) => !isUsableIdentifier(segment))) return false if (segments.length === 1) return !SDK_OWNED_ROOTS.has(namespace) - return segments.length === 2 && segments[0] === 'legacy' + return segments.length === 2 && (segments[0] === 'legacy' || segments[0] === TRIGGER_ROOT) } /** @@ -312,12 +331,30 @@ export function validateSdkNames(names: SdkNamesFile, sources: readonly SdkNameS } } + const triggerMethodRoots = new Map() + for (const [type, entry] of Object.entries(names.blocks)) { + if (entry.triggers && Object.keys(entry.triggers).length > 0) { + triggerMethodRoots.set(`${TRIGGER_ROOT}.${entry.namespace}`, type) + } + } + for (const [type, entry] of Object.entries(names.blocks)) { + const owner = triggerMethodRoots.get(entry.namespace) + if (owner) { + issues.push( + `${type}: namespace "${entry.namespace}" collides with ${owner}'s trigger methods` + ) + } + } + for (const source of sources) { const entry = names.blocks[source.type] if (!entry) { issues.push(`${source.type}: missing entry`) continue } + if (entry.namespace.startsWith(`${TRIGGER_ROOT}.`) && !source.triggerBlock) { + issues.push(`${source.type}: namespace "${entry.namespace}" is only for trigger blocks`) + } for (const operation of source.operations) { if (!entry.methods || !Object.hasOwn(entry.methods, operation.id)) { issues.push(`${source.type}: missing method for operation ${operation.id}`) @@ -390,15 +427,18 @@ export function sdkNameSource( : { name: subBlock.id, identity: `id:${subBlock.id}` } ) } - const triggers = block.triggers?.enabled - ? block.triggers.available.flatMap((id) => { - const provider = triggerProvider(id) - return provider === undefined ? [] : [{ id, provider }] - }) - : [] + const triggerBlock = block.category === 'triggers' + const triggers = + block.triggers?.enabled && !triggerBlock + ? block.triggers.available.flatMap((id) => { + const provider = triggerProvider(id) + return provider === undefined ? [] : [{ id, provider }] + }) + : [] return { type: block.type, hidden: block.hideFromToolbar === true, + triggerBlock, operations: operationOptions(block), triggers, params, diff --git a/packages/workflow-code/src/catalog/types.ts b/packages/workflow-code/src/catalog/types.ts index 0f9c81e8484..5de6a5a613f 100644 --- a/packages/workflow-code/src/catalog/types.ts +++ b/packages/workflow-code/src/catalog/types.ts @@ -116,6 +116,7 @@ export interface CatalogSubBlock { paramVisibility?: string emptyIsValid?: boolean language?: string + /** Holds a list: a multi-file upload, or a dropdown/combobox with registry `multiSelect`. */ multiple?: boolean min?: number max?: number From 37ac8800b1d53486440a3386cb48f7badc3a5571 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:50:32 -0800 Subject: [PATCH 041/428] test(workflows): canonicalize and sdk codegen against the real block catalog --- .../lib/workflows/code/real-catalog.test.ts | 127 ++++++++++++++++++ apps/sim/package.json | 1 + bun.lock | 1 + packages/workflow-sdk/src/codegen/index.ts | 1 + packages/workflow-sdk/src/codegen/names.ts | 3 + .../test/examples/lead-enrichment.ts | 2 +- 6 files changed, 134 insertions(+), 1 deletion(-) create mode 100644 apps/sim/lib/workflows/code/real-catalog.test.ts diff --git a/apps/sim/lib/workflows/code/real-catalog.test.ts b/apps/sim/lib/workflows/code/real-catalog.test.ts new file mode 100644 index 00000000000..74f5f8dbc8c --- /dev/null +++ b/apps/sim/lib/workflows/code/real-catalog.test.ts @@ -0,0 +1,127 @@ +/** + * The Wave 2 engines against the REAL block catalog: canonicalize (2B) and the SDK codegen (2E) + * were built on hand-made fixture catalogs, so this checks them against what the catalog builder + * (2A) projects from the live registry. It type-checks the s2 example workflows against the types + * generated from the whole registry with the workspace's TypeScript 7 compiler. + */ +import { execFileSync } from 'node:child_process' +import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs' +import { tmpdir } from 'node:os' +import path from 'node:path' +import { canonicalize } from '@sim/workflow-code' +import { generateSdkTypes, SPECIAL_BUILDER_KEYS } from '@sim/workflow-sdk/codegen' +import { afterAll, describe, expect, it, vi } from 'vitest' + +vi.unmock('@/blocks/registry') + +import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' +import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' +import { generateRegistryCorpus } from '@/lib/workflows/code/corpus' +import { getBlockRegistry } from '@/blocks/registry' +import { SDK_NAMES } from '@/blocks/sdk-names.generated' + +const registryBlocks = Object.values(getBlockRegistry()) +const { catalog } = buildBlockCatalog({ + blocks: registryBlocks, + trigger: registryTrigger, + sdkNames: SDK_NAMES, +}) + +const REPO_ROOT = path.resolve(process.cwd(), '../..') +const SDK_ROOT = path.join(REPO_ROOT, 'packages/workflow-sdk') +const workDir = mkdtempSync(path.join(tmpdir(), 'workflow-sdk-real-catalog-')) + +afterAll(() => rmSync(workDir, { recursive: true, force: true })) + +describe('wave 2 engines over the real block catalog', () => { + it('canonicalizes every case of the registry corpus without throwing', () => { + const failures: string[] = [] + const corpus = generateRegistryCorpus() + for (const corpusCase of corpus) { + try { + canonicalize(corpusCase.state, { + catalog, + meta: { name: corpusCase.id, description: null }, + }) + } catch (error) { + failures.push(`${corpusCase.id}: ${String(error)}`) + } + } + expect(corpus.length).toBeGreaterThan(registryBlocks.length) + expect(failures).toEqual([]) + }) + + it('maps every builder core.d.ts declares to the block type its signature is written for', () => { + expect( + Object.fromEntries(SPECIAL_BUILDER_KEYS.map((key) => [key, catalog.builders[key]])) + ).toEqual({ + condition: { type: 'condition' }, + router: { type: 'router_v2' }, + fn: { type: 'function' }, + runWorkflow: { type: 'workflow_input' }, + human: { type: 'human_in_the_loop_v2' }, + response: { type: 'response' }, + setVariables: { type: 'variables' }, + note: { type: 'note' }, + }) + }) + + it('projects a registry multiSelect dropdown or combobox as a multiple subBlock', () => { + const missing: string[] = [] + let multiSelects = 0 + for (const block of registryBlocks) { + block.subBlocks.forEach((subBlock, index) => { + if (subBlock.multiSelect !== true) return + multiSelects += 1 + if (catalog.blocks[block.type].subBlocks[index].multiple !== true) { + missing.push(`${block.type}.${subBlock.id}`) + } + }) + } + expect(multiSelects).toBeGreaterThan(0) + expect(missing).toEqual([]) + }) + + it('generates SDK types the s2 example workflows type-check against', () => { + const files = generateSdkTypes(catalog) + for (const file of files) { + const target = path.join(workDir, 'types', file.path) + mkdirSync(path.dirname(target), { recursive: true }) + writeFileSync(target, file.text) + } + const tsconfig = path.join(workDir, 'tsconfig.json') + writeFileSync( + tsconfig, + JSON.stringify({ + compilerOptions: { + target: 'ES2022', + lib: ['ES2022'], + module: 'ESNext', + moduleResolution: 'bundler', + moduleDetection: 'force', + types: [], + strict: true, + noEmit: true, + skipLibCheck: false, + paths: { '@sim/workflow-sdk': [path.join(SDK_ROOT, 'src/core.d.ts')] }, + }, + include: [ + path.join(workDir, 'types/**/*.d.ts'), + path.join(SDK_ROOT, 'test/examples/**/*.ts'), + ], + }) + ) + let diagnostics = '' + try { + execFileSync(path.join(REPO_ROOT, 'node_modules/.bin/tsc'), ['--noEmit', '-p', tsconfig], { + encoding: 'utf8', + stdio: 'pipe', + }) + } catch (error) { + const failure = error as { stdout?: string; stderr?: string } + diagnostics = `${failure.stdout ?? ''}${failure.stderr ?? ''}` + } + expect(files.some((file) => file.path === 'blocks/slack_v2.d.ts')).toBe(true) + expect(diagnostics).toBe('') + }, 120_000) +}) diff --git a/apps/sim/package.json b/apps/sim/package.json index 709f6c26c1d..271b6637ae2 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -309,6 +309,7 @@ "@playwright/test": "1.64.1", "@sim/testing": "workspace:*", "@sim/tsconfig": "workspace:*", + "@sim/workflow-sdk": "workspace:*", "@tailwindcss/postcss": "^4.3.4", "@tailwindcss/typography": "0.5.20", "@testing-library/jest-dom": "^6.10.0", diff --git a/bun.lock b/bun.lock index edb5cf2a1c0..cc318f7cd77 100644 --- a/bun.lock +++ b/bun.lock @@ -459,6 +459,7 @@ "@playwright/test": "1.64.1", "@sim/testing": "workspace:*", "@sim/tsconfig": "workspace:*", + "@sim/workflow-sdk": "workspace:*", "@tailwindcss/postcss": "^4.3.4", "@tailwindcss/typography": "0.5.20", "@testing-library/jest-dom": "^6.10.0", diff --git a/packages/workflow-sdk/src/codegen/index.ts b/packages/workflow-sdk/src/codegen/index.ts index bf23cc20880..9b28f9fc06e 100644 --- a/packages/workflow-sdk/src/codegen/index.ts +++ b/packages/workflow-sdk/src/codegen/index.ts @@ -1,4 +1,5 @@ export { type GenerateSdkTypesFn, generateSdkTypes, type SdkTypeFile } from './generate' +export { SPECIAL_BUILDER_KEYS } from './names' export { type GenerateWorkspaceTypesFn, generateWorkspaceTypes, diff --git a/packages/workflow-sdk/src/codegen/names.ts b/packages/workflow-sdk/src/codegen/names.ts index dd8afc59e28..d2564932d0c 100644 --- a/packages/workflow-sdk/src/codegen/names.ts +++ b/packages/workflow-sdk/src/codegen/names.ts @@ -24,6 +24,9 @@ const SPECIAL_BUILDERS: Readonly { ) const handoff = runWorkflow('Hand off', { workflowId: workflow('assign-owner'), - input: enrichAll.results, + inputMapping: { leads: enrichAll.results }, }) const legacyPing = slack.sendMessage( 'Old ping', From e5d9a8061abcb5188bf8d196d5f7165c7e545537 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:06:55 -0800 Subject: [PATCH 042/428] fix(workflow-code): canonicalize, print and compile agree on pair modes, trigger-block surfaces and code-file languages - modes hold exactly the basic/advanced pairs on the block's surface; single-member groups get none - a trigger block (category triggers) serializes both surfaces, so its params print and compile as active - trigger-advanced members count as advanced - function code goes to a file only when its stored language has a file form --- .../workflow-code/src/canonicalize/index.ts | 2 +- .../workflow-code/src/canonicalize/modes.ts | 31 +++++++++++++------ .../workflow-code/src/canonicalize/tools.ts | 2 +- packages/workflow-code/src/compile/blocks.ts | 5 +-- .../src/compile/validate-catalog.ts | 22 ++++++++++--- packages/workflow-code/src/print/printer.ts | 19 +++++++++--- 6 files changed, 59 insertions(+), 22 deletions(-) diff --git a/packages/workflow-code/src/canonicalize/index.ts b/packages/workflow-code/src/canonicalize/index.ts index 5e401b2491a..adbb8984e84 100644 --- a/packages/workflow-code/src/canonicalize/index.ts +++ b/packages/workflow-code/src/canonicalize/index.ts @@ -227,7 +227,7 @@ export const canonicalize: CanonicalizeFn = (state, options) => { params, modes: catalog && !isContainer - ? effectiveModes(catalog.subBlocks, rawValues, overrides, advancedMode) + ? effectiveModes(catalog, triggerMode, rawValues, overrides, advancedMode) : {}, } if (lifted) canonical.branches = lifted.branches diff --git a/packages/workflow-code/src/canonicalize/modes.ts b/packages/workflow-code/src/canonicalize/modes.ts index cbfa272814a..284f25c3a8e 100644 --- a/packages/workflow-code/src/canonicalize/modes.ts +++ b/packages/workflow-code/src/canonicalize/modes.ts @@ -1,28 +1,32 @@ import { buildCanonicalIndex, - type CanonicalIndexSubBlock, type CanonicalModeOverrides, isCanonicalPair, resolveCanonicalMode, } from '../catalog/canonical-index' +import type { CatalogBlock, CatalogSubBlock } from '../catalog/types' import type { CanonicalParamId, ParamMode } from '../model' /** - * The effective mode of every canonical pair (s1 canonicalize step 4, quirk 2), as the - * serializer resolves it (serializer/index.ts:637-650): an explicit override wins; otherwise the - * legacy block-level `advancedMode` makes a pair advanced; otherwise the mode is inferred from - * which member holds a value (`resolveCanonicalMode`). + * The effective mode of every canonical pair on the block's surface (s1 canonicalize step 4, quirk + * 2), as the serializer resolves it (serializer/index.ts:637-650): an explicit override wins; + * otherwise the legacy block-level `advancedMode` makes a pair advanced; otherwise the mode is + * inferred from which member holds a value (`resolveCanonicalMode`). * - * The index is unscoped, like the serializer's and the backfill's (subblock-migrations.ts:731): - * both members of a pair always sit on one surface, so scoping cannot change which pairs exist. + * Only the pairs the block serializes get a mode: the trigger surface in trigger mode, the action + * surface otherwise, and both for a trigger block (`shouldSerializeSubBlock`). A pair on the other + * surface never reaches execution, and the compiler records modes the same way. */ export function effectiveModes( - subBlocks: readonly CanonicalIndexSubBlock[], + block: Pick, + triggerMode: boolean, values: Record, overrides: CanonicalModeOverrides | undefined, legacyAdvancedMode: boolean ): Record { - const index = buildCanonicalIndex(subBlocks) + const index = buildCanonicalIndex( + block.subBlocks.filter((subBlock) => onBlockSurface(block, subBlock, triggerMode)) + ) const modes: Record = {} for (const group of Object.values(index.groupsById)) { if (!isCanonicalPair(group)) continue @@ -32,3 +36,12 @@ export function effectiveModes( } return modes } + +function onBlockSurface( + block: Pick, + subBlock: CatalogSubBlock, + triggerMode: boolean +): boolean { + if (block.category === 'triggers') return true + return triggerMode ? subBlock.surface !== 'action' : subBlock.surface !== 'trigger' +} diff --git a/packages/workflow-code/src/canonicalize/tools.ts b/packages/workflow-code/src/canonicalize/tools.ts index 68f59150376..454cdecc8c9 100644 --- a/packages/workflow-code/src/canonicalize/tools.ts +++ b/packages/workflow-code/src/canonicalize/tools.ts @@ -137,7 +137,7 @@ function liftTool( type, params, modes: block - ? effectiveModes(block.subBlocks, rawParams, explicit, false) + ? effectiveModes(block, false, rawParams, explicit, false) : definedModes(explicit), } const extra: Record = {} diff --git a/packages/workflow-code/src/compile/blocks.ts b/packages/workflow-code/src/compile/blocks.ts index 2c1af947d87..a6536429a7a 100644 --- a/packages/workflow-code/src/compile/blocks.ts +++ b/packages/workflow-code/src/compile/blocks.ts @@ -24,6 +24,7 @@ import { buildFieldIndex, type CatalogField, type FieldIndex, + isModalPair, isRequired, isVisible, memberFor, @@ -551,7 +552,7 @@ function compileField( if (field.kind === 'pair') { const mode = meta.modes.get(field.param) ?? (isSelectorForm(compiled.form) ? 'basic' : 'advanced') - setOwn(modes, field.param, mode) + if (isModalPair(field)) setOwn(modes, field.param, mode) target = memberFor(field, mode) } else { target = field.sub @@ -756,7 +757,7 @@ function compileRegularBlock(ctx: CompileContext, decl: BlockDecl): CompiledBloc if (!Object.hasOwn(modes, param)) setOwn(modes, param, mode) } for (const field of index?.fields.values() ?? []) { - if (field.kind === 'pair' && !Object.hasOwn(modes, field.param)) + if (isModalPair(field) && !Object.hasOwn(modes, field.param)) setOwn(modes, field.param, 'basic') } diff --git a/packages/workflow-code/src/compile/validate-catalog.ts b/packages/workflow-code/src/compile/validate-catalog.ts index b6aebe45207..06126d263ec 100644 --- a/packages/workflow-code/src/compile/validate-catalog.ts +++ b/packages/workflow-code/src/compile/validate-catalog.ts @@ -31,10 +31,16 @@ export interface FieldIndex { subBlocks: Map } -function onSurface(sub: CatalogSubBlock, triggerMode: boolean): boolean { +/** A trigger block (`category: 'triggers'`) serializes both surfaces (`shouldSerializeSubBlock`). */ +function onSurface(block: CatalogBlock, sub: CatalogSubBlock, triggerMode: boolean): boolean { + if (block.category === 'triggers') return true return triggerMode ? sub.surface !== 'action' : sub.surface !== 'trigger' } +function isAdvancedMember(sub: CatalogSubBlock): boolean { + return sub.mode === 'advanced' || sub.mode === 'trigger-advanced' +} + /** * The params a builder accepts: subBlock ids, with every `canonicalParamId` group written once * under its canonical id. The surface (action or trigger copy of a duplicated id) follows the @@ -48,7 +54,7 @@ export function buildFieldIndex( ): FieldIndex { const subBlocks = new Map() for (const sub of block.subBlocks) { - if (onSurface(sub, triggerMode) && !subBlocks.has(sub.id)) subBlocks.set(sub.id, sub) + if (onSurface(block, sub, triggerMode) && !subBlocks.has(sub.id)) subBlocks.set(sub.id, sub) } const fields = new Map() const memberAliases = new Map() @@ -68,14 +74,22 @@ export function buildFieldIndex( fields.set(cid, { kind: 'pair', param: cid, - basic: members.find((member) => member.mode !== 'advanced'), - advanced: members.find((member) => member.mode === 'advanced'), + basic: members.find((member) => !isAdvancedMember(member)), + advanced: members.find(isAdvancedMember), members, }) } return { fields, memberAliases, subBlocks } } +/** + * A group with both a basic and an advanced member: the only kind whose mode the CWM records + * (`isCanonicalPair`), so `modes` holds exactly these on the block's surface. + */ +export function isModalPair(field: CatalogField): boolean { + return field.kind === 'pair' && field.basic !== undefined && field.advanced !== undefined +} + /** The member a group's value lands in for a mode (the printer's effective member). */ export function memberFor( field: Extract, diff --git a/packages/workflow-code/src/print/printer.ts b/packages/workflow-code/src/print/printer.ts index 1fecafaf64d..2eec0c2783c 100644 --- a/packages/workflow-code/src/print/printer.ts +++ b/packages/workflow-code/src/print/printer.ts @@ -55,6 +55,11 @@ function toLanguage(value: unknown): CodeFileLanguage | null { return null } +/** The advanced member of a basic/advanced pair, on either surface. */ +function isAdvancedMember(sb: CatalogSubBlock): boolean { + return sb.mode === 'advanced' || sb.mode === 'trigger-advanced' +} + function stringParam(block: CanonicalBlock, id: string): string | undefined { const param = block.params[id] return param?.kind === 'value' && typeof param.value === 'string' ? param.value : undefined @@ -354,7 +359,9 @@ class WorkflowPrinter { return heads } + /** A trigger block (`category: 'triggers'`) serializes both surfaces (`shouldSerializeSubBlock`). */ private surfaceSubBlocks(block: CanonicalBlock, catalogBlock: CatalogBlock): CatalogSubBlock[] { + if (catalogBlock.category === 'triggers') return catalogBlock.subBlocks const surface = block.triggerMode ? 'trigger' : 'action' return catalogBlock.subBlocks.filter((sb) => sb.surface === undefined || sb.surface === surface) } @@ -453,6 +460,8 @@ class WorkflowPrinter { }) return null } + const stored = stringParam(block, 'language') ?? 'javascript' + if (stored !== language) return inline(`its language ${stored} has no code-file form`) if (!this.codec) return inline('no code-file codec is available') const text = this.codec.toFile(code, language) if (text === null) return inline('its tokens cannot be rewritten for a code file') @@ -585,8 +594,8 @@ class WorkflowPrinter { seenCids.add(cid) const members = subBlocks.filter((m) => m.canonicalParamId === cid && !pinned.has(m.id)) const mode: ParamMode = block.modes[cid] ?? 'basic' - const basic = members.find((m) => m.mode !== 'advanced') - const advanced = members.find((m) => m.mode === 'advanced') + const basic = members.find((m) => !isAdvancedMember(m)) + const advanced = members.find(isAdvancedMember) const effective = (mode === 'advanced' ? advanced : basic) ?? members[0] let printed: PrintedValue | null = null for (const member of members) { @@ -607,7 +616,7 @@ class WorkflowPrinter { } } const implied: ParamMode = printed ? (printed.selector ? 'basic' : 'advanced') : 'basic' - if (implied !== mode) modes[cid] = mode + if (basic && advanced && implied !== mode) modes[cid] = mode continue } handled.add(sb.id) @@ -661,8 +670,8 @@ class WorkflowPrinter { if (sb.required !== true || sb.condition !== undefined || sb.hidden || sb.readOnly) return false if (sb.valueKind === 'none' || sb.valueKind === 'branches' || sb.valueKind === 'tools') return false - const surfaceMode = block.triggerMode ? 'trigger' : undefined - if (block.triggerMode) return sb.mode === surfaceMode + if (block.triggerMode) return sb.mode === 'trigger' + if (sb.mode === 'trigger') return this.catalog.blocks[block.type]?.category === 'triggers' return sb.mode === undefined || sb.mode === 'basic' || sb.mode === 'both' } From 4d22cdd12602f7ec18fdd778a245fa3fe4d1b9fa Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:06:55 -0800 Subject: [PATCH 043/428] fix(workflows): a start_trigger corpus case keeps one start block --- apps/sim/lib/workflows/code/corpus/generate.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/sim/lib/workflows/code/corpus/generate.ts b/apps/sim/lib/workflows/code/corpus/generate.ts index 61123b5e709..c1397eaf9ef 100644 --- a/apps/sim/lib/workflows/code/corpus/generate.ts +++ b/apps/sim/lib/workflows/code/corpus/generate.ts @@ -262,9 +262,10 @@ function blockCases(config: BlockConfig, registry: Registry, seed: number): Corp after?: (builder: CaseBuilder, subjectId: string) => void ) => { const builder = new CaseBuilder(seed, `${kind}:${type}:${detail}`) - const start = startBlock(builder, registry) + // The Start block is single-instance: a start_trigger subject is the case's only Start. + const start = type === 'start_trigger' ? null : startBlock(builder, registry) const { block } = subject(builder, registry, config, options) - if (!isTriggerOnly(config, options.triggerMode ?? false) && canConnect(config)) { + if (start && !isTriggerOnly(config, options.triggerMode ?? false) && canConnect(config)) { builder.connect(start, block.id) } after?.(builder, block.id) From afacd305674062162b6ffd777fc28cdedeb0c313 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:06:56 -0800 Subject: [PATCH 044/428] test(workflows): run the round-trip harness on the wave 2 engines with only materialize skipped --- .../code/corpus/roundtrip.corpus.test.ts | 313 ++++++++++-------- packages/workflow-code/src/proof/oracles.ts | 4 +- packages/workflow-code/src/proof/report.ts | 7 +- 3 files changed, 182 insertions(+), 142 deletions(-) diff --git a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts index f66d17fcf9e..64bcdb0caa3 100644 --- a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts +++ b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts @@ -4,11 +4,11 @@ * from `ROUNDTRIP_CORPUS_EXTRA_DIR` (written outside the repo by * scripts/export-redacted-workflows.ts), and fast-check workflows. * - * It is written against the `api.ts` function types and reads the real engines from - * `@sim/workflow-code` at run time. Until an engine lands, each property that needs it is + * It imports the Wave 2 engines (catalog, canonicalize, print, compile, equivalence) statically and + * builds the real catalog from the live registry. `materialize` and the server's materialize hooks + * land in Wave 3, so they are read at run time: until then each property that needs them is * registered as a skipped test whose title names the missing export or module, and the report - * lists it under `skippedProperties`. Wave 3 replaces the run-time lookups with static imports - * and removes the skips. + * lists it under `skippedProperties`. * * CI budget (under 60 s): by default every block type keeps up to `CASES_PER_BLOCK_TYPE` cases * plus every structural case; `ROUNDTRIP_CORPUS_FULL=1` runs the whole corpus. Set @@ -22,31 +22,34 @@ vi.unmock('@/blocks/registry') vi.unmock('@/tools/registry') import { getErrorMessage } from '@sim/utils/errors' -import type { - BlockCatalog, - CanonicalEqualsFn, - CanonicalizeFn, - CanonicalWorkflow, - CompileWorkflowFn, - MaterializeFn, - MaterializeHooks, - PrintWorkflowFn, -} from '@sim/workflow-code' +import { compareStrings } from '@sim/utils/string' import * as workflowCode from '@sim/workflow-code' +import { + type BlockCatalog, + type CanonicalWorkflow, + type CompileResult, + canonicalEquals, + canonicalize, + compileWorkflow, + type MaterializeFn, + type MaterializeHooks, + type PrintWorkflowFn, + printWorkflow, +} from '@sim/workflow-code' import { assertNoErrors, assertNoopIdentity, createProofReport, executionParity, - findDifferences, idempotence, type OracleResult, type ProofProperty, reportPathVariable, - withoutAnnotations, workflowStateArbitrary, } from '@sim/workflow-code/proof' import fc from 'fast-check' +import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' +import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' import { type CorpusCase, generateRegistryCorpus } from '@/lib/workflows/code/corpus' import { buildTestingFactoryStates, @@ -55,33 +58,23 @@ import { loadWorkflowStatesFromDirectory, } from '@/lib/workflows/code/corpus/fixtures.test-helpers' import { hasWorkflowChanged } from '@/lib/workflows/comparison/compare' +import { getBlockRegistry } from '@/blocks/registry' +import { SDK_NAMES } from '@/blocks/sdk-names.generated' import { Serializer } from '@/serializer' import type { WorkflowState } from '@/stores/workflows/workflow/types' const SUITE = 'roundtrip-corpus' const CASES_PER_BLOCK_TYPE = 3 const FUZZ_RUNS = 50 - -interface Engines { - canonicalize: CanonicalizeFn - materialize: MaterializeFn - compileWorkflow: CompileWorkflowFn - printWorkflow: PrintWorkflowFn - canonicalEquals: CanonicalEqualsFn -} - -type EngineName = keyof Engines - -const packageExports: Record = { ...workflowCode } - -function engine(name: K): Engines[K] | null { - const value = packageExports[name] - return typeof value === 'function' ? (value as Engines[K]) : null -} +/** + * One property over the default corpus. The first property to run pays for the shared source run + * (canonicalize, print, compile per workflow); the whole file stays inside the 60 s CI budget. + */ +const PROPERTY_BUDGET_MS = 30_000 /** - * Loads a server module that does not exist before Wave 3 without failing the file's transform. - * Resolves `null` when the module or the export is missing. + * Loads a Wave 3 export without failing the file's transform. Resolves `null` when the module or + * the export is missing. */ async function optionalExport(specifier: string, name: string): Promise { try { @@ -92,35 +85,42 @@ async function optionalExport(specifier: string, name: string): Promise } } -const CATALOG_MODULE = '@/lib/workflows/code/catalog' -const CATALOG_EXPORT = 'buildCodeCatalog' +const MATERIALIZE_EXPORT = 'materialize' const HOOKS_MODULE = '@/lib/workflows/code/materialize-hooks' const HOOKS_EXPORT = 'createMaterializeHooks' -const buildCatalog = await optionalExport(CATALOG_MODULE, CATALOG_EXPORT) +const packageExports: Record = { ...workflowCode } +const materializeExport = packageExports[MATERIALIZE_EXPORT] +const materialize: MaterializeFn | null = + typeof materializeExport === 'function' ? (materializeExport as MaterializeFn) : null const createHooks = await optionalExport(HOOKS_MODULE, HOOKS_EXPORT) - -const catalog: BlockCatalog | null = - typeof buildCatalog === 'function' ? (buildCatalog({}).catalog as BlockCatalog) : null const hooks: MaterializeHooks | null = typeof createHooks === 'function' ? (createHooks() as MaterializeHooks) : null -const PROPERTY_NEEDS: Record> = { - P1: ['catalog', 'hooks', 'canonicalize', 'printWorkflow', 'compileWorkflow', 'materialize'], - P2: ['catalog', 'hooks', 'canonicalize', 'printWorkflow', 'compileWorkflow', 'materialize'], - P3: ['catalog', 'canonicalize', 'printWorkflow', 'compileWorkflow'], - P4: ['catalog', 'canonicalize', 'printWorkflow', 'compileWorkflow'], - P5: ['catalog', 'canonicalize', 'printWorkflow', 'compileWorkflow'], - O1: ['catalog', 'hooks', 'canonicalize', 'materialize'], - O2: ['catalog', 'hooks', 'canonicalize', 'materialize'], - O3: ['catalog', 'hooks', 'canonicalize', 'materialize'], +const { catalog } = buildBlockCatalog({ + blocks: Object.values(getBlockRegistry()), + trigger: registryTrigger, + sdkNames: SDK_NAMES, +}) + +type WaveThreeNeed = 'materialize' | 'hooks' + +const PROPERTY_NEEDS: Record = { + P0: [], + P1: ['hooks', 'materialize'], + P2: ['hooks', 'materialize'], + P3: [], + P4: [], + P5: [], + O1: ['hooks', 'materialize'], + O2: ['hooks', 'materialize'], + O3: ['hooks', 'materialize'], } function missingFor(property: ProofProperty): string[] { return PROPERTY_NEEDS[property].flatMap((need) => { - if (need === 'catalog') return catalog ? [] : [`${CATALOG_MODULE}#${CATALOG_EXPORT} (Wave 2A)`] if (need === 'hooks') return hooks ? [] : [`${HOOKS_MODULE}#${HOOKS_EXPORT} (Wave 3)`] - return engine(need) ? [] : [`@sim/workflow-code#${need}`] + return materialize ? [] : [`@sim/workflow-code#${MATERIALIZE_EXPORT} (Wave 3)`] }) } @@ -171,52 +171,65 @@ const subjects: ProofSubject[] = [ const report = createProofReport(SUITE) -/** The engines with every needed one present; only called after `missingFor` came back empty. */ -type ResolvedEngines = Engines & { catalog: BlockCatalog; hooks: MaterializeHooks } +/** The catalog and the Wave 3 engines a property runs against; a missing one throws when called. */ +interface ResolvedEngines { + catalog: BlockCatalog + materialize: MaterializeFn + hooks: () => MaterializeHooks +} function resolveEngines(): ResolvedEngines { - const found = { - canonicalize: engine('canonicalize'), - materialize: engine('materialize'), - compileWorkflow: engine('compileWorkflow'), - printWorkflow: engine('printWorkflow'), - canonicalEquals: engine('canonicalEquals'), - } - if (!catalog) throw new Error('catalog missing') return { - canonicalize: found.canonicalize ?? missingEngine('canonicalize'), - materialize: found.materialize ?? missingEngine('materialize'), - compileWorkflow: found.compileWorkflow ?? missingEngine('compileWorkflow'), - printWorkflow: found.printWorkflow ?? missingEngine('printWorkflow'), - canonicalEquals: - found.canonicalEquals ?? - ((a, b) => findDifferences(withoutAnnotations(a), withoutAnnotations(b)).length === 0), catalog, - hooks: hooks ?? missingHooks(), + materialize: + materialize ?? (() => missingWaveThree(`@sim/workflow-code#${MATERIALIZE_EXPORT}`)), + hooks: () => hooks ?? missingWaveThree(`${HOOKS_MODULE}#${HOOKS_EXPORT}`), } } -function missingEngine(name: string): never { - throw new Error(`@sim/workflow-code#${name} is not implemented`) -} - -function missingHooks(): never { - throw new Error(`${HOOKS_MODULE}#${HOOKS_EXPORT} is not implemented`) +function missingWaveThree(name: string): never { + throw new Error(`${name} is not implemented`) } const serializer = new Serializer() const serialize = (state: WorkflowState) => serializer.serializeWorkflow(state.blocks, state.edges, state.loops, state.parallels) -function canonical(e: ResolvedEngines, subject: ProofSubject): CanonicalWorkflow { - return e.canonicalize(subject.state, { +/** One subject's canonical form, its inline print and that print compiled: P0, P3, P4, P5 share it. */ +interface SourceRun { + canonical: CanonicalWorkflow + printed: ReturnType + compiled: CompileResult +} + +const sourceRuns = new WeakMap() + +function sourceRun(e: ResolvedEngines, subject: ProofSubject): SourceRun { + const cached = sourceRuns.get(subject) + if (cached) return cached + const workflow = canonicalize(subject.state, { catalog: e.catalog, meta: { name: subject.id, description: null }, }).workflow + const printed = printText(e, workflow, 'inline') + const run = { canonical: workflow, printed, compiled: compileFiles(e, printed) } + sourceRuns.set(subject, run) + return run +} + +function canonical(e: ResolvedEngines, subject: ProofSubject): CanonicalWorkflow { + return sourceRun(e, subject).canonical +} + +function compiledOrThrow(compiled: CompileResult): CanonicalWorkflow { + if (!compiled.workflow) { + throw new Error(`compile failed: ${compiled.diagnostics.map((d) => d.code).join(', ')}`) + } + return compiled.workflow } function printText(e: ResolvedEngines, workflow: CanonicalWorkflow, mode: 'inline' | 'files') { - return e.printWorkflow({ + return printWorkflow({ workflow, catalog: e.catalog, options: @@ -226,7 +239,7 @@ function printText(e: ResolvedEngines, workflow: CanonicalWorkflow, mode: 'inlin function compileFiles(e: ResolvedEngines, printed: ReturnType) { const [entry, ...codeFiles] = printed.files - return e.compileWorkflow({ + return compileWorkflow({ entry, files: new Map(codeFiles.map((file) => [file.path, file.text])), catalog: e.catalog, @@ -239,34 +252,37 @@ function compiledWorkflow( workflow: CanonicalWorkflow, mode: 'inline' | 'files' = 'inline' ) { - const compiled = compileFiles(e, printText(e, workflow, mode)) - if (!compiled.workflow) { - throw new Error(`compile failed: ${compiled.diagnostics.map((d) => d.code).join(', ')}`) - } - return compiled.workflow + return compiledOrThrow(compileFiles(e, printText(e, workflow, mode))) } function materialized(e: ResolvedEngines, workflow: CanonicalWorkflow, prev?: WorkflowState) { return e.materialize(workflow, null, { catalog: e.catalog, - hooks: e.hooks, + hooks: e.hooks(), prev, lockFreshness: 'none', }).state } const properties: Record OracleResult> = { + P0: (e, s) => + idempotence({ + oracle: 'P0', + value: canonical(e, s), + step: () => compiledOrThrow(sourceRun(e, s).compiled), + equals: canonicalEquals, + }), P1: (e, s) => { const original = canonical(e, s) return idempotence({ oracle: 'P1', value: original, step: (c) => - e.canonicalize(materialized(e, compiledWorkflow(e, c), s.state), { + canonicalize(materialized(e, compiledWorkflow(e, c), s.state), { catalog: e.catalog, meta: c.meta, }).workflow, - equals: e.canonicalEquals, + equals: canonicalEquals, }) }, P2: (e, s) => @@ -277,29 +293,23 @@ const properties: Record hasWorkflowChanged, oracle: 'P2', }), - P3: (e, s) => - idempotence({ + P3: (e, s) => { + const run = sourceRun(e, s) + return idempotence({ oracle: 'P3', - value: printText(e, canonical(e, s), 'inline').files[0].text, - step: (text) => { - const compiled = e.compileWorkflow({ - entry: { path: 'workflow.ts', text }, - files: new Map(), - catalog: e.catalog, - sdkMajor: e.catalog.sdkMajor, - }) - return compiled.workflow ? printText(e, compiled.workflow, 'inline').files[0].text : '' - }, - }), - P4: (e, s) => - assertNoErrors(compileFiles(e, printText(e, canonical(e, s), 'inline')).diagnostics), + value: run.printed.files[0].text, + step: () => + run.compiled.workflow ? printText(e, run.compiled.workflow, 'inline').files[0].text : '', + }) + }, + P4: (e, s) => assertNoErrors(sourceRun(e, s).compiled.diagnostics), P5: (e, s) => { - const c = canonical(e, s) + const run = sourceRun(e, s) return idempotence({ oracle: 'P5', - value: compiledWorkflow(e, c, 'inline'), - step: () => compiledWorkflow(e, c, 'files'), - equals: e.canonicalEquals, + value: compiledOrThrow(run.compiled), + step: () => compiledWorkflow(e, run.canonical, 'files'), + equals: canonicalEquals, }) }, O1: (e, s) => @@ -319,12 +329,35 @@ const properties: Record oracle: 'O3', value: canonical(e, s), step: (c) => - e.canonicalize(materialized(e, c, s.state), { catalog: e.catalog, meta: c.meta }).workflow, - equals: e.canonicalEquals, + canonicalize(materialized(e, c, s.state), { catalog: e.catalog, meta: c.meta }).workflow, + equals: canonicalEquals, }), } +const LEGACY_NAME_COLLISION = + 'two stored names normalize alike (E_CANON_LEGACY_NAME_COLLISION keys the second `name~2`); ' + + 'the source form cannot carry that key, so compile reports E_DUPLICATE_NAME (Wave 3: lock keys)' +const RESERVED_BLOCK_NAME = + 'a block named Loop or Parallel (W_CANON_RESERVED_NAME); compile reports E_RESERVED_NAME ' + + '(Wave 3: decide the source form for legacy reserved names)' + +/** + * Stored shapes the editor and realtime persistence refuse (`getWorkflowBlockNameConflict`) but + * legacy rows can hold, which no source form expresses yet. Every property must fail on exactly + * these and pass everywhere else: a new failure or a newly passing case fails the run. The report + * still records each as failed. + */ +const KNOWN_FAILURES: Record = { + 'name-collision:function:Agent 1|agent1': LEGACY_NAME_COLLISION, + 'name-collision:function:Fetch Data|fetch data': LEGACY_NAME_COLLISION, + 'name-collision:function:My.Block|myblock': LEGACY_NAME_COLLISION, + 'testing:builder-loop': RESERVED_BLOCK_NAME, + 'testing:builder-parallel': RESERVED_BLOCK_NAME, +} +const KNOWN_FAILURE_IDS = Object.keys(KNOWN_FAILURES).sort(compareStrings) + const PROPERTY_TITLES: Record = { + P0: 'P0 source fidelity: compile(print(c)) equals c', P1: 'P1 fidelity: canonicalize(materialize(compile(print(c)))) equals c', P2: 'P2 serializer parity after a full source round trip', P3: 'P3 print idempotence: print(compile(print(c))) is byte-identical', @@ -345,36 +378,40 @@ describe(`round-trip corpus (${subjects.length} workflows)`, () => { continue } - it(PROPERTY_TITLES[property], () => { - const e = resolveEngines() - let failed = 0 - for (const subject of subjects) { - const started = performance.now() - try { - const result = properties[property](e, subject) - if (!result.ok) failed += 1 - report.record({ - caseId: subject.id, - blockTypes: subject.blockTypes, - property, - status: result.ok ? 'passed' : 'failed', - durationMs: Math.round(performance.now() - started), - ...(result.ok ? {} : { differences: result.differences }), - }) - } catch (error) { - failed += 1 - report.record({ - caseId: subject.id, - blockTypes: subject.blockTypes, - property, - status: 'errored', - durationMs: Math.round(performance.now() - started), - message: getErrorMessage(error, String(error)), - }) + it( + PROPERTY_TITLES[property], + () => { + const e = resolveEngines() + const failed: string[] = [] + for (const subject of subjects) { + const started = performance.now() + try { + const result = properties[property](e, subject) + if (!result.ok) failed.push(subject.id) + report.record({ + caseId: subject.id, + blockTypes: subject.blockTypes, + property, + status: result.ok ? 'passed' : 'failed', + durationMs: Math.round(performance.now() - started), + ...(result.ok ? {} : { differences: result.differences }), + }) + } catch (error) { + failed.push(subject.id) + report.record({ + caseId: subject.id, + blockTypes: subject.blockTypes, + property, + status: 'errored', + durationMs: Math.round(performance.now() - started), + message: getErrorMessage(error, String(error)), + }) + } } - } - expect(failed).toBe(0) - }) + expect(failed.sort(compareStrings)).toEqual(KNOWN_FAILURE_IDS) + }, + PROPERTY_BUDGET_MS + ) } it('writes the report when a report path is set', () => { diff --git a/packages/workflow-code/src/proof/oracles.ts b/packages/workflow-code/src/proof/oracles.ts index 295794e2fc6..8236032da6f 100644 --- a/packages/workflow-code/src/proof/oracles.ts +++ b/packages/workflow-code/src/proof/oracles.ts @@ -16,7 +16,7 @@ import type { CanonicalWorkflow } from '../model' import { type Difference, findDifferences, firstTextDifference } from './diff' /** The property or oracle a verdict belongs to (s3 §5 P1–P5, s1 §6 O1–O3). */ -export type OracleName = 'P1' | 'P2' | 'P3' | 'P4' | 'P5' | 'O1' | 'O2' | 'O3' +export type OracleName = 'P0' | 'P1' | 'P2' | 'P3' | 'P4' | 'P5' | 'O1' | 'O2' | 'O3' export type OracleResult = | { ok: true; oracle: OracleName } @@ -44,7 +44,7 @@ export function assertNoopIdentity(input: { * given (for CWMs, `canonicalEquals`), else exactly. */ export function idempotence(input: { - oracle: 'P1' | 'P3' | 'P5' | 'O3' + oracle: 'P0' | 'P1' | 'P3' | 'P5' | 'O3' value: T step: (value: T) => T equals?: (expected: T, actual: T) => boolean diff --git a/packages/workflow-code/src/proof/report.ts b/packages/workflow-code/src/proof/report.ts index b82f18ef5d5..ab7830159e2 100644 --- a/packages/workflow-code/src/proof/report.ts +++ b/packages/workflow-code/src/proof/report.ts @@ -8,8 +8,11 @@ import { compareStrings } from '@sim/utils/string' import type { Difference } from './diff' -/** The round-trip properties (s3 §5) and oracles (s1 §6) a corpus run checks. */ -export const PROOF_PROPERTIES = ['P1', 'P2', 'P3', 'P4', 'P5', 'O1', 'O2', 'O3'] as const +/** + * The round-trip properties (s3 §5) and oracles (s1 §6) a corpus run checks. `P0` is P1's source + * half, `compile(print(c))` equals `c`, which needs no materialize. + */ +export const PROOF_PROPERTIES = ['P0', 'P1', 'P2', 'P3', 'P4', 'P5', 'O1', 'O2', 'O3'] as const export type ProofProperty = (typeof PROOF_PROPERTIES)[number] export type ProofStatus = 'passed' | 'failed' | 'skipped' | 'errored' From 60f5be08576742d268b67209c67d22d63b3e456a Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:59:00 -0800 Subject: [PATCH 045/428] refactor(workflow-code): expose the canonicalize helpers materialize inverts --- .../src/canonicalize/branches.ts | 13 ++++-- .../workflow-code/src/canonicalize/params.ts | 5 +- .../workflow-code/src/canonicalize/tools.ts | 46 +++++++++++++------ 3 files changed, 44 insertions(+), 20 deletions(-) diff --git a/packages/workflow-code/src/canonicalize/branches.ts b/packages/workflow-code/src/canonicalize/branches.ts index ab34827b8ef..abfdab82a25 100644 --- a/packages/workflow-code/src/canonicalize/branches.ts +++ b/packages/workflow-code/src/canonicalize/branches.ts @@ -48,7 +48,7 @@ function parseRows(value: unknown): { rows: unknown[] | null; parsed: boolean } } /** Positional default keys mirror the copilot handles (validation.ts:1091-1130), quirk 8. */ -function positionalKeys(kind: CanonicalBranches['kind'], count: number): BranchKey[] { +export function positionalKeys(kind: CanonicalBranches['kind'], count: number): BranchKey[] { if (kind === 'router') return Array.from({ length: count }, (_, index) => `route${index}`) let elseIf = 0 return Array.from({ length: count }, (_, index) => { @@ -59,7 +59,11 @@ function positionalKeys(kind: CanonicalBranches['kind'], count: number): BranchK } /** The title the canvas shows (condition-input.tsx:395-401, 686-693; router line 921). */ -function positionalTitle(kind: CanonicalBranches['kind'], index: number, count: number): string { +export function positionalTitle( + kind: CanonicalBranches['kind'], + index: number, + count: number +): string { if (kind === 'router') return `Route ${index + 1}` if (index === 0) return 'if' if (index === count - 1) return 'else' @@ -70,7 +74,10 @@ function positionalTitle(kind: CanonicalBranches['kind'], index: number, count: * Ids a never-persisted (or unparseable, or empty) branch list answers to, keyed by default key: * `getConditionRows` / `getRouterRows` fallbacks (dynamic-handle-topology.ts:57-100), quirk 7. */ -function implicitIds(kind: CanonicalBranches['kind'], blockId: string): Record { +export function implicitIds( + kind: CanonicalBranches['kind'], + blockId: string +): Record { return kind === 'router' ? { route0: `${blockId}-route1` } : { if: `${blockId}-if`, else: `${blockId}-else` } diff --git a/packages/workflow-code/src/canonicalize/params.ts b/packages/workflow-code/src/canonicalize/params.ts index c07be14234b..54dae4f9d4d 100644 --- a/packages/workflow-code/src/canonicalize/params.ts +++ b/packages/workflow-code/src/canonicalize/params.ts @@ -42,7 +42,7 @@ export interface ParamsResult { } /** The declaration a stored value was written through: the current surface's copy first. */ -function declarationFor( +export function declarationFor( catalog: CatalogBlock | undefined, id: string, triggerMode: boolean @@ -52,7 +52,8 @@ function declarationFor( return declarations.find((subBlock) => subBlock.surface === surface) ?? declarations[0] } -function shouldDecode(declaration: CatalogSubBlock | undefined): boolean { +/** Whether canonicalize decodes this subBlock's JSON text (structured or json-string storage). */ +export function shouldDecode(declaration: CatalogSubBlock | undefined): boolean { if (!declaration || NEVER_DECODED_TYPES.has(declaration.type)) return false return declaration.structured !== undefined || declaration.storage === 'json-string' } diff --git a/packages/workflow-code/src/canonicalize/tools.ts b/packages/workflow-code/src/canonicalize/tools.ts index 454cdecc8c9..9e61f2b3cc5 100644 --- a/packages/workflow-code/src/canonicalize/tools.ts +++ b/packages/workflow-code/src/canonicalize/tools.ts @@ -1,12 +1,12 @@ import { isRecordLike, toRecord } from '@sim/utils/object' import { type CanonicalModeOverrides, scopeCanonicalModesForTool } from '../catalog/canonical-index' -import type { CatalogSubBlock } from '../catalog/types' +import type { BlockCatalog, CatalogSubBlock } from '../catalog/types' import type { BlockKey, CanonicalTool, Json, Value } from '../model' import { type CanonContext, catalogBlock } from './context' import { effectiveModes } from './modes' import { liftResourceId, liftResourceValue, toJson, toValue } from './values' -type ToolParamShape = 'string' | 'number' | 'boolean' | 'json' +export type ToolParamShape = 'string' | 'number' | 'boolean' | 'json' const OBJECT_VALUED_TYPES = new Set([ 'checkbox-list', @@ -59,8 +59,35 @@ function declaredShape(type: string | undefined): ToolParamShape { } } +/** + * The declaration and value shape of one stored tool param: the tool block's subBlock (by id or + * canonical id) wins, then the tool's declared param type, else `string`. + */ +export function toolParamDeclaration( + catalog: BlockCatalog, + tool: { type: string; toolId?: string }, + key: string +): { subBlock: CatalogSubBlock | undefined; shape: ToolParamShape } { + const block = Object.hasOwn(catalog.blocks, tool.type) ? catalog.blocks[tool.type] : undefined + const subBlock = block?.subBlocks.find( + (candidate) => candidate.id === key || candidate.canonicalParamId === key + ) + if (subBlock) return { subBlock, shape: subBlockShape(subBlock) } + const declaration = + tool.toolId && catalog.tools && Object.hasOwn(catalog.tools, tool.toolId) + ? catalog.tools[tool.toolId] + : undefined + return { + subBlock: undefined, + shape: + declaration && Object.hasOwn(declaration.params, key) + ? declaredShape(declaration.params[key].type) + : 'string', + } +} + /** `decodeToolParamValue` (tools/param-shape.ts:185-214): total, keeps `''` and any misfit. */ -function decodeToolParam(raw: unknown, shape: ToolParamShape): unknown { +export function decodeToolParam(raw: unknown, shape: ToolParamShape): unknown { if (typeof raw !== 'string' || raw === '') return raw switch (shape) { case 'boolean': { @@ -106,24 +133,13 @@ function liftTool( const type = stored.type const block = catalogBlock(context, type) const toolId = typeof stored.toolId === 'string' ? stored.toolId : undefined - const toolDeclaration = - toolId && context.catalog.tools && Object.hasOwn(context.catalog.tools, toolId) - ? context.catalog.tools[toolId] - : undefined const location = { blockKey, param } const rawParams = toRecord(stored.params) const params: Record = {} for (const [key, raw] of Object.entries(rawParams)) { if (raw === undefined) continue - const subBlock = block?.subBlocks.find( - (candidate) => candidate.id === key || candidate.canonicalParamId === key - ) - const shape = subBlock - ? subBlockShape(subBlock) - : toolDeclaration && Object.hasOwn(toolDeclaration.params, key) - ? declaredShape(toolDeclaration.params[key].type) - : 'string' + const { subBlock, shape } = toolParamDeclaration(context.catalog, { type, toolId }, key) const decoded = decodeToolParam(raw, shape) const lifted = subBlock?.valueKind === 'resource' && subBlock.resourceKind From 570d0728a84fd8a185087eecebbd94d20b3c7073 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 19:59:01 -0800 Subject: [PATCH 046/428] feat(workflow-code): materialize with identity resolution, and diffCanonical --- packages/workflow-code/src/diff/index.test.ts | 150 ++++ packages/workflow-code/src/diff/index.ts | 158 ++++ packages/workflow-code/src/index.ts | 2 + .../workflow-code/src/materialize/block.ts | 335 +++++++++ .../workflow-code/src/materialize/branches.ts | 48 ++ .../workflow-code/src/materialize/context.ts | 31 + .../workflow-code/src/materialize/edges.ts | 149 ++++ .../src/materialize/fixtures.test-helpers.ts | 324 ++++++++ .../workflow-code/src/materialize/identity.ts | 357 +++++++++ .../src/materialize/index.test.ts | 700 ++++++++++++++++++ .../workflow-code/src/materialize/index.ts | 289 ++++++++ .../workflow-code/src/materialize/modes.ts | 79 ++ .../workflow-code/src/materialize/params.ts | 225 ++++++ .../src/materialize/quirks.test-helpers.ts | 341 +++++++++ .../workflow-code/src/materialize/subflows.ts | 117 +++ .../workflow-code/src/materialize/values.ts | 189 +++++ 16 files changed, 3494 insertions(+) create mode 100644 packages/workflow-code/src/diff/index.test.ts create mode 100644 packages/workflow-code/src/diff/index.ts create mode 100644 packages/workflow-code/src/materialize/block.ts create mode 100644 packages/workflow-code/src/materialize/branches.ts create mode 100644 packages/workflow-code/src/materialize/context.ts create mode 100644 packages/workflow-code/src/materialize/edges.ts create mode 100644 packages/workflow-code/src/materialize/fixtures.test-helpers.ts create mode 100644 packages/workflow-code/src/materialize/identity.ts create mode 100644 packages/workflow-code/src/materialize/index.test.ts create mode 100644 packages/workflow-code/src/materialize/index.ts create mode 100644 packages/workflow-code/src/materialize/modes.ts create mode 100644 packages/workflow-code/src/materialize/params.ts create mode 100644 packages/workflow-code/src/materialize/quirks.test-helpers.ts create mode 100644 packages/workflow-code/src/materialize/subflows.ts create mode 100644 packages/workflow-code/src/materialize/values.ts diff --git a/packages/workflow-code/src/diff/index.test.ts b/packages/workflow-code/src/diff/index.test.ts new file mode 100644 index 00000000000..fca52031770 --- /dev/null +++ b/packages/workflow-code/src/diff/index.test.ts @@ -0,0 +1,150 @@ +import { omit } from '@sim/utils/object' +import { describe, expect, it } from 'vitest' +import type { LockIdentity } from '../lock' +import { + blockState, + canonical, + draftOf, + edge, + workflowState, +} from '../materialize/fixtures.test-helpers' +import type { CanonicalWorkflow } from '../model' +import { diffCanonical, renamesBetween } from '.' + +const base = canonical( + workflowState( + [ + blockState('start', 'start_trigger', 'Start'), + blockState('l1', 'loop', 'Each', {}, { data: { loopType: 'for', count: 2 } }), + blockState('a1', 'function', 'Fetch', { code: 'return 1' }), + blockState('a2', 'function', 'Report', { code: 'return 2' }), + blockState('s1', 'slack', 'Notify', { operation: 'send', channel: 'C1' }), + ], + { + edges: [edge('e1', 'start', 'a1'), edge('e2', 'a1', 'a2'), edge('e3', 'a2', 's1')], + variables: { + v1: { id: 'v1', name: 'Count', type: 'number', value: 1 }, + v2: { id: 'v2', name: 'Gone', type: 'string', value: '' }, + }, + } + ) +) + +function edit(change: (draft: CanonicalWorkflow) => void): CanonicalWorkflow { + const draft: CanonicalWorkflow = draftOf(base.workflow) + change(draft) + return draft +} + +function rename(draft: CanonicalWorkflow, from: string, to: string, name: string) { + draft.blocks[to] = { ...draft.blocks[from], key: to, name } + draft.blocks = omit(draft.blocks, [from]) + draft.edges = draft.edges.map((e) => ({ + ...e, + from: e.from === from ? to : e.from, + to: e.to === from ? to : e.to, + })) +} + +describe('diffCanonical', () => { + it('is a no-op for equal workflows, whatever the edge order and annotations', () => { + const target = edit((draft) => { + draft.edges.reverse() + draft.annotations.inactive = { fetch: ['code'] } + }) + expect(diffCanonical(base.workflow, target).noop).toBe(true) + }) + + it('names params, modes, attributes and reparenting per block', () => { + const target = edit((draft) => { + draft.blocks.fetch.params.code = { kind: 'value', value: 'return 3' } + draft.blocks.fetch.parent = 'each' + draft.blocks.notify.modes.channel = 'advanced' + draft.blocks.notify.enabled = false + draft.blocks.report.retry = { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 } + draft.meta.description = 'now described' + }) + const diff = diffCanonical(base.workflow, target) + expect(diff.noop).toBe(false) + expect(diff.meta).toEqual(['description']) + expect(diff.blocks.modified).toEqual([ + { + key: 'fetch', + baseKey: 'fetch', + changes: [ + { kind: 'attribute', attribute: 'parent' }, + { kind: 'param', param: 'code' }, + ], + }, + { key: 'report', baseKey: 'report', changes: [{ kind: 'attribute', attribute: 'retry' }] }, + { + key: 'notify', + baseKey: 'notify', + changes: [ + { kind: 'attribute', attribute: 'enabled' }, + { kind: 'mode', canonicalParamId: 'channel' }, + ], + }, + ]) + }) + + it('reports added and removed blocks, edges and variables', () => { + const target = edit((draft) => { + draft.blocks = omit(draft.blocks, ['report']) + draft.edges = draft.edges.filter((e) => e.from !== 'report' && e.to !== 'report') + draft.blocks.extra = { ...draft.blocks.fetch, key: 'extra', name: 'Extra' } + draft.edges.push({ from: 'fetch', port: { kind: 'error' }, to: 'extra' }) + draft.variables = omit(draft.variables, ['gone']) + draft.variables.count.value = 2 + draft.variables.fresh = { key: 'fresh', name: 'Fresh', type: 'plain', value: 'x' } + }) + const diff = diffCanonical(base.workflow, target) + expect(diff.blocks.added).toEqual(['extra']) + expect(diff.blocks.removed).toEqual(['report']) + expect(diff.edges.added).toEqual([{ from: 'fetch', port: { kind: 'error' }, to: 'extra' }]) + expect(diff.edges.removed).toEqual([ + { from: 'fetch', port: { kind: 'out' }, to: 'report' }, + { from: 'report', port: { kind: 'out' }, to: 'notify' }, + ]) + expect(diff.variables).toEqual({ added: ['fresh'], removed: ['gone'], modified: ['count'] }) + }) + + it('pairs a rename through renames so no edge moves, and without it removes plus adds', () => { + const target = edit((draft) => rename(draft, 'fetch', 'load', 'Load')) + const paired = diffCanonical(base.workflow, target, new Map([['load', 'fetch']])) + expect(paired.blocks.renamed).toEqual([{ from: 'fetch', to: 'load' }]) + expect(paired.blocks.added).toEqual([]) + expect(paired.blocks.modified).toEqual([ + { key: 'load', baseKey: 'fetch', changes: [{ kind: 'attribute', attribute: 'name' }] }, + ]) + expect(paired.edges).toEqual({ added: [], removed: [] }) + + const unpaired = diffCanonical(base.workflow, target) + expect(unpaired.blocks.added).toEqual(['load']) + expect(unpaired.blocks.removed).toEqual(['fetch']) + expect(unpaired.edges.added).toHaveLength(2) + }) + + it('maps a renamed parent to its base key before comparing parents', () => { + const nested = edit((draft) => { + draft.blocks.fetch.parent = 'each' + }) + const target = draftOf(nested) + rename(target, 'each', 'every', 'Every') + target.blocks.fetch.parent = 'every' + const diff = diffCanonical(nested, target, new Map([['every', 'each']])) + expect(diff.blocks.modified.map((m) => m.key)).toEqual(['every']) + }) + + it('derives renames from two identities by block id', () => { + const target = edit((draft) => rename(draft, 'fetch', 'load', 'Load')) + const blocks: LockIdentity['blocks'] = { + ...base.identity.blocks, + load: base.identity.blocks.fetch, + } + const targetIdentity = { ...base.identity, blocks: omit(blocks, ['fetch']) } + const renames = renamesBetween(base.identity, targetIdentity) + expect([...renames]).toEqual([['load', 'fetch']]) + expect(diffCanonical(base.workflow, target, renames).blocks.added).toEqual([]) + }) +}) diff --git a/packages/workflow-code/src/diff/index.ts b/packages/workflow-code/src/diff/index.ts new file mode 100644 index 00000000000..f6b5e4c00f2 --- /dev/null +++ b/packages/workflow-code/src/diff/index.ts @@ -0,0 +1,158 @@ +/** + * `diffCanonical`: a key-based diff of two CWMs, the input to the apply path's source diff summary + * (s4 `SourceDiffSummary`). Like every CWM comparison it ignores `annotations`, key order and edge + * order. + */ + +import { portKey } from '../anchors' +import type { + BlockAttribute, + BlockChange, + CanonicalBlockDiff, + CanonicalDiff, + DiffCanonicalFn, +} from '../api' +import type { LockIdentity } from '../lock' +import { deepEqual } from '../materialize/values' +import type { BlockKey, CanonicalBlock, CanonicalEdge, CanonicalWorkflowMeta } from '../model' + +const META_FIELDS: Array = ['name', 'description'] + +const ATTRIBUTES: Array> = [ + 'name', + 'type', + 'enabled', + 'locked', + 'triggerMode', + 'advancedMode', + 'errorPort', + 'retry', + 'branches', + 'subflow', + 'opaque', +] + +function unionKeys(left: object | undefined, right: object | undefined): string[] { + return [...new Set([...Object.keys(left ?? {}), ...Object.keys(right ?? {})])] +} + +function blockChanges( + base: CanonicalBlock, + target: CanonicalBlock, + baseKeyOf: (targetKey: BlockKey) => BlockKey +): BlockChange[] { + const changes: BlockChange[] = [] + for (const attribute of ATTRIBUTES) { + if (!deepEqual(base[attribute], target[attribute])) { + changes.push({ kind: 'attribute', attribute }) + } + } + const targetParent = target.parent === null ? null : baseKeyOf(target.parent) + if (base.parent !== targetParent) changes.push({ kind: 'attribute', attribute: 'parent' }) + for (const param of unionKeys(base.params, target.params)) { + if (!deepEqual(base.params[param], target.params[param])) changes.push({ kind: 'param', param }) + } + for (const canonicalParamId of unionKeys(base.modes, target.modes)) { + if (base.modes[canonicalParamId] !== target.modes[canonicalParamId]) { + changes.push({ kind: 'mode', canonicalParamId }) + } + } + return changes +} + +function edgeKey(edge: CanonicalEdge, keyOf: (key: BlockKey) => BlockKey): string { + return `${keyOf(edge.from)}\u0000${portKey(edge.port)}\u0000${keyOf(edge.to)}` +} + +/** + * Diffs base against target. `renames` (target key → base key) pairs blocks whose key changed; + * without it a rename is a remove plus an add. A rename pair whose base key is missing, or that + * names a base key a target block of the same key also claims, is ignored. Edges are compared + * after mapping target keys to base keys, so a rename alone moves no edge. + */ +export const diffCanonical: DiffCanonicalFn = (base, target, renames) => { + const pairs = new Map() + const claimedBase = new Set() + for (const [targetKey, baseKey] of renames ?? []) { + if ( + Object.hasOwn(target.blocks, targetKey) && + Object.hasOwn(base.blocks, baseKey) && + !Object.hasOwn(target.blocks, baseKey) && + !claimedBase.has(baseKey) + ) { + pairs.set(targetKey, baseKey) + claimedBase.add(baseKey) + } + } + for (const targetKey of Object.keys(target.blocks)) { + if (pairs.has(targetKey) || claimedBase.has(targetKey)) continue + if (Object.hasOwn(base.blocks, targetKey)) { + pairs.set(targetKey, targetKey) + claimedBase.add(targetKey) + } + } + const baseKeyOf = (targetKey: BlockKey) => pairs.get(targetKey) ?? targetKey + + const added = Object.keys(target.blocks).filter((key) => !pairs.has(key)) + const removed = Object.keys(base.blocks).filter((key) => !claimedBase.has(key)) + const renamed: CanonicalDiff['blocks']['renamed'] = [] + const modified: CanonicalBlockDiff[] = [] + for (const [targetKey, baseKey] of pairs) { + if (targetKey !== baseKey) renamed.push({ from: baseKey, to: targetKey }) + const changes = blockChanges(base.blocks[baseKey], target.blocks[targetKey], baseKeyOf) + if (changes.length > 0) modified.push({ key: targetKey, baseKey, changes }) + } + + const identityKey = (key: BlockKey) => key + const baseEdges = new Set(base.edges.map((edge) => edgeKey(edge, identityKey))) + const targetEdges = new Set(target.edges.map((edge) => edgeKey(edge, baseKeyOf))) + const edges = { + added: target.edges.filter((edge) => !baseEdges.has(edgeKey(edge, baseKeyOf))), + removed: base.edges.filter((edge) => !targetEdges.has(edgeKey(edge, identityKey))), + } + + const variables: CanonicalDiff['variables'] = { added: [], removed: [], modified: [] } + for (const key of unionKeys(base.variables, target.variables)) { + const before = base.variables[key] + const after = target.variables[key] + if (!before) variables.added.push(key) + else if (!after) variables.removed.push(key) + else if (!deepEqual(before, after)) variables.modified.push(key) + } + + const meta = META_FIELDS.filter((field) => base.meta[field] !== target.meta[field]) + const noop = + meta.length === 0 && + added.length === 0 && + removed.length === 0 && + renamed.length === 0 && + modified.length === 0 && + edges.added.length === 0 && + edges.removed.length === 0 && + variables.added.length === 0 && + variables.removed.length === 0 && + variables.modified.length === 0 + + return { + noop, + meta, + blocks: { added, removed, renamed, modified }, + edges, + variables, + } +} + +/** + * Block renames between two identities of one workflow (target key → base key): every block id + * both carry under different keys. This is the `renames` input `diffCanonical` takes, from the + * stored graph's identity and `materialize`'s. + */ +export function renamesBetween(base: LockIdentity, target: LockIdentity): Map { + const baseKeyById = new Map(Object.entries(base.blocks).map(([key, block]) => [block.id, key])) + const renames = new Map() + for (const [key, block] of Object.entries(target.blocks)) { + const baseKey = baseKeyById.get(block.id) + if (baseKey !== undefined && baseKey !== key) renames.set(key, baseKey) + } + return renames +} diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index 7d63baf4054..01f6859f5a3 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -88,6 +88,7 @@ export { type LocatedDiagnostic, type SourceSpan, } from './diagnostics/frame' +export { diffCanonical, renamesBetween } from './diff' export { canonicalEquals, canonicalHash, sourceFingerprint } from './equivalence' export { sha256Hex, stableStringify } from './hash' export { @@ -104,6 +105,7 @@ export { type WorkflowLockBlock, type WorkflowLockV1, } from './lock' +export { materialize } from './materialize' export type { Anchor, AnchorKey, diff --git a/packages/workflow-code/src/materialize/block.ts b/packages/workflow-code/src/materialize/block.ts new file mode 100644 index 00000000000..e7fc7cf1678 --- /dev/null +++ b/packages/workflow-code/src/materialize/block.ts @@ -0,0 +1,335 @@ +import { isRecordLike, omit } from '@sim/utils/object' +import type { BlockData, BlockState, SubBlockState } from '@sim/workflow-types/workflow' +import { implicitIds } from '../canonicalize/branches' +import { declarationFor, isExcludedSubBlockId } from '../canonicalize/params' +import { SUBFLOW_DATA_KEYS } from '../canonicalize/subflows' +import type { LockItem, LockLayout, WorkflowLockBlock } from '../lock' +import type { BlockKey, BranchKey, CanonicalBlock, SubBlockId } from '../model' +import { writeBranches } from './branches' +import { catalogBlock, type MaterializeContext } from './context' +import type { ResolvedBlock } from './identity' +import { storedModes, writeBlockModes, writeToolModes } from './modes' +import { encodeParam, matchPrevTools, parseStoredList } from './params' +import { writeSubflowData } from './subflows' +import { deepEqual } from './values' + +/** `block.data` keys the model or the layout owns on any block; everything else is `opaque`. */ +const MODEL_DATA_KEYS = new Set(['parentId', 'extent', 'width', 'height', 'canonicalModes']) + +export interface BlockInputs { + key: BlockKey + target: CanonicalBlock + resolved: ResolvedBlock + parentId: string | null + /** The stored block this one continues, with its canonical form and stored ids. */ + prev?: { + block: BlockState + canonical: CanonicalBlock + parentId: string | null + branchIds: Record | undefined + items: Record | undefined + } + /** The lock entry whose id this block carries (branch and item ids). */ + lockBlock: WorkflowLockBlock | undefined + /** The lock layout recorded under this key. */ + layout: LockLayout | undefined + layoutMode: 'preserve' | 'lock' +} + +export interface BuiltBlock { + block: BlockState + /** Branch key → row id, for edge handles and the identity. */ + branchIds: Record | undefined + items: Record + needsLayout: boolean +} + +function applyLayout(block: BlockState, layout: LockLayout): BlockState { + const next: BlockState = { ...block, position: { x: layout.x, y: layout.y } } + if (layout.height !== undefined) next.height = layout.height + if (layout.horizontalHandles !== undefined) next.horizontalHandles = layout.horizontalHandles + if (layout.w !== undefined || layout.h !== undefined) { + const data: Record = { ...block.data } + if (layout.w !== undefined) data.width = layout.w + if (layout.h !== undefined) data.height = layout.h + next.data = data as BlockData + } + return next +} + +/** Every pair is compared except the key and parent, which the caller compares by id. */ +function sameBlock(left: CanonicalBlock, right: CanonicalBlock): boolean { + return deepEqual(omit(left, ['key', 'parent']), omit(right, ['key', 'parent'])) +} + +/** + * inputFormat ids as canonicalize lifts them into the lock: fields with an id and a name no other + * field shares (canonicalize/params.ts `liftInputFormat`). + */ +function storedItems(raw: unknown): LockItem[] { + const list = parseStoredList(raw).filter(isRecordLike) + const counts = new Map() + for (const item of list) { + if (typeof item.name === 'string') counts.set(item.name, (counts.get(item.name) ?? 0) + 1) + } + const items: LockItem[] = [] + for (const { name, id } of list) { + if (typeof name === 'string' && typeof id === 'string' && counts.get(name) === 1) { + items.push({ name, id }) + } + } + return items +} + +/** The ids a stored-but-unliftable branch value answers to (canonicalize/branches.ts). */ +function unliftedBranchIds( + kind: 'condition' | 'router', + blockId: string, + raw: unknown +): Record { + if (Array.isArray(raw)) return {} + if (typeof raw !== 'string' || raw.trim() === '') return implicitIds(kind, blockId) + try { + return Array.isArray(JSON.parse(raw)) ? {} : implicitIds(kind, blockId) + } catch { + return implicitIds(kind, blockId) + } +} + +function rawValues(subBlocks: Record): Record { + const values: Record = {} + for (const [id, subBlock] of Object.entries(subBlocks)) values[id] = subBlock?.value + return values +} + +/** + * One block of the materialized graph (s1 materialize steps 2–7). A block canonical-equal to the + * prev block it continues, under the same parent id, is prev's stored object unchanged. Otherwise + * it starts from prev (or `hooks.initBlock` for a new block), keeps every server-owned field + * prev had (runtime trigger subBlocks, stored outputs, subBlock type metadata; s1 D6), and writes + * only what changed. Stored outputs are recomputed only when something they derive from changed. + */ +export function buildBlock(inputs: BlockInputs, context: MaterializeContext): BuiltBlock { + const { key, target, resolved, prev } = inputs + const id = resolved.id + const lockLayout = inputs.layoutMode === 'lock' ? inputs.layout : undefined + + if ( + prev && + resolved.entry.status === 'matched' && + resolved.entry.retypedFrom === undefined && + inputs.parentId === prev.parentId && + sameBlock(target, prev.canonical) + ) { + return { + block: lockLayout ? applyLayout(prev.block, lockLayout) : prev.block, + branchIds: prev.branchIds, + items: prev.items ?? {}, + needsLayout: false, + } + } + + const before = prev?.canonical + const base = + prev?.block ?? + context.hooks.initBlock({ + id, + type: target.type, + name: target.name, + triggerMode: target.triggerMode, + }) + const isNew = !prev + let block: BlockState = { ...base, id, name: target.name } + const data: Record = { ...base.data } + const subBlocks: Record = { ...base.subBlocks } + let outputsDirty = isNew + + if (block.type !== target.type) { + block.type = target.type + outputsDirty = true + } + if (!before || before.enabled !== target.enabled) block.enabled = target.enabled + if (!before || before.locked !== target.locked) block.locked = target.locked + if (!before || before.triggerMode !== target.triggerMode) { + block.triggerMode = target.triggerMode + outputsDirty = true + } + if (!before || before.advancedMode !== target.advancedMode) { + block.advancedMode = target.advancedMode + outputsDirty = true + } + if (!before || !deepEqual(before.retry, target.retry)) { + block = + target.retry === null ? omit(block, ['retry']) : { ...block, retry: { ...target.retry } } + } + + const catalog = catalogBlock(context.catalog, target.type) + const branchSpec = catalog?.graph.branches + const branchSubBlockId = branchSpec?.subBlockId + const itemSources = (subBlockId: SubBlockId): LockItem[] => [ + ...(inputs.lockBlock?.items?.[subBlockId] ?? []), + ...(prev?.items?.[subBlockId] ?? []), + ] + + const paramIds = new Set([...Object.keys(target.params), ...Object.keys(before?.params ?? {})]) + for (const paramId of paramIds) { + const next = target.params[paramId] + const previous = before?.params[paramId] + if (next && previous && deepEqual(next, previous)) continue + outputsDirty = true + const existing = subBlocks[paramId] + if (!next) { + if (existing) subBlocks[paramId] = { ...existing, value: null } + continue + } + const declaration = declarationFor(catalog, paramId, target.triggerMode) + const value = encodeParam( + next, + { + blockKey: key, + param: paramId, + declaration, + prevRaw: existing?.value, + prevParam: previous, + itemIds: itemSources(paramId), + forceText: paramId === branchSubBlockId, + }, + context + ) + subBlocks[paramId] = { + ...(existing ?? { id: paramId, type: declaration?.type ?? 'short-input' }), + value: value as SubBlockState['value'], + } + } + if (isNew) { + for (const [subBlockId, subBlock] of Object.entries(subBlocks)) { + if ( + Object.hasOwn(target.params, subBlockId) || + subBlockId === branchSubBlockId || + isExcludedSubBlockId(subBlockId) || + subBlock?.value === null || + subBlock?.value === undefined + ) { + continue + } + subBlocks[subBlockId] = { ...subBlock, value: null } + } + } + + let branchIds: Record | undefined + if (branchSpec && target.branches) { + const subBlockId = branchSpec.subBlockId + if (Object.hasOwn(target.params, subBlockId)) { + branchIds = unliftedBranchIds(branchSpec.kind, id, subBlocks[subBlockId]?.value) + } else if (before?.branches && deepEqual(before.branches, target.branches)) { + branchIds = prev?.branchIds + } else { + outputsDirty = true + const write = writeBranches( + target.branches, + id, + [resolved.lockOwned ? inputs.lockBlock?.branches : undefined, prev?.branchIds], + context + ) + const existing = subBlocks[subBlockId] + if (write.value !== null) { + subBlocks[subBlockId] = { + ...(existing ?? { + id: subBlockId, + type: branchSpec.kind === 'condition' ? 'condition-input' : 'router-input', + }), + value: write.value, + } + } else if (existing && existing.value !== null && existing.value !== undefined) { + subBlocks[subBlockId] = { ...existing, value: null } + } + branchIds = target.branches.rows === null ? implicitIds(branchSpec.kind, id) : write.ids + } + } + + const nextOpaque = target.opaque?.data ?? {} + if (catalog && !Object.hasOwn(nextOpaque, 'canonicalModes')) { + const original = storedModes(data) + let modes = writeBlockModes( + original ?? {}, + target.modes, + catalog, + rawValues(subBlocks), + target.advancedMode + ) + for (const [paramId, param] of Object.entries(target.params)) { + if (param.kind !== 'tools') continue + const previous = before?.params[paramId] + if (previous && deepEqual(param, previous)) continue + modes = writeToolModes( + modes, + param.tools, + parseStoredList(subBlocks[paramId]?.value), + matchPrevTools(param.tools, previous?.kind === 'tools' ? previous.tools : []), + context.catalog + ) + } + if (!deepEqual(modes, original ?? {})) { + data.canonicalModes = modes + outputsDirty = true + } + } + + if (target.subflow && (!before || !deepEqual(before.subflow, target.subflow))) { + writeSubflowData(data, target.subflow, new Set(Object.keys(nextOpaque))) + } + + const prevOpaque = before?.opaque?.data ?? {} + if (isNew || !deepEqual(prevOpaque, nextOpaque)) { + for (const dataKey of Object.keys(prevOpaque)) { + if (!Object.hasOwn(nextOpaque, dataKey)) delete data[dataKey] + } + for (const [dataKey, value] of Object.entries(nextOpaque)) { + if (!deepEqual(data[dataKey], value)) data[dataKey] = value + } + } + if (isNew) { + const isContainer = target.type === 'loop' || target.type === 'parallel' + for (const dataKey of Object.keys(data)) { + const owned = MODEL_DATA_KEYS.has(dataKey) || (isContainer && SUBFLOW_DATA_KEYS.has(dataKey)) + if (!owned && !Object.hasOwn(nextOpaque, dataKey)) delete data[dataKey] + } + } + + if (isNew || inputs.parentId !== prev?.parentId) { + if (inputs.parentId !== null) { + data.parentId = inputs.parentId + data.extent = 'parent' + } else { + const dropped = ['parentId', 'extent'].filter( + (dataKey) => + !Object.hasOwn(nextOpaque, dataKey) && + (dataKey === 'parentId' || data[dataKey] === 'parent') + ) + for (const dataKey of dropped) delete data[dataKey] + } + } + + block.data = data as BlockData + block.subBlocks = subBlocks + if (outputsDirty) block.outputs = context.hooks.computeOutputs(block) + + let built = block + let needsLayout = false + if (isNew) { + if (inputs.layout) built = applyLayout(block, inputs.layout) + else needsLayout = true + } else if (lockLayout) { + built = applyLayout(block, lockLayout) + } + + const items: Record = {} + for (const [paramId, param] of Object.entries(target.params)) { + if (param.kind !== 'value') continue + const declaration = declarationFor(catalog, paramId, target.triggerMode) + if (declaration?.structured !== 'inputFormat') continue + const found = storedItems(subBlocks[paramId]?.value) + if (found.length > 0) items[paramId] = found + } + return { block: built, branchIds, items, needsLayout } +} diff --git a/packages/workflow-code/src/materialize/branches.ts b/packages/workflow-code/src/materialize/branches.ts new file mode 100644 index 00000000000..cef08d192d0 --- /dev/null +++ b/packages/workflow-code/src/materialize/branches.ts @@ -0,0 +1,48 @@ +import { positionalKeys, positionalTitle } from '../canonicalize/branches' +import type { BranchKey, CanonicalBranches } from '../model' +import type { MaterializeContext } from './context' + +export interface BranchWrite { + /** The stored subBlock value: JSON text, or `null` for never-persisted rows. */ + value: string | null + /** Branch key → row id, as written. */ + ids: Record +} + +/** + * Writes condition/router rows (s1 materialize step 5, quirks 4–8). Each row keeps the id its key + * had (the lock's, then prev's, including the implicit `${blockId}-if` a never-persisted list + * answered to); a new row gets `${blockId}-${newId()}`, which keeps `remapConditionBlockIds` + * working (condition-ids.ts:13-28). Titles are positional unless the row overrides one or stored + * none. The row `key` is persisted only when it differs from the positional default, so a lockless + * read gets the same keys back (s1 D2b). `rows: null` stays `null`. The list is always text: the + * canvas reads it with `toString()` and a stored array breaks it (condition-input.tsx:376-401). + */ +export function writeBranches( + branches: CanonicalBranches, + blockId: string, + knownIds: ReadonlyArray | undefined>, + context: MaterializeContext +): BranchWrite { + if (branches.rows === null) return { value: null, ids: {} } + const rows = branches.rows + const defaults = positionalKeys(branches.kind, rows.length) + const used = new Set() + const ids: Record = {} + const stored = rows.map((row, index) => { + const known = knownIds + .map((source) => source?.[row.key]) + .find((id): id is string => id !== undefined && !used.has(id)) + const id = known ?? `${blockId}-${context.hooks.newId()}` + used.add(id) + ids[row.key] = id + const entry: Record = { id } + if (row.titleOverride !== undefined) entry.title = row.titleOverride + else if (!row.titleMissing) entry.title = positionalTitle(branches.kind, index, rows.length) + entry.value = row.value + if (row.key !== defaults[index]) entry.key = row.key + for (const [field, value] of Object.entries(row.extra ?? {})) entry[field] = value + return entry + }) + return { value: JSON.stringify(stored), ids } +} diff --git a/packages/workflow-code/src/materialize/context.ts b/packages/workflow-code/src/materialize/context.ts new file mode 100644 index 00000000000..8ec2d3be61f --- /dev/null +++ b/packages/workflow-code/src/materialize/context.ts @@ -0,0 +1,31 @@ +import type { MaterializeHooks, ResourceKeyResolver } from '../api' +import type { BlockCatalog, CatalogBlock } from '../catalog/types' +import type { MaterializeDiagnosticCode } from '../diagnostics/codes' +import type { Diagnostic } from '../diagnostics/frame' +import type { VarKey } from '../model' + +/** State shared by the materialize steps of one call. */ +export interface MaterializeContext { + catalog: BlockCatalog + hooks: MaterializeHooks + resources?: ResourceKeyResolver + diagnostics: Diagnostic[] + /** Variable key → the id it is written as. */ + variableIdByKey: Map +} + +export function report( + context: Pick, + diagnostic: Diagnostic +): void { + context.diagnostics.push(diagnostic) +} + +export function catalogBlock( + catalog: BlockCatalog, + type: string | undefined +): CatalogBlock | undefined { + return type !== undefined && Object.hasOwn(catalog.blocks, type) + ? catalog.blocks[type] + : undefined +} diff --git a/packages/workflow-code/src/materialize/edges.ts b/packages/workflow-code/src/materialize/edges.ts new file mode 100644 index 00000000000..f3e3138d465 --- /dev/null +++ b/packages/workflow-code/src/materialize/edges.ts @@ -0,0 +1,149 @@ +import { + type BlockState, + getWorkflowSubflowHandleIds, + normalizeWorkflowEdgeSourceHandle, + WORKFLOW_ERROR_HANDLE_ID, + WORKFLOW_SOURCE_HANDLE_ID, +} from '@sim/workflow-types/workflow' +import type { Edge } from '@xyflow/react' +import type { BlockKey, BranchKey, CanonicalEdge } from '../model' +import type { MaterializeContext } from './context' + +const TARGET_HANDLE = 'target' + +/** A block's branch handles: the handle prefix and the row ids its keys stand for. */ +export interface BranchHandles { + prefix: 'condition-' | 'router-' + ids: Record +} + +/** + * `(source id, port, target id)` with a branch port named by row id, so a stored edge and a + * compiled one compare without keys. Mirrors canonicalize's port mapping (edges.ts `sourcePort`). + */ +function storedTupleKey( + edge: Edge, + blocks: Record, + branches: ReadonlyMap +): string { + const handle = normalizeWorkflowEdgeSourceHandle(edge.sourceHandle) + return `${edge.source}\u0000${storedPort(handle, blocks[edge.source], edge.source, branches)}\u0000${edge.target}` +} + +function storedPort( + handle: string | null, + source: BlockState | undefined, + sourceId: string, + branches: ReadonlyMap +): string { + if (handle === null || handle === WORKFLOW_SOURCE_HANDLE_ID) return 'out' + if (handle === WORKFLOW_ERROR_HANDLE_ID) return 'error' + if (source && (source.type === 'loop' || source.type === 'parallel')) { + const { start, end } = getWorkflowSubflowHandleIds(source.type) + if (handle === start) return 'subflowStart' + if (handle === end) return 'subflowEnd' + } + const handles = branches.get(sourceId) + if (handles && handle.startsWith(handles.prefix)) { + const rowId = handle.slice(handles.prefix.length) + if (Object.values(handles.ids).includes(rowId)) return `branch:${rowId}` + } + return `raw:${handle}` +} + +/** The stored source handle a compiled port is written as. */ +function sourceHandle( + edge: CanonicalEdge, + source: BlockState, + sourceId: string, + branches: ReadonlyMap +): string { + switch (edge.port.kind) { + case 'out': + return WORKFLOW_SOURCE_HANDLE_ID + case 'error': + return WORKFLOW_ERROR_HANDLE_ID + case 'raw': + return edge.port.handle + case 'subflowStart': + case 'subflowEnd': { + const type = source.type === 'parallel' ? 'parallel' : 'loop' + const handles = getWorkflowSubflowHandleIds(type) + return edge.port.kind === 'subflowStart' ? handles.start : handles.end + } + case 'branch': { + const handles = branches.get(sourceId) + const prefix = handles?.prefix ?? 'condition-' + return `${prefix}${handles?.ids[edge.port.key] ?? `${sourceId}-${edge.port.key}`}` + } + } +} + +export interface EdgeInputs { + edges: CanonicalEdge[] + idByKey: ReadonlyMap + blocks: Record + branches: ReadonlyMap + prevEdges: readonly Edge[] + prevBlocks: Record + prevBranches: ReadonlyMap +} + +/** + * Edges by tuple (s1 D5, contract amendment 9). Every prev edge whose tuple the workflow still has + * is kept as the whole stored object (id, handles and extra fields), in stored order, including + * duplicates of one tuple. A prev edge that already dangled in prev is kept unless an endpoint was + * deleted now. Each remaining compiled edge is appended as a new edge in the editor's shape + * (editing/builders.ts `createValidatedEdge`). + */ +export function writeEdges(inputs: EdgeInputs, context: MaterializeContext): Edge[] { + const wanted = new Map() + for (const edge of inputs.edges) { + const from = inputs.idByKey.get(edge.from) + const to = inputs.idByKey.get(edge.to) + if (from === undefined || to === undefined) continue + const source = inputs.blocks[from] + const handle = sourceHandle(edge, source, from, inputs.branches) + const port = storedPort( + normalizeWorkflowEdgeSourceHandle(handle), + source, + from, + inputs.branches + ) + wanted.set(`${from}\u0000${port}\u0000${to}`, edge) + } + + const result: Edge[] = [] + const kept = new Set() + for (const edge of inputs.prevEdges) { + const sourceKnown = Object.hasOwn(inputs.prevBlocks, edge.source) + const targetKnown = Object.hasOwn(inputs.prevBlocks, edge.target) + if (!sourceKnown || !targetKnown) { + const survives = + (!sourceKnown || Object.hasOwn(inputs.blocks, edge.source)) && + (!targetKnown || Object.hasOwn(inputs.blocks, edge.target)) + if (survives) result.push(edge) + continue + } + const key = storedTupleKey(edge, inputs.prevBlocks, inputs.prevBranches) + if (!wanted.has(key)) continue + result.push(edge) + kept.add(key) + } + + for (const [key, edge] of wanted) { + if (kept.has(key)) continue + const from = inputs.idByKey.get(edge.from) + const to = inputs.idByKey.get(edge.to) + if (from === undefined || to === undefined) continue + result.push({ + id: context.hooks.newId(), + source: from, + sourceHandle: sourceHandle(edge, inputs.blocks[from], from, inputs.branches), + target: to, + targetHandle: TARGET_HANDLE, + type: 'default', + }) + } + return result +} diff --git a/packages/workflow-code/src/materialize/fixtures.test-helpers.ts b/packages/workflow-code/src/materialize/fixtures.test-helpers.ts new file mode 100644 index 00000000000..c2999b10663 --- /dev/null +++ b/packages/workflow-code/src/materialize/fixtures.test-helpers.ts @@ -0,0 +1,324 @@ +/** + * Shared fixtures for the materialize and diff tests: a catalog hand-projected from real registry + * configs (apps/sim/blocks/blocks: slack.ts, agent.ts, condition.ts, router_v2.ts, function.ts, + * variables.ts, api.ts, start_trigger.ts, knowledge.ts, schedule.ts) down to the fields + * canonicalize and materialize read, stored-state builders, and deterministic hooks. + */ + +import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' +import type { MaterializeHooks, ResourceKeyResolver } from '../api' +import { canonicalize } from '../canonicalize' +import type { BlockCatalog, CatalogBlock, CatalogSubBlock } from '../catalog/types' +import type { WorkflowLockV1 } from '../lock' +import type { CanonicalWorkflow } from '../model' + +function sb( + fields: Partial & Pick +): CatalogSubBlock { + return { valueKind: 'string', storage: 'native', ...fields } +} + +function block( + type: string, + subBlocks: CatalogSubBlock[], + extra: Partial = {} +): CatalogBlock { + return { + type, + name: type, + category: 'blocks', + subBlocks, + tools: { access: [], selector: 'single' }, + inputs: {}, + outputs: {}, + graph: { canBeTarget: true, errorPort: true, container: null, annotationOnly: false }, + ...extra, + } +} + +const BRANCH_GRAPH = { canBeTarget: true, errorPort: false, container: null, annotationOnly: false } + +export const CATALOG: BlockCatalog = { + catalogVersion: 1, + hash: 'fixture', + sdkMajor: 1, + builders: {}, + triggers: {}, + tools: { + slack_message: { + id: 'slack_message', + params: { limit: { type: 'number', visibility: 'user-or-llm' } }, + outputs: {}, + }, + }, + blocks: { + slack: block('slack', [ + sb({ id: 'operation', type: 'dropdown' }), + sb({ + id: 'credential', + type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', + valueKind: 'resource', + resourceKind: 'credential', + }), + sb({ + id: 'manualCredential', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + }), + sb({ + id: 'channel', + type: 'channel-selector', + canonicalParamId: 'channel', + mode: 'basic', + valueKind: 'picked', + }), + sb({ + id: 'manualChannel', + type: 'short-input', + canonicalParamId: 'channel', + mode: 'advanced', + }), + sb({ id: 'text', type: 'long-input', condition: { field: 'operation', value: 'send' } }), + sb({ id: 'threadTs', type: 'short-input', mode: 'advanced' }), + sb({ id: 'notify', type: 'switch', valueKind: 'boolean' }), + sb({ id: 'botToken', type: 'short-input', mode: 'trigger', surface: 'trigger' }), + sb({ id: 'webhookId', type: 'short-input', mode: 'trigger', surface: 'trigger' }), + sb({ id: 'triggerPath', type: 'short-input', mode: 'trigger', surface: 'trigger' }), + sb({ id: 'triggerConfig', type: 'short-input', mode: 'trigger', surface: 'trigger' }), + ]), + agent: block('agent', [ + sb({ id: 'messages', type: 'messages-input', valueKind: 'json' }), + sb({ id: 'model', type: 'combobox' }), + sb({ + id: 'tools', + type: 'tool-input', + valueKind: 'tools', + structured: 'tools', + storage: 'json-string', + }), + sb({ id: 'responseFormat', type: 'code', valueKind: 'code', language: 'json' }), + ]), + knowledge: block('knowledge', [ + sb({ + id: 'knowledgeBaseIds', + type: 'knowledge-base-selector', + multiple: true, + valueKind: 'resource', + resourceKind: 'knowledge-base', + }), + sb({ + id: 'tagFilters', + type: 'knowledge-tag-filters', + valueKind: 'json', + storage: 'json-string', + }), + ]), + condition: block( + 'condition', + [ + sb({ + id: 'conditions', + type: 'condition-input', + valueKind: 'branches', + structured: 'branches', + storage: 'json-string', + }), + ], + { graph: { ...BRANCH_GRAPH, branches: { subBlockId: 'conditions', kind: 'condition' } } } + ), + router_v2: block( + 'router_v2', + [ + sb({ id: 'context', type: 'long-input' }), + sb({ + id: 'routes', + type: 'router-input', + valueKind: 'branches', + structured: 'branches', + storage: 'json-string', + }), + ], + { graph: { ...BRANCH_GRAPH, branches: { subBlockId: 'routes', kind: 'router' } } } + ), + function: block('function', [ + sb({ id: 'language', type: 'dropdown' }), + sb({ id: 'code', type: 'code', valueKind: 'code' }), + ]), + function_v0: block('function_v0', [sb({ id: 'code', type: 'code', valueKind: 'code' })], { + lifecycle: { sunset: { status: 'legacy', replacedBy: 'function' } }, + }), + variables: block('variables', [ + sb({ id: 'variables', type: 'variables-input', valueKind: 'json', structured: 'variables' }), + ]), + api: block('api', [ + sb({ id: 'url', type: 'short-input' }), + sb({ + id: 'headers', + type: 'table', + valueKind: 'array', + structured: 'tableRows', + columns: ['Key', 'Value'], + }), + ]), + start_trigger: block( + 'start_trigger', + [ + sb({ + id: 'inputFormat', + type: 'input-format', + valueKind: 'array', + structured: 'inputFormat', + }), + ], + { category: 'triggers' } + ), + schedule: block( + 'schedule', + [ + sb({ id: 'scheduleType', type: 'dropdown' }), + sb({ id: 'cronExpression', type: 'short-input' }), + ], + { category: 'triggers' } + ), + }, +} + +/** Deterministic hooks: sequential ids, editor-like new blocks, and a marker output shape. */ +export function fixtureHooks(prefix = 'new'): MaterializeHooks & { minted: string[] } { + let next = 0 + const minted: string[] = [] + return { + minted, + newId: () => { + next += 1 + const id = `${prefix}-${next}` + minted.push(id) + return id + }, + initBlock: ({ id, type, name, triggerMode }) => { + const config = CATALOG.blocks[type] + const subBlocks: BlockState['subBlocks'] = {} + for (const subBlock of config?.subBlocks ?? []) { + subBlocks[subBlock.id] = { id: subBlock.id, type: subBlock.type, value: null } + } + if (type === 'condition') { + subBlocks.conditions = { + id: 'conditions', + type: 'condition-input', + value: JSON.stringify([ + { id: 'seed-if', title: 'if', value: '' }, + { id: 'seed-else', title: 'else', value: '' }, + ]), + } + } + if (type === 'function') subBlocks.language.value = 'javascript' + return { + id, + type, + name, + position: { x: 0, y: 0 }, + enabled: true, + horizontalHandles: true, + advancedMode: false, + height: 0, + triggerMode, + subBlocks, + outputs: { seeded: { type: 'string' } }, + data: {}, + locked: false, + } + }, + computeOutputs: (stored) => ({ + computed: { type: 'string', description: `${stored.type}:${stored.triggerMode === true}` }, + }), + } +} + +type Values = Record + +export function blockState( + id: string, + type: string, + name: string, + values: Values = {}, + extra: Partial = {} +): BlockState { + const subBlocks: BlockState['subBlocks'] = {} + for (const [subBlockId, value] of Object.entries(values)) { + const declared = CATALOG.blocks[type]?.subBlocks.find((s) => s.id === subBlockId) + subBlocks[subBlockId] = { + id: subBlockId, + type: declared?.type ?? 'short-input', + value: value as never, + } + } + return { + id, + type, + name, + position: { x: 10, y: 20 }, + subBlocks, + outputs: { stored: { type: 'string' } }, + enabled: true, + ...extra, + } +} + +export function workflowState( + blocks: BlockState[], + extra: Partial = {} +): WorkflowState { + return { + blocks: Object.fromEntries(blocks.map((b) => [b.id, b])), + edges: [], + loops: {}, + parallels: {}, + ...extra, + } +} + +export function edge( + id: string, + source: string, + target: string, + sourceHandle: string | null = 'source', + extra: Record = {} +): WorkflowState['edges'][number] { + return { id, source, target, sourceHandle, targetHandle: 'target', type: 'default', ...extra } +} + +export const META = { name: 'Fixture', description: null } + +export const RESOURCES: ResourceKeyResolver = { + toKey: (kind, id) => (id.startsWith('missing') ? null : `${kind}:${id}`), + toId: (kind, key) => (key.startsWith(`${kind}:`) ? key.slice(kind.length + 1) : null), +} + +export function canonical(state: WorkflowState, lock?: WorkflowLockV1 | null) { + return canonicalize(state, { catalog: CATALOG, meta: META, lock, resources: RESOURCES }) +} + +/** A fresh lock for `state`, as `source get` would hand out: identity plus key-derived bindings. */ +export function lockFor(state: WorkflowState): WorkflowLockV1 { + const { identity, layout } = canonical(state) + const blocks: WorkflowLockV1['blocks'] = {} + Object.entries(identity.blocks).forEach(([key, entry], order) => { + blocks[key] = { ...entry, binding: `b_${key.replace(/[^A-Za-z0-9_$]/g, '_')}`, order } + if (layout[key]) blocks[key].layout = layout[key] + }) + return { lockVersion: 1, blocks, variables: identity.variables } +} + +function copyJson(value: unknown): unknown { + if (Array.isArray(value)) return value.map(copyJson) + if (typeof value !== 'object' || value === null) return value + return Object.fromEntries(Object.entries(value).map(([key, member]) => [key, copyJson(member)])) +} + +/** A deep copy of a CWM to edit as a draft (the package has no DOM or Node globals). */ +export function draftOf(workflow: CanonicalWorkflow): CanonicalWorkflow { + return copyJson(workflow) as CanonicalWorkflow +} diff --git a/packages/workflow-code/src/materialize/identity.ts b/packages/workflow-code/src/materialize/identity.ts new file mode 100644 index 00000000000..eef1814902d --- /dev/null +++ b/packages/workflow-code/src/materialize/identity.ts @@ -0,0 +1,357 @@ +import type { BlockState } from '@sim/workflow-types/workflow' +import type { + CanonicalizeResult, + IdentityEntry, + IdentityMatchRule, + MaterializeHooks, + MaterializeOptions, +} from '../api' +import type { BlockCatalog } from '../catalog/types' +import type { MaterializeDiagnosticCode } from '../diagnostics/codes' +import type { Diagnostic } from '../diagnostics/frame' +import type { WorkflowLockV1 } from '../lock' +import type { BlockKey, CanonicalWorkflow } from '../model' +import { catalogBlock, report } from './context' + +/** The stored graph being replaced, with its canonical projection (keys, identity). */ +export interface PrevGraph { + state: { blocks: Record } + canonical: CanonicalizeResult +} + +/** One compiled block bound to an id. */ +export interface ResolvedBlock { + id: string + /** The prev block this one continues, when matched; `null` for a created block. */ + prevKey: BlockKey | null + /** True when the id is a lock id, so the lock's branch and item ids belong to it too. */ + lockOwned: boolean + entry: IdentityEntry +} + +export interface IdentityResolution { + blocks: Map + /** Prev blocks no compiled block continues, in stored order. */ + deleted: Array> + /** Matched blocks whose key changed: prev key → new key. */ + renames: Array<{ from: BlockKey; to: BlockKey }> +} + +interface IdentityInputs { + workflow: CanonicalWorkflow + lock: WorkflowLockV1 | null + prev: PrevGraph | null + catalog: BlockCatalog + hooks: MaterializeHooks + freshness: MaterializeOptions['lockFreshness'] + compiledBindings: Record | undefined + inferRenames: boolean + diagnostics: Diagnostic[] +} + +type TypeRelation = 'same' | 'replaced' | 'different' + +/** A key match across types keeps the id only for a catalog `sunset.replacedBy` pair (s1 §4). */ +function typeRelation(catalog: BlockCatalog, prevType: string, nextType: string): TypeRelation { + if (prevType === nextType) return 'same' + return catalogBlock(catalog, prevType)?.lifecycle?.sunset?.replacedBy === nextType + ? 'replaced' + : 'different' +} + +/** Lock keys whose id another lock key also claims (`E_MAT_DUPLICATE_LOCK_ID`). */ +function duplicateLockKeys( + lock: WorkflowLockV1 | null, + diagnostics: IdentityInputs['diagnostics'] +): Set { + const keysById = new Map() + for (const [key, entry] of Object.entries(lock?.blocks ?? {})) { + keysById.set(entry.id, [...(keysById.get(entry.id) ?? []), key]) + } + const duplicates = new Set() + for (const [id, keys] of keysById) { + if (keys.length < 2) continue + for (const key of keys) duplicates.add(key) + report( + { diagnostics }, + { + code: 'E_MAT_DUPLICATE_LOCK_ID', + severity: 'error', + message: `Lock keys ${keys.map((key) => `"${key}"`).join(', ')} all claim block id "${id}"`, + path: `/blocks/${keys[1]}/id`, + } + ) + } + return duplicates +} + +/** + * Binds every compiled block to an id (s1 §4, build-spec decision 3), in rule order: + * 1. the lock entry under the same key, when its id is in prev; + * 2. a lock entry whose key the file dropped but whose binding the file still uses; + * 3. the prev block with the same canonical key (the lockless and stale-lock path); + * 4. an inferred rename, only without a fresh lock: exactly one unmatched prev block and one + * unmatched compiled block with the same type and parent and agreeing edge neighbourhoods; + * 5. otherwise a new id (the lock's id when it is unclaimed, else a minted one). + * + * A match across types is a delete plus a create (`W_MAT_RETYPE_RECREATED`), except a catalog + * `sunset.replacedBy` pair, which keeps the id. A stale lock entry whose id left prev is ignored + * with `W_MAT_DELETED_SINCE_PULL`. Lock keys sharing one id are ignored with + * `E_MAT_DUPLICATE_LOCK_ID`. + */ +export function resolveIdentity(inputs: IdentityInputs): IdentityResolution { + const { workflow, lock, prev, catalog, hooks, diagnostics } = inputs + const prevBlocks = prev?.state.blocks ?? {} + const prevIdentity = prev?.canonical.identity.blocks ?? {} + const prevCanonical = prev?.canonical.workflow.blocks ?? {} + const prevKeyById = new Map(Object.entries(prevIdentity).map(([key, block]) => [block.id, key])) + const duplicates = duplicateLockKeys(lock, diagnostics) + const lockEntry = (key: BlockKey) => + lock && Object.hasOwn(lock.blocks, key) && !duplicates.has(key) ? lock.blocks[key] : undefined + + const resolved = new Map() + const claimed = new Set() + /** Keys that end as created blocks no later rule may match (retype, or a lock id to reuse). */ + const settled = new Map() + + const match = (key: BlockKey, prevId: string, via: IdentityMatchRule): boolean => { + const target = workflow.blocks[key] + const stored = prevBlocks[prevId] + const prevKey = prevKeyById.get(prevId) + if (!stored || prevKey === undefined || claimed.has(prevId)) return false + const relation = typeRelation(catalog, stored.type, target.type) + if (relation === 'different') { + report( + { diagnostics }, + { + code: 'W_MAT_RETYPE_RECREATED', + severity: 'warning', + message: `Block "${key}" changed type from "${stored.type}" to "${target.type}"; it is deleted and re-created, so its webhook URL and schedules are lost`, + blockKey: key, + } + ) + settled.set(key, {}) + return true + } + claimed.add(prevId) + const entry: IdentityEntry = { status: 'matched', key, id: prevId, via } + if (stored.name !== target.name) entry.renamedFrom = stored.name + if (relation === 'replaced') entry.retypedFrom = stored.type + resolved.set(key, { + id: prevId, + prevKey, + lockOwned: via === 'lock-key' || via === 'lock-binding', + entry, + }) + return true + } + + const keys = Object.keys(workflow.blocks) + const open = () => keys.filter((key) => !resolved.has(key) && !settled.has(key)) + + for (const key of keys) { + const entry = lockEntry(key) + if (!entry) continue + if (Object.hasOwn(prevBlocks, entry.id)) { + match(key, entry.id, 'lock-key') + } else if (prev && inputs.freshness === 'stale') { + report( + { diagnostics }, + { + code: 'W_MAT_DELETED_SINCE_PULL', + severity: 'warning', + message: `Block "${key}" (${entry.id}) was deleted after the lock was pulled; it is re-created`, + blockKey: key, + } + ) + } else { + settled.set(key, { lockId: entry.id }) + } + } + + const bindingEntries = Object.entries(lock?.blocks ?? {}).filter( + ([key]) => !duplicates.has(key) && !Object.hasOwn(workflow.blocks, key) + ) + for (const key of open()) { + if (lockEntry(key)) continue + const binding = inputs.compiledBindings?.[key] + if (binding === undefined) continue + const found = bindingEntries.find( + ([, entry]) => entry.binding === binding && Object.hasOwn(prevBlocks, entry.id) + ) + if (found) match(key, found[1].id, 'lock-binding') + } + + for (const key of open()) { + const prevId = prevIdentity[key]?.id + if (prevId !== undefined) match(key, prevId, 'db-name') + } + + if (prev && inputs.inferRenames && inputs.freshness !== 'fresh') { + inferRenames({ + workflow, + prev, + resolved, + claimed, + open, + match, + settled, + diagnostics, + }) + } + + for (const key of open()) settled.set(key, {}) + for (const [key, { lockId }] of settled) { + const reusable = + lockId !== undefined && + !claimed.has(lockId) && + !Object.hasOwn(prevBlocks, lockId) && + ![...resolved.values()].some((block) => block.id === lockId) + if (lockId !== undefined && !reusable) { + report( + { diagnostics }, + { + code: 'W_MAT_LOCK_ID_CLAIMED', + severity: 'warning', + message: `Lock id "${lockId}" for block "${key}" already belongs to another block; a new id was minted`, + blockKey: key, + } + ) + } + const id = reusable ? lockId : hooks.newId() + resolved.set(key, { + id, + prevKey: null, + lockOwned: reusable, + entry: { status: 'created', key, id, idSource: reusable ? 'lock' : 'minted' }, + }) + } + + for (const [key, block] of resolved) { + if (block.entry.status !== 'matched' || block.prevKey === null) continue + const prevParent = prevCanonical[block.prevKey]?.parent ?? null + const prevParentId = prevParent !== null ? (prevIdentity[prevParent]?.id ?? null) : null + const parent = workflow.blocks[key].parent + const parentId = parent !== null ? (resolved.get(parent)?.id ?? null) : null + if (parentId !== prevParentId) block.entry.reparentedFrom = prevParent + } + + const ordered = new Map() + for (const key of keys) { + const block = resolved.get(key) + if (block) ordered.set(key, block) + } + const deleted: IdentityResolution['deleted'] = [] + for (const [key, block] of Object.entries(prevIdentity)) { + if (!claimed.has(block.id)) deleted.push({ status: 'deleted', key, id: block.id }) + } + const renames: IdentityResolution['renames'] = [] + for (const [key, block] of ordered) { + if (block.prevKey !== null && block.prevKey !== key) + renames.push({ from: block.prevKey, to: key }) + } + return { blocks: ordered, deleted, renames } +} + +interface InferenceState { + workflow: CanonicalWorkflow + prev: PrevGraph + resolved: Map + claimed: Set + open: () => BlockKey[] + match: (key: BlockKey, prevId: string, via: IdentityMatchRule) => boolean + settled: Map + diagnostics: IdentityInputs['diagnostics'] +} + +/** `in:` / `out:` for every already-bound neighbour of a block. */ +function neighbourhood( + edges: CanonicalWorkflow['edges'], + key: BlockKey, + idOf: (key: BlockKey) => string | undefined +): Set { + const result = new Set() + for (const edge of edges) { + if (edge.from === key) { + const id = idOf(edge.to) + if (id !== undefined) result.add(`out:${id}`) + } + if (edge.to === key) { + const id = idOf(edge.from) + if (id !== undefined) result.add(`in:${id}`) + } + } + return result +} + +function sameSet(left: Set, right: Set): boolean { + return left.size === right.size && [...left].every((item) => right.has(item)) +} + +/** + * Identity rule 4 (s1 §4), repeated until it binds nothing new so a renamed container lets its + * renamed children pair next. A group is `(type, parent id)`; only a group with exactly one + * unmatched block on each side pairs, and only when both blocks have the same already-bound + * neighbours in the same directions. Each pairing is flagged with `W_MAT_INFERRED_RENAME`. + */ +function inferRenames(state: InferenceState): void { + const { workflow, prev, resolved, claimed } = state + const prevCanonical = prev.canonical.workflow + const prevIdentity = prev.canonical.identity.blocks + const retyped = new Set( + [...state.settled.keys()].flatMap((key) => { + const id = prevIdentity[key]?.id + return id !== undefined ? [id] : [] + }) + ) + const idOfTarget = (key: BlockKey) => resolved.get(key)?.id + const idOfPrev = (key: BlockKey) => { + const id = prevIdentity[key]?.id + return id !== undefined && claimed.has(id) ? id : undefined + } + + let progressed = true + while (progressed) { + progressed = false + const targetGroups = new Map() + for (const key of state.open()) { + const block = workflow.blocks[key] + const parentId = block.parent === null ? '' : idOfTarget(block.parent) + if (parentId === undefined) continue + const group = `${block.type}\u0000${parentId}` + targetGroups.set(group, [...(targetGroups.get(group) ?? []), key]) + } + const prevGroups = new Map() + for (const [key, identity] of Object.entries(prevIdentity)) { + if (claimed.has(identity.id) || retyped.has(identity.id)) continue + const block = prevCanonical.blocks[key] + const parentId = block.parent === null ? '' : idOfPrev(block.parent) + if (parentId === undefined) continue + const group = `${block.type}\u0000${parentId}` + prevGroups.set(group, [...(prevGroups.get(group) ?? []), key]) + } + for (const [group, targets] of targetGroups) { + const prevKeys = prevGroups.get(group) + if (targets.length !== 1 || prevKeys?.length !== 1) continue + const [key] = targets + const [prevKey] = prevKeys + const agree = sameSet( + neighbourhood(workflow.edges, key, idOfTarget), + neighbourhood(prevCanonical.edges, prevKey, idOfPrev) + ) + if (!agree) continue + const prevId = prevIdentity[prevKey].id + if (!state.match(key, prevId, 'inferred')) continue + progressed = true + report( + { diagnostics: state.diagnostics }, + { + code: 'W_MAT_INFERRED_RENAME', + severity: 'warning', + message: `Block "${key}" is taken as a rename of "${prevKey}" (same type, parent and connections); pass inferRenames: false to create it instead`, + blockKey: key, + } + ) + } + } +} diff --git a/packages/workflow-code/src/materialize/index.test.ts b/packages/workflow-code/src/materialize/index.test.ts new file mode 100644 index 00000000000..fe7b033c496 --- /dev/null +++ b/packages/workflow-code/src/materialize/index.test.ts @@ -0,0 +1,700 @@ +import { omit } from '@sim/utils/object' +import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' +import { describe, expect, it } from 'vitest' +import type { MaterializeOptions } from '../api' +import { canonicalEquals } from '../equivalence' +import type { WorkflowLockV1 } from '../lock' +import type { CanonicalWorkflow } from '../model' +import { materialize } from '.' +import { + blockState, + CATALOG, + canonical, + draftOf, + edge, + fixtureHooks, + lockFor, + RESOURCES, + workflowState, +} from './fixtures.test-helpers' +import { QUIRK_STATES } from './quirks.test-helpers' + +function run( + workflow: CanonicalWorkflow, + lock: WorkflowLockV1 | null, + options: Partial = {} +) { + return materialize(workflow, lock, { + catalog: CATALOG, + hooks: fixtureHooks(), + resources: RESOURCES, + lockFreshness: lock ? 'fresh' : 'none', + ...options, + }) +} + +function codes(result: { diagnostics: Array<{ code: string }> }): string[] { + return result.diagnostics.map((d) => d.code) +} + +function subBlockValue(state: WorkflowState, blockId: string, subBlockId: string): unknown { + return state.blocks[blockId]?.subBlocks[subBlockId]?.value +} + +function edit(workflow: CanonicalWorkflow, change: (draft: CanonicalWorkflow) => void) { + const draft: CanonicalWorkflow = draftOf(workflow) + change(draft) + return draft +} + +describe('materialize O1: a no-op round trip writes prev back exactly', () => { + for (const [name, state] of QUIRK_STATES) { + it(`lockless, quirk ${name}`, () => { + const result = run(canonical(state).workflow, null, { prev: state }) + expect(result.state).toStrictEqual(state) + expect(result.entries.every((entry) => entry.status === 'matched')).toBe(true) + expect(codes(result)).toEqual([]) + }) + + it(`with a fresh lock, quirk ${name}`, () => { + const lock = lockFor(state) + const result = run(canonical(state, lock).workflow, lock, { prev: state }) + expect(result.state).toStrictEqual(state) + expect(result.identity).toStrictEqual(canonical(state, lock).identity) + }) + } + + it('returns prev block objects by reference when nothing changed', () => { + const [, state] = QUIRK_STATES[3] + const result = run(canonical(state).workflow, null, { prev: state }) + for (const [id, stored] of Object.entries(state.blocks)) { + expect(result.state.blocks[id]).toBe(stored) + } + expect(result.state.edges.every((stored, i) => stored === state.edges[i])).toBe(true) + }) +}) + +describe('materialize O3: canonicalize(materialize(c)) equals c', () => { + for (const [name, state] of QUIRK_STATES) { + it(`with no prev (every block new), quirk ${name}`, () => { + const c = canonical(state).workflow + const result = run(c, null) + expect(canonicalEquals(canonical(result.state).workflow, c)).toBe(true) + }) + } + + it('holds after edits to params, modes, tools, branches, subflows and edges', () => { + const state = workflowState( + [ + blockState('start', 'start_trigger', 'Start', { + inputFormat: [{ id: 'f-q', name: 'question', type: 'string' }], + }), + blockState('a1', 'agent', 'Agent', { + tools: JSON.stringify([{ type: 'slack', params: { channel: 'C1' } }]), + }), + blockState('c1', 'condition', 'Gate', { + conditions: JSON.stringify([ + { id: 'c1-if', title: 'if', value: 'a' }, + { id: 'c1-else', title: 'else', value: '' }, + ]), + }), + blockState('l1', 'loop', 'Each', {}, { data: { loopType: 'for', count: 2 } }), + blockState( + 'f1', + 'function', + 'Work', + { code: 'x' }, + { data: { parentId: 'l1', extent: 'parent' } } + ), + ], + { + edges: [ + edge('e1', 'start', 'a1'), + edge('e2', 'a1', 'c1'), + edge('e3', 'c1', 'l1', 'condition-c1-if'), + ], + loops: { l1: { id: 'l1', nodes: ['f1'], iterations: 2, loopType: 'for', enabled: true } }, + } + ) + const base = canonical(state).workflow + const target = edit(base, (draft) => { + draft.blocks.start.params.inputFormat = { + kind: 'value', + value: [ + { name: 'question', type: 'string' }, + { name: 'topic', type: 'string' }, + ], + } + const tools = draft.blocks.agent.params.tools + if (tools.kind === 'tools') { + tools.tools[0].params.manualChannel = 'C2' + tools.tools[0].modes.channel = 'advanced' + tools.tools.push({ + type: 'slack', + params: { notify: true }, + modes: { channel: 'advanced', oauthCredential: 'basic' }, + }) + } + draft.blocks.gate.branches = { + kind: 'condition', + rows: [ + { key: 'if', value: 'a' }, + { key: 'urgent', value: 'b', titleOverride: 'urgent' }, + { key: 'else', value: '' }, + ], + } + draft.blocks.each.subflow = { + kind: 'loop', + loopType: 'forEach', + iterations: 2, + forEachItems: [1, 2], + } + draft.blocks.work.parent = null + draft.edges.push({ from: 'gate', port: { kind: 'branch', key: 'urgent' }, to: 'work' }) + }) + const result = run(target, null, { prev: state }) + expect(canonicalEquals(canonical(result.state).workflow, target)).toBe(true) + expect(result.state.loops.l1.nodes).toEqual([]) + expect(result.state.loops.l1.forEachItems).toEqual([1, 2]) + expect(result.state.blocks.l1.data?.collection).toEqual([1, 2]) + }) +}) + +describe('materialize: params keep prev bytes unless they changed', () => { + it('re-encodes only the changed param, in prev raw encoding', () => { + const state = workflowState([ + blockState('k1', 'knowledge', 'KB', { + tagFilters: ' [ {"tagName":"a"} ] ', + knowledgeBaseIds: ['kb-1'], + }), + blockState('k2', 'knowledge', 'KB2', { tagFilters: [{ tagName: 'a' }] }), + ]) + const target = edit(canonical(state).workflow, (draft) => { + draft.blocks.kb.params.tagFilters = { kind: 'value', value: [{ tagName: 'b' }] } + draft.blocks.kb2.params.tagFilters = { kind: 'value', value: [{ tagName: 'b' }] } + }) + const result = run(target, null, { prev: state }) + expect(subBlockValue(result.state, 'k1', 'tagFilters')).toBe('[{"tagName":"b"}]') + expect(subBlockValue(result.state, 'k2', 'tagFilters')).toEqual([{ tagName: 'b' }]) + expect(result.state.blocks.k1.subBlocks.knowledgeBaseIds).toBe( + state.blocks.k1.subBlocks.knowledgeBaseIds + ) + }) + + it('uses catalog storage for a param prev never stored, and writes a removed param as null', () => { + const state = workflowState([blockState('k1', 'knowledge', 'KB', { knowledgeBaseIds: 'kb-1' })]) + const target = edit(canonical(state).workflow, (draft) => { + draft.blocks.kb.params.tagFilters = { kind: 'value', value: [{ tagName: 'b' }] } + draft.blocks.kb.params = omit(draft.blocks.kb.params, ['knowledgeBaseIds']) + }) + const result = run(target, null, { prev: state }) + expect(subBlockValue(result.state, 'k1', 'tagFilters')).toBe('[{"tagName":"b"}]') + expect(result.state.blocks.k1.subBlocks.knowledgeBaseIds).toEqual({ + id: 'knowledgeBaseIds', + type: 'knowledge-base-selector', + value: null, + }) + }) + + it('writes resource keys back as ids and reports a key the workspace does not have', () => { + const state = workflowState([blockState('k1', 'knowledge', 'KB', { knowledgeBaseIds: 'kb-1' })]) + const target = edit(canonical(state).workflow, (draft) => { + draft.blocks.kb.params.knowledgeBaseIds = { + kind: 'value', + value: [ + { $sim: 'resource', kind: 'knowledge-base', key: 'knowledge-base:kb-2' }, + { $sim: 'resource', kind: 'knowledge-base', key: 'nope' }, + ], + } + }) + const result = run(target, null, { prev: state }) + expect(subBlockValue(result.state, 'k1', 'knowledgeBaseIds')).toEqual(['kb-2', 'nope']) + expect(codes(result)).toEqual(['E_MAT_UNKNOWN_RESOURCE']) + }) + + it('recomputes stored outputs only for blocks that changed', () => { + const state = workflowState([ + blockState('f1', 'function', 'One', { code: 'a' }), + blockState('f2', 'function', 'Two', { code: 'b' }), + ]) + const target = edit(canonical(state).workflow, (draft) => { + draft.blocks.two.params.code = { kind: 'value', value: 'c' } + }) + const result = run(target, null, { prev: state }) + expect(result.state.blocks.f1.outputs).toBe(state.blocks.f1.outputs) + expect(result.state.blocks.f2.outputs).toEqual({ + computed: { type: 'string', description: 'function:false' }, + }) + }) + + it('writes a mode entry only where one existed or inference would differ', () => { + const state = workflowState([ + blockState( + 's1', + 'slack', + 'Explicit', + { operation: 'send', channel: 'C1' }, + { + data: { canonicalModes: { channel: 'basic' } }, + } + ), + blockState('s2', 'slack', 'Bare', { operation: 'send', channel: 'C1' }), + ]) + const target = edit(canonical(state).workflow, (draft) => { + draft.blocks.explicit.params.manualChannel = { kind: 'value', value: 'C2' } + draft.blocks.explicit.modes.channel = 'advanced' + draft.blocks.bare.params.manualChannel = { kind: 'value', value: 'C2' } + draft.blocks.bare.params.threadTs = { kind: 'value', value: '1' } + }) + const result = run(target, null, { prev: state }) + expect(result.state.blocks.s1.data?.canonicalModes).toEqual({ channel: 'advanced' }) + expect(result.state.blocks.s2.data?.canonicalModes).toBeUndefined() + }) + + it('pins a mode explicitly when the written values would infer the other one', () => { + const state = workflowState([ + blockState('s2', 'slack', 'Bare', { operation: 'send', channel: 'C1' }), + ]) + const target = edit(canonical(state).workflow, (draft) => { + draft.blocks.bare.params = omit(draft.blocks.bare.params, ['channel']) + draft.blocks.bare.params.manualChannel = { kind: 'value', value: 'C2' } + draft.blocks.bare.modes.channel = 'basic' + }) + const result = run(target, null, { prev: state }) + expect(result.state.blocks.s2.data?.canonicalModes).toEqual({ channel: 'basic' }) + }) + + it('re-indexes tool modes by position and drops the legacy type key when a tool list changes', () => { + const [, state] = QUIRK_STATES[2] + const target = edit(canonical(state).workflow, (draft) => { + const tools = draft.blocks.agent.params.tools + if (tools.kind === 'tools') tools.tools.splice(0, 1) + }) + const result = run(target, null, { prev: state }) + const modes = result.state.blocks.a1.data?.canonicalModes ?? {} + expect(Object.keys(modes).some((key) => key.startsWith('slack:'))).toBe(false) + expect(modes['0:channel']).toBe('advanced') + expect(canonicalEquals(canonical(result.state).workflow, target)).toBe(true) + const stored = JSON.parse(String(subBlockValue(result.state, 'a1', 'tools'))) + expect(stored[0].isExpanded).toBe(false) + }) +}) + +describe('materialize: branches', () => { + const state = () => QUIRK_STATES[3][1] + + it('keeps row ids by key across a reorder, and gives a new row a block-prefixed id', () => { + const target = edit(canonical(state()).workflow, (draft) => { + const rows = draft.blocks.gate.branches?.rows ?? [] + draft.blocks.gate.branches = { + kind: 'condition', + rows: [rows[1], rows[0], { key: 'late', value: 'z' }, rows[3]], + } + }) + const result = run(target, null, { prev: state() }) + const stored = JSON.parse(String(subBlockValue(result.state, 'c1', 'conditions'))) + expect(stored.map((row: { id: string }) => row.id)).toEqual([ + 'c1-else-if-1700000000', + 'c1-if', + 'c1-new-1', + 'c1-cond-3', + ]) + expect(stored.map((row: { title?: string }) => row.title)).toEqual([ + 'Otherwise if', + 'else if', + 'else if', + 'else', + ]) + expect(stored[0].key).toBe('elseIf0') + expect(stored[1].key).toBe('if') + expect(result.state.edges.map((e) => e.id)).toEqual(['e1', 'e2', 'e3', 'e4']) + expect(canonicalEquals(canonical(result.state).workflow, target)).toBe(true) + }) + + it('stores rows as text even when prev stored an array, and omits a missing title', () => { + const prev = workflowState([ + blockState('c1', 'condition', 'Gate', { + conditions: [ + { id: 'c1-if', value: 'a' }, + { id: 'c1-else', title: 'else', value: '' }, + ], + }), + ]) + const target = edit(canonical(prev).workflow, (draft) => { + const rows = draft.blocks.gate.branches?.rows ?? [] + rows[0].value = 'b' + }) + const result = run(target, null, { prev }) + const raw = subBlockValue(result.state, 'c1', 'conditions') + expect(typeof raw).toBe('string') + expect(JSON.parse(String(raw))[0]).toEqual({ id: 'c1-if', value: 'b' }) + }) + + it('keeps never-persisted rows null and routes edges to the implicit ids', () => { + const [, prev] = QUIRK_STATES[4] + const target = edit(canonical(prev).workflow, (draft) => { + draft.edges.push({ from: 'gate', port: { kind: 'branch', key: 'else' }, to: 'next' }) + }) + const result = run(target, null, { prev }) + expect(subBlockValue(result.state, 'c1', 'conditions')).toBeUndefined() + expect(result.state.edges.map((e) => e.sourceHandle)).toEqual([ + 'condition-c1-if', + 'condition-c1-else', + ]) + }) +}) + +describe('materialize: identity (s1 §4)', () => { + const base = () => + workflowState( + [ + blockState('start', 'start_trigger', 'Start', { + inputFormat: [{ id: 'f-q', name: 'question', type: 'string' }], + }), + blockState('a1', 'function', 'Fetch', { code: 'return 1' }), + blockState('a2', 'function', 'Report', { code: 'return + ' }), + ], + { + edges: [edge('e1', 'start', 'a1'), edge('e2', 'a1', 'a2')], + variables: { 'var-1': { id: 'var-1', name: 'Count', type: 'number', value: 1 } }, + } + ) + + function renameFetch(workflow: CanonicalWorkflow, to = 'Load') { + return edit(workflow, (draft) => { + const key = to.toLowerCase() + draft.blocks[key] = { ...draft.blocks.fetch, key, name: to } + draft.blocks = omit(draft.blocks, ['fetch']) + draft.edges = draft.edges.map((e) => ({ + ...e, + from: e.from === 'fetch' ? key : e.from, + to: e.to === 'fetch' ? key : e.to, + })) + }) + } + + it('keeps the id across a rename matched by lock binding and rewrites { + const prev = base() + const lock = lockFor(prev) + const target = renameFetch(canonical(prev, lock).workflow) + const result = run(target, lock, { + prev, + compiledBindings: { load: lock.blocks.fetch.binding }, + }) + expect(result.entries).toContainEqual({ + status: 'matched', + key: 'load', + id: 'a1', + via: 'lock-binding', + renamedFrom: 'Fetch', + }) + expect(result.state.blocks.a1.name).toBe('Load') + expect(subBlockValue(result.state, 'a2', 'code')).toBe('return + ') + expect(result.state.edges.map((e) => e.id)).toEqual(['e1', 'e2']) + expect(result.identity.blocks.load.id).toBe('a1') + }) + + it('infers a lockless rename from type, parent and agreeing neighbours, flagged', () => { + const prev = base() + const result = run(renameFetch(canonical(prev).workflow), null, { prev }) + expect(result.entries).toContainEqual( + expect.objectContaining({ status: 'matched', key: 'load', id: 'a1', via: 'inferred' }) + ) + expect(codes(result)).toEqual(['W_MAT_INFERRED_RENAME']) + }) + + it('does not infer a rename when neighbours disagree, or when turned off', () => { + const prev = base() + const moved = edit(renameFetch(canonical(prev).workflow), (draft) => { + draft.edges = draft.edges.filter((e) => e.from !== 'start') + }) + const disagreeing = run(moved, null, { prev }) + expect(disagreeing.entries).toContainEqual({ + status: 'created', + key: 'load', + id: 'new-1', + idSource: 'minted', + }) + expect(disagreeing.entries).toContainEqual({ status: 'deleted', key: 'fetch', id: 'a1' }) + const off = run(renameFetch(canonical(prev).workflow), null, { prev, inferRenames: false }) + expect(off.entries).toContainEqual(expect.objectContaining({ status: 'created', key: 'load' })) + }) + + it('treats two renames of one type and parent as ambiguous: delete plus create', () => { + const prev = workflowState([ + blockState('a1', 'function', 'One', { code: '1' }), + blockState('a2', 'function', 'Two', { code: '2' }), + ]) + const target = edit(canonical(prev).workflow, (draft) => { + draft.blocks.uno = { ...draft.blocks.one, key: 'uno', name: 'Uno' } + draft.blocks.dos = { ...draft.blocks.two, key: 'dos', name: 'Dos' } + draft.blocks = omit(draft.blocks, ['one']) + draft.blocks = omit(draft.blocks, ['two']) + }) + const result = run(target, null, { prev }) + expect(result.entries.map((entry) => entry.status).sort()).toEqual([ + 'created', + 'created', + 'deleted', + 'deleted', + ]) + expect(codes(result)).not.toContain('W_MAT_INFERRED_RENAME') + }) + + it('never infers a rename under a fresh lock', () => { + const prev = base() + const lock = lockFor(prev) + const result = run(renameFetch(canonical(prev, lock).workflow), lock, { prev }) + expect(result.entries).toContainEqual( + expect.objectContaining({ status: 'created', key: 'load' }) + ) + }) + + it('deletes and creates on a removed block plus an added one', () => { + const prev = base() + const target = edit(canonical(prev).workflow, (draft) => { + draft.blocks = omit(draft.blocks, ['report']) + draft.edges = draft.edges.filter((e) => e.to !== 'report') + draft.blocks.notify = { + key: 'notify', + name: 'Notify', + type: 'slack', + parent: null, + enabled: true, + locked: false, + triggerMode: false, + advancedMode: false, + errorPort: false, + retry: null, + params: { + operation: { kind: 'value', value: 'send' }, + text: { kind: 'value', value: '' }, + }, + modes: { oauthCredential: 'basic', channel: 'basic' }, + } + draft.edges.push({ from: 'fetch', port: { kind: 'out' }, to: 'notify' }) + }) + const result = run(target, null, { prev }) + expect(result.entries).toContainEqual({ status: 'deleted', key: 'report', id: 'a2' }) + expect(result.entries).toContainEqual({ + status: 'created', + key: 'notify', + id: 'new-1', + idSource: 'minted', + }) + expect(result.state.blocks.a2).toBeUndefined() + expect(result.state.blocks['new-1'].subBlocks.text.value).toBe('') + expect(result.state.blocks['new-1'].subBlocks.channel.value).toBeNull() + expect(result.state.edges.map((e) => [e.source, e.target])).toEqual([ + ['start', 'a1'], + ['a1', 'new-1'], + ]) + expect(result.needsLayout).toEqual(['notify']) + expect(codes(result)).toContain('I_MAT_NEEDS_LAYOUT') + }) + + it('recreates a block whose type changed under the same key, with a warning', () => { + const prev = base() + const target = edit(canonical(prev).workflow, (draft) => { + draft.blocks.fetch = { + ...draft.blocks.fetch, + type: 'api', + params: { url: { kind: 'value', value: 'https://x' } }, + } + }) + const result = run(target, lockFor(prev), { prev }) + expect(result.entries).toContainEqual({ status: 'deleted', key: 'fetch', id: 'a1' }) + expect(result.entries).toContainEqual({ + status: 'created', + key: 'fetch', + id: 'new-1', + idSource: 'minted', + }) + expect(codes(result)).toContain('W_MAT_RETYPE_RECREATED') + expect(result.state.edges.map((e) => e.id)).toEqual(['new-2', 'new-3']) + }) + + it('keeps the id across a catalog sunset replacedBy retype', () => { + const prev = workflowState([blockState('o1', 'function_v0', 'Old', { code: 'x' })]) + const target = edit(canonical(prev).workflow, (draft) => { + draft.blocks.old.type = 'function' + }) + const result = run(target, null, { prev }) + expect(result.entries).toEqual([ + { status: 'matched', key: 'old', id: 'o1', via: 'db-name', retypedFrom: 'function_v0' }, + ]) + expect(result.state.blocks.o1.type).toBe('function') + expect(codes(result)).toEqual([]) + }) + + it('re-creates a stale lock entry whose id left prev, with a warning', () => { + const pulled = base() + const lock = lockFor(pulled) + const prev = workflowState([pulled.blocks.start, pulled.blocks.a2], { + edges: [], + variables: pulled.variables, + }) + const result = run(canonical(pulled, lock).workflow, lock, { prev, lockFreshness: 'stale' }) + expect(codes(result)).toContain('W_MAT_DELETED_SINCE_PULL') + expect(result.entries).toContainEqual({ + status: 'created', + key: 'fetch', + id: 'new-1', + idSource: 'minted', + }) + expect(result.entries).toContainEqual( + expect.objectContaining({ status: 'matched', key: 'report', id: 'a2' }) + ) + }) + + it('reuses an unclaimed lock id for a new workflow and reports duplicate lock ids', () => { + const pulled = base() + const lock = lockFor(pulled) + const fresh = run(canonical(pulled, lock).workflow, lock, { lockFreshness: 'fresh' }) + expect(fresh.entries).toContainEqual({ + status: 'created', + key: 'fetch', + id: 'a1', + idSource: 'lock', + }) + expect(Object.keys(fresh.state.blocks).sort()).toEqual(['a1', 'a2', 'start']) + expect(fresh.state.blocks.a1.position).toEqual({ x: 10, y: 20 }) + expect(fresh.needsLayout).toEqual([]) + + const broken: WorkflowLockV1 = { + ...lock, + blocks: { ...lock.blocks, report: { ...lock.blocks.report, id: 'a1' } }, + } + const result = run(canonical(pulled).workflow, broken, { prev: pulled }) + expect(codes(result)).toContain('E_MAT_DUPLICATE_LOCK_ID') + expect(result.identity.blocks.fetch.id).toBe('a1') + expect(result.identity.blocks.report.id).toBe('a2') + }) + + it('keeps variable ids by lock key and inputFormat item ids by lock items', () => { + const pulled = base() + const lock = lockFor(pulled) + const c = canonical(pulled, lock).workflow + const result = run(c, lock, { lockFreshness: 'fresh' }) + expect(Object.keys(result.state.variables ?? {})).toEqual(['var-1']) + expect(subBlockValue(result.state, 'start', 'inputFormat')).toEqual([ + { id: 'f-q', name: 'question', type: 'string' }, + ]) + expect(result.identity.blocks.start.items).toEqual({ + inputFormat: [{ name: 'question', id: 'f-q' }], + }) + }) + + it('keeps every block-id foreign key stable across an edit elsewhere', () => { + const prev = workflowState( + [ + blockState( + 'trig', + 'slack', + 'Slack Trigger', + { + botToken: 't', + webhookId: 'wh-1', + triggerPath: 'custom/path', + triggerConfig: { botToken: 't' }, + triggerId: 'slack_webhook', + }, + { triggerMode: true } + ), + blockState('sched', 'schedule', 'Nightly', { + scheduleType: 'cron', + cronExpression: '0 0 * * *', + }), + blockState('gate', 'condition', 'Gate', { + conditions: JSON.stringify([ + { id: 'gate-if', title: 'if', value: 'x' }, + { id: 'gate-else', title: 'else', value: '' }, + ]), + }), + blockState('out', 'function', 'Answer', { code: 'return 1' }), + ], + { edges: [edge('e1', 'trig', 'gate'), edge('e2', 'gate', 'out', 'condition-gate-if')] } + ) + const target = edit(canonical(prev).workflow, (draft) => { + draft.blocks.reply = { ...draft.blocks.answer, key: 'reply', name: 'Reply' } + draft.blocks = omit(draft.blocks, ['answer']) + draft.edges = draft.edges.map((e) => (e.to === 'answer' ? { ...e, to: 'reply' } : e)) + draft.blocks.reply.params.code = { kind: 'value', value: 'return 2' } + const rows = draft.blocks.gate.branches?.rows ?? [] + rows[0].value = 'y' + }) + const result = run(target, lockFor(prev), { + prev, + lockFreshness: 'fresh', + compiledBindings: { reply: 'b_answer' }, + }) + expect(Object.keys(result.state.blocks).sort()).toEqual(['gate', 'out', 'sched', 'trig']) + expect(result.state.blocks.trig).toBe(prev.blocks.trig) + expect(result.state.blocks.sched).toBe(prev.blocks.sched) + for (const id of ['webhookId', 'triggerPath', 'triggerConfig', 'triggerId']) { + expect(result.state.blocks.trig.subBlocks[id]).toBe(prev.blocks.trig.subBlocks[id]) + } + const rows = JSON.parse(String(subBlockValue(result.state, 'gate', 'conditions'))) + expect(rows.map((row: { id: string }) => row.id)).toEqual(['gate-if', 'gate-else']) + expect(result.state.edges).toStrictEqual(prev.edges) + }) +}) + +describe('materialize: positions and server-owned fields', () => { + it('uses prev positions, the lock layout for new blocks, or flags autolayout', () => { + const prev = workflowState([ + blockState('f1', 'function', 'One', { code: 'a' }, { position: { x: 5, y: 6 } }), + ]) + const target = edit(canonical(prev).workflow, (draft) => { + draft.blocks.one.params.code = { kind: 'value', value: 'b' } + draft.blocks.two = { ...draft.blocks.one, key: 'two', name: 'Two' } + draft.blocks.three = { ...draft.blocks.one, key: 'three', name: 'Three' } + }) + const lock: WorkflowLockV1 = { + lockVersion: 1, + variables: {}, + blocks: { + one: { id: 'f1', parent: null, binding: 'one', order: 0, layout: { x: 99, y: 99 } }, + two: { + id: 'f2', + parent: null, + binding: 'two', + order: 1, + layout: { x: 1, y: 2, w: 300, height: 80 }, + }, + }, + } + const result = run(target, lock, { prev, lockFreshness: 'stale', inferRenames: false }) + expect(result.state.blocks.f1.position).toEqual({ x: 5, y: 6 }) + const two = result.state.blocks[result.identity.blocks.two.id] + expect(two.position).toEqual({ x: 1, y: 2 }) + expect(two.height).toBe(80) + expect(two.data?.width).toBe(300) + expect(result.needsLayout).toEqual(['three']) + const withLockLayout = run(target, lock, { + prev, + lockFreshness: 'stale', + inferRenames: false, + layout: 'lock', + }) + expect(withLockLayout.state.blocks.f1.position).toEqual({ x: 99, y: 99 }) + }) + + it('writes a new block from initBlock and nulls editor seeds the model does not hold', () => { + const c = canonical(workflowState([blockState('c1', 'condition', 'Gate')])).workflow + const result = run(c, null) + const created = Object.values(result.state.blocks)[0] as BlockState + expect(created.subBlocks.conditions.value).toBeNull() + expect(created.outputs).toEqual({ + computed: { type: 'string', description: 'condition:false' }, + }) + }) + + it('makes the error port effective through errorEnabled when no error edge carries it', () => { + const prev = workflowState([blockState('f1', 'function', 'One', { code: 'a' })]) + const target = edit(canonical(prev).workflow, (draft) => { + draft.blocks.one.errorPort = true + }) + expect(run(target, null, { prev }).state.blocks.f1.errorEnabled).toBe(true) + }) +}) diff --git a/packages/workflow-code/src/materialize/index.ts b/packages/workflow-code/src/materialize/index.ts new file mode 100644 index 00000000000..248559bd8fd --- /dev/null +++ b/packages/workflow-code/src/materialize/index.ts @@ -0,0 +1,289 @@ +import { + type BlockState, + type Loop, + normalizeWorkflowEdgeSourceHandle, + type Parallel, + type Variable, + WORKFLOW_ERROR_HANDLE_ID, + type WorkflowState, +} from '@sim/workflow-types/workflow' +import type { CanonicalizeResult, MaterializeFn, MaterializeHooks } from '../api' +import { canonicalize } from '../canonicalize' +import type { MaterializeDiagnosticCode } from '../diagnostics/codes' +import type { Diagnostic } from '../diagnostics/frame' +import type { LockIdentity, WorkflowLockBlock, WorkflowLockV1 } from '../lock' +import type { BlockKey, CanonicalWorkflow, VarKey } from '../model' +import { type BuiltBlock, buildBlock } from './block' +import { catalogBlock, type MaterializeContext, report } from './context' +import { type BranchHandles, writeEdges } from './edges' +import { resolveIdentity } from './identity' +import { subflowEntry } from './subflows' +import { deepEqual, rewriteRenamedReferences } from './values' + +function invert(record: Record): Map { + return new Map(Object.entries(record).map(([key, id]) => [id, key])) +} + +/** + * Variables keep their ids by key: the lock's id, then prev's, else a new one (s1 §4). A variable + * canonical-equal to the prev variable with that id is prev's stored object unchanged. + */ +function writeVariables( + workflow: CanonicalWorkflow, + lock: WorkflowLockV1 | null, + prev: WorkflowState | undefined, + prevCanonical: CanonicalizeResult | null, + hooks: MaterializeHooks +): { variables: Record; idByKey: Map } { + const prevVariables = prev?.variables ?? {} + const prevKeyById = invert(prevCanonical?.identity.variables ?? {}) + const lockIds = lock?.variables ?? {} + const lockIdCounts = new Map() + for (const id of Object.values(lockIds)) lockIdCounts.set(id, (lockIdCounts.get(id) ?? 0) + 1) + + const used = new Set() + const variables: Record = {} + const idByKey = new Map() + for (const [key, variable] of Object.entries(workflow.variables)) { + const fromLock = lockIds[key] + const candidates = [ + fromLock !== undefined && lockIdCounts.get(fromLock) === 1 ? fromLock : undefined, + prevCanonical?.identity.variables[key], + ] + const id = + candidates.find( + (candidate): candidate is string => + candidate !== undefined && + !used.has(candidate) && + (!Object.hasOwn(prevVariables, candidate) || prevKeyById.get(candidate) === key) + ) ?? hooks.newId() + used.add(id) + idByKey.set(key, id) + const stored = Object.hasOwn(prevVariables, id) ? prevVariables[id] : undefined + const prevKey = prevKeyById.get(id) + const before = prevKey !== undefined ? prevCanonical?.workflow.variables[prevKey] : undefined + const unchanged = + stored !== undefined && + before !== undefined && + before.name === variable.name && + before.type === variable.type && + deepEqual(before.value, variable.value) + variables[id] = unchanged + ? stored + : { ...stored, id, name: variable.name, type: variable.type, value: variable.value } + } + return { variables, idByKey } +} + +function childIds(blocks: Record, containerId: string): string[] { + return Object.entries(blocks) + .filter(([, block]) => block.data?.parentId === containerId) + .map(([id]) => id) +} + +/** + * Writes a CWM back to a stored graph (s1 §2 materialize algorithm, §4 identity; build-spec + * decisions 1 and 3; contract amendments 1, 2 and 9). With `prev`, every block, param, edge, + * subflow and variable whose canonical form is unchanged keeps prev's stored bytes, so + * `materialize(canonicalize(x), lock, { prev: x })` deep-equals `x` (O1). + */ +export const materialize: MaterializeFn = (input, lock, options) => { + const { catalog, hooks, prev } = options + const diagnostics: Diagnostic[] = [] + const prevCanonical = prev + ? canonicalize(prev, { catalog, meta: input.meta, lock, resources: options.resources }) + : null + + const resolution = resolveIdentity({ + workflow: input, + lock, + prev: prev && prevCanonical ? { state: prev, canonical: prevCanonical } : null, + catalog, + hooks, + freshness: options.lockFreshness, + compiledBindings: options.compiledBindings, + inferRenames: options.inferRenames !== false, + diagnostics, + }) + const workflow = rewriteRenamedReferences(input, resolution.renames) + const idByKey = new Map([...resolution.blocks].map(([key, block]) => [key, block.id])) + + const { variables, idByKey: variableIdByKey } = writeVariables( + workflow, + lock, + prev, + prevCanonical, + hooks + ) + const context: MaterializeContext = { + catalog, + hooks, + resources: options.resources, + diagnostics, + variableIdByKey, + } + + const lockById = new Map() + for (const entry of Object.values(lock?.blocks ?? {})) lockById.set(entry.id, entry) + const prevIdentity = prevCanonical?.identity.blocks ?? {} + const parentIdOf = (parent: BlockKey | null, ids: (key: BlockKey) => string | undefined) => + parent !== null ? (ids(parent) ?? null) : null + + const blocks: Record = {} + const built = new Map() + const needsLayout: BlockKey[] = [] + for (const [key, target] of Object.entries(workflow.blocks)) { + const resolved = resolution.blocks.get(key) + if (!resolved) continue + const prevKey = resolved.prevKey + const canonicalPrev = prevKey !== null ? prevCanonical?.workflow.blocks[prevKey] : undefined + const storedPrev = prev?.blocks[resolved.id] + const result = buildBlock( + { + key, + target, + resolved, + parentId: parentIdOf(target.parent, (parent) => idByKey.get(parent)), + prev: + prevKey !== null && canonicalPrev && storedPrev + ? { + block: storedPrev, + canonical: canonicalPrev, + parentId: parentIdOf(canonicalPrev.parent, (parent) => prevIdentity[parent]?.id), + branchIds: prevIdentity[prevKey]?.branches, + items: prevIdentity[prevKey]?.items, + } + : undefined, + lockBlock: lockById.get(resolved.id), + layout: lock?.blocks[key]?.layout, + layoutMode: options.layout ?? 'preserve', + }, + context + ) + blocks[resolved.id] = result.block + built.set(key, result) + if (result.needsLayout) { + needsLayout.push(key) + report(context, { + code: 'I_MAT_NEEDS_LAYOUT', + severity: 'info', + message: `Block "${key}" has no stored or lock position; it is placed by autolayout`, + blockKey: key, + }) + } + } + + const branchHandles = new Map() + for (const [key, result] of built) { + const id = idByKey.get(key) + const kind = catalogBlock(catalog, workflow.blocks[key].type)?.graph.branches?.kind + if (id === undefined || !kind || !result.branchIds) continue + branchHandles.set(id, { + prefix: kind === 'condition' ? 'condition-' : 'router-', + ids: result.branchIds, + }) + } + const prevBranchHandles = new Map() + for (const [key, identity] of Object.entries(prevIdentity)) { + const kind = catalogBlock(catalog, prevCanonical?.workflow.blocks[key]?.type)?.graph.branches + ?.kind + if (!kind || !identity.branches) continue + prevBranchHandles.set(identity.id, { + prefix: kind === 'condition' ? 'condition-' : 'router-', + ids: identity.branches, + }) + } + + const edges = writeEdges( + { + edges: workflow.edges, + idByKey, + blocks, + branches: branchHandles, + prevEdges: prev?.edges ?? [], + prevBlocks: prev?.blocks ?? {}, + prevBranches: prevBranchHandles, + }, + context + ) + + const errorSources = new Set( + edges + .filter( + (edge) => normalizeWorkflowEdgeSourceHandle(edge.sourceHandle) === WORKFLOW_ERROR_HANDLE_ID + ) + .map((edge) => edge.source) + ) + for (const [key, target] of Object.entries(workflow.blocks)) { + const id = idByKey.get(key) + if (id === undefined) continue + const block = blocks[id] + const effective = Boolean(block.errorEnabled) || errorSources.has(id) + if (effective !== target.errorPort) blocks[id] = { ...block, errorEnabled: target.errorPort } + } + + const loops: Record = {} + const parallels: Record = {} + for (const [id, entry] of Object.entries(prev?.loops ?? {})) { + if (!Object.hasOwn(prev?.blocks ?? {}, id)) loops[id] = entry + } + for (const [id, entry] of Object.entries(prev?.parallels ?? {})) { + if (!Object.hasOwn(prev?.blocks ?? {}, id)) parallels[id] = entry + } + for (const [key, target] of Object.entries(workflow.blocks)) { + const id = idByKey.get(key) + const resolved = resolution.blocks.get(key) + if (id === undefined || !resolved || !target.subflow) continue + const before = + resolved.prevKey !== null ? prevCanonical?.workflow.blocks[resolved.prevKey] : undefined + const prevEntry = + before && prev + ? target.subflow.kind === 'loop' + ? prev.loops?.[id] + : prev.parallels?.[id] + : undefined + const entry = subflowEntry({ + id, + block: blocks[id], + spec: target.subflow, + nodes: childIds(blocks, id), + prevEntry, + specChanged: !before || !deepEqual(before.subflow, target.subflow), + enabledChanged: before !== undefined && before.enabled !== target.enabled, + lockedChanged: before !== undefined && before.locked !== target.locked, + matched: before !== undefined, + prevNodes: before && prev ? childIds(prev.blocks, id) : [], + }) + if (!entry) continue + if (target.subflow.kind === 'loop') loops[id] = entry as Loop + else parallels[id] = entry as Parallel + } + + const state: WorkflowState = { ...prev, blocks, edges, loops, parallels } + if (Object.keys(variables).length > 0 || prev?.variables !== undefined) { + state.variables = variables + } + + const identity: LockIdentity = { blocks: {}, variables: Object.fromEntries(variableIdByKey) } + for (const [key, target] of Object.entries(workflow.blocks)) { + const result = built.get(key) + const id = idByKey.get(key) + if (!result || id === undefined) continue + identity.blocks[key] = { id, parent: target.parent } + if (result.branchIds && Object.keys(result.branchIds).length > 0) { + identity.blocks[key].branches = result.branchIds + } + if (Object.keys(result.items).length > 0) identity.blocks[key].items = result.items + } + + return { + state, + identity, + entries: [ + ...[...resolution.blocks.values()].map((block) => block.entry), + ...resolution.deleted, + ], + needsLayout, + diagnostics, + } +} diff --git a/packages/workflow-code/src/materialize/modes.ts b/packages/workflow-code/src/materialize/modes.ts new file mode 100644 index 00000000000..3b9acd16b6e --- /dev/null +++ b/packages/workflow-code/src/materialize/modes.ts @@ -0,0 +1,79 @@ +import { isRecordLike, toRecord } from '@sim/utils/object' +import { effectiveModes } from '../canonicalize/modes' +import type { BlockCatalog, CatalogBlock } from '../catalog/types' +import type { CanonicalParamId, CanonicalTool, ParamMode } from '../model' +import { catalogBlock } from './context' + +const MODES = new Set(['basic', 'advanced']) +const INDEX_SCOPED_KEY = /^\d+:/ + +type ModeMap = Record + +/** The valid entries of a stored `data.canonicalModes`, or `undefined` when there is none. */ +export function storedModes(data: Record | undefined): ModeMap | undefined { + const stored = data?.canonicalModes + if (!isRecordLike(stored)) return undefined + const modes: ModeMap = {} + for (const [id, mode] of Object.entries(stored)) { + if (typeof mode === 'string' && MODES.has(mode)) modes[id] = mode as ParamMode + } + return modes +} + +/** + * Block-level modes (s1 materialize step 4): an entry is written only where one already existed + * or where inference over the written values would land on a different mode. Inference follows + * the serializer: the legacy `advancedMode` flag makes an unset pair advanced, else the member + * holding a value wins (`effectiveModes`). + */ +export function writeBlockModes( + modes: ModeMap, + desired: Record, + catalog: CatalogBlock, + values: Record, + advancedMode: boolean +): ModeMap { + const inferred = effectiveModes(catalog.subBlocks, values, undefined, advancedMode) + const next = { ...modes } + for (const [id, mode] of Object.entries(desired)) { + if (Object.hasOwn(next, id) || inferred[id] !== mode) next[id] = mode + } + return next +} + +/** + * Nested tool modes (s1 materialize step 4, quirk 3), rewritten whenever a tool list changed. + * Every index-scoped `${i}:cid` entry is dropped, as is each legacy `${type}:cid` entry of a type + * still in the list. Each tool then gets `${i}:cid` where its mode differs from inference over its + * stored params, or where the prev tool it continues (`prevIndexes`) had an explicit entry, by + * index or by legacy type key. + */ +export function writeToolModes( + modes: ModeMap, + tools: CanonicalTool[], + storedTools: unknown[], + prevIndexes: ReadonlyArray, + catalog: BlockCatalog +): ModeMap { + const types = new Set(tools.map((tool) => tool.type)) + const next: ModeMap = {} + for (const [key, mode] of Object.entries(modes)) { + if (INDEX_SCOPED_KEY.test(key)) continue + const separator = key.indexOf(':') + if (separator !== -1 && types.has(key.slice(0, separator))) continue + next[key] = mode + } + tools.forEach((tool, index) => { + const block = catalogBlock(catalog, tool.type) + const params = toRecord(toRecord(storedTools[index]).params) + const inferred = block ? effectiveModes(block.subBlocks, params, undefined, false) : {} + for (const [id, mode] of Object.entries(tool.modes)) { + const prevIndex = prevIndexes[index] + const hadExplicit = + (prevIndex !== undefined && Object.hasOwn(modes, `${prevIndex}:${id}`)) || + Object.hasOwn(modes, `${tool.type}:${id}`) + if (hadExplicit || inferred[id] !== mode) next[`${index}:${id}`] = mode + } + }) + return next +} diff --git a/packages/workflow-code/src/materialize/params.ts b/packages/workflow-code/src/materialize/params.ts new file mode 100644 index 00000000000..99c375b799d --- /dev/null +++ b/packages/workflow-code/src/materialize/params.ts @@ -0,0 +1,225 @@ +import { isRecordLike } from '@sim/utils/object' +import { shouldDecode } from '../canonicalize/params' +import { decodeToolParam, toolParamDeclaration } from '../canonicalize/tools' +import type { CatalogSubBlock } from '../catalog/types' +import type { LockItem } from '../lock' +import type { BlockKey, CanonicalParam, CanonicalTool, SubBlockId } from '../model' +import type { MaterializeContext } from './context' +import { deepEqual, unliftValue } from './values' + +/** What encoding one param needs besides the value itself. */ +export interface ParamSite { + blockKey: BlockKey + param: SubBlockId + declaration: CatalogSubBlock | undefined + /** The stored value this param replaces (`undefined` when the subBlock is new). */ + prevRaw: unknown + /** The prev param, decoded, when this block continues a prev block. */ + prevParam: CanonicalParam | undefined + /** Ids to give inputFormat fields, by name, in preference order (lock first, then prev). */ + itemIds: LockItem[] + /** Branch lists are always stored as text: the canvas reads them with `toString()`. */ + forceText: boolean +} + +/** A stored list, native or as JSON text; anything else is empty. */ +export function parseStoredList(raw: unknown): unknown[] { + if (Array.isArray(raw)) return raw + if (typeof raw !== 'string' || raw.trim() === '') return [] + try { + const parsed: unknown = JSON.parse(raw) + return Array.isArray(parsed) ? parsed : [] + } catch { + return [] + } +} + +/** + * The encoding a decoded value is written in (contract amendment 1): JSON text when the field is + * one canonicalize decodes and prev stored text (or, with no prev value, the catalog `storage` is + * `json-string`); native otherwise. Scalars are always native, and a field canonicalize never + * decodes keeps a structured value native so it reads back unchanged. + */ +function encodeStorage(json: unknown, site: ParamSite): unknown { + if (typeof json !== 'object' || json === null) return json + if (site.forceText) return JSON.stringify(json) + if (!shouldDecode(site.declaration)) return json + const asText = + site.prevRaw !== undefined && site.prevRaw !== null + ? typeof site.prevRaw === 'string' + : site.declaration?.storage === 'json-string' + return asText ? JSON.stringify(json) : json +} + +/** + * Puts inputFormat field ids back (s1 §4 "Items", quirk 27): canonicalize moved the id of every + * field with a unique name to the lock, so each such field takes the lock's id for its name, then + * prev's, else a new one. Fields that kept their id inline are untouched. The editor's `collapsed` + * flag is carried over from the prev field with the same id. + */ +function restoreInputFormatIds(list: unknown[], site: ParamSite, context: MaterializeContext) { + const nameCounts = new Map() + for (const item of list) { + if (isRecordLike(item) && typeof item.name === 'string') { + nameCounts.set(item.name, (nameCounts.get(item.name) ?? 0) + 1) + } + } + const prevById = new Map>() + for (const item of parseStoredList(site.prevRaw)) { + if (isRecordLike(item) && typeof item.id === 'string') prevById.set(item.id, item) + } + const used = new Set() + return list.map((item) => { + if (!isRecordLike(item) || typeof item.name !== 'string' || item.id !== undefined) return item + if (nameCounts.get(item.name) !== 1) return item + const name = item.name + const known = site.itemIds.find((entry) => entry.name === name && !used.has(entry.id)) + const id = known?.id ?? context.hooks.newId() + used.add(id) + const restored: Record = { id, ...item } + const prevItem = prevById.get(id) + if (prevItem && prevItem.collapsed !== undefined) restored.collapsed = prevItem.collapsed + return restored + }) +} + +/** + * Puts table row ids back (quirk 24): canonicalize dropped each `{ id, cells }` row's id, so a row + * takes the id of the first unused prev row with the same cells, else a new one. + */ +function restoreRowIds(list: unknown[], site: ParamSite, context: MaterializeContext) { + const prevRows = parseStoredList(site.prevRaw).filter( + (row): row is Record & { id: string } => + isRecordLike(row) && typeof row.id === 'string' && isRecordLike(row.cells) + ) + const used = new Set() + return list.map((row) => { + if (!isRecordLike(row) || !isRecordLike(row.cells) || row.id !== undefined) return row + const cells = row.cells + const match = prevRows.find((prev) => !used.has(prev.id) && deepEqual(prev.cells, cells)) + const id = match?.id ?? context.hooks.newId() + used.add(id) + return { id, ...row } + }) +} + +/** + * A tool param in `StoredTool.params` form: text through `encodeToolParamValue` + * (tools/param-shape.ts:185) whenever `decodeToolParamValue` reads it back to the same value, + * else the native value (a `null`, or a value that does not fit the declared shape). + */ +function encodeToolParam(json: unknown, shape: ReturnType['shape']) { + if (typeof json === 'string') return json + const text = json === null || json === undefined ? '' : JSON.stringify(json) + return deepEqual(decodeToolParam(text, shape), json) ? text : json +} + +function encodeTool( + tool: CanonicalTool, + prev: { raw: Record; canonical: CanonicalTool } | undefined, + site: ParamSite, + context: MaterializeContext +): Record { + const location = { blockKey: site.blockKey, param: site.param } + const stored: Record = { type: tool.type } + if (tool.title !== undefined) stored.title = tool.title + if (tool.toolId !== undefined) stored.toolId = tool.toolId + if (tool.operation !== undefined) stored.operation = tool.operation + + const prevParams = prev && isRecordLike(prev.raw.params) ? prev.raw.params : undefined + const params: Record = {} + for (const [key, value] of Object.entries(tool.params)) { + if ( + prev && + prevParams && + Object.hasOwn(prevParams, key) && + deepEqual(prev.canonical.params[key], value) + ) { + params[key] = prevParams[key] + continue + } + const { shape } = toolParamDeclaration(context.catalog, tool, key) + params[key] = encodeToolParam(unliftValue(value, context, location), shape) + } + stored.params = params + if (prev && prev.raw.isExpanded !== undefined) stored.isExpanded = prev.raw.isExpanded + + if (tool.usageControl !== undefined) stored.usageControl = tool.usageControl + if (tool.usageControlExpression !== undefined) { + stored.usageControlExpression = tool.usageControlExpression + } + if (tool.customTool?.ref) + stored.customToolId = unliftValue(tool.customTool.ref, context, location) + if (tool.customTool?.snapshot) { + stored.schema = tool.customTool.snapshot.schema + stored.code = tool.customTool.snapshot.code + } + if (tool.operationPolicy !== undefined) stored.operationPolicy = tool.operationPolicy + for (const [key, value] of Object.entries(tool.extra ?? {})) stored[key] = value + return stored +} + +/** + * For each compiled tool, the index of the prev tool it continues: the first unused prev tool + * canonical-equal to it, else the unused prev tool of the same type at the same position. A tool + * that moved keeps its stored extras (`isExpanded`) and its explicit modes. + */ +export function matchPrevTools( + tools: CanonicalTool[], + prevTools: CanonicalTool[] +): Array { + const used = new Set() + const matches: Array = tools.map((tool) => { + const index = prevTools.findIndex((prev, i) => !used.has(i) && deepEqual(prev, tool)) + if (index === -1) return undefined + used.add(index) + return index + }) + return matches.map((match, index) => { + if (match !== undefined) return match + if (used.has(index) || prevTools[index]?.type !== tools[index].type) return undefined + used.add(index) + return index + }) +} + +/** + * A tool-input list (s1 materialize step 3). A tool canonical-equal to the prev tool it continues + * keeps prev's stored object; others are re-encoded, keeping prev's raw text for each param whose + * decoded value is unchanged. The list is text when prev stored text (or, with no prev, when the + * catalog says `json-string`). + */ +function encodeTools(tools: CanonicalTool[], site: ParamSite, context: MaterializeContext) { + const prevList = parseStoredList(site.prevRaw) + const prevTools = site.prevParam?.kind === 'tools' ? site.prevParam.tools : [] + const matches = matchPrevTools(tools, prevTools) + const list = tools.map((tool, index) => { + const match = matches[index] + const raw = match !== undefined ? prevList[match] : undefined + const canonical = match !== undefined ? prevTools[match] : undefined + if (!isRecordLike(raw) || !canonical) return encodeTool(tool, undefined, site, context) + if (deepEqual(tool, canonical)) return raw + return encodeTool(tool, { raw, canonical }, site, context) + }) + const asText = + site.prevRaw !== undefined && site.prevRaw !== null + ? typeof site.prevRaw === 'string' + : site.declaration?.storage === 'json-string' + return asText ? JSON.stringify(list) : list +} + +/** The stored value of one changed param (s1 materialize step 3). */ +export function encodeParam( + param: CanonicalParam, + site: ParamSite, + context: MaterializeContext +): unknown { + if (param.kind === 'tools') return encodeTools(param.tools, site, context) + let json = unliftValue(param.value, context, { blockKey: site.blockKey, param: site.param }) + if (Array.isArray(json) && site.declaration?.structured === 'inputFormat') { + json = restoreInputFormatIds(json, site, context) + } else if (Array.isArray(json) && site.declaration?.structured === 'tableRows') { + json = restoreRowIds(json, site, context) + } + return encodeStorage(json, site) +} diff --git a/packages/workflow-code/src/materialize/quirks.test-helpers.ts b/packages/workflow-code/src/materialize/quirks.test-helpers.ts new file mode 100644 index 00000000000..b535ac8f3f8 --- /dev/null +++ b/packages/workflow-code/src/materialize/quirks.test-helpers.ts @@ -0,0 +1,341 @@ +/** + * One stored workflow per s1 §5 quirk class (numbers in the names), each a shape real stored + * graphs hold. The O1/O3 tests run every one of them through canonicalize and materialize. + */ + +import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' +import { blockState, edge, workflowState } from './fixtures.test-helpers' + +const START = blockState('start', 'start_trigger', 'Start', { + inputFormat: [{ id: 'f-q', name: 'question', type: 'string', value: '', collapsed: true }], +}) + +export const QUIRK_STATES: Array<[string, WorkflowState]> = [ + [ + '1: stale hidden values and a standalone advanced field with advanced off', + workflowState([ + blockState('s1', 'slack', 'Slack', { + operation: 'read', + text: 'stale text the operation no longer shows', + threadTs: '1700000000.0001', + }), + ]), + ], + [ + '2: explicit, inferred and legacy advancedMode pair modes', + workflowState([ + blockState( + 's1', + 'slack', + 'Explicit', + { operation: 'send', credential: 'cred-1', manualChannel: 'C9' }, + { data: { canonicalModes: { oauthCredential: 'basic', channel: 'advanced' } } } + ), + blockState('s2', 'slack', 'Inferred', { operation: 'send', manualChannel: 'C9' }), + blockState( + 's3', + 'slack', + 'Legacy', + { operation: 'send', channel: 'C1' }, + { advancedMode: true } + ), + ]), + ], + [ + '3, 9, 17, 24: tool lists with index and legacy modes, stored as text, isExpanded, custom tools', + workflowState([ + blockState( + 'a1', + 'agent', + 'Agent', + { + model: 'gpt-4o', + tools: JSON.stringify([ + { + type: 'slack', + operation: 'send', + toolId: 'slack_message', + title: 'Slack', + params: { channel: 'C1', notify: 'true', limit: '5', manualChannel: '' }, + isExpanded: true, + usageControl: 'auto', + }, + { + type: 'slack', + operation: 'send', + params: { manualChannel: 'C2' }, + isExpanded: false, + }, + { + type: 'custom-tool', + customToolId: 'ct-1', + schema: { type: 'function', function: { name: 'lookup' } }, + code: 'return 1', + usageControl: 'force', + extraFlag: 1, + }, + ]), + }, + { + data: { + canonicalModes: { '0:channel': 'basic', 'slack:channel': 'advanced' }, + }, + } + ), + ]), + ], + [ + '4, 5, 6: condition titles, every row id format, UI junk and whitespace in the JSON', + workflowState( + [ + blockState('c1', 'condition', 'Gate', { + conditions: `[ {"id":"c1-if","title":"if","value":" > 1","showTags":false,"searchTerm":"x"}, + {"id":"c1-else-if-1700000000","title":"Otherwise if","value":"true","cursorPosition":3}, + {"id":"0f3a7c58-3b9e-4b8e-9c2a-9b2b4b8f2a11","value":"false"}, + {"title":"else","value":""} ]`, + }), + blockState('r1', 'router_v2', 'Router', { + context: 'route it', + routes: JSON.stringify([ + { id: 'r1-route1', title: 'Route 1', value: 'sales' }, + { id: 'r1-route2', title: 'Support', value: 'support', key: 'support' }, + ]), + }), + blockState('f1', 'function', 'Sales', { code: 'return 1' }), + blockState('f2', 'function', 'Support', { code: 'return 2' }), + ], + { + edges: [ + edge('e1', 'c1', 'f1', 'condition-c1-if'), + edge('e2', 'c1', 'f2', 'condition-c1-else-if-1700000000'), + edge('e3', 'r1', 'f1', 'router-r1-route1'), + edge('e4', 'r1', 'f2', 'router-r1-route2'), + ], + } + ), + ], + [ + '7: never-persisted conditions with an edge on the implicit if handle', + workflowState( + [blockState('c1', 'condition', 'Gate'), blockState('f1', 'function', 'Next', { code: '' })], + { edges: [edge('e1', 'c1', 'f1', 'condition-c1-if')] } + ), + ], + [ + '9: JSON text with whitespace in structured fields and resource ids, code left as text', + workflowState([ + blockState('k1', 'knowledge', 'KB', { + knowledgeBaseIds: 'kb-1, missing-kb', + tagFilters: ' [ {"tagName":"team","tagValue":"core"} ] ', + }), + blockState('a1', 'agent', 'Writer', { responseFormat: '{ "type": "object" }' }), + ]), + ], + [ + '10, 11, 12, 26: trigger runtime ids, triggerConfig, and stored outputs', + workflowState([ + blockState( + 't1', + 'slack', + 'Slack Trigger', + { + botToken: '{{SLACK_BOT}}', + webhookId: 'wh-1', + triggerPath: 't1', + triggerConfig: { botToken: '{{SLACK_BOT}}' }, + triggerId: 'slack_webhook', + }, + { triggerMode: true, outputs: { event: { type: 'json' } } } + ), + ]), + ], + [ + '19: loop and parallel configs duplicated in data and the maps, count 0, nesting', + workflowState( + [ + blockState( + 'l1', + 'loop', + 'Outer', + {}, + { + data: { + loopType: 'forEach', + collection: '', + count: 0, + width: 500, + height: 300, + }, + } + ), + blockState( + 'p1', + 'parallel', + 'Fan', + {}, + { + data: { parentId: 'l1', extent: 'parent', count: 3, batchSize: 40 }, + } + ), + blockState( + 'f1', + 'function', + 'Work', + { code: 'return ' }, + { + data: { parentId: 'p1', extent: 'parent' }, + } + ), + ], + { + loops: { + l1: { + id: 'l1', + nodes: ['p1'], + iterations: 0, + loopType: 'forEach', + forEachItems: '', + whileCondition: '', + enabled: true, + }, + }, + parallels: { + p1: { id: 'p1', nodes: ['f1'], count: 3, batchSize: 40, enabled: true }, + }, + edges: [ + edge('e1', 'p1', 'f1', 'parallel-start-source'), + edge('e2', 'l1', 'p1', 'loop-start-source'), + ], + } + ), + ], + [ + '20: side-anchored and empty handles, an error edge with errorEnabled off, duplicates, dangling', + workflowState( + [ + START, + blockState('f1', 'function', 'Fetch', { code: 'x' }), + blockState('f2', 'function', 'Handle', { code: 'y' }), + ], + { + edges: [ + edge('e1', 'start', 'f1', 'source-right', { data: { animated: true } }), + edge('e2', 'start', 'f1', ''), + edge('e3', 'f1', 'f2', 'error'), + edge('e4', 'f2', 'gone', 'source'), + edge('e5', 'f1', 'f2', 'mystery-handle'), + ], + } + ), + ], + [ + '21: legacy normalized-name collisions and dotted names', + workflowState([ + blockState('b1', 'function', 'Agent.1', { code: '' }), + blockState('b2', 'function', 'Agent 1', { code: 'a' }), + blockState('b3', 'function', 'agent1', { code: 'b' }), + ]), + ], + [ + '22, retry: a locked block, raw retry kept while disabled, enabled off', + workflowState([ + blockState( + 'f1', + 'function', + 'Locked', + { code: 'x' }, + { + locked: true, + enabled: false, + retry: { enabled: false, maxTries: 4, waitBetweenTriesMs: 1500 }, + errorEnabled: true, + } + ), + ]), + ], + [ + '23, 29: synthetic tool mirrors, parked keys, type drift and a map key that differs from id', + workflowState([ + blockState( + 'a1', + 'agent', + 'Agent', + { + model: 'gpt-4o', + 'tools-tool-0-channel': 'C1', + _removed_systemPrompt: 'old', + }, + {} + ), + { + ...blockState('f1', 'function', 'Code'), + subBlocks: { + code: { id: 'code', type: 'short-input', value: 'return 1' }, + language: { id: 'lang', type: 'dropdown', value: 'javascript' }, + }, + }, + ]), + ], + [ + '24, 27: table row ids and a blank starter row, inputFormat duplicate and empty names', + workflowState([ + blockState('h1', 'api', 'Call', { + url: 'https://example.com', + headers: [ + { id: 'row-1', cells: { Key: 'Accept', Value: 'json' } }, + { id: 'row-2', cells: { Key: '', Value: '' } }, + ], + }), + blockState('s1', 'start_trigger', 'Start', { + inputFormat: [ + { id: 'f-a', name: 'a', type: 'string', collapsed: false }, + { id: 'f-dup1', name: 'dup', type: 'string' }, + { id: 'f-dup2', name: 'dup', type: 'number' }, + { id: 'legacy-7', name: '', type: 'string' }, + ], + }), + ]), + ], + [ + '25: empty string kept apart from null', + workflowState([ + blockState('s1', 'slack', 'Slack', { operation: '', text: null, threadTs: '' }), + ]), + ], + [ + 'variables and variables-input ids, with a literal $sim object', + workflowState( + [ + blockState('v1', 'variables', 'Set', { + variables: JSON.stringify([ + { id: 'row-a', variableId: 'var-1', variableName: 'count', value: '1' }, + { id: 'row-b', variableId: 'var-gone', value: '2' }, + ]), + }), + blockState('f1', 'function', 'Code', { code: '' }), + blockState('x1', 'api', 'Raw', { url: { $sim: 'not-a-node', x: 1 } }), + ], + { + variables: { + 'var-1': { id: 'var-1', name: 'Count', type: 'number', value: 1 }, + 'var-2': { id: 'var-2', name: 'Payload', type: 'object', value: { a: [1, null] } }, + }, + } + ), + ], + [ + '15, 16, 18: unknown and legacy block types and opaque data', + workflowState([ + blockState( + 'u1', + 'custom_block_acme', + 'Acme', + { '9b0c-field': 'v', workflowId: 'wf' }, + { + data: { type: 'acme', customFlag: { nested: true } } as BlockState['data'], + } + ), + blockState('u2', 'function_v0', 'Old Code', { code: 'legacy' }), + ]), + ], +] diff --git a/packages/workflow-code/src/materialize/subflows.ts b/packages/workflow-code/src/materialize/subflows.ts new file mode 100644 index 00000000000..b38f0970fa4 --- /dev/null +++ b/packages/workflow-code/src/materialize/subflows.ts @@ -0,0 +1,117 @@ +import type { BlockState, Loop, Parallel } from '@sim/workflow-types/workflow' +import type { Json, LoopSpec, ParallelSpec } from '../model' + +/** `block.data` keys each subflow kind owns, and the model field each one holds. */ +function dataFields(spec: LoopSpec | ParallelSpec): Record { + if (spec.kind === 'loop') { + return { + loopType: spec.loopType, + count: spec.iterations, + collection: spec.forEachItems, + whileCondition: spec.whileCondition, + doWhileCondition: spec.doWhileCondition, + } + } + return { + parallelType: spec.parallelType, + count: spec.count, + collection: spec.distribution, + batchSize: spec.batchSize, + } +} + +/** + * Writes a changed subflow config into `block.data` (s1 materialize step 6). A field the spec + * omits is removed, so storage omits it again (contract amendment 9). Keys listed in `skip` hold a + * value canonicalize could not read as config and kept under `opaque`; that copy wins. + */ +export function writeSubflowData( + data: Record, + spec: LoopSpec | ParallelSpec, + skip: ReadonlySet +): void { + for (const [key, value] of Object.entries(dataFields(spec))) { + if (skip.has(key)) continue + if (value === undefined) delete data[key] + else data[key] = value + } +} + +function setOrDelete(target: T, key: K, value: T[K]): void { + if (value === undefined) delete target[key] + else target[key] = value +} + +export interface SubflowEntryInputs { + id: string + block: BlockState + spec: LoopSpec | ParallelSpec + /** Ids of the blocks whose `data.parentId` is this container, in block order. */ + nodes: string[] + prevEntry: Loop | Parallel | undefined + /** Whether the config, enabled flag or locked flag differs from prev's (always for new). */ + specChanged: boolean + enabledChanged: boolean + lockedChanged: boolean + /** True for a container that continues a prev one. */ + matched: boolean + prevNodes: string[] +} + +function sameMembers(left: readonly string[], right: readonly string[]): boolean { + if (left.length !== right.length) return false + const members = new Set(left) + return right.every((id) => members.has(id)) +} + +/** + * The loops/parallels map entry for a container (s1 materialize step 6, `generateLoopBlocks`), + * consistent with `block.data`. Prev's entry is returned untouched when its config, membership and + * flags are unchanged. A continuing container that had no entry gets one only when something + * changed, so a no-op write adds nothing. + */ +export function subflowEntry(inputs: SubflowEntryInputs): Loop | Parallel | undefined { + const { block, spec, prevEntry } = inputs + const membersChanged = !sameMembers(prevEntry?.nodes ?? inputs.prevNodes, inputs.nodes) + const changed = + inputs.specChanged || inputs.enabledChanged || inputs.lockedChanged || membersChanged + if (prevEntry && !changed) return prevEntry + if (!prevEntry && inputs.matched && !changed) return undefined + + const enabled = block.enabled !== false + if (spec.kind === 'loop') { + const entry: Loop = prevEntry + ? { ...(prevEntry as Loop) } + : { + id: inputs.id, + nodes: inputs.nodes, + iterations: spec.iterations, + loopType: spec.loopType, + enabled, + } + if (membersChanged) entry.nodes = inputs.nodes + if (!prevEntry || inputs.enabledChanged) entry.enabled = enabled + if (!prevEntry || inputs.specChanged) { + entry.iterations = spec.iterations + entry.loopType = spec.loopType + setOrDelete(entry, 'forEachItems', spec.forEachItems as Loop['forEachItems']) + setOrDelete(entry, 'whileCondition', spec.whileCondition) + setOrDelete(entry, 'doWhileCondition', spec.doWhileCondition) + } + if (inputs.lockedChanged) setOrDelete(entry, 'locked', block.locked === true ? true : undefined) + return entry + } + const entry: Parallel = prevEntry + ? { ...(prevEntry as Parallel) } + : { id: inputs.id, nodes: inputs.nodes, enabled } + if (membersChanged) entry.nodes = inputs.nodes + if (!prevEntry || inputs.enabledChanged) entry.enabled = enabled + if (!prevEntry || inputs.specChanged) { + setOrDelete(entry, 'parallelType', spec.parallelType) + setOrDelete(entry, 'count', spec.count) + setOrDelete(entry, 'distribution', spec.distribution as Parallel['distribution']) + setOrDelete(entry, 'batchSize', spec.batchSize) + } + if (inputs.lockedChanged) setOrDelete(entry, 'locked', block.locked === true ? true : undefined) + return entry +} diff --git a/packages/workflow-code/src/materialize/values.ts b/packages/workflow-code/src/materialize/values.ts new file mode 100644 index 00000000000..dc3936d06a3 --- /dev/null +++ b/packages/workflow-code/src/materialize/values.ts @@ -0,0 +1,189 @@ +import { isRecordLike } from '@sim/utils/object' +import { escapeRegExp } from '@sim/utils/string' +import type { + BlockKey, + CanonicalBlock, + CanonicalParam, + CanonicalWorkflow, + Json, + LoopSpec, + ParallelSpec, + SimNode, + Value, +} from '../model' +import { type MaterializeContext, report } from './context' + +const SIM_NODE_KINDS = new Set(['var', 'resource', 'unresolved', 'csv', 'literal']) + +/** Defined own entries; an `undefined` member means the same as an absent one. */ +function definedEntries(value: object): Array<[string, unknown]> { + return Object.entries(value).filter(([, member]) => member !== undefined) +} + +/** + * Structural equality over model values and stored JSON: key order is ignored (jsonb does not + * keep it, s1 quirk 28), an `undefined` member equals an absent one, and arrays compare in order. + */ +export function deepEqual(left: unknown, right: unknown): boolean { + if (Object.is(left, right)) return true + if (typeof left !== 'object' || typeof right !== 'object' || left === null || right === null) { + return false + } + if (Array.isArray(left) || Array.isArray(right)) { + if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) return false + return left.every((item, index) => deepEqual(item, right[index])) + } + const leftEntries = definedEntries(left) + const rightRecord = right as Record + if (leftEntries.length !== definedEntries(right).length) return false + return leftEntries.every( + ([key, member]) => Object.hasOwn(rightRecord, key) && deepEqual(member, rightRecord[key]) + ) +} + +export function isSimNode(value: unknown): value is SimNode { + return isRecordLike(value) && typeof value.$sim === 'string' && SIM_NODE_KINDS.has(value.$sim) +} + +/** Where a value sits, for diagnostics. */ +export interface ValueLocation { + blockKey?: BlockKey + param?: string +} + +/** + * The stored form of a model value: the inverse of canonicalize's `toValue` plus its id-site + * lifting (s1 canonicalize step 8). A `var` node becomes the variable's id, a `resource` node the + * resolver's id, an `unresolved` node its verbatim id, a `csv` node its items joined with `,`, and + * a `literal` node its wrapped JSON. A resource key the resolver cannot map is written as the key + * itself with `E_MAT_UNKNOWN_RESOURCE`, which fails the apply. + */ +export function unliftValue( + value: Value, + context: MaterializeContext, + location: ValueLocation +): unknown { + if (Array.isArray(value)) return value.map((item) => unliftValue(item, context, location)) + if (!isRecordLike(value)) return value + if (isSimNode(value)) return unliftNode(value, context, location) + const result: Record = {} + for (const [key, member] of Object.entries(value)) { + if (member !== undefined) result[key] = unliftValue(member, context, location) + } + return result +} + +function unliftNode(node: SimNode, context: MaterializeContext, location: ValueLocation): unknown { + switch (node.$sim) { + case 'literal': + return node.value + case 'unresolved': + return node.id + case 'csv': + return node.items.map((item) => unliftNode(item, context, location)).join(',') + case 'var': { + const id = context.variableIdByKey.get(node.key) + if (id !== undefined) return id + report(context, { + code: 'E_MAT_UNKNOWN_RESOURCE', + severity: 'error', + message: `Variable "${node.key}" does not exist in this workflow`, + ...location, + }) + return node.key + } + case 'resource': { + const id = context.resources?.toId(node.kind, node.key) ?? null + if (id !== null) return id + report(context, { + code: 'E_MAT_UNKNOWN_RESOURCE', + severity: 'error', + message: `No ${node.kind} "${node.key}" in this workspace`, + ...location, + }) + return node.key + } + } +} + +/** Rewrites every string inside a model value; nodes and their payloads are left alone. */ +function mapStrings(value: Value, rewrite: (text: string) => string): Value { + if (typeof value === 'string') return rewrite(value) + if (Array.isArray(value)) return value.map((item) => mapStrings(item, rewrite)) + if (!isRecordLike(value) || isSimNode(value)) return value + const result: Record = {} + for (const [key, member] of Object.entries(value)) result[key] = mapStrings(member, rewrite) + return result +} + +function rewriteParam(param: CanonicalParam, rewrite: (text: string) => string): CanonicalParam { + if (param.kind === 'value') return { kind: 'value', value: mapStrings(param.value, rewrite) } + return { + kind: 'tools', + tools: param.tools.map((tool) => { + const params: Record = {} + for (const [key, member] of Object.entries(tool.params)) { + params[key] = mapStrings(member, rewrite) + } + return { ...tool, params } + }), + } +} + +function rewriteSubflow( + subflow: LoopSpec | ParallelSpec, + rewrite: (text: string) => string +): LoopSpec | ParallelSpec { + if (subflow.kind === 'parallel') { + return subflow.distribution === undefined + ? subflow + : { ...subflow, distribution: mapStrings(subflow.distribution, rewrite) as Json } + } + const loop: LoopSpec = { ...subflow } + if (loop.forEachItems !== undefined) { + loop.forEachItems = mapStrings(loop.forEachItems, rewrite) as Json + } + if (loop.whileCondition !== undefined) loop.whileCondition = rewrite(loop.whileCondition) + if (loop.doWhileCondition !== undefined) loop.doWhileCondition = rewrite(loop.doWhileCondition) + return loop +} + +function rewriteBlock(block: CanonicalBlock, rewrite: (text: string) => string): CanonicalBlock { + const params: CanonicalBlock['params'] = {} + for (const [id, param] of Object.entries(block.params)) params[id] = rewriteParam(param, rewrite) + const result: CanonicalBlock = { ...block, params } + if (block.branches?.rows) { + result.branches = { + kind: block.branches.kind, + rows: block.branches.rows.map((row) => ({ ...row, value: rewrite(row.value) })), + } + } + if (block.subflow) result.subflow = rewriteSubflow(block.subflow, rewrite) + return result +} + +/** + * Rewrites ` +): CanonicalWorkflow { + const active = renames.filter(({ from }) => !Object.hasOwn(workflow.blocks, from)) + if (active.length === 0) return workflow + const patterns = active.map(({ from, to }) => ({ + pattern: new RegExp(`<${escapeRegExp(from)}\\.`, 'gi'), + replacement: `<${to}.`, + })) + const rewrite = (text: string): string => + text.includes('<') + ? patterns.reduce((acc, { pattern, replacement }) => acc.replace(pattern, replacement), text) + : text + const blocks: CanonicalWorkflow['blocks'] = {} + for (const [key, block] of Object.entries(workflow.blocks)) { + blocks[key] = rewriteBlock(block, rewrite) + } + return { ...workflow, blocks } +} From da75471bfce44c5917afbfeb7ad2be1ba74174c4 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:00:23 -0800 Subject: [PATCH 047/428] test(workflow-code): pin stored outputs across a rename-only change --- packages/workflow-code/src/materialize/index.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/workflow-code/src/materialize/index.test.ts b/packages/workflow-code/src/materialize/index.test.ts index fe7b033c496..3ff8fa6b72c 100644 --- a/packages/workflow-code/src/materialize/index.test.ts +++ b/packages/workflow-code/src/materialize/index.test.ts @@ -389,6 +389,7 @@ describe('materialize: identity (s1 §4)', () => { renamedFrom: 'Fetch', }) expect(result.state.blocks.a1.name).toBe('Load') + expect(result.state.blocks.a1.outputs).toBe(prev.blocks.a1.outputs) expect(subBlockValue(result.state, 'a2', 'code')).toBe('return + ') expect(result.state.edges.map((e) => e.id)).toEqual(['e1', 'e2']) expect(result.identity.blocks.load.id).toBe('a1') From 0f6b06add17e7560c0f6638ce0c51bf73667c77c Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:09:45 -0800 Subject: [PATCH 048/428] feat(workflows): materialize hooks over the editing engine, with O1-O3 against the real registry --- .../workflows/code/materialize-hooks.test.ts | 213 ++++++++++++++++++ .../lib/workflows/code/materialize-hooks.ts | 39 ++++ .../src/materialize/index.test.ts | 28 +++ 3 files changed, 280 insertions(+) create mode 100644 apps/sim/lib/workflows/code/materialize-hooks.test.ts create mode 100644 apps/sim/lib/workflows/code/materialize-hooks.ts diff --git a/apps/sim/lib/workflows/code/materialize-hooks.test.ts b/apps/sim/lib/workflows/code/materialize-hooks.test.ts new file mode 100644 index 00000000000..5baa60eaebd --- /dev/null +++ b/apps/sim/lib/workflows/code/materialize-hooks.test.ts @@ -0,0 +1,213 @@ +/** + * Materialize against the real registry, catalog and serializer (s1 §6): + * - O1: `materialize(canonicalize(x), null, { prev: x })` deep-equals `x` for a sample of the + * registry corpus covering every corpus kind (all s1 §5 quirk classes the generator emits); + * - O3: `canonicalize(materialize(c))` equals `c`, with prev and with every block new; + * - O2: materialized lockless with no prev, then aligned to the original by key, the serializer + * sees the same params, tools, connections and subflows, and `hasWorkflowChanged` is false. + * Cases whose types the registry does not know are skipped: the serializer rejects the original. + * + * The whole corpus runs in `corpus/roundtrip.corpus.test.ts`; this file keeps a fast sample so a + * hook or materialize regression fails here first. + */ + +import { isRecordLike, omit } from '@sim/utils/object' +import { canonicalEquals, canonicalize, materialize } from '@sim/workflow-code' +import { executionParity, findDifferences } from '@sim/workflow-code/proof' +import { describe, expect, it, vi } from 'vitest' + +vi.unmock('@/blocks/registry') +vi.unmock('@/tools/registry') + +import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' +import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' +import { type CorpusCase, generateRegistryCorpus } from '@/lib/workflows/code/corpus' +import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' +import { hasWorkflowChanged } from '@/lib/workflows/comparison/compare' +import { getBlockRegistry } from '@/blocks/registry' +import { SDK_NAMES } from '@/blocks/sdk-names.generated' +import { Serializer } from '@/serializer' +import type { WorkflowState } from '@/stores/workflows/workflow/types' + +const { catalog } = buildBlockCatalog({ + blocks: Object.values(getBlockRegistry()), + trigger: registryTrigger, + sdkNames: SDK_NAMES, +}) +const hooks = createMaterializeHooks() +const serializer = new Serializer() + +/** Every structural case, plus the first case of each per-block kind for every block type. */ +function sample(corpus: CorpusCase[]): CorpusCase[] { + const seen = new Set() + return corpus.filter((corpusCase) => { + if (!['operation', 'trigger', 'standalone-advanced', 'error-edge'].includes(corpusCase.kind)) { + return true + } + const [, type = ''] = corpusCase.id.split(':') + const slot = `${corpusCase.kind}:${type}` + if (seen.has(slot)) return false + seen.add(slot) + return true + }) +} + +const cases = sample(generateRegistryCorpus()) + +function canonical(state: WorkflowState, id: string) { + return canonicalize(state, { catalog, meta: { name: id, description: null } }).workflow +} + +function write(workflow: ReturnType, prev?: WorkflowState) { + return materialize(workflow, null, { catalog, hooks, prev, lockFreshness: 'none' }) +} + +/** Item keys canonicalize drops by design, by structured kind (s1 §4 "Items", quirk 24). */ +const DROPPED_ITEM_KEYS: Record = { + inputFormat: ['id', 'collapsed'], + tableRows: ['id'], + tools: ['isExpanded'], +} + +function stripItems(value: unknown, keys: string[]): unknown { + const text = typeof value === 'string' + let list: unknown = value + if (text) { + try { + list = JSON.parse(value) + } catch { + return value + } + } + if (!Array.isArray(list)) return value + const stripped = list.map((item) => (isRecordLike(item) ? omit(item, keys) : item)) + return text ? JSON.stringify(stripped) : stripped +} + +/** A branch list as rows: materialize always writes text, which an array-encoded prev is not. */ +function decodedBranches(value: unknown): unknown { + if (typeof value !== 'string') return value + try { + return JSON.parse(value) + } catch { + return value + } +} + +/** + * A state without what a lockless write with no prev cannot know and what never changes what + * runs: item ids and editor flags canonicalize drops (inputFormat field ids live in the lock's + * `items`; table row ids, `collapsed` and `isExpanded` are editor state), and layout + * (`horizontalHandles`, container sizes), which lives in the lock's `layout`. Branch lists compare + * decoded, because materialize repairs an array-encoded list to the text the canvas reads + * (condition-input.tsx:376-401). + */ +function withoutLockHeldState(state: WorkflowState): WorkflowState { + const blocks: WorkflowState['blocks'] = {} + for (const [id, block] of Object.entries(state.blocks)) { + const subBlocks: WorkflowState['blocks'][string]['subBlocks'] = {} + for (const [subBlockId, subBlock] of Object.entries(block.subBlocks ?? {})) { + const declared = catalog.blocks[block.type]?.subBlocks.find((s) => s.id === subBlockId) + const keys = declared?.structured ? DROPPED_ITEM_KEYS[declared.structured] : undefined + if (declared?.structured === 'branches') { + subBlocks[subBlockId] = { + ...subBlock, + value: decodedBranches(subBlock.value) as typeof subBlock.value, + } + } else { + subBlocks[subBlockId] = keys + ? { ...subBlock, value: stripItems(subBlock.value, keys) as typeof subBlock.value } + : subBlock + } + } + blocks[id] = { + ...omit(block, ['horizontalHandles']), + subBlocks, + data: block.data && omit(block.data, ['width', 'height']), + } + } + return { ...state, blocks } +} + +function failures( + check: (corpusCase: CorpusCase) => string | null, + subjects: CorpusCase[] = cases +): string[] { + return subjects.flatMap((corpusCase) => { + const failure = check(corpusCase) + return failure === null ? [] : [`${corpusCase.id}: ${failure}`] + }) +} + +describe(`materialize over the real registry (${cases.length} corpus cases)`, () => { + it('covers every corpus kind', () => { + expect(new Set(cases.map((c) => c.kind))).toEqual( + new Set([ + 'operation', + 'trigger', + 'standalone-advanced', + 'error-edge', + 'branches', + 'name-collision', + 'subflow', + 'input-format', + 'variables', + 'unknown-type', + ]) + ) + }) + + it('O1: a no-op round trip writes the stored state back exactly', () => { + expect( + failures((corpusCase) => { + const result = write(canonical(corpusCase.state, corpusCase.id), corpusCase.state) + const differences = findDifferences(corpusCase.state, result.state, 3) + return differences.length === 0 ? null : JSON.stringify(differences) + }) + ).toEqual([]) + }) + + it('O3: canonicalize(materialize(c)) equals c, with prev and with every block new', () => { + expect( + failures((corpusCase) => { + const c = canonical(corpusCase.state, corpusCase.id) + const withPrev = canonical(write(c, corpusCase.state).state, corpusCase.id) + const fresh = canonical(write(c).state, corpusCase.id) + if (!canonicalEquals(withPrev, c)) return 'differs with prev' + if (!canonicalEquals(fresh, c)) { + return JSON.stringify(findDifferences(c.blocks, fresh.blocks, 3)) + } + return null + }) + ).toEqual([]) + }) + + it('O2: a lockless write with no prev executes like the original', () => { + const executable = cases.filter((corpusCase) => !corpusCase.unknownTypes) + expect(executable.length).toBeGreaterThan(cases.length / 2) + expect( + failures((corpusCase) => { + const result = executionParity({ + original: withoutLockHeldState(corpusCase.state), + candidate: withoutLockHeldState(write(canonical(corpusCase.state, corpusCase.id)).state), + serialize: (state) => + serializer.serializeWorkflow(state.blocks, state.edges, state.loops, state.parallels), + hasWorkflowChanged, + }) + return result.ok ? null : JSON.stringify(result.differences.slice(0, 5)) + }, executable) + ).toEqual([]) + }) + + it('creates a new block through the editing engine, with editor subBlock entries', () => { + const c = canonical(cases[0].state, cases[0].id) + const result = write(c) + for (const [key, block] of Object.entries(c.blocks)) { + const id = result.identity.blocks[key].id + const stored = result.state.blocks[id] + expect(stored.type).toBe(block.type) + const declared = catalog.blocks[block.type]?.subBlocks.map((s) => s.id) ?? [] + for (const subBlockId of declared) expect(stored.subBlocks).toHaveProperty(subBlockId) + } + }) +}) diff --git a/apps/sim/lib/workflows/code/materialize-hooks.ts b/apps/sim/lib/workflows/code/materialize-hooks.ts new file mode 100644 index 00000000000..ebccb72e43b --- /dev/null +++ b/apps/sim/lib/workflows/code/materialize-hooks.ts @@ -0,0 +1,39 @@ +import { generateId } from '@sim/utils/id' +import type { MaterializeHooks } from '@sim/workflow-code' +import type { BlockState } from '@sim/workflow-types/workflow' +import { getEffectiveBlockOutputs } from '@/lib/workflows/blocks/outputs' +import { createBlockFromParams } from '@/lib/workflows/editing/builders' +import { hasTriggerCapability } from '@/lib/workflows/triggers/utils' +import { getBlock } from '@/blocks/registry' + +/** Trigger mode counts for outputs only on a block that can host triggers (builders.ts). */ +function effectiveTriggerMode(block: Pick): boolean { + const config = getBlock(block.type) + return block.triggerMode === true && config !== undefined && hasTriggerCapability(config) +} + +/** + * The server callbacks `materialize` needs (s1 §3, contract `MaterializeHooks`): + * - `initBlock` creates a block exactly as the editing engine adds one (`createBlockFromParams`), + * so a block written from code starts with the editor's subBlock entries, types, modes and + * layout defaults; + * - `computeOutputs` derives stored outputs the way the editing engine does + * (`getEffectiveBlockOutputs`); + * - `newId` is `generateId`. + */ +export function createMaterializeHooks(): MaterializeHooks { + return { + initBlock: ({ id, type, name, triggerMode }) => { + const block: BlockState = createBlockFromParams(id, { type, name, triggerMode }) + return block + }, + computeOutputs: (block) => { + const triggerMode = effectiveTriggerMode(block) + return getEffectiveBlockOutputs(block.type, block.subBlocks, { + triggerMode, + preferToolOutputs: !triggerMode, + }) + }, + newId: generateId, + } +} diff --git a/packages/workflow-code/src/materialize/index.test.ts b/packages/workflow-code/src/materialize/index.test.ts index 3ff8fa6b72c..354a25e6d5f 100644 --- a/packages/workflow-code/src/materialize/index.test.ts +++ b/packages/workflow-code/src/materialize/index.test.ts @@ -280,6 +280,34 @@ describe('materialize: params keep prev bytes unless they changed', () => { }) }) +describe('materialize: tool params', () => { + it('stores a changed tool param as the text decodeToolParamValue reads back, else natively', () => { + const state = workflowState([blockState('a1', 'agent', 'Agent', { model: 'gpt-4o' })]) + const target = edit(canonical(state).workflow, (draft) => { + draft.blocks.agent.params.tools = { + kind: 'tools', + tools: [ + { + type: 'slack', + toolId: 'slack_message', + params: { limit: 5, notify: true, channel: 'C1', manualChannel: null }, + modes: { channel: 'basic', oauthCredential: 'basic' }, + }, + ], + } + }) + const result = run(target, null, { prev: state }) + const stored = JSON.parse(String(subBlockValue(result.state, 'a1', 'tools'))) + expect(stored[0].params).toEqual({ + limit: '5', + notify: 'true', + channel: 'C1', + manualChannel: null, + }) + expect(canonicalEquals(canonical(result.state).workflow, target)).toBe(true) + }) +}) + describe('materialize: branches', () => { const state = () => QUIRK_STATES[3][1] From 44f8cbeba4afefdb806d1f6bb2caf79f3bf789a3 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:18:10 -0800 Subject: [PATCH 049/428] contract: workflow code_meta, code-meta diagnostics and compile knownKeys for legacy key overrides --- packages/workflow-code/DESIGN.md | 13 ++++++++ packages/workflow-code/src/api.ts | 7 +++++ packages/workflow-code/src/code-meta.ts | 30 +++++++++++++++++++ .../workflow-code/src/diagnostics/codes.ts | 23 ++++++++++++++ packages/workflow-code/src/index.ts | 2 ++ 5 files changed, 75 insertions(+) create mode 100644 packages/workflow-code/src/code-meta.ts diff --git a/packages/workflow-code/DESIGN.md b/packages/workflow-code/DESIGN.md index ad5563cff73..2e458c49231 100644 --- a/packages/workflow-code/DESIGN.md +++ b/packages/workflow-code/DESIGN.md @@ -230,3 +230,16 @@ instead of failing at run time. - **A15. knip.** Wave 3 removes `includeEntryExports: false` and the `@babel/parser` ignore from `knip.jsonc` once the consumers land. The `@sim/utils` ignore is already gone, because `hash.ts` uses it. +- **A16. `workflow.code_meta` (Wave 3E).** `WorkflowCodeMetaV1` in `src/code-meta.ts` is + `{ v: 1, bindings, order, comments }`, the server-side copy of what the lock's `LockHints` + carry, plus comments. + - Every entry is keyed by **block id**, never by key, so a canvas rename never orphans one. + Comment anchors are `encodeAnchor` keys whose block segment is the block id and whose `var` + segment is the variable id. + - There is no `branchKeys` map: branch keys persist on the rows as the optional row `key` + (s1 D2b), so there is one source of truth for them. + - `parseCodeMeta` mirrors `parseWorkflowLock`: strict, every problem at once, `x-` fields + preserved. Its codes are `E_CODE_META_*`. + - `CompileInput.knownKeys` (the lock's block keys) gates the new `meta.key` override, which is + how source carries a legacy `name~n` collision key or a reserved name (`Loop`, `Parallel`) + without being able to introduce one. A violation is `E_KEY_OVERRIDE`. diff --git a/packages/workflow-code/src/api.ts b/packages/workflow-code/src/api.ts index 400c6b34da9..b5c4e9460f0 100644 --- a/packages/workflow-code/src/api.ts +++ b/packages/workflow-code/src/api.ts @@ -245,6 +245,13 @@ export interface CompileInput { /** The highest `@sim-sdk` major the caller supports. */ sdkMajor: number limits?: CompileLimits + /** + * Block keys already bound to stored ids: the keys of the lock, or of the lock assembled from + * `workflow.code_meta`. A `meta.key` override (a legacy `name~n` collision key or a reserved + * name) compiles only for one of these, so source can carry a legacy key losslessly but never + * introduce one. Absent means no override is accepted. + */ + knownKeys?: ReadonlySet } export interface CompileResult { diff --git a/packages/workflow-code/src/code-meta.ts b/packages/workflow-code/src/code-meta.ts new file mode 100644 index 00000000000..0c37095a467 --- /dev/null +++ b/packages/workflow-code/src/code-meta.ts @@ -0,0 +1,30 @@ +/** + * `workflow.code_meta`: the server-side half of the lock (build-spec decision 6). It keeps the + * facts a source file carries that the stored graph does not (each block's `const` identifier, + * its declaration order, and comments) so they survive edits made only on the canvas and prints + * that have no repo lock. + * + * Everything is keyed by **block id**, never by block key, so a canvas rename never orphans an + * entry. Comment anchors use `encodeAnchor` with the block segment holding the block id and the + * `var` segment holding the variable id; `header`, `wiring` and `footer` carry no id. + * + * Branch keys are not stored here: they persist on the condition/router rows themselves as the + * optional row `key` (s1 D2b), which canonicalize already reads. + * + * Version policy matches the lock's: adding an optional field does not bump `v`; until every + * reader knows a field, data goes under an `x-` key, which the validator tolerates and preserves. + */ + +import type { LockExtensionKey } from './lock' +import type { AnchorKey, CodeComment, Json } from './model' + +export interface WorkflowCodeMetaV1 { + [extension: LockExtensionKey]: Json + v: 1 + /** Block id → the TS `const` identifier it prints as. Never in `SDK_RESERVED_IDENTIFIERS`. */ + bindings: Record + /** Block id → print-order tie-break (a non-negative integer; not unique, like the lock's). */ + order: Record + /** Comments by id-anchored `AnchorKey`, in source order. */ + comments: Partial> +} diff --git a/packages/workflow-code/src/diagnostics/codes.ts b/packages/workflow-code/src/diagnostics/codes.ts index 8e9a7cac620..f617debf911 100644 --- a/packages/workflow-code/src/diagnostics/codes.ts +++ b/packages/workflow-code/src/diagnostics/codes.ts @@ -30,6 +30,12 @@ export type CompileSyntaxCode = export type CompileScopeCode = | 'E_DUPLICATE_NAME' | 'E_RESERVED_NAME' + /** + * A `meta.key` override that is not a legacy key already bound to an id: it must be a key in + * `CompileInput.knownKeys` and either the `~n` collision form of the block's name (with the + * plain key declared too) or the block's reserved name. It never introduces a new key. + */ + | 'E_KEY_OVERRIDE' | 'E_EMPTY_NAME' | 'E_NAME_NOT_LITERAL' /** Includes a Levenshtein "did you mean" in `hint`. */ @@ -147,6 +153,22 @@ export type LockDiagnosticCode = /** A `codeFile` that is absolute, escapes the repo, or uses backslashes. */ | 'E_LOCK_CODE_FILE_PATH' +/** `parseCodeMeta` (code-meta.ts), for the stored `workflow.code_meta` value. */ +export type CodeMetaDiagnosticCode = + /** The text is not valid JSON. */ + | 'E_CODE_META_JSON' + /** `v` is missing or not `1`. */ + | 'E_CODE_META_VERSION' + /** A required field is missing or has the wrong type or format. */ + | 'E_CODE_META_SHAPE' + /** A field the schema does not define. */ + | 'E_CODE_META_UNKNOWN_FIELD' + /** A binding that is not a JS identifier, or is in `SDK_RESERVED_IDENTIFIERS`. */ + | 'E_CODE_META_BINDING' + | 'E_CODE_META_DUPLICATE_BINDING' + /** A `comments` key that `decodeAnchor` does not accept. */ + | 'E_CODE_META_ANCHOR' + /** canonicalize (s1 §2 algorithm, §5 quirks). */ export type CanonicalizeDiagnosticCode = /** Two stored names normalize to one key; the loser is keyed `key~n` (s1 step 1). */ @@ -249,6 +271,7 @@ export type ApplyDiagnosticCode = export type DiagnosticCode = | CompileDiagnosticCode | LockDiagnosticCode + | CodeMetaDiagnosticCode | CanonicalizeDiagnosticCode | MaterializeDiagnosticCode | ApplyDiagnosticCode diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index 7d63baf4054..929e0365941 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -62,11 +62,13 @@ export { fromCodeFile, toCodeFile, } from './code-files' +export type { WorkflowCodeMetaV1 } from './code-meta' export { compileWorkflow } from './compile' export type { ApplyDiagnosticCode, CanonicalizeDiagnosticCode, CodeFileCode, + CodeMetaDiagnosticCode, CompileCatalogCode, CompileDiagnosticCode, CompileEdgeCode, From 72c9b619e16c3cfa9275264c85c0421de1e2f35e Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:20:49 -0800 Subject: [PATCH 050/428] feat(workflow-code): parse, prune and remap workflow code_meta by block id --- packages/workflow-code/package.json | 4 + packages/workflow-code/src/code-meta.test.ts | 276 ++++++++++++++++ packages/workflow-code/src/code-meta.ts | 312 ++++++++++++++++++- packages/workflow-code/src/index.ts | 14 +- packages/workflow-code/src/lock.ts | 5 +- 5 files changed, 606 insertions(+), 5 deletions(-) create mode 100644 packages/workflow-code/src/code-meta.test.ts diff --git a/packages/workflow-code/package.json b/packages/workflow-code/package.json index 73c2ce92dab..a6fb3e5e5b0 100644 --- a/packages/workflow-code/package.json +++ b/packages/workflow-code/package.json @@ -14,6 +14,10 @@ "types": "./src/index.ts", "default": "./src/index.ts" }, + "./code-meta": { + "types": "./src/code-meta.ts", + "default": "./src/code-meta.ts" + }, "./catalog/canonical-index": { "types": "./src/catalog/canonical-index/index.ts", "default": "./src/catalog/canonical-index/index.ts" diff --git a/packages/workflow-code/src/code-meta.test.ts b/packages/workflow-code/src/code-meta.test.ts new file mode 100644 index 00000000000..172d655b12d --- /dev/null +++ b/packages/workflow-code/src/code-meta.test.ts @@ -0,0 +1,276 @@ +import fc from 'fast-check' +import { describe, expect, it } from 'vitest' +import { decodeAnchor, encodeAnchor } from './anchors' +import { + codeMetaEquals, + parseCodeMeta, + pruneCodeMeta, + remapCodeMeta, + type WorkflowCodeMetaV1, +} from './code-meta' +import type { Anchor, AnchorKey, CodeComment } from './model' + +const line = (text: string): CodeComment => ({ text, kind: 'line', placement: 'leading' }) + +function validMeta(): Record { + return { + v: 1, + bindings: { 'blk-a': 'fetchUser', 'blk-b': 'route' }, + order: { 'blk-a': 0, 'blk-b': 1 }, + comments: { + header: [line(' file header')], + [encodeAnchor({ kind: 'block', block: 'blk-a' })]: [line(' fetches the user')], + [encodeAnchor({ kind: 'edges', block: 'blk-b', port: 'branch:else' })]: [ + { text: ' fallback ', kind: 'block', placement: 'trailing' }, + ], + [encodeAnchor({ kind: 'var', variable: 'var-1' })]: [line(' retries')], + }, + 'x-future': { anything: [1, 'two'] }, + } +} + +function codesFor(input: unknown): string[] { + const result = parseCodeMeta(input) + return result.diagnostics ? result.diagnostics.map((d) => `${d.code} ${d.path ?? ''}`) : [] +} + +function parsed(input: unknown): WorkflowCodeMetaV1 { + const result = parseCodeMeta(input) + if (!result.meta) throw new Error(codesFor(input).join(', ')) + return result.meta +} + +describe('parseCodeMeta', () => { + it('accepts a well-formed value from an object or JSON text and keeps x- fields', () => { + const meta = parsed(validMeta()) + expect(meta['x-future']).toEqual({ anything: [1, 'two'] }) + expect(parsed(JSON.stringify(validMeta()))).toEqual(meta) + }) + + it('stops at an unsupported version and at text that is not JSON', () => { + expect(codesFor({ ...validMeta(), v: 2, bindings: 'nope' })).toEqual(['E_CODE_META_VERSION /v']) + expect(codesFor('{"v":1,')).toEqual(['E_CODE_META_JSON ']) + expect(codesFor([])).toEqual(['E_CODE_META_SHAPE ']) + }) + + it('rejects bindings that would not compile: non-identifiers, reserved names, duplicates', () => { + expect( + codesFor({ + ...validMeta(), + bindings: { a: 'two words', b: 'workflow', c: 'class', d: 'same', e: 'same' }, + }) + ).toEqual([ + 'E_CODE_META_BINDING /bindings/a', + 'E_CODE_META_BINDING /bindings/b', + 'E_CODE_META_BINDING /bindings/c', + 'E_CODE_META_DUPLICATE_BINDING /bindings/e', + ]) + }) + + it('reports every problem at once with a JSON pointer, escaping ~ and /', () => { + expect( + codesFor({ + v: 1, + bindings: {}, + order: { 'a/b': -1, 'c~d': 1.5 }, + comments: { 'block:x': [{ text: 1, kind: 'line', placement: 'leading' }] }, + typo: true, + }) + ).toEqual([ + 'E_CODE_META_UNKNOWN_FIELD /typo', + 'E_CODE_META_SHAPE /order/a~1b', + 'E_CODE_META_SHAPE /order/c~0d', + 'E_CODE_META_SHAPE /comments/block:x/0/text', + ]) + }) + + it('rejects anchors decodeAnchor refuses or that are not in canonical encoding', () => { + expect( + codesFor({ + ...validMeta(), + comments: { + 'nowhere:x': [line('a')], + 'block:a%zz': [line('b')], + 'edges:a:nonsense': [line('c')], + 'block:a:b': [line('d')], + }, + }) + ).toEqual([ + 'E_CODE_META_ANCHOR /comments/nowhere:x', + 'E_CODE_META_ANCHOR /comments/block:a%zz', + 'E_CODE_META_ANCHOR /comments/edges:a:nonsense', + 'E_CODE_META_ANCHOR /comments/block:a:b', + ]) + }) + + it('rejects comments with an unknown field, kind or placement', () => { + expect( + codesFor({ + ...validMeta(), + comments: { + header: [ + { text: 'a', kind: 'doc', placement: 'leading' }, + { text: 'b', kind: 'line', placement: 'above' }, + { text: 'c', kind: 'line', placement: 'leading', color: 'red' }, + ], + }, + }) + ).toEqual([ + 'E_CODE_META_SHAPE /comments/header/0/kind', + 'E_CODE_META_SHAPE /comments/header/1/placement', + 'E_CODE_META_UNKNOWN_FIELD /comments/header/2/color', + ]) + }) +}) + +describe('pruneCodeMeta and remapCodeMeta', () => { + it('prunes every entry of a deleted block or variable and keeps id-free anchors', () => { + const meta = parsed(validMeta()) + const pruned = pruneCodeMeta(meta, { + blocks: (id) => id !== 'blk-b', + variables: () => false, + }) + expect(pruned.bindings).toEqual({ 'blk-a': 'fetchUser' }) + expect(pruned.order).toEqual({ 'blk-a': 0 }) + expect(Object.keys(pruned.comments).sort()).toEqual(['block:blk-a', 'header']) + expect(pruned['x-future']).toEqual(meta['x-future']) + }) + + it('remaps ids onto a copy and drops ids the copy did not take', () => { + const meta = parsed(validMeta()) + const copy = remapCodeMeta(meta, new Map([['blk-a', 'new-a']]), new Map([['var-1', 'v-2']])) + expect(copy.bindings).toEqual({ 'new-a': 'fetchUser' }) + expect(copy.order).toEqual({ 'new-a': 0 }) + expect(Object.keys(copy.comments).sort()).toEqual(['block:new-a', 'header', 'var:v-2']) + }) + + it('keeps one binding when two ids collapse onto one', () => { + const meta = parsed(validMeta()) + const merged = remapCodeMeta( + meta, + new Map([ + ['blk-a', 'same'], + ['blk-b', 'same'], + ]), + new Map() + ) + expect(merged.bindings).toEqual({ same: 'fetchUser' }) + expect(parseCodeMeta(merged).diagnostics).toBeUndefined() + }) +}) + +const idArb = fc.stringMatching(/^[a-z0-9:%-]{1,8}$/) +const identifierArb = fc + .stringMatching(/^[a-z][A-Za-z0-9]{0,6}$/) + .filter( + (s) => parseCodeMeta({ v: 1, bindings: { x: s }, order: {}, comments: {} }).meta !== undefined + ) +const commentArb: fc.Arbitrary = fc.record({ + text: fc.string(), + kind: fc.constantFrom('line' as const, 'block' as const), + placement: fc.constantFrom('leading' as const, 'trailing' as const), +}) + +function anchorArb(blockIds: string[], variableIds: string[]): fc.Arbitrary { + const block = fc.constantFrom(...blockIds) + const options: fc.Arbitrary[] = [ + fc.constantFrom({ kind: 'header' }, { kind: 'wiring' }, { kind: 'footer' }), + block.map((b): Anchor => ({ kind: 'block', block: b })), + fc.tuple(block, idArb).map(([b, p]): Anchor => ({ kind: 'param', block: b, param: p })), + fc + .tuple(block, idArb) + .map(([b, k]): Anchor => ({ kind: 'edges', block: b, port: `branch:${k}` })), + ] + if (variableIds.length > 0) { + options.push(fc.constantFrom(...variableIds).map((v): Anchor => ({ kind: 'var', variable: v }))) + } + return fc.oneof(...options) +} + +const metaArb: fc.Arbitrary<{ + meta: WorkflowCodeMetaV1 + blockIds: string[] + variableIds: string[] +}> = fc + .record({ + blockIds: fc.uniqueArray(idArb, { minLength: 1, maxLength: 6 }), + variableIds: fc.uniqueArray(idArb, { maxLength: 3 }), + }) + .chain(({ blockIds, variableIds }) => + fc + .record({ + bindings: fc.uniqueArray(identifierArb, { + minLength: blockIds.length, + maxLength: blockIds.length, + }), + order: fc.array(fc.nat(50), { minLength: blockIds.length, maxLength: blockIds.length }), + comments: fc.array( + fc.tuple( + anchorArb(blockIds, variableIds), + fc.array(commentArb, { minLength: 1, maxLength: 2 }) + ), + { maxLength: 6 } + ), + }) + .map(({ bindings, order, comments }) => { + const meta: WorkflowCodeMetaV1 = { + v: 1, + bindings: Object.fromEntries(blockIds.map((id, i) => [id, bindings[i] ?? 'b'])), + order: Object.fromEntries(blockIds.map((id, i) => [id, order[i] ?? 0])), + comments: {}, + } + for (const [anchor, list] of comments) meta.comments[encodeAnchor(anchor)] = list + return { meta, blockIds, variableIds } + }) + ) + +function mentionedIds(meta: WorkflowCodeMetaV1): Set { + const ids = new Set([...Object.keys(meta.bindings), ...Object.keys(meta.order)]) + for (const key of Object.keys(meta.comments)) { + const anchor = decodeAnchor(key as AnchorKey) + if (anchor && 'block' in anchor) ids.add(anchor.block) + if (anchor?.kind === 'var') ids.add(anchor.variable) + } + return ids +} + +describe('code_meta properties', () => { + it('every generated value parses back to itself', () => { + fc.assert( + fc.property(metaArb, ({ meta }) => { + expect(codeMetaEquals(parsed(JSON.parse(JSON.stringify(meta))), meta)).toBe(true) + }) + ) + }) + + it('a remap through a bijection and back is the identity, and every remap parses', () => { + fc.assert( + fc.property(metaArb, ({ meta, blockIds, variableIds }) => { + const forward = new Map(blockIds.map((id, i) => [id, `copy-${i}`])) + const vars = new Map(variableIds.map((id, i) => [id, `copyvar-${i}`])) + const copy = remapCodeMeta(meta, forward, vars) + expect(parseCodeMeta(copy).diagnostics).toBeUndefined() + const back = remapCodeMeta( + copy, + new Map([...forward].map(([a, b]) => [b, a])), + new Map([...vars].map(([a, b]) => [b, a])) + ) + expect(codeMetaEquals(back, meta)).toBe(true) + }) + ) + }) + + it('pruning leaves no entry that mentions a removed id and keeps every live one', () => { + fc.assert( + fc.property(metaArb, fc.integer({ min: 0, max: 5 }), ({ meta, blockIds }, drop) => { + const removed = blockIds[drop % blockIds.length] + const pruned = pruneCodeMeta(meta, { blocks: (id) => id !== removed }) + expect(mentionedIds(pruned).has(removed)).toBe(false) + expect(codeMetaEquals(pruneCodeMeta(meta, { blocks: () => true }), meta)).toBe(true) + for (const id of blockIds) { + if (id !== removed) expect(pruned.bindings[id]).toBe(meta.bindings[id]) + } + }) + ) + }) +}) diff --git a/packages/workflow-code/src/code-meta.ts b/packages/workflow-code/src/code-meta.ts index 0c37095a467..388ddc9d9a1 100644 --- a/packages/workflow-code/src/code-meta.ts +++ b/packages/workflow-code/src/code-meta.ts @@ -15,8 +15,14 @@ * reader knows a field, data goes under an `x-` key, which the validator tolerates and preserves. */ -import type { LockExtensionKey } from './lock' -import type { AnchorKey, CodeComment, Json } from './model' +import { isRecordLike } from '@sim/utils/object' +import { decodeAnchor, encodeAnchor } from './anchors' +import type { CodeMetaDiagnosticCode } from './diagnostics/codes' +import type { Diagnostic } from './diagnostics/frame' +import { stableStringify } from './hash' +import { isJson, type LockExtensionKey, pointer } from './lock' +import type { Anchor, AnchorKey, CodeComment, Json } from './model' +import { SDK_RESERVED_IDENTIFIERS } from './sdk' export interface WorkflowCodeMetaV1 { [extension: LockExtensionKey]: Json @@ -28,3 +34,305 @@ export interface WorkflowCodeMetaV1 { /** Comments by id-anchored `AnchorKey`, in source order. */ comments: Partial> } + +export type CodeMetaDiagnostic = Diagnostic + +export type ParseCodeMetaResult = + | { meta: WorkflowCodeMetaV1; diagnostics?: undefined } + | { meta?: undefined; diagnostics: CodeMetaDiagnostic[] } + +const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ +const META_FIELDS = ['v', 'bindings', 'order', 'comments'] +const COMMENT_FIELDS = ['text', 'kind', 'placement'] + +function isExtensionKey(key: string): key is LockExtensionKey { + return key.startsWith('x-') +} + +class CodeMetaReader { + readonly diagnostics: CodeMetaDiagnostic[] = [] + + report(code: CodeMetaDiagnosticCode, segments: readonly string[], message: string): void { + this.diagnostics.push({ code, severity: 'error', message, path: pointer(segments) }) + } + + extensions(value: Record): Record { + const extensions: Record = {} + for (const [field, raw] of Object.entries(value)) { + if (META_FIELDS.includes(field)) continue + if (!isExtensionKey(field)) { + this.report('E_CODE_META_UNKNOWN_FIELD', [field], `Unknown code_meta field "${field}".`) + } else if (isJson(raw)) { + extensions[field] = raw + } else { + this.report('E_CODE_META_SHAPE', [field], 'An extension field must hold JSON.') + } + } + return extensions + } + + bindings(raw: unknown): Record { + if (!isRecordLike(raw)) { + this.report('E_CODE_META_SHAPE', ['bindings'], '"bindings" must be an object.') + return {} + } + const holders = new Map() + const entries: Array<[string, string]> = [] + for (const [blockId, binding] of Object.entries(raw)) { + const at = ['bindings', blockId] + if (typeof binding !== 'string' || !IDENTIFIER.test(binding)) { + this.report('E_CODE_META_BINDING', at, 'A binding must be a JS identifier.') + continue + } + if (SDK_RESERVED_IDENTIFIERS.has(binding)) { + this.report('E_CODE_META_BINDING', at, `"${binding}" is a reserved word or an SDK export.`) + continue + } + const holder = holders.get(binding) + if (holder !== undefined) { + this.report( + 'E_CODE_META_DUPLICATE_BINDING', + at, + `Binding "${binding}" is already used by block "${holder}".` + ) + continue + } + holders.set(binding, blockId) + entries.push([blockId, binding]) + } + return Object.fromEntries(entries) + } + + order(raw: unknown): Record { + if (!isRecordLike(raw)) { + this.report('E_CODE_META_SHAPE', ['order'], '"order" must be an object.') + return {} + } + const entries: Array<[string, number]> = [] + for (const [blockId, order] of Object.entries(raw)) { + if (typeof order === 'number' && Number.isSafeInteger(order) && order >= 0) { + entries.push([blockId, order]) + } else { + this.report('E_CODE_META_SHAPE', ['order', blockId], 'An order is a non-negative integer.') + } + } + return Object.fromEntries(entries) + } + + comment(raw: unknown, at: readonly string[]): CodeComment | null { + if (!isRecordLike(raw)) { + this.report('E_CODE_META_SHAPE', at, 'A comment must be an object.') + return null + } + for (const field of Object.keys(raw)) { + if (!COMMENT_FIELDS.includes(field)) { + this.report( + 'E_CODE_META_UNKNOWN_FIELD', + [...at, field], + `Unknown comment field "${field}".` + ) + } + } + const { text, kind, placement } = raw + if (typeof text !== 'string') { + this.report('E_CODE_META_SHAPE', [...at, 'text'], '"text" must be a string.') + return null + } + if (kind !== 'line' && kind !== 'block') { + this.report('E_CODE_META_SHAPE', [...at, 'kind'], '"kind" is "line" or "block".') + return null + } + if (placement !== 'leading' && placement !== 'trailing') { + this.report( + 'E_CODE_META_SHAPE', + [...at, 'placement'], + '"placement" is "leading" or "trailing".' + ) + return null + } + return { text, kind, placement } + } + + comments(raw: unknown): Partial> { + if (!isRecordLike(raw)) { + this.report('E_CODE_META_SHAPE', ['comments'], '"comments" must be an object.') + return {} + } + const result: Partial> = {} + for (const [key, list] of Object.entries(raw)) { + const at = ['comments', key] + const anchor = decodeAnchor(key) + if (!anchor || encodeAnchor(anchor) !== key) { + this.report('E_CODE_META_ANCHOR', at, `"${key}" is not a comment anchor.`) + continue + } + if (!Array.isArray(list)) { + this.report('E_CODE_META_SHAPE', at, 'Comments must be an array.') + continue + } + const comments: CodeComment[] = [] + list.forEach((entry: unknown, index) => { + const comment = this.comment(entry, [...at, String(index)]) + if (comment) comments.push(comment) + }) + if (comments.length > 0) result[encodeAnchor(anchor)] = comments + } + return result + } +} + +/** + * Validates a stored `code_meta` value, given as parsed JSON or as JSON text. Mirrors + * `parseWorkflowLock`: every problem is reported at once with an RFC 6901 `path`, any problem + * rejects the whole value, unknown fields are errors except `x-` extensions (preserved), and a + * version other than 1 stops validation there. + */ +export function parseCodeMeta(input: unknown): ParseCodeMetaResult { + const reader = new CodeMetaReader() + let json = input + if (typeof input === 'string') { + try { + json = JSON.parse(input) + } catch { + reader.report('E_CODE_META_JSON', [], 'code_meta is not valid JSON.') + return { diagnostics: reader.diagnostics } + } + } + if (!isRecordLike(json)) { + reader.report('E_CODE_META_SHAPE', [], 'code_meta must be a JSON object.') + return { diagnostics: reader.diagnostics } + } + if (json.v !== 1) { + reader.report('E_CODE_META_VERSION', ['v'], 'Unsupported code_meta version; expected 1.') + return { diagnostics: reader.diagnostics } + } + const extensions = reader.extensions(json) + const bindings = reader.bindings(json.bindings) + const order = reader.order(json.order) + const comments = reader.comments(json.comments) + if (reader.diagnostics.length > 0) return { diagnostics: reader.diagnostics } + return { meta: { ...extensions, v: 1, bindings, order, comments } } +} + +/** An empty `code_meta`. */ +export function emptyCodeMeta(): WorkflowCodeMetaV1 { + return { v: 1, bindings: {}, order: {}, comments: {} } +} + +/** + * Rewrites the ids an anchor carries: the block segment of `block`, `param`, `inactive` and + * `edges` anchors through `block`, the `var` segment through `variable`. A callback returning + * `null` drops the anchor; `header`, `wiring` and `footer` pass unchanged. + */ +export function mapAnchorIds( + anchor: Anchor, + block: (id: string) => string | null, + variable: (id: string) => string | null +): Anchor | null { + switch (anchor.kind) { + case 'header': + case 'wiring': + case 'footer': + return anchor + case 'var': { + const id = variable(anchor.variable) + return id === null ? null : { ...anchor, variable: id } + } + default: { + const id = block(anchor.block) + return id === null ? null : { ...anchor, block: id } + } + } +} + +/** The `x-` extension fields of a `code_meta`, which every rewrite preserves. */ +export function codeMetaExtensions(meta: WorkflowCodeMetaV1): Record { + const extensions: Record = {} + for (const [field, value] of Object.entries(meta)) { + if (isExtensionKey(field) && isJson(value)) extensions[field] = value + } + return extensions +} + +/** + * Maps every block id and variable id in `meta` through the callbacks; an entry whose callback + * returns `null` is dropped. When two ids map onto one, the first entry wins, and a binding + * already claimed is dropped, so the result always passes {@link parseCodeMeta}. + */ +function mapCodeMetaIds( + meta: WorkflowCodeMetaV1, + block: (id: string) => string | null, + variable: (id: string) => string | null +): WorkflowCodeMetaV1 { + const bindings: Record = {} + const taken = new Set() + for (const [id, binding] of Object.entries(meta.bindings)) { + const next = block(id) + if (next === null || Object.hasOwn(bindings, next) || taken.has(binding)) continue + bindings[next] = binding + taken.add(binding) + } + const order: Record = {} + for (const [id, value] of Object.entries(meta.order)) { + const next = block(id) + if (next !== null && !Object.hasOwn(order, next)) order[next] = value + } + const comments: Partial> = {} + for (const [key, list] of Object.entries(meta.comments)) { + const anchor = decodeAnchor(key) + const mapped = anchor ? mapAnchorIds(anchor, block, variable) : null + if (!mapped || !list || list.length === 0) continue + const mappedKey = encodeAnchor(mapped) + comments[mappedKey] = [...(comments[mappedKey] ?? []), ...list] + } + return { ...codeMetaExtensions(meta), v: 1, bindings, order, comments } +} + +/** + * Drops every entry for a block or variable that no longer exists. `blocks` and `variables` + * answer whether an id is still stored; an omitted predicate keeps every id of that kind. + * Readers still tolerate stale ids: pruning is hygiene, not the correctness gate. + */ +export function pruneCodeMeta( + meta: WorkflowCodeMetaV1, + live: { blocks?: (id: string) => boolean; variables?: (id: string) => boolean } +): WorkflowCodeMetaV1 { + const { blocks, variables } = live + return mapCodeMetaIds( + meta, + (id) => (!blocks || blocks(id) ? id : null), + (id) => (!variables || variables(id) ? id : null) + ) +} + +/** + * Re-keys `meta` onto a copy of its workflow (duplicate, fork, promote): each block id through + * `blockIds` and each variable id through `variableIds`. Ids absent from a map are dropped, so a + * copy never carries entries for blocks it did not copy. + */ +export function remapCodeMeta( + meta: WorkflowCodeMetaV1, + blockIds: ReadonlyMap, + variableIds: ReadonlyMap +): WorkflowCodeMetaV1 { + return mapCodeMetaIds( + meta, + (id) => blockIds.get(id) ?? null, + (id) => variableIds.get(id) ?? null + ) +} + +/** Whether two values hold the same entries, extensions included, in any key order. */ +export function codeMetaEquals(a: WorkflowCodeMetaV1, b: WorkflowCodeMetaV1): boolean { + return stableStringify(a) === stableStringify(b) +} + +/** Whether `meta` holds nothing worth storing (no entries and no extensions). */ +export function isEmptyCodeMeta(meta: WorkflowCodeMetaV1): boolean { + return ( + Object.keys(meta.bindings).length === 0 && + Object.keys(meta.order).length === 0 && + Object.keys(meta.comments).length === 0 && + Object.keys(codeMetaExtensions(meta)).length === 0 + ) +} diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index 929e0365941..a89d63a1147 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -62,7 +62,19 @@ export { fromCodeFile, toCodeFile, } from './code-files' -export type { WorkflowCodeMetaV1 } from './code-meta' +export { + type CodeMetaDiagnostic, + codeMetaEquals, + codeMetaExtensions, + emptyCodeMeta, + isEmptyCodeMeta, + mapAnchorIds, + type ParseCodeMetaResult, + parseCodeMeta, + pruneCodeMeta, + remapCodeMeta, + type WorkflowCodeMetaV1, +} from './code-meta' export { compileWorkflow } from './compile' export type { ApplyDiagnosticCode, diff --git a/packages/workflow-code/src/lock.ts b/packages/workflow-code/src/lock.ts index e87280ca4c1..f1d54e7a93f 100644 --- a/packages/workflow-code/src/lock.ts +++ b/packages/workflow-code/src/lock.ts @@ -145,7 +145,8 @@ function isExtensionKey(key: string): key is LockExtensionKey { return key.startsWith('x-') } -function isJson(value: unknown): value is Json { +/** Whether `value` is plain JSON with finite numbers only. */ +export function isJson(value: unknown): value is Json { if (value === null || typeof value === 'string' || typeof value === 'boolean') return true if (typeof value === 'number') return Number.isFinite(value) if (Array.isArray(value)) return value.every(isJson) @@ -153,7 +154,7 @@ function isJson(value: unknown): value is Json { } /** RFC 6901: `~` → `~0`, `/` → `~1`. */ -function pointer(segments: readonly string[]): string { +export function pointer(segments: readonly string[]): string { return segments.map((s) => `/${s.replace(/~/g, '~0').replace(/\//g, '~1')}`).join('') } From 8074956b0726a2134cbee60f4e0177a6ad7d3635 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:21:42 -0800 Subject: [PATCH 051/428] feat(db): add nullable workflow.code_meta jsonb for server-side source metadata --- .../db/migrations/0460_workflow_code_meta.sql | 1 + .../db/migrations/meta/0460_snapshot.json | 33206 ++++++++++++++++ packages/db/migrations/meta/_journal.json | 7 + packages/db/schema.ts | 7 + .../src/mocks/schema-tables.generated.ts | 1 + 5 files changed, 33222 insertions(+) create mode 100644 packages/db/migrations/0460_workflow_code_meta.sql create mode 100644 packages/db/migrations/meta/0460_snapshot.json diff --git a/packages/db/migrations/0460_workflow_code_meta.sql b/packages/db/migrations/0460_workflow_code_meta.sql new file mode 100644 index 00000000000..7855b7e398e --- /dev/null +++ b/packages/db/migrations/0460_workflow_code_meta.sql @@ -0,0 +1 @@ +ALTER TABLE "workflow" ADD COLUMN "code_meta" jsonb; \ No newline at end of file diff --git a/packages/db/migrations/meta/0460_snapshot.json b/packages/db/migrations/meta/0460_snapshot.json new file mode 100644 index 00000000000..c7f2b4d43cf --- /dev/null +++ b/packages/db/migrations/meta/0460_snapshot.json @@ -0,0 +1,33206 @@ +{ + "id": "be3b8806-8ecc-46ba-829d-ec1f22c33724", + "prevId": "7f748ca5-f85f-40f6-83ac-5bb4bb778fa8", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.account": { + "name": "account", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "account_id": { + "name": "account_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token": { + "name": "access_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_token": { + "name": "refresh_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "id_token": { + "name": "id_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "access_token_expires_at": { + "name": "access_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "refresh_token_expires_at": { + "name": "refresh_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oauth_config": { + "name": "oauth_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_revoked_at": { + "name": "refresh_revoked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "refresh_revoked_code": { + "name": "refresh_revoked_code", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_revoked_token_hash": { + "name": "refresh_revoked_token_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "account_user_id_idx": { + "name": "account_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_account_on_account_id_provider_id": { + "name": "idx_account_on_account_id_provider_id", + "columns": [ + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "account_user_id_user_id_fk": { + "name": "account_user_id_user_id_fk", + "tableFrom": "account", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.agent_memory_turn": { + "name": "agent_memory_turn", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "memory_id": { + "name": "memory_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "block_id": { + "name": "block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "node_id": { + "name": "node_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_order": { + "name": "execution_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "encrypted_state": { + "name": "encrypted_state", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "agent_memory_turn_invocation_unique": { + "name": "agent_memory_turn_invocation_unique", + "columns": [ + { + "expression": "memory_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "node_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "agent_memory_turn_workflow_idx": { + "name": "agent_memory_turn_workflow_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "agent_memory_turn_memory_id_memory_id_fk": { + "name": "agent_memory_turn_memory_id_memory_id_fk", + "tableFrom": "agent_memory_turn", + "tableTo": "memory", + "columnsFrom": ["memory_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "agent_memory_turn_workflow_id_workflow_id_fk": { + "name": "agent_memory_turn_workflow_id_workflow_id_fk", + "tableFrom": "agent_memory_turn", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.api_key": { + "name": "api_key", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key_hash": { + "name": "key_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'personal'" + }, + "access": { + "name": "access", + "type": "api_key_access", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'write'" + }, + "last_used": { + "name": "last_used", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "api_key_workspace_type_idx": { + "name": "api_key_workspace_type_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "api_key_user_type_idx": { + "name": "api_key_user_type_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "api_key_key_hash_idx": { + "name": "api_key_key_hash_idx", + "columns": [ + { + "expression": "key_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "api_key_user_id_user_id_fk": { + "name": "api_key_user_id_user_id_fk", + "tableFrom": "api_key", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "api_key_workspace_id_workspace_id_fk": { + "name": "api_key_workspace_id_workspace_id_fk", + "tableFrom": "api_key", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "api_key_created_by_user_id_fk": { + "name": "api_key_created_by_user_id_fk", + "tableFrom": "api_key", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "api_key_key_unique": { + "name": "api_key_key_unique", + "nullsNotDistinct": false, + "columns": ["key"] + } + }, + "policies": {}, + "checkConstraints": { + "workspace_type_check": { + "name": "workspace_type_check", + "value": "(type = 'workspace' AND workspace_id IS NOT NULL) OR (type = 'personal' AND workspace_id IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.assistant_tool_permission": { + "name": "assistant_tool_permission", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "read_policy": { + "name": "read_policy", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'allow'" + }, + "write_policy": { + "name": "write_policy", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'ask'" + }, + "overrides": { + "name": "overrides", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assistant_tool_permission_credential_idx": { + "name": "assistant_tool_permission_credential_idx", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assistant_tool_permission_user_idx": { + "name": "assistant_tool_permission_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assistant_tool_permission_organization_id_organization_id_fk": { + "name": "assistant_tool_permission_organization_id_organization_id_fk", + "tableFrom": "assistant_tool_permission", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assistant_tool_permission_user_id_user_id_fk": { + "name": "assistant_tool_permission_user_id_user_id_fk", + "tableFrom": "assistant_tool_permission", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assistant_tool_permission_credential_id_credential_id_fk": { + "name": "assistant_tool_permission_credential_id_credential_id_fk", + "tableFrom": "assistant_tool_permission", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "assistant_tool_permission_organization_id_user_id_credential_id_pk": { + "name": "assistant_tool_permission_organization_id_user_id_credential_id_pk", + "columns": ["organization_id", "user_id", "credential_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "assistant_tool_permission_policy_check": { + "name": "assistant_tool_permission_policy_check", + "value": "\"assistant_tool_permission\".\"read_policy\" IN ('allow', 'ask', 'block') AND \"assistant_tool_permission\".\"write_policy\" IN ('allow', 'ask', 'block')" + }, + "assistant_tool_permission_revision_check": { + "name": "assistant_tool_permission_revision_check", + "value": "\"assistant_tool_permission\".\"revision\" > 0" + } + }, + "isRLSEnabled": false + }, + "public.async_jobs": { + "name": "async_jobs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "run_at": { + "name": "run_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "attempts": { + "name": "attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_attempts": { + "name": "max_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 3 + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "output": { + "name": "output", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "async_jobs_status_started_at_idx": { + "name": "async_jobs_status_started_at_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "async_jobs_status_completed_at_idx": { + "name": "async_jobs_status_completed_at_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "completed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "async_jobs_schedule_pending_run_at_idx": { + "name": "async_jobs_schedule_pending_run_at_idx", + "columns": [ + { + "expression": "run_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"async_jobs\".\"type\" = 'schedule-execution' AND \"async_jobs\".\"status\" = 'pending'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "async_jobs_schedule_processing_started_at_idx": { + "name": "async_jobs_schedule_processing_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"async_jobs\".\"type\" = 'schedule-execution' AND \"async_jobs\".\"status\" = 'processing'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "async_jobs_schedule_unreconciled_terminal_idx": { + "name": "async_jobs_schedule_unreconciled_terminal_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"async_jobs\".\"type\" = 'schedule-execution' AND \"async_jobs\".\"status\" IN ('completed', 'failed', 'cancelled') AND COALESCE(\"async_jobs\".\"metadata\" ->> 'scheduleReconciled', 'false') <> 'true'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.audit_log": { + "name": "audit_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "actor_id": { + "name": "actor_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "action": { + "name": "action", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_type": { + "name": "resource_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "actor_name": { + "name": "actor_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "actor_email": { + "name": "actor_email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "resource_name": { + "name": "resource_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "ip_address": { + "name": "ip_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "surface": { + "name": "surface", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "audit_log_workspace_created_idx": { + "name": "audit_log_workspace_created_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_log_workspace_created_at_id_idx": { + "name": "audit_log_workspace_created_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"created_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_log_actor_created_idx": { + "name": "audit_log_actor_created_idx", + "columns": [ + { + "expression": "actor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_log_org_level_created_at_id_idx": { + "name": "audit_log_org_level_created_at_id_idx", + "columns": [ + { + "expression": "(\"metadata\"->>'organizationId')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"created_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"audit_log\".\"workspace_id\" IS NULL AND (\"audit_log\".\"metadata\"->>'organizationId') IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "audit_log_resource_idx": { + "name": "audit_log_resource_idx", + "columns": [ + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_log_action_idx": { + "name": "audit_log_action_idx", + "columns": [ + { + "expression": "action", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "audit_log_workspace_id_workspace_id_fk": { + "name": "audit_log_workspace_id_workspace_id_fk", + "tableFrom": "audit_log", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "audit_log_actor_id_user_id_fk": { + "name": "audit_log_actor_id_user_id_fk", + "tableFrom": "audit_log", + "tableTo": "user", + "columnsFrom": ["actor_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aws_marketplace_license": { + "name": "aws_marketplace_license", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "license_arn": { + "name": "license_arn", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "product_code": { + "name": "product_code", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "customer_aws_account_id": { + "name": "customer_aws_account_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "agreement_id": { + "name": "agreement_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "agreement_seen_at": { + "name": "agreement_seen_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "renewed_agreement_id": { + "name": "renewed_agreement_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "aws_marketplace_license_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "dimension": { + "name": "dimension", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "quantity": { + "name": "quantity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_verified_at": { + "name": "last_verified_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "last_verification_attempt_at": { + "name": "last_verification_attempt_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "license_event_received_at": { + "name": "license_event_received_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "claim_token_hash": { + "name": "claim_token_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "claim_expires_at": { + "name": "claim_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "linked_by_user_id": { + "name": "linked_by_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_linked_at": { + "name": "organization_linked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "ended_at": { + "name": "ended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "contact_email": { + "name": "contact_email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "company_name": { + "name": "company_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "aws_marketplace_license_arn_unique": { + "name": "aws_marketplace_license_arn_unique", + "columns": [ + { + "expression": "license_arn", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_claim_token_hash_unique": { + "name": "aws_marketplace_license_claim_token_hash_unique", + "columns": [ + { + "expression": "claim_token_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_agreement_id_idx": { + "name": "aws_marketplace_license_agreement_id_idx", + "columns": [ + { + "expression": "agreement_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_renewed_agreement_id_idx": { + "name": "aws_marketplace_license_renewed_agreement_id_idx", + "columns": [ + { + "expression": "renewed_agreement_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_account_product_idx": { + "name": "aws_marketplace_license_account_product_idx", + "columns": [ + { + "expression": "customer_aws_account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "product_code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_last_attempt_idx": { + "name": "aws_marketplace_license_last_attempt_idx", + "columns": [ + { + "expression": "last_verification_attempt_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_organization_id_idx": { + "name": "aws_marketplace_license_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_linked_by_user_id_idx": { + "name": "aws_marketplace_license_linked_by_user_id_idx", + "columns": [ + { + "expression": "linked_by_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "aws_marketplace_license_organization_id_organization_id_fk": { + "name": "aws_marketplace_license_organization_id_organization_id_fk", + "tableFrom": "aws_marketplace_license", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "aws_marketplace_license_linked_by_user_id_user_id_fk": { + "name": "aws_marketplace_license_linked_by_user_id_user_id_fk", + "tableFrom": "aws_marketplace_license", + "tableTo": "user", + "columnsFrom": ["linked_by_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aws_marketplace_usage_report": { + "name": "aws_marketplace_usage_report", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "license_id": { + "name": "license_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "dimension": { + "name": "dimension", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "hour_start": { + "name": "hour_start", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "aws_marketplace_usage_report_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "sent_at": { + "name": "sent_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "metering_record_id": { + "name": "metering_record_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reported_at": { + "name": "reported_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "aws_marketplace_usage_report_license_dimension_hour_unique": { + "name": "aws_marketplace_usage_report_license_dimension_hour_unique", + "columns": [ + { + "expression": "license_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "dimension", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "hour_start", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_usage_report_status_hour_idx": { + "name": "aws_marketplace_usage_report_status_hour_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "hour_start", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_usage_report_organization_id_idx": { + "name": "aws_marketplace_usage_report_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "aws_marketplace_usage_report_organization_id_organization_id_fk": { + "name": "aws_marketplace_usage_report_organization_id_organization_id_fk", + "tableFrom": "aws_marketplace_usage_report", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "aws_marketplace_usage_report_license_id_aws_marketplace_license_id_fk": { + "name": "aws_marketplace_usage_report_license_id_aws_marketplace_license_id_fk", + "tableFrom": "aws_marketplace_usage_report", + "tableTo": "aws_marketplace_license", + "columnsFrom": ["license_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aws_marketplace_usage_tally": { + "name": "aws_marketplace_usage_tally", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "dimension": { + "name": "dimension", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "period_start": { + "name": "period_start", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "counted_from": { + "name": "counted_from", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "cost_usd": { + "name": "cost_usd", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "units": { + "name": "units", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "aws_marketplace_usage_tally_organization_id_organization_id_fk": { + "name": "aws_marketplace_usage_tally_organization_id_organization_id_fk", + "tableFrom": "aws_marketplace_usage_tally", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "aws_marketplace_usage_tally_organization_id_dimension_period_start_pk": { + "name": "aws_marketplace_usage_tally_organization_id_dimension_period_start_pk", + "columns": ["organization_id", "dimension", "period_start"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.background_work_status": { + "name": "background_work_status", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "kind": { + "name": "kind", + "type": "background_work_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "background_work_status_value", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "background_work_status_workspace_status_idx": { + "name": "background_work_status_workspace_status_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "background_work_status_workflow_status_idx": { + "name": "background_work_status_workflow_status_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "background_work_status_meta_child_ws_idx": { + "name": "background_work_status_meta_child_ws_idx", + "columns": [ + { + "expression": "(\"metadata\" ->> 'childWorkspaceId')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "background_work_status_meta_other_ws_idx": { + "name": "background_work_status_meta_other_ws_idx", + "columns": [ + { + "expression": "(\"metadata\" ->> 'otherWorkspaceId')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "background_work_status_workspace_id_workspace_id_fk": { + "name": "background_work_status_workspace_id_workspace_id_fk", + "tableFrom": "background_work_status", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "background_work_status_workflow_id_workflow_id_fk": { + "name": "background_work_status_workflow_id_workflow_id_fk", + "tableFrom": "background_work_status", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.changelog_change": { + "name": "changelog_change", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "release_id": { + "name": "release_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "position": { + "name": "position", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "changelog_change_release_position_unique": { + "name": "changelog_change_release_position_unique", + "columns": [ + { + "expression": "release_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "position", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "changelog_change_release_id_changelog_release_id_fk": { + "name": "changelog_change_release_id_changelog_release_id_fk", + "tableFrom": "changelog_change", + "tableTo": "changelog_release", + "columnsFrom": ["release_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "changelog_change_workflow_id_workflow_id_fk": { + "name": "changelog_change_workflow_id_workflow_id_fk", + "tableFrom": "changelog_change", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "changelog_change_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "changelog_change_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "changelog_change", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "changelog_change_chat_id_copilot_chats_id_fk": { + "name": "changelog_change_chat_id_copilot_chats_id_fk", + "tableFrom": "changelog_change", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.changelog_release": { + "name": "changelog_release", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version_major": { + "name": "version_major", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "version_minor": { + "name": "version_minor", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "version_patch": { + "name": "version_patch", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "bump_reason": { + "name": "bump_reason", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "body_file_id": { + "name": "body_file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "published_at": { + "name": "published_at", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "changelog_release_workspace_version_unique": { + "name": "changelog_release_workspace_version_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version_major", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version_minor", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version_patch", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "changelog_release_body_file_unique": { + "name": "changelog_release_body_file_unique", + "columns": [ + { + "expression": "body_file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "changelog_release_workspace_published_idx": { + "name": "changelog_release_workspace_published_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "published_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "changelog_release_workspace_id_workspace_id_fk": { + "name": "changelog_release_workspace_id_workspace_id_fk", + "tableFrom": "changelog_release", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "changelog_release_body_file_id_workspace_files_id_fk": { + "name": "changelog_release_body_file_id_workspace_files_id_fk", + "tableFrom": "changelog_release", + "tableTo": "workspace_files", + "columnsFrom": ["body_file_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "changelog_release_created_by_user_id_fk": { + "name": "changelog_release_created_by_user_id_fk", + "tableFrom": "changelog_release", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "changelog_release_updated_by_user_id_fk": { + "name": "changelog_release_updated_by_user_id_fk", + "tableFrom": "changelog_release", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "changelog_release_version_check": { + "name": "changelog_release_version_check", + "value": "\"changelog_release\".\"version_major\" >= 0 AND \"changelog_release\".\"version_minor\" >= 0 AND \"changelog_release\".\"version_patch\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.chat": { + "name": "chat", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "identifier": { + "name": "identifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "customizations": { + "name": "customizations", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'public'" + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "allowed_emails": { + "name": "allowed_emails", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'[]'" + }, + "output_configs": { + "name": "output_configs", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'[]'" + }, + "include_thinking": { + "name": "include_thinking", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "include_tool_calls": { + "name": "include_tool_calls", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "identifier_idx": { + "name": "identifier_idx", + "columns": [ + { + "expression": "identifier", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"chat\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "chat_archived_at_partial_idx": { + "name": "chat_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"chat\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_chat_on_workflow_id_archived_at": { + "name": "idx_chat_on_workflow_id_archived_at", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "chat_user_id_idx": { + "name": "chat_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "chat_workflow_id_workflow_id_fk": { + "name": "chat_workflow_id_workflow_id_fk", + "tableFrom": "chat", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "chat_user_id_user_id_fk": { + "name": "chat_user_id_user_id_fk", + "tableFrom": "chat", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.client_credential_token": { + "name": "client_credential_token", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "encrypted_value": { + "name": "encrypted_value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token_digest": { + "name": "access_token_digest", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "client_credential_token_expires_at_idx": { + "name": "client_credential_token_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"client_credential_token\".\"access_token_digest\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "client_credential_token_access_token_digest_idx": { + "name": "client_credential_token_access_token_digest_idx", + "columns": [ + { + "expression": "access_token_digest", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"client_credential_token\".\"access_token_digest\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_async_tool_calls": { + "name": "copilot_async_tool_calls", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "run_id": { + "name": "run_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "checkpoint_id": { + "name": "checkpoint_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "tool_call_id": { + "name": "tool_call_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tool_name": { + "name": "tool_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "args": { + "name": "args", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "executable_name": { + "name": "executable_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "target_workspace_id": { + "name": "target_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "approved_args": { + "name": "approved_args", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "assistant_action": { + "name": "assistant_action", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "execution_retryable": { + "name": "execution_retryable", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "status": { + "name": "status", + "type": "copilot_async_tool_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "result": { + "name": "result", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "permission_decision": { + "name": "permission_decision", + "type": "copilot_tool_permission_decision", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "permission_decided_at": { + "name": "permission_decided_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "permission_requested_at": { + "name": "permission_requested_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "pickup_deadline_at": { + "name": "pickup_deadline_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "persist_seq": { + "name": "persist_seq", + "type": "bigint", + "primaryKey": false, + "notNull": false, + "default": "nextval('copilot_async_tool_calls_persist_seq')" + }, + "claimed_at": { + "name": "claimed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "claimed_by": { + "name": "claimed_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "browser_download_started_at": { + "name": "browser_download_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "execution_started_at": { + "name": "execution_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "execution_settled_at": { + "name": "execution_settled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "execution_owner_token": { + "name": "execution_owner_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "execution_lease_expires_at": { + "name": "execution_lease_expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "execution_revoked_at": { + "name": "execution_revoked_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "execution_attempts": { + "name": "execution_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "execution_deadline_at": { + "name": "execution_deadline_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "client_workflow_execution_id": { + "name": "client_workflow_execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sandbox_processes": { + "name": "sandbox_processes", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_async_tool_calls_checkpoint_id_idx": { + "name": "copilot_async_tool_calls_checkpoint_id_idx", + "columns": [ + { + "expression": "checkpoint_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_async_tool_calls_status_idx": { + "name": "copilot_async_tool_calls_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_async_tool_calls_run_status_idx": { + "name": "copilot_async_tool_calls_run_status_idx", + "columns": [ + { + "expression": "run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_async_tool_calls_tool_call_id_unique": { + "name": "copilot_async_tool_calls_tool_call_id_unique", + "columns": [ + { + "expression": "tool_call_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_async_tool_calls_run_id_copilot_runs_id_fk": { + "name": "copilot_async_tool_calls_run_id_copilot_runs_id_fk", + "tableFrom": "copilot_async_tool_calls", + "tableTo": "copilot_runs", + "columnsFrom": ["run_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_async_tool_calls_checkpoint_id_copilot_run_checkpoints_id_fk": { + "name": "copilot_async_tool_calls_checkpoint_id_copilot_run_checkpoints_id_fk", + "tableFrom": "copilot_async_tool_calls", + "tableTo": "copilot_run_checkpoints", + "columnsFrom": ["checkpoint_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_chats": { + "name": "copilot_chats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "memory_space_id": { + "name": "memory_space_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "chat_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'copilot'" + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'claude-3-7-sonnet-latest'" + }, + "conversation_id": { + "name": "conversation_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "external_conversation_key": { + "name": "external_conversation_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "external_conversation_metadata": { + "name": "external_conversation_metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "preview_yaml": { + "name": "preview_yaml", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "resources": { + "name": "resources", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "auto_allowed_tools": { + "name": "auto_allowed_tools", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "pinned": { + "name": "pinned", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_chats_organization_id_idx": { + "name": "copilot_chats_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_external_conversation_unique": { + "name": "copilot_chats_external_conversation_unique", + "columns": [ + { + "expression": "external_conversation_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"copilot_chats\".\"external_conversation_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_user_org_created_idx": { + "name": "copilot_chats_user_org_created_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_workflow_id_idx": { + "name": "copilot_chats_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_user_workflow_idx": { + "name": "copilot_chats_user_workflow_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_user_workspace_idx": { + "name": "copilot_chats_user_workspace_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_created_at_idx": { + "name": "copilot_chats_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_updated_at_idx": { + "name": "copilot_chats_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_workspace_created_at_id_idx": { + "name": "copilot_chats_workspace_created_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"created_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_user_workspace_deleted_partial_idx": { + "name": "copilot_chats_user_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_chats\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_chats_user_id_user_id_fk": { + "name": "copilot_chats_user_id_user_id_fk", + "tableFrom": "copilot_chats", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_chats_workflow_id_workflow_id_fk": { + "name": "copilot_chats_workflow_id_workflow_id_fk", + "tableFrom": "copilot_chats", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_chats_workspace_id_workspace_id_fk": { + "name": "copilot_chats_workspace_id_workspace_id_fk", + "tableFrom": "copilot_chats", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_chats_organization_id_organization_id_fk": { + "name": "copilot_chats_organization_id_organization_id_fk", + "tableFrom": "copilot_chats", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "copilot_chats_owner_check": { + "name": "copilot_chats_owner_check", + "value": "num_nonnulls(\"copilot_chats\".\"workspace_id\", \"copilot_chats\".\"organization_id\") <= 1" + }, + "copilot_chats_organization_workflow_check": { + "name": "copilot_chats_organization_workflow_check", + "value": "\"copilot_chats\".\"organization_id\" IS NULL OR \"copilot_chats\".\"workflow_id\" IS NULL" + } + }, + "isRLSEnabled": false + }, + "public.copilot_feedback": { + "name": "copilot_feedback", + "schema": "", + "columns": { + "feedback_id": { + "name": "feedback_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_query": { + "name": "user_query", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "agent_response": { + "name": "agent_response", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "is_positive": { + "name": "is_positive", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "feedback": { + "name": "feedback", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_yaml": { + "name": "workflow_yaml", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_feedback_user_id_idx": { + "name": "copilot_feedback_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_chat_id_idx": { + "name": "copilot_feedback_chat_id_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_user_chat_idx": { + "name": "copilot_feedback_user_chat_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_is_positive_idx": { + "name": "copilot_feedback_is_positive_idx", + "columns": [ + { + "expression": "is_positive", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_created_at_idx": { + "name": "copilot_feedback_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_feedback_user_id_user_id_fk": { + "name": "copilot_feedback_user_id_user_id_fk", + "tableFrom": "copilot_feedback", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_feedback_chat_id_copilot_chats_id_fk": { + "name": "copilot_feedback_chat_id_copilot_chats_id_fk", + "tableFrom": "copilot_feedback", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_messages": { + "name": "copilot_messages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "message_id": { + "name": "message_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "display_content": { + "name": "display_content", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "stream_id": { + "name": "stream_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "seq": { + "name": "seq", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_messages_chat_message_unique": { + "name": "copilot_messages_chat_message_unique", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_messages_chat_created_at_idx": { + "name": "copilot_messages_chat_created_at_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_messages\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_messages_chat_seq_idx": { + "name": "copilot_messages_chat_seq_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "seq", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_messages\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_messages_chat_stream_idx": { + "name": "copilot_messages_chat_stream_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "stream_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_messages\".\"stream_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_messages_user_created_at_idx": { + "name": "copilot_messages_user_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_messages\".\"role\" = 'user' AND \"copilot_messages\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_messages_chat_id_copilot_chats_id_fk": { + "name": "copilot_messages_chat_id_copilot_chats_id_fk", + "tableFrom": "copilot_messages", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_organization_request_stops": { + "name": "copilot_organization_request_stops", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stream_id": { + "name": "stream_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stopped_at": { + "name": "stopped_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "copilot_organization_request_stops_user_id_user_id_fk": { + "name": "copilot_organization_request_stops_user_id_user_id_fk", + "tableFrom": "copilot_organization_request_stops", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_organization_request_stops_organization_id_organization_id_fk": { + "name": "copilot_organization_request_stops_organization_id_organization_id_fk", + "tableFrom": "copilot_organization_request_stops", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "copilot_organization_request_stops_user_id_organization_id_stream_id_pk": { + "name": "copilot_organization_request_stops_user_id_organization_id_stream_id_pk", + "columns": ["user_id", "organization_id", "stream_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_request_stops": { + "name": "copilot_request_stops", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stream_id": { + "name": "stream_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stopped_at": { + "name": "stopped_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "copilot_request_stops_user_id_user_id_fk": { + "name": "copilot_request_stops_user_id_user_id_fk", + "tableFrom": "copilot_request_stops", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_request_stops_workspace_id_workspace_id_fk": { + "name": "copilot_request_stops_workspace_id_workspace_id_fk", + "tableFrom": "copilot_request_stops", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "copilot_request_stops_user_id_workspace_id_stream_id_pk": { + "name": "copilot_request_stops_user_id_workspace_id_stream_id_pk", + "columns": ["user_id", "workspace_id", "stream_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_run_checkpoints": { + "name": "copilot_run_checkpoints", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "run_id": { + "name": "run_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "pending_tool_call_id": { + "name": "pending_tool_call_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "conversation_snapshot": { + "name": "conversation_snapshot", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "agent_state": { + "name": "agent_state", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "provider_request": { + "name": "provider_request", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_run_checkpoints_pending_tool_call_id_idx": { + "name": "copilot_run_checkpoints_pending_tool_call_id_idx", + "columns": [ + { + "expression": "pending_tool_call_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_run_checkpoints_run_pending_tool_unique": { + "name": "copilot_run_checkpoints_run_pending_tool_unique", + "columns": [ + { + "expression": "run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "pending_tool_call_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_run_checkpoints_run_id_copilot_runs_id_fk": { + "name": "copilot_run_checkpoints_run_id_copilot_runs_id_fk", + "tableFrom": "copilot_run_checkpoints", + "tableTo": "copilot_runs", + "columnsFrom": ["run_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_runs": { + "name": "copilot_runs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tool_execution_version": { + "name": "tool_execution_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "tool_admission_closed_at": { + "name": "tool_admission_closed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "parent_run_id": { + "name": "parent_run_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stream_id": { + "name": "stream_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "agent": { + "name": "agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider": { + "name": "provider", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "copilot_run_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "request_context": { + "name": "request_context", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "desktop_device_id": { + "name": "desktop_device_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "copilot_runs_parent_run_id_idx": { + "name": "copilot_runs_parent_run_id_idx", + "columns": [ + { + "expression": "parent_run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_chat_started_at_idx": { + "name": "copilot_runs_chat_started_at_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_user_id_idx": { + "name": "copilot_runs_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_workflow_id_idx": { + "name": "copilot_runs_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_status_idx": { + "name": "copilot_runs_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_chat_execution_idx": { + "name": "copilot_runs_chat_execution_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_execution_started_at_idx": { + "name": "copilot_runs_execution_started_at_idx", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_workspace_completed_at_id_idx": { + "name": "copilot_runs_workspace_completed_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"completed_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_stream_id_unique": { + "name": "copilot_runs_stream_id_unique", + "columns": [ + { + "expression": "stream_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_desktop_device_started_at_idx": { + "name": "copilot_runs_desktop_device_started_at_idx", + "columns": [ + { + "expression": "desktop_device_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_runs\".\"desktop_device_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_runs_chat_id_copilot_chats_id_fk": { + "name": "copilot_runs_chat_id_copilot_chats_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_user_id_user_id_fk": { + "name": "copilot_runs_user_id_user_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_workflow_id_workflow_id_fk": { + "name": "copilot_runs_workflow_id_workflow_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_workspace_id_workspace_id_fk": { + "name": "copilot_runs_workspace_id_workspace_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_organization_id_organization_id_fk": { + "name": "copilot_runs_organization_id_organization_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_desktop_device_id_desktop_devices_id_fk": { + "name": "copilot_runs_desktop_device_id_desktop_devices_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "desktop_devices", + "columnsFrom": ["desktop_device_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_service_usage": { + "name": "copilot_service_usage", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true + }, + "stream_id": { + "name": "stream_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "tool_call_id": { + "name": "tool_call_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "service": { + "name": "service", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "cost_usd": { + "name": "cost_usd", + "type": "numeric(12, 8)", + "primaryKey": false, + "notNull": false + }, + "worker_origin": { + "name": "worker_origin", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "next_attempt_at": { + "name": "next_attempt_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "attempts": { + "name": "attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "delivered_at": { + "name": "delivered_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "copilot_service_usage_pending_idx": { + "name": "copilot_service_usage_pending_idx", + "columns": [ + { + "expression": "next_attempt_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "delivered_at IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.credential": { + "name": "credential", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "slack_app_id": { + "name": "slack_app_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "credential_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "unredacted": { + "name": "unredacted", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "account_id": { + "name": "account_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "env_key": { + "name": "env_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "env_owner_user_id": { + "name": "env_owner_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_service_account_key": { + "name": "encrypted_service_account_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_personal_token": { + "name": "encrypted_personal_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "authorization_app_id": { + "name": "authorization_app_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_group_enrollment_id": { + "name": "credential_group_enrollment_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_group_option_id": { + "name": "credential_group_option_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mcp_server_id": { + "name": "mcp_server_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mcp_oauth_config_version": { + "name": "mcp_oauth_config_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "managed_oauth_scope_version": { + "name": "managed_oauth_scope_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "provider_subject_id": { + "name": "provider_subject_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_tenant_id": { + "name": "provider_tenant_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "managed_oauth_status": { + "name": "managed_oauth_status", + "type": "managed_oauth_credential_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "granted_scopes": { + "name": "granted_scopes", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "provider_metadata": { + "name": "provider_metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "encrypted_oauth_token_set": { + "name": "encrypted_oauth_token_set", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mcp_tools": { + "name": "mcp_tools", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "mcp_tools_refreshed_at": { + "name": "mcp_tools_refreshed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "granted_at": { + "name": "granted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "revoked_at": { + "name": "revoked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "access_token_expires_at": { + "name": "access_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "refresh_token_expires_at": { + "name": "refresh_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_refreshed_at": { + "name": "last_refreshed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "credential_organization_id_idx": { + "name": "credential_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_organization_account_unique": { + "name": "credential_organization_account_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential\".\"account_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_org_personal_token_unique": { + "name": "credential_org_personal_token_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_subject_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential\".\"type\" = 'personal_token'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_workspace_id_idx": { + "name": "credential_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_type_idx": { + "name": "credential_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_provider_id_idx": { + "name": "credential_provider_id_idx", + "columns": [ + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_account_id_idx": { + "name": "credential_account_id_idx", + "columns": [ + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_env_owner_user_id_idx": { + "name": "credential_env_owner_user_id_idx", + "columns": [ + { + "expression": "env_owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_idx": { + "name": "credential_group_enrollment_idx", + "columns": [ + { + "expression": "credential_group_enrollment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_mcp_server_idx": { + "name": "credential_mcp_server_idx", + "columns": [ + { + "expression": "mcp_server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_option_identity_unique": { + "name": "credential_group_option_identity_unique", + "columns": [ + { + "expression": "credential_group_enrollment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "credential_group_option_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_subject_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"provider_tenant_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential\".\"type\" = 'managed_oauth'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_managed_mcp_enrollment_server_identity_unique": { + "name": "credential_managed_mcp_enrollment_server_identity_unique", + "columns": [ + { + "expression": "credential_group_enrollment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "mcp_server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"provider_subject_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"provider_tenant_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential\".\"type\" = 'managed_mcp'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_workspace_account_unique": { + "name": "credential_workspace_account_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_workspace_env_unique": { + "name": "credential_workspace_env_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "env_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "type = 'env_workspace'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_workspace_personal_env_unique": { + "name": "credential_workspace_personal_env_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "env_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "env_owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "type = 'env_personal'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_personal_token_identity_unique": { + "name": "credential_personal_token_identity_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_subject_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "type = 'personal_token'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "credential_workspace_id_workspace_id_fk": { + "name": "credential_workspace_id_workspace_id_fk", + "tableFrom": "credential", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_organization_id_organization_id_fk": { + "name": "credential_organization_id_organization_id_fk", + "tableFrom": "credential", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_slack_app_id_slack_app_id_fk": { + "name": "credential_slack_app_id_slack_app_id_fk", + "tableFrom": "credential", + "tableTo": "slack_app", + "columnsFrom": ["slack_app_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "credential_account_id_account_id_fk": { + "name": "credential_account_id_account_id_fk", + "tableFrom": "credential", + "tableTo": "account", + "columnsFrom": ["account_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_env_owner_user_id_user_id_fk": { + "name": "credential_env_owner_user_id_user_id_fk", + "tableFrom": "credential", + "tableTo": "user", + "columnsFrom": ["env_owner_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_credential_group_enrollment_id_credential_group_enrollment_id_fk": { + "name": "credential_credential_group_enrollment_id_credential_group_enrollment_id_fk", + "tableFrom": "credential", + "tableTo": "credential_group_enrollment", + "columnsFrom": ["credential_group_enrollment_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_mcp_server_id_mcp_servers_id_fk": { + "name": "credential_mcp_server_id_mcp_servers_id_fk", + "tableFrom": "credential", + "tableTo": "mcp_servers", + "columnsFrom": ["mcp_server_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_created_by_user_id_fk": { + "name": "credential_created_by_user_id_fk", + "tableFrom": "credential", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "credential_owner_check": { + "name": "credential_owner_check", + "value": "num_nonnulls(\"credential\".\"workspace_id\", \"credential\".\"organization_id\") = 1" + }, + "credential_organization_type_check": { + "name": "credential_organization_type_check", + "value": "\"credential\".\"organization_id\" IS NULL OR \"credential\".\"type\" IN ('oauth', 'managed_oauth', 'managed_mcp', 'service_account', 'personal_token')" + }, + "credential_personal_token_source_check": { + "name": "credential_personal_token_source_check", + "value": "(type::text <> 'personal_token') OR (\n created_by IS NOT NULL\n AND provider_id IS NOT NULL\n AND provider_id = 'gitlab'\n AND provider_subject_id IS NOT NULL\n AND provider_tenant_id IS NOT NULL\n AND encrypted_personal_token IS NOT NULL\n AND granted_scopes IS NOT NULL\n AND cardinality(granted_scopes) > 0\n AND account_id IS NULL\n AND env_key IS NULL\n AND env_owner_user_id IS NULL\n AND authorization_app_id IS NULL\n AND encrypted_oauth_token_set IS NULL\n AND encrypted_service_account_key IS NULL\n AND unredacted = false\n )" + }, + "credential_oauth_source_check": { + "name": "credential_oauth_source_check", + "value": "(type <> 'oauth') OR (account_id IS NOT NULL AND provider_id IS NOT NULL)" + }, + "credential_managed_oauth_source_check": { + "name": "credential_managed_oauth_source_check", + "value": "(type::text <> 'managed_oauth') OR (\n account_id IS NULL\n AND provider_id IS NOT NULL\n AND authorization_app_id IS NOT NULL\n AND provider_subject_id IS NOT NULL\n AND managed_oauth_status IS NOT NULL\n AND granted_scopes IS NOT NULL\n AND encrypted_oauth_token_set IS NOT NULL\n AND granted_at IS NOT NULL\n )" + }, + "credential_managed_oauth_group_binding_check": { + "name": "credential_managed_oauth_group_binding_check", + "value": "(type::text <> 'managed_oauth') OR (\n credential_group_enrollment_id IS NOT NULL\n AND credential_group_option_id IS NOT NULL\n AND managed_oauth_scope_version IS NOT NULL\n AND managed_oauth_scope_version > 0\n )" + }, + "credential_managed_mcp_source_check": { + "name": "credential_managed_mcp_source_check", + "value": "(type::text <> 'managed_mcp') OR (\n id LIKE 'mcp-cg-%'\n AND account_id IS NULL\n AND provider_id IS NULL\n AND authorization_app_id IS NULL\n AND credential_group_enrollment_id IS NOT NULL\n AND credential_group_option_id IS NULL\n AND mcp_server_id IS NOT NULL\n AND managed_oauth_status IS NOT NULL\n AND (managed_oauth_status <> 'active' OR (\n encrypted_oauth_token_set IS NOT NULL\n AND mcp_tools IS NOT NULL\n ))\n AND granted_at IS NOT NULL\n AND managed_oauth_scope_version IS NULL\n AND granted_scopes IS NULL\n AND provider_metadata IS NULL\n AND created_by IS NULL\n AND env_key IS NULL\n AND env_owner_user_id IS NULL\n AND encrypted_service_account_key IS NULL\n AND unredacted = false\n )" + }, + "credential_creator_source_check": { + "name": "credential_creator_source_check", + "value": "(type::text = 'managed_mcp') OR created_by IS NOT NULL" + }, + "credential_workspace_env_source_check": { + "name": "credential_workspace_env_source_check", + "value": "(type <> 'env_workspace') OR (env_key IS NOT NULL AND env_owner_user_id IS NULL)" + }, + "credential_personal_env_source_check": { + "name": "credential_personal_env_source_check", + "value": "(type <> 'env_personal') OR (env_key IS NOT NULL AND env_owner_user_id IS NOT NULL)" + } + }, + "isRLSEnabled": false + }, + "public.credential_group": { + "name": "credential_group", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "public_id": { + "name": "public_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "options": { + "name": "options", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "encrypted_provider_configuration": { + "name": "encrypted_provider_configuration", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "credential_group_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "credential_group_organization_unique": { + "name": "credential_group_organization_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_public_id_unique": { + "name": "credential_group_public_id_unique", + "columns": [ + { + "expression": "public_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_workspace_unique": { + "name": "credential_group_workspace_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "credential_group_workspace_id_workspace_id_fk": { + "name": "credential_group_workspace_id_workspace_id_fk", + "tableFrom": "credential_group", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_group_organization_id_organization_id_fk": { + "name": "credential_group_organization_id_organization_id_fk", + "tableFrom": "credential_group", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_group_created_by_user_id_fk": { + "name": "credential_group_created_by_user_id_fk", + "tableFrom": "credential_group", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "credential_group_owner_check": { + "name": "credential_group_owner_check", + "value": "num_nonnulls(\"credential_group\".\"workspace_id\", \"credential_group\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.credential_group_enrollment": { + "name": "credential_group_enrollment", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "credential_group_id": { + "name": "credential_group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "credential_group_enrollment_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'invited'" + }, + "invitation_token_hash": { + "name": "invitation_token_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "invitation_expires_at": { + "name": "invitation_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "invited_at": { + "name": "invited_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "sent_at": { + "name": "sent_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "revoked_at": { + "name": "revoked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_delivery_error": { + "name": "last_delivery_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "credential_group_enrollment_group_user_unique": { + "name": "credential_group_enrollment_group_user_unique", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential_group_enrollment\".\"user_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_user_id_idx": { + "name": "credential_group_enrollment_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_group_email_unique": { + "name": "credential_group_enrollment_group_email_unique", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_invitation_token_hash_unique": { + "name": "credential_group_enrollment_invitation_token_hash_unique", + "columns": [ + { + "expression": "invitation_token_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_group_status_idx": { + "name": "credential_group_enrollment_group_status_idx", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_group_invited_at_id_idx": { + "name": "credential_group_enrollment_group_invited_at_id_idx", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "invited_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "credential_group_enrollment_credential_group_id_credential_group_id_fk": { + "name": "credential_group_enrollment_credential_group_id_credential_group_id_fk", + "tableFrom": "credential_group_enrollment", + "tableTo": "credential_group", + "columnsFrom": ["credential_group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_group_enrollment_user_id_user_id_fk": { + "name": "credential_group_enrollment_user_id_user_id_fk", + "tableFrom": "credential_group_enrollment", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_group_enrollment_created_by_user_id_fk": { + "name": "credential_group_enrollment_created_by_user_id_fk", + "tableFrom": "credential_group_enrollment", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "credential_group_enrollment_normalized_email_check": { + "name": "credential_group_enrollment_normalized_email_check", + "value": "\"credential_group_enrollment\".\"email\" = lower(btrim(\"credential_group_enrollment\".\"email\")) AND length(\"credential_group_enrollment\".\"email\") BETWEEN 3 AND 320" + }, + "credential_group_enrollment_invitation_token_hash_length_check": { + "name": "credential_group_enrollment_invitation_token_hash_length_check", + "value": "length(\"credential_group_enrollment\".\"invitation_token_hash\") = 64" + } + }, + "isRLSEnabled": false + }, + "public.credential_member": { + "name": "credential_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "credential_member_role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'member'" + }, + "status": { + "name": "status", + "type": "credential_member_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "joined_at": { + "name": "joined_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "invited_by": { + "name": "invited_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "credential_member_user_id_idx": { + "name": "credential_member_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_member_role_idx": { + "name": "credential_member_role_idx", + "columns": [ + { + "expression": "role", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_member_status_idx": { + "name": "credential_member_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_member_unique": { + "name": "credential_member_unique", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "credential_member_credential_id_credential_id_fk": { + "name": "credential_member_credential_id_credential_id_fk", + "tableFrom": "credential_member", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_member_user_id_user_id_fk": { + "name": "credential_member_user_id_user_id_fk", + "tableFrom": "credential_member", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_member_invited_by_user_id_fk": { + "name": "credential_member_invited_by_user_id_fk", + "tableFrom": "credential_member", + "tableTo": "user", + "columnsFrom": ["invited_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_block": { + "name": "custom_block", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "icon_url": { + "name": "icon_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "inputs": { + "name": "inputs", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "outputs": { + "name": "outputs", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "trace_child_runs": { + "name": "trace_child_runs", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_block_workflow_id_idx": { + "name": "custom_block_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_block_organization_type_unique": { + "name": "custom_block_organization_type_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_block_organization_id_organization_id_fk": { + "name": "custom_block_organization_id_organization_id_fk", + "tableFrom": "custom_block", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "custom_block_workflow_id_workflow_id_fk": { + "name": "custom_block_workflow_id_workflow_id_fk", + "tableFrom": "custom_block", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "custom_block_created_by_user_id_fk": { + "name": "custom_block_created_by_user_id_fk", + "tableFrom": "custom_block", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_tools": { + "name": "custom_tools", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "schema": { + "name": "schema", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_tools_workspace_title_unique": { + "name": "custom_tools_workspace_title_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "title", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_tools_workspace_id_workspace_id_fk": { + "name": "custom_tools_workspace_id_workspace_id_fk", + "tableFrom": "custom_tools", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "custom_tools_user_id_user_id_fk": { + "name": "custom_tools_user_id_user_id_fk", + "tableFrom": "custom_tools", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dashboard": { + "name": "dashboard", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "dashboard_workspace_id_unique": { + "name": "dashboard_workspace_id_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "dashboard_workspace_id_workspace_id_fk": { + "name": "dashboard_workspace_id_workspace_id_fk", + "tableFrom": "dashboard", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "dashboard_created_by_user_id_fk": { + "name": "dashboard_created_by_user_id_fk", + "tableFrom": "dashboard", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "dashboard_updated_by_user_id_fk": { + "name": "dashboard_updated_by_user_id_fk", + "tableFrom": "dashboard", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.data_drain_runs": { + "name": "data_drain_runs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "drain_id": { + "name": "drain_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "data_drain_run_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "trigger": { + "name": "trigger", + "type": "data_drain_run_trigger", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "finished_at": { + "name": "finished_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "rows_exported": { + "name": "rows_exported", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "bytes_written": { + "name": "bytes_written", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "cursor_before": { + "name": "cursor_before", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cursor_after": { + "name": "cursor_after", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "locators": { + "name": "locators", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + } + }, + "indexes": { + "data_drain_runs_drain_started_idx": { + "name": "data_drain_runs_drain_started_idx", + "columns": [ + { + "expression": "drain_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "data_drain_runs_drain_id_data_drains_id_fk": { + "name": "data_drain_runs_drain_id_data_drains_id_fk", + "tableFrom": "data_drain_runs", + "tableTo": "data_drains", + "columnsFrom": ["drain_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.data_drains": { + "name": "data_drains", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "data_drain_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "destination_type": { + "name": "destination_type", + "type": "data_drain_destination", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "destination_config": { + "name": "destination_config", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "destination_credentials": { + "name": "destination_credentials", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "schedule_cadence": { + "name": "schedule_cadence", + "type": "data_drain_cadence", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "cursor": { + "name": "cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_run_at": { + "name": "last_run_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_success_at": { + "name": "last_success_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "data_drains_due_idx": { + "name": "data_drains_due_idx", + "columns": [ + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_run_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "data_drains_org_name_unique": { + "name": "data_drains_org_name_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "data_drains_organization_id_organization_id_fk": { + "name": "data_drains_organization_id_organization_id_fk", + "tableFrom": "data_drains", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "data_drains_created_by_user_id_fk": { + "name": "data_drains_created_by_user_id_fk", + "tableFrom": "data_drains", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.deleted_account_identity": { + "name": "deleted_account_identity", + "schema": "", + "columns": { + "identity_hash": { + "name": "identity_hash", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "deleted_account_identity_expires_at_idx": { + "name": "deleted_account_identity_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.desktop_devices": { + "name": "desktop_devices", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "session_id": { + "name": "session_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "app_version": { + "name": "app_version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "platform": { + "name": "platform", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "capabilities": { + "name": "capabilities", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "revoked_at": { + "name": "revoked_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "desktop_devices_user_id_idx": { + "name": "desktop_devices_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "desktop_devices_session_id_idx": { + "name": "desktop_devices_session_id_idx", + "columns": [ + { + "expression": "session_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "desktop_devices_user_id_user_id_fk": { + "name": "desktop_devices_user_id_user_id_fk", + "tableFrom": "desktop_devices", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "desktop_devices_session_id_session_id_fk": { + "name": "desktop_devices_session_id_session_id_fk", + "tableFrom": "desktop_devices", + "tableTo": "session", + "columnsFrom": ["session_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.docs_embeddings": { + "name": "docs_embeddings", + "schema": "", + "columns": { + "chunk_id": { + "name": "chunk_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "chunk_text": { + "name": "chunk_text", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_document": { + "name": "source_document", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_link": { + "name": "source_link", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header_text": { + "name": "header_text", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header_level": { + "name": "header_level", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "embedding": { + "name": "embedding", + "type": "vector(1536)", + "primaryKey": false, + "notNull": true + }, + "embedding_model": { + "name": "embedding_model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text-embedding-3-small'" + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "chunk_text_tsv": { + "name": "chunk_text_tsv", + "type": "tsvector", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "to_tsvector('english', \"docs_embeddings\".\"chunk_text\")", + "type": "stored" + } + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_emb_source_document_idx": { + "name": "docs_emb_source_document_idx", + "columns": [ + { + "expression": "source_document", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_header_level_idx": { + "name": "docs_emb_header_level_idx", + "columns": [ + { + "expression": "header_level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_source_header_idx": { + "name": "docs_emb_source_header_idx", + "columns": [ + { + "expression": "source_document", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "header_level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_model_idx": { + "name": "docs_emb_model_idx", + "columns": [ + { + "expression": "embedding_model", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_created_at_idx": { + "name": "docs_emb_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_embedding_vector_hnsw_idx": { + "name": "docs_embedding_vector_hnsw_idx", + "columns": [ + { + "expression": "embedding", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "docs_emb_metadata_gin_idx": { + "name": "docs_emb_metadata_gin_idx", + "columns": [ + { + "expression": "metadata", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + }, + "docs_emb_chunk_text_fts_idx": { + "name": "docs_emb_chunk_text_fts_idx", + "columns": [ + { + "expression": "chunk_text_tsv", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "docs_embedding_not_null_check": { + "name": "docs_embedding_not_null_check", + "value": "\"embedding\" IS NOT NULL" + }, + "docs_header_level_check": { + "name": "docs_header_level_check", + "value": "\"header_level\" >= 1 AND \"header_level\" <= 6" + } + }, + "isRLSEnabled": false + }, + "public.document": { + "name": "document", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "file_url": { + "name": "file_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "file_size": { + "name": "file_size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chunk_count": { + "name": "chunk_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "character_count": { + "name": "character_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "processing_status": { + "name": "processing_status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "processing_attempts": { + "name": "processing_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "processing_queued_at": { + "name": "processing_queued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "processing_queue_token": { + "name": "processing_queue_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "processing_started_at": { + "name": "processing_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "processing_deferred_until": { + "name": "processing_deferred_until", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "processing_completed_at": { + "name": "processing_completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "processing_error": { + "name": "processing_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "processing_recovery_after": { + "name": "processing_recovery_after", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "user_excluded": { + "name": "user_excluded", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "tag1": { + "name": "tag1", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag2": { + "name": "tag2", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag3": { + "name": "tag3", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag4": { + "name": "tag4", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag5": { + "name": "tag5", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag6": { + "name": "tag6", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag7": { + "name": "tag7", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "number1": { + "name": "number1", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number2": { + "name": "number2", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number3": { + "name": "number3", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number4": { + "name": "number4", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number5": { + "name": "number5", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "date1": { + "name": "date1", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "date2": { + "name": "date2", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "boolean1": { + "name": "boolean1", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "boolean2": { + "name": "boolean2", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "boolean3": { + "name": "boolean3", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_url": { + "name": "source_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "acl": { + "name": "acl", + "type": "text[]", + "primaryKey": false, + "notNull": true, + "default": "'{ws}'::text[]" + }, + "acl_requirements": { + "name": "acl_requirements", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "acl_verified_at": { + "name": "acl_verified_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "source_modified_at": { + "name": "source_modified_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "source_seen_at": { + "name": "source_seen_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "doc_uploaded_by_idx": { + "name": "doc_uploaded_by_idx", + "columns": [ + { + "expression": "uploaded_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"uploaded_by\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_kb_source_modified_idx": { + "name": "doc_kb_source_modified_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_modified_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"deleted_at\" IS NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_acl_gin_idx": { + "name": "doc_acl_gin_idx", + "columns": [ + { + "expression": "acl", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "array_ops" + } + ], + "isUnique": false, + "where": "\"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "gin", + "with": {} + }, + "doc_filename_idx": { + "name": "doc_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_processing_status_idx": { + "name": "doc_processing_status_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "processing_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_processing_recovery_idx": { + "name": "doc_connector_processing_recovery_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "uploaded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"processing_status\" IN ('pending', 'processing', 'failed') AND \"document\".\"connector_id\" IS NOT NULL AND \"document\".\"content_hash\" IS NOT NULL AND \"document\".\"storage_key\" IS NOT NULL AND \"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL AND \"document\".\"deleted_at\" IS NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_connector_processing_status_idx": { + "name": "doc_connector_processing_status_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "processing_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"processing_status\" IN ('pending', 'processing', 'failed') AND \"document\".\"connector_id\" IS NOT NULL AND \"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL AND \"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_external_id_idx": { + "name": "doc_connector_external_id_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_source_lookup_idx": { + "name": "doc_connector_source_lookup_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_reconciliation_v2_idx": { + "name": "doc_connector_reconciliation_v2_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_active_kb_token_count_idx": { + "name": "doc_active_kb_token_count_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "token_count", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL AND \"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_storage_key_idx": { + "name": "doc_storage_key_idx", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"storage_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_archived_at_partial_idx": { + "name": "doc_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_deleted_at_partial_idx": { + "name": "doc_deleted_at_partial_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_tombstone_idx": { + "name": "doc_connector_tombstone_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"archived_at\" IS NULL AND (\"document\".\"deleted_at\" IS NOT NULL OR \"document\".\"content_hash\" IS NULL)", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_live_idx": { + "name": "doc_connector_live_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL AND \"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag1_lower_idx": { + "name": "doc_kb_tag1_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag1\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag2_lower_idx": { + "name": "doc_kb_tag2_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag2\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag3_lower_idx": { + "name": "doc_kb_tag3_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag3\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag4_lower_idx": { + "name": "doc_kb_tag4_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag4\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag5_lower_idx": { + "name": "doc_kb_tag5_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag5\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag6_lower_idx": { + "name": "doc_kb_tag6_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag6\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag7_lower_idx": { + "name": "doc_kb_tag7_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag7\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number1_idx": { + "name": "doc_number1_idx", + "columns": [ + { + "expression": "number1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number2_idx": { + "name": "doc_number2_idx", + "columns": [ + { + "expression": "number2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number3_idx": { + "name": "doc_number3_idx", + "columns": [ + { + "expression": "number3", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number4_idx": { + "name": "doc_number4_idx", + "columns": [ + { + "expression": "number4", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number5_idx": { + "name": "doc_number5_idx", + "columns": [ + { + "expression": "number5", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_date1_idx": { + "name": "doc_date1_idx", + "columns": [ + { + "expression": "date1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_date2_idx": { + "name": "doc_date2_idx", + "columns": [ + { + "expression": "date2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_boolean1_idx": { + "name": "doc_boolean1_idx", + "columns": [ + { + "expression": "boolean1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_boolean2_idx": { + "name": "doc_boolean2_idx", + "columns": [ + { + "expression": "boolean2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_boolean3_idx": { + "name": "doc_boolean3_idx", + "columns": [ + { + "expression": "boolean3", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "document_knowledge_base_id_knowledge_base_id_fk": { + "name": "document_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "document", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "document_connector_id_knowledge_connector_id_fk": { + "name": "document_connector_id_knowledge_connector_id_fk", + "tableFrom": "document", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "document_uploaded_by_user_id_fk": { + "name": "document_uploaded_by_user_id_fk", + "tableFrom": "document", + "tableTo": "user", + "columnsFrom": ["uploaded_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "doc_acl_token_shape_check": { + "name": "doc_acl_token_shape_check", + "value": "array_position(\"document\".\"acl\", NULL) IS NULL AND (cardinality(\"document\".\"acl\") = 0 OR (cardinality(\"document\".\"acl\") = array_length(string_to_array(array_to_string(\"document\".\"acl\", E'\\n'), E'\\n'), 1) AND array_to_string(\"document\".\"acl\", E'\\n') ~ '^((ws|pub|link|u:[^\\nA-Z]+@[^\\nA-Z]+|[gs]:[^\\n:]+:[^\\n:]+:[^\\n]+)(\\n(ws|pub|link|u:[^\\nA-Z]+@[^\\nA-Z]+|[gs]:[^\\n:]+:[^\\n:]+:[^\\n]+))*)$'))" + } + }, + "isRLSEnabled": false + }, + "public.document_secret_provenance": { + "name": "document_secret_provenance", + "schema": "", + "columns": { + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "source_hash": { + "name": "source_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "document_secret_provenance_document_id_document_id_fk": { + "name": "document_secret_provenance_document_id_document_id_fk", + "tableFrom": "document_secret_provenance", + "tableTo": "document", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "document_secret_provenance_status_check": { + "name": "document_secret_provenance_status_check", + "value": "\"document_secret_provenance\".\"status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.embedding": { + "name": "embedding", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chunk_index": { + "name": "chunk_index", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "chunk_hash": { + "name": "chunk_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "content_length": { + "name": "content_length", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "embedding": { + "name": "embedding", + "type": "vector(1536)", + "primaryKey": false, + "notNull": false + }, + "embedding_384": { + "name": "embedding_384", + "type": "vector(384)", + "primaryKey": false, + "notNull": false + }, + "embedding_768": { + "name": "embedding_768", + "type": "vector(768)", + "primaryKey": false, + "notNull": false + }, + "embedding_1024": { + "name": "embedding_1024", + "type": "vector(1024)", + "primaryKey": false, + "notNull": false + }, + "embedding_3072": { + "name": "embedding_3072", + "type": "vector(3072)", + "primaryKey": false, + "notNull": false + }, + "embedding_model": { + "name": "embedding_model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text-embedding-3-small'" + }, + "start_offset": { + "name": "start_offset", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "end_offset": { + "name": "end_offset", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "tag1": { + "name": "tag1", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag2": { + "name": "tag2", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag3": { + "name": "tag3", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag4": { + "name": "tag4", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag5": { + "name": "tag5", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag6": { + "name": "tag6", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag7": { + "name": "tag7", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "number1": { + "name": "number1", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number2": { + "name": "number2", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number3": { + "name": "number3", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number4": { + "name": "number4", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number5": { + "name": "number5", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "date1": { + "name": "date1", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "date2": { + "name": "date2", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "boolean1": { + "name": "boolean1", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "boolean2": { + "name": "boolean2", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "boolean3": { + "name": "boolean3", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "content_tsv": { + "name": "content_tsv", + "type": "tsvector", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "to_tsvector('english', \"embedding\".\"content\")", + "type": "stored" + } + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "emb_doc_chunk_idx": { + "name": "emb_doc_chunk_idx", + "columns": [ + { + "expression": "document_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chunk_index", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_model_idx": { + "name": "emb_kb_model_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "embedding_model", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_enabled_idx": { + "name": "emb_kb_enabled_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_doc_enabled_idx": { + "name": "emb_doc_enabled_idx", + "columns": [ + { + "expression": "document_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag1_lower_idx": { + "name": "emb_kb_tag1_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag1\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag2_lower_idx": { + "name": "emb_kb_tag2_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag2\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag3_lower_idx": { + "name": "emb_kb_tag3_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag3\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag4_lower_idx": { + "name": "emb_kb_tag4_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag4\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag5_lower_idx": { + "name": "emb_kb_tag5_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag5\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag6_lower_idx": { + "name": "emb_kb_tag6_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag6\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag7_lower_idx": { + "name": "emb_kb_tag7_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag7\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number1_idx": { + "name": "emb_number1_idx", + "columns": [ + { + "expression": "number1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number2_idx": { + "name": "emb_number2_idx", + "columns": [ + { + "expression": "number2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number3_idx": { + "name": "emb_number3_idx", + "columns": [ + { + "expression": "number3", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number4_idx": { + "name": "emb_number4_idx", + "columns": [ + { + "expression": "number4", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number5_idx": { + "name": "emb_number5_idx", + "columns": [ + { + "expression": "number5", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_date1_idx": { + "name": "emb_date1_idx", + "columns": [ + { + "expression": "date1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "emb_date2_idx": { + "name": "emb_date2_idx", + "columns": [ + { + "expression": "date2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "emb_boolean1_idx": { + "name": "emb_boolean1_idx", + "columns": [ + { + "expression": "boolean1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_boolean2_idx": { + "name": "emb_boolean2_idx", + "columns": [ + { + "expression": "boolean2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_boolean3_idx": { + "name": "emb_boolean3_idx", + "columns": [ + { + "expression": "boolean3", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_content_fts_idx": { + "name": "emb_content_fts_idx", + "columns": [ + { + "expression": "content_tsv", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": { + "fastupdate": "off" + } + } + }, + "foreignKeys": { + "embedding_knowledge_base_id_knowledge_base_id_fk": { + "name": "embedding_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "embedding", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "embedding_document_id_document_id_fk": { + "name": "embedding_document_id_document_id_fk", + "tableFrom": "embedding", + "tableTo": "document", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "embedding_width_check": { + "name": "embedding_width_check", + "value": "num_nonnulls(\"embedding\", \"embedding_384\", \"embedding_768\", \"embedding_1024\", \"embedding_3072\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.embedding_search": { + "name": "embedding_search", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "acl": { + "name": "acl", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "binary": { + "name": "binary", + "type": "bit(1536)", + "primaryKey": false, + "notNull": false + }, + "binary_384": { + "name": "binary_384", + "type": "bit(384)", + "primaryKey": false, + "notNull": false + }, + "binary_768": { + "name": "binary_768", + "type": "bit(768)", + "primaryKey": false, + "notNull": false + }, + "binary_1024": { + "name": "binary_1024", + "type": "bit(1024)", + "primaryKey": false, + "notNull": false + }, + "binary_3072": { + "name": "binary_3072", + "type": "bit(3072)", + "primaryKey": false, + "notNull": false + }, + "vector": { + "name": "vector", + "type": "halfvec(1536)", + "primaryKey": false, + "notNull": false + }, + "vector_384": { + "name": "vector_384", + "type": "halfvec(384)", + "primaryKey": false, + "notNull": false + }, + "vector_512": { + "name": "vector_512", + "type": "halfvec(512)", + "primaryKey": false, + "notNull": false + }, + "vector_768": { + "name": "vector_768", + "type": "halfvec(768)", + "primaryKey": false, + "notNull": false + }, + "vector_1024": { + "name": "vector_1024", + "type": "halfvec(1024)", + "primaryKey": false, + "notNull": false + }, + "vector_3072": { + "name": "vector_3072", + "type": "halfvec(3072)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "embedding_search_kb_idx": { + "name": "embedding_search_kb_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "embedding_search_document_lookup_idx": { + "name": "embedding_search_document_lookup_idx", + "columns": [ + { + "expression": "document_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"embedding_search\".\"enabled\"", + "concurrently": true, + "method": "btree", + "with": {} + }, + "embedding_search_cosine_hnsw_idx": { + "name": "embedding_search_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_512_cosine_hnsw_idx": { + "name": "embedding_search_512_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_512", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_384_cosine_hnsw_idx": { + "name": "embedding_search_384_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_384", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_768_cosine_hnsw_idx": { + "name": "embedding_search_768_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_768", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_1024_cosine_hnsw_idx": { + "name": "embedding_search_1024_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_1024", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_3072_cosine_hnsw_idx": { + "name": "embedding_search_3072_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_3072", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + } + }, + "foreignKeys": { + "embedding_search_id_embedding_id_fk": { + "name": "embedding_search_id_embedding_id_fk", + "tableFrom": "embedding_search", + "tableTo": "embedding", + "columnsFrom": ["id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "embedding_search_width_check": { + "name": "embedding_search_width_check", + "value": "num_nonnulls(\"binary\", \"binary_384\", \"binary_768\", \"binary_1024\", \"binary_3072\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.embedding_secret_provenance": { + "name": "embedding_secret_provenance", + "schema": "", + "columns": { + "embedding_id": { + "name": "embedding_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "embedding_secret_provenance_embedding_id_embedding_id_fk": { + "name": "embedding_secret_provenance_embedding_id_embedding_id_fk", + "tableFrom": "embedding_secret_provenance", + "tableTo": "embedding", + "columnsFrom": ["embedding_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "embedding_secret_provenance_status_check": { + "name": "embedding_secret_provenance_status_check", + "value": "\"embedding_secret_provenance\".\"status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.environment": { + "name": "environment", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "variables": { + "name": "variables", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "environment_user_id_user_id_fk": { + "name": "environment_user_id_user_id_fk", + "tableFrom": "environment", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "environment_user_id_unique": { + "name": "environment_user_id_unique", + "nullsNotDistinct": false, + "columns": ["user_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.execution_large_value_dependencies": { + "name": "execution_large_value_dependencies", + "schema": "", + "columns": { + "parent_key": { + "name": "parent_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "child_key": { + "name": "child_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "execution_large_value_dependencies_workspace_parent_key_idx": { + "name": "execution_large_value_dependencies_workspace_parent_key_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_value_dependencies_workspace_child_key_idx": { + "name": "execution_large_value_dependencies_workspace_child_key_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "child_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "execution_large_value_dependencies_workspace_id_workspace_id_fk": { + "name": "execution_large_value_dependencies_workspace_id_workspace_id_fk", + "tableFrom": "execution_large_value_dependencies", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "execution_large_value_dependencies_parent_key_child_key_pk": { + "name": "execution_large_value_dependencies_parent_key_child_key_pk", + "columns": ["parent_key", "child_key"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.execution_large_value_references": { + "name": "execution_large_value_references", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "execution_large_value_reference_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "execution_large_value_references_workspace_execution_source_idx": { + "name": "execution_large_value_references_workspace_execution_source_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_value_references_workflow_id_idx": { + "name": "execution_large_value_references_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "execution_large_value_references_workspace_id_workspace_id_fk": { + "name": "execution_large_value_references_workspace_id_workspace_id_fk", + "tableFrom": "execution_large_value_references", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "execution_large_value_references_workflow_id_workflow_id_fk": { + "name": "execution_large_value_references_workflow_id_workflow_id_fk", + "tableFrom": "execution_large_value_references", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "execution_large_value_references_key_execution_id_source_pk": { + "name": "execution_large_value_references_key_execution_id_source_pk", + "columns": ["key", "execution_id", "source"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.execution_large_values": { + "name": "execution_large_values", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "owner_execution_id": { + "name": "owner_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "execution_large_values_owner_execution_id_idx": { + "name": "execution_large_values_owner_execution_id_idx", + "columns": [ + { + "expression": "owner_execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_values_cleanup_idx": { + "name": "execution_large_values_cleanup_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"execution_large_values\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_values_tombstone_cleanup_idx": { + "name": "execution_large_values_tombstone_cleanup_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"execution_large_values\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_values_workflow_id_idx": { + "name": "execution_large_values_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_values_workspace_id_idx": { + "name": "execution_large_values_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "execution_large_values_workspace_id_workspace_id_fk": { + "name": "execution_large_values_workspace_id_workspace_id_fk", + "tableFrom": "execution_large_values", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "execution_large_values_workflow_id_workflow_id_fk": { + "name": "execution_large_values_workflow_id_workflow_id_fk", + "tableFrom": "execution_large_values", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.file_search_dependency": { + "name": "file_search_dependency", + "schema": "", + "columns": { + "build_id": { + "name": "build_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "file_search_dependency_file_idx": { + "name": "file_search_dependency_file_idx", + "columns": [ + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "build_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "file_search_dependency_owner_idx": { + "name": "file_search_dependency_owner_idx", + "columns": [ + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "build_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "file_search_dependency_build_id_workspace_file_search_build_id_fk": { + "name": "file_search_dependency_build_id_workspace_file_search_build_id_fk", + "tableFrom": "file_search_dependency", + "tableTo": "workspace_file_search_build", + "columnsFrom": ["build_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "file_search_dependency_build_id_file_id_pk": { + "name": "file_search_dependency_build_id_file_id_pk", + "columns": ["build_id", "file_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.file_search_dispatch_queue": { + "name": "file_search_dispatch_queue", + "schema": "", + "columns": { + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "enqueued_at": { + "name": "enqueued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_dispatched_at": { + "name": "last_dispatched_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "file_search_dispatch_schedule_idx": { + "name": "file_search_dispatch_schedule_idx", + "columns": [ + { + "expression": "last_dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "first" + }, + { + "expression": "enqueued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "file_search_dispatch_queue_entity_type_entity_id_pk": { + "name": "file_search_dispatch_queue_entity_type_entity_id_pk", + "columns": ["entity_type", "entity_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "file_search_dispatch_owner_check": { + "name": "file_search_dispatch_owner_check", + "value": "\"file_search_dispatch_queue\".\"entity_type\" IN ('workspace', 'project') AND length(\"file_search_dispatch_queue\".\"entity_id\") > 0" + } + }, + "isRLSEnabled": false + }, + "public.folder": { + "name": "folder", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "resource_type": { + "name": "resource_type", + "type": "folder_resource_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "locked": { + "name": "locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "folder_project_id_idx": { + "name": "folder_project_id_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "folder_project_resource_parent_name_active_unique": { + "name": "folder_project_resource_parent_name_active_unique", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"parent_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"folder\".\"deleted_at\" IS NULL AND \"folder\".\"project_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "folder_user_idx": { + "name": "folder_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_workspace_resource_parent_idx": { + "name": "folder_workspace_resource_parent_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_parent_sort_idx": { + "name": "folder_parent_sort_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sort_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_deleted_at_idx": { + "name": "folder_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_workspace_deleted_partial_idx": { + "name": "folder_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"folder\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_workspace_resource_parent_name_active_unique": { + "name": "folder_workspace_resource_parent_name_active_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"parent_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"folder\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "folder_project_id_project_id_fk": { + "name": "folder_project_id_project_id_fk", + "tableFrom": "folder", + "tableTo": "project", + "columnsFrom": ["project_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "folder_user_id_user_id_fk": { + "name": "folder_user_id_user_id_fk", + "tableFrom": "folder", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_workspace_id_workspace_id_fk": { + "name": "folder_workspace_id_workspace_id_fk", + "tableFrom": "folder", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_parent_id_folder_id_fk": { + "name": "folder_parent_id_folder_id_fk", + "tableFrom": "folder", + "tableTo": "folder", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "folder_workspace_parent_owner_fk": { + "name": "folder_workspace_parent_owner_fk", + "tableFrom": "folder", + "tableTo": "folder", + "columnsFrom": ["parent_id", "workspace_id", "resource_type"], + "columnsTo": ["id", "workspace_id", "resource_type"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "folder_project_parent_owner_fk": { + "name": "folder_project_parent_owner_fk", + "tableFrom": "folder", + "tableTo": "folder", + "columnsFrom": ["parent_id", "project_id", "resource_type"], + "columnsTo": ["id", "project_id", "resource_type"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "folder_workspace_owner_type_unique": { + "name": "folder_workspace_owner_type_unique", + "nullsNotDistinct": false, + "columns": ["id", "workspace_id", "resource_type"] + }, + "folder_project_owner_type_unique": { + "name": "folder_project_owner_type_unique", + "nullsNotDistinct": false, + "columns": ["id", "project_id", "resource_type"] + } + }, + "policies": {}, + "checkConstraints": { + "folder_owner_check": { + "name": "folder_owner_check", + "value": "num_nonnulls(\"folder\".\"workspace_id\", \"folder\".\"project_id\") = 1 AND (\"folder\".\"project_id\" IS NULL OR \"folder\".\"resource_type\" = 'file')" + } + }, + "isRLSEnabled": false + }, + "public.idempotency_key": { + "name": "idempotency_key", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "result": { + "name": "result", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "idempotency_key_created_at_idx": { + "name": "idempotency_key_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.invitation": { + "name": "invitation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "invitation_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'organization'" + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "inviter_id": { + "name": "inviter_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "membership_intent": { + "name": "membership_intent", + "type": "invitation_membership_intent", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'internal'" + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "invitation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "invitation_email_idx": { + "name": "invitation_email_idx", + "columns": [ + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "invitation_organization_id_idx": { + "name": "invitation_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "invitation_status_idx": { + "name": "invitation_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "invitation_pending_email_org_unique": { + "name": "invitation_pending_email_org_unique", + "columns": [ + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"invitation\".\"status\" = 'pending' AND \"invitation\".\"organization_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "invitation_inviter_id_user_id_fk": { + "name": "invitation_inviter_id_user_id_fk", + "tableFrom": "invitation", + "tableTo": "user", + "columnsFrom": ["inviter_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "invitation_organization_id_organization_id_fk": { + "name": "invitation_organization_id_organization_id_fk", + "tableFrom": "invitation", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "invitation_token_unique": { + "name": "invitation_token_unique", + "nullsNotDistinct": false, + "columns": ["token"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.invitation_workspace_grant": { + "name": "invitation_workspace_grant", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "invitation_id": { + "name": "invitation_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "permission": { + "name": "permission", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "invitation_workspace_grant_unique": { + "name": "invitation_workspace_grant_unique", + "columns": [ + { + "expression": "invitation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "invitation_workspace_grant_workspace_id_idx": { + "name": "invitation_workspace_grant_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "invitation_workspace_grant_invitation_id_invitation_id_fk": { + "name": "invitation_workspace_grant_invitation_id_invitation_id_fk", + "tableFrom": "invitation_workspace_grant", + "tableTo": "invitation", + "columnsFrom": ["invitation_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "invitation_workspace_grant_workspace_id_workspace_id_fk": { + "name": "invitation_workspace_grant_workspace_id_workspace_id_fk", + "tableFrom": "invitation_workspace_grant", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.job_execution_logs": { + "name": "job_execution_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "schedule_id": { + "name": "schedule_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "level": { + "name": "level", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "trigger": { + "name": "trigger", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "ended_at": { + "name": "ended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "total_duration_ms": { + "name": "total_duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "execution_data": { + "name": "execution_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "cost": { + "name": "cost", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "occurrence_at": { + "name": "occurrence_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "outcome": { + "name": "outcome", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "billing_request_id": { + "name": "billing_request_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "job_execution_logs_schedule_occurrence_unique": { + "name": "job_execution_logs_schedule_occurrence_unique", + "columns": [ + { + "expression": "schedule_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "occurrence_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_billing_request_unique": { + "name": "job_execution_logs_billing_request_unique", + "columns": [ + { + "expression": "billing_request_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"job_execution_logs\".\"billing_request_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_open_idx": { + "name": "job_execution_logs_open_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"job_execution_logs\".\"status\" IN ('queued', 'running')", + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_workspace_started_at_idx": { + "name": "job_execution_logs_workspace_started_at_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_workspace_ended_at_id_idx": { + "name": "job_execution_logs_workspace_ended_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"ended_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_execution_id_unique": { + "name": "job_execution_logs_execution_id_unique", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_trigger_idx": { + "name": "job_execution_logs_trigger_idx", + "columns": [ + { + "expression": "trigger", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "job_execution_logs_schedule_id_workflow_schedule_id_fk": { + "name": "job_execution_logs_schedule_id_workflow_schedule_id_fk", + "tableFrom": "job_execution_logs", + "tableTo": "workflow_schedule", + "columnsFrom": ["schedule_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "job_execution_logs_workspace_id_workspace_id_fk": { + "name": "job_execution_logs_workspace_id_workspace_id_fk", + "tableFrom": "job_execution_logs", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_base": { + "name": "knowledge_base", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "folder_id": { + "name": "folder_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_search_index": { + "name": "is_search_index", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "embedding_model": { + "name": "embedding_model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text-embedding-3-small'" + }, + "embedding_dimension": { + "name": "embedding_dimension", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1536 + }, + "chunking_config": { + "name": "chunking_config", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{\"maxSize\": 1024, \"minSize\": 1, \"overlap\": 200}'" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "kb_organization_id_idx": { + "name": "kb_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_organization_search_index_unique": { + "name": "kb_organization_search_index_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"knowledge_base\".\"is_search_index\" = true AND \"knowledge_base\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_organization_name_active_unique": { + "name": "kb_organization_name_active_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"knowledge_base\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_workspace_id_idx": { + "name": "kb_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_user_workspace_idx": { + "name": "kb_user_workspace_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_folder_id_idx": { + "name": "kb_folder_id_idx", + "columns": [ + { + "expression": "folder_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_deleted_at_idx": { + "name": "kb_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_workspace_deleted_partial_idx": { + "name": "kb_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_base\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_workspace_name_active_unique": { + "name": "kb_workspace_name_active_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"knowledge_base\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_workspace_search_index_unique": { + "name": "kb_workspace_search_index_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"knowledge_base\".\"is_search_index\" = true AND \"knowledge_base\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_base_user_id_user_id_fk": { + "name": "knowledge_base_user_id_user_id_fk", + "tableFrom": "knowledge_base", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_base_workspace_id_workspace_id_fk": { + "name": "knowledge_base_workspace_id_workspace_id_fk", + "tableFrom": "knowledge_base", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_base_organization_id_organization_id_fk": { + "name": "knowledge_base_organization_id_organization_id_fk", + "tableFrom": "knowledge_base", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_base_folder_id_folder_id_fk": { + "name": "knowledge_base_folder_id_folder_id_fk", + "tableFrom": "knowledge_base", + "tableTo": "folder", + "columnsFrom": ["folder_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kb_owner_check": { + "name": "kb_owner_check", + "value": "num_nonnulls(\"knowledge_base\".\"workspace_id\", \"knowledge_base\".\"organization_id\") = 1" + }, + "kb_organization_search_index_check": { + "name": "kb_organization_search_index_check", + "value": "\"knowledge_base\".\"organization_id\" IS NULL OR \"knowledge_base\".\"is_search_index\"" + }, + "kb_organization_folder_check": { + "name": "kb_organization_folder_check", + "value": "\"knowledge_base\".\"organization_id\" IS NULL OR \"knowledge_base\".\"folder_id\" IS NULL" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_base_import": { + "name": "knowledge_base_import", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_key": { + "name": "source_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "documents_total": { + "name": "documents_total", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "documents_imported": { + "name": "documents_imported", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "documents_failed": { + "name": "documents_failed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "vectors_reused": { + "name": "vectors_reused", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "failures": { + "name": "failures", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "knowledge_base_import_watchdog_idx": { + "name": "knowledge_base_import_watchdog_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "knowledge_base_import_knowledge_base_id_idx": { + "name": "knowledge_base_import_knowledge_base_id_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_base_import_workspace_id_workspace_id_fk": { + "name": "knowledge_base_import_workspace_id_workspace_id_fk", + "tableFrom": "knowledge_base_import", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_base_import_knowledge_base_id_knowledge_base_id_fk": { + "name": "knowledge_base_import_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "knowledge_base_import", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_base_tag_definitions": { + "name": "knowledge_base_tag_definitions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tag_slot": { + "name": "tag_slot", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "field_type": { + "name": "field_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "kb_tag_definitions_kb_slot_idx": { + "name": "kb_tag_definitions_kb_slot_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag_slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_tag_definitions_kb_display_name_idx": { + "name": "kb_tag_definitions_kb_display_name_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "display_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_base_tag_definitions_knowledge_base_id_knowledge_base_id_fk": { + "name": "knowledge_base_tag_definitions_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "knowledge_base_tag_definitions", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_connector": { + "name": "knowledge_connector", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "connector_type": { + "name": "connector_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_api_key": { + "name": "encrypted_api_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_config": { + "name": "source_config", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "sync_mode": { + "name": "sync_mode", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'full'" + }, + "sync_interval_minutes": { + "name": "sync_interval_minutes", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1440 + }, + "access_mode": { + "name": "access_mode", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'workspace'" + }, + "credential_group_id": { + "name": "credential_group_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_group_option_id": { + "name": "credential_group_option_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "member_sync_status": { + "name": "member_sync_status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'idle'" + }, + "member_sync_lock_token": { + "name": "member_sync_lock_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "member_sync_lock_lease_at": { + "name": "member_sync_lock_lease_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "next_member_sync_at": { + "name": "next_member_sync_at", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": false + }, + "last_member_sync_at": { + "name": "last_member_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_member_sync_error": { + "name": "last_member_sync_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "member_sync_consecutive_failures": { + "name": "member_sync_consecutive_failures", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "access_rewrite_pending": { + "name": "access_rewrite_pending", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "image_removal_pending": { + "name": "image_removal_pending", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "member_tombstone_cursor": { + "name": "member_tombstone_cursor", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "member_resurrection_cursor": { + "name": "member_resurrection_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "last_sync_at": { + "name": "last_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_sync_error": { + "name": "last_sync_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_sync_doc_count": { + "name": "last_sync_doc_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "listing_checkpoint": { + "name": "listing_checkpoint", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "directory_checkpoint": { + "name": "directory_checkpoint", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "next_sync_at": { + "name": "next_sync_at", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": false + }, + "next_directory_sync_at": { + "name": "next_directory_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "consecutive_failures": { + "name": "consecutive_failures", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "sync_lock_token": { + "name": "sync_lock_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sync_lock_lease_at": { + "name": "sync_lock_lease_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "detached_at": { + "name": "detached_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "detach_reserved_bytes": { + "name": "detach_reserved_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "kc_knowledge_base_id_idx": { + "name": "kc_knowledge_base_id_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_status_next_sync_idx": { + "name": "kc_status_next_sync_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "next_sync_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_archived_at_partial_idx": { + "name": "kc_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_deleted_at_partial_idx": { + "name": "kc_deleted_at_partial_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_member_sync_due_idx": { + "name": "kc_member_sync_due_idx", + "columns": [ + { + "expression": "member_sync_status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "next_member_sync_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector\".\"access_mode\" = 'members' AND \"knowledge_connector\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_directory_sync_due_idx": { + "name": "kc_directory_sync_due_idx", + "columns": [ + { + "expression": "next_directory_sync_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector\".\"access_mode\" = 'admin' AND \"knowledge_connector\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_knowledge_base_id_knowledge_base_id_fk": { + "name": "knowledge_connector_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "knowledge_connector", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_connector_credential_group_id_credential_group_id_fk": { + "name": "knowledge_connector_credential_group_id_credential_group_id_fk", + "tableFrom": "knowledge_connector", + "tableTo": "credential_group", + "columnsFrom": ["credential_group_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kc_access_mode_check": { + "name": "kc_access_mode_check", + "value": "\"knowledge_connector\".\"access_mode\" IN ('workspace', 'members', 'admin')" + }, + "kc_member_sync_status_check": { + "name": "kc_member_sync_status_check", + "value": "\"knowledge_connector\".\"member_sync_status\" IN ('idle', 'pending', 'running', 'error', 'disabled')" + }, + "kc_sync_lock_exclusive_check": { + "name": "kc_sync_lock_exclusive_check", + "value": "NOT (\"knowledge_connector\".\"sync_lock_token\" IS NOT NULL AND \"knowledge_connector\".\"member_sync_lock_token\" IS NOT NULL)" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_member": { + "name": "knowledge_connector_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject_token": { + "name": "subject_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "consecutive_failures": { + "name": "consecutive_failures", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "next_attempt_at": { + "name": "next_attempt_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_started_at": { + "name": "last_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_complete_listing_at": { + "name": "last_complete_listing_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_listed_count": { + "name": "last_listed_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "member_synced_through": { + "name": "member_synced_through", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scope_renewed_at": { + "name": "scope_renewed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scope_renewal_cursor": { + "name": "scope_renewal_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "scope_renewal_started_at": { + "name": "scope_renewal_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "change_cursor": { + "name": "change_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "listing_checkpoint": { + "name": "listing_checkpoint", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "suspended_at": { + "name": "suspended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "kcm_organization_id_idx": { + "name": "kcm_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcm_connector_credential_unique": { + "name": "kcm_connector_credential_unique", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcm_connector_queue_idx": { + "name": "kcm_connector_queue_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "next_attempt_at", + "isExpression": false, + "asc": true, + "nulls": "first" + }, + { + "expression": "last_started_at", + "isExpression": false, + "asc": true, + "nulls": "first" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcm_credential_idx": { + "name": "kcm_credential_idx", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_member_workspace_id_workspace_id_fk": { + "name": "knowledge_connector_member_workspace_id_workspace_id_fk", + "tableFrom": "knowledge_connector_member", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_connector_member_organization_id_organization_id_fk": { + "name": "knowledge_connector_member_organization_id_organization_id_fk", + "tableFrom": "knowledge_connector_member", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_connector_member_connector_id_knowledge_connector_id_fk": { + "name": "knowledge_connector_member_connector_id_knowledge_connector_id_fk", + "tableFrom": "knowledge_connector_member", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_connector_member_credential_id_credential_id_fk": { + "name": "knowledge_connector_member_credential_id_credential_id_fk", + "tableFrom": "knowledge_connector_member", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcm_owner_check": { + "name": "kcm_owner_check", + "value": "num_nonnulls(\"knowledge_connector_member\".\"workspace_id\", \"knowledge_connector_member\".\"organization_id\") = 1" + }, + "kcm_status_check": { + "name": "kcm_status_check", + "value": "\"knowledge_connector_member\".\"status\" IN ('active', 'suspended', 'disabled')" + }, + "kcm_subject_token_shape_check": { + "name": "kcm_subject_token_shape_check", + "value": "\"knowledge_connector_member\".\"subject_token\" ~ '^s:[^:]+:[^:]+:.+$'" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_member_sync_log": { + "name": "knowledge_connector_member_sync_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "members_claimed": { + "name": "members_claimed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "members_completed": { + "name": "members_completed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "members_incomplete": { + "name": "members_incomplete", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "members_failed": { + "name": "members_failed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_failed": { + "name": "docs_failed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "processing_dispatch_failed": { + "name": "processing_dispatch_failed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "docs_listed": { + "name": "docs_listed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_added": { + "name": "docs_added", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_updated": { + "name": "docs_updated", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_unchanged": { + "name": "docs_unchanged", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_hydrated_once": { + "name": "docs_hydrated_once", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "observations_added": { + "name": "observations_added", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "observations_renewed": { + "name": "observations_renewed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "observations_removed": { + "name": "observations_removed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_tombstoned": { + "name": "docs_tombstoned", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_resurrected": { + "name": "docs_resurrected", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_purged": { + "name": "docs_purged", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "credentials_audited": { + "name": "credentials_audited", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "database_failure_class": { + "name": "database_failure_class", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "kcmsl_connector_started_at_idx": { + "name": "kcmsl_connector_started_at_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "\"started_at\" DESC", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcmsl_started_at_partial_idx": { + "name": "kcmsl_started_at_partial_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector_member_sync_log\".\"status\" = 'started'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_member_sync_log_connector_id_knowledge_connector_id_fk": { + "name": "knowledge_connector_member_sync_log_connector_id_knowledge_connector_id_fk", + "tableFrom": "knowledge_connector_member_sync_log", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcmsl_status_check": { + "name": "kcmsl_status_check", + "value": "\"knowledge_connector_member_sync_log\".\"status\" IN ('started', 'partial', 'completed', 'failed')" + }, + "kcmsl_database_failure_class_check": { + "name": "kcmsl_database_failure_class_check", + "value": "\"knowledge_connector_member_sync_log\".\"database_failure_class\" IN ('capacity', 'conflict', 'connection')" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_partition": { + "name": "knowledge_connector_partition", + "schema": "", + "columns": { + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "partition_key": { + "name": "partition_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "generation_id": { + "name": "generation_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "context": { + "name": "context", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "cursor": { + "name": "cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "attempts": { + "name": "attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "retry_at": { + "name": "retry_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_served_at": { + "name": "last_served_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "failure": { + "name": "failure", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "permission_cursor": { + "name": "permission_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "permission_attempts": { + "name": "permission_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "permission_retry_at": { + "name": "permission_retry_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "permission_last_served_at": { + "name": "permission_last_served_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "permission_started_at": { + "name": "permission_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "permission_failure": { + "name": "permission_failure", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "kcp_content_due_idx": { + "name": "kcp_content_due_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "generation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "retry_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_served_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcp_permission_due_idx": { + "name": "kcp_permission_due_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "generation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "permission_retry_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "permission_last_served_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_partition_connector_id_knowledge_connector_id_fk": { + "name": "knowledge_connector_partition_connector_id_knowledge_connector_id_fk", + "tableFrom": "knowledge_connector_partition", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "kcp_pk": { + "name": "kcp_pk", + "columns": ["connector_id", "partition_key"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcp_partition_key_check": { + "name": "kcp_partition_key_check", + "value": "octet_length(\"knowledge_connector_partition\".\"partition_key\") BETWEEN 1 AND 1024" + }, + "kcp_context_check": { + "name": "kcp_context_check", + "value": "jsonb_typeof(\"knowledge_connector_partition\".\"context\") = 'object' AND octet_length(\"knowledge_connector_partition\".\"context\"::text) <= 16384" + }, + "kcp_status_check": { + "name": "kcp_status_check", + "value": "\"knowledge_connector_partition\".\"status\" IN ('pending', 'complete', 'blocked')" + }, + "kcp_cursor_check": { + "name": "kcp_cursor_check", + "value": "(\"knowledge_connector_partition\".\"cursor\" IS NULL OR octet_length(\"knowledge_connector_partition\".\"cursor\") <= 393216) AND (\"knowledge_connector_partition\".\"permission_cursor\" IS NULL OR octet_length(\"knowledge_connector_partition\".\"permission_cursor\") <= 393216)" + }, + "kcp_attempts_check": { + "name": "kcp_attempts_check", + "value": "\"knowledge_connector_partition\".\"attempts\" >= 0 AND \"knowledge_connector_partition\".\"permission_attempts\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_permission_grant": { + "name": "knowledge_connector_permission_grant", + "schema": "", + "columns": { + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "group_key": { + "name": "group_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject_token": { + "name": "subject_token", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "kcpg_subject_idx": { + "name": "kcpg_subject_idx", + "columns": [ + { + "expression": "subject_token", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "group_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "kcpg_snapshot_fk": { + "name": "kcpg_snapshot_fk", + "tableFrom": "knowledge_connector_permission_grant", + "tableTo": "knowledge_connector_permission_snapshot", + "columnsFrom": ["connector_id"], + "columnsTo": ["connector_id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "kcpg_pk": { + "name": "kcpg_pk", + "columns": ["connector_id", "group_key", "subject_token"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcpg_group_check": { + "name": "kcpg_group_check", + "value": "length(\"knowledge_connector_permission_grant\".\"group_key\") BETWEEN 1 AND 255" + }, + "kcpg_subject_check": { + "name": "kcpg_subject_check", + "value": "\"knowledge_connector_permission_grant\".\"subject_token\" ~ '^u:[^[:space:]A-Z]+@[^[:space:]A-Z]+$'" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_permission_snapshot": { + "name": "knowledge_connector_permission_snapshot", + "schema": "", + "columns": { + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "kcps_connector_fk": { + "name": "kcps_connector_fk", + "tableFrom": "knowledge_connector_permission_snapshot", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcps_revision_check": { + "name": "kcps_revision_check", + "value": "\"knowledge_connector_permission_snapshot\".\"revision\" > 0" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_sync_log": { + "name": "knowledge_connector_sync_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "docs_added": { + "name": "docs_added", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_updated": { + "name": "docs_updated", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_deleted": { + "name": "docs_deleted", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_unchanged": { + "name": "docs_unchanged", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_skipped": { + "name": "docs_skipped", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_failed": { + "name": "docs_failed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "listed_count": { + "name": "listed_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "database_failure_class": { + "name": "database_failure_class", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "kcsl_connector_started_at_idx": { + "name": "kcsl_connector_started_at_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "\"started_at\" DESC", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcsl_started_at_partial_idx": { + "name": "kcsl_started_at_partial_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector_sync_log\".\"status\" = 'started'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcsl_terminal_started_at_idx": { + "name": "kcsl_terminal_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector_sync_log\".\"status\" IN ('completed', 'failed')", + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_sync_log_connector_id_knowledge_connector_id_fk": { + "name": "knowledge_connector_sync_log_connector_id_knowledge_connector_id_fk", + "tableFrom": "knowledge_connector_sync_log", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcsl_database_failure_class_check": { + "name": "kcsl_database_failure_class_check", + "value": "\"knowledge_connector_sync_log\".\"database_failure_class\" IN ('capacity', 'conflict', 'connection')" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_document_observation": { + "name": "knowledge_document_observation", + "schema": "", + "columns": { + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "member_id": { + "name": "member_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "run_id": { + "name": "run_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "kdo_member_idx": { + "name": "kdo_member_idx", + "columns": [ + { + "expression": "member_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_document_observation_document_id_document_id_fk": { + "name": "knowledge_document_observation_document_id_document_id_fk", + "tableFrom": "knowledge_document_observation", + "tableTo": "document", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_document_observation_member_id_knowledge_connector_member_id_fk": { + "name": "knowledge_document_observation_member_id_knowledge_connector_member_id_fk", + "tableFrom": "knowledge_document_observation", + "tableTo": "knowledge_connector_member", + "columnsFrom": ["member_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "knowledge_document_observation_document_id_member_id_pk": { + "name": "knowledge_document_observation_document_id_member_id_pk", + "columns": ["document_id", "member_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_external_directory": { + "name": "knowledge_external_directory", + "schema": "", + "columns": { + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sync_lock_token": { + "name": "sync_lock_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sync_lock_lease_at": { + "name": "sync_lock_lease_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_started_at": { + "name": "last_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_complete_sync_at": { + "name": "last_complete_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ked_workspace_identity_unique": { + "name": "ked_workspace_identity_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ked_organization_identity_unique": { + "name": "ked_organization_identity_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_external_directory_workspace_id_workspace_id_fk": { + "name": "knowledge_external_directory_workspace_id_workspace_id_fk", + "tableFrom": "knowledge_external_directory", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_external_directory_organization_id_organization_id_fk": { + "name": "knowledge_external_directory_organization_id_organization_id_fk", + "tableFrom": "knowledge_external_directory", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "ked_owner_check": { + "name": "ked_owner_check", + "value": "num_nonnulls(\"knowledge_external_directory\".\"workspace_id\", \"knowledge_external_directory\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_external_group": { + "name": "knowledge_external_group", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_group_id": { + "name": "external_group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "last_synced_at": { + "name": "last_synced_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "keg_organization_identity_unique": { + "name": "keg_organization_identity_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "keg_organization_synced_idx": { + "name": "keg_organization_synced_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_synced_at", + "isExpression": false, + "asc": true, + "nulls": "first" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "keg_identity_unique": { + "name": "keg_identity_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "keg_workspace_synced_idx": { + "name": "keg_workspace_synced_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_synced_at", + "isExpression": false, + "asc": true, + "nulls": "first" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_external_group_organization_id_organization_id_fk": { + "name": "knowledge_external_group_organization_id_organization_id_fk", + "tableFrom": "knowledge_external_group", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "keg_workspace_fk": { + "name": "keg_workspace_fk", + "tableFrom": "knowledge_external_group", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "keg_owner_check": { + "name": "keg_owner_check", + "value": "num_nonnulls(\"knowledge_external_group\".\"workspace_id\", \"knowledge_external_group\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_external_group_member": { + "name": "knowledge_external_group_member", + "schema": "", + "columns": { + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject_token": { + "name": "subject_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "kegm_subject_token_idx": { + "name": "kegm_subject_token_idx", + "columns": [ + { + "expression": "subject_token", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "kegm_group_fk": { + "name": "kegm_group_fk", + "tableFrom": "knowledge_external_group_member", + "tableTo": "knowledge_external_group", + "columnsFrom": ["group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "knowledge_external_group_member_group_id_subject_token_pk": { + "name": "knowledge_external_group_member_group_id_subject_token_pk", + "columns": ["group_id", "subject_token"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_projection_dirty": { + "name": "knowledge_projection_dirty", + "schema": "", + "columns": { + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "generation": { + "name": "generation", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "content": { + "name": "content", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "marked_at": { + "name": "marked_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "knowledge_projection_dirty_marked_at_idx": { + "name": "knowledge_projection_dirty_marked_at_idx", + "columns": [ + { + "expression": "marked_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_projection_dirty_document_id_document_id_fk": { + "name": "knowledge_projection_dirty_document_id_document_id_fk", + "tableFrom": "knowledge_projection_dirty", + "tableTo": "document", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mcp_server_oauth": { + "name": "mcp_server_oauth", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "mcp_server_id": { + "name": "mcp_server_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_information": { + "name": "client_information", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tokens": { + "name": "tokens", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "code_verifier": { + "name": "code_verifier", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "state": { + "name": "state", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "state_created_at": { + "name": "state_created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_refreshed_at": { + "name": "last_refreshed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mcp_server_oauth_server_unique": { + "name": "mcp_server_oauth_server_unique", + "columns": [ + { + "expression": "mcp_server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_server_oauth_state_idx": { + "name": "mcp_server_oauth_state_idx", + "columns": [ + { + "expression": "state", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mcp_server_oauth_mcp_server_id_mcp_servers_id_fk": { + "name": "mcp_server_oauth_mcp_server_id_mcp_servers_id_fk", + "tableFrom": "mcp_server_oauth", + "tableTo": "mcp_servers", + "columnsFrom": ["mcp_server_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcp_server_oauth_user_id_user_id_fk": { + "name": "mcp_server_oauth_user_id_user_id_fk", + "tableFrom": "mcp_server_oauth", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "mcp_server_oauth_workspace_id_workspace_id_fk": { + "name": "mcp_server_oauth_workspace_id_workspace_id_fk", + "tableFrom": "mcp_server_oauth", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcp_server_oauth_organization_id_organization_id_fk": { + "name": "mcp_server_oauth_organization_id_organization_id_fk", + "tableFrom": "mcp_server_oauth", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "mcp_server_oauth_owner_check": { + "name": "mcp_server_oauth_owner_check", + "value": "num_nonnulls(\"mcp_server_oauth\".\"workspace_id\", \"mcp_server_oauth\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.mcp_servers": { + "name": "mcp_servers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_group_id": { + "name": "credential_group_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "managed_connector_id": { + "name": "managed_connector_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oauth_config_version": { + "name": "oauth_config_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "transport": { + "name": "transport", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'headers'" + }, + "oauth_client_id": { + "name": "oauth_client_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oauth_client_secret": { + "name": "oauth_client_secret", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "headers": { + "name": "headers", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "timeout": { + "name": "timeout", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 30000 + }, + "retries": { + "name": "retries", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 3 + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_connected": { + "name": "last_connected", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "connection_status": { + "name": "connection_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'disconnected'" + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status_config": { + "name": "status_config", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "tool_count": { + "name": "tool_count", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "last_tools_refresh": { + "name": "last_tools_refresh", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "total_requests": { + "name": "total_requests", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "last_used": { + "name": "last_used", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mcp_servers_organization_id_idx": { + "name": "mcp_servers_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_servers_workspace_enabled_idx": { + "name": "mcp_servers_workspace_enabled_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_servers_credential_group_idx": { + "name": "mcp_servers_credential_group_idx", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_servers_credential_group_managed_connector_unique": { + "name": "mcp_servers_credential_group_managed_connector_unique", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "managed_connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"mcp_servers\".\"credential_group_id\" IS NOT NULL AND \"mcp_servers\".\"managed_connector_id\" IS NOT NULL AND \"mcp_servers\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_servers_workspace_deleted_partial_idx": { + "name": "mcp_servers_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"mcp_servers\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mcp_servers_workspace_id_workspace_id_fk": { + "name": "mcp_servers_workspace_id_workspace_id_fk", + "tableFrom": "mcp_servers", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcp_servers_organization_id_organization_id_fk": { + "name": "mcp_servers_organization_id_organization_id_fk", + "tableFrom": "mcp_servers", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcp_servers_credential_group_id_credential_group_id_fk": { + "name": "mcp_servers_credential_group_id_credential_group_id_fk", + "tableFrom": "mcp_servers", + "tableTo": "credential_group", + "columnsFrom": ["credential_group_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "mcp_servers_created_by_user_id_fk": { + "name": "mcp_servers_created_by_user_id_fk", + "tableFrom": "mcp_servers", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "mcp_servers_owner_check": { + "name": "mcp_servers_owner_check", + "value": "num_nonnulls(\"mcp_servers\".\"workspace_id\", \"mcp_servers\".\"organization_id\") = 1" + }, + "mcp_servers_organization_managed_check": { + "name": "mcp_servers_organization_managed_check", + "value": "\"mcp_servers\".\"organization_id\" IS NULL OR \"mcp_servers\".\"credential_group_id\" IS NOT NULL" + }, + "mcp_servers_credential_group_managed_connector_check": { + "name": "mcp_servers_credential_group_managed_connector_check", + "value": "\"mcp_servers\".\"credential_group_id\" IS NULL OR \"mcp_servers\".\"managed_connector_id\" IS NOT NULL" + }, + "mcp_servers_managed_connector_oauth_check": { + "name": "mcp_servers_managed_connector_oauth_check", + "value": "\"mcp_servers\".\"managed_connector_id\" IS NULL OR \"mcp_servers\".\"auth_type\" = 'oauth'" + } + }, + "isRLSEnabled": false + }, + "public.member": { + "name": "member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "member_user_id_unique": { + "name": "member_user_id_unique", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "member_organization_id_idx": { + "name": "member_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "member_user_id_user_id_fk": { + "name": "member_user_id_user_id_fk", + "tableFrom": "member", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "member_organization_id_organization_id_fk": { + "name": "member_organization_id_organization_id_fk", + "tableFrom": "member", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.member_profile": { + "name": "member_profile", + "schema": "", + "columns": { + "member_id": { + "name": "member_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "department": { + "name": "department", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "date", + "primaryKey": false, + "notNull": false + }, + "manager_member_id": { + "name": "manager_member_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "member_profile_manager_member_id_idx": { + "name": "member_profile_manager_member_id_idx", + "columns": [ + { + "expression": "manager_member_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "member_profile_updated_by_idx": { + "name": "member_profile_updated_by_idx", + "columns": [ + { + "expression": "updated_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "member_profile_member_id_member_id_fk": { + "name": "member_profile_member_id_member_id_fk", + "tableFrom": "member_profile", + "tableTo": "member", + "columnsFrom": ["member_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "member_profile_manager_member_id_member_id_fk": { + "name": "member_profile_manager_member_id_member_id_fk", + "tableFrom": "member_profile", + "tableTo": "member", + "columnsFrom": ["manager_member_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "member_profile_updated_by_user_id_fk": { + "name": "member_profile_updated_by_user_id_fk", + "tableFrom": "member_profile", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "member_profile_not_own_manager": { + "name": "member_profile_not_own_manager", + "value": "\"member_profile\".\"manager_member_id\" <> \"member_profile\".\"member_id\"" + } + }, + "isRLSEnabled": false + }, + "public.memory": { + "name": "memory", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "storage_version": { + "name": "storage_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "encrypted_context_summary": { + "name": "encrypted_context_summary", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "memory_key_idx": { + "name": "memory_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "memory_workspace_key_idx": { + "name": "memory_workspace_key_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "memory_workspace_deleted_partial_idx": { + "name": "memory_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"memory\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "memory_workspace_id_workspace_id_fk": { + "name": "memory_workspace_id_workspace_id_fk", + "tableFrom": "memory", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.memory_artifact": { + "name": "memory_artifact", + "schema": "", + "columns": { + "memory_id": { + "name": "memory_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "memory_artifact_key_idx": { + "name": "memory_artifact_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "memory_artifact_memory_id_memory_id_fk": { + "name": "memory_artifact_memory_id_memory_id_fk", + "tableFrom": "memory_artifact", + "tableTo": "memory", + "columnsFrom": ["memory_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "memory_artifact_key_execution_large_values_key_fk": { + "name": "memory_artifact_key_execution_large_values_key_fk", + "tableFrom": "memory_artifact", + "tableTo": "execution_large_values", + "columnsFrom": ["key"], + "columnsTo": ["key"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "memory_artifact_memory_id_key_pk": { + "name": "memory_artifact_memory_id_key_pk", + "columns": ["memory_id", "key"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.memory_item": { + "name": "memory_item", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "memory_id": { + "name": "memory_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sequence": { + "name": "sequence", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "identity": { + "type": "always", + "name": "memory_item_sequence_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": "1", + "cycle": false + } + }, + "append_key": { + "name": "append_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "turn_id": { + "name": "turn_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provenance_status": { + "name": "provenance_status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provenance_entries": { + "name": "provenance_entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "memory_item_append_unique": { + "name": "memory_item_append_unique", + "columns": [ + { + "expression": "memory_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "append_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "memory_item_sequence_idx": { + "name": "memory_item_sequence_idx", + "columns": [ + { + "expression": "memory_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sequence", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "memory_item_memory_id_memory_id_fk": { + "name": "memory_item_memory_id_memory_id_fk", + "tableFrom": "memory_item", + "tableTo": "memory", + "columnsFrom": ["memory_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "memory_item_kind_check": { + "name": "memory_item_kind_check", + "value": "\"memory_item\".\"kind\" IN ('message', 'exchange')" + }, + "memory_item_provenance_status_check": { + "name": "memory_item_provenance_status_check", + "value": "\"memory_item\".\"provenance_status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.memory_secret_provenance": { + "name": "memory_secret_provenance", + "schema": "", + "columns": { + "memory_id": { + "name": "memory_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "memory_secret_provenance_memory_id_memory_id_fk": { + "name": "memory_secret_provenance_memory_id_memory_id_fk", + "tableFrom": "memory_secret_provenance", + "tableTo": "memory", + "columnsFrom": ["memory_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "memory_secret_provenance_status_check": { + "name": "memory_secret_provenance_status_check", + "value": "\"memory_secret_provenance\".\"status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.mothership_benchmark_runs": { + "name": "mothership_benchmark_runs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "benchmark_id": { + "name": "benchmark_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "evaluation_key": { + "name": "evaluation_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reviews": { + "name": "reviews", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "reviewed_at": { + "name": "reviewed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "correct": { + "name": "correct", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "automatic_correct": { + "name": "automatic_correct", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "total": { + "name": "total", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "artifacts": { + "name": "artifacts", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mothership_benchmark_runs_benchmark_created_idx": { + "name": "mothership_benchmark_runs_benchmark_created_idx", + "columns": [ + { + "expression": "benchmark_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_benchmark_runs_benchmark_id_mothership_benchmarks_id_fk": { + "name": "mothership_benchmark_runs_benchmark_id_mothership_benchmarks_id_fk", + "tableFrom": "mothership_benchmark_runs", + "tableTo": "mothership_benchmarks", + "columnsFrom": ["benchmark_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "mothership_benchmark_runs_score_check": { + "name": "mothership_benchmark_runs_score_check", + "value": "\"mothership_benchmark_runs\".\"total\" > 0 AND \"mothership_benchmark_runs\".\"correct\" >= 0 AND \"mothership_benchmark_runs\".\"correct\" <= \"mothership_benchmark_runs\".\"total\"" + }, + "mothership_benchmark_runs_version_check": { + "name": "mothership_benchmark_runs_version_check", + "value": "\"mothership_benchmark_runs\".\"version\" > 0" + }, + "mothership_benchmark_runs_automatic_score_check": { + "name": "mothership_benchmark_runs_automatic_score_check", + "value": "\"mothership_benchmark_runs\".\"automatic_correct\" >= 0 AND \"mothership_benchmark_runs\".\"automatic_correct\" <= \"mothership_benchmark_runs\".\"total\"" + } + }, + "isRLSEnabled": false + }, + "public.mothership_benchmarks": { + "name": "mothership_benchmarks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "run_as_user_id": { + "name": "run_as_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_workspace_id": { + "name": "source_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "artifacts": { + "name": "artifacts", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "running_stage": { + "name": "running_stage", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "attempt_id": { + "name": "attempt_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lease_expires_at": { + "name": "lease_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "planner_chat_id": { + "name": "planner_chat_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mothership_benchmarks_owner_created_idx": { + "name": "mothership_benchmarks_owner_created_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mothership_benchmarks_workspace_idx": { + "name": "mothership_benchmarks_workspace_idx", + "columns": [ + { + "expression": "source_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_benchmarks_organization_id_organization_id_fk": { + "name": "mothership_benchmarks_organization_id_organization_id_fk", + "tableFrom": "mothership_benchmarks", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_benchmarks_user_id_user_id_fk": { + "name": "mothership_benchmarks_user_id_user_id_fk", + "tableFrom": "mothership_benchmarks", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_benchmarks_run_as_user_id_user_id_fk": { + "name": "mothership_benchmarks_run_as_user_id_user_id_fk", + "tableFrom": "mothership_benchmarks", + "tableTo": "user", + "columnsFrom": ["run_as_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_benchmarks_source_workspace_id_workspace_id_fk": { + "name": "mothership_benchmarks_source_workspace_id_workspace_id_fk", + "tableFrom": "mothership_benchmarks", + "tableTo": "workspace", + "columnsFrom": ["source_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "mothership_benchmarks_version_check": { + "name": "mothership_benchmarks_version_check", + "value": "\"mothership_benchmarks\".\"version\" > 0" + }, + "mothership_benchmarks_attempt_check": { + "name": "mothership_benchmarks_attempt_check", + "value": "(\"mothership_benchmarks\".\"running_stage\" IS NULL AND \"mothership_benchmarks\".\"attempt_id\" IS NULL AND \"mothership_benchmarks\".\"lease_expires_at\" IS NULL) OR (\"mothership_benchmarks\".\"running_stage\" IS NOT NULL AND \"mothership_benchmarks\".\"running_stage\" IN ('distill', 'redact', 'plan', 'reconstruct', 'grade') AND \"mothership_benchmarks\".\"attempt_id\" IS NOT NULL AND \"mothership_benchmarks\".\"lease_expires_at\" IS NOT NULL)" + } + }, + "isRLSEnabled": false + }, + "public.mothership_inbox_allowed_sender": { + "name": "mothership_inbox_allowed_sender", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "added_by": { + "name": "added_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "inbox_sender_ws_email_idx": { + "name": "inbox_sender_ws_email_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_inbox_allowed_sender_workspace_id_workspace_id_fk": { + "name": "mothership_inbox_allowed_sender_workspace_id_workspace_id_fk", + "tableFrom": "mothership_inbox_allowed_sender", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_inbox_allowed_sender_added_by_user_id_fk": { + "name": "mothership_inbox_allowed_sender_added_by_user_id_fk", + "tableFrom": "mothership_inbox_allowed_sender", + "tableTo": "user", + "columnsFrom": ["added_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_inbox_task": { + "name": "mothership_inbox_task", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "from_email": { + "name": "from_email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sender_authenticated": { + "name": "sender_authenticated", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "from_name": { + "name": "from_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subject": { + "name": "subject", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "body_preview": { + "name": "body_preview", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "body_text": { + "name": "body_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "body_html": { + "name": "body_html", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email_message_id": { + "name": "email_message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "in_reply_to": { + "name": "in_reply_to", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "response_message_id": { + "name": "response_message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "agentmail_message_id": { + "name": "agentmail_message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'received'" + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "trigger_job_id": { + "name": "trigger_job_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "result_summary": { + "name": "result_summary", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "rejection_reason": { + "name": "rejection_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "has_attachments": { + "name": "has_attachments", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "cc_recipients": { + "name": "cc_recipients", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "processing_started_at": { + "name": "processing_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "inbox_task_ws_created_at_idx": { + "name": "inbox_task_ws_created_at_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "inbox_task_ws_status_idx": { + "name": "inbox_task_ws_status_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "inbox_task_response_msg_id_idx": { + "name": "inbox_task_response_msg_id_idx", + "columns": [ + { + "expression": "response_message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "inbox_task_email_msg_id_idx": { + "name": "inbox_task_email_msg_id_idx", + "columns": [ + { + "expression": "email_message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_inbox_task_workspace_id_workspace_id_fk": { + "name": "mothership_inbox_task_workspace_id_workspace_id_fk", + "tableFrom": "mothership_inbox_task", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_inbox_task_chat_id_copilot_chats_id_fk": { + "name": "mothership_inbox_task_chat_id_copilot_chats_id_fk", + "tableFrom": "mothership_inbox_task", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_inbox_webhook": { + "name": "mothership_inbox_webhook", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "webhook_id": { + "name": "webhook_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret": { + "name": "secret", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "mothership_inbox_webhook_workspace_id_workspace_id_fk": { + "name": "mothership_inbox_webhook_workspace_id_workspace_id_fk", + "tableFrom": "mothership_inbox_webhook", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "mothership_inbox_webhook_workspace_id_unique": { + "name": "mothership_inbox_webhook_workspace_id_unique", + "nullsNotDistinct": false, + "columns": ["workspace_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_memory_selections": { + "name": "mothership_memory_selections", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "space_id": { + "name": "space_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "mothership_memory_selections_user_id_user_id_fk": { + "name": "mothership_memory_selections_user_id_user_id_fk", + "tableFrom": "mothership_memory_selections", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_memory_selections_organization_id_organization_id_fk": { + "name": "mothership_memory_selections_organization_id_organization_id_fk", + "tableFrom": "mothership_memory_selections", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_memory_selections_space_id_mothership_memory_spaces_id_fk": { + "name": "mothership_memory_selections_space_id_mothership_memory_spaces_id_fk", + "tableFrom": "mothership_memory_selections", + "tableTo": "mothership_memory_spaces", + "columnsFrom": ["space_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "mothership_memory_selections_user_id_organization_id_pk": { + "name": "mothership_memory_selections_user_id_organization_id_pk", + "columns": ["user_id", "organization_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_memory_spaces": { + "name": "mothership_memory_spaces", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mothership_memory_spaces_owner_idx": { + "name": "mothership_memory_spaces_owner_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_memory_spaces_user_id_user_id_fk": { + "name": "mothership_memory_spaces_user_id_user_id_fk", + "tableFrom": "mothership_memory_spaces", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_memory_spaces_organization_id_organization_id_fk": { + "name": "mothership_memory_spaces_organization_id_organization_id_fk", + "tableFrom": "mothership_memory_spaces", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_resource_effects": { + "name": "mothership_resource_effects", + "schema": "", + "columns": { + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "effect_id": { + "name": "effect_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "mothership_resource_effects_chat_id_copilot_chats_id_fk": { + "name": "mothership_resource_effects_chat_id_copilot_chats_id_fk", + "tableFrom": "mothership_resource_effects", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "mothership_resource_effects_chat_id_effect_id_pk": { + "name": "mothership_resource_effects_chat_id_effect_id_pk", + "columns": ["chat_id", "effect_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.oauth_access_token": { + "name": "oauth_access_token", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "session_id": { + "name": "session_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_id": { + "name": "refresh_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "scopes": { + "name": "scopes", + "type": "text[]", + "primaryKey": false, + "notNull": true + }, + "resource": { + "name": "resource", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "oauth_access_token_client_id_idx": { + "name": "oauth_access_token_client_id_idx", + "columns": [ + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_access_token_session_id_idx": { + "name": "oauth_access_token_session_id_idx", + "columns": [ + { + "expression": "session_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_access_token_refresh_id_idx": { + "name": "oauth_access_token_refresh_id_idx", + "columns": [ + { + "expression": "refresh_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_access_token_user_client_idx": { + "name": "oauth_access_token_user_client_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_access_token_expires_at_idx": { + "name": "oauth_access_token_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_access_token_client_id_oauth_client_client_id_fk": { + "name": "oauth_access_token_client_id_oauth_client_client_id_fk", + "tableFrom": "oauth_access_token", + "tableTo": "oauth_client", + "columnsFrom": ["client_id"], + "columnsTo": ["client_id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_access_token_session_id_session_id_fk": { + "name": "oauth_access_token_session_id_session_id_fk", + "tableFrom": "oauth_access_token", + "tableTo": "session", + "columnsFrom": ["session_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "oauth_access_token_user_id_user_id_fk": { + "name": "oauth_access_token_user_id_user_id_fk", + "tableFrom": "oauth_access_token", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_access_token_refresh_id_oauth_refresh_token_id_fk": { + "name": "oauth_access_token_refresh_id_oauth_refresh_token_id_fk", + "tableFrom": "oauth_access_token", + "tableTo": "oauth_refresh_token", + "columnsFrom": ["refresh_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "oauth_access_token_token_unique": { + "name": "oauth_access_token_token_unique", + "nullsNotDistinct": false, + "columns": ["token"] + } + }, + "policies": {}, + "checkConstraints": { + "oauth_access_token_search_resource_check": { + "name": "oauth_access_token_search_resource_check", + "value": "NOT ('search:read' = ANY(\"oauth_access_token\".\"scopes\")) OR \"oauth_access_token\".\"resource\" IS NOT NULL" + } + }, + "isRLSEnabled": false + }, + "public.oauth_client": { + "name": "oauth_client", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_secret": { + "name": "client_secret", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "disabled": { + "name": "disabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "skip_consent": { + "name": "skip_consent", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "enable_end_session": { + "name": "enable_end_session", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "subject_type": { + "name": "subject_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "scopes": { + "name": "scopes", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "contacts": { + "name": "contacts", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "tos": { + "name": "tos", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "policy": { + "name": "policy", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "software_id": { + "name": "software_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "software_version": { + "name": "software_version", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "software_statement": { + "name": "software_statement", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "redirect_uris": { + "name": "redirect_uris", + "type": "text[]", + "primaryKey": false, + "notNull": true + }, + "post_logout_redirect_uris": { + "name": "post_logout_redirect_uris", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "token_endpoint_auth_method": { + "name": "token_endpoint_auth_method", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "grant_types": { + "name": "grant_types", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "response_types": { + "name": "response_types", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "public": { + "name": "public", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "require_pkce": { + "name": "require_pkce", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "oauth_client_user_id_idx": { + "name": "oauth_client_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_client_user_id_user_id_fk": { + "name": "oauth_client_user_id_user_id_fk", + "tableFrom": "oauth_client", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "oauth_client_client_id_unique": { + "name": "oauth_client_client_id_unique", + "nullsNotDistinct": false, + "columns": ["client_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.oauth_consent": { + "name": "oauth_consent", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "scopes": { + "name": "scopes", + "type": "text[]", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "oauth_consent_client_id_idx": { + "name": "oauth_consent_client_id_idx", + "columns": [ + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_consent_client_id_oauth_client_client_id_fk": { + "name": "oauth_consent_client_id_oauth_client_client_id_fk", + "tableFrom": "oauth_consent", + "tableTo": "oauth_client", + "columnsFrom": ["client_id"], + "columnsTo": ["client_id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_consent_user_id_user_id_fk": { + "name": "oauth_consent_user_id_user_id_fk", + "tableFrom": "oauth_consent", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "oauth_consent_user_client_reference_unique": { + "name": "oauth_consent_user_client_reference_unique", + "nullsNotDistinct": true, + "columns": ["user_id", "client_id", "reference_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.oauth_refresh_token": { + "name": "oauth_refresh_token", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "session_id": { + "name": "session_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "revoked": { + "name": "revoked", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "auth_time": { + "name": "auth_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scopes": { + "name": "scopes", + "type": "text[]", + "primaryKey": false, + "notNull": true + }, + "resource": { + "name": "resource", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "family_id": { + "name": "family_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "generation": { + "name": "generation", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "oauth_refresh_token_client_id_idx": { + "name": "oauth_refresh_token_client_id_idx", + "columns": [ + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_refresh_token_session_id_idx": { + "name": "oauth_refresh_token_session_id_idx", + "columns": [ + { + "expression": "session_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_refresh_token_user_client_idx": { + "name": "oauth_refresh_token_user_client_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_refresh_token_expires_at_idx": { + "name": "oauth_refresh_token_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_refresh_token_client_id_oauth_client_client_id_fk": { + "name": "oauth_refresh_token_client_id_oauth_client_client_id_fk", + "tableFrom": "oauth_refresh_token", + "tableTo": "oauth_client", + "columnsFrom": ["client_id"], + "columnsTo": ["client_id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_refresh_token_session_id_session_id_fk": { + "name": "oauth_refresh_token_session_id_session_id_fk", + "tableFrom": "oauth_refresh_token", + "tableTo": "session", + "columnsFrom": ["session_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "oauth_refresh_token_user_id_user_id_fk": { + "name": "oauth_refresh_token_user_id_user_id_fk", + "tableFrom": "oauth_refresh_token", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_refresh_token_family_id_oauth_token_family_id_fk": { + "name": "oauth_refresh_token_family_id_oauth_token_family_id_fk", + "tableFrom": "oauth_refresh_token", + "tableTo": "oauth_token_family", + "columnsFrom": ["family_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "oauth_refresh_token_token_unique": { + "name": "oauth_refresh_token_token_unique", + "nullsNotDistinct": false, + "columns": ["token"] + }, + "oauth_refresh_token_family_generation_unique": { + "name": "oauth_refresh_token_family_generation_unique", + "nullsNotDistinct": false, + "columns": ["family_id", "generation"] + } + }, + "policies": {}, + "checkConstraints": { + "oauth_refresh_token_generation_check": { + "name": "oauth_refresh_token_generation_check", + "value": "\"oauth_refresh_token\".\"generation\" BETWEEN 0 AND 1000" + }, + "oauth_refresh_token_search_resource_check": { + "name": "oauth_refresh_token_search_resource_check", + "value": "NOT ('search:read' = ANY(\"oauth_refresh_token\".\"scopes\")) OR \"oauth_refresh_token\".\"resource\" IS NOT NULL" + } + }, + "isRLSEnabled": false + }, + "public.oauth_token_family": { + "name": "oauth_token_family", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "session_id": { + "name": "session_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "consent_id": { + "name": "consent_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "current_generation": { + "name": "current_generation", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "oauth_token_family_client_id_idx": { + "name": "oauth_token_family_client_id_idx", + "columns": [ + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_token_family_session_id_idx": { + "name": "oauth_token_family_session_id_idx", + "columns": [ + { + "expression": "session_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_token_family_user_client_idx": { + "name": "oauth_token_family_user_client_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_token_family_consent_id_idx": { + "name": "oauth_token_family_consent_id_idx", + "columns": [ + { + "expression": "consent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_token_family_expires_at_idx": { + "name": "oauth_token_family_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_token_family_client_id_oauth_client_client_id_fk": { + "name": "oauth_token_family_client_id_oauth_client_client_id_fk", + "tableFrom": "oauth_token_family", + "tableTo": "oauth_client", + "columnsFrom": ["client_id"], + "columnsTo": ["client_id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_token_family_session_id_session_id_fk": { + "name": "oauth_token_family_session_id_session_id_fk", + "tableFrom": "oauth_token_family", + "tableTo": "session", + "columnsFrom": ["session_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "oauth_token_family_user_id_user_id_fk": { + "name": "oauth_token_family_user_id_user_id_fk", + "tableFrom": "oauth_token_family", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_token_family_consent_id_oauth_consent_id_fk": { + "name": "oauth_token_family_consent_id_oauth_consent_id_fk", + "tableFrom": "oauth_token_family", + "tableTo": "oauth_consent", + "columnsFrom": ["consent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "oauth_token_family_generation_check": { + "name": "oauth_token_family_generation_check", + "value": "\"oauth_token_family\".\"current_generation\" BETWEEN 0 AND 1000" + } + }, + "isRLSEnabled": false + }, + "public.organization": { + "name": "organization", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "logo": { + "name": "logo", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "session_policy_settings": { + "name": "session_policy_settings", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "security_policy_version": { + "name": "security_policy_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "require_sso": { + "name": "require_sso", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "whitelabel_settings": { + "name": "whitelabel_settings", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "data_retention_settings": { + "name": "data_retention_settings", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "org_usage_limit": { + "name": "org_usage_limit", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "storage_used_bytes": { + "name": "storage_used_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "limit_notifications": { + "name": "limit_notifications", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "credit_balance": { + "name": "credit_balance", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_access_request_settings": { + "name": "organization_access_request_settings", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "allow_requests": { + "name": "allow_requests", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "organization_access_request_settings_organization_id_organization_id_fk": { + "name": "organization_access_request_settings_organization_id_organization_id_fk", + "tableFrom": "organization_access_request_settings", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_access_request_settings_updated_by_user_id_fk": { + "name": "organization_access_request_settings_updated_by_user_id_fk", + "tableFrom": "organization_access_request_settings", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_byok_keys": { + "name": "organization_byok_keys", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "encrypted_api_key": { + "name": "encrypted_api_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "organization_byok_organization_provider_idx": { + "name": "organization_byok_organization_provider_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_byok_keys_organization_id_organization_id_fk": { + "name": "organization_byok_keys_organization_id_organization_id_fk", + "tableFrom": "organization_byok_keys", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_byok_keys_created_by_user_id_fk": { + "name": "organization_byok_keys_created_by_user_id_fk", + "tableFrom": "organization_byok_keys", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_member_usage_limit": { + "name": "organization_member_usage_limit", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "usage_limit": { + "name": "usage_limit", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "set_by": { + "name": "set_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "org_member_usage_limit_org_user_unique": { + "name": "org_member_usage_limit_org_user_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "org_member_usage_limit_organization_id_idx": { + "name": "org_member_usage_limit_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_member_usage_limit_organization_id_organization_id_fk": { + "name": "organization_member_usage_limit_organization_id_organization_id_fk", + "tableFrom": "organization_member_usage_limit", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_member_usage_limit_user_id_user_id_fk": { + "name": "organization_member_usage_limit_user_id_user_id_fk", + "tableFrom": "organization_member_usage_limit", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_member_usage_limit_set_by_user_id_fk": { + "name": "organization_member_usage_limit_set_by_user_id_fk", + "tableFrom": "organization_member_usage_limit", + "tableTo": "user", + "columnsFrom": ["set_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_search_history": { + "name": "organization_search_history", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sources": { + "name": "sources", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "queries": { + "name": "queries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + } + }, + "indexes": { + "organization_search_history_user_idx": { + "name": "organization_search_history_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_search_history_organization_id_organization_id_fk": { + "name": "organization_search_history_organization_id_organization_id_fk", + "tableFrom": "organization_search_history", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_search_history_user_id_user_id_fk": { + "name": "organization_search_history_user_id_user_id_fk", + "tableFrom": "organization_search_history", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "organization_search_history_organization_id_user_id_pk": { + "name": "organization_search_history_organization_id_user_id_pk", + "columns": ["organization_id", "user_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_search_integration": { + "name": "organization_search_integration", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "connector_type": { + "name": "connector_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "approved": { + "name": "approved", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "organization_search_integration_organization_id_organization_id_fk": { + "name": "organization_search_integration_organization_id_organization_id_fk", + "tableFrom": "organization_search_integration", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "organization_search_integration_organization_id_connector_type_pk": { + "name": "organization_search_integration_organization_id_connector_type_pk", + "columns": ["organization_id", "connector_type"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_search_mcp_invocation": { + "name": "organization_search_mcp_invocation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "auth_kind": { + "name": "auth_kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "oauth_client_id": { + "name": "oauth_client_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_name": { + "name": "client_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tool_name": { + "name": "tool_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "outcome": { + "name": "outcome", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "duration_ms": { + "name": "duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "organization_search_mcp_invocation_org_created_idx": { + "name": "organization_search_mcp_invocation_org_created_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "organization_search_mcp_invocation_user_idx": { + "name": "organization_search_mcp_invocation_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "org_search_mcp_invocation_org_fk": { + "name": "org_search_mcp_invocation_org_fk", + "tableFrom": "organization_search_mcp_invocation", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "org_search_mcp_invocation_user_fk": { + "name": "org_search_mcp_invocation_user_fk", + "tableFrom": "organization_search_mcp_invocation", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "organization_search_mcp_invocation_tool_check": { + "name": "organization_search_mcp_invocation_tool_check", + "value": "\"organization_search_mcp_invocation\".\"tool_name\" IN ('search', 'read_document', 'chat')" + }, + "organization_search_mcp_invocation_outcome_check": { + "name": "organization_search_mcp_invocation_outcome_check", + "value": "\"organization_search_mcp_invocation\".\"outcome\" IN ('success', 'error', 'cancelled', 'rate_limited')" + }, + "organization_search_mcp_invocation_duration_check": { + "name": "organization_search_mcp_invocation_duration_check", + "value": "\"organization_search_mcp_invocation\".\"duration_ms\" >= 0" + }, + "organization_search_mcp_invocation_client_name_check": { + "name": "organization_search_mcp_invocation_client_name_check", + "value": "length(\"organization_search_mcp_invocation\".\"client_name\") <= 256" + }, + "organization_search_mcp_invocation_auth_check": { + "name": "organization_search_mcp_invocation_auth_check", + "value": "(\"organization_search_mcp_invocation\".\"auth_kind\" = 'oauth_access_token' AND \"organization_search_mcp_invocation\".\"oauth_client_id\" IS NOT NULL)\n OR (\"organization_search_mcp_invocation\".\"auth_kind\" IN ('personal_api_key', 'workspace_api_key') AND \"organization_search_mcp_invocation\".\"oauth_client_id\" IS NULL AND \"organization_search_mcp_invocation\".\"client_name\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.organization_secret": { + "name": "organization_secret", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "source_id": { + "name": "source_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "encrypted_value": { + "name": "encrypted_value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "organization_secret_shared_unique": { + "name": "organization_secret_shared_unique", + "columns": [ + { + "expression": "source_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"organization_secret\".\"owner_user_id\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "organization_secret_member_unique": { + "name": "organization_secret_member_unique", + "columns": [ + { + "expression": "source_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"organization_secret\".\"owner_user_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "organization_secret_owner_idx": { + "name": "organization_secret_owner_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_secret_source_id_organization_secret_source_id_fk": { + "name": "organization_secret_source_id_organization_secret_source_id_fk", + "tableFrom": "organization_secret", + "tableTo": "organization_secret_source", + "columnsFrom": ["source_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_secret_owner_user_id_user_id_fk": { + "name": "organization_secret_owner_user_id_user_id_fk", + "tableFrom": "organization_secret", + "tableTo": "user", + "columnsFrom": ["owner_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_secret_source": { + "name": "organization_secret_source", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "mode": { + "name": "mode", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "organization_secret_source_org_unique": { + "name": "organization_secret_source_org_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_secret_source_organization_id_organization_id_fk": { + "name": "organization_secret_source_organization_id_organization_id_fk", + "tableFrom": "organization_secret_source", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "organization_secret_source_mode_check": { + "name": "organization_secret_source_mode_check", + "value": "\"organization_secret_source\".\"mode\" IN ('organization', 'member')" + } + }, + "isRLSEnabled": false + }, + "public.outbox_event": { + "name": "outbox_event", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "event_type": { + "name": "event_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "attempts": { + "name": "attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_attempts": { + "name": "max_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 10 + }, + "available_at": { + "name": "available_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "locked_at": { + "name": "locked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "processed_at": { + "name": "processed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "outbox_event_status_available_idx": { + "name": "outbox_event_status_available_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "available_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "outbox_event_pending_type_available_idx": { + "name": "outbox_event_pending_type_available_idx", + "columns": [ + { + "expression": "event_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "available_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"outbox_event\".\"status\" = 'pending'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "outbox_event_locked_at_idx": { + "name": "outbox_event_locked_at_idx", + "columns": [ + { + "expression": "locked_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "outbox_event_type_created_idx": { + "name": "outbox_event_type_created_idx", + "columns": [ + { + "expression": "event_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.paused_executions": { + "name": "paused_executions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_snapshot": { + "name": "execution_snapshot", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "pause_points": { + "name": "pause_points", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "total_pause_count": { + "name": "total_pause_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "resumed_count": { + "name": "resumed_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "automatic_resume_retry_count": { + "name": "automatic_resume_retry_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'paused'" + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "paused_at": { + "name": "paused_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "next_resume_at": { + "name": "next_resume_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "paused_executions_workflow_id_idx": { + "name": "paused_executions_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "paused_executions_status_idx": { + "name": "paused_executions_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "paused_executions_execution_id_unique": { + "name": "paused_executions_execution_id_unique", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "paused_executions_next_resume_at_idx": { + "name": "paused_executions_next_resume_at_idx", + "columns": [ + { + "expression": "next_resume_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "status = 'paused' AND next_resume_at IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "paused_executions_workflow_id_workflow_id_fk": { + "name": "paused_executions_workflow_id_workflow_id_fk", + "tableFrom": "paused_executions", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pending_credential_draft": { + "name": "pending_credential_draft", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oauth_config": { + "name": "oauth_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "pending_draft_organization_id_idx": { + "name": "pending_draft_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pending_draft_user_provider_org": { + "name": "pending_draft_user_provider_org", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pending_draft_user_provider_ws": { + "name": "pending_draft_user_provider_ws", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pending_credential_draft_user_id_user_id_fk": { + "name": "pending_credential_draft_user_id_user_id_fk", + "tableFrom": "pending_credential_draft", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pending_credential_draft_workspace_id_workspace_id_fk": { + "name": "pending_credential_draft_workspace_id_workspace_id_fk", + "tableFrom": "pending_credential_draft", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pending_credential_draft_organization_id_organization_id_fk": { + "name": "pending_credential_draft_organization_id_organization_id_fk", + "tableFrom": "pending_credential_draft", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pending_credential_draft_credential_id_credential_id_fk": { + "name": "pending_credential_draft_credential_id_credential_id_fk", + "tableFrom": "pending_credential_draft", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "pending_draft_owner_check": { + "name": "pending_draft_owner_check", + "value": "num_nonnulls(\"pending_credential_draft\".\"workspace_id\", \"pending_credential_draft\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.people_directory_entry": { + "name": "people_directory_entry", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "department": { + "name": "department", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "manager_external_id": { + "name": "manager_external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "people_directory_entry_source_id_idx": { + "name": "people_directory_entry_source_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "people_directory_entry_email_idx": { + "name": "people_directory_entry_email_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "people_directory_entry_manager_idx": { + "name": "people_directory_entry_manager_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "manager_external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "people_directory_entry_organization_id_people_directory_sync_organization_id_fk": { + "name": "people_directory_entry_organization_id_people_directory_sync_organization_id_fk", + "tableFrom": "people_directory_entry", + "tableTo": "people_directory_sync", + "columnsFrom": ["organization_id"], + "columnsTo": ["organization_id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.people_directory_page": { + "name": "people_directory_page", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "run_id": { + "name": "run_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "page_hash": { + "name": "page_hash", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "people_directory_page_organization_id_people_directory_sync_organization_id_fk": { + "name": "people_directory_page_organization_id_people_directory_sync_organization_id_fk", + "tableFrom": "people_directory_page", + "tableTo": "people_directory_sync", + "columnsFrom": ["organization_id"], + "columnsTo": ["organization_id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "people_directory_page_organization_id_run_id_page_hash_pk": { + "name": "people_directory_page_organization_id_run_id_page_hash_pk", + "columns": ["organization_id", "run_id", "page_hash"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.people_directory_scim_change": { + "name": "people_directory_scim_change", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "changed_at": { + "name": "changed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "people_directory_scim_change_due_idx": { + "name": "people_directory_scim_change_due_idx", + "columns": [ + { + "expression": "changed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "people_directory_scim_change_organization_id_organization_id_fk": { + "name": "people_directory_scim_change_organization_id_organization_id_fk", + "tableFrom": "people_directory_scim_change", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.people_directory_stage": { + "name": "people_directory_stage", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "run_id": { + "name": "run_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "proposed_id": { + "name": "proposed_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "department": { + "name": "department", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "manager_external_id": { + "name": "manager_external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reports_cursor": { + "name": "reports_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reports_complete": { + "name": "reports_complete", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "people_directory_stage_email_idx": { + "name": "people_directory_stage_email_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "people_directory_stage_pending_idx": { + "name": "people_directory_stage_pending_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "NOT \"people_directory_stage\".\"reports_complete\"", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "people_directory_stage_organization_id_people_directory_sync_organization_id_fk": { + "name": "people_directory_stage_organization_id_people_directory_sync_organization_id_fk", + "tableFrom": "people_directory_stage", + "tableTo": "people_directory_sync", + "columnsFrom": ["organization_id"], + "columnsTo": ["organization_id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "people_directory_stage_organization_id_run_id_external_id_pk": { + "name": "people_directory_stage_organization_id_run_id_external_id_pk", + "columns": ["organization_id", "run_id", "external_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.people_directory_sync": { + "name": "people_directory_sync", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_target": { + "name": "source_target", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_credential": { + "name": "encrypted_credential", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "configured_by": { + "name": "configured_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lease_token": { + "name": "lease_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lease_expires_at": { + "name": "lease_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "run_id": { + "name": "run_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "run_started_at": { + "name": "run_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "phase": { + "name": "phase", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cursor": { + "name": "cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "users_read": { + "name": "users_read", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "retry_count": { + "name": "retry_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "next_sync_at": { + "name": "next_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_attempt_at": { + "name": "last_attempt_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_success_at": { + "name": "last_success_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_failed_at": { + "name": "last_failed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "people_directory_sync_due_idx": { + "name": "people_directory_sync_due_idx", + "columns": [ + { + "expression": "next_sync_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "people_directory_sync_organization_id_organization_id_fk": { + "name": "people_directory_sync_organization_id_organization_id_fk", + "tableFrom": "people_directory_sync", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "people_directory_sync_configured_by_user_id_fk": { + "name": "people_directory_sync_configured_by_user_id_fk", + "tableFrom": "people_directory_sync", + "tableTo": "user", + "columnsFrom": ["configured_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.permission_access_request": { + "name": "permission_access_request", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "requester_id": { + "name": "requester_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "scope_key": { + "name": "scope_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_key": { + "name": "target_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target": { + "name": "target", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "target_label": { + "name": "target_label", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "membership_id": { + "name": "membership_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "group_name": { + "name": "group_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "decision_reason": { + "name": "decision_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "decided_by": { + "name": "decided_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "decision": { + "name": "decision", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "decided_at": { + "name": "decided_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "permission_access_request_pending_unique": { + "name": "permission_access_request_pending_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "requester_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"permission_access_request\".\"status\" = 'pending'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_access_request_org_queue_idx": { + "name": "permission_access_request_org_queue_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_access_request_requester_idx": { + "name": "permission_access_request_requester_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "requester_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permission_access_request_organization_id_organization_id_fk": { + "name": "permission_access_request_organization_id_organization_id_fk", + "tableFrom": "permission_access_request", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_access_request_requester_id_user_id_fk": { + "name": "permission_access_request_requester_id_user_id_fk", + "tableFrom": "permission_access_request", + "tableTo": "user", + "columnsFrom": ["requester_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_access_request_decided_by_user_id_fk": { + "name": "permission_access_request_decided_by_user_id_fk", + "tableFrom": "permission_access_request", + "tableTo": "user", + "columnsFrom": ["decided_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "permission_access_request_status_check": { + "name": "permission_access_request_status_check", + "value": "\"permission_access_request\".\"status\" in ('pending', 'fulfilled', 'declined', 'cancelled', 'closed')" + } + }, + "isRLSEnabled": false + }, + "public.permission_group": { + "name": "permission_group", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "is_default": { + "name": "is_default", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "membership_mode": { + "name": "membership_mode", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'inherit'" + } + }, + "indexes": { + "permission_group_created_by_idx": { + "name": "permission_group_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_group_organization_name_unique": { + "name": "permission_group_organization_name_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_group_organization_default_unique": { + "name": "permission_group_organization_default_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "is_default = true", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permission_group_organization_id_organization_id_fk": { + "name": "permission_group_organization_id_organization_id_fk", + "tableFrom": "permission_group", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_created_by_user_id_fk": { + "name": "permission_group_created_by_user_id_fk", + "tableFrom": "permission_group", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.permission_group_member": { + "name": "permission_group_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "permission_group_id": { + "name": "permission_group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "assigned_by": { + "name": "assigned_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "assigned_at": { + "name": "assigned_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "permission_group_member_group_user_unique": { + "name": "permission_group_member_group_user_unique", + "columns": [ + { + "expression": "permission_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_group_member_organization_user_idx": { + "name": "permission_group_member_organization_user_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permission_group_member_permission_group_id_permission_group_id_fk": { + "name": "permission_group_member_permission_group_id_permission_group_id_fk", + "tableFrom": "permission_group_member", + "tableTo": "permission_group", + "columnsFrom": ["permission_group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_member_organization_id_organization_id_fk": { + "name": "permission_group_member_organization_id_organization_id_fk", + "tableFrom": "permission_group_member", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_member_user_id_user_id_fk": { + "name": "permission_group_member_user_id_user_id_fk", + "tableFrom": "permission_group_member", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_member_assigned_by_user_id_fk": { + "name": "permission_group_member_assigned_by_user_id_fk", + "tableFrom": "permission_group_member", + "tableTo": "user", + "columnsFrom": ["assigned_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.permission_group_workspace": { + "name": "permission_group_workspace", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "permission_group_id": { + "name": "permission_group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "permission_group_workspace_workspace_id_idx": { + "name": "permission_group_workspace_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_group_workspace_group_workspace_unique": { + "name": "permission_group_workspace_group_workspace_unique", + "columns": [ + { + "expression": "permission_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permission_group_workspace_permission_group_id_permission_group_id_fk": { + "name": "permission_group_workspace_permission_group_id_permission_group_id_fk", + "tableFrom": "permission_group_workspace", + "tableTo": "permission_group", + "columnsFrom": ["permission_group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_workspace_workspace_id_workspace_id_fk": { + "name": "permission_group_workspace_workspace_id_workspace_id_fk", + "tableFrom": "permission_group_workspace", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_workspace_organization_id_organization_id_fk": { + "name": "permission_group_workspace_organization_id_organization_id_fk", + "tableFrom": "permission_group_workspace", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.permissions": { + "name": "permissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "permission_type": { + "name": "permission_type", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "permissions_entity_idx": { + "name": "permissions_entity_idx", + "columns": [ + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permissions_user_entity_permission_idx": { + "name": "permissions_user_entity_permission_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "permission_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permissions_unique_constraint": { + "name": "permissions_unique_constraint", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permissions_user_id_user_id_fk": { + "name": "permissions_user_id_user_id_fk", + "tableFrom": "permissions", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pinned_item": { + "name": "pinned_item", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_type": { + "name": "resource_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "pinned_at": { + "name": "pinned_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "pinned_item_user_workspace_idx": { + "name": "pinned_item_user_workspace_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pinned_item_resource_idx": { + "name": "pinned_item_resource_idx", + "columns": [ + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pinned_item_user_resource_unique": { + "name": "pinned_item_user_resource_unique", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pinned_item_user_id_user_id_fk": { + "name": "pinned_item_user_id_user_id_fk", + "tableFrom": "pinned_item", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pinned_item_workspace_id_workspace_id_fk": { + "name": "pinned_item_workspace_id_workspace_id_fk", + "tableFrom": "pinned_item", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.project": { + "name": "project", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_scope_key": { + "name": "organization_scope_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "CASE WHEN organization_id IS NULL THEN 'personal' ELSE 'organization:' || organization_id END", + "type": "stored" + } + }, + "owner_id": { + "name": "owner_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "project_organization_archive_id_idx": { + "name": "project_organization_archive_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "project_owner_archive_id_idx": { + "name": "project_owner_archive_id_idx", + "columns": [ + { + "expression": "owner_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "project_organization_id_organization_id_fk": { + "name": "project_organization_id_organization_id_fk", + "tableFrom": "project", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "project_owner_id_user_id_fk": { + "name": "project_owner_id_user_id_fk", + "tableFrom": "project", + "tableTo": "user", + "columnsFrom": ["owner_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "project_id_organization_scope_unique": { + "name": "project_id_organization_scope_unique", + "nullsNotDistinct": false, + "columns": ["id", "organization_scope_key"] + } + }, + "policies": {}, + "checkConstraints": { + "project_name_length": { + "name": "project_name_length", + "value": "char_length(btrim(\"project\".\"name\")) BETWEEN 1 AND 100" + } + }, + "isRLSEnabled": false + }, + "public.public_share": { + "name": "public_share", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "resource_type": { + "name": "resource_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'public'" + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "allowed_emails": { + "name": "allowed_emails", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'[]'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "public_share_entity_id_idx": { + "name": "public_share_entity_id_idx", + "columns": [ + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "public_share_token_unique": { + "name": "public_share_token_unique", + "columns": [ + { + "expression": "token", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "public_share_resource_unique": { + "name": "public_share_resource_unique", + "columns": [ + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "public_share_resource_id_idx": { + "name": "public_share_resource_id_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "public_share_workspace_id_idx": { + "name": "public_share_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "public_share_workspace_id_workspace_id_fk": { + "name": "public_share_workspace_id_workspace_id_fk", + "tableFrom": "public_share", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "public_share_created_by_user_id_fk": { + "name": "public_share_created_by_user_id_fk", + "tableFrom": "public_share", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "public_share_entity_binding_check": { + "name": "public_share_entity_binding_check", + "value": "\n (\"public_share\".\"entity_type\" IS NULL AND \"public_share\".\"entity_id\" IS NULL AND \"public_share\".\"workspace_id\" IS NOT NULL)\n OR (\"public_share\".\"entity_type\" IS NOT NULL AND \"public_share\".\"entity_id\" IS NOT NULL AND char_length(\"public_share\".\"entity_id\") > 0\n AND ((\"public_share\".\"entity_type\" = 'workspace' AND \"public_share\".\"workspace_id\" IS NOT NULL AND \"public_share\".\"entity_id\" = \"public_share\".\"workspace_id\")\n OR (\"public_share\".\"entity_type\" = 'project' AND \"public_share\".\"workspace_id\" IS NULL AND \"public_share\".\"resource_type\" = 'file')))\n " + } + }, + "isRLSEnabled": false + }, + "public.rate_limit_bucket": { + "name": "rate_limit_bucket", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "tokens": { + "name": "tokens", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "last_refill_at": { + "name": "last_refill_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "blocked_until": { + "name": "blocked_until", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "capacity_state": { + "name": "capacity_state", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resource_policy": { + "name": "resource_policy", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "resource_type": { + "name": "resource_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "document": { + "name": "document", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resource_policy_organization_id_idx": { + "name": "resource_policy_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_policy_resource_unique": { + "name": "resource_policy_resource_unique", + "columns": [ + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_policy_workspace_id_idx": { + "name": "resource_policy_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resource_policy_workspace_id_workspace_id_fk": { + "name": "resource_policy_workspace_id_workspace_id_fk", + "tableFrom": "resource_policy", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "resource_policy_organization_id_organization_id_fk": { + "name": "resource_policy_organization_id_organization_id_fk", + "tableFrom": "resource_policy", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "resource_policy_created_by_user_id_fk": { + "name": "resource_policy_created_by_user_id_fk", + "tableFrom": "resource_policy", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "resource_policy_updated_by_user_id_fk": { + "name": "resource_policy_updated_by_user_id_fk", + "tableFrom": "resource_policy", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "resource_policy_owner_check": { + "name": "resource_policy_owner_check", + "value": "num_nonnulls(\"resource_policy\".\"workspace_id\", \"resource_policy\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.resume_queue": { + "name": "resume_queue", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "paused_execution_id": { + "name": "paused_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "parent_execution_id": { + "name": "parent_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "new_execution_id": { + "name": "new_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "context_id": { + "name": "context_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resume_input": { + "name": "resume_input", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "queued_at": { + "name": "queued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "claimed_at": { + "name": "claimed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "resume_queue_parent_status_idx": { + "name": "resume_queue_parent_status_idx", + "columns": [ + { + "expression": "parent_execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "queued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resume_queue_new_execution_idx": { + "name": "resume_queue_new_execution_idx", + "columns": [ + { + "expression": "new_execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resume_queue_paused_execution_id_paused_executions_id_fk": { + "name": "resume_queue_paused_execution_id_paused_executions_id_fk", + "tableFrom": "resume_queue", + "tableTo": "paused_executions", + "columnsFrom": ["paused_execution_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sandbox_image": { + "name": "sandbox_image", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "provider": { + "name": "provider", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "spec_hash": { + "name": "spec_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "spec": { + "name": "spec", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "sandbox_image_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "image_ref": { + "name": "image_ref", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_image_id": { + "name": "provider_image_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "build_id": { + "name": "build_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "materialization_generation": { + "name": "materialization_generation", + "type": "bigint", + "primaryKey": false, + "notNull": false + }, + "error_code": { + "name": "error_code", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_detail": { + "name": "error_detail", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_used_at": { + "name": "last_used_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sandbox_image_provider_spec_unique": { + "name": "sandbox_image_provider_spec_unique", + "columns": [ + { + "expression": "provider", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "spec_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sandbox_image_status_idx": { + "name": "sandbox_image_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sandbox_image_last_used_idx": { + "name": "sandbox_image_last_used_idx", + "columns": [ + { + "expression": "last_used_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_connection": { + "name": "scim_connection", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "settings": { + "name": "settings", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "last_request_at": { + "name": "last_request_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "reconcile_lock_token": { + "name": "reconcile_lock_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reconcile_lease_at": { + "name": "reconcile_lease_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "reconciled_at": { + "name": "reconciled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_connection_organization_unique": { + "name": "scim_connection_organization_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_connection_reconcile_due_idx": { + "name": "scim_connection_reconcile_due_idx", + "columns": [ + { + "expression": "reconciled_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_connection_organization_id_organization_id_fk": { + "name": "scim_connection_organization_id_organization_id_fk", + "tableFrom": "scim_connection", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_connection_created_by_user_id_fk": { + "name": "scim_connection_created_by_user_id_fk", + "tableFrom": "scim_connection", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_credential": { + "name": "scim_credential", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "token_hash": { + "name": "token_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "token_prefix": { + "name": "token_prefix", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scopes": { + "name": "scopes", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "revoked_at": { + "name": "revoked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "revoked_by": { + "name": "revoked_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_used_at": { + "name": "last_used_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_credential_token_hash_unique": { + "name": "scim_credential_token_hash_unique", + "columns": [ + { + "expression": "token_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_credential_connection_idx": { + "name": "scim_credential_connection_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_credential_connection_id_scim_connection_id_fk": { + "name": "scim_credential_connection_id_scim_connection_id_fk", + "tableFrom": "scim_credential", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_credential_revoked_by_user_id_fk": { + "name": "scim_credential_revoked_by_user_id_fk", + "tableFrom": "scim_credential", + "tableTo": "user", + "columnsFrom": ["revoked_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "scim_credential_created_by_user_id_fk": { + "name": "scim_credential_created_by_user_id_fk", + "tableFrom": "scim_credential", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_group": { + "name": "scim_group", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name_key": { + "name": "display_name_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "order_key": { + "name": "order_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_group_connection_display_name_unique": { + "name": "scim_group_connection_display_name_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "display_name_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_connection_external_id_unique": { + "name": "scim_group_connection_external_id_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "external_id is not null", + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_connection_order_idx": { + "name": "scim_group_connection_order_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_group_connection_id_scim_connection_id_fk": { + "name": "scim_group_connection_id_scim_connection_id_fk", + "tableFrom": "scim_group", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_group_mapping": { + "name": "scim_group_mapping", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_kind": { + "name": "target_kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "permission_group_id": { + "name": "permission_group_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "permission_type": { + "name": "permission_type", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'manual'" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_group_mapping_permission_group_idx": { + "name": "scim_group_mapping_permission_group_idx", + "columns": [ + { + "expression": "permission_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_mapping_workspace_idx": { + "name": "scim_group_mapping_workspace_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_mapping_group_target_unique": { + "name": "scim_group_mapping_group_target_unique", + "columns": [ + { + "expression": "group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_kind", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"permission_group_id\", \"workspace_id\", \"role\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_group_mapping_group_id_scim_group_id_fk": { + "name": "scim_group_mapping_group_id_scim_group_id_fk", + "tableFrom": "scim_group_mapping", + "tableTo": "scim_group", + "columnsFrom": ["group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_group_mapping_permission_group_id_permission_group_id_fk": { + "name": "scim_group_mapping_permission_group_id_permission_group_id_fk", + "tableFrom": "scim_group_mapping", + "tableTo": "permission_group", + "columnsFrom": ["permission_group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_group_mapping_workspace_id_workspace_id_fk": { + "name": "scim_group_mapping_workspace_id_workspace_id_fk", + "tableFrom": "scim_group_mapping", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_group_mapping_created_by_user_id_fk": { + "name": "scim_group_mapping_created_by_user_id_fk", + "tableFrom": "scim_group_mapping", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "scim_group_mapping_target_shape": { + "name": "scim_group_mapping_target_shape", + "value": "(\n (\"scim_group_mapping\".\"target_kind\" = 'permission_group' AND \"scim_group_mapping\".\"permission_group_id\" IS NOT NULL AND \"scim_group_mapping\".\"workspace_id\" IS NULL AND \"scim_group_mapping\".\"permission_type\" IS NULL AND \"scim_group_mapping\".\"role\" IS NULL)\n OR (\"scim_group_mapping\".\"target_kind\" = 'workspace' AND \"scim_group_mapping\".\"workspace_id\" IS NOT NULL AND \"scim_group_mapping\".\"permission_type\" IS NOT NULL AND \"scim_group_mapping\".\"permission_group_id\" IS NULL AND \"scim_group_mapping\".\"role\" IS NULL)\n OR (\"scim_group_mapping\".\"target_kind\" = 'org_role' AND \"scim_group_mapping\".\"role\" IS NOT NULL AND \"scim_group_mapping\".\"permission_group_id\" IS NULL AND \"scim_group_mapping\".\"workspace_id\" IS NULL AND \"scim_group_mapping\".\"permission_type\" IS NULL)\n )" + } + }, + "isRLSEnabled": false + }, + "public.scim_group_member": { + "name": "scim_group_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scim_user_id": { + "name": "scim_user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_group_member_group_user_unique": { + "name": "scim_group_member_group_user_unique", + "columns": [ + { + "expression": "group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scim_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_member_scim_user_idx": { + "name": "scim_group_member_scim_user_idx", + "columns": [ + { + "expression": "scim_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_group_member_group_id_scim_group_id_fk": { + "name": "scim_group_member_group_id_scim_group_id_fk", + "tableFrom": "scim_group_member", + "tableTo": "scim_group", + "columnsFrom": ["group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_group_member_scim_user_id_scim_user_id_fk": { + "name": "scim_group_member_scim_user_id_scim_user_id_fk", + "tableFrom": "scim_group_member", + "tableTo": "scim_user", + "columnsFrom": ["scim_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_projection_grant": { + "name": "scim_projection_grant", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scim_user_id": { + "name": "scim_user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_kind": { + "name": "target_kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_id": { + "name": "target_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "permission_type": { + "name": "permission_type", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "baseline_permission": { + "name": "baseline_permission", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "origin": { + "name": "origin", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'directory'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_projection_grant_user_target_unique": { + "name": "scim_projection_grant_user_target_unique", + "columns": [ + { + "expression": "scim_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_kind", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_projection_grant_connection_idx": { + "name": "scim_projection_grant_connection_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_projection_grant_connection_id_scim_connection_id_fk": { + "name": "scim_projection_grant_connection_id_scim_connection_id_fk", + "tableFrom": "scim_projection_grant", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_projection_grant_scim_user_id_scim_user_id_fk": { + "name": "scim_projection_grant_scim_user_id_scim_user_id_fk", + "tableFrom": "scim_projection_grant", + "tableTo": "scim_user", + "columnsFrom": ["scim_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_request_log": { + "name": "scim_request_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "method": { + "name": "method", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "scim_type": { + "name": "scim_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "detail": { + "name": "detail", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "duration_ms": { + "name": "duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_request_log_connection_created_idx": { + "name": "scim_request_log_connection_created_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_request_log_connection_id_scim_connection_id_fk": { + "name": "scim_request_log_connection_id_scim_connection_id_fk", + "tableFrom": "scim_request_log", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_user": { + "name": "scim_user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_name": { + "name": "user_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "attributes": { + "name": "attributes", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "order_key": { + "name": "order_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_user_connection_user_unique": { + "name": "scim_user_connection_user_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_connection_user_name_unique": { + "name": "scim_user_connection_user_name_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_connection_external_id_unique": { + "name": "scim_user_connection_external_id_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "external_id is not null", + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_connection_order_idx": { + "name": "scim_user_connection_order_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_user_idx": { + "name": "scim_user_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_user_connection_id_scim_connection_id_fk": { + "name": "scim_user_connection_id_scim_connection_id_fk", + "tableFrom": "scim_user", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_user_user_id_user_id_fk": { + "name": "scim_user_user_id_user_id_fk", + "tableFrom": "scim_user", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_user_tombstone": { + "name": "scim_user_tombstone", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_user_tombstone_connection_external_id_unique": { + "name": "scim_user_tombstone_connection_external_id_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_tombstone_user_idx": { + "name": "scim_user_tombstone_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_user_tombstone_connection_id_scim_connection_id_fk": { + "name": "scim_user_tombstone_connection_id_scim_connection_id_fk", + "tableFrom": "scim_user_tombstone", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_user_tombstone_user_id_user_id_fk": { + "name": "scim_user_tombstone_user_id_user_id_fk", + "tableFrom": "scim_user_tombstone", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.secret_usage": { + "name": "secret_usage", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret_name": { + "name": "secret_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret_scope": { + "name": "secret_scope", + "type": "secret_usage_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "secret_owner_user_id": { + "name": "secret_owner_user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "source": { + "name": "source", + "type": "secret_usage_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "actor_user_id": { + "name": "actor_user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "usage_date": { + "name": "usage_date", + "type": "date", + "primaryKey": false, + "notNull": true + }, + "use_count": { + "name": "use_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_used_at": { + "name": "last_used_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "last_execution_id": { + "name": "last_execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_trigger": { + "name": "last_trigger", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "secret_usage_bucket_unique": { + "name": "secret_usage_bucket_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_name", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_scope", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "actor_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "usage_date", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "secret_usage_secret_recent_idx": { + "name": "secret_usage_secret_recent_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_name", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_scope", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_used_at", + "isExpression": false, + "asc": false, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "secret_usage_workspace_id_workspace_id_fk": { + "name": "secret_usage_workspace_id_workspace_id_fk", + "tableFrom": "secret_usage", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.session": { + "name": "session", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "ip_address": { + "name": "ip_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active_organization_id": { + "name": "active_organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "impersonated_by": { + "name": "impersonated_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "session_user_id_idx": { + "name": "session_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "session_user_id_user_id_fk": { + "name": "session_user_id_user_id_fk", + "tableFrom": "session", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_active_organization_id_organization_id_fk": { + "name": "session_active_organization_id_organization_id_fk", + "tableFrom": "session", + "tableTo": "organization", + "columnsFrom": ["active_organization_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "session_token_unique": { + "name": "session_token_unique", + "nullsNotDistinct": false, + "columns": ["token"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.settings": { + "name": "settings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "theme": { + "name": "theme", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'system'" + }, + "auto_connect": { + "name": "auto_connect", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "telemetry_enabled": { + "name": "telemetry_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "email_preferences": { + "name": "email_preferences", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "billing_usage_notifications_enabled": { + "name": "billing_usage_notifications_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "super_user_mode_enabled": { + "name": "super_user_mode_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "mothership_environment": { + "name": "mothership_environment", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'default'" + }, + "error_notifications_enabled": { + "name": "error_notifications_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "snap_to_grid_size": { + "name": "snap_to_grid_size", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "show_action_bar": { + "name": "show_action_bar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "auto_focus_on_click": { + "name": "auto_focus_on_click", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "timezone": { + "name": "timezone", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "copilot_auto_allowed_tools": { + "name": "copilot_auto_allowed_tools", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "last_active_workspace_id": { + "name": "last_active_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "settings_user_id_user_id_fk": { + "name": "settings_user_id_user_id_fk", + "tableFrom": "settings", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "settings_user_id_unique": { + "name": "settings_user_id_unique", + "nullsNotDistinct": false, + "columns": ["user_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sim_link": { + "name": "sim_link", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "normalized_name": { + "name": "normalized_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "default_url": { + "name": "default_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "unlisted": { + "name": "unlisted", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "restrict_edit": { + "name": "restrict_edit", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "visit_count": { + "name": "visit_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_visited_at": { + "name": "last_visited_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sim_link_organization_name_unique": { + "name": "sim_link_organization_name_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "normalized_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sim_link_created_by_idx": { + "name": "sim_link_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sim_link_organization_id_organization_id_fk": { + "name": "sim_link_organization_id_organization_id_fk", + "tableFrom": "sim_link", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sim_link_created_by_user_id_fk": { + "name": "sim_link_created_by_user_id_fk", + "tableFrom": "sim_link", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sim_trigger_state": { + "name": "sim_trigger_state", + "schema": "", + "columns": { + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "block_id": { + "name": "block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scope_key": { + "name": "scope_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "last_fired_at": { + "name": "last_fired_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "sim_trigger_state_workflow_id_workflow_id_fk": { + "name": "sim_trigger_state_workflow_id_workflow_id_fk", + "tableFrom": "sim_trigger_state", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "sim_trigger_state_workflow_id_block_id_scope_key_pk": { + "name": "sim_trigger_state_workflow_id_block_id_scope_key_pk", + "columns": ["workflow_id", "block_id", "scope_key"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.skill": { + "name": "skill", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "skill_workspace_name_unique": { + "name": "skill_workspace_name_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "skill_workspace_id_workspace_id_fk": { + "name": "skill_workspace_id_workspace_id_fk", + "tableFrom": "skill", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "skill_user_id_user_id_fk": { + "name": "skill_user_id_user_id_fk", + "tableFrom": "skill", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.skill_member": { + "name": "skill_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "skill_id": { + "name": "skill_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "invited_by": { + "name": "invited_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "skill_member_user_id_idx": { + "name": "skill_member_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "skill_member_unique": { + "name": "skill_member_unique", + "columns": [ + { + "expression": "skill_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "skill_member_skill_id_skill_id_fk": { + "name": "skill_member_skill_id_skill_id_fk", + "tableFrom": "skill_member", + "tableTo": "skill", + "columnsFrom": ["skill_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "skill_member_user_id_user_id_fk": { + "name": "skill_member_user_id_user_id_fk", + "tableFrom": "skill_member", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "skill_member_invited_by_user_id_fk": { + "name": "skill_member_invited_by_user_id_fk", + "tableFrom": "skill_member", + "tableTo": "user", + "columnsFrom": ["invited_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.slack_app": { + "name": "slack_app", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_client_secret": { + "name": "encrypted_client_secret", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_signing_secret": { + "name": "encrypted_signing_secret", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "revision": { + "name": "revision", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "slack_app_organization_id_organization_id_fk": { + "name": "slack_app_organization_id_organization_id_fk", + "tableFrom": "slack_app", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "slack_app_owner_check": { + "name": "slack_app_owner_check", + "value": "(\"slack_app\".\"kind\" = 'custom' AND \"slack_app\".\"organization_id\" IS NOT NULL) OR (\"slack_app\".\"kind\" = 'shared' AND \"slack_app\".\"organization_id\" IS NULL)" + }, + "slack_app_custom_credentials_check": { + "name": "slack_app_custom_credentials_check", + "value": "\"slack_app\".\"kind\" = 'shared' OR (\"slack_app\".\"client_id\" IS NOT NULL AND \"slack_app\".\"encrypted_client_secret\" IS NOT NULL AND \"slack_app\".\"encrypted_signing_secret\" IS NOT NULL)" + } + }, + "isRLSEnabled": false + }, + "public.slack_search_installation": { + "name": "slack_search_installation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "app_id": { + "name": "app_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "slack_app_id": { + "name": "slack_app_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "team_id": { + "name": "team_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "team_name": { + "name": "team_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "bot_user_id": { + "name": "bot_user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "enterprise_id": { + "name": "enterprise_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "credential_version": { + "name": "credential_version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "last_outcome": { + "name": "last_outcome", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_event_at": { + "name": "last_event_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "slack_search_installation_organization_idx": { + "name": "slack_search_installation_organization_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_installation_credential_unique": { + "name": "slack_search_installation_credential_unique", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_installation_app_team_unique": { + "name": "slack_search_installation_app_team_unique", + "columns": [ + { + "expression": "app_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "team_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_installation_active_team_unique": { + "name": "slack_search_installation_active_team_unique", + "columns": [ + { + "expression": "team_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"slack_search_installation\".\"enabled\" = true", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "slack_search_installation_organization_id_organization_id_fk": { + "name": "slack_search_installation_organization_id_organization_id_fk", + "tableFrom": "slack_search_installation", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "slack_search_installation_credential_id_credential_id_fk": { + "name": "slack_search_installation_credential_id_credential_id_fk", + "tableFrom": "slack_search_installation", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "slack_search_installation_slack_app_id_slack_app_id_fk": { + "name": "slack_search_installation_slack_app_id_slack_app_id_fk", + "tableFrom": "slack_search_installation", + "tableTo": "slack_app", + "columnsFrom": ["slack_app_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.slack_search_turn": { + "name": "slack_search_turn", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "ordinal": { + "name": "ordinal", + "type": "integer", + "primaryKey": false, + "notNull": true, + "identity": { + "type": "always", + "name": "slack_search_turn_ordinal_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "installation_id": { + "name": "installation_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "conversation_key": { + "name": "conversation_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "event_id": { + "name": "event_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "lease_id": { + "name": "lease_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lease_expires_at": { + "name": "lease_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "outcome": { + "name": "outcome", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "slack_search_turn_event_unique": { + "name": "slack_search_turn_event_unique", + "columns": [ + { + "expression": "installation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "event_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_turn_pending_idx": { + "name": "slack_search_turn_pending_idx", + "columns": [ + { + "expression": "installation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_turn_thread_idx": { + "name": "slack_search_turn_thread_idx", + "columns": [ + { + "expression": "conversation_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_turn_active_thread_unique": { + "name": "slack_search_turn_active_thread_unique", + "columns": [ + { + "expression": "conversation_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"slack_search_turn\".\"status\" = 'running'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "slack_search_turn_installation_id_slack_search_installation_id_fk": { + "name": "slack_search_turn_installation_id_slack_search_installation_id_fk", + "tableFrom": "slack_search_turn", + "tableTo": "slack_search_installation", + "columnsFrom": ["installation_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sso_domain": { + "name": "sso_domain", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "verification_token": { + "name": "verification_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "verified_at": { + "name": "verified_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "primary_provider_id": { + "name": "primary_provider_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sso_domain_domain_idx": { + "name": "sso_domain_domain_idx", + "columns": [ + { + "expression": "domain", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_domain_org_domain_unique": { + "name": "sso_domain_org_domain_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "domain", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_domain_verified_unique": { + "name": "sso_domain_verified_unique", + "columns": [ + { + "expression": "domain", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "status = 'verified'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sso_domain_organization_id_organization_id_fk": { + "name": "sso_domain_organization_id_organization_id_fk", + "tableFrom": "sso_domain", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sso_domain_created_by_user_id_fk": { + "name": "sso_domain_created_by_user_id_fk", + "tableFrom": "sso_domain", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sso_provider": { + "name": "sso_provider", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "issuer": { + "name": "issuer", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "oidc_config": { + "name": "oidc_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "saml_config": { + "name": "saml_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "domain_verified": { + "name": "domain_verified", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "jit_provisioning_enabled": { + "name": "jit_provisioning_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + } + }, + "indexes": { + "sso_provider_provider_id_unique": { + "name": "sso_provider_provider_id_unique", + "columns": [ + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_provider_domain_idx": { + "name": "sso_provider_domain_idx", + "columns": [ + { + "expression": "domain", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_provider_user_id_idx": { + "name": "sso_provider_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_provider_organization_id_idx": { + "name": "sso_provider_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sso_provider_user_id_user_id_fk": { + "name": "sso_provider_user_id_user_id_fk", + "tableFrom": "sso_provider", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sso_provider_organization_id_organization_id_fk": { + "name": "sso_provider_organization_id_organization_id_fk", + "tableFrom": "sso_provider", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subscription": { + "name": "subscription", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "plan": { + "name": "plan", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stripe_customer_id": { + "name": "stripe_customer_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stripe_subscription_id": { + "name": "stripe_subscription_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "period_start": { + "name": "period_start", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "period_end": { + "name": "period_end", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "cancel_at_period_end": { + "name": "cancel_at_period_end", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "cancel_at": { + "name": "cancel_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "canceled_at": { + "name": "canceled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "ended_at": { + "name": "ended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "seats": { + "name": "seats", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "trial_start": { + "name": "trial_start", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "trial_end": { + "name": "trial_end", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "billing_interval": { + "name": "billing_interval", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stripe_schedule_id": { + "name": "stripe_schedule_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "last_closed_period_start": { + "name": "last_closed_period_start", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "subscription_reference_status_idx": { + "name": "subscription_reference_status_idx", + "columns": [ + { + "expression": "reference_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "subscription_cycle_close_lagging_idx": { + "name": "subscription_cycle_close_lagging_idx", + "columns": [ + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"subscription\".\"status\" in ('active', 'past_due') and \"subscription\".\"period_start\" is not null and (\"subscription\".\"last_closed_period_start\" is null or \"subscription\".\"last_closed_period_start\" < \"subscription\".\"period_start\")", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "check_enterprise_metadata": { + "name": "check_enterprise_metadata", + "value": "plan != 'enterprise' OR metadata IS NOT NULL" + } + }, + "isRLSEnabled": false + }, + "public.table_jobs": { + "name": "table_jobs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "rows_processed": { + "name": "rows_processed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "table_jobs_one_active_per_table": { + "name": "table_jobs_one_active_per_table", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"table_jobs\".\"status\" = 'running' AND \"table_jobs\".\"type\" <> 'export'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_jobs_watchdog_idx": { + "name": "table_jobs_watchdog_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_jobs_table_started_idx": { + "name": "table_jobs_table_started_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "table_jobs_table_id_user_table_definitions_id_fk": { + "name": "table_jobs_table_id_user_table_definitions_id_fk", + "tableFrom": "table_jobs", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_jobs_workspace_id_workspace_id_fk": { + "name": "table_jobs_workspace_id_workspace_id_fk", + "tableFrom": "table_jobs", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.table_row_executions": { + "name": "table_row_executions", + "schema": "", + "columns": { + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "row_id": { + "name": "row_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "job_id": { + "name": "job_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "running_block_ids": { + "name": "running_block_ids", + "type": "text[]", + "primaryKey": false, + "notNull": true, + "default": "'{}'::text[]" + }, + "block_errors": { + "name": "block_errors", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "cancelled_at": { + "name": "cancelled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "capability_governed_user_id": { + "name": "capability_governed_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "enrichment_details": { + "name": "enrichment_details", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "table_row_executions_table_status_idx": { + "name": "table_row_executions_table_status_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"table_row_executions\".\"status\" IN ('queued', 'running', 'pending')", + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_row_executions_execution_id_idx": { + "name": "table_row_executions_execution_id_idx", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"table_row_executions\".\"execution_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_row_executions_table_group_idx": { + "name": "table_row_executions_table_group_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "table_row_executions_table_id_user_table_definitions_id_fk": { + "name": "table_row_executions_table_id_user_table_definitions_id_fk", + "tableFrom": "table_row_executions", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_row_executions_row_id_user_table_rows_id_fk": { + "name": "table_row_executions_row_id_user_table_rows_id_fk", + "tableFrom": "table_row_executions", + "tableTo": "user_table_rows", + "columnsFrom": ["row_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_row_executions_capability_governed_user_id_user_id_fk": { + "name": "table_row_executions_capability_governed_user_id_user_id_fk", + "tableFrom": "table_row_executions", + "tableTo": "user", + "columnsFrom": ["capability_governed_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "table_row_executions_row_id_group_id_pk": { + "name": "table_row_executions_row_id_group_id_pk", + "columns": ["row_id", "group_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.table_run_dispatches": { + "name": "table_run_dispatches", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "request_id": { + "name": "request_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "mode": { + "name": "mode", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scope": { + "name": "scope", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "cursor": { + "name": "cursor", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "limit": { + "name": "limit", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "processed_count": { + "name": "processed_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "is_manual_run": { + "name": "is_manual_run", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "triggered_by_user_id": { + "name": "triggered_by_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "capability_governed_user_id": { + "name": "capability_governed_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "requested_at": { + "name": "requested_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "heartbeat_at": { + "name": "heartbeat_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "cancelled_at": { + "name": "cancelled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "table_run_dispatches_active_idx": { + "name": "table_run_dispatches_active_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_run_dispatches_watchdog_idx": { + "name": "table_run_dispatches_watchdog_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "requested_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_run_dispatches_governed_active_idx": { + "name": "table_run_dispatches_governed_active_idx", + "columns": [ + { + "expression": "capability_governed_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"table_run_dispatches\".\"status\" IN ('pending', 'dispatching')", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "table_run_dispatches_table_id_user_table_definitions_id_fk": { + "name": "table_run_dispatches_table_id_user_table_definitions_id_fk", + "tableFrom": "table_run_dispatches", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_run_dispatches_workspace_id_workspace_id_fk": { + "name": "table_run_dispatches_workspace_id_workspace_id_fk", + "tableFrom": "table_run_dispatches", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_run_dispatches_triggered_by_user_id_user_id_fk": { + "name": "table_run_dispatches_triggered_by_user_id_user_id_fk", + "tableFrom": "table_run_dispatches", + "tableTo": "user", + "columnsFrom": ["triggered_by_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "table_run_dispatches_capability_governed_user_id_user_id_fk": { + "name": "table_run_dispatches_capability_governed_user_id_user_id_fk", + "tableFrom": "table_run_dispatches", + "tableTo": "user", + "columnsFrom": ["capability_governed_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.table_views": { + "name": "table_views", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "is_default": { + "name": "is_default", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "table_views_table_created_idx": { + "name": "table_views_table_created_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_views_workspace_created_idx": { + "name": "table_views_workspace_created_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_views_table_default_unique": { + "name": "table_views_table_default_unique", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "is_default = true", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "table_views_table_id_user_table_definitions_id_fk": { + "name": "table_views_table_id_user_table_definitions_id_fk", + "tableFrom": "table_views", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_views_workspace_id_workspace_id_fk": { + "name": "table_views_workspace_id_workspace_id_fk", + "tableFrom": "table_views", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_views_created_by_user_id_fk": { + "name": "table_views_created_by_user_id_fk", + "tableFrom": "table_views", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.upload_session": { + "name": "upload_session", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "token_hash": { + "name": "token_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "purpose": { + "name": "purpose", + "type": "upload_session_purpose", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "method": { + "name": "method", + "type": "upload_session_method", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "storage_context": { + "name": "storage_context", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "final_key": { + "name": "final_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "storage_provider": { + "name": "storage_provider", + "type": "upload_session_provider", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "provider_upload_id": { + "name": "provider_upload_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_object_version": { + "name": "provider_object_version", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "file_name": { + "name": "file_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "file_size": { + "name": "file_size", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "part_size": { + "name": "part_size", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "part_count": { + "name": "part_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "upload_session_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'uploading'" + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "processing_lease_id": { + "name": "processing_lease_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "processing_lease_expires_at": { + "name": "processing_lease_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_file_id": { + "name": "completed_file_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "upload_session_token_hash_unique": { + "name": "upload_session_token_hash_unique", + "columns": [ + { + "expression": "token_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "upload_session_final_key_unique": { + "name": "upload_session_final_key_unique", + "columns": [ + { + "expression": "final_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "upload_session_status_expires_at_idx": { + "name": "upload_session_status_expires_at_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.usage_log": { + "name": "usage_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "usage_log_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "usage_log_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "cost": { + "name": "cost", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "event_key": { + "name": "event_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "billing_entity_type": { + "name": "billing_entity_type", + "type": "billing_entity_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "billing_entity_id": { + "name": "billing_entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "billing_period_start": { + "name": "billing_period_start", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "billing_period_end": { + "name": "billing_period_end", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "usage_log_user_created_at_idx": { + "name": "usage_log_user_created_at_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_source_idx": { + "name": "usage_log_source_idx", + "columns": [ + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_workflow_id_idx": { + "name": "usage_log_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_event_key_unique": { + "name": "usage_log_event_key_unique", + "columns": [ + { + "expression": "event_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"usage_log\".\"event_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_billing_entity_period_cost_idx": { + "name": "usage_log_billing_entity_period_cost_idx", + "columns": [ + { + "expression": "billing_entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_period_start", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_period_end", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "cost", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"usage_log\".\"billing_entity_type\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_billing_entity_created_at_cost_idx": { + "name": "usage_log_billing_entity_created_at_cost_idx", + "columns": [ + { + "expression": "billing_entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "cost", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"usage_log\".\"billing_entity_type\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_workspace_created_at_cost_idx": { + "name": "usage_log_workspace_created_at_cost_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "cost", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_execution_id_idx": { + "name": "usage_log_execution_id_idx", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "usage_log_user_id_user_id_fk": { + "name": "usage_log_user_id_user_id_fk", + "tableFrom": "usage_log", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "usage_log_workspace_id_workspace_id_fk": { + "name": "usage_log_workspace_id_workspace_id_fk", + "tableFrom": "usage_log", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "usage_log_workflow_id_workflow_id_fk": { + "name": "usage_log_workflow_id_workflow_id_fk", + "tableFrom": "usage_log", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "usage_log_billing_scope_all_or_none": { + "name": "usage_log_billing_scope_all_or_none", + "value": "(\n (\"usage_log\".\"billing_entity_type\" IS NULL AND \"usage_log\".\"billing_entity_id\" IS NULL AND \"usage_log\".\"billing_period_start\" IS NULL AND \"usage_log\".\"billing_period_end\" IS NULL)\n OR\n (\"usage_log\".\"billing_entity_type\" IS NOT NULL AND \"usage_log\".\"billing_entity_id\" IS NOT NULL AND \"usage_log\".\"billing_period_start\" IS NOT NULL AND \"usage_log\".\"billing_period_end\" IS NOT NULL AND \"usage_log\".\"billing_period_start\" < \"usage_log\".\"billing_period_end\")\n )" + } + }, + "isRLSEnabled": false + }, + "public.user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "normalized_email": { + "name": "normalized_email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email_verified": { + "name": "email_verified", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "image": { + "name": "image", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "stripe_customer_id": { + "name": "stripe_customer_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'user'" + }, + "banned": { + "name": "banned", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ban_reason": { + "name": "ban_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ban_expires": { + "name": "ban_expires", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "suspended_at": { + "name": "suspended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "suspension_source": { + "name": "suspension_source", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "user_email_lower_idx": { + "name": "user_email_lower_idx", + "columns": [ + { + "expression": "lower(btrim(\"email\"))", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_gmail_mailbox_idx": { + "name": "user_gmail_mailbox_idx", + "columns": [ + { + "expression": "(CASE WHEN split_part(lower(btrim(\"email\")), '@', 2) IN ('gmail.com', 'googlemail.com') THEN replace(split_part(split_part(lower(btrim(\"email\")), '@', 1), '+', 1), '.', '') || '@gmail.com' END)", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "(CASE WHEN split_part(lower(btrim(\"user\".\"email\")), '@', 2) IN ('gmail.com', 'googlemail.com') THEN replace(split_part(split_part(lower(btrim(\"user\".\"email\")), '@', 1), '+', 1), '.', '') || '@gmail.com' END) IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_email_unique": { + "name": "user_email_unique", + "nullsNotDistinct": false, + "columns": ["email"] + }, + "user_normalized_email_unique": { + "name": "user_normalized_email_unique", + "nullsNotDistinct": false, + "columns": ["normalized_email"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_stats": { + "name": "user_stats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "current_usage_limit": { + "name": "current_usage_limit", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'5'" + }, + "usage_limit_updated_at": { + "name": "usage_limit_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "last_period_cost": { + "name": "last_period_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'0'" + }, + "billed_overage_this_period": { + "name": "billed_overage_this_period", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "credit_balance": { + "name": "credit_balance", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "last_period_copilot_cost": { + "name": "last_period_copilot_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'0'" + }, + "storage_used_bytes": { + "name": "storage_used_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "free_tier_eligible": { + "name": "free_tier_eligible", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "billing_blocked": { + "name": "billing_blocked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "billing_blocked_reason": { + "name": "billing_blocked_reason", + "type": "billing_blocked_reason", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "limit_notifications": { + "name": "limit_notifications", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + } + }, + "indexes": {}, + "foreignKeys": { + "user_stats_user_id_user_id_fk": { + "name": "user_stats_user_id_user_id_fk", + "tableFrom": "user_stats", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_stats_user_id_unique": { + "name": "user_stats_user_id_unique", + "nullsNotDistinct": false, + "columns": ["user_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_table_definitions": { + "name": "user_table_definitions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "folder_id": { + "name": "folder_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema": { + "name": "schema", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "max_rows": { + "name": "max_rows", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 10000 + }, + "row_count": { + "name": "row_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "rows_version": { + "name": "rows_version", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "schema_locked": { + "name": "schema_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "insert_locked": { + "name": "insert_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "update_locked": { + "name": "update_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "delete_locked": { + "name": "delete_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "user_table_def_workspace_id_idx": { + "name": "user_table_def_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_def_folder_id_idx": { + "name": "user_table_def_folder_id_idx", + "columns": [ + { + "expression": "folder_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_def_created_by_idx": { + "name": "user_table_def_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "user_table_def_workspace_name_unique": { + "name": "user_table_def_workspace_name_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"user_table_definitions\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_def_archived_at_idx": { + "name": "user_table_def_archived_at_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_def_workspace_archived_partial_idx": { + "name": "user_table_def_workspace_archived_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"user_table_definitions\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_table_definitions_workspace_id_workspace_id_fk": { + "name": "user_table_definitions_workspace_id_workspace_id_fk", + "tableFrom": "user_table_definitions", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_table_definitions_folder_id_folder_id_fk": { + "name": "user_table_definitions_folder_id_folder_id_fk", + "tableFrom": "user_table_definitions", + "tableTo": "folder", + "columnsFrom": ["folder_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "user_table_definitions_created_by_user_id_fk": { + "name": "user_table_definitions_created_by_user_id_fk", + "tableFrom": "user_table_definitions", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_table_row_changes": { + "name": "user_table_row_changes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "bigint", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "user_table_row_changes_id_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": "1", + "cycle": false + } + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "row_delta": { + "name": "row_delta", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "user_table_row_changes_table_id_idx": { + "name": "user_table_row_changes_table_id_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_table_row_changes_table_id_user_table_definitions_id_fk": { + "name": "user_table_row_changes_table_id_user_table_definitions_id_fk", + "tableFrom": "user_table_row_changes", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_table_row_secret_provenance": { + "name": "user_table_row_secret_provenance", + "schema": "", + "columns": { + "row_id": { + "name": "row_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "content_updated_at": { + "name": "content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "user_table_row_secret_provenance_row_id_user_table_rows_id_fk": { + "name": "user_table_row_secret_provenance_row_id_user_table_rows_id_fk", + "tableFrom": "user_table_row_secret_provenance", + "tableTo": "user_table_rows", + "columnsFrom": ["row_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "user_table_row_secret_provenance_status_check": { + "name": "user_table_row_secret_provenance_status_check", + "value": "\"user_table_row_secret_provenance\".\"status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.user_table_rows": { + "name": "user_table_rows", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "position": { + "name": "position", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "order_key": { + "name": "order_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "user_table_rows_created_by_idx": { + "name": "user_table_rows_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"user_table_rows\".\"created_by\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "user_table_rows_tenant_data_gin_idx": { + "name": "user_table_rows_tenant_data_gin_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "\"data\" jsonb_path_ops", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": { + "fastupdate": "off" + } + }, + "user_table_rows_workspace_table_idx": { + "name": "user_table_rows_workspace_table_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_rows_table_position_idx": { + "name": "user_table_rows_table_position_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "position", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_rows_table_order_key_idx": { + "name": "user_table_rows_table_order_key_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_rows_table_created_id_idx": { + "name": "user_table_rows_table_created_id_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_rows_table_id_id_idx": { + "name": "user_table_rows_table_id_id_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_table_rows_table_id_user_table_definitions_id_fk": { + "name": "user_table_rows_table_id_user_table_definitions_id_fk", + "tableFrom": "user_table_rows", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_table_rows_workspace_id_workspace_id_fk": { + "name": "user_table_rows_workspace_id_workspace_id_fk", + "tableFrom": "user_table_rows", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_table_rows_created_by_user_id_fk": { + "name": "user_table_rows_created_by_user_id_fk", + "tableFrom": "user_table_rows", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.verification": { + "name": "verification", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "identifier": { + "name": "identifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "verification_identifier_idx": { + "name": "verification_identifier_idx", + "columns": [ + { + "expression": "identifier", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "verification_expires_at_idx": { + "name": "verification_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.waitlist": { + "name": "waitlist", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "waitlist_email_unique": { + "name": "waitlist_email_unique", + "nullsNotDistinct": false, + "columns": ["email"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.webhook": { + "name": "webhook", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "registration_status": { + "name": "registration_status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "registration_generation": { + "name": "registration_generation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "config_fingerprint": { + "name": "config_fingerprint", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "prepared_at": { + "name": "prepared_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "block_id": { + "name": "block_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "routing_key": { + "name": "routing_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider": { + "name": "provider", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_config": { + "name": "provider_config", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "failed_count": { + "name": "failed_count", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "last_failed_at": { + "name": "last_failed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "path_deployment_unique": { + "name": "path_deployment_unique", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"webhook\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_workflow_deployment_idx": { + "name": "webhook_workflow_deployment_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_routing_key_active_idx": { + "name": "webhook_routing_key_active_idx", + "columns": [ + { + "expression": "routing_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"webhook\".\"archived_at\" IS NULL AND \"webhook\".\"routing_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_archived_at_partial_idx": { + "name": "webhook_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"webhook\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_webhook_on_provider_is_active_workflow_id_deploym_bdeed5468": { + "name": "idx_webhook_on_provider_is_active_workflow_id_deploym_bdeed5468", + "columns": [ + { + "expression": "provider", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "is_active", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_webhook_on_workflow_id_block_id_updated_at_desc": { + "name": "idx_webhook_on_workflow_id_block_id_updated_at_desc", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": false, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_active_registration_unique": { + "name": "webhook_active_registration_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"webhook\".\"registration_status\" = 'active' AND \"webhook\".\"block_id\" IS NOT NULL AND \"webhook\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_candidate_registration_unique": { + "name": "webhook_candidate_registration_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"webhook\".\"registration_status\" = 'candidate' AND \"webhook\".\"block_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_registration_status_generation_idx": { + "name": "webhook_registration_status_generation_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "registration_status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "registration_generation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "webhook_workflow_id_workflow_id_fk": { + "name": "webhook_workflow_id_workflow_id_fk", + "tableFrom": "webhook", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "webhook_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "webhook_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "webhook", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "webhook_registration_status_check": { + "name": "webhook_registration_status_check", + "value": "\"webhook\".\"registration_status\" IS NULL OR \"webhook\".\"registration_status\" IN ('active', 'candidate', 'retired', 'orphaned')" + }, + "webhook_registration_generation_check": { + "name": "webhook_registration_generation_check", + "value": "\"webhook\".\"registration_generation\" IS NULL OR \"webhook\".\"registration_generation\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.webhook_path_claim": { + "name": "webhook_path_claim", + "schema": "", + "columns": { + "path": { + "name": "path", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "generation": { + "name": "generation", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "webhook_path_claim_workflow_idx": { + "name": "webhook_path_claim_workflow_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "webhook_path_claim_workflow_id_workflow_id_fk": { + "name": "webhook_path_claim_workflow_id_workflow_id_fk", + "tableFrom": "webhook_path_claim", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "webhook_path_claim_generation_check": { + "name": "webhook_path_claim_generation_check", + "value": "\"webhook_path_claim\".\"generation\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.workflow": { + "name": "workflow", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "folder_id": { + "name": "folder_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_synced": { + "name": "last_synced", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "is_deployed": { + "name": "is_deployed", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "deployed_at": { + "name": "deployed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "is_public_api": { + "name": "is_public_api", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "locked": { + "name": "locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "fork_sync_excluded": { + "name": "fork_sync_excluded", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "run_count": { + "name": "run_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_run_at": { + "name": "last_run_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "variables": { + "name": "variables", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "code_meta": { + "name": "code_meta", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workflow_workspace_id_idx": { + "name": "workflow_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_user_workspace_idx": { + "name": "workflow_user_workspace_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_workspace_folder_name_active_unique": { + "name": "workflow_workspace_folder_name_active_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"folder_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_folder_sort_idx": { + "name": "workflow_folder_sort_idx", + "columns": [ + { + "expression": "folder_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sort_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_active_workspace_sort_idx": { + "name": "workflow_active_workspace_sort_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sort_order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_archived_at_idx": { + "name": "workflow_archived_at_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_workspace_archived_partial_idx": { + "name": "workflow_workspace_archived_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_user_id_user_id_fk": { + "name": "workflow_user_id_user_id_fk", + "tableFrom": "workflow", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_workspace_id_workspace_id_fk": { + "name": "workflow_workspace_id_workspace_id_fk", + "tableFrom": "workflow", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_folder_id_folder_id_fk": { + "name": "workflow_folder_id_folder_id_fk", + "tableFrom": "workflow", + "tableTo": "folder", + "columnsFrom": ["folder_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_blocks": { + "name": "workflow_blocks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "position_x": { + "name": "position_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "position_y": { + "name": "position_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "horizontal_handles": { + "name": "horizontal_handles", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "is_wide": { + "name": "is_wide", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "advanced_mode": { + "name": "advanced_mode", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "trigger_mode": { + "name": "trigger_mode", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "error_enabled": { + "name": "error_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "retry": { + "name": "retry", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "locked": { + "name": "locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "sub_blocks": { + "name": "sub_blocks", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "outputs": { + "name": "outputs", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_blocks_workflow_id_idx": { + "name": "workflow_blocks_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_blocks_type_idx": { + "name": "workflow_blocks_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_blocks_workflow_id_workflow_id_fk": { + "name": "workflow_blocks_workflow_id_workflow_id_fk", + "tableFrom": "workflow_blocks", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_checkpoints": { + "name": "workflow_checkpoints", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "message_id": { + "name": "message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_state": { + "name": "workflow_state", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_checkpoints_chat_id_idx": { + "name": "workflow_checkpoints_chat_id_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_message_id_idx": { + "name": "workflow_checkpoints_message_id_idx", + "columns": [ + { + "expression": "message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_user_workflow_idx": { + "name": "workflow_checkpoints_user_workflow_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_workflow_chat_idx": { + "name": "workflow_checkpoints_workflow_chat_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_created_at_idx": { + "name": "workflow_checkpoints_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_chat_created_at_idx": { + "name": "workflow_checkpoints_chat_created_at_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_checkpoints_user_id_user_id_fk": { + "name": "workflow_checkpoints_user_id_user_id_fk", + "tableFrom": "workflow_checkpoints", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_checkpoints_workflow_id_workflow_id_fk": { + "name": "workflow_checkpoints_workflow_id_workflow_id_fk", + "tableFrom": "workflow_checkpoints", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_checkpoints_chat_id_copilot_chats_id_fk": { + "name": "workflow_checkpoints_chat_id_copilot_chats_id_fk", + "tableFrom": "workflow_checkpoints", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_deployment_operation": { + "name": "workflow_deployment_operation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "previous_active_version_id": { + "name": "previous_active_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "action": { + "name": "action", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "protocol_version": { + "name": "protocol_version", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "generation": { + "name": "generation", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'preparing'" + }, + "component_readiness": { + "name": "component_readiness", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "error_code": { + "name": "error_code", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "idempotency_key": { + "name": "idempotency_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "request_hash": { + "name": "request_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "actor_id": { + "name": "actor_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_deployment_operation_workflow_generation_unique": { + "name": "workflow_deployment_operation_workflow_generation_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "generation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_workflow_idempotency_unique": { + "name": "workflow_deployment_operation_workflow_idempotency_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "idempotency_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_deployment_operation\".\"idempotency_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_workflow_in_flight_unique": { + "name": "workflow_deployment_operation_workflow_in_flight_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_deployment_operation\".\"status\" IN ('preparing', 'activating')", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_workflow_status_idx": { + "name": "workflow_deployment_operation_workflow_status_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_deployment_version_idx": { + "name": "workflow_deployment_operation_deployment_version_idx", + "columns": [ + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_workflow_version_generation_idx": { + "name": "workflow_deployment_operation_workflow_version_generation_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "generation", + "isExpression": false, + "asc": false, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_deployment_operation_workflow_id_workflow_id_fk": { + "name": "workflow_deployment_operation_workflow_id_workflow_id_fk", + "tableFrom": "workflow_deployment_operation", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_deployment_operation_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "workflow_deployment_operation_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "workflow_deployment_operation", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_deployment_operation_previous_active_version_id_workflow_deployment_version_id_fk": { + "name": "workflow_deployment_operation_previous_active_version_id_workflow_deployment_version_id_fk", + "tableFrom": "workflow_deployment_operation", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["previous_active_version_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workflow_deployment_operation_action_check": { + "name": "workflow_deployment_operation_action_check", + "value": "\"workflow_deployment_operation\".\"action\" IN ('deploy', 'activate')" + }, + "workflow_deployment_operation_status_check": { + "name": "workflow_deployment_operation_status_check", + "value": "\"workflow_deployment_operation\".\"status\" IN ('preparing', 'activating', 'active', 'failed', 'superseded')" + }, + "workflow_deployment_operation_generation_check": { + "name": "workflow_deployment_operation_generation_check", + "value": "\"workflow_deployment_operation\".\"generation\" > 0" + }, + "workflow_deployment_operation_protocol_version_check": { + "name": "workflow_deployment_operation_protocol_version_check", + "value": "\"workflow_deployment_operation\".\"protocol_version\" > 0" + } + }, + "isRLSEnabled": false + }, + "public.workflow_deployment_version": { + "name": "workflow_deployment_version", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "state": { + "name": "state", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workflow_deployment_version_workflow_version_unique": { + "name": "workflow_deployment_version_workflow_version_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_version_workflow_active_idx": { + "name": "workflow_deployment_version_workflow_active_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "is_active", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_version_created_at_idx": { + "name": "workflow_deployment_version_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_deployment_version_workflow_id_workflow_id_fk": { + "name": "workflow_deployment_version_workflow_id_workflow_id_fk", + "tableFrom": "workflow_deployment_version", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_edges": { + "name": "workflow_edges", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_block_id": { + "name": "source_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_block_id": { + "name": "target_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_handle": { + "name": "source_handle", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "target_handle": { + "name": "target_handle", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_edges_workflow_source_idx": { + "name": "workflow_edges_workflow_source_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_edges_workflow_target_idx": { + "name": "workflow_edges_workflow_target_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_edges_workflow_id_workflow_id_fk": { + "name": "workflow_edges_workflow_id_workflow_id_fk", + "tableFrom": "workflow_edges", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_edges_source_block_id_workflow_blocks_id_fk": { + "name": "workflow_edges_source_block_id_workflow_blocks_id_fk", + "tableFrom": "workflow_edges", + "tableTo": "workflow_blocks", + "columnsFrom": ["source_block_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_edges_target_block_id_workflow_blocks_id_fk": { + "name": "workflow_edges_target_block_id_workflow_blocks_id_fk", + "tableFrom": "workflow_edges", + "tableTo": "workflow_blocks", + "columnsFrom": ["target_block_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_execution_logs": { + "name": "workflow_execution_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "state_snapshot_id": { + "name": "state_snapshot_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "level": { + "name": "level", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "trigger": { + "name": "trigger", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "execution_deadline_at": { + "name": "execution_deadline_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "ended_at": { + "name": "ended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "total_duration_ms": { + "name": "total_duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "execution_data": { + "name": "execution_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "cost_total": { + "name": "cost_total", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "models_used": { + "name": "models_used", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "files": { + "name": "files", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_execution_logs_state_snapshot_id_idx": { + "name": "workflow_execution_logs_state_snapshot_id_idx", + "columns": [ + { + "expression": "state_snapshot_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_deployment_version_id_idx": { + "name": "workflow_execution_logs_deployment_version_id_idx", + "columns": [ + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_trigger_idx": { + "name": "workflow_execution_logs_trigger_idx", + "columns": [ + { + "expression": "trigger", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_level_idx": { + "name": "workflow_execution_logs_level_idx", + "columns": [ + { + "expression": "level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_started_at_idx": { + "name": "workflow_execution_logs_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_execution_id_unique": { + "name": "workflow_execution_logs_execution_id_unique", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_workflow_started_at_idx": { + "name": "workflow_execution_logs_workflow_started_at_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_workspace_activity_level_idx": { + "name": "workflow_execution_logs_workspace_activity_level_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "total_duration_ms", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "trigger", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_workspace_started_at_id_desc_idx": { + "name": "workflow_execution_logs_workspace_started_at_id_desc_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "\"started_at\" DESC NULLS LAST", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "\"id\" DESC", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_workspace_cost_total_idx": { + "name": "workflow_execution_logs_workspace_cost_total_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "cost_total", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_models_used_idx": { + "name": "workflow_execution_logs_models_used_idx", + "columns": [ + { + "expression": "models_used", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + }, + "workflow_execution_logs_workspace_ended_at_id_idx": { + "name": "workflow_execution_logs_workspace_ended_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"ended_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_running_started_at_idx": { + "name": "workflow_execution_logs_running_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "status = 'running'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_running_deadline_idx": { + "name": "workflow_execution_logs_running_deadline_idx", + "columns": [ + { + "expression": "execution_deadline_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_execution_logs\".\"status\" = 'running' AND \"workflow_execution_logs\".\"execution_deadline_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_redacting_started_at_idx": { + "name": "workflow_execution_logs_redacting_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "status = 'redacting'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_redacting_deadline_idx": { + "name": "workflow_execution_logs_redacting_deadline_idx", + "columns": [ + { + "expression": "execution_deadline_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_execution_logs\".\"status\" = 'redacting' AND \"workflow_execution_logs\".\"execution_deadline_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_completed_ended_at_idx": { + "name": "workflow_execution_logs_completed_ended_at_idx", + "columns": [ + { + "expression": "ended_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_execution_logs\".\"status\" = 'completed' AND \"workflow_execution_logs\".\"level\" = 'info' AND \"workflow_execution_logs\".\"ended_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_execution_logs_workflow_id_workflow_id_fk": { + "name": "workflow_execution_logs_workflow_id_workflow_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workflow_execution_logs_workspace_id_workspace_id_fk": { + "name": "workflow_execution_logs_workspace_id_workspace_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_execution_logs_state_snapshot_id_workflow_execution_snapshots_id_fk": { + "name": "workflow_execution_logs_state_snapshot_id_workflow_execution_snapshots_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workflow_execution_snapshots", + "columnsFrom": ["state_snapshot_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workflow_execution_logs_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "workflow_execution_logs_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_execution_snapshots": { + "name": "workflow_execution_snapshots", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "state_hash": { + "name": "state_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "state_data": { + "name": "state_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_snapshots_hash_idx": { + "name": "workflow_snapshots_hash_idx", + "columns": [ + { + "expression": "state_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_snapshots_workflow_hash_idx": { + "name": "workflow_snapshots_workflow_hash_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "state_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_snapshots_created_at_idx": { + "name": "workflow_snapshots_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_execution_snapshots_workflow_id_workflow_id_fk": { + "name": "workflow_execution_snapshots_workflow_id_workflow_id_fk", + "tableFrom": "workflow_execution_snapshots", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_mcp_server": { + "name": "workflow_mcp_server", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_public": { + "name": "is_public", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_mcp_server_workspace_id_idx": { + "name": "workflow_mcp_server_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_server_created_by_idx": { + "name": "workflow_mcp_server_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_server_deleted_at_idx": { + "name": "workflow_mcp_server_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_server_workspace_deleted_partial_idx": { + "name": "workflow_mcp_server_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_mcp_server\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_mcp_server_workspace_id_workspace_id_fk": { + "name": "workflow_mcp_server_workspace_id_workspace_id_fk", + "tableFrom": "workflow_mcp_server", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_mcp_server_created_by_user_id_fk": { + "name": "workflow_mcp_server_created_by_user_id_fk", + "tableFrom": "workflow_mcp_server", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_mcp_tool": { + "name": "workflow_mcp_tool", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tool_name": { + "name": "tool_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tool_description": { + "name": "tool_description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "parameter_schema": { + "name": "parameter_schema", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "parameter_description_overrides": { + "name": "parameter_description_overrides", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'::json" + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_mcp_tool_server_id_idx": { + "name": "workflow_mcp_tool_server_id_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_tool_workflow_id_idx": { + "name": "workflow_mcp_tool_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_tool_server_workflow_unique": { + "name": "workflow_mcp_tool_server_workflow_unique", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_mcp_tool\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_tool_archived_at_partial_idx": { + "name": "workflow_mcp_tool_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_mcp_tool\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_mcp_tool_server_id_workflow_mcp_server_id_fk": { + "name": "workflow_mcp_tool_server_id_workflow_mcp_server_id_fk", + "tableFrom": "workflow_mcp_tool", + "tableTo": "workflow_mcp_server", + "columnsFrom": ["server_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_mcp_tool_workflow_id_workflow_id_fk": { + "name": "workflow_mcp_tool_workflow_id_workflow_id_fk", + "tableFrom": "workflow_mcp_tool", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_schedule": { + "name": "workflow_schedule", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deployment_operation_id": { + "name": "deployment_operation_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "block_id": { + "name": "block_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cron_expression": { + "name": "cron_expression", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "next_run_at": { + "name": "next_run_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_ran_at": { + "name": "last_ran_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_queued_at": { + "name": "last_queued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "trigger_type": { + "name": "trigger_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "timezone": { + "name": "timezone", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'UTC'" + }, + "failed_count": { + "name": "failed_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "infra_retry_count": { + "name": "infra_retry_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "last_failed_at": { + "name": "last_failed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "source_type": { + "name": "source_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'workflow'" + }, + "job_title": { + "name": "job_title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "prompt": { + "name": "prompt", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lifecycle": { + "name": "lifecycle", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'persistent'" + }, + "success_condition": { + "name": "success_condition", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "max_runs": { + "name": "max_runs", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "run_count": { + "name": "run_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "source_chat_id": { + "name": "source_chat_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_task_name": { + "name": "source_task_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_user_id": { + "name": "source_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_workspace_id": { + "name": "source_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_scope": { + "name": "secret_scope", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'all'" + }, + "mounted_secrets": { + "name": "mounted_secrets", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "job_history": { + "name": "job_history", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "contexts": { + "name": "contexts", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "excluded_dates": { + "name": "excluded_dates", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "ends_at": { + "name": "ends_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "run_budget_usd": { + "name": "run_budget_usd", + "type": "numeric(12, 4)", + "primaryKey": false, + "notNull": false + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_schedule_workflow_block_deployment_unique": { + "name": "workflow_schedule_workflow_block_deployment_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_schedule\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_schedule_workflow_deployment_idx": { + "name": "workflow_schedule_workflow_deployment_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_schedule_archived_at_partial_idx": { + "name": "workflow_schedule_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_schedule\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_workflow_schedule_on_source_workspace_id_source_t_c07f3bba6": { + "name": "idx_workflow_schedule_on_source_workspace_id_source_t_c07f3bba6", + "columns": [ + { + "expression": "source_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_schedule_due_workflow_idx": { + "name": "workflow_schedule_due_workflow_idx", + "columns": [ + { + "expression": "next_run_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_queued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_schedule\".\"archived_at\" IS NULL AND \"workflow_schedule\".\"status\" NOT IN ('disabled', 'completed') AND (\"workflow_schedule\".\"source_type\" = 'workflow' OR \"workflow_schedule\".\"source_type\" IS NULL)", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_schedule_due_job_idx": { + "name": "workflow_schedule_due_job_idx", + "columns": [ + { + "expression": "next_run_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_queued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_schedule\".\"archived_at\" IS NULL AND \"workflow_schedule\".\"status\" NOT IN ('disabled', 'completed') AND \"workflow_schedule\".\"source_type\" = 'job'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_schedule_workflow_id_workflow_id_fk": { + "name": "workflow_schedule_workflow_id_workflow_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_schedule_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "workflow_schedule_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_schedule_deployment_operation_id_workflow_deployment_operation_id_fk": { + "name": "workflow_schedule_deployment_operation_id_workflow_deployment_operation_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "workflow_deployment_operation", + "columnsFrom": ["deployment_operation_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workflow_schedule_source_user_id_user_id_fk": { + "name": "workflow_schedule_source_user_id_user_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "user", + "columnsFrom": ["source_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_schedule_source_workspace_id_workspace_id_fk": { + "name": "workflow_schedule_source_workspace_id_workspace_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "workspace", + "columnsFrom": ["source_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_subflows": { + "name": "workflow_subflows", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_subflows_workflow_type_idx": { + "name": "workflow_subflows_workflow_type_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_subflows_workflow_id_workflow_id_fk": { + "name": "workflow_subflows_workflow_id_workflow_id_fk", + "tableFrom": "workflow_subflows", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_test": { + "name": "workflow_test", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "body_file_id": { + "name": "body_file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "cases": { + "name": "cases", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "source_hash": { + "name": "source_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_by_user_id": { + "name": "created_by_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_test_workspace_name_unique": { + "name": "workflow_test_workspace_name_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_test\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_test_body_file_unique": { + "name": "workflow_test_body_file_unique", + "columns": [ + { + "expression": "body_file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_test_workspace_id_workspace_id_fk": { + "name": "workflow_test_workspace_id_workspace_id_fk", + "tableFrom": "workflow_test", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_test_body_file_id_workspace_files_id_fk": { + "name": "workflow_test_body_file_id_workspace_files_id_fk", + "tableFrom": "workflow_test", + "tableTo": "workspace_files", + "columnsFrom": ["body_file_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workflow_test_created_by_user_id_user_id_fk": { + "name": "workflow_test_created_by_user_id_user_id_fk", + "tableFrom": "workflow_test", + "tableTo": "user", + "columnsFrom": ["created_by_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_test_run": { + "name": "workflow_test_run", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "test_id": { + "name": "test_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "passed": { + "name": "passed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "failed": { + "name": "failed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "skipped": { + "name": "skipped", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "report": { + "name": "report", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_hash": { + "name": "source_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ran_against": { + "name": "ran_against", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "progress": { + "name": "progress", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "triggered_by_actor": { + "name": "triggered_by_actor", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "triggered_by_user_id": { + "name": "triggered_by_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workflow_test_run_test_version_started_idx": { + "name": "workflow_test_run_test_version_started_idx", + "columns": [ + { + "expression": "test_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_test_run_test_id_workflow_test_id_fk": { + "name": "workflow_test_run_test_id_workflow_test_id_fk", + "tableFrom": "workflow_test_run", + "tableTo": "workflow_test", + "columnsFrom": ["test_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_test_run_workspace_id_workspace_id_fk": { + "name": "workflow_test_run_workspace_id_workspace_id_fk", + "tableFrom": "workflow_test_run", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_test_run_triggered_by_user_id_user_id_fk": { + "name": "workflow_test_run_triggered_by_user_id_user_id_fk", + "tableFrom": "workflow_test_run", + "tableTo": "user", + "columnsFrom": ["triggered_by_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workflow_test_run_version_check": { + "name": "workflow_test_run_version_check", + "value": "\"workflow_test_run\".\"version\" IN ('draft', 'deployed')" + }, + "workflow_test_run_status_check": { + "name": "workflow_test_run_status_check", + "value": "\"workflow_test_run\".\"status\" IN ('running', 'passed', 'failed', 'error')" + }, + "workflow_test_run_completed_check": { + "name": "workflow_test_run_completed_check", + "value": "(\"workflow_test_run\".\"status\" = 'running') = (\"workflow_test_run\".\"completed_at\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.workload_identity_pending_subject": { + "name": "workload_identity_pending_subject", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider": { + "name": "provider", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject": { + "name": "subject", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "workload_identity_pending_subject_subject_unique": { + "name": "workload_identity_pending_subject_subject_unique", + "columns": [ + { + "expression": "subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workload_identity_pending_subject_issuer_idx": { + "name": "workload_identity_pending_subject_issuer_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workload_identity_pending_subject_user_id_idx": { + "name": "workload_identity_pending_subject_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workload_identity_pending_subject_workspace_id_workspace_id_fk": { + "name": "workload_identity_pending_subject_workspace_id_workspace_id_fk", + "tableFrom": "workload_identity_pending_subject", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workload_identity_pending_subject_user_id_user_id_fk": { + "name": "workload_identity_pending_subject_user_id_user_id_fk", + "tableFrom": "workload_identity_pending_subject", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace": { + "name": "workspace", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "color": { + "name": "color", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'#33C482'" + }, + "logo_url": { + "name": "logo_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "owner_id": { + "name": "owner_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_scope_key": { + "name": "organization_scope_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "CASE WHEN organization_id IS NULL THEN 'personal' ELSE 'organization:' || organization_id END", + "type": "stored" + } + }, + "project_id": { + "name": "project_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_mode": { + "name": "workspace_mode", + "type": "workspace_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'grandfathered_shared'" + }, + "billed_account_user_id": { + "name": "billed_account_user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "storage_used_bytes": { + "name": "storage_used_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "allow_personal_api_keys": { + "name": "allow_personal_api_keys", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "inbox_enabled": { + "name": "inbox_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "inbox_address": { + "name": "inbox_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "inbox_provider_id": { + "name": "inbox_provider_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "inbox_secret_scope": { + "name": "inbox_secret_scope", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'all'" + }, + "inbox_mounted_secrets": { + "name": "inbox_mounted_secrets", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "organization_assigned_at": { + "name": "organization_assigned_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "forked_from_workspace_id": { + "name": "forked_from_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "fork_sync_new_workflows_excluded": { + "name": "fork_sync_new_workflows_excluded", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_owner_id_idx": { + "name": "workspace_owner_id_idx", + "columns": [ + { + "expression": "owner_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_organization_id_idx": { + "name": "workspace_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_billed_account_user_id_idx": { + "name": "workspace_billed_account_user_id_idx", + "columns": [ + { + "expression": "billed_account_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_project_id_id_idx": { + "name": "workspace_project_id_id_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_mode_idx": { + "name": "workspace_mode_idx", + "columns": [ + { + "expression": "workspace_mode", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_forked_from_workspace_id_idx": { + "name": "workspace_forked_from_workspace_id_idx", + "columns": [ + { + "expression": "forked_from_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_inbox_provider_id_idx": { + "name": "workspace_inbox_provider_id_idx", + "columns": [ + { + "expression": "inbox_provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace\".\"inbox_provider_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_owner_id_user_id_fk": { + "name": "workspace_owner_id_user_id_fk", + "tableFrom": "workspace", + "tableTo": "user", + "columnsFrom": ["owner_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_organization_id_organization_id_fk": { + "name": "workspace_organization_id_organization_id_fk", + "tableFrom": "workspace", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workspace_project_id_project_id_fk": { + "name": "workspace_project_id_project_id_fk", + "tableFrom": "workspace", + "tableTo": "project", + "columnsFrom": ["project_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "workspace_billed_account_user_id_user_id_fk": { + "name": "workspace_billed_account_user_id_user_id_fk", + "tableFrom": "workspace", + "tableTo": "user", + "columnsFrom": ["billed_account_user_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workspace_forked_from_workspace_id_workspace_id_fk": { + "name": "workspace_forked_from_workspace_id_workspace_id_fk", + "tableFrom": "workspace", + "tableTo": "workspace", + "columnsFrom": ["forked_from_workspace_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workspace_project_organization_fk": { + "name": "workspace_project_organization_fk", + "tableFrom": "workspace", + "tableTo": "project", + "columnsFrom": ["project_id", "organization_scope_key"], + "columnsTo": ["id", "organization_scope_key"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workspace_fork_project_fk": { + "name": "workspace_fork_project_fk", + "tableFrom": "workspace", + "tableTo": "workspace", + "columnsFrom": ["forked_from_workspace_id", "project_id"], + "columnsTo": ["id", "project_id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "workspace_id_project_unique": { + "name": "workspace_id_project_unique", + "nullsNotDistinct": false, + "columns": ["id", "project_id"] + } + }, + "policies": {}, + "checkConstraints": { + "workspace_storage_used_bytes_non_negative": { + "name": "workspace_storage_used_bytes_non_negative", + "value": "\"workspace\".\"storage_used_bytes\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.workspace_byok_keys": { + "name": "workspace_byok_keys", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "encrypted_api_key": { + "name": "encrypted_api_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_byok_workspace_provider_idx": { + "name": "workspace_byok_workspace_provider_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_byok_keys_workspace_id_workspace_id_fk": { + "name": "workspace_byok_keys_workspace_id_workspace_id_fk", + "tableFrom": "workspace_byok_keys", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_byok_keys_created_by_user_id_fk": { + "name": "workspace_byok_keys_created_by_user_id_fk", + "tableFrom": "workspace_byok_keys", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_environment": { + "name": "workspace_environment", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "variables": { + "name": "variables", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_environment_workspace_unique": { + "name": "workspace_environment_workspace_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_environment_workspace_id_workspace_id_fk": { + "name": "workspace_environment_workspace_id_workspace_id_fk", + "tableFrom": "workspace_environment", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file": { + "name": "workspace_file", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_file_workspace_id_idx": { + "name": "workspace_file_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_deleted_at_idx": { + "name": "workspace_file_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_workspace_deleted_partial_idx": { + "name": "workspace_file_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_uploaded_by_idx": { + "name": "workspace_file_uploaded_by_idx", + "columns": [ + { + "expression": "uploaded_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_workspace_id_workspace_id_fk": { + "name": "workspace_file_workspace_id_workspace_id_fk", + "tableFrom": "workspace_file", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_uploaded_by_user_id_fk": { + "name": "workspace_file_uploaded_by_user_id_fk", + "tableFrom": "workspace_file", + "tableTo": "user", + "columnsFrom": ["uploaded_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "workspace_file_key_unique": { + "name": "workspace_file_key_unique", + "nullsNotDistinct": false, + "columns": ["key"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_collab_state": { + "name": "workspace_file_collab_state", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "doc_state": { + "name": "doc_state", + "type": "bytea", + "primaryKey": false, + "notNull": true + }, + "source_hash": { + "name": "source_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "workspace_file_collab_state_file_id_workspace_files_id_fk": { + "name": "workspace_file_collab_state_file_id_workspace_files_id_fk", + "tableFrom": "workspace_file_collab_state", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_search_backfill": { + "name": "workspace_file_search_backfill", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "after_workspace_id": { + "name": "after_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "after_entity_type": { + "name": "after_entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "after_entity_id": { + "name": "after_entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "after_file_id": { + "name": "after_file_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_search_build": { + "name": "workspace_file_search_build", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "artifact_key": { + "name": "artifact_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workspace_file_search_build_file_idx": { + "name": "workspace_file_search_build_file_idx", + "columns": [ + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_build_cleanup_idx": { + "name": "workspace_file_search_build_cleanup_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_build\".\"expires_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "file_search_build_owner_check": { + "name": "file_search_build_owner_check", + "value": "(\"workspace_file_search_build\".\"entity_type\" IS NULL AND \"workspace_file_search_build\".\"entity_id\" IS NULL AND \"workspace_file_search_build\".\"workspace_id\" IS NOT NULL) OR (\"workspace_file_search_build\".\"entity_type\" = 'workspace' AND \"workspace_file_search_build\".\"entity_id\" = \"workspace_file_search_build\".\"workspace_id\") OR (\"workspace_file_search_build\".\"entity_type\" = 'project' AND length(\"workspace_file_search_build\".\"entity_id\") > 0 AND \"workspace_file_search_build\".\"workspace_id\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.workspace_file_search_chunk": { + "name": "workspace_file_search_chunk", + "schema": "", + "columns": { + "build_id": { + "name": "build_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ordinal": { + "name": "ordinal", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "line_start": { + "name": "line_start", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "fragment": { + "name": "fragment", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "overlap": { + "name": "overlap", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "file_search_chunk_owner_content_idx": { + "name": "file_search_chunk_owner_content_idx", + "columns": [ + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "content", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "gin_trgm_ops" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_chunk\".\"entity_type\" = 'project'", + "concurrently": true, + "method": "gin", + "with": { + "fastupdate": "off" + } + }, + "workspace_file_search_chunk_line_idx": { + "name": "workspace_file_search_chunk_line_idx", + "columns": [ + { + "expression": "build_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "line_start", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "ordinal", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_chunk_content_idx": { + "name": "workspace_file_search_chunk_content_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "content", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "gin_trgm_ops" + } + ], + "isUnique": false, + "concurrently": true, + "method": "gin", + "with": { + "fastupdate": "off" + } + } + }, + "foreignKeys": { + "workspace_file_search_chunk_build_id_workspace_file_search_build_id_fk": { + "name": "workspace_file_search_chunk_build_id_workspace_file_search_build_id_fk", + "tableFrom": "workspace_file_search_chunk", + "tableTo": "workspace_file_search_build", + "columnsFrom": ["build_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "workspace_file_search_chunk_pk": { + "name": "workspace_file_search_chunk_pk", + "columns": ["build_id", "ordinal"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "file_search_chunk_owner_check": { + "name": "file_search_chunk_owner_check", + "value": "(\"workspace_file_search_chunk\".\"entity_type\" IS NULL AND \"workspace_file_search_chunk\".\"entity_id\" IS NULL AND \"workspace_file_search_chunk\".\"workspace_id\" IS NOT NULL) OR (\"workspace_file_search_chunk\".\"entity_type\" = 'workspace' AND \"workspace_file_search_chunk\".\"entity_id\" = \"workspace_file_search_chunk\".\"workspace_id\") OR (\"workspace_file_search_chunk\".\"entity_type\" = 'project' AND length(\"workspace_file_search_chunk\".\"entity_id\") > 0 AND \"workspace_file_search_chunk\".\"workspace_id\" IS NULL)" + }, + "workspace_file_search_chunk_content_size": { + "name": "workspace_file_search_chunk_content_size", + "value": "octet_length(\"workspace_file_search_chunk\".\"content\") <= 8192" + }, + "workspace_file_search_chunk_position": { + "name": "workspace_file_search_chunk_position", + "value": "\"workspace_file_search_chunk\".\"ordinal\" >= 0 AND \"workspace_file_search_chunk\".\"line_start\" > 0 AND \"workspace_file_search_chunk\".\"overlap\" BETWEEN 0 AND 2" + } + }, + "isRLSEnabled": false + }, + "public.workspace_file_search_dispatch_queue": { + "name": "workspace_file_search_dispatch_queue", + "schema": "", + "columns": { + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "enqueued_at": { + "name": "enqueued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_dispatched_at": { + "name": "last_dispatched_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_file_search_dispatch_queue_schedule_idx": { + "name": "workspace_file_search_dispatch_queue_schedule_idx", + "columns": [ + { + "expression": "last_dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "first" + }, + { + "expression": "enqueued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_search_queue_workspace_fk": { + "name": "workspace_file_search_queue_workspace_fk", + "tableFrom": "workspace_file_search_dispatch_queue", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_search_index": { + "name": "workspace_file_search_index", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "workspace_file_search_index_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "partial": { + "name": "partial", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "line_count": { + "name": "line_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "indexed_bytes": { + "name": "indexed_bytes", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "dispatched_at": { + "name": "dispatched_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_file_search_index_workspace_status_idx": { + "name": "workspace_file_search_index_workspace_status_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_index_pending_dispatch_idx": { + "name": "workspace_file_search_index_pending_dispatch_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_index\".\"status\" = 'pending' AND \"workspace_file_search_index\".\"dispatched_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_index_active_dispatch_idx": { + "name": "workspace_file_search_index_active_dispatch_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_index\".\"status\" = 'pending' AND \"workspace_file_search_index\".\"dispatched_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_search_index_file_fk": { + "name": "workspace_file_search_index_file_fk", + "tableFrom": "workspace_file_search_index", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_search_index_workspace_fk": { + "name": "workspace_file_search_index_workspace_fk", + "tableFrom": "workspace_file_search_index", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "workspace_file_search_index_pk": { + "name": "workspace_file_search_index_pk", + "columns": ["file_id", "source_content_updated_at"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_search_revision": { + "name": "workspace_file_search_revision", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "workspace_file_search_index_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "build_id": { + "name": "build_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "line_count": { + "name": "line_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "indexed_bytes": { + "name": "indexed_bytes", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "chunk_count": { + "name": "chunk_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "dispatched_at": { + "name": "dispatched_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "handoff_expires_at": { + "name": "handoff_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "file_search_revision_owner_pending_idx": { + "name": "file_search_revision_owner_pending_idx", + "columns": [ + { + "expression": "coalesce(\"entity_type\", 'workspace')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"entity_id\", \"workspace_id\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_revision\".\"status\" = 'pending' AND \"workspace_file_search_revision\".\"dispatched_at\" IS NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "file_search_revision_owner_status_idx": { + "name": "file_search_revision_owner_status_idx", + "columns": [ + { + "expression": "coalesce(\"entity_type\", 'workspace')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"entity_id\", \"workspace_id\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_file_search_revision_workspace_status_idx": { + "name": "workspace_file_search_revision_workspace_status_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_revision_build_idx": { + "name": "workspace_file_search_revision_build_idx", + "columns": [ + { + "expression": "build_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_revision_pending_idx": { + "name": "workspace_file_search_revision_pending_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_revision\".\"status\" = 'pending' AND \"workspace_file_search_revision\".\"dispatched_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_revision_active_idx": { + "name": "workspace_file_search_revision_active_idx", + "columns": [ + { + "expression": "dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_revision\".\"status\" = 'pending' AND \"workspace_file_search_revision\".\"dispatched_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_search_revision_file_id_workspace_files_id_fk": { + "name": "workspace_file_search_revision_file_id_workspace_files_id_fk", + "tableFrom": "workspace_file_search_revision", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_search_revision_build_id_workspace_file_search_build_id_fk": { + "name": "workspace_file_search_revision_build_id_workspace_file_search_build_id_fk", + "tableFrom": "workspace_file_search_revision", + "tableTo": "workspace_file_search_build", + "columnsFrom": ["build_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "file_search_revision_owner_check": { + "name": "file_search_revision_owner_check", + "value": "(\"workspace_file_search_revision\".\"entity_type\" IS NULL AND \"workspace_file_search_revision\".\"entity_id\" IS NULL AND \"workspace_file_search_revision\".\"workspace_id\" IS NOT NULL) OR (\"workspace_file_search_revision\".\"entity_type\" = 'workspace' AND \"workspace_file_search_revision\".\"entity_id\" = \"workspace_file_search_revision\".\"workspace_id\") OR (\"workspace_file_search_revision\".\"entity_type\" = 'project' AND length(\"workspace_file_search_revision\".\"entity_id\") > 0 AND \"workspace_file_search_revision\".\"workspace_id\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.workspace_file_search_segment": { + "name": "workspace_file_search_segment", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "line_number": { + "name": "line_number", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "segment_number": { + "name": "segment_number", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "segment_start": { + "name": "segment_start", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "line_length": { + "name": "line_length", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "workspace_file_search_segment_workspace_revision_idx": { + "name": "workspace_file_search_segment_workspace_revision_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_segment_workspace_content_trgm_idx": { + "name": "workspace_file_search_segment_workspace_content_trgm_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "content", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "gin_trgm_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_search_segment_file_fk": { + "name": "workspace_file_search_segment_file_fk", + "tableFrom": "workspace_file_search_segment", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_search_segment_workspace_fk": { + "name": "workspace_file_search_segment_workspace_fk", + "tableFrom": "workspace_file_search_segment", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "workspace_file_search_segment_pk": { + "name": "workspace_file_search_segment_pk", + "columns": ["file_id", "source_content_updated_at", "line_number", "segment_number"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_secret_provenance": { + "name": "workspace_file_secret_provenance", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "content_updated_at": { + "name": "content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "workspace_file_secret_provenance_file_id_workspace_files_id_fk": { + "name": "workspace_file_secret_provenance_file_id_workspace_files_id_fk", + "tableFrom": "workspace_file_secret_provenance", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workspace_file_secret_provenance_status_check": { + "name": "workspace_file_secret_provenance_status_check", + "value": "\"workspace_file_secret_provenance\".\"status\" IN ('exact', 'unknown', 'unrecorded')" + } + }, + "isRLSEnabled": false + }, + "public.workspace_file_version": { + "name": "workspace_file_version", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "superseded_at": { + "name": "superseded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "workspace_file_version_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "author_user_ids": { + "name": "author_user_ids", + "type": "text[]", + "primaryKey": false, + "notNull": true, + "default": "'{}'::text[]" + }, + "restored_from_version": { + "name": "restored_from_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_status": { + "name": "secret_provenance_status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_entries": { + "name": "secret_provenance_entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_file_version_file_version_unique": { + "name": "workspace_file_version_file_version_unique", + "columns": [ + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_version_key_unique": { + "name": "workspace_file_version_key_unique", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_version_workspace_id_idx": { + "name": "workspace_file_version_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_version_workspace_superseded_idx": { + "name": "workspace_file_version_workspace_superseded_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "superseded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_version\".\"superseded_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_version_file_id_workspace_files_id_fk": { + "name": "workspace_file_version_file_id_workspace_files_id_fk", + "tableFrom": "workspace_file_version", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_version_workspace_id_workspace_id_fk": { + "name": "workspace_file_version_workspace_id_workspace_id_fk", + "tableFrom": "workspace_file_version", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workspace_file_version_provenance_status_check": { + "name": "workspace_file_version_provenance_status_check", + "value": "\"workspace_file_version\".\"secret_provenance_status\" IS NULL OR \"workspace_file_version\".\"secret_provenance_status\" IN ('exact', 'unknown', 'unrecorded')" + } + }, + "isRLSEnabled": false + }, + "public.workspace_files": { + "name": "workspace_files", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "folder_id": { + "name": "folder_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "context": { + "name": "context", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "message_id": { + "name": "message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "original_name": { + "name": "original_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "content_updated_at": { + "name": "content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "date_trunc('milliseconds', now())" + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workspace_files_project_id_idx": { + "name": "workspace_files_project_id_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_project_folder_name_active_unique": { + "name": "workspace_files_project_folder_name_active_unique", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"folder_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "original_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"project_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_key_active_unique": { + "name": "workspace_files_key_active_unique", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace_files\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_folder_name_active_unique": { + "name": "workspace_files_workspace_folder_name_active_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"folder_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "original_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_search_owner_keyset_idx": { + "name": "workspace_files_search_owner_keyset_idx", + "columns": [ + { + "expression": "(CASE WHEN \"project_id\" IS NOT NULL THEN 'project' ELSE 'workspace' END)", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"project_id\", \"workspace_id\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND ((\"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL) OR (\"workspace_files\".\"context\" = 'project' AND \"workspace_files\".\"project_id\" IS NOT NULL))", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_active_keyset_idx": { + "name": "workspace_files_workspace_active_keyset_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_active_uploaded_idx": { + "name": "workspace_files_workspace_active_uploaded_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "uploaded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_active_updated_idx": { + "name": "workspace_files_workspace_active_updated_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_folder_uploaded_idx": { + "name": "workspace_files_workspace_folder_uploaded_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"folder_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "uploaded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_name_trgm_idx": { + "name": "workspace_files_workspace_name_trgm_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "original_name", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "gin_trgm_ops" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "gin", + "with": { + "fastupdate": "off" + } + }, + "workspace_files_workspace_display_name_idx": { + "name": "workspace_files_workspace_display_name_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "regexp_replace(regexp_replace(regexp_replace(normalize(\"original_name\", NFC), '^[ \\t\\n\\v\\f\\r\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+|[ \\t\\n\\v\\f\\r\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+$', '', 'g'), '[\\x01-\\x1f\\x7f]', '', 'g'), '[ \\t\\n\\v\\f\\r\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+', ' ', 'g')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_chat_display_name_unique": { + "name": "workspace_files_chat_display_name_unique", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "display_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace_files\".\"context\" = 'mothership' AND \"workspace_files\".\"chat_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_organization_id_idx": { + "name": "workspace_files_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_key_idx": { + "name": "workspace_files_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_user_id_idx": { + "name": "workspace_files_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_id_idx": { + "name": "workspace_files_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_folder_id_idx": { + "name": "workspace_files_folder_id_idx", + "columns": [ + { + "expression": "folder_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_context_idx": { + "name": "workspace_files_context_idx", + "columns": [ + { + "expression": "context", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_chat_id_idx": { + "name": "workspace_files_chat_id_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_deleted_at_idx": { + "name": "workspace_files_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_deleted_partial_idx": { + "name": "workspace_files_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_files_project_id_project_id_fk": { + "name": "workspace_files_project_id_project_id_fk", + "tableFrom": "workspace_files", + "tableTo": "project", + "columnsFrom": ["project_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "workspace_files_user_id_user_id_fk": { + "name": "workspace_files_user_id_user_id_fk", + "tableFrom": "workspace_files", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_files_workspace_id_workspace_id_fk": { + "name": "workspace_files_workspace_id_workspace_id_fk", + "tableFrom": "workspace_files", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_files_organization_id_organization_id_fk": { + "name": "workspace_files_organization_id_organization_id_fk", + "tableFrom": "workspace_files", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_files_folder_id_folder_id_fk": { + "name": "workspace_files_folder_id_folder_id_fk", + "tableFrom": "workspace_files", + "tableTo": "folder", + "columnsFrom": ["folder_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workspace_files_chat_id_copilot_chats_id_fk": { + "name": "workspace_files_chat_id_copilot_chats_id_fk", + "tableFrom": "workspace_files", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workspace_files_owner_check": { + "name": "workspace_files_owner_check", + "value": "num_nonnulls(\"workspace_files\".\"workspace_id\", \"workspace_files\".\"project_id\", \"workspace_files\".\"organization_id\") <= 1" + }, + "workspace_files_workspace_binding_check": { + "name": "workspace_files_workspace_binding_check", + "value": "\"workspace_files\".\"context\" NOT IN ('workspace', 'chat', 'mothership', 'execution', 'workspace-logos') OR \"workspace_files\".\"workspace_id\" IS NOT NULL" + }, + "workspace_files_project_binding_check": { + "name": "workspace_files_project_binding_check", + "value": "(\"workspace_files\".\"project_id\" IS NOT NULL) = (\"workspace_files\".\"context\" = 'project') AND (\"workspace_files\".\"project_id\" IS NULL OR \"workspace_files\".\"chat_id\" IS NULL)" + }, + "workspace_files_organization_binding_check": { + "name": "workspace_files_organization_binding_check", + "value": "\"workspace_files\".\"organization_id\" IS NULL OR (\"workspace_files\".\"workspace_id\" IS NULL AND \"workspace_files\".\"context\" = 'knowledge-base' AND \"workspace_files\".\"folder_id\" IS NULL AND \"workspace_files\".\"chat_id\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.workspace_fork_block_map": { + "name": "workspace_fork_block_map", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "parent_workflow_id": { + "name": "parent_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "parent_block_id": { + "name": "parent_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "child_workflow_id": { + "name": "child_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "child_block_id": { + "name": "child_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_fork_block_map_child_ws_parent_unique": { + "name": "workspace_fork_block_map_child_ws_parent_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_block_map_child_ws_child_unique": { + "name": "workspace_fork_block_map_child_ws_child_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "child_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_block_map_child_ws_parent_wf_idx": { + "name": "workspace_fork_block_map_child_ws_parent_wf_idx", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_block_map_child_ws_child_wf_idx": { + "name": "workspace_fork_block_map_child_ws_child_wf_idx", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "child_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_block_map_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_block_map_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_block_map", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_fork_dependent_value": { + "name": "workspace_fork_dependent_value", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_workflow_id": { + "name": "target_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_block_id": { + "name": "target_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sub_block_key": { + "name": "sub_block_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_fork_dependent_value_field_unique": { + "name": "workspace_fork_dependent_value_field_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sub_block_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_dependent_value_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_dependent_value_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_dependent_value", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_fork_promote_run": { + "name": "workspace_fork_promote_run", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_workspace_id": { + "name": "source_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_workspace_id": { + "name": "target_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "direction": { + "name": "direction", + "type": "workspace_fork_promote_direction", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "snapshot": { + "name": "snapshot", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_fork_promote_run_child_ws_target_unique": { + "name": "workspace_fork_promote_run_child_ws_target_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_promote_run_target_ws_idx": { + "name": "workspace_fork_promote_run_target_ws_idx", + "columns": [ + { + "expression": "target_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_promote_run_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_promote_run_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_promote_run", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_fork_promote_run_created_by_user_id_fk": { + "name": "workspace_fork_promote_run_created_by_user_id_fk", + "tableFrom": "workspace_fork_promote_run", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_fork_resource_map": { + "name": "workspace_fork_resource_map", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_type": { + "name": "resource_type", + "type": "workspace_fork_resource_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "parent_resource_id": { + "name": "parent_resource_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "child_resource_id": { + "name": "child_resource_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_fork_resource_map_child_type_parent_unique": { + "name": "workspace_fork_resource_map_child_type_parent_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_resource_map_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_resource_map_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_resource_map", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_fork_resource_map_created_by_user_id_fk": { + "name": "workspace_fork_resource_map_created_by_user_id_fk", + "tableFrom": "workspace_fork_resource_map", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_fork_workflow_sync": { + "name": "workspace_fork_workflow_sync", + "schema": "", + "columns": { + "deployment_operation_id": { + "name": "deployment_operation_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_workflow_id": { + "name": "source_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_workflow_id": { + "name": "target_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_deployment_version_id": { + "name": "source_deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sequence": { + "name": "sequence", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "identity": { + "type": "always", + "name": "workspace_fork_workflow_sync_sequence_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": "1", + "cycle": false + } + }, + "promote_run_id": { + "name": "promote_run_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "activated_at": { + "name": "activated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "rollback_operation_id": { + "name": "rollback_operation_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "rolled_back_at": { + "name": "rolled_back_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workspace_fork_workflow_sync_baseline_idx": { + "name": "workspace_fork_workflow_sync_baseline_idx", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sequence", + "isExpression": false, + "asc": false, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_fork_workflow_sync\".\"activated_at\" IS NOT NULL AND \"workspace_fork_workflow_sync\".\"rolled_back_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_run_idx": { + "name": "workspace_fork_workflow_sync_run_idx", + "columns": [ + { + "expression": "promote_run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_rollback_idx": { + "name": "workspace_fork_workflow_sync_rollback_idx", + "columns": [ + { + "expression": "rollback_operation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_fork_workflow_sync\".\"rollback_operation_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_source_idx": { + "name": "workspace_fork_workflow_sync_source_idx", + "columns": [ + { + "expression": "source_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_target_idx": { + "name": "workspace_fork_workflow_sync_target_idx", + "columns": [ + { + "expression": "target_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_child_workspace_idx": { + "name": "workspace_fork_workflow_sync_child_workspace_idx", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_workflow_sync_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_workflow_sync_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_workflow_sync", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_fork_workflow_sync_source_workflow_id_workflow_id_fk": { + "name": "workspace_fork_workflow_sync_source_workflow_id_workflow_id_fk", + "tableFrom": "workspace_fork_workflow_sync", + "tableTo": "workflow", + "columnsFrom": ["source_workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_fork_workflow_sync_target_workflow_id_workflow_id_fk": { + "name": "workspace_fork_workflow_sync_target_workflow_id_workflow_id_fk", + "tableFrom": "workspace_fork_workflow_sync", + "tableTo": "workflow", + "columnsFrom": ["target_workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_operation_receipt": { + "name": "workspace_operation_receipt", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "request_id": { + "name": "request_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "request_hash": { + "name": "request_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "report": { + "name": "report", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_operation_receipt_request_unique": { + "name": "workspace_operation_receipt_request_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "request_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_operation_receipt_workspace_created_idx": { + "name": "workspace_operation_receipt_workspace_created_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_operation_receipt_workspace_id_workspace_id_fk": { + "name": "workspace_operation_receipt_workspace_id_workspace_id_fk", + "tableFrom": "workspace_operation_receipt", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_sandbox": { + "name": "workspace_sandbox", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "language": { + "name": "language", + "type": "sandbox_language", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "dependencies": { + "name": "dependencies", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "cli_tools": { + "name": "cli_tools", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "system_packages": { + "name": "system_packages", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "spec_hash": { + "name": "spec_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_sandbox_workspace_name_unique": { + "name": "workspace_sandbox_workspace_name_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_sandbox_spec_hash_idx": { + "name": "workspace_sandbox_spec_hash_idx", + "columns": [ + { + "expression": "spec_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_sandbox_workspace_id_workspace_id_fk": { + "name": "workspace_sandbox_workspace_id_workspace_id_fk", + "tableFrom": "workspace_sandbox", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_sandbox_created_by_user_id_fk": { + "name": "workspace_sandbox_created_by_user_id_fk", + "tableFrom": "workspace_sandbox", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_visit": { + "name": "workspace_visit", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "visited_at": { + "name": "visited_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_visit_workspace_idx": { + "name": "workspace_visit_workspace_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_visit_user_id_user_id_fk": { + "name": "workspace_visit_user_id_user_id_fk", + "tableFrom": "workspace_visit", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_visit_workspace_id_workspace_id_fk": { + "name": "workspace_visit_workspace_id_workspace_id_fk", + "tableFrom": "workspace_visit", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "workspace_visit_user_id_workspace_id_pk": { + "name": "workspace_visit_user_id_workspace_id_pk", + "columns": ["user_id", "workspace_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.api_key_access": { + "name": "api_key_access", + "schema": "public", + "values": ["read", "write"] + }, + "public.aws_marketplace_license_status": { + "name": "aws_marketplace_license_status", + "schema": "public", + "values": ["pending", "active", "inactive"] + }, + "public.aws_marketplace_usage_report_status": { + "name": "aws_marketplace_usage_report_status", + "schema": "public", + "values": ["pending", "reported", "rejected"] + }, + "public.background_work_kind": { + "name": "background_work_kind", + "schema": "public", + "values": ["deployment_side_effects", "fork_content_copy", "fork_sync", "fork_rollback"] + }, + "public.background_work_status_value": { + "name": "background_work_status_value", + "schema": "public", + "values": ["pending", "processing", "completed", "completed_with_warnings", "failed"] + }, + "public.billing_blocked_reason": { + "name": "billing_blocked_reason", + "schema": "public", + "values": ["payment_failed", "dispute"] + }, + "public.billing_entity_type": { + "name": "billing_entity_type", + "schema": "public", + "values": ["user", "organization"] + }, + "public.chat_type": { + "name": "chat_type", + "schema": "public", + "values": ["mothership", "copilot"] + }, + "public.copilot_async_tool_status": { + "name": "copilot_async_tool_status", + "schema": "public", + "values": ["pending", "running", "completed", "failed", "cancelled", "delivered"] + }, + "public.copilot_run_status": { + "name": "copilot_run_status", + "schema": "public", + "values": ["active", "paused_waiting_for_tool", "resuming", "complete", "error", "cancelled"] + }, + "public.copilot_tool_permission_decision": { + "name": "copilot_tool_permission_decision", + "schema": "public", + "values": ["allow", "allow_chat", "always_allow", "skip"] + }, + "public.credential_group_enrollment_status": { + "name": "credential_group_enrollment_status", + "schema": "public", + "values": ["invited", "delivery_failed", "in_progress", "completed", "revoked"] + }, + "public.credential_group_status": { + "name": "credential_group_status", + "schema": "public", + "values": ["active", "disabled"] + }, + "public.credential_member_role": { + "name": "credential_member_role", + "schema": "public", + "values": ["admin", "member"] + }, + "public.credential_member_status": { + "name": "credential_member_status", + "schema": "public", + "values": ["active", "pending", "revoked"] + }, + "public.credential_type": { + "name": "credential_type", + "schema": "public", + "values": [ + "oauth", + "managed_oauth", + "managed_mcp", + "env_workspace", + "env_personal", + "service_account", + "personal_token" + ] + }, + "public.data_drain_cadence": { + "name": "data_drain_cadence", + "schema": "public", + "values": ["hourly", "daily"] + }, + "public.data_drain_destination": { + "name": "data_drain_destination", + "schema": "public", + "values": [ + "s3", + "gcs", + "azure_blob", + "sentinel", + "datadog", + "bigquery", + "snowflake", + "webhook" + ] + }, + "public.data_drain_run_status": { + "name": "data_drain_run_status", + "schema": "public", + "values": ["running", "success", "failed"] + }, + "public.data_drain_run_trigger": { + "name": "data_drain_run_trigger", + "schema": "public", + "values": ["cron", "manual"] + }, + "public.data_drain_source": { + "name": "data_drain_source", + "schema": "public", + "values": ["workflow_logs", "job_logs", "audit_logs", "copilot_chats", "copilot_runs"] + }, + "public.execution_large_value_reference_source": { + "name": "execution_large_value_reference_source", + "schema": "public", + "values": ["execution_log", "paused_snapshot"] + }, + "public.folder_resource_type": { + "name": "folder_resource_type", + "schema": "public", + "values": ["workflow", "file", "knowledge_base", "table"] + }, + "public.invitation_kind": { + "name": "invitation_kind", + "schema": "public", + "values": ["organization", "workspace"] + }, + "public.invitation_membership_intent": { + "name": "invitation_membership_intent", + "schema": "public", + "values": ["internal", "external"] + }, + "public.invitation_status": { + "name": "invitation_status", + "schema": "public", + "values": ["pending", "accepted", "rejected", "cancelled", "expired"] + }, + "public.managed_oauth_credential_status": { + "name": "managed_oauth_credential_status", + "schema": "public", + "values": ["active", "needs_reauth", "revoked"] + }, + "public.permission_type": { + "name": "permission_type", + "schema": "public", + "values": ["admin", "write", "read"] + }, + "public.sandbox_image_status": { + "name": "sandbox_image_status", + "schema": "public", + "values": ["pending", "building", "ready", "failed"] + }, + "public.sandbox_language": { + "name": "sandbox_language", + "schema": "public", + "values": ["javascript", "python"] + }, + "public.secret_usage_scope": { + "name": "secret_usage_scope", + "schema": "public", + "values": ["workspace", "personal"] + }, + "public.secret_usage_source": { + "name": "secret_usage_source", + "schema": "public", + "values": ["workflow", "copilot", "mcp"] + }, + "public.upload_session_method": { + "name": "upload_session_method", + "schema": "public", + "values": ["put", "multipart"] + }, + "public.upload_session_provider": { + "name": "upload_session_provider", + "schema": "public", + "values": ["local", "s3", "blob", "gcs"] + }, + "public.upload_session_purpose": { + "name": "upload_session_purpose", + "schema": "public", + "values": [ + "workspace_file", + "project_file", + "table_import", + "knowledge_import", + "knowledge_document", + "profile_picture", + "workspace_logo", + "organization_logo", + "mothership_attachment", + "execution_attachment" + ] + }, + "public.upload_session_status": { + "name": "upload_session_status", + "schema": "public", + "values": [ + "uploading", + "completing", + "finalizing", + "completed", + "aborting", + "aborted", + "failed", + "expired" + ] + }, + "public.usage_log_category": { + "name": "usage_log_category", + "schema": "public", + "values": ["model", "fixed", "tool", "model_unbilled"] + }, + "public.usage_log_source": { + "name": "usage_log_source", + "schema": "public", + "values": [ + "workflow", + "wand", + "copilot", + "workspace-chat", + "mcp_copilot", + "mothership_block", + "knowledge-base", + "voice-input", + "enrichment", + "voice-output", + "api-tool", + "workflow-test" + ] + }, + "public.workspace_file_search_index_status": { + "name": "workspace_file_search_index_status", + "schema": "public", + "values": ["pending", "ready", "skipped", "failed"] + }, + "public.workspace_file_version_source": { + "name": "workspace_file_version_source", + "schema": "public", + "values": ["upload", "user", "api", "copilot", "workflow", "collab", "revert", "unknown"] + }, + "public.workspace_fork_promote_direction": { + "name": "workspace_fork_promote_direction", + "schema": "public", + "values": ["push", "pull"] + }, + "public.workspace_fork_resource_type": { + "name": "workspace_fork_resource_type", + "schema": "public", + "values": [ + "workflow", + "oauth_credential", + "service_account_credential", + "env_var", + "table", + "knowledge_base", + "knowledge_document", + "file", + "file_folder", + "mcp_server", + "workflow_mcp_server", + "custom_block", + "custom_tool", + "skill", + "sandbox" + ] + }, + "public.workspace_mode": { + "name": "workspace_mode", + "schema": "public", + "values": ["personal", "organization", "grandfathered_shared"] + } + }, + "schemas": {}, + "sequences": { + "public.copilot_async_tool_calls_persist_seq": { + "name": "copilot_async_tool_calls_persist_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": "1", + "cycle": false + } + }, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} diff --git a/packages/db/migrations/meta/_journal.json b/packages/db/migrations/meta/_journal.json index 6171b4f0f41..00fa9a7a352 100644 --- a/packages/db/migrations/meta/_journal.json +++ b/packages/db/migrations/meta/_journal.json @@ -3214,6 +3214,13 @@ "when": 1794693371836, "tag": "0459_inbox_task_sender_authenticated", "breakpoints": true + }, + { + "idx": 460, + "version": "7", + "when": 1794802862619, + "tag": "0460_workflow_code_meta", + "breakpoints": true } ] } diff --git a/packages/db/schema.ts b/packages/db/schema.ts index 8506f13c0ac..966ec4d2e9c 100644 --- a/packages/db/schema.ts +++ b/packages/db/schema.ts @@ -454,6 +454,13 @@ export const workflow = pgTable( lastRunAt: timestamp('last_run_at'), variables: json('variables').default('{}'), archivedAt: timestamp('archived_at'), + /** + * Source-form facts the graph does not hold (each block's TS binding, declaration order, and + * comments), keyed by block id so canvas edits never orphan them. Shape and validator: + * `WorkflowCodeMetaV1` / `parseCodeMeta` in `@sim/workflow-code/code-meta`. Not part of the + * workflow state, so it never counts as a deploy change. `null` until a source is applied. + */ + codeMeta: jsonb('code_meta'), }, (table) => ({ workspaceIdIdx: index('workflow_workspace_id_idx').on(table.workspaceId), diff --git a/packages/testing/src/mocks/schema-tables.generated.ts b/packages/testing/src/mocks/schema-tables.generated.ts index f13a55f3a3d..05dfaff17c2 100644 --- a/packages/testing/src/mocks/schema-tables.generated.ts +++ b/packages/testing/src/mocks/schema-tables.generated.ts @@ -90,6 +90,7 @@ export const GENERATED_SCHEMA_TABLES = { 'lastRunAt', 'variables', 'archivedAt', + 'codeMeta', ], workflowBlocks: [ 'id', From c533e58de83b38fa1abe564e33a9657a13c8a47a Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:23:10 -0800 Subject: [PATCH 052/428] feat(workflows): read, write and prune workflow code_meta wherever blocks or variables are deleted --- apps/realtime/src/database/operations.ts | 11 +++ bun.lock | 1 + packages/workflow-persistence/package.json | 5 + .../workflow-persistence/src/code-meta.ts | 96 +++++++++++++++++++ packages/workflow-persistence/src/save.ts | 4 + 5 files changed, 117 insertions(+) create mode 100644 packages/workflow-persistence/src/code-meta.ts diff --git a/apps/realtime/src/database/operations.ts b/apps/realtime/src/database/operations.ts index 5c94e3c6676..57977ca88f2 100644 --- a/apps/realtime/src/database/operations.ts +++ b/apps/realtime/src/database/operations.ts @@ -24,6 +24,7 @@ import { WORKFLOW_OPERATIONS, } from '@sim/realtime-protocol/constants' import { randomFloat } from '@sim/utils/random' +import { pruneWorkflowCodeMeta } from '@sim/workflow-persistence/code-meta' import { loadWorkflowFromNormalizedTablesRaw } from '@sim/workflow-persistence/load' import { mergeSubBlockValues } from '@sim/workflow-persistence/subblocks' import type { DbOrTx } from '@sim/workflow-persistence/types' @@ -1271,6 +1272,10 @@ async function handleBlocksOperationTx( await updateSubflowNodeList(tx, workflowId, parentId) } + await pruneWorkflowCodeMeta(tx, workflowId, { + blocks: (id) => !allBlocksToDelete.has(id), + }) + logger.info( `Successfully batch removed ${blockIdsArray.length} blocks from workflow ${workflowId}` ) @@ -2152,6 +2157,9 @@ async function handleVariableOperationTx( updatedAt: new Date(), }) .where(eq(workflow.id, workflowId)) + await pruneWorkflowCodeMeta(tx, workflowId, { + variables: (id) => id !== payload.variableId, + }) logger.debug(`Removed variable ${payload.variableId} from workflow ${workflowId}`) break @@ -2243,6 +2251,9 @@ async function handleWorkflowOperationTx( if (blockValues.length > 0) { await tx.insert(workflowBlocks).values(blockValues) } + await pruneWorkflowCodeMeta(tx, workflowId, { + blocks: (id) => Object.hasOwn(merged.blocks, id), + }) if (merged.edges.length > 0) { const canonicalEdges = merged.edges.map(canonicalizeEdgeAddCandidate) diff --git a/bun.lock b/bun.lock index cc318f7cd77..76f6d4c31b0 100644 --- a/bun.lock +++ b/bun.lock @@ -869,6 +869,7 @@ "@sim/db": "workspace:*", "@sim/logger": "workspace:*", "@sim/utils": "workspace:*", + "@sim/workflow-code": "workspace:*", "@sim/workflow-types": "workspace:*", "drizzle-orm": "^0.45.4", }, diff --git a/packages/workflow-persistence/package.json b/packages/workflow-persistence/package.json index b2089f0d5cd..05350a13b58 100644 --- a/packages/workflow-persistence/package.json +++ b/packages/workflow-persistence/package.json @@ -10,6 +10,10 @@ "node": ">=20.0.0" }, "exports": { + "./code-meta": { + "types": "./src/code-meta.ts", + "default": "./src/code-meta.ts" + }, "./load": { "types": "./src/load.ts", "default": "./src/load.ts" @@ -44,6 +48,7 @@ "@sim/db": "workspace:*", "@sim/logger": "workspace:*", "@sim/utils": "workspace:*", + "@sim/workflow-code": "workspace:*", "@sim/workflow-types": "workspace:*", "drizzle-orm": "^0.45.4" }, diff --git a/packages/workflow-persistence/src/code-meta.ts b/packages/workflow-persistence/src/code-meta.ts new file mode 100644 index 00000000000..7c6edd271c7 --- /dev/null +++ b/packages/workflow-persistence/src/code-meta.ts @@ -0,0 +1,96 @@ +/** + * Reads and writes `workflow.code_meta` (`WorkflowCodeMetaV1`): the bindings, declaration order + * and comments a workflow's source form keeps beside its graph, keyed by block id. It lives on the + * workflow row, not in the normalized state, so it never counts as a deploy change. + * + * Shared by apps/sim and apps/realtime, so every path that deletes blocks or variables can prune + * their entries in the same transaction. Readers still tolerate stale ids. + */ + +import { workflow } from '@sim/db' +import { createLogger } from '@sim/logger' +import { + codeMetaEquals, + isEmptyCodeMeta, + parseCodeMeta, + pruneCodeMeta, + type WorkflowCodeMetaV1, +} from '@sim/workflow-code/code-meta' +import { and, eq, sql } from 'drizzle-orm' +import type { DbOrTx } from './types' + +const logger = createLogger('WorkflowCodeMeta') + +/** + * Validates a stored value. An invalid value reads as `null` (and is logged), so one corrupt + * entry degrades to derived bindings and order instead of failing a read. + */ +export function readCodeMetaValue(workflowId: string, stored: unknown): WorkflowCodeMetaV1 | null { + if (stored === null || stored === undefined) return null + const parsed = parseCodeMeta(stored) + if (parsed.meta) return parsed.meta + logger.warn('Ignoring invalid workflow code_meta', { + workflowId, + codes: parsed.diagnostics.map((diagnostic) => diagnostic.code), + }) + return null +} + +/** The workflow's `code_meta`, or `null` when it has none or the stored value is invalid. */ +export async function readWorkflowCodeMeta( + executor: DbOrTx, + workflowId: string +): Promise { + const [row] = await executor + .select({ codeMeta: workflow.codeMeta }) + .from(workflow) + .where(eq(workflow.id, workflowId)) + .limit(1) + return row ? readCodeMetaValue(workflowId, row.codeMeta) : null +} + +/** Stores `meta`; an empty value is stored as `null`, so untouched workflows stay `null`. */ +export async function writeWorkflowCodeMeta( + executor: DbOrTx, + workflowId: string, + meta: WorkflowCodeMetaV1 | null +): Promise { + await executor + .update(workflow) + .set({ codeMeta: meta && !isEmptyCodeMeta(meta) ? meta : null }) + .where(eq(workflow.id, workflowId)) +} + +/** + * Drops the entries of blocks and variables that no longer exist. Call it inside the transaction + * that deletes them. A workflow without `code_meta` costs one primary-key read and no write. + * + * The write is a compare-and-set on the value just read: when another writer replaced + * `code_meta` in between, its value wins and this prune is skipped (stale ids are harmless, + * every reader filters by the stored graph). + */ +export async function pruneWorkflowCodeMeta( + executor: DbOrTx, + workflowId: string, + live: { blocks?: (id: string) => boolean; variables?: (id: string) => boolean } +): Promise { + const [row] = await executor + .select({ codeMeta: workflow.codeMeta }) + .from(workflow) + .where(eq(workflow.id, workflowId)) + .limit(1) + if (!row || row.codeMeta === null) return + const meta = readCodeMetaValue(workflowId, row.codeMeta) + if (!meta) return + const pruned = pruneCodeMeta(meta, live) + if (codeMetaEquals(pruned, meta)) return + await executor + .update(workflow) + .set({ codeMeta: isEmptyCodeMeta(pruned) ? null : pruned }) + .where( + and( + eq(workflow.id, workflowId), + sql`${workflow.codeMeta} = ${JSON.stringify(row.codeMeta)}::jsonb` + ) + ) +} diff --git a/packages/workflow-persistence/src/save.ts b/packages/workflow-persistence/src/save.ts index 3133ac9c52d..913a13ede9a 100644 --- a/packages/workflow-persistence/src/save.ts +++ b/packages/workflow-persistence/src/save.ts @@ -9,6 +9,7 @@ import { } from '@sim/workflow-types/workflow' import type { InferInsertModel } from 'drizzle-orm' import { eq } from 'drizzle-orm' +import { pruneWorkflowCodeMeta } from './code-meta' import { generateLoopBlocks, generateParallelBlocks } from './subflow-helpers' import type { DbOrTx } from './types' @@ -99,6 +100,9 @@ export async function saveWorkflowToNormalizedTables( if (subflowInserts.length > 0) { await tx.insert(workflowSubflows).values(subflowInserts) } + + const savedBlockIds = new Set(Object.keys(state.blocks)) + await pruneWorkflowCodeMeta(tx, workflowId, { blocks: (id) => savedBlockIds.has(id) }) } if (externalTx) { From 508c087e08f0b2a87ba9bc458b1b72c0755734c9 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:23:03 -0800 Subject: [PATCH 053/428] fix(workflow-code): keep __proto__, constructor and prototype keys as data through canonicalize and print Block, variable, subBlock and data keys from stored state are now written with a prototype-safe setOwn (moved to src/records.ts) and read back with getOwn, so a block or variable named __proto__ is no longer dropped and an absent 'constructor' key no longer reads the inherited function. The proof arbitraries and adversarial fragments now draw these names. --- .../src/canonicalize/branches.ts | 5 +- .../src/canonicalize/hostile.test.ts | 113 ++++++++++++++++++ .../workflow-code/src/canonicalize/index.ts | 26 ++-- .../workflow-code/src/canonicalize/params.ts | 13 +- .../workflow-code/src/canonicalize/tools.ts | 7 +- .../workflow-code/src/canonicalize/values.ts | 5 +- packages/workflow-code/src/compile/blocks.ts | 2 +- packages/workflow-code/src/compile/edges.ts | 3 +- packages/workflow-code/src/compile/index.ts | 3 +- packages/workflow-code/src/compile/tools.ts | 2 +- packages/workflow-code/src/compile/values.ts | 11 +- packages/workflow-code/src/print/printer.ts | 40 ++++--- .../workflow-code/src/proof/arbitraries.ts | 30 +++-- packages/workflow-code/src/proof/oracles.ts | 13 +- packages/workflow-code/src/records.ts | 24 ++++ 15 files changed, 224 insertions(+), 73 deletions(-) create mode 100644 packages/workflow-code/src/canonicalize/hostile.test.ts create mode 100644 packages/workflow-code/src/records.ts diff --git a/packages/workflow-code/src/canonicalize/branches.ts b/packages/workflow-code/src/canonicalize/branches.ts index ab34827b8ef..0281fb80a0b 100644 --- a/packages/workflow-code/src/canonicalize/branches.ts +++ b/packages/workflow-code/src/canonicalize/branches.ts @@ -1,5 +1,6 @@ import { isRecordLike } from '@sim/utils/object' import type { BlockKey, BranchKey, CanonicalBranches, CanonicalBranchRow, Json } from '../model' +import { setOwn } from '../records' import { type CanonContext, report } from './context' import { toJson, toValue } from './values' @@ -206,11 +207,11 @@ export function liftBranches( const extra: Record = {} for (const [field, value] of Object.entries(stored)) { if (MODELED_ROW_KEYS.has(field) || UI_ROW_KEYS.has(field) || value === undefined) continue - extra[field] = toJson(value) + setOwn(extra, field, toJson(value)) } if (Object.keys(extra).length > 0) row.extra = extra rows.push(row) - ids[key] = rowIds[index] + setOwn(ids, key, rowIds[index]) if (!keyByRowId.has(rowIds[index])) keyByRowId.set(rowIds[index], key) }) return { branches: { kind, rows }, ids, keyByRowId } diff --git a/packages/workflow-code/src/canonicalize/hostile.test.ts b/packages/workflow-code/src/canonicalize/hostile.test.ts new file mode 100644 index 00000000000..d14cf75776a --- /dev/null +++ b/packages/workflow-code/src/canonicalize/hostile.test.ts @@ -0,0 +1,113 @@ +import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' +import { describe, expect, it } from 'vitest' +import { compileWorkflow } from '../compile' +import { canonicalEquals } from '../equivalence' +import { catalog } from '../print/__fixtures__/catalog' +import { printWorkflow } from '../print/printer' +import { canonicalize } from '.' + +/** + * Stored names and keys that collide with `Object.prototype` members. A plain `record[key] = v` + * write drops `__proto__` (it sets the prototype instead) and a plain read of an absent + * `constructor` returns the inherited function, so each must survive canonicalize, print and + * compile as data. + */ +const PROTOTYPE_NAMES = ['__proto__', 'constructor', 'prototype'] as const + +function storedBlock(id: string, type: string, name: string, extra: Partial = {}) { + return { + id, + type, + name, + position: { x: 0, y: 0 }, + subBlocks: {}, + outputs: {}, + enabled: true, + ...extra, + } as BlockState +} + +function hostileState(): WorkflowState { + const blocks: Record = {} + const variables: Record = {} + Object.defineProperty(blocks, 'start', { + value: storedBlock('start', 'start_trigger', 'Start'), + enumerable: true, + }) + const edges: WorkflowState['edges'] = [] + for (const name of PROTOTYPE_NAMES) { + Object.defineProperty(blocks, name, { + value: storedBlock(name, 'agent', name, { + subBlocks: { model: { id: 'model', type: 'combobox', value: 'gpt-4o' } }, + }), + enumerable: true, + }) + edges.push({ + id: `edge-${name}`, + source: 'start', + target: name, + sourceHandle: 'source', + targetHandle: 'target', + }) + Object.defineProperty(variables, name, { + value: { id: name, name, type: 'string', value: `value of ${name}` }, + enumerable: true, + }) + } + return { blocks, edges, loops: {}, parallels: {}, variables } as unknown as WorkflowState +} + +describe('canonicalize: prototype-named keys', () => { + it('keeps blocks and variables named like Object.prototype members through print and compile', () => { + const canonical = canonicalize(hostileState(), { + catalog, + meta: { name: 'Hostile', description: null }, + }) + for (const name of PROTOTYPE_NAMES) { + expect(Object.hasOwn(canonical.workflow.blocks, name)).toBe(true) + expect(Object.hasOwn(canonical.workflow.variables, name)).toBe(true) + expect(Object.hasOwn(canonical.identity.blocks, name)).toBe(true) + expect(Object.hasOwn(canonical.identity.variables, name)).toBe(true) + expect(Object.hasOwn(canonical.layout, name)).toBe(true) + } + + const printed = printWorkflow({ + workflow: canonical.workflow, + catalog, + options: { functionCode: 'inline' }, + }) + const entry = printed.files[0] + const compiled = compileWorkflow({ entry, files: new Map(), catalog, sdkMajor: 1 }) + expect(compiled.diagnostics.filter((d) => d.severity === 'error')).toEqual([]) + expect(compiled.workflow).not.toBeNull() + if (!compiled.workflow) return + expect(canonicalEquals(compiled.workflow, canonical.workflow)).toBe(true) + }) + + it('keeps a stored subBlock id and a data key named __proto__', () => { + const subBlocks = JSON.parse( + '{"__proto__":{"id":"__proto__","type":"short-input","value":"kept"}}' + ) + const data = JSON.parse('{"__proto__":{"kept":true}}') + const state = { + blocks: { + start: storedBlock('start', 'start_trigger', 'Start'), + call: storedBlock('call', 'api', 'Call', { subBlocks, data }), + }, + edges: [], + loops: {}, + parallels: {}, + variables: {}, + } as unknown as WorkflowState + const canonical = canonicalize(state, { + catalog, + meta: { name: 'Hostile', description: null }, + }) + const call = canonical.workflow.blocks.call + expect(Object.hasOwn(call.params, '__proto__')).toBe(true) + expect(Object.hasOwn(call.opaque?.data ?? {}, '__proto__')).toBe(true) + expect(Object.getOwnPropertyDescriptor(call.opaque?.data ?? {}, '__proto__')?.value).toEqual({ + kept: true, + }) + }) +}) diff --git a/packages/workflow-code/src/canonicalize/index.ts b/packages/workflow-code/src/canonicalize/index.ts index adbb8984e84..f919d177982 100644 --- a/packages/workflow-code/src/canonicalize/index.ts +++ b/packages/workflow-code/src/canonicalize/index.ts @@ -21,6 +21,7 @@ import type { SubBlockId, VarKey, } from '../model' +import { setOwn } from '../records' import { isInactive } from './activity' import { type LiftedBranches, liftBranches } from './branches' import { type CanonContext, catalogBlock, report } from './context' @@ -65,7 +66,8 @@ function canonicalModeOverrides(data: Record): CanonicalModeOve if (!isRecordLike(stored)) return undefined const overrides: CanonicalModeOverrides = {} for (const [id, mode] of Object.entries(stored)) { - if (typeof mode === 'string' && MODES.has(mode)) overrides[id] = mode as 'basic' | 'advanced' + if (typeof mode === 'string' && MODES.has(mode)) + setOwn(overrides, id, mode as 'basic' | 'advanced') } return overrides } @@ -200,17 +202,17 @@ export const canonicalize: CanonicalizeFn = (state, options) => { context ) if (lifted && 'unliftedValue' in lifted && catalog?.graph.branches) { - params[catalog.graph.branches.subBlockId] = { + setOwn(params, catalog.graph.branches.subBlockId, { kind: 'value', value: toValue(lifted.unliftedValue, context), - } + }) } const advancedMode = block.advancedMode === true const triggerMode = block.triggerMode === true const rawValues: Record = {} for (const [subBlockId, subBlock] of Object.entries(block.subBlocks ?? {})) { - rawValues[subBlockId] = isRecordLike(subBlock) ? subBlock.value : undefined + setOwn(rawValues, subBlockId, isRecordLike(subBlock) ? subBlock.value : undefined) } const canonical: CanonicalBlock = { @@ -249,7 +251,7 @@ export const canonicalize: CanonicalizeFn = (state, options) => { if (dataKey === 'extent' && value === 'parent' && parent !== null) continue if (dataKey === 'canonicalModes' && isModeMap(value)) continue if (isContainer && SUBFLOW_DATA_KEYS.has(dataKey) && !rejectedDataKeys.has(dataKey)) continue - opaqueData[dataKey] = toJson(value) + setOwn(opaqueData, dataKey, toJson(value)) } if (Object.keys(opaqueData).length > 0) canonical.opaque = { data: opaqueData } @@ -267,28 +269,28 @@ export const canonicalize: CanonicalizeFn = (state, options) => { const inactiveIds = Object.keys(params).filter((paramId) => isInactive(paramId, activityInputs) ) - if (inactiveIds.length > 0) inactive[key] = inactiveIds + if (inactiveIds.length > 0) setOwn(inactive, key, inactiveIds) } - canonicalBlocks[key] = canonical + setOwn(canonicalBlocks, key, canonical) const identityBlock: LockIdentityBlock = { id, parent } if (lifted && Object.keys(lifted.ids).length > 0) identityBlock.branches = lifted.ids if (Object.keys(items).length > 0) identityBlock.items = items - identity.blocks[key] = identityBlock - layout[key] = layoutOf(block) + setOwn(identity.blocks, key, identityBlock) + setOwn(layout, key, layoutOf(block)) } const variables: Record = {} const storedVariables = Object.values(state.variables ?? {}) variableEntries.forEach((entry, index) => { const variable = storedVariables[index] - variables[entry.key] = { + setOwn(variables, entry.key, { key: entry.key, name: variable.name, type: variable.type, value: toJson(variable.value), - } - identity.variables[entry.key] = entry.id + }) + setOwn(identity.variables, entry.key, entry.id) }) const workflow: CanonicalWorkflow = { diff --git a/packages/workflow-code/src/canonicalize/params.ts b/packages/workflow-code/src/canonicalize/params.ts index c07be14234b..61963935a55 100644 --- a/packages/workflow-code/src/canonicalize/params.ts +++ b/packages/workflow-code/src/canonicalize/params.ts @@ -3,6 +3,7 @@ import type { BlockState } from '@sim/workflow-types/workflow' import type { CanonicalModeOverrides } from '../catalog/canonical-index' import type { CatalogBlock, CatalogSubBlock } from '../catalog/types' import type { BlockKey, CanonicalParam, SubBlockId, Value } from '../model' +import { setOwn } from '../records' import { type CanonContext, report } from './context' import { liftTools } from './tools' import { liftResourceValue, toValue } from './values' @@ -159,7 +160,7 @@ function liftVariableAssignments( if (key === 'variableId' && typeof member === 'string') { const variableKey = context.variableKeyById.get(member) if (variableKey !== undefined) { - result[key] = { $sim: 'var', key: variableKey } + setOwn(result, key, { $sim: 'var', key: variableKey }) } else { report(context, { code: 'W_CANON_UNRESOLVED_ID', @@ -168,11 +169,11 @@ function liftVariableAssignments( blockKey, param, }) - result[key] = { $sim: 'unresolved', kind: 'var', id: member } + setOwn(result, key, { $sim: 'unresolved', kind: 'var', id: member }) } continue } - result[key] = liftVariableAssignments(member, blockKey, param, context) + setOwn(result, key, liftVariableAssignments(member, blockKey, param, context)) } return result } @@ -229,7 +230,7 @@ export function canonicalParams(inputs: ParamInputs, context: CanonContext): Par if (declaration?.structured === 'tools' && Array.isArray(decoded)) { const tools = liftTools(decoded, overrides, blockKey, id, context) if (tools) { - params[id] = { kind: 'tools', tools } + setOwn(params, id, { kind: 'tools', tools }) continue } } @@ -237,7 +238,7 @@ export function canonicalParams(inputs: ParamInputs, context: CanonContext): Par if (declaration?.structured === 'inputFormat' && Array.isArray(decoded)) { const lifted = liftInputFormat(decoded, context) value = lifted.value - if (lifted.items.length > 0) items[id] = lifted.items + if (lifted.items.length > 0) setOwn(items, id, lifted.items) } else if (declaration?.structured === 'tableRows' && Array.isArray(decoded)) { value = liftTableRows(decoded, context) } else if (declaration?.structured === 'variables') { @@ -254,7 +255,7 @@ export function canonicalParams(inputs: ParamInputs, context: CanonContext): Par } else { value = toValue(decoded, context) } - params[id] = { kind: 'value', value } + setOwn(params, id, { kind: 'value', value }) } return { params, items } } diff --git a/packages/workflow-code/src/canonicalize/tools.ts b/packages/workflow-code/src/canonicalize/tools.ts index 454cdecc8c9..ace4a4bf496 100644 --- a/packages/workflow-code/src/canonicalize/tools.ts +++ b/packages/workflow-code/src/canonicalize/tools.ts @@ -2,6 +2,7 @@ import { isRecordLike, toRecord } from '@sim/utils/object' import { type CanonicalModeOverrides, scopeCanonicalModesForTool } from '../catalog/canonical-index' import type { CatalogSubBlock } from '../catalog/types' import type { BlockKey, CanonicalTool, Json, Value } from '../model' +import { setOwn } from '../records' import { type CanonContext, catalogBlock } from './context' import { effectiveModes } from './modes' import { liftResourceId, liftResourceValue, toJson, toValue } from './values' @@ -129,7 +130,7 @@ function liftTool( subBlock?.valueKind === 'resource' && subBlock.resourceKind ? liftResourceValue(subBlock.resourceKind, decoded, context, location, subBlock.multiple) : undefined - params[key] = lifted ?? toValue(decoded, context) + setOwn(params, key, lifted ?? toValue(decoded, context)) } const explicit = scopeCanonicalModesForTool(overrides, index, type) @@ -171,7 +172,7 @@ function liftTool( // s1 quirk 24: `isExpanded` is editor state and is dropped. for (const [key, value] of Object.entries(stored)) { - if (!MODELED_KEYS.has(key) && value !== undefined) extra[key] = toJson(value) + if (!MODELED_KEYS.has(key) && value !== undefined) setOwn(extra, key, toJson(value)) } if (Object.keys(extra).length > 0) tool.extra = extra return tool @@ -180,7 +181,7 @@ function liftTool( function definedModes(overrides: CanonicalModeOverrides | undefined): CanonicalTool['modes'] { const modes: CanonicalTool['modes'] = {} for (const [id, mode] of Object.entries(overrides ?? {})) { - if (mode) modes[id] = mode + if (mode) setOwn(modes, id, mode) } return modes } diff --git a/packages/workflow-code/src/canonicalize/values.ts b/packages/workflow-code/src/canonicalize/values.ts index ce1c20ca77e..70a23244b85 100644 --- a/packages/workflow-code/src/canonicalize/values.ts +++ b/packages/workflow-code/src/canonicalize/values.ts @@ -5,6 +5,7 @@ import { } from '@sim/utils/workflow-references' import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' import type { Json, ResourceKind, ResourceNode, UnresolvedNode, Value } from '../model' +import { setOwn } from '../records' import { type CanonContext, report } from './context' /** The executor's candidate pattern (`createReferencePattern`); each match is then vetted. */ @@ -23,7 +24,7 @@ export function toJson(value: unknown): Json { if (isRecordLike(value)) { const result: Record = {} for (const [key, member] of Object.entries(value)) { - if (member !== undefined) result[key] = toJson(member) + if (member !== undefined) setOwn(result, key, toJson(member)) } return result } @@ -82,7 +83,7 @@ export function toValue(value: unknown, context: CanonContext): Value { if (Object.hasOwn(value, '$sim')) return { $sim: 'literal', value: toJson(value) } const result: Record = {} for (const [key, member] of Object.entries(value)) { - if (member !== undefined) result[key] = toValue(member, context) + if (member !== undefined) setOwn(result, key, toValue(member, context)) } return result } diff --git a/packages/workflow-code/src/compile/blocks.ts b/packages/workflow-code/src/compile/blocks.ts index a6536429a7a..de6042ef9c7 100644 --- a/packages/workflow-code/src/compile/blocks.ts +++ b/packages/workflow-code/src/compile/blocks.ts @@ -17,6 +17,7 @@ import type { SubBlockId, Value, } from '../model' +import { setOwn } from '../records' import { type BlockDecl, type CompileContext, rangeOf, recordSpan } from './context' import { didYouMean } from './hints' import { compileToolList } from './tools' @@ -37,7 +38,6 @@ import { isSelectorForm, literalText, objectEntries, - setOwn, type ValueSite, } from './values' diff --git a/packages/workflow-code/src/compile/edges.ts b/packages/workflow-code/src/compile/edges.ts index 08f178a79ae..298ba0a470d 100644 --- a/packages/workflow-code/src/compile/edges.ts +++ b/packages/workflow-code/src/compile/edges.ts @@ -5,6 +5,7 @@ import { } from '@sim/workflow-types/workflow' import { portKey } from '../anchors' import type { AnchorKey, CanonicalBlock, CanonicalEdge, Port } from '../model' +import { setOwn } from '../records' import { type BlockDecl, type CompileContext, @@ -17,7 +18,7 @@ import { type WiringStatement, } from './context' import { HINTS, hintForNode } from './hints' -import { literalText, setOwn } from './values' +import { literalText } from './values' /** A wiring source: a block and, when written explicitly, the port (`cond.key`, `p.start`). */ interface Endpoint { diff --git a/packages/workflow-code/src/compile/index.ts b/packages/workflow-code/src/compile/index.ts index 1d0104595c0..4480a70bef6 100644 --- a/packages/workflow-code/src/compile/index.ts +++ b/packages/workflow-code/src/compile/index.ts @@ -13,6 +13,7 @@ import type { SubBlockId, VarKey, } from '../model' +import { setOwn } from '../records' import { compileBlock } from './blocks' import { CommentCollector } from './comments' import { type CompileContext, rangeOf, recordSpan, type Scope } from './context' @@ -21,7 +22,7 @@ import { didYouMean, HINTS, hintForNode } from './hints' import { DEFAULT_LIMITS, parseWorkflowSource } from './parse' import { Reporter } from './report' import { collectBody } from './scope' -import { compileJsonLiteral, literalText, objectEntries, setOwn } from './values' +import { compileJsonLiteral, literalText, objectEntries } from './values' const SDK_MODULE = '@sim/workflow-sdk' const VARIABLE_TYPES: ReadonlySet = new Set([ diff --git a/packages/workflow-code/src/compile/tools.ts b/packages/workflow-code/src/compile/tools.ts index becbdd6e579..34a0a0aedb1 100644 --- a/packages/workflow-code/src/compile/tools.ts +++ b/packages/workflow-code/src/compile/tools.ts @@ -1,6 +1,7 @@ import type { CallExpression, Node } from '@babel/types' import { isRecordLike, toRecordOrNull } from '@sim/utils/object' import type { CanonicalTool, Json, ParamMode, ResourceNode, UnresolvedNode, Value } from '../model' +import { setOwn } from '../records' import { type CompileContext, lookup, rangeOf } from './context' import { didYouMean, hintForNode } from './hints' import { @@ -10,7 +11,6 @@ import { compileValue, literalText, objectEntries, - setOwn, type ValueSite, } from './values' diff --git a/packages/workflow-code/src/compile/values.ts b/packages/workflow-code/src/compile/values.ts index ae7f91296e6..05cddc2f8c2 100644 --- a/packages/workflow-code/src/compile/values.ts +++ b/packages/workflow-code/src/compile/values.ts @@ -19,6 +19,7 @@ import { type RefSegment, } from '../code-files/ref-path' import type { Json, ResourceKind, Value, VarNode } from '../model' +import { setOwn } from '../records' import { type BlockDecl, type CompileContext, @@ -131,16 +132,6 @@ function rejectNode(ctx: CompileContext, node: Node, site?: ValueSite): null { ) } -/** Sets an own enumerable property, so a `__proto__` key is data and never a prototype. */ -export function setOwn(target: Record, key: string, value: T): void { - Object.defineProperty(target, key, { - value, - enumerable: true, - writable: true, - configurable: true, - }) -} - /** The literal text of a property key, or `null` (after reporting) for a computed key. */ export function propertyKey(ctx: CompileContext, property: ObjectProperty): string | null { if (property.computed) { diff --git a/packages/workflow-code/src/print/printer.ts b/packages/workflow-code/src/print/printer.ts index 2eec0c2783c..35f9b3acaa2 100644 --- a/packages/workflow-code/src/print/printer.ts +++ b/packages/workflow-code/src/print/printer.ts @@ -24,6 +24,7 @@ import type { PortKey, Value, } from '../model' +import { getOwn, setOwn } from '../records' import { GENERIC_BUILDER } from '../sdk' import { type AttachedComments, anchors, CommentPlacer, withComments } from './comments' import { type Doc, group, hardline, ifBreak, indent, join, line, printDoc } from './doc' @@ -61,12 +62,12 @@ function isAdvancedMember(sb: CatalogSubBlock): boolean { } function stringParam(block: CanonicalBlock, id: string): string | undefined { - const param = block.params[id] + const param = getOwn(block.params, id) return param?.kind === 'value' && typeof param.value === 'string' ? param.value : undefined } function hasValue(block: CanonicalBlock, id: string): boolean { - return block.params[id] !== undefined + return getOwn(block.params, id) !== undefined } /** @@ -306,7 +307,7 @@ class WorkflowPrinter { return { key, isTrigger: block ? this.isTrigger(block) : false, - order: this.hints.blocks[key]?.order, + order: getOwn(this.hints.blocks, key)?.order, } }), dependencies @@ -329,7 +330,7 @@ class WorkflowPrinter { this.preorder.map((key) => ({ key, name: this.blocks.get(key)?.name ?? key, - hint: this.hints.blocks[key]?.binding, + hint: getOwn(this.hints.blocks, key)?.binding, })), reserved ) @@ -399,7 +400,7 @@ class WorkflowPrinter { id: string, sb: CatalogSubBlock | undefined ): PrintedValue | null { - const param = block.params[id] + const param = getOwn(block.params, id) if (!param) return null if (param.kind === 'tools') return this.printTools(block, param.tools) const context = this.context(block, catalogBlock, sb) @@ -469,7 +470,7 @@ class WorkflowPrinter { return inline('the code-file round trip did not reproduce the stored code') } const extension = LANGUAGE_EXTENSIONS[language] - const hinted = this.hints.blocks[block.key]?.codeFile + const hinted = getOwn(this.hints.blocks, block.key)?.codeFile const dir = (this.options.codeDir ?? DEFAULT_CODE_DIR).replace(/\/+$/, '') let path = hinted?.endsWith(`.${extension}`) && !this.takenCodePaths.has(hinted) @@ -489,10 +490,10 @@ class WorkflowPrinter { private printTools(block: CanonicalBlock, tools: CanonicalTool[]): PrintedValue { const elements = tools.map((tool) => { - const catalogBlock = this.catalog.blocks[tool.type] + const catalogBlock = getOwn(this.catalog.blocks, tool.type) const found = findBuilder(this.catalog, tool.type, false, (id) => { if (id === 'operation') return tool.operation - const value = tool.params[id] + const value = getOwn(tool.params, id) return typeof value === 'string' ? value : undefined }) if (!found) return this.values.call('raw', [this.values.json(tool as unknown as Json)]) @@ -556,7 +557,10 @@ class WorkflowPrinter { return objectExpr( Object.keys(modes) .sort(compareStrings) - .map((cid) => ({ key: printKey(cid), value: this.values.string(modes[cid] ?? 'basic') })) + .map((cid) => ({ + key: printKey(cid), + value: this.values.string(getOwn(modes, cid) ?? 'basic'), + })) ) } @@ -576,7 +580,7 @@ class WorkflowPrinter { const handled = new Set(pinned) const branchId = catalogBlock?.graph.branches?.subBlockId if (branchId) handled.add(branchId) - const inactiveIds = new Set(this.workflow.annotations.inactive[block.key] ?? []) + const inactiveIds = new Set(getOwn(this.workflow.annotations.inactive, block.key) ?? []) const pushInactive = (id: string, sb: CatalogSubBlock | undefined) => { const value = this.printParamValue(block, catalogBlock, id, sb) if (value) @@ -593,7 +597,7 @@ class WorkflowPrinter { if (seenCids.has(cid)) continue seenCids.add(cid) const members = subBlocks.filter((m) => m.canonicalParamId === cid && !pinned.has(m.id)) - const mode: ParamMode = block.modes[cid] ?? 'basic' + const mode: ParamMode = getOwn(block.modes, cid) ?? 'basic' const basic = members.find((m) => !isAdvancedMember(m)) const advanced = members.find(isAdvancedMember) const effective = (mode === 'advanced' ? advanced : basic) ?? members[0] @@ -616,7 +620,7 @@ class WorkflowPrinter { } } const implied: ParamMode = printed ? (printed.selector ? 'basic' : 'advanced') : 'basic' - if (basic && advanced && implied !== mode) modes[cid] = mode + if (basic && advanced && implied !== mode) setOwn(modes, cid, mode) continue } handled.add(sb.id) @@ -660,7 +664,7 @@ class WorkflowPrinter { } for (const cid of Object.keys(block.modes).sort(compareStrings)) { const handledCid = catalogBlock?.subBlocks.some((sb) => sb.canonicalParamId === cid) ?? false - if (!handledCid) modes[cid] = block.modes[cid] ?? 'basic' + if (!handledCid) setOwn(modes, cid, getOwn(block.modes, cid) ?? 'basic') } return { params, inactive, modes } } @@ -757,7 +761,7 @@ class WorkflowPrinter { private blockCall(block: CanonicalBlock): Expr { if (block.subflow) return this.containerCall(block) - const catalogBlock = this.catalog.blocks[block.type] + const catalogBlock = getOwn(this.catalog.blocks, block.type) const found = findBuilder(this.catalog, block.type, block.triggerMode, (id) => stringParam(block, id) ) @@ -805,7 +809,7 @@ class WorkflowPrinter { if (found) { topLevel = this.paramProperties( [...pinned].sort(compareStrings).flatMap((id) => { - const value = block.params[id] + const value = getOwn(block.params, id) return value?.kind === 'value' ? [ { @@ -865,7 +869,7 @@ class WorkflowPrinter { field('distribution', 'collection', spec.distribution, type !== 'count', 't') field('batchSize', 'batchSize', spec.batchSize, true, 't') } - const catalogBlock = this.catalog.blocks[block.type] + const catalogBlock = getOwn(this.catalog.blocks, block.type) const { params, inactive: inactiveParams, @@ -1110,11 +1114,11 @@ class WorkflowPrinter { const hintBlocks: Record = { ...this.hints.blocks } this.preorder.forEach((key, index) => { const codeFile = this.codeFileHints.get(key) - hintBlocks[key] = { + setOwn(hintBlocks, key, { binding: this.idents.get(key) ?? key, order: index, ...(codeFile ? { codeFile } : {}), - } + }) }) return { files: [{ path: ENTRY_PATH, text }, ...this.codeFiles], diff --git a/packages/workflow-code/src/proof/arbitraries.ts b/packages/workflow-code/src/proof/arbitraries.ts index 4ab7a8922a5..3324d5dc831 100644 --- a/packages/workflow-code/src/proof/arbitraries.ts +++ b/packages/workflow-code/src/proof/arbitraries.ts @@ -15,11 +15,15 @@ import { type WorkflowState, } from '@sim/workflow-types/workflow' import fc from 'fast-check' +import { setOwn } from '../records' + +/** Names that collide with `Object.prototype` members when used as a plain-object key. */ +const PROTOTYPE_KEY_NAMES = ['__proto__', 'constructor', 'prototype'] as const /** * Fragments that break naive escaping: a `<` that is not a reference, a reference-looking span, * nested env braces, CRLF, the JS line separators U+2028/U+2029, lone surrogates, backticks, - * template openers and quotes. + * template openers, quotes, and `Object.prototype` member names. */ export const ADVERSARIAL_STRING_FRAGMENTS = [ '<3 ', @@ -43,6 +47,7 @@ export const ADVERSARIAL_STRING_FRAGMENTS = [ '', '', '', + ...PROTOTYPE_KEY_NAMES, ] as const const isUsableName = (name: string): boolean => { @@ -65,12 +70,12 @@ export function adversarialStringArbitrary(): fc.Arbitrary { } /** - * Display names with dots, runs of spaces, mixed case and non-ASCII letters, always with a usable - * normalized key. Two draws can still collide after normalization; use - * {@link uniqueBlockNamesArbitrary} when they must not. + * Display names with dots, runs of spaces, mixed case and non-ASCII letters, plus the exact + * `Object.prototype` member names, always with a usable normalized key. Two draws can still + * collide after normalization; use {@link uniqueBlockNamesArbitrary} when they must not. */ export function blockNameArbitrary(): fc.Arbitrary { - return fc + const wordNames = fc .tuple( fc.constantFrom( 'Agent', @@ -87,6 +92,11 @@ export function blockNameArbitrary(): fc.Arbitrary { fc.nat(30) ) .map(([word, separator, n]) => `${word}${separator}${n}`) + return fc + .oneof( + { weight: 9, arbitrary: wordNames }, + { weight: 1, arbitrary: fc.constantFrom(...PROTOTYPE_KEY_NAMES) } + ) .filter(isUsableName) } @@ -288,7 +298,7 @@ function buildPlannedState(plan: WorkflowPlan, maxDepth: number): WorkflowState whileCondition: loopType === 'while' ? ' <3' : '', doWhileCondition: loopType === 'doWhile' ? ' <3' : '', } - loops[id] = { + setOwn(loops, id, { id, nodes: [], iterations: (variant % 5) + 1, @@ -297,7 +307,7 @@ function buildPlannedState(plan: WorkflowPlan, maxDepth: number): WorkflowState whileCondition: loopType === 'while' ? ' <3' : '', doWhileCondition: loopType === 'doWhile' ? ' <3' : '', enabled: true, - } + }) } else if (kind === 'parallel') { const parallelType = PARALLEL_TYPES[variant % PARALLEL_TYPES.length] ?? 'count' base.data = { @@ -306,17 +316,17 @@ function buildPlannedState(plan: WorkflowPlan, maxDepth: number): WorkflowState count: (variant % 4) + 1, collection: parallelType === 'collection' ? '' : '', } - parallels[id] = { + setOwn(parallels, id, { id, nodes: [], count: (variant % 4) + 1, distribution: parallelType === 'collection' ? '' : '', parallelType, enabled: true, - } + }) } - blocks[id] = base + setOwn(blocks, id, base) } const edges: WorkflowState['edges'] = [] diff --git a/packages/workflow-code/src/proof/oracles.ts b/packages/workflow-code/src/proof/oracles.ts index 8236032da6f..45f56fc39ff 100644 --- a/packages/workflow-code/src/proof/oracles.ts +++ b/packages/workflow-code/src/proof/oracles.ts @@ -13,6 +13,7 @@ import { isRecordLike, omit } from '@sim/utils/object' import { compareStrings, escapeRegExp } from '@sim/utils/string' import { normalizeWorkflowBlockName, type WorkflowState } from '@sim/workflow-types/workflow' import type { CanonicalWorkflow } from '../model' +import { setOwn } from '../records' import { type Difference, findDifferences, firstTextDifference } from './diff' /** The property or oracle a verdict belongs to (s3 §5 P1–P5, s1 §6 O1–O3). */ @@ -152,13 +153,13 @@ export function assertNoErrors( function executionView(serialized: SerializedWorkflowLike) { const blocks: Record = {} for (const block of serialized.blocks) { - blocks[block.id] = { + setOwn(blocks, block.id, { tool: block.config.tool ?? null, enabled: block.enabled ?? true, canonicalModes: block.canonicalModes ?? {}, retry: block.retry ?? null, params: decodeStructured(block.config.params), - } + }) } const connections = serialized.connections .map((c) => @@ -177,9 +178,9 @@ function sortSubflowNodes(subflows: Record): Record = {} for (const [id, config] of Object.entries(subflows)) { if (isRecordLike(config) && Array.isArray(config.nodes)) { - out[id] = { ...config, nodes: config.nodes.map(String).sort(compareStrings) } + setOwn(out, id, { ...config, nodes: config.nodes.map(String).sort(compareStrings) }) } else { - out[id] = config + setOwn(out, id, config) } } return out @@ -201,7 +202,7 @@ export function decodeStructured(value: unknown): unknown { if (Array.isArray(value)) return value.map(decodeStructured) if (isRecordLike(value)) { const out: Record = {} - for (const [key, child] of Object.entries(value)) out[key] = decodeStructured(child) + for (const [key, child] of Object.entries(value)) setOwn(out, key, decodeStructured(child)) return out } return value @@ -297,7 +298,7 @@ function replaceIds(value: unknown, map: Map): unknown { if (Array.isArray(node)) return node.map(walk) if (isRecordLike(node)) { const out: Record = {} - for (const [key, child] of Object.entries(node)) out[swap(key)] = walk(child) + for (const [key, child] of Object.entries(node)) setOwn(out, swap(key), walk(child)) return out } return node diff --git a/packages/workflow-code/src/records.ts b/packages/workflow-code/src/records.ts new file mode 100644 index 00000000000..3cd8b8ba10c --- /dev/null +++ b/packages/workflow-code/src/records.ts @@ -0,0 +1,24 @@ +/** + * Prototype-safe writes for records keyed by stored or authored data. A plain `record[key] = v` + * with `key === '__proto__'` replaces the prototype instead of adding a key, so every write whose + * key comes from a workflow (block keys, variable keys, subBlock ids, `data` keys, JSON members) + * goes through {@link setOwn}. + */ + +/** Sets an own enumerable property, so a `__proto__` key is data and never a prototype. */ +export function setOwn(target: Record, key: string, value: T): void { + Object.defineProperty(target, key, { + value, + enumerable: true, + writable: true, + configurable: true, + }) +} + +/** + * The own value at `key`, or `undefined`. A plain read of an absent `constructor` or `__proto__` + * returns the inherited `Object.prototype` member, so lookups by a stored key use this. + */ +export function getOwn(record: Readonly>, key: string): T | undefined { + return Object.hasOwn(record, key) ? record[key] : undefined +} From 5bee6e8b4b603e788401156e62fd351e8dea1dc8 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:24:03 -0800 Subject: [PATCH 054/428] feat(workflows): get workflow source use case, resource key resolver, and internal + v2 source routes behind workflow-code getWorkflowSource (workflows.source.read, read role, workspace keys allowed) loads the stored migrated graph, builds the per-workflow compile catalog, lifts resource ids to provisional name-derived keys, canonicalizes and prints. It returns files, the assembled lock, lockBase, the sf1 fingerprint, the canonical hash, catalog version and sdk major, with annotateIds and functionCode options. GET /api/v2/workflows/{workflowId}/source serves API callers and GET /api/workflows/[id]/source the canvas (v2 routes take API keys only). Regenerates the route table, OpenAPI, CLI, MCP and CLI docs. --- .../(generated)/workflows/meta.json | 1 + apps/docs/content/docs/cli/reference.mdx | 32 ++ apps/docs/content/docs/cli/workflows.mdx | 32 ++ apps/docs/openapi-v2-workflows.json | 422 ++++++++++++++++++ .../v2/workflows/[workflowId]/source/route.ts | 28 ++ .../app/api/workflows/[id]/source/route.ts | 32 ++ .../contracts/v2/openapi/workflow-source.ts | 68 +++ .../lib/api/contracts/v2/openapi/workflows.ts | 3 +- .../lib/api/contracts/v2/workflow-source.ts | 16 + apps/sim/lib/api/contracts/workflow-source.ts | 129 ++++++ .../lib/api/mcp/generated/v2-operations.ts | 9 + .../server/routes/v2-route-table.generated.ts | 4 + .../application/get-workflow-source.ts | 187 ++++++++ .../lib/workflows/application/operations.ts | 14 + apps/sim/lib/workflows/code/feature-flag.ts | 6 +- apps/sim/lib/workflows/code/resources.ts | 190 ++++++++ packages/sim-cli/src/contract/commands.ts | 4 + packages/sim-cli/src/generated/v2-api.ts | 85 ++++ 18 files changed, 1260 insertions(+), 2 deletions(-) create mode 100644 apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts create mode 100644 apps/sim/app/api/workflows/[id]/source/route.ts create mode 100644 apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts create mode 100644 apps/sim/lib/api/contracts/v2/workflow-source.ts create mode 100644 apps/sim/lib/api/contracts/workflow-source.ts create mode 100644 apps/sim/lib/workflows/application/get-workflow-source.ts create mode 100644 apps/sim/lib/workflows/code/resources.ts diff --git a/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json b/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json index f4b795acb97..61ea4f69103 100644 --- a/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json +++ b/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json @@ -10,6 +10,7 @@ "moveWorkflows", "getWorkflowState", "getWorkflowOutline", + "getWorkflowSource", "replaceWorkflowState", "applyWorkflowOperations", "applyWorkflowVariables", diff --git a/apps/docs/content/docs/cli/reference.mdx b/apps/docs/content/docs/cli/reference.mdx index 7c6b39511d1..dfd69f3be12 100644 --- a/apps/docs/content/docs/cli/reference.mdx +++ b/apps/docs/content/docs/cli/reference.mdx @@ -8261,6 +8261,38 @@ sim workflows outline API request and response schemas: [getWorkflowOutline](/api-reference/workflows/getWorkflowOutline). +### sim workflows source get + +Show a workflow’s draft as TypeScript source with its identity lock + +```bash +sim workflows source get [options] +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `workflowId` | Yes | Unique workflow identifier. | + + + +**Options** + + + +| Option | Required | Description | +| --- | --- | --- | +| `--annotate-ids` | No | Print each block's id as a trailing `// id:` comment on its declaration. | +| `--no-annotate-ids` | No | Send --annotate-ids as false. | +| `--function-code ` | No | Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates. Accepted values: `inline`, `files`. | + + + +API request and response schemas: [getWorkflowSource](/api-reference/workflows/getWorkflowSource). + ### sim workflows state get Get workflow state diff --git a/apps/docs/content/docs/cli/workflows.mdx b/apps/docs/content/docs/cli/workflows.mdx index 2bb27df712c..6fb687bf6a3 100644 --- a/apps/docs/content/docs/cli/workflows.mdx +++ b/apps/docs/content/docs/cli/workflows.mdx @@ -1285,6 +1285,38 @@ sim workflows mkdir API request and response schemas: [createWorkflowFolder](/api-reference/workflows/createWorkflowsFolder). +## Other commands + +### Show a workflow’s draft as TypeScript source with its identity lock + +```bash +sim workflows source get [options] +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `workflowId` | Yes | Unique workflow identifier. | + + + +**Options** + + + +| Option | Required | Description | +| --- | --- | --- | +| `--annotate-ids` | No | Print each block's id as a trailing `// id:` comment on its declaration. | +| `--no-annotate-ids` | No | Send --annotate-ids as false. | +| `--function-code ` | No | Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates. Accepted values: `inline`, `files`. | + + + +API request and response schemas: [getWorkflowSource](/api-reference/workflows/getWorkflowSource). + ## Related docs - [Workflow builder](/workflows) diff --git a/apps/docs/openapi-v2-workflows.json b/apps/docs/openapi-v2-workflows.json index 7918cdc1183..1dbb3bf4cf9 100644 --- a/apps/docs/openapi-v2-workflows.json +++ b/apps/docs/openapi-v2-workflows.json @@ -5907,6 +5907,139 @@ } } }, + "/api/v2/workflows/{workflowId}/source": { + "get": { + "operationId": "getWorkflowSource", + "summary": "Get workflow source", + "description": "Read the saved draft as TypeScript source written against the workflow SDK, with its identity lock and a freshness `fingerprint`. The lock binds each block key in the source to its stored id; `lockBase` records the fingerprint and block catalog the source was read at. The fingerprint ignores canvas positions, so moving blocks does not change it. Workspace resources such as tables and knowledge bases appear as keys derived from their current names, so renaming a resource changes its key; an id that matches no resource in the workspace prints as an unresolved reference. Function-block code goes to `functions/*` files unless `functionCode` is `inline`. This read records no audit event; `HEAD` mirrors `GET`. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.", + "x-sim-operation": "workflows.source.read", + "x-oauth-scope": "api:read", + "tags": ["Workflows"], + "security": [ + { + "apiKey": [] + }, + { + "oauthBearer": ["api:read"] + } + ], + "parameters": [ + { + "name": "workflowId", + "in": "path", + "required": true, + "description": "Unique workflow identifier.", + "schema": { + "type": "string", + "minLength": 1, + "description": "Unique workflow identifier.", + "examples": ["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"] + } + }, + { + "name": "annotateIds", + "in": "query", + "required": false, + "description": "Print each block's id as a trailing `// id:` comment on its declaration.", + "schema": { + "description": "Print each block's id as a trailing `// id:` comment on its declaration.", + "type": "boolean" + } + }, + { + "name": "functionCode", + "in": "query", + "required": false, + "description": "Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates.", + "schema": { + "description": "Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates.", + "type": "string", + "enum": ["inline", "files"] + } + } + ], + "responses": { + "200": { + "description": "The workflow draft as source.", + "headers": { + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetWorkflowSourceResponse" + }, + "examples": { + "example1": { + "summary": "Response example 1", + "value": { + "data": { + "workflowId": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "files": { + "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" + }, + "lock": { + "lockVersion": 1, + "blocks": { + "start": { + "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "parent": null, + "binding": "start", + "order": 0 + } + }, + "variables": {} + }, + "lockBase": { + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" + }, + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "canonicalHash": "0d6e2b8a4c1f7e3d9b5a2c8f4e1d7b3a9c6f2e8d4b1a7c3e9f5d2b8a4c1e7f3d", + "catalogVersion": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a", + "sdkMajor": 1, + "warnings": [] + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "429": { + "$ref": "#/components/responses/RateLimited" + }, + "500": { + "$ref": "#/components/responses/InternalError" + }, + "503": { + "$ref": "#/components/responses/ServiceUnavailable" + } + } + } + }, "/api/v2/workspaces/{workspaceId}/fork/preview": { "post": { "operationId": "previewWorkspaceFork", @@ -17279,6 +17412,295 @@ } ] }, + "GetWorkflowSourceResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "workflowId": { + "type": "string", + "description": "Workflow id." + }, + "workspaceId": { + "type": "string", + "description": "Workspace id." + }, + "files": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "Relative path → file text: `workflow.ts`, then any `functions/*` files." + }, + "lock": { + "type": "object", + "properties": { + "lockVersion": { + "type": "number", + "const": 1, + "description": "Lock format version." + }, + "blocks": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Block id." + }, + "parent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Key of the enclosing loop or parallel, or null." + }, + "branches": { + "description": "Condition or router branch key → stored branch id.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + } + }, + "items": { + "description": "Per field, its id-bearing items (input format fields) in stored order.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Item name." + }, + "id": { + "type": "string", + "description": "Item id." + } + }, + "required": ["name", "id"], + "additionalProperties": false, + "description": "One id-bearing list item." + } + } + }, + "binding": { + "type": "string", + "description": "The `const` name the block is printed as." + }, + "order": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Declaration-order tie-break." + }, + "layout": { + "type": "object", + "properties": { + "x": { + "type": "number", + "description": "Canvas x position." + }, + "y": { + "type": "number", + "description": "Canvas y position." + }, + "w": { + "description": "Container width.", + "type": "number" + }, + "h": { + "description": "Container height.", + "type": "number" + }, + "height": { + "description": "Stored block height.", + "type": "number" + }, + "horizontalHandles": { + "description": "Handles on the left and right.", + "type": "boolean" + } + }, + "required": ["x", "y"], + "additionalProperties": false, + "description": "Stored canvas geometry; applied only to new blocks." + }, + "codeFile": { + "description": "Path of the block’s function-code file.", + "type": "string" + } + }, + "required": ["id", "parent", "binding", "order"], + "additionalProperties": false, + "description": "One block’s identity." + }, + "description": "Block key → identity." + }, + "variables": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "Variable key → variable id." + } + }, + "required": ["lockVersion", "blocks", "variables"], + "additionalProperties": false, + "description": "Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids." + }, + "lockBase": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "Workspace the workflow belongs to." + }, + "baseFingerprint": { + "type": "string", + "description": "The `fingerprint` this source was read at." + }, + "catalogHash": { + "type": "string", + "description": "Hash of the block catalog the source was printed against." + } + }, + "required": ["workspaceId", "baseFingerprint", "catalogHash"], + "additionalProperties": false, + "description": "Freshness facts for the lock in this environment (`.sim/base.json`)." + }, + "fingerprint": { + "type": "string", + "description": "Freshness token of the stored draft. It ignores canvas positions, so moving blocks does not change it." + }, + "canonicalHash": { + "type": "string", + "description": "Hash of the canonical workflow the files compile to; comments do not affect it." + }, + "catalogVersion": { + "type": "string", + "description": "Hash of the block catalog the source was printed against." + }, + "sdkMajor": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Workflow SDK major version of the source." + }, + "warnings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Diagnostic code, e.g. `W_CANON_UNRESOLVED_ID`." + }, + "severity": { + "type": "string", + "enum": ["error", "warning", "info"], + "description": "Diagnostic severity." + }, + "message": { + "type": "string", + "description": "What was found." + }, + "hint": { + "description": "How to address it.", + "type": "string" + }, + "blockKey": { + "description": "Block the finding is about.", + "type": "string" + }, + "param": { + "description": "Field the finding is about.", + "type": "string" + } + }, + "required": ["code", "severity", "message"], + "additionalProperties": false, + "description": "A finding from reading the stored graph as source." + }, + "description": "Findings from reading the stored graph." + } + }, + "required": [ + "workflowId", + "workspaceId", + "files", + "lock", + "lockBase", + "fingerprint", + "canonicalHash", + "catalogVersion", + "sdkMajor", + "warnings" + ], + "additionalProperties": false, + "description": "Response data." + } + }, + "required": ["data"], + "additionalProperties": false, + "title": "Get workflow source response", + "description": "The workflow draft as TypeScript source.", + "examples": [ + { + "data": { + "workflowId": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "files": { + "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" + }, + "lock": { + "lockVersion": 1, + "blocks": { + "start": { + "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "parent": null, + "binding": "start", + "order": 0 + } + }, + "variables": {} + }, + "lockBase": { + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" + }, + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "canonicalHash": "0d6e2b8a4c1f7e3d9b5a2c8f4e1d7b3a9c6f2e8d4b1a7c3e9f5d2b8a4c1e7f3d", + "catalogVersion": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a", + "sdkMajor": 1, + "warnings": [] + } + } + ] + }, "WorkspaceForkPreview": { "type": "object", "properties": { diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts new file mode 100644 index 00000000000..2f6e19916bd --- /dev/null +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts @@ -0,0 +1,28 @@ +import { v2GetWorkflowSourceContract } from '@/lib/api/contracts/v2/workflow-source' +import { defineV2JsonRoute, v2ApiKeyAuth, v2RateLimits } from '@/lib/api/server/routes' +import { v2WorkflowErrorPolicies } from '@/lib/workflows/api' +import { getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' +import { workflowOperations } from '@/lib/workflows/application/operations' + +export const dynamic = 'force-dynamic' +export const revalidate = 0 + +/** + * GET /api/v2/workflows/[workflowId]/source — the draft as TypeScript source with its identity + * lock and freshness fingerprint. Head-safe and unaudited, like `GET .../state`, which it + * projects. Answers 403 while the `workflow-code` flag is off. + */ +export const GET = defineV2JsonRoute({ + contract: v2GetWorkflowSourceContract, + auth: v2ApiKeyAuth, + operation: workflowOperations.readSource, + rateLimit: v2RateLimits.publicApi, + errorPolicy: v2WorkflowErrorPolicies.concealWorkflowAuthorization, + mapInput: ({ params, query }) => ({ + workflowId: params.workflowId, + ...(query.annotateIds !== undefined ? { annotateIds: query.annotateIds } : {}), + ...(query.functionCode ? { functionCode: query.functionCode } : {}), + }), + useCase: getWorkflowSource, + present: (source) => ({ data: source }), +}) diff --git a/apps/sim/app/api/workflows/[id]/source/route.ts b/apps/sim/app/api/workflows/[id]/source/route.ts new file mode 100644 index 00000000000..49d895a1cd2 --- /dev/null +++ b/apps/sim/app/api/workflows/[id]/source/route.ts @@ -0,0 +1,32 @@ +import { getWorkflowSourceContract } from '@/lib/api/contracts/workflow-source' +import { + defineInternalJsonRoute, + internalRateLimits, + internalSessionAuth, +} from '@/lib/api/server/routes' +import { internalWorkflowErrorPolicies } from '@/lib/workflows/api' +import { getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' + +export const dynamic = 'force-dynamic' +export const revalidate = 0 + +/** + * GET /api/workflows/[id]/source — the draft as TypeScript source for the canvas Code tab. The + * same use case as `GET /api/v2/workflows/{workflowId}/source`, under session auth. + */ +export const GET = defineInternalJsonRoute({ + contract: getWorkflowSourceContract, + auth: internalSessionAuth, + operation: getWorkflowSource.operation, + rateLimit: internalRateLimits.none({ + reason: 'A session read the Code tab refetches after edits, like GET /api/workflows/[id]', + }), + errorPolicy: internalWorkflowErrorPolicies.concealWorkflowAuthorization, + mapInput: ({ params, query }) => ({ + workflowId: params.id, + ...(query.annotateIds !== undefined ? { annotateIds: query.annotateIds } : {}), + ...(query.functionCode ? { functionCode: query.functionCode } : {}), + }), + useCase: getWorkflowSource, + present: (source) => ({ data: source }), +}) diff --git a/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts new file mode 100644 index 00000000000..0ea32d04172 --- /dev/null +++ b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts @@ -0,0 +1,68 @@ +import { + documentedSchema, + RATE_LIMIT_HEADERS, + RESOURCE_ERRORS, +} from '@/lib/api/contracts/v2/openapi/shared' +import { v2GetWorkflowSourceContract } from '@/lib/api/contracts/v2/workflow-source' +import { defineOpenApiRoute } from '@/lib/api/openapi/types' +import { workflowOperations } from '@/lib/workflows/application/operations' + +const BLOCK_ID = '5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47' +const FINGERPRINT = 'sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d' +const CATALOG_HASH = '3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a' + +const WORKFLOW_SOURCE_EXAMPLE = { + workflowId: '3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8', + workspaceId: '7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28', + files: { + 'workflow.ts': + "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n", + }, + lock: { + lockVersion: 1, + blocks: { start: { id: BLOCK_ID, parent: null, binding: 'start', order: 0 } }, + variables: {}, + }, + lockBase: { + workspaceId: '7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28', + baseFingerprint: FINGERPRINT, + catalogHash: CATALOG_HASH, + }, + fingerprint: FINGERPRINT, + canonicalHash: '0d6e2b8a4c1f7e3d9b5a2c8f4e1d7b3a9c6f2e8d4b1a7c3e9f5d2b8a4c1e7f3d', + catalogVersion: CATALOG_HASH, + sdkMajor: 1, + warnings: [], +} + +export const workflowSourceOpenApiRoutes = [ + defineOpenApiRoute( + v2GetWorkflowSourceContract, + { + applicationOperation: workflowOperations.readSource, + operationId: 'getWorkflowSource', + summary: 'Get workflow source', + description: + 'Read the saved draft as TypeScript source written against the workflow SDK, with its identity lock and a freshness `fingerprint`. The lock binds each block key in the source to its stored id; `lockBase` records the fingerprint and block catalog the source was read at. The fingerprint ignores canvas positions, so moving blocks does not change it. Workspace resources such as tables and knowledge bases appear as keys derived from their current names, so renaming a resource changes its key; an id that matches no resource in the workspace prints as an unresolved reference. Function-block code goes to `functions/*` files unless `functionCode` is `inline`. This read records no audit event; `HEAD` mirrors `GET`. Returns `403` while code-first workflows are not enabled.', + tags: ['Workflows'], + errors: RESOURCE_ERRORS, + success: { description: 'The workflow draft as source.', headers: RATE_LIMIT_HEADERS }, + }, + { + params: v2GetWorkflowSourceContract.params, + query: documentedSchema( + v2GetWorkflowSourceContract.query, + 'GetWorkflowSourceQuery', + 'Get workflow source query', + 'How the source is printed.' + ), + response: documentedSchema( + v2GetWorkflowSourceContract.response.schema, + 'GetWorkflowSourceResponse', + 'Get workflow source response', + 'The workflow draft as TypeScript source.', + [{ data: WORKFLOW_SOURCE_EXAMPLE }] + ), + } + ), +] diff --git a/apps/sim/lib/api/contracts/v2/openapi/workflows.ts b/apps/sim/lib/api/contracts/v2/openapi/workflows.ts index fae096a3268..25771b4848a 100644 --- a/apps/sim/lib/api/contracts/v2/openapi/workflows.ts +++ b/apps/sim/lib/api/contracts/v2/openapi/workflows.ts @@ -26,6 +26,7 @@ import { WORKSPACE_ERRORS, withRequestBodyErrors, } from '@/lib/api/contracts/v2/openapi/shared' +import { workflowSourceOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/workflow-source' import { workspaceSyncOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/workspace-sync' import { EXECUTE_OPTION_CONSTRAINTS, @@ -1812,5 +1813,5 @@ export const workflowsOpenApiDocument = defineOpenApiDocument({ headers: { ...V2_BINARY_DOWNLOAD_HEADERS, ...V2_COMMON_HEADERS }, errorSchema: V2_ERROR_SCHEMA, errorResponses: ERROR_RESPONSES, - routes: [...routes, ...workspaceSyncOpenApiRoutes], + routes: [...routes, ...workflowSourceOpenApiRoutes, ...workspaceSyncOpenApiRoutes], }) diff --git a/apps/sim/lib/api/contracts/v2/workflow-source.ts b/apps/sim/lib/api/contracts/v2/workflow-source.ts new file mode 100644 index 00000000000..900e865ca72 --- /dev/null +++ b/apps/sim/lib/api/contracts/v2/workflow-source.ts @@ -0,0 +1,16 @@ +import { defineRouteContract } from '@/lib/api/contracts/types' +import { v2DataResponse } from '@/lib/api/contracts/v2/shared' +import { v2WorkflowIdParamsSchema } from '@/lib/api/contracts/v2/workflows' +import { + workflowSourceQuerySchema, + workflowSourceSchema, +} from '@/lib/api/contracts/workflow-source' + +/** `GET /api/v2/workflows/{workflowId}/source`: the internal Code tab read, for API callers. */ +export const v2GetWorkflowSourceContract = defineRouteContract({ + method: 'GET', + path: '/api/v2/workflows/[workflowId]/source', + params: v2WorkflowIdParamsSchema, + query: workflowSourceQuerySchema, + response: { mode: 'json', schema: v2DataResponse(workflowSourceSchema) }, +}) diff --git a/apps/sim/lib/api/contracts/workflow-source.ts b/apps/sim/lib/api/contracts/workflow-source.ts new file mode 100644 index 00000000000..904441905c1 --- /dev/null +++ b/apps/sim/lib/api/contracts/workflow-source.ts @@ -0,0 +1,129 @@ +import { z } from 'zod' +import { booleanQueryFlagSchema } from '@/lib/api/contracts/primitives' +import { defineRouteContract } from '@/lib/api/contracts/types' +import { workflowIdParamsSchema } from '@/lib/api/contracts/workflows' + +/** + * Workflow source: a stored draft printed as TypeScript against the workflow SDK, with its + * identity lock (build-spec decisions 11–13). The shapes mirror `@sim/workflow-code`'s + * `WorkflowLockV1` and `LockBase`, which own them; the internal route (the canvas Code tab) and + * the v2 route share these schemas. + */ + +export const workflowSourceQuerySchema = z + .object({ + annotateIds: booleanQueryFlagSchema + .optional() + .describe("Print each block's id as a trailing `// id:` comment on its declaration."), + functionCode: z + .enum(['inline', 'files'], { + error: 'functionCode: expected one of "inline" | "files"', + }) + .optional() + .describe( + 'Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates.' + ), + }) + .strict() + +const lockLayoutSchema = z + .object({ + x: z.number().describe('Canvas x position.'), + y: z.number().describe('Canvas y position.'), + w: z.number().optional().describe('Container width.'), + h: z.number().optional().describe('Container height.'), + height: z.number().optional().describe('Stored block height.'), + horizontalHandles: z.boolean().optional().describe('Handles on the left and right.'), + }) + .describe('Stored canvas geometry; applied only to new blocks.') + +const lockBlockSchema = z + .object({ + id: z.string().describe('Block id.'), + parent: z.string().nullable().describe('Key of the enclosing loop or parallel, or null.'), + branches: z + .record(z.string(), z.string()) + .optional() + .describe('Condition or router branch key → stored branch id.'), + items: z + .record( + z.string(), + z.array( + z + .object({ + name: z.string().describe('Item name.'), + id: z.string().describe('Item id.'), + }) + .describe('One id-bearing list item.') + ) + ) + .optional() + .describe('Per field, its id-bearing items (input format fields) in stored order.'), + binding: z.string().describe('The `const` name the block is printed as.'), + order: z.number().int().describe('Declaration-order tie-break.'), + layout: lockLayoutSchema.optional(), + codeFile: z.string().optional().describe('Path of the block’s function-code file.'), + }) + .describe('One block’s identity.') + +const workflowLockSchema = z + .object({ + lockVersion: z.literal(1).describe('Lock format version.'), + blocks: z.record(z.string(), lockBlockSchema).describe('Block key → identity.'), + variables: z.record(z.string(), z.string()).describe('Variable key → variable id.'), + }) + .describe('Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids.') + +const lockBaseSchema = z + .object({ + workspaceId: z.string().describe('Workspace the workflow belongs to.'), + baseFingerprint: z.string().describe('The `fingerprint` this source was read at.'), + catalogHash: z.string().describe('Hash of the block catalog the source was printed against.'), + }) + .describe('Freshness facts for the lock in this environment (`.sim/base.json`).') + +const sourceWarningSchema = z + .object({ + code: z.string().describe('Diagnostic code, e.g. `W_CANON_UNRESOLVED_ID`.'), + severity: z.enum(['error', 'warning', 'info']).describe('Diagnostic severity.'), + message: z.string().describe('What was found.'), + hint: z.string().optional().describe('How to address it.'), + blockKey: z.string().optional().describe('Block the finding is about.'), + param: z.string().optional().describe('Field the finding is about.'), + }) + .describe('A finding from reading the stored graph as source.') + +export const workflowSourceSchema = z + .object({ + workflowId: z.string().describe('Workflow id.'), + workspaceId: z.string().describe('Workspace id.'), + files: z + .record(z.string(), z.string()) + .describe('Relative path → file text: `workflow.ts`, then any `functions/*` files.'), + lock: workflowLockSchema, + lockBase: lockBaseSchema, + fingerprint: z + .string() + .describe( + 'Freshness token of the stored draft. It ignores canvas positions, so moving blocks does not change it.' + ), + canonicalHash: z + .string() + .describe('Hash of the canonical workflow the files compile to; comments do not affect it.'), + catalogVersion: z + .string() + .describe('Hash of the block catalog the source was printed against.'), + sdkMajor: z.number().int().describe('Workflow SDK major version of the source.'), + warnings: z.array(sourceWarningSchema).describe('Findings from reading the stored graph.'), + }) + .describe('A workflow draft as TypeScript source.') + +export type WorkflowSource = z.output + +export const getWorkflowSourceContract = defineRouteContract({ + method: 'GET', + path: '/api/workflows/[id]/source', + params: workflowIdParamsSchema, + query: workflowSourceQuerySchema, + response: { mode: 'json', schema: z.object({ data: workflowSourceSchema }) }, +}) diff --git a/apps/sim/lib/api/mcp/generated/v2-operations.ts b/apps/sim/lib/api/mcp/generated/v2-operations.ts index 51cf9a9dabd..05e461fd968 100644 --- a/apps/sim/lib/api/mcp/generated/v2-operations.ts +++ b/apps/sim/lib/api/mcp/generated/v2-operations.ts @@ -295,6 +295,7 @@ import { v2UndeployWorkflowMcpToolContract, v2UpdateWorkflowMcpServerContract, } from '@/lib/api/contracts/v2/workflow-mcp-servers' +import { v2GetWorkflowSourceContract } from '@/lib/api/contracts/v2/workflow-source' import { v2ActivateWorkflowVersionContract, v2ApplyWorkflowOperationsContract, @@ -1692,6 +1693,14 @@ export const V2_MCP_OPERATIONS = { handler: () => import('@/app/api/v2/workflows/[workflowId]/runs/[runId]/route').then((route) => route.GET), }, + getWorkflowSource: { + contract: v2GetWorkflowSourceContract, + summary: 'Get workflow source', + description: + 'Read the saved draft as TypeScript source written against the workflow SDK, with its identity lock and a freshness `fingerprint`. The lock binds each block key in the source to its stored id; `lockBase` records the fingerprint and block catalog the source was read at. The fingerprint ignores canvas positions, so moving blocks does not change it. Workspace resources such as tables and knowledge bases appear as keys derived from their current names, so renaming a resource changes its key; an id that matches no resource in the workspace prints as an unresolved reference. Function-block code goes to `functions/*` files unless `functionCode` is `inline`. This read records no audit event; `HEAD` mirrors `GET`. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.', + handler: () => + import('@/app/api/v2/workflows/[workflowId]/source/route').then((route) => route.GET), + }, getWorkflowState: { contract: v2GetWorkflowStateContract, summary: 'Get workflow state', diff --git a/apps/sim/lib/api/server/routes/v2-route-table.generated.ts b/apps/sim/lib/api/server/routes/v2-route-table.generated.ts index 6da3bbcba32..72381d0688f 100644 --- a/apps/sim/lib/api/server/routes/v2-route-table.generated.ts +++ b/apps/sim/lib/api/server/routes/v2-route-table.generated.ts @@ -847,6 +847,10 @@ export const V2_ROUTES: readonly V2RouteEntry[] = [ pattern: '/api/v2/workflows/{workflowId}/runs/{runId}/resume', load: () => import('@/app/api/v2/workflows/[workflowId]/runs/[runId]/resume/route'), }, + { + pattern: '/api/v2/workflows/{workflowId}/source', + load: () => import('@/app/api/v2/workflows/[workflowId]/source/route'), + }, { pattern: '/api/v2/workflows/{workflowId}/state', load: () => import('@/app/api/v2/workflows/[workflowId]/state/route'), diff --git a/apps/sim/lib/workflows/application/get-workflow-source.ts b/apps/sim/lib/workflows/application/get-workflow-source.ts new file mode 100644 index 00000000000..4e9d70473f6 --- /dev/null +++ b/apps/sim/lib/workflows/application/get-workflow-source.ts @@ -0,0 +1,187 @@ +import { + type CanonicalWorkflow, + type CodeComment, + canonicalHash, + canonicalize, + type Diagnostic, + encodeAnchor, + type LockBase, + type LockIdentity, + type LockLayout, + printWorkflow, + type SourceFingerprint, + sourceFingerprint, + type WorkflowLockBlock, + type WorkflowLockV1, +} from '@sim/workflow-code' +import type { WorkflowState } from '@sim/workflow-types/workflow' +import { resolveCatalogGate, withCatalogBlockScope } from '@/lib/catalog/application/context' +import { defineAuthorizedWorkflowUseCase } from '@/lib/workflows/application/authorized-workflow-use-case' +import { workflowOperations } from '@/lib/workflows/application/operations' +import { resolvePrincipalWorkflowContext } from '@/lib/workflows/application/principal-scope' +import { loadWorkflowGraph } from '@/lib/workflows/application/read-workflow-graph' +import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog' +import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' +import { createRecordingResolver, loadResourceKeyResolver } from '@/lib/workflows/code/resources' + +/** Directory function-code files are printed into when `functionCode` is `files`. */ +const FUNCTION_CODE_DIR = 'functions' + +export interface GetWorkflowSourceInput { + workflowId: string + assertedWorkspaceId?: string + /** Prints each block's id as a trailing comment on its declaration (agent read path). */ + annotateIds?: boolean + /** `files` (default): function code in `functions/*` files; `inline`: tagged templates. */ + functionCode?: 'inline' | 'files' +} + +/** A canonicalize or print finding, without source spans (the read path has no input text). */ +export interface WorkflowSourceWarning { + code: string + severity: 'error' | 'warning' | 'info' + message: string + hint?: string + blockKey?: string + param?: string +} + +export interface GetWorkflowSourceResult { + workflowId: string + workspaceId: string + /** Repo-relative path → text: `workflow.ts` first, then any function-code files. */ + files: Record + lock: WorkflowLockV1 + lockBase: LockBase + /** `sf1:` freshness token; apply answers 409 when the stored graph no longer matches it. */ + fingerprint: SourceFingerprint + /** Hash of the canonical model the files compile to (annotations excluded). */ + canonicalHash: string + /** The compile catalog's content hash the files were printed against. */ + catalogVersion: string + sdkMajor: number + warnings: WorkflowSourceWarning[] +} + +function toWarning(diagnostic: Diagnostic): WorkflowSourceWarning { + return { + code: diagnostic.code, + severity: diagnostic.severity, + message: diagnostic.message, + ...(diagnostic.hint !== undefined ? { hint: diagnostic.hint } : {}), + ...(diagnostic.blockKey !== undefined ? { blockKey: diagnostic.blockKey } : {}), + ...(diagnostic.param !== undefined ? { param: diagnostic.param } : {}), + } +} + +/** + * Adds `// id: ` after every block declaration. Comments are annotations, so the + * canonical hash and fingerprint are unchanged. + */ +function withIdComments(workflow: CanonicalWorkflow, identity: LockIdentity): CanonicalWorkflow { + const comments = { ...workflow.annotations.comments } + for (const [key, block] of Object.entries(identity.blocks)) { + const anchor = encodeAnchor({ kind: 'block', block: key }) + const idComment: CodeComment = { text: ` id: ${block.id}`, kind: 'line', placement: 'trailing' } + comments[anchor] = [...(comments[anchor] ?? []), idComment] + } + return { ...workflow, annotations: { ...workflow.annotations, comments } } +} + +/** The full lock: canonicalize's identity, the printer's bindings/order/code files, and layout. */ +function assembleLock( + identity: LockIdentity, + hints: Record, + layout: Record +): WorkflowLockV1 { + const blocks: Record = {} + for (const [key, block] of Object.entries(identity.blocks)) { + const hint = hints[key] + if (hint?.binding === undefined || hint.order === undefined) { + throw new Error(`The printer returned no binding or order for block "${key}"`) + } + blocks[key] = { + ...block, + binding: hint.binding, + order: hint.order, + ...(hint.codeFile !== undefined ? { codeFile: hint.codeFile } : {}), + ...(layout[key] ? { layout: layout[key] } : {}), + } + } + return { lockVersion: 1, blocks, variables: identity.variables } +} + +/** + * Reads a workflow's stored draft as TypeScript source (build-spec decisions 11–13, s4 §2). + * + * Loads the stored, migrated graph; builds the per-workflow compile catalog (the blocks this + * caller may place plus every type already in the workflow); projects the graph to the canonical + * model with resource ids lifted to provisional keys; and prints it. Pure read: no audit, so it + * stays head-safe and pollable like `GET /state`. + */ +export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ + operation: workflowOperations.readSource, + resolveContext: resolvePrincipalWorkflowContext, + async execute({ principal, input, context }): Promise { + await requireWorkflowCodeEnabled() + const [graph, gate] = await Promise.all([ + loadWorkflowGraph(context), + resolveCatalogGate(principal, context, { customBlockInputs: true }), + ]) + const state: WorkflowState = { + blocks: graph.blocks, + edges: graph.edges, + loops: graph.loops, + parallels: graph.parallels, + variables: graph.variables, + } + const storedTypes = [...new Set(Object.values(graph.blocks).map((block) => block.type))] + const meta = { + name: context.workflow.name, + description: context.workflow.description ?? null, + } + + const catalog = await withCatalogBlockScope(gate, async () => { + const { catalog } = buildCodeCatalog({ + gate, + organizationId: context.workspaceOrganizationId, + storedTypes, + }) + return catalog + }) + + const recording = createRecordingResolver() + canonicalize(state, { catalog, meta, resources: recording.resolver }) + const resources = await loadResourceKeyResolver(context.workspaceId, recording.requestedKinds) + const canonical = canonicalize(state, { catalog, meta, resources }) + + const printed = printWorkflow({ + workflow: input.annotateIds + ? withIdComments(canonical.workflow, canonical.identity) + : canonical.workflow, + catalog, + options: + (input.functionCode ?? 'files') === 'files' + ? { functionCode: 'files', codeDir: FUNCTION_CODE_DIR } + : { functionCode: 'inline' }, + }) + + const fingerprint = sourceFingerprint(canonical.workflow, canonical.identity) + return { + workflowId: context.workflowId, + workspaceId: context.workspaceId, + files: Object.fromEntries(printed.files.map((file) => [file.path, file.text])), + lock: assembleLock(canonical.identity, printed.hints.blocks, canonical.layout), + lockBase: { + workspaceId: context.workspaceId, + baseFingerprint: fingerprint, + catalogHash: catalog.hash, + }, + fingerprint, + canonicalHash: canonicalHash(canonical.workflow), + catalogVersion: catalog.hash, + sdkMajor: catalog.sdkMajor, + warnings: [...canonical.diagnostics, ...printed.diagnostics].map(toWarning), + } + }, +}) diff --git a/apps/sim/lib/workflows/application/operations.ts b/apps/sim/lib/workflows/application/operations.ts index 17fb9b4b2a1..bdc06ee53d2 100644 --- a/apps/sim/lib/workflows/application/operations.ts +++ b/apps/sim/lib/workflows/application/operations.ts @@ -70,6 +70,20 @@ export const workflowOperations = { contentDelivery: 'none', ...WORKFLOW_READ_PRINCIPAL_POLICY, }), + /** + * The draft as workflow source (TypeScript), its identity lock and freshness fingerprint. The + * same read as `read`, projected through the code-first canonical model. + */ + // permission-group-exempt: workflow source is the workflow definition in another form, governed by workspace role like `read` + readSource: defineWorkspaceOperation({ + id: 'workflows.source.read', + oauthScope: 'api:read', + minimumRole: 'read', + workspaceApiKey: 'allow', + capability: 'none', + contentDelivery: 'none', + ...WORKFLOW_READ_PRINCIPAL_POLICY, + }), /** Full diagnostics retain the caller's subject for protected reference and secret reads. */ // permission-group-exempt: lint reads workflow content under the existing workflow and secret authorization policies readLint: defineWorkspaceOperation({ diff --git a/apps/sim/lib/workflows/code/feature-flag.ts b/apps/sim/lib/workflows/code/feature-flag.ts index 3a375de31d8..cf4b6fa17b3 100644 --- a/apps/sim/lib/workflows/code/feature-flag.ts +++ b/apps/sim/lib/workflows/code/feature-flag.ts @@ -5,8 +5,12 @@ import { OrchestrationError } from '@/lib/core/orchestration/types' * Code-first workflows (the SDK block catalog, workflow source read and apply, the Code tab) ship * behind one global `workflow-code` flag; every surface of the feature gates through here. */ +export function isWorkflowCodeEnabled(): Promise { + return isFeatureEnabled('workflow-code') +} + export async function requireWorkflowCodeEnabled(): Promise { - if (!(await isFeatureEnabled('workflow-code'))) { + if (!(await isWorkflowCodeEnabled())) { throw new OrchestrationError('forbidden', 'Code-first workflows are not enabled') } } diff --git a/apps/sim/lib/workflows/code/resources.ts b/apps/sim/lib/workflows/code/resources.ts new file mode 100644 index 00000000000..b6df01c44d2 --- /dev/null +++ b/apps/sim/lib/workflows/code/resources.ts @@ -0,0 +1,190 @@ +import { db } from '@sim/db' +import { + credential, + customTools, + folder, + knowledgeBase, + mcpServers, + skill, + userTableDefinitions, + workflow, +} from '@sim/db/schema' +import { compareStrings, slugify } from '@sim/utils/string' +import type { ResourceKeyResolver, ResourceKind } from '@sim/workflow-code' +import { and, asc, eq, isNull } from 'drizzle-orm' + +/** + * Resource keys for workflow source: `table('leads')`, `kb('docs')`, `binding('support-slack')`. + * + * PROVISIONAL. Until the repo phase adds a binding table, a key is derived from the resource's + * current name: its slug, with `-2`, `-3`, … for later resources whose slug is already taken + * (ordered by creation time, then id, so the assignment is deterministic). A rename therefore + * changes the key, and deleting the older of two same-named resources moves the bare key to the + * newer one. Keys are a read-side projection only: nothing stores them yet. + * + * Credentials are keyed by display name and print as `binding(key)`. A kind with no workspace + * table here (`sandbox`, `file`, …), a deleted or archived resource, and an id from another + * workspace all resolve to `null`, which canonicalize keeps verbatim as `$sim: 'unresolved'`. + */ + +/** Rows per kind read to assign keys; past it, later-created resources stay unresolved. */ +const MAX_RESOURCES_PER_KIND = 50_000 + +interface ResourceRow { + id: string + name: string + createdAt: Date +} + +type ResourceLoader = (workspaceId: string) => Promise + +const LOADERS: Partial> = { + table: (workspaceId) => + db + .select({ + id: userTableDefinitions.id, + name: userTableDefinitions.name, + createdAt: userTableDefinitions.createdAt, + }) + .from(userTableDefinitions) + .where( + and( + eq(userTableDefinitions.workspaceId, workspaceId), + isNull(userTableDefinitions.archivedAt) + ) + ) + .orderBy(asc(userTableDefinitions.createdAt), asc(userTableDefinitions.id)) + .limit(MAX_RESOURCES_PER_KIND), + 'knowledge-base': (workspaceId) => + db + .select({ + id: knowledgeBase.id, + name: knowledgeBase.name, + createdAt: knowledgeBase.createdAt, + }) + .from(knowledgeBase) + .where(and(eq(knowledgeBase.workspaceId, workspaceId), isNull(knowledgeBase.deletedAt))) + .orderBy(asc(knowledgeBase.createdAt), asc(knowledgeBase.id)) + .limit(MAX_RESOURCES_PER_KIND), + workflow: (workspaceId) => + db + .select({ id: workflow.id, name: workflow.name, createdAt: workflow.createdAt }) + .from(workflow) + .where(and(eq(workflow.workspaceId, workspaceId), isNull(workflow.archivedAt))) + .orderBy(asc(workflow.createdAt), asc(workflow.id)) + .limit(MAX_RESOURCES_PER_KIND), + 'custom-tool': (workspaceId) => + db + .select({ id: customTools.id, name: customTools.title, createdAt: customTools.createdAt }) + .from(customTools) + .where(eq(customTools.workspaceId, workspaceId)) + .orderBy(asc(customTools.createdAt), asc(customTools.id)) + .limit(MAX_RESOURCES_PER_KIND), + 'mcp-server': (workspaceId) => + db + .select({ id: mcpServers.id, name: mcpServers.name, createdAt: mcpServers.createdAt }) + .from(mcpServers) + .where(and(eq(mcpServers.workspaceId, workspaceId), isNull(mcpServers.deletedAt))) + .orderBy(asc(mcpServers.createdAt), asc(mcpServers.id)) + .limit(MAX_RESOURCES_PER_KIND), + skill: (workspaceId) => + db + .select({ id: skill.id, name: skill.name, createdAt: skill.createdAt }) + .from(skill) + .where(eq(skill.workspaceId, workspaceId)) + .orderBy(asc(skill.createdAt), asc(skill.id)) + .limit(MAX_RESOURCES_PER_KIND), + credential: (workspaceId) => + db + .select({ id: credential.id, name: credential.displayName, createdAt: credential.createdAt }) + .from(credential) + .where(eq(credential.workspaceId, workspaceId)) + .orderBy(asc(credential.createdAt), asc(credential.id)) + .limit(MAX_RESOURCES_PER_KIND), + 'file-folder': (workspaceId) => + db + .select({ id: folder.id, name: folder.name, createdAt: folder.createdAt }) + .from(folder) + .where( + and( + eq(folder.workspaceId, workspaceId), + eq(folder.resourceType, 'file'), + isNull(folder.deletedAt) + ) + ) + .orderBy(asc(folder.createdAt), asc(folder.id)) + .limit(MAX_RESOURCES_PER_KIND), +} + +/** Bidirectional id ↔ key maps for one kind. */ +interface KindKeys { + byId: Map + byKey: Map +} + +/** + * Assigns each resource its provisional key: the name's slug (or the kind when the slug is + * empty), suffixed `-2`, `-3`, … when an earlier resource already holds it. Earlier means + * created first, ties broken by id, whatever order `rows` arrives in. + */ +export function assignResourceKeys(kind: ResourceKind, rows: readonly ResourceRow[]): KindKeys { + const ordered = [...rows].sort( + (a, b) => a.createdAt.getTime() - b.createdAt.getTime() || compareStrings(a.id, b.id) + ) + const byId = new Map() + const byKey = new Map() + for (const row of ordered) { + if (byId.has(row.id)) continue + const base = slugify(row.name) || kind + let key = base + for (let suffix = 2; byKey.has(key); suffix += 1) key = `${base}-${suffix}` + byId.set(row.id, key) + byKey.set(key, row.id) + } + return { byId, byKey } +} + +/** + * A resolver that answers nothing and records every `(kind, id)` canonicalize asked about, so a + * first pass learns which kinds a workflow references before any resource table is read. + */ +export function createRecordingResolver(): { + resolver: ResourceKeyResolver + requestedKinds: Set +} { + const requestedKinds = new Set() + return { + requestedKinds, + resolver: { + toKey(kind) { + requestedKinds.add(kind) + return null + }, + toId() { + return null + }, + }, + } +} + +/** + * Loads the resource keys of `kinds` in one workspace and returns a resolver over them. Only + * this workspace's live resources are read, so an id from elsewhere never resolves. + */ +export async function loadResourceKeyResolver( + workspaceId: string, + kinds: Iterable +): Promise { + const loaded = new Map() + await Promise.all( + [...new Set(kinds)].map(async (kind) => { + const load = LOADERS[kind] + if (!load) return + loaded.set(kind, assignResourceKeys(kind, await load(workspaceId))) + }) + ) + return { + toKey: (kind, id) => loaded.get(kind)?.byId.get(id) ?? null, + toId: (kind, key) => loaded.get(kind)?.byKey.get(key) ?? null, + } +} diff --git a/packages/sim-cli/src/contract/commands.ts b/packages/sim-cli/src/contract/commands.ts index ff8ac81163c..f29a4e93bde 100644 --- a/packages/sim-cli/src/contract/commands.ts +++ b/packages/sim-cli/src/contract/commands.ts @@ -639,6 +639,10 @@ export const CLI_CONTRACT: CliContract = { command: 'workflows outline', describe: 'Show a workflow’s draft as a compact read-only outline', }, + getWorkflowSource: { + command: 'workflows source get', + describe: 'Show a workflow’s draft as TypeScript source with its identity lock', + }, replaceWorkflowState: { command: 'workflows state replace', confirm: 'This replaces the entire draft graph and cannot be undone.', diff --git a/packages/sim-cli/src/generated/v2-api.ts b/packages/sim-cli/src/generated/v2-api.ts index afb519f6b6d..6c09e741714 100644 --- a/packages/sim-cli/src/generated/v2-api.ts +++ b/packages/sim-cli/src/generated/v2-api.ts @@ -8385,6 +8385,71 @@ export type GetWorkflowRunResponse = { data: GetWorkflowRunResponseRef4 } +/** `GET /api/v2/workflows/[workflowId]/source` */ +export type GetWorkflowSourceParams = { + workflowId: string +} + +export type GetWorkflowSourceQuery = { + annotateIds?: boolean + functionCode?: 'inline' | 'files' +} + +export type GetWorkflowSourceResponse = { + data: { + workflowId: string + workspaceId: string + files: Record + lock: { + lockVersion: 1 + blocks: Record< + string, + { + id: string + parent: string | null + branches?: Record + items?: Record< + string, + Array<{ + name: string + id: string + }> + > + binding: string + order: number + layout?: { + x: number + y: number + w?: number + h?: number + height?: number + horizontalHandles?: boolean + } + codeFile?: string + } + > + variables: Record + } + lockBase: { + workspaceId: string + baseFingerprint: string + catalogHash: string + } + fingerprint: string + canonicalHash: string + catalogVersion: string + sdkMajor: number + warnings: Array<{ + code: string + severity: 'error' | 'warning' | 'info' + message: string + hint?: string + blockKey?: string + param?: string + }> + } +} + /** `GET /api/v2/workflows/[workflowId]/state` */ export type GetWorkflowStateParams = { workflowId: string @@ -20497,6 +20562,26 @@ export const V2_OPERATIONS = { }, }, }, + getWorkflowSource: { + method: 'GET', + path: '/api/v2/workflows/[workflowId]/source', + pathParams: ['workflowId'] as const, + pathParamDocs: { workflowId: 'Unique workflow identifier.' }, + responseMode: 'json', + summary: 'Get workflow source', + query: { + annotateIds: { + kind: 'boolean', + describe: "Print each block's id as a trailing `// id:` comment on its declaration.", + }, + functionCode: { + kind: 'enum', + values: ['inline', 'files'] as const, + describe: + 'Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates.', + }, + }, + }, getWorkflowState: { method: 'GET', path: '/api/v2/workflows/[workflowId]/state', From bba5640e7302818a48945cf54f7ee4345f19bd69 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:24:25 -0800 Subject: [PATCH 055/428] feat(workflows): duplicate, fork and promote carry code_meta re-keyed to the copied ids --- .../lib/copy/copy-workflows.ts | 39 +++++++++++++++++++ .../lib/copy/deploy-bridge.ts | 3 ++ .../ee/workspace-forking/lib/create-fork.ts | 1 + .../lib/promote/promote-plan.ts | 3 ++ .../lib/workflows/persistence/duplicate.ts | 10 ++++- 5 files changed, 55 insertions(+), 1 deletion(-) diff --git a/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts b/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts index 82b4bb95c6f..5cd49e29162 100644 --- a/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts +++ b/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts @@ -2,6 +2,12 @@ import { folder as folderTable, workflow, workflowBlocks } from '@sim/db/schema' import { createLogger } from '@sim/logger' import { generateId } from '@sim/utils/id' import { isRecordLike } from '@sim/utils/object' +import { + isEmptyCodeMeta, + remapCodeMeta, + type WorkflowCodeMetaV1, +} from '@sim/workflow-code/code-meta' +import { readCodeMetaValue } from '@sim/workflow-persistence/code-meta' import { and, eq, inArray, isNull } from 'drizzle-orm' import type { FolderResourceType } from '@/lib/api/contracts/folders' import { generateRequestId } from '@/lib/core/utils/request' @@ -397,6 +403,19 @@ export interface CopyWorkflowResult { blockIdMapping: Map } +/** The source's `code_meta` re-keyed onto the copy, or `null` when nothing survives the copy. */ +function copiedCodeMeta( + targetWorkflowId: string, + stored: unknown, + blockIdMapping: ReadonlyMap, + varIdMapping: ReadonlyMap +): WorkflowCodeMetaV1 | null { + const source = readCodeMetaValue(targetWorkflowId, stored) + if (!source) return null + const copied = remapCodeMeta(source, blockIdMapping, varIdMapping) + return isEmptyCodeMeta(copied) ? null : copied +} + export interface CopyWorkflowStateParams { tx: DbOrTx targetWorkflowId: string @@ -419,6 +438,12 @@ export interface CopyWorkflowStateParams { * the child starts undeployed and private (going public is an explicit act there). */ isPublicApi?: boolean + /** + * The source's stored `workflow.code_meta`. Written onto the target re-keyed to the copied + * block and variable ids, so source bindings, order and comments follow the copy. Omitted + * leaves the target's own value untouched. + */ + codeMeta?: unknown } /** source workflow id -> target workflow id, for `workflow-selector` references */ workflowIdMap: Map @@ -709,8 +734,21 @@ export async function copyWorkflowStateIntoTarget( // write below uses the same (folderId, name), so the registry stays consistent with it. nameRegistry.claim(targetFolderId, resolvedName, targetWorkflowId) + const codeMetaPatch = + sourceMeta.codeMeta === undefined + ? {} + : { + codeMeta: copiedCodeMeta( + targetWorkflowId, + sourceMeta.codeMeta, + blockIdMapping, + varIdMapping + ), + } + if (mode === 'create') { await tx.insert(workflow).values({ + ...codeMetaPatch, id: targetWorkflowId, userId, workspaceId: targetWorkspaceId, @@ -743,6 +781,7 @@ export async function copyWorkflowStateIntoTarget( lastSynced: now, updatedAt: now, ...(sourceMeta.isPublicApi !== undefined ? { isPublicApi: sourceMeta.isPublicApi } : {}), + ...codeMetaPatch, }) .where(eq(workflow.id, targetWorkflowId)) } diff --git a/apps/sim/ee/workspace-forking/lib/copy/deploy-bridge.ts b/apps/sim/ee/workspace-forking/lib/copy/deploy-bridge.ts index aa8fbf734ff..25de0edd58e 100644 --- a/apps/sim/ee/workspace-forking/lib/copy/deploy-bridge.ts +++ b/apps/sim/ee/workspace-forking/lib/copy/deploy-bridge.ts @@ -36,6 +36,8 @@ export interface DeployedWorkflowSummary { sortOrder: number /** Whether the deployed API accepts unauthenticated calls; carried onto sync targets. */ isPublicApi: boolean + /** Stored `workflow.code_meta`, re-keyed onto each copy (see copyWorkflowStateIntoTarget). */ + codeMeta?: unknown } /** @@ -62,6 +64,7 @@ export async function listDeployedWorkflows( folderId: workflow.folderId, sortOrder: workflow.sortOrder, isPublicApi: workflow.isPublicApi, + codeMeta: workflow.codeMeta, }) .from(workflow) .where( diff --git a/apps/sim/ee/workspace-forking/lib/create-fork.ts b/apps/sim/ee/workspace-forking/lib/create-fork.ts index 9a6df23e071..a7fe1ce42a6 100644 --- a/apps/sim/ee/workspace-forking/lib/create-fork.ts +++ b/apps/sim/ee/workspace-forking/lib/create-fork.ts @@ -459,6 +459,7 @@ export async function createFork(params: CreateForkParams): Promise Date: Sun, 15 Nov 2026 20:24:30 -0800 Subject: [PATCH 056/428] fix(workflow-code): infer materialize modes on the block's serialized surface --- packages/workflow-code/src/materialize/block.ts | 1 + packages/workflow-code/src/materialize/modes.ts | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/packages/workflow-code/src/materialize/block.ts b/packages/workflow-code/src/materialize/block.ts index e7fc7cf1678..628c518a226 100644 --- a/packages/workflow-code/src/materialize/block.ts +++ b/packages/workflow-code/src/materialize/block.ts @@ -255,6 +255,7 @@ export function buildBlock(inputs: BlockInputs, context: MaterializeContext): Bu target.modes, catalog, rawValues(subBlocks), + target.triggerMode, target.advancedMode ) for (const [paramId, param] of Object.entries(target.params)) { diff --git a/packages/workflow-code/src/materialize/modes.ts b/packages/workflow-code/src/materialize/modes.ts index 3b9acd16b6e..91b5c3fbdf0 100644 --- a/packages/workflow-code/src/materialize/modes.ts +++ b/packages/workflow-code/src/materialize/modes.ts @@ -31,9 +31,10 @@ export function writeBlockModes( desired: Record, catalog: CatalogBlock, values: Record, + triggerMode: boolean, advancedMode: boolean ): ModeMap { - const inferred = effectiveModes(catalog.subBlocks, values, undefined, advancedMode) + const inferred = effectiveModes(catalog, triggerMode, values, undefined, advancedMode) const next = { ...modes } for (const [id, mode] of Object.entries(desired)) { if (Object.hasOwn(next, id) || inferred[id] !== mode) next[id] = mode @@ -66,7 +67,7 @@ export function writeToolModes( tools.forEach((tool, index) => { const block = catalogBlock(catalog, tool.type) const params = toRecord(toRecord(storedTools[index]).params) - const inferred = block ? effectiveModes(block.subBlocks, params, undefined, false) : {} + const inferred = block ? effectiveModes(block, false, params, undefined, false) : {} for (const [id, mode] of Object.entries(tool.modes)) { const prevIndex = prevIndexes[index] const hadExplicit = From 5cdca1fb5742632a7f02b1fa8b5fdeb9fa7a081e Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:24:31 -0800 Subject: [PATCH 057/428] test(workflows): run P1, P2 and O1-O3 of the round-trip harness on materialize --- .../code/corpus/fixtures.test-helpers.ts | 128 +++++++++++++++- .../code/corpus/roundtrip.corpus.test.ts | 137 +++++++----------- .../workflows/code/materialize-hooks.test.ts | 76 +--------- 3 files changed, 185 insertions(+), 156 deletions(-) diff --git a/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts b/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts index 9e1ef530481..cc9662158e4 100644 --- a/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts +++ b/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts @@ -17,8 +17,10 @@ import { createLoopWorkflowState, createMinimalWorkflowState, } from '@sim/testing/factories' -import { omit } from '@sim/utils/object' +import { isRecordLike, omit } from '@sim/utils/object' import { compareStrings } from '@sim/utils/string' +import { type BlockCatalog, canonicalize } from '@sim/workflow-code' +import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' import type { WorkflowState } from '@/stores/workflows/workflow/types' export interface FixtureState { @@ -87,3 +89,127 @@ export function buildTestingFactoryStates(): FixtureState[] { ] return fixtures.map(([name, state]) => ({ id: `testing:${name}`, state: stored(state) })) } + +/** Item keys canonicalize drops by design, by structured kind (s1 §4 "Items", quirk 24). */ +const DROPPED_ITEM_KEYS: Record = { + inputFormat: ['id', 'collapsed'], + tableRows: ['id'], + tools: ['isExpanded'], +} + +function stripItems(value: unknown, keys: string[]): unknown { + if (!Array.isArray(value)) return value + return value.map((item) => (isRecordLike(item) ? omit(item, keys) : item)) +} + +/** + * A structured value decoded from JSON text. Whether a list is stored as text or natively is + * storage encoding, which the CWM does not carry (contract amendment 1): a write with no prev uses + * the catalog `storage`, and branch lists are always repaired to text. + */ +function decodedStructured(value: unknown): unknown { + if (typeof value !== 'string') return value + try { + return JSON.parse(value) + } catch { + return value + } +} + +/** + * Every string inside `value` with block reference prefixes in normalized form + * (`` → ``), the form canonicalize writes. The block + * resolver looks names up normalized (executor/variables/resolvers/block.ts:46-61), so both forms + * resolve to the same block. + */ +function normalizedReferences(value: unknown, keys: ReadonlySet): unknown { + if (typeof value === 'string') { + return value.replace(/<([^<>.]+)\./g, (match: string, prefix: string) => { + const key = normalizeWorkflowBlockName(prefix) + return keys.has(key) ? `<${key}.` : match + }) + } + if (Array.isArray(value)) return value.map((item) => normalizedReferences(item, keys)) + if (!isRecordLike(value)) return value + return Object.fromEntries( + Object.entries(value).map(([key, member]) => [key, normalizedReferences(member, keys)]) + ) +} + +/** + * The modes each block runs with, as one explicit map: the effective mode of every pair + * canonicalize resolves, plus each tool's as `${i}:cid`. Explicit entries equal to the effective + * mode select the same members, so swapping them in changes nothing the serializer does. + */ +function effectiveModeMaps( + state: WorkflowState, + catalog: BlockCatalog +): Map> { + const { workflow, identity } = canonicalize(state, { + catalog, + meta: { name: '', description: null }, + }) + const maps = new Map>() + for (const [key, block] of Object.entries(workflow.blocks)) { + const modes: Record = { ...block.modes } + for (const param of Object.values(block.params)) { + if (param.kind !== 'tools') continue + param.tools.forEach((tool, index) => { + for (const [id, mode] of Object.entries(tool.modes)) modes[`${index}:${id}`] = mode + }) + } + maps.set(identity.blocks[key].id, modes) + } + return maps +} + +/** + * A state without what a lockless write with no prev cannot know and what never changes what + * runs: item ids and editor flags canonicalize drops (inputFormat field ids live in the lock's + * `items`; table row ids, `collapsed` and `isExpanded` are editor state), layout + * (`horizontalHandles`, container sizes), which lives in the lock's `layout`, and `null` + * subBlocks, which the serializer reads like absent ones (`params[id] == null`). Structured values + * compare decoded, and a tool with no `params` reads like one with `{}` (canonicalize lifts both + * to `{}`). Edge handles left unset read as the default `source` / `target` handles. Stored `canonicalModes` are replaced by the effective modes: a + * stale entry for a pair the block no longer has, or an explicit entry equal to inference, selects + * nothing different. Reference prefixes compare normalized, as canonicalize writes them. O2 + * compares through this: its candidate is written with no lock and no prev. + */ +export function withoutLockHeldState(state: WorkflowState, catalog: BlockCatalog): WorkflowState { + const modes = effectiveModeMaps(state, catalog) + const blocks: WorkflowState['blocks'] = {} + for (const [id, block] of Object.entries(state.blocks)) { + const subBlocks: WorkflowState['blocks'][string]['subBlocks'] = {} + for (const [subBlockId, subBlock] of Object.entries(block.subBlocks ?? {})) { + if (subBlock?.value === null || subBlock?.value === undefined) continue + const declared = catalog.blocks[block.type]?.subBlocks.find((s) => s.id === subBlockId) + const keys = declared?.structured ? DROPPED_ITEM_KEYS[declared.structured] : undefined + if (!declared?.structured) { + subBlocks[subBlockId] = subBlock + continue + } + let value = decodedStructured(subBlock.value) + if (keys) value = stripItems(value, keys) + if (declared.structured === 'tools' && Array.isArray(value)) { + value = value.map((tool) => + isRecordLike(tool) && tool.params === undefined ? { ...tool, params: {} } : tool + ) + } + subBlocks[subBlockId] = { ...subBlock, value: value as typeof subBlock.value } + } + blocks[id] = { + ...omit(block, ['horizontalHandles']), + subBlocks, + data: { ...omit(block.data ?? {}, ['width', 'height']), canonicalModes: modes.get(id) ?? {} }, + } + } + const keys = new Set( + Object.values(state.blocks).map((block) => normalizeWorkflowBlockName(block.name)) + ) + const edges = state.edges.map((edge) => ({ + ...edge, + sourceHandle: edge.sourceHandle ?? 'source', + targetHandle: edge.targetHandle ?? 'target', + })) + return normalizedReferences({ ...state, blocks, edges }, keys) as WorkflowState +} diff --git a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts index 64bcdb0caa3..42d04ed220a 100644 --- a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts +++ b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts @@ -4,11 +4,8 @@ * from `ROUNDTRIP_CORPUS_EXTRA_DIR` (written outside the repo by * scripts/export-redacted-workflows.ts), and fast-check workflows. * - * It imports the Wave 2 engines (catalog, canonicalize, print, compile, equivalence) statically and - * builds the real catalog from the live registry. `materialize` and the server's materialize hooks - * land in Wave 3, so they are read at run time: until then each property that needs them is - * registered as a skipped test whose title names the missing export or module, and the report - * lists it under `skippedProperties`. + * It imports every engine (catalog, canonicalize, print, compile, equivalence, materialize and the + * server's materialize hooks) statically and builds the real catalog from the live registry. * * CI budget (under 60 s): by default every block type keeps up to `CASES_PER_BLOCK_TYPE` cases * plus every structural case; `ROUNDTRIP_CORPUS_FULL=1` runs the whole corpus. Set @@ -23,7 +20,6 @@ vi.unmock('@/tools/registry') import { getErrorMessage } from '@sim/utils/errors' import { compareStrings } from '@sim/utils/string' -import * as workflowCode from '@sim/workflow-code' import { type BlockCatalog, type CanonicalWorkflow, @@ -31,8 +27,7 @@ import { canonicalEquals, canonicalize, compileWorkflow, - type MaterializeFn, - type MaterializeHooks, + materialize, type PrintWorkflowFn, printWorkflow, } from '@sim/workflow-code' @@ -56,7 +51,9 @@ import { type FixtureState, loadLandingTemplateStates, loadWorkflowStatesFromDirectory, + withoutLockHeldState, } from '@/lib/workflows/code/corpus/fixtures.test-helpers' +import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' import { hasWorkflowChanged } from '@/lib/workflows/comparison/compare' import { getBlockRegistry } from '@/blocks/registry' import { SDK_NAMES } from '@/blocks/sdk-names.generated' @@ -72,30 +69,7 @@ const FUZZ_RUNS = 50 */ const PROPERTY_BUDGET_MS = 30_000 -/** - * Loads a Wave 3 export without failing the file's transform. Resolves `null` when the module or - * the export is missing. - */ -async function optionalExport(specifier: string, name: string): Promise { - try { - const mod: Record = await import(/* @vite-ignore */ specifier) - return mod[name] ?? null - } catch { - return null - } -} - -const MATERIALIZE_EXPORT = 'materialize' -const HOOKS_MODULE = '@/lib/workflows/code/materialize-hooks' -const HOOKS_EXPORT = 'createMaterializeHooks' - -const packageExports: Record = { ...workflowCode } -const materializeExport = packageExports[MATERIALIZE_EXPORT] -const materialize: MaterializeFn | null = - typeof materializeExport === 'function' ? (materializeExport as MaterializeFn) : null -const createHooks = await optionalExport(HOOKS_MODULE, HOOKS_EXPORT) -const hooks: MaterializeHooks | null = - typeof createHooks === 'function' ? (createHooks() as MaterializeHooks) : null +const hooks = createMaterializeHooks() const { catalog } = buildBlockCatalog({ blocks: Object.values(getBlockRegistry()), @@ -103,33 +77,17 @@ const { catalog } = buildBlockCatalog({ sdkNames: SDK_NAMES, }) -type WaveThreeNeed = 'materialize' | 'hooks' - -const PROPERTY_NEEDS: Record = { - P0: [], - P1: ['hooks', 'materialize'], - P2: ['hooks', 'materialize'], - P3: [], - P4: [], - P5: [], - O1: ['hooks', 'materialize'], - O2: ['hooks', 'materialize'], - O3: ['hooks', 'materialize'], -} - -function missingFor(property: ProofProperty): string[] { - return PROPERTY_NEEDS[property].flatMap((need) => { - if (need === 'hooks') return hooks ? [] : [`${HOOKS_MODULE}#${HOOKS_EXPORT} (Wave 3)`] - return materialize ? [] : [`@sim/workflow-code#${MATERIALIZE_EXPORT} (Wave 3)`] - }) -} - interface ProofSubject { id: string blockTypes: string[] state: WorkflowState + /** Set on corpus cases whose types the registry does not know; the serializer rejects them. */ + unknownTypes?: true } +/** Properties that serialize the original, which an unknown block type makes throw. */ +const SERIALIZING_PROPERTIES: ReadonlySet = new Set(['P2', 'O2']) + function toSubject(fixture: FixtureState): ProofSubject { const blockTypes = [...new Set(Object.values(fixture.state.blocks).map((b) => b.type))].sort() return { id: fixture.id, blockTypes, state: fixture.state } @@ -171,25 +129,12 @@ const subjects: ProofSubject[] = [ const report = createProofReport(SUITE) -/** The catalog and the Wave 3 engines a property runs against; a missing one throws when called. */ +/** What every property runs against. */ interface ResolvedEngines { catalog: BlockCatalog - materialize: MaterializeFn - hooks: () => MaterializeHooks } -function resolveEngines(): ResolvedEngines { - return { - catalog, - materialize: - materialize ?? (() => missingWaveThree(`@sim/workflow-code#${MATERIALIZE_EXPORT}`)), - hooks: () => hooks ?? missingWaveThree(`${HOOKS_MODULE}#${HOOKS_EXPORT}`), - } -} - -function missingWaveThree(name: string): never { - throw new Error(`${name} is not implemented`) -} +const engines: ResolvedEngines = { catalog } const serializer = new Serializer() const serialize = (state: WorkflowState) => @@ -256,9 +201,9 @@ function compiledWorkflow( } function materialized(e: ResolvedEngines, workflow: CanonicalWorkflow, prev?: WorkflowState) { - return e.materialize(workflow, null, { + return materialize(workflow, null, { catalog: e.catalog, - hooks: e.hooks(), + hooks, prev, lockFreshness: 'none', }).state @@ -319,8 +264,8 @@ const properties: Record }), O2: (e, s) => executionParity({ - original: s.state, - candidate: materialized(e, canonical(e, s)), + original: withoutLockHeldState(s.state, e.catalog), + candidate: withoutLockHeldState(materialized(e, canonical(e, s)), e.catalog), serialize, hasWorkflowChanged, }), @@ -343,9 +288,10 @@ const RESERVED_BLOCK_NAME = /** * Stored shapes the editor and realtime persistence refuse (`getWorkflowBlockNameConflict`) but - * legacy rows can hold, which no source form expresses yet. Every property must fail on exactly - * these and pass everywhere else: a new failure or a newly passing case fails the run. The report - * still records each as failed. + * legacy rows can hold, which no source form expresses yet. Every property that goes through + * print and compile must fail on exactly these and pass everywhere else: a new failure or a newly + * passing case fails the run. The report still records each as failed. The O oracles never print, + * so they must pass on these too. */ const KNOWN_FAILURES: Record = { 'name-collision:function:Agent 1|agent1': LEGACY_NAME_COLLISION, @@ -355,6 +301,25 @@ const KNOWN_FAILURES: Record = { 'testing:builder-parallel': RESERVED_BLOCK_NAME, } const KNOWN_FAILURE_IDS = Object.keys(KNOWN_FAILURES).sort(compareStrings) +const SOURCE_FREE_PROPERTIES: ReadonlySet = new Set(['O1', 'O2', 'O3']) + +/** + * Stored shapes a lockless write with no prev cannot reproduce for O2, because the CWM holds no + * node for them. O2 must fail on exactly these, besides `KNOWN_FAILURES` for source properties. + */ +const KNOWN_O2_FAILURES: Record = { + 'testing:loop': + 'a loops-map entry with no loop block (the pre-container shape); the CWM has no block to ' + + 'carry it, so a write from scratch has no loop', + 'landing-template:meeting-followup-agent-a2357a2f-67f7-40c1-8e64-301bcd604239': + 'a loop whose block.data omits count while the loops map holds it; canonicalize reads the ' + + 'map, and a write from scratch puts count in block.data too (s1 materialize step 6)', +} + +function expectedFailures(property: ProofProperty): string[] { + if (property === 'O2') return Object.keys(KNOWN_O2_FAILURES).sort(compareStrings) + return SOURCE_FREE_PROPERTIES.has(property) ? [] : KNOWN_FAILURE_IDS +} const PROPERTY_TITLES: Record = { P0: 'P0 source fidelity: compile(print(c)) equals c', @@ -370,21 +335,23 @@ const PROPERTY_TITLES: Record = { describe(`round-trip corpus (${subjects.length} workflows)`, () => { for (const property of Object.keys(PROPERTY_TITLES) as ProofProperty[]) { - const missing = missingFor(property) - if (missing.length > 0) { - const reason = `missing ${missing.join(', ')}` - report.skipProperty(property, reason) - it.skip(`${PROPERTY_TITLES[property]} [SKIPPED until Wave 3: ${reason}]`, () => {}) - continue - } - it( PROPERTY_TITLES[property], () => { - const e = resolveEngines() + const e = engines const failed: string[] = [] for (const subject of subjects) { const started = performance.now() + if (subject.unknownTypes && SERIALIZING_PROPERTIES.has(property)) { + report.record({ + caseId: subject.id, + blockTypes: subject.blockTypes, + property, + status: 'skipped', + durationMs: 0, + }) + continue + } try { const result = properties[property](e, subject) if (!result.ok) failed.push(subject.id) @@ -408,7 +375,7 @@ describe(`round-trip corpus (${subjects.length} workflows)`, () => { }) } } - expect(failed.sort(compareStrings)).toEqual(KNOWN_FAILURE_IDS) + expect(failed.sort(compareStrings)).toEqual(expectedFailures(property)) }, PROPERTY_BUDGET_MS ) diff --git a/apps/sim/lib/workflows/code/materialize-hooks.test.ts b/apps/sim/lib/workflows/code/materialize-hooks.test.ts index 5baa60eaebd..2aadf525d30 100644 --- a/apps/sim/lib/workflows/code/materialize-hooks.test.ts +++ b/apps/sim/lib/workflows/code/materialize-hooks.test.ts @@ -11,7 +11,6 @@ * hook or materialize regression fails here first. */ -import { isRecordLike, omit } from '@sim/utils/object' import { canonicalEquals, canonicalize, materialize } from '@sim/workflow-code' import { executionParity, findDifferences } from '@sim/workflow-code/proof' import { describe, expect, it, vi } from 'vitest' @@ -22,6 +21,7 @@ vi.unmock('@/tools/registry') import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' import { type CorpusCase, generateRegistryCorpus } from '@/lib/workflows/code/corpus' +import { withoutLockHeldState } from '@/lib/workflows/code/corpus/fixtures.test-helpers' import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' import { hasWorkflowChanged } from '@/lib/workflows/comparison/compare' import { getBlockRegistry } from '@/blocks/registry' @@ -62,73 +62,6 @@ function write(workflow: ReturnType, prev?: WorkflowState) { return materialize(workflow, null, { catalog, hooks, prev, lockFreshness: 'none' }) } -/** Item keys canonicalize drops by design, by structured kind (s1 §4 "Items", quirk 24). */ -const DROPPED_ITEM_KEYS: Record = { - inputFormat: ['id', 'collapsed'], - tableRows: ['id'], - tools: ['isExpanded'], -} - -function stripItems(value: unknown, keys: string[]): unknown { - const text = typeof value === 'string' - let list: unknown = value - if (text) { - try { - list = JSON.parse(value) - } catch { - return value - } - } - if (!Array.isArray(list)) return value - const stripped = list.map((item) => (isRecordLike(item) ? omit(item, keys) : item)) - return text ? JSON.stringify(stripped) : stripped -} - -/** A branch list as rows: materialize always writes text, which an array-encoded prev is not. */ -function decodedBranches(value: unknown): unknown { - if (typeof value !== 'string') return value - try { - return JSON.parse(value) - } catch { - return value - } -} - -/** - * A state without what a lockless write with no prev cannot know and what never changes what - * runs: item ids and editor flags canonicalize drops (inputFormat field ids live in the lock's - * `items`; table row ids, `collapsed` and `isExpanded` are editor state), and layout - * (`horizontalHandles`, container sizes), which lives in the lock's `layout`. Branch lists compare - * decoded, because materialize repairs an array-encoded list to the text the canvas reads - * (condition-input.tsx:376-401). - */ -function withoutLockHeldState(state: WorkflowState): WorkflowState { - const blocks: WorkflowState['blocks'] = {} - for (const [id, block] of Object.entries(state.blocks)) { - const subBlocks: WorkflowState['blocks'][string]['subBlocks'] = {} - for (const [subBlockId, subBlock] of Object.entries(block.subBlocks ?? {})) { - const declared = catalog.blocks[block.type]?.subBlocks.find((s) => s.id === subBlockId) - const keys = declared?.structured ? DROPPED_ITEM_KEYS[declared.structured] : undefined - if (declared?.structured === 'branches') { - subBlocks[subBlockId] = { - ...subBlock, - value: decodedBranches(subBlock.value) as typeof subBlock.value, - } - } else { - subBlocks[subBlockId] = keys - ? { ...subBlock, value: stripItems(subBlock.value, keys) as typeof subBlock.value } - : subBlock - } - } - blocks[id] = { - ...omit(block, ['horizontalHandles']), - subBlocks, - data: block.data && omit(block.data, ['width', 'height']), - } - } - return { ...state, blocks } -} - function failures( check: (corpusCase: CorpusCase) => string | null, subjects: CorpusCase[] = cases @@ -188,8 +121,11 @@ describe(`materialize over the real registry (${cases.length} corpus cases)`, () expect( failures((corpusCase) => { const result = executionParity({ - original: withoutLockHeldState(corpusCase.state), - candidate: withoutLockHeldState(write(canonical(corpusCase.state, corpusCase.id)).state), + original: withoutLockHeldState(corpusCase.state, catalog), + candidate: withoutLockHeldState( + write(canonical(corpusCase.state, corpusCase.id)).state, + catalog + ), serialize: (state) => serializer.serializeWorkflow(state.blocks, state.edges, state.loops, state.parallels), hasWorkflowChanged, From cad2d0e9552d76a53d4d4bdc4c32442807b6099a Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:25:00 -0800 Subject: [PATCH 058/428] test(workflows): provisional resource key assignment and the v2 source route's query, flag and concealment --- .../[workflowId]/source/route.test.ts | 115 ++++++++++++++++++ apps/sim/lib/workflows/code/resources.test.ts | 61 ++++++++++ 2 files changed, 176 insertions(+) create mode 100644 apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts create mode 100644 apps/sim/lib/workflows/code/resources.test.ts diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts new file mode 100644 index 00000000000..37eccea658c --- /dev/null +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts @@ -0,0 +1,115 @@ +import { + V2_OPERATION_RATE_LIMIT_ALLOWED, + V2_PREAUTH_RATE_LIMIT_ALLOWED, + v2ApiKeyAuthModuleMock, + v2RateLimiterModuleMock, + v2RouteMocks, +} from '@sim/testing' +import { NextRequest } from 'next/server' +import { beforeEach, describe, expect, it, vi } from 'vitest' + +const mocks = vi.hoisted(() => ({ read: vi.fn() })) + +vi.mock('@/lib/api/server/routes/v2-api-key-auth', () => v2ApiKeyAuthModuleMock) +vi.mock('@/lib/core/rate-limiter', () => v2RateLimiterModuleMock) +vi.mock('@/lib/workflows/application/get-workflow-source', () => ({ + getWorkflowSource: { + operation: { id: 'workflows.source.read' }, + execute: mocks.read, + }, +})) + +import { OrchestrationError } from '@/lib/core/orchestration/types' +import { GET } from '@/app/api/v2/workflows/[workflowId]/source/route' + +const WORKSPACE_ID = '11111111-2222-4333-8444-555555555555' +const WORKFLOW_ID = '66666666-7777-4888-9999-000000000000' +const FINGERPRINT = `sf1:${'c'.repeat(64)}` + +const auth = { + principal: { + kind: 'workspace_api_key' as const, + workspaceId: WORKSPACE_ID, + keyId: 'key-1', + access: 'write' as const, + }, + rateLimitSubjectIds: ['api-key:key-1', `workspace:${WORKSPACE_ID}`] as const, + rateLimitSubscription: null, + keyType: 'workspace' as const, +} + +const source = { + workflowId: WORKFLOW_ID, + workspaceId: WORKSPACE_ID, + files: { 'workflow.ts': "// @sim-sdk 1\nexport default workflow('W', () => {})\n" }, + lock: { + lockVersion: 1 as const, + blocks: { start: { id: 'b-1', parent: null, binding: 'start', order: 0 } }, + variables: {}, + }, + lockBase: { workspaceId: WORKSPACE_ID, baseFingerprint: FINGERPRINT, catalogHash: 'h' }, + fingerprint: FINGERPRINT, + canonicalHash: 'd'.repeat(64), + catalogVersion: 'h', + sdkMajor: 1, + warnings: [], +} + +function request(query = '') { + return new NextRequest(`http://localhost:3000/api/v2/workflows/${WORKFLOW_ID}/source${query}`, { + headers: { 'x-api-key': 'key' }, + }) +} + +const context = { params: Promise.resolve({ workflowId: WORKFLOW_ID }) } + +describe('GET /api/v2/workflows/{workflowId}/source', () => { + beforeEach(() => { + v2RouteMocks.authenticate.mockResolvedValue(auth) + v2RouteMocks.preauthRate.mockResolvedValue(V2_PREAUTH_RATE_LIMIT_ALLOWED) + v2RouteMocks.operationRate.mockResolvedValue(V2_OPERATION_RATE_LIMIT_ALLOWED) + mocks.read.mockResolvedValue(source) + }) + + it('passes annotateIds as a boolean and functionCode through, omitting absent flags', async () => { + await GET(request('?annotateIds=1&functionCode=inline'), context) + await GET(request(), context) + + expect(mocks.read.mock.calls[0][0].input).toEqual({ + workflowId: WORKFLOW_ID, + annotateIds: true, + functionCode: 'inline', + }) + expect(mocks.read.mock.calls[1][0].input).toEqual({ workflowId: WORKFLOW_ID }) + }) + + it.each(['?functionCode=ts', '?annotate=true'])( + 'rejects %s with 400 before reading the workflow', + async (query) => { + const response = await GET(request(query), context) + + expect(response.status).toBe(400) + expect(mocks.read).not.toHaveBeenCalled() + } + ) + + it('answers 403 while code-first workflows are off', async () => { + mocks.read.mockRejectedValue( + new OrchestrationError('forbidden', 'Code-first workflows are not enabled') + ) + + const response = await GET(request(), context) + + expect(response.status).toBe(403) + expect((await response.json()).error.code).toBe('FORBIDDEN') + }) + + it('answers 404 for a workflow the key cannot reach', async () => { + mocks.read.mockRejectedValue(new OrchestrationError('not_found', 'Workflow not found')) + + const response = await GET(request(), context) + + expect(response.status).toBe(404) + expect((await response.json()).error.code).toBe('NOT_FOUND') + }) +}) diff --git a/apps/sim/lib/workflows/code/resources.test.ts b/apps/sim/lib/workflows/code/resources.test.ts new file mode 100644 index 00000000000..73646bfeec8 --- /dev/null +++ b/apps/sim/lib/workflows/code/resources.test.ts @@ -0,0 +1,61 @@ +import { describe, expect, it } from 'vitest' +import { assignResourceKeys } from '@/lib/workflows/code/resources' + +const at = (ms: number) => new Date(ms) + +describe('assignResourceKeys', () => { + it('gives the earliest-created resource the bare slug whatever order rows arrive in', () => { + const rows = [ + { id: 'b', name: 'Leads', createdAt: at(2) }, + { id: 'a', name: 'leads!', createdAt: at(1) }, + { id: 'c', name: 'LEADS', createdAt: at(3) }, + ] + + const forward = assignResourceKeys('table', rows) + const reversed = assignResourceKeys('table', [...rows].reverse()) + + expect(Object.fromEntries(forward.byId)).toEqual({ a: 'leads', b: 'leads-2', c: 'leads-3' }) + expect(Object.fromEntries(reversed.byId)).toEqual(Object.fromEntries(forward.byId)) + }) + + it('breaks a creation-time tie by id', () => { + const keys = assignResourceKeys('table', [ + { id: 'z', name: 'Docs', createdAt: at(1) }, + { id: 'y', name: 'Docs', createdAt: at(1) }, + ]) + + expect(keys.byId.get('y')).toBe('docs') + expect(keys.byId.get('z')).toBe('docs-2') + }) + + it('skips a suffix another resource already holds as its own slug', () => { + const keys = assignResourceKeys('knowledge-base', [ + { id: 'a', name: 'Docs', createdAt: at(1) }, + { id: 'b', name: 'docs 2', createdAt: at(2) }, + { id: 'c', name: 'Docs', createdAt: at(3) }, + ]) + + expect(keys.byId.get('b')).toBe('docs-2') + expect(keys.byId.get('c')).toBe('docs-3') + expect(new Set(keys.byId.values()).size).toBe(3) + }) + + it('keys a name with no slug characters by its kind', () => { + const keys = assignResourceKeys('credential', [ + { id: 'a', name: '***', createdAt: at(1) }, + { id: 'b', name: '', createdAt: at(2) }, + ]) + + expect(keys.byId.get('a')).toBe('credential') + expect(keys.byId.get('b')).toBe('credential-2') + }) + + it('maps every key back to the id it was assigned', () => { + const keys = assignResourceKeys('workflow', [ + { id: 'a', name: 'Enrich', createdAt: at(1) }, + { id: 'b', name: 'Enrich', createdAt: at(2) }, + ]) + + for (const [id, key] of keys.byId) expect(keys.byKey.get(key)).toBe(id) + }) +}) From 61bcf6f3623d592cf28afcf3d2aac399469bd985 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:26:02 -0800 Subject: [PATCH 059/428] fix(workflow-code): budget code files within a compile A code file is read and parsed once per compile however many blocks reference it. The compile now caps the bytes summed over distinct code files (maxCodeFileBytesTotal), the number of file() references (maxCodeFileRefs, one per block at the v2 graph block cap), and runs the entry file's bracket-depth precheck on JavaScript code files before Babel sees them. 200 references to one 350 KB file compiled in about 6 s before and about 50 ms now. --- packages/workflow-code/src/api.ts | 6 ++ packages/workflow-code/src/compile/blocks.ts | 70 +++++++++++++++++-- packages/workflow-code/src/compile/context.ts | 11 +++ .../workflow-code/src/compile/hostile.test.ts | 59 ++++++++++++++++ packages/workflow-code/src/compile/index.ts | 1 + packages/workflow-code/src/compile/parse.ts | 7 +- 6 files changed, 147 insertions(+), 7 deletions(-) diff --git a/packages/workflow-code/src/api.ts b/packages/workflow-code/src/api.ts index 400c6b34da9..1f60c713760 100644 --- a/packages/workflow-code/src/api.ts +++ b/packages/workflow-code/src/api.ts @@ -232,9 +232,15 @@ export interface LockHints { /** Caps on hostile input (s4 D7). Defaults are the compile module's. */ export interface CompileLimits { + /** Bytes of the entry file, and of each code file. */ maxBytes?: number maxNodes?: number + /** Nesting depth of the entry file, and bracket depth of each JavaScript code file. */ maxDepth?: number + /** Bytes summed over the distinct code files `file()` references. */ + maxCodeFileBytesTotal?: number + /** `file()` references across the workflow, distinct or not. */ + maxCodeFileRefs?: number } export interface CompileInput { diff --git a/packages/workflow-code/src/compile/blocks.ts b/packages/workflow-code/src/compile/blocks.ts index de6042ef9c7..8513fcdecac 100644 --- a/packages/workflow-code/src/compile/blocks.ts +++ b/packages/workflow-code/src/compile/blocks.ts @@ -20,6 +20,8 @@ import type { import { setOwn } from '../records' import { type BlockDecl, type CompileContext, rangeOf, recordSpan } from './context' import { didYouMean } from './hints' +import { bracketDepthOverflow, utf8Length } from './parse' +import type { Range } from './report' import { compileToolList } from './tools' import { buildFieldIndex, @@ -290,6 +292,19 @@ function readCodeFile( decl: BlockDecl ): { code: string; path: string } | null { const at = rangeOf(ctx, compiled.pathNode) + const budget = ctx.codeFiles + budget.refs++ + if (budget.refs > ctx.limits.maxCodeFileRefs) { + if (budget.refs === ctx.limits.maxCodeFileRefs + 1) { + ctx.reporter.report( + 'E_LIMIT_EXCEEDED', + `The workflow has more than ${ctx.limits.maxCodeFileRefs} file() references.`, + at, + { hint: 'Write short code inline with js``.', blockKey: decl.key } + ) + } + return null + } if (!CODE_LANGUAGES.has(language)) { ctx.reporter.report( 'E_CODE_FILE_PATH', @@ -322,17 +337,62 @@ function readCodeFile( }) return null } - if (text.length > ctx.limits.maxBytes) { + const cached = budget.reads.get(path) + if (cached !== undefined) return cached === null ? null : { code: cached, path } + const code = parseCodeFile(ctx, path, text, language as CodeFileLanguage, at, decl) + budget.reads.set(path, code) + return code === null ? null : { code, path } +} + +/** + * Reads one distinct code file under the byte caps (per file and in total) and, for JavaScript, + * the bracket-depth cap that keeps Babel's recursive descent off a depth bomb. + */ +function parseCodeFile( + ctx: CompileContext, + path: string, + text: string, + language: CodeFileLanguage, + at: Range, + decl: BlockDecl +): string | null { + const { limits } = ctx + const bytes = utf8Length(text, limits.maxBytes) + if (bytes > limits.maxBytes) { ctx.reporter.report( 'E_LIMIT_EXCEEDED', - `${path} is larger than ${ctx.limits.maxBytes} bytes.`, + `${path} is larger than ${limits.maxBytes} bytes.`, at, - { blockKey: decl.key } + { + blockKey: decl.key, + } + ) + return null + } + ctx.codeFiles.bytes += bytes + if (ctx.codeFiles.bytes > limits.maxCodeFileBytesTotal) { + ctx.reporter.report( + 'E_LIMIT_EXCEEDED', + `Code files total more than ${limits.maxCodeFileBytesTotal} bytes.`, + at, + { hint: 'Share one code file between blocks, or shorten the code.', blockKey: decl.key } ) return null } ctx.reporter.addFile(path, text) - const back = fromCodeFile(text, language as CodeFileLanguage) + if (language === 'javascript') { + const overflowAt = bracketDepthOverflow(text, limits.maxDepth) + if (overflowAt !== -1) { + ctx.reporter.report( + 'E_LIMIT_EXCEEDED', + `${path} nests deeper than ${limits.maxDepth} levels.`, + { file: path, start: overflowAt, end: overflowAt + 1 }, + { blockKey: decl.key } + ) + return null + } + } + const back = fromCodeFile(text, language) if (!back.ok) { for (const error of back.errors) { ctx.reporter.report( @@ -344,7 +404,7 @@ function readCodeFile( } return null } - return { code: back.code, path } + return back.code } /** input-format sugar: `{ name: 'string' }` or `{ name: { type, ... } }` → stored item list. */ diff --git a/packages/workflow-code/src/compile/context.ts b/packages/workflow-code/src/compile/context.ts index 4ca0714662b..b746e8536bc 100644 --- a/packages/workflow-code/src/compile/context.ts +++ b/packages/workflow-code/src/compile/context.ts @@ -81,6 +81,16 @@ interface ImpliedEdge { body: ArrowFunctionExpression } +/** Code-file reads within one compile: each distinct file is read and parsed once. */ +export interface CodeFileBudget { + /** Repo-relative path → stored code, or `null` when the file was rejected. */ + reads: Map + /** `file()` references seen so far. */ + refs: number + /** Bytes of the distinct files read so far. */ + bytes: number +} + export interface CompileContext { file: string text: string @@ -88,6 +98,7 @@ export interface CompileContext { catalog: BlockCatalog files: ReadonlyMap limits: Required + codeFiles: CodeFileBudget comments: CommentCollector decls: BlockDecl[] declsByKey: Map diff --git a/packages/workflow-code/src/compile/hostile.test.ts b/packages/workflow-code/src/compile/hostile.test.ts index d84fd4f76f4..055394a1f1c 100644 --- a/packages/workflow-code/src/compile/hostile.test.ts +++ b/packages/workflow-code/src/compile/hostile.test.ts @@ -34,6 +34,10 @@ function codes(result: CompileResult): string[] { return result.diagnostics.map((d) => d.code) } +function errorCodes(result: CompileResult): string[] { + return result.diagnostics.filter((d) => d.severity === 'error').map((d) => d.code) +} + function sentinel(): unknown { return Reflect.get(globalThis, SENTINEL) } @@ -151,6 +155,61 @@ describe('hostile sources produce diagnostics only', () => { expect(codes(result)).toEqual(expect.arrayContaining(['E_CODE_FILE_PATH', 'E_LIMIT_EXCEEDED'])) }) + describe('code file budget', () => { + const FILE_HEADER = "// @sim-sdk 1\nimport { file, fn, workflow } from '@sim/workflow-sdk'\n\n" + const fnFile = (count: number, path: (i: number) => string) => + `${FILE_HEADER}export default workflow('X', {}, () => {\n${Array.from( + { length: count }, + (_, i) => ` const f${i} = fn('F${i}', { code: file('${path(i)}') })` + ).join('\n')}\n})\n` + + it('parses a code file referenced by many blocks once', () => { + const body = `const x = [${Array.from({ length: 60_000 }, (_, i) => i).join(',')}]\n` + const started = Date.now() + const result = run( + fnFile(200, () => './a.js'), + undefined, + { 'workflows/a.js': body } + ) + const elapsed = Date.now() - started + expect(codes(result)).toEqual([]) + expect(elapsed).toBeLessThan(2_000) + }) + + it('caps the total bytes of distinct code files', () => { + const files = Object.fromEntries( + Array.from({ length: 4 }, (_, i) => [`workflows/f${i}.js`, `return ${'1'.repeat(700)}\n`]) + ) + const result = run( + fnFile(4, (i) => `./f${i}.js`), + { maxBytes: 1_000, maxCodeFileBytesTotal: 2_000 }, + files + ) + expect(codes(result)).toContain('E_LIMIT_EXCEEDED') + expect(result.workflow).toBeNull() + }) + + it('caps the number of file() references with one diagnostic', () => { + const result = run( + fnFile(10, () => './a.js'), + { maxCodeFileRefs: 3 }, + { 'workflows/a.js': 'return 1\n' } + ) + expect(errorCodes(result)).toEqual(['E_LIMIT_EXCEEDED']) + }) + + it('rejects a depth bomb in a code file before parsing it', () => { + const result = run( + fnFile(1, () => './a.js'), + undefined, + { + 'workflows/a.js': `return ${'['.repeat(100_000)}${']'.repeat(100_000)}\n`, + } + ) + expect(errorCodes(result)).toEqual(['E_LIMIT_EXCEEDED']) + }) + }) + it('returns diagnostics for binary garbage', () => { const garbage = Array.from({ length: 4_096 }, (_, i) => String.fromCharCode((i * 7919) % 65_536) diff --git a/packages/workflow-code/src/compile/index.ts b/packages/workflow-code/src/compile/index.ts index 4480a70bef6..3fe4128ec32 100644 --- a/packages/workflow-code/src/compile/index.ts +++ b/packages/workflow-code/src/compile/index.ts @@ -336,6 +336,7 @@ export const compileWorkflow: CompileWorkflowFn = (input) => { catalog: input.catalog, files: input.files, limits, + codeFiles: { reads: new Map(), refs: 0, bytes: 0 }, comments: new CommentCollector(file, reporter), decls: [], declsByKey: new Map(), diff --git a/packages/workflow-code/src/compile/parse.ts b/packages/workflow-code/src/compile/parse.ts index 0b34cc3f7a7..bcf39670461 100644 --- a/packages/workflow-code/src/compile/parse.ts +++ b/packages/workflow-code/src/compile/parse.ts @@ -11,6 +11,9 @@ export const DEFAULT_LIMITS: Required = { maxBytes: 1_000_000, maxNodes: 500_000, maxDepth: 200, + maxCodeFileBytesTotal: 5_000_000, + /** One code file per block at the v2 graph block cap (`MAX_WORKFLOW_GRAPH_BLOCKS`). */ + maxCodeFileRefs: 2_000, } const HEADER = /^\/\/ @sim-sdk ([0-9]{1,6})[ \t]*(?=\r\n|[\n\r\u2028\u2029]|$)/ @@ -55,7 +58,7 @@ export function childNodes(node: Node): Node[] { } /** UTF-8 length of `text`, counting at most `cap + 1` bytes. */ -function utf8Length(text: string, cap: number): number { +export function utf8Length(text: string, cap: number): number { let bytes = 0 for (let i = 0; i < text.length && bytes <= cap; i++) { const code = text.charCodeAt(i) @@ -75,7 +78,7 @@ function utf8Length(text: string, cap: number): number { * comments are skipped well enough that their brackets never count; regex bodies may, which only * matters for pathological input that is rejected anyway. */ -function bracketDepthOverflow(text: string, maxDepth: number): number { +export function bracketDepthOverflow(text: string, maxDepth: number): number { const templateDepths: number[] = [] let depth = 0 for (let i = 0; i < text.length; i++) { From 2f6c1fbd6ce8b8295ccc11e4f09d45c44d089118 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:26:41 -0800 Subject: [PATCH 060/428] feat(workflows): assemble the source lock from code_meta and merge applied sources back into it --- .../lib/workflows/code/source-lock.test.ts | 253 ++++++++++++++++++ apps/sim/lib/workflows/code/source-lock.ts | 203 ++++++++++++++ packages/workflow-code/src/index.ts | 2 +- packages/workflow-code/src/print/index.ts | 1 + 4 files changed, 458 insertions(+), 1 deletion(-) create mode 100644 apps/sim/lib/workflows/code/source-lock.test.ts create mode 100644 apps/sim/lib/workflows/code/source-lock.ts diff --git a/apps/sim/lib/workflows/code/source-lock.test.ts b/apps/sim/lib/workflows/code/source-lock.test.ts new file mode 100644 index 00000000000..577c6e2c083 --- /dev/null +++ b/apps/sim/lib/workflows/code/source-lock.test.ts @@ -0,0 +1,253 @@ +import { + type CanonicalBlock, + type CanonicalizeResult, + encodeAnchor, + parseCodeMeta, + parseWorkflowLock, + type WorkflowCodeMetaV1, +} from '@sim/workflow-code' +import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' +import fc from 'fast-check' +import { describe, expect, it } from 'vitest' +import { + buildLockFromState, + codeMetaPrintInputs, + mergeCodeMetaFromLock, +} from '@/lib/workflows/code/source-lock' + +interface StoredBlock { + id: string + name: string +} + +function block(key: string, name: string): CanonicalBlock { + return { + key, + name, + type: 'function', + parent: null, + enabled: true, + locked: false, + triggerMode: false, + advancedMode: false, + errorPort: false, + retry: null, + params: {}, + modes: {}, + } +} + +/** A canonicalize result for a flat graph: key = normalized name, no collisions. */ +function canonicalOf( + stored: StoredBlock[], + variables: Record = {} +): Pick { + const blocks: Record = {} + const identity: CanonicalizeResult['identity'] = { blocks: {}, variables } + for (const { id, name } of stored) { + const key = normalizeWorkflowBlockName(name) + blocks[key] = block(key, name) + identity.blocks[key] = { id, parent: null } + } + return { + identity, + layout: {}, + workflow: { + modelVersion: 1, + meta: { name: 'wf', description: null }, + blocks, + edges: [], + variables: {}, + annotations: { inactive: {}, comments: {} }, + }, + } +} + +const meta = (patch: Partial): WorkflowCodeMetaV1 => ({ + v: 1, + bindings: {}, + order: {}, + comments: {}, + ...patch, +}) + +describe('buildLockFromState', () => { + it('keeps a block binding and order across a canvas rename (keyed by id, not key)', () => { + const codeMeta = meta({ bindings: { 'id-1': 'classify' }, order: { 'id-1': 4 } }) + const before = buildLockFromState(codeMeta, canonicalOf([{ id: 'id-1', name: 'Classify' }])) + const after = buildLockFromState( + codeMeta, + canonicalOf([{ id: 'id-1', name: 'Route ticket by intent' }]) + ) + expect(before.blocks.classify).toMatchObject({ id: 'id-1', binding: 'classify', order: 4 }) + expect(after.blocks.routeticketbyintent).toMatchObject({ + id: 'id-1', + binding: 'classify', + order: 4, + }) + }) + + it('derives a binding and an order for blocks code_meta does not know, after stored orders', () => { + const lock = buildLockFromState( + meta({ bindings: { 'id-1': 'first' }, order: { 'id-1': 7 } }), + canonicalOf([ + { id: 'id-1', name: 'Zeta' }, + { id: 'id-2', name: 'Fetch user' }, + { id: 'id-3', name: 'Alpha' }, + ]) + ) + expect(lock.blocks.zeta).toMatchObject({ binding: 'first', order: 7 }) + expect(lock.blocks.alpha).toMatchObject({ binding: 'alpha', order: 8 }) + expect(lock.blocks.fetchuser).toMatchObject({ binding: 'fetchUser', order: 9 }) + }) + + it('prefers what the printer wrote over code_meta, and never reuses a binding', () => { + const lock = buildLockFromState( + meta({ bindings: { 'id-1': 'slack', 'id-2': 'other' } }), + canonicalOf([ + { id: 'id-1', name: 'Slack' }, + { id: 'id-2', name: 'Other' }, + ]), + { blocks: { slack: { binding: 'slack2', order: 0 }, other: { binding: 'slack2', order: 1 } } } + ) + expect(lock.blocks.slack.binding).toBe('slack2') + expect(lock.blocks.other.binding).not.toBe('slack2') + }) + + it('ignores unusable stored bindings instead of writing an invalid lock', () => { + const lock = buildLockFromState( + meta({ bindings: { 'id-1': 'workflow' } }), + canonicalOf([{ id: 'id-1', name: 'Workflow step' }]) + ) + expect(lock.blocks.workflowstep.binding).toBe('workflowStep') + }) +}) + +describe('codeMetaPrintInputs', () => { + it('re-keys hints and comments to the current keys and skips ids that left the graph', () => { + const codeMeta = meta({ + bindings: { 'id-1': 'fetchUser', gone: 'stale' }, + order: { 'id-1': 2, gone: 0 }, + comments: { + [encodeAnchor({ kind: 'block', block: 'id-1' })]: [ + { text: ' loads the user', kind: 'line', placement: 'leading' }, + ], + [encodeAnchor({ kind: 'param', block: 'gone', param: 'code' })]: [ + { text: ' orphan', kind: 'line', placement: 'leading' }, + ], + [encodeAnchor({ kind: 'var', variable: 'var-1' })]: [ + { text: ' retries', kind: 'line', placement: 'trailing' }, + ], + }, + }) + const inputs = codeMetaPrintInputs( + codeMeta, + canonicalOf([{ id: 'id-1', name: 'Load user' }], { retries: 'var-1' }) + ) + expect(inputs.hints).toEqual({ blocks: { loaduser: { binding: 'fetchUser', order: 2 } } }) + expect(Object.keys(inputs.comments).sort()).toEqual(['block:loaduser', 'var:retries']) + }) +}) + +describe('mergeCodeMetaFromLock', () => { + it('stores the compiled bindings, order and comments under ids and drops deleted blocks', () => { + const lock = buildLockFromState( + null, + canonicalOf([ + { id: 'id-1', name: 'Fetch' }, + { id: 'id-2', name: 'Send' }, + ]) + ) + const merged = mergeCodeMetaFromLock( + meta({ bindings: { 'id-gone': 'old' }, 'x-keep': true }), + lock, + { + hints: { blocks: { fetch: { binding: 'getIt', order: 1 }, send: { order: 0 } } }, + workflow: { + annotations: { + inactive: {}, + comments: { + [encodeAnchor({ kind: 'block', block: 'send' })]: [ + { text: ' notify', kind: 'line', placement: 'leading' }, + ], + [encodeAnchor({ kind: 'block', block: 'nosuchblock' })]: [ + { text: ' dropped', kind: 'line', placement: 'leading' }, + ], + header: [{ text: ' kept', kind: 'line', placement: 'leading' }], + }, + }, + }, + } + ) + expect(merged.bindings).toEqual({ 'id-1': 'getIt', 'id-2': 'send' }) + expect(merged.order).toEqual({ 'id-1': 1, 'id-2': 0 }) + expect(Object.keys(merged.comments).sort()).toEqual(['block:id-2', 'header']) + expect(merged['x-keep']).toBe(true) + expect(parseCodeMeta(merged).diagnostics).toBeUndefined() + }) +}) + +const nameArb = fc.stringMatching(/^[A-Za-z][A-Za-z0-9 ]{0,10}$/) +const graphArb = fc + .uniqueArray(nameArb, { + minLength: 1, + maxLength: 8, + selector: (name) => normalizeWorkflowBlockName(name), + }) + .filter((names) => names.every((name) => normalizeWorkflowBlockName(name).length > 0)) + .map((names) => names.map((name, i) => ({ id: `id-${i}`, name }))) + +describe('lock helper properties', () => { + it('every assembled lock is valid, whatever code_meta holds', () => { + fc.assert( + fc.property( + graphArb, + fc.dictionary( + fc.constantFrom('id-0', 'id-1', 'id-2', 'gone'), + nameArb.map((n) => n.replace(/ /g, '')) + ), + (stored, bindings) => { + const lock = buildLockFromState(meta({ bindings }), canonicalOf(stored)) + expect(parseWorkflowLock(lock).diagnostics).toBeUndefined() + expect(Object.keys(lock.blocks)).toHaveLength(stored.length) + } + ) + ) + }) + + it('apply then read is a fixed point: merging a lock and rebuilding returns the same lock', () => { + fc.assert( + fc.property(graphArb, fc.array(fc.nat(20), { maxLength: 8 }), (stored, orders) => { + const canonical = canonicalOf(stored) + const first = buildLockFromState( + meta({ order: Object.fromEntries(orders.map((order, i) => [`id-${i}`, order])) }), + canonical + ) + const stored2 = mergeCodeMetaFromLock(null, first, { + hints: { blocks: {} }, + workflow: { annotations: { inactive: {}, comments: {} } }, + }) + expect(buildLockFromState(stored2, canonical)).toEqual(first) + }) + ) + }) + + it('renaming every block on the canvas changes no binding or order', () => { + fc.assert( + fc.property(graphArb, (stored) => { + const first = buildLockFromState(null, canonicalOf(stored)) + const codeMeta = mergeCodeMetaFromLock(null, first, { + hints: { blocks: {} }, + workflow: { annotations: { inactive: {}, comments: {} } }, + }) + const renamed = buildLockFromState( + codeMeta, + canonicalOf(stored.map(({ id }) => ({ id, name: `Renamed ${id}` }))) + ) + const byId = (lock: typeof first) => + Object.fromEntries(Object.values(lock.blocks).map((b) => [b.id, [b.binding, b.order]])) + expect(byId(renamed)).toEqual(byId(first)) + }) + ) + }) +}) diff --git a/apps/sim/lib/workflows/code/source-lock.ts b/apps/sim/lib/workflows/code/source-lock.ts new file mode 100644 index 00000000000..969e524b952 --- /dev/null +++ b/apps/sim/lib/workflows/code/source-lock.ts @@ -0,0 +1,203 @@ +/** + * Glue between `workflow.code_meta` (keyed by block id) and the key-keyed world of the printer, + * the compiler and the lock (build-spec decisions 4 and 6). + * + * Read path (`getWorkflowSource`): canonicalize the stored graph, turn `code_meta` into printer + * inputs with {@link codeMetaPrintInputs}, print, then assemble the lock with + * {@link buildLockFromState} from the canonical identity and the hints the printer returned. + * + * Write path (`applyWorkflowSource`): after a successful apply, {@link mergeCodeMetaFromLock} + * re-keys the compiled bindings, order and comments onto the ids the lock now holds, and the + * result is stored back. + */ + +import { compareStrings } from '@sim/utils/string' +import { + type AnchorKey, + assignIdentifiers, + type BlockKey, + type CanonicalizeResult, + type CanonicalWorkflow, + type CodeComment, + codeMetaExtensions, + decodeAnchor, + encodeAnchor, + type LockHints, + mapAnchorIds, + SDK_RESERVED_IDENTIFIERS, + type WorkflowCodeMetaV1, + type WorkflowLockBlock, + type WorkflowLockV1, +} from '@sim/workflow-code' + +const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ + +function isUsableBinding(binding: string | undefined): binding is string { + return binding !== undefined && IDENTIFIER.test(binding) && !SDK_RESERVED_IDENTIFIERS.has(binding) +} + +/** Re-maps the block and variable segments of comment anchors; an anchor mapped to `null` is dropped. */ +function rekeyComments( + comments: Partial>, + block: (segment: string) => string | null, + variable: (segment: string) => string | null +): Partial> { + const result: Partial> = {} + for (const [key, list] of Object.entries(comments)) { + const anchor = decodeAnchor(key) + const mapped = anchor ? mapAnchorIds(anchor, block, variable) : null + if (!mapped || !list || list.length === 0) continue + const mappedKey = encodeAnchor(mapped) + result[mappedKey] = [...(result[mappedKey] ?? []), ...list] + } + return result +} + +function invert(record: Record): Map { + const inverse = new Map() + for (const [key, id] of Object.entries(record)) { + if (!inverse.has(id)) inverse.set(id, key) + } + return inverse +} + +export interface CodeMetaPrintInputs { + /** `binding` and `order` per block key, for `PrintInput.hints`. */ + hints: LockHints + /** Key-anchored comments, for `workflow.annotations.comments` before printing. */ + comments: Partial> +} + +/** + * Projects `code_meta` onto the keys canonicalize assigned. Entries for ids the stored graph no + * longer holds are ignored, so a stale (unpruned) entry never reaches a print. + */ +export function codeMetaPrintInputs( + codeMeta: WorkflowCodeMetaV1 | null, + canonical: Pick +): CodeMetaPrintInputs { + const hints: LockHints = { blocks: {} } + if (!codeMeta) return { hints, comments: {} } + const keyById = invert( + Object.fromEntries(Object.entries(canonical.identity.blocks).map(([key, b]) => [key, b.id])) + ) + const varKeyById = invert(canonical.identity.variables) + for (const [key, block] of Object.entries(canonical.identity.blocks)) { + const binding = codeMeta.bindings[block.id] + const order = codeMeta.order[block.id] + hints.blocks[key] = { + ...(binding !== undefined && { binding }), + ...(order !== undefined && { order }), + } + } + return { + hints, + comments: rekeyComments( + codeMeta.comments, + (id) => keyById.get(id) ?? null, + (id) => varKeyById.get(id) ?? null + ), + } +} + +/** + * Assembles the full lock for a stored graph: ids, parents, branches, items and layout from + * canonicalize; `binding` and `order` from `printed` (the hints `printWorkflow` returned, which + * is what the file holds), then `code_meta`, then derived values. + * + * Derived bindings are camelCase from the display name (`assignIdentifiers`). Derived orders sort + * after every stored order, by key, which is exactly how the printer orders blocks without one. + * Pass `printed` whenever a file was printed, so the lock and the file always agree. + */ +export function buildLockFromState( + codeMeta: WorkflowCodeMetaV1 | null, + canonical: Pick, + printed?: LockHints +): WorkflowLockV1 { + const { identity, layout, workflow } = canonical + const keys = Object.keys(identity.blocks).sort(compareStrings) + + const orderOf = new Map() + for (const key of keys) { + const id = identity.blocks[key].id + const order = printed?.blocks[key]?.order ?? codeMeta?.order[id] + if (order !== undefined && Number.isSafeInteger(order) && order >= 0) orderOf.set(key, order) + } + let next = Math.max(-1, ...orderOf.values()) + 1 + for (const key of keys) { + if (!orderOf.has(key)) orderOf.set(key, next++) + } + + const declarationOrder = [...keys].sort( + (a, b) => (orderOf.get(a) ?? 0) - (orderOf.get(b) ?? 0) || compareStrings(a, b) + ) + const bindings = assignIdentifiers( + declarationOrder.map((key) => { + const id = identity.blocks[key].id + const candidates = [printed?.blocks[key]?.binding, codeMeta?.bindings[id]] + return { + key, + name: workflow.blocks[key]?.name ?? key, + hint: candidates.find(isUsableBinding), + } + }), + new Set() + ) + + const blocks: Record = {} + for (const key of keys) { + const entry = identity.blocks[key] + const codeFile = printed?.blocks[key]?.codeFile + blocks[key] = { + id: entry.id, + parent: entry.parent, + ...(entry.branches && { branches: { ...entry.branches } }), + ...(entry.items && { items: structuredClone(entry.items) }), + binding: bindings.get(key) ?? key, + order: orderOf.get(key) ?? 0, + ...(layout[key] && { layout: { ...layout[key] } }), + ...(codeFile && { codeFile }), + } + } + return { lockVersion: 1, blocks, variables: { ...identity.variables } } +} + +/** + * The `code_meta` to store after a successful apply: the compiled file's bindings, declaration + * order and comments, re-keyed from block keys to the ids in `lock` (the post-materialize lock). + * Bindings or orders the file does not state fall back to the lock's. Blocks and variables the + * lock does not hold are dropped, and `x-` extensions of `prevMeta` are kept. + */ +export function mergeCodeMetaFromLock( + prevMeta: WorkflowCodeMetaV1 | null, + lock: Pick, + compiled: { hints: LockHints; workflow: Pick } +): WorkflowCodeMetaV1 { + const bindings: Record = {} + const order: Record = {} + const taken = new Set() + for (const key of Object.keys(lock.blocks).sort(compareStrings)) { + const block = lock.blocks[key] + const hint = compiled.hints.blocks[key] + const binding = [hint?.binding, block.binding].find( + (candidate) => isUsableBinding(candidate) && !taken.has(candidate) + ) + if (binding !== undefined) { + bindings[block.id] = binding + taken.add(binding) + } + order[block.id] = hint?.order ?? block.order + } + const comments = rekeyComments( + compiled.workflow.annotations.comments, + (key) => (Object.hasOwn(lock.blocks, key) ? lock.blocks[key].id : null), + (key) => (Object.hasOwn(lock.variables, key) ? lock.variables[key] : null) + ) + return { + ...(prevMeta ? codeMetaExtensions(prevMeta) : {}), + v: 1, + bindings, + order, + comments, + } +} diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index a89d63a1147..d851f0cd38c 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -152,5 +152,5 @@ export type { VarNode, WorkflowAnnotations, } from './model' -export { createPrintWorkflow, printWorkflow } from './print' +export { assignIdentifiers, createPrintWorkflow, printWorkflow } from './print' export { GENERIC_BUILDER, SDK_CORE_EXPORTS, SDK_RESERVED_IDENTIFIERS } from './sdk' diff --git a/packages/workflow-code/src/print/index.ts b/packages/workflow-code/src/print/index.ts index 84140ea8edb..82b0de3adba 100644 --- a/packages/workflow-code/src/print/index.ts +++ b/packages/workflow-code/src/print/index.ts @@ -1 +1,2 @@ +export { assignIdentifiers } from './idents' export { createPrintWorkflow, printWorkflow } from './printer' From a1c2c5e3a02598c9a06e9748e0b4648837ca07e7 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:24:03 -0800 Subject: [PATCH 061/428] feat(workflows): get workflow source use case, resource key resolver, and internal + v2 source routes behind workflow-code getWorkflowSource (workflows.source.read, read role, workspace keys allowed) loads the stored migrated graph, builds the per-workflow compile catalog, lifts resource ids to provisional name-derived keys, canonicalizes and prints. It returns files, the assembled lock, lockBase, the sf1 fingerprint, the canonical hash, catalog version and sdk major, with annotateIds and functionCode options. GET /api/v2/workflows/{workflowId}/source serves API callers and GET /api/workflows/[id]/source the canvas (v2 routes take API keys only). Regenerates the route table, OpenAPI, CLI, MCP and CLI docs. --- .../(generated)/workflows/meta.json | 1 + apps/docs/content/docs/cli/reference.mdx | 32 ++ apps/docs/content/docs/cli/workflows.mdx | 32 ++ apps/docs/openapi-v2-workflows.json | 422 ++++++++++++++++++ .../v2/workflows/[workflowId]/source/route.ts | 28 ++ .../app/api/workflows/[id]/source/route.ts | 32 ++ .../contracts/v2/openapi/workflow-source.ts | 68 +++ .../lib/api/contracts/v2/openapi/workflows.ts | 3 +- .../lib/api/contracts/v2/workflow-source.ts | 16 + apps/sim/lib/api/contracts/workflow-source.ts | 129 ++++++ .../lib/api/mcp/generated/v2-operations.ts | 9 + .../server/routes/v2-route-table.generated.ts | 4 + .../application/get-workflow-source.ts | 187 ++++++++ .../lib/workflows/application/operations.ts | 14 + apps/sim/lib/workflows/code/feature-flag.ts | 6 +- apps/sim/lib/workflows/code/resources.ts | 190 ++++++++ packages/sim-cli/src/contract/commands.ts | 4 + packages/sim-cli/src/generated/v2-api.ts | 85 ++++ 18 files changed, 1260 insertions(+), 2 deletions(-) create mode 100644 apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts create mode 100644 apps/sim/app/api/workflows/[id]/source/route.ts create mode 100644 apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts create mode 100644 apps/sim/lib/api/contracts/v2/workflow-source.ts create mode 100644 apps/sim/lib/api/contracts/workflow-source.ts create mode 100644 apps/sim/lib/workflows/application/get-workflow-source.ts create mode 100644 apps/sim/lib/workflows/code/resources.ts diff --git a/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json b/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json index f4b795acb97..61ea4f69103 100644 --- a/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json +++ b/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json @@ -10,6 +10,7 @@ "moveWorkflows", "getWorkflowState", "getWorkflowOutline", + "getWorkflowSource", "replaceWorkflowState", "applyWorkflowOperations", "applyWorkflowVariables", diff --git a/apps/docs/content/docs/cli/reference.mdx b/apps/docs/content/docs/cli/reference.mdx index 7c6b39511d1..dfd69f3be12 100644 --- a/apps/docs/content/docs/cli/reference.mdx +++ b/apps/docs/content/docs/cli/reference.mdx @@ -8261,6 +8261,38 @@ sim workflows outline API request and response schemas: [getWorkflowOutline](/api-reference/workflows/getWorkflowOutline). +### sim workflows source get + +Show a workflow’s draft as TypeScript source with its identity lock + +```bash +sim workflows source get [options] +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `workflowId` | Yes | Unique workflow identifier. | + + + +**Options** + + + +| Option | Required | Description | +| --- | --- | --- | +| `--annotate-ids` | No | Print each block's id as a trailing `// id:` comment on its declaration. | +| `--no-annotate-ids` | No | Send --annotate-ids as false. | +| `--function-code ` | No | Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates. Accepted values: `inline`, `files`. | + + + +API request and response schemas: [getWorkflowSource](/api-reference/workflows/getWorkflowSource). + ### sim workflows state get Get workflow state diff --git a/apps/docs/content/docs/cli/workflows.mdx b/apps/docs/content/docs/cli/workflows.mdx index 2bb27df712c..6fb687bf6a3 100644 --- a/apps/docs/content/docs/cli/workflows.mdx +++ b/apps/docs/content/docs/cli/workflows.mdx @@ -1285,6 +1285,38 @@ sim workflows mkdir API request and response schemas: [createWorkflowFolder](/api-reference/workflows/createWorkflowsFolder). +## Other commands + +### Show a workflow’s draft as TypeScript source with its identity lock + +```bash +sim workflows source get [options] +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `workflowId` | Yes | Unique workflow identifier. | + + + +**Options** + + + +| Option | Required | Description | +| --- | --- | --- | +| `--annotate-ids` | No | Print each block's id as a trailing `// id:` comment on its declaration. | +| `--no-annotate-ids` | No | Send --annotate-ids as false. | +| `--function-code ` | No | Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates. Accepted values: `inline`, `files`. | + + + +API request and response schemas: [getWorkflowSource](/api-reference/workflows/getWorkflowSource). + ## Related docs - [Workflow builder](/workflows) diff --git a/apps/docs/openapi-v2-workflows.json b/apps/docs/openapi-v2-workflows.json index 7918cdc1183..1dbb3bf4cf9 100644 --- a/apps/docs/openapi-v2-workflows.json +++ b/apps/docs/openapi-v2-workflows.json @@ -5907,6 +5907,139 @@ } } }, + "/api/v2/workflows/{workflowId}/source": { + "get": { + "operationId": "getWorkflowSource", + "summary": "Get workflow source", + "description": "Read the saved draft as TypeScript source written against the workflow SDK, with its identity lock and a freshness `fingerprint`. The lock binds each block key in the source to its stored id; `lockBase` records the fingerprint and block catalog the source was read at. The fingerprint ignores canvas positions, so moving blocks does not change it. Workspace resources such as tables and knowledge bases appear as keys derived from their current names, so renaming a resource changes its key; an id that matches no resource in the workspace prints as an unresolved reference. Function-block code goes to `functions/*` files unless `functionCode` is `inline`. This read records no audit event; `HEAD` mirrors `GET`. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.", + "x-sim-operation": "workflows.source.read", + "x-oauth-scope": "api:read", + "tags": ["Workflows"], + "security": [ + { + "apiKey": [] + }, + { + "oauthBearer": ["api:read"] + } + ], + "parameters": [ + { + "name": "workflowId", + "in": "path", + "required": true, + "description": "Unique workflow identifier.", + "schema": { + "type": "string", + "minLength": 1, + "description": "Unique workflow identifier.", + "examples": ["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"] + } + }, + { + "name": "annotateIds", + "in": "query", + "required": false, + "description": "Print each block's id as a trailing `// id:` comment on its declaration.", + "schema": { + "description": "Print each block's id as a trailing `// id:` comment on its declaration.", + "type": "boolean" + } + }, + { + "name": "functionCode", + "in": "query", + "required": false, + "description": "Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates.", + "schema": { + "description": "Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates.", + "type": "string", + "enum": ["inline", "files"] + } + } + ], + "responses": { + "200": { + "description": "The workflow draft as source.", + "headers": { + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/GetWorkflowSourceResponse" + }, + "examples": { + "example1": { + "summary": "Response example 1", + "value": { + "data": { + "workflowId": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "files": { + "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" + }, + "lock": { + "lockVersion": 1, + "blocks": { + "start": { + "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "parent": null, + "binding": "start", + "order": 0 + } + }, + "variables": {} + }, + "lockBase": { + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" + }, + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "canonicalHash": "0d6e2b8a4c1f7e3d9b5a2c8f4e1d7b3a9c6f2e8d4b1a7c3e9f5d2b8a4c1e7f3d", + "catalogVersion": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a", + "sdkMajor": 1, + "warnings": [] + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "429": { + "$ref": "#/components/responses/RateLimited" + }, + "500": { + "$ref": "#/components/responses/InternalError" + }, + "503": { + "$ref": "#/components/responses/ServiceUnavailable" + } + } + } + }, "/api/v2/workspaces/{workspaceId}/fork/preview": { "post": { "operationId": "previewWorkspaceFork", @@ -17279,6 +17412,295 @@ } ] }, + "GetWorkflowSourceResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "workflowId": { + "type": "string", + "description": "Workflow id." + }, + "workspaceId": { + "type": "string", + "description": "Workspace id." + }, + "files": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "Relative path → file text: `workflow.ts`, then any `functions/*` files." + }, + "lock": { + "type": "object", + "properties": { + "lockVersion": { + "type": "number", + "const": 1, + "description": "Lock format version." + }, + "blocks": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Block id." + }, + "parent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Key of the enclosing loop or parallel, or null." + }, + "branches": { + "description": "Condition or router branch key → stored branch id.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + } + }, + "items": { + "description": "Per field, its id-bearing items (input format fields) in stored order.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Item name." + }, + "id": { + "type": "string", + "description": "Item id." + } + }, + "required": ["name", "id"], + "additionalProperties": false, + "description": "One id-bearing list item." + } + } + }, + "binding": { + "type": "string", + "description": "The `const` name the block is printed as." + }, + "order": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Declaration-order tie-break." + }, + "layout": { + "type": "object", + "properties": { + "x": { + "type": "number", + "description": "Canvas x position." + }, + "y": { + "type": "number", + "description": "Canvas y position." + }, + "w": { + "description": "Container width.", + "type": "number" + }, + "h": { + "description": "Container height.", + "type": "number" + }, + "height": { + "description": "Stored block height.", + "type": "number" + }, + "horizontalHandles": { + "description": "Handles on the left and right.", + "type": "boolean" + } + }, + "required": ["x", "y"], + "additionalProperties": false, + "description": "Stored canvas geometry; applied only to new blocks." + }, + "codeFile": { + "description": "Path of the block’s function-code file.", + "type": "string" + } + }, + "required": ["id", "parent", "binding", "order"], + "additionalProperties": false, + "description": "One block’s identity." + }, + "description": "Block key → identity." + }, + "variables": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "Variable key → variable id." + } + }, + "required": ["lockVersion", "blocks", "variables"], + "additionalProperties": false, + "description": "Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids." + }, + "lockBase": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "Workspace the workflow belongs to." + }, + "baseFingerprint": { + "type": "string", + "description": "The `fingerprint` this source was read at." + }, + "catalogHash": { + "type": "string", + "description": "Hash of the block catalog the source was printed against." + } + }, + "required": ["workspaceId", "baseFingerprint", "catalogHash"], + "additionalProperties": false, + "description": "Freshness facts for the lock in this environment (`.sim/base.json`)." + }, + "fingerprint": { + "type": "string", + "description": "Freshness token of the stored draft. It ignores canvas positions, so moving blocks does not change it." + }, + "canonicalHash": { + "type": "string", + "description": "Hash of the canonical workflow the files compile to; comments do not affect it." + }, + "catalogVersion": { + "type": "string", + "description": "Hash of the block catalog the source was printed against." + }, + "sdkMajor": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Workflow SDK major version of the source." + }, + "warnings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Diagnostic code, e.g. `W_CANON_UNRESOLVED_ID`." + }, + "severity": { + "type": "string", + "enum": ["error", "warning", "info"], + "description": "Diagnostic severity." + }, + "message": { + "type": "string", + "description": "What was found." + }, + "hint": { + "description": "How to address it.", + "type": "string" + }, + "blockKey": { + "description": "Block the finding is about.", + "type": "string" + }, + "param": { + "description": "Field the finding is about.", + "type": "string" + } + }, + "required": ["code", "severity", "message"], + "additionalProperties": false, + "description": "A finding from reading the stored graph as source." + }, + "description": "Findings from reading the stored graph." + } + }, + "required": [ + "workflowId", + "workspaceId", + "files", + "lock", + "lockBase", + "fingerprint", + "canonicalHash", + "catalogVersion", + "sdkMajor", + "warnings" + ], + "additionalProperties": false, + "description": "Response data." + } + }, + "required": ["data"], + "additionalProperties": false, + "title": "Get workflow source response", + "description": "The workflow draft as TypeScript source.", + "examples": [ + { + "data": { + "workflowId": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "files": { + "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" + }, + "lock": { + "lockVersion": 1, + "blocks": { + "start": { + "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "parent": null, + "binding": "start", + "order": 0 + } + }, + "variables": {} + }, + "lockBase": { + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" + }, + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "canonicalHash": "0d6e2b8a4c1f7e3d9b5a2c8f4e1d7b3a9c6f2e8d4b1a7c3e9f5d2b8a4c1e7f3d", + "catalogVersion": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a", + "sdkMajor": 1, + "warnings": [] + } + } + ] + }, "WorkspaceForkPreview": { "type": "object", "properties": { diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts new file mode 100644 index 00000000000..2f6e19916bd --- /dev/null +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts @@ -0,0 +1,28 @@ +import { v2GetWorkflowSourceContract } from '@/lib/api/contracts/v2/workflow-source' +import { defineV2JsonRoute, v2ApiKeyAuth, v2RateLimits } from '@/lib/api/server/routes' +import { v2WorkflowErrorPolicies } from '@/lib/workflows/api' +import { getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' +import { workflowOperations } from '@/lib/workflows/application/operations' + +export const dynamic = 'force-dynamic' +export const revalidate = 0 + +/** + * GET /api/v2/workflows/[workflowId]/source — the draft as TypeScript source with its identity + * lock and freshness fingerprint. Head-safe and unaudited, like `GET .../state`, which it + * projects. Answers 403 while the `workflow-code` flag is off. + */ +export const GET = defineV2JsonRoute({ + contract: v2GetWorkflowSourceContract, + auth: v2ApiKeyAuth, + operation: workflowOperations.readSource, + rateLimit: v2RateLimits.publicApi, + errorPolicy: v2WorkflowErrorPolicies.concealWorkflowAuthorization, + mapInput: ({ params, query }) => ({ + workflowId: params.workflowId, + ...(query.annotateIds !== undefined ? { annotateIds: query.annotateIds } : {}), + ...(query.functionCode ? { functionCode: query.functionCode } : {}), + }), + useCase: getWorkflowSource, + present: (source) => ({ data: source }), +}) diff --git a/apps/sim/app/api/workflows/[id]/source/route.ts b/apps/sim/app/api/workflows/[id]/source/route.ts new file mode 100644 index 00000000000..49d895a1cd2 --- /dev/null +++ b/apps/sim/app/api/workflows/[id]/source/route.ts @@ -0,0 +1,32 @@ +import { getWorkflowSourceContract } from '@/lib/api/contracts/workflow-source' +import { + defineInternalJsonRoute, + internalRateLimits, + internalSessionAuth, +} from '@/lib/api/server/routes' +import { internalWorkflowErrorPolicies } from '@/lib/workflows/api' +import { getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' + +export const dynamic = 'force-dynamic' +export const revalidate = 0 + +/** + * GET /api/workflows/[id]/source — the draft as TypeScript source for the canvas Code tab. The + * same use case as `GET /api/v2/workflows/{workflowId}/source`, under session auth. + */ +export const GET = defineInternalJsonRoute({ + contract: getWorkflowSourceContract, + auth: internalSessionAuth, + operation: getWorkflowSource.operation, + rateLimit: internalRateLimits.none({ + reason: 'A session read the Code tab refetches after edits, like GET /api/workflows/[id]', + }), + errorPolicy: internalWorkflowErrorPolicies.concealWorkflowAuthorization, + mapInput: ({ params, query }) => ({ + workflowId: params.id, + ...(query.annotateIds !== undefined ? { annotateIds: query.annotateIds } : {}), + ...(query.functionCode ? { functionCode: query.functionCode } : {}), + }), + useCase: getWorkflowSource, + present: (source) => ({ data: source }), +}) diff --git a/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts new file mode 100644 index 00000000000..0ea32d04172 --- /dev/null +++ b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts @@ -0,0 +1,68 @@ +import { + documentedSchema, + RATE_LIMIT_HEADERS, + RESOURCE_ERRORS, +} from '@/lib/api/contracts/v2/openapi/shared' +import { v2GetWorkflowSourceContract } from '@/lib/api/contracts/v2/workflow-source' +import { defineOpenApiRoute } from '@/lib/api/openapi/types' +import { workflowOperations } from '@/lib/workflows/application/operations' + +const BLOCK_ID = '5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47' +const FINGERPRINT = 'sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d' +const CATALOG_HASH = '3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a' + +const WORKFLOW_SOURCE_EXAMPLE = { + workflowId: '3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8', + workspaceId: '7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28', + files: { + 'workflow.ts': + "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n", + }, + lock: { + lockVersion: 1, + blocks: { start: { id: BLOCK_ID, parent: null, binding: 'start', order: 0 } }, + variables: {}, + }, + lockBase: { + workspaceId: '7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28', + baseFingerprint: FINGERPRINT, + catalogHash: CATALOG_HASH, + }, + fingerprint: FINGERPRINT, + canonicalHash: '0d6e2b8a4c1f7e3d9b5a2c8f4e1d7b3a9c6f2e8d4b1a7c3e9f5d2b8a4c1e7f3d', + catalogVersion: CATALOG_HASH, + sdkMajor: 1, + warnings: [], +} + +export const workflowSourceOpenApiRoutes = [ + defineOpenApiRoute( + v2GetWorkflowSourceContract, + { + applicationOperation: workflowOperations.readSource, + operationId: 'getWorkflowSource', + summary: 'Get workflow source', + description: + 'Read the saved draft as TypeScript source written against the workflow SDK, with its identity lock and a freshness `fingerprint`. The lock binds each block key in the source to its stored id; `lockBase` records the fingerprint and block catalog the source was read at. The fingerprint ignores canvas positions, so moving blocks does not change it. Workspace resources such as tables and knowledge bases appear as keys derived from their current names, so renaming a resource changes its key; an id that matches no resource in the workspace prints as an unresolved reference. Function-block code goes to `functions/*` files unless `functionCode` is `inline`. This read records no audit event; `HEAD` mirrors `GET`. Returns `403` while code-first workflows are not enabled.', + tags: ['Workflows'], + errors: RESOURCE_ERRORS, + success: { description: 'The workflow draft as source.', headers: RATE_LIMIT_HEADERS }, + }, + { + params: v2GetWorkflowSourceContract.params, + query: documentedSchema( + v2GetWorkflowSourceContract.query, + 'GetWorkflowSourceQuery', + 'Get workflow source query', + 'How the source is printed.' + ), + response: documentedSchema( + v2GetWorkflowSourceContract.response.schema, + 'GetWorkflowSourceResponse', + 'Get workflow source response', + 'The workflow draft as TypeScript source.', + [{ data: WORKFLOW_SOURCE_EXAMPLE }] + ), + } + ), +] diff --git a/apps/sim/lib/api/contracts/v2/openapi/workflows.ts b/apps/sim/lib/api/contracts/v2/openapi/workflows.ts index fae096a3268..25771b4848a 100644 --- a/apps/sim/lib/api/contracts/v2/openapi/workflows.ts +++ b/apps/sim/lib/api/contracts/v2/openapi/workflows.ts @@ -26,6 +26,7 @@ import { WORKSPACE_ERRORS, withRequestBodyErrors, } from '@/lib/api/contracts/v2/openapi/shared' +import { workflowSourceOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/workflow-source' import { workspaceSyncOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/workspace-sync' import { EXECUTE_OPTION_CONSTRAINTS, @@ -1812,5 +1813,5 @@ export const workflowsOpenApiDocument = defineOpenApiDocument({ headers: { ...V2_BINARY_DOWNLOAD_HEADERS, ...V2_COMMON_HEADERS }, errorSchema: V2_ERROR_SCHEMA, errorResponses: ERROR_RESPONSES, - routes: [...routes, ...workspaceSyncOpenApiRoutes], + routes: [...routes, ...workflowSourceOpenApiRoutes, ...workspaceSyncOpenApiRoutes], }) diff --git a/apps/sim/lib/api/contracts/v2/workflow-source.ts b/apps/sim/lib/api/contracts/v2/workflow-source.ts new file mode 100644 index 00000000000..900e865ca72 --- /dev/null +++ b/apps/sim/lib/api/contracts/v2/workflow-source.ts @@ -0,0 +1,16 @@ +import { defineRouteContract } from '@/lib/api/contracts/types' +import { v2DataResponse } from '@/lib/api/contracts/v2/shared' +import { v2WorkflowIdParamsSchema } from '@/lib/api/contracts/v2/workflows' +import { + workflowSourceQuerySchema, + workflowSourceSchema, +} from '@/lib/api/contracts/workflow-source' + +/** `GET /api/v2/workflows/{workflowId}/source`: the internal Code tab read, for API callers. */ +export const v2GetWorkflowSourceContract = defineRouteContract({ + method: 'GET', + path: '/api/v2/workflows/[workflowId]/source', + params: v2WorkflowIdParamsSchema, + query: workflowSourceQuerySchema, + response: { mode: 'json', schema: v2DataResponse(workflowSourceSchema) }, +}) diff --git a/apps/sim/lib/api/contracts/workflow-source.ts b/apps/sim/lib/api/contracts/workflow-source.ts new file mode 100644 index 00000000000..904441905c1 --- /dev/null +++ b/apps/sim/lib/api/contracts/workflow-source.ts @@ -0,0 +1,129 @@ +import { z } from 'zod' +import { booleanQueryFlagSchema } from '@/lib/api/contracts/primitives' +import { defineRouteContract } from '@/lib/api/contracts/types' +import { workflowIdParamsSchema } from '@/lib/api/contracts/workflows' + +/** + * Workflow source: a stored draft printed as TypeScript against the workflow SDK, with its + * identity lock (build-spec decisions 11–13). The shapes mirror `@sim/workflow-code`'s + * `WorkflowLockV1` and `LockBase`, which own them; the internal route (the canvas Code tab) and + * the v2 route share these schemas. + */ + +export const workflowSourceQuerySchema = z + .object({ + annotateIds: booleanQueryFlagSchema + .optional() + .describe("Print each block's id as a trailing `// id:` comment on its declaration."), + functionCode: z + .enum(['inline', 'files'], { + error: 'functionCode: expected one of "inline" | "files"', + }) + .optional() + .describe( + 'Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates.' + ), + }) + .strict() + +const lockLayoutSchema = z + .object({ + x: z.number().describe('Canvas x position.'), + y: z.number().describe('Canvas y position.'), + w: z.number().optional().describe('Container width.'), + h: z.number().optional().describe('Container height.'), + height: z.number().optional().describe('Stored block height.'), + horizontalHandles: z.boolean().optional().describe('Handles on the left and right.'), + }) + .describe('Stored canvas geometry; applied only to new blocks.') + +const lockBlockSchema = z + .object({ + id: z.string().describe('Block id.'), + parent: z.string().nullable().describe('Key of the enclosing loop or parallel, or null.'), + branches: z + .record(z.string(), z.string()) + .optional() + .describe('Condition or router branch key → stored branch id.'), + items: z + .record( + z.string(), + z.array( + z + .object({ + name: z.string().describe('Item name.'), + id: z.string().describe('Item id.'), + }) + .describe('One id-bearing list item.') + ) + ) + .optional() + .describe('Per field, its id-bearing items (input format fields) in stored order.'), + binding: z.string().describe('The `const` name the block is printed as.'), + order: z.number().int().describe('Declaration-order tie-break.'), + layout: lockLayoutSchema.optional(), + codeFile: z.string().optional().describe('Path of the block’s function-code file.'), + }) + .describe('One block’s identity.') + +const workflowLockSchema = z + .object({ + lockVersion: z.literal(1).describe('Lock format version.'), + blocks: z.record(z.string(), lockBlockSchema).describe('Block key → identity.'), + variables: z.record(z.string(), z.string()).describe('Variable key → variable id.'), + }) + .describe('Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids.') + +const lockBaseSchema = z + .object({ + workspaceId: z.string().describe('Workspace the workflow belongs to.'), + baseFingerprint: z.string().describe('The `fingerprint` this source was read at.'), + catalogHash: z.string().describe('Hash of the block catalog the source was printed against.'), + }) + .describe('Freshness facts for the lock in this environment (`.sim/base.json`).') + +const sourceWarningSchema = z + .object({ + code: z.string().describe('Diagnostic code, e.g. `W_CANON_UNRESOLVED_ID`.'), + severity: z.enum(['error', 'warning', 'info']).describe('Diagnostic severity.'), + message: z.string().describe('What was found.'), + hint: z.string().optional().describe('How to address it.'), + blockKey: z.string().optional().describe('Block the finding is about.'), + param: z.string().optional().describe('Field the finding is about.'), + }) + .describe('A finding from reading the stored graph as source.') + +export const workflowSourceSchema = z + .object({ + workflowId: z.string().describe('Workflow id.'), + workspaceId: z.string().describe('Workspace id.'), + files: z + .record(z.string(), z.string()) + .describe('Relative path → file text: `workflow.ts`, then any `functions/*` files.'), + lock: workflowLockSchema, + lockBase: lockBaseSchema, + fingerprint: z + .string() + .describe( + 'Freshness token of the stored draft. It ignores canvas positions, so moving blocks does not change it.' + ), + canonicalHash: z + .string() + .describe('Hash of the canonical workflow the files compile to; comments do not affect it.'), + catalogVersion: z + .string() + .describe('Hash of the block catalog the source was printed against.'), + sdkMajor: z.number().int().describe('Workflow SDK major version of the source.'), + warnings: z.array(sourceWarningSchema).describe('Findings from reading the stored graph.'), + }) + .describe('A workflow draft as TypeScript source.') + +export type WorkflowSource = z.output + +export const getWorkflowSourceContract = defineRouteContract({ + method: 'GET', + path: '/api/workflows/[id]/source', + params: workflowIdParamsSchema, + query: workflowSourceQuerySchema, + response: { mode: 'json', schema: z.object({ data: workflowSourceSchema }) }, +}) diff --git a/apps/sim/lib/api/mcp/generated/v2-operations.ts b/apps/sim/lib/api/mcp/generated/v2-operations.ts index 51cf9a9dabd..05e461fd968 100644 --- a/apps/sim/lib/api/mcp/generated/v2-operations.ts +++ b/apps/sim/lib/api/mcp/generated/v2-operations.ts @@ -295,6 +295,7 @@ import { v2UndeployWorkflowMcpToolContract, v2UpdateWorkflowMcpServerContract, } from '@/lib/api/contracts/v2/workflow-mcp-servers' +import { v2GetWorkflowSourceContract } from '@/lib/api/contracts/v2/workflow-source' import { v2ActivateWorkflowVersionContract, v2ApplyWorkflowOperationsContract, @@ -1692,6 +1693,14 @@ export const V2_MCP_OPERATIONS = { handler: () => import('@/app/api/v2/workflows/[workflowId]/runs/[runId]/route').then((route) => route.GET), }, + getWorkflowSource: { + contract: v2GetWorkflowSourceContract, + summary: 'Get workflow source', + description: + 'Read the saved draft as TypeScript source written against the workflow SDK, with its identity lock and a freshness `fingerprint`. The lock binds each block key in the source to its stored id; `lockBase` records the fingerprint and block catalog the source was read at. The fingerprint ignores canvas positions, so moving blocks does not change it. Workspace resources such as tables and knowledge bases appear as keys derived from their current names, so renaming a resource changes its key; an id that matches no resource in the workspace prints as an unresolved reference. Function-block code goes to `functions/*` files unless `functionCode` is `inline`. This read records no audit event; `HEAD` mirrors `GET`. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.', + handler: () => + import('@/app/api/v2/workflows/[workflowId]/source/route').then((route) => route.GET), + }, getWorkflowState: { contract: v2GetWorkflowStateContract, summary: 'Get workflow state', diff --git a/apps/sim/lib/api/server/routes/v2-route-table.generated.ts b/apps/sim/lib/api/server/routes/v2-route-table.generated.ts index 6da3bbcba32..72381d0688f 100644 --- a/apps/sim/lib/api/server/routes/v2-route-table.generated.ts +++ b/apps/sim/lib/api/server/routes/v2-route-table.generated.ts @@ -847,6 +847,10 @@ export const V2_ROUTES: readonly V2RouteEntry[] = [ pattern: '/api/v2/workflows/{workflowId}/runs/{runId}/resume', load: () => import('@/app/api/v2/workflows/[workflowId]/runs/[runId]/resume/route'), }, + { + pattern: '/api/v2/workflows/{workflowId}/source', + load: () => import('@/app/api/v2/workflows/[workflowId]/source/route'), + }, { pattern: '/api/v2/workflows/{workflowId}/state', load: () => import('@/app/api/v2/workflows/[workflowId]/state/route'), diff --git a/apps/sim/lib/workflows/application/get-workflow-source.ts b/apps/sim/lib/workflows/application/get-workflow-source.ts new file mode 100644 index 00000000000..4e9d70473f6 --- /dev/null +++ b/apps/sim/lib/workflows/application/get-workflow-source.ts @@ -0,0 +1,187 @@ +import { + type CanonicalWorkflow, + type CodeComment, + canonicalHash, + canonicalize, + type Diagnostic, + encodeAnchor, + type LockBase, + type LockIdentity, + type LockLayout, + printWorkflow, + type SourceFingerprint, + sourceFingerprint, + type WorkflowLockBlock, + type WorkflowLockV1, +} from '@sim/workflow-code' +import type { WorkflowState } from '@sim/workflow-types/workflow' +import { resolveCatalogGate, withCatalogBlockScope } from '@/lib/catalog/application/context' +import { defineAuthorizedWorkflowUseCase } from '@/lib/workflows/application/authorized-workflow-use-case' +import { workflowOperations } from '@/lib/workflows/application/operations' +import { resolvePrincipalWorkflowContext } from '@/lib/workflows/application/principal-scope' +import { loadWorkflowGraph } from '@/lib/workflows/application/read-workflow-graph' +import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog' +import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' +import { createRecordingResolver, loadResourceKeyResolver } from '@/lib/workflows/code/resources' + +/** Directory function-code files are printed into when `functionCode` is `files`. */ +const FUNCTION_CODE_DIR = 'functions' + +export interface GetWorkflowSourceInput { + workflowId: string + assertedWorkspaceId?: string + /** Prints each block's id as a trailing comment on its declaration (agent read path). */ + annotateIds?: boolean + /** `files` (default): function code in `functions/*` files; `inline`: tagged templates. */ + functionCode?: 'inline' | 'files' +} + +/** A canonicalize or print finding, without source spans (the read path has no input text). */ +export interface WorkflowSourceWarning { + code: string + severity: 'error' | 'warning' | 'info' + message: string + hint?: string + blockKey?: string + param?: string +} + +export interface GetWorkflowSourceResult { + workflowId: string + workspaceId: string + /** Repo-relative path → text: `workflow.ts` first, then any function-code files. */ + files: Record + lock: WorkflowLockV1 + lockBase: LockBase + /** `sf1:` freshness token; apply answers 409 when the stored graph no longer matches it. */ + fingerprint: SourceFingerprint + /** Hash of the canonical model the files compile to (annotations excluded). */ + canonicalHash: string + /** The compile catalog's content hash the files were printed against. */ + catalogVersion: string + sdkMajor: number + warnings: WorkflowSourceWarning[] +} + +function toWarning(diagnostic: Diagnostic): WorkflowSourceWarning { + return { + code: diagnostic.code, + severity: diagnostic.severity, + message: diagnostic.message, + ...(diagnostic.hint !== undefined ? { hint: diagnostic.hint } : {}), + ...(diagnostic.blockKey !== undefined ? { blockKey: diagnostic.blockKey } : {}), + ...(diagnostic.param !== undefined ? { param: diagnostic.param } : {}), + } +} + +/** + * Adds `// id: ` after every block declaration. Comments are annotations, so the + * canonical hash and fingerprint are unchanged. + */ +function withIdComments(workflow: CanonicalWorkflow, identity: LockIdentity): CanonicalWorkflow { + const comments = { ...workflow.annotations.comments } + for (const [key, block] of Object.entries(identity.blocks)) { + const anchor = encodeAnchor({ kind: 'block', block: key }) + const idComment: CodeComment = { text: ` id: ${block.id}`, kind: 'line', placement: 'trailing' } + comments[anchor] = [...(comments[anchor] ?? []), idComment] + } + return { ...workflow, annotations: { ...workflow.annotations, comments } } +} + +/** The full lock: canonicalize's identity, the printer's bindings/order/code files, and layout. */ +function assembleLock( + identity: LockIdentity, + hints: Record, + layout: Record +): WorkflowLockV1 { + const blocks: Record = {} + for (const [key, block] of Object.entries(identity.blocks)) { + const hint = hints[key] + if (hint?.binding === undefined || hint.order === undefined) { + throw new Error(`The printer returned no binding or order for block "${key}"`) + } + blocks[key] = { + ...block, + binding: hint.binding, + order: hint.order, + ...(hint.codeFile !== undefined ? { codeFile: hint.codeFile } : {}), + ...(layout[key] ? { layout: layout[key] } : {}), + } + } + return { lockVersion: 1, blocks, variables: identity.variables } +} + +/** + * Reads a workflow's stored draft as TypeScript source (build-spec decisions 11–13, s4 §2). + * + * Loads the stored, migrated graph; builds the per-workflow compile catalog (the blocks this + * caller may place plus every type already in the workflow); projects the graph to the canonical + * model with resource ids lifted to provisional keys; and prints it. Pure read: no audit, so it + * stays head-safe and pollable like `GET /state`. + */ +export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ + operation: workflowOperations.readSource, + resolveContext: resolvePrincipalWorkflowContext, + async execute({ principal, input, context }): Promise { + await requireWorkflowCodeEnabled() + const [graph, gate] = await Promise.all([ + loadWorkflowGraph(context), + resolveCatalogGate(principal, context, { customBlockInputs: true }), + ]) + const state: WorkflowState = { + blocks: graph.blocks, + edges: graph.edges, + loops: graph.loops, + parallels: graph.parallels, + variables: graph.variables, + } + const storedTypes = [...new Set(Object.values(graph.blocks).map((block) => block.type))] + const meta = { + name: context.workflow.name, + description: context.workflow.description ?? null, + } + + const catalog = await withCatalogBlockScope(gate, async () => { + const { catalog } = buildCodeCatalog({ + gate, + organizationId: context.workspaceOrganizationId, + storedTypes, + }) + return catalog + }) + + const recording = createRecordingResolver() + canonicalize(state, { catalog, meta, resources: recording.resolver }) + const resources = await loadResourceKeyResolver(context.workspaceId, recording.requestedKinds) + const canonical = canonicalize(state, { catalog, meta, resources }) + + const printed = printWorkflow({ + workflow: input.annotateIds + ? withIdComments(canonical.workflow, canonical.identity) + : canonical.workflow, + catalog, + options: + (input.functionCode ?? 'files') === 'files' + ? { functionCode: 'files', codeDir: FUNCTION_CODE_DIR } + : { functionCode: 'inline' }, + }) + + const fingerprint = sourceFingerprint(canonical.workflow, canonical.identity) + return { + workflowId: context.workflowId, + workspaceId: context.workspaceId, + files: Object.fromEntries(printed.files.map((file) => [file.path, file.text])), + lock: assembleLock(canonical.identity, printed.hints.blocks, canonical.layout), + lockBase: { + workspaceId: context.workspaceId, + baseFingerprint: fingerprint, + catalogHash: catalog.hash, + }, + fingerprint, + canonicalHash: canonicalHash(canonical.workflow), + catalogVersion: catalog.hash, + sdkMajor: catalog.sdkMajor, + warnings: [...canonical.diagnostics, ...printed.diagnostics].map(toWarning), + } + }, +}) diff --git a/apps/sim/lib/workflows/application/operations.ts b/apps/sim/lib/workflows/application/operations.ts index 17fb9b4b2a1..bdc06ee53d2 100644 --- a/apps/sim/lib/workflows/application/operations.ts +++ b/apps/sim/lib/workflows/application/operations.ts @@ -70,6 +70,20 @@ export const workflowOperations = { contentDelivery: 'none', ...WORKFLOW_READ_PRINCIPAL_POLICY, }), + /** + * The draft as workflow source (TypeScript), its identity lock and freshness fingerprint. The + * same read as `read`, projected through the code-first canonical model. + */ + // permission-group-exempt: workflow source is the workflow definition in another form, governed by workspace role like `read` + readSource: defineWorkspaceOperation({ + id: 'workflows.source.read', + oauthScope: 'api:read', + minimumRole: 'read', + workspaceApiKey: 'allow', + capability: 'none', + contentDelivery: 'none', + ...WORKFLOW_READ_PRINCIPAL_POLICY, + }), /** Full diagnostics retain the caller's subject for protected reference and secret reads. */ // permission-group-exempt: lint reads workflow content under the existing workflow and secret authorization policies readLint: defineWorkspaceOperation({ diff --git a/apps/sim/lib/workflows/code/feature-flag.ts b/apps/sim/lib/workflows/code/feature-flag.ts index 3a375de31d8..cf4b6fa17b3 100644 --- a/apps/sim/lib/workflows/code/feature-flag.ts +++ b/apps/sim/lib/workflows/code/feature-flag.ts @@ -5,8 +5,12 @@ import { OrchestrationError } from '@/lib/core/orchestration/types' * Code-first workflows (the SDK block catalog, workflow source read and apply, the Code tab) ship * behind one global `workflow-code` flag; every surface of the feature gates through here. */ +export function isWorkflowCodeEnabled(): Promise { + return isFeatureEnabled('workflow-code') +} + export async function requireWorkflowCodeEnabled(): Promise { - if (!(await isFeatureEnabled('workflow-code'))) { + if (!(await isWorkflowCodeEnabled())) { throw new OrchestrationError('forbidden', 'Code-first workflows are not enabled') } } diff --git a/apps/sim/lib/workflows/code/resources.ts b/apps/sim/lib/workflows/code/resources.ts new file mode 100644 index 00000000000..b6df01c44d2 --- /dev/null +++ b/apps/sim/lib/workflows/code/resources.ts @@ -0,0 +1,190 @@ +import { db } from '@sim/db' +import { + credential, + customTools, + folder, + knowledgeBase, + mcpServers, + skill, + userTableDefinitions, + workflow, +} from '@sim/db/schema' +import { compareStrings, slugify } from '@sim/utils/string' +import type { ResourceKeyResolver, ResourceKind } from '@sim/workflow-code' +import { and, asc, eq, isNull } from 'drizzle-orm' + +/** + * Resource keys for workflow source: `table('leads')`, `kb('docs')`, `binding('support-slack')`. + * + * PROVISIONAL. Until the repo phase adds a binding table, a key is derived from the resource's + * current name: its slug, with `-2`, `-3`, … for later resources whose slug is already taken + * (ordered by creation time, then id, so the assignment is deterministic). A rename therefore + * changes the key, and deleting the older of two same-named resources moves the bare key to the + * newer one. Keys are a read-side projection only: nothing stores them yet. + * + * Credentials are keyed by display name and print as `binding(key)`. A kind with no workspace + * table here (`sandbox`, `file`, …), a deleted or archived resource, and an id from another + * workspace all resolve to `null`, which canonicalize keeps verbatim as `$sim: 'unresolved'`. + */ + +/** Rows per kind read to assign keys; past it, later-created resources stay unresolved. */ +const MAX_RESOURCES_PER_KIND = 50_000 + +interface ResourceRow { + id: string + name: string + createdAt: Date +} + +type ResourceLoader = (workspaceId: string) => Promise + +const LOADERS: Partial> = { + table: (workspaceId) => + db + .select({ + id: userTableDefinitions.id, + name: userTableDefinitions.name, + createdAt: userTableDefinitions.createdAt, + }) + .from(userTableDefinitions) + .where( + and( + eq(userTableDefinitions.workspaceId, workspaceId), + isNull(userTableDefinitions.archivedAt) + ) + ) + .orderBy(asc(userTableDefinitions.createdAt), asc(userTableDefinitions.id)) + .limit(MAX_RESOURCES_PER_KIND), + 'knowledge-base': (workspaceId) => + db + .select({ + id: knowledgeBase.id, + name: knowledgeBase.name, + createdAt: knowledgeBase.createdAt, + }) + .from(knowledgeBase) + .where(and(eq(knowledgeBase.workspaceId, workspaceId), isNull(knowledgeBase.deletedAt))) + .orderBy(asc(knowledgeBase.createdAt), asc(knowledgeBase.id)) + .limit(MAX_RESOURCES_PER_KIND), + workflow: (workspaceId) => + db + .select({ id: workflow.id, name: workflow.name, createdAt: workflow.createdAt }) + .from(workflow) + .where(and(eq(workflow.workspaceId, workspaceId), isNull(workflow.archivedAt))) + .orderBy(asc(workflow.createdAt), asc(workflow.id)) + .limit(MAX_RESOURCES_PER_KIND), + 'custom-tool': (workspaceId) => + db + .select({ id: customTools.id, name: customTools.title, createdAt: customTools.createdAt }) + .from(customTools) + .where(eq(customTools.workspaceId, workspaceId)) + .orderBy(asc(customTools.createdAt), asc(customTools.id)) + .limit(MAX_RESOURCES_PER_KIND), + 'mcp-server': (workspaceId) => + db + .select({ id: mcpServers.id, name: mcpServers.name, createdAt: mcpServers.createdAt }) + .from(mcpServers) + .where(and(eq(mcpServers.workspaceId, workspaceId), isNull(mcpServers.deletedAt))) + .orderBy(asc(mcpServers.createdAt), asc(mcpServers.id)) + .limit(MAX_RESOURCES_PER_KIND), + skill: (workspaceId) => + db + .select({ id: skill.id, name: skill.name, createdAt: skill.createdAt }) + .from(skill) + .where(eq(skill.workspaceId, workspaceId)) + .orderBy(asc(skill.createdAt), asc(skill.id)) + .limit(MAX_RESOURCES_PER_KIND), + credential: (workspaceId) => + db + .select({ id: credential.id, name: credential.displayName, createdAt: credential.createdAt }) + .from(credential) + .where(eq(credential.workspaceId, workspaceId)) + .orderBy(asc(credential.createdAt), asc(credential.id)) + .limit(MAX_RESOURCES_PER_KIND), + 'file-folder': (workspaceId) => + db + .select({ id: folder.id, name: folder.name, createdAt: folder.createdAt }) + .from(folder) + .where( + and( + eq(folder.workspaceId, workspaceId), + eq(folder.resourceType, 'file'), + isNull(folder.deletedAt) + ) + ) + .orderBy(asc(folder.createdAt), asc(folder.id)) + .limit(MAX_RESOURCES_PER_KIND), +} + +/** Bidirectional id ↔ key maps for one kind. */ +interface KindKeys { + byId: Map + byKey: Map +} + +/** + * Assigns each resource its provisional key: the name's slug (or the kind when the slug is + * empty), suffixed `-2`, `-3`, … when an earlier resource already holds it. Earlier means + * created first, ties broken by id, whatever order `rows` arrives in. + */ +export function assignResourceKeys(kind: ResourceKind, rows: readonly ResourceRow[]): KindKeys { + const ordered = [...rows].sort( + (a, b) => a.createdAt.getTime() - b.createdAt.getTime() || compareStrings(a.id, b.id) + ) + const byId = new Map() + const byKey = new Map() + for (const row of ordered) { + if (byId.has(row.id)) continue + const base = slugify(row.name) || kind + let key = base + for (let suffix = 2; byKey.has(key); suffix += 1) key = `${base}-${suffix}` + byId.set(row.id, key) + byKey.set(key, row.id) + } + return { byId, byKey } +} + +/** + * A resolver that answers nothing and records every `(kind, id)` canonicalize asked about, so a + * first pass learns which kinds a workflow references before any resource table is read. + */ +export function createRecordingResolver(): { + resolver: ResourceKeyResolver + requestedKinds: Set +} { + const requestedKinds = new Set() + return { + requestedKinds, + resolver: { + toKey(kind) { + requestedKinds.add(kind) + return null + }, + toId() { + return null + }, + }, + } +} + +/** + * Loads the resource keys of `kinds` in one workspace and returns a resolver over them. Only + * this workspace's live resources are read, so an id from elsewhere never resolves. + */ +export async function loadResourceKeyResolver( + workspaceId: string, + kinds: Iterable +): Promise { + const loaded = new Map() + await Promise.all( + [...new Set(kinds)].map(async (kind) => { + const load = LOADERS[kind] + if (!load) return + loaded.set(kind, assignResourceKeys(kind, await load(workspaceId))) + }) + ) + return { + toKey: (kind, id) => loaded.get(kind)?.byId.get(id) ?? null, + toId: (kind, key) => loaded.get(kind)?.byKey.get(key) ?? null, + } +} diff --git a/packages/sim-cli/src/contract/commands.ts b/packages/sim-cli/src/contract/commands.ts index ff8ac81163c..f29a4e93bde 100644 --- a/packages/sim-cli/src/contract/commands.ts +++ b/packages/sim-cli/src/contract/commands.ts @@ -639,6 +639,10 @@ export const CLI_CONTRACT: CliContract = { command: 'workflows outline', describe: 'Show a workflow’s draft as a compact read-only outline', }, + getWorkflowSource: { + command: 'workflows source get', + describe: 'Show a workflow’s draft as TypeScript source with its identity lock', + }, replaceWorkflowState: { command: 'workflows state replace', confirm: 'This replaces the entire draft graph and cannot be undone.', diff --git a/packages/sim-cli/src/generated/v2-api.ts b/packages/sim-cli/src/generated/v2-api.ts index afb519f6b6d..6c09e741714 100644 --- a/packages/sim-cli/src/generated/v2-api.ts +++ b/packages/sim-cli/src/generated/v2-api.ts @@ -8385,6 +8385,71 @@ export type GetWorkflowRunResponse = { data: GetWorkflowRunResponseRef4 } +/** `GET /api/v2/workflows/[workflowId]/source` */ +export type GetWorkflowSourceParams = { + workflowId: string +} + +export type GetWorkflowSourceQuery = { + annotateIds?: boolean + functionCode?: 'inline' | 'files' +} + +export type GetWorkflowSourceResponse = { + data: { + workflowId: string + workspaceId: string + files: Record + lock: { + lockVersion: 1 + blocks: Record< + string, + { + id: string + parent: string | null + branches?: Record + items?: Record< + string, + Array<{ + name: string + id: string + }> + > + binding: string + order: number + layout?: { + x: number + y: number + w?: number + h?: number + height?: number + horizontalHandles?: boolean + } + codeFile?: string + } + > + variables: Record + } + lockBase: { + workspaceId: string + baseFingerprint: string + catalogHash: string + } + fingerprint: string + canonicalHash: string + catalogVersion: string + sdkMajor: number + warnings: Array<{ + code: string + severity: 'error' | 'warning' | 'info' + message: string + hint?: string + blockKey?: string + param?: string + }> + } +} + /** `GET /api/v2/workflows/[workflowId]/state` */ export type GetWorkflowStateParams = { workflowId: string @@ -20497,6 +20562,26 @@ export const V2_OPERATIONS = { }, }, }, + getWorkflowSource: { + method: 'GET', + path: '/api/v2/workflows/[workflowId]/source', + pathParams: ['workflowId'] as const, + pathParamDocs: { workflowId: 'Unique workflow identifier.' }, + responseMode: 'json', + summary: 'Get workflow source', + query: { + annotateIds: { + kind: 'boolean', + describe: "Print each block's id as a trailing `// id:` comment on its declaration.", + }, + functionCode: { + kind: 'enum', + values: ['inline', 'files'] as const, + describe: + 'Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates.', + }, + }, + }, getWorkflowState: { method: 'GET', path: '/api/v2/workflows/[workflowId]/state', From 53d8f10090a85a92379aa459895c87d0002312a8 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:25:00 -0800 Subject: [PATCH 062/428] test(workflows): provisional resource key assignment and the v2 source route's query, flag and concealment --- .../[workflowId]/source/route.test.ts | 115 ++++++++++++++++++ apps/sim/lib/workflows/code/resources.test.ts | 61 ++++++++++ 2 files changed, 176 insertions(+) create mode 100644 apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts create mode 100644 apps/sim/lib/workflows/code/resources.test.ts diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts new file mode 100644 index 00000000000..37eccea658c --- /dev/null +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts @@ -0,0 +1,115 @@ +import { + V2_OPERATION_RATE_LIMIT_ALLOWED, + V2_PREAUTH_RATE_LIMIT_ALLOWED, + v2ApiKeyAuthModuleMock, + v2RateLimiterModuleMock, + v2RouteMocks, +} from '@sim/testing' +import { NextRequest } from 'next/server' +import { beforeEach, describe, expect, it, vi } from 'vitest' + +const mocks = vi.hoisted(() => ({ read: vi.fn() })) + +vi.mock('@/lib/api/server/routes/v2-api-key-auth', () => v2ApiKeyAuthModuleMock) +vi.mock('@/lib/core/rate-limiter', () => v2RateLimiterModuleMock) +vi.mock('@/lib/workflows/application/get-workflow-source', () => ({ + getWorkflowSource: { + operation: { id: 'workflows.source.read' }, + execute: mocks.read, + }, +})) + +import { OrchestrationError } from '@/lib/core/orchestration/types' +import { GET } from '@/app/api/v2/workflows/[workflowId]/source/route' + +const WORKSPACE_ID = '11111111-2222-4333-8444-555555555555' +const WORKFLOW_ID = '66666666-7777-4888-9999-000000000000' +const FINGERPRINT = `sf1:${'c'.repeat(64)}` + +const auth = { + principal: { + kind: 'workspace_api_key' as const, + workspaceId: WORKSPACE_ID, + keyId: 'key-1', + access: 'write' as const, + }, + rateLimitSubjectIds: ['api-key:key-1', `workspace:${WORKSPACE_ID}`] as const, + rateLimitSubscription: null, + keyType: 'workspace' as const, +} + +const source = { + workflowId: WORKFLOW_ID, + workspaceId: WORKSPACE_ID, + files: { 'workflow.ts': "// @sim-sdk 1\nexport default workflow('W', () => {})\n" }, + lock: { + lockVersion: 1 as const, + blocks: { start: { id: 'b-1', parent: null, binding: 'start', order: 0 } }, + variables: {}, + }, + lockBase: { workspaceId: WORKSPACE_ID, baseFingerprint: FINGERPRINT, catalogHash: 'h' }, + fingerprint: FINGERPRINT, + canonicalHash: 'd'.repeat(64), + catalogVersion: 'h', + sdkMajor: 1, + warnings: [], +} + +function request(query = '') { + return new NextRequest(`http://localhost:3000/api/v2/workflows/${WORKFLOW_ID}/source${query}`, { + headers: { 'x-api-key': 'key' }, + }) +} + +const context = { params: Promise.resolve({ workflowId: WORKFLOW_ID }) } + +describe('GET /api/v2/workflows/{workflowId}/source', () => { + beforeEach(() => { + v2RouteMocks.authenticate.mockResolvedValue(auth) + v2RouteMocks.preauthRate.mockResolvedValue(V2_PREAUTH_RATE_LIMIT_ALLOWED) + v2RouteMocks.operationRate.mockResolvedValue(V2_OPERATION_RATE_LIMIT_ALLOWED) + mocks.read.mockResolvedValue(source) + }) + + it('passes annotateIds as a boolean and functionCode through, omitting absent flags', async () => { + await GET(request('?annotateIds=1&functionCode=inline'), context) + await GET(request(), context) + + expect(mocks.read.mock.calls[0][0].input).toEqual({ + workflowId: WORKFLOW_ID, + annotateIds: true, + functionCode: 'inline', + }) + expect(mocks.read.mock.calls[1][0].input).toEqual({ workflowId: WORKFLOW_ID }) + }) + + it.each(['?functionCode=ts', '?annotate=true'])( + 'rejects %s with 400 before reading the workflow', + async (query) => { + const response = await GET(request(query), context) + + expect(response.status).toBe(400) + expect(mocks.read).not.toHaveBeenCalled() + } + ) + + it('answers 403 while code-first workflows are off', async () => { + mocks.read.mockRejectedValue( + new OrchestrationError('forbidden', 'Code-first workflows are not enabled') + ) + + const response = await GET(request(), context) + + expect(response.status).toBe(403) + expect((await response.json()).error.code).toBe('FORBIDDEN') + }) + + it('answers 404 for a workflow the key cannot reach', async () => { + mocks.read.mockRejectedValue(new OrchestrationError('not_found', 'Workflow not found')) + + const response = await GET(request(), context) + + expect(response.status).toBe(404) + expect((await response.json()).error.code).toBe('NOT_FOUND') + }) +}) diff --git a/apps/sim/lib/workflows/code/resources.test.ts b/apps/sim/lib/workflows/code/resources.test.ts new file mode 100644 index 00000000000..73646bfeec8 --- /dev/null +++ b/apps/sim/lib/workflows/code/resources.test.ts @@ -0,0 +1,61 @@ +import { describe, expect, it } from 'vitest' +import { assignResourceKeys } from '@/lib/workflows/code/resources' + +const at = (ms: number) => new Date(ms) + +describe('assignResourceKeys', () => { + it('gives the earliest-created resource the bare slug whatever order rows arrive in', () => { + const rows = [ + { id: 'b', name: 'Leads', createdAt: at(2) }, + { id: 'a', name: 'leads!', createdAt: at(1) }, + { id: 'c', name: 'LEADS', createdAt: at(3) }, + ] + + const forward = assignResourceKeys('table', rows) + const reversed = assignResourceKeys('table', [...rows].reverse()) + + expect(Object.fromEntries(forward.byId)).toEqual({ a: 'leads', b: 'leads-2', c: 'leads-3' }) + expect(Object.fromEntries(reversed.byId)).toEqual(Object.fromEntries(forward.byId)) + }) + + it('breaks a creation-time tie by id', () => { + const keys = assignResourceKeys('table', [ + { id: 'z', name: 'Docs', createdAt: at(1) }, + { id: 'y', name: 'Docs', createdAt: at(1) }, + ]) + + expect(keys.byId.get('y')).toBe('docs') + expect(keys.byId.get('z')).toBe('docs-2') + }) + + it('skips a suffix another resource already holds as its own slug', () => { + const keys = assignResourceKeys('knowledge-base', [ + { id: 'a', name: 'Docs', createdAt: at(1) }, + { id: 'b', name: 'docs 2', createdAt: at(2) }, + { id: 'c', name: 'Docs', createdAt: at(3) }, + ]) + + expect(keys.byId.get('b')).toBe('docs-2') + expect(keys.byId.get('c')).toBe('docs-3') + expect(new Set(keys.byId.values()).size).toBe(3) + }) + + it('keys a name with no slug characters by its kind', () => { + const keys = assignResourceKeys('credential', [ + { id: 'a', name: '***', createdAt: at(1) }, + { id: 'b', name: '', createdAt: at(2) }, + ]) + + expect(keys.byId.get('a')).toBe('credential') + expect(keys.byId.get('b')).toBe('credential-2') + }) + + it('maps every key back to the id it was assigned', () => { + const keys = assignResourceKeys('workflow', [ + { id: 'a', name: 'Enrich', createdAt: at(1) }, + { id: 'b', name: 'Enrich', createdAt: at(2) }, + ]) + + for (const [id, key] of keys.byId) expect(keys.byKey.get(key)).toBe(id) + }) +}) From 6bbb6d04b886e4e42427cca3438fdc8338ca5d7a Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:27:40 -0800 Subject: [PATCH 063/428] feat(workflows): read-only Code tab on the canvas panel behind workflow-code Adds a 'code' panel tab, gated by the server-resolved workflow-code flag, showing the draft as TypeScript in read-only Monaco (the file viewer's editor setup moves to a shared module). The source query is re-read once the draft settles after graph, variable or operation-queue changes, which covers remote workflow-updated reloads. Emits code_view_opened (defined here ahead of the analytics branch). --- apps/sim/app/layout.tsx | 5 + .../components/file-viewer/monaco-editor.tsx | 257 ++++++++++++++++++ .../components/file-viewer/text-editor.tsx | 252 +---------------- .../app/workspace/[workspaceId]/layout.tsx | 4 + .../providers/feature-flags-provider.tsx | 1 + .../components/panel/components/code/code.tsx | 102 +++++++ .../components/panel/components/code/index.ts | 1 + .../components/panel/components/index.ts | 1 + .../w/[workflowId]/components/panel/panel.tsx | 38 ++- apps/sim/hooks/queries/workflow-source.ts | 34 +++ apps/sim/lib/posthog/events.ts | 7 + apps/sim/stores/panel/types.ts | 2 +- 12 files changed, 455 insertions(+), 249 deletions(-) create mode 100644 apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/monaco-editor.tsx create mode 100644 apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/code/code.tsx create mode 100644 apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/code/index.ts create mode 100644 apps/sim/hooks/queries/workflow-source.ts diff --git a/apps/sim/app/layout.tsx b/apps/sim/app/layout.tsx index 0a0269fe12e..3556366d9ff 100644 --- a/apps/sim/app/layout.tsx +++ b/apps/sim/app/layout.tsx @@ -194,6 +194,11 @@ export default function RootLayout({ children }: { children: React.ReactNode }) if (activeTab === 'copilot' && !${isChatEnabled}) { activeTab = 'toolbar'; } + // The Code tab is flag-gated per workspace, which this script cannot + // know; the toolbar paints first and React switches to Code if enabled. + if (activeTab === 'code') { + activeTab = 'toolbar'; + } if (activeTab) { document.documentElement.setAttribute('data-panel-active-tab', activeTab); } diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/monaco-editor.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/monaco-editor.tsx new file mode 100644 index 00000000000..3c84aef72c0 --- /dev/null +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/monaco-editor.tsx @@ -0,0 +1,257 @@ +'use client' + +import { useEffect, useState } from 'react' +import type { editor as MonacoEditorTypes } from 'monaco-editor' +import dynamic from 'next/dynamic' + +/** + * The Monaco editor as the workspace configures it: lazily loaded with its language workers and + * the Sim light and dark themes, plus the shared text-editor options. Used by the file viewer's + * text editor and the workflow Code tab. + */ + +export const TEXT_EDITOR_OPTIONS = { + largeFileOptimizations: true, + maxTokenizationLineLength: 20_000, + minimap: { enabled: false }, + scrollBeyondLastLine: false, + wordWrap: 'on', + fontSize: 13, + lineNumbers: 'on', + padding: { top: 24, bottom: 24 }, + fontFamily: + 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace', + tabSize: 2, + automaticLayout: true, + renderLineHighlight: 'line', + occurrencesHighlight: 'singleFile', + overviewRulerLanes: 0, + hideCursorInOverviewRuler: true, + scrollbar: { + verticalScrollbarSize: 6, + horizontalScrollbarSize: 6, + }, + quickSuggestions: false, + suggestOnTriggerCharacters: false, + wordBasedSuggestions: 'currentDocument', + parameterHints: { enabled: false }, + codeLens: false, + lightbulb: { + enabled: 'off' as MonacoEditorTypes.ShowLightbulbIconMode, + }, + inlayHints: { enabled: 'off' }, + contextmenu: false, + fixedOverflowWidgets: true, + glyphMargin: false, + stickyScroll: { enabled: false }, + bracketPairColorization: { enabled: false }, + unicodeHighlight: { ambiguousCharacters: false }, +} satisfies MonacoEditorTypes.IStandaloneEditorConstructionOptions + +const SIM_DARK_RULES: MonacoEditorTypes.ITokenThemeRule[] = [ + { token: 'comment', foreground: '606060', fontStyle: 'italic' }, + { token: 'string', foreground: '3ab872' }, + { token: 'string.escape', foreground: '3ab872' }, + { token: 'string.link', foreground: '33b4ff' }, + { token: 'number', foreground: 'e8a87c' }, + { token: 'number.float', foreground: 'e8a87c' }, + { token: 'number.hex', foreground: 'e8a87c' }, + { token: 'keyword', foreground: '33b4ff' }, + { token: 'keyword.control', foreground: '33b4ff' }, + { token: 'storage', foreground: '33b4ff' }, + { token: 'type', foreground: '8fc7f5' }, + { token: 'type.identifier', foreground: '8fc7f5' }, + { token: 'regexp', foreground: 'ff8a65' }, + { token: 'annotation', foreground: 'ffca28' }, + { token: 'delimiter', foreground: '555555' }, + { token: 'tag', foreground: '33b4ff' }, + { token: 'attribute.name', foreground: '8fc7f5' }, + { token: 'attribute.value', foreground: '3ab872' }, + { token: 'strong', foreground: 'e6e6e6', fontStyle: 'bold' }, + { token: 'emphasis', foreground: 'c8c8c8', fontStyle: 'italic' }, + { token: 'variable', foreground: '3ab872' }, + { token: 'variable.source', foreground: 'b0b0b0' }, + { token: 'meta.separator', foreground: '404040' }, +] + +const SIM_LIGHT_RULES: MonacoEditorTypes.ITokenThemeRule[] = [ + { token: 'comment', foreground: '888888', fontStyle: 'italic' }, + { token: 'string', foreground: '16825d' }, + { token: 'string.escape', foreground: '16825d' }, + { token: 'string.link', foreground: '0078d4' }, + { token: 'number', foreground: 'a85500' }, + { token: 'number.float', foreground: 'a85500' }, + { token: 'number.hex', foreground: 'a85500' }, + { token: 'keyword', foreground: '0078d4' }, + { token: 'keyword.control', foreground: '0078d4' }, + { token: 'storage', foreground: '0078d4' }, + { token: 'type', foreground: '7c4dcc' }, + { token: 'type.identifier', foreground: '7c4dcc' }, + { token: 'regexp', foreground: 'd7390c' }, + { token: 'annotation', foreground: 'e67700' }, + { token: 'delimiter', foreground: 'aaaaaa' }, + { token: 'tag', foreground: '0078d4' }, + { token: 'attribute.name', foreground: '7c4dcc' }, + { token: 'attribute.value', foreground: '16825d' }, + { token: 'strong', foreground: '1a1a1a', fontStyle: 'bold' }, + { token: 'emphasis', foreground: '444444', fontStyle: 'italic' }, + { token: 'variable', foreground: '16825d' }, + { token: 'variable.source', foreground: '555555' }, + { token: 'meta.separator', foreground: 'cccccc' }, +] + +export const MonacoEditor = dynamic( + async () => { + const [{ default: Editor, loader }, monaco] = await Promise.all([ + import('@monaco-editor/react'), + import('monaco-editor'), + ]) + + if (typeof window !== 'undefined' && !window.MonacoEnvironment) { + window.MonacoEnvironment = { + getWorker(_: string, label: string) { + if (label === 'json') { + return new Worker( + new URL('monaco-editor/languages/features/json/json.worker', import.meta.url) + ) + } + if (label === 'css' || label === 'scss' || label === 'less') { + return new Worker( + new URL('monaco-editor/languages/features/css/css.worker', import.meta.url) + ) + } + if (label === 'html' || label === 'handlebars' || label === 'razor') { + return new Worker( + new URL('monaco-editor/languages/features/html/html.worker', import.meta.url) + ) + } + if (label === 'typescript' || label === 'javascript') { + return new Worker( + new URL('monaco-editor/languages/features/typescript/ts.worker', import.meta.url) + ) + } + return new Worker(new URL('monaco-editor/editor/editor.worker', import.meta.url)) + }, + } + } + + loader.config({ monaco }) + + monaco.editor.defineTheme('sim-dark', { + base: 'vs-dark', + inherit: true, + rules: SIM_DARK_RULES, + colors: { + 'editor.background': '#1b1b1b', + 'editor.foreground': '#e6e6e6', + 'editorLineNumber.foreground': '#404040', + 'editorLineNumber.activeForeground': '#787878', + 'editor.selectionBackground': '#33b4ff28', + 'editor.inactiveSelectionBackground': '#33b4ff14', + 'editor.lineHighlightBackground': '#23232380', + 'editor.lineHighlightBorder': '#00000000', + 'editorGutter.background': '#1b1b1b', + 'editorWidget.background': '#242424', + 'editorWidget.border': '#333333', + 'editorWidget.foreground': '#e6e6e6', + 'editor.findMatchBackground': '#33b4ff40', + 'editor.findMatchHighlightBackground': '#33b4ff1a', + 'editor.findMatchBorder': '#33b4ff', + 'scrollbar.shadow': '#00000000', + 'scrollbarSlider.background': '#33333380', + 'scrollbarSlider.hoverBackground': '#45454580', + 'scrollbarSlider.activeBackground': '#505050', + 'editorBracketMatch.background': '#33b4ff1a', + 'editorBracketMatch.border': '#33b4ff80', + 'editorIndentGuide.background1': '#2a2a2a', + 'editorIndentGuide.activeBackground1': '#454545', + 'editorCursor.foreground': '#e6e6e6', + 'editor.wordHighlightBackground': '#33b4ff14', + 'editor.wordHighlightBorder': '#33b4ff40', + 'editorSuggestWidget.background': '#242424', + 'editorSuggestWidget.border': '#333333', + 'editorSuggestWidget.foreground': '#e6e6e6', + 'editorSuggestWidget.selectedBackground': '#292929', + 'editorSuggestWidget.selectedForeground': '#e6e6e6', + 'editorHoverWidget.background': '#242424', + 'editorHoverWidget.border': '#333333', + 'editorHoverWidget.foreground': '#e6e6e6', + 'minimap.background': '#1b1b1b', + 'minimapSlider.background': '#33333380', + focusBorder: '#33b4ff80', + 'input.background': '#242424', + 'input.border': '#333333', + 'input.foreground': '#e6e6e6', + 'inputOption.activeBorder': '#33b4ff', + }, + }) + + monaco.editor.defineTheme('sim-light', { + base: 'vs', + inherit: true, + rules: SIM_LIGHT_RULES, + colors: { + 'editor.background': '#fefefe', + 'editor.foreground': '#1a1a1a', + 'editorLineNumber.foreground': '#bbbbbb', + 'editorLineNumber.activeForeground': '#707070', + 'editor.selectionBackground': '#0078d430', + 'editor.inactiveSelectionBackground': '#0078d418', + 'editor.lineHighlightBackground': '#f7f7f7', + 'editor.lineHighlightBorder': '#00000000', + 'editorGutter.background': '#fefefe', + 'editorWidget.background': '#ffffff', + 'editorWidget.border': '#dedede', + 'editorWidget.foreground': '#1a1a1a', + 'editor.findMatchBackground': '#0078d428', + 'editor.findMatchHighlightBackground': '#0078d414', + 'editor.findMatchBorder': '#0078d4', + 'scrollbar.shadow': '#00000000', + 'scrollbarSlider.background': '#dedede80', + 'scrollbarSlider.hoverBackground': '#cccccc', + 'scrollbarSlider.activeBackground': '#b0b0b0', + 'editorBracketMatch.background': '#0078d418', + 'editorBracketMatch.border': '#0078d480', + 'editorIndentGuide.background1': '#f0f0f0', + 'editorIndentGuide.activeBackground1': '#d8d8d8', + 'editorCursor.foreground': '#1a1a1a', + 'editor.wordHighlightBackground': '#0078d414', + 'editor.wordHighlightBorder': '#0078d450', + 'editorSuggestWidget.background': '#ffffff', + 'editorSuggestWidget.border': '#dedede', + 'editorSuggestWidget.foreground': '#1a1a1a', + 'editorSuggestWidget.selectedBackground': '#f5f5f5', + 'editorSuggestWidget.selectedForeground': '#1a1a1a', + 'editorHoverWidget.background': '#ffffff', + 'editorHoverWidget.border': '#dedede', + 'editorHoverWidget.foreground': '#1a1a1a', + 'minimap.background': '#fefefe', + 'minimapSlider.background': '#dedede80', + focusBorder: '#0078d480', + 'input.background': '#ffffff', + 'input.border': '#dedede', + 'input.foreground': '#1a1a1a', + 'inputOption.activeBorder': '#0078d4', + }, + }) + + return Editor + }, + { ssr: false } +) + +/** `sim-dark` or `sim-light`, following the document theme class. */ +export function useMonacoTheme(): string { + const [isDark, setIsDark] = useState( + () => typeof document !== 'undefined' && document.documentElement.classList.contains('dark') + ) + + useEffect(() => { + const update = () => setIsDark(document.documentElement.classList.contains('dark')) + const observer = new MutationObserver(update) + observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] }) + return () => observer.disconnect() + }, []) + + return isDark ? 'sim-dark' : 'sim-light' +} diff --git a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/text-editor.tsx b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/text-editor.tsx index 545b44c43a4..938effc04f7 100644 --- a/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/text-editor.tsx +++ b/apps/sim/app/workspace/[workspaceId]/files/components/file-viewer/text-editor.tsx @@ -17,8 +17,6 @@ import { import type { OnMount } from '@monaco-editor/react' import { cn, toast } from '@sim/emcn' import { formatPasteLimit, PASTE_LIMITS } from '@sim/utils/paste' -import type { editor as MonacoEditorTypes } from 'monaco-editor' -import dynamic from 'next/dynamic' import { readSeparatorKey } from '@/lib/core/utils/separator-keys' import { buildFileSelectionLabel, @@ -32,6 +30,11 @@ import { SIM_PAGE_CONTENT_TYPE } from '@/lib/workspace-files/page-content-type' import { EditorContextMenu } from '@/app/workspace/[workspaceId]/files/components/file-viewer/editor-context-menu' import { FileSaveConflict } from '@/app/workspace/[workspaceId]/files/components/file-viewer/file-save-conflict' import type { PreviewMode } from '@/app/workspace/[workspaceId]/files/components/file-viewer/file-viewer' +import { + MonacoEditor, + TEXT_EDITOR_OPTIONS, + useMonacoTheme, +} from '@/app/workspace/[workspaceId]/files/components/file-viewer/monaco-editor' import { PreviewPanel, resolvePreviewType, @@ -44,236 +47,6 @@ import { useAddToChat } from '@/hooks/use-add-to-chat' import { useFileViewerStore } from '@/stores/file-viewer/store' import type { ChatContext } from '@/stores/panel' -const TEXT_EDITOR_OPTIONS = { - largeFileOptimizations: true, - maxTokenizationLineLength: 20_000, - minimap: { enabled: false }, - scrollBeyondLastLine: false, - wordWrap: 'on', - fontSize: 13, - lineNumbers: 'on', - padding: { top: 24, bottom: 24 }, - fontFamily: - 'ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace', - tabSize: 2, - automaticLayout: true, - renderLineHighlight: 'line', - occurrencesHighlight: 'singleFile', - overviewRulerLanes: 0, - hideCursorInOverviewRuler: true, - scrollbar: { - verticalScrollbarSize: 6, - horizontalScrollbarSize: 6, - }, - quickSuggestions: false, - suggestOnTriggerCharacters: false, - wordBasedSuggestions: 'currentDocument', - parameterHints: { enabled: false }, - codeLens: false, - lightbulb: { - enabled: 'off' as MonacoEditorTypes.ShowLightbulbIconMode, - }, - inlayHints: { enabled: 'off' }, - contextmenu: false, - fixedOverflowWidgets: true, - glyphMargin: false, - stickyScroll: { enabled: false }, - bracketPairColorization: { enabled: false }, - unicodeHighlight: { ambiguousCharacters: false }, -} satisfies MonacoEditorTypes.IStandaloneEditorConstructionOptions - -const SIM_DARK_RULES: MonacoEditorTypes.ITokenThemeRule[] = [ - { token: 'comment', foreground: '606060', fontStyle: 'italic' }, - { token: 'string', foreground: '3ab872' }, - { token: 'string.escape', foreground: '3ab872' }, - { token: 'string.link', foreground: '33b4ff' }, - { token: 'number', foreground: 'e8a87c' }, - { token: 'number.float', foreground: 'e8a87c' }, - { token: 'number.hex', foreground: 'e8a87c' }, - { token: 'keyword', foreground: '33b4ff' }, - { token: 'keyword.control', foreground: '33b4ff' }, - { token: 'storage', foreground: '33b4ff' }, - { token: 'type', foreground: '8fc7f5' }, - { token: 'type.identifier', foreground: '8fc7f5' }, - { token: 'regexp', foreground: 'ff8a65' }, - { token: 'annotation', foreground: 'ffca28' }, - { token: 'delimiter', foreground: '555555' }, - { token: 'tag', foreground: '33b4ff' }, - { token: 'attribute.name', foreground: '8fc7f5' }, - { token: 'attribute.value', foreground: '3ab872' }, - { token: 'strong', foreground: 'e6e6e6', fontStyle: 'bold' }, - { token: 'emphasis', foreground: 'c8c8c8', fontStyle: 'italic' }, - { token: 'variable', foreground: '3ab872' }, - { token: 'variable.source', foreground: 'b0b0b0' }, - { token: 'meta.separator', foreground: '404040' }, -] - -const SIM_LIGHT_RULES: MonacoEditorTypes.ITokenThemeRule[] = [ - { token: 'comment', foreground: '888888', fontStyle: 'italic' }, - { token: 'string', foreground: '16825d' }, - { token: 'string.escape', foreground: '16825d' }, - { token: 'string.link', foreground: '0078d4' }, - { token: 'number', foreground: 'a85500' }, - { token: 'number.float', foreground: 'a85500' }, - { token: 'number.hex', foreground: 'a85500' }, - { token: 'keyword', foreground: '0078d4' }, - { token: 'keyword.control', foreground: '0078d4' }, - { token: 'storage', foreground: '0078d4' }, - { token: 'type', foreground: '7c4dcc' }, - { token: 'type.identifier', foreground: '7c4dcc' }, - { token: 'regexp', foreground: 'd7390c' }, - { token: 'annotation', foreground: 'e67700' }, - { token: 'delimiter', foreground: 'aaaaaa' }, - { token: 'tag', foreground: '0078d4' }, - { token: 'attribute.name', foreground: '7c4dcc' }, - { token: 'attribute.value', foreground: '16825d' }, - { token: 'strong', foreground: '1a1a1a', fontStyle: 'bold' }, - { token: 'emphasis', foreground: '444444', fontStyle: 'italic' }, - { token: 'variable', foreground: '16825d' }, - { token: 'variable.source', foreground: '555555' }, - { token: 'meta.separator', foreground: 'cccccc' }, -] - -const MonacoEditor = dynamic( - async () => { - const [{ default: Editor, loader }, monaco] = await Promise.all([ - import('@monaco-editor/react'), - import('monaco-editor'), - ]) - - if (typeof window !== 'undefined' && !window.MonacoEnvironment) { - window.MonacoEnvironment = { - getWorker(_: string, label: string) { - if (label === 'json') { - return new Worker( - new URL('monaco-editor/languages/features/json/json.worker', import.meta.url) - ) - } - if (label === 'css' || label === 'scss' || label === 'less') { - return new Worker( - new URL('monaco-editor/languages/features/css/css.worker', import.meta.url) - ) - } - if (label === 'html' || label === 'handlebars' || label === 'razor') { - return new Worker( - new URL('monaco-editor/languages/features/html/html.worker', import.meta.url) - ) - } - if (label === 'typescript' || label === 'javascript') { - return new Worker( - new URL('monaco-editor/languages/features/typescript/ts.worker', import.meta.url) - ) - } - return new Worker(new URL('monaco-editor/editor/editor.worker', import.meta.url)) - }, - } - } - - loader.config({ monaco }) - - monaco.editor.defineTheme('sim-dark', { - base: 'vs-dark', - inherit: true, - rules: SIM_DARK_RULES, - colors: { - 'editor.background': '#1b1b1b', - 'editor.foreground': '#e6e6e6', - 'editorLineNumber.foreground': '#404040', - 'editorLineNumber.activeForeground': '#787878', - 'editor.selectionBackground': '#33b4ff28', - 'editor.inactiveSelectionBackground': '#33b4ff14', - 'editor.lineHighlightBackground': '#23232380', - 'editor.lineHighlightBorder': '#00000000', - 'editorGutter.background': '#1b1b1b', - 'editorWidget.background': '#242424', - 'editorWidget.border': '#333333', - 'editorWidget.foreground': '#e6e6e6', - 'editor.findMatchBackground': '#33b4ff40', - 'editor.findMatchHighlightBackground': '#33b4ff1a', - 'editor.findMatchBorder': '#33b4ff', - 'scrollbar.shadow': '#00000000', - 'scrollbarSlider.background': '#33333380', - 'scrollbarSlider.hoverBackground': '#45454580', - 'scrollbarSlider.activeBackground': '#505050', - 'editorBracketMatch.background': '#33b4ff1a', - 'editorBracketMatch.border': '#33b4ff80', - 'editorIndentGuide.background1': '#2a2a2a', - 'editorIndentGuide.activeBackground1': '#454545', - 'editorCursor.foreground': '#e6e6e6', - 'editor.wordHighlightBackground': '#33b4ff14', - 'editor.wordHighlightBorder': '#33b4ff40', - 'editorSuggestWidget.background': '#242424', - 'editorSuggestWidget.border': '#333333', - 'editorSuggestWidget.foreground': '#e6e6e6', - 'editorSuggestWidget.selectedBackground': '#292929', - 'editorSuggestWidget.selectedForeground': '#e6e6e6', - 'editorHoverWidget.background': '#242424', - 'editorHoverWidget.border': '#333333', - 'editorHoverWidget.foreground': '#e6e6e6', - 'minimap.background': '#1b1b1b', - 'minimapSlider.background': '#33333380', - focusBorder: '#33b4ff80', - 'input.background': '#242424', - 'input.border': '#333333', - 'input.foreground': '#e6e6e6', - 'inputOption.activeBorder': '#33b4ff', - }, - }) - - monaco.editor.defineTheme('sim-light', { - base: 'vs', - inherit: true, - rules: SIM_LIGHT_RULES, - colors: { - 'editor.background': '#fefefe', - 'editor.foreground': '#1a1a1a', - 'editorLineNumber.foreground': '#bbbbbb', - 'editorLineNumber.activeForeground': '#707070', - 'editor.selectionBackground': '#0078d430', - 'editor.inactiveSelectionBackground': '#0078d418', - 'editor.lineHighlightBackground': '#f7f7f7', - 'editor.lineHighlightBorder': '#00000000', - 'editorGutter.background': '#fefefe', - 'editorWidget.background': '#ffffff', - 'editorWidget.border': '#dedede', - 'editorWidget.foreground': '#1a1a1a', - 'editor.findMatchBackground': '#0078d428', - 'editor.findMatchHighlightBackground': '#0078d414', - 'editor.findMatchBorder': '#0078d4', - 'scrollbar.shadow': '#00000000', - 'scrollbarSlider.background': '#dedede80', - 'scrollbarSlider.hoverBackground': '#cccccc', - 'scrollbarSlider.activeBackground': '#b0b0b0', - 'editorBracketMatch.background': '#0078d418', - 'editorBracketMatch.border': '#0078d480', - 'editorIndentGuide.background1': '#f0f0f0', - 'editorIndentGuide.activeBackground1': '#d8d8d8', - 'editorCursor.foreground': '#1a1a1a', - 'editor.wordHighlightBackground': '#0078d414', - 'editor.wordHighlightBorder': '#0078d450', - 'editorSuggestWidget.background': '#ffffff', - 'editorSuggestWidget.border': '#dedede', - 'editorSuggestWidget.foreground': '#1a1a1a', - 'editorSuggestWidget.selectedBackground': '#f5f5f5', - 'editorSuggestWidget.selectedForeground': '#1a1a1a', - 'editorHoverWidget.background': '#ffffff', - 'editorHoverWidget.border': '#dedede', - 'editorHoverWidget.foreground': '#1a1a1a', - 'minimap.background': '#fefefe', - 'minimapSlider.background': '#dedede80', - focusBorder: '#0078d480', - 'input.background': '#ffffff', - 'input.border': '#dedede', - 'input.foreground': '#1a1a1a', - 'inputOption.activeBorder': '#0078d4', - }, - }) - - return Editor - }, - { ssr: false } -) - const SPLIT_MIN_PCT = 20 const SPLIT_MAX_PCT = 80 const SPLIT_DEFAULT_PCT = 50 @@ -381,21 +154,6 @@ function resolveMonacoLanguage(file: { type: string; name: string }): string { return MONACO_LANGUAGE_BY_EXTENSION[ext] ?? MONACO_LANGUAGE_BY_MIME[file.type] ?? 'plaintext' } -function useMonacoTheme(): string { - const [isDark, setIsDark] = useState( - () => typeof document !== 'undefined' && document.documentElement.classList.contains('dark') - ) - - useEffect(() => { - const update = () => setIsDark(document.documentElement.classList.contains('dark')) - const observer = new MutationObserver(update) - observer.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] }) - return () => observer.disconnect() - }, []) - - return isDark ? 'sim-dark' : 'sim-light' -} - interface TextEditorProps { file: WorkspaceFileRecord workspaceId: string diff --git a/apps/sim/app/workspace/[workspaceId]/layout.tsx b/apps/sim/app/workspace/[workspaceId]/layout.tsx index 1bdf799711e..16aad82853c 100644 --- a/apps/sim/app/workspace/[workspaceId]/layout.tsx +++ b/apps/sim/app/workspace/[workspaceId]/layout.tsx @@ -17,6 +17,7 @@ import { resolveOrganizationEntryPath } from '@/lib/navigation/resolve-app-entry import { isProjectsEnabled } from '@/lib/projects/rollout.server' import { resolveSimLinkOrganization } from '@/lib/sim-links/application/organization' import { isWorkflowTestsEnabled } from '@/lib/workflow-tests/feature-flag' +import { isWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' import { ApplicationLoading } from '@/app/_shell/application-loading' import { getQueryClient } from '@/app/_shell/providers/get-query-client' import { SimLinkOrganizationProvider } from '@/app/o/[organizationId]/links/sim-link-organization-provider' @@ -131,6 +132,7 @@ async function WorkspaceContent({ organizationHref, dashboardsEnabled, workflowTestsEnabled, + workflowCodeEnabled, changelogEnabled, desktopExecutorRegistered, projectsEnabled, @@ -150,6 +152,7 @@ async function WorkspaceContent({ resolveOrganizationEntryPath(session), isDashboardsEnabled(hostContext.hostOrganizationId), isWorkflowTestsEnabled(hostContext.hostOrganizationId), + isWorkflowCodeEnabled(), isChangelogEnabled(hostContext.hostOrganizationId), hasDesktopBackgroundExecutor(session.user.id), isProjectsEnabled(), @@ -165,6 +168,7 @@ async function WorkspaceContent({ flags={{ dashboards: dashboardsEnabled, 'workflow-tests': workflowTestsEnabled, + 'workflow-code': workflowCodeEnabled, changelog: changelogEnabled, 'mothership-model-selector': modelSelectorEnabled, 'mothership-plan-mode': planModeEnabled, diff --git a/apps/sim/app/workspace/[workspaceId]/providers/feature-flags-provider.tsx b/apps/sim/app/workspace/[workspaceId]/providers/feature-flags-provider.tsx index 5b243f9dda5..b44a7fe0dc0 100644 --- a/apps/sim/app/workspace/[workspaceId]/providers/feature-flags-provider.tsx +++ b/apps/sim/app/workspace/[workspaceId]/providers/feature-flags-provider.tsx @@ -5,6 +5,7 @@ import { createContext, type ReactNode, useContext } from 'react' export interface WorkspaceFeatureFlags { dashboards: boolean 'workflow-tests': boolean + 'workflow-code'?: boolean changelog: boolean 'mothership-model-selector': boolean 'mothership-plan-mode': boolean diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/code/code.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/code/code.tsx new file mode 100644 index 00000000000..cb812ad7d7f --- /dev/null +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/code/code.tsx @@ -0,0 +1,102 @@ +'use client' + +import { useEffect } from 'react' +import { useQueryClient } from '@tanstack/react-query' +import { + MonacoEditor, + TEXT_EDITOR_OPTIONS, + useMonacoTheme, +} from '@/app/workspace/[workspaceId]/files/components/file-viewer/monaco-editor' +import { useWorkflowScope } from '@/app/workspace/[workspaceId]/providers/workflow-scope-provider' +import { useWorkflowSource, workflowSourceKeys } from '@/hooks/queries/workflow-source' +import { useOperationQueueStore } from '@/stores/operation-queue/store' +import { useVariablesStore } from '@/stores/variables/store' +import { useWorkflowStore } from '@/stores/workflows/workflow/store' + +const WORKFLOW_FILE = 'workflow.ts' + +/** Quiet period after the last edit before the source is re-read. */ +const REFRESH_DEBOUNCE_MS = 750 + +const CODE_VIEW_OPTIONS = { ...TEXT_EDITOR_OPTIONS, readOnly: true, domReadOnly: true } + +/** + * Re-reads the source once the draft settles: after the graph or variables change and no local + * operation is still waiting to persist. A remote `workflow-updated` reloads the workflow store + * (the socket provider holds one handler per event, owned by the collaborative workflow hook), so + * subscribing to the store covers both remote and local edits. It keeps running while the tab is + * hidden: invalidating a disabled query only marks it stale, so the next open refetches. + */ +function useRefreshWhenDraftSettles(workflowId: string | null) { + const queryClient = useQueryClient() + + useEffect(() => { + if (!workflowId) return + let timer: ReturnType | undefined + const schedule = () => { + clearTimeout(timer) + timer = setTimeout(() => { + if (useOperationQueueStore.getState().hasPendingOperations(workflowId)) return + queryClient.invalidateQueries({ queryKey: workflowSourceKeys.detail(workflowId) }) + }, REFRESH_DEBOUNCE_MS) + } + const unsubscribeGraph = useWorkflowStore.subscribe((state, previous) => { + if ( + state.blocks !== previous.blocks || + state.edges !== previous.edges || + state.loops !== previous.loops || + state.parallels !== previous.parallels + ) { + schedule() + } + }) + const unsubscribeVariables = useVariablesStore.subscribe((state, previous) => { + if (state.variables !== previous.variables) schedule() + }) + const unsubscribeQueue = useOperationQueueStore.subscribe((state, previous) => { + if (state.operations !== previous.operations) schedule() + }) + return () => { + clearTimeout(timer) + unsubscribeGraph() + unsubscribeVariables() + unsubscribeQueue() + } + }, [workflowId, queryClient]) +} + +interface CodeProps { + /** Fetches only while the tab is showing. */ + isActive: boolean +} + +/** The workflow draft as read-only TypeScript source. */ +export function Code({ isActive }: CodeProps) { + const { workflowId } = useWorkflowScope() + const monacoTheme = useMonacoTheme() + const { data, error, isPending } = useWorkflowSource(workflowId ?? undefined, { + enabled: isActive, + }) + useRefreshWhenDraftSettles(workflowId) + + if (error) { + return ( +
+ Could not load source: {error.message} +
+ ) + } + if (isPending) { + return
Loading source…
+ } + + return ( + + ) +} diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/code/index.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/code/index.ts new file mode 100644 index 00000000000..43bd1af5e34 --- /dev/null +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/code/index.ts @@ -0,0 +1 @@ +export { Code } from './code' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/index.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/index.ts index d942f6fa12e..552489b013e 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/index.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/index.ts @@ -1,3 +1,4 @@ +export { Code } from './code' export { Deploy } from './deploy' export { Editor } from './editor' export { Toolbar } from './toolbar' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx index c59e44e0e00..28672d33bf1 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx @@ -49,12 +49,14 @@ import { useResourceRouter } from '@/app/workspace/[workspaceId]/components/reso import { MothershipChat } from '@/app/workspace/[workspaceId]/home/components/mothership-chat' import { getWorkflowCopilotUseChatOptions, useChat } from '@/app/workspace/[workspaceId]/home/hooks' import type { FileAttachmentForApi } from '@/app/workspace/[workspaceId]/home/types' +import { useFeatureFlag } from '@/app/workspace/[workspaceId]/providers/feature-flags-provider' import { useRegisterGlobalCommands } from '@/app/workspace/[workspaceId]/providers/global-commands-provider' import { useWorkflowScope } from '@/app/workspace/[workspaceId]/providers/workflow-scope-provider' import { useWorkspaceHostContext } from '@/app/workspace/[workspaceId]/providers/workspace-host-provider' import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' import { createCommands } from '@/app/workspace/[workspaceId]/utils/commands' import { + Code, Deploy, Editor, Toolbar, @@ -185,8 +187,13 @@ export const Panel = memo(function Panel() { * paint an empty panel — resolve it to the toolbar instead. */ const isCopilotTabAvailable = chatEnabled && !permissionConfig.hideCopilot + /** A persisted `activeTab: 'code'` resolves to the toolbar while code-first workflows are off. */ + const isCodeTabAvailable = useFeatureFlag('workflow-code') const activeTab: PanelTab = - storedActiveTab === 'copilot' && !isCopilotTabAvailable ? 'toolbar' : storedActiveTab + (storedActiveTab === 'copilot' && !isCopilotTabAvailable) || + (storedActiveTab === 'code' && !isCodeTabAvailable) + ? 'toolbar' + : storedActiveTab const duplicateWorkflowMutation = useDuplicateWorkflowMutation() const { data: workflows = {} } = useWorkflowMap(workspaceId) const { data: folders = {} } = useFolderMap(workspaceId) @@ -580,6 +587,13 @@ export const Panel = memo(function Panel() { * Handles tab click events */ const handleTabClick = (tab: PanelTab) => { + if (tab === 'code' && activeTab !== 'code' && scopedWorkflowId) { + captureEvent(posthogRef.current, 'code_view_opened', { + workflow_id: scopedWorkflowId, + workspace_id: workspaceId, + entry: 'toolbar', + }) + } setActiveTab(tab) } @@ -980,6 +994,20 @@ export const Panel = memo(function Panel() { > Editor + {isCodeTabAvailable && ( + + )}
@@ -1108,6 +1136,14 @@ export const Panel = memo(function Panel() { > + {isCodeTabAvailable && ( +
+ +
+ )} diff --git a/apps/sim/hooks/queries/workflow-source.ts b/apps/sim/hooks/queries/workflow-source.ts new file mode 100644 index 00000000000..58796f64a1b --- /dev/null +++ b/apps/sim/hooks/queries/workflow-source.ts @@ -0,0 +1,34 @@ +import { useQuery } from '@tanstack/react-query' +import { requestJson } from '@/lib/api/client/request' +import { getWorkflowSourceContract, type WorkflowSource } from '@/lib/api/contracts/workflow-source' + +/** The Code tab invalidates after every persisted edit, so staleness only covers idle refocus. */ +export const WORKFLOW_SOURCE_STALE_TIME = 30_000 + +export const workflowSourceKeys = { + all: ['workflow-source'] as const, + details: () => [...workflowSourceKeys.all, 'detail'] as const, + detail: (workflowId?: string) => [...workflowSourceKeys.details(), workflowId ?? ''] as const, +} + +async function fetchWorkflowSource( + workflowId: string, + signal?: AbortSignal +): Promise { + const { data } = await requestJson(getWorkflowSourceContract, { + params: { id: workflowId }, + query: { functionCode: 'inline' }, + signal, + }) + return data +} + +/** The workflow's draft printed as one TypeScript file (function code inline), for display. */ +export function useWorkflowSource(workflowId?: string, options?: { enabled?: boolean }) { + return useQuery({ + queryKey: workflowSourceKeys.detail(workflowId), + queryFn: ({ signal }) => fetchWorkflowSource(workflowId as string, signal), + enabled: Boolean(workflowId) && (options?.enabled ?? true), + staleTime: WORKFLOW_SOURCE_STALE_TIME, + }) +} diff --git a/apps/sim/lib/posthog/events.ts b/apps/sim/lib/posthog/events.ts index a8240dfe7ec..3431fd9f794 100644 --- a/apps/sim/lib/posthog/events.ts +++ b/apps/sim/lib/posthog/events.ts @@ -771,6 +771,13 @@ export interface PostHogEventMap { } /** A workflow's edit-lock was toggled on or off. */ + /** The canvas Code tab was opened. */ + code_view_opened: { + workflow_id: string + workspace_id: string + entry: 'toolbar' | 'shortcut' | 'link' + } + workflow_lock_toggled: { workflow_id: string workspace_id?: string diff --git a/apps/sim/stores/panel/types.ts b/apps/sim/stores/panel/types.ts index 28e6a48035b..c480e3307f0 100644 --- a/apps/sim/stores/panel/types.ts +++ b/apps/sim/stores/panel/types.ts @@ -7,7 +7,7 @@ import type { FileOperationOwner } from '@/lib/mothership/generated/file-owner' * Available panel tabs */ -export type PanelTab = 'copilot' | 'editor' | 'toolbar' +export type PanelTab = 'copilot' | 'editor' | 'toolbar' | 'code' /** * Panel state interface From 2bae5952ebb07474e2475b2ef4469a24274a1b3e Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:28:32 -0800 Subject: [PATCH 064/428] feat(workflows): keep the persisted branch row key through the copilot view, validation and id renumbering --- .../condition-input/condition-input.tsx | 5 +++ .../handlers/condition/handler.test.ts | 19 ++++++++++ .../lib/workflows/editing/builders.test.ts | 25 +++++++++++++ .../lib/workflows/editing/validation.test.ts | 27 ++++++++++++++ apps/sim/lib/workflows/editing/validation.ts | 3 +- .../sanitization/json-sanitizer.test.ts | 36 +++++++++++++++++++ .../workflows/sanitization/json-sanitizer.ts | 5 ++- 7 files changed, 118 insertions(+), 2 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx index d924c62af3c..e2e15401709 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/condition-input/condition-input.tsx @@ -75,6 +75,11 @@ interface ConditionalBlock { id: string /** Block title (if/else if/else) */ title: string + /** + * Persisted branch key (s1 D2b) written by code apply or the copilot; every edit here spreads + * the row, so it survives reorders and title renumbering untouched. + */ + key?: string /** Code content of the condition */ value: string /** Whether tag dropdown is visible */ diff --git a/apps/sim/executor/handlers/condition/handler.test.ts b/apps/sim/executor/handlers/condition/handler.test.ts index f5e150182b6..a637c2637c0 100644 --- a/apps/sim/executor/handlers/condition/handler.test.ts +++ b/apps/sim/executor/handlers/condition/handler.test.ts @@ -293,6 +293,25 @@ describe('ConditionBlockHandler', () => { expect(mockContext.decisions.condition.get(mockBlock.id)).toBe('else1') }) + it('routes by row id and title alone, whatever branch key a row persists (s1 D2b)', async () => { + mockExecuteTool.mockResolvedValueOnce(noMatch()) + + const conditions = [ + { id: 'cond1', title: 'if', value: 'context.value < 0', key: 'else' }, + { id: 'else1', title: 'else', value: '', key: 'isNegative' }, + ] + const result = (await handler.execute(mockContext, mockBlock, { + conditions: JSON.stringify(conditions), + })) as Record + + expect(result).toMatchObject({ + conditionResult: false, + selectedOption: 'else1', + selectedTitle: 'else', + }) + expect(mockContext.decisions.condition.get(mockBlock.id)).toBe('else1') + }) + describe("conditionResult is the chosen branch's own verdict", () => { it('reports false when the else branch fires, so a downstream is not inverted', async () => { mockExecuteTool.mockResolvedValueOnce(noMatch()) diff --git a/apps/sim/lib/workflows/editing/builders.test.ts b/apps/sim/lib/workflows/editing/builders.test.ts index 67315497dd5..c0b3eadf2c4 100644 --- a/apps/sim/lib/workflows/editing/builders.test.ts +++ b/apps/sim/lib/workflows/editing/builders.test.ts @@ -354,6 +354,31 @@ describe('createBlockFromParams', () => { expect(parsed[1].id).toBe('condition-1-else') }) + it('keeps each row key when it renumbers condition and router branch ids (s1 D2b)', () => { + const condition = createBlockFromParams('cond-1', { + type: 'condition', + name: 'Condition 1', + inputs: { + conditions: JSON.stringify([ + { id: 'x', title: 'if', value: 'a', key: 'isVip' }, + { id: 'y', title: 'else if', value: 'b', key: 'isTrial' }, + { id: 'z', title: 'else', value: '' }, + ]), + }, + triggerMode: false, + }) + expect( + JSON.parse(condition.subBlocks.conditions.value).map((row: { id: string; key?: string }) => [ + row.id, + row.key, + ]) + ).toEqual([ + ['cond-1-if', 'isVip'], + ['cond-1-else-if-0', 'isTrial'], + ['cond-1-else', undefined], + ]) + }) + it('persists knowledge tag subblocks as JSON strings, not raw arrays', () => { const block = createBlockFromParams('kb-1', { type: 'knowledge', diff --git a/apps/sim/lib/workflows/editing/validation.test.ts b/apps/sim/lib/workflows/editing/validation.test.ts index 5b58e61fc9a..2b086c240e1 100644 --- a/apps/sim/lib/workflows/editing/validation.test.ts +++ b/apps/sim/lib/workflows/editing/validation.test.ts @@ -475,6 +475,33 @@ describe('validateInputsForBlock', () => { expect(result.validInputs.routes).toEqual(routes) }) + it('accepts a persisted branch key on condition and router rows (s1 D2b)', () => { + const conditions = [ + { id: 'c-if', title: 'if', value: 'true', key: 'isVip' }, + { id: 'c-else', title: 'else', value: '', key: 'otherwise' }, + ] + const routes = [{ id: 'r-1', title: 'Billing', value: 'Invoices', key: 'billing' }] + const condition = validateInputsForBlock('condition', { conditions }, 'condition-1') + const router = validateInputsForBlock('router_v2', { routes }, 'router-1') + + expect(condition.errors).toHaveLength(0) + expect(condition.validInputs.conditions).toEqual(conditions) + expect(router.errors).toHaveLength(0) + expect(router.validInputs.routes).toEqual(routes) + }) + + it('does not name a branch key as unknown when a route value is missing', () => { + const result = validateInputsForBlock( + 'router_v2', + { routes: [{ id: 'r-1', title: 'Billing', key: 'billing' }] }, + 'router-1' + ) + + expect(result.errors[0]?.error).toBe( + 'Invalid route at index 0: missing "value" — a route is {id?, title, value}; "value" holds the description the model reads' + ) + }) + /** * The runtime shows the model each route's `value` as its description. A * route stored as `{title, description}` reads as having no description, so diff --git a/apps/sim/lib/workflows/editing/validation.ts b/apps/sim/lib/workflows/editing/validation.ts index 92c1cf7531a..d2f7d0b781d 100644 --- a/apps/sim/lib/workflows/editing/validation.ts +++ b/apps/sim/lib/workflows/editing/validation.ts @@ -426,7 +426,8 @@ function parseArrayInput(value: unknown): unknown { } } -const ROUTER_ROUTE_KEYS: ReadonlySet = new Set(['id', 'title', 'value']) +/** `key` is the optional persisted branch key (s1 D2b), which the runtime ignores. */ +const ROUTER_ROUTE_KEYS: ReadonlySet = new Set(['id', 'title', 'value', 'key']) const ROUTER_ROUTE_SHAPE = 'a route is {id?, title, value}; "value" holds the description the model reads' diff --git a/apps/sim/lib/workflows/sanitization/json-sanitizer.test.ts b/apps/sim/lib/workflows/sanitization/json-sanitizer.test.ts index 2fa7214fb2e..59b797f61de 100644 --- a/apps/sim/lib/workflows/sanitization/json-sanitizer.test.ts +++ b/apps/sim/lib/workflows/sanitization/json-sanitizer.test.ts @@ -125,6 +125,42 @@ describe('sanitizeForCopilot knowledge tag subblocks', () => { }) }) +describe('sanitizeForCopilot condition rows', () => { + // A row key the agent never sees is a key its next edit cannot echo back, so every copilot + // edit of a condition would silently drop the named branches (s1 D2b). + it('keeps the persisted branch key and strips UI state', () => { + const rows = [ + { id: 'c-if', title: 'if', value: 'a', key: 'isVip', showTags: true, searchTerm: 'x' }, + { id: 'c-else', title: 'else', value: '' }, + ] + const state = { + blocks: { + 'cond-1': { + id: 'cond-1', + type: 'condition', + name: 'Route', + position: { x: 0, y: 0 }, + enabled: true, + outputs: {}, + subBlocks: { + conditions: { id: 'conditions', type: 'condition-input', value: JSON.stringify(rows) }, + }, + }, + }, + edges: [], + loops: {}, + parallels: {}, + } as unknown as WorkflowState + + const inputs = sanitizeForCopilot(state).blocks['cond-1'].inputs + + expect(JSON.parse(String(inputs?.conditions))).toEqual([ + { id: 'c-if', title: 'if', value: 'a', key: 'isVip' }, + { id: 'c-else', title: 'else', value: '' }, + ]) + }) +}) + describe('sanitizeForCopilot server-only block inputs', () => { it('omits Sim Chat secret-mount policy while retaining model-visible inputs', () => { const result = sanitizeForCopilot( diff --git a/apps/sim/lib/workflows/sanitization/json-sanitizer.ts b/apps/sim/lib/workflows/sanitization/json-sanitizer.ts index 68c38e06e46..edbe5763a35 100644 --- a/apps/sim/lib/workflows/sanitization/json-sanitizer.ts +++ b/apps/sim/lib/workflows/sanitization/json-sanitizer.ts @@ -79,6 +79,8 @@ interface SanitizedCondition { id: string title: string value: string + /** The persisted branch key (s1 D2b); kept so an edit that echoes the rows keeps it. */ + key?: string } function toSanitizedCondition(condition: unknown): SanitizedCondition { @@ -87,6 +89,7 @@ function toSanitizedCondition(condition: unknown): SanitizedCondition { id: String(record.id ?? ''), title: String(record.title ?? ''), value: String(record.value ?? ''), + ...(typeof record.key === 'string' && { key: record.key }), } } @@ -156,7 +159,7 @@ function sanitizeConditions(conditionsJson: string): string { const conditions: unknown = JSON.parse(conditionsJson) if (!Array.isArray(conditions)) return conditionsJson - // Keep only id, title, and value - remove UI state + // Keep only id, title, value and key - remove UI state const cleaned: SanitizedCondition[] = conditions.map(toSanitizedCondition) return JSON.stringify(cleaned) From aef6a5fecfc911429317acf69b16d0a835dc0ba5 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:28:38 -0800 Subject: [PATCH 065/428] feat(workflows): fail CI when sdk-names.json renames or drops a shipped name check:sdk-names-frozen compares apps/sim/blocks/sdk-names.json with the copy at the merge-base of a base ref (origin/staging by default) and fails on any namespace, method, trigger builder or param alias that changed or disappeared. New entries pass, and a base without the file counts as all new. Like check:migrations it needs a base ref, so run-audits excludes it and checks.yml runs it as its own step with the audit base. --- .github/workflows/checks.yml | 4 + package.json | 1 + scripts/check-sdk-names-frozen.test.ts | 84 +++++++++++++++ scripts/check-sdk-names-frozen.ts | 142 +++++++++++++++++++++++++ scripts/run-audits.ts | 1 + 5 files changed, 232 insertions(+) create mode 100644 scripts/check-sdk-names-frozen.test.ts create mode 100644 scripts/check-sdk-names-frozen.ts diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml index f49ec270d09..dc9a762bcbe 100644 --- a/.github/workflows/checks.yml +++ b/.github/workflows/checks.yml @@ -733,6 +733,10 @@ jobs: - name: Migration safety (zero-downtime) audit run: bun run check:migrations "${{ steps.audit_base.outputs.ref }}" + # A builder name is public API once a workflow file uses it, so sdk-names.json is add-only. + - name: Frozen SDK names audit + run: bun run check:sdk-names-frozen "${{ steps.audit_base.outputs.ref }}" + # Every affected workspace, following the same real task graph as tests. Root/unknown # changes select all. packages/emcn, packages/utils, # apps/desktop and apps/docs had no type check in CI at all; apps/sim's diff --git a/package.json b/package.json index 60e72c9895c..675b231af7d 100644 --- a/package.json +++ b/package.json @@ -102,6 +102,7 @@ "check:tool-metadata": "bun run scripts/sync-tool-metadata.ts --check", "generate:sdk-names": "bun run apps/sim/scripts/generate-sdk-names.ts", "check:sdk-names": "bun run apps/sim/scripts/generate-sdk-names.ts --check", + "check:sdk-names-frozen": "bun run scripts/check-sdk-names-frozen.ts", "generate:deployment-config": "bun run scripts/generate-deployment-config.ts", "check:deployment-config": "bun run scripts/generate-deployment-config.ts --check", "images:generate": "bun run scripts/generate-image-manifest.ts", diff --git a/scripts/check-sdk-names-frozen.test.ts b/scripts/check-sdk-names-frozen.test.ts new file mode 100644 index 00000000000..a09d70e1983 --- /dev/null +++ b/scripts/check-sdk-names-frozen.test.ts @@ -0,0 +1,84 @@ +import { describe, expect, it } from 'vitest' +import { frozenNameViolations } from './check-sdk-names-frozen' + +const BASE = { + version: 1, + blocks: { + slack: { + namespace: 'slack', + methods: { send: 'sendMessage', ephemeral: 'sendEphemeral' }, + params: { action: { oauthCredential: 'credential' } }, + }, + webhook: { namespace: 'trigger.webhook' }, + github: { namespace: 'github', triggers: { github_push: 'push' } }, + }, +} + +function headWith(edit: (blocks: Record>) => void) { + const head = structuredClone(BASE) as { + version: number + blocks: Record> + } + edit(head.blocks) + return head +} + +describe('frozen sdk names', () => { + it('accepts new blocks, methods, triggers and aliases', () => { + const head = headWith((blocks) => { + blocks.linear = { namespace: 'linear', methods: { create: 'createIssue' } } + ;(blocks.slack.methods as Record).react = 'addReaction' + ;(blocks.github.triggers as Record).github_pr = 'pullRequest' + blocks.slack.params = { + action: { oauthCredential: 'credential' }, + trigger: { triggerCredentials: 'credential' }, + } + }) + expect(frozenNameViolations(BASE, head)).toEqual([]) + }) + + it('treats a base without the file as all new', () => { + expect(frozenNameViolations(null, BASE)).toEqual([]) + }) + + it.each([ + [ + 'a renamed method', + (b: Record>) => { + ;(b.slack.methods as Record).send = 'postMessage' + }, + ], + [ + 'a deleted method', + (b: Record>) => { + Reflect.deleteProperty(b.slack.methods as Record, 'ephemeral') + }, + ], + [ + 'a renamed namespace', + (b: Record>) => { + b.slack.namespace = 'slackV2' + }, + ], + [ + 'a deleted block', + (b: Record>) => { + Reflect.deleteProperty(b, 'webhook') + }, + ], + [ + 'a renamed trigger builder', + (b: Record>) => { + ;(b.github.triggers as Record).github_push = 'onPush' + }, + ], + [ + 'a deleted alias', + (b: Record>) => { + Reflect.deleteProperty(b.slack, 'params') + }, + ], + ])('rejects %s', (_label, edit) => { + expect(frozenNameViolations(BASE, headWith(edit))).toHaveLength(1) + }) +}) diff --git a/scripts/check-sdk-names-frozen.ts b/scripts/check-sdk-names-frozen.ts new file mode 100644 index 00000000000..e3cd15bdb5b --- /dev/null +++ b/scripts/check-sdk-names-frozen.ts @@ -0,0 +1,142 @@ +#!/usr/bin/env bun +/** + * Keeps `apps/sim/blocks/sdk-names.json` add-only against a base ref. + * + * A builder name is public API the moment a workflow file uses it (`slack.sendMessage(...)`), so + * once a namespace, method, trigger builder or param alias reaches the base branch it may never + * change or disappear. `check:sdk-names` proves the file covers the registry; it cannot see a + * rename, because the renamed file is just as complete. This check compares the working-tree file + * with the one at the merge-base and fails on any base entry that is missing or different. New + * entries pass. A base that has no file yet means everything is new. + * + * Usage: + * bun run scripts/check-sdk-names-frozen.ts [baseRef] # base defaults to origin/staging + */ +import { execFileSync } from 'node:child_process' +import { readFileSync } from 'node:fs' +import path from 'node:path' +import { getErrorMessage } from '@sim/utils/errors' +import { isRecordLike } from '@sim/utils/object' +import { compareStrings } from '@sim/utils/string' + +const ROOT = path.resolve(import.meta.dirname, '..') +const NAMES_PATH = 'apps/sim/blocks/sdk-names.json' + +/** The maps under a block entry whose every key is frozen once it reaches the base. */ +const NAME_MAPS = ['methods', 'triggers'] as const + +function record(value: unknown): Record { + return isRecordLike(value) ? value : {} +} + +function own(value: Record, key: string): unknown { + return Object.hasOwn(value, key) ? value[key] : undefined +} + +function compareMap( + base: Record, + head: Record, + where: string, + out: string[] +) { + for (const key of Object.keys(base).sort(compareStrings)) { + const was = base[key] + const now = own(head, key) + if (now === undefined) out.push(`${where}.${key} ("${String(was)}") was removed`) + else if (now !== was) + out.push(`${where}.${key} was renamed "${String(was)}" → "${String(now)}"`) + } +} + +/** + * Every base name the head drops or changes, one line each. `base` is `null` when the base ref + * has no sdk-names file, which makes every head entry new. + */ +export function frozenNameViolations(base: unknown, head: unknown): string[] { + if (base === null) return [] + const out: string[] = [] + const baseBlocks = record(record(base).blocks) + const headBlocks = record(record(head).blocks) + for (const type of Object.keys(baseBlocks).sort(compareStrings)) { + const was = record(baseBlocks[type]) + const nowValue = own(headBlocks, type) + if (!isRecordLike(nowValue)) { + out.push(`${type} (namespace "${String(was.namespace)}") was removed`) + continue + } + if (nowValue.namespace !== was.namespace) { + out.push( + `${type}.namespace was renamed "${String(was.namespace)}" → "${String(nowValue.namespace)}"` + ) + } + for (const map of NAME_MAPS) { + compareMap(record(was[map]), record(own(nowValue, map)), `${type}.${map}`, out) + } + const baseParams = record(was.params) + const headParams = record(own(nowValue, 'params')) + for (const surface of Object.keys(baseParams).sort(compareStrings)) { + compareMap( + record(baseParams[surface]), + record(own(headParams, surface)), + `${type}.params.${surface}`, + out + ) + } + } + return out +} + +function git(args: string[]): string | null { + try { + return execFileSync('git', args, { + cwd: ROOT, + encoding: 'utf8', + stdio: ['ignore', 'pipe', 'ignore'], + maxBuffer: 64 * 1024 * 1024, + }) + } catch { + return null + } +} + +/** + * The base file's JSON, `null` when the base has no file, or throws when the ref is unusable. The + * merge-base is preferred; a shallow CI fetch that has no merge-base compares against the ref. + */ +function readBase(baseRef: string): unknown { + const mergeBase = + git(['merge-base', baseRef, 'HEAD'])?.trim() || + git(['rev-parse', '--verify', '--quiet', `${baseRef}^{commit}`])?.trim() + if (!mergeBase) { + throw new Error(`Cannot resolve '${baseRef}'. Fetch it before running this check.`) + } + if (git(['cat-file', '-e', `${mergeBase}:${NAMES_PATH}`]) === null) return null + const text = git(['show', `${mergeBase}:${NAMES_PATH}`]) + if (text === null) throw new Error(`Cannot read ${NAMES_PATH} at ${mergeBase}.`) + return JSON.parse(text) +} + +if (import.meta.main) { + const baseRef = process.argv.slice(2).find((arg) => !arg.startsWith('--')) ?? 'origin/staging' + let base: unknown + try { + base = readBase(baseRef) + } catch (error) { + console.error(`✗ sdk-names freeze check could not run.\n ${getErrorMessage(error)}`) + process.exit(1) + } + const head: unknown = JSON.parse(readFileSync(path.join(ROOT, NAMES_PATH), 'utf8')) + const violations = frozenNameViolations(base, head) + if (violations.length > 0) { + console.error( + `✗ ${NAMES_PATH} changed or removed ${violations.length} name(s) that ${baseRef} already ships. Names are add-only: restore each one, and give a colliding NEW entry a hand-picked name instead.\n` + ) + for (const violation of violations) console.error(` ${violation}`) + process.exit(1) + } + console.log( + base === null + ? `✓ ${baseRef} has no ${NAMES_PATH}; every name is new.` + : `✓ ${NAMES_PATH} keeps every name ${baseRef} ships.` + ) +} diff --git a/scripts/run-audits.ts b/scripts/run-audits.ts index 4af4ed171e8..2f926145a78 100644 --- a/scripts/run-audits.ts +++ b/scripts/run-audits.ts @@ -23,6 +23,7 @@ import path from 'node:path' const EXCLUDED: Record = { 'check:audits': 'this runner', 'check:migrations': 'diffs against a git base ref (origin/staging by default)', + 'check:sdk-names-frozen': 'diffs against a git base ref (origin/staging by default)', 'check:api-validation': 'superseded by the :strict variant, which this runner does run', 'check:test-types': 'type-checks all of apps/sim with its tests; its own `test-types` CI job', } From 27f9a35c619e732c79fccce8710ad0bb45726d73 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:29:39 -0800 Subject: [PATCH 066/428] refactor(workflow-code): serve the seeded PRNG from @sim/workflow-code/proof/random Corpus generation (and the export script that loads it) imported createSeededRandom from the proof barrel, which pulls fast-check and the arbitraries into a runtime path. The PRNG now has its own subpath; ./proof keeps the arbitraries and oracles for tests. --- apps/sim/lib/workflows/code/corpus/blocks.ts | 2 +- apps/sim/lib/workflows/code/corpus/generate.ts | 2 +- apps/sim/lib/workflows/code/corpus/values.ts | 2 +- packages/workflow-code/package.json | 4 ++++ packages/workflow-code/src/proof/index.ts | 7 ++++--- 5 files changed, 11 insertions(+), 6 deletions(-) diff --git a/apps/sim/lib/workflows/code/corpus/blocks.ts b/apps/sim/lib/workflows/code/corpus/blocks.ts index 01c59e450ae..9ebc28d0395 100644 --- a/apps/sim/lib/workflows/code/corpus/blocks.ts +++ b/apps/sim/lib/workflows/code/corpus/blocks.ts @@ -5,7 +5,7 @@ * type, hidden ones `null`, and `data.canonicalModes` explicit for every pair. */ -import type { SeededRandom } from '@sim/workflow-code/proof' +import type { SeededRandom } from '@sim/workflow-code/proof/random' import { type FillContext, fillSubBlockValue, diff --git a/apps/sim/lib/workflows/code/corpus/generate.ts b/apps/sim/lib/workflows/code/corpus/generate.ts index c1397eaf9ef..6df671d25c8 100644 --- a/apps/sim/lib/workflows/code/corpus/generate.ts +++ b/apps/sim/lib/workflows/code/corpus/generate.ts @@ -19,7 +19,7 @@ * same on every machine and adding a block does not reshuffle the others. */ -import { createSeededRandom, type SeededRandom } from '@sim/workflow-code/proof' +import { createSeededRandom, type SeededRandom } from '@sim/workflow-code/proof/random' import { type BlockFixture, buildBlockFixture, diff --git a/apps/sim/lib/workflows/code/corpus/values.ts b/apps/sim/lib/workflows/code/corpus/values.ts index 1908015ec09..9e080b27573 100644 --- a/apps/sim/lib/workflows/code/corpus/values.ts +++ b/apps/sim/lib/workflows/code/corpus/values.ts @@ -8,7 +8,7 @@ * advanced member of a selector pair is free text and carries the payload. */ -import type { SeededRandom } from '@sim/workflow-code/proof' +import type { SeededRandom } from '@sim/workflow-code/proof/random' import type { SubBlockConfig } from '@/blocks/types' /** The upstream start block every case has; its key is `start`. */ diff --git a/packages/workflow-code/package.json b/packages/workflow-code/package.json index 73c2ce92dab..97fd6ae8761 100644 --- a/packages/workflow-code/package.json +++ b/packages/workflow-code/package.json @@ -21,6 +21,10 @@ "./proof": { "types": "./src/proof/index.ts", "default": "./src/proof/index.ts" + }, + "./proof/random": { + "types": "./src/proof/random.ts", + "default": "./src/proof/random.ts" } }, "scripts": { diff --git a/packages/workflow-code/src/proof/index.ts b/packages/workflow-code/src/proof/index.ts index 71603fc8e85..671566c7268 100644 --- a/packages/workflow-code/src/proof/index.ts +++ b/packages/workflow-code/src/proof/index.ts @@ -1,7 +1,9 @@ /** * Round-trip proof tooling, served from `@sim/workflow-code/proof` rather than the main entry so - * runtime consumers (the Code tab, the CLI) never load fast-check. Pure, like the rest of the - * package: the app supplies registry-derived corpora, the serializer and the report file write. + * runtime consumers (the Code tab, the CLI) never load fast-check. The seeded PRNG corpus + * generation runs on is its own subpath, `@sim/workflow-code/proof/random`, for the same reason. + * Pure, like the rest of the package: the app supplies registry-derived corpora, the serializer + * and the report file write. */ export { @@ -28,7 +30,6 @@ export { type SerializedWorkflowLike, withoutAnnotations, } from './oracles' -export { createSeededRandom, type SeededRandom } from './random' export { type BlockTypeParity, createProofReport, From 8b7475fcf6d27176dc53168da68792bdd41c4bb1 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:31:52 -0800 Subject: [PATCH 067/428] contract: compact block catalog core shard read through view accessors The core shard stored every trigger's subBlocks twice (on each block and in the triggers table), repeated identical subBlocks, condition lists and output records across blocks, and carried display-only option labels and block inputs. BlockCatalog entries now accept references: trigger subBlock runs by trigger id, a shared subBlocks table, interned condition lists, shared output records, and labels/inputs moved to the block docs shard. Every expanded type is still a valid entry, so expanded catalogs (all fixtures) stay valid shards. compactBlockCatalog encodes; expandBlockCatalog and the catalogBlock/catalogTrigger/ catalogBuilder/catalogTool accessors decode lazily, memoized per catalog. Canonicalize, compile, the printer and SDK codegen read only through the accessors. --- packages/workflow-code/DESIGN.md | 21 + .../workflow-code/src/canonicalize/context.ts | 3 +- .../workflow-code/src/canonicalize/tools.ts | 6 +- .../workflow-code/src/catalog/compact.test.ts | 133 ++++++ packages/workflow-code/src/catalog/compact.ts | 415 ++++++++++++++++++ packages/workflow-code/src/catalog/types.ts | 131 +++++- packages/workflow-code/src/catalog/view.ts | 261 +++++++++++ packages/workflow-code/src/compile/edges.ts | 5 +- packages/workflow-code/src/compile/scope.ts | 11 +- packages/workflow-code/src/compile/tools.ts | 8 +- packages/workflow-code/src/index.ts | 24 + .../src/print/determinism.test.ts | 3 +- packages/workflow-code/src/print/printer.ts | 31 +- packages/workflow-sdk/src/codegen/generate.ts | 29 +- packages/workflow-sdk/src/codegen/names.ts | 16 +- .../workflow-sdk/test/typecheck-project.ts | 5 +- 16 files changed, 1059 insertions(+), 43 deletions(-) create mode 100644 packages/workflow-code/src/catalog/compact.test.ts create mode 100644 packages/workflow-code/src/catalog/compact.ts create mode 100644 packages/workflow-code/src/catalog/view.ts diff --git a/packages/workflow-code/DESIGN.md b/packages/workflow-code/DESIGN.md index ad5563cff73..06fc9e59d5a 100644 --- a/packages/workflow-code/DESIGN.md +++ b/packages/workflow-code/DESIGN.md @@ -230,3 +230,24 @@ instead of failing at run time. - **A15. knip.** Wave 3 removes `includeEntryExports: false` and the `@babel/parser` ignore from `knip.jsonc` once the consumers land. The `@sim/utils` ignore is already gone, because `hash.ts` uses it. +- **A16. The core shard is a compact encoding; consumers read it through `catalog/view.ts`.** + This extends item 18 and decision 14. + - `BlockCatalog` is the served core shard. Its entry types are supersets of the expanded types, + so a catalog written in expanded form (every test fixture) is still a valid shard. + - A block's trigger-mode subBlocks that equal a run of a shared trigger's subBlocks are stored + as `{ trigger, start, count }` and expand with `surface: 'trigger'`. + - SubBlocks declared identically more than once live in `BlockCatalog.subBlocks` (`{ shared }`), + condition value lists used more than once in `lists` (`{ list }`), and output records used + more than once in `outputs` (`sharedOutputs`, `sharedProperties`). + - Option labels equal to their id are dropped. Every other label except the `operation` + dropdown's (SDK codegen documents operation methods with it) moves to the block's docs shard + (`CatalogBlockDocs`), as do the block's `inputs`, which nothing reads. + - Titles, output descriptions, defaults and option ids stay in the core shard. SDK codegen reads + titles and output descriptions for JSDoc, defaults for optionality and gate values, and option + ids for literal unions; the printer checks values against option ids. + - `compactBlockCatalog` (`catalog/compact.ts`) encodes. `expandBlockCatalog(catalog, docs?)` and + the per-block accessors (`catalogBlock`, `catalogTrigger`, `catalogBuilder`, + `catalogBuilderPaths`, `catalogTool`) decode, lazily and memoized per catalog object. No + consumer indexes `catalog.blocks`, `catalog.triggers` or `catalog.builders` directly. + - The hash is still SHA-256 over `stableStringify` of the core shard, so it stays the ETag and + `lock.catalogHash`. It is deterministic: the tables fill in catalog key order. diff --git a/packages/workflow-code/src/canonicalize/context.ts b/packages/workflow-code/src/canonicalize/context.ts index 5cb90471f3b..4da3c33cf08 100644 --- a/packages/workflow-code/src/canonicalize/context.ts +++ b/packages/workflow-code/src/canonicalize/context.ts @@ -1,5 +1,6 @@ import type { ResourceKeyResolver } from '../api' import type { BlockCatalog, CatalogBlock, CatalogSubBlock } from '../catalog/types' +import { catalogBlock as readCatalogBlock } from '../catalog/view' import type { CanonicalizeDiagnosticCode } from '../diagnostics/codes' import type { Diagnostic } from '../diagnostics/frame' import type { BlockKey, VarKey } from '../model' @@ -31,7 +32,7 @@ export function report(context: CanonContext, diagnostic: Diagnostic = {}): CatalogSubBlock { + return { id, type: 'short-input', valueKind: 'string', storage: 'native', ...extra } +} + +const OPERATIONS = ['send', 'read', 'update', 'delete'] + +/** Every encoding at once: a spread trigger, a field two blocks share, a repeated list. */ +function sharingCatalog(): ExpandedBlockCatalog { + const shared = sub('channel', { + title: 'Channel', + condition: { field: 'operation', value: OPERATIONS }, + options: [ + { id: 'general', label: 'General' }, + { id: 'random', label: 'random' }, + ], + }) + const triggerFields = [ + sub('webhookUrl', { mode: 'trigger', readOnly: true }), + sub('secret', { mode: 'trigger', password: true }), + ] + const outputs = { + message: { + type: 'json' as const, + properties: { text: { type: 'string' as const, description: 'Body' } }, + }, + } + const block = (type: string): ExpandedBlockCatalog['blocks'][string] => ({ + type, + name: type, + category: 'tools', + subBlocks: [ + sub('operation', { + type: 'dropdown', + options: OPERATIONS.map((id) => ({ id, label: id.toUpperCase() })), + surface: 'action', + }), + { ...shared, surface: 'action' }, + sub('limit', { required: { field: 'operation', value: OPERATIONS }, surface: 'action' }), + ...triggerFields.map((field) => ({ ...field, surface: 'trigger' as const })), + ], + tools: { access: [], selector: 'single' }, + inputs: { channel: { type: 'string' } }, + outputs, + graph: { canBeTarget: true, errorPort: true, container: null, annotationOnly: false }, + triggers: { enabled: true, available: ['chat_webhook'] }, + }) + return { + catalogVersion: 1, + hash: 'unused', + sdkMajor: 1, + blocks: { chat: block('chat'), chat_v2: block('chat_v2') }, + triggers: { + chat_webhook: { + id: 'chat_webhook', + provider: 'chat', + name: 'Chat Webhook', + subBlocks: triggerFields, + outputs, + }, + }, + builders: { 'chat.send': { type: 'chat', operation: 'send' } }, + } +} + +function roundTrip(expanded: ExpandedBlockCatalog): ExpandedBlockCatalog { + const { hash, ...rest } = expanded + const { core, docs } = compactBlockCatalog(rest) + return expandBlockCatalog({ ...core, hash }, (type) => docs[type]) +} + +describe('compactBlockCatalog', () => { + it('round-trips every fixture catalog through the core shard and its docs', () => { + for (const catalog of [TEST_CATALOG, PRINT_CATALOG, sharingCatalog()]) { + const expanded = expandBlockCatalog(catalog) + expect(roundTrip(expanded)).toEqual(expanded) + } + }) + + it('stores a spread trigger, a repeated field and a repeated list once each', () => { + const { hash, ...rest } = sharingCatalog() + const { core, docs } = compactBlockCatalog(rest) + const entries = core.blocks.chat.subBlocks + expect(entries.filter((entry) => 'trigger' in entry)).toEqual([ + { trigger: 'chat_webhook', start: 0, count: 2 }, + ]) + expect(core.subBlocks?.length).toBeGreaterThan(0) + expect(core.lists).toEqual([OPERATIONS]) + expect(core.outputs?.length).toBe(1) + expect(docs.chat.inputs).toEqual({ channel: { type: 'string' } }) + expect(docs.chat.optionLabels).toEqual({ '1': ['General', 'random'] }) + }) + + it('leaves its input untouched, so a rebuild from the same objects gives the same bytes', () => { + const { hash, ...rest } = sharingCatalog() + const before = stableStringify(rest) + const first = stableStringify(compactBlockCatalog(rest)) + expect(stableStringify(rest)).toBe(before) + expect(stableStringify(compactBlockCatalog(rest))).toBe(first) + }) +}) + +describe('catalog view', () => { + it('reads a catalog written in expanded form unchanged', () => { + for (const [type, block] of Object.entries(TEST_CATALOG.blocks)) { + expect(catalogBlock(TEST_CATALOG, type)).toEqual(block) + } + }) + + it('throws on a reference the shard does not hold instead of dropping the field', () => { + const { hash, ...rest } = sharingCatalog() + const { core } = compactBlockCatalog(rest) + const broken: BlockCatalog = { ...core, hash, subBlocks: [], lists: [] } + expect(() => catalogBlock(broken, 'chat')).toThrow(/does not exist/) + }) + + it('answers no block for an inherited property name', () => { + expect(catalogBlock(TEST_CATALOG, 'constructor')).toBeUndefined() + }) +}) diff --git a/packages/workflow-code/src/catalog/compact.ts b/packages/workflow-code/src/catalog/compact.ts new file mode 100644 index 00000000000..35b057b84cf --- /dev/null +++ b/packages/workflow-code/src/catalog/compact.ts @@ -0,0 +1,415 @@ +/** + * Encodes an expanded catalog as the core shard plus per-block docs (`types.ts`, "Core-shard + * encoding"). `expandBlockCatalog(core, docs)` in `view.ts` is its exact inverse; the registry-wide + * catalog test proves that over the live registry. + * + * Deterministic: tables are filled in catalog order (blocks, then triggers, each in key order), + * so the same expanded catalog always yields the same bytes and the same hash. + * + * Serialized keys of input objects are memoized by identity across calls: the projection hands + * the same frozen-in-practice block, trigger and output objects to every request's build, so a + * rebuild serializes only what changed. Inputs must therefore not be mutated after compaction. + */ + +import { stableStringify } from '../hash' +import type { + BlockCatalog, + CatalogBlock, + CatalogBlockDocs, + CatalogBlockEntry, + CatalogConditionEntry, + CatalogListRef, + CatalogOutput, + CatalogOutputEntry, + CatalogSharedSubBlockRef, + CatalogSubBlock, + CatalogSubBlockEntry, + CatalogTrigger, + CatalogTriggerEntry, + CatalogTriggerSubBlocksRef, + ExpandedBlockCatalog, +} from './types' + +export interface CompactedBlockCatalog { + /** The core shard, without its `hash` (the caller hashes these exact bytes). */ + core: Omit + /** Docs-shard parts by block type; a block with nothing to move has no entry. */ + docs: Record +} + +/** Below this many serialized characters a reference costs about as much as the value. */ +const MIN_INTERNED_LIST_CHARS = 16 +const MIN_SHARED_SUBBLOCK_CHARS = 48 +const MIN_SHARED_OUTPUTS_CHARS = 64 + +type Scalar = string | number | boolean + +type KeyMemo = WeakMap + +function memoKey(memo: KeyMemo, value: T, serialize: (value: T) => string) { + let key = memo.get(value) + if (key === undefined) { + key = serialize(value) + memo.set(value, key) + } + return key +} + +const plainKeys: KeyMemo = new WeakMap() +const triggerSurfaceKeys: KeyMemo = new WeakMap() +const blockEntryKeys: KeyMemo = new WeakMap() +const triggerEntryKeys: KeyMemo = new WeakMap() + +function keyOf(value: object): string { + return memoKey(plainKeys, value, stableStringify) +} + +/** A trigger subBlock's key as it appears spread into a block (`surface: 'trigger'`). */ +function triggerSurfaceKey(subBlock: CatalogSubBlock): string { + return memoKey(triggerSurfaceKeys, subBlock, (value) => + stableStringify({ ...value, surface: 'trigger' }) + ) +} + +/** + * Finds the longest run of `subBlocks` from `index` that equals a run of one trigger's subBlocks + * (each with `surface: 'trigger'`). Candidates are tried in trigger-id order and the first longest + * wins, so the choice is deterministic. + */ +function longestTriggerRun( + subBlocks: readonly string[], + index: number, + starts: ReadonlyMap>, + triggerKeys: ReadonlyMap +): CatalogTriggerSubBlocksRef | null { + let best: CatalogTriggerSubBlocksRef | null = null + for (const candidate of starts.get(subBlocks[index]) ?? []) { + const keys = triggerKeys.get(candidate.trigger) ?? [] + let count = 0 + while ( + index + count < subBlocks.length && + candidate.start + count < keys.length && + keys[candidate.start + count] === subBlocks[index + count] + ) { + count += 1 + } + if (!best || count > best.count) + best = { trigger: candidate.trigger, start: candidate.start, count } + } + return best +} + +function stripLabels(subBlock: CatalogSubBlock): CatalogSubBlockEntry { + if (!Array.isArray(subBlock.options)) return subBlock + return { + ...subBlock, + options: subBlock.options.map((option) => + option.label === option.id ? { id: option.id } : { id: option.id, label: option.label } + ), + } +} + +/** Moves a non-`operation` subBlock's option labels to the docs shard, keeping only ids. */ +function moveLabels( + subBlock: CatalogSubBlock, + index: number, + docs: CatalogBlockDocs +): CatalogSubBlockEntry { + if (!Array.isArray(subBlock.options) || subBlock.id === 'operation') return stripLabels(subBlock) + if (subBlock.options.some((option) => option.label !== option.id)) { + docs.optionLabels ??= {} + docs.optionLabels[String(index)] = subBlock.options.map((option) => option.label) + } + return { ...subBlock, options: subBlock.options.map((option) => ({ id: option.id })) } +} + +function compactBlock( + block: CatalogBlock, + starts: ReadonlyMap>, + triggerKeys: ReadonlyMap, + entryKeys: Map +): { entry: CatalogBlockEntry; docs: CatalogBlockDocs } { + const docs: CatalogBlockDocs = {} + const { subBlocks, inputs, outputs, ...rest } = block + const keys = subBlocks.map((subBlock) => (subBlock.surface === 'trigger' ? keyOf(subBlock) : '')) + const entries: CatalogBlockEntry['subBlocks'] = [] + for (let index = 0; index < subBlocks.length; ) { + const run = keys[index] ? longestTriggerRun(keys, index, starts, triggerKeys) : null + if (run && run.count > 0) { + entries.push(run) + index += run.count + continue + } + const source = subBlocks[index] + const entry = moveLabels(source, index, docs) + entryKeys.set( + entry, + memoKey(blockEntryKeys, source, () => stableStringify(entry)) + ) + entries.push(entry) + index += 1 + } + const entry: CatalogBlockEntry = { ...rest, subBlocks: entries } + if (Object.keys(inputs).length > 0) docs.inputs = inputs + return { entry, docs } +} + +/** Condition value lists in an entry, as holders a pass can read and replace. */ +function conditionEntries(entry: CatalogSubBlockEntry): CatalogConditionEntry[] { + const conditions: CatalogConditionEntry[] = [] + if (entry.condition) conditions.push(entry.condition) + if (typeof entry.required === 'object') conditions.push(entry.required) + return conditions +} + +function forEachList( + entry: CatalogSubBlockEntry, + visit: (list: Scalar[], replace: (ref: CatalogListRef) => void) => void +): void { + for (const condition of conditionEntries(entry)) { + if ('opaque' in condition) continue + const { value } = condition + if (Array.isArray(value)) visit(value, (ref) => (condition.value = ref)) + const and = condition.and + if (and && Array.isArray(and.value)) { + const list: Scalar[] = and.value + visit(list, (ref) => (and.value = ref)) + } + } +} + +/** A deep copy whose condition objects a pass may rewrite in place. */ +function ownConditions(entry: CatalogSubBlockEntry): CatalogSubBlockEntry { + const copy: CatalogSubBlockEntry = { ...entry } + const copyCondition = (condition: CatalogConditionEntry): CatalogConditionEntry => + 'opaque' in condition + ? condition + : { ...condition, ...(condition.and ? { and: { ...condition.and } } : {}) } + if (copy.condition) copy.condition = copyCondition(copy.condition) + if (typeof copy.required === 'object') copy.required = copyCondition(copy.required) + return copy +} + +type EntryList = Array + +/** + * One inline subBlock entry of a block's or trigger's list. `entry` is the slot's current value; + * a pass replaces it through `replace`, which also writes the owning list. + */ +interface EntrySlot { + entry: CatalogSubBlockEntry + replace: (value: CatalogSubBlockEntry | CatalogSharedSubBlockRef) => void +} + +function slotAt(list: EntryList, index: number, entry: CatalogSubBlockEntry): EntrySlot { + const slot: EntrySlot = { + entry, + replace: (value) => { + list[index] = value + if (!('shared' in value)) slot.entry = value + }, + } + return slot +} + +/** Every inline subBlock entry in order: the shared table, block entries, then trigger entries. */ +function entrySlots( + shared: EntryList, + blocks: Record, + triggers: Record +): EntrySlot[] { + const lists: EntryList[] = [ + shared, + ...Object.values(blocks).map((block) => block.subBlocks), + ...Object.values(triggers).map((trigger) => trigger.subBlocks), + ] + const slots: EntrySlot[] = [] + for (const list of lists) { + list.forEach((entry, index) => { + if (!('trigger' in entry) && !('shared' in entry)) slots.push(slotAt(list, index, entry)) + }) + } + return slots +} + +function internLists(slots: readonly EntrySlot[]): Scalar[][] { + const counts = new Map() + for (const slot of slots) { + slot.replace(ownConditions(slot.entry)) + forEachList(slot.entry, (list) => { + const key = JSON.stringify(list) + counts.set(key, (counts.get(key) ?? 0) + 1) + }) + } + const lists: Scalar[][] = [] + const indexByKey = new Map() + for (const slot of slots) { + forEachList(slot.entry, (list, replace) => { + const key = JSON.stringify(list) + if ((counts.get(key) ?? 0) < 2 || key.length < MIN_INTERNED_LIST_CHARS) return + let index = indexByKey.get(key) + if (index === undefined) { + index = lists.length + lists.push([...list]) + indexByKey.set(key, index) + } + replace({ list: index }) + }) + } + return lists +} + +function internSubBlocks( + slots: readonly EntrySlot[], + entryKeys: ReadonlyMap +): CatalogSubBlockEntry[] { + const keys = slots.map((slot) => entryKeys.get(slot.entry) ?? stableStringify(slot.entry)) + const counts = new Map() + for (const key of keys) counts.set(key, (counts.get(key) ?? 0) + 1) + const shared: CatalogSubBlockEntry[] = [] + const indexByKey = new Map() + slots.forEach((slot, position) => { + const key = keys[position] + if ((counts.get(key) ?? 0) < 2 || key.length < MIN_SHARED_SUBBLOCK_CHARS) return + let index = indexByKey.get(key) + if (index === undefined) { + index = shared.length + shared.push(slot.entry) + indexByKey.set(key, index) + } + slot.replace({ shared: index }) + }) + return shared +} + +function compactTrigger( + trigger: CatalogTrigger, + entryKeys: Map +): CatalogTriggerEntry { + const { outputs, ...rest } = trigger + const subBlocks = trigger.subBlocks.map((source) => { + const entry = stripLabels(source) + entryKeys.set( + entry, + memoKey(triggerEntryKeys, source, () => stableStringify(entry)) + ) + return entry + }) + return { ...rest, subBlocks } +} + +/** + * Interns output records (a block's or trigger's `outputs`, or a nested `properties`) that occur + * more than once. A shared record is encoded before it is stored, so table entries reference + * earlier entries and never themselves. + */ +class OutputInterner { + readonly table: Array> = [] + private readonly counts = new Map() + private readonly indexByKey = new Map() + + count(record: Record): void { + const key = keyOf(record) + this.counts.set(key, (this.counts.get(key) ?? 0) + 1) + for (const output of Object.values(record)) this.countOutput(output) + } + + private countOutput(output: CatalogOutput): void { + if (output.properties) this.count(output.properties) + if (output.items) this.countOutput(output.items) + } + + /** The shared index for `record`, or `null` to store it inline. */ + sharedIndex(record: Record): number | null { + const key = keyOf(record) + if ((this.counts.get(key) ?? 0) < 2 || key.length < MIN_SHARED_OUTPUTS_CHARS) return null + let index = this.indexByKey.get(key) + if (index === undefined) { + const encoded = this.encodeRecord(record) + index = this.table.length + this.table.push(encoded) + this.indexByKey.set(key, index) + } + return index + } + + encodeRecord(record: Record): Record { + const encoded: Record = {} + for (const [name, output] of Object.entries(record)) encoded[name] = this.encodeOutput(output) + return encoded + } + + private encodeOutput(output: CatalogOutput): CatalogOutputEntry { + const { properties, items, ...rest } = output + const entry: CatalogOutputEntry = { ...rest } + if (properties) { + const shared = this.sharedIndex(properties) + if (shared === null) entry.properties = this.encodeRecord(properties) + else entry.sharedProperties = shared + } + if (items) entry.items = this.encodeOutput(items) + return entry + } +} + +function outputsEntry( + outputs: Record, + interner: OutputInterner +): { outputs: Record } | { sharedOutputs: number } { + const shared = interner.sharedIndex(outputs) + return shared === null ? { outputs: interner.encodeRecord(outputs) } : { sharedOutputs: shared } +} + +/** Encodes `expanded` as a core shard plus docs (see the module comment). */ +export function compactBlockCatalog( + expanded: Omit +): CompactedBlockCatalog { + const { blocks, triggers, ...rest } = expanded + const triggerKeys = new Map() + const starts = new Map>() + for (const [id, trigger] of Object.entries(triggers)) { + const keys = trigger.subBlocks.map(triggerSurfaceKey) + triggerKeys.set(id, keys) + keys.forEach((key, start) => { + const list = starts.get(key) + if (list) list.push({ trigger: id, start }) + else starts.set(key, [{ trigger: id, start }]) + }) + } + + const entryKeys = new Map() + const docs: Record = {} + const blockEntries: Record = {} + for (const [type, block] of Object.entries(blocks)) { + const compacted = compactBlock(block, starts, triggerKeys, entryKeys) + blockEntries[type] = compacted.entry + if (Object.keys(compacted.docs).length > 0) docs[type] = compacted.docs + } + const triggerEntries: Record = {} + for (const [id, trigger] of Object.entries(triggers)) { + triggerEntries[id] = compactTrigger(trigger, entryKeys) + } + + const subBlocks = internSubBlocks(entrySlots([], blockEntries, triggerEntries), entryKeys) + const lists = internLists(entrySlots(subBlocks, blockEntries, triggerEntries)) + + const interner = new OutputInterner() + for (const block of Object.values(blocks)) interner.count(block.outputs) + for (const trigger of Object.values(triggers)) interner.count(trigger.outputs) + for (const [type, block] of Object.entries(blocks)) { + blockEntries[type] = { ...blockEntries[type], ...outputsEntry(block.outputs, interner) } + } + for (const [id, trigger] of Object.entries(triggers)) { + triggerEntries[id] = { ...triggerEntries[id], ...outputsEntry(trigger.outputs, interner) } + } + + const core: Omit = { + ...rest, + blocks: blockEntries, + triggers: triggerEntries, + } + if (subBlocks.length > 0) core.subBlocks = subBlocks + if (lists.length > 0) core.lists = lists + if (interner.table.length > 0) core.outputs = interner.table + return { core, docs } +} diff --git a/packages/workflow-code/src/catalog/types.ts b/packages/workflow-code/src/catalog/types.ts index 5de6a5a613f..b0048ee880a 100644 --- a/packages/workflow-code/src/catalog/types.ts +++ b/packages/workflow-code/src/catalog/types.ts @@ -6,7 +6,8 @@ * `{ opaque: true }`. * * Served as a hashed core shard plus per-block docs shards; fields marked "docs shard" are absent - * from the core shard. + * from the core shard. The `Catalog*` types below are the expanded shape consumers read; the + * core shard encodes them compactly ("Core-shard encoding" further down) and `view.ts` expands it. */ import type { OutputCondition, PrimitiveValueType, SubBlockType } from '@sim/workflow-types/blocks' @@ -79,6 +80,15 @@ export interface CatalogOption { label: string } +/** + * A static option as the core shard stores it: `label` is absent when it equals `id`, or when the + * block's docs shard holds it (`CatalogBlockDocs.optionLabels`). + */ +export interface CatalogOptionEntry { + id: string + label?: string +} + export interface CatalogSubBlock { id: SubBlockId type: SubBlockType @@ -270,14 +280,119 @@ export interface CatalogBuilder { fixed?: Record } +/* + * Core-shard encoding. The served catalog never repeats itself: a block's trigger-mode subBlocks + * point at the shared `triggers` table, a subBlock declared identically by several blocks is + * stored once in `subBlocks`, condition value lists repeated across fields are stored once in + * `lists`, and option labels and block inputs that nothing but documentation reads live in the + * docs shard. Every expanded type above is also a valid entry, so a catalog written in expanded + * form is a valid core shard. Read a catalog only through `catalog/view.ts`, which expands it. + */ + +/** A condition value list stored once at `BlockCatalog.lists[list]`. */ +export interface CatalogListRef { + list: number +} + +type ClauseValue = SubBlockConditionClause['value'] + +/** `SubBlockConditionClause` with value lists possibly interned. */ +export interface CatalogConditionClauseEntry { + field: SubBlockId + value: ClauseValue | CatalogListRef + not?: boolean + and?: { + field: SubBlockId + value: ClauseValue | CatalogListRef | undefined + not?: boolean + } +} + +export type CatalogConditionEntry = CatalogConditionClauseEntry | OpaqueMarker + +/** A subBlock as the core shard stores it. */ +export interface CatalogSubBlockEntry + extends Omit { + condition?: CatalogConditionEntry + required?: boolean | CatalogConditionEntry + options?: CatalogOptionEntry[] | { dynamic: true } | OpaqueMarker +} + +/** A subBlock stored once at `BlockCatalog.subBlocks[shared]`. */ +export interface CatalogSharedSubBlockRef { + shared: number +} + +/** + * `count` consecutive subBlocks of the shared trigger `trigger`, from index `start`, spliced into a + * block's subBlocks in place. Each expands with `surface: 'trigger'`: a block spreads a trigger's + * subBlocks into its trigger surface (`...getTrigger(id).subBlocks`). + */ +export interface CatalogTriggerSubBlocksRef { + trigger: string + start: number + count: number +} + +/** + * An output as the core shard stores it: a nested record repeated elsewhere in the catalog is + * stored once at `BlockCatalog.outputs[sharedProperties]` instead of in `properties`. + */ +export interface CatalogOutputEntry extends Omit { + properties?: Record + sharedProperties?: number + items?: CatalogOutputEntry +} + +/** A block's or trigger's outputs: inline, or stored once at `BlockCatalog.outputs[sharedOutputs]`. */ +interface CatalogOutputsEntry { + outputs?: Record + sharedOutputs?: number +} + +export interface CatalogBlockEntry + extends Omit, + CatalogOutputsEntry { + subBlocks: Array + /** Absent when empty or kept in the docs shard (`CatalogBlockDocs.inputs`). */ + inputs?: CatalogBlock['inputs'] +} + +export interface CatalogTriggerEntry + extends Omit, + CatalogOutputsEntry { + subBlocks: Array +} + +/** + * The parts of one block's expanded form that the core shard leaves to its docs shard: nothing in + * canonicalize, compile, print or SDK codegen reads them. + */ +export interface CatalogBlockDocs { + /** The block's `inputs` (no consumer but documentation). */ + inputs?: CatalogBlock['inputs'] + /** + * Option labels by expanded subBlock index, aligned with that subBlock's `options`. Only the + * `operation` dropdown keeps labels in the core shard (codegen documents each operation method + * with its label); every other label is display text. + */ + optionLabels?: Record +} + export interface BlockCatalog { catalogVersion: 1 /** Content hash of the core shard; the ETag and `lock.catalogHash`. */ hash: string /** The SDK major this catalog serves (`// @sim-sdk N`). */ sdkMajor: number - blocks: Record - triggers: Record + blocks: Record + triggers: Record + /** Interned subBlocks, referenced by `CatalogSharedSubBlockRef`. */ + subBlocks?: CatalogSubBlockEntry[] + /** Interned condition value lists, referenced by `CatalogListRef`. */ + lists?: Array> + /** Interned output records, referenced by `sharedOutputs` and `sharedProperties`. */ + outputs?: Array> /** * Generated builder methods by dotted SDK path. A stored type with no entry here (legacy, * unknown, or `custom_block_*` with no generated method) prints and compiles through the @@ -290,3 +405,13 @@ export interface BlockCatalog { /** Present when the catalog includes an organization's custom blocks. */ scope?: { organizationId: string } } + +/** + * A catalog with every block and trigger expanded: the shape the projection builds and every + * consumer reads (through `catalog/view.ts`). The core shard is its compact encoding. + */ +export interface ExpandedBlockCatalog + extends Omit { + blocks: Record + triggers: Record +} diff --git a/packages/workflow-code/src/catalog/view.ts b/packages/workflow-code/src/catalog/view.ts new file mode 100644 index 00000000000..e827bb062d0 --- /dev/null +++ b/packages/workflow-code/src/catalog/view.ts @@ -0,0 +1,261 @@ +/** + * The only reader of a served `BlockCatalog`'s layout. Every consumer (canonicalize, compile, the + * printer, SDK codegen, the proof harness) asks these accessors for a block, trigger, builder or + * tool and gets the expanded shape (`CatalogBlock`, `CatalogTrigger`), so the core shard's + * encoding (`compact.ts`) can change without touching a consumer. + * + * Expansion is lazy and memoized per catalog object: compiling one workflow expands only the + * blocks it names, and a catalog is immutable once served, so a memo never goes stale. + */ + +import type { + BlockCatalog, + CatalogBlock, + CatalogBlockDocs, + CatalogBuilder, + CatalogCondition, + CatalogConditionEntry, + CatalogListRef, + CatalogOutput, + CatalogOutputEntry, + CatalogSharedSubBlockRef, + CatalogSubBlock, + CatalogSubBlockEntry, + CatalogTool, + CatalogTrigger, + CatalogTriggerSubBlocksRef, + ExpandedBlockCatalog, + SubBlockConditionClause, +} from './types' + +/** Docs shards by block type, merged into an expansion that wants display text. */ +export type CatalogDocsReader = (type: string) => CatalogBlockDocs | undefined + +interface CatalogMemo { + blocks: Map + triggers: Map +} + +const memos = new WeakMap() + +function memoOf(catalog: BlockCatalog): CatalogMemo { + let memo = memos.get(catalog) + if (!memo) { + memo = { blocks: new Map(), triggers: new Map() } + memos.set(catalog, memo) + } + return memo +} + +function isListRef(value: unknown): value is CatalogListRef { + return typeof value === 'object' && value !== null && !Array.isArray(value) && 'list' in value +} + +function listAt(catalog: BlockCatalog, ref: CatalogListRef): Array { + const list = catalog.lists?.[ref.list] + if (!list) throw new Error(`Block catalog list ${ref.list} does not exist`) + return [...list] +} + +function expandCondition(catalog: BlockCatalog, entry: CatalogConditionEntry): CatalogCondition { + if ('opaque' in entry) return entry + const clause: SubBlockConditionClause = { + field: entry.field, + value: isListRef(entry.value) ? listAt(catalog, entry.value) : entry.value, + } + if (entry.not !== undefined) clause.not = entry.not + if (entry.and) { + const and: NonNullable = { + field: entry.and.field, + value: isListRef(entry.and.value) ? listAt(catalog, entry.and.value) : entry.and.value, + } + if (entry.and.not !== undefined) and.not = entry.and.not + clause.and = and + } + return clause +} + +function sharedAt(catalog: BlockCatalog, ref: CatalogSharedSubBlockRef): CatalogSubBlockEntry { + const entry = catalog.subBlocks?.[ref.shared] + if (!entry) throw new Error(`Block catalog subBlock ${ref.shared} does not exist`) + return entry +} + +function expandSubBlock( + catalog: BlockCatalog, + ref: CatalogSubBlockEntry | CatalogSharedSubBlockRef, + labels: readonly string[] | undefined +): CatalogSubBlock { + const entry = 'shared' in ref ? sharedAt(catalog, ref) : ref + const { condition, required, options, ...rest } = entry + const subBlock: CatalogSubBlock = { ...rest } + if (condition !== undefined) subBlock.condition = expandCondition(catalog, condition) + if (required !== undefined) { + subBlock.required = + typeof required === 'boolean' ? required : expandCondition(catalog, required) + } + if (options !== undefined) { + subBlock.options = Array.isArray(options) + ? options.map((option, index) => ({ + id: option.id, + label: labels?.[index] ?? option.label ?? option.id, + })) + : options + } + return subBlock +} + +function triggerRun(catalog: BlockCatalog, ref: CatalogTriggerSubBlocksRef): CatalogSubBlock[] { + const trigger = Object.hasOwn(catalog.triggers, ref.trigger) + ? catalog.triggers[ref.trigger] + : undefined + const run = trigger?.subBlocks.slice(ref.start, ref.start + ref.count) ?? [] + if (run.length !== ref.count) { + throw new Error( + `Block catalog trigger run ${ref.trigger}[${ref.start}+${ref.count}] is out of range` + ) + } + return run.map((entry) => ({ ...expandSubBlock(catalog, entry, undefined), surface: 'trigger' })) +} + +function sharedOutputsAt(catalog: BlockCatalog, index: number): Record { + const record = catalog.outputs?.[index] + if (!record) throw new Error(`Block catalog outputs ${index} does not exist`) + return record +} + +function expandOutput(catalog: BlockCatalog, entry: CatalogOutputEntry): CatalogOutput { + const { properties, sharedProperties, items, ...rest } = entry + const output: CatalogOutput = { ...rest } + if (sharedProperties !== undefined) { + output.properties = expandOutputRecord(catalog, sharedOutputsAt(catalog, sharedProperties)) + } else if (properties) { + output.properties = expandOutputRecord(catalog, properties) + } + if (items) output.items = expandOutput(catalog, items) + return output +} + +function expandOutputRecord( + catalog: BlockCatalog, + record: Record +): Record { + const expanded: Record = {} + for (const [name, entry] of Object.entries(record)) expanded[name] = expandOutput(catalog, entry) + return expanded +} + +function expandOutputs( + catalog: BlockCatalog, + entry: { outputs?: Record; sharedOutputs?: number } +): Record { + if (entry.sharedOutputs !== undefined) { + return expandOutputRecord(catalog, sharedOutputsAt(catalog, entry.sharedOutputs)) + } + return expandOutputRecord(catalog, entry.outputs ?? {}) +} + +function expandBlock(catalog: BlockCatalog, type: string, docs?: CatalogBlockDocs): CatalogBlock { + const stored = catalog.blocks[type] + const { subBlocks: entries, inputs, outputs, sharedOutputs, ...rest } = stored + const subBlocks: CatalogSubBlock[] = [] + for (const entry of entries) { + if ('trigger' in entry) { + subBlocks.push(...triggerRun(catalog, entry)) + continue + } + subBlocks.push(expandSubBlock(catalog, entry, docs?.optionLabels?.[String(subBlocks.length)])) + } + return { + ...rest, + subBlocks, + inputs: inputs ?? docs?.inputs ?? {}, + outputs: expandOutputs(catalog, stored), + } +} + +function expandTrigger(catalog: BlockCatalog, id: string): CatalogTrigger { + const trigger = catalog.triggers[id] + const { subBlocks, outputs, sharedOutputs, ...rest } = trigger + return { + ...rest, + subBlocks: subBlocks.map((entry) => expandSubBlock(catalog, entry, undefined)), + outputs: expandOutputs(catalog, trigger), + } +} + +/** + * The expanded block of `type`, or `undefined` when the catalog does not serve it. Option labels + * and inputs kept in the docs shard are absent: labels read as their ids, inputs as `{}`. + */ +export function catalogBlock(catalog: BlockCatalog, type: string): CatalogBlock | undefined { + if (!Object.hasOwn(catalog.blocks, type)) return undefined + const memo = memoOf(catalog) + let block = memo.blocks.get(type) + if (!block) { + block = expandBlock(catalog, type) + memo.blocks.set(type, block) + } + return block +} + +/** Every block type the catalog serves, in catalog order. */ +export function catalogBlockTypes(catalog: BlockCatalog): string[] { + return Object.keys(catalog.blocks) +} + +/** The expanded trigger `id`, or `undefined` when the catalog does not serve it. */ +export function catalogTrigger(catalog: BlockCatalog, id: string): CatalogTrigger | undefined { + if (!Object.hasOwn(catalog.triggers, id)) return undefined + const memo = memoOf(catalog) + let trigger = memo.triggers.get(id) + if (!trigger) { + trigger = expandTrigger(catalog, id) + memo.triggers.set(id, trigger) + } + return trigger +} + +/** Every trigger id the catalog serves, in catalog order. */ +export function catalogTriggerIds(catalog: BlockCatalog): string[] { + return Object.keys(catalog.triggers) +} + +/** The builder at a dotted SDK path (`slack.sendMessage`), or `undefined`. */ +export function catalogBuilder(catalog: BlockCatalog, path: string): CatalogBuilder | undefined { + return Object.hasOwn(catalog.builders, path) ? catalog.builders[path] : undefined +} + +/** Every builder path, in catalog order. */ +export function catalogBuilderPaths(catalog: BlockCatalog): string[] { + return Object.keys(catalog.builders) +} + +/** The docs-shard tool `id` when the catalog carries tool docs, else `undefined`. */ +export function catalogTool(catalog: BlockCatalog, id: string): CatalogTool | undefined { + return catalog.tools && Object.hasOwn(catalog.tools, id) ? catalog.tools[id] : undefined +} + +/** + * The whole catalog in expanded form. With `docs`, each block's docs shard is merged back in, which + * reproduces the projection exactly (the core-shard equivalence property); without, it is what + * the per-block accessors return. + */ +export function expandBlockCatalog( + catalog: BlockCatalog, + docs?: CatalogDocsReader +): ExpandedBlockCatalog { + const { blocks, triggers, subBlocks, lists, outputs, ...rest } = catalog + const expandedBlocks: Record = {} + for (const type of Object.keys(blocks)) { + const blockDocs = docs?.(type) + expandedBlocks[type] = blockDocs + ? expandBlock(catalog, type, blockDocs) + : (catalogBlock(catalog, type) ?? expandBlock(catalog, type)) + } + const expandedTriggers: Record = {} + for (const id of Object.keys(triggers)) { + expandedTriggers[id] = catalogTrigger(catalog, id) ?? expandTrigger(catalog, id) + } + return { ...rest, blocks: expandedBlocks, triggers: expandedTriggers } +} diff --git a/packages/workflow-code/src/compile/edges.ts b/packages/workflow-code/src/compile/edges.ts index 08f178a79ae..253ed0b9f69 100644 --- a/packages/workflow-code/src/compile/edges.ts +++ b/packages/workflow-code/src/compile/edges.ts @@ -4,6 +4,7 @@ import { type WorkflowEdgeScopeBlock, } from '@sim/workflow-types/workflow' import { portKey } from '../anchors' +import { catalogBlock } from '../catalog/view' import type { AnchorKey, CanonicalBlock, CanonicalEdge, Port } from '../model' import { type BlockDecl, @@ -92,8 +93,8 @@ export class EdgeCollector { const source = this.blocks.get(from.key) const target = this.blocks.get(to.key) if (!source || !target) return false - const sourceCatalog = catalogBlockOf(from) ?? this.ctx.catalog.blocks[source.type] - const targetCatalog = catalogBlockOf(to) ?? this.ctx.catalog.blocks[target.type] + const sourceCatalog = catalogBlockOf(from) ?? catalogBlock(this.ctx.catalog, source.type) + const targetCatalog = catalogBlockOf(to) ?? catalogBlock(this.ctx.catalog, target.type) if (sourceCatalog?.graph.annotationOnly || targetCatalog?.graph.annotationOnly) { this.error('E_EDGE_NOTE', 'Notes cannot be wired.', node, 'Remove this edge.') return false diff --git a/packages/workflow-code/src/compile/scope.ts b/packages/workflow-code/src/compile/scope.ts index d209eb469b3..16095bcd86c 100644 --- a/packages/workflow-code/src/compile/scope.ts +++ b/packages/workflow-code/src/compile/scope.ts @@ -10,6 +10,7 @@ import { RESERVED_WORKFLOW_BLOCK_NAMES, } from '@sim/workflow-types/workflow' import { encodeAnchor } from '../anchors' +import { catalogBlock, catalogBuilder, catalogBuilderPaths } from '../catalog/view' import { GENERIC_BUILDER } from '../sdk' import type { ListOptions } from './comments' import { @@ -87,17 +88,15 @@ function classifyCall(ctx: CompileContext, scope: Scope, call: CallExpression): return { kind: 'builder', path: dotted, - builder: { kind: 'generic', type, block: ctx.catalog.blocks[type] }, + builder: { kind: 'generic', type, block: catalogBlock(ctx.catalog, type) }, } } if (path.rest.length === 0 && SDK_VALUE_FUNCTIONS.has(root)) return { kind: 'value' } - const builder = Object.hasOwn(ctx.catalog.builders, dotted) - ? ctx.catalog.builders[dotted] - : undefined + const builder = catalogBuilder(ctx.catalog, dotted) if (!builder) { const candidates = [ - ...Object.keys(ctx.catalog.builders), + ...catalogBuilderPaths(ctx.catalog), ...[...LOOP_METHODS].map((method) => `loop.${method}`), ...[...PARALLEL_METHODS].map((method) => `parallel.${method}`), ] @@ -119,7 +118,7 @@ function classifyCall(ctx: CompileContext, scope: Scope, call: CallExpression): path: dotted, type: builder.type, builder, - block: ctx.catalog.blocks[builder.type], + block: catalogBlock(ctx.catalog, builder.type), }, } } diff --git a/packages/workflow-code/src/compile/tools.ts b/packages/workflow-code/src/compile/tools.ts index becbdd6e579..8c2034b0fed 100644 --- a/packages/workflow-code/src/compile/tools.ts +++ b/packages/workflow-code/src/compile/tools.ts @@ -1,5 +1,6 @@ import type { CallExpression, Node } from '@babel/types' import { isRecordLike, toRecordOrNull } from '@sim/utils/object' +import { catalogBuilder, catalogBuilderPaths } from '../catalog/view' import type { CanonicalTool, Json, ParamMode, ResourceNode, UnresolvedNode, Value } from '../model' import { type CompileContext, lookup, rangeOf } from './context' import { didYouMean, hintForNode } from './hints' @@ -74,7 +75,7 @@ function toolBuilderPath( if (toolIndex < 1 || toolIndex < segments.length - 2) return null segments.splice(toolIndex, 1) const builderPath = segments.join('.') - return Object.hasOwn(ctx.catalog.builders, builderPath) ? builderPath : null + return catalogBuilder(ctx.catalog, builderPath) ? builderPath : null } function compileToolCall( @@ -94,7 +95,7 @@ function compileToolCall( hint: didYouMean( [path.root, ...path.rest].filter((segment) => segment !== 'tool').join('.'), - Object.keys(ctx.catalog.builders) + catalogBuilderPaths(ctx.catalog) ) ?? 'Write namespace.tool.method(params, options), or raw(tool).', }), blockKey: site.decl.key, @@ -102,7 +103,8 @@ function compileToolCall( ) return null } - const builder = ctx.catalog.builders[builderPath] + const builder = catalogBuilder(ctx.catalog, builderPath) + if (!builder) return null const [paramsNode, optionsNode, ...extra] = call.arguments for (const node of extra) unsupported(ctx, node, 'Too many arguments.', 'Write tool(params, options).', site) diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index 7d63baf4054..29f716b6a9e 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -31,26 +31,50 @@ export type { SourceFingerprintFn, } from './api' export { canonicalize } from './canonicalize' +export { type CompactedBlockCatalog, compactBlockCatalog } from './catalog/compact' export type { BlockCatalog, CatalogBlock, + CatalogBlockDocs, + CatalogBlockEntry, CatalogBlockGraph, CatalogBlockLifecycle, CatalogBuilder, CatalogCondition, + CatalogConditionClauseEntry, + CatalogConditionEntry, CatalogDynamicOutputs, CatalogLegacyId, + CatalogListRef, CatalogOption, + CatalogOptionEntry, CatalogOutput, + CatalogOutputEntry, + CatalogSharedSubBlockRef, CatalogStructuredKind, CatalogSubBlock, + CatalogSubBlockEntry, CatalogTool, CatalogTrigger, + CatalogTriggerEntry, + CatalogTriggerSubBlocksRef, CatalogValueKind, + ExpandedBlockCatalog, OpaqueMarker, ParamStorage, SubBlockConditionClause, } from './catalog/types' +export { + type CatalogDocsReader, + catalogBlock, + catalogBlockTypes, + catalogBuilder, + catalogBuilderPaths, + catalogTool, + catalogTrigger, + catalogTriggerIds, + expandBlockCatalog, +} from './catalog/view' export { type CodeFileBijection, type CodeFileLanguage, diff --git a/packages/workflow-code/src/print/determinism.test.ts b/packages/workflow-code/src/print/determinism.test.ts index 0d09b20eb77..e64e5ab95ac 100644 --- a/packages/workflow-code/src/print/determinism.test.ts +++ b/packages/workflow-code/src/print/determinism.test.ts @@ -7,6 +7,7 @@ import { describe, expect, it } from 'vitest' import type { LockHints } from '../api' +import { catalogBlock } from '../catalog/view' import type { CanonicalWorkflow } from '../model' import { cases } from './__fixtures__/cases' import { catalog } from './__fixtures__/catalog' @@ -47,7 +48,7 @@ const EDITABLE_TYPES = new Set(['short-input', 'long-input', 'combobox']) function editableParams(workflow: CanonicalWorkflow): Array<[string, string]> { const pairs: Array<[string, string]> = [] for (const block of Object.values(workflow.blocks)) { - const subBlocks = catalog.blocks[block.type]?.subBlocks ?? [] + const subBlocks = catalogBlock(catalog, block.type)?.subBlocks ?? [] for (const [id, param] of Object.entries(block.params)) { if (param.kind !== 'value' || typeof param.value !== 'string') continue if (!/^[\w .:/-]+$/.test(param.value)) continue diff --git a/packages/workflow-code/src/print/printer.ts b/packages/workflow-code/src/print/printer.ts index 2eec0c2783c..ddad1a98008 100644 --- a/packages/workflow-code/src/print/printer.ts +++ b/packages/workflow-code/src/print/printer.ts @@ -9,6 +9,11 @@ import { compareStrings } from '@sim/utils/string' import { portKey } from '../anchors' import type { LockHintBlock, LockHints, PrintInput, PrintResult, PrintWorkflowFn } from '../api' import type { BlockCatalog, CatalogBlock, CatalogBuilder, CatalogSubBlock } from '../catalog/types' +import { + catalogBlock as catalogBlockOf, + catalogBuilder, + catalogBuilderPaths, +} from '../catalog/view' import { type CodeFileCodec, type CodeFileLanguage, codeFileCodec } from '../code-files' import type { PrintDiagnosticCode } from '../diagnostics/codes' import type { Diagnostic } from '../diagnostics/frame' @@ -74,13 +79,22 @@ function hasValue(block: CanonicalBlock, id: string): boolean { * whose trigger mode differs is used only when none matches, and the caller then prints * `triggerMode` in the meta. */ +function catalogBuilderEntries(catalog: BlockCatalog): Array<[string, CatalogBuilder]> { + const entries: Array<[string, CatalogBuilder]> = [] + for (const path of catalogBuilderPaths(catalog)) { + const builder = catalogBuilder(catalog, path) + if (builder) entries.push([path, builder]) + } + return entries +} + function findBuilder( catalog: BlockCatalog, type: string, triggerMode: boolean, read: (id: string) => string | undefined ): { path: string; builder: CatalogBuilder } | null { - const candidates = Object.entries(catalog.builders) + const candidates = catalogBuilderEntries(catalog) .filter(([, builder]) => { if (builder.type !== type) return false if (builder.operation !== undefined && read('operation') !== builder.operation) return false @@ -271,7 +285,7 @@ class WorkflowPrinter { } private isTrigger(block: CanonicalBlock): boolean { - return block.triggerMode || this.catalog.blocks[block.type]?.category === 'triggers' + return block.triggerMode || catalogBlockOf(this.catalog, block.type)?.category === 'triggers' } private layout(): void { @@ -321,7 +335,7 @@ class WorkflowPrinter { visit(null) const reserved = new Set() - for (const path of Object.keys(this.catalog.builders)) { + for (const path of catalogBuilderPaths(this.catalog)) { const [namespace] = path.split('.') if (namespace) reserved.add(namespace) } @@ -489,7 +503,7 @@ class WorkflowPrinter { private printTools(block: CanonicalBlock, tools: CanonicalTool[]): PrintedValue { const elements = tools.map((tool) => { - const catalogBlock = this.catalog.blocks[tool.type] + const catalogBlock = catalogBlockOf(this.catalog, tool.type) const found = findBuilder(this.catalog, tool.type, false, (id) => { if (id === 'operation') return tool.operation const value = tool.params[id] @@ -671,7 +685,8 @@ class WorkflowPrinter { if (sb.valueKind === 'none' || sb.valueKind === 'branches' || sb.valueKind === 'tools') return false if (block.triggerMode) return sb.mode === 'trigger' - if (sb.mode === 'trigger') return this.catalog.blocks[block.type]?.category === 'triggers' + if (sb.mode === 'trigger') + return catalogBlockOf(this.catalog, block.type)?.category === 'triggers' return sb.mode === undefined || sb.mode === 'basic' || sb.mode === 'both' } @@ -757,7 +772,7 @@ class WorkflowPrinter { private blockCall(block: CanonicalBlock): Expr { if (block.subflow) return this.containerCall(block) - const catalogBlock = this.catalog.blocks[block.type] + const catalogBlock = catalogBlockOf(this.catalog, block.type) const found = findBuilder(this.catalog, block.type, block.triggerMode, (id) => stringParam(block, id) ) @@ -865,7 +880,7 @@ class WorkflowPrinter { field('distribution', 'collection', spec.distribution, type !== 'count', 't') field('batchSize', 'batchSize', spec.batchSize, true, 't') } - const catalogBlock = this.catalog.blocks[block.type] + const catalogBlock = catalogBlockOf(this.catalog, block.type) const { params, inactive: inactiveParams, @@ -935,7 +950,7 @@ class WorkflowPrinter { const isContainer = block.subflow !== undefined const hasBranches = block.branches !== undefined || - this.catalog.blocks[block.type]?.graph.branches !== undefined + catalogBlockOf(this.catalog, block.type)?.graph.branches !== undefined const groups = new Map() for (const edge of edges) { const key = portKey(edge.port) diff --git a/packages/workflow-sdk/src/codegen/generate.ts b/packages/workflow-sdk/src/codegen/generate.ts index cfbaa92d2a1..366b2bbcfbb 100644 --- a/packages/workflow-sdk/src/codegen/generate.ts +++ b/packages/workflow-sdk/src/codegen/generate.ts @@ -12,7 +12,15 @@ */ import { compareStrings } from '@sim/utils/string' -import type { BlockCatalog, CatalogBlock, CatalogOutput, CatalogSubBlock } from '@sim/workflow-code' +import { + type BlockCatalog, + type CatalogBlock, + type CatalogOutput, + type CatalogSubBlock, + catalogBlock, + catalogBlockTypes, + catalogTrigger, +} from '@sim/workflow-code' import { indentLines, jsdoc, literal, pascal, propertyKey, quote, union } from './emit' import { mapSubBlock } from './map-subblock' import { type BuilderEntry, builderEntries, TOOL_NAMESPACE } from './names' @@ -213,13 +221,13 @@ function outputSource( entry: BuilderEntry ): Record { const triggerId = entry.builder.fixed?.selectedTriggerId - if (triggerId && catalog.triggers[triggerId]) return catalog.triggers[triggerId].outputs + const pinned = triggerId ? catalogTrigger(catalog, triggerId) : undefined + if (pinned) return pinned.outputs const isTrigger = entry.builder.triggerMode === true || block.category === 'triggers' const available = block.triggers?.available ?? [] - if (isTrigger && available.length === 1 && catalog.triggers[available[0]]) { - return catalog.triggers[available[0]].outputs - } - return block.outputs + const only = + isTrigger && available.length === 1 ? catalogTrigger(catalog, available[0]) : undefined + return only ? only.outputs : block.outputs } function operationLabel(block: CatalogBlock, operation: string): string | undefined { @@ -329,7 +337,10 @@ function buildParams( } function builderTypes(catalog: BlockCatalog, entry: BuilderEntry): BuilderTypes { - const block = catalog.blocks[entry.builder.type] + const block = catalogBlock(catalog, entry.builder.type) + if (!block) { + throw new Error(`sdk codegen: builder \`${entry.key}\` names unknown block type`) + } const outputs = outputSource(catalog, block, entry) const spec = block.dynamicOutputs ?? null const plan = spec && !entry.special ? dynamicOutputPlan(spec, outputs) : null @@ -553,8 +564,8 @@ function generateBlockFiles( function modelIds(catalog: BlockCatalog): string[] { const ids = new Set() - for (const block of Object.values(catalog.blocks)) { - for (const subBlock of block.subBlocks) { + for (const type of catalogBlockTypes(catalog)) { + for (const subBlock of catalogBlock(catalog, type)?.subBlocks ?? []) { if (subBlock.id !== 'model' || subBlock.type !== 'combobox') continue if (!Array.isArray(subBlock.options)) continue for (const option of subBlock.options) ids.add(option.id) diff --git a/packages/workflow-sdk/src/codegen/names.ts b/packages/workflow-sdk/src/codegen/names.ts index d2564932d0c..48f23f2cc15 100644 --- a/packages/workflow-sdk/src/codegen/names.ts +++ b/packages/workflow-sdk/src/codegen/names.ts @@ -4,7 +4,14 @@ * map, splits each dotted path into namespaces, and names the generated type aliases after it. */ -import { type BlockCatalog, type CatalogBuilder, SDK_CORE_EXPORTS } from '@sim/workflow-code' +import { + type BlockCatalog, + type CatalogBuilder, + catalogBlock, + catalogBuilder, + catalogBuilderPaths, + SDK_CORE_EXPORTS, +} from '@sim/workflow-code' import { isIdentifier, pascal, RESERVED_WORDS } from './emit' /** @@ -75,7 +82,7 @@ function compareKeys(a: string, b: string): number { * `tool` segment that would hide the tool form, or a builder whose block type is missing. */ export function builderEntries(catalog: BlockCatalog): BuilderEntry[] { - const keys = Object.keys(catalog.builders).sort(compareKeys) + const keys = catalogBuilderPaths(catalog).sort(compareKeys) const entries: BuilderEntry[] = [] const namespaces = new Set() for (const key of keys) { @@ -83,7 +90,8 @@ export function builderEntries(catalog: BlockCatalog): BuilderEntry[] { for (let depth = 1; depth < path.length; depth++) namespaces.add(path.slice(0, depth).join('.')) } for (const key of keys) { - const builder = catalog.builders[key] + const builder = catalogBuilder(catalog, key) + if (!builder) continue const path = key.split('.') for (const segment of path) { if (!isIdentifier(segment) || RESERVED_WORDS.has(segment)) { @@ -92,7 +100,7 @@ export function builderEntries(catalog: BlockCatalog): BuilderEntry[] { ) } } - if (!catalog.blocks[builder.type]) { + if (!catalogBlock(catalog, builder.type)) { throw new Error( `sdk codegen: builder \`${key}\` names unknown block type \`${builder.type}\`` ) diff --git a/packages/workflow-sdk/test/typecheck-project.ts b/packages/workflow-sdk/test/typecheck-project.ts index 23201d240b4..447ba8f62de 100644 --- a/packages/workflow-sdk/test/typecheck-project.ts +++ b/packages/workflow-sdk/test/typecheck-project.ts @@ -1,14 +1,15 @@ import { execFileSync } from 'node:child_process' import { mkdirSync, readFileSync, writeFileSync } from 'node:fs' import path from 'node:path' -import type { BlockCatalog } from '@sim/workflow-code' +import type { ExpandedBlockCatalog } from '@sim/workflow-code' import { generateSdkTypes, generateWorkspaceTypes, type SdkTypeFile } from '../src/codegen' import { FIXTURE_WORKSPACE } from './fixtures/workspace' const testRoot = import.meta.dirname const packageRoot = path.resolve(testRoot, '..') -export function loadFixtureCatalog(): BlockCatalog { +/** The fixture catalog, written in expanded form (a valid core shard). */ +export function loadFixtureCatalog(): ExpandedBlockCatalog { return JSON.parse(readFileSync(path.join(testRoot, 'fixtures', 'catalog.json'), 'utf8')) } From 827ff9a00ec5920c3b2a4a0eb7bdc3f243863c96 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:31:52 -0800 Subject: [PATCH 068/428] test(workflows): prove compile-catalog workflow ownership against real Postgres The route tests claimed workflow ownership through a mocked use case. The new integration suite runs readWorkflowCodeCatalog against seeded rows: a workflow in another workspace the caller also administers, and an archived workflow, both answer not_found, and the caller's active workflow is read. It writes WORKFLOW_CODE_CATALOG_REPORT_PATH. The two mock-only route cases are removed. --- .../[workspaceId]/block-catalog/route.test.ts | 21 --- .../catalog/read-block-catalog.integration.ts | 135 ++++++++++++++++++ 2 files changed, 135 insertions(+), 21 deletions(-) create mode 100644 apps/sim/lib/workflows/code/catalog/read-block-catalog.integration.ts diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.test.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.test.ts index 059b0a5d660..b3c7cda7fba 100644 --- a/apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.test.ts +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.test.ts @@ -19,7 +19,6 @@ vi.mock('@/lib/workflows/code/catalog/read-block-catalog', () => ({ }, })) -import { OrchestrationError } from '@/lib/core/orchestration/types' import { GET } from '@/app/api/v2/workspaces/[workspaceId]/block-catalog/route' const WORKSPACE_ID = '11111111-2222-4333-8444-555555555555' @@ -113,30 +112,10 @@ describe('GET /api/v2/workspaces/{workspaceId}/block-catalog', () => { expect((await response.json()).data.hash).toBe(HASH) }) - it('asks for the per-workflow compile catalog only when workflowId is given', async () => { - await GET(request('?workflowId=wf-1'), context) - await GET(request(), context) - - expect(mocks.read.mock.calls[0][0].input).toEqual({ - workspaceId: WORKSPACE_ID, - workflowId: 'wf-1', - }) - expect(mocks.read.mock.calls[1][0].input).toEqual({ workspaceId: WORKSPACE_ID }) - }) - it('rejects an unknown query parameter before reading the catalog', async () => { const response = await GET(request('?shard=docs'), context) expect(response.status).toBe(400) expect(mocks.read).not.toHaveBeenCalled() }) - - it('answers 404 for a workflow outside the workspace', async () => { - mocks.read.mockRejectedValue(new OrchestrationError('not_found', 'Workflow not found')) - - const response = await GET(request('?workflowId=elsewhere'), context) - - expect(response.status).toBe(404) - expect((await response.json()).error.code).toBe('NOT_FOUND') - }) }) diff --git a/apps/sim/lib/workflows/code/catalog/read-block-catalog.integration.ts b/apps/sim/lib/workflows/code/catalog/read-block-catalog.integration.ts new file mode 100644 index 00000000000..6a5474a5348 --- /dev/null +++ b/apps/sim/lib/workflows/code/catalog/read-block-catalog.integration.ts @@ -0,0 +1,135 @@ +import { mkdir, writeFile } from 'node:fs/promises' +import { dirname, resolve } from 'node:path' +import { db } from '@sim/db' +import { permissions, user, workflow, workflowBlocks, workspace } from '@sim/db/schema' +import { deleteWorkspaceFixture, insertWorkspaceFixture } from '@sim/db/testing/workspace-fixtures' +import { createSessionPrincipal } from '@sim/testing/factories/principal.factory' +import { featureFlagsMock, featureFlagsMockFns } from '@sim/testing/mocks/feature-flags.mock' +import { getErrorMessage } from '@sim/utils/errors' +import { generateId } from '@sim/utils/id' +import { eq, inArray } from 'drizzle-orm' +import { afterAll, beforeAll, beforeEach, expect, it, vi } from 'vitest' +import { readWorkflowCodeCatalog } from '@/lib/workflows/code/catalog/read-block-catalog' + +vi.mock('@/lib/core/config/feature-flags', () => featureFlagsMock) + +/** + * The per-workflow compile catalog reads a workflow's stored block types, so the workflow id is + * an input the caller controls. Against real Postgres: a workflow that belongs to another + * workspace (one the caller also administers, so only the workspace binding can refuse it) and an + * archived workflow both answer as not found, while the caller's own active workflow is read. + */ + +const ownerId = generateId() +const workspaceId = generateId() +const otherWorkspaceId = generateId() +const activeWorkflowId = generateId() +const archivedWorkflowId = generateId() +const foreignWorkflowId = generateId() +const principal = createSessionPrincipal({ userId: ownerId }) +const checks: { name: string; status: string; durationMs: number; error?: string }[] = [] + +function check(name: string, run: () => Promise) { + it(name, async () => { + const started = performance.now() + try { + await run() + checks.push({ name, status: 'passed', durationMs: performance.now() - started }) + } catch (error) { + checks.push({ + name, + status: 'failed', + durationMs: performance.now() - started, + error: getErrorMessage(error), + }) + throw error + } + }) +} + +function read(workflowId: string) { + return readWorkflowCodeCatalog.execute({ principal, input: { workspaceId, workflowId } }) +} + +beforeAll(async () => { + const now = new Date() + await db.insert(user).values({ + id: ownerId, + name: 'Code catalog fixture', + email: `${ownerId}@code-catalog.invalid`, + emailVerified: true, + createdAt: now, + updatedAt: now, + }) + await insertWorkspaceFixture( + db, + [workspaceId, otherWorkspaceId].map((id) => ({ + id, + name: 'Code catalog', + ownerId, + billedAccountUserId: ownerId, + })) + ) + await db.insert(permissions).values( + [workspaceId, otherWorkspaceId].map((entityId) => ({ + id: generateId(), + entityType: 'workspace' as const, + entityId, + userId: ownerId, + permissionType: 'admin' as const, + })) + ) + await db.insert(workflow).values( + [ + { id: activeWorkflowId, workspaceId, archivedAt: null }, + { id: archivedWorkflowId, workspaceId, archivedAt: now }, + { id: foreignWorkflowId, workspaceId: otherWorkspaceId, archivedAt: null }, + ].map((row) => ({ + ...row, + userId: ownerId, + name: row.id, + lastSynced: now, + createdAt: now, + updatedAt: now, + })) + ) + await db.insert(workflowBlocks).values( + [activeWorkflowId, archivedWorkflowId, foreignWorkflowId].map((workflowId) => ({ + id: generateId(), + workflowId, + type: 'function', + name: 'Function 1', + positionX: '0', + positionY: '0', + })) + ) +}) + +beforeEach(() => { + featureFlagsMockFns.mockIsFeatureEnabled.mockImplementation( + async (flag: string) => flag === 'workflow-code' + ) +}) + +afterAll(async () => { + const reportPath = + process.env.WORKFLOW_CODE_CATALOG_REPORT_PATH ?? + resolve('test-results/workflow-code-catalog.json') + await mkdir(dirname(reportPath), { recursive: true }) + await writeFile(reportPath, JSON.stringify({ checks }, null, 2)) + await deleteWorkspaceFixture(db, inArray(workspace.id, [workspaceId, otherWorkspaceId])) + await db.delete(user).where(eq(user.id, ownerId)) +}) + +check("reads the compile catalog for the caller's own active workflow", async () => { + const catalog = await read(activeWorkflowId) + expect(Object.hasOwn(catalog.blocks, 'function')).toBe(true) +}) + +check('answers not found for a workflow that belongs to another workspace', async () => { + await expect(read(foreignWorkflowId)).rejects.toMatchObject({ code: 'not_found' }) +}) + +check('answers not found for an archived workflow', async () => { + await expect(read(archivedWorkflowId)).rejects.toMatchObject({ code: 'not_found' }) +}) From a2ede174cc61a5a16f153bc3c2d45291973d55a6 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:31:54 -0800 Subject: [PATCH 069/428] feat(workflows): serve the compact block catalog core shard buildBlockCatalog now projects the expanded catalog (projectBlockCatalog) and encodes it with compactBlockCatalog; the hash is still SHA-256 over the stable core-shard bytes, so the v2 block-catalog ETag semantics are unchanged. Docs shards carry the moved option labels and inputs. The v2 response schema, OpenAPI document and CLI types follow. --- apps/docs/openapi-v2-resources.json | 2297 +++++++++++------ .../sim/lib/api/contracts/v2/block-catalog.ts | 78 +- apps/sim/lib/workflows/code/catalog/build.ts | 51 +- packages/sim-cli/src/generated/v2-api.ts | 590 +++-- 4 files changed, 2072 insertions(+), 944 deletions(-) diff --git a/apps/docs/openapi-v2-resources.json b/apps/docs/openapi-v2-resources.json index 48be313cbe3..fc827f84ac8 100644 --- a/apps/docs/openapi-v2-resources.json +++ b/apps/docs/openapi-v2-resources.json @@ -29784,169 +29784,37 @@ "subBlocks": { "type": "array", "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Field id; the param name unless the field is in a basic/advanced pair." - }, - "type": { - "type": "string", - "description": "Editor control type, e.g. `short-input`." - }, - "title": { - "description": "Display title.", - "type": "string" - }, - "mode": { - "description": "Which editor mode shows the field.", - "type": "string", - "enum": ["basic", "advanced", "both", "trigger", "trigger-advanced"] - }, - "canonicalParamId": { - "description": "Shared param name of a basic/advanced pair.", - "type": "string" - }, - "surface": { - "description": "Whether this declaration belongs to action or trigger mode.", - "type": "string", - "enum": ["action", "trigger"] - }, - "condition": { - "anyOf": [ - { - "type": "object", - "properties": { - "field": { - "type": "string", - "description": "Sibling field id whose value decides the condition." - }, - "value": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } - } - ], - "description": "Value, or set of accepted values, the named field must hold." - }, - "not": { - "description": "Invert the match.", - "type": "boolean" - }, - "and": { - "description": "A second clause that must hold as well.", - "type": "object", - "properties": { - "field": { - "type": "string", - "description": "Second field id." - }, - "value": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } - } - ], - "description": "Value, or set of accepted values, the named field must hold." - }, - "not": { - "description": "Invert the second match.", - "type": "boolean" - } - }, - "required": ["field"], - "additionalProperties": false - } - }, - "required": ["field", "value"], - "additionalProperties": false, - "description": "Holds when `field` holds `value`." - }, - { - "type": "object", - "properties": { - "opaque": { - "type": "boolean", - "const": true, - "description": "Always true." - } - }, - "required": ["opaque"], - "additionalProperties": false, - "description": "A function the catalog could not evaluate to data." - } - ], - "description": "A condition clause, or `{ opaque: true }` (treat as possibly holding)." - }, - "visibleFor": { - "description": "Per operation id: whether an opaque condition can show this field.", + "anyOf": [ + { "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "boolean" - } - }, - "required": { - "description": "Whether a value is required, or the condition under which it is.", - "anyOf": [ - { - "type": "boolean" + "properties": { + "id": { + "type": "string", + "description": "Field id; the param name unless the field is in a basic/advanced pair." }, - { + "type": { + "type": "string", + "description": "Editor control type, e.g. `short-input`." + }, + "title": { + "description": "Display title.", + "type": "string" + }, + "mode": { + "description": "Which editor mode shows the field.", + "type": "string", + "enum": ["basic", "advanced", "both", "trigger", "trigger-advanced"] + }, + "canonicalParamId": { + "description": "Shared param name of a basic/advanced pair.", + "type": "string" + }, + "surface": { + "description": "Whether this declaration belongs to action or trigger mode.", + "type": "string", + "enum": ["action", "trigger"] + }, + "condition": { "anyOf": [ { "type": "object", @@ -29985,9 +29853,23 @@ } ] } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." } ], - "description": "Value, or set of accepted values, the named field must hold." + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." }, "not": { "description": "Invert the match.", @@ -30031,9 +29913,23 @@ } ] } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." } ], - "description": "Value, or set of accepted values, the named field must hold." + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." }, "not": { "description": "Invert the second match.", @@ -30063,220 +29959,428 @@ } ], "description": "A condition clause, or `{ opaque: true }` (treat as possibly holding)." - } - ] - }, - "dependsOn": { - "description": "Editor clearing and fetch ordering hints; never visibility.", - "type": "object", - "properties": { - "all": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Fields that must all hold values." }, - "any": { - "type": "array", - "items": { + "visibleFor": { + "description": "Per operation id: whether an opaque condition can show this field.", + "type": "object", + "propertyNames": { "type": "string" }, - "description": "Fields of which one must hold a value." - } - }, - "required": ["all", "any"], - "additionalProperties": false - }, - "defaultValue": { - "description": "Editor default value (any JSON)." - }, - "valueDefault": { - "description": "The registry value thunk, evaluated where it is constant.", - "anyOf": [ - { - "type": "object", - "properties": { - "computed": { - "type": "boolean", - "const": true, - "description": "Always true." + "additionalProperties": { + "type": "boolean" + } + }, + "required": { + "description": "Whether a value is required, or the condition under which it is.", + "anyOf": [ + { + "type": "boolean" + }, + { + "anyOf": [ + { + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Sibling field id whose value decides the condition." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." + } + ], + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." + }, + "not": { + "description": "Invert the match.", + "type": "boolean" + }, + "and": { + "description": "A second clause that must hold as well.", + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Second field id." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." + } + ], + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." + }, + "not": { + "description": "Invert the second match.", + "type": "boolean" + } + }, + "required": ["field"], + "additionalProperties": false + } + }, + "required": ["field", "value"], + "additionalProperties": false, + "description": "Holds when `field` holds `value`." + }, + { + "type": "object", + "properties": { + "opaque": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["opaque"], + "additionalProperties": false, + "description": "A function the catalog could not evaluate to data." + } + ], + "description": "A condition clause, or `{ opaque: true }` (treat as possibly holding)." } - }, - "required": ["computed"], - "additionalProperties": false, - "description": "A value thunk derived from other params." + ] }, - { + "dependsOn": { + "description": "Editor clearing and fetch ordering hints; never visibility.", "type": "object", "properties": { - "constant": { - "description": "The constant value (any JSON)." - } - }, - "required": ["constant"], - "additionalProperties": false, - "description": "A value thunk that always returns this." - } - ] - }, - "options": { - "description": "Selectable options.", - "anyOf": [ - { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Stored option id." + "all": { + "type": "array", + "items": { + "type": "string" }, - "label": { - "type": "string", - "description": "Display label." - } + "description": "Fields that must all hold values." }, - "required": ["id", "label"], - "additionalProperties": false, - "description": "One static option." - } - }, - { - "type": "object", - "properties": { - "dynamic": { - "type": "boolean", - "const": true, - "description": "Always true." + "any": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Fields of which one must hold a value." } }, - "required": ["dynamic"], - "additionalProperties": false, - "description": "Options fetched per workspace through `selectorKey`." + "required": ["all", "any"], + "additionalProperties": false }, - { - "type": "object", - "properties": { - "opaque": { - "type": "boolean", - "const": true, - "description": "Always true." + "defaultValue": { + "description": "Editor default value (any JSON)." + }, + "valueDefault": { + "description": "The registry value thunk, evaluated where it is constant.", + "anyOf": [ + { + "type": "object", + "properties": { + "computed": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["computed"], + "additionalProperties": false, + "description": "A value thunk derived from other params." + }, + { + "type": "object", + "properties": { + "constant": { + "description": "The constant value (any JSON)." + } + }, + "required": ["constant"], + "additionalProperties": false, + "description": "A value thunk that always returns this." } - }, - "required": ["opaque"], - "additionalProperties": false, - "description": "A function the catalog could not evaluate to data." + ] + }, + "options": { + "description": "Selectable options.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stored option id." + }, + "label": { + "description": "Display label; absent when it equals `id` or lives in the block docs shard.", + "type": "string" + } + }, + "required": ["id"], + "additionalProperties": false, + "description": "One static option." + } + }, + { + "type": "object", + "properties": { + "dynamic": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["dynamic"], + "additionalProperties": false, + "description": "Options fetched per workspace through `selectorKey`." + }, + { + "type": "object", + "properties": { + "opaque": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["opaque"], + "additionalProperties": false, + "description": "A function the catalog could not evaluate to data." + } + ] + }, + "hidden": { + "description": "Hidden from the editor.", + "type": "boolean" + }, + "readOnly": { + "description": "Display-only.", + "type": "boolean" + }, + "password": { + "description": "Holds a secret.", + "type": "boolean" + }, + "hideFromCopilot": { + "description": "Not offered to Copilot.", + "type": "boolean" + }, + "context": { + "description": "Only meaningful as an agent tool.", + "type": "string", + "const": "tool-input" + }, + "paramVisibility": { + "description": "Tool param visibility override.", + "type": "string" + }, + "emptyIsValid": { + "description": "An empty value satisfies `required`.", + "type": "boolean" + }, + "language": { + "description": "Code field language.", + "type": "string" + }, + "multiple": { + "description": "Accepts several files.", + "type": "boolean" + }, + "min": { + "description": "Minimum numeric value.", + "type": "number" + }, + "max": { + "description": "Maximum numeric value.", + "type": "number" + }, + "step": { + "description": "Slider increment.", + "type": "number" + }, + "integer": { + "description": "Integers only.", + "type": "boolean" + }, + "columns": { + "description": "Table column headers.", + "type": "array", + "items": { + "type": "string" + } + }, + "selectorKey": { + "description": "Selector that lists the options.", + "type": "string" + }, + "serviceId": { + "description": "OAuth service the field binds.", + "type": "string" + }, + "valueKind": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "array", + "object", + "json", + "code", + "branches", + "tools", + "resource", + "picked", + "upload", + "none" + ], + "description": "How a value for this field is written in source." + }, + "resourceKind": { + "description": "Workspace resource kind, for `resource` fields.", + "type": "string" + }, + "storage": { + "type": "string", + "enum": ["native", "json-string"], + "description": "Encoding a new value is stored with." + }, + "structured": { + "description": "Structured value the canonical model decodes.", + "type": "string", + "enum": [ + "tools", + "branches", + "tableRows", + "inputFormat", + "variables" + ] } - ] - }, - "hidden": { - "description": "Hidden from the editor.", - "type": "boolean" - }, - "readOnly": { - "description": "Display-only.", - "type": "boolean" - }, - "password": { - "description": "Holds a secret.", - "type": "boolean" - }, - "hideFromCopilot": { - "description": "Not offered to Copilot.", - "type": "boolean" - }, - "context": { - "description": "Only meaningful as an agent tool.", - "type": "string", - "const": "tool-input" - }, - "paramVisibility": { - "description": "Tool param visibility override.", - "type": "string" - }, - "emptyIsValid": { - "description": "An empty value satisfies `required`.", - "type": "boolean" - }, - "language": { - "description": "Code field language.", - "type": "string" - }, - "multiple": { - "description": "Accepts several files.", - "type": "boolean" - }, - "min": { - "description": "Minimum numeric value.", - "type": "number" - }, - "max": { - "description": "Maximum numeric value.", - "type": "number" - }, - "step": { - "description": "Slider increment.", - "type": "number" - }, - "integer": { - "description": "Integers only.", - "type": "boolean" - }, - "columns": { - "description": "Table column headers.", - "type": "array", - "items": { - "type": "string" - } - }, - "selectorKey": { - "description": "Selector that lists the options.", - "type": "string" - }, - "serviceId": { - "description": "OAuth service the field binds.", - "type": "string" - }, - "valueKind": { - "type": "string", - "enum": [ - "string", - "number", - "boolean", - "array", - "object", - "json", - "code", - "branches", - "tools", - "resource", - "picked", - "upload", - "none" - ], - "description": "How a value for this field is written in source." - }, - "resourceKind": { - "description": "Workspace resource kind, for `resource` fields.", - "type": "string" + }, + "required": ["id", "type", "valueKind", "storage"], + "additionalProperties": false, + "description": "One configuration field, in declared order; duplicate ids are kept with `surface`." }, - "storage": { - "type": "string", - "enum": ["native", "json-string"], - "description": "Encoding a new value is stored with." + { + "type": "object", + "properties": { + "shared": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `subBlocks` table." + } + }, + "required": ["shared"], + "additionalProperties": false, + "description": "A field stored once in the catalog `subBlocks` table." }, - "structured": { - "description": "Structured value the canonical model decodes.", - "type": "string", - "enum": ["tools", "branches", "tableRows", "inputFormat", "variables"] + { + "type": "object", + "properties": { + "trigger": { + "type": "string", + "description": "Trigger id in the catalog `triggers` table." + }, + "start": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "First of that trigger’s fields in the run." + }, + "count": { + "type": "integer", + "exclusiveMinimum": 0, + "maximum": 9007199254740991, + "description": "How many consecutive fields the run holds." + } + }, + "required": ["trigger", "start", "count"], + "additionalProperties": false, + "description": "A run of a shared trigger’s fields, spliced in place, each with `surface: \"trigger\"`." } - }, - "required": ["id", "type", "valueKind", "storage"], - "additionalProperties": false, - "description": "One configuration field, in declared order; duplicate ids are kept with `surface`." + ] }, - "description": "Configuration fields in declared order." + "description": "Configuration fields in declared order, inline or by reference." }, "tools": { "type": "object", @@ -30299,6 +30403,7 @@ "description": "Tools the block calls." }, "inputs": { + "description": "Declared inputs by name; absent when empty or kept in the block docs shard.", "type": "object", "propertyNames": { "type": "string" @@ -30317,8 +30422,7 @@ "required": ["type"], "additionalProperties": false, "description": "One declared input." - }, - "description": "Declared inputs by name." + } }, "outputs": { "type": "object", @@ -30353,6 +30457,12 @@ "description": "A nested output, of this same shape." } }, + "sharedProperties": { + "description": "In place of `properties`: index of the nested outputs in the catalog `outputs`.", + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, "items": { "description": "Array element output, of this same shape." } @@ -30363,6 +30473,12 @@ }, "description": "Declared outputs by name." }, + "sharedOutputs": { + "description": "In place of `outputs`: index of the outputs in the catalog `outputs` table.", + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, "dynamicOutputs": { "description": "Present when outputs derive from a param at run time.", "type": "object", @@ -30500,16 +30616,7 @@ "additionalProperties": false } }, - "required": [ - "type", - "name", - "category", - "subBlocks", - "tools", - "inputs", - "outputs", - "graph" - ], + "required": ["type", "name", "category", "subBlocks", "tools", "graph"], "additionalProperties": false, "description": "One placeable block type." }, @@ -30546,88 +30653,44 @@ "subBlocks": { "type": "array", "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Field id; the param name unless the field is in a basic/advanced pair." - }, - "type": { - "type": "string", - "description": "Editor control type, e.g. `short-input`." - }, - "title": { - "description": "Display title.", - "type": "string" - }, - "mode": { - "description": "Which editor mode shows the field.", - "type": "string", - "enum": ["basic", "advanced", "both", "trigger", "trigger-advanced"] - }, - "canonicalParamId": { - "description": "Shared param name of a basic/advanced pair.", - "type": "string" - }, - "surface": { - "description": "Whether this declaration belongs to action or trigger mode.", - "type": "string", - "enum": ["action", "trigger"] - }, - "condition": { - "anyOf": [ - { - "type": "object", - "properties": { - "field": { - "type": "string", - "description": "Sibling field id whose value decides the condition." - }, - "value": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } - } - ], - "description": "Value, or set of accepted values, the named field must hold." - }, - "not": { - "description": "Invert the match.", - "type": "boolean" - }, - "and": { - "description": "A second clause that must hold as well.", + "anyOf": [ + { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Field id; the param name unless the field is in a basic/advanced pair." + }, + "type": { + "type": "string", + "description": "Editor control type, e.g. `short-input`." + }, + "title": { + "description": "Display title.", + "type": "string" + }, + "mode": { + "description": "Which editor mode shows the field.", + "type": "string", + "enum": ["basic", "advanced", "both", "trigger", "trigger-advanced"] + }, + "canonicalParamId": { + "description": "Shared param name of a basic/advanced pair.", + "type": "string" + }, + "surface": { + "description": "Whether this declaration belongs to action or trigger mode.", + "type": "string", + "enum": ["action", "trigger"] + }, + "condition": { + "anyOf": [ + { "type": "object", "properties": { "field": { "type": "string", - "description": "Second field id." + "description": "Sibling field id whose value decides the condition." }, "value": { "anyOf": [ @@ -30659,100 +30722,26 @@ } ] } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." } ], - "description": "Value, or set of accepted values, the named field must hold." + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." }, "not": { - "description": "Invert the second match.", - "type": "boolean" - } - }, - "required": ["field"], - "additionalProperties": false - } - }, - "required": ["field", "value"], - "additionalProperties": false, - "description": "Holds when `field` holds `value`." - }, - { - "type": "object", - "properties": { - "opaque": { - "type": "boolean", - "const": true, - "description": "Always true." - } - }, - "required": ["opaque"], - "additionalProperties": false, - "description": "A function the catalog could not evaluate to data." - } - ], - "description": "A condition clause, or `{ opaque: true }` (treat as possibly holding)." - }, - "visibleFor": { - "description": "Per operation id: whether an opaque condition can show this field.", - "type": "object", - "propertyNames": { - "type": "string" - }, - "additionalProperties": { - "type": "boolean" - } - }, - "required": { - "description": "Whether a value is required, or the condition under which it is.", - "anyOf": [ - { - "type": "boolean" - }, - { - "anyOf": [ - { - "type": "object", - "properties": { - "field": { - "type": "string", - "description": "Sibling field id whose value decides the condition." - }, - "value": { - "anyOf": [ - { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - }, - { - "type": "array", - "items": { - "anyOf": [ - { - "type": "string" - }, - { - "type": "number" - }, - { - "type": "boolean" - } - ] - } - } - ], - "description": "Value, or set of accepted values, the named field must hold." - }, - "not": { - "description": "Invert the match.", + "description": "Invert the match.", "type": "boolean" }, "and": { @@ -30793,9 +30782,23 @@ } ] } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." } ], - "description": "Value, or set of accepted values, the named field must hold." + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." }, "not": { "description": "Invert the second match.", @@ -30825,220 +30828,404 @@ } ], "description": "A condition clause, or `{ opaque: true }` (treat as possibly holding)." - } - ] - }, - "dependsOn": { - "description": "Editor clearing and fetch ordering hints; never visibility.", - "type": "object", - "properties": { - "all": { - "type": "array", - "items": { - "type": "string" - }, - "description": "Fields that must all hold values." }, - "any": { - "type": "array", - "items": { + "visibleFor": { + "description": "Per operation id: whether an opaque condition can show this field.", + "type": "object", + "propertyNames": { "type": "string" }, - "description": "Fields of which one must hold a value." - } - }, - "required": ["all", "any"], - "additionalProperties": false - }, - "defaultValue": { - "description": "Editor default value (any JSON)." - }, - "valueDefault": { - "description": "The registry value thunk, evaluated where it is constant.", - "anyOf": [ - { - "type": "object", - "properties": { - "computed": { - "type": "boolean", - "const": true, - "description": "Always true." + "additionalProperties": { + "type": "boolean" + } + }, + "required": { + "description": "Whether a value is required, or the condition under which it is.", + "anyOf": [ + { + "type": "boolean" + }, + { + "anyOf": [ + { + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Sibling field id whose value decides the condition." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." + } + ], + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." + }, + "not": { + "description": "Invert the match.", + "type": "boolean" + }, + "and": { + "description": "A second clause that must hold as well.", + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Second field id." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." + } + ], + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." + }, + "not": { + "description": "Invert the second match.", + "type": "boolean" + } + }, + "required": ["field"], + "additionalProperties": false + } + }, + "required": ["field", "value"], + "additionalProperties": false, + "description": "Holds when `field` holds `value`." + }, + { + "type": "object", + "properties": { + "opaque": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["opaque"], + "additionalProperties": false, + "description": "A function the catalog could not evaluate to data." + } + ], + "description": "A condition clause, or `{ opaque: true }` (treat as possibly holding)." } - }, - "required": ["computed"], - "additionalProperties": false, - "description": "A value thunk derived from other params." + ] }, - { + "dependsOn": { + "description": "Editor clearing and fetch ordering hints; never visibility.", "type": "object", "properties": { - "constant": { - "description": "The constant value (any JSON)." + "all": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Fields that must all hold values." + }, + "any": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Fields of which one must hold a value." } }, - "required": ["constant"], - "additionalProperties": false, - "description": "A value thunk that always returns this." - } - ] - }, - "options": { - "description": "Selectable options.", - "anyOf": [ - { - "type": "array", - "items": { - "type": "object", - "properties": { - "id": { - "type": "string", - "description": "Stored option id." + "required": ["all", "any"], + "additionalProperties": false + }, + "defaultValue": { + "description": "Editor default value (any JSON)." + }, + "valueDefault": { + "description": "The registry value thunk, evaluated where it is constant.", + "anyOf": [ + { + "type": "object", + "properties": { + "computed": { + "type": "boolean", + "const": true, + "description": "Always true." + } }, - "label": { - "type": "string", - "description": "Display label." + "required": ["computed"], + "additionalProperties": false, + "description": "A value thunk derived from other params." + }, + { + "type": "object", + "properties": { + "constant": { + "description": "The constant value (any JSON)." + } + }, + "required": ["constant"], + "additionalProperties": false, + "description": "A value thunk that always returns this." + } + ] + }, + "options": { + "description": "Selectable options.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stored option id." + }, + "label": { + "description": "Display label; absent when it equals `id` or lives in the block docs shard.", + "type": "string" + } + }, + "required": ["id"], + "additionalProperties": false, + "description": "One static option." } }, - "required": ["id", "label"], - "additionalProperties": false, - "description": "One static option." + { + "type": "object", + "properties": { + "dynamic": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["dynamic"], + "additionalProperties": false, + "description": "Options fetched per workspace through `selectorKey`." + }, + { + "type": "object", + "properties": { + "opaque": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["opaque"], + "additionalProperties": false, + "description": "A function the catalog could not evaluate to data." + } + ] + }, + "hidden": { + "description": "Hidden from the editor.", + "type": "boolean" + }, + "readOnly": { + "description": "Display-only.", + "type": "boolean" + }, + "password": { + "description": "Holds a secret.", + "type": "boolean" + }, + "hideFromCopilot": { + "description": "Not offered to Copilot.", + "type": "boolean" + }, + "context": { + "description": "Only meaningful as an agent tool.", + "type": "string", + "const": "tool-input" + }, + "paramVisibility": { + "description": "Tool param visibility override.", + "type": "string" + }, + "emptyIsValid": { + "description": "An empty value satisfies `required`.", + "type": "boolean" + }, + "language": { + "description": "Code field language.", + "type": "string" + }, + "multiple": { + "description": "Accepts several files.", + "type": "boolean" + }, + "min": { + "description": "Minimum numeric value.", + "type": "number" + }, + "max": { + "description": "Maximum numeric value.", + "type": "number" + }, + "step": { + "description": "Slider increment.", + "type": "number" + }, + "integer": { + "description": "Integers only.", + "type": "boolean" + }, + "columns": { + "description": "Table column headers.", + "type": "array", + "items": { + "type": "string" } }, - { - "type": "object", - "properties": { - "dynamic": { - "type": "boolean", - "const": true, - "description": "Always true." - } - }, - "required": ["dynamic"], - "additionalProperties": false, - "description": "Options fetched per workspace through `selectorKey`." + "selectorKey": { + "description": "Selector that lists the options.", + "type": "string" }, - { - "type": "object", - "properties": { - "opaque": { - "type": "boolean", - "const": true, - "description": "Always true." - } - }, - "required": ["opaque"], - "additionalProperties": false, - "description": "A function the catalog could not evaluate to data." + "serviceId": { + "description": "OAuth service the field binds.", + "type": "string" + }, + "valueKind": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "array", + "object", + "json", + "code", + "branches", + "tools", + "resource", + "picked", + "upload", + "none" + ], + "description": "How a value for this field is written in source." + }, + "resourceKind": { + "description": "Workspace resource kind, for `resource` fields.", + "type": "string" + }, + "storage": { + "type": "string", + "enum": ["native", "json-string"], + "description": "Encoding a new value is stored with." + }, + "structured": { + "description": "Structured value the canonical model decodes.", + "type": "string", + "enum": [ + "tools", + "branches", + "tableRows", + "inputFormat", + "variables" + ] } - ] - }, - "hidden": { - "description": "Hidden from the editor.", - "type": "boolean" - }, - "readOnly": { - "description": "Display-only.", - "type": "boolean" - }, - "password": { - "description": "Holds a secret.", - "type": "boolean" - }, - "hideFromCopilot": { - "description": "Not offered to Copilot.", - "type": "boolean" - }, - "context": { - "description": "Only meaningful as an agent tool.", - "type": "string", - "const": "tool-input" - }, - "paramVisibility": { - "description": "Tool param visibility override.", - "type": "string" - }, - "emptyIsValid": { - "description": "An empty value satisfies `required`.", - "type": "boolean" - }, - "language": { - "description": "Code field language.", - "type": "string" - }, - "multiple": { - "description": "Accepts several files.", - "type": "boolean" - }, - "min": { - "description": "Minimum numeric value.", - "type": "number" - }, - "max": { - "description": "Maximum numeric value.", - "type": "number" - }, - "step": { - "description": "Slider increment.", - "type": "number" - }, - "integer": { - "description": "Integers only.", - "type": "boolean" - }, - "columns": { - "description": "Table column headers.", - "type": "array", - "items": { - "type": "string" - } - }, - "selectorKey": { - "description": "Selector that lists the options.", - "type": "string" - }, - "serviceId": { - "description": "OAuth service the field binds.", - "type": "string" - }, - "valueKind": { - "type": "string", - "enum": [ - "string", - "number", - "boolean", - "array", - "object", - "json", - "code", - "branches", - "tools", - "resource", - "picked", - "upload", - "none" - ], - "description": "How a value for this field is written in source." - }, - "resourceKind": { - "description": "Workspace resource kind, for `resource` fields.", - "type": "string" - }, - "storage": { - "type": "string", - "enum": ["native", "json-string"], - "description": "Encoding a new value is stored with." + }, + "required": ["id", "type", "valueKind", "storage"], + "additionalProperties": false, + "description": "One configuration field, in declared order; duplicate ids are kept with `surface`." }, - "structured": { - "description": "Structured value the canonical model decodes.", - "type": "string", - "enum": ["tools", "branches", "tableRows", "inputFormat", "variables"] + { + "type": "object", + "properties": { + "shared": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `subBlocks` table." + } + }, + "required": ["shared"], + "additionalProperties": false, + "description": "A field stored once in the catalog `subBlocks` table." } - }, - "required": ["id", "type", "valueKind", "storage"], - "additionalProperties": false, - "description": "One configuration field, in declared order; duplicate ids are kept with `surface`." + ] }, - "description": "Configuration fields in declared order." + "description": "Configuration fields in declared order, inline or by reference." }, "outputs": { "type": "object", @@ -31073,6 +31260,12 @@ "description": "A nested output, of this same shape." } }, + "sharedProperties": { + "description": "In place of `properties`: index of the nested outputs in the catalog `outputs`.", + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, "items": { "description": "Array element output, of this same shape." } @@ -31082,9 +31275,15 @@ "description": "One output field." }, "description": "Declared outputs by name." + }, + "sharedOutputs": { + "description": "In place of `outputs`: index of the outputs in the catalog `outputs` table.", + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 } }, - "required": ["id", "provider", "name", "subBlocks", "outputs"], + "required": ["id", "provider", "name", "subBlocks"], "additionalProperties": false, "description": "One trigger a block can run in trigger mode." }, @@ -31127,6 +31326,632 @@ }, "description": "SDK builder methods keyed by dotted path, e.g. `slack.sendMessage`." }, + "subBlocks": { + "description": "Fields declared identically by several blocks or triggers, stored once.", + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Field id; the param name unless the field is in a basic/advanced pair." + }, + "type": { + "type": "string", + "description": "Editor control type, e.g. `short-input`." + }, + "title": { + "description": "Display title.", + "type": "string" + }, + "mode": { + "description": "Which editor mode shows the field.", + "type": "string", + "enum": ["basic", "advanced", "both", "trigger", "trigger-advanced"] + }, + "canonicalParamId": { + "description": "Shared param name of a basic/advanced pair.", + "type": "string" + }, + "surface": { + "description": "Whether this declaration belongs to action or trigger mode.", + "type": "string", + "enum": ["action", "trigger"] + }, + "condition": { + "anyOf": [ + { + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Sibling field id whose value decides the condition." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." + } + ], + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." + }, + "not": { + "description": "Invert the match.", + "type": "boolean" + }, + "and": { + "description": "A second clause that must hold as well.", + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Second field id." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." + } + ], + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." + }, + "not": { + "description": "Invert the second match.", + "type": "boolean" + } + }, + "required": ["field"], + "additionalProperties": false + } + }, + "required": ["field", "value"], + "additionalProperties": false, + "description": "Holds when `field` holds `value`." + }, + { + "type": "object", + "properties": { + "opaque": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["opaque"], + "additionalProperties": false, + "description": "A function the catalog could not evaluate to data." + } + ], + "description": "A condition clause, or `{ opaque: true }` (treat as possibly holding)." + }, + "visibleFor": { + "description": "Per operation id: whether an opaque condition can show this field.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "boolean" + } + }, + "required": { + "description": "Whether a value is required, or the condition under which it is.", + "anyOf": [ + { + "type": "boolean" + }, + { + "anyOf": [ + { + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Sibling field id whose value decides the condition." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." + } + ], + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." + }, + "not": { + "description": "Invert the match.", + "type": "boolean" + }, + "and": { + "description": "A second clause that must hold as well.", + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Second field id." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." + } + ], + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." + }, + "not": { + "description": "Invert the second match.", + "type": "boolean" + } + }, + "required": ["field"], + "additionalProperties": false + } + }, + "required": ["field", "value"], + "additionalProperties": false, + "description": "Holds when `field` holds `value`." + }, + { + "type": "object", + "properties": { + "opaque": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["opaque"], + "additionalProperties": false, + "description": "A function the catalog could not evaluate to data." + } + ], + "description": "A condition clause, or `{ opaque: true }` (treat as possibly holding)." + } + ] + }, + "dependsOn": { + "description": "Editor clearing and fetch ordering hints; never visibility.", + "type": "object", + "properties": { + "all": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Fields that must all hold values." + }, + "any": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Fields of which one must hold a value." + } + }, + "required": ["all", "any"], + "additionalProperties": false + }, + "defaultValue": { + "description": "Editor default value (any JSON)." + }, + "valueDefault": { + "description": "The registry value thunk, evaluated where it is constant.", + "anyOf": [ + { + "type": "object", + "properties": { + "computed": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["computed"], + "additionalProperties": false, + "description": "A value thunk derived from other params." + }, + { + "type": "object", + "properties": { + "constant": { + "description": "The constant value (any JSON)." + } + }, + "required": ["constant"], + "additionalProperties": false, + "description": "A value thunk that always returns this." + } + ] + }, + "options": { + "description": "Selectable options.", + "anyOf": [ + { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stored option id." + }, + "label": { + "description": "Display label; absent when it equals `id` or lives in the block docs shard.", + "type": "string" + } + }, + "required": ["id"], + "additionalProperties": false, + "description": "One static option." + } + }, + { + "type": "object", + "properties": { + "dynamic": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["dynamic"], + "additionalProperties": false, + "description": "Options fetched per workspace through `selectorKey`." + }, + { + "type": "object", + "properties": { + "opaque": { + "type": "boolean", + "const": true, + "description": "Always true." + } + }, + "required": ["opaque"], + "additionalProperties": false, + "description": "A function the catalog could not evaluate to data." + } + ] + }, + "hidden": { + "description": "Hidden from the editor.", + "type": "boolean" + }, + "readOnly": { + "description": "Display-only.", + "type": "boolean" + }, + "password": { + "description": "Holds a secret.", + "type": "boolean" + }, + "hideFromCopilot": { + "description": "Not offered to Copilot.", + "type": "boolean" + }, + "context": { + "description": "Only meaningful as an agent tool.", + "type": "string", + "const": "tool-input" + }, + "paramVisibility": { + "description": "Tool param visibility override.", + "type": "string" + }, + "emptyIsValid": { + "description": "An empty value satisfies `required`.", + "type": "boolean" + }, + "language": { + "description": "Code field language.", + "type": "string" + }, + "multiple": { + "description": "Accepts several files.", + "type": "boolean" + }, + "min": { + "description": "Minimum numeric value.", + "type": "number" + }, + "max": { + "description": "Maximum numeric value.", + "type": "number" + }, + "step": { + "description": "Slider increment.", + "type": "number" + }, + "integer": { + "description": "Integers only.", + "type": "boolean" + }, + "columns": { + "description": "Table column headers.", + "type": "array", + "items": { + "type": "string" + } + }, + "selectorKey": { + "description": "Selector that lists the options.", + "type": "string" + }, + "serviceId": { + "description": "OAuth service the field binds.", + "type": "string" + }, + "valueKind": { + "type": "string", + "enum": [ + "string", + "number", + "boolean", + "array", + "object", + "json", + "code", + "branches", + "tools", + "resource", + "picked", + "upload", + "none" + ], + "description": "How a value for this field is written in source." + }, + "resourceKind": { + "description": "Workspace resource kind, for `resource` fields.", + "type": "string" + }, + "storage": { + "type": "string", + "enum": ["native", "json-string"], + "description": "Encoding a new value is stored with." + }, + "structured": { + "description": "Structured value the canonical model decodes.", + "type": "string", + "enum": ["tools", "branches", "tableRows", "inputFormat", "variables"] + } + }, + "required": ["id", "type", "valueKind", "storage"], + "additionalProperties": false, + "description": "One configuration field, in declared order; duplicate ids are kept with `surface`." + } + }, + "lists": { + "description": "Condition value lists used by several fields, stored once.", + "type": "array", + "items": { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + } + }, + "outputs": { + "description": "Output records repeated across blocks and triggers, stored once.", + "type": "array", + "items": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "type": { + "type": "string", + "description": "Output value type." + }, + "description": { + "description": "What the output holds.", + "type": "string" + }, + "condition": { + "description": "When the output is present: `{ field, value, not?, and? }`." + }, + "hiddenFromDisplay": { + "description": "Hidden from the output picker.", + "type": "boolean" + }, + "properties": { + "description": "Nested outputs by name, each of this same shape.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "description": "A nested output, of this same shape." + } + }, + "sharedProperties": { + "description": "In place of `properties`: index of the nested outputs in the catalog `outputs`.", + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991 + }, + "items": { + "description": "Array element output, of this same shape." + } + }, + "required": ["type"], + "additionalProperties": false, + "description": "One output field." + }, + "description": "Declared outputs by name." + } + }, "scope": { "description": "Present when the catalog includes an organization’s custom blocks.", "type": "object", diff --git a/apps/sim/lib/api/contracts/v2/block-catalog.ts b/apps/sim/lib/api/contracts/v2/block-catalog.ts index 2ba15d51821..bde90f32756 100644 --- a/apps/sim/lib/api/contracts/v2/block-catalog.ts +++ b/apps/sim/lib/api/contracts/v2/block-catalog.ts @@ -15,6 +15,11 @@ import { v2DataResponse } from '@/lib/api/contracts/v2/shared' * no body when nothing changed. That is a deliberate exception to v2's no-ETag rule: the document * is megabytes, is already content-addressed, and is what a workflow lock pins, so revalidating by * hash is the read's whole purpose. + * + * The core shard never stores a value twice: a block's trigger-mode fields reference the shared + * `triggers` table, and repeated fields, condition lists and output records live once in the + * `subBlocks`, `lists` and `outputs` tables. Readers expand it with `expandBlockCatalog` (or the + * per-block accessors) from `@sim/workflow-code` rather than walking these references themselves. */ export const v2BlockCatalogQuerySchema = z @@ -43,9 +48,17 @@ export const v2BlockCatalogHeadersSchema = z.object({ const scalarSchema = z.union([z.string(), z.number(), z.boolean()]) +const listRefSchema = z + .strictObject({ + list: z.number().int().nonnegative().describe('Index into the catalog `lists` table.'), + }) + .describe('A value list stored once in the catalog `lists` table.') + const conditionValueSchema = z - .union([scalarSchema, z.array(scalarSchema)]) - .describe('Value, or set of accepted values, the named field must hold.') + .union([scalarSchema, z.array(scalarSchema), listRefSchema]) + .describe( + 'Value, or set of accepted values, the named field must hold; a set may be a `lists` reference.' + ) const opaqueSchema = z .object({ opaque: z.literal(true).describe('Always true.') }) @@ -74,7 +87,10 @@ const catalogConditionSchema = z const catalogOptionSchema = z .object({ id: z.string().describe('Stored option id.'), - label: z.string().describe('Display label.'), + label: z + .string() + .optional() + .describe('Display label; absent when it equals `id` or lives in the block docs shard.'), }) .describe('One static option.') @@ -187,6 +203,12 @@ const catalogOutputSchema = z .record(z.string(), z.unknown().describe('A nested output, of this same shape.')) .optional() .describe('Nested outputs by name, each of this same shape.'), + sharedProperties: z + .number() + .int() + .nonnegative() + .optional() + .describe('In place of `properties`: index of the nested outputs in the catalog `outputs`.'), items: z.unknown().optional().describe('Array element output, of this same shape.'), }) .describe('One output field.') @@ -195,6 +217,27 @@ const catalogOutputsSchema = z .record(z.string(), catalogOutputSchema) .describe('Declared outputs by name.') +const sharedOutputsSchema = z + .number() + .int() + .nonnegative() + .optional() + .describe('In place of `outputs`: index of the outputs in the catalog `outputs` table.') + +const sharedSubBlockRefSchema = z + .strictObject({ + shared: z.number().int().nonnegative().describe('Index into the catalog `subBlocks` table.'), + }) + .describe('A field stored once in the catalog `subBlocks` table.') + +const triggerSubBlocksRefSchema = z + .strictObject({ + trigger: z.string().describe('Trigger id in the catalog `triggers` table.'), + start: z.number().int().nonnegative().describe('First of that trigger’s fields in the run.'), + count: z.number().int().positive().describe('How many consecutive fields the run holds.'), + }) + .describe('A run of a shared trigger’s fields, spliced in place, each with `surface: "trigger"`.') + const catalogBlockSchema = z .object({ type: z.string().describe('Block type id.'), @@ -227,7 +270,9 @@ const catalogBlockSchema = z .optional() .describe('Trigger mode support.'), singleInstance: z.boolean().optional().describe('At most one per workflow.'), - subBlocks: z.array(catalogSubBlockSchema).describe('Configuration fields in declared order.'), + subBlocks: z + .array(z.union([catalogSubBlockSchema, sharedSubBlockRefSchema, triggerSubBlocksRefSchema])) + .describe('Configuration fields in declared order, inline or by reference.'), tools: z .object({ access: z.array(z.string()).describe('Tool ids the block can call.'), @@ -247,8 +292,10 @@ const catalogBlockSchema = z }) .describe('One declared input.') ) - .describe('Declared inputs by name.'), - outputs: catalogOutputsSchema, + .optional() + .describe('Declared inputs by name; absent when empty or kept in the block docs shard.'), + outputs: catalogOutputsSchema.optional(), + sharedOutputs: sharedOutputsSchema, dynamicOutputs: z .object({ source: z @@ -319,8 +366,11 @@ const catalogTriggerSchema = z name: z.string().describe('Display name.'), polling: z.boolean().optional().describe('Poll-based rather than webhook-based.'), webhook: z.boolean().optional().describe('Receives webhooks.'), - subBlocks: z.array(catalogSubBlockSchema).describe('Configuration fields in declared order.'), - outputs: catalogOutputsSchema, + subBlocks: z + .array(z.union([catalogSubBlockSchema, sharedSubBlockRefSchema])) + .describe('Configuration fields in declared order, inline or by reference.'), + outputs: catalogOutputsSchema.optional(), + sharedOutputs: sharedOutputsSchema, }) .describe('One trigger a block can run in trigger mode.') @@ -351,6 +401,18 @@ export const v2BlockCatalogSchema = z builders: z .record(z.string(), catalogBuilderSchema) .describe('SDK builder methods keyed by dotted path, e.g. `slack.sendMessage`.'), + subBlocks: z + .array(catalogSubBlockSchema) + .optional() + .describe('Fields declared identically by several blocks or triggers, stored once.'), + lists: z + .array(z.array(scalarSchema)) + .optional() + .describe('Condition value lists used by several fields, stored once.'), + outputs: z + .array(catalogOutputsSchema) + .optional() + .describe('Output records repeated across blocks and triggers, stored once.'), scope: z .object({ organizationId: z.string().describe('Organization whose custom blocks are included.'), diff --git a/apps/sim/lib/workflows/code/catalog/build.ts b/apps/sim/lib/workflows/code/catalog/build.ts index 4156261d31e..95855e13400 100644 --- a/apps/sim/lib/workflows/code/catalog/build.ts +++ b/apps/sim/lib/workflows/code/catalog/build.ts @@ -3,9 +3,12 @@ import { compareStrings } from '@sim/utils/string' import { type BlockCatalog, type CatalogBlock, + type CatalogBlockDocs, type CatalogBuilder, type CatalogTool, type CatalogTrigger, + compactBlockCatalog, + type ExpandedBlockCatalog, stableStringify, } from '@sim/workflow-code' import { @@ -40,8 +43,11 @@ function catalogHash(value: unknown): string { return createHash('sha256').update(stableStringify(value)).digest('hex') } -/** One block's docs shard: the text and tool schemas the core shard leaves out. */ -interface CatalogDocsShard { +/** + * One block's docs shard: the text, tool schemas, option labels and inputs the core shard leaves + * out. `expandBlockCatalog(catalog, docs)` merges the `CatalogBlockDocs` part back. + */ +interface CatalogDocsShard extends CatalogBlockDocs { type: string hash: string description: string @@ -65,6 +71,14 @@ export interface CatalogBuildResult { docs: (type: string) => CatalogDocsShard | undefined } +/** The projection before encoding: every block and trigger in expanded form. */ +export interface CatalogProjection { + catalog: Omit + report: ProjectionReport + /** Block descriptions and tool ids, for the docs shards. */ + descriptions: ReadonlyMap +} + interface ToolMetadataSource { metadata: (toolId: string) => ToolMetadata | undefined outputs: (toolId: string) => Record | undefined @@ -167,13 +181,10 @@ function sortedRecord(entries: Array<[string, T]>): Record { } /** - * Builds the core shard of a `BlockCatalog` from registry definitions, plus a docs-shard reader. - * Deterministic: the same inputs give the same bytes and the same hash. + * Projects registry definitions into an expanded catalog (no hash): the shape every consumer reads + * through the package's catalog view. {@link buildBlockCatalog} encodes it as the served core shard. */ -export function buildBlockCatalog( - input: CatalogBuildInput, - tools?: ToolMetadataSource -): CatalogBuildResult { +export function projectBlockCatalog(input: CatalogBuildInput): CatalogProjection { const report: ProjectionReport = { opaque: [] } const blocks: Array<[string, CatalogBlock]> = [] const descriptions = new Map() @@ -216,14 +227,27 @@ export function buildBlockCatalog( triggers.push([id, projected]) } - const core: Omit = { + const catalog: Omit = { catalogVersion: 1, sdkMajor: CATALOG_SDK_MAJOR, blocks: sortedRecord(blocks), triggers: sortedRecord(triggers), builders: sortedRecord(Object.entries(builders)), } - if (input.scope) core.scope = { organizationId: input.scope.organizationId } + if (input.scope) catalog.scope = { organizationId: input.scope.organizationId } + return { catalog, report, descriptions } +} + +/** + * Builds the core shard of a `BlockCatalog` from registry definitions, plus a docs-shard reader. + * Deterministic: the same inputs give the same bytes and the same hash. + */ +export function buildBlockCatalog( + input: CatalogBuildInput, + tools?: ToolMetadataSource +): CatalogBuildResult { + const { catalog: expanded, report, descriptions } = projectBlockCatalog(input) + const { core, docs: blockDocs } = compactBlockCatalog(expanded) const catalog: BlockCatalog = { ...core, hash: catalogHash(core) } const docs = (type: string): CatalogDocsShard | undefined => { @@ -235,7 +259,12 @@ export function buildBlockCatalog( if (metadata) shardTools[toolId] = projectCatalogTool(toolId, metadata, tools?.outputs(toolId)) } - const body = { type, description: entry.description, tools: shardTools } + const body = { + type, + description: entry.description, + tools: shardTools, + ...(Object.hasOwn(blockDocs, type) ? blockDocs[type] : {}), + } return { ...body, hash: catalogHash(body) } } diff --git a/packages/sim-cli/src/generated/v2-api.ts b/packages/sim-cli/src/generated/v2-api.ts index afb519f6b6d..cd226bb825e 100644 --- a/packages/sim-cli/src/generated/v2-api.ts +++ b/packages/sim-cli/src/generated/v2-api.ts @@ -6134,112 +6134,150 @@ export type GetBlockCatalogResponse = { available: Array } singleInstance?: boolean - subBlocks: Array<{ - id: string - type: string - title?: string - mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' - canonicalParamId?: string - surface?: 'action' | 'trigger' - condition?: - | { - field: string - value: string | number | boolean | Array - not?: boolean - and?: { - field: string - value?: string | number | boolean | Array - not?: boolean - } - } - | { - opaque: true - } - visibleFor?: Record - required?: - | boolean - | { - field: string - value: string | number | boolean | Array - not?: boolean - and?: { - field: string - value?: string | number | boolean | Array - not?: boolean - } - } - | { - opaque: true - } - dependsOn?: { - all: Array - any: Array - } - defaultValue?: unknown - valueDefault?: - | { - computed: true - } - | { - constant: unknown - } - options?: - | Array<{ - id: string - label: string - }> - | { - dynamic: true - } - | { - opaque: true + subBlocks: Array< + | { + id: string + type: string + title?: string + mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' + canonicalParamId?: string + surface?: 'action' | 'trigger' + condition?: + | { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + | { + opaque: true + } + visibleFor?: Record + required?: + | boolean + | { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + | { + opaque: true + } + dependsOn?: { + all: Array + any: Array } - hidden?: boolean - readOnly?: boolean - password?: boolean - hideFromCopilot?: boolean - context?: 'tool-input' - paramVisibility?: string - emptyIsValid?: boolean - language?: string - multiple?: boolean - min?: number - max?: number - step?: number - integer?: boolean - columns?: Array - selectorKey?: string - serviceId?: string - valueKind: - | 'string' - | 'number' - | 'boolean' - | 'array' - | 'object' - | 'json' - | 'code' - | 'branches' - | 'tools' - | 'resource' - | 'picked' - | 'upload' - | 'none' - resourceKind?: string - storage: 'native' | 'json-string' - structured?: 'tools' | 'branches' | 'tableRows' | 'inputFormat' | 'variables' - }> + defaultValue?: unknown + valueDefault?: + | { + computed: true + } + | { + constant: unknown + } + options?: + | Array<{ + id: string + label?: string + }> + | { + dynamic: true + } + | { + opaque: true + } + hidden?: boolean + readOnly?: boolean + password?: boolean + hideFromCopilot?: boolean + context?: 'tool-input' + paramVisibility?: string + emptyIsValid?: boolean + language?: string + multiple?: boolean + min?: number + max?: number + step?: number + integer?: boolean + columns?: Array + selectorKey?: string + serviceId?: string + valueKind: + | 'string' + | 'number' + | 'boolean' + | 'array' + | 'object' + | 'json' + | 'code' + | 'branches' + | 'tools' + | 'resource' + | 'picked' + | 'upload' + | 'none' + resourceKind?: string + storage: 'native' | 'json-string' + structured?: 'tools' | 'branches' | 'tableRows' | 'inputFormat' | 'variables' + } + | { + shared: number + } + | { + trigger: string + start: number + count: number + } + > tools: { access: Array selector: 'single' | 'operation' | 'opaque' } - inputs: Record< + inputs?: Record< string, { type: string schema?: unknown } > - outputs: Record< + outputs?: Record< string, { type: string @@ -6247,9 +6285,11 @@ export type GetBlockCatalogResponse = { condition?: unknown hiddenFromDisplay?: boolean properties?: Record + sharedProperties?: number items?: unknown } > + sharedOutputs?: number dynamicOutputs?: { source: 'responseFormat' | 'inputFormat' | 'humanForm' | 'tableRows' param: string @@ -6287,101 +6327,134 @@ export type GetBlockCatalogResponse = { name: string polling?: boolean webhook?: boolean - subBlocks: Array<{ - id: string - type: string - title?: string - mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' - canonicalParamId?: string - surface?: 'action' | 'trigger' - condition?: - | { - field: string - value: string | number | boolean | Array - not?: boolean - and?: { - field: string - value?: string | number | boolean | Array - not?: boolean - } - } - | { - opaque: true - } - visibleFor?: Record - required?: - | boolean - | { - field: string - value: string | number | boolean | Array - not?: boolean - and?: { - field: string - value?: string | number | boolean | Array - not?: boolean - } - } - | { - opaque: true - } - dependsOn?: { - all: Array - any: Array - } - defaultValue?: unknown - valueDefault?: - | { - computed: true - } - | { - constant: unknown - } - options?: - | Array<{ - id: string - label: string - }> - | { - dynamic: true - } - | { - opaque: true + subBlocks: Array< + | { + id: string + type: string + title?: string + mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' + canonicalParamId?: string + surface?: 'action' | 'trigger' + condition?: + | { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + | { + opaque: true + } + visibleFor?: Record + required?: + | boolean + | { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + | { + opaque: true + } + dependsOn?: { + all: Array + any: Array } - hidden?: boolean - readOnly?: boolean - password?: boolean - hideFromCopilot?: boolean - context?: 'tool-input' - paramVisibility?: string - emptyIsValid?: boolean - language?: string - multiple?: boolean - min?: number - max?: number - step?: number - integer?: boolean - columns?: Array - selectorKey?: string - serviceId?: string - valueKind: - | 'string' - | 'number' - | 'boolean' - | 'array' - | 'object' - | 'json' - | 'code' - | 'branches' - | 'tools' - | 'resource' - | 'picked' - | 'upload' - | 'none' - resourceKind?: string - storage: 'native' | 'json-string' - structured?: 'tools' | 'branches' | 'tableRows' | 'inputFormat' | 'variables' - }> - outputs: Record< + defaultValue?: unknown + valueDefault?: + | { + computed: true + } + | { + constant: unknown + } + options?: + | Array<{ + id: string + label?: string + }> + | { + dynamic: true + } + | { + opaque: true + } + hidden?: boolean + readOnly?: boolean + password?: boolean + hideFromCopilot?: boolean + context?: 'tool-input' + paramVisibility?: string + emptyIsValid?: boolean + language?: string + multiple?: boolean + min?: number + max?: number + step?: number + integer?: boolean + columns?: Array + selectorKey?: string + serviceId?: string + valueKind: + | 'string' + | 'number' + | 'boolean' + | 'array' + | 'object' + | 'json' + | 'code' + | 'branches' + | 'tools' + | 'resource' + | 'picked' + | 'upload' + | 'none' + resourceKind?: string + storage: 'native' | 'json-string' + structured?: 'tools' | 'branches' | 'tableRows' | 'inputFormat' | 'variables' + } + | { + shared: number + } + > + outputs?: Record< string, { type: string @@ -6389,9 +6462,11 @@ export type GetBlockCatalogResponse = { condition?: unknown hiddenFromDisplay?: boolean properties?: Record + sharedProperties?: number items?: unknown } > + sharedOutputs?: number } > builders: Record< @@ -6403,6 +6478,143 @@ export type GetBlockCatalogResponse = { fixed?: Record } > + subBlocks?: Array<{ + id: string + type: string + title?: string + mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' + canonicalParamId?: string + surface?: 'action' | 'trigger' + condition?: + | { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + | { + opaque: true + } + visibleFor?: Record + required?: + | boolean + | { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + | { + opaque: true + } + dependsOn?: { + all: Array + any: Array + } + defaultValue?: unknown + valueDefault?: + | { + computed: true + } + | { + constant: unknown + } + options?: + | Array<{ + id: string + label?: string + }> + | { + dynamic: true + } + | { + opaque: true + } + hidden?: boolean + readOnly?: boolean + password?: boolean + hideFromCopilot?: boolean + context?: 'tool-input' + paramVisibility?: string + emptyIsValid?: boolean + language?: string + multiple?: boolean + min?: number + max?: number + step?: number + integer?: boolean + columns?: Array + selectorKey?: string + serviceId?: string + valueKind: + | 'string' + | 'number' + | 'boolean' + | 'array' + | 'object' + | 'json' + | 'code' + | 'branches' + | 'tools' + | 'resource' + | 'picked' + | 'upload' + | 'none' + resourceKind?: string + storage: 'native' | 'json-string' + structured?: 'tools' | 'branches' | 'tableRows' | 'inputFormat' | 'variables' + }> + lists?: Array> + outputs?: Array< + Record< + string, + { + type: string + description?: string + condition?: unknown + hiddenFromDisplay?: boolean + properties?: Record + sharedProperties?: number + items?: unknown + } + > + > scope?: { organizationId: string } From 3e58103ea02aa445bbb45b72ea3979b7bd47ea65 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:31:55 -0800 Subject: [PATCH 070/428] test(workflows): prove the compact core shard expands to the projection The registry-wide catalog test now reads the catalog through the package view, checks that core shard plus docs expands to the projection for every block and trigger, and that no trigger-surface subBlock matching a shared trigger is stored inline. --- .../lib/workflows/code/catalog/build.test.ts | 77 +++++++++++++++---- .../lib/workflows/code/real-catalog.test.ts | 6 +- 2 files changed, 65 insertions(+), 18 deletions(-) diff --git a/apps/sim/lib/workflows/code/catalog/build.test.ts b/apps/sim/lib/workflows/code/catalog/build.test.ts index e05d3b5bd07..fd3937975ae 100644 --- a/apps/sim/lib/workflows/code/catalog/build.test.ts +++ b/apps/sim/lib/workflows/code/catalog/build.test.ts @@ -7,13 +7,18 @@ */ import { writeFileSync } from 'node:fs' import { gzipSync } from 'node:zlib' -import type { CatalogBlock, CatalogSubBlock } from '@sim/workflow-code' +import { + type CatalogBlock, + type CatalogSubBlock, + expandBlockCatalog, + stableStringify, +} from '@sim/workflow-code' import { describe, expect, it, vi } from 'vitest' vi.unmock('@/blocks/registry') import { v2BlockCatalogSchema } from '@/lib/api/contracts/v2/block-catalog' -import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' +import { buildBlockCatalog, projectBlockCatalog } from '@/lib/workflows/code/catalog/build' import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' import { operationOptions } from '@/lib/workflows/code/catalog/sdk-names' import { getBlockRegistry } from '@/blocks/registry' @@ -27,6 +32,8 @@ const built = buildBlockCatalog({ sdkNames: SDK_NAMES, }) const { catalog, report } = built +/** What every consumer reads: the core shard expanded through the package's catalog view. */ +const view = expandBlockCatalog(catalog) function isOpaque(value: unknown): boolean { return typeof value === 'object' && value !== null && 'opaque' in value @@ -39,26 +46,25 @@ function siteKey(block: string, subBlock: string, field: string): string { describe('block catalog projection over the whole registry', () => { it('projects every block, subBlock and referenced trigger', () => { for (const block of registryBlocks) { - const projected = catalog.blocks[block.type] + const projected = view.blocks[block.type] expect(projected, block.type).toBeDefined() expect(projected.subBlocks.map((subBlock) => subBlock.id)).toEqual( block.subBlocks.map((subBlock) => subBlock.id) ) if (block.triggers?.enabled) { for (const id of block.triggers.available) { - if (registryTrigger(id)) - expect(catalog.triggers[id], `${block.type} → ${id}`).toBeDefined() + if (registryTrigger(id)) expect(view.triggers[id], `${block.type} → ${id}`).toBeDefined() } } } - expect(catalog.blocks.loop.graph.container).toBe('loop') - expect(catalog.blocks.parallel.graph.container).toBe('parallel') + expect(view.blocks.loop.graph.container).toBe('loop') + expect(view.blocks.parallel.graph.container).toBe('parallel') }) it('keeps canonicalParamId pairs consistent with the registry', () => { const problems: string[] = [] for (const block of registryBlocks) { - const projected = catalog.blocks[block.type] + const projected = view.blocks[block.type] block.subBlocks.forEach((subBlock, index) => { if (projected.subBlocks[index].canonicalParamId !== subBlock.canonicalParamId) { problems.push(`${block.type}.${subBlock.id}: canonicalParamId changed`) @@ -112,8 +118,8 @@ describe('block catalog projection over the whole registry', () => { if (isOpaque(subBlock.options)) markers.add(siteKey(owner, subBlock.id, 'options')) } } - for (const block of Object.values(catalog.blocks)) visit(block.type, block.subBlocks) - for (const trigger of Object.values(catalog.triggers)) { + for (const block of Object.values(view.blocks)) visit(block.type, block.subBlocks) + for (const trigger of Object.values(view.triggers)) { visit(`trigger:${trigger.id}`, trigger.subBlocks) } const reported = new Set( @@ -138,7 +144,7 @@ describe('block catalog projection over the whole registry', () => { it('pre-expands operation-only conditions for exactly the block operations', () => { for (const block of registryBlocks) { const operations = operationOptions(block).map((operation) => operation.id) - for (const subBlock of catalog.blocks[block.type].subBlocks) { + for (const subBlock of view.blocks[block.type].subBlocks) { if (!subBlock.visibleFor) continue expect(isOpaque(subBlock.condition), `${block.type}.${subBlock.id}`).toBe(true) expect(Object.keys(subBlock.visibleFor)).toEqual(operations) @@ -160,7 +166,7 @@ describe('block catalog projection over the whole registry', () => { } expect(missing).toEqual([]) for (const [path, builder] of Object.entries(catalog.builders)) { - expect(catalog.blocks[builder.type], path).toBeDefined() + expect(view.blocks[builder.type], path).toBeDefined() } }) @@ -183,13 +189,54 @@ describe('block catalog projection over the whole registry', () => { trigger: registryTrigger, sdkNames: SDK_NAMES, }) - const { addable, ...rest } = scoped.catalog.blocks[first.type] + const { addable, ...rest } = expandBlockCatalog(scoped.catalog).blocks[first.type] expect(addable).toBe(false) - const { addable: _ignored, ...original }: CatalogBlock = catalog.blocks[first.type] + const { addable: _ignored, ...original }: CatalogBlock = view.blocks[first.type] expect(rest).toEqual(original) expect(scoped.catalog.hash).not.toBe(catalog.hash) }) + it('encodes the projection losslessly: core shard plus docs expands to it for every block', () => { + const { catalog: projection } = projectBlockCatalog({ + blocks: registryBlocks, + trigger: registryTrigger, + sdkNames: SDK_NAMES, + }) + const { hash, ...expanded } = expandBlockCatalog(catalog, built.docs) + expect(hash).toBe(catalog.hash) + const mismatched = Object.keys(projection.blocks).filter( + (type) => stableStringify(expanded.blocks[type]) !== stableStringify(projection.blocks[type]) + ) + expect(mismatched).toEqual([]) + expect(Object.keys(expanded.blocks)).toEqual(Object.keys(projection.blocks)) + expect(expanded).toEqual(projection) + }) + + it('stores no trigger subBlock twice: every trigger-surface run that matches is a reference', () => { + const full = expandBlockCatalog(catalog, built.docs) + const triggerKeys = new Set( + Object.values(full.triggers).flatMap((trigger) => + trigger.subBlocks.map((subBlock) => stableStringify({ ...subBlock, surface: 'trigger' })) + ) + ) + const copied: string[] = [] + for (const [type, block] of Object.entries(catalog.blocks)) { + let index = 0 + for (const entry of block.subBlocks) { + if ('trigger' in entry) { + index += entry.count + continue + } + const expanded = full.blocks[type].subBlocks[index] + if (expanded.surface === 'trigger' && triggerKeys.has(stableStringify(expanded))) { + copied.push(`${type}.${expanded.id}`) + } + index += 1 + } + } + expect(copied).toEqual([]) + }) + it('passes through the v2 response schema unchanged, so no projected field is stripped', () => { expect(v2BlockCatalogSchema.parse(catalog)).toEqual(catalog) }) @@ -213,7 +260,7 @@ describe('block catalog projection over the whole registry', () => { blocks: Object.keys(catalog.blocks).length, triggers: Object.keys(catalog.triggers).length, builders: Object.keys(catalog.builders).length, - subBlocks: Object.values(catalog.blocks).reduce((n, b) => n + b.subBlocks.length, 0), + subBlocks: Object.values(view.blocks).reduce((n, b) => n + b.subBlocks.length, 0), coreShardBytes: raw.length, coreShardGzipBytes: gzipped.length, opaqueByField: byField, diff --git a/apps/sim/lib/workflows/code/real-catalog.test.ts b/apps/sim/lib/workflows/code/real-catalog.test.ts index 74f5f8dbc8c..376410c6d0e 100644 --- a/apps/sim/lib/workflows/code/real-catalog.test.ts +++ b/apps/sim/lib/workflows/code/real-catalog.test.ts @@ -8,7 +8,7 @@ import { execFileSync } from 'node:child_process' import { mkdirSync, mkdtempSync, rmSync, writeFileSync } from 'node:fs' import { tmpdir } from 'node:os' import path from 'node:path' -import { canonicalize } from '@sim/workflow-code' +import { canonicalize, catalogBlock, catalogBuilder } from '@sim/workflow-code' import { generateSdkTypes, SPECIAL_BUILDER_KEYS } from '@sim/workflow-sdk/codegen' import { afterAll, describe, expect, it, vi } from 'vitest' @@ -53,7 +53,7 @@ describe('wave 2 engines over the real block catalog', () => { it('maps every builder core.d.ts declares to the block type its signature is written for', () => { expect( - Object.fromEntries(SPECIAL_BUILDER_KEYS.map((key) => [key, catalog.builders[key]])) + Object.fromEntries(SPECIAL_BUILDER_KEYS.map((key) => [key, catalogBuilder(catalog, key)])) ).toEqual({ condition: { type: 'condition' }, router: { type: 'router_v2' }, @@ -73,7 +73,7 @@ describe('wave 2 engines over the real block catalog', () => { block.subBlocks.forEach((subBlock, index) => { if (subBlock.multiSelect !== true) return multiSelects += 1 - if (catalog.blocks[block.type].subBlocks[index].multiple !== true) { + if (catalogBlock(catalog, block.type)?.subBlocks[index]?.multiple !== true) { missing.push(`${block.type}.${subBlock.id}`) } }) From 5c42784b7ecff391fc130b6ec19db8d7a230c14a Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:32:28 -0800 Subject: [PATCH 071/428] feat(workflow-code): print and compile legacy collision keys and reserved names as a meta.key override bound to stored keys --- .../code/corpus/roundtrip.corpus.test.ts | 47 +++++++------- packages/workflow-code/src/compile/SYNTAX.md | 14 ++++- packages/workflow-code/src/compile/blocks.ts | 3 + packages/workflow-code/src/compile/context.ts | 7 +++ .../workflow-code/src/compile/grammar.test.ts | 63 +++++++++++++++++++ packages/workflow-code/src/compile/index.ts | 15 +++++ packages/workflow-code/src/compile/scope.ts | 62 +++++++++++++++++- packages/workflow-code/src/print/printer.ts | 16 +++++ 8 files changed, 202 insertions(+), 25 deletions(-) diff --git a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts index 64bcdb0caa3..35b56751578 100644 --- a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts +++ b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts @@ -212,7 +212,11 @@ function sourceRun(e: ResolvedEngines, subject: ProofSubject): SourceRun { meta: { name: subject.id, description: null }, }).workflow const printed = printText(e, workflow, 'inline') - const run = { canonical: workflow, printed, compiled: compileFiles(e, printed) } + const run = { + canonical: workflow, + printed, + compiled: compileFiles(e, printed, storedKeys(workflow)), + } sourceRuns.set(subject, run) return run } @@ -237,13 +241,27 @@ function printText(e: ResolvedEngines, workflow: CanonicalWorkflow, mode: 'inlin }) } -function compileFiles(e: ResolvedEngines, printed: ReturnType) { +/** + * The keys the stored workflow binds to ids, as the lock (or the lock assembled from + * `code_meta`) carries them. They let a printed `meta.key` keep a legacy collision key or a + * reserved name through compile. + */ +function storedKeys(workflow: CanonicalWorkflow): ReadonlySet { + return new Set(Object.keys(workflow.blocks)) +} + +function compileFiles( + e: ResolvedEngines, + printed: ReturnType, + knownKeys: ReadonlySet +) { const [entry, ...codeFiles] = printed.files return compileWorkflow({ entry, files: new Map(codeFiles.map((file) => [file.path, file.text])), catalog: e.catalog, sdkMajor: e.catalog.sdkMajor, + knownKeys, }) } @@ -252,7 +270,7 @@ function compiledWorkflow( workflow: CanonicalWorkflow, mode: 'inline' | 'files' = 'inline' ) { - return compiledOrThrow(compileFiles(e, printText(e, workflow, mode))) + return compiledOrThrow(compileFiles(e, printText(e, workflow, mode), storedKeys(workflow))) } function materialized(e: ResolvedEngines, workflow: CanonicalWorkflow, prev?: WorkflowState) { @@ -334,26 +352,13 @@ const properties: Record }), } -const LEGACY_NAME_COLLISION = - 'two stored names normalize alike (E_CANON_LEGACY_NAME_COLLISION keys the second `name~2`); ' + - 'the source form cannot carry that key, so compile reports E_DUPLICATE_NAME (Wave 3: lock keys)' -const RESERVED_BLOCK_NAME = - 'a block named Loop or Parallel (W_CANON_RESERVED_NAME); compile reports E_RESERVED_NAME ' + - '(Wave 3: decide the source form for legacy reserved names)' - /** - * Stored shapes the editor and realtime persistence refuse (`getWorkflowBlockNameConflict`) but - * legacy rows can hold, which no source form expresses yet. Every property must fail on exactly - * these and pass everywhere else: a new failure or a newly passing case fails the run. The report - * still records each as failed. + * Stored shapes no source form expresses yet. Every property must fail on exactly these and pass + * everywhere else: a new failure or a newly passing case fails the run. The report still records + * each as failed. Empty since legacy name collisions and reserved names print as `meta.key` + * (Wave 3E), which compiles against the stored keys. */ -const KNOWN_FAILURES: Record = { - 'name-collision:function:Agent 1|agent1': LEGACY_NAME_COLLISION, - 'name-collision:function:Fetch Data|fetch data': LEGACY_NAME_COLLISION, - 'name-collision:function:My.Block|myblock': LEGACY_NAME_COLLISION, - 'testing:builder-loop': RESERVED_BLOCK_NAME, - 'testing:builder-parallel': RESERVED_BLOCK_NAME, -} +const KNOWN_FAILURES: Record = {} const KNOWN_FAILURE_IDS = Object.keys(KNOWN_FAILURES).sort(compareStrings) const PROPERTY_TITLES: Record = { diff --git a/packages/workflow-code/src/compile/SYNTAX.md b/packages/workflow-code/src/compile/SYNTAX.md index 2b31b3b550a..462d933c868 100644 --- a/packages/workflow-code/src/compile/SYNTAX.md +++ b/packages/workflow-code/src/compile/SYNTAX.md @@ -31,9 +31,21 @@ printer's choice (build-spec first, then s2) was taken. advanced. `meta.modes` always wins (it is printed exactly when derivation would be wrong), so the compiler never emits `E_MODE_CONFLICT`. Every group on the block gets a mode; an unwritten group without `meta.modes` is `basic`. -- `meta`: `disabled`, `locked`, `advancedMode`, `triggerMode` (any builder), `errorPort`, +- `meta`: `key`, `disabled`, `locked`, `advancedMode`, `triggerMode` (any builder), `errorPort`, `retry: { enabled, maxTries, waitBetweenTriesMs }`, `modes`, `branches`, `inactive`, `$unknown` (opaque `block.data`, plain JSON). +- `meta.key: ''` (a string literal) keeps a legacy key that the display name cannot carry. + The printer writes it only for such a block, and the compiler accepts it only when the key is in + `CompileInput.knownKeys` (the stored workflow's keys, from the lock or `code_meta`) and is one of + the two legacy shapes canonicalize produces: + - the `~n` collision form of the normalized name (`api('agent1', {...}, { key: 'agent1~2' })` + next to `api('Agent 1', ...)`), with the plain key declared by another block; + - the normalized name itself when it is reserved (`api('Loop', {...}, { key: 'loop' })`). + + Anything else is `E_KEY_OVERRIDE`, and the block falls back to its normalized name (so a + reserved name then also reports `E_RESERVED_NAME`). Source can therefore round-trip such a block + losslessly but never introduce one; renaming the block on the canvas or in source retires the + override. - `errorPort` in the CWM is `meta.errorPort || the block has an error edge`. - `inactive: { : value }` accepts any id (annotated stale values, the non-effective pair member, ids the catalog does not know). Each id becomes a param and is listed in diff --git a/packages/workflow-code/src/compile/blocks.ts b/packages/workflow-code/src/compile/blocks.ts index a6536429a7a..1765096d906 100644 --- a/packages/workflow-code/src/compile/blocks.ts +++ b/packages/workflow-code/src/compile/blocks.ts @@ -50,6 +50,7 @@ interface CompiledBlock { } const META_KEYS = [ + 'key', 'disabled', 'locked', 'advancedMode', @@ -181,6 +182,8 @@ function compileMeta(ctx: CompileContext, node: Node | undefined, site: ValueSit } for (const [key, property] of objectEntries(ctx, node)) { switch (key) { + case 'key': + break case 'disabled': meta.enabled = !booleanLiteral(ctx, property, decl) break diff --git a/packages/workflow-code/src/compile/context.ts b/packages/workflow-code/src/compile/context.ts index 4ca0714662b..10feca329c5 100644 --- a/packages/workflow-code/src/compile/context.ts +++ b/packages/workflow-code/src/compile/context.ts @@ -50,6 +50,11 @@ export interface BlockDecl { body: Scope | null /** A duplicate name: reported, never emitted. */ duplicate: boolean + /** + * Set when `meta.key` keyed the block `${base}~n` (a legacy collision key). The plain `base` + * key must be declared too; that is checked once every declaration is collected. + */ + collisionBase?: { base: BlockKey; node: Node } } type Binding = @@ -97,6 +102,8 @@ export interface CompileContext { wiring: WiringStatement[] implied: ImpliedEdge[] spans: Map + /** `CompileInput.knownKeys`: the only keys a `meta.key` override may name. */ + knownKeys: ReadonlySet } /** Anything with Babel-style offsets. */ diff --git a/packages/workflow-code/src/compile/grammar.test.ts b/packages/workflow-code/src/compile/grammar.test.ts index 713dae8b281..4bc82b4f79f 100644 --- a/packages/workflow-code/src/compile/grammar.test.ts +++ b/packages/workflow-code/src/compile/grammar.test.ts @@ -903,3 +903,66 @@ describe('rejected constructs (s3 §4 table)', () => { expectDiagnostic(run(extra), 'E_UNSUPPORTED_SYNTAX', { line: 3, column: 1 }, EXTRA) }) }) + +describe('meta.key: legacy keys the display name cannot carry', () => { + function withKeys(text: string, knownKeys: string[]): CompileResult { + return compileWorkflow({ + entry: { path: ENTRY, text }, + files: new Map(), + catalog: TEST_CATALOG, + sdkMajor: 1, + knownKeys: new Set(knownKeys), + }) + } + + const collision = source( + "const a = api('Agent 1', { url: 'x' })\nconst b = api('agent1', { url: 'y' }, { key: 'agent1~2' })" + ) + const reserved = source("const a = api('Loop', { url: 'x' }, { key: 'loop' })") + + it('keeps a stored name~n collision key and a stored reserved name', () => { + const kept = withKeys(collision, ['agent1', 'agent1~2']) + expect(errorsOf(kept)).toEqual([]) + expect(Object.keys(kept.workflow?.blocks ?? {}).sort()).toEqual(['agent1', 'agent1~2']) + expect(kept.workflow?.blocks['agent1~2']?.name).toBe('agent1') + expect(kept.hints.blocks['agent1~2']).toMatchObject({ binding: 'b' }) + + const loopBlock = withKeys(reserved, ['loop']) + expect(errorsOf(loopBlock)).toEqual([]) + expect(loopBlock.workflow?.blocks.loop?.name).toBe('Loop') + }) + + it('never introduces a legacy key the stored workflow does not have', () => { + expect(errorsOf(withKeys(collision, ['agent1'])).map((d) => d.code)).toEqual([ + 'E_KEY_OVERRIDE', + 'E_DUPLICATE_NAME', + ]) + expect(errorsOf(run(reserved)).map((d) => d.code)).toEqual([ + 'E_KEY_OVERRIDE', + 'E_RESERVED_NAME', + ]) + }) + + it('refuses a known key that is not the legacy form of this block name', () => { + const renamed = source( + "const a = api('Fetch', { url: 'x' })\nconst b = api('Other', { url: 'y' }, { key: 'fetch~2' })" + ) + const steal = source("const a = api('Fetch', { url: 'x' }, { key: 'send' })") + const plain = source("const a = api('Fetch', { url: 'x' }, { key: 'fetch' })") + const known = ['fetch', 'fetch~2', 'send'] + expect(errorsOf(withKeys(renamed, known)).map((d) => d.code)).toEqual(['E_KEY_OVERRIDE']) + expect(errorsOf(withKeys(steal, known)).map((d) => d.code)).toEqual(['E_KEY_OVERRIDE']) + expect(errorsOf(withKeys(plain, known)).map((d) => d.code)).toEqual(['E_KEY_OVERRIDE']) + }) + + it('refuses a collision key whose plain key no block holds, and a key that is not a literal', () => { + const orphan = source("const b = api('agent1', { url: 'y' }, { key: 'agent1~2' })") + expectDiagnostic( + withKeys(orphan, ['agent1~2']), + 'E_KEY_OVERRIDE', + locate(orphan, "key: 'agent1~2'") + ) + const computed = source("const a = api('Loop', { url: 'x' }, { key: 'lo' + 'op' })") + expect(errorsOf(withKeys(computed, ['loop'])).map((d) => d.code)).toContain('E_KEY_OVERRIDE') + }) +}) diff --git a/packages/workflow-code/src/compile/index.ts b/packages/workflow-code/src/compile/index.ts index 1d0104595c0..747ee97b4b1 100644 --- a/packages/workflow-code/src/compile/index.ts +++ b/packages/workflow-code/src/compile/index.ts @@ -343,6 +343,7 @@ export const compileWorkflow: CompileWorkflowFn = (input) => { wiring: [], implied: [], spans: new Map(), + knownKeys: input.knownKeys ?? new Set(), } const moduleScope: Scope = { parent: null, bindings: new Map(), container: null } @@ -407,6 +408,20 @@ export const compileWorkflow: CompileWorkflowFn = (input) => { ) } + for (const decl of ctx.decls) { + if (decl.collisionBase && !ctx.declsByKey.has(decl.collisionBase.base)) { + reporter.report( + 'E_KEY_OVERRIDE', + `${decl.key} is a collision key, but no block is keyed ${decl.collisionBase.base}.`, + rangeOf(ctx, decl.collisionBase.node), + { + hint: 'A name~n key only keeps a legacy collision apart; remove meta.key.', + blockKey: decl.key, + } + ) + } + } + const compiled = new Map() const inactive: Record = {} const hints: LockHints = { blocks: {} } diff --git a/packages/workflow-code/src/compile/scope.ts b/packages/workflow-code/src/compile/scope.ts index d209eb469b3..b4d4b72ca7d 100644 --- a/packages/workflow-code/src/compile/scope.ts +++ b/packages/workflow-code/src/compile/scope.ts @@ -10,6 +10,7 @@ import { RESERVED_WORKFLOW_BLOCK_NAMES, } from '@sim/workflow-types/workflow' import { encodeAnchor } from '../anchors' +import type { BlockKey } from '../model' import { GENERIC_BUILDER } from '../sdk' import type { ListOptions } from './comments' import { @@ -133,6 +134,57 @@ function nameArgumentIndex(builder: ResolvedBuilder, path: string): number { return builder.kind === 'generic' || path === GENERIC_BUILDER ? 1 : 0 } +function isReservedKey(key: string): boolean { + return (RESERVED_WORKFLOW_BLOCK_NAMES as readonly string[]).includes(key) +} + +/** `name~n` with n ≥ 2, the form canonicalize gives the losing block of a legacy collision. */ +function collisionSuffix(key: string, base: string): boolean { + return key.startsWith(`${base}~`) && /^(?:[2-9]|[1-9]\d+)$/.test(key.slice(base.length + 1)) +} + +/** + * Reads `meta.key`: the source form of a legacy key that the display name cannot carry. It is + * accepted only for a key already bound to an id (`CompileInput.knownKeys`) and only in one of + * the two legacy shapes canonicalize produces: the block's reserved normalized name (`Loop`, + * `Parallel`), or the `~n` collision form of its normalized name. So source can keep such a + * block losslessly but can never introduce one. `null` when there is no `meta.key` or it was + * rejected (`E_KEY_OVERRIDE`), in which case the normalized name is the key. + */ +function keyOverride( + ctx: CompileContext, + metaNode: Node | undefined, + normalized: string +): { key: BlockKey; collisionBase?: { base: BlockKey; node: Node } } | null { + if (!metaNode || metaNode.type !== 'ObjectExpression') return null + const property = metaNode.properties.find( + (candidate) => + candidate.type === 'ObjectProperty' && + !candidate.computed && + ((candidate.key.type === 'Identifier' && candidate.key.name === 'key') || + (candidate.key.type === 'StringLiteral' && candidate.key.value === 'key')) + ) + if (!property || property.type !== 'ObjectProperty') return null + const reject = (message: string): null => { + ctx.reporter.report('E_KEY_OVERRIDE', message, rangeOf(ctx, property), { + hint: 'meta.key only keeps a legacy key the stored workflow already has; remove it and rename the block.', + }) + return null + } + const key = literalText(property.value) + if (key === null) return reject('meta.key must be a string literal.') + if (!ctx.knownKeys.has(key)) { + return reject(`meta.key ${key} is not a key of this workflow's stored blocks.`) + } + if (key === normalized && isReservedKey(key)) return { key } + if (collisionSuffix(key, normalized)) { + return { key, collisionBase: { base: normalized, node: property } } + } + return reject( + `meta.key ${key} is neither the reserved name ${normalized} nor a ${normalized}~n collision key.` + ) +} + /** Registers one block declaration, checking its name (s3 §4 "Names and scopes"). */ function declare( ctx: CompileContext, @@ -154,14 +206,17 @@ function declare( ) return null } - const key = normalizeWorkflowBlockName(name) - if (!key) { + const normalized = normalizeWorkflowBlockName(name) + if (!normalized) { ctx.reporter.report('E_EMPTY_NAME', 'A block name cannot be empty.', rangeOf(ctx, nameNode), { hint: 'Give the block a display name.', }) return null } - if ((RESERVED_WORKFLOW_BLOCK_NAMES as readonly string[]).includes(key)) { + const metaIndex = classified.builder.kind === 'container' ? 3 : nameIndex + 2 + const override = keyOverride(ctx, call.arguments[metaIndex], normalized) + const key = override?.key ?? normalized + if (!override && isReservedKey(normalized)) { ctx.reporter.report( 'E_RESERVED_NAME', `${name} is reserved for <${key}.…> references.`, @@ -185,6 +240,7 @@ function declare( builder: classified.builder, body: null, duplicate: false, + ...(override?.collisionBase && { collisionBase: override.collisionBase }), } const first = ctx.declsByKey.get(key) if (first) { diff --git a/packages/workflow-code/src/print/printer.ts b/packages/workflow-code/src/print/printer.ts index 2eec0c2783c..666bdc485bd 100644 --- a/packages/workflow-code/src/print/printer.ts +++ b/packages/workflow-code/src/print/printer.ts @@ -6,6 +6,10 @@ */ import { compareStrings } from '@sim/utils/string' +import { + normalizeWorkflowBlockName, + RESERVED_WORKFLOW_BLOCK_NAMES, +} from '@sim/workflow-types/workflow' import { portKey } from '../anchors' import type { LockHintBlock, LockHints, PrintInput, PrintResult, PrintWorkflowFn } from '../api' import type { BlockCatalog, CatalogBlock, CatalogBuilder, CatalogSubBlock } from '../catalog/types' @@ -702,6 +706,7 @@ class WorkflowPrinter { ): Property[] { const meta: Property[] = [] const yes: Expr = { doc: 'true', shape: 'literal' } + if (needsKeyOverride(block)) meta.push({ key: 'key', value: this.values.string(block.key) }) if (!block.enabled) meta.push({ key: 'disabled', value: yes }) if (block.locked) meta.push({ key: 'locked', value: yes }) if (block.advancedMode) meta.push({ key: 'advancedMode', value: yes }) @@ -1124,6 +1129,17 @@ class WorkflowPrinter { } } +const RESERVED_KEYS: ReadonlySet = new Set(RESERVED_WORKFLOW_BLOCK_NAMES) + +/** + * A legacy key the display name cannot carry: a `name~n` collision key, or a reserved name + * (`Loop`, `Parallel`). Printed as `meta.key`, which the compiler accepts only for a key the + * stored workflow already has (`CompileInput.knownKeys`). + */ +function needsKeyOverride(block: CanonicalBlock): boolean { + return block.key !== normalizeWorkflowBlockName(block.name) || RESERVED_KEYS.has(block.key) +} + /** Import specifiers in the order Biome's organizeImports keeps them. */ function compareImportNames(a: string, b: string): number { return compareStrings(a, b) From 2c8ec905e4b9b86ab60b5482335e58a63fe5ae36 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:32:43 -0800 Subject: [PATCH 072/428] test(workflows): turn the catalog size record into a gzip budget and drop a restating test The core shard size test asserted only that gzip output is non-empty. It now fails when the gzipped catalog exceeds 1.2 MB (measured 1.1 MB over 513 blocks), so shrinking work is held to its gains. The reportPathVariable test restated a one-line string transform and is removed. --- apps/sim/lib/workflows/code/catalog/build.test.ts | 11 +++++++++-- packages/workflow-code/src/proof/report.test.ts | 6 +----- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/apps/sim/lib/workflows/code/catalog/build.test.ts b/apps/sim/lib/workflows/code/catalog/build.test.ts index e05d3b5bd07..0747365ee9f 100644 --- a/apps/sim/lib/workflows/code/catalog/build.test.ts +++ b/apps/sim/lib/workflows/code/catalog/build.test.ts @@ -36,6 +36,13 @@ function siteKey(block: string, subBlock: string, field: string): string { return `${block}\u0000${subBlock}\u0000${field}` } +/** + * The gzipped core shard every SDK client downloads. Measured at 1,105,482 bytes over 513 blocks; + * the budget leaves about 8% for growth. Shrinking the catalog should lower it; raise it only with + * a measured reason recorded here. + */ +const CORE_SHARD_GZIP_BUDGET_BYTES = 1_200_000 + describe('block catalog projection over the whole registry', () => { it('projects every block, subBlock and referenced trigger', () => { for (const block of registryBlocks) { @@ -194,7 +201,7 @@ describe('block catalog projection over the whole registry', () => { expect(v2BlockCatalogSchema.parse(catalog)).toEqual(catalog) }) - it('records the core shard size', () => { + it('keeps the core shard under its gzip budget', () => { const raw = Buffer.from(JSON.stringify(catalog)) const gzipped = gzipSync(raw) const reportPath = process.env.CATALOG_REPORT_PATH @@ -224,6 +231,6 @@ describe('block catalog projection over the whole registry', () => { ) ) } - expect(gzipped.length).toBeGreaterThan(0) + expect(gzipped.length).toBeLessThanOrEqual(CORE_SHARD_GZIP_BUDGET_BYTES) }) }) diff --git a/packages/workflow-code/src/proof/report.test.ts b/packages/workflow-code/src/proof/report.test.ts index 4cf665ae0aa..1dbad841a30 100644 --- a/packages/workflow-code/src/proof/report.test.ts +++ b/packages/workflow-code/src/proof/report.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import { createProofReport, reportPathVariable } from './report' +import { createProofReport } from './report' describe('createProofReport', () => { it('computes parity per block type from decided outcomes only', () => { @@ -48,8 +48,4 @@ describe('createProofReport', () => { expect(built.failures).toHaveLength(2) expect(built.truncatedFailures).toBe(1) }) - - it('derives the report path variable from the suite name', () => { - expect(reportPathVariable('roundtrip-corpus')).toBe('ROUNDTRIP_CORPUS_REPORT_PATH') - }) }) From e4246a03c51adaa7dbf3529fdfc41bb93e15ae01 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:32:52 -0800 Subject: [PATCH 073/428] feat(workflow-sdk): type meta.key for legacy keys --- packages/workflow-sdk/src/core.d.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/workflow-sdk/src/core.d.ts b/packages/workflow-sdk/src/core.d.ts index 20d922641f0..b0d73f15d31 100644 --- a/packages/workflow-sdk/src/core.d.ts +++ b/packages/workflow-sdk/src/core.d.ts @@ -224,6 +224,12 @@ export declare function mcp(key: string): McpServerRef /** Block-level fields (`BlockState`), written as the third builder argument. */ export interface BlockMeta { + /** + * A legacy key the display name cannot carry (a `name~n` collision key or a reserved name such + * as `Loop`). Printed only for such a stored block; apply accepts it only for a key the stored + * workflow already has, so it can never introduce one. + */ + key?: string /** Stored as `enabled: false`. */ disabled?: true /** Protected: apply refuses any change to this block. */ From da6983ca2d1fab4125d8e5017d072727411af2c9 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:33:36 -0800 Subject: [PATCH 074/428] feat(cli): sim workflows source get --out writes the source tree with sdk declarations The generated workflows source get gains --out : it writes workflow.ts, functions/*, .sim/lock.json, .sim/base.json, core.d.ts plus the @sim/workflow-sdk codegen output for the block types the workflow uses (from the workflow's compile catalog, ETag-cached under .sim/cache), and a tsconfig.json that resolves @sim/workflow-sdk to them. The source response gains blockTypes, and @sim/workflow-sdk embeds core.d.ts as CORE_DTS for bundled consumers. --- apps/docs/content/docs/cli/reference.mdx | 1 + apps/docs/content/docs/cli/workflows.mdx | 1 + apps/docs/openapi-v2-workflows.json | 10 + .../[workflowId]/source/route.test.ts | 1 + .../contracts/v2/openapi/workflow-source.ts | 1 + apps/sim/lib/api/contracts/workflow-source.ts | 3 + .../application/get-workflow-source.ts | 15 ++ biome.json | 1 + bun.lock | 2 + packages/sim-cli/package.json | 2 + .../sim-cli/src/commands/protocol/index.ts | 6 +- .../protocol/workflow-source-get.test.ts | 144 ++++++++++ .../commands/protocol/workflow-source-get.ts | 248 ++++++++++++++++++ packages/sim-cli/src/generated/v2-api.ts | 1 + .../scripts/generate-core-text.ts | 24 ++ .../src/codegen/core-text.generated.ts | 4 + .../src/codegen/core-text.test.ts | 11 + packages/workflow-sdk/src/codegen/index.ts | 1 + 18 files changed, 474 insertions(+), 2 deletions(-) create mode 100644 packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts create mode 100644 packages/sim-cli/src/commands/protocol/workflow-source-get.ts create mode 100644 packages/workflow-sdk/scripts/generate-core-text.ts create mode 100644 packages/workflow-sdk/src/codegen/core-text.generated.ts create mode 100644 packages/workflow-sdk/src/codegen/core-text.test.ts diff --git a/apps/docs/content/docs/cli/reference.mdx b/apps/docs/content/docs/cli/reference.mdx index dfd69f3be12..73fee3c6e0d 100644 --- a/apps/docs/content/docs/cli/reference.mdx +++ b/apps/docs/content/docs/cli/reference.mdx @@ -8288,6 +8288,7 @@ sim workflows source get [options] | `--annotate-ids` | No | Print each block's id as a trailing `// id:` comment on its declaration. | | `--no-annotate-ids` | No | Send --annotate-ids as false. | | `--function-code ` | No | Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates. Accepted values: `inline`, `files`. | +| `--out ` | No | Write the source, its lock and SDK type declarations into this directory instead of printing them. | diff --git a/apps/docs/content/docs/cli/workflows.mdx b/apps/docs/content/docs/cli/workflows.mdx index 6fb687bf6a3..e9291c1d97f 100644 --- a/apps/docs/content/docs/cli/workflows.mdx +++ b/apps/docs/content/docs/cli/workflows.mdx @@ -1312,6 +1312,7 @@ sim workflows source get [options] | `--annotate-ids` | No | Print each block's id as a trailing `// id:` comment on its declaration. | | `--no-annotate-ids` | No | Send --annotate-ids as false. | | `--function-code ` | No | Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates. Accepted values: `inline`, `files`. | +| `--out ` | No | Write the source, its lock and SDK type declarations into this directory instead of printing them. | diff --git a/apps/docs/openapi-v2-workflows.json b/apps/docs/openapi-v2-workflows.json index 1dbb3bf4cf9..c38ce50edf3 100644 --- a/apps/docs/openapi-v2-workflows.json +++ b/apps/docs/openapi-v2-workflows.json @@ -6008,6 +6008,7 @@ "canonicalHash": "0d6e2b8a4c1f7e3d9b5a2c8f4e1d7b3a9c6f2e8d4b1a7c3e9f5d2b8a4c1e7f3d", "catalogVersion": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a", "sdkMajor": 1, + "blockTypes": ["start_trigger"], "warnings": [] } } @@ -17609,6 +17610,13 @@ "maximum": 9007199254740991, "description": "Workflow SDK major version of the source." }, + "blockTypes": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Block types the source uses, as blocks or as agent tools, sorted." + }, "warnings": { "type": "array", "items": { @@ -17657,6 +17665,7 @@ "canonicalHash", "catalogVersion", "sdkMajor", + "blockTypes", "warnings" ], "additionalProperties": false, @@ -17696,6 +17705,7 @@ "canonicalHash": "0d6e2b8a4c1f7e3d9b5a2c8f4e1d7b3a9c6f2e8d4b1a7c3e9f5d2b8a4c1e7f3d", "catalogVersion": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a", "sdkMajor": 1, + "blockTypes": ["start_trigger"], "warnings": [] } } diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts index 37eccea658c..871553443ce 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts @@ -52,6 +52,7 @@ const source = { canonicalHash: 'd'.repeat(64), catalogVersion: 'h', sdkMajor: 1, + blockTypes: ['start_trigger'], warnings: [], } diff --git a/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts index 0ea32d04172..d4886c6fb05 100644 --- a/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts +++ b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts @@ -32,6 +32,7 @@ const WORKFLOW_SOURCE_EXAMPLE = { canonicalHash: '0d6e2b8a4c1f7e3d9b5a2c8f4e1d7b3a9c6f2e8d4b1a7c3e9f5d2b8a4c1e7f3d', catalogVersion: CATALOG_HASH, sdkMajor: 1, + blockTypes: ['start_trigger'], warnings: [], } diff --git a/apps/sim/lib/api/contracts/workflow-source.ts b/apps/sim/lib/api/contracts/workflow-source.ts index 904441905c1..5e7a6044e3b 100644 --- a/apps/sim/lib/api/contracts/workflow-source.ts +++ b/apps/sim/lib/api/contracts/workflow-source.ts @@ -114,6 +114,9 @@ export const workflowSourceSchema = z .string() .describe('Hash of the block catalog the source was printed against.'), sdkMajor: z.number().int().describe('Workflow SDK major version of the source.'), + blockTypes: z + .array(z.string()) + .describe('Block types the source uses, as blocks or as agent tools, sorted.'), warnings: z.array(sourceWarningSchema).describe('Findings from reading the stored graph.'), }) .describe('A workflow draft as TypeScript source.') diff --git a/apps/sim/lib/workflows/application/get-workflow-source.ts b/apps/sim/lib/workflows/application/get-workflow-source.ts index 4e9d70473f6..c1e0cd47b78 100644 --- a/apps/sim/lib/workflows/application/get-workflow-source.ts +++ b/apps/sim/lib/workflows/application/get-workflow-source.ts @@ -1,3 +1,4 @@ +import { compareStrings } from '@sim/utils/string' import { type CanonicalWorkflow, type CodeComment, @@ -60,6 +61,8 @@ export interface GetWorkflowSourceResult { /** The compile catalog's content hash the files were printed against. */ catalogVersion: string sdkMajor: number + /** Block types the source uses, as blocks or as agent tools, sorted; for SDK type generation. */ + blockTypes: string[] warnings: WorkflowSourceWarning[] } @@ -88,6 +91,17 @@ function withIdComments(workflow: CanonicalWorkflow, identity: LockIdentity): Ca return { ...workflow, annotations: { ...workflow.annotations, comments } } } +function usedBlockTypes(workflow: CanonicalWorkflow): string[] { + const types = new Set() + for (const block of Object.values(workflow.blocks)) { + types.add(block.type) + for (const param of Object.values(block.params)) { + if (param.kind === 'tools') for (const tool of param.tools) types.add(tool.type) + } + } + return [...types].sort(compareStrings) +} + /** The full lock: canonicalize's identity, the printer's bindings/order/code files, and layout. */ function assembleLock( identity: LockIdentity, @@ -181,6 +195,7 @@ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ canonicalHash: canonicalHash(canonical.workflow), catalogVersion: catalog.hash, sdkMajor: catalog.sdkMajor, + blockTypes: usedBlockTypes(canonical.workflow), warnings: [...canonical.diagnostics, ...printed.diagnostics].map(toWarning), } }, diff --git a/biome.json b/biome.json index 2da1565aa06..c8243b0e571 100644 --- a/biome.json +++ b/biome.json @@ -33,6 +33,7 @@ "!**/apps/sim/tools/generated", "!**/apps/sim/lib/mothership/generated/**", "!**/packages/desktop-bridge/src/computer-use.generated.ts", + "!**/packages/workflow-sdk/src/codegen/core-text.generated.ts", "!**/apps/docs/.content", "!**/apps/desktop/release", "!**/venv", diff --git a/bun.lock b/bun.lock index cc318f7cd77..114912fbe62 100644 --- a/bun.lock +++ b/bun.lock @@ -768,6 +768,8 @@ "devDependencies": { "@sim/tsconfig": "workspace:*", "@sim/utils": "workspace:*", + "@sim/workflow-code": "workspace:*", + "@sim/workflow-sdk": "workspace:*", "@types/js-yaml": "4.0.9", "@types/node": "24.19.2", "@types/proper-lockfile": "4.1.4", diff --git a/packages/sim-cli/package.json b/packages/sim-cli/package.json index 2b8e13c56df..8b9b4d7eb36 100644 --- a/packages/sim-cli/package.json +++ b/packages/sim-cli/package.json @@ -59,6 +59,8 @@ "devDependencies": { "@sim/tsconfig": "workspace:*", "@sim/utils": "workspace:*", + "@sim/workflow-code": "workspace:*", + "@sim/workflow-sdk": "workspace:*", "@types/js-yaml": "4.0.9", "@types/node": "24.19.2", "@types/proper-lockfile": "4.1.4", diff --git a/packages/sim-cli/src/commands/protocol/index.ts b/packages/sim-cli/src/commands/protocol/index.ts index daed7089f82..efecaf2e589 100644 --- a/packages/sim-cli/src/commands/protocol/index.ts +++ b/packages/sim-cli/src/commands/protocol/index.ts @@ -18,6 +18,7 @@ import { attachTableImport } from './tables-import' import { attachWorkflowRunFollow } from './workflow-run-follow' import { attachWorkflowRunGet } from './workflow-run-get' import { attachWorkflowRunWait } from './workflow-run-wait' +import { attachWorkflowSourceGet } from './workflow-source-get' import { attachWorkspaceOperationWait } from './workspace-operation-wait' function group(program: Command, name: string): Command { @@ -74,13 +75,14 @@ export function attachProtocolCommands(program: Command): void { folders: 'listWorkflowFolders', createFolder: 'createWorkflowFolder', }) - // All three augment commands the generated pass already built — `run` gains - // `--follow`, `runs get` gains block names, and `runs` gains `wait` — so they + // All four augment commands the generated pass already built — `run` gains + // `--follow`, `runs get` gains block names, `runs` gains `wait`, and `source get` gains `--out` — so they // must attach after it, which is the order `buildProgram` calls them in. attachWorkflowRunFollow(workflows) const runs = group(workflows, 'runs') attachWorkflowRunGet(runs) attachWorkflowRunWait(runs) + attachWorkflowSourceGet(group(workflows, 'source')) attachWorkspaceOperationWait(group(group(program, 'workspaces'), 'operations')) diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts b/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts new file mode 100644 index 00000000000..347853bc813 --- /dev/null +++ b/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts @@ -0,0 +1,144 @@ +import { existsSync, mkdtempSync, readFileSync, rmSync } from 'node:fs' +import { tmpdir } from 'node:os' +import { join } from 'node:path' +import { Command } from 'commander' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' +import { SimApiError } from '../../http/client' +import { buildGeneratedCommands } from '../../runtime/build' +import { contextMockFns, contextMockState } from '../../test/context-mock' +import { attachWorkflowSourceGet } from './workflow-source-get' + +vi.mock('../../context', async () => (await import('../../test/context-mock')).contextMock) + +const { mockRequest: request } = contextMockFns + +const WORKFLOW_ID = '00000000-0000-4000-8000-00000000000a' +const WORKSPACE_ID = '00000000-0000-4000-8000-00000000000b' +const SOURCE_PATH = `/api/v2/workflows/${WORKFLOW_ID}/source` +const CATALOG_PATH = `/api/v2/workspaces/${WORKSPACE_ID}/block-catalog` + +/** A real catalog projected from registry blocks, shared with the SDK's own type checks. */ +const CATALOG = JSON.parse( + readFileSync(join(__dirname, '../../../../workflow-sdk/test/fixtures/catalog.json'), 'utf8') +) + +function source(files: Record = { 'workflow.ts': '// @sim-sdk 1\n' }) { + return { + data: { + workflowId: WORKFLOW_ID, + workspaceId: WORKSPACE_ID, + files, + lock: { lockVersion: 1, blocks: {}, variables: {} }, + lockBase: { workspaceId: WORKSPACE_ID, baseFingerprint: 'sf1:x', catalogHash: CATALOG.hash }, + fingerprint: 'sf1:x', + canonicalHash: 'h', + catalogVersion: CATALOG.hash, + sdkMajor: 1, + blockTypes: ['agent'], + warnings: [], + }, + } +} + +function program(): Command { + const root = new Command('sim') + for (const command of buildGeneratedCommands()) root.addCommand(command) + const workflows = root.commands.find((command) => command.name() === 'workflows') + const sourceGroup = workflows?.commands.find((command) => command.name() === 'source') + if (!sourceGroup) throw new Error('workflows source group missing') + attachWorkflowSourceGet(sourceGroup) + const override = (command: Command) => { + command.exitOverride() + command.commands.forEach(override) + } + override(root) + return root +} + +async function get(...argv: string[]): Promise { + await program().parseAsync(['node', 'sim', 'workflows', 'source', 'get', WORKFLOW_ID, ...argv]) +} + +let outDir: string + +beforeEach(() => { + contextMockState.output = 'json' + request.mockReset() + outDir = mkdtempSync(join(tmpdir(), 'sim-source-')) + vi.spyOn(console, 'log').mockImplementation(() => {}) +}) + +afterEach(() => { + rmSync(outDir, { recursive: true, force: true }) +}) + +describe('sim workflows source get --out', () => { + it('writes the source, lock, base and declarations for only the block types the workflow uses', async () => { + request.mockImplementation(async (path: string) => + path === SOURCE_PATH + ? source({ 'workflow.ts': '// @sim-sdk 1\n', 'functions/score.js': 'return 1\n' }) + : { data: CATALOG } + ) + + await get('--out', outDir) + + expect(readFileSync(join(outDir, 'functions/score.js'), 'utf8')).toBe('return 1\n') + expect(JSON.parse(readFileSync(join(outDir, '.sim/lock.json'), 'utf8')).lockVersion).toBe(1) + expect(JSON.parse(readFileSync(join(outDir, '.sim/base.json'), 'utf8')).baseFingerprint).toBe( + 'sf1:x' + ) + expect(existsSync(join(outDir, '.sim/sdk/core.d.ts'))).toBe(true) + expect(existsSync(join(outDir, '.sim/sdk/blocks/agent.d.ts'))).toBe(true) + expect(existsSync(join(outDir, '.sim/sdk/blocks/slack_v2.d.ts'))).toBe(false) + expect(request.mock.calls[1][0]).toBe(CATALOG_PATH) + expect(request.mock.calls[1][1].query).toEqual({ workflowId: WORKFLOW_ID }) + }) + + it('revalidates the cached catalog by hash and reuses it on 304', async () => { + request.mockImplementation(async (path: string) => + path === SOURCE_PATH ? source() : { data: CATALOG } + ) + await get('--out', outDir) + request.mockReset() + request.mockImplementation(async (path: string) => { + if (path === SOURCE_PATH) return source() + throw new SimApiError('Not modified', 304) + }) + rmSync(join(outDir, '.sim/sdk'), { recursive: true }) + + await get('--out', outDir) + + expect(request.mock.calls[1][1].headers).toEqual({ 'if-none-match': `"${CATALOG.hash}"` }) + expect(existsSync(join(outDir, '.sim/sdk/blocks/agent.d.ts'))).toBe(true) + }) + + it('surfaces a 304 when no cached catalog exists rather than writing without types', async () => { + request.mockImplementation(async (path: string) => { + if (path === SOURCE_PATH) return source() + throw new SimApiError('Not modified', 304) + }) + + await expect(get('--out', outDir)).rejects.toThrow('Not modified') + expect(existsSync(join(outDir, 'workflow.ts'))).toBe(false) + }) + + it('refuses a file path that would escape the output directory, writing nothing', async () => { + request.mockImplementation(async (path: string) => + path === SOURCE_PATH ? source({ '../escape.js': 'x' }) : { data: CATALOG } + ) + + await expect(get('--out', outDir)).rejects.toThrow('unsafe file path') + expect(existsSync(join(outDir, '..', 'escape.js'))).toBe(false) + expect(request).toHaveBeenCalledTimes(1) + }) + + it('prints the response unchanged without --out', async () => { + request.mockResolvedValue(source()) + + await get('--annotate-ids') + + expect(request).toHaveBeenCalledTimes(1) + expect(request.mock.calls[0][1].query).toMatchObject({ annotateIds: true }) + expect(existsSync(join(outDir, 'workflow.ts'))).toBe(false) + }) +}) diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-get.ts b/packages/sim-cli/src/commands/protocol/workflow-source-get.ts new file mode 100644 index 00000000000..64b8cd11839 --- /dev/null +++ b/packages/sim-cli/src/commands/protocol/workflow-source-get.ts @@ -0,0 +1,248 @@ +import { mkdir, readFile, writeFile } from 'node:fs/promises' +import { dirname, join, posix } from 'node:path' +import { isRecordLike } from '@sim/utils/object' +import type { BlockCatalog } from '@sim/workflow-code' +import { CORE_DTS, generateSdkTypes } from '@sim/workflow-sdk/codegen' +import type { Command } from 'commander' +import { embedStore } from '../../embed-context' +import { SimApiError } from '../../http/client' +import { callsOperations, type OperationClient } from '../../runtime/called-operations' +import { buildRequest } from '../../runtime/request' +import { saveToFile } from './files-get' +import { printProtocolResult } from './result' + +const OUT_FLAG = 'out' +const SDK_DIR = '.sim/sdk' +const CATALOG_CACHE = '.sim/cache/block-catalog.json' + +/** The part of the source response the writer reads; the contract owns the full shape. */ +interface WorkflowSource { + workflowId: string + workspaceId: string + files: Record + lock: unknown + lockBase: unknown + fingerprint: string + blockTypes: string[] +} + +interface CachedCatalog { + hash: string + catalog: BlockCatalog +} + +/** Enough of a block catalog to narrow and generate from; the server owns the full shape. */ +function isBlockCatalog(value: unknown): value is BlockCatalog { + return ( + isRecordLike(value) && + typeof value.hash === 'string' && + typeof value.sdkMajor === 'number' && + isRecordLike(value.blocks) && + isRecordLike(value.builders) && + isRecordLike(value.triggers) + ) +} + +/** A server-supplied relative path that stays inside the output directory. */ +function isSafeRelativePath(path: string): boolean { + if (!path || path.includes('\\') || path.startsWith('/') || /^[A-Za-z]:/.test(path)) return false + return path.split('/').every((segment) => segment !== '' && segment !== '.' && segment !== '..') +} + +function readSource(raw: unknown): WorkflowSource { + const data = isRecordLike(raw) && isRecordLike(raw.data) ? raw.data : raw + if ( + !isRecordLike(data) || + typeof data.workflowId !== 'string' || + typeof data.workspaceId !== 'string' || + !isRecordLike(data.files) || + typeof data.fingerprint !== 'string' || + !Array.isArray(data.blockTypes) + ) { + throw new SimApiError('The workflow source response was not in the expected shape.', 0) + } + const files: Record = {} + for (const [path, text] of Object.entries(data.files)) { + if (typeof text !== 'string' || !isSafeRelativePath(path)) { + throw new SimApiError(`The workflow source named an unsafe file path: ${path}`, 0) + } + files[path] = text + } + return { + workflowId: data.workflowId, + workspaceId: data.workspaceId, + files, + lock: data.lock, + lockBase: data.lockBase, + fingerprint: data.fingerprint, + blockTypes: data.blockTypes.filter((type): type is string => typeof type === 'string'), + } +} + +/** + * The catalog narrowed to the block types the workflow uses: their blocks, the builders that + * create them, and the triggers they can run. Core declarations come from `core.d.ts`, so this is + * all an editor or agent needs to type-check the file. + */ +function narrowCatalog(catalog: BlockCatalog, types: readonly string[]): BlockCatalog { + const used = new Set(types) + const blocks = Object.fromEntries(Object.entries(catalog.blocks).filter(([t]) => used.has(t))) + const triggerIds = new Set( + Object.values(blocks).flatMap((block) => block.triggers?.available ?? []) + ) + return { + ...catalog, + blocks, + builders: Object.fromEntries( + Object.entries(catalog.builders).filter(([, builder]) => used.has(builder.type)) + ), + triggers: Object.fromEntries( + Object.entries(catalog.triggers).filter(([id]) => triggerIds.has(id)) + ), + } +} + +/** Standalone runs only: an embedded run has no local disk of its own to cache on. */ +async function readCachedCatalog(outDir: string): Promise { + if (embedStore.getStore()) return null + try { + const parsed: unknown = JSON.parse(await readFile(join(outDir, CATALOG_CACHE), 'utf8')) + if (isRecordLike(parsed) && typeof parsed.hash === 'string' && isBlockCatalog(parsed.catalog)) { + return { hash: parsed.hash, catalog: parsed.catalog } + } + } catch {} + return null +} + +/** + * The workflow's compile catalog, revalidated by ETag against the cached copy: a `304` reuses + * it, anything else replaces it. + */ +async function loadCatalog( + client: OperationClient<'getBlockCatalog'>, + source: WorkflowSource, + outDir: string +): Promise<{ catalog: BlockCatalog; fresh: boolean }> { + const cached = await readCachedCatalog(outDir) + try { + const raw = await client.request('getBlockCatalog', { + params: { workspaceId: source.workspaceId }, + query: { workflowId: source.workflowId }, + ...(cached ? { headers: { 'if-none-match': `"${cached.hash}"` } } : {}), + }) + const catalog = isRecordLike(raw) ? raw.data : null + if (!isBlockCatalog(catalog)) { + throw new SimApiError('The block catalog response was not in the expected shape.', 0) + } + return { catalog, fresh: true } + } catch (error) { + if (cached && error instanceof SimApiError && error.status === 304) { + return { catalog: cached.catalog, fresh: false } + } + throw error + } +} + +/** Writes one file under `outDir`, through the host's writer when embedded. */ +async function writeOutFile(outDir: string, relativePath: string, text: string): Promise { + const target = embedStore.getStore() + ? posix.join(outDir, relativePath) + : join(outDir, ...relativePath.split('/')) + if (!embedStore.getStore()) await mkdir(dirname(target), { recursive: true }) + await saveToFile(new Blob([text]).stream(), target, true) +} + +/** Lets an editor or `tsc -p` resolve `@sim/workflow-sdk` to the written declarations. */ +const TSCONFIG = `${JSON.stringify( + { + compilerOptions: { + target: 'ES2022', + lib: ['ES2022'], + module: 'ESNext', + moduleResolution: 'bundler', + moduleDetection: 'force', + types: [], + strict: true, + noEmit: true, + paths: { '@sim/workflow-sdk': [`./${SDK_DIR}/core.d.ts`] }, + }, + include: ['workflow.ts', `${SDK_DIR}/**/*.d.ts`], + }, + null, + 2 +)}\n` + +async function writeSourceTree( + outDir: string, + source: WorkflowSource, + catalog: BlockCatalog +): Promise { + const sdkFiles = generateSdkTypes(narrowCatalog(catalog, source.blockTypes)) + const files: Array<[string, string]> = [ + ...Object.entries(source.files), + ['.sim/lock.json', `${JSON.stringify(source.lock, null, 2)}\n`], + ['.sim/base.json', `${JSON.stringify(source.lockBase, null, 2)}\n`], + [`${SDK_DIR}/core.d.ts`, CORE_DTS], + ...sdkFiles.map((file): [string, string] => [`${SDK_DIR}/${file.path}`, file.text]), + ['tsconfig.json', TSCONFIG], + ] + for (const [path, text] of files) await writeOutFile(outDir, path, text) + return files.length +} + +/** + * Teaches the generated `workflows source get` leaf `--out `: instead of printing the + * response, it writes `workflow.ts`, `functions/*`, `.sim/lock.json`, `.sim/base.json`, the SDK + * declarations for the block types the workflow uses (`.sim/sdk/**`, generated from the block + * catalog, ETag-cached under `.sim/cache`) and a `tsconfig.json` that resolves them. Without + * `--out` the generated handler runs unchanged. Commander offers no way to read the action it + * holds, so it is captured and delegated to, as `runs get` does. + */ +export function attachWorkflowSourceGet(source: Command): void { + const get = source.commands.find((command) => command.name() === 'get') + const held = (get as (Command & { _actionHandler?: unknown }) | undefined)?._actionHandler + if (!get || typeof held !== 'function') { + throw new Error('workflows source get must be registered before --out can be attached to it') + } + const previous = held as (args: unknown[]) => unknown + const connectGet = callsOperations(get, ['getWorkflowSource', 'getBlockCatalog']) + + get.option( + `--${OUT_FLAG} `, + 'Write the source, its lock and SDK type declarations into this directory instead of printing them' + ) + get.action(async (workflowId: string, _options: unknown, command: Command): Promise => { + const flags = command.optsWithGlobals() as Record + const outDir = flags[OUT_FLAG] + if (typeof outDir !== 'string') { + await previous(command.processedArgs) + return + } + const { client, profile } = connectGet() + const request = await buildRequest( + 'getWorkflowSource', + [workflowId], + flags, + profile.workspaceId + ) + const source = readSource( + await client.request('getWorkflowSource', { + params: request.params, + query: request.query, + }) + ) + const { catalog, fresh } = await loadCatalog(client, source, outDir) + const written = await writeSourceTree(outDir, source, catalog) + if (fresh && !embedStore.getStore()) { + const cache: CachedCatalog = { hash: catalog.hash, catalog } + await mkdir(dirname(join(outDir, CATALOG_CACHE)), { recursive: true }) + await writeFile(join(outDir, CATALOG_CACHE), JSON.stringify(cache)) + } + printProtocolResult(profile.output, { + workflowId: source.workflowId, + outDir, + files: written, + fingerprint: source.fingerprint, + }) + }) +} diff --git a/packages/sim-cli/src/generated/v2-api.ts b/packages/sim-cli/src/generated/v2-api.ts index 6c09e741714..73ab04aae80 100644 --- a/packages/sim-cli/src/generated/v2-api.ts +++ b/packages/sim-cli/src/generated/v2-api.ts @@ -8439,6 +8439,7 @@ export type GetWorkflowSourceResponse = { canonicalHash: string catalogVersion: string sdkMajor: number + blockTypes: Array warnings: Array<{ code: string severity: 'error' | 'warning' | 'info' diff --git a/packages/workflow-sdk/scripts/generate-core-text.ts b/packages/workflow-sdk/scripts/generate-core-text.ts new file mode 100644 index 00000000000..62145ff8fe8 --- /dev/null +++ b/packages/workflow-sdk/scripts/generate-core-text.ts @@ -0,0 +1,24 @@ +/** + * Embeds `src/core.d.ts` as a string (`CORE_DTS` in `src/codegen/core-text.generated.ts`), so a + * bundled consumer such as the CLI can write the authoring declarations next to the generated + * block types without the package on disk. `core-text.test.ts` fails when the two drift. + * + * bun scripts/generate-core-text.ts && bunx biome check --write src/codegen + */ + +import { readFileSync, writeFileSync } from 'node:fs' +import path from 'node:path' + +const packageRoot = path.resolve(import.meta.dirname, '..') +const text = readFileSync(path.join(packageRoot, 'src', 'core.d.ts'), 'utf8') + +writeFileSync( + path.join(packageRoot, 'src', 'codegen', 'core-text.generated.ts'), + [ + '// Generated by scripts/generate-core-text.ts from src/core.d.ts; do not edit.', + '', + '/** The text of `core.d.ts`, the workflow SDK authoring declarations. */', + `export const CORE_DTS = ${JSON.stringify(text)}`, + '', + ].join('\n') +) diff --git a/packages/workflow-sdk/src/codegen/core-text.generated.ts b/packages/workflow-sdk/src/codegen/core-text.generated.ts new file mode 100644 index 00000000000..8aac8d71191 --- /dev/null +++ b/packages/workflow-sdk/src/codegen/core-text.generated.ts @@ -0,0 +1,4 @@ +// Generated by scripts/generate-core-text.ts from src/core.d.ts; do not edit. + +/** The text of `core.d.ts`, the workflow SDK authoring declarations. */ +export const CORE_DTS = "/**\n * The authoring surface for Sim workflows written as TypeScript (s2 §2).\n *\n * Nothing declared here runs. `@sim/workflow-code` compiles a workflow file statically, and every\n * runtime export of this package throws `SimSdkNotExecutable`. These declarations exist so an\n * editor, `tsgo --noEmit` or an agent can check a workflow file before the compiler sees it.\n *\n * Block builders (`slack.sendMessage`, `agent`, `trigger.gmail.poller`, ...) are not declared here:\n * they are generated from the block catalog into `blocks/{type}.d.ts`, which augment this module.\n * The generic `block(type, name, params)` covers any stored type without a builder.\n */\n\n/** Plain JSON. */\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json }\n\ndeclare const REF: unique symbol\ndeclare const TEMPLATE: unique symbol\ndeclare const ENV: unique symbol\ndeclare const RESOURCE: unique symbol\ndeclare const TOOL: unique symbol\ndeclare const NODE: unique symbol\ndeclare const FILE_BODY: unique symbol\ndeclare const RAW: unique symbol\n\n/** Any reference, whatever it points at. */\nexport interface AnyRef {\n readonly [REF]: unknown\n}\n\ntype RefPaths = [Json] extends [T]\n ? { readonly [key: string]: Ref }\n : T extends readonly (infer E)[]\n ? { readonly [index: number]: Ref; readonly length: Ref }\n : T extends object\n ? { readonly [K in keyof T]-?: Ref }\n : unknown\n\n/**\n * A typed reference to a block output, compiled to `` (build-spec decision 8).\n * Paths map exactly: `.seg`, `['seg']` and `[n]`. Untyped JSON allows any path.\n */\nexport type Ref = { readonly [REF]: T } & RefPaths\n\n/** Text with references in it, written with one of the tags below. */\nexport type Template = string & { readonly [TEMPLATE]: true }\n\n/** A workspace environment variable, compiled to `{{NAME}}`. */\nexport interface EnvRef {\n readonly [ENV]: string\n}\n\n/** A param value: a literal, a reference, a template or an environment variable. */\nexport type Value = T | AnyRef | Template | EnvRef\n\n/** JSON whose leaves may be references, templates or environment variables. */\nexport type JsonWithRefs =\n | null\n | boolean\n | number\n | string\n | AnyRef\n | Template\n | EnvRef\n | JsonWithRefs[]\n | { [key: string]: JsonWithRefs }\n\n/** A literal union that still accepts any other string (option ids read from values). */\nexport type LiteralUnion = T | (string & {})\n\n/** A `time-input` value, `HH:MM`. */\nexport type TimeString = `${number}:${number}`\n\ntype Interpolation = AnyRef | EnvRef | VarRef | string | number | boolean\n\n/** Text with interpolated references: `` t`New ${cls.category} ticket` ``. */\nexport declare function t(strings: TemplateStringsArray, ...values: Interpolation[]): Template\n/** JavaScript code (condition expressions, inline function code). */\nexport declare const js: typeof t\n/** Python code. */\nexport declare const py: typeof t\n/** Shell code. */\nexport declare const sh: typeof t\n/** JSON text kept verbatim, for bodies an object literal cannot reproduce byte for byte. */\nexport declare const json: typeof t\n/** Markdown text (note content). */\nexport declare const md: typeof t\n\n/** A reference with a non-canonical spelling, such as `ref('Classify.content')`. */\nexport declare function ref(path: string): Ref\n\n/** A stored value outside the generated type (a legacy option id, say), kept verbatim. */\nexport declare function raw(value: unknown): T & { readonly [RAW]: true }\n\n/** A required value that is still missing; compiles to absent, so canvas drafts type-check. */\nexport declare function todo(): never\n\n/** Function code kept in a file next to the workflow (`.js`, `.py` or `.sh`), stored verbatim. */\nexport interface FileBody {\n readonly [FILE_BODY]: string\n}\nexport declare function file(path: `./${string}`): FileBody\n\n/**\n * Environment variable names known to the workspace. `workspace.d.ts` adds one member per name;\n * until it exists `env` accepts any name.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceEnv {}\n\nexport declare const env: keyof WorkspaceEnv extends never\n ? { readonly [name: string]: EnvRef }\n : { readonly [K in keyof WorkspaceEnv]: EnvRef }\n\n/**\n * Workspace resources by stable key, filled in by the generated `workspace.d.ts`. Each map's\n * values describe the resource: a table's row type, a binding's service, a workflow's inputs.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceTables {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceKnowledgeBases {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceBindings {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceWorkflows {}\n\ntype KeyOf = keyof M extends never ? string : Extract\n\nexport type TableKey = KeyOf\nexport type KnowledgeBaseKey = KeyOf\nexport type BindingKey = KeyOf\nexport type WorkflowKey = KeyOf\n\n/** A workspace resource by stable key, compiled to the resource's internal id. */\nexport interface ResourceRef {\n readonly [RESOURCE]: Kind\n readonly key: Key\n}\n\n/** A credential binding: `binding('support-slack')`. */\nexport type Binding = ResourceRef<'credential', Key>\nexport declare function binding(key: K): Binding\n\n/** The columns of a workspace table, or loose JSON when `workspace.d.ts` does not know it. */\nexport type TableColumns = K extends keyof WorkspaceTables\n ? WorkspaceTables[K]\n : { [column: string]: Json }\n/** One stored row: its columns plus the row id. */\nexport type TableRow = TableColumns & { id: string }\n/** Column values written to a row. */\nexport type TableData = K extends keyof WorkspaceTables\n ? { [C in keyof WorkspaceTables[K]]?: Value | JsonWithRefs }\n : { [column: string]: JsonWithRefs }\n\n/** A workspace table: `table('leads')`. Table block operations live on `table.*`. */\nexport type TableRef = ResourceRef<'table', Key>\nexport declare function table(key: K): TableRef\n\n/** A knowledge base: `kb('docs')`. */\nexport type KnowledgeBaseRef = ResourceRef<'knowledge-base', Key>\nexport declare function kb(key: K): KnowledgeBaseRef\n\n/** A workspace skill: `skill('triage')`. */\nexport type SkillRef = ResourceRef<'skill'>\nexport declare function skill(key: string): SkillRef\n\n/** A sandbox image: `sandbox('node-ml')`. */\nexport type SandboxRef = ResourceRef<'sandbox'>\nexport declare function sandbox(key: string): SandboxRef\n\n/** A workspace folder: `folder('reports')`. */\nexport type FolderRef = ResourceRef<'file-folder'>\nexport declare function folder(key: string): FolderRef\n\n/** A workspace file upload: `upload('contracts/acme.pdf')`. */\nexport type Upload = ResourceRef<'file'>\nexport declare function upload(path: string): Upload\n\n/** An opaque provider id chosen in a remote selector: `picked('C0123')`. */\nexport interface Picked {\n readonly [RESOURCE]: 'picked'\n readonly id: string\n}\nexport declare function picked(id: string): Picked\n\n/** A file produced at run time (`file` / `file[]` outputs). */\nexport interface SimFile {\n id: string\n name: string\n url: string\n size: number\n type: string\n key: string\n}\n\n// Agent tools\n\n/** One entry of an agent's `tools` list. */\nexport interface Tool {\n readonly [TOOL]: true\n}\n\n/** How the model may use a tool. */\nexport interface ToolOpts {\n usageControl?: 'auto' | 'force' | 'none'\n usageControlExpression?: string\n title?: string\n}\n\n/** A custom tool by key: `customTool('lookup-order')`. */\nexport declare function customTool(key: string, options?: ToolOpts): Tool\nexport declare namespace customTool {\n /** A custom tool snapshot that has drifted from the workspace tool. */\n function inline(definition: { schema: Json; code: string | Template; title?: string }): Tool\n}\n\n/** An MCP server by key; `mcp('linear').tool('create_issue')`. */\nexport interface McpServerRef extends ResourceRef<'mcp-server'> {\n tool(name: string, options?: ToolOpts & { args?: Record }): Tool\n}\nexport declare function mcp(key: string): McpServerRef\n\n// Graph\n\n/** Block-level fields (`BlockState`), written as the third builder argument. */\nexport interface BlockMeta {\n /** Stored as `enabled: false`. */\n disabled?: true\n /** Protected: apply refuses any change to this block. */\n locked?: true\n /** Exposes the error port without an `onError` edge. */\n errorPort?: boolean\n /** The block-level advanced toggle (`advancedMode`). */\n advancedMode?: boolean\n retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number }\n /** Pair modes that cannot be derived from the value written. */\n modes?: Record\n /** Stale values under hidden conditions, kept verbatim. */\n inactive?: Record\n}\n\n/** Anything an edge can point at. */\nexport type Target = Node | Group\n\n/** A block or container in the graph. */\nexport interface Node {\n readonly [NODE]: true\n /** Wires this node's default port to each target. Returns the target, or a group of them. */\n to(...targets: T): T extends [infer One] ? One : Group\n /** Wires this node's error port to each target. */\n onError(...targets: Target[]): void\n}\n\n/** Several nodes; `.to()` wires every member (fan-in). */\nexport interface Group {\n to(...targets: Target[]): Group\n}\n\n/** A block: a node whose outputs can be referenced. */\nexport type Block = Node & Ref\n\n/** The named ports of a condition or router. */\nexport type Branches = { readonly [P in K]: Node }\n\n/** Trigger builders (`trigger.start`, `trigger.gmail.poller`, ...), generated from the catalog. */\nexport declare namespace trigger {}\n\n/** Builders for hidden legacy block versions (`legacy.slack.send`), generated from the catalog. */\nexport declare namespace legacy {}\n\n/** A raw edge from a handle the SDK has no name for (a legacy or unknown port). */\nexport declare function edge(from: Node, handle: string, to: Target): void\n\n/** Any stored block type without a builder (legacy, unknown or custom), with untyped outputs. */\nexport declare function block(\n type: string,\n name: string,\n params: Record,\n meta?: BlockMeta\n): Block\n\n// Workflow and variables\n\nexport type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'plain'\n\nexport interface VariableDeclaration {\n type: VariableType\n value?: Json\n}\n\nexport type VariableDeclarations = Record\n\ndeclare const VAR: unique symbol\n\n/** A workflow variable, compiled to ``. */\nexport interface VarRef {\n readonly [VAR]: string\n}\n\ntype VariableValue = T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'string' | 'plain'\n ? string\n : Json\n\nexport type VarRefs = {\n readonly [K in keyof V]: VarRef & Ref>\n}\n\n/**\n * Workflow variables by name, untyped. Prefer the `vars` the `workflow()` body receives, which is\n * typed from the declared variables.\n */\nexport declare const vars: { readonly [name: string]: VarRef & Ref }\n\ndeclare const WORKFLOW_DEF: unique symbol\n\n/** The default export of a workflow file. */\nexport interface WorkflowDef {\n readonly [WORKFLOW_DEF]: true\n}\n\n/** A child workflow by key, for `runWorkflow` or as an agent tool. */\nexport interface WorkflowRef extends ResourceRef<'workflow', Key> {\n asTool(options?: ToolOpts): Tool\n}\n\n/** Declares a workflow. The body wires blocks; it never runs. */\nexport declare function workflow>(\n name: string,\n options: { description?: string; variables?: V },\n body: (scope: { vars: VarRefs }) => void\n): WorkflowDef\n/** A child workflow by key: `workflow('enrich-lead')`. */\nexport declare function workflow(key: K): WorkflowRef\n\n// Containers\n\ntype ItemOf = C extends { readonly [REF]: readonly (infer E)[] }\n ? E\n : C extends readonly (infer E)[]\n ? E\n : Json\n\n/** Inside a loop or parallel body. */\nexport interface SubflowScope {\n /** The container's start port, into its first child. */\n readonly start: Node\n readonly index: Ref\n readonly currentItem: Ref\n readonly items: Ref\n}\n\nexport interface SubflowOutput {\n results: Json[]\n}\n\n/** A loop or parallel container. Its `.to()` wires the port taken after it finishes. */\nexport type Container = Block\n\ntype Collection = AnyRef | Template | Json[] | string\n\nexport declare const loop: {\n for(\n name: string,\n params: { count: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n forEach(\n name: string,\n params: { collection: C },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n while(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n doWhile(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n}\n\nexport declare const parallel: {\n count(\n name: string,\n params: { count: number; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n collection(\n name: string,\n params: { collection: C; batchSize?: number },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n}\n\n// Blocks with a source form of their own\n\n/**\n * Params and outputs of the blocks below, generated from the catalog. Each entry is\n * `{ params; output }`; without generated types the params are loose.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface SpecialBuilderTypes {}\n\ntype SpecialParams = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { params: infer P }\n ? P\n : never\n : Record\n\ntype SpecialOutput = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { output: infer O }\n ? O\n : never\n : Json\n\n/** A condition expression, or `true` for the `else` branch. */\nexport type BranchExpression = Template | string | true\n\n/**\n * Keys of a condition written with no rows (`condition('Name', {})`, the source form of rows\n * that were never persisted): the implicit `if` and `else` ports stay addressable.\n */\ntype ConditionKeys = keyof B extends never ? 'if' | 'else' : Extract\ntype RouterKeys = keyof R extends never ? 'route0' : Extract\n\n/** A condition: named branches, the last one `else` when there are two or more. */\nexport declare function condition>(\n name: string,\n branches: B,\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A router: named routes described for the model. */\nexport declare function router>(\n name: string,\n params: SpecialParams<'router'> & { routes: R },\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A function block. `code` is inline (`` js`...` ``) or a file (`file('./functions/x.js')`). */\nexport declare function fn(\n name: string,\n params: SpecialParams<'fn'> & { code: Template | FileBody | string },\n meta?: BlockMeta\n): Block>\n\n/** Runs a child workflow. */\nexport declare function runWorkflow(\n name: string,\n params: SpecialParams<'runWorkflow'>,\n meta?: BlockMeta\n): Block>\n\n/** Pauses for a person; the form in `inputFormat` types `submission`. */\nexport declare function human>(\n name: string,\n params: SpecialParams<'human'> & { inputFormat?: F },\n meta?: BlockMeta\n): Block, 'submission'> & { submission: InputFieldsOutput }>\n\n/** Ends the workflow with an API response. */\nexport declare function response(\n name: string,\n params: SpecialParams<'response'>,\n meta?: BlockMeta\n): Block>\n\n/** Assigns workflow variables. */\nexport declare function setVariables(\n name: string,\n params: SpecialParams<'setVariables'>,\n meta?: BlockMeta\n): Block>\n\ndeclare const ANNOTATION: unique symbol\n\n/** A canvas note: no edges, no outputs. */\nexport interface Annotation {\n readonly [ANNOTATION]: true\n}\nexport declare function note(\n name: string,\n params: SpecialParams<'note'>,\n meta?: BlockMeta\n): Annotation\n\n// Structured param shapes\n\n/** Type names an input-format field may declare. */\nexport type InputFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'file[]'\n\n/** A structured input field: its type plus a default value, description or required flag. */\nexport interface InputFieldSpec {\n type: InputFieldType\n value?: JsonWithRefs\n description?: string\n required?: boolean\n}\n\n/** `input-format` fields by name: `{ subject: 'string', amount: { type: 'number', value: 0 } }`. */\nexport type InputFields = Record\n\ntype InputFieldValue = T extends 'string'\n ? string\n : T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'array'\n ? Json[]\n : T extends 'file[]'\n ? SimFile[]\n : Json\n\n/** The outputs an `input-format` declares. */\nexport type InputFieldsOutput = {\n [K in keyof F]: F[K] extends { type: infer T } ? InputFieldValue : InputFieldValue\n}\n\n/** `response-format` fields: `{ ok: true, id: { type: 'string', value: row.id } }`. */\nexport type ResponseFields = Record\n\n/** An agent message. */\nexport interface Message {\n role: 'system' | 'user' | 'assistant'\n content: Value\n}\n\n/** One `variables-input` assignment. */\nexport interface VariableAssignment {\n variable: VarRef\n value: JsonWithRefs\n}\n\n/** Child workflow inputs by name (`input-mapping`, `workflow-input-mapper`). */\nexport type InputMapping = Record\n\n/** A table filter by column: `{ status: { $eq: 'new' } }`. */\nexport type Filter = Record\n\n/** A table sort by column: `{ createdAt: 'desc' }`. */\nexport type Sort =\n | Record\n | Array<{ column: string; direction: 'asc' | 'desc' }>\n\n/** One knowledge tag filter. */\nexport interface TagFilter {\n tagName: string\n tagValue: Value\n [key: string]: JsonWithRefs\n}\n\n/** One document tag. */\nexport interface DocumentTag {\n tagName: string\n value: Value\n [key: string]: JsonWithRefs\n}\n\n/** One `eval-input` metric. */\nexport interface EvalMetric {\n name: string\n description?: string\n range?: { min: number; max: number }\n [key: string]: JsonWithRefs | undefined\n}\n\n/** One `model-fallback-list` entry. */\nexport interface ModelFallback {\n model: LiteralUnion\n [key: string]: JsonWithRefs\n}\n\n/**\n * Model ids, generated into `models.d.ts` (which adds one member per model). Kept apart from the\n * block files so a model-list change touches one file.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface ModelIds {}\nexport type Model = Extract\n\n/** A JSON Schema `responseFormat`, or `{ name, strict, schema }` around one. */\nexport type ResponseFormat = JsonWithRefs\n\ntype Depth = [never, 0, 1, 2, 3, 4]\n\ntype FromSchema = [D] extends [never]\n ? Json\n : S extends { enum: readonly (infer E)[] }\n ? E\n : S extends { type: 'object'; properties: infer P }\n ? { [K in keyof P]: FromSchema }\n : S extends { type: 'array'; items: infer I }\n ? FromSchema[]\n : S extends { type: 'string' }\n ? string\n : S extends { type: 'number' | 'integer' }\n ? number\n : S extends { type: 'boolean' }\n ? boolean\n : Json\n\n/**\n * The outputs a literal `responseFormat` adds, read from its JSON Schema with recursion capped at\n * depth 4. A template or reference adds untyped JSON.\n */\nexport type ResponseFormatOutput = [RF] extends [undefined]\n ? unknown\n : RF extends { schema: infer S }\n ? FromSchema\n : RF extends { type: 'object'; properties: object }\n ? FromSchema\n : { [key: string]: Json }\n" diff --git a/packages/workflow-sdk/src/codegen/core-text.test.ts b/packages/workflow-sdk/src/codegen/core-text.test.ts new file mode 100644 index 00000000000..8b88bf2d89a --- /dev/null +++ b/packages/workflow-sdk/src/codegen/core-text.test.ts @@ -0,0 +1,11 @@ +import { readFileSync } from 'node:fs' +import path from 'node:path' +import { describe, expect, it } from 'vitest' +import { CORE_DTS } from './core-text.generated' + +describe('CORE_DTS', () => { + it('matches src/core.d.ts, so bundled consumers never write stale declarations', () => { + const source = readFileSync(path.join(import.meta.dirname, '..', 'core.d.ts'), 'utf8') + expect(CORE_DTS).toBe(source) + }) +}) diff --git a/packages/workflow-sdk/src/codegen/index.ts b/packages/workflow-sdk/src/codegen/index.ts index 9b28f9fc06e..1ea5bdaa56f 100644 --- a/packages/workflow-sdk/src/codegen/index.ts +++ b/packages/workflow-sdk/src/codegen/index.ts @@ -1,3 +1,4 @@ +export { CORE_DTS } from './core-text.generated' export { type GenerateSdkTypesFn, generateSdkTypes, type SdkTypeFile } from './generate' export { SPECIAL_BUILDER_KEYS } from './names' export { From f84ab607070b7aedeb20e2cc879c9157c0a2fd9e Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:34:59 -0800 Subject: [PATCH 075/428] test(workflows): prove code_meta survives renames, prunes on delete, follows duplicate and fork, and is no deploy change --- .../persistence/code-meta.integration.ts | 299 ++++++++++++++++++ 1 file changed, 299 insertions(+) create mode 100644 apps/sim/lib/workflows/persistence/code-meta.integration.ts diff --git a/apps/sim/lib/workflows/persistence/code-meta.integration.ts b/apps/sim/lib/workflows/persistence/code-meta.integration.ts new file mode 100644 index 00000000000..91b27fd42be --- /dev/null +++ b/apps/sim/lib/workflows/persistence/code-meta.integration.ts @@ -0,0 +1,299 @@ +/** + * `workflow.code_meta` against real Postgres: it survives a canvas rename (keyed by block id), is + * pruned when blocks or variables are deleted, follows duplicate and fork onto the copied ids, and + * never counts as a deploy change. + */ +import { db } from '@sim/db' +import { + user, + workflow, + workflowBlocks, + workflowDeploymentVersion, + workspace, +} from '@sim/db/schema' +import { deleteWorkspaceFixture, insertWorkspaceFixture } from '@sim/db/testing/workspace-fixtures' +import { generateId } from '@sim/utils/id' +import { + type BlockCatalog, + canonicalize, + encodeAnchor, + type WorkflowCodeMetaV1, +} from '@sim/workflow-code' +import { + pruneWorkflowCodeMeta, + readWorkflowCodeMeta, + writeWorkflowCodeMeta, +} from '@sim/workflow-persistence/code-meta' +import { eq, inArray } from 'drizzle-orm' +import { afterAll, beforeAll, describe, expect, it } from 'vitest' +import { buildLockFromState } from '@/lib/workflows/code/source-lock' +import { checkNeedsRedeployment } from '@/lib/workflows/deployment-status' +import { duplicateWorkflow } from '@/lib/workflows/persistence/duplicate' +import { + loadWorkflowDeploymentSnapshot, + saveWorkflowToNormalizedTables, +} from '@/lib/workflows/persistence/utils' +import { + copyWorkflowStateIntoTarget, + loadWorkflowNameRegistry, +} from '@/ee/workspace-forking/lib/copy/copy-workflows' +import { deriveForkBlockId } from '@/ee/workspace-forking/lib/remap/block-identity' +import type { BlockState, WorkflowState } from '@/stores/workflows/workflow/types' + +const ownerId = generateId() +const workspaceId = generateId() +const forkWorkspaceId = generateId() +const workflowId = generateId() +const fetchId = generateId() +const sendId = generateId() +const cleanupId = generateId() +const variableId = generateId() +const governance = { workspaceId: null, subjectUserId: null } + +/** Identity does not depend on block types, so an empty catalog is enough to canonicalize. */ +const EMPTY_CATALOG: BlockCatalog = { + catalogVersion: 1, + hash: 'integration', + sdkMajor: 1, + blocks: {}, + triggers: {}, + builders: {}, +} + +function functionBlock(id: string, name: string, y: number): BlockState { + return { + id, + type: 'function', + name, + position: { x: 0, y }, + enabled: true, + outputs: {}, + subBlocks: { code: { id: 'code', type: 'code', value: `return '${name}'` } }, + } +} + +function graph(blocks: BlockState[]): WorkflowState { + const ids = new Set(blocks.map((block) => block.id)) + const edges = [ + { id: generateId(), source: fetchId, target: sendId }, + { id: generateId(), source: sendId, target: cleanupId }, + ].filter((edge) => ids.has(edge.source) && ids.has(edge.target)) + return { + blocks: Object.fromEntries(blocks.map((block) => [block.id, block])), + edges, + loops: {}, + parallels: {}, + } +} + +const anchorFetch = encodeAnchor({ kind: 'block', block: fetchId }) +const anchorCleanup = encodeAnchor({ kind: 'param', block: cleanupId, param: 'code' }) +const anchorVariable = encodeAnchor({ kind: 'var', variable: variableId }) + +const storedMeta: WorkflowCodeMetaV1 = { + v: 1, + bindings: { [fetchId]: 'fetchUser', [sendId]: 'notify', [cleanupId]: 'tidy' }, + order: { [fetchId]: 0, [sendId]: 1, [cleanupId]: 2 }, + comments: { + header: [{ text: ' onboarding flow', kind: 'line', placement: 'leading' }], + [anchorFetch]: [{ text: ' loads the account', kind: 'line', placement: 'leading' }], + [anchorCleanup]: [{ text: ' best effort', kind: 'line', placement: 'trailing' }], + [anchorVariable]: [{ text: ' retry budget', kind: 'line', placement: 'trailing' }], + }, +} + +async function storedCodeMeta(id: string): Promise { + const meta = await readWorkflowCodeMeta(db, id) + if (!meta) throw new Error(`workflow ${id} has no code_meta`) + return meta +} + +async function deployCurrentDraft(): Promise { + const state = await loadWorkflowDeploymentSnapshot(workflowId) + if (!state) throw new Error('missing draft') + await db.insert(workflowDeploymentVersion).values({ + id: generateId(), + workflowId, + version: 1, + state, + isActive: true, + }) + await db.update(workflow).set({ isDeployed: true }).where(eq(workflow.id, workflowId)) +} + +beforeAll(async () => { + const now = new Date() + await db.insert(user).values({ + id: ownerId, + name: 'Code meta fixture', + email: `${ownerId}@code-meta.test`, + emailVerified: true, + createdAt: now, + updatedAt: now, + }) + await insertWorkspaceFixture(db, [ + { id: workspaceId, name: 'Code meta source', ownerId, billedAccountUserId: ownerId }, + { id: forkWorkspaceId, name: 'Code meta fork', ownerId, billedAccountUserId: ownerId }, + ]) + await db.insert(workflow).values({ + id: workflowId, + userId: ownerId, + workspaceId, + name: 'Code meta fixture', + lastSynced: now, + createdAt: now, + updatedAt: now, + variables: { + [variableId]: { id: variableId, workflowId, name: 'retries', type: 'number', value: 3 }, + }, + }) + const saved = await saveWorkflowToNormalizedTables( + workflowId, + graph([ + functionBlock(fetchId, 'Fetch user', 0), + functionBlock(sendId, 'Send email', 100), + functionBlock(cleanupId, 'Cleanup', 200), + ]), + governance + ) + expect(saved).toEqual({ success: true }) + await deployCurrentDraft() +}) + +afterAll(async () => { + await deleteWorkspaceFixture(db, inArray(workspace.id, [workspaceId, forkWorkspaceId])) + await db.delete(user).where(eq(user.id, ownerId)) + await db.$client.end() +}) + +describe('workflow.code_meta against real Postgres', () => { + it('stores code_meta without making the draft differ from its deployment', async () => { + expect(await checkNeedsRedeployment(workflowId)).toBe(false) + + await writeWorkflowCodeMeta(db, workflowId, storedMeta) + + expect(await storedCodeMeta(workflowId)).toEqual(storedMeta) + expect(await checkNeedsRedeployment(workflowId)).toBe(false) + const snapshot = await loadWorkflowDeploymentSnapshot(workflowId) + expect(JSON.stringify(snapshot)).not.toContain('fetchUser') + }) + + it('keeps every entry across a canvas rename, so the lock keeps the binding', async () => { + await db + .update(workflowBlocks) + .set({ name: 'Load profile' }) + .where(eq(workflowBlocks.id, fetchId)) + + const meta = await storedCodeMeta(workflowId) + expect(meta).toEqual(storedMeta) + + const state = await loadWorkflowDeploymentSnapshot(workflowId) + if (!state) throw new Error('missing draft') + const canonical = canonicalize(state, { + catalog: EMPTY_CATALOG, + meta: { name: 'Code meta fixture', description: null }, + }) + const lock = buildLockFromState(meta, canonical) + expect(lock.blocks.loadprofile).toMatchObject({ id: fetchId, binding: 'fetchUser', order: 0 }) + expect(lock.variables).toEqual({ retries: variableId }) + }) + + it('prunes a deleted block on a full save and a deleted variable on the realtime path', async () => { + const state = await loadWorkflowDeploymentSnapshot(workflowId) + if (!state) throw new Error('missing draft') + const remaining = Object.values(state.blocks).filter((block) => block.id !== cleanupId) + expect(await saveWorkflowToNormalizedTables(workflowId, graph(remaining), governance)).toEqual({ + success: true, + }) + + const afterDelete = await storedCodeMeta(workflowId) + expect(afterDelete.bindings).toEqual({ [fetchId]: 'fetchUser', [sendId]: 'notify' }) + expect(afterDelete.order).toEqual({ [fetchId]: 0, [sendId]: 1 }) + expect(Object.keys(afterDelete.comments).sort()).toEqual( + [anchorFetch, anchorVariable, 'header'].sort() + ) + + await db.transaction((tx) => + pruneWorkflowCodeMeta(tx, workflowId, { variables: (id) => id !== variableId }) + ) + expect(Object.keys((await storedCodeMeta(workflowId)).comments).sort()).toEqual( + [anchorFetch, 'header'].sort() + ) + }) + + it('re-keys code_meta onto the copy when the workflow is duplicated', async () => { + const copy = await db.transaction((tx) => + duplicateWorkflow({ + sourceWorkflowId: workflowId, + userId: ownerId, + name: 'Code meta copy', + workspaceId, + tx, + }) + ) + + const copiedBlocks = await db + .select({ id: workflowBlocks.id, name: workflowBlocks.name }) + .from(workflowBlocks) + .where(eq(workflowBlocks.workflowId, copy.id)) + const idByName = new Map(copiedBlocks.map((block) => [block.name, block.id])) + const copiedFetch = idByName.get('Load profile') + const copiedSend = idByName.get('Send email') + expect(copiedFetch).toBeDefined() + expect(copiedFetch).not.toBe(fetchId) + + const meta = await storedCodeMeta(copy.id) + expect(meta.bindings).toEqual({ + [copiedFetch ?? '']: 'fetchUser', + [copiedSend ?? '']: 'notify', + }) + expect(Object.keys(meta.comments).sort()).toEqual( + [encodeAnchor({ kind: 'block', block: copiedFetch ?? '' }), 'header'].sort() + ) + expect(JSON.stringify(meta)).not.toContain(fetchId) + expect(await storedCodeMeta(workflowId)).toMatchObject({ bindings: { [fetchId]: 'fetchUser' } }) + }) + + it('re-keys code_meta onto the derived block ids when the workflow is forked', async () => { + const sourceState = await loadWorkflowDeploymentSnapshot(workflowId) + if (!sourceState) throw new Error('missing draft') + const [sourceRow] = await db + .select({ codeMeta: workflow.codeMeta }) + .from(workflow) + .where(eq(workflow.id, workflowId)) + const targetWorkflowId = generateId() + + await db.transaction(async (tx) => { + await copyWorkflowStateIntoTarget({ + tx, + targetWorkflowId, + targetWorkspaceId: forkWorkspaceId, + userId: ownerId, + mode: 'create', + now: new Date(), + sourceState, + sourceMeta: { + name: 'Code meta fixture', + description: null, + folderId: null, + sortOrder: 0, + codeMeta: sourceRow?.codeMeta, + }, + workflowIdMap: new Map([[workflowId, targetWorkflowId]]), + folderIdMap: new Map(), + nameRegistry: await loadWorkflowNameRegistry(tx, forkWorkspaceId), + }) + }) + + const meta = await storedCodeMeta(targetWorkflowId) + expect(meta.bindings).toEqual({ + [deriveForkBlockId(targetWorkflowId, fetchId)]: 'fetchUser', + [deriveForkBlockId(targetWorkflowId, sendId)]: 'notify', + }) + expect(meta.order).toEqual({ + [deriveForkBlockId(targetWorkflowId, fetchId)]: 0, + [deriveForkBlockId(targetWorkflowId, sendId)]: 1, + }) + expect(JSON.stringify(meta)).not.toContain(fetchId) + }) +}) From b7a24c41836d1e75863272b2a3611cc3c9b08760 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:35:30 -0800 Subject: [PATCH 076/428] test(workflow-code): parse code_meta from JSON text in the round-trip property --- packages/workflow-code/src/code-meta.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/workflow-code/src/code-meta.test.ts b/packages/workflow-code/src/code-meta.test.ts index 172d655b12d..2e5e8288c5d 100644 --- a/packages/workflow-code/src/code-meta.test.ts +++ b/packages/workflow-code/src/code-meta.test.ts @@ -238,7 +238,7 @@ describe('code_meta properties', () => { it('every generated value parses back to itself', () => { fc.assert( fc.property(metaArb, ({ meta }) => { - expect(codeMetaEquals(parsed(JSON.parse(JSON.stringify(meta))), meta)).toBe(true) + expect(codeMetaEquals(parsed(JSON.stringify(meta)), meta)).toBe(true) }) ) }) From d65052841a776ee5f55facf92afc6f73180e61e4 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:35:47 -0800 Subject: [PATCH 077/428] refactor(workflows): slim sdk subpath, direct canonical-index imports, compareStrings in codegen - @sim/workflow-code/sdk serves SDK_CORE_EXPORTS and friends without the compiler, so sdk codegen and the sdk-names script no longer load Babel. - codegen/names.ts sorts builder keys with compareStrings instead of a local comparator. - knip drops the stale @babel/parser ignore: the compiler imports it. - subblocks/visibility.ts stops re-exporting canonical-index; its importers read @sim/workflow-code/catalog/canonical-index directly, and a test mock of the old re-export that no longer applies is removed. --- .../components/tools/usage-control.tsx | 2 +- .../components/tool-input/tool-input.tsx | 14 ++++++++------ .../hooks/use-canonical-sub-block-value.ts | 6 ++++-- .../sub-block/hooks/use-depends-on-gate.ts | 2 +- .../sub-block/hooks/use-mcp-block-config.ts | 2 +- .../panel/components/editor/editor.tsx | 10 ++++++---- .../editor/hooks/use-editor-subblock-layout.ts | 2 +- .../workflow-block/workflow-block.tsx | 2 +- .../preview-editor/preview-editor.tsx | 2 +- .../components/block/block.tsx | 2 +- apps/sim/blocks/blocks.test.ts | 2 +- apps/sim/blocks/blocks/slack-resources.test.ts | 2 +- apps/sim/blocks/blocks/slack.test.ts | 2 +- apps/sim/blocks/blocks/video_generator.test.ts | 2 +- apps/sim/blocks/blocks/video_generator.ts | 10 +++++----- apps/sim/blocks/pi-api-key-condition.test.ts | 2 +- apps/sim/blocks/utils.test.ts | 2 +- .../lib/copy/copy-workflows.ts | 2 +- .../lib/promote/cleared-refs.ts | 6 ++---- .../handlers/human-in-the-loop/handler.ts | 4 ++-- apps/sim/hooks/use-reactive-conditions.ts | 2 +- .../core/config/deployment-shape.dom.test.tsx | 2 +- .../lib/mcp/application/operation-access.ts | 2 +- apps/sim/lib/mcp/workflow-config.ts | 6 +++--- .../lib/mothership/agent-cli/engines/deps.ts | 2 +- apps/sim/lib/secrets/references/scan.ts | 2 +- apps/sim/lib/selectors/context.ts | 8 +++++--- apps/sim/lib/webhooks/deploy.ts | 3 +-- .../application/replace-workflow-state.ts | 6 ++---- apps/sim/lib/workflows/autolayout/utils.ts | 6 ++++-- .../blocks/canvas-card-fields.test.ts | 8 +++----- .../lib/workflows/blocks/canvas-card-fields.ts | 4 +++- .../blocks/canvas-sentence-validation.ts | 8 +++++--- apps/sim/lib/workflows/blocks/outputs.ts | 2 +- .../lib/workflows/code/catalog/sdk-names.ts | 2 +- apps/sim/lib/workflows/code/corpus/blocks.ts | 6 ++++-- .../comparison/format-description.test.ts | 4 ---- apps/sim/lib/workflows/comparison/normalize.ts | 2 +- .../sim/lib/workflows/credentials/extractor.ts | 5 ++++- apps/sim/lib/workflows/editing/builders.ts | 7 ++----- apps/sim/lib/workflows/editing/lint.ts | 2 +- apps/sim/lib/workflows/editing/operations.ts | 3 ++- apps/sim/lib/workflows/editing/validation.ts | 10 ++++++---- .../migrations/subblock-migrations.ts | 12 ++++++------ .../persistence/remap-internal-ids.ts | 6 +++--- .../references/dependent-reconfigs.ts | 16 ++++++++-------- .../references/finalize-tool-positions.ts | 2 +- .../references/import-configuration.ts | 8 ++++---- .../workflows/references/remap-references.ts | 18 ++++++++++-------- apps/sim/lib/workflows/references/scan.ts | 2 +- .../lib/workflows/search-replace/indexer.ts | 10 ++++++---- apps/sim/lib/workflows/source/gates.ts | 2 +- apps/sim/lib/workflows/subblocks/context.ts | 6 ++++-- .../lib/workflows/subblocks/dependencies.ts | 2 +- apps/sim/lib/workflows/subblocks/visibility.ts | 17 ----------------- .../workflows/tool-input/param-visibility.ts | 2 +- .../lib/workflows/tool-input/usage-control.ts | 5 ++++- apps/sim/providers/utils.ts | 16 ++++++++-------- apps/sim/scripts/canvas-sentence-spec.ts | 2 +- apps/sim/scripts/saved-credential-contract.ts | 2 +- apps/sim/scripts/validate-fal-image-models.ts | 2 +- apps/sim/scripts/validate-fal-video-models.ts | 2 +- .../scripts/validate-runway-video-models.ts | 2 +- apps/sim/serializer/index.ts | 16 +++++++++------- apps/sim/tools/params.ts | 6 ++++-- apps/sim/triggers/webhook-url.ts | 6 ++---- knip.jsonc | 9 +++------ packages/workflow-code/package.json | 4 ++++ packages/workflow-sdk/src/codegen/names.ts | 10 ++++------ packages/workflow-sdk/src/runtime.test.ts | 2 +- 70 files changed, 184 insertions(+), 183 deletions(-) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/usage-control.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/usage-control.tsx index e79ab62abcd..30df1a62692 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/usage-control.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/components/tools/usage-control.tsx @@ -1,6 +1,6 @@ import { Combobox, cn, Label, Tooltip } from '@sim/emcn' import { ArrowLeftRight } from '@sim/emcn/icons' -import type { CanonicalMode } from '@/lib/workflows/subblocks/visibility' +import type { CanonicalMode } from '@sim/workflow-code/catalog/canonical-index' import type { StoredTool } from '@/lib/workflows/tool-input/types' import { ShortInput } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/short-input' import type { SubBlockConfig } from '@/blocks/types' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx index bd584693029..1f6d3540778 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/components/tool-input/tool-input.tsx @@ -16,6 +16,14 @@ import { } from '@sim/emcn' import { ArrowLeft, ChevronRight, Pencil, Server, Wrench, X } from '@sim/emcn/icons' import { createLogger } from '@sim/logger' +import { + buildCanonicalIndex, + type CanonicalIndex, + type CanonicalModeOverrides, + isCanonicalPair, + resolveCanonicalMode, + scopeCanonicalModesForTool, +} from '@sim/workflow-code/catalog/canonical-index' import { McpIcon, WorkflowIcon } from '@/components/icons' import { McpOperationPolicyEditor } from '@/components/mcp/operation-policy-editor' import { getManagedMcpConnectorIcon } from '@/lib/credential-groups/managed-mcp-connector-icons' @@ -34,14 +42,8 @@ import { } from '@/lib/permission-groups/operation-access' import { resolveStoredToolName } from '@/lib/workflows/subblocks/display' import { - buildCanonicalIndex, - type CanonicalIndex, - type CanonicalModeOverrides, - isCanonicalPair, reindexToolCanonicalModes, - resolveCanonicalMode, resolveDependencyValue, - scopeCanonicalModesForTool, } from '@/lib/workflows/subblocks/visibility' import { buildToolSubBlockId } from '@/lib/workflows/tool-input/synthetic-subblocks' import { diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-canonical-sub-block-value.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-canonical-sub-block-value.ts index 82e89566da9..f1fbe0cd017 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-canonical-sub-block-value.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-canonical-sub-block-value.ts @@ -1,10 +1,12 @@ import { useCallback, useMemo } from 'react' +import type { + CanonicalIndex, + CanonicalModeOverrides, +} from '@sim/workflow-code/catalog/canonical-index' import { isEqual } from 'es-toolkit' import { useStoreWithEqualityFn } from 'zustand/traditional' import { buildCanonicalIndexForSurface, - type CanonicalIndex, - type CanonicalModeOverrides, resolveActiveDependencyValue, resolveDependencyValue, } from '@/lib/workflows/subblocks/visibility' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate.ts index 1f034a62272..4e25fab0fa5 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-depends-on-gate.ts @@ -1,11 +1,11 @@ 'use client' import { useCallback, useMemo } from 'react' +import { isNonEmptyValue } from '@sim/workflow-code/catalog/canonical-index' import { isEqual } from 'es-toolkit' import { useStoreWithEqualityFn } from 'zustand/traditional' import { buildCanonicalIndexForSurface, - isNonEmptyValue, normalizeDependencyValue, parseDependsOn, resolveDependencyValue, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-mcp-block-config.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-mcp-block-config.ts index dc9156052ac..cf4ba01fcdc 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-mcp-block-config.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-mcp-block-config.ts @@ -1,6 +1,6 @@ import { isPlainRecord } from '@sim/utils/object' +import type { CanonicalModeOverrides } from '@sim/workflow-code/catalog/canonical-index' import { resolveMcpBlockConfig } from '@/lib/mcp/workflow-config' -import type { CanonicalModeOverrides } from '@/lib/workflows/subblocks/visibility' import { useSubBlockValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/hooks/use-sub-block-value' import { resolvePreviewContextValue } from '@/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/components/sub-block/utils' import { useWorkflowDiffStore } from '@/stores/workflow-diff/store' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx index 272051ded90..7178dc93dd4 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/editor.tsx @@ -12,6 +12,12 @@ import { SquareArrowUpRight, Unlock, } from '@sim/emcn/icons' +import { + buildCanonicalIndex, + evaluateSubBlockCondition, + isCanonicalPair, + resolveCanonicalMode, +} from '@sim/workflow-code/catalog/canonical-index' import { type BlockRetryConfig, isWorkflowBlockAncestorLocked, @@ -26,13 +32,9 @@ import { resolveMcpBlockConfig } from '@/lib/mcp/workflow-config' import { captureEvent } from '@/lib/posthog/client' import { isRetryEligibleBlock } from '@/lib/workflows/blocks/retry-eligibility' import { - buildCanonicalIndex, - evaluateSubBlockCondition, getCanonicalSubBlocksForSurface, hasAdvancedValues, - isCanonicalPair, isStandaloneAdvancedMode, - resolveCanonicalMode, } from '@/lib/workflows/subblocks/visibility' import { useWorkflowScope } from '@/app/workspace/[workspaceId]/providers/workflow-scope-provider' import { useUserPermissionsContext } from '@/app/workspace/[workspaceId]/providers/workspace-permissions-provider' diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/hooks/use-editor-subblock-layout.ts b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/hooks/use-editor-subblock-layout.ts index 000f0701c29..283161d51a6 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/hooks/use-editor-subblock-layout.ts +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/editor/hooks/use-editor-subblock-layout.ts @@ -1,8 +1,8 @@ import { useCallback, useMemo } from 'react' +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import { buildCanonicalIndexForSurface, buildSubBlockValues, - evaluateSubBlockCondition, isSubBlockFeatureEnabled, isSubBlockHidden, isSubBlockVisibleForMode, diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx index e0350286f52..4995755a223 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/workflow-block/workflow-block.tsx @@ -16,6 +16,7 @@ import { TypeNumber, Wrench, } from '@sim/emcn/icons' +import { buildCanonicalIndex } from '@sim/workflow-code/catalog/canonical-index' import { BLOCK_DIMENSIONS, CanvasSentenceView, @@ -71,7 +72,6 @@ import { resolveWorkflowSelectionLabel, } from '@/lib/workflows/subblocks/display' import { - buildCanonicalIndex, buildCanonicalIndexForSurface, hasAdvancedValues, resolveDependencyValue, diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx index b1c85d14fe4..50e1ebaa6cf 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-editor/preview-editor.tsx @@ -27,12 +27,12 @@ import { X, } from '@sim/emcn/icons' import { formatDuration } from '@sim/utils/formatting' +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import { ReactFlowProvider } from '@xyflow/react' import { DELETED_WORKFLOW_LABEL } from '@/lib/workflows/labels' import { extractReferencePrefixes } from '@/lib/workflows/sanitization/references' import { buildCanonicalIndexForSurface, - evaluateSubBlockCondition, hasAdvancedValues, isSubBlockFeatureEnabled, isSubBlockVisibleForMode, diff --git a/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/components/block/block.tsx b/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/components/block/block.tsx index e5d7fd54389..5ddc1d0a3e0 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/components/block/block.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/components/preview/components/preview-workflow/components/block/block.tsx @@ -2,6 +2,7 @@ import { type CSSProperties, memo, useMemo } from 'react' import { cn, OverflowText } from '@sim/emcn' +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import { CanvasSentenceView, humanizeBlockName, @@ -38,7 +39,6 @@ import { } from '@/lib/workflows/subblocks/display' import { buildCanonicalIndexForSurface, - evaluateSubBlockCondition, isSubBlockFeatureEnabled, isSubBlockVisibleForMode, isToolInputOnlySubBlock, diff --git a/apps/sim/blocks/blocks.test.ts b/apps/sim/blocks/blocks.test.ts index 1cb51e664d2..9a0bddad5e4 100644 --- a/apps/sim/blocks/blocks.test.ts +++ b/apps/sim/blocks/blocks.test.ts @@ -2,7 +2,7 @@ import { describe, expect, it, vi } from 'vitest' vi.unmock('@/blocks/registry') -import { evaluateSubBlockCondition } from '@/lib/workflows/subblocks/visibility' +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import { getAllBlocks, getBlock } from '@/blocks/registry' describe.concurrent('Blocks Module', () => { diff --git a/apps/sim/blocks/blocks/slack-resources.test.ts b/apps/sim/blocks/blocks/slack-resources.test.ts index 4de45ebf3b8..7cb43c44bbf 100644 --- a/apps/sim/blocks/blocks/slack-resources.test.ts +++ b/apps/sim/blocks/blocks/slack-resources.test.ts @@ -1,5 +1,5 @@ +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import { describe, expect, it } from 'vitest' -import { evaluateSubBlockCondition } from '@/lib/workflows/subblocks/visibility' import { getSlackV2ActionSubBlocks, SlackV2Block } from '@/blocks/blocks/slack' function visibleFields(operation: string, values: Record = {}) { diff --git a/apps/sim/blocks/blocks/slack.test.ts b/apps/sim/blocks/blocks/slack.test.ts index ba244f1b057..79aa08db200 100644 --- a/apps/sim/blocks/blocks/slack.test.ts +++ b/apps/sim/blocks/blocks/slack.test.ts @@ -1,5 +1,5 @@ +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import { describe, expect, it } from 'vitest' -import { evaluateSubBlockCondition } from '@/lib/workflows/subblocks/visibility' import { SlackV2Block } from '@/blocks/blocks/slack' function mapSlackV2Params(params: Record): Record { diff --git a/apps/sim/blocks/blocks/video_generator.test.ts b/apps/sim/blocks/blocks/video_generator.test.ts index 5b2fd18c33c..2daaea5c1e0 100644 --- a/apps/sim/blocks/blocks/video_generator.test.ts +++ b/apps/sim/blocks/blocks/video_generator.test.ts @@ -1,5 +1,5 @@ +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import { describe, expect, it } from 'vitest' -import { evaluateSubBlockCondition } from '@/lib/workflows/subblocks/visibility' import { VideoGeneratorV3Block } from '@/blocks/blocks/video_generator' const frame = { id: 'f', name: 'frame.png', url: '', size: 3, type: 'image/png', key: 'k' } diff --git a/apps/sim/blocks/blocks/video_generator.ts b/apps/sim/blocks/blocks/video_generator.ts index f03a36463d9..49d8b50e798 100644 --- a/apps/sim/blocks/blocks/video_generator.ts +++ b/apps/sim/blocks/blocks/video_generator.ts @@ -1,4 +1,8 @@ import { isRecordLike } from '@sim/utils/object' +import type { + CanonicalGroup, + CanonicalModeOverrides, +} from '@sim/workflow-code/catalog/canonical-index' import { VideoIcon } from '@/components/icons' import { directVideoDefaults, @@ -11,11 +15,7 @@ import { getFalVideoModel, getFalVideoVariant, } from '@/lib/media/fal-video-catalog' -import { - type CanonicalGroup, - type CanonicalModeOverrides, - resolveActiveCanonicalValue, -} from '@/lib/workflows/subblocks/visibility' +import { resolveActiveCanonicalValue } from '@/lib/workflows/subblocks/visibility' import { AuthMode, type BlockConfig, IntegrationType, type SubBlockConfig } from '@/blocks/types' import { normalizeFileInput, parseOptionalBooleanInput } from '@/blocks/utils' diff --git a/apps/sim/blocks/pi-api-key-condition.test.ts b/apps/sim/blocks/pi-api-key-condition.test.ts index 8f7dcb6dc4c..ebe8da38ebb 100644 --- a/apps/sim/blocks/pi-api-key-condition.test.ts +++ b/apps/sim/blocks/pi-api-key-condition.test.ts @@ -1,6 +1,6 @@ import { resetEnvFlagsMock, setEnvFlags } from '@sim/testing' +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import { afterAll, afterEach, beforeEach, describe, expect, it } from 'vitest' -import { evaluateSubBlockCondition } from '@/lib/workflows/subblocks/visibility' import { PiBlock } from '@/blocks/blocks/pi' import { getHostedModels } from '@/providers/models' diff --git a/apps/sim/blocks/utils.test.ts b/apps/sim/blocks/utils.test.ts index 5f038bd3fb2..9d81b8f0d4e 100644 --- a/apps/sim/blocks/utils.test.ts +++ b/apps/sim/blocks/utils.test.ts @@ -58,8 +58,8 @@ vi.mock('@/stores/providers/store', () => ({ vi.mock('@/lib/oauth/utils', () => oauthUtilsMock) +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import { S3Icon } from '@/components/icons' -import { evaluateSubBlockCondition } from '@/lib/workflows/subblocks/visibility' import type { BlockConfig } from '@/blocks/types' import { getApiKeyCondition, diff --git a/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts b/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts index 82b4bb95c6f..cc8e46e30d9 100644 --- a/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts +++ b/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts @@ -2,6 +2,7 @@ import { folder as folderTable, workflow, workflowBlocks } from '@sim/db/schema' import { createLogger } from '@sim/logger' import { generateId } from '@sim/utils/id' import { isRecordLike } from '@sim/utils/object' +import type { CanonicalModeOverrides } from '@sim/workflow-code/catalog/canonical-index' import { and, eq, inArray, isNull } from 'drizzle-orm' import type { FolderResourceType } from '@/lib/api/contracts/folders' import { generateRequestId } from '@/lib/core/utils/request' @@ -26,7 +27,6 @@ import { replaceCustomBlockInputs, type SubBlockTransform, } from '@/lib/workflows/references/remap-references' -import type { CanonicalModeOverrides } from '@/lib/workflows/subblocks/visibility' import { deriveForkBlockId, type ForkBlockIdResolver, diff --git a/apps/sim/ee/workspace-forking/lib/promote/cleared-refs.ts b/apps/sim/ee/workspace-forking/lib/promote/cleared-refs.ts index ac82d2ff698..eb960d67e9a 100644 --- a/apps/sim/ee/workspace-forking/lib/promote/cleared-refs.ts +++ b/apps/sim/ee/workspace-forking/lib/promote/cleared-refs.ts @@ -1,5 +1,6 @@ import { mcpServers, workflow } from '@sim/db/schema' import { isRecordLike } from '@sim/utils/object' +import type { CanonicalModeOverrides } from '@sim/workflow-code/catalog/canonical-index' import { and, eq, inArray } from 'drizzle-orm' import type { ForkClearedRef, @@ -25,10 +26,7 @@ import { filterExistingForkTargets, loadForkCopyableResourceLabels, } from '@/lib/workflows/references/resources' -import { - buildSubBlockValues, - type CanonicalModeOverrides, -} from '@/lib/workflows/subblocks/visibility' +import { buildSubBlockValues } from '@/lib/workflows/subblocks/visibility' import { getBlock } from '@/blocks/registry' import { isForkCopyableKind } from '@/ee/workspace-forking/lib/promote/promote-plan' import { diff --git a/apps/sim/executor/handlers/human-in-the-loop/handler.ts b/apps/sim/executor/handlers/human-in-the-loop/handler.ts index c24812b6377..6180ce47d46 100644 --- a/apps/sim/executor/handlers/human-in-the-loop/handler.ts +++ b/apps/sim/executor/handlers/human-in-the-loop/handler.ts @@ -1,12 +1,12 @@ import { createLogger } from '@sim/logger' import { isRecordLike } from '@sim/utils/object' -import { getBaseUrl } from '@/lib/core/utils/urls' import { buildCanonicalIndex, type CanonicalGroup, isCanonicalPair, scopeCanonicalModesForTool, -} from '@/lib/workflows/subblocks/visibility' +} from '@sim/workflow-code/catalog/canonical-index' +import { getBaseUrl } from '@/lib/core/utils/urls' import { getBlock } from '@/blocks/registry' import type { BlockOutput } from '@/blocks/types' import { diff --git a/apps/sim/hooks/use-reactive-conditions.ts b/apps/sim/hooks/use-reactive-conditions.ts index c9cef95fc94..539b53140c9 100644 --- a/apps/sim/hooks/use-reactive-conditions.ts +++ b/apps/sim/hooks/use-reactive-conditions.ts @@ -1,5 +1,5 @@ import { useCallback, useMemo } from 'react' -import type { CanonicalModeOverrides } from '@/lib/workflows/subblocks/visibility' +import type { CanonicalModeOverrides } from '@sim/workflow-code/catalog/canonical-index' import { buildCanonicalIndexForSurface, resolveDependencyValue, diff --git a/apps/sim/lib/core/config/deployment-shape.dom.test.tsx b/apps/sim/lib/core/config/deployment-shape.dom.test.tsx index 423cad82c9d..2278a9cf5d0 100644 --- a/apps/sim/lib/core/config/deployment-shape.dom.test.tsx +++ b/apps/sim/lib/core/config/deployment-shape.dom.test.tsx @@ -26,6 +26,7 @@ vi.unmock('@/lib/core/config/env-flags') vi.mock('@/lib/oauth/utils', () => oauthUtilsMock) vi.mock('@/providers/utils', () => providersUtilsMock) +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import type { DeploymentShape } from '@/lib/api/contracts/workspaces' import { getDeploymentShape, @@ -35,7 +36,6 @@ import { useDeploymentShape, } from '@/lib/core/config/deployment-shape' import { PUBLIC_ENV_ATTRIBUTE } from '@/lib/core/config/env' -import { evaluateSubBlockCondition } from '@/lib/workflows/subblocks/visibility' import { getApiKeyCondition } from '@/blocks/utils' ;(globalThis as { IS_REACT_ACT_ENVIRONMENT?: boolean }).IS_REACT_ACT_ENVIRONMENT = true diff --git a/apps/sim/lib/mcp/application/operation-access.ts b/apps/sim/lib/mcp/application/operation-access.ts index c495724468c..b230c66d309 100644 --- a/apps/sim/lib/mcp/application/operation-access.ts +++ b/apps/sim/lib/mcp/application/operation-access.ts @@ -2,6 +2,7 @@ import type { Principal } from '@sim/auth/principal' import { db } from '@sim/db' import { workflowDeploymentVersion } from '@sim/db/schema' import { isPlainRecord } from '@sim/utils/object' +import type { CanonicalModeOverrides } from '@sim/workflow-code/catalog/canonical-index' import { loadWorkflowFromNormalizedTablesRaw } from '@sim/workflow-persistence/load' import { and, eq } from 'drizzle-orm' import { OrchestrationError } from '@/lib/core/orchestration/types' @@ -12,7 +13,6 @@ import { } from '@/lib/mcp/operation-policy' import { resolveMcpToolBinding } from '@/lib/mcp/tool-binding' import { normalizeMcpToolAttachments, resolveMcpBlockConfig } from '@/lib/mcp/workflow-config' -import type { CanonicalModeOverrides } from '@/lib/workflows/subblocks/visibility' function matchesTarget(value: unknown, targetId: string): boolean { return ( diff --git a/apps/sim/lib/mcp/workflow-config.ts b/apps/sim/lib/mcp/workflow-config.ts index e2d326be9c5..6fe1f7ddddb 100644 --- a/apps/sim/lib/mcp/workflow-config.ts +++ b/apps/sim/lib/mcp/workflow-config.ts @@ -1,11 +1,11 @@ import { filterUndefined, isPlainRecord, omit } from '@sim/utils/object' -import { isMcpRuntimeReference, normalizeMcpOperationPolicy } from '@/lib/mcp/operation-policy' import { type CanonicalGroup, type CanonicalModeOverrides, - resolveActiveCanonicalValue, resolveCanonicalMode, -} from '@/lib/workflows/subblocks/visibility' +} from '@sim/workflow-code/catalog/canonical-index' +import { isMcpRuntimeReference, normalizeMcpOperationPolicy } from '@/lib/mcp/operation-policy' +import { resolveActiveCanonicalValue } from '@/lib/workflows/subblocks/visibility' export const MCP_FIELD_GROUPS = { server: { canonicalId: 'server', basicId: 'serverSelector', advancedIds: ['serverReference'] }, diff --git a/apps/sim/lib/mothership/agent-cli/engines/deps.ts b/apps/sim/lib/mothership/agent-cli/engines/deps.ts index a9ffacaae86..9bee780aa69 100644 --- a/apps/sim/lib/mothership/agent-cli/engines/deps.ts +++ b/apps/sim/lib/mothership/agent-cli/engines/deps.ts @@ -1,9 +1,9 @@ import { isRecordLike, toRecord } from '@sim/utils/object' +import type { CanonicalModeOverrides } from '@sim/workflow-code/catalog/canonical-index' import { MCP_STRUCTURED_CONTENT_OUTPUT } from '@/lib/mcp/output-schema' import { fetchWorkflowState } from '@/lib/mothership/agent-cli/engines/workflow-state' import { type AgentCliEngine, agentCliFail, agentCliOk } from '@/lib/mothership/agent-cli/types' import { getMcpStructuredContentOutputs } from '@/lib/workflows/blocks/outputs' -import type { CanonicalModeOverrides } from '@/lib/workflows/subblocks/visibility' import { TriggerUtils } from '@/lib/workflows/triggers/triggers' import { normalizeName, SPECIAL_REFERENCE_PREFIXES } from '@/executor/constants' import { createEnvVarPattern, createReferencePattern } from '@/executor/utils/reference-validation' diff --git a/apps/sim/lib/secrets/references/scan.ts b/apps/sim/lib/secrets/references/scan.ts index 1a310870d2c..d16fe71922c 100644 --- a/apps/sim/lib/secrets/references/scan.ts +++ b/apps/sim/lib/secrets/references/scan.ts @@ -1,10 +1,10 @@ import { db } from '@sim/db' import { customTools, mcpServers, workflow, workflowBlocks } from '@sim/db/schema' import { createLogger } from '@sim/logger' +import type { CanonicalModeOverrides } from '@sim/workflow-code/catalog/canonical-index' import { and, asc, eq, isNull, sql } from 'drizzle-orm' import type { SubBlockRecord } from '@/lib/workflows/persistence/remap-internal-ids' import { ENV_REF_PATTERN, remapSubBlocks } from '@/lib/workflows/references/remap-references' -import type { CanonicalModeOverrides } from '@/lib/workflows/subblocks/visibility' import { isSyntheticToolSubBlockId } from '@/lib/workflows/tool-input/synthetic-subblocks' const logger = createLogger('SecretReferenceScan') diff --git a/apps/sim/lib/selectors/context.ts b/apps/sim/lib/selectors/context.ts index 49e230e7afe..83d8b56fcd7 100644 --- a/apps/sim/lib/selectors/context.ts +++ b/apps/sim/lib/selectors/context.ts @@ -1,3 +1,8 @@ +import { + buildCanonicalIndex, + type CanonicalModeOverrides, + evaluateSubBlockCondition, +} from '@sim/workflow-code/catalog/canonical-index' import { getSelectorManifestEntry, type SelectorKey } from '@/lib/selectors/manifest' import { type SelectorContext, @@ -5,10 +10,7 @@ import { selectorContextKeys, } from '@/lib/selectors/types' import { - buildCanonicalIndex, buildSubBlockValues, - type CanonicalModeOverrides, - evaluateSubBlockCondition, resolveActiveCanonicalValue, } from '@/lib/workflows/subblocks/visibility' import { getBlock } from '@/blocks' diff --git a/apps/sim/lib/webhooks/deploy.ts b/apps/sim/lib/webhooks/deploy.ts index 7749bed3ac7..ab6256866db 100644 --- a/apps/sim/lib/webhooks/deploy.ts +++ b/apps/sim/lib/webhooks/deploy.ts @@ -4,6 +4,7 @@ import { createLogger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' import { generateShortId } from '@sim/utils/id' import { omit, toRecord } from '@sim/utils/object' +import { buildCanonicalIndex, isCanonicalPair } from '@sim/workflow-code/catalog/canonical-index' import { and, asc, eq, inArray, isNull, ne, or } from 'drizzle-orm' import type { NextRequest } from 'next/server' import { isSlackExtendedScopesEnabled } from '@/lib/core/config/env-flags' @@ -48,9 +49,7 @@ import { isDeploymentVersionProtectedByCurrentOperation, } from '@/lib/workflows/persistence/deployment-operations' import { - buildCanonicalIndex, buildSubBlockValues, - isCanonicalPair, resolveActiveCanonicalValue, } from '@/lib/workflows/subblocks/visibility' import type { SubBlockConfig } from '@/blocks/types' diff --git a/apps/sim/lib/workflows/application/replace-workflow-state.ts b/apps/sim/lib/workflows/application/replace-workflow-state.ts index d4e337cb7f2..4bcafb107b9 100644 --- a/apps/sim/lib/workflows/application/replace-workflow-state.ts +++ b/apps/sim/lib/workflows/application/replace-workflow-state.ts @@ -7,6 +7,7 @@ import { } from '@sim/auth/principal' import { db } from '@sim/db' import { createLogger } from '@sim/logger' +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' import { principalAuditSource } from '@/lib/core/application' import { OrchestrationError } from '@/lib/core/orchestration/types' @@ -29,10 +30,7 @@ import { } from '@/lib/workflows/persistence/replace-normalized-state' import { loadWorkflowFromNormalizedTables } from '@/lib/workflows/persistence/utils' import { validateWorkflowState } from '@/lib/workflows/sanitization/validation' -import { - buildSubBlockValues, - evaluateSubBlockCondition, -} from '@/lib/workflows/subblocks/visibility' +import { buildSubBlockValues } from '@/lib/workflows/subblocks/visibility' import { getToolBindingAuthoringSchema, validateToolBindingAuthoring, diff --git a/apps/sim/lib/workflows/autolayout/utils.ts b/apps/sim/lib/workflows/autolayout/utils.ts index a4364464ac3..5d73a9e352d 100644 --- a/apps/sim/lib/workflows/autolayout/utils.ts +++ b/apps/sim/lib/workflows/autolayout/utils.ts @@ -1,3 +1,7 @@ +import { + type CanonicalModeOverrides, + evaluateSubBlockCondition, +} from '@sim/workflow-code/catalog/canonical-index' import { BLOCK_DIMENSIONS, CONTAINER_DIMENSIONS, @@ -30,8 +34,6 @@ import { getDisplayValue, hasDisplayableRowValue } from '@/lib/workflows/subbloc import { buildCanonicalIndexForSurface, buildSubBlockValues, - type CanonicalModeOverrides, - evaluateSubBlockCondition, isSubBlockFeatureEnabled, isSubBlockHidden, isSubBlockVisibleForMode, diff --git a/apps/sim/lib/workflows/blocks/canvas-card-fields.test.ts b/apps/sim/lib/workflows/blocks/canvas-card-fields.test.ts index f6c946d06a8..cc073a5bfca 100644 --- a/apps/sim/lib/workflows/blocks/canvas-card-fields.test.ts +++ b/apps/sim/lib/workflows/blocks/canvas-card-fields.test.ts @@ -4,13 +4,11 @@ * `@/blocks/registry` is globally mocked for import cost, so these read `BLOCK_REGISTRY` * directly — the point of the sweep is that it sees the actual shipped block definitions. */ + +import { buildCanonicalIndex, isCanonicalPair } from '@sim/workflow-code/catalog/canonical-index' import { describe, expect, it } from 'vitest' import { getCardSubBlocks } from '@/lib/workflows/blocks/canvas-card-fields' -import { - buildCanonicalIndex, - isCanonicalPair, - shouldUseSubBlockForTriggerModeCanonicalIndex, -} from '@/lib/workflows/subblocks/visibility' +import { shouldUseSubBlockForTriggerModeCanonicalIndex } from '@/lib/workflows/subblocks/visibility' import { BLOCK_REGISTRY } from '@/blocks/registry-maps' import type { BlockConfig } from '@/blocks/types' diff --git a/apps/sim/lib/workflows/blocks/canvas-card-fields.ts b/apps/sim/lib/workflows/blocks/canvas-card-fields.ts index 39388c1390d..f2abfcd09e2 100644 --- a/apps/sim/lib/workflows/blocks/canvas-card-fields.ts +++ b/apps/sim/lib/workflows/blocks/canvas-card-fields.ts @@ -1,7 +1,9 @@ import { - buildCanonicalIndexForSurface, type CanonicalModeOverrides, evaluateSubBlockCondition, +} from '@sim/workflow-code/catalog/canonical-index' +import { + buildCanonicalIndexForSurface, isSubBlockFeatureEnabled, isSubBlockHidden, isSubBlockVisibleForMode, diff --git a/apps/sim/lib/workflows/blocks/canvas-sentence-validation.ts b/apps/sim/lib/workflows/blocks/canvas-sentence-validation.ts index 7f0ce41f925..7189ad099ec 100644 --- a/apps/sim/lib/workflows/blocks/canvas-sentence-validation.ts +++ b/apps/sim/lib/workflows/blocks/canvas-sentence-validation.ts @@ -1,3 +1,8 @@ +import { + buildCanonicalIndex, + type CanonicalIndex, + isCanonicalPair, +} from '@sim/workflow-code/catalog/canonical-index' import { getSeededSubBlockValues } from '@/lib/workflows/blocks/canvas-card-fields' import { getOperationSubBlockId } from '@/lib/workflows/blocks/canvas-sentence' import { toImperativeLead } from '@/lib/workflows/blocks/canvas-sentence-imperative' @@ -5,9 +10,6 @@ import { resolveFieldNoun, startsWithVowelSound } from '@/lib/workflows/blocks/c import { renderSentenceReadings } from '@/lib/workflows/blocks/canvas-sentence-render' import { resolveTriggerSentence } from '@/lib/workflows/blocks/canvas-trigger-sentence' import { - buildCanonicalIndex, - type CanonicalIndex, - isCanonicalPair, isSubBlockVisibleForMode, isToolInputOnlySubBlock, isTriggerModeSubBlock, diff --git a/apps/sim/lib/workflows/blocks/outputs.ts b/apps/sim/lib/workflows/blocks/outputs.ts index 24a44465568..295b5cb2a38 100644 --- a/apps/sim/lib/workflows/blocks/outputs.ts +++ b/apps/sim/lib/workflows/blocks/outputs.ts @@ -1,5 +1,6 @@ import { createLogger } from '@sim/logger' import { toRecordOrNull } from '@sim/utils/object' +import type { CanonicalModeOverrides } from '@sim/workflow-code/catalog/canonical-index' import { extractFieldsFromSchema, parseResponseFormatSafely, @@ -14,7 +15,6 @@ import { resolveMcpBlockConfig } from '@/lib/mcp/workflow-config' import { getJevAnswerOutput } from '@/lib/workflows/blocks/jev-outputs' import { normalizeInputFormatValue } from '@/lib/workflows/input-format' import { containsReference } from '@/lib/workflows/sanitization/references' -import type { CanonicalModeOverrides } from '@/lib/workflows/subblocks/visibility' import { classifyStartBlockType, StartBlockPath } from '@/lib/workflows/triggers/triggers' import { TRIGGER_TYPES } from '@/lib/workflows/triggers/types' import { diff --git a/apps/sim/lib/workflows/code/catalog/sdk-names.ts b/apps/sim/lib/workflows/code/catalog/sdk-names.ts index 0f7e1c041e7..a42de21a454 100644 --- a/apps/sim/lib/workflows/code/catalog/sdk-names.ts +++ b/apps/sim/lib/workflows/code/catalog/sdk-names.ts @@ -1,5 +1,5 @@ import { compareStrings, stripVersionSuffix } from '@sim/utils/string' -import { SDK_CORE_EXPORTS, SDK_RESERVED_IDENTIFIERS } from '@sim/workflow-code' +import { SDK_CORE_EXPORTS, SDK_RESERVED_IDENTIFIERS } from '@sim/workflow-code/sdk' import type { BlockConfig, SubBlockConfig } from '@/blocks/types' /** diff --git a/apps/sim/lib/workflows/code/corpus/blocks.ts b/apps/sim/lib/workflows/code/corpus/blocks.ts index 9ebc28d0395..5cd521f5110 100644 --- a/apps/sim/lib/workflows/code/corpus/blocks.ts +++ b/apps/sim/lib/workflows/code/corpus/blocks.ts @@ -5,6 +5,10 @@ * type, hidden ones `null`, and `data.canonicalModes` explicit for every pair. */ +import { + evaluateSubBlockCondition, + isCanonicalPair, +} from '@sim/workflow-code/catalog/canonical-index' import type { SeededRandom } from '@sim/workflow-code/proof/random' import { type FillContext, @@ -14,8 +18,6 @@ import { import { buildCanonicalIndexForSurface, buildDefaultCanonicalModes, - evaluateSubBlockCondition, - isCanonicalPair, withCanonicalModes, } from '@/lib/workflows/subblocks/visibility' import type { BlockConfig, SubBlockConfig } from '@/blocks/types' diff --git a/apps/sim/lib/workflows/comparison/format-description.test.ts b/apps/sim/lib/workflows/comparison/format-description.test.ts index 72d545eb282..506b69918b1 100644 --- a/apps/sim/lib/workflows/comparison/format-description.test.ts +++ b/apps/sim/lib/workflows/comparison/format-description.test.ts @@ -6,10 +6,6 @@ const { mockLoadAllSelectorOptions } = vi.hoisted(() => ({ mockLoadAllSelectorOptions: vi.fn(), })) -vi.mock('@/lib/workflows/subblocks/visibility', () => ({ - isNonEmptyValue: (v: unknown) => v !== null && v !== undefined && v !== '', -})) - vi.mock('@/triggers/constants', () => ({ SYSTEM_SUBBLOCK_IDS: [], TRIGGER_RUNTIME_SUBBLOCK_IDS: [], diff --git a/apps/sim/lib/workflows/comparison/normalize.ts b/apps/sim/lib/workflows/comparison/normalize.ts index 18ff11bb866..6b04cb6e1b2 100644 --- a/apps/sim/lib/workflows/comparison/normalize.ts +++ b/apps/sim/lib/workflows/comparison/normalize.ts @@ -4,12 +4,12 @@ */ import { isRecordLike } from '@sim/utils/object' +import { isNonEmptyValue } from '@sim/workflow-code/catalog/canonical-index' import { normalizeWorkflowEdgeSourceHandle, normalizeWorkflowEdgeTargetHandle, } from '@sim/workflow-types/workflow' import type { Edge } from '@xyflow/react' -import { isNonEmptyValue } from '@/lib/workflows/subblocks/visibility' import { isSyntheticToolSubBlockId } from '@/lib/workflows/tool-input/synthetic-subblocks' import type { BlockState, diff --git a/apps/sim/lib/workflows/credentials/extractor.ts b/apps/sim/lib/workflows/credentials/extractor.ts index 9f8a777865e..912de0a0fa4 100644 --- a/apps/sim/lib/workflows/credentials/extractor.ts +++ b/apps/sim/lib/workflows/credentials/extractor.ts @@ -1,11 +1,14 @@ import { isPlainRecord } from '@sim/utils/object' +import { + evaluateSubBlockCondition, + isNonEmptyValue, +} from '@sim/workflow-code/catalog/canonical-index' import { isWholeEnvVarReference } from '@/lib/workflows/blocks/fallback-models' import { isRemovedSubblockId } from '@/lib/workflows/migrations/subblock-migrations' import { coerceObjectArray } from '@/lib/workflows/persistence/remap-internal-ids' import { getToolInputParamConfigs } from '@/lib/workflows/search-replace/indexer' import { WORKFLOW_SEARCH_SUBBLOCK_RESOURCE_TYPES } from '@/lib/workflows/search-replace/resources/registry' import { setValueAtPath } from '@/lib/workflows/search-replace/value-walker' -import { evaluateSubBlockCondition, isNonEmptyValue } from '@/lib/workflows/subblocks/visibility' import { parseStoredToolInputValue } from '@/lib/workflows/tool-input/types' import { getBlock } from '@/blocks/registry' import type { SubBlockConfig } from '@/blocks/types' diff --git a/apps/sim/lib/workflows/editing/builders.ts b/apps/sim/lib/workflows/editing/builders.ts index 9552f4c8876..89664aa70ec 100644 --- a/apps/sim/lib/workflows/editing/builders.ts +++ b/apps/sim/lib/workflows/editing/builders.ts @@ -1,6 +1,7 @@ import { createLogger } from '@sim/logger' import { generateId, isValidUuid } from '@sim/utils/id' import { sortObjectKeysDeep } from '@sim/utils/object' +import { buildCanonicalIndex, isCanonicalPair } from '@sim/workflow-code/catalog/canonical-index' import { type BlockRetryConfig, normalizeBlockRetryTries, @@ -21,11 +22,7 @@ import { } from '@/lib/permission-groups/operation-access' import { getEffectiveBlockOutputs } from '@/lib/workflows/blocks/outputs' import { isRetryEligibleBlock } from '@/lib/workflows/blocks/retry-eligibility' -import { - buildCanonicalIndex, - buildDefaultCanonicalModes, - isCanonicalPair, -} from '@/lib/workflows/subblocks/visibility' +import { buildDefaultCanonicalModes } from '@/lib/workflows/subblocks/visibility' import { applyAgentToolUsageControlModes } from '@/lib/workflows/tool-input/usage-control' import { hasTriggerCapability } from '@/lib/workflows/triggers/utils' import { getBlock } from '@/blocks/registry' diff --git a/apps/sim/lib/workflows/editing/lint.ts b/apps/sim/lib/workflows/editing/lint.ts index 0701c9b16c4..0471442edb6 100644 --- a/apps/sim/lib/workflows/editing/lint.ts +++ b/apps/sim/lib/workflows/editing/lint.ts @@ -1,5 +1,6 @@ import { toRecordOrNull } from '@sim/utils/object' import { findWorkflowReferenceTokens } from '@sim/utils/workflow-references' +import type { CanonicalModeOverrides } from '@sim/workflow-code/catalog/canonical-index' import { MCP_STRUCTURED_CONTENT_OUTPUT } from '@/lib/mcp/output-schema' import { collectPredicateFieldNames, @@ -12,7 +13,6 @@ import { getResponseFormatOutputs, } from '@/lib/workflows/blocks/outputs' import { quotedBlockLabel } from '@/lib/workflows/labels' -import type { CanonicalModeOverrides } from '@/lib/workflows/subblocks/visibility' import type { ManualRunEntryIssue } from '@/lib/workflows/triggers/manual-run' import { getBlock } from '@/blocks' import { diff --git a/apps/sim/lib/workflows/editing/operations.ts b/apps/sim/lib/workflows/editing/operations.ts index 50959e154f6..e8c98751b0f 100644 --- a/apps/sim/lib/workflows/editing/operations.ts +++ b/apps/sim/lib/workflows/editing/operations.ts @@ -1,9 +1,10 @@ import { createLogger } from '@sim/logger' import { isRecordLike } from '@sim/utils/object' +import { isNonEmptyValue } from '@sim/workflow-code/catalog/canonical-index' import { isEqual } from 'es-toolkit' import { isValidKey } from '@/lib/workflows/sanitization/key-validation' import { getTransitiveSubBlockDependents } from '@/lib/workflows/subblocks/dependencies' -import { buildSubBlockValues, isNonEmptyValue } from '@/lib/workflows/subblocks/visibility' +import { buildSubBlockValues } from '@/lib/workflows/subblocks/visibility' import { TriggerUtils } from '@/lib/workflows/triggers/triggers' import { getBlock } from '@/blocks/registry' import { normalizeName, RESERVED_BLOCK_NAMES } from '@/executor/constants' diff --git a/apps/sim/lib/workflows/editing/validation.ts b/apps/sim/lib/workflows/editing/validation.ts index 92c1cf7531a..c4c7e082a9b 100644 --- a/apps/sim/lib/workflows/editing/validation.ts +++ b/apps/sim/lib/workflows/editing/validation.ts @@ -2,6 +2,12 @@ import { createLogger } from '@sim/logger' import { toError } from '@sim/utils/errors' import { generateShortId } from '@sim/utils/id' import { isPlainRecord, omit } from '@sim/utils/object' +import { + buildCanonicalIndex, + evaluateSubBlockCondition, + isCanonicalPair, + resolveCanonicalMode, +} from '@sim/workflow-code/catalog/canonical-index' import { isHosted as isHostedDeployment } from '@/lib/core/config/env-flags' import { isIntegrationDeploymentAvailableForVisibility } from '@/lib/integrations/availability.server' import { mcpOperationPolicySchema } from '@/lib/mcp/operation-policy' @@ -27,12 +33,8 @@ import { import { containsReference } from '@/lib/workflows/sanitization/references' import { getSkillById } from '@/lib/workflows/skills/operations' import { - buildCanonicalIndex, buildSubBlockValues, - evaluateSubBlockCondition, getCanonicalSubBlocksForSurface, - isCanonicalPair, - resolveCanonicalMode, } from '@/lib/workflows/subblocks/visibility' import { validateToolBindingAuthoring } from '@/lib/workflows/tool-input/authoring' import { getBlock } from '@/blocks/registry' diff --git a/apps/sim/lib/workflows/migrations/subblock-migrations.ts b/apps/sim/lib/workflows/migrations/subblock-migrations.ts index 8c663ddc1f6..1a69d2635ac 100644 --- a/apps/sim/lib/workflows/migrations/subblock-migrations.ts +++ b/apps/sim/lib/workflows/migrations/subblock-migrations.ts @@ -1,5 +1,10 @@ import { createLogger } from '@sim/logger' import { isPlainRecord } from '@sim/utils/object' +import { + buildCanonicalIndex, + isCanonicalPair, + resolveCanonicalMode, +} from '@sim/workflow-code/catalog/canonical-index' import { DEFAULT_SUBBLOCK_TYPE } from '@sim/workflow-persistence/subblocks' import { GREENHOUSE_SUBBLOCK_ID_MIGRATIONS, @@ -7,12 +12,7 @@ import { } from '@/lib/workflows/migrations/greenhouse-agent-inputs' import { migrateMcpOperationControls } from '@/lib/workflows/migrations/mcp-operation-controls' import { sanitizeMalformedSubBlocks } from '@/lib/workflows/sanitization/subblocks' -import { - buildCanonicalIndex, - buildSubBlockValues, - isCanonicalPair, - resolveCanonicalMode, -} from '@/lib/workflows/subblocks/visibility' +import { buildSubBlockValues } from '@/lib/workflows/subblocks/visibility' import { getBlock } from '@/blocks' import type { BlockState } from '@/stores/workflows/workflow/types' diff --git a/apps/sim/lib/workflows/persistence/remap-internal-ids.ts b/apps/sim/lib/workflows/persistence/remap-internal-ids.ts index 4e3cb4d62b6..e95c97cfda3 100644 --- a/apps/sim/lib/workflows/persistence/remap-internal-ids.ts +++ b/apps/sim/lib/workflows/persistence/remap-internal-ids.ts @@ -1,11 +1,11 @@ import { createLogger } from '@sim/logger' import { isRecordLike } from '@sim/utils/object' -import { remapConditionBlockIds } from '@/lib/workflows/condition-ids' -import { isDynamicHandleSubblock } from '@/lib/workflows/dynamic-handle-topology' import { type CanonicalModeOverrides, resolveCanonicalMode, -} from '@/lib/workflows/subblocks/visibility' +} from '@sim/workflow-code/catalog/canonical-index' +import { remapConditionBlockIds } from '@/lib/workflows/condition-ids' +import { isDynamicHandleSubblock } from '@/lib/workflows/dynamic-handle-topology' import { SYSTEM_SUBBLOCK_IDS, TRIGGER_RUNTIME_SUBBLOCK_IDS } from '@/triggers/constants' const logger = createLogger('WorkflowRemapInternalIds') diff --git a/apps/sim/lib/workflows/references/dependent-reconfigs.ts b/apps/sim/lib/workflows/references/dependent-reconfigs.ts index bf7a386003b..01127d7b627 100644 --- a/apps/sim/lib/workflows/references/dependent-reconfigs.ts +++ b/apps/sim/lib/workflows/references/dependent-reconfigs.ts @@ -1,4 +1,11 @@ import { isRecordLike, toRecord } from '@sim/utils/object' +import { + buildCanonicalIndex, + type CanonicalModeOverrides, + evaluateSubBlockCondition, + isNonEmptyValue, + scopeCanonicalModesForTool, +} from '@sim/workflow-code/catalog/canonical-index' import type { ForkDependentReconfig, ForkResourceUsage } from '@/lib/api/contracts/workspace-fork' import { coerceObjectArray } from '@/lib/workflows/persistence/remap-internal-ids' import { @@ -18,14 +25,7 @@ import { getDependsOnFields, getTransitiveSubBlockDependents, } from '@/lib/workflows/subblocks/dependencies' -import { - buildCanonicalIndex, - buildSubBlockValues, - type CanonicalModeOverrides, - evaluateSubBlockCondition, - isNonEmptyValue, - scopeCanonicalModesForTool, -} from '@/lib/workflows/subblocks/visibility' +import { buildSubBlockValues } from '@/lib/workflows/subblocks/visibility' import { buildToolParamVisibilityMap, resolveToolParamRequired, diff --git a/apps/sim/lib/workflows/references/finalize-tool-positions.ts b/apps/sim/lib/workflows/references/finalize-tool-positions.ts index d1115905921..e468c48c0be 100644 --- a/apps/sim/lib/workflows/references/finalize-tool-positions.ts +++ b/apps/sim/lib/workflows/references/finalize-tool-positions.ts @@ -1,6 +1,6 @@ import { isRecordLike } from '@sim/utils/object' +import { reindexCanonicalModesByPosition } from '@sim/workflow-code/catalog/canonical-index' import { coerceObjectArray } from '@/lib/workflows/persistence/remap-internal-ids' -import { reindexCanonicalModesByPosition } from '@/lib/workflows/subblocks/visibility' import { getBlock } from '@/blocks/registry' import type { BlockState } from '@/stores/workflows/workflow/types' diff --git a/apps/sim/lib/workflows/references/import-configuration.ts b/apps/sim/lib/workflows/references/import-configuration.ts index 0b6607877fc..de49c43be70 100644 --- a/apps/sim/lib/workflows/references/import-configuration.ts +++ b/apps/sim/lib/workflows/references/import-configuration.ts @@ -1,5 +1,9 @@ import type { Principal } from '@sim/auth/principal' import { isRecordLike, toRecord } from '@sim/utils/object' +import { + type CanonicalModeOverrides, + scopeCanonicalModesForTool, +} from '@sim/workflow-code/catalog/canonical-index' import { OrchestrationError } from '@/lib/core/orchestration/types' import { getSelectorManifestEntry, @@ -21,10 +25,6 @@ import { } from '@/lib/workflows/references/remap-references' import { workflowSelectorValidator } from '@/lib/workflows/references/selector-values' import { buildSelectorContextFromBlock } from '@/lib/workflows/subblocks/context' -import { - type CanonicalModeOverrides, - scopeCanonicalModesForTool, -} from '@/lib/workflows/subblocks/visibility' export interface ImportConfigurationField { blockId: string diff --git a/apps/sim/lib/workflows/references/remap-references.ts b/apps/sim/lib/workflows/references/remap-references.ts index 226eff62eed..81dc959c153 100644 --- a/apps/sim/lib/workflows/references/remap-references.ts +++ b/apps/sim/lib/workflows/references/remap-references.ts @@ -1,6 +1,16 @@ import { createLogger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' import { isRecordLike, omit, toRecord } from '@sim/utils/object' +import { + buildCanonicalIndex, + type CanonicalModeOverrides, + evaluateSubBlockCondition, + isCanonicalPair, + isNonEmptyValue, + reindexCanonicalModesByPosition, + resolveCanonicalMode, + scopeCanonicalModesForTool, +} from '@sim/workflow-code/catalog/canonical-index' import type { SubBlockType } from '@sim/workflow-types/blocks' import type { WorkflowResourceKind } from '@sim/workflow-types/resources' import { isWorkflowAnnotationOnlyBlockType } from '@sim/workflow-types/workflow' @@ -28,17 +38,9 @@ import { getTransitiveSubBlockDependents, } from '@/lib/workflows/subblocks/dependencies' import { - buildCanonicalIndex, buildSubBlockValues, - type CanonicalModeOverrides, - evaluateSubBlockCondition, getCanonicalSubBlocksForSurface, - isCanonicalPair, - isNonEmptyValue, - reindexCanonicalModesByPosition, resolveActiveCanonicalValue, - resolveCanonicalMode, - scopeCanonicalModesForTool, } from '@/lib/workflows/subblocks/visibility' import { buildToolParamVisibilityMap, diff --git a/apps/sim/lib/workflows/references/scan.ts b/apps/sim/lib/workflows/references/scan.ts index 9e97e3a15b7..86af18719e6 100644 --- a/apps/sim/lib/workflows/references/scan.ts +++ b/apps/sim/lib/workflows/references/scan.ts @@ -1,8 +1,8 @@ +import type { CanonicalModeOverrides } from '@sim/workflow-code/catalog/canonical-index' import { type ForkRemapKind, scanWorkflowReferences, } from '@/lib/workflows/references/remap-references' -import type { CanonicalModeOverrides } from '@/lib/workflows/subblocks/visibility' import type { WorkflowState } from '@/stores/workflows/workflow/types' /** A block reduced to what the reference scanner reads (incl. canonical context for detection). */ diff --git a/apps/sim/lib/workflows/search-replace/indexer.ts b/apps/sim/lib/workflows/search-replace/indexer.ts index c2f6880c816..a4beb07df1d 100644 --- a/apps/sim/lib/workflows/search-replace/indexer.ts +++ b/apps/sim/lib/workflows/search-replace/indexer.ts @@ -1,5 +1,11 @@ import { isRecordLike } from '@sim/utils/object' import { forEachSearchOccurrence, projectEscapedMarkdownForSearch } from '@sim/utils/string' +import { + buildCanonicalIndex, + type CanonicalModeOverrides, + evaluateSubBlockCondition, + scopeCanonicalModesForTool, +} from '@sim/workflow-code/catalog/canonical-index' import { DEFAULT_SUBBLOCK_TYPE } from '@sim/workflow-persistence/subblocks' import type { SubBlockType } from '@sim/workflow-types/blocks' import { isWorkflowBlockProtected } from '@sim/workflow-types/workflow' @@ -31,11 +37,8 @@ import { pathToKey, walkStringValues } from '@/lib/workflows/search-replace/valu import { getTransitiveSubBlockDependents } from '@/lib/workflows/subblocks/dependencies' import { resolveStoredToolName } from '@/lib/workflows/subblocks/display' import { - buildCanonicalIndex, buildCanonicalIndexForSurface, buildSubBlockValues, - type CanonicalModeOverrides, - evaluateSubBlockCondition, isSubBlockFeatureEnabled, isSubBlockHidden, isSubBlockVisibleForMode, @@ -43,7 +46,6 @@ import { normalizeDependencyValue, parseDependsOn, resolveDependencyValue, - scopeCanonicalModesForTool, } from '@/lib/workflows/subblocks/visibility' import { isSyntheticToolSubBlockId } from '@/lib/workflows/tool-input/synthetic-subblocks' import { type ParsedStoredTool, parseStoredToolInputValue } from '@/lib/workflows/tool-input/types' diff --git a/apps/sim/lib/workflows/source/gates.ts b/apps/sim/lib/workflows/source/gates.ts index 8e38760a3f1..a5c48d1c68a 100644 --- a/apps/sim/lib/workflows/source/gates.ts +++ b/apps/sim/lib/workflows/source/gates.ts @@ -1,5 +1,6 @@ import { compareStrings } from '@sim/utils/string' import type { ApplyDiagnosticCode, Diagnostic } from '@sim/workflow-code' +import { isNonEmptyValue } from '@sim/workflow-code/catalog/canonical-index' import { type BlockState, normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' import { isEqual } from 'es-toolkit' import { hasWorkspaceSandboxAccess } from '@/lib/billing/core/subscription' @@ -20,7 +21,6 @@ import type { } from '@/lib/workflows/editing/types' import { isBlockTypeAllowed, preValidateCredentialInputs } from '@/lib/workflows/editing/validation' import { diffGraphs, type GraphDiff, type SourceGraph } from '@/lib/workflows/source/graph-diff' -import { isNonEmptyValue } from '@/lib/workflows/subblocks/visibility' import { validateToolBindingAuthoring } from '@/lib/workflows/tool-input/authoring' import { TriggerUtils } from '@/lib/workflows/triggers/triggers' import { getBlock } from '@/blocks/registry' diff --git a/apps/sim/lib/workflows/subblocks/context.ts b/apps/sim/lib/workflows/subblocks/context.ts index ca14a0fb749..aad1dff6607 100644 --- a/apps/sim/lib/workflows/subblocks/context.ts +++ b/apps/sim/lib/workflows/subblocks/context.ts @@ -1,3 +1,7 @@ +import { + buildCanonicalIndex, + type CanonicalModeOverrides, +} from '@sim/workflow-code/catalog/canonical-index' import { buildSelectorRawContext, getSelectorContextSubBlocks as getSharedSelectorContextSubBlocks, @@ -6,9 +10,7 @@ import { import type { SelectorKey } from '@/lib/selectors/manifest' import type { SelectorContext } from '@/lib/selectors/types' import { - buildCanonicalIndex, buildSubBlockValues, - type CanonicalModeOverrides, resolveActiveCanonicalValue, } from '@/lib/workflows/subblocks/visibility' import { getBlock } from '@/blocks' diff --git a/apps/sim/lib/workflows/subblocks/dependencies.ts b/apps/sim/lib/workflows/subblocks/dependencies.ts index 59f2030c0b9..20a5ba6d50f 100644 --- a/apps/sim/lib/workflows/subblocks/dependencies.ts +++ b/apps/sim/lib/workflows/subblocks/dependencies.ts @@ -1,4 +1,4 @@ -import { buildCanonicalIndex } from '@/lib/workflows/subblocks/visibility' +import { buildCanonicalIndex } from '@sim/workflow-code/catalog/canonical-index' import type { SubBlockConfig } from '@/blocks/types' export interface DependentSubBlock { diff --git a/apps/sim/lib/workflows/subblocks/visibility.ts b/apps/sim/lib/workflows/subblocks/visibility.ts index 1de78e0d050..8c0a9a67f16 100644 --- a/apps/sim/lib/workflows/subblocks/visibility.ts +++ b/apps/sim/lib/workflows/subblocks/visibility.ts @@ -15,23 +15,6 @@ import { getDeploymentShape } from '@/lib/core/config/deployment-shape' import { getEnv, isTruthy } from '@/lib/core/config/env' import type { SubBlockConfig } from '@/blocks/types' -export { - buildCanonicalIndex, - type CanonicalGroup, - type CanonicalIndex, - type CanonicalMode, - type CanonicalModeOverrides, - type CanonicalValueSelection, - evaluateSubBlockCondition, - getCanonicalValues, - isCanonicalPair, - isNonEmptyValue, - reindexCanonicalModesByPosition, - resolveCanonicalMode, - type SubBlockCondition, - scopeCanonicalModesForTool, -} from '@sim/workflow-code/catalog/canonical-index' - interface TriggerVisibilityBlockConfig { category?: string triggers?: { diff --git a/apps/sim/lib/workflows/tool-input/param-visibility.ts b/apps/sim/lib/workflows/tool-input/param-visibility.ts index 0e8f25d39aa..e21ed1da05a 100644 --- a/apps/sim/lib/workflows/tool-input/param-visibility.ts +++ b/apps/sim/lib/workflows/tool-input/param-visibility.ts @@ -1,5 +1,5 @@ +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import type { ResolvedToolInputParamConfig } from '@/lib/workflows/search-replace/indexer' -import { evaluateSubBlockCondition } from '@/lib/workflows/subblocks/visibility' import type { SubBlockConfig } from '@/blocks/types' import type { ParameterVisibility } from '@/tools/types' diff --git a/apps/sim/lib/workflows/tool-input/usage-control.ts b/apps/sim/lib/workflows/tool-input/usage-control.ts index abb58f3273b..2ef3561e7f3 100644 --- a/apps/sim/lib/workflows/tool-input/usage-control.ts +++ b/apps/sim/lib/workflows/tool-input/usage-control.ts @@ -1,5 +1,8 @@ import { isRecordLike } from '@sim/utils/object' -import type { CanonicalMode, CanonicalModeOverrides } from '@/lib/workflows/subblocks/visibility' +import type { + CanonicalMode, + CanonicalModeOverrides, +} from '@sim/workflow-code/catalog/canonical-index' import type { ToolUsageControl } from '@/providers/types' export const AGENT_TOOL_USAGE_CONTROL_CANONICAL_ID = 'agentToolUsageControl' diff --git a/apps/sim/providers/utils.ts b/apps/sim/providers/utils.ts index 07ef9be1b39..724fe46f010 100644 --- a/apps/sim/providers/utils.ts +++ b/apps/sim/providers/utils.ts @@ -1,6 +1,13 @@ import { createLogger, type Logger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' import { omit } from '@sim/utils/object' +import { + buildCanonicalIndex, + type CanonicalGroup, + type CanonicalModeOverrides, + isCanonicalPair, + scopeCanonicalModesForTool, +} from '@sim/workflow-code/catalog/canonical-index' import type OpenAI from 'openai' import type { BillingAttributionSnapshot } from '@/lib/billing/core/attribution' import { formatCreditCost } from '@/lib/billing/credits/conversion' @@ -13,14 +20,7 @@ import { } from '@/lib/core/utils/records' import type { CustomBlockToolBinding } from '@/lib/workflows/custom-blocks/operations' import { isFileFieldType, type WorkflowInputField } from '@/lib/workflows/input-format' -import { - buildCanonicalIndex, - type CanonicalGroup, - type CanonicalModeOverrides, - isCanonicalPair, - resolveActiveCanonicalValue, - scopeCanonicalModesForTool, -} from '@/lib/workflows/subblocks/visibility' +import { resolveActiveCanonicalValue } from '@/lib/workflows/subblocks/visibility' import { resolveBlockToolId } from '@/lib/workflows/tool-input/identity' import { assembleCustomBlockInputMapping, isCustomBlockType } from '@/blocks/custom/build-config' import type { BlockToolParamsContext, SubBlockConfig } from '@/blocks/types' diff --git a/apps/sim/scripts/canvas-sentence-spec.ts b/apps/sim/scripts/canvas-sentence-spec.ts index 63e2ef8f10e..9b5570b5cf2 100644 --- a/apps/sim/scripts/canvas-sentence-spec.ts +++ b/apps/sim/scripts/canvas-sentence-spec.ts @@ -24,8 +24,8 @@ */ import { readFileSync } from 'fs' +import { buildCanonicalIndex, isCanonicalPair } from '@sim/workflow-code/catalog/canonical-index' import { getOperationSubBlockId } from '@/lib/workflows/blocks/canvas-sentence' -import { buildCanonicalIndex, isCanonicalPair } from '@/lib/workflows/subblocks/visibility' import { getBlockRegistry } from '@/blocks/registry' import type { SubBlockConfig } from '@/blocks/types' diff --git a/apps/sim/scripts/saved-credential-contract.ts b/apps/sim/scripts/saved-credential-contract.ts index 704ef0a1f8d..0f7c10d12f8 100644 --- a/apps/sim/scripts/saved-credential-contract.ts +++ b/apps/sim/scripts/saved-credential-contract.ts @@ -1,4 +1,4 @@ -import { evaluateSubBlockCondition } from '@/lib/workflows/subblocks/visibility' +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import type { BlockConfig } from '@/blocks/types' import type { ToolMetadata } from '@/tools/metadata' import { prepareToolRequestUrl } from '@/tools/request-transport' diff --git a/apps/sim/scripts/validate-fal-image-models.ts b/apps/sim/scripts/validate-fal-image-models.ts index 04bb794d68d..f1e0e61838a 100644 --- a/apps/sim/scripts/validate-fal-image-models.ts +++ b/apps/sim/scripts/validate-fal-image-models.ts @@ -9,12 +9,12 @@ import { readFile, writeFile } from 'node:fs/promises' import { join } from 'node:path' import { createLogger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import Ajv from 'ajv/dist/2020' import { readResponseJsonWithLimit } from '@/lib/core/utils/stream-limits' import { buildImageGenerationRequest } from '@/lib/internal/image/request' import { imageGenerationInputSchema } from '@/lib/internal/image/schema' import { imageModels } from '@/lib/media/image-catalog' -import { evaluateSubBlockCondition } from '@/lib/workflows/subblocks/visibility' import { ImageGeneratorV2Block } from '@/blocks/blocks/image_generator' import { imageGenerateTool } from '@/tools/image/generate' diff --git a/apps/sim/scripts/validate-fal-video-models.ts b/apps/sim/scripts/validate-fal-video-models.ts index f724e7a1c66..701323f9d23 100644 --- a/apps/sim/scripts/validate-fal-video-models.ts +++ b/apps/sim/scripts/validate-fal-video-models.ts @@ -10,11 +10,11 @@ import { join } from 'node:path' import { createLogger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' import { isRecordLike } from '@sim/utils/object' +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import Ajv from 'ajv/dist/2020' import { videoToolBodySchema } from '@/lib/api/contracts/tools/media/video' import { buildFalVideoRequest, getFalAIValidationError } from '@/lib/internal/video/fal-request' import { falVideoModels, getFalVideoModel } from '@/lib/media/fal-video-catalog' -import { evaluateSubBlockCondition } from '@/lib/workflows/subblocks/visibility' import { VideoGeneratorV3Block } from '@/blocks/blocks/video_generator' import { falaiVideoTool } from '@/tools/video/falai' diff --git a/apps/sim/scripts/validate-runway-video-models.ts b/apps/sim/scripts/validate-runway-video-models.ts index 963058026de..5e79cf0c3c7 100644 --- a/apps/sim/scripts/validate-runway-video-models.ts +++ b/apps/sim/scripts/validate-runway-video-models.ts @@ -8,12 +8,12 @@ import { readFile, writeFile } from 'node:fs/promises' import { createLogger } from '@sim/logger' import { getErrorMessage } from '@sim/utils/errors' import { isRecordLike } from '@sim/utils/object' +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import Ajv from 'ajv/dist/2020' import { videoToolBodySchema } from '@/lib/api/contracts/tools/media/video' import { readResponseJsonWithLimit } from '@/lib/core/utils/stream-limits' import { buildDirectVideoRequest } from '@/lib/internal/video/direct-request' import { directVideoModels } from '@/lib/media/direct-video-catalog' -import { evaluateSubBlockCondition } from '@/lib/workflows/subblocks/visibility' import { VideoGeneratorV3Block } from '@/blocks/blocks/video_generator' import { runwayVideoTool } from '@/tools/video/runway' diff --git a/apps/sim/serializer/index.ts b/apps/sim/serializer/index.ts index d4a7ca5676f..bef72a271cb 100644 --- a/apps/sim/serializer/index.ts +++ b/apps/sim/serializer/index.ts @@ -1,6 +1,15 @@ import { createLogger } from '@sim/logger' import { toError } from '@sim/utils/errors' import { generateId } from '@sim/utils/id' +import type { CanonicalModeOverrides } from '@sim/workflow-code/catalog/canonical-index' +import { + buildCanonicalIndex, + evaluateSubBlockCondition, + getCanonicalValues, + isCanonicalPair, + isNonEmptyValue, + resolveCanonicalMode, +} from '@sim/workflow-code/catalog/canonical-index' import { generateLoopBlocks, generateParallelBlocks, @@ -9,17 +18,10 @@ import { resolveBlockRetryConfig } from '@sim/workflow-types/workflow' import type { Edge } from '@xyflow/react' import { migrateGreenhouseAgentInputs } from '@/lib/workflows/migrations/greenhouse-agent-inputs' import { migrateMcpOperationControls } from '@/lib/workflows/migrations/mcp-operation-controls' -import type { CanonicalModeOverrides } from '@/lib/workflows/subblocks/visibility' import { - buildCanonicalIndex, buildSubBlockValues, - evaluateSubBlockCondition, - getCanonicalValues, - isCanonicalPair, - isNonEmptyValue, isSubBlockHidden, isToolInputOnlySubBlock, - resolveCanonicalMode, withCanonicalModes, } from '@/lib/workflows/subblocks/visibility' import { getBlock } from '@/blocks' diff --git a/apps/sim/tools/params.ts b/apps/sim/tools/params.ts index 3fa9462a0b1..17e1a126136 100644 --- a/apps/sim/tools/params.ts +++ b/apps/sim/tools/params.ts @@ -4,11 +4,13 @@ import { type CanonicalModeOverrides, evaluateSubBlockCondition, isCanonicalPair, + resolveCanonicalMode, + type SubBlockCondition, +} from '@sim/workflow-code/catalog/canonical-index' +import { isSubBlockFeatureEnabled, isSubBlockHidden, isTriggerModeSubBlock, - resolveCanonicalMode, - type SubBlockCondition, } from '@/lib/workflows/subblocks/visibility' import { isCustomBlockType, RESERVED_PARAMS } from '@/blocks/custom/build-config' import type { diff --git a/apps/sim/triggers/webhook-url.ts b/apps/sim/triggers/webhook-url.ts index 4397adbdac6..21f58dde400 100644 --- a/apps/sim/triggers/webhook-url.ts +++ b/apps/sim/triggers/webhook-url.ts @@ -1,8 +1,6 @@ +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import { getBaseUrl } from '@/lib/core/utils/urls' -import { - buildSubBlockValues, - evaluateSubBlockCondition, -} from '@/lib/workflows/subblocks/visibility' +import { buildSubBlockValues } from '@/lib/workflows/subblocks/visibility' import { getBlock } from '@/blocks/registry' import type { BlockState } from '@/stores/workflows/workflow/types' import { getTrigger, isTriggerValid } from '@/triggers' diff --git a/knip.jsonc b/knip.jsonc index 25e32cfacc9..3bd59559cf8 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -176,12 +176,9 @@ }, "packages/sim-setup": { "includeEntryExports": false }, // The workflow-code contract is built ahead of its consumers (the catalog projection, the - // source use cases and @sim/workflow-sdk codegen), and the parser lands with its compiler. - // Wave 3 of the workflow-code build removes both settings once those import it. - "packages/workflow-code": { - "includeEntryExports": false, - "ignoreDependencies": ["@babel/parser"] - }, + // source use cases and @sim/workflow-sdk codegen). Wave 3 of the workflow-code build removes + // this setting once those import it. + "packages/workflow-code": { "includeEntryExports": false }, // The SDK's codegen is consumed by the catalog route and `sim types` in Wave 3. "packages/workflow-sdk": { "includeEntryExports": false, diff --git a/packages/workflow-code/package.json b/packages/workflow-code/package.json index 97fd6ae8761..c7590c64e51 100644 --- a/packages/workflow-code/package.json +++ b/packages/workflow-code/package.json @@ -18,6 +18,10 @@ "types": "./src/catalog/canonical-index/index.ts", "default": "./src/catalog/canonical-index/index.ts" }, + "./sdk": { + "types": "./src/sdk.ts", + "default": "./src/sdk.ts" + }, "./proof": { "types": "./src/proof/index.ts", "default": "./src/proof/index.ts" diff --git a/packages/workflow-sdk/src/codegen/names.ts b/packages/workflow-sdk/src/codegen/names.ts index d2564932d0c..cafdfe14572 100644 --- a/packages/workflow-sdk/src/codegen/names.ts +++ b/packages/workflow-sdk/src/codegen/names.ts @@ -4,7 +4,9 @@ * map, splits each dotted path into namespaces, and names the generated type aliases after it. */ -import { type BlockCatalog, type CatalogBuilder, SDK_CORE_EXPORTS } from '@sim/workflow-code' +import { compareStrings } from '@sim/utils/string' +import type { BlockCatalog, CatalogBuilder } from '@sim/workflow-code' +import { SDK_CORE_EXPORTS } from '@sim/workflow-code/sdk' import { isIdentifier, pascal, RESERVED_WORDS } from './emit' /** @@ -65,17 +67,13 @@ export interface BuilderEntry { typeName: string } -function compareKeys(a: string, b: string): number { - return a < b ? -1 : a > b ? 1 : 0 -} - /** * Validates the builders map and returns its entries sorted by key. Throws on a name the emitter * cannot declare: a non-identifier or reserved segment, a root that redeclares a core value, a * `tool` segment that would hide the tool form, or a builder whose block type is missing. */ export function builderEntries(catalog: BlockCatalog): BuilderEntry[] { - const keys = Object.keys(catalog.builders).sort(compareKeys) + const keys = Object.keys(catalog.builders).sort(compareStrings) const entries: BuilderEntry[] = [] const namespaces = new Set() for (const key of keys) { diff --git a/packages/workflow-sdk/src/runtime.test.ts b/packages/workflow-sdk/src/runtime.test.ts index bfd557269ab..fe7d6fd17d7 100644 --- a/packages/workflow-sdk/src/runtime.test.ts +++ b/packages/workflow-sdk/src/runtime.test.ts @@ -1,6 +1,6 @@ import { readFileSync } from 'node:fs' import path from 'node:path' -import { SDK_CORE_EXPORTS } from '@sim/workflow-code' +import { SDK_CORE_EXPORTS } from '@sim/workflow-code/sdk' import { describe, expect, it } from 'vitest' import * as runtimeModule from './runtime' import { SimSdkNotExecutable } from './runtime' From 6427028ae7ff82b33e773eca36470c4602a9a1d9 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:37:11 -0800 Subject: [PATCH 078/428] test(workflows): workflow source e2e over the running app, wired into the scim http e2e group Creates a workflow through v2 create and operations, then proves the printed source compiles with zero errors to the reported canonical hash, which equals canonicalize of the stored state; the fingerprint ignores a position-only edit and changes on a semantic one; a workspace key reads it, another workspace's key gets 404, and the canvas route returns the same source. The scim group runs the app with WORKFLOW_CODE=true. --- .github/scripts/http-e2e.sh | 6 + apps/sim/package.json | 1 + apps/sim/scripts/test-workflow-source-e2e.ts | 382 +++++++++++++++++++ 3 files changed, 389 insertions(+) create mode 100644 apps/sim/scripts/test-workflow-source-e2e.ts diff --git a/.github/scripts/http-e2e.sh b/.github/scripts/http-e2e.sh index 045fe4f7ca2..0669173c0ad 100755 --- a/.github/scripts/http-e2e.sh +++ b/.github/scripts/http-e2e.sh @@ -163,6 +163,7 @@ case "$group" in export DB_TX_TRIPWIRE=throw export NEXT_PUBLIC_CHAT_DISABLED=true export SIM_LINKS=true + export WORKFLOW_CODE=true export PEOPLE=true export CRON_SECRET=people-directory-sync-local-e2e-secret start_browser_install people chromium @@ -179,6 +180,11 @@ case "$group" in VERSION_COMPARE_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \ VERSION_COMPARE_E2E_REPORT_PATH="$report_dir/version-compare-http-report.json" \ bun run test:workflow-version-compare:e2e + WORKFLOW_SOURCE_E2E_BASE_URL="$local_app_url" \ + WORKFLOW_SOURCE_E2E_DATABASE_URL="$DATABASE_URL" \ + WORKFLOW_SOURCE_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \ + WORKFLOW_SOURCE_E2E_REPORT_PATH="$report_dir/workflow-source-e2e-report.json" \ + bun run test:workflow-source:e2e SIM_LINKS_E2E_BASE_URL="$local_app_url" \ SIM_LINKS_E2E_DATABASE_URL="$DATABASE_URL" \ SIM_LINKS_E2E_AUTH_SECRET="$BETTER_AUTH_SECRET" \ diff --git a/apps/sim/package.json b/apps/sim/package.json index 271b6637ae2..0adf26062af 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -32,6 +32,7 @@ "test:markdown-viewer:e2e": "bun --no-env-file scripts/test-markdown-viewer-e2e.ts", "test:landing-seo:e2e": "bun --no-env-file scripts/test-landing-seo-e2e.ts", "test:workflow-version-compare:e2e": "bun --no-env-file scripts/test-workflow-version-compare-e2e.ts", + "test:workflow-source:e2e": "bun --no-env-file scripts/test-workflow-source-e2e.ts", "test:workflow-stop-after:e2e": "bun --no-env-file scripts/test-workflow-stop-after-e2e.ts", "test:workflow-pinned-execute:e2e": "bun --no-env-file scripts/test-workflow-pinned-execute-e2e.ts", "test:desktop-inbox:e2e": "bun --no-env-file scripts/test-desktop-inbox-e2e.ts", diff --git a/apps/sim/scripts/test-workflow-source-e2e.ts b/apps/sim/scripts/test-workflow-source-e2e.ts new file mode 100644 index 00000000000..c72a505fdee --- /dev/null +++ b/apps/sim/scripts/test-workflow-source-e2e.ts @@ -0,0 +1,382 @@ +import assert from 'node:assert/strict' +import { writeFile } from 'node:fs/promises' +import { assertDisposableTestDatabaseUrl } from '@sim/db/testing/test-infrastructure' +import { createLogger } from '@sim/logger' +import { sha256Hex } from '@sim/security/hash' +import { getErrorMessage } from '@sim/utils/errors' +import { generateId, generateShortId } from '@sim/utils/id' +import { isRecordLike } from '@sim/utils/object' +import { truncate } from '@sim/utils/string' +import { type BlockCatalog, canonicalHash, canonicalize, compileWorkflow } from '@sim/workflow-code' +import type { WorkflowState } from '@sim/workflow-types/workflow' +import { makeSignature } from 'better-auth/crypto' +import postgres from 'postgres' +import { v2GetBlockCatalogContract } from '@/lib/api/contracts/v2/block-catalog' +import { v2GetWorkflowSourceContract } from '@/lib/api/contracts/v2/workflow-source' +import { + v2ApplyWorkflowOperationsContract, + v2CreateWorkflowContract, + v2GetWorkflowStateContract, +} from '@/lib/api/contracts/v2/workflows' +import { getWorkflowSourceContract, type WorkflowSource } from '@/lib/api/contracts/workflow-source' +import { readResponseTextWithLimit } from '@/lib/core/utils/stream-limits' + +/** + * Workflow source read path (`GET /api/v2/workflows/{workflowId}/source`) against a running local + * app and a disposable database. The app must run with the `workflow-code` flag on + * (`WORKFLOW_CODE=true`). It creates a workflow through the v2 create and operations routes, then + * proves that the printed source compiles with zero errors to the canonical model of the stored + * state, that the fingerprint follows semantic edits and ignores position-only ones, that a + * workspace API key reads it, that a key for another workspace is answered 404, and that the + * canvas route returns the same source under a session. + * + * WORKFLOW_SOURCE_E2E_BASE_URL=http://127.0.0.1:3000 \ + * WORKFLOW_SOURCE_E2E_DATABASE_URL=postgres://…/sim_test \ + * WORKFLOW_SOURCE_E2E_AUTH_SECRET=… \ + * WORKFLOW_SOURCE_E2E_REPORT_PATH=/tmp/workflow-source-report.json \ + * bun run test:workflow-source:e2e + */ +const logger = createLogger('WorkflowSourceE2E') +const MAX_RESPONSE_BYTES = 32 * 1024 * 1024 +/** The first request to each route cold-compiles it under `next dev`. */ +const REQUEST_TIMEOUT_MS = 300_000 +const startedAt = new Date().toISOString() + +function requiredEnvironment(name: string): string { + const value = process.env[name] + assert(value, `${name} must be explicitly provided`) + return value +} + +const baseUrl = new URL(requiredEnvironment('WORKFLOW_SOURCE_E2E_BASE_URL')) +const databaseUrl = assertDisposableTestDatabaseUrl( + requiredEnvironment('WORKFLOW_SOURCE_E2E_DATABASE_URL') +) +const authSecret = requiredEnvironment('WORKFLOW_SOURCE_E2E_AUTH_SECRET') +const reportPath = requiredEnvironment('WORKFLOW_SOURCE_E2E_REPORT_PATH') +assert(new Set(['localhost', '127.0.0.1', '[::1]']).has(baseUrl.hostname), 'Use a loopback app') +assert.equal(baseUrl.protocol, 'http:', 'Use a local HTTP app') +assert(!baseUrl.username && !baseUrl.password, 'App URL cannot contain credentials') +assert.equal(baseUrl.pathname, '/', 'App URL must be an origin') +assert(authSecret.length >= 32, 'Use a local Better Auth secret of at least 32 characters') + +const sql = postgres(databaseUrl.toString(), { max: 2 }) +const ownerId = generateId() +const workspaceId = generateId() +const foreignWorkspaceId = generateId() +const scoreBlockId = generateId() +const workspaceKey = `sk-sim-fixture-${generateId()}` +const foreignKey = `sk-sim-fixture-${generateId()}` +/** Graph writes deny workspace keys, so the fixture workflow is built with a personal key. */ +const personalKey = `sk-sim-fixture-${generateId()}` +const sessionToken = generateShortId() +const checks: { name: string; status: 'passed' | 'failed'; durationMs: number; error?: string }[] = + [] +const requests: { method: string; path: string; status: number; durationMs: number }[] = [] +let cookie = '' +let workflowId = '' + +function failureMessage(error: unknown): string { + let message = getErrorMessage(error) + for (const secret of [workspaceKey, foreignKey, personalKey, sessionToken, authSecret]) { + message = message.replaceAll(secret, '[redacted]') + } + return truncate(message, 2000) +} + +async function check(name: string, run: () => Promise) { + const started = performance.now() + try { + await run() + checks.push({ name, status: 'passed', durationMs: Math.round(performance.now() - started) }) + logger.info(`PASS ${name}`) + } catch (error) { + checks.push({ + name, + status: 'failed', + durationMs: Math.round(performance.now() - started), + error: failureMessage(error), + }) + throw error + } +} + +interface RequestAuth { + key?: string + session?: string +} + +async function call( + method: 'GET' | 'POST', + path: string, + auth: RequestAuth, + expected: number, + body?: unknown +): Promise { + const url = new URL(path, baseUrl) + const headers = new Headers({ accept: 'application/json', 'x-forwarded-for': '127.0.0.1' }) + if (auth.key) headers.set('x-api-key', auth.key) + if (auth.session) headers.set('cookie', `better-auth.session_token=${auth.session}`) + if (body !== undefined) headers.set('content-type', 'application/json') + const started = performance.now() + // boundary-raw-fetch: protocol E2E exercises a separately running local app over real HTTP + const response = await fetch(url, { + method, + headers, + redirect: 'error', + signal: AbortSignal.timeout(REQUEST_TIMEOUT_MS), + ...(body !== undefined ? { body: JSON.stringify(body) } : {}), + }) + requests.push({ + method, + path: url.pathname, + status: response.status, + durationMs: Math.round(performance.now() - started), + }) + const text = await readResponseTextWithLimit(response, { + maxBytes: MAX_RESPONSE_BYTES, + label: 'Workflow source E2E response', + }) + assert.equal(response.status, expected, `${method} ${url.pathname}: unexpected HTTP status`) + return JSON.parse(text) +} + +const sourcePath = (query = '') => `/api/v2/workflows/${workflowId}/source${query}` + +async function readSource(query = ''): Promise { + return v2GetWorkflowSourceContract.response.schema.parse( + await call('GET', sourcePath(query), { key: workspaceKey }, 200) + ).data +} + +async function readCatalog(): Promise { + const parsed = v2GetBlockCatalogContract.response.schema.parse( + await call( + 'GET', + `/api/v2/workspaces/${workspaceId}/block-catalog?workflowId=${workflowId}`, + { key: workspaceKey }, + 200 + ) + ) + const catalog: unknown = parsed.data + assert(isRecordLike(catalog) && typeof catalog.hash === 'string', 'Expected a block catalog') + return catalog as BlockCatalog +} + +async function readStoredState(): Promise { + const state: unknown = v2GetWorkflowStateContract.response.schema.parse( + await call('GET', `/api/v2/workflows/${workflowId}/state`, { key: workspaceKey }, 200) + ).data + return state as WorkflowState +} + +async function applyOperations(operations: unknown[]): Promise { + const { data } = v2ApplyWorkflowOperationsContract.response.schema.parse( + await call('POST', `/api/v2/workflows/${workflowId}/operations`, { key: personalKey }, 200, { + operations, + atomic: true, + }) + ) + assert.equal(data.skipped.length, 0, 'Every operation must apply') +} + +async function seed() { + await sql.begin(async (tx) => { + const email = `${ownerId}@workflow-source.test` + await tx`insert into "user" (id, name, email, normalized_email, email_verified, created_at, updated_at) + values (${ownerId}, 'Workflow source fixture', ${email}, ${email}, true, now(), now())` + await tx`insert into user_stats (id, user_id) values (${generateId()}, ${ownerId})` + for (const id of [workspaceId, foreignWorkspaceId]) { + await tx`insert into project (id, name, owner_id) values (${id}, 'Workflow source project', ${ownerId})` + await tx`insert into workspace (id, project_id, name, owner_id, billed_account_user_id) + values (${id}, ${id}, 'Workflow source fixture', ${ownerId}, ${ownerId})` + } + await tx`insert into permissions (id, user_id, entity_type, entity_id, permission_type) + values (${generateId()}, ${ownerId}, 'workspace', ${workspaceId}, 'admin')` + await tx`insert into session (id, token, user_id, expires_at, created_at, updated_at) + values (${generateId()}, ${sessionToken}, ${ownerId}, now() + interval '1 hour', now(), now())` + for (const [id, key] of [ + [workspaceId, workspaceKey], + [foreignWorkspaceId, foreignKey], + ]) { + await tx`insert into api_key (id, user_id, workspace_id, name, key, key_hash, type) + values (${generateId()}, ${ownerId}, ${id}, 'Workflow source fixture', ${key}, ${sha256Hex(key)}, 'workspace')` + } + await tx`insert into api_key (id, user_id, name, key, key_hash, type) + values (${generateId()}, ${ownerId}, 'Workflow source fixture', ${personalKey}, ${sha256Hex(personalKey)}, 'personal')` + }) + cookie = encodeURIComponent(`${sessionToken}.${await makeSignature(sessionToken, authSecret)}`) +} + +/** Compiles printed files against the compile catalog; any error diagnostic fails. */ +function compileSource(source: WorkflowSource, catalog: BlockCatalog) { + const entryText = source.files['workflow.ts'] + assert(entryText, 'The source must include workflow.ts') + const result = compileWorkflow({ + entry: { path: 'workflow.ts', text: entryText }, + files: new Map(Object.entries(source.files).filter(([path]) => path !== 'workflow.ts')), + catalog, + sdkMajor: source.sdkMajor, + }) + const errors = result.diagnostics.filter((diagnostic) => diagnostic.severity === 'error') + assert.deepEqual( + errors.map((diagnostic) => `${diagnostic.code}: ${diagnostic.message}`), + [], + 'The printed source must compile with zero errors' + ) + assert(result.workflow, 'A compile with no errors returns a workflow') + return result.workflow +} + +try { + await seed() + + await check( + 'create a workflow and add a wired function block through v2 operations', + async () => { + const created = v2CreateWorkflowContract.response.schema.parse( + await call('POST', '/api/v2/workflows', { key: personalKey }, 201, { + workspaceId, + name: 'Workflow source fixture', + }) + ).data + workflowId = created.id + const start = created.blocks[0] + assert(start, 'The new workflow is seeded with a start block') + await applyOperations([ + { + operation_type: 'add', + block_id: scoreBlockId, + params: { + type: 'function', + name: 'Score', + inputs: { code: 'return { score: 1 }' }, + }, + }, + { + operation_type: 'edit', + block_id: start.id, + params: { connections: { success: scoreBlockId } }, + }, + ]) + } + ) + + let baseline: WorkflowSource | undefined + await check( + 'a workspace API key reads source that compiles with zero errors to its canonical hash', + async () => { + const [source, catalog] = await Promise.all([readSource(), readCatalog()]) + assert.equal(source.catalogVersion, catalog.hash) + assert.equal(source.lockBase.catalogHash, catalog.hash) + assert.equal(source.lockBase.baseFingerprint, source.fingerprint) + assert.match(source.fingerprint, /^sf1:[0-9a-f]{64}$/) + assert(source.blockTypes.includes('function'), 'blockTypes lists the function block') + assert.equal(source.lock.blocks.score?.id, scoreBlockId, 'The lock binds the key to its id') + assert.equal(canonicalHash(compileSource(source, catalog)), source.canonicalHash) + baseline = source + } + ) + + await check('its canonical hash equals canonicalize of the stored state', async () => { + assert(baseline, 'baseline source must be read first') + const [state, catalog] = await Promise.all([readStoredState(), readCatalog()]) + const canonical = canonicalize(state, { + catalog, + meta: { name: 'Workflow source fixture', description: null }, + }) + assert.equal(canonicalHash(canonical.workflow), baseline.canonicalHash) + }) + + await check('annotateIds and inline function code keep the canonical hash', async () => { + assert(baseline, 'baseline source must be read first') + const source = await readSource('?annotateIds=true&functionCode=inline') + assert.deepEqual(Object.keys(source.files), ['workflow.ts']) + assert(source.files['workflow.ts']?.includes(`// id: ${scoreBlockId}`), 'Ids are annotated') + assert.equal(source.canonicalHash, baseline.canonicalHash) + assert.equal(source.fingerprint, baseline.fingerprint) + assert.equal(canonicalHash(compileSource(source, await readCatalog())), source.canonicalHash) + }) + + await check('a position-only edit leaves the fingerprint unchanged', async () => { + assert(baseline, 'baseline source must be read first') + const moved = + await sql`update workflow_blocks set position_x = position_x + 240, position_y = position_y + 80 + where workflow_id = ${workflowId} returning id` + assert(moved.length >= 2, 'Both blocks moved') + const source = await readSource() + assert.equal(source.fingerprint, baseline.fingerprint) + assert.equal(source.canonicalHash, baseline.canonicalHash) + }) + + await check('a canvas-equivalent edit changes the fingerprint', async () => { + assert(baseline, 'baseline source must be read first') + await applyOperations([ + { + operation_type: 'edit', + block_id: scoreBlockId, + params: { inputs: { code: 'return { score: 2 }' } }, + }, + ]) + const source = await readSource() + assert.notEqual(source.fingerprint, baseline.fingerprint) + assert.notEqual(source.canonicalHash, baseline.canonicalHash) + assert.equal(canonicalHash(compileSource(source, await readCatalog())), source.canonicalHash) + }) + + await check('the canvas route returns the same source under a session', async () => { + const internal = getWorkflowSourceContract.response.schema.parse( + await call('GET', `/api/workflows/${workflowId}/source`, { session: cookie }, 200) + ).data + const external = await readSource() + assert.deepEqual(internal.files, external.files) + assert.equal(internal.fingerprint, external.fingerprint) + }) + + await check('a key for another workspace is answered 404, and no key 401', async () => { + const foreign = await call('GET', sourcePath(), { key: foreignKey }, 404) + assert(isRecordLike(foreign) && isRecordLike(foreign.error)) + assert.equal(foreign.error.code, 'NOT_FOUND') + const anonymous = await call('GET', sourcePath(), {}, 401) + assert(isRecordLike(anonymous) && isRecordLike(anonymous.error)) + assert.equal(anonymous.error.code, 'UNAUTHORIZED') + }) + + await check('an unknown query parameter is a 400', async () => { + const invalid = await call('GET', sourcePath('?functionCode=ts'), { key: workspaceKey }, 400) + assert(isRecordLike(invalid) && isRecordLike(invalid.error)) + assert.equal(invalid.error.code, 'BAD_REQUEST') + }) +} catch (error) { + logger.error(failureMessage(error)) + process.exitCode = 1 +} finally { + try { + await check('remove disposable fixtures', async () => { + await sql.begin(async (tx) => { + await tx`delete from workspace where id in (${workspaceId}, ${foreignWorkspaceId})` + await tx`delete from project where id in (${workspaceId}, ${foreignWorkspaceId})` + }) + await sql`delete from "user" where id = ${ownerId}` + }) + } catch (error) { + logger.error(failureMessage(error)) + process.exitCode = 1 + } finally { + await sql.end() + await writeFile( + reportPath, + `${JSON.stringify( + { + startedAt, + finishedAt: new Date().toISOString(), + status: process.exitCode ? 'failed' : 'passed', + checks, + requests, + }, + null, + 2 + )}\n` + ) + } +} From e44c961782ee6a3efacfc8afa02fa4db4de5e17d Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:38:11 -0800 Subject: [PATCH 079/428] refactor(workflows): keep get-workflow-source input and result types module-private --- apps/sim/lib/workflows/application/get-workflow-source.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/sim/lib/workflows/application/get-workflow-source.ts b/apps/sim/lib/workflows/application/get-workflow-source.ts index c1e0cd47b78..a6361c61282 100644 --- a/apps/sim/lib/workflows/application/get-workflow-source.ts +++ b/apps/sim/lib/workflows/application/get-workflow-source.ts @@ -28,7 +28,7 @@ import { createRecordingResolver, loadResourceKeyResolver } from '@/lib/workflow /** Directory function-code files are printed into when `functionCode` is `files`. */ const FUNCTION_CODE_DIR = 'functions' -export interface GetWorkflowSourceInput { +interface GetWorkflowSourceInput { workflowId: string assertedWorkspaceId?: string /** Prints each block's id as a trailing comment on its declaration (agent read path). */ @@ -38,7 +38,7 @@ export interface GetWorkflowSourceInput { } /** A canonicalize or print finding, without source spans (the read path has no input text). */ -export interface WorkflowSourceWarning { +interface WorkflowSourceWarning { code: string severity: 'error' | 'warning' | 'info' message: string @@ -47,7 +47,7 @@ export interface WorkflowSourceWarning { param?: string } -export interface GetWorkflowSourceResult { +interface GetWorkflowSourceResult { workflowId: string workspaceId: string /** Repo-relative path → text: `workflow.ts` first, then any function-code files. */ From f272f5a394366c635ca76a3bfd94dfb8426fe9f8 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:59:29 -0800 Subject: [PATCH 080/428] feat(workflows): apply workflow source to the draft graph through gated, fingerprinted write applyWorkflowSource (workflows.source.apply, write role, workspace keys denied) compiles the submitted files against the per-workflow catalog, materializes onto the stored graph with the lock, diffs, refuses protected blocks, runs the editing engine gates, value validation, the not-addable check and lint mapped to source lines, then writes once through replaceWorkflowNormalizedState in reader form: the fingerprint is re-checked under the row lock (409), current positions are kept for existing blocks and the protected merge is asserted to be the identity. Dry runs answer with diagnostics; no-ops write, audit and notify nothing. The response re-prints the stored source with its new lock and fingerprint. --- .../application/apply-workflow-source.ts | 1109 +++++++++++++++++ .../application/get-workflow-source.ts | 2 +- .../lib/workflows/application/operations.ts | 16 + .../lib/workflows/application/source-error.ts | 56 + 4 files changed, 1182 insertions(+), 1 deletion(-) create mode 100644 apps/sim/lib/workflows/application/apply-workflow-source.ts create mode 100644 apps/sim/lib/workflows/application/source-error.ts diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.ts b/apps/sim/lib/workflows/application/apply-workflow-source.ts new file mode 100644 index 00000000000..b3f0a6b4b63 --- /dev/null +++ b/apps/sim/lib/workflows/application/apply-workflow-source.ts @@ -0,0 +1,1109 @@ +import { AuditAction, AuditResourceType } from '@sim/audit' +import { resolvePrincipalAttribution } from '@sim/auth/principal' +import { db } from '@sim/db' +import { workflowBlocks, workflow as workflowTable } from '@sim/db/schema' +import { createLogger } from '@sim/logger' +import { omit } from '@sim/utils/object' +import { + type AnchorKey, + type BlockCatalog, + type CanonicalDiff, + type CanonicalWorkflow, + type CanonicalWorkflowMeta, + type CompileResult, + canonicalize, + codeFrame, + compileWorkflow, + type Diagnostic, + diffCanonical, + encodeAnchor, + type LockBase, + type LockIdentity, + type MaterializeResult, + materialize, + parseWorkflowLock, + printWorkflow, + type ResourceKeyResolver, + type ResourceKind, + renamesBetween, + type SourceSpan, + sourceFingerprint, + type WorkflowLockBlock, + type WorkflowLockV1, +} from '@sim/workflow-code' +import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' +import { and, eq, inArray, isNull, ne } from 'drizzle-orm' +import { isEqual } from 'es-toolkit' +import { resolveCatalogGate, withCatalogBlockScope } from '@/lib/catalog/application/context' +import { principalAuditSource } from '@/lib/core/application' +import { OrchestrationError } from '@/lib/core/orchestration/types' +import type { DbOrTx } from '@/lib/db/types' +import { resolvePermissionGroupConfig } from '@/lib/permission-groups/config-scope.server' +import { notifyWorkflowUpdated } from '@/lib/realtime/notify' +import { defineAuthorizedWorkflowUseCase } from '@/lib/workflows/application/authorized-workflow-use-case' +import type { ActiveWorkflowApplicationContext } from '@/lib/workflows/application/context' +import { assembleLock } from '@/lib/workflows/application/get-workflow-source' +import { layoutChangedBlocks } from '@/lib/workflows/application/graph-write' +import { snapshotMcpToolOutputSchemas } from '@/lib/workflows/application/mcp-output-schemas' +import { requireMutableWorkflow } from '@/lib/workflows/application/mutability' +import { workflowOperations } from '@/lib/workflows/application/operations' +import { resolvePrincipalWorkflowContext } from '@/lib/workflows/application/principal-scope' +import { loadWorkflowGraph } from '@/lib/workflows/application/read-workflow-graph' +import { + type WorkflowSourceDiagnostic, + WorkflowSourceRejectedError, + WorkflowSourceStaleError, +} from '@/lib/workflows/application/source-error' +import { normalizeWorkflowVariables } from '@/lib/workflows/application/workflow-variables' +import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog' +import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' +import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' +import { createRecordingResolver, loadResourceKeyResolver } from '@/lib/workflows/code/resources' +import { checkNeedsRedeployment } from '@/lib/workflows/deployment-status' +import type { WorkflowLintReport } from '@/lib/workflows/editing/lint' +import { buildWorkflowLintReport } from '@/lib/workflows/editing/lint-report' +import { validateValueForSubBlockType } from '@/lib/workflows/editing/validation' +import { assertNoWithheldBlockType } from '@/lib/workflows/persistence/block-access-guard' +import { prepareWorkflowStateForPersistence } from '@/lib/workflows/persistence/prepare-state' +import { + assertWorkflowGraphIdsUnclaimed, + collectWorkflowGraphIds, + replaceWorkflowNormalizedState, +} from '@/lib/workflows/persistence/replace-normalized-state' +import { loadWorkflowFromNormalizedTables } from '@/lib/workflows/persistence/utils' +import { validateWorkflowState } from '@/lib/workflows/sanitization/validation' +import { gateSourceDiff } from '@/lib/workflows/source/gates' +import { diffGraphs, type GraphDiff, type SourceGraph } from '@/lib/workflows/source/graph-diff' +import { + assertProtectedBlocksPreserved, + findProtectedBlockRefusals, +} from '@/lib/workflows/source/protected' +import { + buildSubBlockValues, + evaluateSubBlockCondition, +} from '@/lib/workflows/subblocks/visibility' +import { parseWorkflowVariables } from '@/lib/workflows/variables/parse' +import { getBlock } from '@/blocks/registry' + +const logger = createLogger('ApplyWorkflowSource') + +/** The entry file every submission carries; function code lives beside it. */ +const ENTRY_FILE = 'workflow.ts' +/** Where function code is re-printed when the submission used code files (as `source get` does). */ +const FUNCTION_CODE_DIR = 'functions' +const CONTAINER_TYPES: ReadonlySet = new Set(['loop', 'parallel']) + +export interface ApplyWorkflowSourceInput { + workflowId: string + assertedWorkspaceId?: string + /** Repo-relative path → text: `workflow.ts` plus any function-code files it references. */ + files: Record + /** The identity lock returned by `source get` (or a previous apply). */ + lock: WorkflowLockV1 + /** The environment facts that came with the lock; a lock read elsewhere is treated as stale. */ + lockBase?: LockBase + /** The `fingerprint` the source was read at; the apply answers 409 when it no longer matches. */ + baseFingerprint: string + /** Run the whole pipeline and stop before the write. Never audits or notifies. */ + dryRun?: boolean + /** `preserve` (default): existing blocks keep stored positions. `lock`: lock layout wins. */ + layout?: 'preserve' | 'lock' + provenance?: { client: 'cli' | 'copilot' | 'canvas' | 'api'; gitSha?: string; repo?: string } +} + +interface SourceBlockRef { + id: string + key: string +} + +/** What the apply changed (or, on a dry run, would change), by stored id and source key. */ +interface SourceDiffSummary { + noop: boolean + blocks: { + added: SourceBlockRef[] + removed: SourceBlockRef[] + renamed: Array<{ id: string; from: string; to: string }> + modified: Array + } + edges: { added: number; removed: number } + variables: { added: string[]; removed: string[]; modified: string[] } +} + +interface ApplyWorkflowSourceResult { + workflowId: string + workflowName: string + workspaceId: string + dryRun: boolean + /** True only when a graph was written. */ + applied: boolean + diff: SourceDiffSummary + /** Warnings on success; on a dry run, every finding including the errors a commit would refuse. */ + diagnostics: WorkflowSourceDiagnostic[] + /** The fingerprint of what is (or would be) stored; the next apply's `baseFingerprint`. */ + newFingerprint: string + /** Re-printed from what is (or would be) stored, so normalized values show in the source. */ + files: Record + lock: WorkflowLockV1 + lockBase: LockBase + /** Source key → id for every new block whose id was minted rather than taken from the lock. */ + mintedIds: Record + warnings: string[] + needsRedeployment: boolean + sdkMajor: number + catalogVersion: string +} + +type AnyDiagnostic = Diagnostic + +/** The stored draft as canonicalize reads it, plus the row fields the CWM `meta` carries. */ +interface StoredSource { + state: WorkflowState + meta: CanonicalWorkflowMeta +} + +/** + * The stored draft through the same loader `source get` reads, so the two compute the same + * fingerprint. With `tx` (under the row lock) the blocks and the row are re-read in it. + */ +async function loadStoredSource( + context: ActiveWorkflowApplicationContext, + tx?: DbOrTx +): Promise { + if (!tx) { + const graph = await loadWorkflowGraph(context) + return { + state: { + blocks: graph.blocks, + edges: graph.edges, + loops: graph.loops, + parallels: graph.parallels, + variables: graph.variables, + }, + meta: { name: context.workflow.name, description: context.workflow.description ?? null }, + } + } + const [normalized, [row]] = await Promise.all([ + loadWorkflowFromNormalizedTables(context.workflowId, tx), + tx + .select({ + name: workflowTable.name, + description: workflowTable.description, + variables: workflowTable.variables, + }) + .from(workflowTable) + .where(and(eq(workflowTable.id, context.workflowId), isNull(workflowTable.archivedAt))) + .limit(1), + ]) + if (!row) throw new OrchestrationError('not_found', 'Workflow not found') + return { + state: { + blocks: (normalized?.blocks ?? {}) as Record, + edges: (normalized?.edges ?? []) as WorkflowState['edges'], + loops: normalized?.loops ?? {}, + parallels: normalized?.parallels ?? {}, + variables: parseWorkflowVariables(row.variables) ?? {}, + }, + meta: { name: row.name, description: row.description ?? null }, + } +} + +/** The `sf1:` fingerprint exactly as `source get` computes it (no lock). */ +function fingerprintOf( + stored: StoredSource, + catalog: BlockCatalog, + resources: ResourceKeyResolver +): string { + const { workflow, identity } = canonicalize(stored.state, { + catalog, + meta: stored.meta, + resources, + }) + return sourceFingerprint(workflow, identity) +} + +/** Every resource kind a compiled model references, so only those tables are read. */ +function collectResourceKinds(value: unknown, kinds: Set): void { + if (Array.isArray(value)) { + for (const item of value) collectResourceKinds(item, kinds) + return + } + if (value === null || typeof value !== 'object') return + const record = value as Record + if (record.$sim === 'resource' && typeof record.kind === 'string') { + kinds.add(record.kind as ResourceKind) + } + for (const nested of Object.values(record)) collectResourceKinds(nested, kinds) +} + +/** + * A lock carrying only identity. `canonicalize` reads a lock's ids and branch keys and nothing + * else, so the printer-owned fields are placeholders here; the real ones come from the print. + */ +function identityLock(identity: LockIdentity): WorkflowLockV1 { + const blocks: Record = {} + for (const [key, block] of Object.entries(identity.blocks)) { + blocks[key] = { ...block, binding: key, order: 0 } + } + return { lockVersion: 1, blocks, variables: identity.variables } +} + +function spanAnchors(diagnostic: AnyDiagnostic): AnchorKey[] { + if (!diagnostic.blockKey) return [] + const anchors: AnchorKey[] = [] + if (diagnostic.param) { + anchors.push( + encodeAnchor({ kind: 'param', block: diagnostic.blockKey, param: diagnostic.param }) + ) + } + anchors.push(encodeAnchor({ kind: 'block', block: diagnostic.blockKey })) + return anchors +} + +/** + * Pins findings to the submitted text. A compile finding already has its span; a server finding + * (gate, value, lint) is placed on its param, else its block declaration, through the compile + * span map (s4 step 9). + */ +function createLocator( + files: Record, + spans: CompileResult['spans'], + idByKey: ReadonlyMap +) { + return (diagnostic: AnyDiagnostic): WorkflowSourceDiagnostic => { + let span: SourceSpan | undefined = diagnostic.span + if (!span) { + for (const anchor of spanAnchors(diagnostic)) { + const found = spans[anchor] + if (found) { + span = found + break + } + } + } + const text = span ? files[span.file] : undefined + const blockId = + diagnostic.blockId ?? (diagnostic.blockKey ? idByKey.get(diagnostic.blockKey) : undefined) + return { + code: diagnostic.code, + severity: diagnostic.severity, + message: diagnostic.message, + ...(diagnostic.hint !== undefined ? { hint: diagnostic.hint } : {}), + ...(span + ? { + file: span.file, + line: span.line, + column: span.column, + endLine: span.endLine, + endColumn: span.endColumn, + } + : {}), + ...(diagnostic.frame !== undefined + ? { frame: diagnostic.frame } + : span && text !== undefined + ? { + frame: codeFrame(text, { + line: span.line, + column: span.column, + endLine: span.endLine, + endColumn: span.endColumn, + }), + } + : {}), + ...(diagnostic.blockKey !== undefined ? { blockKey: diagnostic.blockKey } : {}), + ...(blockId !== undefined ? { blockId } : {}), + ...(diagnostic.param !== undefined ? { param: diagnostic.param } : {}), + ...(diagnostic.path !== undefined ? { path: diagnostic.path } : {}), + } + } +} + +function hasErrors(diagnostics: readonly { severity: string }[]): boolean { + return diagnostics.some((diagnostic) => diagnostic.severity === 'error') +} + +/** Block ids another workflow already stores, among `ids`. */ +async function findBlockIdsClaimedElsewhere(workflowId: string, ids: string[]): Promise { + if (ids.length === 0) return [] + const rows = await db + .select({ id: workflowBlocks.id }) + .from(workflowBlocks) + .where(and(inArray(workflowBlocks.id, ids), ne(workflowBlocks.workflowId, workflowId))) + return rows.map((row) => row.id) +} + +function withBlock( + blocks: Record, + id: string, + update: (block: BlockState) => BlockState +): Record { + return { ...blocks, [id]: update(blocks[id]) } +} + +/** Subblock ids a diff sets on a block: every one for an added block. */ +function changedFieldsOf(block: BlockState, diff: GraphDiff): string[] { + const modified = diff.modified.find((change) => change.id === block.id) + return modified ? modified.subBlocks : Object.keys(block.subBlocks ?? {}) +} + +interface NormalizedBlocks { + blocks: Record + diagnostics: AnyDiagnostic[] +} + +/** + * The replace path's value checks, on the blocks this apply adds or changes (s4 step 7): + * `validateWorkflowState` with sanitization, then `validateValueForSubBlockType` on each changed, + * currently visible field. An invalid value refuses the apply; a value either step rewrites is + * kept rewritten and reported as `W_APPLY_VALUE_NORMALIZED`. Untouched blocks keep their bytes. + */ +function normalizeChangedValues( + input: Record, + diff: GraphDiff, + keyOf: (id: string) => string +): NormalizedBlocks { + let blocks = input + const diagnostics: AnyDiagnostic[] = [] + const changedIds = [...diff.added, ...diff.modified.map((change) => change.id)] + for (const id of changedIds) { + const original = blocks[id] + if (!original || CONTAINER_TYPES.has(original.type)) continue + const blockKey = keyOf(id) + + const validation = validateWorkflowState( + { blocks: { [id]: original }, edges: [], loops: {}, parallels: {} }, + { sanitize: true } + ) + for (const error of validation.errors) { + diagnostics.push({ + code: 'E_APPLY_INVALID_STATE', + severity: 'error', + message: error, + blockId: id, + blockKey, + }) + } + const sanitized = validation.sanitizedState?.blocks[id] + if (sanitized && !isEqual(sanitized, original)) { + blocks = { ...blocks, [id]: sanitized } + diagnostics.push({ + code: 'W_APPLY_VALUE_NORMALIZED', + severity: 'warning', + message: `Block "${original.name}": ${validation.warnings.join('; ') || 'values were sanitized'}`, + blockId: id, + blockKey, + }) + } + + const block = blocks[id] + const config = getBlock(block.type) + if (!config) continue + const values = buildSubBlockValues(block.subBlocks) + const visible = new Map( + config.subBlocks + .filter((field) => evaluateSubBlockCondition(field.condition, values)) + .map((field) => [field.id, field]) + ) + let subBlocks = block.subBlocks + for (const fieldId of changedFieldsOf(original, diff)) { + const field = visible.get(fieldId) + const stored = subBlocks?.[fieldId] + if (!field || !stored) continue + const result = validateValueForSubBlockType(field, stored.value, field.id, block.type, id) + if (!result.valid) { + diagnostics.push({ + code: 'E_APPLY_INVALID_SUBBLOCK_FIELD', + severity: 'error', + message: result.error?.error ?? `Invalid value for ${field.id}`, + blockId: id, + blockKey, + param: fieldId, + }) + continue + } + if (!isEqual(result.value, stored.value) || stored.type !== field.type) { + if (!isEqual(result.value, stored.value)) { + diagnostics.push({ + code: 'W_APPLY_VALUE_NORMALIZED', + severity: 'warning', + message: `Block "${block.name}": ${field.id} was normalized to the field's stored form`, + blockId: id, + blockKey, + param: fieldId, + }) + } + subBlocks = { + ...subBlocks, + [fieldId]: { ...stored, value: result.value, type: field.type }, + } + } + } + if (subBlocks !== block.subBlocks) { + blocks = withBlock(blocks, id, (current) => ({ ...current, subBlocks })) + } + } + return { blocks, diagnostics } +} + +/** + * Lint findings as source diagnostics. A structural finding (a connection to an invalid target, + * an invalid branch port, a reference to an output no block provides) on a block this apply adds + * or changes is blocking (`E_APPLY_LINT`); every other finding, and any finding on a block the + * apply left alone, is a warning. A canvas can save all of these, so only what the apply itself + * introduces is refused. + */ +function lintDiagnostics( + lint: WorkflowLintReport, + changedIds: ReadonlySet, + keyOf: (id: string) => string | undefined +): AnyDiagnostic[] { + const diagnostics: AnyDiagnostic[] = [] + const push = (blocking: boolean, blockId: string, message: string, param?: string) => { + const blockKey = keyOf(blockId) + const located = { + message, + blockId, + ...(blockKey !== undefined ? { blockKey } : {}), + ...(param !== undefined ? { param } : {}), + } + diagnostics.push( + blocking && changedIds.has(blockId) + ? { code: 'E_APPLY_LINT', severity: 'error', ...located } + : { code: 'W_APPLY_LINT', severity: 'warning', ...located } + ) + } + for (const target of lint.invalidConnectionTargets) { + push(true, target.sourceBlockId, `Connection to ${target.targetBlockId}: ${target.reason}`) + } + for (const port of lint.invalidBranchPorts) { + push(true, port.blockId, `Branch port ${port.sourceHandle}: ${port.reason}`) + } + for (const reference of lint.unresolvedReferences) { + push( + reference.kind === 'block-output', + reference.blockId, + `${reference.field}: ${reference.reason}`, + reference.field + ) + } + for (const issue of lint.fieldIssues) { + for (const field of issue.missingRequiredFields) { + push(false, issue.blockId, `Required field ${field} is empty`, field) + } + } + for (const issue of lint.tableFieldIssues) { + push( + false, + issue.blockId, + `${issue.field} is not a column of table "${issue.tableName}"`, + issue.field + ) + } + for (const orphan of lint.orphanBlocks) { + push(false, orphan.blockId, 'Block has no incoming connection') + } + for (const port of lint.emptyOutgoingPorts) { + push(false, port.blockId, `Port ${port.label} has no connection`) + } + if (lint.manualRunIssue) { + const blockId = lint.manualRunIssue.blockId + if (blockId) push(false, blockId, lint.manualRunIssue.message) + else { + diagnostics.push({ + code: 'W_APPLY_LINT', + severity: 'warning', + message: lint.manualRunIssue.message, + }) + } + } + return diagnostics +} + +function summarizeDiff( + diff: CanonicalDiff, + baseIdentity: LockIdentity, + targetIdentity: LockIdentity, + noop: boolean +): SourceDiffSummary { + const targetId = (key: string) => targetIdentity.blocks[key]?.id ?? '' + const baseId = (key: string) => baseIdentity.blocks[key]?.id ?? '' + return { + noop, + blocks: { + added: diff.blocks.added.map((key) => ({ id: targetId(key), key })), + removed: diff.blocks.removed.map((key) => ({ id: baseId(key), key })), + renamed: diff.blocks.renamed.map(({ from, to }) => ({ id: targetId(to), from, to })), + modified: diff.blocks.modified.map((change) => { + const fields = change.changes.map((item) => + item.kind === 'param' + ? item.param + : item.kind === 'mode' + ? `modes.${item.canonicalParamId}` + : item.attribute + ) + const reparented = change.changes.some( + (item) => item.kind === 'attribute' && item.attribute === 'parent' + ) + return { + id: targetId(change.key), + key: change.key, + fields, + ...(reparented ? { reparented } : {}), + } + }), + }, + edges: { added: diff.edges.added.length, removed: diff.edges.removed.length }, + variables: { + added: diff.variables.added, + removed: diff.variables.removed, + modified: diff.variables.modified, + }, + } +} + +/** + * Existing blocks keep the positions stored at write time, so a canvas drag that landed during + * the apply survives it (s4 D3). With `layout: 'lock'`, a block the lock positions keeps that. + */ +function mergeCurrentLayout( + target: Record, + current: Record, + lockPositioned: ReadonlySet +): Record { + const merged: Record = {} + for (const [id, block] of Object.entries(target)) { + const stored = current[id] + if (!stored || lockPositioned.has(id)) { + merged[id] = block + continue + } + const next: BlockState = { + ...omit(block, ['height', 'layout']), + position: stored.position, + ...(stored.height !== undefined ? { height: stored.height } : {}), + ...(stored.layout !== undefined ? { layout: stored.layout } : {}), + } + if (block.data) { + next.data = { + ...omit(block.data, ['width', 'height']), + ...(stored.data?.width !== undefined ? { width: stored.data.width } : {}), + ...(stored.data?.height !== undefined ? { height: stored.data.height } : {}), + } + } + merged[id] = isEqual(next, block) ? block : next + } + return merged +} + +interface Reprinted { + files: Record + lock: WorkflowLockV1 + fingerprint: string +} + +/** + * Prints `state` back as source with the submission's bindings, order, code files and comments, + * so the response shows exactly what is (or would be) stored. The fingerprint is computed the way + * `source get` computes it, so it is the next apply's base. + */ +function reprint(args: { + state: WorkflowState + meta: CanonicalWorkflowMeta + identity: LockIdentity + compiled: CompileResult & { workflow: CanonicalWorkflow } + catalog: BlockCatalog + resources: ResourceKeyResolver +}): Reprinted { + const { state, meta, identity, compiled, catalog, resources } = args + const canonical = canonicalize(state, { + catalog, + meta, + lock: identityLock(identity), + resources, + }) + const usesCodeFiles = Object.values(compiled.hints.blocks).some((hint) => hint.codeFile) + const printed = printWorkflow({ + workflow: { + ...canonical.workflow, + annotations: { + ...canonical.workflow.annotations, + comments: compiled.workflow.annotations.comments, + }, + }, + catalog, + hints: compiled.hints, + options: usesCodeFiles + ? { functionCode: 'files', codeDir: FUNCTION_CODE_DIR } + : { functionCode: 'inline' }, + }) + return { + files: Object.fromEntries(printed.files.map((file) => [file.path, file.text])), + lock: assembleLock(canonical.identity, printed.hints.blocks, canonical.layout), + fingerprint: fingerprintOf({ state, meta }, catalog, resources), + } +} + +function emptySummary(): SourceDiffSummary { + return { + noop: true, + blocks: { added: [], removed: [], renamed: [], modified: [] }, + edges: { added: 0, removed: 0 }, + variables: { added: [], removed: [], modified: [] }, + } +} + +/** + * Applies workflow source (TypeScript) to the stored draft (build-spec decision 11, s4 D1–D12). + * + * The server compiles the submitted files against its live per-workflow catalog, materializes + * the model onto the stored graph (keeping every unchanged value's stored bytes and every id the + * lock binds), and refuses the whole write on any error: a compile error, a protected block, an + * engine gate (allowlists, credentials, trigger uniqueness, sandbox plan), an invalid value, a + * type that may stay but not be added, or a blocking lint finding. Errors carry source lines. + * + * The write is one `replaceWorkflowNormalizedState` under the workflow row lock, which re-checks + * the fingerprint (409 when the draft moved), keeps current canvas positions for existing blocks + * and asserts the protected-block merge is the identity. Draft only: it never deploys. + */ +export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ + operation: workflowOperations.applySource, + resolveContext: resolvePrincipalWorkflowContext, + async execute({ principal, input, context }): Promise { + await requireWorkflowCodeEnabled() + await requireMutableWorkflow(context.workflowId) + + const gate = await resolveCatalogGate(principal, context, { customBlockInputs: true }) + return withCatalogBlockScope(gate, async () => { + const subjectUserId = resolvePrincipalAttribution(principal, { + workspaceBillingOwnerUserId: context.billedAccountUserId, + }).attributedUserId + const isCopilot = principal.kind === 'delegated' && principal.serviceId === 'copilot' + + const stored = await loadStoredSource(context) + const storedTypes = [...new Set(Object.values(stored.state.blocks).map((b) => b.type))] + const { catalog } = buildCodeCatalog({ + gate, + organizationId: context.workspaceOrganizationId, + storedTypes, + }) + + const recording = createRecordingResolver() + canonicalize(stored.state, { catalog, meta: stored.meta, resources: recording.resolver }) + let resources = await loadResourceKeyResolver(context.workspaceId, recording.requestedKinds) + const currentFingerprint = fingerprintOf(stored, catalog, resources) + + const base = { + workflowId: context.workflowId, + workflowName: context.workflow.name, + workspaceId: context.workspaceId, + dryRun: input.dryRun === true, + sdkMajor: catalog.sdkMajor, + catalogVersion: catalog.hash, + } + const lockBaseFor = (fingerprint: string): LockBase => ({ + workspaceId: context.workspaceId, + baseFingerprint: fingerprint, + catalogHash: catalog.hash, + }) + + /** Refuses a commit; a dry run reports the same findings with a 200 instead (s4 §4). */ + const refuse = async ( + diagnostics: WorkflowSourceDiagnostic[] + ): Promise => { + if (!input.dryRun) throw new WorkflowSourceRejectedError(diagnostics) + return { + ...base, + applied: false, + diff: emptySummary(), + diagnostics, + newFingerprint: currentFingerprint, + files: input.files, + lock: input.lock, + lockBase: lockBaseFor(currentFingerprint), + mintedIds: {}, + warnings: [], + needsRedeployment: await checkNeedsRedeployment(context.workflowId), + } + } + + if (currentFingerprint !== input.baseFingerprint) { + if (!input.dryRun) throw new WorkflowSourceStaleError(currentFingerprint) + return refuse([ + { + code: 'E_APPLY_STALE', + severity: 'error', + message: + 'The workflow changed since this source was read. Get the source again, reapply your edit and retry.', + }, + ]) + } + + const parsedLock = parseWorkflowLock(input.lock) + if (parsedLock.diagnostics) { + const locateLock = createLocator(input.files, {}, new Map()) + return refuse(parsedLock.diagnostics.map((diagnostic) => locateLock(diagnostic))) + } + const lock = parsedLock.lock + + const entryText = input.files[ENTRY_FILE] + if (entryText === undefined) { + throw new OrchestrationError('validation', `files must include ${ENTRY_FILE}`) + } + const compiled = compileWorkflow({ + entry: { path: ENTRY_FILE, text: entryText }, + files: new Map(Object.entries(input.files).filter(([path]) => path !== ENTRY_FILE)), + catalog, + sdkMajor: catalog.sdkMajor, + }) + const compileLocate = createLocator(input.files, compiled.spans, new Map()) + if (!compiled.workflow || hasErrors(compiled.diagnostics)) { + return refuse(compiled.diagnostics.map(compileLocate)) + } + const compiledModel = { ...compiled, workflow: compiled.workflow } + + const compiledKinds = new Set() + collectResourceKinds(compiled.workflow.blocks, compiledKinds) + if ([...compiledKinds].some((kind) => !recording.requestedKinds.has(kind))) { + resources = await loadResourceKeyResolver(context.workspaceId, [ + ...recording.requestedKinds, + ...compiledKinds, + ]) + } + + const hasLockEntries = + Object.keys(lock.blocks).length > 0 || Object.keys(lock.variables).length > 0 + const lockFreshness: 'fresh' | 'stale' | 'none' = !hasLockEntries + ? 'none' + : input.lockBase && + (input.lockBase.workspaceId !== context.workspaceId || + input.lockBase.baseFingerprint !== currentFingerprint) + ? 'stale' + : 'fresh' + const compiledBindings: Record = {} + for (const [key, hint] of Object.entries(compiled.hints.blocks)) { + if (hint.binding !== undefined) compiledBindings[key] = hint.binding + } + const hooks = createMaterializeHooks() + const materializeWith = (withLock: WorkflowLockV1): MaterializeResult => + materialize(compiledModel.workflow, withLock, { + catalog, + hooks, + prev: stored.state, + resources, + layout: input.layout ?? 'preserve', + compiledBindings, + lockFreshness, + }) + + /** + * A lock id for a new block that another workflow already stores cannot be reused (block + * ids are global keys): drop it from the lock so materialize mints one, and say so. + */ + let materialized = materializeWith(lock) + const claimedDiagnostics: AnyDiagnostic[] = [] + const lockSuppliedIds = materialized.entries.flatMap((entry) => + entry.status === 'created' && entry.idSource === 'lock' ? [entry.id] : [] + ) + const claimed = new Set( + await findBlockIdsClaimedElsewhere(context.workflowId, lockSuppliedIds) + ) + if (claimed.size > 0) { + const blocks: Record = {} + for (const [key, entry] of Object.entries(lock.blocks)) { + if (claimed.has(entry.id)) { + claimedDiagnostics.push({ + code: 'W_MAT_LOCK_ID_CLAIMED', + severity: 'warning', + message: `The lock id for block "${key}" belongs to another workflow; a new id was minted`, + blockKey: key, + }) + } else { + blocks[key] = entry + } + } + materialized = materializeWith({ ...lock, blocks }) + } + + const idByKey = new Map( + Object.entries(materialized.identity.blocks).map(([key, block]) => [key, block.id]) + ) + const keyById = new Map([...idByKey].map(([key, id]) => [id, key])) + const locate = createLocator(input.files, compiled.spans, idByKey) + const materializeDiagnostics = [...materialized.diagnostics, ...claimedDiagnostics] + if (hasErrors(materializeDiagnostics)) { + return refuse([...compiled.diagnostics, ...materializeDiagnostics].map(locate)) + } + + const baseCanonical = canonicalize(stored.state, { + catalog, + meta: stored.meta, + lock, + resources, + }) + const canonicalDiff = diffCanonical( + baseCanonical.workflow, + compiled.workflow, + renamesBetween(baseCanonical.identity, materialized.identity) + ) + const warnings: string[] = [] + if (canonicalDiff.meta.length > 0) { + warnings.push( + `The workflow ${canonicalDiff.meta.join(' and ')} in the source differs from the stored one and was not changed; rename or describe the workflow through its settings.` + ) + } + + const storedGraph: SourceGraph = { blocks: stored.state.blocks, edges: stored.state.edges } + let blocks = materialized.state.blocks + const edges = materialized.state.edges + const graphDiff = diffGraphs(storedGraph, { blocks, edges }) + const keyOf = (id: string) => keyById.get(id) ?? '' + + const permissionConfig = await resolvePermissionGroupConfig( + subjectUserId, + context.workspaceId, + context.workspaceOrganizationId + ) + const gateDiagnostics = await gateSourceDiff({ + base: storedGraph, + target: { blocks, edges }, + diff: graphDiff, + permissionConfig, + subjectUserId, + workspaceId: context.workspaceId, + isCopilot, + }) + const refusals: AnyDiagnostic[] = [ + ...findProtectedBlockRefusals(storedGraph, { blocks, edges }, graphDiff), + ...gateDiagnostics, + ] + + const typeChanged = new Set( + graphDiff.modified.filter((change) => change.typeChanged).map((change) => change.id) + ) + for (const id of [...graphDiff.added, ...typeChanged]) { + const block = blocks[id] + if (block && catalog.blocks[block.type]?.addable === false) { + refusals.push({ + code: 'E_TYPE_NOT_ADDABLE', + severity: 'error', + message: `Block type "${block.type}" can stay where it is already used but cannot be added`, + blockId: id, + blockKey: keyOf(id), + }) + } + } + + for (const diagnostic of gateDiagnostics) { + if (diagnostic.code !== 'W_APPLY_HOSTED_KEY_DROPPED' || !diagnostic.blockId) continue + const { blockId, param } = diagnostic + if (!param || !blocks[blockId]?.subBlocks?.[param]) continue + blocks = withBlock(blocks, blockId, (block) => ({ + ...block, + subBlocks: { ...block.subBlocks, [param]: { ...block.subBlocks[param], value: null } }, + })) + } + + const normalized = normalizeChangedValues(blocks, graphDiff, keyOf) + blocks = normalized.blocks + + blocks = await snapshotMcpToolOutputSchemas(blocks, stored.state.blocks, { + principal, + workspaceId: context.workspaceId, + }) + if (materialized.needsLayout.length > 0) { + blocks = layoutChangedBlocks(context.workflowId, storedGraph, { blocks, edges }) + } + + const lint = await buildWorkflowLintReport( + { blocks, edges }, + { workflowId: context.workflowId, workspaceId: context.workspaceId, subjectUserId } + ) + const changedIds = new Set([...graphDiff.added, ...graphDiff.modified.map((m) => m.id)]) + const diagnostics = [ + ...compiled.diagnostics, + ...materializeDiagnostics, + ...refusals, + ...normalized.diagnostics, + ...lintDiagnostics(lint, changedIds, (id) => keyById.get(id)), + ].map(locate) + if (hasErrors(diagnostics)) return refuse(diagnostics) + + const layoutChanged = + input.layout === 'lock' && + Object.entries(blocks).some( + ([id, block]) => + stored.state.blocks[id] !== undefined && + !isEqual(block.position, stored.state.blocks[id].position) + ) + const noop = + !layoutChanged && + canonicalDiff.blocks.added.length === 0 && + canonicalDiff.blocks.removed.length === 0 && + canonicalDiff.blocks.modified.length === 0 && + canonicalDiff.edges.added.length === 0 && + canonicalDiff.edges.removed.length === 0 && + canonicalDiff.variables.added.length === 0 && + canonicalDiff.variables.removed.length === 0 && + canonicalDiff.variables.modified.length === 0 + const diff = summarizeDiff(canonicalDiff, baseCanonical.identity, materialized.identity, noop) + const mintedIds: Record = {} + for (const entry of materialized.entries) { + if (entry.status === 'created' && entry.idSource === 'minted') { + mintedIds[entry.key] = entry.id + } + } + const variablesChanged = + canonicalDiff.variables.added.length > 0 || + canonicalDiff.variables.removed.length > 0 || + canonicalDiff.variables.modified.length > 0 + const variables = variablesChanged + ? normalizeWorkflowVariables(materialized.state.variables ?? {}, { coerceValues: true }) + : undefined + /** Variables as the next read will parse them, so the re-printed fingerprint matches it. */ + const storedVariables = + variables === undefined ? stored.state.variables : (parseWorkflowVariables(variables) ?? {}) + + const reprintFrom = (state: WorkflowState) => + reprint({ + state, + meta: stored.meta, + identity: materialized.identity, + compiled: compiledModel, + catalog, + resources, + }) + + if (noop) { + const printed = reprintFrom(stored.state) + return { + ...base, + applied: false, + diff, + diagnostics, + newFingerprint: currentFingerprint, + files: printed.files, + lock: printed.lock, + lockBase: lockBaseFor(currentFingerprint), + mintedIds: {}, + warnings, + needsRedeployment: await checkNeedsRedeployment(context.workflowId), + } + } + + if (input.dryRun) { + const prepared = prepareWorkflowStateForPersistence({ blocks, edges }) + await assertWorkflowGraphIdsUnclaimed( + db, + context.workflowId, + collectWorkflowGraphIds(prepared.state) + ) + const printed = reprintFrom({ ...prepared.state, variables: storedVariables }) + logger.info('Evaluated workflow source without persisting', { + workflowId: context.workflowId, + workspaceId: context.workspaceId, + principalKind: principal.kind, + }) + return { + ...base, + applied: false, + diff, + diagnostics, + newFingerprint: printed.fingerprint, + files: printed.files, + lock: printed.lock, + lockBase: lockBaseFor(printed.fingerprint), + mintedIds, + warnings: [...warnings, ...prepared.warnings], + needsRedeployment: await checkNeedsRedeployment(context.workflowId), + } + } + + const lockPositioned = new Set( + input.layout === 'lock' + ? Object.entries(lock.blocks).flatMap(([key, entry]) => { + const id = idByKey.get(key) + return entry.layout && id ? [id] : [] + }) + : [] + ) + await assertNoWithheldBlockType( + { workspaceId: context.workspaceId, subjectUserId }, + Object.values(blocks) + ) + const persisted = await replaceWorkflowNormalizedState({ + workflowId: context.workflowId, + workspaceId: context.workspaceId, + attributedUserId: subjectUserId, + subjectUserId, + state: async (tx) => { + const current = await loadStoredSource(context, tx) + const fingerprint = fingerprintOf(current, catalog, resources) + if (fingerprint !== input.baseFingerprint) { + throw new WorkflowSourceStaleError(fingerprint) + } + const next = { + blocks: mergeCurrentLayout(blocks, current.state.blocks, lockPositioned), + edges, + } + assertProtectedBlocksPreserved( + { blocks: current.state.blocks, edges: current.state.edges }, + next + ) + return variables === undefined ? next : { ...next, variables } + }, + }) + + const printed = reprintFrom({ ...persisted.state, variables: storedVariables }) + logger.info('Applied workflow source', { + workflowId: context.workflowId, + workspaceId: context.workspaceId, + principalKind: principal.kind, + }) + return { + ...base, + applied: true, + diff, + diagnostics, + newFingerprint: printed.fingerprint, + files: printed.files, + lock: printed.lock, + lockBase: lockBaseFor(printed.fingerprint), + mintedIds, + warnings: [...warnings, ...persisted.warnings], + needsRedeployment: await checkNeedsRedeployment(context.workflowId), + } + }) + }, + /** Only a committed, non-empty apply is a change worth auditing. */ + projectAudit: ({ principal, input, context, result }) => + result.applied + ? ({ + action: AuditAction.WORKFLOW_UPDATED, + resourceType: AuditResourceType.WORKFLOW, + resourceId: context.workflowId, + resourceName: result.workflowName, + description: `Applied workflow source to workflow "${result.workflowName}"`, + metadata: { + op: 'apply_source', + blocksAdded: result.diff.blocks.added.length, + blocksRemoved: result.diff.blocks.removed.length, + blocksRenamed: result.diff.blocks.renamed.length, + blocksModified: result.diff.blocks.modified.length, + edgesAdded: result.diff.edges.added, + edgesRemoved: result.diff.edges.removed, + variablesChanged: + result.diff.variables.added.length + + result.diff.variables.removed.length + + result.diff.variables.modified.length, + sdkMajor: result.sdkMajor, + catalogVersion: result.catalogVersion, + ...(input.provenance ? { client: input.provenance.client } : {}), + ...(input.provenance?.gitSha ? { gitSha: input.provenance.gitSha } : {}), + source: principalAuditSource(principal), + }, + } as const) + : [], + afterSuccess: ({ context, result }) => { + if (!result.applied) return + return notifyWorkflowUpdated(context.workflowId) + }, +}) diff --git a/apps/sim/lib/workflows/application/get-workflow-source.ts b/apps/sim/lib/workflows/application/get-workflow-source.ts index 4e9d70473f6..70879a358f7 100644 --- a/apps/sim/lib/workflows/application/get-workflow-source.ts +++ b/apps/sim/lib/workflows/application/get-workflow-source.ts @@ -89,7 +89,7 @@ function withIdComments(workflow: CanonicalWorkflow, identity: LockIdentity): Ca } /** The full lock: canonicalize's identity, the printer's bindings/order/code files, and layout. */ -function assembleLock( +export function assembleLock( identity: LockIdentity, hints: Record, layout: Record diff --git a/apps/sim/lib/workflows/application/operations.ts b/apps/sim/lib/workflows/application/operations.ts index bdc06ee53d2..4d6df9a4e16 100644 --- a/apps/sim/lib/workflows/application/operations.ts +++ b/apps/sim/lib/workflows/application/operations.ts @@ -187,6 +187,22 @@ export const workflowOperations = { contentDelivery: 'none', ...HUMAN_WORKFLOW_PRINCIPAL_POLICY, }), + /** + * Writes workflow source (TypeScript) to the draft graph. Denied to workspace API keys for the + * reason `applyOperations` is: its gates (permission config, block visibility, credential + * reachability) take a human subject and fail open without one (build-spec decision 11). + * + * permission-group-exempt: which blocks and values a member may store is judged per block by the source gates and inside replaceWorkflowNormalizedState against the principal's human subject, not by a capability the authorization funnel can apply + */ + applySource: defineWorkspaceOperation({ + id: 'workflows.source.apply', + oauthScope: 'api:write', + minimumRole: 'write', + workspaceApiKey: 'deny', + capability: 'none', + contentDelivery: 'none', + ...HUMAN_WORKFLOW_PRINCIPAL_POLICY, + }), // permission-group-exempt: restoring a soft-deleted workflow is governed by workspace role restore: defineWorkspaceOperation({ id: 'workflows.restore', diff --git a/apps/sim/lib/workflows/application/source-error.ts b/apps/sim/lib/workflows/application/source-error.ts new file mode 100644 index 00000000000..e0d11d05962 --- /dev/null +++ b/apps/sim/lib/workflows/application/source-error.ts @@ -0,0 +1,56 @@ +import type { DiagnosticCode, DiagnosticSeverity } from '@sim/workflow-code' +import { OrchestrationError } from '@/lib/core/orchestration/types' + +/** + * One finding from applying workflow source, flattened for the wire: the compile span becomes + * `file`/`line`/`column` and its code frame. Lines refer to the submitted files. + */ +export interface WorkflowSourceDiagnostic { + code: DiagnosticCode + severity: DiagnosticSeverity + message: string + hint?: string + file?: string + line?: number + column?: number + endLine?: number + endColumn?: number + /** A plain-text excerpt of the submitted file around `line`, with a caret row. */ + frame?: string + blockKey?: string + blockId?: string + param?: string + /** JSON Pointer into a non-source input, such as the lock (`/blocks/agent/binding`). */ + path?: string +} + +/** + * Submitted workflow source that cannot be applied: a compile error, a gate refusal, a protected + * block, an invalid value or a blocking lint finding (s4 D5). Nothing was written. Kept apart + * from the use case so a route error policy can narrow on it without importing the compiler. + */ +export class WorkflowSourceRejectedError extends OrchestrationError { + constructor(readonly diagnostics: WorkflowSourceDiagnostic[]) { + const errors = diagnostics.filter((diagnostic) => diagnostic.severity === 'error').length + super( + 'validation', + `The workflow source has ${errors} error(s); nothing was written. See details.diagnostics.` + ) + this.name = 'WorkflowSourceRejectedError' + } +} + +/** + * The stored draft no longer matches the fingerprint the source was read at (s4 D3): someone + * edited the workflow, toggled a block lock, or a migration changed it. Re-read the source, + * rebase the edit onto it and apply again. + */ +export class WorkflowSourceStaleError extends OrchestrationError { + constructor(readonly currentFingerprint: string) { + super( + 'conflict', + 'The workflow changed since this source was read. Get the source again, reapply your edit and retry.' + ) + this.name = 'WorkflowSourceStaleError' + } +} From f2828308dd7d1dbdb4cd325d66cab5afb9311582 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:59:39 -0800 Subject: [PATCH 081/428] feat(workflows): POST /api/v2/workflows/{workflowId}/source behind workflow-code Strict body {files, lock, lockBase?, baseFingerprint, layout?, provenance?} under the import body cap and the public API rate limit. The workflow-graph concealment policy renders refused source as 400 SOURCE_REJECTED with details.diagnostics and stale source as 409 SOURCE_STALE with details.currentFingerprint; dry runs answer 200. The shared lock schemas are now strict at every level. Adds the workflow_source_applied analytics event and regenerates OpenAPI, the CLI operation table, MCP operations and the API reference group. --- .../(generated)/workflows/meta.json | 1 + apps/docs/content/docs/cli/reference.mdx | 31 + apps/docs/content/docs/cli/workflows.mdx | 29 + apps/docs/openapi-v2-workflows.json | 952 ++++++++++++++++++ .../v2/workflows/[workflowId]/source/route.ts | 69 +- .../contracts/v2/openapi/workflow-source.ts | 72 +- .../lib/api/contracts/v2/workflow-source.ts | 202 ++++ apps/sim/lib/api/contracts/workflow-source.ts | 9 +- .../lib/api/mcp/generated/v2-operations.ts | 14 +- apps/sim/lib/posthog/events.ts | 10 + apps/sim/lib/workflows/api/route-policies.ts | 24 +- packages/sim-cli/src/contract/commands.ts | 2 + packages/sim-cli/src/generated/v2-api.ts | 200 ++++ 13 files changed, 1607 insertions(+), 8 deletions(-) diff --git a/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json b/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json index 61ea4f69103..be08a5c95a0 100644 --- a/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json +++ b/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json @@ -11,6 +11,7 @@ "getWorkflowState", "getWorkflowOutline", "getWorkflowSource", + "applyWorkflowSource", "replaceWorkflowState", "applyWorkflowOperations", "applyWorkflowVariables", diff --git a/apps/docs/content/docs/cli/reference.mdx b/apps/docs/content/docs/cli/reference.mdx index dfd69f3be12..2ffb035e8fc 100644 --- a/apps/docs/content/docs/cli/reference.mdx +++ b/apps/docs/content/docs/cli/reference.mdx @@ -8293,6 +8293,37 @@ sim workflows source get [options] API request and response schemas: [getWorkflowSource](/api-reference/workflows/getWorkflowSource). +### sim workflows source apply + +Apply a workflow source directory to the workflow draft + +```bash +sim workflows source apply [options] +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `workflowId` | Yes | Workflow whose draft the source replaces | + + + +**Options** + + + +| Option | Required | Description | +| --- | --- | --- | +| `--from ` | Yes | Source directory: workflow.ts, functions/*, .sim/lock.json and .sim/base.json. | +| `--dry-run` | No | Check the source and show the outcome without saving or writing files. | + + + +API request and response schemas: [applyWorkflowSource](/api-reference/workflows/applyWorkflowSource). + ### sim workflows state get Get workflow state diff --git a/apps/docs/content/docs/cli/workflows.mdx b/apps/docs/content/docs/cli/workflows.mdx index 6fb687bf6a3..917768ed9df 100644 --- a/apps/docs/content/docs/cli/workflows.mdx +++ b/apps/docs/content/docs/cli/workflows.mdx @@ -1317,6 +1317,35 @@ sim workflows source get [options] API request and response schemas: [getWorkflowSource](/api-reference/workflows/getWorkflowSource). +### Apply a workflow source directory to the workflow draft + +```bash +sim workflows source apply [options] +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `workflowId` | Yes | Workflow whose draft the source replaces | + + + +**Options** + + + +| Option | Required | Description | +| --- | --- | --- | +| `--from ` | Yes | Source directory: workflow.ts, functions/*, .sim/lock.json and .sim/base.json. | +| `--dry-run` | No | Check the source and show the outcome without saving or writing files. | + + + +API request and response schemas: [applyWorkflowSource](/api-reference/workflows/applyWorkflowSource). + ## Related docs - [Workflow builder](/workflows) diff --git a/apps/docs/openapi-v2-workflows.json b/apps/docs/openapi-v2-workflows.json index 1dbb3bf4cf9..3013d40b5b8 100644 --- a/apps/docs/openapi-v2-workflows.json +++ b/apps/docs/openapi-v2-workflows.json @@ -6038,6 +6038,191 @@ "$ref": "#/components/responses/ServiceUnavailable" } } + }, + "post": { + "operationId": "applyWorkflowSource", + "summary": "Apply workflow source", + "description": "Write TypeScript workflow source to the saved draft in one all-or-nothing write. Send the files, lock and `fingerprint` from Get Workflow Source with your edits. Requires workspace write access. The live deployment is unchanged.\n\nThe server compiles the files and checks them against the same rules as canvas and operation edits. Any error returns `400` with `details.code` `SOURCE_REJECTED` and `details.diagnostics` (each with a file, line and column), and nothing is saved. A `409` means the draft changed since the source was read (`details.currentFingerprint`): get the source again, reapply the edit and retry. Locked blocks cannot be changed from source. Unchanged blocks keep their ids and stored values, renamed blocks keep their ids, and existing blocks keep their canvas positions. Source that matches the draft returns `applied: false` without saving. The response re-prints the saved source with its new lock and fingerprint. `dryRun=true` runs every check without saving and always returns `200`. Returns `403` while code-first workflows are not enabled. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", + "x-sim-operation": "workflows.source.apply", + "x-oauth-scope": "api:write", + "tags": ["Workflows"], + "security": [ + { + "apiKey": [] + }, + { + "oauthBearer": ["api:write"] + } + ], + "parameters": [ + { + "name": "workflowId", + "in": "path", + "required": true, + "description": "Unique workflow identifier.", + "schema": { + "type": "string", + "minLength": 1, + "description": "Unique workflow identifier.", + "examples": ["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"] + } + }, + { + "name": "dryRun", + "in": "query", + "required": false, + "description": "Run every check without writing, auditing, or notifying collaborators. Always answers `200`: errors are returned in `diagnostics` with `applied: false`, and the files, lock and fingerprint show what a committed apply would store.", + "schema": { + "description": "Run every check without writing, auditing, or notifying collaborators. Always answers `200`: errors are returned in `diagnostics` with `applied: false`, and the files, lock and fingerprint show what a committed apply would store.", + "type": "boolean" + } + } + ], + "requestBody": { + "required": true, + "description": "Edited source files with the lock and fingerprint they were read with.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplyWorkflowSourceBody" + }, + "examples": { + "example1": { + "summary": "Request example 1", + "value": { + "files": { + "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" + }, + "lock": { + "lockVersion": 1, + "blocks": { + "start": { + "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "parent": null, + "binding": "start", + "order": 0 + } + }, + "variables": {} + }, + "lockBase": { + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" + }, + "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d" + } + } + } + } + } + }, + "responses": { + "200": { + "description": "The applied (or evaluated) source.", + "headers": { + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + } + }, + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/ApplyWorkflowSourceResponse" + }, + "examples": { + "example1": { + "summary": "Response example 1", + "value": { + "data": { + "workflowId": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "dryRun": false, + "applied": false, + "diff": { + "noop": true, + "blocks": { + "added": [], + "removed": [], + "renamed": [], + "modified": [] + }, + "edges": { + "added": 0, + "removed": 0 + }, + "variables": { + "added": [], + "removed": [], + "modified": [] + } + }, + "diagnostics": [], + "newFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "files": { + "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" + }, + "lock": { + "lockVersion": 1, + "blocks": { + "start": { + "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "parent": null, + "binding": "start", + "order": 0 + } + }, + "variables": {} + }, + "lockBase": { + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" + }, + "mintedIds": {}, + "warnings": [], + "needsRedeployment": false + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "423": { + "$ref": "#/components/responses/Locked" + }, + "429": { + "$ref": "#/components/responses/RateLimited" + }, + "500": { + "$ref": "#/components/responses/InternalError" + }, + "503": { + "$ref": "#/components/responses/ServiceUnavailable" + } + } } }, "/api/v2/workspaces/{workspaceId}/fork/preview": { @@ -17701,6 +17886,773 @@ } ] }, + "ApplyWorkflowSourceResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "workflowId": { + "type": "string", + "description": "Workflow id." + }, + "workspaceId": { + "type": "string", + "description": "Workspace id." + }, + "dryRun": { + "type": "boolean", + "description": "True when nothing was written because `dryRun` was set." + }, + "applied": { + "type": "boolean", + "description": "True only when the draft was written; false on a dry run and on a no-op." + }, + "diff": { + "type": "object", + "properties": { + "noop": { + "type": "boolean", + "description": "True when the source matches the saved draft." + }, + "blocks": { + "type": "object", + "properties": { + "added": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stored block id." + }, + "key": { + "type": "string", + "description": "Block key in the source." + } + }, + "required": ["id", "key"], + "additionalProperties": false, + "description": "A block by id and source key." + }, + "description": "New blocks." + }, + "removed": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stored block id." + }, + "key": { + "type": "string", + "description": "Block key in the source." + } + }, + "required": ["id", "key"], + "additionalProperties": false, + "description": "A block by id and source key." + }, + "description": "Deleted blocks." + }, + "renamed": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stored block id; unchanged by the rename." + }, + "from": { + "type": "string", + "description": "Previous key." + }, + "to": { + "type": "string", + "description": "New key." + } + }, + "required": ["id", "from", "to"], + "additionalProperties": false, + "description": "A renamed block." + }, + "description": "Renamed blocks; each keeps its id." + }, + "modified": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stored block id." + }, + "key": { + "type": "string", + "description": "Block key in the source." + }, + "fields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Changed fields, modes (`modes.`) and attributes." + }, + "reparented": { + "description": "Moved into or out of a container.", + "type": "boolean" + } + }, + "required": ["id", "key", "fields"], + "additionalProperties": false, + "description": "A changed block." + }, + "description": "Changed blocks." + } + }, + "required": ["added", "removed", "renamed", "modified"], + "additionalProperties": false, + "description": "Block changes." + }, + "edges": { + "type": "object", + "properties": { + "added": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Connections added." + }, + "removed": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Connections removed." + } + }, + "required": ["added", "removed"], + "additionalProperties": false, + "description": "Connection changes." + }, + "variables": { + "type": "object", + "properties": { + "added": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Variable keys added." + }, + "removed": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Variable keys removed." + }, + "modified": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Variable keys changed." + } + }, + "required": ["added", "removed", "modified"], + "additionalProperties": false, + "description": "Variable changes." + } + }, + "required": ["noop", "blocks", "edges", "variables"], + "additionalProperties": false, + "description": "What the apply changed, or would change on a dry run." + }, + "diagnostics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Diagnostic code, e.g. `E_UNKNOWN_PARAM` or `E_APPLY_PROTECTED_BLOCK`." + }, + "severity": { + "type": "string", + "enum": ["error", "warning", "info"], + "description": "Diagnostic severity." + }, + "message": { + "type": "string", + "description": "What was found." + }, + "hint": { + "description": "How to address it.", + "type": "string" + }, + "file": { + "description": "Submitted file the finding is in.", + "type": "string" + }, + "line": { + "description": "1-based line in `file`.", + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "column": { + "description": "1-based column in `file`.", + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "endLine": { + "description": "1-based line the finding ends on.", + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "endColumn": { + "description": "1-based column the finding ends at.", + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "frame": { + "description": "The source lines around the finding, with a caret row.", + "type": "string" + }, + "blockKey": { + "description": "Block key the finding is about.", + "type": "string" + }, + "blockId": { + "description": "Stored id of the block the finding is about.", + "type": "string" + }, + "param": { + "description": "Field the finding is about.", + "type": "string" + }, + "path": { + "description": "JSON Pointer into the lock, for a lock finding.", + "type": "string" + } + }, + "required": ["code", "severity", "message"], + "additionalProperties": false, + "description": "A finding from applying workflow source, pinned to the submitted files." + }, + "description": "Warnings, and on a dry run every error a commit would refuse." + }, + "newFingerprint": { + "type": "string", + "description": "Fingerprint of the saved (or, on a dry run, would-be) draft: the next `baseFingerprint`." + }, + "files": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "The source re-printed from what was saved, including any normalized values." + }, + "lock": { + "type": "object", + "properties": { + "lockVersion": { + "type": "number", + "const": 1, + "description": "Lock format version." + }, + "blocks": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Block id." + }, + "parent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Key of the enclosing loop or parallel, or null." + }, + "branches": { + "description": "Condition or router branch key → stored branch id.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + } + }, + "items": { + "description": "Per field, its id-bearing items (input format fields) in stored order.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Item name." + }, + "id": { + "type": "string", + "description": "Item id." + } + }, + "required": ["name", "id"], + "additionalProperties": false, + "description": "One id-bearing list item." + } + } + }, + "binding": { + "type": "string", + "description": "The `const` name the block is printed as." + }, + "order": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Declaration-order tie-break." + }, + "layout": { + "type": "object", + "properties": { + "x": { + "type": "number", + "description": "Canvas x position." + }, + "y": { + "type": "number", + "description": "Canvas y position." + }, + "w": { + "description": "Container width.", + "type": "number" + }, + "h": { + "description": "Container height.", + "type": "number" + }, + "height": { + "description": "Stored block height.", + "type": "number" + }, + "horizontalHandles": { + "description": "Handles on the left and right.", + "type": "boolean" + } + }, + "required": ["x", "y"], + "additionalProperties": false, + "description": "Stored canvas geometry; applied only to new blocks." + }, + "codeFile": { + "description": "Path of the block’s function-code file.", + "type": "string" + } + }, + "required": ["id", "parent", "binding", "order"], + "additionalProperties": false, + "description": "One block’s identity." + }, + "description": "Block key → identity." + }, + "variables": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "Variable key → variable id." + } + }, + "required": ["lockVersion", "blocks", "variables"], + "additionalProperties": false, + "description": "Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids." + }, + "lockBase": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "Workspace the workflow belongs to." + }, + "baseFingerprint": { + "type": "string", + "description": "The `fingerprint` this source was read at." + }, + "catalogHash": { + "type": "string", + "description": "Hash of the block catalog the source was printed against." + } + }, + "required": ["workspaceId", "baseFingerprint", "catalogHash"], + "additionalProperties": false, + "description": "Freshness facts for the lock in this environment (`.sim/base.json`)." + }, + "mintedIds": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "Block key → id for new blocks whose id was minted rather than taken from the lock." + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Non-fatal notes about the write." + }, + "needsRedeployment": { + "type": "boolean", + "description": "Whether the draft now differs from the live deployment; apply never deploys." + } + }, + "required": [ + "workflowId", + "workspaceId", + "dryRun", + "applied", + "diff", + "diagnostics", + "newFingerprint", + "files", + "lock", + "lockBase", + "mintedIds", + "warnings", + "needsRedeployment" + ], + "additionalProperties": false, + "description": "Response data." + } + }, + "required": ["data"], + "additionalProperties": false, + "title": "Apply workflow source response", + "description": "The outcome, with the source re-printed from the saved draft.", + "examples": [ + { + "data": { + "workflowId": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "dryRun": false, + "applied": false, + "diff": { + "noop": true, + "blocks": { + "added": [], + "removed": [], + "renamed": [], + "modified": [] + }, + "edges": { + "added": 0, + "removed": 0 + }, + "variables": { + "added": [], + "removed": [], + "modified": [] + } + }, + "diagnostics": [], + "newFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "files": { + "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" + }, + "lock": { + "lockVersion": 1, + "blocks": { + "start": { + "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "parent": null, + "binding": "start", + "order": 0 + } + }, + "variables": {} + }, + "lockBase": { + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" + }, + "mintedIds": {}, + "warnings": [], + "needsRedeployment": false + } + } + ] + }, + "ApplyWorkflowSourceBody": { + "type": "object", + "properties": { + "files": { + "type": "object", + "propertyNames": { + "type": "string", + "minLength": 1, + "maxLength": 512 + }, + "additionalProperties": { + "type": "string" + }, + "description": "Relative path → file text: `workflow.ts` plus every function-code file it references (for example `functions/score.js`)." + }, + "lock": { + "type": "object", + "properties": { + "lockVersion": { + "type": "number", + "const": 1, + "description": "Lock format version." + }, + "blocks": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Block id." + }, + "parent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Key of the enclosing loop or parallel, or null." + }, + "branches": { + "description": "Condition or router branch key → stored branch id.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + } + }, + "items": { + "description": "Per field, its id-bearing items (input format fields) in stored order.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Item name." + }, + "id": { + "type": "string", + "description": "Item id." + } + }, + "required": ["name", "id"], + "additionalProperties": false, + "description": "One id-bearing list item." + } + } + }, + "binding": { + "type": "string", + "description": "The `const` name the block is printed as." + }, + "order": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Declaration-order tie-break." + }, + "layout": { + "type": "object", + "properties": { + "x": { + "type": "number", + "description": "Canvas x position." + }, + "y": { + "type": "number", + "description": "Canvas y position." + }, + "w": { + "description": "Container width.", + "type": "number" + }, + "h": { + "description": "Container height.", + "type": "number" + }, + "height": { + "description": "Stored block height.", + "type": "number" + }, + "horizontalHandles": { + "description": "Handles on the left and right.", + "type": "boolean" + } + }, + "required": ["x", "y"], + "additionalProperties": false, + "description": "Stored canvas geometry; applied only to new blocks." + }, + "codeFile": { + "description": "Path of the block’s function-code file.", + "type": "string" + } + }, + "required": ["id", "parent", "binding", "order"], + "additionalProperties": false, + "description": "One block’s identity." + }, + "description": "Block key → identity." + }, + "variables": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "Variable key → variable id." + } + }, + "required": ["lockVersion", "blocks", "variables"], + "additionalProperties": false, + "description": "Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids." + }, + "lockBase": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "Workspace the workflow belongs to." + }, + "baseFingerprint": { + "type": "string", + "description": "The `fingerprint` this source was read at." + }, + "catalogHash": { + "type": "string", + "description": "Hash of the block catalog the source was printed against." + } + }, + "required": ["workspaceId", "baseFingerprint", "catalogHash"], + "additionalProperties": false, + "description": "Freshness facts for the lock in this environment (`.sim/base.json`)." + }, + "baseFingerprint": { + "type": "string", + "minLength": 1, + "maxLength": 256, + "description": "The `fingerprint` the source was read at. The apply answers `409` when the saved draft no longer matches it." + }, + "layout": { + "description": "`preserve` (default): existing blocks keep their canvas positions and lock positions apply only to new blocks. `lock`: every block the lock positions moves there.", + "type": "string", + "enum": ["preserve", "lock"] + }, + "provenance": { + "description": "Where the source came from, for the audit log.", + "type": "object", + "properties": { + "client": { + "type": "string", + "enum": ["cli", "copilot", "canvas", "api"], + "description": "What submitted the source." + }, + "gitSha": { + "description": "The commit the source was taken from; recorded in the audit log.", + "type": "string", + "pattern": "^[0-9a-f]{7,64}$" + }, + "repo": { + "description": "The repository the source was taken from.", + "type": "string", + "minLength": 1, + "maxLength": 512 + } + }, + "required": ["client"], + "additionalProperties": false + } + }, + "required": ["files", "lock", "baseFingerprint"], + "additionalProperties": false, + "title": "Apply workflow source body", + "description": "Edited source files with the lock and fingerprint they were read with.", + "examples": [ + { + "files": { + "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" + }, + "lock": { + "lockVersion": 1, + "blocks": { + "start": { + "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "parent": null, + "binding": "start", + "order": 0 + } + }, + "variables": {} + }, + "lockBase": { + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" + }, + "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d" + } + ] + }, "WorkspaceForkPreview": { "type": "object", "properties": { diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts index 2f6e19916bd..099e37f9ed2 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts @@ -1,8 +1,15 @@ -import { v2GetWorkflowSourceContract } from '@/lib/api/contracts/v2/workflow-source' +import { isUserCredentialPrincipal } from '@sim/auth/principal' +import { + v2ApplyWorkflowSourceContract, + v2GetWorkflowSourceContract, +} from '@/lib/api/contracts/v2/workflow-source' import { defineV2JsonRoute, v2ApiKeyAuth, v2RateLimits } from '@/lib/api/server/routes' +import { captureServerEvent } from '@/lib/posthog/server' import { v2WorkflowErrorPolicies } from '@/lib/workflows/api' +import { applyWorkflowSource } from '@/lib/workflows/application/apply-workflow-source' import { getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' import { workflowOperations } from '@/lib/workflows/application/operations' +import { MAX_IMPORT_BODY_BYTES } from '@/lib/workflows/operations/import-workflow' export const dynamic = 'force-dynamic' export const revalidate = 0 @@ -26,3 +33,63 @@ export const GET = defineV2JsonRoute({ useCase: getWorkflowSource, present: (source) => ({ data: source }), }) + +/** + * POST /api/v2/workflows/[workflowId]/source — writes TypeScript source to the draft in one + * all-or-nothing write. Error diagnostics answer 400, a stale fingerprint 409, a locked workflow + * 423; a dry run answers 200 with its diagnostics in the body. Answers 403 while the + * `workflow-code` flag is off. + */ +export const POST = defineV2JsonRoute({ + contract: v2ApplyWorkflowSourceContract, + auth: v2ApiKeyAuth, + operation: workflowOperations.applySource, + rateLimit: v2RateLimits.publicApi, + errorPolicy: v2WorkflowErrorPolicies.concealWorkflowGraphAuthorization, + parseOptions: { maxBodyBytes: MAX_IMPORT_BODY_BYTES }, + mapInput: ({ params, query, body }) => ({ + workflowId: params.workflowId, + files: body.files, + lock: body.lock, + baseFingerprint: body.baseFingerprint, + ...(body.lockBase ? { lockBase: body.lockBase } : {}), + ...(body.layout ? { layout: body.layout } : {}), + ...(body.provenance ? { provenance: body.provenance } : {}), + ...(query.dryRun !== undefined ? { dryRun: query.dryRun } : {}), + }), + useCase: applyWorkflowSource, + present: (result) => ({ + data: { + workflowId: result.workflowId, + workspaceId: result.workspaceId, + dryRun: result.dryRun, + applied: result.applied, + diff: result.diff, + diagnostics: result.diagnostics, + newFingerprint: result.newFingerprint, + files: result.files, + lock: result.lock, + lockBase: result.lockBase, + mintedIds: result.mintedIds, + warnings: result.warnings, + needsRedeployment: result.needsRedeployment, + }, + }), + /** Telemetry only, for writes that changed the draft. */ + onSuccess: ({ principal, input, result }) => { + if (!result.applied || !isUserCredentialPrincipal(principal)) return + captureServerEvent( + principal.userId, + 'workflow_source_applied', + { + workflow_id: result.workflowId, + workspace_id: result.workspaceId, + blocks_added: result.diff.blocks.added.length, + blocks_removed: result.diff.blocks.removed.length, + blocks_modified: result.diff.blocks.modified.length, + client: input.provenance?.client ?? 'api', + }, + { groups: { workspace: result.workspaceId } } + ) + }, +}) diff --git a/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts index 0ea32d04172..3e465d7ca35 100644 --- a/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts +++ b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts @@ -2,8 +2,13 @@ import { documentedSchema, RATE_LIMIT_HEADERS, RESOURCE_ERRORS, + RESOURCE_MUTATION_ERRORS, + WORKSPACE_API_KEY_DENIED, } from '@/lib/api/contracts/v2/openapi/shared' -import { v2GetWorkflowSourceContract } from '@/lib/api/contracts/v2/workflow-source' +import { + v2ApplyWorkflowSourceContract, + v2GetWorkflowSourceContract, +} from '@/lib/api/contracts/v2/workflow-source' import { defineOpenApiRoute } from '@/lib/api/openapi/types' import { workflowOperations } from '@/lib/workflows/application/operations' @@ -65,4 +70,69 @@ export const workflowSourceOpenApiRoutes = [ ), } ), + defineOpenApiRoute( + v2ApplyWorkflowSourceContract, + { + applicationOperation: workflowOperations.applySource, + operationId: 'applyWorkflowSource', + summary: 'Apply workflow source', + description: `Write TypeScript workflow source to the saved draft in one all-or-nothing write. Send the files, lock and \`fingerprint\` from Get Workflow Source with your edits. Requires workspace write access. The live deployment is unchanged.\n\nThe server compiles the files and checks them against the same rules as canvas and operation edits. Any error returns \`400\` with \`details.code\` \`SOURCE_REJECTED\` and \`details.diagnostics\` (each with a file, line and column), and nothing is saved. A \`409\` means the draft changed since the source was read (\`details.currentFingerprint\`): get the source again, reapply the edit and retry. Locked blocks cannot be changed from source. Unchanged blocks keep their ids and stored values, renamed blocks keep their ids, and existing blocks keep their canvas positions. Source that matches the draft returns \`applied: false\` without saving. The response re-prints the saved source with its new lock and fingerprint. \`dryRun=true\` runs every check without saving and always returns \`200\`. Returns \`403\` while code-first workflows are not enabled. ${WORKSPACE_API_KEY_DENIED}`, + tags: ['Workflows'], + errors: RESOURCE_MUTATION_ERRORS, + success: { description: 'The applied (or evaluated) source.', headers: RATE_LIMIT_HEADERS }, + }, + { + params: v2ApplyWorkflowSourceContract.params, + query: documentedSchema( + v2ApplyWorkflowSourceContract.query, + 'ApplyWorkflowSourceQuery', + 'Apply workflow source query', + 'Whether to evaluate without saving.' + ), + body: documentedSchema( + v2ApplyWorkflowSourceContract.body, + 'ApplyWorkflowSourceBody', + 'Apply workflow source body', + 'Edited source files with the lock and fingerprint they were read with.', + [ + { + files: WORKFLOW_SOURCE_EXAMPLE.files, + lock: WORKFLOW_SOURCE_EXAMPLE.lock, + lockBase: WORKFLOW_SOURCE_EXAMPLE.lockBase, + baseFingerprint: FINGERPRINT, + }, + ] + ), + response: documentedSchema( + v2ApplyWorkflowSourceContract.response.schema, + 'ApplyWorkflowSourceResponse', + 'Apply workflow source response', + 'The outcome, with the source re-printed from the saved draft.', + [ + { + data: { + workflowId: WORKFLOW_SOURCE_EXAMPLE.workflowId, + workspaceId: WORKFLOW_SOURCE_EXAMPLE.workspaceId, + dryRun: false, + applied: false, + diff: { + noop: true, + blocks: { added: [], removed: [], renamed: [], modified: [] }, + edges: { added: 0, removed: 0 }, + variables: { added: [], removed: [], modified: [] }, + }, + diagnostics: [], + newFingerprint: FINGERPRINT, + files: WORKFLOW_SOURCE_EXAMPLE.files, + lock: WORKFLOW_SOURCE_EXAMPLE.lock, + lockBase: WORKFLOW_SOURCE_EXAMPLE.lockBase, + mintedIds: {}, + warnings: [], + needsRedeployment: false, + }, + }, + ] + ), + } + ), ] diff --git a/apps/sim/lib/api/contracts/v2/workflow-source.ts b/apps/sim/lib/api/contracts/v2/workflow-source.ts index 900e865ca72..c5dd1a85f35 100644 --- a/apps/sim/lib/api/contracts/v2/workflow-source.ts +++ b/apps/sim/lib/api/contracts/v2/workflow-source.ts @@ -1,7 +1,11 @@ +import { z } from 'zod' +import { booleanQueryFlagSchema } from '@/lib/api/contracts/primitives' import { defineRouteContract } from '@/lib/api/contracts/types' import { v2DataResponse } from '@/lib/api/contracts/v2/shared' import { v2WorkflowIdParamsSchema } from '@/lib/api/contracts/v2/workflows' import { + lockBaseSchema, + workflowLockSchema, workflowSourceQuerySchema, workflowSourceSchema, } from '@/lib/api/contracts/workflow-source' @@ -14,3 +18,201 @@ export const v2GetWorkflowSourceContract = defineRouteContract({ query: workflowSourceQuerySchema, response: { mode: 'json', schema: v2DataResponse(workflowSourceSchema) }, }) + +const SOURCE_ENTRY_FILE = 'workflow.ts' +const MAX_SOURCE_FILES = 500 + +const applyWorkflowSourceQuerySchema = z + .object({ + dryRun: booleanQueryFlagSchema + .optional() + .describe( + 'Run every check without writing, auditing, or notifying collaborators. Always answers `200`: errors are returned in `diagnostics` with `applied: false`, and the files, lock and fingerprint show what a committed apply would store.' + ), + }) + .strict() + +const sourceFilesSchema = z + .record( + z + .string() + .min(1, 'files: a path cannot be empty') + .max(512, 'files: a path cannot exceed 512 characters'), + z.string() + ) + .superRefine((files, ctx) => { + if (!Object.hasOwn(files, SOURCE_ENTRY_FILE)) { + ctx.addIssue({ code: 'custom', message: `files must include ${SOURCE_ENTRY_FILE}` }) + } + if (Object.keys(files).length > MAX_SOURCE_FILES) { + ctx.addIssue({ code: 'custom', message: `files cannot hold more than ${MAX_SOURCE_FILES}` }) + } + }) + .describe( + 'Relative path → file text: `workflow.ts` plus every function-code file it references (for example `functions/score.js`).' + ) + +const applyWorkflowSourceBodySchema = z + .object({ + files: sourceFilesSchema, + lock: workflowLockSchema, + lockBase: lockBaseSchema.optional(), + baseFingerprint: z + .string() + .min(1, 'baseFingerprint cannot be empty') + .max(256, 'baseFingerprint is too long') + .describe( + 'The `fingerprint` the source was read at. The apply answers `409` when the saved draft no longer matches it.' + ), + layout: z + .enum(['preserve', 'lock'], { + error: 'layout: expected one of "preserve" | "lock"', + }) + .optional() + .describe( + '`preserve` (default): existing blocks keep their canvas positions and lock positions apply only to new blocks. `lock`: every block the lock positions moves there.' + ), + provenance: z + .object({ + client: z + .enum(['cli', 'copilot', 'canvas', 'api'], { + error: 'provenance.client: expected one of "cli" | "copilot" | "canvas" | "api"', + }) + .describe('What submitted the source.'), + gitSha: z + .string() + .regex(/^[0-9a-f]{7,64}$/, 'provenance.gitSha must be a hexadecimal commit hash') + .optional() + .describe('The commit the source was taken from; recorded in the audit log.'), + repo: z + .string() + .min(1, 'provenance.repo cannot be empty') + .max(512, 'provenance.repo is too long') + .optional() + .describe('The repository the source was taken from.'), + }) + .strict() + .optional() + .describe('Where the source came from, for the audit log.'), + }) + .strict() + +const sourceDiagnosticSchema = z + .object({ + code: z + .string() + .describe('Diagnostic code, e.g. `E_UNKNOWN_PARAM` or `E_APPLY_PROTECTED_BLOCK`.'), + severity: z.enum(['error', 'warning', 'info']).describe('Diagnostic severity.'), + message: z.string().describe('What was found.'), + hint: z.string().optional().describe('How to address it.'), + file: z.string().optional().describe('Submitted file the finding is in.'), + line: z.number().int().optional().describe('1-based line in `file`.'), + column: z.number().int().optional().describe('1-based column in `file`.'), + endLine: z.number().int().optional().describe('1-based line the finding ends on.'), + endColumn: z.number().int().optional().describe('1-based column the finding ends at.'), + frame: z.string().optional().describe('The source lines around the finding, with a caret row.'), + blockKey: z.string().optional().describe('Block key the finding is about.'), + blockId: z.string().optional().describe('Stored id of the block the finding is about.'), + param: z.string().optional().describe('Field the finding is about.'), + path: z.string().optional().describe('JSON Pointer into the lock, for a lock finding.'), + }) + .describe('A finding from applying workflow source, pinned to the submitted files.') + +const blockRefSchema = z + .object({ + id: z.string().describe('Stored block id.'), + key: z.string().describe('Block key in the source.'), + }) + .describe('A block by id and source key.') + +const sourceDiffSchema = z + .object({ + noop: z.boolean().describe('True when the source matches the saved draft.'), + blocks: z + .object({ + added: z.array(blockRefSchema).describe('New blocks.'), + removed: z.array(blockRefSchema).describe('Deleted blocks.'), + renamed: z + .array( + z + .object({ + id: z.string().describe('Stored block id; unchanged by the rename.'), + from: z.string().describe('Previous key.'), + to: z.string().describe('New key.'), + }) + .describe('A renamed block.') + ) + .describe('Renamed blocks; each keeps its id.'), + modified: z + .array( + blockRefSchema + .extend({ + fields: z + .array(z.string()) + .describe('Changed fields, modes (`modes.`) and attributes.'), + reparented: z.boolean().optional().describe('Moved into or out of a container.'), + }) + .describe('A changed block.') + ) + .describe('Changed blocks.'), + }) + .describe('Block changes.'), + edges: z + .object({ + added: z.number().int().describe('Connections added.'), + removed: z.number().int().describe('Connections removed.'), + }) + .describe('Connection changes.'), + variables: z + .object({ + added: z.array(z.string()).describe('Variable keys added.'), + removed: z.array(z.string()).describe('Variable keys removed.'), + modified: z.array(z.string()).describe('Variable keys changed.'), + }) + .describe('Variable changes.'), + }) + .describe('What the apply changed, or would change on a dry run.') + +const applyWorkflowSourceDataSchema = z + .object({ + workflowId: z.string().describe('Workflow id.'), + workspaceId: z.string().describe('Workspace id.'), + dryRun: z.boolean().describe('True when nothing was written because `dryRun` was set.'), + applied: z + .boolean() + .describe('True only when the draft was written; false on a dry run and on a no-op.'), + diff: sourceDiffSchema, + diagnostics: z + .array(sourceDiagnosticSchema) + .describe('Warnings, and on a dry run every error a commit would refuse.'), + newFingerprint: z + .string() + .describe( + 'Fingerprint of the saved (or, on a dry run, would-be) draft: the next `baseFingerprint`.' + ), + files: z + .record(z.string(), z.string()) + .describe('The source re-printed from what was saved, including any normalized values.'), + lock: workflowLockSchema, + lockBase: lockBaseSchema, + mintedIds: z + .record(z.string(), z.string()) + .describe( + 'Block key → id for new blocks whose id was minted rather than taken from the lock.' + ), + warnings: z.array(z.string()).describe('Non-fatal notes about the write.'), + needsRedeployment: z + .boolean() + .describe('Whether the draft now differs from the live deployment; apply never deploys.'), + }) + .describe('The outcome of applying workflow source.') + +/** `POST /api/v2/workflows/{workflowId}/source`: write TypeScript source to the draft graph. */ +export const v2ApplyWorkflowSourceContract = defineRouteContract({ + method: 'POST', + path: '/api/v2/workflows/[workflowId]/source', + params: v2WorkflowIdParamsSchema, + query: applyWorkflowSourceQuerySchema, + body: applyWorkflowSourceBodySchema, + response: { mode: 'json', schema: v2DataResponse(applyWorkflowSourceDataSchema) }, +}) diff --git a/apps/sim/lib/api/contracts/workflow-source.ts b/apps/sim/lib/api/contracts/workflow-source.ts index 904441905c1..9fe7445e56a 100644 --- a/apps/sim/lib/api/contracts/workflow-source.ts +++ b/apps/sim/lib/api/contracts/workflow-source.ts @@ -35,6 +35,7 @@ const lockLayoutSchema = z height: z.number().optional().describe('Stored block height.'), horizontalHandles: z.boolean().optional().describe('Handles on the left and right.'), }) + .strict() .describe('Stored canvas geometry; applied only to new blocks.') const lockBlockSchema = z @@ -54,6 +55,7 @@ const lockBlockSchema = z name: z.string().describe('Item name.'), id: z.string().describe('Item id.'), }) + .strict() .describe('One id-bearing list item.') ) ) @@ -64,22 +66,25 @@ const lockBlockSchema = z layout: lockLayoutSchema.optional(), codeFile: z.string().optional().describe('Path of the block’s function-code file.'), }) + .strict() .describe('One block’s identity.') -const workflowLockSchema = z +export const workflowLockSchema = z .object({ lockVersion: z.literal(1).describe('Lock format version.'), blocks: z.record(z.string(), lockBlockSchema).describe('Block key → identity.'), variables: z.record(z.string(), z.string()).describe('Variable key → variable id.'), }) + .strict() .describe('Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids.') -const lockBaseSchema = z +export const lockBaseSchema = z .object({ workspaceId: z.string().describe('Workspace the workflow belongs to.'), baseFingerprint: z.string().describe('The `fingerprint` this source was read at.'), catalogHash: z.string().describe('Hash of the block catalog the source was printed against.'), }) + .strict() .describe('Freshness facts for the lock in this environment (`.sim/base.json`).') const sourceWarningSchema = z diff --git a/apps/sim/lib/api/mcp/generated/v2-operations.ts b/apps/sim/lib/api/mcp/generated/v2-operations.ts index 05e461fd968..5138af2e7fd 100644 --- a/apps/sim/lib/api/mcp/generated/v2-operations.ts +++ b/apps/sim/lib/api/mcp/generated/v2-operations.ts @@ -295,7 +295,10 @@ import { v2UndeployWorkflowMcpToolContract, v2UpdateWorkflowMcpServerContract, } from '@/lib/api/contracts/v2/workflow-mcp-servers' -import { v2GetWorkflowSourceContract } from '@/lib/api/contracts/v2/workflow-source' +import { + v2ApplyWorkflowSourceContract, + v2GetWorkflowSourceContract, +} from '@/lib/api/contracts/v2/workflow-source' import { v2ActivateWorkflowVersionContract, v2ApplyWorkflowOperationsContract, @@ -458,6 +461,15 @@ export const V2_MCP_OPERATIONS = { handler: () => import('@/app/api/v2/workflows/[workflowId]/operations/route').then((route) => route.POST), }, + applyWorkflowSource: { + contract: v2ApplyWorkflowSourceContract, + summary: 'Apply workflow source', + description: + 'Write TypeScript workflow source to the saved draft in one all-or-nothing write. Send the files, lock and `fingerprint` from Get Workflow Source with your edits. Requires workspace write access. The live deployment is unchanged.\n\nThe server compiles the files and checks them against the same rules as canvas and operation edits. Any error returns `400` with `details.code` `SOURCE_REJECTED` and `details.diagnostics` (each with a file, line and column), and nothing is saved. A `409` means the draft changed since the source was read (`details.currentFingerprint`): get the source again, reapply the edit and retry. Locked blocks cannot be changed from source. Unchanged blocks keep their ids and stored values, renamed blocks keep their ids, and existing blocks keep their canvas positions. Source that matches the draft returns `applied: false` without saving. The response re-prints the saved source with its new lock and fingerprint. `dryRun=true` runs every check without saving and always returns `200`. Returns `403` while code-first workflows are not enabled. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.', + workspaceKeyUnsupported: true, + handler: () => + import('@/app/api/v2/workflows/[workflowId]/source/route').then((route) => route.POST), + }, applyWorkflowVariables: { contract: v2ApplyWorkflowVariablesContract, summary: 'Update workflow variables', diff --git a/apps/sim/lib/posthog/events.ts b/apps/sim/lib/posthog/events.ts index a8240dfe7ec..584a0ac0c47 100644 --- a/apps/sim/lib/posthog/events.ts +++ b/apps/sim/lib/posthog/events.ts @@ -183,6 +183,16 @@ export interface PostHogEventMap { workspace_id: string } + /** A committed workflow source apply that changed the draft; `client` is the self-reported submitter. */ + workflow_source_applied: { + workflow_id: string + workspace_id: string + blocks_added: number + blocks_removed: number + blocks_modified: number + client: string + } + workflow_restored: { workflow_id: string workspace_id: string diff --git a/apps/sim/lib/workflows/api/route-policies.ts b/apps/sim/lib/workflows/api/route-policies.ts index 391c884ae71..cc412279c31 100644 --- a/apps/sim/lib/workflows/api/route-policies.ts +++ b/apps/sim/lib/workflows/api/route-policies.ts @@ -26,6 +26,10 @@ import { WorkflowRunAlreadyTerminalError } from '@/lib/execution/workflow-run-al import { WORKFLOW_DELEGATION_AUDIENCE } from '@/lib/workflows/application/authorization' import { WorkflowImportError } from '@/lib/workflows/application/import-error' import { WorkflowOperationsNotAppliedError } from '@/lib/workflows/application/operations-error' +import { + WorkflowSourceRejectedError, + WorkflowSourceStaleError, +} from '@/lib/workflows/application/source-error' import { WorkspaceOperationConflict } from '@/lib/workspaces/operations/receipts' import { v2CaughtOrchestrationError, @@ -67,10 +71,12 @@ export const v2WorkflowErrorPolicies = { /** * Conceals cross-tenant reads exactly as * {@link v2WorkflowErrorPolicies.concealWorkflowAuthorization} does, and adds - * the one refusal an edit batch has structured detail for: an `atomic` batch + * the refusals a graph write has structured detail for: an `atomic` batch * that could not be applied whole answers `409` carrying the declined - * operations and the block inputs that would have been dropped, so a pipeline - * can act on both without a second request. + * operations and the block inputs that would have been dropped, refused + * workflow source answers `400` with its line-pinned diagnostics, and stale + * source answers `409` with the current fingerprint, so a pipeline can act on + * each without a second request. */ concealWorkflowGraphAuthorization: createV2ResourceConcealmentPolicy({ notFoundMessage: 'Workflow not found', @@ -82,6 +88,18 @@ export const v2WorkflowErrorPolicies = { droppedInputs: error.droppedInputs, }) } + if (error instanceof WorkflowSourceRejectedError) { + return v2ErrorForOrchestration(error.code, error.message, { + code: 'SOURCE_REJECTED', + diagnostics: error.diagnostics, + }) + } + if (error instanceof WorkflowSourceStaleError) { + return v2ErrorForOrchestration(error.code, error.message, { + code: 'SOURCE_STALE', + currentFingerprint: error.currentFingerprint, + }) + } return v2CaughtOrchestrationError(error) }, }), diff --git a/packages/sim-cli/src/contract/commands.ts b/packages/sim-cli/src/contract/commands.ts index f29a4e93bde..fef7e2cca9a 100644 --- a/packages/sim-cli/src/contract/commands.ts +++ b/packages/sim-cli/src/contract/commands.ts @@ -643,6 +643,8 @@ export const CLI_CONTRACT: CliContract = { command: 'workflows source get', describe: 'Show a workflow’s draft as TypeScript source with its identity lock', }, + /** `workflows source apply --from ` reads and writes a source directory by hand. */ + applyWorkflowSource: { hidden: true }, replaceWorkflowState: { command: 'workflows state replace', confirm: 'This replaces the entire draft graph and cannot be undone.', diff --git a/packages/sim-cli/src/generated/v2-api.ts b/packages/sim-cli/src/generated/v2-api.ts index 6c09e741714..fb71db47141 100644 --- a/packages/sim-cli/src/generated/v2-api.ts +++ b/packages/sim-cli/src/generated/v2-api.ts @@ -691,6 +691,159 @@ export type ApplyWorkflowOperationsResponse = { data: ApplyWorkflowOperationsResponseRef3 } +/** `POST /api/v2/workflows/[workflowId]/source` */ +export type ApplyWorkflowSourceParams = { + workflowId: string +} + +export type ApplyWorkflowSourceQuery = { + dryRun?: boolean +} + +export type ApplyWorkflowSourceBody = { + files: Record + lock: { + lockVersion: 1 + blocks: Record< + string, + { + id: string + parent: string | null + branches?: Record + items?: Record< + string, + Array<{ + name: string + id: string + }> + > + binding: string + order: number + layout?: { + x: number + y: number + w?: number + h?: number + height?: number + horizontalHandles?: boolean + } + codeFile?: string + } + > + variables: Record + } + lockBase?: { + workspaceId: string + baseFingerprint: string + catalogHash: string + } + baseFingerprint: string + layout?: 'preserve' | 'lock' + provenance?: { + client: 'cli' | 'copilot' | 'canvas' | 'api' + gitSha?: string + repo?: string + } +} + +export type ApplyWorkflowSourceResponse = { + data: { + workflowId: string + workspaceId: string + dryRun: boolean + applied: boolean + diff: { + noop: boolean + blocks: { + added: Array<{ + id: string + key: string + }> + removed: Array<{ + id: string + key: string + }> + renamed: Array<{ + id: string + from: string + to: string + }> + modified: Array<{ + id: string + key: string + fields: Array + reparented?: boolean + }> + } + edges: { + added: number + removed: number + } + variables: { + added: Array + removed: Array + modified: Array + } + } + diagnostics: Array<{ + code: string + severity: 'error' | 'warning' | 'info' + message: string + hint?: string + file?: string + line?: number + column?: number + endLine?: number + endColumn?: number + frame?: string + blockKey?: string + blockId?: string + param?: string + path?: string + }> + newFingerprint: string + files: Record + lock: { + lockVersion: 1 + blocks: Record< + string, + { + id: string + parent: string | null + branches?: Record + items?: Record< + string, + Array<{ + name: string + id: string + }> + > + binding: string + order: number + layout?: { + x: number + y: number + w?: number + h?: number + height?: number + horizontalHandles?: boolean + } + codeFile?: string + } + > + variables: Record + } + lockBase: { + workspaceId: string + baseFingerprint: string + catalogHash: string + } + mintedIds: Record + warnings: Array + needsRedeployment: boolean + } +} + /** `PATCH /api/v2/workflows/[workflowId]/variables` */ export type ApplyWorkflowVariablesParams = { workflowId: string @@ -16987,6 +17140,53 @@ export const V2_OPERATIONS = { }, }, }, + applyWorkflowSource: { + method: 'POST', + path: '/api/v2/workflows/[workflowId]/source', + pathParams: ['workflowId'] as const, + pathParamDocs: { workflowId: 'Unique workflow identifier.' }, + responseMode: 'json', + summary: 'Apply workflow source', + workspaceKeyUnsupported: true, + query: { + dryRun: { + kind: 'boolean', + describe: + 'Run every check without writing, auditing, or notifying collaborators. Always answers `200`: errors are returned in `diagnostics` with `applied: false`, and the files, lock and fingerprint show what a committed apply would store.', + }, + }, + body: { + files: { + kind: 'object', + required: true, + describe: + 'Relative path → file text: `workflow.ts` plus every function-code file it references (for example `functions/score.js`).', + }, + lock: { + kind: 'object', + required: true, + describe: + 'Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids.', + }, + lockBase: { + kind: 'object', + describe: 'Freshness facts for the lock in this environment (`.sim/base.json`).', + }, + baseFingerprint: { + kind: 'string', + required: true, + describe: + 'The `fingerprint` the source was read at. The apply answers `409` when the saved draft no longer matches it.', + }, + layout: { + kind: 'enum', + values: ['preserve', 'lock'] as const, + describe: + '`preserve` (default): existing blocks keep their canvas positions and lock positions apply only to new blocks. `lock`: every block the lock positions moves there.', + }, + provenance: { kind: 'object', describe: 'Where the source came from, for the audit log.' }, + }, + }, applyWorkflowVariables: { method: 'PATCH', path: '/api/v2/workflows/[workflowId]/variables', From bcbed33e47f1b047d1278782ef7e83d807104a90 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:59:51 -0800 Subject: [PATCH 082/428] feat(cli): sim workflows source apply --from [--dry-run] Reads workflow.ts, the function-code files it and the lock reference, .sim/lock.json and .sim/base.json; sends them to applyWorkflowSource; prints refused source as file:line:col diagnostics with code frames; and after a successful write saves the re-printed files, lock and base back into the directory. Embedded runs read and write through the host's file adapter. --- .../sim-cli/src/commands/protocol/index.ts | 2 + .../protocol/workflow-source-apply.ts | 206 ++++++++++++++++++ 2 files changed, 208 insertions(+) create mode 100644 packages/sim-cli/src/commands/protocol/workflow-source-apply.ts diff --git a/packages/sim-cli/src/commands/protocol/index.ts b/packages/sim-cli/src/commands/protocol/index.ts index daed7089f82..81b4ff15652 100644 --- a/packages/sim-cli/src/commands/protocol/index.ts +++ b/packages/sim-cli/src/commands/protocol/index.ts @@ -18,6 +18,7 @@ import { attachTableImport } from './tables-import' import { attachWorkflowRunFollow } from './workflow-run-follow' import { attachWorkflowRunGet } from './workflow-run-get' import { attachWorkflowRunWait } from './workflow-run-wait' +import { attachWorkflowSourceApply } from './workflow-source-apply' import { attachWorkspaceOperationWait } from './workspace-operation-wait' function group(program: Command, name: string): Command { @@ -81,6 +82,7 @@ export function attachProtocolCommands(program: Command): void { const runs = group(workflows, 'runs') attachWorkflowRunGet(runs) attachWorkflowRunWait(runs) + attachWorkflowSourceApply(group(workflows, 'source')) attachWorkspaceOperationWait(group(group(program, 'workspaces'), 'operations')) diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts b/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts new file mode 100644 index 00000000000..41ae5a8cef0 --- /dev/null +++ b/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts @@ -0,0 +1,206 @@ +import { mkdir, readFile } from 'node:fs/promises' +import { dirname, posix, resolve } from 'node:path' +import type { Command } from 'commander' +import { printError } from '#sim-cli/output/io' +import { embedStore, setSoftExitCode } from '../../embed-context' +import type { ApplyWorkflowSourceBody, ApplyWorkflowSourceResponse } from '../../generated/v2-api' +import { SimApiError } from '../../http/client' +import { apiCommand } from '../../runtime/called-operations' +import { embeddedFileContent } from '../../transfer/local-file' +import { saveToFile } from './files-get' +import { printProtocolResult } from './result' + +/** The layout `workflows source get` writes and this command reads back. */ +const ENTRY_FILE = 'workflow.ts' +const LOCK_FILE = '.sim/lock.json' +const BASE_FILE = '.sim/base.json' +/** `code: file('./functions/x.js')` in the entry file (the SDK's only code-file form). */ +const CODE_FILE_REFERENCE = /\bfile\(\s*(['"])([^'"\n]+)\1\s*\)/g + +type Diagnostic = ApplyWorkflowSourceResponse['data']['diagnostics'][number] + +interface SourceApplyOptions { + from: string + dryRun?: boolean +} + +/** A path inside the source directory, refusing absolute paths and `..` escapes. */ +function sourceRelativePath(path: string): string | null { + const normalized = posix.normalize(path.replace(/\\/g, '/')) + if (normalized.startsWith('/') || normalized === '..' || normalized.startsWith('../')) return null + return normalized.startsWith('./') ? normalized.slice(2) : normalized +} + +function locate(directory: string, path: string): string { + return embedStore.getStore() ? posix.join(directory, path) : resolve(directory, path) +} + +async function readText(directory: string, path: string): Promise { + const target = locate(directory, path) + const embedded = embedStore.getStore() + if (embedded) { + const content = await embeddedFileContent(embedded, target) + return typeof content === 'string' ? content : new TextDecoder().decode(content) + } + try { + return await readFile(target, 'utf8') + } catch (error) { + throw new SimApiError(`Cannot read ${target}: ${(error as Error).message}`, 0) + } +} + +async function readJson(directory: string, path: string, hint: string): Promise { + const text = await readText(directory, path).catch((error: unknown) => { + throw new SimApiError(`${(error as Error).message}. ${hint}`, 0) + }) + try { + return JSON.parse(text) + } catch { + throw new SimApiError(`${locate(directory, path)} is not valid JSON. ${hint}`, 0) + } +} + +async function writeText(directory: string, path: string, text: string): Promise { + const target = locate(directory, path) + if (!embedStore.getStore()) await mkdir(dirname(target), { recursive: true }) + await saveToFile(new Blob([text]).stream(), target, true) +} + +/** + * The function-code files the source can reference: every `file('…')` in the entry file plus + * every `codeFile` the lock records. Only those are sent; the server reports a referenced file + * that is missing. + */ +function codeFilePaths(entry: string, lock: ApplyWorkflowSourceBody['lock']): string[] { + const paths = new Set() + for (const match of entry.matchAll(CODE_FILE_REFERENCE)) { + const path = sourceRelativePath(match[2]) + if (path) paths.add(path) + } + for (const block of Object.values(lock.blocks)) { + const path = block.codeFile ? sourceRelativePath(block.codeFile) : null + if (path) paths.add(path) + } + paths.delete(ENTRY_FILE) + return [...paths] +} + +function formatDiagnostic(diagnostic: Diagnostic): string { + const where = + diagnostic.file !== undefined + ? `${diagnostic.file}:${diagnostic.line ?? 1}:${diagnostic.column ?? 1} ` + : diagnostic.path !== undefined + ? `${LOCK_FILE}#${diagnostic.path} ` + : '' + const lines = [`${where}${diagnostic.severity} ${diagnostic.code}: ${diagnostic.message}`] + if (diagnostic.frame) lines.push(diagnostic.frame) + if (diagnostic.hint) lines.push(` hint: ${diagnostic.hint}`) + return lines.join('\n') +} + +function isDiagnosticList(value: unknown): value is Diagnostic[] { + return ( + Array.isArray(value) && + value.every((item) => typeof item === 'object' && item !== null && 'code' in item) + ) +} + +/** + * `sim workflows source apply --from `: sends a source directory written by + * `workflows source get` (`workflow.ts`, its function-code files, `.sim/lock.json` and + * `.sim/base.json`) and, after a successful write, saves the re-printed files, the new lock and + * the new base back into it, so the next apply starts from what was stored. + */ +export function attachWorkflowSourceApply(source: Command): void { + const [command, connectApply] = apiCommand(source, 'apply', ['applyWorkflowSource'], { + runs: 'applyWorkflowSource', + }) + command + .argument('', 'Workflow whose draft the source replaces') + .requiredOption( + '--from ', + 'Source directory: workflow.ts, functions/*, .sim/lock.json and .sim/base.json' + ) + .option('--dry-run', 'Check the source and show the outcome without saving or writing files') + .allowExcessArguments(false) + .description('Apply a workflow source directory to the workflow draft') + .action(async (workflowId: string, options: SourceApplyOptions) => { + const { client, profile } = connectApply() + const directory = options.from + const hint = 'Write the directory with `sim workflows source get` first.' + const entry = await readText(directory, ENTRY_FILE) + const lock = (await readJson(directory, LOCK_FILE, hint)) as ApplyWorkflowSourceBody['lock'] + const lockBase = (await readJson(directory, BASE_FILE, hint)) as NonNullable< + ApplyWorkflowSourceBody['lockBase'] + > + if (typeof lockBase?.baseFingerprint !== 'string') { + throw new SimApiError(`${locate(directory, BASE_FILE)} has no baseFingerprint. ${hint}`, 0) + } + + const files: Record = { [ENTRY_FILE]: entry } + for (const path of codeFilePaths(entry, lock)) { + try { + files[path] = await readText(directory, path) + } catch { + // A referenced file that is missing is reported by the server with its source line. + } + } + + let response: ApplyWorkflowSourceResponse + try { + response = await client.request('applyWorkflowSource', { + params: { workflowId }, + ...(options.dryRun ? { query: { dryRun: true } } : {}), + body: { + files, + lock, + lockBase, + baseFingerprint: lockBase.baseFingerprint, + provenance: { client: 'cli' }, + } satisfies ApplyWorkflowSourceBody, + }) + } catch (error) { + if (error instanceof SimApiError && error.details && typeof error.details === 'object') { + const diagnostics = (error.details as { diagnostics?: unknown }).diagnostics + if (isDiagnosticList(diagnostics)) { + for (const diagnostic of diagnostics) printError(formatDiagnostic(diagnostic)) + throw new SimApiError(error.message, error.status, error.code, undefined) + } + } + throw error + } + + const { data } = response + for (const diagnostic of data.diagnostics) printError(formatDiagnostic(diagnostic)) + const refused = data.diagnostics.some((diagnostic) => diagnostic.severity === 'error') + if (refused) setSoftExitCode(1) + + if (!data.dryRun && !refused) { + for (const [path, text] of Object.entries(data.files)) { + const relative = sourceRelativePath(path) + if (!relative) throw new SimApiError(`Refusing to write ${path} outside ${directory}`, 0) + await writeText(directory, relative, text) + } + await writeText(directory, LOCK_FILE, `${JSON.stringify(data.lock, null, 2)}\n`) + await writeText(directory, BASE_FILE, `${JSON.stringify(data.lockBase, null, 2)}\n`) + } + + printProtocolResult(profile.output, { + workflowId: data.workflowId, + applied: data.applied, + dryRun: data.dryRun, + noop: data.diff.noop, + blocksAdded: data.diff.blocks.added.length, + blocksRemoved: data.diff.blocks.removed.length, + blocksModified: data.diff.blocks.modified.length, + edgesAdded: data.diff.edges.added, + edgesRemoved: data.diff.edges.removed, + errors: data.diagnostics.filter((diagnostic) => diagnostic.severity === 'error').length, + warnings: + data.diagnostics.filter((diagnostic) => diagnostic.severity === 'warning').length + + data.warnings.length, + newFingerprint: data.newFingerprint, + needsRedeployment: data.needsRedeployment, + }) + }) +} From 071cae7655223e3aa84cb7c12c7f0eb0d079e51b Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 20:59:52 -0800 Subject: [PATCH 083/428] test(workflows): source apply against real Postgres, gate parity through the pipeline, route errors and an HTTP e2e The integration suite covers the no-op round trip, a one-field edit keeping every id, a canvas write under the row lock (409), a lock toggle (409), a locked-block edit (400, nothing written), a canvas drag surviving an edit, a rename keeping a webhook's block id, a workspace key (403), and dry runs. The parity suite sends the source gates' locked, sunset, trigger and enablement fixtures through the full apply and requires the same refusals. Route tests pin the 400/409/423 envelopes and the analytics guard. --- .../[workflowId]/source/route.test.ts | 159 +++++- .../apply-workflow-source.integration.ts | 501 ++++++++++++++++++ ...pply-workflow-source.parity.integration.ts | 372 +++++++++++++ .../scripts/test-workflow-source-apply-e2e.ts | 251 +++++++++ 4 files changed, 1281 insertions(+), 2 deletions(-) create mode 100644 apps/sim/lib/workflows/application/apply-workflow-source.integration.ts create mode 100644 apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts create mode 100644 apps/sim/scripts/test-workflow-source-apply-e2e.ts diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts index 37eccea658c..19512eb51d3 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts @@ -5,10 +5,11 @@ import { v2RateLimiterModuleMock, v2RouteMocks, } from '@sim/testing' +import { posthogServerMock, posthogServerMockFns } from '@sim/testing/mocks/posthog-server.mock' import { NextRequest } from 'next/server' import { beforeEach, describe, expect, it, vi } from 'vitest' -const mocks = vi.hoisted(() => ({ read: vi.fn() })) +const mocks = vi.hoisted(() => ({ read: vi.fn(), apply: vi.fn() })) vi.mock('@/lib/api/server/routes/v2-api-key-auth', () => v2ApiKeyAuthModuleMock) vi.mock('@/lib/core/rate-limiter', () => v2RateLimiterModuleMock) @@ -19,8 +20,20 @@ vi.mock('@/lib/workflows/application/get-workflow-source', () => ({ }, })) +vi.mock('@/lib/workflows/application/apply-workflow-source', () => ({ + applyWorkflowSource: { + operation: { id: 'workflows.source.apply' }, + execute: mocks.apply, + }, +})) +vi.mock('@/lib/posthog/server', () => posthogServerMock) + import { OrchestrationError } from '@/lib/core/orchestration/types' -import { GET } from '@/app/api/v2/workflows/[workflowId]/source/route' +import { + WorkflowSourceRejectedError, + WorkflowSourceStaleError, +} from '@/lib/workflows/application/source-error' +import { GET, POST } from '@/app/api/v2/workflows/[workflowId]/source/route' const WORKSPACE_ID = '11111111-2222-4333-8444-555555555555' const WORKFLOW_ID = '66666666-7777-4888-9999-000000000000' @@ -113,3 +126,145 @@ describe('GET /api/v2/workflows/{workflowId}/source', () => { expect((await response.json()).error.code).toBe('NOT_FOUND') }) }) + +function applyRequest(body: unknown, query = '') { + return new NextRequest(`http://localhost:3000/api/v2/workflows/${WORKFLOW_ID}/source${query}`, { + method: 'POST', + headers: { 'x-api-key': 'key', 'content-type': 'application/json' }, + body: JSON.stringify(body), + }) +} + +const personalKeyAuth = { + ...auth, + principal: { kind: 'personal_api_key' as const, userId: 'user-1', keyId: 'key-2' }, + keyType: 'personal' as const, +} + +const applyBody = { + files: source.files, + lock: source.lock, + lockBase: source.lockBase, + baseFingerprint: FINGERPRINT, +} + +const applied = { + workflowId: WORKFLOW_ID, + workflowName: 'W', + workspaceId: WORKSPACE_ID, + dryRun: false, + applied: true, + diff: { + noop: false, + blocks: { + added: [], + removed: [], + renamed: [], + modified: [{ id: 'b-1', key: 'start', fields: ['name'] }], + }, + edges: { added: 0, removed: 0 }, + variables: { added: [], removed: [], modified: [] }, + }, + diagnostics: [], + newFingerprint: `sf1:${'e'.repeat(64)}`, + files: source.files, + lock: source.lock, + lockBase: source.lockBase, + mintedIds: {}, + warnings: [], + needsRedeployment: true, + sdkMajor: 1, + catalogVersion: 'h', +} + +describe('POST /api/v2/workflows/{workflowId}/source', () => { + beforeEach(() => { + v2RouteMocks.authenticate.mockResolvedValue(auth) + v2RouteMocks.preauthRate.mockResolvedValue(V2_PREAUTH_RATE_LIMIT_ALLOWED) + v2RouteMocks.operationRate.mockResolvedValue(V2_OPERATION_RATE_LIMIT_ALLOWED) + mocks.apply.mockResolvedValue(applied) + }) + + it('answers 400 with the line-pinned diagnostics of refused source', async () => { + const diagnostic = { + code: 'E_APPLY_PROTECTED_BLOCK' as const, + severity: 'error' as const, + message: 'Block "Start" is locked', + file: 'workflow.ts', + line: 4, + column: 3, + blockId: 'b-1', + } + mocks.apply.mockRejectedValue(new WorkflowSourceRejectedError([diagnostic])) + + const response = await POST(applyRequest(applyBody), context) + const body = await response.json() + + expect(response.status).toBe(400) + expect(body.error.details).toEqual({ code: 'SOURCE_REJECTED', diagnostics: [diagnostic] }) + }) + + it('answers 409 with the current fingerprint when the draft moved', async () => { + const current = `sf1:${'f'.repeat(64)}` + mocks.apply.mockRejectedValue(new WorkflowSourceStaleError(current)) + + const response = await POST(applyRequest(applyBody), context) + const body = await response.json() + + expect(response.status).toBe(409) + expect(body.error.details).toEqual({ code: 'SOURCE_STALE', currentFingerprint: current }) + }) + + it('answers 423 for a locked workflow', async () => { + mocks.apply.mockRejectedValue(new OrchestrationError('locked', 'Workflow is locked')) + + const response = await POST(applyRequest(applyBody), context) + + expect(response.status).toBe(423) + }) + + it('rejects an unknown body field with 400 before applying', async () => { + const response = await POST(applyRequest({ ...applyBody, atomic: true }), context) + + expect(response.status).toBe(400) + expect(mocks.apply).not.toHaveBeenCalled() + }) + + it('rejects files without workflow.ts with 400 before applying', async () => { + const response = await POST( + applyRequest({ ...applyBody, files: { 'functions/a.js': 'return 1' } }), + context + ) + + expect(response.status).toBe(400) + expect(mocks.apply).not.toHaveBeenCalled() + }) + + it('passes dryRun as a boolean and keeps the result out of analytics', async () => { + v2RouteMocks.authenticate.mockResolvedValue(personalKeyAuth) + mocks.apply.mockResolvedValue({ ...applied, dryRun: true, applied: false }) + + const response = await POST(applyRequest(applyBody, '?dryRun=true'), context) + + expect(response.status).toBe(200) + expect(mocks.apply.mock.calls[0][0].input).toMatchObject({ + workflowId: WORKFLOW_ID, + dryRun: true, + }) + expect((await response.json()).data.applied).toBe(false) + expect(posthogServerMockFns.mockCaptureServerEvent).not.toHaveBeenCalled() + }) + + it('records workflow_source_applied for a personal key that changed the draft', async () => { + v2RouteMocks.authenticate.mockResolvedValue(personalKeyAuth) + + await POST(applyRequest({ ...applyBody, provenance: { client: 'cli' } }), context) + + expect(posthogServerMockFns.mockCaptureServerEvent).toHaveBeenCalledWith( + 'user-1', + 'workflow_source_applied', + expect.objectContaining({ workflow_id: WORKFLOW_ID, blocks_modified: 1, client: 'cli' }), + { groups: { workspace: WORKSPACE_ID } } + ) + }) +}) diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts b/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts new file mode 100644 index 00000000000..04890a45097 --- /dev/null +++ b/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts @@ -0,0 +1,501 @@ +/** + * Real PostgreSQL coverage for `applyWorkflowSource`: source read with `getWorkflowSource`, + * edited as text, and written back. Each check reads the stored rows directly, so "nothing was + * written" means the rows and `updated_at` are byte-identical, not that the use case said so. + * + * The concurrent canvas write is forced with the workflow row lock, as the operations conflict + * suite does: a transaction holds the row, waits until the apply is queued behind it (its base + * read and gates are done), then writes one subblock the way the realtime server's + * `persistWorkflowOperation` does under the same lock. That function lives in `apps/realtime`, + * which `apps/sim` may not import, so its lock-then-update is reproduced here. + */ +import { mkdir, writeFile } from 'node:fs/promises' +import { dirname, resolve } from 'node:path' +import { db, runOutsideTransactionContext } from '@sim/db' +import { + auditLog, + permissions, + user, + webhook, + workflow, + workflowBlocks, + workspace, +} from '@sim/db/schema' +import { deleteWorkspaceFixture, insertWorkspaceFixture } from '@sim/db/testing/workspace-fixtures' +import { + createSessionPrincipal, + createWorkspaceApiKeyPrincipal, +} from '@sim/testing/factories/principal.factory' +import { featureFlagsMock, featureFlagsMockFns } from '@sim/testing/mocks/feature-flags.mock' +import { realtimeNotifyMock, realtimeNotifyMockFns } from '@sim/testing/mocks/realtime-notify.mock' +import { getErrorMessage } from '@sim/utils/errors' +import { sleep } from '@sim/utils/helpers' +import { generateId } from '@sim/utils/id' +import { saveWorkflowToNormalizedTables } from '@sim/workflow-persistence/save' +import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' +import { and, eq, sql } from 'drizzle-orm' +import { isEqual } from 'es-toolkit' +import { afterAll, beforeAll, expect, it, vi } from 'vitest' +import type { DbOrTx } from '@/lib/db/types' +import { withPermissionGroupScope } from '@/lib/permission-groups/request-scope.server' +import { + type ApplyWorkflowSourceInput, + applyWorkflowSource, +} from '@/lib/workflows/application/apply-workflow-source' +import { + type GetWorkflowSourceResult, + getWorkflowSource, +} from '@/lib/workflows/application/get-workflow-source' +import { WorkflowSourceRejectedError } from '@/lib/workflows/application/source-error' +import { loadWorkflowFromNormalizedTables } from '@/lib/workflows/persistence/utils' + +vi.mock('@/lib/core/config/feature-flags', () => featureFlagsMock) +vi.mock('@/lib/realtime/notify', () => realtimeNotifyMock) + +const ownerId = generateId() +const workspaceId = generateId() +const principal = createSessionPrincipal({ userId: ownerId, sessionId: generateId() }) + +const checks: { name: string; status: string; durationMs: number; error?: string }[] = [] + +function check(name: string, run: () => Promise) { + it(name, async () => { + const started = performance.now() + try { + await run() + checks.push({ name, status: 'passed', durationMs: performance.now() - started }) + } catch (error) { + checks.push({ + name, + status: 'failed', + durationMs: performance.now() - started, + error: getErrorMessage(error), + }) + throw error + } + }) +} + +interface Seeded { + workflowId: string + startId: string + scoreId: string + edgeId: string + variableId: string +} + +const SCORE_CODE = 'return 41 + 1' + +async function seedWorkflow(): Promise { + const workflowId = generateId() + const startId = generateId() + const scoreId = generateId() + const edgeId = generateId() + const variableId = generateId() + const now = new Date() + await db.insert(workflow).values({ + id: workflowId, + userId: ownerId, + workspaceId, + name: `Source apply ${workflowId}`, + variables: { [variableId]: { id: variableId, name: 'threshold', type: 'number', value: 3 } }, + lastSynced: now, + createdAt: now, + updatedAt: now, + }) + const blocks: Record = { + [startId]: { + id: startId, + type: 'start_trigger', + name: 'Start', + position: { x: 0, y: 0 }, + subBlocks: {}, + outputs: {}, + enabled: true, + }, + [scoreId]: { + id: scoreId, + type: 'function', + name: 'Score', + position: { x: 420, y: 80 }, + subBlocks: { code: { id: 'code', type: 'code', value: SCORE_CODE } }, + outputs: {}, + enabled: true, + }, + } + const state: WorkflowState = { + blocks, + edges: [{ id: edgeId, source: startId, target: scoreId }], + loops: {}, + parallels: {}, + } + const saved = await saveWorkflowToNormalizedTables(workflowId, state) + if (!saved.success) throw new Error(`Seeding the workflow failed: ${saved.error}`) + return { workflowId, startId, scoreId, edgeId, variableId } +} + +function getSource(workflowId: string): Promise { + return withPermissionGroupScope(() => + getWorkflowSource.execute({ principal, input: { workflowId } }) + ) +} + +function apply( + source: GetWorkflowSourceResult, + files: Record, + extra: Partial = {} +) { + return withPermissionGroupScope(() => + applyWorkflowSource.execute({ + principal, + input: { + workflowId: source.workflowId, + files, + lock: source.lock, + lockBase: source.lockBase, + baseFingerprint: source.fingerprint, + ...extra, + }, + }) + ) +} + +/** Replaces the one occurrence of `from` across the source files. */ +function edit(files: Record, from: string, to: string): Record { + const hits = Object.entries(files).filter(([, text]) => text.split(from).length === 2) + expect(hits, `exactly one file holds "${from}" once`).toHaveLength(1) + const [path, text] = hits[0] + return { ...files, [path]: text.replace(from, to) } +} + +interface StoredSnapshot { + updatedAt: number + state: Awaited> + variables: unknown +} + +async function snapshot(workflowId: string): Promise { + const [row] = await db + .select({ updatedAt: workflow.updatedAt, variables: workflow.variables }) + .from(workflow) + .where(eq(workflow.id, workflowId)) + return { + updatedAt: row.updatedAt.getTime(), + variables: row.variables, + state: await loadWorkflowFromNormalizedTables(workflowId), + } +} + +async function applySourceAuditRows(workflowId: string) { + const rows = await db + .select({ metadata: auditLog.metadata }) + .from(auditLog) + .where(and(eq(auditLog.workspaceId, workspaceId), eq(auditLog.resourceId, workflowId))) + return rows.filter((row) => (row.metadata as { op?: string } | null)?.op === 'apply_source') +} + +/** Audit entries are recorded after the use case returns; give the write a moment to land. */ +async function settledAuditRows(workflowId: string, expected: number) { + for (let attempt = 0; attempt < 40; attempt++) { + const rows = await applySourceAuditRows(workflowId) + if (rows.length >= expected) return rows + await sleep(50) + } + return applySourceAuditRows(workflowId) +} + +function notifiedFor(workflowId: string): number { + return realtimeNotifyMockFns.mockNotifyWorkflowUpdated.mock.calls.filter( + ([id]) => id === workflowId + ).length +} + +async function expectRejected(promise: Promise, code: string) { + const error = await promise.then( + () => null, + (caught: unknown) => caught + ) + expect(error).toBeInstanceOf(WorkflowSourceRejectedError) + const codes = (error as WorkflowSourceRejectedError).diagnostics.map((d) => d.code) + expect(codes).toContain(code) + return error as WorkflowSourceRejectedError +} + +beforeAll(async () => { + featureFlagsMockFns.mockIsFeatureEnabled.mockImplementation( + async (flag: string) => flag === 'workflow-code' + ) + const now = new Date() + await db.insert(user).values({ + id: ownerId, + name: 'Source apply fixture', + email: `${ownerId}@source-apply.invalid`, + emailVerified: true, + createdAt: now, + updatedAt: now, + }) + await insertWorkspaceFixture(db, { + id: workspaceId, + name: 'Source apply', + ownerId, + billedAccountUserId: ownerId, + }) + await db.insert(permissions).values({ + id: generateId(), + userId: ownerId, + entityType: 'workspace', + entityId: workspaceId, + permissionType: 'admin', + }) +}) + +afterAll(async () => { + const reportPath = + process.env.WORKFLOW_SOURCE_APPLY_REPORT_PATH ?? + resolve('test-results/workflow-source-apply.json') + await mkdir(dirname(reportPath), { recursive: true }) + await writeFile(reportPath, JSON.stringify({ checks }, null, 2)) + await db.delete(auditLog).where(eq(auditLog.workspaceId, workspaceId)) + await deleteWorkspaceFixture(db, eq(workspace.id, workspaceId)) + await db.delete(user).where(eq(user.id, ownerId)) +}) + +check('get → apply unchanged is a no-op that writes, audits and notifies nothing', async () => { + const seeded = await seedWorkflow() + const source = await getSource(seeded.workflowId) + const before = await snapshot(seeded.workflowId) + + const result = await apply(source, source.files) + + expect(result.applied).toBe(false) + expect(result.diff.noop).toBe(true) + expect(result.newFingerprint).toBe(source.fingerprint) + expect(await snapshot(seeded.workflowId)).toEqual(before) + expect(await settledAuditRows(seeded.workflowId, 0)).toHaveLength(0) + expect(notifiedFor(seeded.workflowId)).toBe(0) +}) + +check('a one-field edit changes exactly that stored field and keeps every id', async () => { + const seeded = await seedWorkflow() + const source = await getSource(seeded.workflowId) + const before = await snapshot(seeded.workflowId) + + const result = await apply(source, edit(source.files, SCORE_CODE, 'return 7')) + + expect(result.applied).toBe(true) + expect(result.diff.blocks.modified.map((block) => block.id)).toEqual([seeded.scoreId]) + const after = await snapshot(seeded.workflowId) + expect(after.updatedAt).toBeGreaterThan(before.updatedAt) + expect(after.variables).toEqual(before.variables) + expect(Object.keys(after.state?.blocks ?? {}).sort()).toEqual( + [seeded.startId, seeded.scoreId].sort() + ) + expect(after.state?.edges.map((e) => e.id)).toEqual([seeded.edgeId]) + expect(after.state?.blocks[seeded.startId]).toEqual(before.state?.blocks[seeded.startId]) + const beforeScore = before.state?.blocks[seeded.scoreId] + const afterScore = after.state?.blocks[seeded.scoreId] + expect(afterScore?.subBlocks.code?.value).toBe('return 7') + expect( + isEqual( + { ...afterScore, subBlocks: { ...afterScore?.subBlocks, code: undefined } }, + { ...beforeScore, subBlocks: { ...beforeScore?.subBlocks, code: undefined } } + ) + ).toBe(true) + expect(result.lock.variables).toEqual(source.lock.variables) + expect( + Object.values(result.lock.blocks) + .map((b) => b.id) + .sort() + ).toEqual( + Object.values(source.lock.blocks) + .map((b) => b.id) + .sort() + ) + + const reread = await getSource(seeded.workflowId) + expect(reread.fingerprint).toBe(result.newFingerprint) + expect(await settledAuditRows(seeded.workflowId, 1)).toHaveLength(1) + expect(notifiedFor(seeded.workflowId)).toBe(1) +}) + +check('a canvas write that commits while the apply waits on the row lock is a 409', async () => { + const seeded = await seedWorkflow() + const source = await getSource(seeded.workflowId) + let outcome: Promise = Promise.resolve() + let settled = false + + await db.transaction(async (tx) => { + const [self] = await tx.execute<{ pid: number }>(sql`SELECT pg_backend_pid() AS pid`) + await tx + .select({ id: workflow.id }) + .from(workflow) + .where(eq(workflow.id, seeded.workflowId)) + .for('update') + outcome = runOutsideTransactionContext(() => + apply(source, edit(source.files, SCORE_CODE, 'return 8')).finally(() => { + settled = true + }) + ) + await waitForBlocked(Number(self?.pid), () => settled) + await canvasSubBlockWrite(tx, seeded.scoreId, 'return 9') + }) + + await expect(outcome).rejects.toMatchObject({ code: 'conflict' }) + const after = await snapshot(seeded.workflowId) + expect(after.state?.blocks[seeded.scoreId]?.subBlocks.code?.value).toBe('return 9') +}) + +check('a block lock toggled between get and apply is a 409', async () => { + const seeded = await seedWorkflow() + const source = await getSource(seeded.workflowId) + await db.update(workflowBlocks).set({ locked: true }).where(eq(workflowBlocks.id, seeded.startId)) + + await expect(apply(source, edit(source.files, SCORE_CODE, 'return 10'))).rejects.toMatchObject({ + code: 'conflict', + currentFingerprint: expect.stringMatching(/^sf1:/), + }) +}) + +check('editing a locked block is refused with diagnostics and writes nothing', async () => { + const seeded = await seedWorkflow() + await db.update(workflowBlocks).set({ locked: true }).where(eq(workflowBlocks.id, seeded.scoreId)) + const source = await getSource(seeded.workflowId) + const before = await snapshot(seeded.workflowId) + + const error = await expectRejected( + apply(source, edit(source.files, SCORE_CODE, 'return 11')), + 'E_APPLY_PROTECTED_BLOCK' + ) + + expect(error.code).toBe('validation') + expect(error.diagnostics.find((d) => d.code === 'E_APPLY_PROTECTED_BLOCK')?.blockId).toBe( + seeded.scoreId + ) + expect(await snapshot(seeded.workflowId)).toEqual(before) + expect(await settledAuditRows(seeded.workflowId, 0)).toHaveLength(0) +}) + +check('a canvas drag between get and apply survives an edit', async () => { + const seeded = await seedWorkflow() + const source = await getSource(seeded.workflowId) + await db + .update(workflowBlocks) + .set({ positionX: '999', positionY: '555' }) + .where(eq(workflowBlocks.id, seeded.scoreId)) + + const result = await apply(source, edit(source.files, SCORE_CODE, 'return 12')) + + expect(result.applied).toBe(true) + const after = await snapshot(seeded.workflowId) + expect(after.state?.blocks[seeded.scoreId]?.position).toEqual({ x: 999, y: 555 }) + expect(after.state?.blocks[seeded.startId]?.position).toEqual({ x: 0, y: 0 }) +}) + +check('a rename keeps the block id, so a webhook row bound to it stays valid', async () => { + const seeded = await seedWorkflow() + const webhookId = generateId() + await db.insert(webhook).values({ + id: webhookId, + workflowId: seeded.workflowId, + blockId: seeded.scoreId, + path: `source-apply-${webhookId}`, + }) + const source = await getSource(seeded.workflowId) + const workflowFile = source.files['workflow.ts'] + expect(workflowFile.split("'Score'")).toHaveLength(2) + + const result = await apply(source, { + ...source.files, + 'workflow.ts': workflowFile.replace("'Score'", "'Scorer'"), + }) + + expect(result.applied).toBe(true) + expect(result.diff.blocks.renamed).toEqual([{ id: seeded.scoreId, from: 'score', to: 'scorer' }]) + const after = await snapshot(seeded.workflowId) + expect(after.state?.blocks[seeded.scoreId]?.name).toBe('Scorer') + const [row] = await db + .select({ blockId: webhook.blockId }) + .from(webhook) + .where(eq(webhook.id, webhookId)) + expect(after.state?.blocks[row.blockId ?? '']).toBeDefined() +}) + +check('a workspace API key is refused before anything is read', async () => { + const seeded = await seedWorkflow() + const source = await getSource(seeded.workflowId) + + await expect( + withPermissionGroupScope(() => + applyWorkflowSource.execute({ + principal: createWorkspaceApiKeyPrincipal({ workspaceId, keyId: generateId() }), + input: { + workflowId: seeded.workflowId, + files: source.files, + lock: source.lock, + baseFingerprint: source.fingerprint, + }, + }) + ) + ).rejects.toMatchObject({ code: 'forbidden' }) +}) + +check('a dry run reports the outcome and never writes', async () => { + const seeded = await seedWorkflow() + const source = await getSource(seeded.workflowId) + const before = await snapshot(seeded.workflowId) + + const result = await apply(source, edit(source.files, SCORE_CODE, 'return 13'), { + dryRun: true, + }) + + expect(result.dryRun).toBe(true) + expect(result.applied).toBe(false) + expect(result.diff.blocks.modified.map((block) => block.id)).toEqual([seeded.scoreId]) + expect(result.newFingerprint).not.toBe(source.fingerprint) + expect(await snapshot(seeded.workflowId)).toEqual(before) + expect(await settledAuditRows(seeded.workflowId, 0)).toHaveLength(0) + expect(notifiedFor(seeded.workflowId)).toBe(0) +}) + +check('a dry run with a compile error answers with line-pinned diagnostics', async () => { + const seeded = await seedWorkflow() + const source = await getSource(seeded.workflowId) + + const result = await apply( + source, + { ...source.files, 'workflow.ts': `${source.files['workflow.ts']}\nconst = \n` }, + { dryRun: true } + ) + + const error = result.diagnostics.find((d) => d.severity === 'error') + expect(error?.file).toBe('workflow.ts') + expect(error?.line).toBeGreaterThan(1) +}) + +/** The realtime server's subblock write: one block's `sub_blocks` under the held row lock. */ +async function canvasSubBlockWrite(tx: DbOrTx, blockId: string, code: string) { + const [row] = await tx + .select({ subBlocks: workflowBlocks.subBlocks }) + .from(workflowBlocks) + .where(eq(workflowBlocks.id, blockId)) + const subBlocks = row.subBlocks as Record + await tx + .update(workflowBlocks) + .set({ subBlocks: { ...subBlocks, code: { ...subBlocks.code, value: code } } }) + .where(eq(workflowBlocks.id, blockId)) +} + +/** Waits until a session is queued behind the holder; throws if the apply settles first. */ +function waitForBlocked(holderPid: number, settled: () => boolean): Promise { + return runOutsideTransactionContext(async () => { + for (let attempt = 0; attempt < 400; attempt++) { + if (settled()) throw new Error('The apply finished before reaching the row lock') + const [row] = await db.execute<{ blocked: number }>(sql` + SELECT count(*)::int AS blocked FROM pg_stat_activity + WHERE ${holderPid} = ANY(pg_blocking_pids(pid))`) + if ((row?.blocked ?? 0) >= 1) return + await sleep(25) + } + throw new Error(`Expected a session blocked behind backend ${holderPid}`) + }) +} diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts b/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts new file mode 100644 index 00000000000..5535edd86eb --- /dev/null +++ b/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts @@ -0,0 +1,372 @@ +/** + * Differential parity between the source gates and the full source apply pipeline, over the + * locked, sunset, trigger and enablement fixtures of `source/gates.test.ts` restated with real + * registry types: each case is one change expressed as a base → target graph pair. The gates are + * called directly on the pair, and the same target is printed as source and sent through + * `applyWorkflowSource` (compile, materialize, diff, gates, write) against the stored base. Both + * are reduced to `category:blockId` and must equal the expected refusals, so a refusal the gates + * make can never be lost, renamed or added on the way through compile and materialize. + * + * Runs against real PostgreSQL and the real block registry, with no module mocks besides the + * feature flag and the realtime notifier. + */ +import { mkdir, writeFile } from 'node:fs/promises' +import { dirname, resolve } from 'node:path' +import { db } from '@sim/db' +import { auditLog, permissions, user, workflow, workspace } from '@sim/db/schema' +import { deleteWorkspaceFixture, insertWorkspaceFixture } from '@sim/db/testing/workspace-fixtures' +import { createSessionPrincipal } from '@sim/testing/factories/principal.factory' +import { featureFlagsMock, featureFlagsMockFns } from '@sim/testing/mocks/feature-flags.mock' +import { realtimeNotifyMock } from '@sim/testing/mocks/realtime-notify.mock' +import { getErrorMessage } from '@sim/utils/errors' +import { generateId } from '@sim/utils/id' +import { canonicalize, printWorkflow } from '@sim/workflow-code' +import { saveWorkflowToNormalizedTables } from '@sim/workflow-persistence/save' +import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' +import { eq } from 'drizzle-orm' +import { afterAll, beforeAll, expect, it, vi } from 'vitest' +import { withPermissionGroupScope } from '@/lib/permission-groups/request-scope.server' +import { applyWorkflowSource } from '@/lib/workflows/application/apply-workflow-source' +import { assembleLock, getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' +import { WorkflowSourceRejectedError } from '@/lib/workflows/application/source-error' +import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' +import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' +import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' +import { loadWorkflowFromNormalizedTables } from '@/lib/workflows/persistence/utils' +import { gateSourceDiff, SKIP_TYPE_APPLY_CODES } from '@/lib/workflows/source/gates' +import type { SourceGraph } from '@/lib/workflows/source/graph-diff' +import { findProtectedBlockRefusals } from '@/lib/workflows/source/protected' +import { getBlockRegistry } from '@/blocks/registry' +import { SDK_NAMES } from '@/blocks/sdk-names.generated' +import { getToolMetadata } from '@/tools/metadata' +import { getToolOutputsMetadata } from '@/tools/metadata-outputs' + +vi.mock('@/lib/core/config/feature-flags', () => featureFlagsMock) +vi.mock('@/lib/realtime/notify', () => realtimeNotifyMock) + +const ownerId = generateId() +const workspaceId = generateId() +const principal = createSessionPrincipal({ userId: ownerId, sessionId: generateId() }) +const hooks = createMaterializeHooks() +const { catalog } = buildBlockCatalog( + { blocks: Object.values(getBlockRegistry()), trigger: registryTrigger, sdkNames: SDK_NAMES }, + { metadata: getToolMetadata, outputs: getToolOutputsMetadata } +) + +const checks: { name: string; status: string; durationMs: number; error?: string }[] = [] + +/** Gate and pipeline codes as the engine's skip vocabulary, as `gates.test.ts` reduces them. */ +const CATEGORY: Record = { + ...Object.fromEntries(Object.entries(SKIP_TYPE_APPLY_CODES).map(([skip, code]) => [code, skip])), + E_APPLY_PROTECTED_BLOCK: 'block_locked', + E_APPLY_CREDENTIAL_UNREACHABLE: 'credential', + E_APPLY_SANDBOX_PLAN_REQUIRED: 'sandbox_plan', + /** The pipeline's own placement refusal for a type the caller may keep but not add. */ + E_TYPE_NOT_ADDABLE: 'block_not_allowed', +} + +interface BlockOptions { + parentId?: string + locked?: boolean + enabled?: boolean + code?: string +} + +function block(id: string, type: string, name: string, options: BlockOptions = {}): BlockState { + const created = hooks.initBlock({ id, type, name, triggerMode: false }) + const subBlocks = { ...created.subBlocks } + if (options.code !== undefined && subBlocks.code) { + subBlocks.code = { ...subBlocks.code, value: options.code } + } + return { + ...created, + subBlocks, + enabled: options.enabled ?? true, + ...(options.locked ? { locked: true } : {}), + data: { + ...(created.data ?? {}), + ...(options.parentId ? { parentId: options.parentId, extent: 'parent' as const } : {}), + }, + } +} + +interface ParityCase { + name: string + base: (ids: Ids) => BlockState[] + /** Replaces or adds blocks by id; `null` removes one. */ + change: (ids: Ids, base: Record) => Record + expected: (ids: Ids) => string[] +} + +type Ids = Record<'start' | 'a' | 'b' | 'c' | 'loop', string> + +const CASES: ParityCase[] = [ + { + name: 'locked: refuses a code edit on a locked block', + base: (ids) => [ + block(ids.start, 'start_trigger', 'Start'), + block(ids.a, 'function', 'A', { locked: true, code: 'return 1' }), + ], + change: (ids) => ({ + [ids.a]: block(ids.a, 'function', 'A', { locked: true, code: 'return 2' }), + }), + expected: (ids) => [`block_locked:${ids.a}`], + }, + { + name: 'locked: refuses renaming a locked block', + base: (ids) => [ + block(ids.start, 'start_trigger', 'Start'), + block(ids.a, 'function', 'A', { locked: true }), + ], + change: (ids, base) => ({ [ids.a]: { ...base[ids.a], name: 'Renamed' } }), + expected: (ids) => [`block_locked:${ids.a}`], + }, + { + name: 'locked: refuses deleting a locked block', + base: (ids) => [ + block(ids.start, 'start_trigger', 'Start'), + block(ids.a, 'function', 'A', { locked: true }), + block(ids.b, 'function', 'B'), + ], + change: (ids) => ({ [ids.a]: null }), + expected: (ids) => [`block_locked:${ids.a}`], + }, + { + name: 'locked: refuses an edit to a child of a locked container', + base: (ids) => [ + block(ids.start, 'start_trigger', 'Start'), + block(ids.loop, 'loop', 'Each', { locked: true }), + block(ids.a, 'function', 'Inner', { parentId: ids.loop, code: 'return 1' }), + ], + change: (ids, base) => ({ + [ids.a]: { + ...base[ids.a], + subBlocks: { + ...base[ids.a].subBlocks, + code: { ...base[ids.a].subBlocks.code, value: 'return 2' }, + }, + }, + }), + expected: (ids) => [`block_locked:${ids.a}`], + }, + { + name: 'locked: refuses adding a block to a locked container', + base: (ids) => [ + block(ids.start, 'start_trigger', 'Start'), + block(ids.loop, 'loop', 'Each', { locked: true }), + ], + change: (ids) => ({ [ids.c]: block(ids.c, 'function', 'New', { parentId: ids.loop }) }), + expected: (ids) => [`block_locked:${ids.c}`], + }, + { + name: 'locked: refuses moving an existing block into a locked container', + base: (ids) => [ + block(ids.start, 'start_trigger', 'Start'), + block(ids.loop, 'loop', 'Each', { locked: true }), + block(ids.b, 'function', 'Outside'), + ], + change: (ids, base) => ({ + [ids.b]: { + ...base[ids.b], + data: { ...base[ids.b].data, parentId: ids.loop, extent: 'parent' }, + }, + }), + expected: (ids) => [`block_locked:${ids.b}`], + }, + { + name: 'locked: a locked child goes with its deleted unlocked container', + base: (ids) => [ + block(ids.start, 'start_trigger', 'Start'), + block(ids.loop, 'loop', 'Each'), + block(ids.a, 'function', 'Inner', { parentId: ids.loop, locked: true }), + ], + change: (ids) => ({ [ids.loop]: null, [ids.a]: null }), + expected: () => [], + }, + { + name: 'sunset: refuses a new legacy block but keeps a placed one editable', + base: (ids) => [block(ids.start, 'start_trigger', 'Start'), block(ids.a, 'table', 'Rows')], + change: (ids, base) => ({ + [ids.a]: { ...base[ids.a], name: 'Rows renamed' }, + [ids.b]: block(ids.b, 'table', 'Fresh rows'), + }), + expected: (ids) => [`block_not_allowed:${ids.b}`], + }, + { + name: 'triggers: refuses a second start trigger', + base: (ids) => [block(ids.start, 'start_trigger', 'Start')], + change: (ids) => ({ [ids.b]: block(ids.b, 'start_trigger', 'Start 2') }), + expected: (ids) => [`duplicate_trigger:${ids.b}`], + }, + { + name: 'enablement: refuses enabling a block under a disabled container', + base: (ids) => [ + block(ids.start, 'start_trigger', 'Start'), + block(ids.loop, 'loop', 'Each', { enabled: false }), + block(ids.a, 'function', 'Inner', { parentId: ids.loop, enabled: false }), + ], + change: (ids, base) => ({ [ids.a]: { ...base[ids.a], enabled: true } }), + expected: (ids) => [`disabled_ancestor:${ids.a}`], + }, +] + +async function seed(blocks: BlockState[]): Promise<{ workflowId: string; name: string }> { + const workflowId = generateId() + const name = `Source parity ${workflowId}` + const now = new Date() + await db.insert(workflow).values({ + id: workflowId, + userId: ownerId, + workspaceId, + name, + lastSynced: now, + createdAt: now, + updatedAt: now, + }) + const state: WorkflowState = { + blocks: Object.fromEntries(blocks.map((entry) => [entry.id, entry])), + edges: [], + loops: {}, + parallels: {}, + } + const saved = await saveWorkflowToNormalizedTables(workflowId, state) + if (!saved.success) throw new Error(`Seeding the workflow failed: ${saved.error}`) + return { workflowId, name } +} + +function categories(diagnostics: readonly { code: string; severity: string; blockId?: string }[]) { + return [ + ...new Set( + diagnostics + .filter((diagnostic) => diagnostic.severity === 'error') + .map( + (diagnostic) => `${CATEGORY[diagnostic.code] ?? diagnostic.code}:${diagnostic.blockId}` + ) + ), + ].sort() +} + +/** The target graph as the files and lock a client would send. */ +function printTarget(target: WorkflowState, name: string) { + const canonical = canonicalize(target, { catalog, meta: { name, description: null } }) + const printed = printWorkflow({ + workflow: canonical.workflow, + catalog, + options: { functionCode: 'files', codeDir: 'functions' }, + }) + return { + files: Object.fromEntries(printed.files.map((file) => [file.path, file.text])), + lock: assembleLock(canonical.identity, printed.hints.blocks, canonical.layout), + } +} + +beforeAll(async () => { + featureFlagsMockFns.mockIsFeatureEnabled.mockImplementation( + async (flag: string) => flag === 'workflow-code' + ) + const now = new Date() + await db.insert(user).values({ + id: ownerId, + name: 'Source parity fixture', + email: `${ownerId}@source-parity.invalid`, + emailVerified: true, + createdAt: now, + updatedAt: now, + }) + await insertWorkspaceFixture(db, { + id: workspaceId, + name: 'Source parity', + ownerId, + billedAccountUserId: ownerId, + }) + await db.insert(permissions).values({ + id: generateId(), + userId: ownerId, + entityType: 'workspace', + entityId: workspaceId, + permissionType: 'admin', + }) +}) + +afterAll(async () => { + const reportPath = + process.env.WORKFLOW_SOURCE_PARITY_REPORT_PATH ?? + resolve('test-results/workflow-source-parity.json') + await mkdir(dirname(reportPath), { recursive: true }) + await writeFile(reportPath, JSON.stringify({ checks }, null, 2)) + await db.delete(auditLog).where(eq(auditLog.workspaceId, workspaceId)) + await deleteWorkspaceFixture(db, eq(workspace.id, workspaceId)) + await db.delete(user).where(eq(user.id, ownerId)) +}) + +it.each(CASES)('$name', async (testCase) => { + const started = performance.now() + try { + const ids: Ids = { + start: generateId(), + a: generateId(), + b: generateId(), + c: generateId(), + loop: generateId(), + } + const { workflowId, name } = await seed(testCase.base(ids)) + const stored = await loadWorkflowFromNormalizedTables(workflowId) + if (!stored) throw new Error('The seeded workflow did not load') + const blocks = { ...stored.blocks } + for (const [id, next] of Object.entries(testCase.change(ids, stored.blocks))) { + if (next) blocks[id] = next + else delete blocks[id] + } + const base: SourceGraph = { blocks: stored.blocks, edges: stored.edges } + const target: WorkflowState = { blocks, edges: [], loops: {}, parallels: {} } + + const direct = await withPermissionGroupScope(async () => + categories([ + ...findProtectedBlockRefusals(base, target), + ...(await gateSourceDiff({ + base, + target, + permissionConfig: null, + subjectUserId: ownerId, + workspaceId, + isCopilot: false, + })), + ]) + ) + + const source = await withPermissionGroupScope(() => + getWorkflowSource.execute({ principal, input: { workflowId } }) + ) + const { files, lock } = printTarget(target, name) + const outcome = await withPermissionGroupScope(() => + applyWorkflowSource.execute({ + principal, + input: { + workflowId, + files, + lock, + lockBase: source.lockBase, + baseFingerprint: source.fingerprint, + }, + }) + ).then( + () => [] as string[], + (error: unknown) => { + if (!(error instanceof WorkflowSourceRejectedError)) throw error + return categories(error.diagnostics) + } + ) + + expect(direct).toEqual([...testCase.expected(ids)].sort()) + expect(outcome).toEqual(direct) + checks.push({ name: testCase.name, status: 'passed', durationMs: performance.now() - started }) + } catch (error) { + checks.push({ + name: testCase.name, + status: 'failed', + durationMs: performance.now() - started, + error: getErrorMessage(error), + }) + throw error + } +}) diff --git a/apps/sim/scripts/test-workflow-source-apply-e2e.ts b/apps/sim/scripts/test-workflow-source-apply-e2e.ts new file mode 100644 index 00000000000..2b8d799e378 --- /dev/null +++ b/apps/sim/scripts/test-workflow-source-apply-e2e.ts @@ -0,0 +1,251 @@ +import assert from 'node:assert/strict' +import { mkdir, writeFile } from 'node:fs/promises' +import { dirname } from 'node:path' +import { createLogger } from '@sim/logger' +import { getErrorMessage } from '@sim/utils/errors' +import { generateId } from '@sim/utils/id' +import { isRecordLike } from '@sim/utils/object' + +/** + * Workflow source apply over the real HTTP boundary of a running local app: create a workflow, + * read it as TypeScript (`GET /api/v2/workflows/{id}/source`), edit the text, apply it + * (`POST .../source`), and check the stored graph through `GET .../state`. Also drives the dry + * run, the stale-fingerprint 409 and the line-pinned 400. The app must have the `workflow-code` + * flag on, and the key must be a personal API key (workspace keys are refused). + * + * Env: WORKFLOW_SOURCE_E2E_BASE_URL (loopback origin), WORKFLOW_SOURCE_E2E_API_KEY, + * WORKFLOW_SOURCE_E2E_WORKSPACE_ID, WORKFLOW_SOURCE_E2E_REPORT_PATH. + */ +const logger = createLogger('WorkflowSourceApplyE2E') + +function requiredEnvironment(name: string): string { + const value = process.env[name] + assert(value, `${name} must be explicitly provided`) + return value +} + +const baseUrl = new URL(requiredEnvironment('WORKFLOW_SOURCE_E2E_BASE_URL')) +const apiKey = requiredEnvironment('WORKFLOW_SOURCE_E2E_API_KEY') +const workspaceId = requiredEnvironment('WORKFLOW_SOURCE_E2E_WORKSPACE_ID') +const reportPath = requiredEnvironment('WORKFLOW_SOURCE_E2E_REPORT_PATH') +const loopbackHosts = new Set(['localhost', '127.0.0.1', '[::1]']) +assert(loopbackHosts.has(baseUrl.hostname), 'The app must use a loopback host') +assert.equal(baseUrl.protocol, 'http:', 'The app must use local HTTP') +assert.equal(baseUrl.pathname, '/', 'App URL must be an origin without a path') + +const checks: { name: string; status: 'passed' | 'failed'; durationMs: number; error?: string }[] = + [] +const httpLog: { method: string; path: string; status: number }[] = [] +const startedAt = new Date().toISOString() +const SCORE_CODE = 'return 40 + 2' + +type Json = Record + +function record(value: unknown): Json { + assert(isRecordLike(value), 'Expected a JSON object') + return value +} + +async function request(method: string, path: string, body?: unknown, expected = 200) { + const response = await fetch(new URL(path, baseUrl), { + method, + headers: { + 'x-api-key': apiKey, + 'User-Agent': 'Sim-local-workflow-source-E2E', + ...(body === undefined ? {} : { 'Content-Type': 'application/json' }), + }, + body: body === undefined ? undefined : JSON.stringify(body), + redirect: 'error', + signal: AbortSignal.timeout(60_000), + }) + httpLog.push({ method, path, status: response.status }) + const text = await response.text() + const parsed = text ? record(JSON.parse(text)) : {} + assert.equal( + response.status, + expected, + `${method} ${path}: ${response.status} ${text.slice(0, 500)}` + ) + return parsed +} + +async function check(name: string, run: () => Promise) { + const started = performance.now() + try { + await run() + checks.push({ name, status: 'passed', durationMs: performance.now() - started }) + } catch (error) { + checks.push({ + name, + status: 'failed', + durationMs: performance.now() - started, + error: getErrorMessage(error), + }) + logger.error('Check failed', { name, error: getErrorMessage(error) }) + } +} + +function edit(files: Record, from: string, to: string): Record { + const hits = Object.entries(files).filter(([, text]) => text.split(from).length === 2) + assert.equal(hits.length, 1, `exactly one file holds "${from}" once`) + const [path, text] = hits[0] + return { ...files, [path]: text.replace(from, to) } +} + +async function readSource(workflowId: string) { + const { data } = await request('GET', `/api/v2/workflows/${workflowId}/source`) + const source = record(data) + return { + files: record(source.files) as Record, + lock: record(source.lock), + lockBase: record(source.lockBase), + fingerprint: String(source.fingerprint), + } +} + +async function storedBlocks(workflowId: string): Promise> { + const { data } = await request('GET', `/api/v2/workflows/${workflowId}/state`) + return record(record(data).blocks) as Record +} + +function applyBody(source: Awaited>, files = source.files) { + return { + files, + lock: source.lock, + lockBase: source.lockBase, + baseFingerprint: source.fingerprint, + provenance: { client: 'api' }, + } +} + +async function main() { + const created = record( + ( + await request( + 'POST', + '/api/v2/workflows', + { workspaceId, name: `Source apply e2e ${generateId().slice(0, 8)}` }, + 201 + ) + ).data + ) + const workflowId = String(created.id) + const startId = String(record((created.blocks as unknown[])[0]).id) + const scoreId = generateId() + const seededBlocks = await storedBlocks(workflowId) + + try { + await request('PUT', `/api/v2/workflows/${workflowId}/state`, { + blocks: { + ...seededBlocks, + [scoreId]: { + id: scoreId, + type: 'function', + name: 'Score', + position: { x: 420, y: 0 }, + subBlocks: { code: { id: 'code', type: 'code', value: SCORE_CODE } }, + outputs: {}, + enabled: true, + }, + }, + edges: [{ id: generateId(), source: startId, target: scoreId }], + }) + + await check('unchanged source is a no-op', async () => { + const source = await readSource(workflowId) + const { data } = await request( + 'POST', + `/api/v2/workflows/${workflowId}/source`, + applyBody(source) + ) + const result = record(data) + assert.equal(result.applied, false) + assert.equal(record(result.diff).noop, true) + assert.equal(result.newFingerprint, source.fingerprint) + }) + + await check('a dry run reports the edit and saves nothing', async () => { + const source = await readSource(workflowId) + const { data } = await request( + 'POST', + `/api/v2/workflows/${workflowId}/source?dryRun=true`, + applyBody(source, edit(source.files, SCORE_CODE, 'return 1')) + ) + assert.equal(record(data).applied, false) + assert.equal(record(data).dryRun, true) + const blocks = await storedBlocks(workflowId) + assert.equal(record(record(blocks[scoreId].subBlocks).code).value, SCORE_CODE) + }) + + let staleSource: Awaited> | undefined + await check('an edit writes exactly that field and keeps the block ids', async () => { + const source = await readSource(workflowId) + staleSource = source + const before = await storedBlocks(workflowId) + const { data } = await request( + 'POST', + `/api/v2/workflows/${workflowId}/source`, + applyBody(source, edit(source.files, SCORE_CODE, 'return 7')) + ) + const result = record(data) + assert.equal(result.applied, true) + const after = await storedBlocks(workflowId) + assert.deepEqual(Object.keys(after).sort(), Object.keys(before).sort()) + assert.equal(record(record(after[scoreId].subBlocks).code).value, 'return 7') + assert.deepEqual(after[startId], before[startId]) + const reread = await readSource(workflowId) + assert.equal(reread.fingerprint, result.newFingerprint) + }) + + await check('source read before that edit is refused with 409', async () => { + assert(staleSource, 'the edit check must run first') + const body = await request( + 'POST', + `/api/v2/workflows/${workflowId}/source`, + applyBody(staleSource, edit(staleSource.files, SCORE_CODE, 'return 9')), + 409 + ) + assert.equal(record(record(body.error).details).code, 'SOURCE_STALE') + }) + + await check('broken source is refused with a line-pinned 400', async () => { + const source = await readSource(workflowId) + const body = await request( + 'POST', + `/api/v2/workflows/${workflowId}/source`, + applyBody(source, { + ...source.files, + 'workflow.ts': `${source.files['workflow.ts']}\nconst = \n`, + }), + 400 + ) + const details = record(record(body.error).details) + assert.equal(details.code, 'SOURCE_REJECTED') + const first = record((details.diagnostics as unknown[])[0]) + assert.equal(first.file, 'workflow.ts') + assert.equal(typeof first.line, 'number') + }) + } finally { + await request('DELETE', `/api/v2/workflows/${workflowId}`).catch((error: unknown) => { + logger.warn('Cleanup failed', { workflowId, error: getErrorMessage(error) }) + }) + } +} + +main() + .catch((error: unknown) => { + checks.push({ name: 'setup', status: 'failed', durationMs: 0, error: getErrorMessage(error) }) + }) + .finally(async () => { + await mkdir(dirname(reportPath), { recursive: true }) + await writeFile( + reportPath, + JSON.stringify({ suite: 'workflow-source-apply', startedAt, checks, httpLog }, null, 2) + ) + const failed = checks.filter((entry) => entry.status === 'failed') + logger.info('Workflow source apply e2e finished', { + passed: checks.length - failed.length, + failed: failed.length, + }) + if (failed.length > 0) process.exitCode = 1 + }) From 2193014526ff0202ba5e6d0869ca0a0a57246375 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:05:31 -0800 Subject: [PATCH 084/428] fix(workflows): read the compact catalog through view accessors in source get --out narrowCatalog indexed catalog.blocks/builders/triggers directly, which misses trigger runs and shared subBlocks in the compact core shard. Read it through catalogBlock, catalogTrigger and catalogBuilder instead, served from a new @sim/workflow-code/catalog/view subpath so SDK codegen and the CLI keep Babel out of their graph. The escape-path test now writes under its own temp root, so a stale file in the shared tmpdir cannot fail it. --- .../protocol/workflow-source-get.test.ts | 8 ++-- .../commands/protocol/workflow-source-get.ts | 40 +++++++++++-------- packages/workflow-code/package.json | 4 ++ packages/workflow-sdk/src/codegen/generate.ts | 11 +---- packages/workflow-sdk/src/codegen/names.ts | 9 +---- 5 files changed, 37 insertions(+), 35 deletions(-) diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts b/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts index 347853bc813..dbe73912cbe 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts @@ -59,17 +59,19 @@ async function get(...argv: string[]): Promise { await program().parseAsync(['node', 'sim', 'workflows', 'source', 'get', WORKFLOW_ID, ...argv]) } +let rootDir: string let outDir: string beforeEach(() => { contextMockState.output = 'json' request.mockReset() - outDir = mkdtempSync(join(tmpdir(), 'sim-source-')) + rootDir = mkdtempSync(join(tmpdir(), 'sim-source-')) + outDir = join(rootDir, 'out') vi.spyOn(console, 'log').mockImplementation(() => {}) }) afterEach(() => { - rmSync(outDir, { recursive: true, force: true }) + rmSync(rootDir, { recursive: true, force: true }) }) describe('sim workflows source get --out', () => { @@ -128,7 +130,7 @@ describe('sim workflows source get --out', () => { ) await expect(get('--out', outDir)).rejects.toThrow('unsafe file path') - expect(existsSync(join(outDir, '..', 'escape.js'))).toBe(false) + expect(existsSync(join(rootDir, 'escape.js'))).toBe(false) expect(request).toHaveBeenCalledTimes(1) }) diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-get.ts b/packages/sim-cli/src/commands/protocol/workflow-source-get.ts index 64b8cd11839..9037aeb0a38 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-get.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-get.ts @@ -1,7 +1,13 @@ import { mkdir, readFile, writeFile } from 'node:fs/promises' import { dirname, join, posix } from 'node:path' import { isRecordLike } from '@sim/utils/object' -import type { BlockCatalog } from '@sim/workflow-code' +import type { BlockCatalog, CatalogBlock, CatalogBuilder, CatalogTrigger } from '@sim/workflow-code' +import { + catalogBlock, + catalogBuilder, + catalogBuilderPaths, + catalogTrigger, +} from '@sim/workflow-code/catalog/view' import { CORE_DTS, generateSdkTypes } from '@sim/workflow-sdk/codegen' import type { Command } from 'commander' import { embedStore } from '../../embed-context' @@ -81,25 +87,27 @@ function readSource(raw: unknown): WorkflowSource { /** * The catalog narrowed to the block types the workflow uses: their blocks, the builders that - * create them, and the triggers they can run. Core declarations come from `core.d.ts`, so this is + * create them, and the triggers they can run, read through the catalog view (an expanded entry is + * a valid core-shard entry). Core declarations come from `core.d.ts`, so this is * all an editor or agent needs to type-check the file. */ function narrowCatalog(catalog: BlockCatalog, types: readonly string[]): BlockCatalog { - const used = new Set(types) - const blocks = Object.fromEntries(Object.entries(catalog.blocks).filter(([t]) => used.has(t))) - const triggerIds = new Set( - Object.values(blocks).flatMap((block) => block.triggers?.available ?? []) - ) - return { - ...catalog, - blocks, - builders: Object.fromEntries( - Object.entries(catalog.builders).filter(([, builder]) => used.has(builder.type)) - ), - triggers: Object.fromEntries( - Object.entries(catalog.triggers).filter(([id]) => triggerIds.has(id)) - ), + const blocks: Record = {} + for (const type of types) { + const block = catalogBlock(catalog, type) + if (block) blocks[type] = block + } + const triggers: Record = {} + for (const id of Object.values(blocks).flatMap((block) => block.triggers?.available ?? [])) { + const trigger = catalogTrigger(catalog, id) + if (trigger) triggers[id] = trigger + } + const builders: Record = {} + for (const path of catalogBuilderPaths(catalog)) { + const builder = catalogBuilder(catalog, path) + if (builder && Object.hasOwn(blocks, builder.type)) builders[path] = builder } + return { ...catalog, blocks, triggers, builders } } /** Standalone runs only: an embedded run has no local disk of its own to cache on. */ diff --git a/packages/workflow-code/package.json b/packages/workflow-code/package.json index 7c600ef1f8b..f8ee9467b13 100644 --- a/packages/workflow-code/package.json +++ b/packages/workflow-code/package.json @@ -22,6 +22,10 @@ "types": "./src/catalog/canonical-index/index.ts", "default": "./src/catalog/canonical-index/index.ts" }, + "./catalog/view": { + "types": "./src/catalog/view.ts", + "default": "./src/catalog/view.ts" + }, "./sdk": { "types": "./src/sdk.ts", "default": "./src/sdk.ts" diff --git a/packages/workflow-sdk/src/codegen/generate.ts b/packages/workflow-sdk/src/codegen/generate.ts index 366b2bbcfbb..e6e6462bef1 100644 --- a/packages/workflow-sdk/src/codegen/generate.ts +++ b/packages/workflow-sdk/src/codegen/generate.ts @@ -12,15 +12,8 @@ */ import { compareStrings } from '@sim/utils/string' -import { - type BlockCatalog, - type CatalogBlock, - type CatalogOutput, - type CatalogSubBlock, - catalogBlock, - catalogBlockTypes, - catalogTrigger, -} from '@sim/workflow-code' +import type { BlockCatalog, CatalogBlock, CatalogOutput, CatalogSubBlock } from '@sim/workflow-code' +import { catalogBlock, catalogBlockTypes, catalogTrigger } from '@sim/workflow-code/catalog/view' import { indentLines, jsdoc, literal, pascal, propertyKey, quote, union } from './emit' import { mapSubBlock } from './map-subblock' import { type BuilderEntry, builderEntries, TOOL_NAMESPACE } from './names' diff --git a/packages/workflow-sdk/src/codegen/names.ts b/packages/workflow-sdk/src/codegen/names.ts index e662a89ad77..1750a2e8b99 100644 --- a/packages/workflow-sdk/src/codegen/names.ts +++ b/packages/workflow-sdk/src/codegen/names.ts @@ -5,13 +5,8 @@ */ import { compareStrings } from '@sim/utils/string' -import { - type BlockCatalog, - type CatalogBuilder, - catalogBlock, - catalogBuilder, - catalogBuilderPaths, -} from '@sim/workflow-code' +import type { BlockCatalog, CatalogBuilder } from '@sim/workflow-code' +import { catalogBlock, catalogBuilder, catalogBuilderPaths } from '@sim/workflow-code/catalog/view' import { SDK_CORE_EXPORTS } from '@sim/workflow-code/sdk' import { isIdentifier, pascal, RESERVED_WORDS } from './emit' From d67dfc02badbbf4878ea7b616fc6b7270457debb Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:12:57 -0800 Subject: [PATCH 085/428] feat(workflows): print source and assemble its lock from workflow code_meta source get and apply's reprint now project code_meta onto canonicalize's keys (codeMetaPrintInputs) for the print's hints and comments, and assemble the lock with buildLockFromState, so bindings, order and comments survive canvas edits and the lock always agrees with the printed file. assembleLock is gone. Apply reprints from the submission merged onto the ids it binds (mergeCodeMetaFromLock), which is what the next source get prints. --- ...pply-workflow-source.parity.integration.ts | 5 +- .../application/apply-workflow-source.ts | 53 +++++++++++++------ .../application/get-workflow-source.ts | 46 ++++++---------- 3 files changed, 57 insertions(+), 47 deletions(-) diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts b/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts index 5535edd86eb..d91b6b84967 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts @@ -27,11 +27,12 @@ import { eq } from 'drizzle-orm' import { afterAll, beforeAll, expect, it, vi } from 'vitest' import { withPermissionGroupScope } from '@/lib/permission-groups/request-scope.server' import { applyWorkflowSource } from '@/lib/workflows/application/apply-workflow-source' -import { assembleLock, getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' +import { getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' import { WorkflowSourceRejectedError } from '@/lib/workflows/application/source-error' import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' +import { buildLockFromState } from '@/lib/workflows/code/source-lock' import { loadWorkflowFromNormalizedTables } from '@/lib/workflows/persistence/utils' import { gateSourceDiff, SKIP_TYPE_APPLY_CODES } from '@/lib/workflows/source/gates' import type { SourceGraph } from '@/lib/workflows/source/graph-diff' @@ -256,7 +257,7 @@ function printTarget(target: WorkflowState, name: string) { }) return { files: Object.fromEntries(printed.files.map((file) => [file.path, file.text])), - lock: assembleLock(canonical.identity, printed.hints.blocks, canonical.layout), + lock: buildLockFromState(null, canonical, printed.hints), } } diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.ts b/apps/sim/lib/workflows/application/apply-workflow-source.ts index f8c5200c027..35014522c64 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.ts @@ -8,7 +8,6 @@ import { type AnchorKey, type BlockCatalog, type CanonicalDiff, - type CanonicalWorkflow, type CanonicalWorkflowMeta, type CompileResult, canonicalize, @@ -28,11 +27,13 @@ import { renamesBetween, type SourceSpan, sourceFingerprint, + type WorkflowCodeMetaV1, type WorkflowLockBlock, type WorkflowLockV1, } from '@sim/workflow-code' import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import { catalogBlock } from '@sim/workflow-code/catalog/view' +import { readCodeMetaValue } from '@sim/workflow-persistence/code-meta' import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' import { and, eq, inArray, isNull, ne } from 'drizzle-orm' import { isEqual } from 'es-toolkit' @@ -44,7 +45,6 @@ import { resolvePermissionGroupConfig } from '@/lib/permission-groups/config-sco import { notifyWorkflowUpdated } from '@/lib/realtime/notify' import { defineAuthorizedWorkflowUseCase } from '@/lib/workflows/application/authorized-workflow-use-case' import type { ActiveWorkflowApplicationContext } from '@/lib/workflows/application/context' -import { assembleLock } from '@/lib/workflows/application/get-workflow-source' import { layoutChangedBlocks } from '@/lib/workflows/application/graph-write' import { snapshotMcpToolOutputSchemas } from '@/lib/workflows/application/mcp-output-schemas' import { requireMutableWorkflow } from '@/lib/workflows/application/mutability' @@ -61,6 +61,11 @@ import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' import { createRecordingResolver, loadResourceKeyResolver } from '@/lib/workflows/code/resources' +import { + buildLockFromState, + codeMetaPrintInputs, + mergeCodeMetaFromLock, +} from '@/lib/workflows/code/source-lock' import { checkNeedsRedeployment } from '@/lib/workflows/deployment-status' import type { WorkflowLintReport } from '@/lib/workflows/editing/lint' import { buildWorkflowLintReport } from '@/lib/workflows/editing/lint-report' @@ -600,47 +605,60 @@ interface Reprinted { } /** - * Prints `state` back as source with the submission's bindings, order, code files and comments, - * so the response shows exactly what is (or would be) stored. The fingerprint is computed the way - * `source get` computes it, so it is the next apply's base. + * Prints `state` back as source with the bindings, order and comments of `codeMeta` (the + * submission's, merged onto the ids it now binds), so the response shows exactly what is (or + * would be) stored and what the next `source get` prints. The lock is assembled the way `source + * get` assembles it, and the fingerprint is computed the way it computes it, so it is the next + * apply's base. */ function reprint(args: { state: WorkflowState meta: CanonicalWorkflowMeta identity: LockIdentity - compiled: CompileResult & { workflow: CanonicalWorkflow } + codeMeta: WorkflowCodeMetaV1 + usesCodeFiles: boolean catalog: BlockCatalog resources: ResourceKeyResolver }): Reprinted { - const { state, meta, identity, compiled, catalog, resources } = args + const { state, meta, identity, codeMeta, usesCodeFiles, catalog, resources } = args const canonical = canonicalize(state, { catalog, meta, lock: identityLock(identity), resources, }) - const usesCodeFiles = Object.values(compiled.hints.blocks).some((hint) => hint.codeFile) + const metaInputs = codeMetaPrintInputs(codeMeta, canonical) const printed = printWorkflow({ workflow: { ...canonical.workflow, - annotations: { - ...canonical.workflow.annotations, - comments: compiled.workflow.annotations.comments, - }, + annotations: { ...canonical.workflow.annotations, comments: metaInputs.comments }, }, catalog, - hints: compiled.hints, + hints: metaInputs.hints, options: usesCodeFiles ? { functionCode: 'files', codeDir: FUNCTION_CODE_DIR } : { functionCode: 'inline' }, }) return { files: Object.fromEntries(printed.files.map((file) => [file.path, file.text])), - lock: assembleLock(canonical.identity, printed.hints.blocks, canonical.layout), + lock: buildLockFromState(codeMeta, canonical, printed.hints), fingerprint: fingerprintOf({ state, meta }, catalog, resources), } } +/** + * The post-materialize lock `mergeCodeMetaFromLock` re-keys onto: every bound key with its id, + * and the submitted lock's binding and order for a block the file does not state them for. + */ +function boundLock(identity: LockIdentity, submitted: WorkflowLockV1): WorkflowLockV1 { + const blocks: Record = {} + for (const [key, block] of Object.entries(identity.blocks)) { + const previous = Object.hasOwn(submitted.blocks, key) ? submitted.blocks[key] : undefined + blocks[key] = { ...block, binding: previous?.binding ?? key, order: previous?.order ?? 0 } + } + return { lockVersion: 1, blocks, variables: identity.variables } +} + function emptySummary(): SourceDiffSummary { return { noop: true, @@ -678,6 +696,7 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ const isCopilot = principal.kind === 'delegated' && principal.serviceId === 'copilot' const stored = await loadStoredSource(context) + const storedCodeMeta = readCodeMetaValue(context.workflowId, context.workflow.codeMeta) const storedTypes = [...new Set(Object.values(stored.state.blocks).map((b) => b.type))] const { catalog } = buildCodeCatalog({ gate, @@ -961,12 +980,16 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ const storedVariables = variables === undefined ? stored.state.variables : (parseWorkflowVariables(variables) ?? {}) + const lockAfter = boundLock(materialized.identity, lock) + const nextCodeMeta = mergeCodeMetaFromLock(storedCodeMeta, lockAfter, compiledModel) + const usesCodeFiles = Object.values(compiled.hints.blocks).some((hint) => hint.codeFile) const reprintFrom = (state: WorkflowState) => reprint({ state, meta: stored.meta, identity: materialized.identity, - compiled: compiledModel, + codeMeta: nextCodeMeta, + usesCodeFiles, catalog, resources, }) diff --git a/apps/sim/lib/workflows/application/get-workflow-source.ts b/apps/sim/lib/workflows/application/get-workflow-source.ts index d58707b9872..9c9d79ef221 100644 --- a/apps/sim/lib/workflows/application/get-workflow-source.ts +++ b/apps/sim/lib/workflows/application/get-workflow-source.ts @@ -8,13 +8,12 @@ import { encodeAnchor, type LockBase, type LockIdentity, - type LockLayout, printWorkflow, type SourceFingerprint, sourceFingerprint, - type WorkflowLockBlock, type WorkflowLockV1, } from '@sim/workflow-code' +import { readCodeMetaValue } from '@sim/workflow-persistence/code-meta' import type { WorkflowState } from '@sim/workflow-types/workflow' import { resolveCatalogGate, withCatalogBlockScope } from '@/lib/catalog/application/context' import { defineAuthorizedWorkflowUseCase } from '@/lib/workflows/application/authorized-workflow-use-case' @@ -24,6 +23,7 @@ import { loadWorkflowGraph } from '@/lib/workflows/application/read-workflow-gra import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog' import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' import { createRecordingResolver, loadResourceKeyResolver } from '@/lib/workflows/code/resources' +import { buildLockFromState, codeMetaPrintInputs } from '@/lib/workflows/code/source-lock' /** Directory function-code files are printed into when `functionCode` is `files`. */ const FUNCTION_CODE_DIR = 'functions' @@ -102,35 +102,13 @@ function usedBlockTypes(workflow: CanonicalWorkflow): string[] { return [...types].sort(compareStrings) } -/** The full lock: canonicalize's identity, the printer's bindings/order/code files, and layout. */ -export function assembleLock( - identity: LockIdentity, - hints: Record, - layout: Record -): WorkflowLockV1 { - const blocks: Record = {} - for (const [key, block] of Object.entries(identity.blocks)) { - const hint = hints[key] - if (hint?.binding === undefined || hint.order === undefined) { - throw new Error(`The printer returned no binding or order for block "${key}"`) - } - blocks[key] = { - ...block, - binding: hint.binding, - order: hint.order, - ...(hint.codeFile !== undefined ? { codeFile: hint.codeFile } : {}), - ...(layout[key] ? { layout: layout[key] } : {}), - } - } - return { lockVersion: 1, blocks, variables: identity.variables } -} - /** * Reads a workflow's stored draft as TypeScript source (build-spec decisions 11–13, s4 §2). * * Loads the stored, migrated graph; builds the per-workflow compile catalog (the blocks this * caller may place plus every type already in the workflow); projects the graph to the canonical - * model with resource ids lifted to provisional keys; and prints it. Pure read: no audit, so it + * model with resource ids lifted to provisional keys; and prints it with the bindings, order and + * comments `workflow.code_meta` keeps, so the lock comes from the same place. Pure read: no audit, so it * stays head-safe and pollable like `GET /state`. */ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ @@ -169,11 +147,19 @@ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ const resources = await loadResourceKeyResolver(context.workspaceId, recording.requestedKinds) const canonical = canonicalize(state, { catalog, meta, resources }) + const codeMeta = readCodeMetaValue(context.workflowId, context.workflow.codeMeta) + const metaInputs = codeMetaPrintInputs(codeMeta, canonical) + const withComments: CanonicalWorkflow = { + ...canonical.workflow, + annotations: { + ...canonical.workflow.annotations, + comments: { ...canonical.workflow.annotations.comments, ...metaInputs.comments }, + }, + } const printed = printWorkflow({ - workflow: input.annotateIds - ? withIdComments(canonical.workflow, canonical.identity) - : canonical.workflow, + workflow: input.annotateIds ? withIdComments(withComments, canonical.identity) : withComments, catalog, + hints: metaInputs.hints, options: (input.functionCode ?? 'files') === 'files' ? { functionCode: 'files', codeDir: FUNCTION_CODE_DIR } @@ -185,7 +171,7 @@ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ workflowId: context.workflowId, workspaceId: context.workspaceId, files: Object.fromEntries(printed.files.map((file) => [file.path, file.text])), - lock: assembleLock(canonical.identity, printed.hints.blocks, canonical.layout), + lock: buildLockFromState(codeMeta, canonical, printed.hints), lockBase: { workspaceId: context.workspaceId, baseFingerprint: fingerprint, From d9e27642d2915a84a4b63a2468d6d8bb773793ca Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:14:50 -0800 Subject: [PATCH 086/428] feat(workflows): store applied bindings, order and comments in workflow code_meta Inside apply's atomic write reader, after the protected-block assertion, the submission's bindings, order and comments are merged onto the ids the post-materialize lock binds (mergeCodeMetaFromLock over the code_meta read under the row lock) and written in the same transaction. A source whose only change is to those is a graph no-op that stores just code_meta when it changes what source get prints. Compile gets knownKeys from the submitted lock and the stored keys, so a legacy name~n or reserved-name meta.key override compiles on apply. The integration suite proves a binding rename and a comment survive into the next source get. --- .../apply-workflow-source.integration.ts | 33 +++++++++++-- .../application/apply-workflow-source.ts | 46 +++++++++++++++++-- 2 files changed, 71 insertions(+), 8 deletions(-) diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts b/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts index 04890a45097..3956941ca1b 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts @@ -42,10 +42,7 @@ import { type ApplyWorkflowSourceInput, applyWorkflowSource, } from '@/lib/workflows/application/apply-workflow-source' -import { - type GetWorkflowSourceResult, - getWorkflowSource, -} from '@/lib/workflows/application/get-workflow-source' +import { getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' import { WorkflowSourceRejectedError } from '@/lib/workflows/application/source-error' import { loadWorkflowFromNormalizedTables } from '@/lib/workflows/persistence/utils' @@ -134,6 +131,8 @@ async function seedWorkflow(): Promise { return { workflowId, startId, scoreId, edgeId, variableId } } +type GetWorkflowSourceResult = Awaited> + function getSource(workflowId: string): Promise { return withPermissionGroupScope(() => getWorkflowSource.execute({ principal, input: { workflowId } }) @@ -420,6 +419,32 @@ check('a rename keeps the block id, so a webhook row bound to it stays valid', a expect(after.state?.blocks[row.blockId ?? '']).toBeDefined() }) +check( + 'an apply stores its bindings, order and comments in code_meta, and the next get prints them', + async () => { + const seeded = await seedWorkflow() + const source = await getSource(seeded.workflowId) + const scoreBinding = source.lock.blocks.score.binding + const renamed = source.files['workflow.ts'] + .replace(new RegExp(`(? { const seeded = await seedWorkflow() const source = await getSource(seeded.workflowId) diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.ts b/apps/sim/lib/workflows/application/apply-workflow-source.ts index 35014522c64..a284858381d 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.ts @@ -33,7 +33,11 @@ import { } from '@sim/workflow-code' import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import { catalogBlock } from '@sim/workflow-code/catalog/view' -import { readCodeMetaValue } from '@sim/workflow-persistence/code-meta' +import { + readCodeMetaValue, + readWorkflowCodeMeta, + writeWorkflowCodeMeta, +} from '@sim/workflow-persistence/code-meta' import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' import { and, eq, inArray, isNull, ne } from 'drizzle-orm' import { isEqual } from 'es-toolkit' @@ -615,7 +619,7 @@ function reprint(args: { state: WorkflowState meta: CanonicalWorkflowMeta identity: LockIdentity - codeMeta: WorkflowCodeMetaV1 + codeMeta: WorkflowCodeMetaV1 | null usesCodeFiles: boolean catalog: BlockCatalog resources: ResourceKeyResolver @@ -679,7 +683,10 @@ function emptySummary(): SourceDiffSummary { * * The write is one `replaceWorkflowNormalizedState` under the workflow row lock, which re-checks * the fingerprint (409 when the draft moved), keeps current canvas positions for existing blocks - * and asserts the protected-block merge is the identity. Draft only: it never deploys. + * and asserts the protected-block merge is the identity, then stores the submission's bindings, + * order and comments in `workflow.code_meta` in the same transaction. A source that changes only + * those (a renamed const, a moved declaration, a comment) is a graph no-op that stores just + * `code_meta`, so the next `source get` prints it. Draft only: it never deploys. */ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ operation: workflowOperations.applySource, @@ -705,7 +712,11 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ }) const recording = createRecordingResolver() - canonicalize(stored.state, { catalog, meta: stored.meta, resources: recording.resolver }) + const storedIdentity = canonicalize(stored.state, { + catalog, + meta: stored.meta, + resources: recording.resolver, + }).identity let resources = await loadResourceKeyResolver(context.workspaceId, recording.requestedKinds) const currentFingerprint = fingerprintOf(stored, catalog, resources) @@ -771,6 +782,7 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ files: new Map(Object.entries(input.files).filter(([path]) => path !== ENTRY_FILE)), catalog, sdkMajor: catalog.sdkMajor, + knownKeys: new Set([...Object.keys(lock.blocks), ...Object.keys(storedIdentity.blocks)]), }) const compileLocate = createLocator(input.files, compiled.spans, new Map()) if (!compiled.workflow || hasErrors(compiled.diagnostics)) { @@ -996,6 +1008,23 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ if (noop) { const printed = reprintFrom(stored.state) + if (!input.dryRun) { + const storedPrint = reprint({ + state: stored.state, + meta: stored.meta, + identity: materialized.identity, + codeMeta: storedCodeMeta, + usesCodeFiles, + catalog, + resources, + }) + if ( + !isEqual(printed.files, storedPrint.files) || + !isEqual(printed.lock, storedPrint.lock) + ) { + await writeWorkflowCodeMeta(db, context.workflowId, nextCodeMeta) + } + } return { ...base, applied: false, @@ -1070,6 +1099,15 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ { blocks: current.state.blocks, edges: current.state.edges }, next ) + await writeWorkflowCodeMeta( + tx, + context.workflowId, + mergeCodeMetaFromLock( + await readWorkflowCodeMeta(tx, context.workflowId), + lockAfter, + compiledModel + ) + ) return variables === undefined ? next : { ...next, variables } }, }) From 2980ec35732ef4d1063d7a1046241d4acb79781b Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:17:36 -0800 Subject: [PATCH 087/428] fix(workflows): accept x- extension fields on the source lock again 3D's .strict() on the shared lock schemas answered 400 to any x- field, which contradicts DESIGN amendment A3. The lock, its blocks and their layout now keep x- fields verbatim and still reject every other unknown key; list items and the lock base stay strict. The schema is typed as the plain object, so the workflow-code lock interfaces stay assignable to it. --- apps/docs/openapi-v2-workflows.json | 36 ++++-- .../[workflowId]/source/route.test.ts | 31 +++++ apps/sim/lib/api/contracts/workflow-source.ts | 117 +++++++++++------- 3 files changed, 127 insertions(+), 57 deletions(-) diff --git a/apps/docs/openapi-v2-workflows.json b/apps/docs/openapi-v2-workflows.json index 9f80403ca79..9541a736e3d 100644 --- a/apps/docs/openapi-v2-workflows.json +++ b/apps/docs/openapi-v2-workflows.json @@ -17728,7 +17728,9 @@ } }, "required": ["x", "y"], - "additionalProperties": false, + "additionalProperties": { + "description": "An `x-` extension field, kept verbatim." + }, "description": "Stored canvas geometry; applied only to new blocks." }, "codeFile": { @@ -17737,7 +17739,9 @@ } }, "required": ["id", "parent", "binding", "order"], - "additionalProperties": false, + "additionalProperties": { + "description": "An `x-` extension field, kept verbatim." + }, "description": "One block’s identity." }, "description": "Block key → identity." @@ -17754,7 +17758,9 @@ } }, "required": ["lockVersion", "blocks", "variables"], - "additionalProperties": false, + "additionalProperties": { + "description": "An `x-` extension field, kept verbatim." + }, "description": "Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids." }, "lockBase": { @@ -18279,7 +18285,9 @@ } }, "required": ["x", "y"], - "additionalProperties": false, + "additionalProperties": { + "description": "An `x-` extension field, kept verbatim." + }, "description": "Stored canvas geometry; applied only to new blocks." }, "codeFile": { @@ -18288,7 +18296,9 @@ } }, "required": ["id", "parent", "binding", "order"], - "additionalProperties": false, + "additionalProperties": { + "description": "An `x-` extension field, kept verbatim." + }, "description": "One block’s identity." }, "description": "Block key → identity." @@ -18305,7 +18315,9 @@ } }, "required": ["lockVersion", "blocks", "variables"], - "additionalProperties": false, + "additionalProperties": { + "description": "An `x-` extension field, kept verbatim." + }, "description": "Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids." }, "lockBase": { @@ -18548,7 +18560,9 @@ } }, "required": ["x", "y"], - "additionalProperties": false, + "additionalProperties": { + "description": "An `x-` extension field, kept verbatim." + }, "description": "Stored canvas geometry; applied only to new blocks." }, "codeFile": { @@ -18557,7 +18571,9 @@ } }, "required": ["id", "parent", "binding", "order"], - "additionalProperties": false, + "additionalProperties": { + "description": "An `x-` extension field, kept verbatim." + }, "description": "One block’s identity." }, "description": "Block key → identity." @@ -18574,7 +18590,9 @@ } }, "required": ["lockVersion", "blocks", "variables"], - "additionalProperties": false, + "additionalProperties": { + "description": "An `x-` extension field, kept verbatim." + }, "description": "Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids." }, "lockBase": { diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts index 3ad83f49500..7094fde1277 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts @@ -231,6 +231,37 @@ describe('POST /api/v2/workflows/{workflowId}/source', () => { expect(mocks.apply).not.toHaveBeenCalled() }) + it('passes x- extension fields on the lock, its blocks and their layout through to apply', async () => { + const lock = { + ...source.lock, + 'x-tool': { pinned: true }, + blocks: { + start: { + ...source.lock.blocks.start, + 'x-note': 'keep', + layout: { x: 0, y: 0, 'x-snap': 8 }, + }, + }, + } + + const response = await POST(applyRequest({ ...applyBody, lock }), context) + + expect(response.status).toBe(200) + expect(mocks.apply.mock.calls[0][0].input.lock).toEqual(lock) + }) + + it('rejects an unknown non-extension lock block field with 400 before applying', async () => { + const lock = { + ...source.lock, + blocks: { start: { ...source.lock.blocks.start, type: 'starter' } }, + } + + const response = await POST(applyRequest({ ...applyBody, lock }), context) + + expect(response.status).toBe(400) + expect(mocks.apply).not.toHaveBeenCalled() + }) + it('rejects files without workflow.ts with 400 before applying', async () => { const response = await POST( applyRequest({ ...applyBody, files: { 'functions/a.js': 'return 1' } }), diff --git a/apps/sim/lib/api/contracts/workflow-source.ts b/apps/sim/lib/api/contracts/workflow-source.ts index acd46278a8c..1732c88792b 100644 --- a/apps/sim/lib/api/contracts/workflow-source.ts +++ b/apps/sim/lib/api/contracts/workflow-source.ts @@ -26,57 +26,78 @@ export const workflowSourceQuerySchema = z }) .strict() -const lockLayoutSchema = z - .object({ - x: z.number().describe('Canvas x position.'), - y: z.number().describe('Canvas y position.'), - w: z.number().optional().describe('Container width.'), - h: z.number().optional().describe('Container height.'), - height: z.number().optional().describe('Stored block height.'), - horizontalHandles: z.boolean().optional().describe('Handles on the left and right.'), - }) - .strict() - .describe('Stored canvas geometry; applied only to new blocks.') +const EXTENSION_PREFIX = 'x-' -const lockBlockSchema = z - .object({ - id: z.string().describe('Block id.'), - parent: z.string().nullable().describe('Key of the enclosing loop or parallel, or null.'), - branches: z - .record(z.string(), z.string()) - .optional() - .describe('Condition or router branch key → stored branch id.'), - items: z - .record( - z.string(), - z.array( - z - .object({ - name: z.string().describe('Item name.'), - id: z.string().describe('Item id.'), - }) - .strict() - .describe('One id-bearing list item.') - ) +/** + * A lock object that tolerates and keeps `x-` extension fields (DESIGN amendment A3: data a newer + * writer emits waits under `x-` until validators know it) and still rejects any other unknown key. + * Typed as the plain object so `@sim/workflow-code`'s lock interfaces, whose extension index is + * `x-${string}`, stay assignable to it. + */ +function withExtensions( + shape: Shape +): z.ZodType>, z.input>> { + return z + .object(shape) + .catchall(z.unknown().describe('An `x-` extension field, kept verbatim.')) + .superRefine((value, ctx) => { + const unknown = Object.keys(value).filter( + (key) => !Object.hasOwn(shape, key) && !key.startsWith(EXTENSION_PREFIX) ) - .optional() - .describe('Per field, its id-bearing items (input format fields) in stored order.'), - binding: z.string().describe('The `const` name the block is printed as.'), - order: z.number().int().describe('Declaration-order tie-break.'), - layout: lockLayoutSchema.optional(), - codeFile: z.string().optional().describe('Path of the block’s function-code file.'), - }) - .strict() - .describe('One block’s identity.') + if (unknown.length > 0) { + ctx.addIssue({ + code: 'unrecognized_keys', + keys: unknown, + message: `Unrecognized ${unknown.length === 1 ? 'key' : 'keys'}: ${unknown + .map((key) => `"${key}"`) + .join(', ')} (only \`${EXTENSION_PREFIX}\` extension fields are allowed)`, + }) + } + }) +} -export const workflowLockSchema = z - .object({ - lockVersion: z.literal(1).describe('Lock format version.'), - blocks: z.record(z.string(), lockBlockSchema).describe('Block key → identity.'), - variables: z.record(z.string(), z.string()).describe('Variable key → variable id.'), - }) - .strict() - .describe('Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids.') +const lockLayoutSchema = withExtensions({ + x: z.number().describe('Canvas x position.'), + y: z.number().describe('Canvas y position.'), + w: z.number().optional().describe('Container width.'), + h: z.number().optional().describe('Container height.'), + height: z.number().optional().describe('Stored block height.'), + horizontalHandles: z.boolean().optional().describe('Handles on the left and right.'), +}).describe('Stored canvas geometry; applied only to new blocks.') + +const lockBlockSchema = withExtensions({ + id: z.string().describe('Block id.'), + parent: z.string().nullable().describe('Key of the enclosing loop or parallel, or null.'), + branches: z + .record(z.string(), z.string()) + .optional() + .describe('Condition or router branch key → stored branch id.'), + items: z + .record( + z.string(), + z.array( + z + .object({ + name: z.string().describe('Item name.'), + id: z.string().describe('Item id.'), + }) + .strict() + .describe('One id-bearing list item.') + ) + ) + .optional() + .describe('Per field, its id-bearing items (input format fields) in stored order.'), + binding: z.string().describe('The `const` name the block is printed as.'), + order: z.number().int().describe('Declaration-order tie-break.'), + layout: lockLayoutSchema.optional(), + codeFile: z.string().optional().describe('Path of the block’s function-code file.'), +}).describe('One block’s identity.') + +export const workflowLockSchema = withExtensions({ + lockVersion: z.literal(1).describe('Lock format version.'), + blocks: z.record(z.string(), lockBlockSchema).describe('Block key → identity.'), + variables: z.record(z.string(), z.string()).describe('Variable key → variable id.'), +}).describe('Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids.') export const lockBaseSchema = z .object({ From b1a808b74534d3a9e93e530fd414ca45051000a8 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:19:06 -0800 Subject: [PATCH 088/428] test(cli): prove source get --out and apply --from round-trip one directory layout The two commands now read workflow.ts, .sim/lock.json, .sim/base.json and .sim/sdk from one layout module instead of separate literals. A new CLI test runs get then apply against a real SimClient with fetch stubbed at the HTTP boundary: apply sends back exactly the files, lock (x- fields included) and base get wrote, then saves what the server stored. --- .../protocol/workflow-source-apply.ts | 9 +- .../commands/protocol/workflow-source-get.ts | 13 +- .../protocol/workflow-source-layout.ts | 13 ++ .../workflow-source-roundtrip.test.ts | 182 ++++++++++++++++++ 4 files changed, 209 insertions(+), 8 deletions(-) create mode 100644 packages/sim-cli/src/commands/protocol/workflow-source-layout.ts create mode 100644 packages/sim-cli/src/commands/protocol/workflow-source-roundtrip.test.ts diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts b/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts index 41ae5a8cef0..8f4b7ef230a 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts @@ -9,11 +9,12 @@ import { apiCommand } from '../../runtime/called-operations' import { embeddedFileContent } from '../../transfer/local-file' import { saveToFile } from './files-get' import { printProtocolResult } from './result' +import { + SOURCE_BASE_FILE as BASE_FILE, + SOURCE_ENTRY_FILE as ENTRY_FILE, + SOURCE_LOCK_FILE as LOCK_FILE, +} from './workflow-source-layout' -/** The layout `workflows source get` writes and this command reads back. */ -const ENTRY_FILE = 'workflow.ts' -const LOCK_FILE = '.sim/lock.json' -const BASE_FILE = '.sim/base.json' /** `code: file('./functions/x.js')` in the entry file (the SDK's only code-file form). */ const CODE_FILE_REFERENCE = /\bfile\(\s*(['"])([^'"\n]+)\1\s*\)/g diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-get.ts b/packages/sim-cli/src/commands/protocol/workflow-source-get.ts index 9037aeb0a38..6c5e2f04759 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-get.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-get.ts @@ -16,9 +16,14 @@ import { callsOperations, type OperationClient } from '../../runtime/called-oper import { buildRequest } from '../../runtime/request' import { saveToFile } from './files-get' import { printProtocolResult } from './result' +import { + SOURCE_SDK_DIR as SDK_DIR, + SOURCE_BASE_FILE, + SOURCE_ENTRY_FILE, + SOURCE_LOCK_FILE, +} from './workflow-source-layout' const OUT_FLAG = 'out' -const SDK_DIR = '.sim/sdk' const CATALOG_CACHE = '.sim/cache/block-catalog.json' /** The part of the source response the writer reads; the contract owns the full shape. */ @@ -174,7 +179,7 @@ const TSCONFIG = `${JSON.stringify( noEmit: true, paths: { '@sim/workflow-sdk': [`./${SDK_DIR}/core.d.ts`] }, }, - include: ['workflow.ts', `${SDK_DIR}/**/*.d.ts`], + include: [SOURCE_ENTRY_FILE, `${SDK_DIR}/**/*.d.ts`], }, null, 2 @@ -188,8 +193,8 @@ async function writeSourceTree( const sdkFiles = generateSdkTypes(narrowCatalog(catalog, source.blockTypes)) const files: Array<[string, string]> = [ ...Object.entries(source.files), - ['.sim/lock.json', `${JSON.stringify(source.lock, null, 2)}\n`], - ['.sim/base.json', `${JSON.stringify(source.lockBase, null, 2)}\n`], + [SOURCE_LOCK_FILE, `${JSON.stringify(source.lock, null, 2)}\n`], + [SOURCE_BASE_FILE, `${JSON.stringify(source.lockBase, null, 2)}\n`], [`${SDK_DIR}/core.d.ts`, CORE_DTS], ...sdkFiles.map((file): [string, string] => [`${SDK_DIR}/${file.path}`, file.text]), ['tsconfig.json', TSCONFIG], diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-layout.ts b/packages/sim-cli/src/commands/protocol/workflow-source-layout.ts new file mode 100644 index 00000000000..3b7aaf48651 --- /dev/null +++ b/packages/sim-cli/src/commands/protocol/workflow-source-layout.ts @@ -0,0 +1,13 @@ +/** + * The source directory `workflows source get --out` writes and `workflows source apply --from` + * reads back. One definition, so the two commands cannot drift apart. + */ + +/** The entry file every source directory holds; function code sits beside it under `functions/`. */ +export const SOURCE_ENTRY_FILE = 'workflow.ts' +/** The identity lock (`WorkflowLockV1`). */ +export const SOURCE_LOCK_FILE = '.sim/lock.json' +/** The freshness facts for the lock in this environment (`LockBase`). */ +export const SOURCE_BASE_FILE = '.sim/base.json' +/** Generated SDK declarations for the block types the workflow uses. */ +export const SOURCE_SDK_DIR = '.sim/sdk' diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-roundtrip.test.ts b/packages/sim-cli/src/commands/protocol/workflow-source-roundtrip.test.ts new file mode 100644 index 00000000000..535110a58e7 --- /dev/null +++ b/packages/sim-cli/src/commands/protocol/workflow-source-roundtrip.test.ts @@ -0,0 +1,182 @@ +import { mkdtempSync, readFileSync, rmSync } from 'node:fs' +import { tmpdir } from 'node:os' +import { join } from 'node:path' +import { Command } from 'commander' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' +import { buildGeneratedCommands } from '../../runtime/build' +import { attachProtocolCommands } from './index' + +vi.mock('../../context', async () => { + const { SimClient } = await import('../../http/client') + const profile = { + name: 'default', + endpoint: 'https://sim.example', + authProfile: 'default', + apiKey: 'key', + oauth: null, + workspaceId: '00000000-0000-4000-8000-00000000000b', + output: 'json' as const, + sources: { + endpoint: 'default' as const, + credential: 'env' as const, + workspaceId: 'env' as const, + output: 'default' as const, + }, + } + return { + globalsOf: () => ({}), + profileFrom: () => profile, + clientFrom: () => ({ client: new SimClient(profile), profile }), + } +}) + +const WORKFLOW_ID = '00000000-0000-4000-8000-00000000000a' +const WORKSPACE_ID = '00000000-0000-4000-8000-00000000000b' +const FIRST = `sf1:${'1'.repeat(64)}` +const SECOND = `sf1:${'2'.repeat(64)}` + +/** A real catalog projected from registry blocks, shared with the SDK's own type checks. */ +const CATALOG = JSON.parse( + readFileSync(join(__dirname, '../../../../workflow-sdk/test/fixtures/catalog.json'), 'utf8') +) + +const WORKFLOW_TS = + "// @sim-sdk 1\nexport default workflow('W', {}, () => {\n const score = fn('Score', { code: file('./functions/score.js') })\n})\n" +const LOCK = { + lockVersion: 1, + 'x-tool': { pinned: true }, + blocks: { + score: { + id: 'b-1', + parent: null, + binding: 'score', + order: 0, + codeFile: 'functions/score.js', + }, + }, + variables: {}, +} + +function sourceResponse() { + return { + data: { + workflowId: WORKFLOW_ID, + workspaceId: WORKSPACE_ID, + files: { 'workflow.ts': WORKFLOW_TS, 'functions/score.js': 'return 1\n' }, + lock: LOCK, + lockBase: { workspaceId: WORKSPACE_ID, baseFingerprint: FIRST, catalogHash: CATALOG.hash }, + fingerprint: FIRST, + canonicalHash: 'h', + catalogVersion: CATALOG.hash, + sdkMajor: 1, + blockTypes: ['function'], + warnings: [], + }, + } +} + +function appliedResponse(files: Record) { + return { + data: { + workflowId: WORKFLOW_ID, + workflowName: 'W', + workspaceId: WORKSPACE_ID, + dryRun: false, + applied: true, + diff: { + noop: false, + blocks: { added: [], removed: [], renamed: [], modified: [] }, + edges: { added: 0, removed: 0 }, + variables: { added: [], removed: [], modified: [] }, + }, + diagnostics: [], + newFingerprint: SECOND, + files, + lock: LOCK, + lockBase: { workspaceId: WORKSPACE_ID, baseFingerprint: SECOND, catalogHash: CATALOG.hash }, + mintedIds: {}, + warnings: [], + needsRedeployment: true, + sdkMajor: 1, + catalogVersion: CATALOG.hash, + }, + } +} + +function json(body: unknown): Response { + return new Response(JSON.stringify(body), { + status: 200, + headers: { 'content-type': 'application/json' }, + }) +} + +function program(): Command { + const root = new Command('sim').exitOverride() + for (const group of buildGeneratedCommands()) root.addCommand(group) + attachProtocolCommands(root) + const override = (command: Command) => { + command.exitOverride() + command.commands.forEach(override) + } + override(root) + return root +} + +async function sim(...argv: string[]): Promise { + await program().parseAsync(['node', 'sim', ...argv]) +} + +let dir: string +let applyBodies: unknown[] + +beforeEach(() => { + dir = join(mkdtempSync(join(tmpdir(), 'sim-source-roundtrip-')), 'source') + applyBodies = [] + vi.spyOn(console, 'log').mockImplementation(() => {}) + vi.stubGlobal( + 'fetch', + vi.fn(async (input: string | URL | Request, init?: RequestInit) => { + const url = new URL(typeof input === 'string' || input instanceof URL ? input : input.url) + const method = init?.method ?? 'GET' + if (url.pathname === `/api/v2/workflows/${WORKFLOW_ID}/source` && method === 'GET') { + return json(sourceResponse()) + } + if (url.pathname === `/api/v2/workspaces/${WORKSPACE_ID}/block-catalog`) { + return json({ data: CATALOG }) + } + if (url.pathname === `/api/v2/workflows/${WORKFLOW_ID}/source` && method === 'POST') { + applyBodies.push(JSON.parse(String(init?.body))) + return json( + appliedResponse({ 'workflow.ts': WORKFLOW_TS, 'functions/score.js': 'return 2\n' }) + ) + } + return new Response('not found', { status: 404 }) + }) + ) +}) + +afterEach(() => { + rmSync(join(dir, '..'), { recursive: true, force: true }) +}) + +describe('sim workflows source get --out → apply --from', () => { + it('sends back exactly the directory get wrote, then saves what the server stored', async () => { + await sim('workflows', 'source', 'get', WORKFLOW_ID, '--out', dir) + await sim('workflows', 'source', 'apply', WORKFLOW_ID, '--from', dir) + + expect(applyBodies).toEqual([ + { + files: { 'workflow.ts': WORKFLOW_TS, 'functions/score.js': 'return 1\n' }, + lock: LOCK, + lockBase: { workspaceId: WORKSPACE_ID, baseFingerprint: FIRST, catalogHash: CATALOG.hash }, + baseFingerprint: FIRST, + provenance: { client: 'cli' }, + }, + ]) + expect(readFileSync(join(dir, 'functions/score.js'), 'utf8')).toBe('return 2\n') + expect(JSON.parse(readFileSync(join(dir, '.sim/base.json'), 'utf8')).baseFingerprint).toBe( + SECOND + ) + expect(JSON.parse(readFileSync(join(dir, '.sim/lock.json'), 'utf8'))).toEqual(LOCK) + }) +}) From 5e5cf27ccba626230bb35f1cf652e183b7bdc00a Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:20:17 -0800 Subject: [PATCH 089/428] refactor(workflow-code): print raw tool entries and retry meta without double casts The printer cast a CanonicalTool and BlockRetryConfig through unknown to Json. Retry now prints a spread copy (an object literal type is JSON-assignable), and a raw tool goes through isJson, which holds by the CWM's JSON contract. check:api-validation:strict passes, and its double-cast baseline ratchets from 6 to 5. --- packages/workflow-code/src/print/printer.ts | 16 +++++++++++++--- scripts/check-api-validation-contracts.ts | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/packages/workflow-code/src/print/printer.ts b/packages/workflow-code/src/print/printer.ts index eadfbed4f29..a022bf6e1ca 100644 --- a/packages/workflow-code/src/print/printer.ts +++ b/packages/workflow-code/src/print/printer.ts @@ -21,6 +21,7 @@ import { import { type CodeFileCodec, type CodeFileLanguage, codeFileCodec } from '../code-files' import type { PrintDiagnosticCode } from '../diagnostics/codes' import type { Diagnostic } from '../diagnostics/frame' +import { isJson } from '../lock' import type { AnchorKey, BlockKey, @@ -175,6 +176,16 @@ interface ParamEntry { value: Expr } +/** + * A tool entry as JSON for `raw(...)`. The CWM is JSON by contract (`canonicalHash` stringifies + * it with `stableStringify`, which throws otherwise), so a non-JSON tool is a canonicalize bug. + */ +function toolJson(tool: CanonicalTool): Json { + const value: unknown = tool + if (!isJson(value)) throw new Error(`Tool entry of type "${tool.type}" is not plain JSON`) + return value +} + class WorkflowPrinter { private readonly workflow: CanonicalWorkflow private readonly catalog: BlockCatalog @@ -514,7 +525,7 @@ class WorkflowPrinter { const value = getOwn(tool.params, id) return typeof value === 'string' ? value : undefined }) - if (!found) return this.values.call('raw', [this.values.json(tool as unknown as Json)]) + if (!found) return this.values.call('raw', [this.values.json(toolJson(tool))]) const pinned = pinnedIds(found.builder) const nested: FieldContext = { tag: 't', from: block.key } const params: Property[] = Object.entries(tool.params) @@ -734,8 +745,7 @@ class WorkflowPrinter { } if (block.errorPort && !this.hasErrorEdge(block.key)) meta.push({ key: 'errorPort', value: yes }) - if (block.retry) - meta.push({ key: 'retry', value: this.values.json(block.retry as unknown as Json) }) + if (block.retry) meta.push({ key: 'retry', value: this.values.json({ ...block.retry }) }) if (Object.keys(extra.modes).length > 0) meta.push({ key: 'modes', value: this.modesExpr(extra.modes) }) if (extra.branches && extra.branches.length > 0) { diff --git a/scripts/check-api-validation-contracts.ts b/scripts/check-api-validation-contracts.ts index 0e83ba85201..cd2fc73c5ed 100644 --- a/scripts/check-api-validation-contracts.ts +++ b/scripts/check-api-validation-contracts.ts @@ -35,7 +35,7 @@ const BOUNDARY_POLICY_BASELINE = { clientHookLocalSchemaConstructors: 0, clientHookRawFetches: 0, clientSameOriginApiFetches: 0, - doubleCasts: 6, + doubleCasts: 5, rawJsonReads: 5, untypedResponses: 0, annotationsMissingReason: 0, From a618d7042d59c147e76f3413fc71c6baa990b864 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:20:39 -0800 Subject: [PATCH 090/428] fix(workflows): resolve the sdk-names script's directory from import.meta.url import.meta.dir is a Bun-only property the app's type-check does not know. Resolve the script's own directory with fileURLToPath(import.meta.url), as the other app scripts do. --- apps/sim/scripts/generate-sdk-names.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/apps/sim/scripts/generate-sdk-names.ts b/apps/sim/scripts/generate-sdk-names.ts index 4b15bfcf34a..1b167fa2048 100644 --- a/apps/sim/scripts/generate-sdk-names.ts +++ b/apps/sim/scripts/generate-sdk-names.ts @@ -21,7 +21,8 @@ * bun run apps/sim/scripts/generate-sdk-names.ts --check # fail on drift or collisions */ import { readFile, writeFile } from 'node:fs/promises' -import { resolve } from 'node:path' +import { dirname, resolve } from 'node:path' +import { fileURLToPath } from 'node:url' import { registrySdkNameSources } from '@/lib/workflows/code/catalog/registry-sources' import { extendSdkNames, @@ -29,8 +30,9 @@ import { validateSdkNames, } from '@/lib/workflows/code/catalog/sdk-names' -const NAMES_PATH = resolve(import.meta.dir, '../blocks/sdk-names.json') -const MODULE_PATH = resolve(import.meta.dir, '../blocks/sdk-names.generated.ts') +const SCRIPT_DIR = dirname(fileURLToPath(import.meta.url)) +const NAMES_PATH = resolve(SCRIPT_DIR, '../blocks/sdk-names.json') +const MODULE_PATH = resolve(SCRIPT_DIR, '../blocks/sdk-names.generated.ts') async function readNames(): Promise { const parsed = JSON.parse(await readFile(NAMES_PATH, 'utf8')) as Partial From d4da3c21ce54875a83cff5432ccb58389378ad14 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:21:41 -0800 Subject: [PATCH 091/428] fix(workflow-code): write stored canonicalModes keys with setOwn in the canonical index scopeCanonicalModesForTool and reindexCanonicalModesByPosition copied keys taken from stored canonicalModes with plain assignment, so a key named __proto__ set the prototype and was lost. They now write through setOwn, like every other write keyed by stored data. --- .../src/canonicalize/hostile.test.ts | 19 +++++++++++++++++++ .../src/catalog/canonical-index/index.ts | 7 ++++--- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/packages/workflow-code/src/canonicalize/hostile.test.ts b/packages/workflow-code/src/canonicalize/hostile.test.ts index d14cf75776a..bad92d095a1 100644 --- a/packages/workflow-code/src/canonicalize/hostile.test.ts +++ b/packages/workflow-code/src/canonicalize/hostile.test.ts @@ -1,5 +1,9 @@ import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' import { describe, expect, it } from 'vitest' +import { + reindexCanonicalModesByPosition, + scopeCanonicalModesForTool, +} from '../catalog/canonical-index' import { compileWorkflow } from '../compile' import { canonicalEquals } from '../equivalence' import { catalog } from '../print/__fixtures__/catalog' @@ -111,3 +115,18 @@ describe('canonicalize: prototype-named keys', () => { }) }) }) + +describe('stored canonicalModes keys named like prototype members', () => { + it('scopes a nested tool mode keyed __proto__ as data', () => { + const overrides = JSON.parse('{"0:__proto__":"advanced"}') + const scoped = scopeCanonicalModesForTool(overrides, 0) + expect(Object.getOwnPropertyDescriptor(scoped ?? {}, '__proto__')?.value).toBe('advanced') + }) + + it('carries a tool mode keyed __proto__ to its new position and keeps a legacy one', () => { + const overrides = JSON.parse('{"1:__proto__":"advanced","__proto__":"basic"}') + const moved = reindexCanonicalModesByPosition(new Map([[1, 0]]), overrides) + expect(Object.getOwnPropertyDescriptor(moved ?? {}, '0:__proto__')?.value).toBe('advanced') + expect(Object.getOwnPropertyDescriptor(moved ?? {}, '__proto__')?.value).toBe('basic') + }) +}) diff --git a/packages/workflow-code/src/catalog/canonical-index/index.ts b/packages/workflow-code/src/catalog/canonical-index/index.ts index 938e6b087c5..2d88e2d3b7a 100644 --- a/packages/workflow-code/src/catalog/canonical-index/index.ts +++ b/packages/workflow-code/src/catalog/canonical-index/index.ts @@ -7,6 +7,7 @@ * `SubBlockConfig` and a `CatalogSubBlock` both fit. */ +import { setOwn } from '../../records' import type { OpaqueMarker } from '../types' export type CanonicalMode = 'basic' | 'advanced' @@ -182,7 +183,7 @@ function extractPrefixedModes( for (const [key, value] of Object.entries(overrides)) { if (key.startsWith(prefix) && value) { scoped = scoped ?? {} - scoped[key.slice(prefix.length)] = value + setOwn(scoped, key.slice(prefix.length), value) } } return scoped @@ -232,7 +233,7 @@ export function reindexCanonicalModesByPosition( if (!mode) continue const match = INDEX_SCOPED_KEY.exec(key) if (!match) { - result[key] = mode + setOwn(result, key, mode) continue } const newIndex = newIndexByOldIndex.get(Number(match[1])) @@ -242,7 +243,7 @@ export function reindexCanonicalModesByPosition( continue } if (newIndex !== Number(match[1])) changed = true - result[`${newIndex}:${match[2]}`] = mode + setOwn(result, `${newIndex}:${match[2]}`, mode) } return changed ? result : undefined } From 6c264e0222ee4965e9aa11c37a76ae65500176f3 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:24:31 -0800 Subject: [PATCH 092/428] feat(workflows): define code_view_opened and workflow_source_applied as the analytics branch does Both events, and the WorkflowWriteSource they type source with, now match feat/analytics-code-first-events line for line and sit where it puts them, so its merge is trivial. The v2 apply route reports the analytics shape: source (cli or api), ok, and ops, the count of block, edge and variable changes. --- .../[workflowId]/source/route.test.ts | 2 +- .../v2/workflows/[workflowId]/source/route.ts | 43 +++++++++++++--- apps/sim/lib/posthog/events.ts | 50 ++++++++++++------- 3 files changed, 69 insertions(+), 26 deletions(-) diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts index 7094fde1277..2c86aa96853 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts @@ -295,7 +295,7 @@ describe('POST /api/v2/workflows/{workflowId}/source', () => { expect(posthogServerMockFns.mockCaptureServerEvent).toHaveBeenCalledWith( 'user-1', 'workflow_source_applied', - expect.objectContaining({ workflow_id: WORKFLOW_ID, blocks_modified: 1, client: 'cli' }), + { workflow_id: WORKFLOW_ID, workspace_id: WORKSPACE_ID, source: 'cli', ok: true, ops: 1 }, { groups: { workspace: WORKSPACE_ID } } ) }) diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts index 099e37f9ed2..00d08873c40 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts @@ -1,9 +1,10 @@ -import { isUserCredentialPrincipal } from '@sim/auth/principal' +import { isUserCredentialPrincipal, type Principal } from '@sim/auth/principal' import { v2ApplyWorkflowSourceContract, v2GetWorkflowSourceContract, } from '@/lib/api/contracts/v2/workflow-source' import { defineV2JsonRoute, v2ApiKeyAuth, v2RateLimits } from '@/lib/api/server/routes' +import type { WorkflowWriteSource } from '@/lib/posthog/events' import { captureServerEvent } from '@/lib/posthog/server' import { v2WorkflowErrorPolicies } from '@/lib/workflows/api' import { applyWorkflowSource } from '@/lib/workflows/application/apply-workflow-source' @@ -34,6 +35,17 @@ export const GET = defineV2JsonRoute({ present: (source) => ({ data: source }), }) +/** The user a source apply is attributed to in analytics, and the surface it came through. */ +function sourceActor( + principal: Principal, + client: string | undefined +): { userId: string; source: WorkflowWriteSource } | null { + if (isUserCredentialPrincipal(principal)) { + return { userId: principal.userId, source: client === 'cli' ? 'cli' : 'api' } + } + return null +} + /** * POST /api/v2/workflows/[workflowId]/source — writes TypeScript source to the draft in one * all-or-nothing write. Error diagnostics answer 400, a stale fingerprint 409, a locked workflow @@ -75,19 +87,34 @@ export const POST = defineV2JsonRoute({ needsRedeployment: result.needsRedeployment, }, }), - /** Telemetry only, for writes that changed the draft. */ + /** + * Telemetry only, for writes that changed the draft. A personal key or OAuth token counts as + * the user behind it (`cli` when the CLI submitted it). Workspace API keys are denied at + * admission, so no actorless write reaches here. + */ onSuccess: ({ principal, input, result }) => { - if (!result.applied || !isUserCredentialPrincipal(principal)) return + if (!result.applied) return + const actor = sourceActor(principal, input.provenance?.client) + if (!actor) return + const { blocks, edges, variables } = result.diff captureServerEvent( - principal.userId, + actor.userId, 'workflow_source_applied', { workflow_id: result.workflowId, workspace_id: result.workspaceId, - blocks_added: result.diff.blocks.added.length, - blocks_removed: result.diff.blocks.removed.length, - blocks_modified: result.diff.blocks.modified.length, - client: input.provenance?.client ?? 'api', + source: actor.source, + ok: true, + ops: + blocks.added.length + + blocks.removed.length + + blocks.renamed.length + + blocks.modified.length + + edges.added + + edges.removed + + variables.added.length + + variables.removed.length + + variables.modified.length, }, { groups: { workspace: result.workspaceId } } ) diff --git a/apps/sim/lib/posthog/events.ts b/apps/sim/lib/posthog/events.ts index fec32a0f707..57fc1d9382c 100644 --- a/apps/sim/lib/posthog/events.ts +++ b/apps/sim/lib/posthog/events.ts @@ -8,6 +8,22 @@ import type { AttributionProperties } from '@/lib/analytics/attribution' +/** + * Where a write to a workflow's graph came from. `canvas` is the web or desktop + * editor (its live edits are counted by the realtime server), `api` the HTTP + * APIs, `cli` the Sim CLI, `mcp` the Sim MCP server, `copilot` the in-app + * agent, and `import`, `duplicate` and `fork` the doors that copy a workflow in. + */ +export type WorkflowWriteSource = + | 'canvas' + | 'copilot' + | 'cli' + | 'api' + | 'mcp' + | 'import' + | 'duplicate' + | 'fork' + export interface PostHogEventMap { user_created: { auth_method: 'email' | 'oauth' | 'sso' @@ -183,16 +199,6 @@ export interface PostHogEventMap { workspace_id: string } - /** A committed workflow source apply that changed the draft; `client` is the self-reported submitter. */ - workflow_source_applied: { - workflow_id: string - workspace_id: string - blocks_added: number - blocks_removed: number - blocks_modified: number - client: string - } - workflow_restored: { workflow_id: string workspace_id: string @@ -781,13 +787,6 @@ export interface PostHogEventMap { } /** A workflow's edit-lock was toggled on or off. */ - /** The canvas Code tab was opened. */ - code_view_opened: { - workflow_id: string - workspace_id: string - entry: 'toolbar' | 'shortcut' | 'link' - } - workflow_lock_toggled: { workflow_id: string workspace_id?: string @@ -930,6 +929,23 @@ export interface PostHogEventMap { from_entity: 'user' | 'organization' to_entity: 'user' | 'organization' } + + /** Defined ahead of the code view; captured client-side when it ships. */ + code_view_opened: { + workflow_id: string + workspace_id: string + entry: 'toolbar' | 'shortcut' | 'link' + } + + /** Defined ahead of workflow source apply; captured when it ships. */ + workflow_source_applied: { + workflow_id: string + workspace_id: string + source: WorkflowWriteSource + ok: boolean + ops: number + error_kind?: string + } } export type PostHogEventName = keyof PostHogEventMap From 3e30efb00e9ec8ed24d53a4897516f94913aa9f8 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:24:42 -0800 Subject: [PATCH 093/428] feat(workflows): count Copilot-delegated source applies with source copilot The deploy route's personal-principal guard only narrows to a user id (workspace keys are denied at admission); it gives no reason to drop Copilot. A Copilot delegation reaching the v2 apply route now records workflow_source_applied as its subject user with source copilot, read from the principal rather than the self-reported provenance. --- .../workflows/[workflowId]/source/route.test.ts | 17 +++++++++++++++++ .../v2/workflows/[workflowId]/source/route.ts | 8 ++++++-- 2 files changed, 23 insertions(+), 2 deletions(-) diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts index 2c86aa96853..2503a7b9742 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts @@ -5,6 +5,7 @@ import { v2RateLimiterModuleMock, v2RouteMocks, } from '@sim/testing' +import { createDelegatedPrincipal } from '@sim/testing/factories/principal.factory' import { posthogServerMock, posthogServerMockFns } from '@sim/testing/mocks/posthog-server.mock' import { NextRequest } from 'next/server' import { beforeEach, describe, expect, it, vi } from 'vitest' @@ -299,4 +300,20 @@ describe('POST /api/v2/workflows/{workflowId}/source', () => { { groups: { workspace: WORKSPACE_ID } } ) }) + + it('records a Copilot-delegated apply as its subject user with source copilot', async () => { + v2RouteMocks.authenticate.mockResolvedValue({ + ...auth, + principal: createDelegatedPrincipal({ subjectUserId: 'user-9', workspaceId: WORKSPACE_ID }), + }) + + await POST(applyRequest({ ...applyBody, provenance: { client: 'cli' } }), context) + + expect(posthogServerMockFns.mockCaptureServerEvent).toHaveBeenCalledWith( + 'user-9', + 'workflow_source_applied', + { workflow_id: WORKFLOW_ID, workspace_id: WORKSPACE_ID, source: 'copilot', ok: true, ops: 1 }, + { groups: { workspace: WORKSPACE_ID } } + ) + }) }) diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts index 00d08873c40..1540d069aa1 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts @@ -43,6 +43,9 @@ function sourceActor( if (isUserCredentialPrincipal(principal)) { return { userId: principal.userId, source: client === 'cli' ? 'cli' : 'api' } } + if (principal.kind === 'delegated' && principal.serviceId === 'copilot') { + return { userId: principal.subjectUserId, source: 'copilot' } + } return null } @@ -89,8 +92,9 @@ export const POST = defineV2JsonRoute({ }), /** * Telemetry only, for writes that changed the draft. A personal key or OAuth token counts as - * the user behind it (`cli` when the CLI submitted it). Workspace API keys are denied at - * admission, so no actorless write reaches here. + * the user behind it (`cli` when the CLI submitted it), and a Copilot delegation as its subject + * user with `source: 'copilot'`. Workspace API keys are denied at admission, so no actorless + * write reaches here. */ onSuccess: ({ principal, input, result }) => { if (!result.applied) return From 3bd4ec8b71eb67a71624a582a56a5f6a1c29f307 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:25:16 -0800 Subject: [PATCH 094/428] chore(workflow-sdk): regenerate CORE_DTS for the meta.key BlockMeta field 3C's bundled core.d.ts text predated 3E's meta.key, so core-text.test failed after the merge. --- packages/workflow-sdk/src/codegen/core-text.generated.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/workflow-sdk/src/codegen/core-text.generated.ts b/packages/workflow-sdk/src/codegen/core-text.generated.ts index 8aac8d71191..c2e1016ebe5 100644 --- a/packages/workflow-sdk/src/codegen/core-text.generated.ts +++ b/packages/workflow-sdk/src/codegen/core-text.generated.ts @@ -1,4 +1,4 @@ // Generated by scripts/generate-core-text.ts from src/core.d.ts; do not edit. /** The text of `core.d.ts`, the workflow SDK authoring declarations. */ -export const CORE_DTS = "/**\n * The authoring surface for Sim workflows written as TypeScript (s2 §2).\n *\n * Nothing declared here runs. `@sim/workflow-code` compiles a workflow file statically, and every\n * runtime export of this package throws `SimSdkNotExecutable`. These declarations exist so an\n * editor, `tsgo --noEmit` or an agent can check a workflow file before the compiler sees it.\n *\n * Block builders (`slack.sendMessage`, `agent`, `trigger.gmail.poller`, ...) are not declared here:\n * they are generated from the block catalog into `blocks/{type}.d.ts`, which augment this module.\n * The generic `block(type, name, params)` covers any stored type without a builder.\n */\n\n/** Plain JSON. */\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json }\n\ndeclare const REF: unique symbol\ndeclare const TEMPLATE: unique symbol\ndeclare const ENV: unique symbol\ndeclare const RESOURCE: unique symbol\ndeclare const TOOL: unique symbol\ndeclare const NODE: unique symbol\ndeclare const FILE_BODY: unique symbol\ndeclare const RAW: unique symbol\n\n/** Any reference, whatever it points at. */\nexport interface AnyRef {\n readonly [REF]: unknown\n}\n\ntype RefPaths = [Json] extends [T]\n ? { readonly [key: string]: Ref }\n : T extends readonly (infer E)[]\n ? { readonly [index: number]: Ref; readonly length: Ref }\n : T extends object\n ? { readonly [K in keyof T]-?: Ref }\n : unknown\n\n/**\n * A typed reference to a block output, compiled to `` (build-spec decision 8).\n * Paths map exactly: `.seg`, `['seg']` and `[n]`. Untyped JSON allows any path.\n */\nexport type Ref = { readonly [REF]: T } & RefPaths\n\n/** Text with references in it, written with one of the tags below. */\nexport type Template = string & { readonly [TEMPLATE]: true }\n\n/** A workspace environment variable, compiled to `{{NAME}}`. */\nexport interface EnvRef {\n readonly [ENV]: string\n}\n\n/** A param value: a literal, a reference, a template or an environment variable. */\nexport type Value = T | AnyRef | Template | EnvRef\n\n/** JSON whose leaves may be references, templates or environment variables. */\nexport type JsonWithRefs =\n | null\n | boolean\n | number\n | string\n | AnyRef\n | Template\n | EnvRef\n | JsonWithRefs[]\n | { [key: string]: JsonWithRefs }\n\n/** A literal union that still accepts any other string (option ids read from values). */\nexport type LiteralUnion = T | (string & {})\n\n/** A `time-input` value, `HH:MM`. */\nexport type TimeString = `${number}:${number}`\n\ntype Interpolation = AnyRef | EnvRef | VarRef | string | number | boolean\n\n/** Text with interpolated references: `` t`New ${cls.category} ticket` ``. */\nexport declare function t(strings: TemplateStringsArray, ...values: Interpolation[]): Template\n/** JavaScript code (condition expressions, inline function code). */\nexport declare const js: typeof t\n/** Python code. */\nexport declare const py: typeof t\n/** Shell code. */\nexport declare const sh: typeof t\n/** JSON text kept verbatim, for bodies an object literal cannot reproduce byte for byte. */\nexport declare const json: typeof t\n/** Markdown text (note content). */\nexport declare const md: typeof t\n\n/** A reference with a non-canonical spelling, such as `ref('Classify.content')`. */\nexport declare function ref(path: string): Ref\n\n/** A stored value outside the generated type (a legacy option id, say), kept verbatim. */\nexport declare function raw(value: unknown): T & { readonly [RAW]: true }\n\n/** A required value that is still missing; compiles to absent, so canvas drafts type-check. */\nexport declare function todo(): never\n\n/** Function code kept in a file next to the workflow (`.js`, `.py` or `.sh`), stored verbatim. */\nexport interface FileBody {\n readonly [FILE_BODY]: string\n}\nexport declare function file(path: `./${string}`): FileBody\n\n/**\n * Environment variable names known to the workspace. `workspace.d.ts` adds one member per name;\n * until it exists `env` accepts any name.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceEnv {}\n\nexport declare const env: keyof WorkspaceEnv extends never\n ? { readonly [name: string]: EnvRef }\n : { readonly [K in keyof WorkspaceEnv]: EnvRef }\n\n/**\n * Workspace resources by stable key, filled in by the generated `workspace.d.ts`. Each map's\n * values describe the resource: a table's row type, a binding's service, a workflow's inputs.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceTables {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceKnowledgeBases {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceBindings {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceWorkflows {}\n\ntype KeyOf = keyof M extends never ? string : Extract\n\nexport type TableKey = KeyOf\nexport type KnowledgeBaseKey = KeyOf\nexport type BindingKey = KeyOf\nexport type WorkflowKey = KeyOf\n\n/** A workspace resource by stable key, compiled to the resource's internal id. */\nexport interface ResourceRef {\n readonly [RESOURCE]: Kind\n readonly key: Key\n}\n\n/** A credential binding: `binding('support-slack')`. */\nexport type Binding = ResourceRef<'credential', Key>\nexport declare function binding(key: K): Binding\n\n/** The columns of a workspace table, or loose JSON when `workspace.d.ts` does not know it. */\nexport type TableColumns = K extends keyof WorkspaceTables\n ? WorkspaceTables[K]\n : { [column: string]: Json }\n/** One stored row: its columns plus the row id. */\nexport type TableRow = TableColumns & { id: string }\n/** Column values written to a row. */\nexport type TableData = K extends keyof WorkspaceTables\n ? { [C in keyof WorkspaceTables[K]]?: Value | JsonWithRefs }\n : { [column: string]: JsonWithRefs }\n\n/** A workspace table: `table('leads')`. Table block operations live on `table.*`. */\nexport type TableRef = ResourceRef<'table', Key>\nexport declare function table(key: K): TableRef\n\n/** A knowledge base: `kb('docs')`. */\nexport type KnowledgeBaseRef = ResourceRef<'knowledge-base', Key>\nexport declare function kb(key: K): KnowledgeBaseRef\n\n/** A workspace skill: `skill('triage')`. */\nexport type SkillRef = ResourceRef<'skill'>\nexport declare function skill(key: string): SkillRef\n\n/** A sandbox image: `sandbox('node-ml')`. */\nexport type SandboxRef = ResourceRef<'sandbox'>\nexport declare function sandbox(key: string): SandboxRef\n\n/** A workspace folder: `folder('reports')`. */\nexport type FolderRef = ResourceRef<'file-folder'>\nexport declare function folder(key: string): FolderRef\n\n/** A workspace file upload: `upload('contracts/acme.pdf')`. */\nexport type Upload = ResourceRef<'file'>\nexport declare function upload(path: string): Upload\n\n/** An opaque provider id chosen in a remote selector: `picked('C0123')`. */\nexport interface Picked {\n readonly [RESOURCE]: 'picked'\n readonly id: string\n}\nexport declare function picked(id: string): Picked\n\n/** A file produced at run time (`file` / `file[]` outputs). */\nexport interface SimFile {\n id: string\n name: string\n url: string\n size: number\n type: string\n key: string\n}\n\n// Agent tools\n\n/** One entry of an agent's `tools` list. */\nexport interface Tool {\n readonly [TOOL]: true\n}\n\n/** How the model may use a tool. */\nexport interface ToolOpts {\n usageControl?: 'auto' | 'force' | 'none'\n usageControlExpression?: string\n title?: string\n}\n\n/** A custom tool by key: `customTool('lookup-order')`. */\nexport declare function customTool(key: string, options?: ToolOpts): Tool\nexport declare namespace customTool {\n /** A custom tool snapshot that has drifted from the workspace tool. */\n function inline(definition: { schema: Json; code: string | Template; title?: string }): Tool\n}\n\n/** An MCP server by key; `mcp('linear').tool('create_issue')`. */\nexport interface McpServerRef extends ResourceRef<'mcp-server'> {\n tool(name: string, options?: ToolOpts & { args?: Record }): Tool\n}\nexport declare function mcp(key: string): McpServerRef\n\n// Graph\n\n/** Block-level fields (`BlockState`), written as the third builder argument. */\nexport interface BlockMeta {\n /** Stored as `enabled: false`. */\n disabled?: true\n /** Protected: apply refuses any change to this block. */\n locked?: true\n /** Exposes the error port without an `onError` edge. */\n errorPort?: boolean\n /** The block-level advanced toggle (`advancedMode`). */\n advancedMode?: boolean\n retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number }\n /** Pair modes that cannot be derived from the value written. */\n modes?: Record\n /** Stale values under hidden conditions, kept verbatim. */\n inactive?: Record\n}\n\n/** Anything an edge can point at. */\nexport type Target = Node | Group\n\n/** A block or container in the graph. */\nexport interface Node {\n readonly [NODE]: true\n /** Wires this node's default port to each target. Returns the target, or a group of them. */\n to(...targets: T): T extends [infer One] ? One : Group\n /** Wires this node's error port to each target. */\n onError(...targets: Target[]): void\n}\n\n/** Several nodes; `.to()` wires every member (fan-in). */\nexport interface Group {\n to(...targets: Target[]): Group\n}\n\n/** A block: a node whose outputs can be referenced. */\nexport type Block = Node & Ref\n\n/** The named ports of a condition or router. */\nexport type Branches = { readonly [P in K]: Node }\n\n/** Trigger builders (`trigger.start`, `trigger.gmail.poller`, ...), generated from the catalog. */\nexport declare namespace trigger {}\n\n/** Builders for hidden legacy block versions (`legacy.slack.send`), generated from the catalog. */\nexport declare namespace legacy {}\n\n/** A raw edge from a handle the SDK has no name for (a legacy or unknown port). */\nexport declare function edge(from: Node, handle: string, to: Target): void\n\n/** Any stored block type without a builder (legacy, unknown or custom), with untyped outputs. */\nexport declare function block(\n type: string,\n name: string,\n params: Record,\n meta?: BlockMeta\n): Block\n\n// Workflow and variables\n\nexport type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'plain'\n\nexport interface VariableDeclaration {\n type: VariableType\n value?: Json\n}\n\nexport type VariableDeclarations = Record\n\ndeclare const VAR: unique symbol\n\n/** A workflow variable, compiled to ``. */\nexport interface VarRef {\n readonly [VAR]: string\n}\n\ntype VariableValue = T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'string' | 'plain'\n ? string\n : Json\n\nexport type VarRefs = {\n readonly [K in keyof V]: VarRef & Ref>\n}\n\n/**\n * Workflow variables by name, untyped. Prefer the `vars` the `workflow()` body receives, which is\n * typed from the declared variables.\n */\nexport declare const vars: { readonly [name: string]: VarRef & Ref }\n\ndeclare const WORKFLOW_DEF: unique symbol\n\n/** The default export of a workflow file. */\nexport interface WorkflowDef {\n readonly [WORKFLOW_DEF]: true\n}\n\n/** A child workflow by key, for `runWorkflow` or as an agent tool. */\nexport interface WorkflowRef extends ResourceRef<'workflow', Key> {\n asTool(options?: ToolOpts): Tool\n}\n\n/** Declares a workflow. The body wires blocks; it never runs. */\nexport declare function workflow>(\n name: string,\n options: { description?: string; variables?: V },\n body: (scope: { vars: VarRefs }) => void\n): WorkflowDef\n/** A child workflow by key: `workflow('enrich-lead')`. */\nexport declare function workflow(key: K): WorkflowRef\n\n// Containers\n\ntype ItemOf = C extends { readonly [REF]: readonly (infer E)[] }\n ? E\n : C extends readonly (infer E)[]\n ? E\n : Json\n\n/** Inside a loop or parallel body. */\nexport interface SubflowScope {\n /** The container's start port, into its first child. */\n readonly start: Node\n readonly index: Ref\n readonly currentItem: Ref\n readonly items: Ref\n}\n\nexport interface SubflowOutput {\n results: Json[]\n}\n\n/** A loop or parallel container. Its `.to()` wires the port taken after it finishes. */\nexport type Container = Block\n\ntype Collection = AnyRef | Template | Json[] | string\n\nexport declare const loop: {\n for(\n name: string,\n params: { count: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n forEach(\n name: string,\n params: { collection: C },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n while(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n doWhile(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n}\n\nexport declare const parallel: {\n count(\n name: string,\n params: { count: number; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n collection(\n name: string,\n params: { collection: C; batchSize?: number },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n}\n\n// Blocks with a source form of their own\n\n/**\n * Params and outputs of the blocks below, generated from the catalog. Each entry is\n * `{ params; output }`; without generated types the params are loose.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface SpecialBuilderTypes {}\n\ntype SpecialParams = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { params: infer P }\n ? P\n : never\n : Record\n\ntype SpecialOutput = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { output: infer O }\n ? O\n : never\n : Json\n\n/** A condition expression, or `true` for the `else` branch. */\nexport type BranchExpression = Template | string | true\n\n/**\n * Keys of a condition written with no rows (`condition('Name', {})`, the source form of rows\n * that were never persisted): the implicit `if` and `else` ports stay addressable.\n */\ntype ConditionKeys = keyof B extends never ? 'if' | 'else' : Extract\ntype RouterKeys = keyof R extends never ? 'route0' : Extract\n\n/** A condition: named branches, the last one `else` when there are two or more. */\nexport declare function condition>(\n name: string,\n branches: B,\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A router: named routes described for the model. */\nexport declare function router>(\n name: string,\n params: SpecialParams<'router'> & { routes: R },\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A function block. `code` is inline (`` js`...` ``) or a file (`file('./functions/x.js')`). */\nexport declare function fn(\n name: string,\n params: SpecialParams<'fn'> & { code: Template | FileBody | string },\n meta?: BlockMeta\n): Block>\n\n/** Runs a child workflow. */\nexport declare function runWorkflow(\n name: string,\n params: SpecialParams<'runWorkflow'>,\n meta?: BlockMeta\n): Block>\n\n/** Pauses for a person; the form in `inputFormat` types `submission`. */\nexport declare function human>(\n name: string,\n params: SpecialParams<'human'> & { inputFormat?: F },\n meta?: BlockMeta\n): Block, 'submission'> & { submission: InputFieldsOutput }>\n\n/** Ends the workflow with an API response. */\nexport declare function response(\n name: string,\n params: SpecialParams<'response'>,\n meta?: BlockMeta\n): Block>\n\n/** Assigns workflow variables. */\nexport declare function setVariables(\n name: string,\n params: SpecialParams<'setVariables'>,\n meta?: BlockMeta\n): Block>\n\ndeclare const ANNOTATION: unique symbol\n\n/** A canvas note: no edges, no outputs. */\nexport interface Annotation {\n readonly [ANNOTATION]: true\n}\nexport declare function note(\n name: string,\n params: SpecialParams<'note'>,\n meta?: BlockMeta\n): Annotation\n\n// Structured param shapes\n\n/** Type names an input-format field may declare. */\nexport type InputFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'file[]'\n\n/** A structured input field: its type plus a default value, description or required flag. */\nexport interface InputFieldSpec {\n type: InputFieldType\n value?: JsonWithRefs\n description?: string\n required?: boolean\n}\n\n/** `input-format` fields by name: `{ subject: 'string', amount: { type: 'number', value: 0 } }`. */\nexport type InputFields = Record\n\ntype InputFieldValue = T extends 'string'\n ? string\n : T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'array'\n ? Json[]\n : T extends 'file[]'\n ? SimFile[]\n : Json\n\n/** The outputs an `input-format` declares. */\nexport type InputFieldsOutput = {\n [K in keyof F]: F[K] extends { type: infer T } ? InputFieldValue : InputFieldValue\n}\n\n/** `response-format` fields: `{ ok: true, id: { type: 'string', value: row.id } }`. */\nexport type ResponseFields = Record\n\n/** An agent message. */\nexport interface Message {\n role: 'system' | 'user' | 'assistant'\n content: Value\n}\n\n/** One `variables-input` assignment. */\nexport interface VariableAssignment {\n variable: VarRef\n value: JsonWithRefs\n}\n\n/** Child workflow inputs by name (`input-mapping`, `workflow-input-mapper`). */\nexport type InputMapping = Record\n\n/** A table filter by column: `{ status: { $eq: 'new' } }`. */\nexport type Filter = Record\n\n/** A table sort by column: `{ createdAt: 'desc' }`. */\nexport type Sort =\n | Record\n | Array<{ column: string; direction: 'asc' | 'desc' }>\n\n/** One knowledge tag filter. */\nexport interface TagFilter {\n tagName: string\n tagValue: Value\n [key: string]: JsonWithRefs\n}\n\n/** One document tag. */\nexport interface DocumentTag {\n tagName: string\n value: Value\n [key: string]: JsonWithRefs\n}\n\n/** One `eval-input` metric. */\nexport interface EvalMetric {\n name: string\n description?: string\n range?: { min: number; max: number }\n [key: string]: JsonWithRefs | undefined\n}\n\n/** One `model-fallback-list` entry. */\nexport interface ModelFallback {\n model: LiteralUnion\n [key: string]: JsonWithRefs\n}\n\n/**\n * Model ids, generated into `models.d.ts` (which adds one member per model). Kept apart from the\n * block files so a model-list change touches one file.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface ModelIds {}\nexport type Model = Extract\n\n/** A JSON Schema `responseFormat`, or `{ name, strict, schema }` around one. */\nexport type ResponseFormat = JsonWithRefs\n\ntype Depth = [never, 0, 1, 2, 3, 4]\n\ntype FromSchema = [D] extends [never]\n ? Json\n : S extends { enum: readonly (infer E)[] }\n ? E\n : S extends { type: 'object'; properties: infer P }\n ? { [K in keyof P]: FromSchema }\n : S extends { type: 'array'; items: infer I }\n ? FromSchema[]\n : S extends { type: 'string' }\n ? string\n : S extends { type: 'number' | 'integer' }\n ? number\n : S extends { type: 'boolean' }\n ? boolean\n : Json\n\n/**\n * The outputs a literal `responseFormat` adds, read from its JSON Schema with recursion capped at\n * depth 4. A template or reference adds untyped JSON.\n */\nexport type ResponseFormatOutput = [RF] extends [undefined]\n ? unknown\n : RF extends { schema: infer S }\n ? FromSchema\n : RF extends { type: 'object'; properties: object }\n ? FromSchema\n : { [key: string]: Json }\n" +export const CORE_DTS = "/**\n * The authoring surface for Sim workflows written as TypeScript (s2 §2).\n *\n * Nothing declared here runs. `@sim/workflow-code` compiles a workflow file statically, and every\n * runtime export of this package throws `SimSdkNotExecutable`. These declarations exist so an\n * editor, `tsgo --noEmit` or an agent can check a workflow file before the compiler sees it.\n *\n * Block builders (`slack.sendMessage`, `agent`, `trigger.gmail.poller`, ...) are not declared here:\n * they are generated from the block catalog into `blocks/{type}.d.ts`, which augment this module.\n * The generic `block(type, name, params)` covers any stored type without a builder.\n */\n\n/** Plain JSON. */\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json }\n\ndeclare const REF: unique symbol\ndeclare const TEMPLATE: unique symbol\ndeclare const ENV: unique symbol\ndeclare const RESOURCE: unique symbol\ndeclare const TOOL: unique symbol\ndeclare const NODE: unique symbol\ndeclare const FILE_BODY: unique symbol\ndeclare const RAW: unique symbol\n\n/** Any reference, whatever it points at. */\nexport interface AnyRef {\n readonly [REF]: unknown\n}\n\ntype RefPaths = [Json] extends [T]\n ? { readonly [key: string]: Ref }\n : T extends readonly (infer E)[]\n ? { readonly [index: number]: Ref; readonly length: Ref }\n : T extends object\n ? { readonly [K in keyof T]-?: Ref }\n : unknown\n\n/**\n * A typed reference to a block output, compiled to `` (build-spec decision 8).\n * Paths map exactly: `.seg`, `['seg']` and `[n]`. Untyped JSON allows any path.\n */\nexport type Ref = { readonly [REF]: T } & RefPaths\n\n/** Text with references in it, written with one of the tags below. */\nexport type Template = string & { readonly [TEMPLATE]: true }\n\n/** A workspace environment variable, compiled to `{{NAME}}`. */\nexport interface EnvRef {\n readonly [ENV]: string\n}\n\n/** A param value: a literal, a reference, a template or an environment variable. */\nexport type Value = T | AnyRef | Template | EnvRef\n\n/** JSON whose leaves may be references, templates or environment variables. */\nexport type JsonWithRefs =\n | null\n | boolean\n | number\n | string\n | AnyRef\n | Template\n | EnvRef\n | JsonWithRefs[]\n | { [key: string]: JsonWithRefs }\n\n/** A literal union that still accepts any other string (option ids read from values). */\nexport type LiteralUnion = T | (string & {})\n\n/** A `time-input` value, `HH:MM`. */\nexport type TimeString = `${number}:${number}`\n\ntype Interpolation = AnyRef | EnvRef | VarRef | string | number | boolean\n\n/** Text with interpolated references: `` t`New ${cls.category} ticket` ``. */\nexport declare function t(strings: TemplateStringsArray, ...values: Interpolation[]): Template\n/** JavaScript code (condition expressions, inline function code). */\nexport declare const js: typeof t\n/** Python code. */\nexport declare const py: typeof t\n/** Shell code. */\nexport declare const sh: typeof t\n/** JSON text kept verbatim, for bodies an object literal cannot reproduce byte for byte. */\nexport declare const json: typeof t\n/** Markdown text (note content). */\nexport declare const md: typeof t\n\n/** A reference with a non-canonical spelling, such as `ref('Classify.content')`. */\nexport declare function ref(path: string): Ref\n\n/** A stored value outside the generated type (a legacy option id, say), kept verbatim. */\nexport declare function raw(value: unknown): T & { readonly [RAW]: true }\n\n/** A required value that is still missing; compiles to absent, so canvas drafts type-check. */\nexport declare function todo(): never\n\n/** Function code kept in a file next to the workflow (`.js`, `.py` or `.sh`), stored verbatim. */\nexport interface FileBody {\n readonly [FILE_BODY]: string\n}\nexport declare function file(path: `./${string}`): FileBody\n\n/**\n * Environment variable names known to the workspace. `workspace.d.ts` adds one member per name;\n * until it exists `env` accepts any name.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceEnv {}\n\nexport declare const env: keyof WorkspaceEnv extends never\n ? { readonly [name: string]: EnvRef }\n : { readonly [K in keyof WorkspaceEnv]: EnvRef }\n\n/**\n * Workspace resources by stable key, filled in by the generated `workspace.d.ts`. Each map's\n * values describe the resource: a table's row type, a binding's service, a workflow's inputs.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceTables {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceKnowledgeBases {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceBindings {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceWorkflows {}\n\ntype KeyOf = keyof M extends never ? string : Extract\n\nexport type TableKey = KeyOf\nexport type KnowledgeBaseKey = KeyOf\nexport type BindingKey = KeyOf\nexport type WorkflowKey = KeyOf\n\n/** A workspace resource by stable key, compiled to the resource's internal id. */\nexport interface ResourceRef {\n readonly [RESOURCE]: Kind\n readonly key: Key\n}\n\n/** A credential binding: `binding('support-slack')`. */\nexport type Binding = ResourceRef<'credential', Key>\nexport declare function binding(key: K): Binding\n\n/** The columns of a workspace table, or loose JSON when `workspace.d.ts` does not know it. */\nexport type TableColumns = K extends keyof WorkspaceTables\n ? WorkspaceTables[K]\n : { [column: string]: Json }\n/** One stored row: its columns plus the row id. */\nexport type TableRow = TableColumns & { id: string }\n/** Column values written to a row. */\nexport type TableData = K extends keyof WorkspaceTables\n ? { [C in keyof WorkspaceTables[K]]?: Value | JsonWithRefs }\n : { [column: string]: JsonWithRefs }\n\n/** A workspace table: `table('leads')`. Table block operations live on `table.*`. */\nexport type TableRef = ResourceRef<'table', Key>\nexport declare function table(key: K): TableRef\n\n/** A knowledge base: `kb('docs')`. */\nexport type KnowledgeBaseRef = ResourceRef<'knowledge-base', Key>\nexport declare function kb(key: K): KnowledgeBaseRef\n\n/** A workspace skill: `skill('triage')`. */\nexport type SkillRef = ResourceRef<'skill'>\nexport declare function skill(key: string): SkillRef\n\n/** A sandbox image: `sandbox('node-ml')`. */\nexport type SandboxRef = ResourceRef<'sandbox'>\nexport declare function sandbox(key: string): SandboxRef\n\n/** A workspace folder: `folder('reports')`. */\nexport type FolderRef = ResourceRef<'file-folder'>\nexport declare function folder(key: string): FolderRef\n\n/** A workspace file upload: `upload('contracts/acme.pdf')`. */\nexport type Upload = ResourceRef<'file'>\nexport declare function upload(path: string): Upload\n\n/** An opaque provider id chosen in a remote selector: `picked('C0123')`. */\nexport interface Picked {\n readonly [RESOURCE]: 'picked'\n readonly id: string\n}\nexport declare function picked(id: string): Picked\n\n/** A file produced at run time (`file` / `file[]` outputs). */\nexport interface SimFile {\n id: string\n name: string\n url: string\n size: number\n type: string\n key: string\n}\n\n// Agent tools\n\n/** One entry of an agent's `tools` list. */\nexport interface Tool {\n readonly [TOOL]: true\n}\n\n/** How the model may use a tool. */\nexport interface ToolOpts {\n usageControl?: 'auto' | 'force' | 'none'\n usageControlExpression?: string\n title?: string\n}\n\n/** A custom tool by key: `customTool('lookup-order')`. */\nexport declare function customTool(key: string, options?: ToolOpts): Tool\nexport declare namespace customTool {\n /** A custom tool snapshot that has drifted from the workspace tool. */\n function inline(definition: { schema: Json; code: string | Template; title?: string }): Tool\n}\n\n/** An MCP server by key; `mcp('linear').tool('create_issue')`. */\nexport interface McpServerRef extends ResourceRef<'mcp-server'> {\n tool(name: string, options?: ToolOpts & { args?: Record }): Tool\n}\nexport declare function mcp(key: string): McpServerRef\n\n// Graph\n\n/** Block-level fields (`BlockState`), written as the third builder argument. */\nexport interface BlockMeta {\n /**\n * A legacy key the display name cannot carry (a `name~n` collision key or a reserved name such\n * as `Loop`). Printed only for such a stored block; apply accepts it only for a key the stored\n * workflow already has, so it can never introduce one.\n */\n key?: string\n /** Stored as `enabled: false`. */\n disabled?: true\n /** Protected: apply refuses any change to this block. */\n locked?: true\n /** Exposes the error port without an `onError` edge. */\n errorPort?: boolean\n /** The block-level advanced toggle (`advancedMode`). */\n advancedMode?: boolean\n retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number }\n /** Pair modes that cannot be derived from the value written. */\n modes?: Record\n /** Stale values under hidden conditions, kept verbatim. */\n inactive?: Record\n}\n\n/** Anything an edge can point at. */\nexport type Target = Node | Group\n\n/** A block or container in the graph. */\nexport interface Node {\n readonly [NODE]: true\n /** Wires this node's default port to each target. Returns the target, or a group of them. */\n to(...targets: T): T extends [infer One] ? One : Group\n /** Wires this node's error port to each target. */\n onError(...targets: Target[]): void\n}\n\n/** Several nodes; `.to()` wires every member (fan-in). */\nexport interface Group {\n to(...targets: Target[]): Group\n}\n\n/** A block: a node whose outputs can be referenced. */\nexport type Block = Node & Ref\n\n/** The named ports of a condition or router. */\nexport type Branches = { readonly [P in K]: Node }\n\n/** Trigger builders (`trigger.start`, `trigger.gmail.poller`, ...), generated from the catalog. */\nexport declare namespace trigger {}\n\n/** Builders for hidden legacy block versions (`legacy.slack.send`), generated from the catalog. */\nexport declare namespace legacy {}\n\n/** A raw edge from a handle the SDK has no name for (a legacy or unknown port). */\nexport declare function edge(from: Node, handle: string, to: Target): void\n\n/** Any stored block type without a builder (legacy, unknown or custom), with untyped outputs. */\nexport declare function block(\n type: string,\n name: string,\n params: Record,\n meta?: BlockMeta\n): Block\n\n// Workflow and variables\n\nexport type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'plain'\n\nexport interface VariableDeclaration {\n type: VariableType\n value?: Json\n}\n\nexport type VariableDeclarations = Record\n\ndeclare const VAR: unique symbol\n\n/** A workflow variable, compiled to ``. */\nexport interface VarRef {\n readonly [VAR]: string\n}\n\ntype VariableValue = T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'string' | 'plain'\n ? string\n : Json\n\nexport type VarRefs = {\n readonly [K in keyof V]: VarRef & Ref>\n}\n\n/**\n * Workflow variables by name, untyped. Prefer the `vars` the `workflow()` body receives, which is\n * typed from the declared variables.\n */\nexport declare const vars: { readonly [name: string]: VarRef & Ref }\n\ndeclare const WORKFLOW_DEF: unique symbol\n\n/** The default export of a workflow file. */\nexport interface WorkflowDef {\n readonly [WORKFLOW_DEF]: true\n}\n\n/** A child workflow by key, for `runWorkflow` or as an agent tool. */\nexport interface WorkflowRef extends ResourceRef<'workflow', Key> {\n asTool(options?: ToolOpts): Tool\n}\n\n/** Declares a workflow. The body wires blocks; it never runs. */\nexport declare function workflow>(\n name: string,\n options: { description?: string; variables?: V },\n body: (scope: { vars: VarRefs }) => void\n): WorkflowDef\n/** A child workflow by key: `workflow('enrich-lead')`. */\nexport declare function workflow(key: K): WorkflowRef\n\n// Containers\n\ntype ItemOf = C extends { readonly [REF]: readonly (infer E)[] }\n ? E\n : C extends readonly (infer E)[]\n ? E\n : Json\n\n/** Inside a loop or parallel body. */\nexport interface SubflowScope {\n /** The container's start port, into its first child. */\n readonly start: Node\n readonly index: Ref\n readonly currentItem: Ref\n readonly items: Ref\n}\n\nexport interface SubflowOutput {\n results: Json[]\n}\n\n/** A loop or parallel container. Its `.to()` wires the port taken after it finishes. */\nexport type Container = Block\n\ntype Collection = AnyRef | Template | Json[] | string\n\nexport declare const loop: {\n for(\n name: string,\n params: { count: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n forEach(\n name: string,\n params: { collection: C },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n while(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n doWhile(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n}\n\nexport declare const parallel: {\n count(\n name: string,\n params: { count: number; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n collection(\n name: string,\n params: { collection: C; batchSize?: number },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n}\n\n// Blocks with a source form of their own\n\n/**\n * Params and outputs of the blocks below, generated from the catalog. Each entry is\n * `{ params; output }`; without generated types the params are loose.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface SpecialBuilderTypes {}\n\ntype SpecialParams = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { params: infer P }\n ? P\n : never\n : Record\n\ntype SpecialOutput = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { output: infer O }\n ? O\n : never\n : Json\n\n/** A condition expression, or `true` for the `else` branch. */\nexport type BranchExpression = Template | string | true\n\n/**\n * Keys of a condition written with no rows (`condition('Name', {})`, the source form of rows\n * that were never persisted): the implicit `if` and `else` ports stay addressable.\n */\ntype ConditionKeys = keyof B extends never ? 'if' | 'else' : Extract\ntype RouterKeys = keyof R extends never ? 'route0' : Extract\n\n/** A condition: named branches, the last one `else` when there are two or more. */\nexport declare function condition>(\n name: string,\n branches: B,\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A router: named routes described for the model. */\nexport declare function router>(\n name: string,\n params: SpecialParams<'router'> & { routes: R },\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A function block. `code` is inline (`` js`...` ``) or a file (`file('./functions/x.js')`). */\nexport declare function fn(\n name: string,\n params: SpecialParams<'fn'> & { code: Template | FileBody | string },\n meta?: BlockMeta\n): Block>\n\n/** Runs a child workflow. */\nexport declare function runWorkflow(\n name: string,\n params: SpecialParams<'runWorkflow'>,\n meta?: BlockMeta\n): Block>\n\n/** Pauses for a person; the form in `inputFormat` types `submission`. */\nexport declare function human>(\n name: string,\n params: SpecialParams<'human'> & { inputFormat?: F },\n meta?: BlockMeta\n): Block, 'submission'> & { submission: InputFieldsOutput }>\n\n/** Ends the workflow with an API response. */\nexport declare function response(\n name: string,\n params: SpecialParams<'response'>,\n meta?: BlockMeta\n): Block>\n\n/** Assigns workflow variables. */\nexport declare function setVariables(\n name: string,\n params: SpecialParams<'setVariables'>,\n meta?: BlockMeta\n): Block>\n\ndeclare const ANNOTATION: unique symbol\n\n/** A canvas note: no edges, no outputs. */\nexport interface Annotation {\n readonly [ANNOTATION]: true\n}\nexport declare function note(\n name: string,\n params: SpecialParams<'note'>,\n meta?: BlockMeta\n): Annotation\n\n// Structured param shapes\n\n/** Type names an input-format field may declare. */\nexport type InputFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'file[]'\n\n/** A structured input field: its type plus a default value, description or required flag. */\nexport interface InputFieldSpec {\n type: InputFieldType\n value?: JsonWithRefs\n description?: string\n required?: boolean\n}\n\n/** `input-format` fields by name: `{ subject: 'string', amount: { type: 'number', value: 0 } }`. */\nexport type InputFields = Record\n\ntype InputFieldValue = T extends 'string'\n ? string\n : T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'array'\n ? Json[]\n : T extends 'file[]'\n ? SimFile[]\n : Json\n\n/** The outputs an `input-format` declares. */\nexport type InputFieldsOutput = {\n [K in keyof F]: F[K] extends { type: infer T } ? InputFieldValue : InputFieldValue\n}\n\n/** `response-format` fields: `{ ok: true, id: { type: 'string', value: row.id } }`. */\nexport type ResponseFields = Record\n\n/** An agent message. */\nexport interface Message {\n role: 'system' | 'user' | 'assistant'\n content: Value\n}\n\n/** One `variables-input` assignment. */\nexport interface VariableAssignment {\n variable: VarRef\n value: JsonWithRefs\n}\n\n/** Child workflow inputs by name (`input-mapping`, `workflow-input-mapper`). */\nexport type InputMapping = Record\n\n/** A table filter by column: `{ status: { $eq: 'new' } }`. */\nexport type Filter = Record\n\n/** A table sort by column: `{ createdAt: 'desc' }`. */\nexport type Sort =\n | Record\n | Array<{ column: string; direction: 'asc' | 'desc' }>\n\n/** One knowledge tag filter. */\nexport interface TagFilter {\n tagName: string\n tagValue: Value\n [key: string]: JsonWithRefs\n}\n\n/** One document tag. */\nexport interface DocumentTag {\n tagName: string\n value: Value\n [key: string]: JsonWithRefs\n}\n\n/** One `eval-input` metric. */\nexport interface EvalMetric {\n name: string\n description?: string\n range?: { min: number; max: number }\n [key: string]: JsonWithRefs | undefined\n}\n\n/** One `model-fallback-list` entry. */\nexport interface ModelFallback {\n model: LiteralUnion\n [key: string]: JsonWithRefs\n}\n\n/**\n * Model ids, generated into `models.d.ts` (which adds one member per model). Kept apart from the\n * block files so a model-list change touches one file.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface ModelIds {}\nexport type Model = Extract\n\n/** A JSON Schema `responseFormat`, or `{ name, strict, schema }` around one. */\nexport type ResponseFormat = JsonWithRefs\n\ntype Depth = [never, 0, 1, 2, 3, 4]\n\ntype FromSchema = [D] extends [never]\n ? Json\n : S extends { enum: readonly (infer E)[] }\n ? E\n : S extends { type: 'object'; properties: infer P }\n ? { [K in keyof P]: FromSchema }\n : S extends { type: 'array'; items: infer I }\n ? FromSchema[]\n : S extends { type: 'string' }\n ? string\n : S extends { type: 'number' | 'integer' }\n ? number\n : S extends { type: 'boolean' }\n ? boolean\n : Json\n\n/**\n * The outputs a literal `responseFormat` adds, read from its JSON Schema with recursion capped at\n * depth 4. A template or reference adds untyped JSON.\n */\nexport type ResponseFormatOutput = [RF] extends [undefined]\n ? unknown\n : RF extends { schema: infer S }\n ? FromSchema\n : RF extends { type: 'object'; properties: object }\n ? FromSchema\n : { [key: string]: Json }\n" From 3002bb3d78c8565b97e9a3f5f668a4ada6b336a5 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:28:12 -0800 Subject: [PATCH 095/428] test(workflows): import canonical-index helpers from @sim/workflow-code in subblock tests The Wave 2 audit removed visibility.ts's re-export of the canonical index, but visibility.test.ts and context.test.ts still imported evaluateSubBlockCondition, scopeCanonicalModesForTool, buildCanonicalIndex and isCanonicalPair from it (relatively), so both failed on import. --- apps/sim/lib/workflows/subblocks/context.test.ts | 3 ++- apps/sim/lib/workflows/subblocks/visibility.test.ts | 10 ++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/apps/sim/lib/workflows/subblocks/context.test.ts b/apps/sim/lib/workflows/subblocks/context.test.ts index 92dfaea446d..ba4b00e3a0e 100644 --- a/apps/sim/lib/workflows/subblocks/context.test.ts +++ b/apps/sim/lib/workflows/subblocks/context.test.ts @@ -2,6 +2,8 @@ import { afterAll, beforeEach, describe, expect, it, type MockInstance, vi } fro vi.unmock('@/blocks/registry') +import { buildCanonicalIndex, isCanonicalPair } from '@sim/workflow-code/catalog/canonical-index' +import { resolveDependencyValue } from '@/lib/workflows/subblocks/visibility' import * as blocksBarrel from '@/blocks' import { getAllBlocks, getBlock as getRealBlock } from '@/blocks/registry' import { @@ -9,7 +11,6 @@ import { getSelectorContextSubBlocks, SELECTOR_CONTEXT_FIELDS, } from './context' -import { buildCanonicalIndex, isCanonicalPair, resolveDependencyValue } from './visibility' /** * Under `isolate: false` the module under test may already be cached from an diff --git a/apps/sim/lib/workflows/subblocks/visibility.test.ts b/apps/sim/lib/workflows/subblocks/visibility.test.ts index 51029f833df..f2f7568c39c 100644 --- a/apps/sim/lib/workflows/subblocks/visibility.test.ts +++ b/apps/sim/lib/workflows/subblocks/visibility.test.ts @@ -1,15 +1,17 @@ +import { + evaluateSubBlockCondition, + scopeCanonicalModesForTool, +} from '@sim/workflow-code/catalog/canonical-index' import { describe, expect, it } from 'vitest' -import type { SubBlockConfig } from '@/blocks/types' import { buildCanonicalIndexForSurface, - evaluateSubBlockCondition, getCanonicalSubBlocksForSurface, reindexRewrittenToolCanonicalModes, reindexToolCanonicalModes, resolveActiveDependencyValue, resolveDependencyValue, - scopeCanonicalModesForTool, -} from './visibility' +} from '@/lib/workflows/subblocks/visibility' +import type { SubBlockConfig } from '@/blocks/types' describe('evaluateSubBlockCondition', () => { describe('simple value matching', () => { From d19d50acba1873e6f3e285492117a2080dd7a2f0 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:30:37 -0800 Subject: [PATCH 096/428] fix(cli): drop the raw if-none-match flag and classify source apply as destructive The block-catalog contract's ETag header surfaced as `sim workspaces block-catalog list --if-none-match`, the wire spelling build.test forbids; only source get --out revalidates a cached catalog, so the flag is omitted. applyWorkflowSource was missing from the destructiveness triage; it joins replaceWorkflowState, since a source that drops a block deletes it. --- apps/docs/content/docs/cli/reference.mdx | 1 - apps/docs/content/docs/cli/workspaces.mdx | 1 - packages/sim-cli/src/contract/commands.ts | 3 +++ packages/sim-cli/src/http/client.test.ts | 2 ++ packages/sim-cli/src/runtime/build.test.ts | 7 ++++++- 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/apps/docs/content/docs/cli/reference.mdx b/apps/docs/content/docs/cli/reference.mdx index f82a3ef0435..3176e6a4f1b 100644 --- a/apps/docs/content/docs/cli/reference.mdx +++ b/apps/docs/content/docs/cli/reference.mdx @@ -8930,7 +8930,6 @@ sim workspaces block-catalog list [options] | Option | Required | Description | | --- | --- | --- | | `--workflow-id ` | No | Return the compile catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`. | -| `--if-none-match ` | No | A catalog `hash` (quoted, as sent in `ETag`) the caller already holds. | diff --git a/apps/docs/content/docs/cli/workspaces.mdx b/apps/docs/content/docs/cli/workspaces.mdx index 63765c1f2a6..31c4d2627b2 100644 --- a/apps/docs/content/docs/cli/workspaces.mdx +++ b/apps/docs/content/docs/cli/workspaces.mdx @@ -711,7 +711,6 @@ sim workspaces block-catalog list [options] | Option | Required | Description | | --- | --- | --- | | `--workflow-id ` | No | Return the compile catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`. | -| `--if-none-match ` | No | A catalog `hash` (quoted, as sent in `ETag`) the caller already holds. | diff --git a/packages/sim-cli/src/contract/commands.ts b/packages/sim-cli/src/contract/commands.ts index fef7e2cca9a..d1fb6162ca5 100644 --- a/packages/sim-cli/src/contract/commands.ts +++ b/packages/sim-cli/src/contract/commands.ts @@ -645,6 +645,9 @@ export const CLI_CONTRACT: CliContract = { }, /** `workflows source apply --from ` reads and writes a source directory by hand. */ applyWorkflowSource: { hidden: true }, + // The ETag revalidation header is for a client that caches the catalog, as `workflows source + // get --out` does by hand; a one-off read has no cached hash to send. + getBlockCatalog: { flags: { 'if-none-match': { omit: true } } }, replaceWorkflowState: { command: 'workflows state replace', confirm: 'This replaces the entire draft graph and cannot be undone.', diff --git a/packages/sim-cli/src/http/client.test.ts b/packages/sim-cli/src/http/client.test.ts index 314789270c5..06e087a8ac8 100644 --- a/packages/sim-cli/src/http/client.test.ts +++ b/packages/sim-cli/src/http/client.test.ts @@ -449,6 +449,8 @@ describe('destructive operations are gated', () => { // the caller last chose. 'activateWorkflowVersion', 'applyWorkflowOperations', + // Replaces the draft with the submitted source: blocks the file no longer declares are removed. + 'applyWorkflowSource', 'applyWorkflowVariables', 'archiveProjectFileItems', 'bulkDeleteFiles', diff --git a/packages/sim-cli/src/runtime/build.test.ts b/packages/sim-cli/src/runtime/build.test.ts index e4168538376..86a1bae54b6 100644 --- a/packages/sim-cli/src/runtime/build.test.ts +++ b/packages/sim-cli/src/runtime/build.test.ts @@ -944,7 +944,12 @@ describe('headers the route contract declares', () => { * instead of the declared header names is what let `--upload-token` through. */ it('exposes no flag spelled as a raw HTTP header', () => { - expect([...HEADER_WIRE_FLAGS].sort()).toEqual(['--upload-token', '--x-run-id', '--x-sim-via']) + expect([...HEADER_WIRE_FLAGS].sort()).toEqual([ + '--if-none-match', + '--upload-token', + '--x-run-id', + '--x-sim-via', + ]) expect(wireSpelledFlags(buildProgram())).toEqual([]) const workflowRun = buildProgram() From 164af729226a7ba559e5dddc0b944d82c4bff0b3 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:31:26 -0800 Subject: [PATCH 097/428] fix(workflow-code): narrow catalog list refs with isRecordLike check:utils bans the inline object guard 3F's view.ts used. --- packages/workflow-code/src/catalog/view.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/workflow-code/src/catalog/view.ts b/packages/workflow-code/src/catalog/view.ts index e827bb062d0..cb76df5df26 100644 --- a/packages/workflow-code/src/catalog/view.ts +++ b/packages/workflow-code/src/catalog/view.ts @@ -8,6 +8,7 @@ * blocks it names, and a catalog is immutable once served, so a memo never goes stale. */ +import { isRecordLike } from '@sim/utils/object' import type { BlockCatalog, CatalogBlock, @@ -48,7 +49,7 @@ function memoOf(catalog: BlockCatalog): CatalogMemo { } function isListRef(value: unknown): value is CatalogListRef { - return typeof value === 'object' && value !== null && !Array.isArray(value) && 'list' in value + return isRecordLike(value) && 'list' in value } function listAt(catalog: BlockCatalog, ref: CatalogListRef): Array { From 075354a0695b055fa5f385edb2f4b1638dbb98b6 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:48:11 -0800 Subject: [PATCH 098/428] feat(db): add workspace_resource_binding for persisted workflow-source resource keys --- .../0461_workspace_resource_binding.sql | 19 + .../db/migrations/meta/0461_snapshot.json | 33377 ++++++++++++++++ packages/db/migrations/meta/_journal.json | 7 + packages/db/schema.ts | 71 + .../src/mocks/schema-tables.generated.ts | 25 + 5 files changed, 33499 insertions(+) create mode 100644 packages/db/migrations/0461_workspace_resource_binding.sql create mode 100644 packages/db/migrations/meta/0461_snapshot.json diff --git a/packages/db/migrations/0461_workspace_resource_binding.sql b/packages/db/migrations/0461_workspace_resource_binding.sql new file mode 100644 index 00000000000..0e4e8eb69aa --- /dev/null +++ b/packages/db/migrations/0461_workspace_resource_binding.sql @@ -0,0 +1,19 @@ +CREATE TYPE "public"."workspace_resource_kind" AS ENUM('credential', 'knowledge-base', 'knowledge-document', 'table', 'file', 'file-folder', 'mcp-server', 'custom-tool', 'custom-block', 'skill', 'sandbox', 'workflow');--> statement-breakpoint +CREATE TABLE "workspace_resource_binding" ( + "id" text PRIMARY KEY NOT NULL, + "workspace_id" text NOT NULL, + "kind" "workspace_resource_kind" NOT NULL, + "key" text NOT NULL, + "resource_id" text NOT NULL, + "origin" text NOT NULL, + "created_by" text, + "created_at" timestamp DEFAULT now() NOT NULL, + "updated_at" timestamp DEFAULT now() NOT NULL, + CONSTRAINT "workspace_resource_binding_key_format" CHECK ("workspace_resource_binding"."key" ~ '^[a-z][a-z0-9_-]{0,63}$'), + CONSTRAINT "workspace_resource_binding_origin_check" CHECK ("workspace_resource_binding"."origin" IN ('allocated', 'adopted', 'created')) +); +--> statement-breakpoint +ALTER TABLE "workspace_resource_binding" ADD CONSTRAINT "workspace_resource_binding_workspace_id_workspace_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspace"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "workspace_resource_binding" ADD CONSTRAINT "workspace_resource_binding_created_by_user_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."user"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +CREATE UNIQUE INDEX "workspace_resource_binding_ws_kind_key_unique" ON "workspace_resource_binding" USING btree ("workspace_id","kind","key");--> statement-breakpoint +CREATE UNIQUE INDEX "workspace_resource_binding_ws_kind_resource_unique" ON "workspace_resource_binding" USING btree ("workspace_id","kind","resource_id"); \ No newline at end of file diff --git a/packages/db/migrations/meta/0461_snapshot.json b/packages/db/migrations/meta/0461_snapshot.json new file mode 100644 index 00000000000..583ed565d98 --- /dev/null +++ b/packages/db/migrations/meta/0461_snapshot.json @@ -0,0 +1,33377 @@ +{ + "id": "e907c2fa-d260-48f8-844f-d6fe9aa27563", + "prevId": "be3b8806-8ecc-46ba-829d-ec1f22c33724", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.account": { + "name": "account", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "account_id": { + "name": "account_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token": { + "name": "access_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_token": { + "name": "refresh_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "id_token": { + "name": "id_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "access_token_expires_at": { + "name": "access_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "refresh_token_expires_at": { + "name": "refresh_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oauth_config": { + "name": "oauth_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_revoked_at": { + "name": "refresh_revoked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "refresh_revoked_code": { + "name": "refresh_revoked_code", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_revoked_token_hash": { + "name": "refresh_revoked_token_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "account_user_id_idx": { + "name": "account_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_account_on_account_id_provider_id": { + "name": "idx_account_on_account_id_provider_id", + "columns": [ + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "account_user_id_user_id_fk": { + "name": "account_user_id_user_id_fk", + "tableFrom": "account", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.agent_memory_turn": { + "name": "agent_memory_turn", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "memory_id": { + "name": "memory_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "block_id": { + "name": "block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "node_id": { + "name": "node_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_order": { + "name": "execution_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "encrypted_state": { + "name": "encrypted_state", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "agent_memory_turn_invocation_unique": { + "name": "agent_memory_turn_invocation_unique", + "columns": [ + { + "expression": "memory_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "node_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "agent_memory_turn_workflow_idx": { + "name": "agent_memory_turn_workflow_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "agent_memory_turn_memory_id_memory_id_fk": { + "name": "agent_memory_turn_memory_id_memory_id_fk", + "tableFrom": "agent_memory_turn", + "tableTo": "memory", + "columnsFrom": ["memory_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "agent_memory_turn_workflow_id_workflow_id_fk": { + "name": "agent_memory_turn_workflow_id_workflow_id_fk", + "tableFrom": "agent_memory_turn", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.api_key": { + "name": "api_key", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key_hash": { + "name": "key_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'personal'" + }, + "access": { + "name": "access", + "type": "api_key_access", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'write'" + }, + "last_used": { + "name": "last_used", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "api_key_workspace_type_idx": { + "name": "api_key_workspace_type_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "api_key_user_type_idx": { + "name": "api_key_user_type_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "api_key_key_hash_idx": { + "name": "api_key_key_hash_idx", + "columns": [ + { + "expression": "key_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "api_key_user_id_user_id_fk": { + "name": "api_key_user_id_user_id_fk", + "tableFrom": "api_key", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "api_key_workspace_id_workspace_id_fk": { + "name": "api_key_workspace_id_workspace_id_fk", + "tableFrom": "api_key", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "api_key_created_by_user_id_fk": { + "name": "api_key_created_by_user_id_fk", + "tableFrom": "api_key", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "api_key_key_unique": { + "name": "api_key_key_unique", + "nullsNotDistinct": false, + "columns": ["key"] + } + }, + "policies": {}, + "checkConstraints": { + "workspace_type_check": { + "name": "workspace_type_check", + "value": "(type = 'workspace' AND workspace_id IS NOT NULL) OR (type = 'personal' AND workspace_id IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.assistant_tool_permission": { + "name": "assistant_tool_permission", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "read_policy": { + "name": "read_policy", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'allow'" + }, + "write_policy": { + "name": "write_policy", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'ask'" + }, + "overrides": { + "name": "overrides", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assistant_tool_permission_credential_idx": { + "name": "assistant_tool_permission_credential_idx", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assistant_tool_permission_user_idx": { + "name": "assistant_tool_permission_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assistant_tool_permission_organization_id_organization_id_fk": { + "name": "assistant_tool_permission_organization_id_organization_id_fk", + "tableFrom": "assistant_tool_permission", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assistant_tool_permission_user_id_user_id_fk": { + "name": "assistant_tool_permission_user_id_user_id_fk", + "tableFrom": "assistant_tool_permission", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assistant_tool_permission_credential_id_credential_id_fk": { + "name": "assistant_tool_permission_credential_id_credential_id_fk", + "tableFrom": "assistant_tool_permission", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "assistant_tool_permission_organization_id_user_id_credential_id_pk": { + "name": "assistant_tool_permission_organization_id_user_id_credential_id_pk", + "columns": ["organization_id", "user_id", "credential_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "assistant_tool_permission_policy_check": { + "name": "assistant_tool_permission_policy_check", + "value": "\"assistant_tool_permission\".\"read_policy\" IN ('allow', 'ask', 'block') AND \"assistant_tool_permission\".\"write_policy\" IN ('allow', 'ask', 'block')" + }, + "assistant_tool_permission_revision_check": { + "name": "assistant_tool_permission_revision_check", + "value": "\"assistant_tool_permission\".\"revision\" > 0" + } + }, + "isRLSEnabled": false + }, + "public.async_jobs": { + "name": "async_jobs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "run_at": { + "name": "run_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "attempts": { + "name": "attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_attempts": { + "name": "max_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 3 + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "output": { + "name": "output", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "async_jobs_status_started_at_idx": { + "name": "async_jobs_status_started_at_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "async_jobs_status_completed_at_idx": { + "name": "async_jobs_status_completed_at_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "completed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "async_jobs_schedule_pending_run_at_idx": { + "name": "async_jobs_schedule_pending_run_at_idx", + "columns": [ + { + "expression": "run_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"async_jobs\".\"type\" = 'schedule-execution' AND \"async_jobs\".\"status\" = 'pending'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "async_jobs_schedule_processing_started_at_idx": { + "name": "async_jobs_schedule_processing_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"async_jobs\".\"type\" = 'schedule-execution' AND \"async_jobs\".\"status\" = 'processing'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "async_jobs_schedule_unreconciled_terminal_idx": { + "name": "async_jobs_schedule_unreconciled_terminal_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"async_jobs\".\"type\" = 'schedule-execution' AND \"async_jobs\".\"status\" IN ('completed', 'failed', 'cancelled') AND COALESCE(\"async_jobs\".\"metadata\" ->> 'scheduleReconciled', 'false') <> 'true'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.audit_log": { + "name": "audit_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "actor_id": { + "name": "actor_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "action": { + "name": "action", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_type": { + "name": "resource_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "actor_name": { + "name": "actor_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "actor_email": { + "name": "actor_email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "resource_name": { + "name": "resource_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "ip_address": { + "name": "ip_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "surface": { + "name": "surface", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "audit_log_workspace_created_idx": { + "name": "audit_log_workspace_created_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_log_workspace_created_at_id_idx": { + "name": "audit_log_workspace_created_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"created_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_log_actor_created_idx": { + "name": "audit_log_actor_created_idx", + "columns": [ + { + "expression": "actor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_log_org_level_created_at_id_idx": { + "name": "audit_log_org_level_created_at_id_idx", + "columns": [ + { + "expression": "(\"metadata\"->>'organizationId')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"created_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"audit_log\".\"workspace_id\" IS NULL AND (\"audit_log\".\"metadata\"->>'organizationId') IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "audit_log_resource_idx": { + "name": "audit_log_resource_idx", + "columns": [ + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_log_action_idx": { + "name": "audit_log_action_idx", + "columns": [ + { + "expression": "action", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "audit_log_workspace_id_workspace_id_fk": { + "name": "audit_log_workspace_id_workspace_id_fk", + "tableFrom": "audit_log", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "audit_log_actor_id_user_id_fk": { + "name": "audit_log_actor_id_user_id_fk", + "tableFrom": "audit_log", + "tableTo": "user", + "columnsFrom": ["actor_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aws_marketplace_license": { + "name": "aws_marketplace_license", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "license_arn": { + "name": "license_arn", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "product_code": { + "name": "product_code", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "customer_aws_account_id": { + "name": "customer_aws_account_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "agreement_id": { + "name": "agreement_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "agreement_seen_at": { + "name": "agreement_seen_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "renewed_agreement_id": { + "name": "renewed_agreement_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "aws_marketplace_license_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "dimension": { + "name": "dimension", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "quantity": { + "name": "quantity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_verified_at": { + "name": "last_verified_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "last_verification_attempt_at": { + "name": "last_verification_attempt_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "license_event_received_at": { + "name": "license_event_received_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "claim_token_hash": { + "name": "claim_token_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "claim_expires_at": { + "name": "claim_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "linked_by_user_id": { + "name": "linked_by_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_linked_at": { + "name": "organization_linked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "ended_at": { + "name": "ended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "contact_email": { + "name": "contact_email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "company_name": { + "name": "company_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "aws_marketplace_license_arn_unique": { + "name": "aws_marketplace_license_arn_unique", + "columns": [ + { + "expression": "license_arn", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_claim_token_hash_unique": { + "name": "aws_marketplace_license_claim_token_hash_unique", + "columns": [ + { + "expression": "claim_token_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_agreement_id_idx": { + "name": "aws_marketplace_license_agreement_id_idx", + "columns": [ + { + "expression": "agreement_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_renewed_agreement_id_idx": { + "name": "aws_marketplace_license_renewed_agreement_id_idx", + "columns": [ + { + "expression": "renewed_agreement_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_account_product_idx": { + "name": "aws_marketplace_license_account_product_idx", + "columns": [ + { + "expression": "customer_aws_account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "product_code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_last_attempt_idx": { + "name": "aws_marketplace_license_last_attempt_idx", + "columns": [ + { + "expression": "last_verification_attempt_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_organization_id_idx": { + "name": "aws_marketplace_license_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_linked_by_user_id_idx": { + "name": "aws_marketplace_license_linked_by_user_id_idx", + "columns": [ + { + "expression": "linked_by_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "aws_marketplace_license_organization_id_organization_id_fk": { + "name": "aws_marketplace_license_organization_id_organization_id_fk", + "tableFrom": "aws_marketplace_license", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "aws_marketplace_license_linked_by_user_id_user_id_fk": { + "name": "aws_marketplace_license_linked_by_user_id_user_id_fk", + "tableFrom": "aws_marketplace_license", + "tableTo": "user", + "columnsFrom": ["linked_by_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aws_marketplace_usage_report": { + "name": "aws_marketplace_usage_report", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "license_id": { + "name": "license_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "dimension": { + "name": "dimension", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "hour_start": { + "name": "hour_start", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "aws_marketplace_usage_report_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "sent_at": { + "name": "sent_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "metering_record_id": { + "name": "metering_record_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reported_at": { + "name": "reported_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "aws_marketplace_usage_report_license_dimension_hour_unique": { + "name": "aws_marketplace_usage_report_license_dimension_hour_unique", + "columns": [ + { + "expression": "license_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "dimension", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "hour_start", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_usage_report_status_hour_idx": { + "name": "aws_marketplace_usage_report_status_hour_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "hour_start", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_usage_report_organization_id_idx": { + "name": "aws_marketplace_usage_report_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "aws_marketplace_usage_report_organization_id_organization_id_fk": { + "name": "aws_marketplace_usage_report_organization_id_organization_id_fk", + "tableFrom": "aws_marketplace_usage_report", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "aws_marketplace_usage_report_license_id_aws_marketplace_license_id_fk": { + "name": "aws_marketplace_usage_report_license_id_aws_marketplace_license_id_fk", + "tableFrom": "aws_marketplace_usage_report", + "tableTo": "aws_marketplace_license", + "columnsFrom": ["license_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aws_marketplace_usage_tally": { + "name": "aws_marketplace_usage_tally", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "dimension": { + "name": "dimension", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "period_start": { + "name": "period_start", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "counted_from": { + "name": "counted_from", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "cost_usd": { + "name": "cost_usd", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "units": { + "name": "units", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "aws_marketplace_usage_tally_organization_id_organization_id_fk": { + "name": "aws_marketplace_usage_tally_organization_id_organization_id_fk", + "tableFrom": "aws_marketplace_usage_tally", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "aws_marketplace_usage_tally_organization_id_dimension_period_start_pk": { + "name": "aws_marketplace_usage_tally_organization_id_dimension_period_start_pk", + "columns": ["organization_id", "dimension", "period_start"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.background_work_status": { + "name": "background_work_status", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "kind": { + "name": "kind", + "type": "background_work_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "background_work_status_value", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "background_work_status_workspace_status_idx": { + "name": "background_work_status_workspace_status_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "background_work_status_workflow_status_idx": { + "name": "background_work_status_workflow_status_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "background_work_status_meta_child_ws_idx": { + "name": "background_work_status_meta_child_ws_idx", + "columns": [ + { + "expression": "(\"metadata\" ->> 'childWorkspaceId')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "background_work_status_meta_other_ws_idx": { + "name": "background_work_status_meta_other_ws_idx", + "columns": [ + { + "expression": "(\"metadata\" ->> 'otherWorkspaceId')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "background_work_status_workspace_id_workspace_id_fk": { + "name": "background_work_status_workspace_id_workspace_id_fk", + "tableFrom": "background_work_status", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "background_work_status_workflow_id_workflow_id_fk": { + "name": "background_work_status_workflow_id_workflow_id_fk", + "tableFrom": "background_work_status", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.changelog_change": { + "name": "changelog_change", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "release_id": { + "name": "release_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "position": { + "name": "position", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "changelog_change_release_position_unique": { + "name": "changelog_change_release_position_unique", + "columns": [ + { + "expression": "release_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "position", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "changelog_change_release_id_changelog_release_id_fk": { + "name": "changelog_change_release_id_changelog_release_id_fk", + "tableFrom": "changelog_change", + "tableTo": "changelog_release", + "columnsFrom": ["release_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "changelog_change_workflow_id_workflow_id_fk": { + "name": "changelog_change_workflow_id_workflow_id_fk", + "tableFrom": "changelog_change", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "changelog_change_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "changelog_change_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "changelog_change", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "changelog_change_chat_id_copilot_chats_id_fk": { + "name": "changelog_change_chat_id_copilot_chats_id_fk", + "tableFrom": "changelog_change", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.changelog_release": { + "name": "changelog_release", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version_major": { + "name": "version_major", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "version_minor": { + "name": "version_minor", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "version_patch": { + "name": "version_patch", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "bump_reason": { + "name": "bump_reason", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "body_file_id": { + "name": "body_file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "published_at": { + "name": "published_at", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "changelog_release_workspace_version_unique": { + "name": "changelog_release_workspace_version_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version_major", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version_minor", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version_patch", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "changelog_release_body_file_unique": { + "name": "changelog_release_body_file_unique", + "columns": [ + { + "expression": "body_file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "changelog_release_workspace_published_idx": { + "name": "changelog_release_workspace_published_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "published_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "changelog_release_workspace_id_workspace_id_fk": { + "name": "changelog_release_workspace_id_workspace_id_fk", + "tableFrom": "changelog_release", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "changelog_release_body_file_id_workspace_files_id_fk": { + "name": "changelog_release_body_file_id_workspace_files_id_fk", + "tableFrom": "changelog_release", + "tableTo": "workspace_files", + "columnsFrom": ["body_file_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "changelog_release_created_by_user_id_fk": { + "name": "changelog_release_created_by_user_id_fk", + "tableFrom": "changelog_release", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "changelog_release_updated_by_user_id_fk": { + "name": "changelog_release_updated_by_user_id_fk", + "tableFrom": "changelog_release", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "changelog_release_version_check": { + "name": "changelog_release_version_check", + "value": "\"changelog_release\".\"version_major\" >= 0 AND \"changelog_release\".\"version_minor\" >= 0 AND \"changelog_release\".\"version_patch\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.chat": { + "name": "chat", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "identifier": { + "name": "identifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "customizations": { + "name": "customizations", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'public'" + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "allowed_emails": { + "name": "allowed_emails", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'[]'" + }, + "output_configs": { + "name": "output_configs", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'[]'" + }, + "include_thinking": { + "name": "include_thinking", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "include_tool_calls": { + "name": "include_tool_calls", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "identifier_idx": { + "name": "identifier_idx", + "columns": [ + { + "expression": "identifier", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"chat\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "chat_archived_at_partial_idx": { + "name": "chat_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"chat\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_chat_on_workflow_id_archived_at": { + "name": "idx_chat_on_workflow_id_archived_at", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "chat_user_id_idx": { + "name": "chat_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "chat_workflow_id_workflow_id_fk": { + "name": "chat_workflow_id_workflow_id_fk", + "tableFrom": "chat", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "chat_user_id_user_id_fk": { + "name": "chat_user_id_user_id_fk", + "tableFrom": "chat", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.client_credential_token": { + "name": "client_credential_token", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "encrypted_value": { + "name": "encrypted_value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token_digest": { + "name": "access_token_digest", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "client_credential_token_expires_at_idx": { + "name": "client_credential_token_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"client_credential_token\".\"access_token_digest\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "client_credential_token_access_token_digest_idx": { + "name": "client_credential_token_access_token_digest_idx", + "columns": [ + { + "expression": "access_token_digest", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"client_credential_token\".\"access_token_digest\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_async_tool_calls": { + "name": "copilot_async_tool_calls", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "run_id": { + "name": "run_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "checkpoint_id": { + "name": "checkpoint_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "tool_call_id": { + "name": "tool_call_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tool_name": { + "name": "tool_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "args": { + "name": "args", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "executable_name": { + "name": "executable_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "target_workspace_id": { + "name": "target_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "approved_args": { + "name": "approved_args", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "assistant_action": { + "name": "assistant_action", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "execution_retryable": { + "name": "execution_retryable", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "status": { + "name": "status", + "type": "copilot_async_tool_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "result": { + "name": "result", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "permission_decision": { + "name": "permission_decision", + "type": "copilot_tool_permission_decision", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "permission_decided_at": { + "name": "permission_decided_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "permission_requested_at": { + "name": "permission_requested_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "pickup_deadline_at": { + "name": "pickup_deadline_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "persist_seq": { + "name": "persist_seq", + "type": "bigint", + "primaryKey": false, + "notNull": false, + "default": "nextval('copilot_async_tool_calls_persist_seq')" + }, + "claimed_at": { + "name": "claimed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "claimed_by": { + "name": "claimed_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "browser_download_started_at": { + "name": "browser_download_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "execution_started_at": { + "name": "execution_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "execution_settled_at": { + "name": "execution_settled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "execution_owner_token": { + "name": "execution_owner_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "execution_lease_expires_at": { + "name": "execution_lease_expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "execution_revoked_at": { + "name": "execution_revoked_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "execution_attempts": { + "name": "execution_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "execution_deadline_at": { + "name": "execution_deadline_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "client_workflow_execution_id": { + "name": "client_workflow_execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sandbox_processes": { + "name": "sandbox_processes", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_async_tool_calls_checkpoint_id_idx": { + "name": "copilot_async_tool_calls_checkpoint_id_idx", + "columns": [ + { + "expression": "checkpoint_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_async_tool_calls_status_idx": { + "name": "copilot_async_tool_calls_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_async_tool_calls_run_status_idx": { + "name": "copilot_async_tool_calls_run_status_idx", + "columns": [ + { + "expression": "run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_async_tool_calls_tool_call_id_unique": { + "name": "copilot_async_tool_calls_tool_call_id_unique", + "columns": [ + { + "expression": "tool_call_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_async_tool_calls_run_id_copilot_runs_id_fk": { + "name": "copilot_async_tool_calls_run_id_copilot_runs_id_fk", + "tableFrom": "copilot_async_tool_calls", + "tableTo": "copilot_runs", + "columnsFrom": ["run_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_async_tool_calls_checkpoint_id_copilot_run_checkpoints_id_fk": { + "name": "copilot_async_tool_calls_checkpoint_id_copilot_run_checkpoints_id_fk", + "tableFrom": "copilot_async_tool_calls", + "tableTo": "copilot_run_checkpoints", + "columnsFrom": ["checkpoint_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_chats": { + "name": "copilot_chats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "memory_space_id": { + "name": "memory_space_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "chat_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'copilot'" + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'claude-3-7-sonnet-latest'" + }, + "conversation_id": { + "name": "conversation_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "external_conversation_key": { + "name": "external_conversation_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "external_conversation_metadata": { + "name": "external_conversation_metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "preview_yaml": { + "name": "preview_yaml", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "resources": { + "name": "resources", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "auto_allowed_tools": { + "name": "auto_allowed_tools", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "pinned": { + "name": "pinned", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_chats_organization_id_idx": { + "name": "copilot_chats_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_external_conversation_unique": { + "name": "copilot_chats_external_conversation_unique", + "columns": [ + { + "expression": "external_conversation_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"copilot_chats\".\"external_conversation_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_user_org_created_idx": { + "name": "copilot_chats_user_org_created_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_workflow_id_idx": { + "name": "copilot_chats_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_user_workflow_idx": { + "name": "copilot_chats_user_workflow_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_user_workspace_idx": { + "name": "copilot_chats_user_workspace_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_created_at_idx": { + "name": "copilot_chats_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_updated_at_idx": { + "name": "copilot_chats_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_workspace_created_at_id_idx": { + "name": "copilot_chats_workspace_created_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"created_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_user_workspace_deleted_partial_idx": { + "name": "copilot_chats_user_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_chats\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_chats_user_id_user_id_fk": { + "name": "copilot_chats_user_id_user_id_fk", + "tableFrom": "copilot_chats", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_chats_workflow_id_workflow_id_fk": { + "name": "copilot_chats_workflow_id_workflow_id_fk", + "tableFrom": "copilot_chats", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_chats_workspace_id_workspace_id_fk": { + "name": "copilot_chats_workspace_id_workspace_id_fk", + "tableFrom": "copilot_chats", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_chats_organization_id_organization_id_fk": { + "name": "copilot_chats_organization_id_organization_id_fk", + "tableFrom": "copilot_chats", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "copilot_chats_owner_check": { + "name": "copilot_chats_owner_check", + "value": "num_nonnulls(\"copilot_chats\".\"workspace_id\", \"copilot_chats\".\"organization_id\") <= 1" + }, + "copilot_chats_organization_workflow_check": { + "name": "copilot_chats_organization_workflow_check", + "value": "\"copilot_chats\".\"organization_id\" IS NULL OR \"copilot_chats\".\"workflow_id\" IS NULL" + } + }, + "isRLSEnabled": false + }, + "public.copilot_feedback": { + "name": "copilot_feedback", + "schema": "", + "columns": { + "feedback_id": { + "name": "feedback_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_query": { + "name": "user_query", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "agent_response": { + "name": "agent_response", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "is_positive": { + "name": "is_positive", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "feedback": { + "name": "feedback", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_yaml": { + "name": "workflow_yaml", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_feedback_user_id_idx": { + "name": "copilot_feedback_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_chat_id_idx": { + "name": "copilot_feedback_chat_id_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_user_chat_idx": { + "name": "copilot_feedback_user_chat_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_is_positive_idx": { + "name": "copilot_feedback_is_positive_idx", + "columns": [ + { + "expression": "is_positive", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_created_at_idx": { + "name": "copilot_feedback_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_feedback_user_id_user_id_fk": { + "name": "copilot_feedback_user_id_user_id_fk", + "tableFrom": "copilot_feedback", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_feedback_chat_id_copilot_chats_id_fk": { + "name": "copilot_feedback_chat_id_copilot_chats_id_fk", + "tableFrom": "copilot_feedback", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_messages": { + "name": "copilot_messages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "message_id": { + "name": "message_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "display_content": { + "name": "display_content", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "stream_id": { + "name": "stream_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "seq": { + "name": "seq", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_messages_chat_message_unique": { + "name": "copilot_messages_chat_message_unique", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_messages_chat_created_at_idx": { + "name": "copilot_messages_chat_created_at_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_messages\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_messages_chat_seq_idx": { + "name": "copilot_messages_chat_seq_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "seq", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_messages\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_messages_chat_stream_idx": { + "name": "copilot_messages_chat_stream_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "stream_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_messages\".\"stream_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_messages_user_created_at_idx": { + "name": "copilot_messages_user_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_messages\".\"role\" = 'user' AND \"copilot_messages\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_messages_chat_id_copilot_chats_id_fk": { + "name": "copilot_messages_chat_id_copilot_chats_id_fk", + "tableFrom": "copilot_messages", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_organization_request_stops": { + "name": "copilot_organization_request_stops", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stream_id": { + "name": "stream_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stopped_at": { + "name": "stopped_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "copilot_organization_request_stops_user_id_user_id_fk": { + "name": "copilot_organization_request_stops_user_id_user_id_fk", + "tableFrom": "copilot_organization_request_stops", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_organization_request_stops_organization_id_organization_id_fk": { + "name": "copilot_organization_request_stops_organization_id_organization_id_fk", + "tableFrom": "copilot_organization_request_stops", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "copilot_organization_request_stops_user_id_organization_id_stream_id_pk": { + "name": "copilot_organization_request_stops_user_id_organization_id_stream_id_pk", + "columns": ["user_id", "organization_id", "stream_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_request_stops": { + "name": "copilot_request_stops", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stream_id": { + "name": "stream_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stopped_at": { + "name": "stopped_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "copilot_request_stops_user_id_user_id_fk": { + "name": "copilot_request_stops_user_id_user_id_fk", + "tableFrom": "copilot_request_stops", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_request_stops_workspace_id_workspace_id_fk": { + "name": "copilot_request_stops_workspace_id_workspace_id_fk", + "tableFrom": "copilot_request_stops", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "copilot_request_stops_user_id_workspace_id_stream_id_pk": { + "name": "copilot_request_stops_user_id_workspace_id_stream_id_pk", + "columns": ["user_id", "workspace_id", "stream_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_run_checkpoints": { + "name": "copilot_run_checkpoints", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "run_id": { + "name": "run_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "pending_tool_call_id": { + "name": "pending_tool_call_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "conversation_snapshot": { + "name": "conversation_snapshot", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "agent_state": { + "name": "agent_state", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "provider_request": { + "name": "provider_request", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_run_checkpoints_pending_tool_call_id_idx": { + "name": "copilot_run_checkpoints_pending_tool_call_id_idx", + "columns": [ + { + "expression": "pending_tool_call_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_run_checkpoints_run_pending_tool_unique": { + "name": "copilot_run_checkpoints_run_pending_tool_unique", + "columns": [ + { + "expression": "run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "pending_tool_call_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_run_checkpoints_run_id_copilot_runs_id_fk": { + "name": "copilot_run_checkpoints_run_id_copilot_runs_id_fk", + "tableFrom": "copilot_run_checkpoints", + "tableTo": "copilot_runs", + "columnsFrom": ["run_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_runs": { + "name": "copilot_runs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tool_execution_version": { + "name": "tool_execution_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "tool_admission_closed_at": { + "name": "tool_admission_closed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "parent_run_id": { + "name": "parent_run_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stream_id": { + "name": "stream_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "agent": { + "name": "agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider": { + "name": "provider", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "copilot_run_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "request_context": { + "name": "request_context", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "desktop_device_id": { + "name": "desktop_device_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "copilot_runs_parent_run_id_idx": { + "name": "copilot_runs_parent_run_id_idx", + "columns": [ + { + "expression": "parent_run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_chat_started_at_idx": { + "name": "copilot_runs_chat_started_at_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_user_id_idx": { + "name": "copilot_runs_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_workflow_id_idx": { + "name": "copilot_runs_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_status_idx": { + "name": "copilot_runs_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_chat_execution_idx": { + "name": "copilot_runs_chat_execution_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_execution_started_at_idx": { + "name": "copilot_runs_execution_started_at_idx", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_workspace_completed_at_id_idx": { + "name": "copilot_runs_workspace_completed_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"completed_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_stream_id_unique": { + "name": "copilot_runs_stream_id_unique", + "columns": [ + { + "expression": "stream_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_desktop_device_started_at_idx": { + "name": "copilot_runs_desktop_device_started_at_idx", + "columns": [ + { + "expression": "desktop_device_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_runs\".\"desktop_device_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_runs_chat_id_copilot_chats_id_fk": { + "name": "copilot_runs_chat_id_copilot_chats_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_user_id_user_id_fk": { + "name": "copilot_runs_user_id_user_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_workflow_id_workflow_id_fk": { + "name": "copilot_runs_workflow_id_workflow_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_workspace_id_workspace_id_fk": { + "name": "copilot_runs_workspace_id_workspace_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_organization_id_organization_id_fk": { + "name": "copilot_runs_organization_id_organization_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_desktop_device_id_desktop_devices_id_fk": { + "name": "copilot_runs_desktop_device_id_desktop_devices_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "desktop_devices", + "columnsFrom": ["desktop_device_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_service_usage": { + "name": "copilot_service_usage", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true + }, + "stream_id": { + "name": "stream_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "tool_call_id": { + "name": "tool_call_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "service": { + "name": "service", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "cost_usd": { + "name": "cost_usd", + "type": "numeric(12, 8)", + "primaryKey": false, + "notNull": false + }, + "worker_origin": { + "name": "worker_origin", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "next_attempt_at": { + "name": "next_attempt_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "attempts": { + "name": "attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "delivered_at": { + "name": "delivered_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "copilot_service_usage_pending_idx": { + "name": "copilot_service_usage_pending_idx", + "columns": [ + { + "expression": "next_attempt_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "delivered_at IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.credential": { + "name": "credential", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "slack_app_id": { + "name": "slack_app_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "credential_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "unredacted": { + "name": "unredacted", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "account_id": { + "name": "account_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "env_key": { + "name": "env_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "env_owner_user_id": { + "name": "env_owner_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_service_account_key": { + "name": "encrypted_service_account_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_personal_token": { + "name": "encrypted_personal_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "authorization_app_id": { + "name": "authorization_app_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_group_enrollment_id": { + "name": "credential_group_enrollment_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_group_option_id": { + "name": "credential_group_option_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mcp_server_id": { + "name": "mcp_server_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mcp_oauth_config_version": { + "name": "mcp_oauth_config_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "managed_oauth_scope_version": { + "name": "managed_oauth_scope_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "provider_subject_id": { + "name": "provider_subject_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_tenant_id": { + "name": "provider_tenant_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "managed_oauth_status": { + "name": "managed_oauth_status", + "type": "managed_oauth_credential_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "granted_scopes": { + "name": "granted_scopes", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "provider_metadata": { + "name": "provider_metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "encrypted_oauth_token_set": { + "name": "encrypted_oauth_token_set", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mcp_tools": { + "name": "mcp_tools", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "mcp_tools_refreshed_at": { + "name": "mcp_tools_refreshed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "granted_at": { + "name": "granted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "revoked_at": { + "name": "revoked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "access_token_expires_at": { + "name": "access_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "refresh_token_expires_at": { + "name": "refresh_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_refreshed_at": { + "name": "last_refreshed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "credential_organization_id_idx": { + "name": "credential_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_organization_account_unique": { + "name": "credential_organization_account_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential\".\"account_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_org_personal_token_unique": { + "name": "credential_org_personal_token_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_subject_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential\".\"type\" = 'personal_token'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_workspace_id_idx": { + "name": "credential_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_type_idx": { + "name": "credential_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_provider_id_idx": { + "name": "credential_provider_id_idx", + "columns": [ + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_account_id_idx": { + "name": "credential_account_id_idx", + "columns": [ + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_env_owner_user_id_idx": { + "name": "credential_env_owner_user_id_idx", + "columns": [ + { + "expression": "env_owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_idx": { + "name": "credential_group_enrollment_idx", + "columns": [ + { + "expression": "credential_group_enrollment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_mcp_server_idx": { + "name": "credential_mcp_server_idx", + "columns": [ + { + "expression": "mcp_server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_option_identity_unique": { + "name": "credential_group_option_identity_unique", + "columns": [ + { + "expression": "credential_group_enrollment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "credential_group_option_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_subject_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"provider_tenant_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential\".\"type\" = 'managed_oauth'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_managed_mcp_enrollment_server_identity_unique": { + "name": "credential_managed_mcp_enrollment_server_identity_unique", + "columns": [ + { + "expression": "credential_group_enrollment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "mcp_server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"provider_subject_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"provider_tenant_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential\".\"type\" = 'managed_mcp'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_workspace_account_unique": { + "name": "credential_workspace_account_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_workspace_env_unique": { + "name": "credential_workspace_env_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "env_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "type = 'env_workspace'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_workspace_personal_env_unique": { + "name": "credential_workspace_personal_env_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "env_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "env_owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "type = 'env_personal'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_personal_token_identity_unique": { + "name": "credential_personal_token_identity_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_subject_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "type = 'personal_token'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "credential_workspace_id_workspace_id_fk": { + "name": "credential_workspace_id_workspace_id_fk", + "tableFrom": "credential", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_organization_id_organization_id_fk": { + "name": "credential_organization_id_organization_id_fk", + "tableFrom": "credential", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_slack_app_id_slack_app_id_fk": { + "name": "credential_slack_app_id_slack_app_id_fk", + "tableFrom": "credential", + "tableTo": "slack_app", + "columnsFrom": ["slack_app_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "credential_account_id_account_id_fk": { + "name": "credential_account_id_account_id_fk", + "tableFrom": "credential", + "tableTo": "account", + "columnsFrom": ["account_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_env_owner_user_id_user_id_fk": { + "name": "credential_env_owner_user_id_user_id_fk", + "tableFrom": "credential", + "tableTo": "user", + "columnsFrom": ["env_owner_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_credential_group_enrollment_id_credential_group_enrollment_id_fk": { + "name": "credential_credential_group_enrollment_id_credential_group_enrollment_id_fk", + "tableFrom": "credential", + "tableTo": "credential_group_enrollment", + "columnsFrom": ["credential_group_enrollment_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_mcp_server_id_mcp_servers_id_fk": { + "name": "credential_mcp_server_id_mcp_servers_id_fk", + "tableFrom": "credential", + "tableTo": "mcp_servers", + "columnsFrom": ["mcp_server_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_created_by_user_id_fk": { + "name": "credential_created_by_user_id_fk", + "tableFrom": "credential", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "credential_owner_check": { + "name": "credential_owner_check", + "value": "num_nonnulls(\"credential\".\"workspace_id\", \"credential\".\"organization_id\") = 1" + }, + "credential_organization_type_check": { + "name": "credential_organization_type_check", + "value": "\"credential\".\"organization_id\" IS NULL OR \"credential\".\"type\" IN ('oauth', 'managed_oauth', 'managed_mcp', 'service_account', 'personal_token')" + }, + "credential_personal_token_source_check": { + "name": "credential_personal_token_source_check", + "value": "(type::text <> 'personal_token') OR (\n created_by IS NOT NULL\n AND provider_id IS NOT NULL\n AND provider_id = 'gitlab'\n AND provider_subject_id IS NOT NULL\n AND provider_tenant_id IS NOT NULL\n AND encrypted_personal_token IS NOT NULL\n AND granted_scopes IS NOT NULL\n AND cardinality(granted_scopes) > 0\n AND account_id IS NULL\n AND env_key IS NULL\n AND env_owner_user_id IS NULL\n AND authorization_app_id IS NULL\n AND encrypted_oauth_token_set IS NULL\n AND encrypted_service_account_key IS NULL\n AND unredacted = false\n )" + }, + "credential_oauth_source_check": { + "name": "credential_oauth_source_check", + "value": "(type <> 'oauth') OR (account_id IS NOT NULL AND provider_id IS NOT NULL)" + }, + "credential_managed_oauth_source_check": { + "name": "credential_managed_oauth_source_check", + "value": "(type::text <> 'managed_oauth') OR (\n account_id IS NULL\n AND provider_id IS NOT NULL\n AND authorization_app_id IS NOT NULL\n AND provider_subject_id IS NOT NULL\n AND managed_oauth_status IS NOT NULL\n AND granted_scopes IS NOT NULL\n AND encrypted_oauth_token_set IS NOT NULL\n AND granted_at IS NOT NULL\n )" + }, + "credential_managed_oauth_group_binding_check": { + "name": "credential_managed_oauth_group_binding_check", + "value": "(type::text <> 'managed_oauth') OR (\n credential_group_enrollment_id IS NOT NULL\n AND credential_group_option_id IS NOT NULL\n AND managed_oauth_scope_version IS NOT NULL\n AND managed_oauth_scope_version > 0\n )" + }, + "credential_managed_mcp_source_check": { + "name": "credential_managed_mcp_source_check", + "value": "(type::text <> 'managed_mcp') OR (\n id LIKE 'mcp-cg-%'\n AND account_id IS NULL\n AND provider_id IS NULL\n AND authorization_app_id IS NULL\n AND credential_group_enrollment_id IS NOT NULL\n AND credential_group_option_id IS NULL\n AND mcp_server_id IS NOT NULL\n AND managed_oauth_status IS NOT NULL\n AND (managed_oauth_status <> 'active' OR (\n encrypted_oauth_token_set IS NOT NULL\n AND mcp_tools IS NOT NULL\n ))\n AND granted_at IS NOT NULL\n AND managed_oauth_scope_version IS NULL\n AND granted_scopes IS NULL\n AND provider_metadata IS NULL\n AND created_by IS NULL\n AND env_key IS NULL\n AND env_owner_user_id IS NULL\n AND encrypted_service_account_key IS NULL\n AND unredacted = false\n )" + }, + "credential_creator_source_check": { + "name": "credential_creator_source_check", + "value": "(type::text = 'managed_mcp') OR created_by IS NOT NULL" + }, + "credential_workspace_env_source_check": { + "name": "credential_workspace_env_source_check", + "value": "(type <> 'env_workspace') OR (env_key IS NOT NULL AND env_owner_user_id IS NULL)" + }, + "credential_personal_env_source_check": { + "name": "credential_personal_env_source_check", + "value": "(type <> 'env_personal') OR (env_key IS NOT NULL AND env_owner_user_id IS NOT NULL)" + } + }, + "isRLSEnabled": false + }, + "public.credential_group": { + "name": "credential_group", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "public_id": { + "name": "public_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "options": { + "name": "options", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "encrypted_provider_configuration": { + "name": "encrypted_provider_configuration", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "credential_group_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "credential_group_organization_unique": { + "name": "credential_group_organization_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_public_id_unique": { + "name": "credential_group_public_id_unique", + "columns": [ + { + "expression": "public_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_workspace_unique": { + "name": "credential_group_workspace_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "credential_group_workspace_id_workspace_id_fk": { + "name": "credential_group_workspace_id_workspace_id_fk", + "tableFrom": "credential_group", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_group_organization_id_organization_id_fk": { + "name": "credential_group_organization_id_organization_id_fk", + "tableFrom": "credential_group", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_group_created_by_user_id_fk": { + "name": "credential_group_created_by_user_id_fk", + "tableFrom": "credential_group", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "credential_group_owner_check": { + "name": "credential_group_owner_check", + "value": "num_nonnulls(\"credential_group\".\"workspace_id\", \"credential_group\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.credential_group_enrollment": { + "name": "credential_group_enrollment", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "credential_group_id": { + "name": "credential_group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "credential_group_enrollment_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'invited'" + }, + "invitation_token_hash": { + "name": "invitation_token_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "invitation_expires_at": { + "name": "invitation_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "invited_at": { + "name": "invited_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "sent_at": { + "name": "sent_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "revoked_at": { + "name": "revoked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_delivery_error": { + "name": "last_delivery_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "credential_group_enrollment_group_user_unique": { + "name": "credential_group_enrollment_group_user_unique", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential_group_enrollment\".\"user_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_user_id_idx": { + "name": "credential_group_enrollment_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_group_email_unique": { + "name": "credential_group_enrollment_group_email_unique", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_invitation_token_hash_unique": { + "name": "credential_group_enrollment_invitation_token_hash_unique", + "columns": [ + { + "expression": "invitation_token_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_group_status_idx": { + "name": "credential_group_enrollment_group_status_idx", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_group_invited_at_id_idx": { + "name": "credential_group_enrollment_group_invited_at_id_idx", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "invited_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "credential_group_enrollment_credential_group_id_credential_group_id_fk": { + "name": "credential_group_enrollment_credential_group_id_credential_group_id_fk", + "tableFrom": "credential_group_enrollment", + "tableTo": "credential_group", + "columnsFrom": ["credential_group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_group_enrollment_user_id_user_id_fk": { + "name": "credential_group_enrollment_user_id_user_id_fk", + "tableFrom": "credential_group_enrollment", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_group_enrollment_created_by_user_id_fk": { + "name": "credential_group_enrollment_created_by_user_id_fk", + "tableFrom": "credential_group_enrollment", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "credential_group_enrollment_normalized_email_check": { + "name": "credential_group_enrollment_normalized_email_check", + "value": "\"credential_group_enrollment\".\"email\" = lower(btrim(\"credential_group_enrollment\".\"email\")) AND length(\"credential_group_enrollment\".\"email\") BETWEEN 3 AND 320" + }, + "credential_group_enrollment_invitation_token_hash_length_check": { + "name": "credential_group_enrollment_invitation_token_hash_length_check", + "value": "length(\"credential_group_enrollment\".\"invitation_token_hash\") = 64" + } + }, + "isRLSEnabled": false + }, + "public.credential_member": { + "name": "credential_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "credential_member_role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'member'" + }, + "status": { + "name": "status", + "type": "credential_member_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "joined_at": { + "name": "joined_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "invited_by": { + "name": "invited_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "credential_member_user_id_idx": { + "name": "credential_member_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_member_role_idx": { + "name": "credential_member_role_idx", + "columns": [ + { + "expression": "role", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_member_status_idx": { + "name": "credential_member_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_member_unique": { + "name": "credential_member_unique", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "credential_member_credential_id_credential_id_fk": { + "name": "credential_member_credential_id_credential_id_fk", + "tableFrom": "credential_member", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_member_user_id_user_id_fk": { + "name": "credential_member_user_id_user_id_fk", + "tableFrom": "credential_member", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_member_invited_by_user_id_fk": { + "name": "credential_member_invited_by_user_id_fk", + "tableFrom": "credential_member", + "tableTo": "user", + "columnsFrom": ["invited_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_block": { + "name": "custom_block", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "icon_url": { + "name": "icon_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "inputs": { + "name": "inputs", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "outputs": { + "name": "outputs", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "trace_child_runs": { + "name": "trace_child_runs", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_block_workflow_id_idx": { + "name": "custom_block_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_block_organization_type_unique": { + "name": "custom_block_organization_type_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_block_organization_id_organization_id_fk": { + "name": "custom_block_organization_id_organization_id_fk", + "tableFrom": "custom_block", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "custom_block_workflow_id_workflow_id_fk": { + "name": "custom_block_workflow_id_workflow_id_fk", + "tableFrom": "custom_block", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "custom_block_created_by_user_id_fk": { + "name": "custom_block_created_by_user_id_fk", + "tableFrom": "custom_block", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_tools": { + "name": "custom_tools", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "schema": { + "name": "schema", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_tools_workspace_title_unique": { + "name": "custom_tools_workspace_title_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "title", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_tools_workspace_id_workspace_id_fk": { + "name": "custom_tools_workspace_id_workspace_id_fk", + "tableFrom": "custom_tools", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "custom_tools_user_id_user_id_fk": { + "name": "custom_tools_user_id_user_id_fk", + "tableFrom": "custom_tools", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dashboard": { + "name": "dashboard", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "dashboard_workspace_id_unique": { + "name": "dashboard_workspace_id_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "dashboard_workspace_id_workspace_id_fk": { + "name": "dashboard_workspace_id_workspace_id_fk", + "tableFrom": "dashboard", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "dashboard_created_by_user_id_fk": { + "name": "dashboard_created_by_user_id_fk", + "tableFrom": "dashboard", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "dashboard_updated_by_user_id_fk": { + "name": "dashboard_updated_by_user_id_fk", + "tableFrom": "dashboard", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.data_drain_runs": { + "name": "data_drain_runs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "drain_id": { + "name": "drain_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "data_drain_run_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "trigger": { + "name": "trigger", + "type": "data_drain_run_trigger", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "finished_at": { + "name": "finished_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "rows_exported": { + "name": "rows_exported", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "bytes_written": { + "name": "bytes_written", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "cursor_before": { + "name": "cursor_before", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cursor_after": { + "name": "cursor_after", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "locators": { + "name": "locators", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + } + }, + "indexes": { + "data_drain_runs_drain_started_idx": { + "name": "data_drain_runs_drain_started_idx", + "columns": [ + { + "expression": "drain_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "data_drain_runs_drain_id_data_drains_id_fk": { + "name": "data_drain_runs_drain_id_data_drains_id_fk", + "tableFrom": "data_drain_runs", + "tableTo": "data_drains", + "columnsFrom": ["drain_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.data_drains": { + "name": "data_drains", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "data_drain_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "destination_type": { + "name": "destination_type", + "type": "data_drain_destination", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "destination_config": { + "name": "destination_config", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "destination_credentials": { + "name": "destination_credentials", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "schedule_cadence": { + "name": "schedule_cadence", + "type": "data_drain_cadence", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "cursor": { + "name": "cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_run_at": { + "name": "last_run_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_success_at": { + "name": "last_success_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "data_drains_due_idx": { + "name": "data_drains_due_idx", + "columns": [ + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_run_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "data_drains_org_name_unique": { + "name": "data_drains_org_name_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "data_drains_organization_id_organization_id_fk": { + "name": "data_drains_organization_id_organization_id_fk", + "tableFrom": "data_drains", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "data_drains_created_by_user_id_fk": { + "name": "data_drains_created_by_user_id_fk", + "tableFrom": "data_drains", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.deleted_account_identity": { + "name": "deleted_account_identity", + "schema": "", + "columns": { + "identity_hash": { + "name": "identity_hash", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "deleted_account_identity_expires_at_idx": { + "name": "deleted_account_identity_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.desktop_devices": { + "name": "desktop_devices", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "session_id": { + "name": "session_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "app_version": { + "name": "app_version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "platform": { + "name": "platform", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "capabilities": { + "name": "capabilities", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "revoked_at": { + "name": "revoked_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "desktop_devices_user_id_idx": { + "name": "desktop_devices_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "desktop_devices_session_id_idx": { + "name": "desktop_devices_session_id_idx", + "columns": [ + { + "expression": "session_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "desktop_devices_user_id_user_id_fk": { + "name": "desktop_devices_user_id_user_id_fk", + "tableFrom": "desktop_devices", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "desktop_devices_session_id_session_id_fk": { + "name": "desktop_devices_session_id_session_id_fk", + "tableFrom": "desktop_devices", + "tableTo": "session", + "columnsFrom": ["session_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.docs_embeddings": { + "name": "docs_embeddings", + "schema": "", + "columns": { + "chunk_id": { + "name": "chunk_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "chunk_text": { + "name": "chunk_text", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_document": { + "name": "source_document", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_link": { + "name": "source_link", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header_text": { + "name": "header_text", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header_level": { + "name": "header_level", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "embedding": { + "name": "embedding", + "type": "vector(1536)", + "primaryKey": false, + "notNull": true + }, + "embedding_model": { + "name": "embedding_model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text-embedding-3-small'" + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "chunk_text_tsv": { + "name": "chunk_text_tsv", + "type": "tsvector", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "to_tsvector('english', \"docs_embeddings\".\"chunk_text\")", + "type": "stored" + } + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_emb_source_document_idx": { + "name": "docs_emb_source_document_idx", + "columns": [ + { + "expression": "source_document", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_header_level_idx": { + "name": "docs_emb_header_level_idx", + "columns": [ + { + "expression": "header_level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_source_header_idx": { + "name": "docs_emb_source_header_idx", + "columns": [ + { + "expression": "source_document", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "header_level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_model_idx": { + "name": "docs_emb_model_idx", + "columns": [ + { + "expression": "embedding_model", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_created_at_idx": { + "name": "docs_emb_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_embedding_vector_hnsw_idx": { + "name": "docs_embedding_vector_hnsw_idx", + "columns": [ + { + "expression": "embedding", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "docs_emb_metadata_gin_idx": { + "name": "docs_emb_metadata_gin_idx", + "columns": [ + { + "expression": "metadata", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + }, + "docs_emb_chunk_text_fts_idx": { + "name": "docs_emb_chunk_text_fts_idx", + "columns": [ + { + "expression": "chunk_text_tsv", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "docs_embedding_not_null_check": { + "name": "docs_embedding_not_null_check", + "value": "\"embedding\" IS NOT NULL" + }, + "docs_header_level_check": { + "name": "docs_header_level_check", + "value": "\"header_level\" >= 1 AND \"header_level\" <= 6" + } + }, + "isRLSEnabled": false + }, + "public.document": { + "name": "document", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "file_url": { + "name": "file_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "file_size": { + "name": "file_size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chunk_count": { + "name": "chunk_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "character_count": { + "name": "character_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "processing_status": { + "name": "processing_status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "processing_attempts": { + "name": "processing_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "processing_queued_at": { + "name": "processing_queued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "processing_queue_token": { + "name": "processing_queue_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "processing_started_at": { + "name": "processing_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "processing_deferred_until": { + "name": "processing_deferred_until", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "processing_completed_at": { + "name": "processing_completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "processing_error": { + "name": "processing_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "processing_recovery_after": { + "name": "processing_recovery_after", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "user_excluded": { + "name": "user_excluded", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "tag1": { + "name": "tag1", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag2": { + "name": "tag2", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag3": { + "name": "tag3", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag4": { + "name": "tag4", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag5": { + "name": "tag5", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag6": { + "name": "tag6", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag7": { + "name": "tag7", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "number1": { + "name": "number1", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number2": { + "name": "number2", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number3": { + "name": "number3", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number4": { + "name": "number4", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number5": { + "name": "number5", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "date1": { + "name": "date1", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "date2": { + "name": "date2", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "boolean1": { + "name": "boolean1", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "boolean2": { + "name": "boolean2", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "boolean3": { + "name": "boolean3", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_url": { + "name": "source_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "acl": { + "name": "acl", + "type": "text[]", + "primaryKey": false, + "notNull": true, + "default": "'{ws}'::text[]" + }, + "acl_requirements": { + "name": "acl_requirements", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "acl_verified_at": { + "name": "acl_verified_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "source_modified_at": { + "name": "source_modified_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "source_seen_at": { + "name": "source_seen_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "doc_uploaded_by_idx": { + "name": "doc_uploaded_by_idx", + "columns": [ + { + "expression": "uploaded_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"uploaded_by\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_kb_source_modified_idx": { + "name": "doc_kb_source_modified_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_modified_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"deleted_at\" IS NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_acl_gin_idx": { + "name": "doc_acl_gin_idx", + "columns": [ + { + "expression": "acl", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "array_ops" + } + ], + "isUnique": false, + "where": "\"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "gin", + "with": {} + }, + "doc_filename_idx": { + "name": "doc_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_processing_status_idx": { + "name": "doc_processing_status_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "processing_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_processing_recovery_idx": { + "name": "doc_connector_processing_recovery_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "uploaded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"processing_status\" IN ('pending', 'processing', 'failed') AND \"document\".\"connector_id\" IS NOT NULL AND \"document\".\"content_hash\" IS NOT NULL AND \"document\".\"storage_key\" IS NOT NULL AND \"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL AND \"document\".\"deleted_at\" IS NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_connector_processing_status_idx": { + "name": "doc_connector_processing_status_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "processing_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"processing_status\" IN ('pending', 'processing', 'failed') AND \"document\".\"connector_id\" IS NOT NULL AND \"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL AND \"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_external_id_idx": { + "name": "doc_connector_external_id_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_source_lookup_idx": { + "name": "doc_connector_source_lookup_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_reconciliation_v2_idx": { + "name": "doc_connector_reconciliation_v2_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_active_kb_token_count_idx": { + "name": "doc_active_kb_token_count_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "token_count", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL AND \"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_storage_key_idx": { + "name": "doc_storage_key_idx", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"storage_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_archived_at_partial_idx": { + "name": "doc_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_deleted_at_partial_idx": { + "name": "doc_deleted_at_partial_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_tombstone_idx": { + "name": "doc_connector_tombstone_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"archived_at\" IS NULL AND (\"document\".\"deleted_at\" IS NOT NULL OR \"document\".\"content_hash\" IS NULL)", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_live_idx": { + "name": "doc_connector_live_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL AND \"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag1_lower_idx": { + "name": "doc_kb_tag1_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag1\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag2_lower_idx": { + "name": "doc_kb_tag2_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag2\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag3_lower_idx": { + "name": "doc_kb_tag3_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag3\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag4_lower_idx": { + "name": "doc_kb_tag4_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag4\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag5_lower_idx": { + "name": "doc_kb_tag5_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag5\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag6_lower_idx": { + "name": "doc_kb_tag6_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag6\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag7_lower_idx": { + "name": "doc_kb_tag7_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag7\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number1_idx": { + "name": "doc_number1_idx", + "columns": [ + { + "expression": "number1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number2_idx": { + "name": "doc_number2_idx", + "columns": [ + { + "expression": "number2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number3_idx": { + "name": "doc_number3_idx", + "columns": [ + { + "expression": "number3", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number4_idx": { + "name": "doc_number4_idx", + "columns": [ + { + "expression": "number4", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number5_idx": { + "name": "doc_number5_idx", + "columns": [ + { + "expression": "number5", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_date1_idx": { + "name": "doc_date1_idx", + "columns": [ + { + "expression": "date1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_date2_idx": { + "name": "doc_date2_idx", + "columns": [ + { + "expression": "date2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_boolean1_idx": { + "name": "doc_boolean1_idx", + "columns": [ + { + "expression": "boolean1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_boolean2_idx": { + "name": "doc_boolean2_idx", + "columns": [ + { + "expression": "boolean2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_boolean3_idx": { + "name": "doc_boolean3_idx", + "columns": [ + { + "expression": "boolean3", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "document_knowledge_base_id_knowledge_base_id_fk": { + "name": "document_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "document", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "document_connector_id_knowledge_connector_id_fk": { + "name": "document_connector_id_knowledge_connector_id_fk", + "tableFrom": "document", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "document_uploaded_by_user_id_fk": { + "name": "document_uploaded_by_user_id_fk", + "tableFrom": "document", + "tableTo": "user", + "columnsFrom": ["uploaded_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "doc_acl_token_shape_check": { + "name": "doc_acl_token_shape_check", + "value": "array_position(\"document\".\"acl\", NULL) IS NULL AND (cardinality(\"document\".\"acl\") = 0 OR (cardinality(\"document\".\"acl\") = array_length(string_to_array(array_to_string(\"document\".\"acl\", E'\\n'), E'\\n'), 1) AND array_to_string(\"document\".\"acl\", E'\\n') ~ '^((ws|pub|link|u:[^\\nA-Z]+@[^\\nA-Z]+|[gs]:[^\\n:]+:[^\\n:]+:[^\\n]+)(\\n(ws|pub|link|u:[^\\nA-Z]+@[^\\nA-Z]+|[gs]:[^\\n:]+:[^\\n:]+:[^\\n]+))*)$'))" + } + }, + "isRLSEnabled": false + }, + "public.document_secret_provenance": { + "name": "document_secret_provenance", + "schema": "", + "columns": { + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "source_hash": { + "name": "source_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "document_secret_provenance_document_id_document_id_fk": { + "name": "document_secret_provenance_document_id_document_id_fk", + "tableFrom": "document_secret_provenance", + "tableTo": "document", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "document_secret_provenance_status_check": { + "name": "document_secret_provenance_status_check", + "value": "\"document_secret_provenance\".\"status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.embedding": { + "name": "embedding", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chunk_index": { + "name": "chunk_index", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "chunk_hash": { + "name": "chunk_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "content_length": { + "name": "content_length", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "embedding": { + "name": "embedding", + "type": "vector(1536)", + "primaryKey": false, + "notNull": false + }, + "embedding_384": { + "name": "embedding_384", + "type": "vector(384)", + "primaryKey": false, + "notNull": false + }, + "embedding_768": { + "name": "embedding_768", + "type": "vector(768)", + "primaryKey": false, + "notNull": false + }, + "embedding_1024": { + "name": "embedding_1024", + "type": "vector(1024)", + "primaryKey": false, + "notNull": false + }, + "embedding_3072": { + "name": "embedding_3072", + "type": "vector(3072)", + "primaryKey": false, + "notNull": false + }, + "embedding_model": { + "name": "embedding_model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text-embedding-3-small'" + }, + "start_offset": { + "name": "start_offset", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "end_offset": { + "name": "end_offset", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "tag1": { + "name": "tag1", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag2": { + "name": "tag2", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag3": { + "name": "tag3", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag4": { + "name": "tag4", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag5": { + "name": "tag5", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag6": { + "name": "tag6", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag7": { + "name": "tag7", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "number1": { + "name": "number1", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number2": { + "name": "number2", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number3": { + "name": "number3", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number4": { + "name": "number4", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number5": { + "name": "number5", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "date1": { + "name": "date1", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "date2": { + "name": "date2", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "boolean1": { + "name": "boolean1", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "boolean2": { + "name": "boolean2", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "boolean3": { + "name": "boolean3", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "content_tsv": { + "name": "content_tsv", + "type": "tsvector", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "to_tsvector('english', \"embedding\".\"content\")", + "type": "stored" + } + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "emb_doc_chunk_idx": { + "name": "emb_doc_chunk_idx", + "columns": [ + { + "expression": "document_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chunk_index", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_model_idx": { + "name": "emb_kb_model_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "embedding_model", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_enabled_idx": { + "name": "emb_kb_enabled_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_doc_enabled_idx": { + "name": "emb_doc_enabled_idx", + "columns": [ + { + "expression": "document_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag1_lower_idx": { + "name": "emb_kb_tag1_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag1\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag2_lower_idx": { + "name": "emb_kb_tag2_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag2\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag3_lower_idx": { + "name": "emb_kb_tag3_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag3\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag4_lower_idx": { + "name": "emb_kb_tag4_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag4\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag5_lower_idx": { + "name": "emb_kb_tag5_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag5\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag6_lower_idx": { + "name": "emb_kb_tag6_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag6\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag7_lower_idx": { + "name": "emb_kb_tag7_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag7\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number1_idx": { + "name": "emb_number1_idx", + "columns": [ + { + "expression": "number1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number2_idx": { + "name": "emb_number2_idx", + "columns": [ + { + "expression": "number2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number3_idx": { + "name": "emb_number3_idx", + "columns": [ + { + "expression": "number3", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number4_idx": { + "name": "emb_number4_idx", + "columns": [ + { + "expression": "number4", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number5_idx": { + "name": "emb_number5_idx", + "columns": [ + { + "expression": "number5", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_date1_idx": { + "name": "emb_date1_idx", + "columns": [ + { + "expression": "date1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "emb_date2_idx": { + "name": "emb_date2_idx", + "columns": [ + { + "expression": "date2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "emb_boolean1_idx": { + "name": "emb_boolean1_idx", + "columns": [ + { + "expression": "boolean1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_boolean2_idx": { + "name": "emb_boolean2_idx", + "columns": [ + { + "expression": "boolean2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_boolean3_idx": { + "name": "emb_boolean3_idx", + "columns": [ + { + "expression": "boolean3", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_content_fts_idx": { + "name": "emb_content_fts_idx", + "columns": [ + { + "expression": "content_tsv", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": { + "fastupdate": "off" + } + } + }, + "foreignKeys": { + "embedding_knowledge_base_id_knowledge_base_id_fk": { + "name": "embedding_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "embedding", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "embedding_document_id_document_id_fk": { + "name": "embedding_document_id_document_id_fk", + "tableFrom": "embedding", + "tableTo": "document", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "embedding_width_check": { + "name": "embedding_width_check", + "value": "num_nonnulls(\"embedding\", \"embedding_384\", \"embedding_768\", \"embedding_1024\", \"embedding_3072\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.embedding_search": { + "name": "embedding_search", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "acl": { + "name": "acl", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "binary": { + "name": "binary", + "type": "bit(1536)", + "primaryKey": false, + "notNull": false + }, + "binary_384": { + "name": "binary_384", + "type": "bit(384)", + "primaryKey": false, + "notNull": false + }, + "binary_768": { + "name": "binary_768", + "type": "bit(768)", + "primaryKey": false, + "notNull": false + }, + "binary_1024": { + "name": "binary_1024", + "type": "bit(1024)", + "primaryKey": false, + "notNull": false + }, + "binary_3072": { + "name": "binary_3072", + "type": "bit(3072)", + "primaryKey": false, + "notNull": false + }, + "vector": { + "name": "vector", + "type": "halfvec(1536)", + "primaryKey": false, + "notNull": false + }, + "vector_384": { + "name": "vector_384", + "type": "halfvec(384)", + "primaryKey": false, + "notNull": false + }, + "vector_512": { + "name": "vector_512", + "type": "halfvec(512)", + "primaryKey": false, + "notNull": false + }, + "vector_768": { + "name": "vector_768", + "type": "halfvec(768)", + "primaryKey": false, + "notNull": false + }, + "vector_1024": { + "name": "vector_1024", + "type": "halfvec(1024)", + "primaryKey": false, + "notNull": false + }, + "vector_3072": { + "name": "vector_3072", + "type": "halfvec(3072)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "embedding_search_kb_idx": { + "name": "embedding_search_kb_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "embedding_search_document_lookup_idx": { + "name": "embedding_search_document_lookup_idx", + "columns": [ + { + "expression": "document_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"embedding_search\".\"enabled\"", + "concurrently": true, + "method": "btree", + "with": {} + }, + "embedding_search_cosine_hnsw_idx": { + "name": "embedding_search_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_512_cosine_hnsw_idx": { + "name": "embedding_search_512_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_512", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_384_cosine_hnsw_idx": { + "name": "embedding_search_384_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_384", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_768_cosine_hnsw_idx": { + "name": "embedding_search_768_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_768", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_1024_cosine_hnsw_idx": { + "name": "embedding_search_1024_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_1024", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_3072_cosine_hnsw_idx": { + "name": "embedding_search_3072_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_3072", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + } + }, + "foreignKeys": { + "embedding_search_id_embedding_id_fk": { + "name": "embedding_search_id_embedding_id_fk", + "tableFrom": "embedding_search", + "tableTo": "embedding", + "columnsFrom": ["id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "embedding_search_width_check": { + "name": "embedding_search_width_check", + "value": "num_nonnulls(\"binary\", \"binary_384\", \"binary_768\", \"binary_1024\", \"binary_3072\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.embedding_secret_provenance": { + "name": "embedding_secret_provenance", + "schema": "", + "columns": { + "embedding_id": { + "name": "embedding_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "embedding_secret_provenance_embedding_id_embedding_id_fk": { + "name": "embedding_secret_provenance_embedding_id_embedding_id_fk", + "tableFrom": "embedding_secret_provenance", + "tableTo": "embedding", + "columnsFrom": ["embedding_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "embedding_secret_provenance_status_check": { + "name": "embedding_secret_provenance_status_check", + "value": "\"embedding_secret_provenance\".\"status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.environment": { + "name": "environment", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "variables": { + "name": "variables", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "environment_user_id_user_id_fk": { + "name": "environment_user_id_user_id_fk", + "tableFrom": "environment", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "environment_user_id_unique": { + "name": "environment_user_id_unique", + "nullsNotDistinct": false, + "columns": ["user_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.execution_large_value_dependencies": { + "name": "execution_large_value_dependencies", + "schema": "", + "columns": { + "parent_key": { + "name": "parent_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "child_key": { + "name": "child_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "execution_large_value_dependencies_workspace_parent_key_idx": { + "name": "execution_large_value_dependencies_workspace_parent_key_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_value_dependencies_workspace_child_key_idx": { + "name": "execution_large_value_dependencies_workspace_child_key_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "child_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "execution_large_value_dependencies_workspace_id_workspace_id_fk": { + "name": "execution_large_value_dependencies_workspace_id_workspace_id_fk", + "tableFrom": "execution_large_value_dependencies", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "execution_large_value_dependencies_parent_key_child_key_pk": { + "name": "execution_large_value_dependencies_parent_key_child_key_pk", + "columns": ["parent_key", "child_key"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.execution_large_value_references": { + "name": "execution_large_value_references", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "execution_large_value_reference_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "execution_large_value_references_workspace_execution_source_idx": { + "name": "execution_large_value_references_workspace_execution_source_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_value_references_workflow_id_idx": { + "name": "execution_large_value_references_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "execution_large_value_references_workspace_id_workspace_id_fk": { + "name": "execution_large_value_references_workspace_id_workspace_id_fk", + "tableFrom": "execution_large_value_references", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "execution_large_value_references_workflow_id_workflow_id_fk": { + "name": "execution_large_value_references_workflow_id_workflow_id_fk", + "tableFrom": "execution_large_value_references", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "execution_large_value_references_key_execution_id_source_pk": { + "name": "execution_large_value_references_key_execution_id_source_pk", + "columns": ["key", "execution_id", "source"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.execution_large_values": { + "name": "execution_large_values", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "owner_execution_id": { + "name": "owner_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "execution_large_values_owner_execution_id_idx": { + "name": "execution_large_values_owner_execution_id_idx", + "columns": [ + { + "expression": "owner_execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_values_cleanup_idx": { + "name": "execution_large_values_cleanup_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"execution_large_values\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_values_tombstone_cleanup_idx": { + "name": "execution_large_values_tombstone_cleanup_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"execution_large_values\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_values_workflow_id_idx": { + "name": "execution_large_values_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_values_workspace_id_idx": { + "name": "execution_large_values_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "execution_large_values_workspace_id_workspace_id_fk": { + "name": "execution_large_values_workspace_id_workspace_id_fk", + "tableFrom": "execution_large_values", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "execution_large_values_workflow_id_workflow_id_fk": { + "name": "execution_large_values_workflow_id_workflow_id_fk", + "tableFrom": "execution_large_values", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.file_search_dependency": { + "name": "file_search_dependency", + "schema": "", + "columns": { + "build_id": { + "name": "build_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "file_search_dependency_file_idx": { + "name": "file_search_dependency_file_idx", + "columns": [ + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "build_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "file_search_dependency_owner_idx": { + "name": "file_search_dependency_owner_idx", + "columns": [ + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "build_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "file_search_dependency_build_id_workspace_file_search_build_id_fk": { + "name": "file_search_dependency_build_id_workspace_file_search_build_id_fk", + "tableFrom": "file_search_dependency", + "tableTo": "workspace_file_search_build", + "columnsFrom": ["build_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "file_search_dependency_build_id_file_id_pk": { + "name": "file_search_dependency_build_id_file_id_pk", + "columns": ["build_id", "file_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.file_search_dispatch_queue": { + "name": "file_search_dispatch_queue", + "schema": "", + "columns": { + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "enqueued_at": { + "name": "enqueued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_dispatched_at": { + "name": "last_dispatched_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "file_search_dispatch_schedule_idx": { + "name": "file_search_dispatch_schedule_idx", + "columns": [ + { + "expression": "last_dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "first" + }, + { + "expression": "enqueued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "file_search_dispatch_queue_entity_type_entity_id_pk": { + "name": "file_search_dispatch_queue_entity_type_entity_id_pk", + "columns": ["entity_type", "entity_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "file_search_dispatch_owner_check": { + "name": "file_search_dispatch_owner_check", + "value": "\"file_search_dispatch_queue\".\"entity_type\" IN ('workspace', 'project') AND length(\"file_search_dispatch_queue\".\"entity_id\") > 0" + } + }, + "isRLSEnabled": false + }, + "public.folder": { + "name": "folder", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "resource_type": { + "name": "resource_type", + "type": "folder_resource_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "locked": { + "name": "locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "folder_project_id_idx": { + "name": "folder_project_id_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "folder_project_resource_parent_name_active_unique": { + "name": "folder_project_resource_parent_name_active_unique", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"parent_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"folder\".\"deleted_at\" IS NULL AND \"folder\".\"project_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "folder_user_idx": { + "name": "folder_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_workspace_resource_parent_idx": { + "name": "folder_workspace_resource_parent_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_parent_sort_idx": { + "name": "folder_parent_sort_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sort_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_deleted_at_idx": { + "name": "folder_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_workspace_deleted_partial_idx": { + "name": "folder_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"folder\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_workspace_resource_parent_name_active_unique": { + "name": "folder_workspace_resource_parent_name_active_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"parent_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"folder\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "folder_project_id_project_id_fk": { + "name": "folder_project_id_project_id_fk", + "tableFrom": "folder", + "tableTo": "project", + "columnsFrom": ["project_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "folder_user_id_user_id_fk": { + "name": "folder_user_id_user_id_fk", + "tableFrom": "folder", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_workspace_id_workspace_id_fk": { + "name": "folder_workspace_id_workspace_id_fk", + "tableFrom": "folder", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_parent_id_folder_id_fk": { + "name": "folder_parent_id_folder_id_fk", + "tableFrom": "folder", + "tableTo": "folder", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "folder_workspace_parent_owner_fk": { + "name": "folder_workspace_parent_owner_fk", + "tableFrom": "folder", + "tableTo": "folder", + "columnsFrom": ["parent_id", "workspace_id", "resource_type"], + "columnsTo": ["id", "workspace_id", "resource_type"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "folder_project_parent_owner_fk": { + "name": "folder_project_parent_owner_fk", + "tableFrom": "folder", + "tableTo": "folder", + "columnsFrom": ["parent_id", "project_id", "resource_type"], + "columnsTo": ["id", "project_id", "resource_type"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "folder_workspace_owner_type_unique": { + "name": "folder_workspace_owner_type_unique", + "nullsNotDistinct": false, + "columns": ["id", "workspace_id", "resource_type"] + }, + "folder_project_owner_type_unique": { + "name": "folder_project_owner_type_unique", + "nullsNotDistinct": false, + "columns": ["id", "project_id", "resource_type"] + } + }, + "policies": {}, + "checkConstraints": { + "folder_owner_check": { + "name": "folder_owner_check", + "value": "num_nonnulls(\"folder\".\"workspace_id\", \"folder\".\"project_id\") = 1 AND (\"folder\".\"project_id\" IS NULL OR \"folder\".\"resource_type\" = 'file')" + } + }, + "isRLSEnabled": false + }, + "public.idempotency_key": { + "name": "idempotency_key", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "result": { + "name": "result", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "idempotency_key_created_at_idx": { + "name": "idempotency_key_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.invitation": { + "name": "invitation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "invitation_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'organization'" + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "inviter_id": { + "name": "inviter_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "membership_intent": { + "name": "membership_intent", + "type": "invitation_membership_intent", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'internal'" + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "invitation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "invitation_email_idx": { + "name": "invitation_email_idx", + "columns": [ + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "invitation_organization_id_idx": { + "name": "invitation_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "invitation_status_idx": { + "name": "invitation_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "invitation_pending_email_org_unique": { + "name": "invitation_pending_email_org_unique", + "columns": [ + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"invitation\".\"status\" = 'pending' AND \"invitation\".\"organization_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "invitation_inviter_id_user_id_fk": { + "name": "invitation_inviter_id_user_id_fk", + "tableFrom": "invitation", + "tableTo": "user", + "columnsFrom": ["inviter_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "invitation_organization_id_organization_id_fk": { + "name": "invitation_organization_id_organization_id_fk", + "tableFrom": "invitation", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "invitation_token_unique": { + "name": "invitation_token_unique", + "nullsNotDistinct": false, + "columns": ["token"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.invitation_workspace_grant": { + "name": "invitation_workspace_grant", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "invitation_id": { + "name": "invitation_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "permission": { + "name": "permission", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "invitation_workspace_grant_unique": { + "name": "invitation_workspace_grant_unique", + "columns": [ + { + "expression": "invitation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "invitation_workspace_grant_workspace_id_idx": { + "name": "invitation_workspace_grant_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "invitation_workspace_grant_invitation_id_invitation_id_fk": { + "name": "invitation_workspace_grant_invitation_id_invitation_id_fk", + "tableFrom": "invitation_workspace_grant", + "tableTo": "invitation", + "columnsFrom": ["invitation_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "invitation_workspace_grant_workspace_id_workspace_id_fk": { + "name": "invitation_workspace_grant_workspace_id_workspace_id_fk", + "tableFrom": "invitation_workspace_grant", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.job_execution_logs": { + "name": "job_execution_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "schedule_id": { + "name": "schedule_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "level": { + "name": "level", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "trigger": { + "name": "trigger", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "ended_at": { + "name": "ended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "total_duration_ms": { + "name": "total_duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "execution_data": { + "name": "execution_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "cost": { + "name": "cost", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "occurrence_at": { + "name": "occurrence_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "outcome": { + "name": "outcome", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "billing_request_id": { + "name": "billing_request_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "job_execution_logs_schedule_occurrence_unique": { + "name": "job_execution_logs_schedule_occurrence_unique", + "columns": [ + { + "expression": "schedule_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "occurrence_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_billing_request_unique": { + "name": "job_execution_logs_billing_request_unique", + "columns": [ + { + "expression": "billing_request_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"job_execution_logs\".\"billing_request_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_open_idx": { + "name": "job_execution_logs_open_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"job_execution_logs\".\"status\" IN ('queued', 'running')", + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_workspace_started_at_idx": { + "name": "job_execution_logs_workspace_started_at_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_workspace_ended_at_id_idx": { + "name": "job_execution_logs_workspace_ended_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"ended_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_execution_id_unique": { + "name": "job_execution_logs_execution_id_unique", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_trigger_idx": { + "name": "job_execution_logs_trigger_idx", + "columns": [ + { + "expression": "trigger", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "job_execution_logs_schedule_id_workflow_schedule_id_fk": { + "name": "job_execution_logs_schedule_id_workflow_schedule_id_fk", + "tableFrom": "job_execution_logs", + "tableTo": "workflow_schedule", + "columnsFrom": ["schedule_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "job_execution_logs_workspace_id_workspace_id_fk": { + "name": "job_execution_logs_workspace_id_workspace_id_fk", + "tableFrom": "job_execution_logs", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_base": { + "name": "knowledge_base", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "folder_id": { + "name": "folder_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_search_index": { + "name": "is_search_index", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "embedding_model": { + "name": "embedding_model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text-embedding-3-small'" + }, + "embedding_dimension": { + "name": "embedding_dimension", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1536 + }, + "chunking_config": { + "name": "chunking_config", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{\"maxSize\": 1024, \"minSize\": 1, \"overlap\": 200}'" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "kb_organization_id_idx": { + "name": "kb_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_organization_search_index_unique": { + "name": "kb_organization_search_index_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"knowledge_base\".\"is_search_index\" = true AND \"knowledge_base\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_organization_name_active_unique": { + "name": "kb_organization_name_active_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"knowledge_base\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_workspace_id_idx": { + "name": "kb_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_user_workspace_idx": { + "name": "kb_user_workspace_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_folder_id_idx": { + "name": "kb_folder_id_idx", + "columns": [ + { + "expression": "folder_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_deleted_at_idx": { + "name": "kb_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_workspace_deleted_partial_idx": { + "name": "kb_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_base\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_workspace_name_active_unique": { + "name": "kb_workspace_name_active_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"knowledge_base\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_workspace_search_index_unique": { + "name": "kb_workspace_search_index_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"knowledge_base\".\"is_search_index\" = true AND \"knowledge_base\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_base_user_id_user_id_fk": { + "name": "knowledge_base_user_id_user_id_fk", + "tableFrom": "knowledge_base", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_base_workspace_id_workspace_id_fk": { + "name": "knowledge_base_workspace_id_workspace_id_fk", + "tableFrom": "knowledge_base", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_base_organization_id_organization_id_fk": { + "name": "knowledge_base_organization_id_organization_id_fk", + "tableFrom": "knowledge_base", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_base_folder_id_folder_id_fk": { + "name": "knowledge_base_folder_id_folder_id_fk", + "tableFrom": "knowledge_base", + "tableTo": "folder", + "columnsFrom": ["folder_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kb_owner_check": { + "name": "kb_owner_check", + "value": "num_nonnulls(\"knowledge_base\".\"workspace_id\", \"knowledge_base\".\"organization_id\") = 1" + }, + "kb_organization_search_index_check": { + "name": "kb_organization_search_index_check", + "value": "\"knowledge_base\".\"organization_id\" IS NULL OR \"knowledge_base\".\"is_search_index\"" + }, + "kb_organization_folder_check": { + "name": "kb_organization_folder_check", + "value": "\"knowledge_base\".\"organization_id\" IS NULL OR \"knowledge_base\".\"folder_id\" IS NULL" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_base_import": { + "name": "knowledge_base_import", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_key": { + "name": "source_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "documents_total": { + "name": "documents_total", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "documents_imported": { + "name": "documents_imported", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "documents_failed": { + "name": "documents_failed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "vectors_reused": { + "name": "vectors_reused", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "failures": { + "name": "failures", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "knowledge_base_import_watchdog_idx": { + "name": "knowledge_base_import_watchdog_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "knowledge_base_import_knowledge_base_id_idx": { + "name": "knowledge_base_import_knowledge_base_id_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_base_import_workspace_id_workspace_id_fk": { + "name": "knowledge_base_import_workspace_id_workspace_id_fk", + "tableFrom": "knowledge_base_import", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_base_import_knowledge_base_id_knowledge_base_id_fk": { + "name": "knowledge_base_import_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "knowledge_base_import", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_base_tag_definitions": { + "name": "knowledge_base_tag_definitions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tag_slot": { + "name": "tag_slot", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "field_type": { + "name": "field_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "kb_tag_definitions_kb_slot_idx": { + "name": "kb_tag_definitions_kb_slot_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag_slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_tag_definitions_kb_display_name_idx": { + "name": "kb_tag_definitions_kb_display_name_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "display_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_base_tag_definitions_knowledge_base_id_knowledge_base_id_fk": { + "name": "knowledge_base_tag_definitions_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "knowledge_base_tag_definitions", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_connector": { + "name": "knowledge_connector", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "connector_type": { + "name": "connector_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_api_key": { + "name": "encrypted_api_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_config": { + "name": "source_config", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "sync_mode": { + "name": "sync_mode", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'full'" + }, + "sync_interval_minutes": { + "name": "sync_interval_minutes", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1440 + }, + "access_mode": { + "name": "access_mode", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'workspace'" + }, + "credential_group_id": { + "name": "credential_group_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_group_option_id": { + "name": "credential_group_option_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "member_sync_status": { + "name": "member_sync_status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'idle'" + }, + "member_sync_lock_token": { + "name": "member_sync_lock_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "member_sync_lock_lease_at": { + "name": "member_sync_lock_lease_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "next_member_sync_at": { + "name": "next_member_sync_at", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": false + }, + "last_member_sync_at": { + "name": "last_member_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_member_sync_error": { + "name": "last_member_sync_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "member_sync_consecutive_failures": { + "name": "member_sync_consecutive_failures", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "access_rewrite_pending": { + "name": "access_rewrite_pending", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "image_removal_pending": { + "name": "image_removal_pending", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "member_tombstone_cursor": { + "name": "member_tombstone_cursor", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "member_resurrection_cursor": { + "name": "member_resurrection_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "last_sync_at": { + "name": "last_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_sync_error": { + "name": "last_sync_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_sync_doc_count": { + "name": "last_sync_doc_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "listing_checkpoint": { + "name": "listing_checkpoint", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "directory_checkpoint": { + "name": "directory_checkpoint", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "next_sync_at": { + "name": "next_sync_at", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": false + }, + "next_directory_sync_at": { + "name": "next_directory_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "consecutive_failures": { + "name": "consecutive_failures", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "sync_lock_token": { + "name": "sync_lock_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sync_lock_lease_at": { + "name": "sync_lock_lease_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "detached_at": { + "name": "detached_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "detach_reserved_bytes": { + "name": "detach_reserved_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "kc_knowledge_base_id_idx": { + "name": "kc_knowledge_base_id_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_status_next_sync_idx": { + "name": "kc_status_next_sync_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "next_sync_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_archived_at_partial_idx": { + "name": "kc_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_deleted_at_partial_idx": { + "name": "kc_deleted_at_partial_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_member_sync_due_idx": { + "name": "kc_member_sync_due_idx", + "columns": [ + { + "expression": "member_sync_status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "next_member_sync_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector\".\"access_mode\" = 'members' AND \"knowledge_connector\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_directory_sync_due_idx": { + "name": "kc_directory_sync_due_idx", + "columns": [ + { + "expression": "next_directory_sync_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector\".\"access_mode\" = 'admin' AND \"knowledge_connector\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_knowledge_base_id_knowledge_base_id_fk": { + "name": "knowledge_connector_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "knowledge_connector", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_connector_credential_group_id_credential_group_id_fk": { + "name": "knowledge_connector_credential_group_id_credential_group_id_fk", + "tableFrom": "knowledge_connector", + "tableTo": "credential_group", + "columnsFrom": ["credential_group_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kc_access_mode_check": { + "name": "kc_access_mode_check", + "value": "\"knowledge_connector\".\"access_mode\" IN ('workspace', 'members', 'admin')" + }, + "kc_member_sync_status_check": { + "name": "kc_member_sync_status_check", + "value": "\"knowledge_connector\".\"member_sync_status\" IN ('idle', 'pending', 'running', 'error', 'disabled')" + }, + "kc_sync_lock_exclusive_check": { + "name": "kc_sync_lock_exclusive_check", + "value": "NOT (\"knowledge_connector\".\"sync_lock_token\" IS NOT NULL AND \"knowledge_connector\".\"member_sync_lock_token\" IS NOT NULL)" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_member": { + "name": "knowledge_connector_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject_token": { + "name": "subject_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "consecutive_failures": { + "name": "consecutive_failures", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "next_attempt_at": { + "name": "next_attempt_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_started_at": { + "name": "last_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_complete_listing_at": { + "name": "last_complete_listing_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_listed_count": { + "name": "last_listed_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "member_synced_through": { + "name": "member_synced_through", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scope_renewed_at": { + "name": "scope_renewed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scope_renewal_cursor": { + "name": "scope_renewal_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "scope_renewal_started_at": { + "name": "scope_renewal_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "change_cursor": { + "name": "change_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "listing_checkpoint": { + "name": "listing_checkpoint", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "suspended_at": { + "name": "suspended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "kcm_organization_id_idx": { + "name": "kcm_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcm_connector_credential_unique": { + "name": "kcm_connector_credential_unique", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcm_connector_queue_idx": { + "name": "kcm_connector_queue_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "next_attempt_at", + "isExpression": false, + "asc": true, + "nulls": "first" + }, + { + "expression": "last_started_at", + "isExpression": false, + "asc": true, + "nulls": "first" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcm_credential_idx": { + "name": "kcm_credential_idx", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_member_workspace_id_workspace_id_fk": { + "name": "knowledge_connector_member_workspace_id_workspace_id_fk", + "tableFrom": "knowledge_connector_member", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_connector_member_organization_id_organization_id_fk": { + "name": "knowledge_connector_member_organization_id_organization_id_fk", + "tableFrom": "knowledge_connector_member", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_connector_member_connector_id_knowledge_connector_id_fk": { + "name": "knowledge_connector_member_connector_id_knowledge_connector_id_fk", + "tableFrom": "knowledge_connector_member", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_connector_member_credential_id_credential_id_fk": { + "name": "knowledge_connector_member_credential_id_credential_id_fk", + "tableFrom": "knowledge_connector_member", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcm_owner_check": { + "name": "kcm_owner_check", + "value": "num_nonnulls(\"knowledge_connector_member\".\"workspace_id\", \"knowledge_connector_member\".\"organization_id\") = 1" + }, + "kcm_status_check": { + "name": "kcm_status_check", + "value": "\"knowledge_connector_member\".\"status\" IN ('active', 'suspended', 'disabled')" + }, + "kcm_subject_token_shape_check": { + "name": "kcm_subject_token_shape_check", + "value": "\"knowledge_connector_member\".\"subject_token\" ~ '^s:[^:]+:[^:]+:.+$'" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_member_sync_log": { + "name": "knowledge_connector_member_sync_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "members_claimed": { + "name": "members_claimed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "members_completed": { + "name": "members_completed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "members_incomplete": { + "name": "members_incomplete", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "members_failed": { + "name": "members_failed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_failed": { + "name": "docs_failed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "processing_dispatch_failed": { + "name": "processing_dispatch_failed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "docs_listed": { + "name": "docs_listed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_added": { + "name": "docs_added", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_updated": { + "name": "docs_updated", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_unchanged": { + "name": "docs_unchanged", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_hydrated_once": { + "name": "docs_hydrated_once", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "observations_added": { + "name": "observations_added", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "observations_renewed": { + "name": "observations_renewed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "observations_removed": { + "name": "observations_removed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_tombstoned": { + "name": "docs_tombstoned", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_resurrected": { + "name": "docs_resurrected", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_purged": { + "name": "docs_purged", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "credentials_audited": { + "name": "credentials_audited", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "database_failure_class": { + "name": "database_failure_class", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "kcmsl_connector_started_at_idx": { + "name": "kcmsl_connector_started_at_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "\"started_at\" DESC", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcmsl_started_at_partial_idx": { + "name": "kcmsl_started_at_partial_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector_member_sync_log\".\"status\" = 'started'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_member_sync_log_connector_id_knowledge_connector_id_fk": { + "name": "knowledge_connector_member_sync_log_connector_id_knowledge_connector_id_fk", + "tableFrom": "knowledge_connector_member_sync_log", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcmsl_status_check": { + "name": "kcmsl_status_check", + "value": "\"knowledge_connector_member_sync_log\".\"status\" IN ('started', 'partial', 'completed', 'failed')" + }, + "kcmsl_database_failure_class_check": { + "name": "kcmsl_database_failure_class_check", + "value": "\"knowledge_connector_member_sync_log\".\"database_failure_class\" IN ('capacity', 'conflict', 'connection')" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_partition": { + "name": "knowledge_connector_partition", + "schema": "", + "columns": { + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "partition_key": { + "name": "partition_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "generation_id": { + "name": "generation_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "context": { + "name": "context", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "cursor": { + "name": "cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "attempts": { + "name": "attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "retry_at": { + "name": "retry_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_served_at": { + "name": "last_served_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "failure": { + "name": "failure", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "permission_cursor": { + "name": "permission_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "permission_attempts": { + "name": "permission_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "permission_retry_at": { + "name": "permission_retry_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "permission_last_served_at": { + "name": "permission_last_served_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "permission_started_at": { + "name": "permission_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "permission_failure": { + "name": "permission_failure", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "kcp_content_due_idx": { + "name": "kcp_content_due_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "generation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "retry_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_served_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcp_permission_due_idx": { + "name": "kcp_permission_due_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "generation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "permission_retry_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "permission_last_served_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_partition_connector_id_knowledge_connector_id_fk": { + "name": "knowledge_connector_partition_connector_id_knowledge_connector_id_fk", + "tableFrom": "knowledge_connector_partition", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "kcp_pk": { + "name": "kcp_pk", + "columns": ["connector_id", "partition_key"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcp_partition_key_check": { + "name": "kcp_partition_key_check", + "value": "octet_length(\"knowledge_connector_partition\".\"partition_key\") BETWEEN 1 AND 1024" + }, + "kcp_context_check": { + "name": "kcp_context_check", + "value": "jsonb_typeof(\"knowledge_connector_partition\".\"context\") = 'object' AND octet_length(\"knowledge_connector_partition\".\"context\"::text) <= 16384" + }, + "kcp_status_check": { + "name": "kcp_status_check", + "value": "\"knowledge_connector_partition\".\"status\" IN ('pending', 'complete', 'blocked')" + }, + "kcp_cursor_check": { + "name": "kcp_cursor_check", + "value": "(\"knowledge_connector_partition\".\"cursor\" IS NULL OR octet_length(\"knowledge_connector_partition\".\"cursor\") <= 393216) AND (\"knowledge_connector_partition\".\"permission_cursor\" IS NULL OR octet_length(\"knowledge_connector_partition\".\"permission_cursor\") <= 393216)" + }, + "kcp_attempts_check": { + "name": "kcp_attempts_check", + "value": "\"knowledge_connector_partition\".\"attempts\" >= 0 AND \"knowledge_connector_partition\".\"permission_attempts\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_permission_grant": { + "name": "knowledge_connector_permission_grant", + "schema": "", + "columns": { + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "group_key": { + "name": "group_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject_token": { + "name": "subject_token", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "kcpg_subject_idx": { + "name": "kcpg_subject_idx", + "columns": [ + { + "expression": "subject_token", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "group_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "kcpg_snapshot_fk": { + "name": "kcpg_snapshot_fk", + "tableFrom": "knowledge_connector_permission_grant", + "tableTo": "knowledge_connector_permission_snapshot", + "columnsFrom": ["connector_id"], + "columnsTo": ["connector_id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "kcpg_pk": { + "name": "kcpg_pk", + "columns": ["connector_id", "group_key", "subject_token"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcpg_group_check": { + "name": "kcpg_group_check", + "value": "length(\"knowledge_connector_permission_grant\".\"group_key\") BETWEEN 1 AND 255" + }, + "kcpg_subject_check": { + "name": "kcpg_subject_check", + "value": "\"knowledge_connector_permission_grant\".\"subject_token\" ~ '^u:[^[:space:]A-Z]+@[^[:space:]A-Z]+$'" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_permission_snapshot": { + "name": "knowledge_connector_permission_snapshot", + "schema": "", + "columns": { + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "kcps_connector_fk": { + "name": "kcps_connector_fk", + "tableFrom": "knowledge_connector_permission_snapshot", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcps_revision_check": { + "name": "kcps_revision_check", + "value": "\"knowledge_connector_permission_snapshot\".\"revision\" > 0" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_sync_log": { + "name": "knowledge_connector_sync_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "docs_added": { + "name": "docs_added", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_updated": { + "name": "docs_updated", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_deleted": { + "name": "docs_deleted", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_unchanged": { + "name": "docs_unchanged", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_skipped": { + "name": "docs_skipped", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_failed": { + "name": "docs_failed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "listed_count": { + "name": "listed_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "database_failure_class": { + "name": "database_failure_class", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "kcsl_connector_started_at_idx": { + "name": "kcsl_connector_started_at_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "\"started_at\" DESC", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcsl_started_at_partial_idx": { + "name": "kcsl_started_at_partial_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector_sync_log\".\"status\" = 'started'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcsl_terminal_started_at_idx": { + "name": "kcsl_terminal_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector_sync_log\".\"status\" IN ('completed', 'failed')", + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_sync_log_connector_id_knowledge_connector_id_fk": { + "name": "knowledge_connector_sync_log_connector_id_knowledge_connector_id_fk", + "tableFrom": "knowledge_connector_sync_log", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcsl_database_failure_class_check": { + "name": "kcsl_database_failure_class_check", + "value": "\"knowledge_connector_sync_log\".\"database_failure_class\" IN ('capacity', 'conflict', 'connection')" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_document_observation": { + "name": "knowledge_document_observation", + "schema": "", + "columns": { + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "member_id": { + "name": "member_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "run_id": { + "name": "run_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "kdo_member_idx": { + "name": "kdo_member_idx", + "columns": [ + { + "expression": "member_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_document_observation_document_id_document_id_fk": { + "name": "knowledge_document_observation_document_id_document_id_fk", + "tableFrom": "knowledge_document_observation", + "tableTo": "document", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_document_observation_member_id_knowledge_connector_member_id_fk": { + "name": "knowledge_document_observation_member_id_knowledge_connector_member_id_fk", + "tableFrom": "knowledge_document_observation", + "tableTo": "knowledge_connector_member", + "columnsFrom": ["member_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "knowledge_document_observation_document_id_member_id_pk": { + "name": "knowledge_document_observation_document_id_member_id_pk", + "columns": ["document_id", "member_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_external_directory": { + "name": "knowledge_external_directory", + "schema": "", + "columns": { + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sync_lock_token": { + "name": "sync_lock_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sync_lock_lease_at": { + "name": "sync_lock_lease_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_started_at": { + "name": "last_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_complete_sync_at": { + "name": "last_complete_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ked_workspace_identity_unique": { + "name": "ked_workspace_identity_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ked_organization_identity_unique": { + "name": "ked_organization_identity_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_external_directory_workspace_id_workspace_id_fk": { + "name": "knowledge_external_directory_workspace_id_workspace_id_fk", + "tableFrom": "knowledge_external_directory", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_external_directory_organization_id_organization_id_fk": { + "name": "knowledge_external_directory_organization_id_organization_id_fk", + "tableFrom": "knowledge_external_directory", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "ked_owner_check": { + "name": "ked_owner_check", + "value": "num_nonnulls(\"knowledge_external_directory\".\"workspace_id\", \"knowledge_external_directory\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_external_group": { + "name": "knowledge_external_group", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_group_id": { + "name": "external_group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "last_synced_at": { + "name": "last_synced_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "keg_organization_identity_unique": { + "name": "keg_organization_identity_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "keg_organization_synced_idx": { + "name": "keg_organization_synced_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_synced_at", + "isExpression": false, + "asc": true, + "nulls": "first" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "keg_identity_unique": { + "name": "keg_identity_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "keg_workspace_synced_idx": { + "name": "keg_workspace_synced_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_synced_at", + "isExpression": false, + "asc": true, + "nulls": "first" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_external_group_organization_id_organization_id_fk": { + "name": "knowledge_external_group_organization_id_organization_id_fk", + "tableFrom": "knowledge_external_group", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "keg_workspace_fk": { + "name": "keg_workspace_fk", + "tableFrom": "knowledge_external_group", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "keg_owner_check": { + "name": "keg_owner_check", + "value": "num_nonnulls(\"knowledge_external_group\".\"workspace_id\", \"knowledge_external_group\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_external_group_member": { + "name": "knowledge_external_group_member", + "schema": "", + "columns": { + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject_token": { + "name": "subject_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "kegm_subject_token_idx": { + "name": "kegm_subject_token_idx", + "columns": [ + { + "expression": "subject_token", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "kegm_group_fk": { + "name": "kegm_group_fk", + "tableFrom": "knowledge_external_group_member", + "tableTo": "knowledge_external_group", + "columnsFrom": ["group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "knowledge_external_group_member_group_id_subject_token_pk": { + "name": "knowledge_external_group_member_group_id_subject_token_pk", + "columns": ["group_id", "subject_token"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_projection_dirty": { + "name": "knowledge_projection_dirty", + "schema": "", + "columns": { + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "generation": { + "name": "generation", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "content": { + "name": "content", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "marked_at": { + "name": "marked_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "knowledge_projection_dirty_marked_at_idx": { + "name": "knowledge_projection_dirty_marked_at_idx", + "columns": [ + { + "expression": "marked_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_projection_dirty_document_id_document_id_fk": { + "name": "knowledge_projection_dirty_document_id_document_id_fk", + "tableFrom": "knowledge_projection_dirty", + "tableTo": "document", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mcp_server_oauth": { + "name": "mcp_server_oauth", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "mcp_server_id": { + "name": "mcp_server_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_information": { + "name": "client_information", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tokens": { + "name": "tokens", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "code_verifier": { + "name": "code_verifier", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "state": { + "name": "state", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "state_created_at": { + "name": "state_created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_refreshed_at": { + "name": "last_refreshed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mcp_server_oauth_server_unique": { + "name": "mcp_server_oauth_server_unique", + "columns": [ + { + "expression": "mcp_server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_server_oauth_state_idx": { + "name": "mcp_server_oauth_state_idx", + "columns": [ + { + "expression": "state", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mcp_server_oauth_mcp_server_id_mcp_servers_id_fk": { + "name": "mcp_server_oauth_mcp_server_id_mcp_servers_id_fk", + "tableFrom": "mcp_server_oauth", + "tableTo": "mcp_servers", + "columnsFrom": ["mcp_server_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcp_server_oauth_user_id_user_id_fk": { + "name": "mcp_server_oauth_user_id_user_id_fk", + "tableFrom": "mcp_server_oauth", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "mcp_server_oauth_workspace_id_workspace_id_fk": { + "name": "mcp_server_oauth_workspace_id_workspace_id_fk", + "tableFrom": "mcp_server_oauth", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcp_server_oauth_organization_id_organization_id_fk": { + "name": "mcp_server_oauth_organization_id_organization_id_fk", + "tableFrom": "mcp_server_oauth", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "mcp_server_oauth_owner_check": { + "name": "mcp_server_oauth_owner_check", + "value": "num_nonnulls(\"mcp_server_oauth\".\"workspace_id\", \"mcp_server_oauth\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.mcp_servers": { + "name": "mcp_servers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_group_id": { + "name": "credential_group_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "managed_connector_id": { + "name": "managed_connector_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oauth_config_version": { + "name": "oauth_config_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "transport": { + "name": "transport", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'headers'" + }, + "oauth_client_id": { + "name": "oauth_client_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oauth_client_secret": { + "name": "oauth_client_secret", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "headers": { + "name": "headers", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "timeout": { + "name": "timeout", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 30000 + }, + "retries": { + "name": "retries", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 3 + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_connected": { + "name": "last_connected", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "connection_status": { + "name": "connection_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'disconnected'" + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status_config": { + "name": "status_config", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "tool_count": { + "name": "tool_count", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "last_tools_refresh": { + "name": "last_tools_refresh", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "total_requests": { + "name": "total_requests", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "last_used": { + "name": "last_used", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mcp_servers_organization_id_idx": { + "name": "mcp_servers_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_servers_workspace_enabled_idx": { + "name": "mcp_servers_workspace_enabled_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_servers_credential_group_idx": { + "name": "mcp_servers_credential_group_idx", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_servers_credential_group_managed_connector_unique": { + "name": "mcp_servers_credential_group_managed_connector_unique", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "managed_connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"mcp_servers\".\"credential_group_id\" IS NOT NULL AND \"mcp_servers\".\"managed_connector_id\" IS NOT NULL AND \"mcp_servers\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_servers_workspace_deleted_partial_idx": { + "name": "mcp_servers_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"mcp_servers\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mcp_servers_workspace_id_workspace_id_fk": { + "name": "mcp_servers_workspace_id_workspace_id_fk", + "tableFrom": "mcp_servers", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcp_servers_organization_id_organization_id_fk": { + "name": "mcp_servers_organization_id_organization_id_fk", + "tableFrom": "mcp_servers", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcp_servers_credential_group_id_credential_group_id_fk": { + "name": "mcp_servers_credential_group_id_credential_group_id_fk", + "tableFrom": "mcp_servers", + "tableTo": "credential_group", + "columnsFrom": ["credential_group_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "mcp_servers_created_by_user_id_fk": { + "name": "mcp_servers_created_by_user_id_fk", + "tableFrom": "mcp_servers", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "mcp_servers_owner_check": { + "name": "mcp_servers_owner_check", + "value": "num_nonnulls(\"mcp_servers\".\"workspace_id\", \"mcp_servers\".\"organization_id\") = 1" + }, + "mcp_servers_organization_managed_check": { + "name": "mcp_servers_organization_managed_check", + "value": "\"mcp_servers\".\"organization_id\" IS NULL OR \"mcp_servers\".\"credential_group_id\" IS NOT NULL" + }, + "mcp_servers_credential_group_managed_connector_check": { + "name": "mcp_servers_credential_group_managed_connector_check", + "value": "\"mcp_servers\".\"credential_group_id\" IS NULL OR \"mcp_servers\".\"managed_connector_id\" IS NOT NULL" + }, + "mcp_servers_managed_connector_oauth_check": { + "name": "mcp_servers_managed_connector_oauth_check", + "value": "\"mcp_servers\".\"managed_connector_id\" IS NULL OR \"mcp_servers\".\"auth_type\" = 'oauth'" + } + }, + "isRLSEnabled": false + }, + "public.member": { + "name": "member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "member_user_id_unique": { + "name": "member_user_id_unique", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "member_organization_id_idx": { + "name": "member_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "member_user_id_user_id_fk": { + "name": "member_user_id_user_id_fk", + "tableFrom": "member", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "member_organization_id_organization_id_fk": { + "name": "member_organization_id_organization_id_fk", + "tableFrom": "member", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.member_profile": { + "name": "member_profile", + "schema": "", + "columns": { + "member_id": { + "name": "member_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "department": { + "name": "department", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "date", + "primaryKey": false, + "notNull": false + }, + "manager_member_id": { + "name": "manager_member_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "member_profile_manager_member_id_idx": { + "name": "member_profile_manager_member_id_idx", + "columns": [ + { + "expression": "manager_member_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "member_profile_updated_by_idx": { + "name": "member_profile_updated_by_idx", + "columns": [ + { + "expression": "updated_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "member_profile_member_id_member_id_fk": { + "name": "member_profile_member_id_member_id_fk", + "tableFrom": "member_profile", + "tableTo": "member", + "columnsFrom": ["member_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "member_profile_manager_member_id_member_id_fk": { + "name": "member_profile_manager_member_id_member_id_fk", + "tableFrom": "member_profile", + "tableTo": "member", + "columnsFrom": ["manager_member_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "member_profile_updated_by_user_id_fk": { + "name": "member_profile_updated_by_user_id_fk", + "tableFrom": "member_profile", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "member_profile_not_own_manager": { + "name": "member_profile_not_own_manager", + "value": "\"member_profile\".\"manager_member_id\" <> \"member_profile\".\"member_id\"" + } + }, + "isRLSEnabled": false + }, + "public.memory": { + "name": "memory", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "storage_version": { + "name": "storage_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "encrypted_context_summary": { + "name": "encrypted_context_summary", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "memory_key_idx": { + "name": "memory_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "memory_workspace_key_idx": { + "name": "memory_workspace_key_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "memory_workspace_deleted_partial_idx": { + "name": "memory_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"memory\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "memory_workspace_id_workspace_id_fk": { + "name": "memory_workspace_id_workspace_id_fk", + "tableFrom": "memory", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.memory_artifact": { + "name": "memory_artifact", + "schema": "", + "columns": { + "memory_id": { + "name": "memory_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "memory_artifact_key_idx": { + "name": "memory_artifact_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "memory_artifact_memory_id_memory_id_fk": { + "name": "memory_artifact_memory_id_memory_id_fk", + "tableFrom": "memory_artifact", + "tableTo": "memory", + "columnsFrom": ["memory_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "memory_artifact_key_execution_large_values_key_fk": { + "name": "memory_artifact_key_execution_large_values_key_fk", + "tableFrom": "memory_artifact", + "tableTo": "execution_large_values", + "columnsFrom": ["key"], + "columnsTo": ["key"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "memory_artifact_memory_id_key_pk": { + "name": "memory_artifact_memory_id_key_pk", + "columns": ["memory_id", "key"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.memory_item": { + "name": "memory_item", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "memory_id": { + "name": "memory_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sequence": { + "name": "sequence", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "identity": { + "type": "always", + "name": "memory_item_sequence_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": "1", + "cycle": false + } + }, + "append_key": { + "name": "append_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "turn_id": { + "name": "turn_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provenance_status": { + "name": "provenance_status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provenance_entries": { + "name": "provenance_entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "memory_item_append_unique": { + "name": "memory_item_append_unique", + "columns": [ + { + "expression": "memory_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "append_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "memory_item_sequence_idx": { + "name": "memory_item_sequence_idx", + "columns": [ + { + "expression": "memory_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sequence", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "memory_item_memory_id_memory_id_fk": { + "name": "memory_item_memory_id_memory_id_fk", + "tableFrom": "memory_item", + "tableTo": "memory", + "columnsFrom": ["memory_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "memory_item_kind_check": { + "name": "memory_item_kind_check", + "value": "\"memory_item\".\"kind\" IN ('message', 'exchange')" + }, + "memory_item_provenance_status_check": { + "name": "memory_item_provenance_status_check", + "value": "\"memory_item\".\"provenance_status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.memory_secret_provenance": { + "name": "memory_secret_provenance", + "schema": "", + "columns": { + "memory_id": { + "name": "memory_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "memory_secret_provenance_memory_id_memory_id_fk": { + "name": "memory_secret_provenance_memory_id_memory_id_fk", + "tableFrom": "memory_secret_provenance", + "tableTo": "memory", + "columnsFrom": ["memory_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "memory_secret_provenance_status_check": { + "name": "memory_secret_provenance_status_check", + "value": "\"memory_secret_provenance\".\"status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.mothership_benchmark_runs": { + "name": "mothership_benchmark_runs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "benchmark_id": { + "name": "benchmark_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "evaluation_key": { + "name": "evaluation_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reviews": { + "name": "reviews", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "reviewed_at": { + "name": "reviewed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "correct": { + "name": "correct", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "automatic_correct": { + "name": "automatic_correct", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "total": { + "name": "total", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "artifacts": { + "name": "artifacts", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mothership_benchmark_runs_benchmark_created_idx": { + "name": "mothership_benchmark_runs_benchmark_created_idx", + "columns": [ + { + "expression": "benchmark_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_benchmark_runs_benchmark_id_mothership_benchmarks_id_fk": { + "name": "mothership_benchmark_runs_benchmark_id_mothership_benchmarks_id_fk", + "tableFrom": "mothership_benchmark_runs", + "tableTo": "mothership_benchmarks", + "columnsFrom": ["benchmark_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "mothership_benchmark_runs_score_check": { + "name": "mothership_benchmark_runs_score_check", + "value": "\"mothership_benchmark_runs\".\"total\" > 0 AND \"mothership_benchmark_runs\".\"correct\" >= 0 AND \"mothership_benchmark_runs\".\"correct\" <= \"mothership_benchmark_runs\".\"total\"" + }, + "mothership_benchmark_runs_version_check": { + "name": "mothership_benchmark_runs_version_check", + "value": "\"mothership_benchmark_runs\".\"version\" > 0" + }, + "mothership_benchmark_runs_automatic_score_check": { + "name": "mothership_benchmark_runs_automatic_score_check", + "value": "\"mothership_benchmark_runs\".\"automatic_correct\" >= 0 AND \"mothership_benchmark_runs\".\"automatic_correct\" <= \"mothership_benchmark_runs\".\"total\"" + } + }, + "isRLSEnabled": false + }, + "public.mothership_benchmarks": { + "name": "mothership_benchmarks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "run_as_user_id": { + "name": "run_as_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_workspace_id": { + "name": "source_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "artifacts": { + "name": "artifacts", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "running_stage": { + "name": "running_stage", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "attempt_id": { + "name": "attempt_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lease_expires_at": { + "name": "lease_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "planner_chat_id": { + "name": "planner_chat_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mothership_benchmarks_owner_created_idx": { + "name": "mothership_benchmarks_owner_created_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mothership_benchmarks_workspace_idx": { + "name": "mothership_benchmarks_workspace_idx", + "columns": [ + { + "expression": "source_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_benchmarks_organization_id_organization_id_fk": { + "name": "mothership_benchmarks_organization_id_organization_id_fk", + "tableFrom": "mothership_benchmarks", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_benchmarks_user_id_user_id_fk": { + "name": "mothership_benchmarks_user_id_user_id_fk", + "tableFrom": "mothership_benchmarks", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_benchmarks_run_as_user_id_user_id_fk": { + "name": "mothership_benchmarks_run_as_user_id_user_id_fk", + "tableFrom": "mothership_benchmarks", + "tableTo": "user", + "columnsFrom": ["run_as_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_benchmarks_source_workspace_id_workspace_id_fk": { + "name": "mothership_benchmarks_source_workspace_id_workspace_id_fk", + "tableFrom": "mothership_benchmarks", + "tableTo": "workspace", + "columnsFrom": ["source_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "mothership_benchmarks_version_check": { + "name": "mothership_benchmarks_version_check", + "value": "\"mothership_benchmarks\".\"version\" > 0" + }, + "mothership_benchmarks_attempt_check": { + "name": "mothership_benchmarks_attempt_check", + "value": "(\"mothership_benchmarks\".\"running_stage\" IS NULL AND \"mothership_benchmarks\".\"attempt_id\" IS NULL AND \"mothership_benchmarks\".\"lease_expires_at\" IS NULL) OR (\"mothership_benchmarks\".\"running_stage\" IS NOT NULL AND \"mothership_benchmarks\".\"running_stage\" IN ('distill', 'redact', 'plan', 'reconstruct', 'grade') AND \"mothership_benchmarks\".\"attempt_id\" IS NOT NULL AND \"mothership_benchmarks\".\"lease_expires_at\" IS NOT NULL)" + } + }, + "isRLSEnabled": false + }, + "public.mothership_inbox_allowed_sender": { + "name": "mothership_inbox_allowed_sender", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "added_by": { + "name": "added_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "inbox_sender_ws_email_idx": { + "name": "inbox_sender_ws_email_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_inbox_allowed_sender_workspace_id_workspace_id_fk": { + "name": "mothership_inbox_allowed_sender_workspace_id_workspace_id_fk", + "tableFrom": "mothership_inbox_allowed_sender", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_inbox_allowed_sender_added_by_user_id_fk": { + "name": "mothership_inbox_allowed_sender_added_by_user_id_fk", + "tableFrom": "mothership_inbox_allowed_sender", + "tableTo": "user", + "columnsFrom": ["added_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_inbox_task": { + "name": "mothership_inbox_task", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "from_email": { + "name": "from_email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sender_authenticated": { + "name": "sender_authenticated", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "from_name": { + "name": "from_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subject": { + "name": "subject", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "body_preview": { + "name": "body_preview", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "body_text": { + "name": "body_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "body_html": { + "name": "body_html", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email_message_id": { + "name": "email_message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "in_reply_to": { + "name": "in_reply_to", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "response_message_id": { + "name": "response_message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "agentmail_message_id": { + "name": "agentmail_message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'received'" + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "trigger_job_id": { + "name": "trigger_job_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "result_summary": { + "name": "result_summary", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "rejection_reason": { + "name": "rejection_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "has_attachments": { + "name": "has_attachments", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "cc_recipients": { + "name": "cc_recipients", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "processing_started_at": { + "name": "processing_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "inbox_task_ws_created_at_idx": { + "name": "inbox_task_ws_created_at_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "inbox_task_ws_status_idx": { + "name": "inbox_task_ws_status_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "inbox_task_response_msg_id_idx": { + "name": "inbox_task_response_msg_id_idx", + "columns": [ + { + "expression": "response_message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "inbox_task_email_msg_id_idx": { + "name": "inbox_task_email_msg_id_idx", + "columns": [ + { + "expression": "email_message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_inbox_task_workspace_id_workspace_id_fk": { + "name": "mothership_inbox_task_workspace_id_workspace_id_fk", + "tableFrom": "mothership_inbox_task", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_inbox_task_chat_id_copilot_chats_id_fk": { + "name": "mothership_inbox_task_chat_id_copilot_chats_id_fk", + "tableFrom": "mothership_inbox_task", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_inbox_webhook": { + "name": "mothership_inbox_webhook", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "webhook_id": { + "name": "webhook_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret": { + "name": "secret", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "mothership_inbox_webhook_workspace_id_workspace_id_fk": { + "name": "mothership_inbox_webhook_workspace_id_workspace_id_fk", + "tableFrom": "mothership_inbox_webhook", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "mothership_inbox_webhook_workspace_id_unique": { + "name": "mothership_inbox_webhook_workspace_id_unique", + "nullsNotDistinct": false, + "columns": ["workspace_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_memory_selections": { + "name": "mothership_memory_selections", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "space_id": { + "name": "space_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "mothership_memory_selections_user_id_user_id_fk": { + "name": "mothership_memory_selections_user_id_user_id_fk", + "tableFrom": "mothership_memory_selections", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_memory_selections_organization_id_organization_id_fk": { + "name": "mothership_memory_selections_organization_id_organization_id_fk", + "tableFrom": "mothership_memory_selections", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_memory_selections_space_id_mothership_memory_spaces_id_fk": { + "name": "mothership_memory_selections_space_id_mothership_memory_spaces_id_fk", + "tableFrom": "mothership_memory_selections", + "tableTo": "mothership_memory_spaces", + "columnsFrom": ["space_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "mothership_memory_selections_user_id_organization_id_pk": { + "name": "mothership_memory_selections_user_id_organization_id_pk", + "columns": ["user_id", "organization_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_memory_spaces": { + "name": "mothership_memory_spaces", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mothership_memory_spaces_owner_idx": { + "name": "mothership_memory_spaces_owner_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_memory_spaces_user_id_user_id_fk": { + "name": "mothership_memory_spaces_user_id_user_id_fk", + "tableFrom": "mothership_memory_spaces", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_memory_spaces_organization_id_organization_id_fk": { + "name": "mothership_memory_spaces_organization_id_organization_id_fk", + "tableFrom": "mothership_memory_spaces", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_resource_effects": { + "name": "mothership_resource_effects", + "schema": "", + "columns": { + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "effect_id": { + "name": "effect_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "mothership_resource_effects_chat_id_copilot_chats_id_fk": { + "name": "mothership_resource_effects_chat_id_copilot_chats_id_fk", + "tableFrom": "mothership_resource_effects", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "mothership_resource_effects_chat_id_effect_id_pk": { + "name": "mothership_resource_effects_chat_id_effect_id_pk", + "columns": ["chat_id", "effect_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.oauth_access_token": { + "name": "oauth_access_token", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "session_id": { + "name": "session_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_id": { + "name": "refresh_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "scopes": { + "name": "scopes", + "type": "text[]", + "primaryKey": false, + "notNull": true + }, + "resource": { + "name": "resource", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "oauth_access_token_client_id_idx": { + "name": "oauth_access_token_client_id_idx", + "columns": [ + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_access_token_session_id_idx": { + "name": "oauth_access_token_session_id_idx", + "columns": [ + { + "expression": "session_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_access_token_refresh_id_idx": { + "name": "oauth_access_token_refresh_id_idx", + "columns": [ + { + "expression": "refresh_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_access_token_user_client_idx": { + "name": "oauth_access_token_user_client_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_access_token_expires_at_idx": { + "name": "oauth_access_token_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_access_token_client_id_oauth_client_client_id_fk": { + "name": "oauth_access_token_client_id_oauth_client_client_id_fk", + "tableFrom": "oauth_access_token", + "tableTo": "oauth_client", + "columnsFrom": ["client_id"], + "columnsTo": ["client_id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_access_token_session_id_session_id_fk": { + "name": "oauth_access_token_session_id_session_id_fk", + "tableFrom": "oauth_access_token", + "tableTo": "session", + "columnsFrom": ["session_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "oauth_access_token_user_id_user_id_fk": { + "name": "oauth_access_token_user_id_user_id_fk", + "tableFrom": "oauth_access_token", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_access_token_refresh_id_oauth_refresh_token_id_fk": { + "name": "oauth_access_token_refresh_id_oauth_refresh_token_id_fk", + "tableFrom": "oauth_access_token", + "tableTo": "oauth_refresh_token", + "columnsFrom": ["refresh_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "oauth_access_token_token_unique": { + "name": "oauth_access_token_token_unique", + "nullsNotDistinct": false, + "columns": ["token"] + } + }, + "policies": {}, + "checkConstraints": { + "oauth_access_token_search_resource_check": { + "name": "oauth_access_token_search_resource_check", + "value": "NOT ('search:read' = ANY(\"oauth_access_token\".\"scopes\")) OR \"oauth_access_token\".\"resource\" IS NOT NULL" + } + }, + "isRLSEnabled": false + }, + "public.oauth_client": { + "name": "oauth_client", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_secret": { + "name": "client_secret", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "disabled": { + "name": "disabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "skip_consent": { + "name": "skip_consent", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "enable_end_session": { + "name": "enable_end_session", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "subject_type": { + "name": "subject_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "scopes": { + "name": "scopes", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "contacts": { + "name": "contacts", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "tos": { + "name": "tos", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "policy": { + "name": "policy", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "software_id": { + "name": "software_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "software_version": { + "name": "software_version", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "software_statement": { + "name": "software_statement", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "redirect_uris": { + "name": "redirect_uris", + "type": "text[]", + "primaryKey": false, + "notNull": true + }, + "post_logout_redirect_uris": { + "name": "post_logout_redirect_uris", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "token_endpoint_auth_method": { + "name": "token_endpoint_auth_method", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "grant_types": { + "name": "grant_types", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "response_types": { + "name": "response_types", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "public": { + "name": "public", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "require_pkce": { + "name": "require_pkce", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "oauth_client_user_id_idx": { + "name": "oauth_client_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_client_user_id_user_id_fk": { + "name": "oauth_client_user_id_user_id_fk", + "tableFrom": "oauth_client", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "oauth_client_client_id_unique": { + "name": "oauth_client_client_id_unique", + "nullsNotDistinct": false, + "columns": ["client_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.oauth_consent": { + "name": "oauth_consent", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "scopes": { + "name": "scopes", + "type": "text[]", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "oauth_consent_client_id_idx": { + "name": "oauth_consent_client_id_idx", + "columns": [ + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_consent_client_id_oauth_client_client_id_fk": { + "name": "oauth_consent_client_id_oauth_client_client_id_fk", + "tableFrom": "oauth_consent", + "tableTo": "oauth_client", + "columnsFrom": ["client_id"], + "columnsTo": ["client_id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_consent_user_id_user_id_fk": { + "name": "oauth_consent_user_id_user_id_fk", + "tableFrom": "oauth_consent", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "oauth_consent_user_client_reference_unique": { + "name": "oauth_consent_user_client_reference_unique", + "nullsNotDistinct": true, + "columns": ["user_id", "client_id", "reference_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.oauth_refresh_token": { + "name": "oauth_refresh_token", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "session_id": { + "name": "session_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "revoked": { + "name": "revoked", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "auth_time": { + "name": "auth_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scopes": { + "name": "scopes", + "type": "text[]", + "primaryKey": false, + "notNull": true + }, + "resource": { + "name": "resource", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "family_id": { + "name": "family_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "generation": { + "name": "generation", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "oauth_refresh_token_client_id_idx": { + "name": "oauth_refresh_token_client_id_idx", + "columns": [ + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_refresh_token_session_id_idx": { + "name": "oauth_refresh_token_session_id_idx", + "columns": [ + { + "expression": "session_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_refresh_token_user_client_idx": { + "name": "oauth_refresh_token_user_client_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_refresh_token_expires_at_idx": { + "name": "oauth_refresh_token_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_refresh_token_client_id_oauth_client_client_id_fk": { + "name": "oauth_refresh_token_client_id_oauth_client_client_id_fk", + "tableFrom": "oauth_refresh_token", + "tableTo": "oauth_client", + "columnsFrom": ["client_id"], + "columnsTo": ["client_id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_refresh_token_session_id_session_id_fk": { + "name": "oauth_refresh_token_session_id_session_id_fk", + "tableFrom": "oauth_refresh_token", + "tableTo": "session", + "columnsFrom": ["session_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "oauth_refresh_token_user_id_user_id_fk": { + "name": "oauth_refresh_token_user_id_user_id_fk", + "tableFrom": "oauth_refresh_token", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_refresh_token_family_id_oauth_token_family_id_fk": { + "name": "oauth_refresh_token_family_id_oauth_token_family_id_fk", + "tableFrom": "oauth_refresh_token", + "tableTo": "oauth_token_family", + "columnsFrom": ["family_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "oauth_refresh_token_token_unique": { + "name": "oauth_refresh_token_token_unique", + "nullsNotDistinct": false, + "columns": ["token"] + }, + "oauth_refresh_token_family_generation_unique": { + "name": "oauth_refresh_token_family_generation_unique", + "nullsNotDistinct": false, + "columns": ["family_id", "generation"] + } + }, + "policies": {}, + "checkConstraints": { + "oauth_refresh_token_generation_check": { + "name": "oauth_refresh_token_generation_check", + "value": "\"oauth_refresh_token\".\"generation\" BETWEEN 0 AND 1000" + }, + "oauth_refresh_token_search_resource_check": { + "name": "oauth_refresh_token_search_resource_check", + "value": "NOT ('search:read' = ANY(\"oauth_refresh_token\".\"scopes\")) OR \"oauth_refresh_token\".\"resource\" IS NOT NULL" + } + }, + "isRLSEnabled": false + }, + "public.oauth_token_family": { + "name": "oauth_token_family", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "session_id": { + "name": "session_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "consent_id": { + "name": "consent_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "current_generation": { + "name": "current_generation", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "oauth_token_family_client_id_idx": { + "name": "oauth_token_family_client_id_idx", + "columns": [ + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_token_family_session_id_idx": { + "name": "oauth_token_family_session_id_idx", + "columns": [ + { + "expression": "session_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_token_family_user_client_idx": { + "name": "oauth_token_family_user_client_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_token_family_consent_id_idx": { + "name": "oauth_token_family_consent_id_idx", + "columns": [ + { + "expression": "consent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_token_family_expires_at_idx": { + "name": "oauth_token_family_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_token_family_client_id_oauth_client_client_id_fk": { + "name": "oauth_token_family_client_id_oauth_client_client_id_fk", + "tableFrom": "oauth_token_family", + "tableTo": "oauth_client", + "columnsFrom": ["client_id"], + "columnsTo": ["client_id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_token_family_session_id_session_id_fk": { + "name": "oauth_token_family_session_id_session_id_fk", + "tableFrom": "oauth_token_family", + "tableTo": "session", + "columnsFrom": ["session_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "oauth_token_family_user_id_user_id_fk": { + "name": "oauth_token_family_user_id_user_id_fk", + "tableFrom": "oauth_token_family", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_token_family_consent_id_oauth_consent_id_fk": { + "name": "oauth_token_family_consent_id_oauth_consent_id_fk", + "tableFrom": "oauth_token_family", + "tableTo": "oauth_consent", + "columnsFrom": ["consent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "oauth_token_family_generation_check": { + "name": "oauth_token_family_generation_check", + "value": "\"oauth_token_family\".\"current_generation\" BETWEEN 0 AND 1000" + } + }, + "isRLSEnabled": false + }, + "public.organization": { + "name": "organization", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "logo": { + "name": "logo", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "session_policy_settings": { + "name": "session_policy_settings", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "security_policy_version": { + "name": "security_policy_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "require_sso": { + "name": "require_sso", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "whitelabel_settings": { + "name": "whitelabel_settings", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "data_retention_settings": { + "name": "data_retention_settings", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "org_usage_limit": { + "name": "org_usage_limit", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "storage_used_bytes": { + "name": "storage_used_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "limit_notifications": { + "name": "limit_notifications", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "credit_balance": { + "name": "credit_balance", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_access_request_settings": { + "name": "organization_access_request_settings", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "allow_requests": { + "name": "allow_requests", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "organization_access_request_settings_organization_id_organization_id_fk": { + "name": "organization_access_request_settings_organization_id_organization_id_fk", + "tableFrom": "organization_access_request_settings", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_access_request_settings_updated_by_user_id_fk": { + "name": "organization_access_request_settings_updated_by_user_id_fk", + "tableFrom": "organization_access_request_settings", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_byok_keys": { + "name": "organization_byok_keys", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "encrypted_api_key": { + "name": "encrypted_api_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "organization_byok_organization_provider_idx": { + "name": "organization_byok_organization_provider_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_byok_keys_organization_id_organization_id_fk": { + "name": "organization_byok_keys_organization_id_organization_id_fk", + "tableFrom": "organization_byok_keys", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_byok_keys_created_by_user_id_fk": { + "name": "organization_byok_keys_created_by_user_id_fk", + "tableFrom": "organization_byok_keys", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_member_usage_limit": { + "name": "organization_member_usage_limit", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "usage_limit": { + "name": "usage_limit", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "set_by": { + "name": "set_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "org_member_usage_limit_org_user_unique": { + "name": "org_member_usage_limit_org_user_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "org_member_usage_limit_organization_id_idx": { + "name": "org_member_usage_limit_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_member_usage_limit_organization_id_organization_id_fk": { + "name": "organization_member_usage_limit_organization_id_organization_id_fk", + "tableFrom": "organization_member_usage_limit", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_member_usage_limit_user_id_user_id_fk": { + "name": "organization_member_usage_limit_user_id_user_id_fk", + "tableFrom": "organization_member_usage_limit", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_member_usage_limit_set_by_user_id_fk": { + "name": "organization_member_usage_limit_set_by_user_id_fk", + "tableFrom": "organization_member_usage_limit", + "tableTo": "user", + "columnsFrom": ["set_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_search_history": { + "name": "organization_search_history", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sources": { + "name": "sources", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "queries": { + "name": "queries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + } + }, + "indexes": { + "organization_search_history_user_idx": { + "name": "organization_search_history_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_search_history_organization_id_organization_id_fk": { + "name": "organization_search_history_organization_id_organization_id_fk", + "tableFrom": "organization_search_history", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_search_history_user_id_user_id_fk": { + "name": "organization_search_history_user_id_user_id_fk", + "tableFrom": "organization_search_history", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "organization_search_history_organization_id_user_id_pk": { + "name": "organization_search_history_organization_id_user_id_pk", + "columns": ["organization_id", "user_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_search_integration": { + "name": "organization_search_integration", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "connector_type": { + "name": "connector_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "approved": { + "name": "approved", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "organization_search_integration_organization_id_organization_id_fk": { + "name": "organization_search_integration_organization_id_organization_id_fk", + "tableFrom": "organization_search_integration", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "organization_search_integration_organization_id_connector_type_pk": { + "name": "organization_search_integration_organization_id_connector_type_pk", + "columns": ["organization_id", "connector_type"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_search_mcp_invocation": { + "name": "organization_search_mcp_invocation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "auth_kind": { + "name": "auth_kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "oauth_client_id": { + "name": "oauth_client_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_name": { + "name": "client_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tool_name": { + "name": "tool_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "outcome": { + "name": "outcome", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "duration_ms": { + "name": "duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "organization_search_mcp_invocation_org_created_idx": { + "name": "organization_search_mcp_invocation_org_created_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "organization_search_mcp_invocation_user_idx": { + "name": "organization_search_mcp_invocation_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "org_search_mcp_invocation_org_fk": { + "name": "org_search_mcp_invocation_org_fk", + "tableFrom": "organization_search_mcp_invocation", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "org_search_mcp_invocation_user_fk": { + "name": "org_search_mcp_invocation_user_fk", + "tableFrom": "organization_search_mcp_invocation", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "organization_search_mcp_invocation_tool_check": { + "name": "organization_search_mcp_invocation_tool_check", + "value": "\"organization_search_mcp_invocation\".\"tool_name\" IN ('search', 'read_document', 'chat')" + }, + "organization_search_mcp_invocation_outcome_check": { + "name": "organization_search_mcp_invocation_outcome_check", + "value": "\"organization_search_mcp_invocation\".\"outcome\" IN ('success', 'error', 'cancelled', 'rate_limited')" + }, + "organization_search_mcp_invocation_duration_check": { + "name": "organization_search_mcp_invocation_duration_check", + "value": "\"organization_search_mcp_invocation\".\"duration_ms\" >= 0" + }, + "organization_search_mcp_invocation_client_name_check": { + "name": "organization_search_mcp_invocation_client_name_check", + "value": "length(\"organization_search_mcp_invocation\".\"client_name\") <= 256" + }, + "organization_search_mcp_invocation_auth_check": { + "name": "organization_search_mcp_invocation_auth_check", + "value": "(\"organization_search_mcp_invocation\".\"auth_kind\" = 'oauth_access_token' AND \"organization_search_mcp_invocation\".\"oauth_client_id\" IS NOT NULL)\n OR (\"organization_search_mcp_invocation\".\"auth_kind\" IN ('personal_api_key', 'workspace_api_key') AND \"organization_search_mcp_invocation\".\"oauth_client_id\" IS NULL AND \"organization_search_mcp_invocation\".\"client_name\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.organization_secret": { + "name": "organization_secret", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "source_id": { + "name": "source_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "encrypted_value": { + "name": "encrypted_value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "organization_secret_shared_unique": { + "name": "organization_secret_shared_unique", + "columns": [ + { + "expression": "source_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"organization_secret\".\"owner_user_id\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "organization_secret_member_unique": { + "name": "organization_secret_member_unique", + "columns": [ + { + "expression": "source_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"organization_secret\".\"owner_user_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "organization_secret_owner_idx": { + "name": "organization_secret_owner_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_secret_source_id_organization_secret_source_id_fk": { + "name": "organization_secret_source_id_organization_secret_source_id_fk", + "tableFrom": "organization_secret", + "tableTo": "organization_secret_source", + "columnsFrom": ["source_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_secret_owner_user_id_user_id_fk": { + "name": "organization_secret_owner_user_id_user_id_fk", + "tableFrom": "organization_secret", + "tableTo": "user", + "columnsFrom": ["owner_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_secret_source": { + "name": "organization_secret_source", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "mode": { + "name": "mode", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "organization_secret_source_org_unique": { + "name": "organization_secret_source_org_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_secret_source_organization_id_organization_id_fk": { + "name": "organization_secret_source_organization_id_organization_id_fk", + "tableFrom": "organization_secret_source", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "organization_secret_source_mode_check": { + "name": "organization_secret_source_mode_check", + "value": "\"organization_secret_source\".\"mode\" IN ('organization', 'member')" + } + }, + "isRLSEnabled": false + }, + "public.outbox_event": { + "name": "outbox_event", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "event_type": { + "name": "event_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "attempts": { + "name": "attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_attempts": { + "name": "max_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 10 + }, + "available_at": { + "name": "available_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "locked_at": { + "name": "locked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "processed_at": { + "name": "processed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "outbox_event_status_available_idx": { + "name": "outbox_event_status_available_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "available_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "outbox_event_pending_type_available_idx": { + "name": "outbox_event_pending_type_available_idx", + "columns": [ + { + "expression": "event_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "available_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"outbox_event\".\"status\" = 'pending'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "outbox_event_locked_at_idx": { + "name": "outbox_event_locked_at_idx", + "columns": [ + { + "expression": "locked_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "outbox_event_type_created_idx": { + "name": "outbox_event_type_created_idx", + "columns": [ + { + "expression": "event_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.paused_executions": { + "name": "paused_executions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_snapshot": { + "name": "execution_snapshot", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "pause_points": { + "name": "pause_points", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "total_pause_count": { + "name": "total_pause_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "resumed_count": { + "name": "resumed_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "automatic_resume_retry_count": { + "name": "automatic_resume_retry_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'paused'" + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "paused_at": { + "name": "paused_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "next_resume_at": { + "name": "next_resume_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "paused_executions_workflow_id_idx": { + "name": "paused_executions_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "paused_executions_status_idx": { + "name": "paused_executions_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "paused_executions_execution_id_unique": { + "name": "paused_executions_execution_id_unique", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "paused_executions_next_resume_at_idx": { + "name": "paused_executions_next_resume_at_idx", + "columns": [ + { + "expression": "next_resume_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "status = 'paused' AND next_resume_at IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "paused_executions_workflow_id_workflow_id_fk": { + "name": "paused_executions_workflow_id_workflow_id_fk", + "tableFrom": "paused_executions", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pending_credential_draft": { + "name": "pending_credential_draft", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oauth_config": { + "name": "oauth_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "pending_draft_organization_id_idx": { + "name": "pending_draft_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pending_draft_user_provider_org": { + "name": "pending_draft_user_provider_org", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pending_draft_user_provider_ws": { + "name": "pending_draft_user_provider_ws", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pending_credential_draft_user_id_user_id_fk": { + "name": "pending_credential_draft_user_id_user_id_fk", + "tableFrom": "pending_credential_draft", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pending_credential_draft_workspace_id_workspace_id_fk": { + "name": "pending_credential_draft_workspace_id_workspace_id_fk", + "tableFrom": "pending_credential_draft", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pending_credential_draft_organization_id_organization_id_fk": { + "name": "pending_credential_draft_organization_id_organization_id_fk", + "tableFrom": "pending_credential_draft", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pending_credential_draft_credential_id_credential_id_fk": { + "name": "pending_credential_draft_credential_id_credential_id_fk", + "tableFrom": "pending_credential_draft", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "pending_draft_owner_check": { + "name": "pending_draft_owner_check", + "value": "num_nonnulls(\"pending_credential_draft\".\"workspace_id\", \"pending_credential_draft\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.people_directory_entry": { + "name": "people_directory_entry", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "department": { + "name": "department", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "manager_external_id": { + "name": "manager_external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "people_directory_entry_source_id_idx": { + "name": "people_directory_entry_source_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "people_directory_entry_email_idx": { + "name": "people_directory_entry_email_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "people_directory_entry_manager_idx": { + "name": "people_directory_entry_manager_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "manager_external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "people_directory_entry_organization_id_people_directory_sync_organization_id_fk": { + "name": "people_directory_entry_organization_id_people_directory_sync_organization_id_fk", + "tableFrom": "people_directory_entry", + "tableTo": "people_directory_sync", + "columnsFrom": ["organization_id"], + "columnsTo": ["organization_id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.people_directory_page": { + "name": "people_directory_page", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "run_id": { + "name": "run_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "page_hash": { + "name": "page_hash", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "people_directory_page_organization_id_people_directory_sync_organization_id_fk": { + "name": "people_directory_page_organization_id_people_directory_sync_organization_id_fk", + "tableFrom": "people_directory_page", + "tableTo": "people_directory_sync", + "columnsFrom": ["organization_id"], + "columnsTo": ["organization_id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "people_directory_page_organization_id_run_id_page_hash_pk": { + "name": "people_directory_page_organization_id_run_id_page_hash_pk", + "columns": ["organization_id", "run_id", "page_hash"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.people_directory_scim_change": { + "name": "people_directory_scim_change", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "changed_at": { + "name": "changed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "people_directory_scim_change_due_idx": { + "name": "people_directory_scim_change_due_idx", + "columns": [ + { + "expression": "changed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "people_directory_scim_change_organization_id_organization_id_fk": { + "name": "people_directory_scim_change_organization_id_organization_id_fk", + "tableFrom": "people_directory_scim_change", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.people_directory_stage": { + "name": "people_directory_stage", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "run_id": { + "name": "run_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "proposed_id": { + "name": "proposed_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "department": { + "name": "department", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "manager_external_id": { + "name": "manager_external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reports_cursor": { + "name": "reports_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reports_complete": { + "name": "reports_complete", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "people_directory_stage_email_idx": { + "name": "people_directory_stage_email_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "people_directory_stage_pending_idx": { + "name": "people_directory_stage_pending_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "NOT \"people_directory_stage\".\"reports_complete\"", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "people_directory_stage_organization_id_people_directory_sync_organization_id_fk": { + "name": "people_directory_stage_organization_id_people_directory_sync_organization_id_fk", + "tableFrom": "people_directory_stage", + "tableTo": "people_directory_sync", + "columnsFrom": ["organization_id"], + "columnsTo": ["organization_id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "people_directory_stage_organization_id_run_id_external_id_pk": { + "name": "people_directory_stage_organization_id_run_id_external_id_pk", + "columns": ["organization_id", "run_id", "external_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.people_directory_sync": { + "name": "people_directory_sync", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_target": { + "name": "source_target", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_credential": { + "name": "encrypted_credential", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "configured_by": { + "name": "configured_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lease_token": { + "name": "lease_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lease_expires_at": { + "name": "lease_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "run_id": { + "name": "run_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "run_started_at": { + "name": "run_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "phase": { + "name": "phase", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cursor": { + "name": "cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "users_read": { + "name": "users_read", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "retry_count": { + "name": "retry_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "next_sync_at": { + "name": "next_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_attempt_at": { + "name": "last_attempt_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_success_at": { + "name": "last_success_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_failed_at": { + "name": "last_failed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "people_directory_sync_due_idx": { + "name": "people_directory_sync_due_idx", + "columns": [ + { + "expression": "next_sync_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "people_directory_sync_organization_id_organization_id_fk": { + "name": "people_directory_sync_organization_id_organization_id_fk", + "tableFrom": "people_directory_sync", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "people_directory_sync_configured_by_user_id_fk": { + "name": "people_directory_sync_configured_by_user_id_fk", + "tableFrom": "people_directory_sync", + "tableTo": "user", + "columnsFrom": ["configured_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.permission_access_request": { + "name": "permission_access_request", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "requester_id": { + "name": "requester_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "scope_key": { + "name": "scope_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_key": { + "name": "target_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target": { + "name": "target", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "target_label": { + "name": "target_label", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "membership_id": { + "name": "membership_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "group_name": { + "name": "group_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "decision_reason": { + "name": "decision_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "decided_by": { + "name": "decided_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "decision": { + "name": "decision", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "decided_at": { + "name": "decided_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "permission_access_request_pending_unique": { + "name": "permission_access_request_pending_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "requester_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"permission_access_request\".\"status\" = 'pending'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_access_request_org_queue_idx": { + "name": "permission_access_request_org_queue_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_access_request_requester_idx": { + "name": "permission_access_request_requester_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "requester_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permission_access_request_organization_id_organization_id_fk": { + "name": "permission_access_request_organization_id_organization_id_fk", + "tableFrom": "permission_access_request", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_access_request_requester_id_user_id_fk": { + "name": "permission_access_request_requester_id_user_id_fk", + "tableFrom": "permission_access_request", + "tableTo": "user", + "columnsFrom": ["requester_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_access_request_decided_by_user_id_fk": { + "name": "permission_access_request_decided_by_user_id_fk", + "tableFrom": "permission_access_request", + "tableTo": "user", + "columnsFrom": ["decided_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "permission_access_request_status_check": { + "name": "permission_access_request_status_check", + "value": "\"permission_access_request\".\"status\" in ('pending', 'fulfilled', 'declined', 'cancelled', 'closed')" + } + }, + "isRLSEnabled": false + }, + "public.permission_group": { + "name": "permission_group", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "is_default": { + "name": "is_default", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "membership_mode": { + "name": "membership_mode", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'inherit'" + } + }, + "indexes": { + "permission_group_created_by_idx": { + "name": "permission_group_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_group_organization_name_unique": { + "name": "permission_group_organization_name_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_group_organization_default_unique": { + "name": "permission_group_organization_default_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "is_default = true", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permission_group_organization_id_organization_id_fk": { + "name": "permission_group_organization_id_organization_id_fk", + "tableFrom": "permission_group", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_created_by_user_id_fk": { + "name": "permission_group_created_by_user_id_fk", + "tableFrom": "permission_group", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.permission_group_member": { + "name": "permission_group_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "permission_group_id": { + "name": "permission_group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "assigned_by": { + "name": "assigned_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "assigned_at": { + "name": "assigned_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "permission_group_member_group_user_unique": { + "name": "permission_group_member_group_user_unique", + "columns": [ + { + "expression": "permission_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_group_member_organization_user_idx": { + "name": "permission_group_member_organization_user_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permission_group_member_permission_group_id_permission_group_id_fk": { + "name": "permission_group_member_permission_group_id_permission_group_id_fk", + "tableFrom": "permission_group_member", + "tableTo": "permission_group", + "columnsFrom": ["permission_group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_member_organization_id_organization_id_fk": { + "name": "permission_group_member_organization_id_organization_id_fk", + "tableFrom": "permission_group_member", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_member_user_id_user_id_fk": { + "name": "permission_group_member_user_id_user_id_fk", + "tableFrom": "permission_group_member", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_member_assigned_by_user_id_fk": { + "name": "permission_group_member_assigned_by_user_id_fk", + "tableFrom": "permission_group_member", + "tableTo": "user", + "columnsFrom": ["assigned_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.permission_group_workspace": { + "name": "permission_group_workspace", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "permission_group_id": { + "name": "permission_group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "permission_group_workspace_workspace_id_idx": { + "name": "permission_group_workspace_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_group_workspace_group_workspace_unique": { + "name": "permission_group_workspace_group_workspace_unique", + "columns": [ + { + "expression": "permission_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permission_group_workspace_permission_group_id_permission_group_id_fk": { + "name": "permission_group_workspace_permission_group_id_permission_group_id_fk", + "tableFrom": "permission_group_workspace", + "tableTo": "permission_group", + "columnsFrom": ["permission_group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_workspace_workspace_id_workspace_id_fk": { + "name": "permission_group_workspace_workspace_id_workspace_id_fk", + "tableFrom": "permission_group_workspace", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_workspace_organization_id_organization_id_fk": { + "name": "permission_group_workspace_organization_id_organization_id_fk", + "tableFrom": "permission_group_workspace", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.permissions": { + "name": "permissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "permission_type": { + "name": "permission_type", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "permissions_entity_idx": { + "name": "permissions_entity_idx", + "columns": [ + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permissions_user_entity_permission_idx": { + "name": "permissions_user_entity_permission_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "permission_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permissions_unique_constraint": { + "name": "permissions_unique_constraint", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permissions_user_id_user_id_fk": { + "name": "permissions_user_id_user_id_fk", + "tableFrom": "permissions", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pinned_item": { + "name": "pinned_item", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_type": { + "name": "resource_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "pinned_at": { + "name": "pinned_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "pinned_item_user_workspace_idx": { + "name": "pinned_item_user_workspace_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pinned_item_resource_idx": { + "name": "pinned_item_resource_idx", + "columns": [ + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pinned_item_user_resource_unique": { + "name": "pinned_item_user_resource_unique", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pinned_item_user_id_user_id_fk": { + "name": "pinned_item_user_id_user_id_fk", + "tableFrom": "pinned_item", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pinned_item_workspace_id_workspace_id_fk": { + "name": "pinned_item_workspace_id_workspace_id_fk", + "tableFrom": "pinned_item", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.project": { + "name": "project", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_scope_key": { + "name": "organization_scope_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "CASE WHEN organization_id IS NULL THEN 'personal' ELSE 'organization:' || organization_id END", + "type": "stored" + } + }, + "owner_id": { + "name": "owner_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "project_organization_archive_id_idx": { + "name": "project_organization_archive_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "project_owner_archive_id_idx": { + "name": "project_owner_archive_id_idx", + "columns": [ + { + "expression": "owner_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "project_organization_id_organization_id_fk": { + "name": "project_organization_id_organization_id_fk", + "tableFrom": "project", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "project_owner_id_user_id_fk": { + "name": "project_owner_id_user_id_fk", + "tableFrom": "project", + "tableTo": "user", + "columnsFrom": ["owner_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "project_id_organization_scope_unique": { + "name": "project_id_organization_scope_unique", + "nullsNotDistinct": false, + "columns": ["id", "organization_scope_key"] + } + }, + "policies": {}, + "checkConstraints": { + "project_name_length": { + "name": "project_name_length", + "value": "char_length(btrim(\"project\".\"name\")) BETWEEN 1 AND 100" + } + }, + "isRLSEnabled": false + }, + "public.public_share": { + "name": "public_share", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "resource_type": { + "name": "resource_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'public'" + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "allowed_emails": { + "name": "allowed_emails", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'[]'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "public_share_entity_id_idx": { + "name": "public_share_entity_id_idx", + "columns": [ + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "public_share_token_unique": { + "name": "public_share_token_unique", + "columns": [ + { + "expression": "token", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "public_share_resource_unique": { + "name": "public_share_resource_unique", + "columns": [ + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "public_share_resource_id_idx": { + "name": "public_share_resource_id_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "public_share_workspace_id_idx": { + "name": "public_share_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "public_share_workspace_id_workspace_id_fk": { + "name": "public_share_workspace_id_workspace_id_fk", + "tableFrom": "public_share", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "public_share_created_by_user_id_fk": { + "name": "public_share_created_by_user_id_fk", + "tableFrom": "public_share", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "public_share_entity_binding_check": { + "name": "public_share_entity_binding_check", + "value": "\n (\"public_share\".\"entity_type\" IS NULL AND \"public_share\".\"entity_id\" IS NULL AND \"public_share\".\"workspace_id\" IS NOT NULL)\n OR (\"public_share\".\"entity_type\" IS NOT NULL AND \"public_share\".\"entity_id\" IS NOT NULL AND char_length(\"public_share\".\"entity_id\") > 0\n AND ((\"public_share\".\"entity_type\" = 'workspace' AND \"public_share\".\"workspace_id\" IS NOT NULL AND \"public_share\".\"entity_id\" = \"public_share\".\"workspace_id\")\n OR (\"public_share\".\"entity_type\" = 'project' AND \"public_share\".\"workspace_id\" IS NULL AND \"public_share\".\"resource_type\" = 'file')))\n " + } + }, + "isRLSEnabled": false + }, + "public.rate_limit_bucket": { + "name": "rate_limit_bucket", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "tokens": { + "name": "tokens", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "last_refill_at": { + "name": "last_refill_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "blocked_until": { + "name": "blocked_until", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "capacity_state": { + "name": "capacity_state", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resource_policy": { + "name": "resource_policy", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "resource_type": { + "name": "resource_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "document": { + "name": "document", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resource_policy_organization_id_idx": { + "name": "resource_policy_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_policy_resource_unique": { + "name": "resource_policy_resource_unique", + "columns": [ + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_policy_workspace_id_idx": { + "name": "resource_policy_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resource_policy_workspace_id_workspace_id_fk": { + "name": "resource_policy_workspace_id_workspace_id_fk", + "tableFrom": "resource_policy", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "resource_policy_organization_id_organization_id_fk": { + "name": "resource_policy_organization_id_organization_id_fk", + "tableFrom": "resource_policy", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "resource_policy_created_by_user_id_fk": { + "name": "resource_policy_created_by_user_id_fk", + "tableFrom": "resource_policy", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "resource_policy_updated_by_user_id_fk": { + "name": "resource_policy_updated_by_user_id_fk", + "tableFrom": "resource_policy", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "resource_policy_owner_check": { + "name": "resource_policy_owner_check", + "value": "num_nonnulls(\"resource_policy\".\"workspace_id\", \"resource_policy\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.resume_queue": { + "name": "resume_queue", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "paused_execution_id": { + "name": "paused_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "parent_execution_id": { + "name": "parent_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "new_execution_id": { + "name": "new_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "context_id": { + "name": "context_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resume_input": { + "name": "resume_input", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "queued_at": { + "name": "queued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "claimed_at": { + "name": "claimed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "resume_queue_parent_status_idx": { + "name": "resume_queue_parent_status_idx", + "columns": [ + { + "expression": "parent_execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "queued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resume_queue_new_execution_idx": { + "name": "resume_queue_new_execution_idx", + "columns": [ + { + "expression": "new_execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resume_queue_paused_execution_id_paused_executions_id_fk": { + "name": "resume_queue_paused_execution_id_paused_executions_id_fk", + "tableFrom": "resume_queue", + "tableTo": "paused_executions", + "columnsFrom": ["paused_execution_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sandbox_image": { + "name": "sandbox_image", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "provider": { + "name": "provider", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "spec_hash": { + "name": "spec_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "spec": { + "name": "spec", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "sandbox_image_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "image_ref": { + "name": "image_ref", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_image_id": { + "name": "provider_image_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "build_id": { + "name": "build_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "materialization_generation": { + "name": "materialization_generation", + "type": "bigint", + "primaryKey": false, + "notNull": false + }, + "error_code": { + "name": "error_code", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_detail": { + "name": "error_detail", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_used_at": { + "name": "last_used_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sandbox_image_provider_spec_unique": { + "name": "sandbox_image_provider_spec_unique", + "columns": [ + { + "expression": "provider", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "spec_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sandbox_image_status_idx": { + "name": "sandbox_image_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sandbox_image_last_used_idx": { + "name": "sandbox_image_last_used_idx", + "columns": [ + { + "expression": "last_used_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_connection": { + "name": "scim_connection", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "settings": { + "name": "settings", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "last_request_at": { + "name": "last_request_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "reconcile_lock_token": { + "name": "reconcile_lock_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reconcile_lease_at": { + "name": "reconcile_lease_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "reconciled_at": { + "name": "reconciled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_connection_organization_unique": { + "name": "scim_connection_organization_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_connection_reconcile_due_idx": { + "name": "scim_connection_reconcile_due_idx", + "columns": [ + { + "expression": "reconciled_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_connection_organization_id_organization_id_fk": { + "name": "scim_connection_organization_id_organization_id_fk", + "tableFrom": "scim_connection", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_connection_created_by_user_id_fk": { + "name": "scim_connection_created_by_user_id_fk", + "tableFrom": "scim_connection", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_credential": { + "name": "scim_credential", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "token_hash": { + "name": "token_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "token_prefix": { + "name": "token_prefix", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scopes": { + "name": "scopes", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "revoked_at": { + "name": "revoked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "revoked_by": { + "name": "revoked_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_used_at": { + "name": "last_used_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_credential_token_hash_unique": { + "name": "scim_credential_token_hash_unique", + "columns": [ + { + "expression": "token_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_credential_connection_idx": { + "name": "scim_credential_connection_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_credential_connection_id_scim_connection_id_fk": { + "name": "scim_credential_connection_id_scim_connection_id_fk", + "tableFrom": "scim_credential", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_credential_revoked_by_user_id_fk": { + "name": "scim_credential_revoked_by_user_id_fk", + "tableFrom": "scim_credential", + "tableTo": "user", + "columnsFrom": ["revoked_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "scim_credential_created_by_user_id_fk": { + "name": "scim_credential_created_by_user_id_fk", + "tableFrom": "scim_credential", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_group": { + "name": "scim_group", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name_key": { + "name": "display_name_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "order_key": { + "name": "order_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_group_connection_display_name_unique": { + "name": "scim_group_connection_display_name_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "display_name_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_connection_external_id_unique": { + "name": "scim_group_connection_external_id_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "external_id is not null", + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_connection_order_idx": { + "name": "scim_group_connection_order_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_group_connection_id_scim_connection_id_fk": { + "name": "scim_group_connection_id_scim_connection_id_fk", + "tableFrom": "scim_group", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_group_mapping": { + "name": "scim_group_mapping", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_kind": { + "name": "target_kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "permission_group_id": { + "name": "permission_group_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "permission_type": { + "name": "permission_type", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'manual'" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_group_mapping_permission_group_idx": { + "name": "scim_group_mapping_permission_group_idx", + "columns": [ + { + "expression": "permission_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_mapping_workspace_idx": { + "name": "scim_group_mapping_workspace_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_mapping_group_target_unique": { + "name": "scim_group_mapping_group_target_unique", + "columns": [ + { + "expression": "group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_kind", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"permission_group_id\", \"workspace_id\", \"role\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_group_mapping_group_id_scim_group_id_fk": { + "name": "scim_group_mapping_group_id_scim_group_id_fk", + "tableFrom": "scim_group_mapping", + "tableTo": "scim_group", + "columnsFrom": ["group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_group_mapping_permission_group_id_permission_group_id_fk": { + "name": "scim_group_mapping_permission_group_id_permission_group_id_fk", + "tableFrom": "scim_group_mapping", + "tableTo": "permission_group", + "columnsFrom": ["permission_group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_group_mapping_workspace_id_workspace_id_fk": { + "name": "scim_group_mapping_workspace_id_workspace_id_fk", + "tableFrom": "scim_group_mapping", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_group_mapping_created_by_user_id_fk": { + "name": "scim_group_mapping_created_by_user_id_fk", + "tableFrom": "scim_group_mapping", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "scim_group_mapping_target_shape": { + "name": "scim_group_mapping_target_shape", + "value": "(\n (\"scim_group_mapping\".\"target_kind\" = 'permission_group' AND \"scim_group_mapping\".\"permission_group_id\" IS NOT NULL AND \"scim_group_mapping\".\"workspace_id\" IS NULL AND \"scim_group_mapping\".\"permission_type\" IS NULL AND \"scim_group_mapping\".\"role\" IS NULL)\n OR (\"scim_group_mapping\".\"target_kind\" = 'workspace' AND \"scim_group_mapping\".\"workspace_id\" IS NOT NULL AND \"scim_group_mapping\".\"permission_type\" IS NOT NULL AND \"scim_group_mapping\".\"permission_group_id\" IS NULL AND \"scim_group_mapping\".\"role\" IS NULL)\n OR (\"scim_group_mapping\".\"target_kind\" = 'org_role' AND \"scim_group_mapping\".\"role\" IS NOT NULL AND \"scim_group_mapping\".\"permission_group_id\" IS NULL AND \"scim_group_mapping\".\"workspace_id\" IS NULL AND \"scim_group_mapping\".\"permission_type\" IS NULL)\n )" + } + }, + "isRLSEnabled": false + }, + "public.scim_group_member": { + "name": "scim_group_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scim_user_id": { + "name": "scim_user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_group_member_group_user_unique": { + "name": "scim_group_member_group_user_unique", + "columns": [ + { + "expression": "group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scim_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_member_scim_user_idx": { + "name": "scim_group_member_scim_user_idx", + "columns": [ + { + "expression": "scim_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_group_member_group_id_scim_group_id_fk": { + "name": "scim_group_member_group_id_scim_group_id_fk", + "tableFrom": "scim_group_member", + "tableTo": "scim_group", + "columnsFrom": ["group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_group_member_scim_user_id_scim_user_id_fk": { + "name": "scim_group_member_scim_user_id_scim_user_id_fk", + "tableFrom": "scim_group_member", + "tableTo": "scim_user", + "columnsFrom": ["scim_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_projection_grant": { + "name": "scim_projection_grant", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scim_user_id": { + "name": "scim_user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_kind": { + "name": "target_kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_id": { + "name": "target_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "permission_type": { + "name": "permission_type", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "baseline_permission": { + "name": "baseline_permission", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "origin": { + "name": "origin", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'directory'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_projection_grant_user_target_unique": { + "name": "scim_projection_grant_user_target_unique", + "columns": [ + { + "expression": "scim_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_kind", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_projection_grant_connection_idx": { + "name": "scim_projection_grant_connection_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_projection_grant_connection_id_scim_connection_id_fk": { + "name": "scim_projection_grant_connection_id_scim_connection_id_fk", + "tableFrom": "scim_projection_grant", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_projection_grant_scim_user_id_scim_user_id_fk": { + "name": "scim_projection_grant_scim_user_id_scim_user_id_fk", + "tableFrom": "scim_projection_grant", + "tableTo": "scim_user", + "columnsFrom": ["scim_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_request_log": { + "name": "scim_request_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "method": { + "name": "method", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "scim_type": { + "name": "scim_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "detail": { + "name": "detail", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "duration_ms": { + "name": "duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_request_log_connection_created_idx": { + "name": "scim_request_log_connection_created_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_request_log_connection_id_scim_connection_id_fk": { + "name": "scim_request_log_connection_id_scim_connection_id_fk", + "tableFrom": "scim_request_log", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_user": { + "name": "scim_user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_name": { + "name": "user_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "attributes": { + "name": "attributes", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "order_key": { + "name": "order_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_user_connection_user_unique": { + "name": "scim_user_connection_user_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_connection_user_name_unique": { + "name": "scim_user_connection_user_name_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_connection_external_id_unique": { + "name": "scim_user_connection_external_id_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "external_id is not null", + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_connection_order_idx": { + "name": "scim_user_connection_order_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_user_idx": { + "name": "scim_user_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_user_connection_id_scim_connection_id_fk": { + "name": "scim_user_connection_id_scim_connection_id_fk", + "tableFrom": "scim_user", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_user_user_id_user_id_fk": { + "name": "scim_user_user_id_user_id_fk", + "tableFrom": "scim_user", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_user_tombstone": { + "name": "scim_user_tombstone", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_user_tombstone_connection_external_id_unique": { + "name": "scim_user_tombstone_connection_external_id_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_tombstone_user_idx": { + "name": "scim_user_tombstone_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_user_tombstone_connection_id_scim_connection_id_fk": { + "name": "scim_user_tombstone_connection_id_scim_connection_id_fk", + "tableFrom": "scim_user_tombstone", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_user_tombstone_user_id_user_id_fk": { + "name": "scim_user_tombstone_user_id_user_id_fk", + "tableFrom": "scim_user_tombstone", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.secret_usage": { + "name": "secret_usage", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret_name": { + "name": "secret_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret_scope": { + "name": "secret_scope", + "type": "secret_usage_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "secret_owner_user_id": { + "name": "secret_owner_user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "source": { + "name": "source", + "type": "secret_usage_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "actor_user_id": { + "name": "actor_user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "usage_date": { + "name": "usage_date", + "type": "date", + "primaryKey": false, + "notNull": true + }, + "use_count": { + "name": "use_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_used_at": { + "name": "last_used_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "last_execution_id": { + "name": "last_execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_trigger": { + "name": "last_trigger", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "secret_usage_bucket_unique": { + "name": "secret_usage_bucket_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_name", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_scope", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "actor_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "usage_date", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "secret_usage_secret_recent_idx": { + "name": "secret_usage_secret_recent_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_name", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_scope", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_used_at", + "isExpression": false, + "asc": false, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "secret_usage_workspace_id_workspace_id_fk": { + "name": "secret_usage_workspace_id_workspace_id_fk", + "tableFrom": "secret_usage", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.session": { + "name": "session", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "ip_address": { + "name": "ip_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active_organization_id": { + "name": "active_organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "impersonated_by": { + "name": "impersonated_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "session_user_id_idx": { + "name": "session_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "session_user_id_user_id_fk": { + "name": "session_user_id_user_id_fk", + "tableFrom": "session", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_active_organization_id_organization_id_fk": { + "name": "session_active_organization_id_organization_id_fk", + "tableFrom": "session", + "tableTo": "organization", + "columnsFrom": ["active_organization_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "session_token_unique": { + "name": "session_token_unique", + "nullsNotDistinct": false, + "columns": ["token"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.settings": { + "name": "settings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "theme": { + "name": "theme", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'system'" + }, + "auto_connect": { + "name": "auto_connect", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "telemetry_enabled": { + "name": "telemetry_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "email_preferences": { + "name": "email_preferences", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "billing_usage_notifications_enabled": { + "name": "billing_usage_notifications_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "super_user_mode_enabled": { + "name": "super_user_mode_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "mothership_environment": { + "name": "mothership_environment", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'default'" + }, + "error_notifications_enabled": { + "name": "error_notifications_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "snap_to_grid_size": { + "name": "snap_to_grid_size", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "show_action_bar": { + "name": "show_action_bar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "auto_focus_on_click": { + "name": "auto_focus_on_click", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "timezone": { + "name": "timezone", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "copilot_auto_allowed_tools": { + "name": "copilot_auto_allowed_tools", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "last_active_workspace_id": { + "name": "last_active_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "settings_user_id_user_id_fk": { + "name": "settings_user_id_user_id_fk", + "tableFrom": "settings", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "settings_user_id_unique": { + "name": "settings_user_id_unique", + "nullsNotDistinct": false, + "columns": ["user_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sim_link": { + "name": "sim_link", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "normalized_name": { + "name": "normalized_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "default_url": { + "name": "default_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "unlisted": { + "name": "unlisted", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "restrict_edit": { + "name": "restrict_edit", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "visit_count": { + "name": "visit_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_visited_at": { + "name": "last_visited_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sim_link_organization_name_unique": { + "name": "sim_link_organization_name_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "normalized_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sim_link_created_by_idx": { + "name": "sim_link_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sim_link_organization_id_organization_id_fk": { + "name": "sim_link_organization_id_organization_id_fk", + "tableFrom": "sim_link", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sim_link_created_by_user_id_fk": { + "name": "sim_link_created_by_user_id_fk", + "tableFrom": "sim_link", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sim_trigger_state": { + "name": "sim_trigger_state", + "schema": "", + "columns": { + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "block_id": { + "name": "block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scope_key": { + "name": "scope_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "last_fired_at": { + "name": "last_fired_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "sim_trigger_state_workflow_id_workflow_id_fk": { + "name": "sim_trigger_state_workflow_id_workflow_id_fk", + "tableFrom": "sim_trigger_state", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "sim_trigger_state_workflow_id_block_id_scope_key_pk": { + "name": "sim_trigger_state_workflow_id_block_id_scope_key_pk", + "columns": ["workflow_id", "block_id", "scope_key"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.skill": { + "name": "skill", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "skill_workspace_name_unique": { + "name": "skill_workspace_name_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "skill_workspace_id_workspace_id_fk": { + "name": "skill_workspace_id_workspace_id_fk", + "tableFrom": "skill", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "skill_user_id_user_id_fk": { + "name": "skill_user_id_user_id_fk", + "tableFrom": "skill", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.skill_member": { + "name": "skill_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "skill_id": { + "name": "skill_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "invited_by": { + "name": "invited_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "skill_member_user_id_idx": { + "name": "skill_member_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "skill_member_unique": { + "name": "skill_member_unique", + "columns": [ + { + "expression": "skill_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "skill_member_skill_id_skill_id_fk": { + "name": "skill_member_skill_id_skill_id_fk", + "tableFrom": "skill_member", + "tableTo": "skill", + "columnsFrom": ["skill_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "skill_member_user_id_user_id_fk": { + "name": "skill_member_user_id_user_id_fk", + "tableFrom": "skill_member", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "skill_member_invited_by_user_id_fk": { + "name": "skill_member_invited_by_user_id_fk", + "tableFrom": "skill_member", + "tableTo": "user", + "columnsFrom": ["invited_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.slack_app": { + "name": "slack_app", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_client_secret": { + "name": "encrypted_client_secret", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_signing_secret": { + "name": "encrypted_signing_secret", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "revision": { + "name": "revision", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "slack_app_organization_id_organization_id_fk": { + "name": "slack_app_organization_id_organization_id_fk", + "tableFrom": "slack_app", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "slack_app_owner_check": { + "name": "slack_app_owner_check", + "value": "(\"slack_app\".\"kind\" = 'custom' AND \"slack_app\".\"organization_id\" IS NOT NULL) OR (\"slack_app\".\"kind\" = 'shared' AND \"slack_app\".\"organization_id\" IS NULL)" + }, + "slack_app_custom_credentials_check": { + "name": "slack_app_custom_credentials_check", + "value": "\"slack_app\".\"kind\" = 'shared' OR (\"slack_app\".\"client_id\" IS NOT NULL AND \"slack_app\".\"encrypted_client_secret\" IS NOT NULL AND \"slack_app\".\"encrypted_signing_secret\" IS NOT NULL)" + } + }, + "isRLSEnabled": false + }, + "public.slack_search_installation": { + "name": "slack_search_installation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "app_id": { + "name": "app_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "slack_app_id": { + "name": "slack_app_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "team_id": { + "name": "team_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "team_name": { + "name": "team_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "bot_user_id": { + "name": "bot_user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "enterprise_id": { + "name": "enterprise_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "credential_version": { + "name": "credential_version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "last_outcome": { + "name": "last_outcome", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_event_at": { + "name": "last_event_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "slack_search_installation_organization_idx": { + "name": "slack_search_installation_organization_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_installation_credential_unique": { + "name": "slack_search_installation_credential_unique", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_installation_app_team_unique": { + "name": "slack_search_installation_app_team_unique", + "columns": [ + { + "expression": "app_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "team_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_installation_active_team_unique": { + "name": "slack_search_installation_active_team_unique", + "columns": [ + { + "expression": "team_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"slack_search_installation\".\"enabled\" = true", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "slack_search_installation_organization_id_organization_id_fk": { + "name": "slack_search_installation_organization_id_organization_id_fk", + "tableFrom": "slack_search_installation", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "slack_search_installation_credential_id_credential_id_fk": { + "name": "slack_search_installation_credential_id_credential_id_fk", + "tableFrom": "slack_search_installation", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "slack_search_installation_slack_app_id_slack_app_id_fk": { + "name": "slack_search_installation_slack_app_id_slack_app_id_fk", + "tableFrom": "slack_search_installation", + "tableTo": "slack_app", + "columnsFrom": ["slack_app_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.slack_search_turn": { + "name": "slack_search_turn", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "ordinal": { + "name": "ordinal", + "type": "integer", + "primaryKey": false, + "notNull": true, + "identity": { + "type": "always", + "name": "slack_search_turn_ordinal_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "installation_id": { + "name": "installation_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "conversation_key": { + "name": "conversation_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "event_id": { + "name": "event_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "lease_id": { + "name": "lease_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lease_expires_at": { + "name": "lease_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "outcome": { + "name": "outcome", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "slack_search_turn_event_unique": { + "name": "slack_search_turn_event_unique", + "columns": [ + { + "expression": "installation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "event_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_turn_pending_idx": { + "name": "slack_search_turn_pending_idx", + "columns": [ + { + "expression": "installation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_turn_thread_idx": { + "name": "slack_search_turn_thread_idx", + "columns": [ + { + "expression": "conversation_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_turn_active_thread_unique": { + "name": "slack_search_turn_active_thread_unique", + "columns": [ + { + "expression": "conversation_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"slack_search_turn\".\"status\" = 'running'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "slack_search_turn_installation_id_slack_search_installation_id_fk": { + "name": "slack_search_turn_installation_id_slack_search_installation_id_fk", + "tableFrom": "slack_search_turn", + "tableTo": "slack_search_installation", + "columnsFrom": ["installation_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sso_domain": { + "name": "sso_domain", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "verification_token": { + "name": "verification_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "verified_at": { + "name": "verified_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "primary_provider_id": { + "name": "primary_provider_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sso_domain_domain_idx": { + "name": "sso_domain_domain_idx", + "columns": [ + { + "expression": "domain", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_domain_org_domain_unique": { + "name": "sso_domain_org_domain_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "domain", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_domain_verified_unique": { + "name": "sso_domain_verified_unique", + "columns": [ + { + "expression": "domain", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "status = 'verified'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sso_domain_organization_id_organization_id_fk": { + "name": "sso_domain_organization_id_organization_id_fk", + "tableFrom": "sso_domain", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sso_domain_created_by_user_id_fk": { + "name": "sso_domain_created_by_user_id_fk", + "tableFrom": "sso_domain", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sso_provider": { + "name": "sso_provider", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "issuer": { + "name": "issuer", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "oidc_config": { + "name": "oidc_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "saml_config": { + "name": "saml_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "domain_verified": { + "name": "domain_verified", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "jit_provisioning_enabled": { + "name": "jit_provisioning_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + } + }, + "indexes": { + "sso_provider_provider_id_unique": { + "name": "sso_provider_provider_id_unique", + "columns": [ + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_provider_domain_idx": { + "name": "sso_provider_domain_idx", + "columns": [ + { + "expression": "domain", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_provider_user_id_idx": { + "name": "sso_provider_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_provider_organization_id_idx": { + "name": "sso_provider_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sso_provider_user_id_user_id_fk": { + "name": "sso_provider_user_id_user_id_fk", + "tableFrom": "sso_provider", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sso_provider_organization_id_organization_id_fk": { + "name": "sso_provider_organization_id_organization_id_fk", + "tableFrom": "sso_provider", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subscription": { + "name": "subscription", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "plan": { + "name": "plan", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stripe_customer_id": { + "name": "stripe_customer_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stripe_subscription_id": { + "name": "stripe_subscription_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "period_start": { + "name": "period_start", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "period_end": { + "name": "period_end", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "cancel_at_period_end": { + "name": "cancel_at_period_end", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "cancel_at": { + "name": "cancel_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "canceled_at": { + "name": "canceled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "ended_at": { + "name": "ended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "seats": { + "name": "seats", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "trial_start": { + "name": "trial_start", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "trial_end": { + "name": "trial_end", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "billing_interval": { + "name": "billing_interval", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stripe_schedule_id": { + "name": "stripe_schedule_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "last_closed_period_start": { + "name": "last_closed_period_start", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "subscription_reference_status_idx": { + "name": "subscription_reference_status_idx", + "columns": [ + { + "expression": "reference_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "subscription_cycle_close_lagging_idx": { + "name": "subscription_cycle_close_lagging_idx", + "columns": [ + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"subscription\".\"status\" in ('active', 'past_due') and \"subscription\".\"period_start\" is not null and (\"subscription\".\"last_closed_period_start\" is null or \"subscription\".\"last_closed_period_start\" < \"subscription\".\"period_start\")", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "check_enterprise_metadata": { + "name": "check_enterprise_metadata", + "value": "plan != 'enterprise' OR metadata IS NOT NULL" + } + }, + "isRLSEnabled": false + }, + "public.table_jobs": { + "name": "table_jobs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "rows_processed": { + "name": "rows_processed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "table_jobs_one_active_per_table": { + "name": "table_jobs_one_active_per_table", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"table_jobs\".\"status\" = 'running' AND \"table_jobs\".\"type\" <> 'export'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_jobs_watchdog_idx": { + "name": "table_jobs_watchdog_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_jobs_table_started_idx": { + "name": "table_jobs_table_started_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "table_jobs_table_id_user_table_definitions_id_fk": { + "name": "table_jobs_table_id_user_table_definitions_id_fk", + "tableFrom": "table_jobs", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_jobs_workspace_id_workspace_id_fk": { + "name": "table_jobs_workspace_id_workspace_id_fk", + "tableFrom": "table_jobs", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.table_row_executions": { + "name": "table_row_executions", + "schema": "", + "columns": { + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "row_id": { + "name": "row_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "job_id": { + "name": "job_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "running_block_ids": { + "name": "running_block_ids", + "type": "text[]", + "primaryKey": false, + "notNull": true, + "default": "'{}'::text[]" + }, + "block_errors": { + "name": "block_errors", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "cancelled_at": { + "name": "cancelled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "capability_governed_user_id": { + "name": "capability_governed_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "enrichment_details": { + "name": "enrichment_details", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "table_row_executions_table_status_idx": { + "name": "table_row_executions_table_status_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"table_row_executions\".\"status\" IN ('queued', 'running', 'pending')", + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_row_executions_execution_id_idx": { + "name": "table_row_executions_execution_id_idx", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"table_row_executions\".\"execution_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_row_executions_table_group_idx": { + "name": "table_row_executions_table_group_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "table_row_executions_table_id_user_table_definitions_id_fk": { + "name": "table_row_executions_table_id_user_table_definitions_id_fk", + "tableFrom": "table_row_executions", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_row_executions_row_id_user_table_rows_id_fk": { + "name": "table_row_executions_row_id_user_table_rows_id_fk", + "tableFrom": "table_row_executions", + "tableTo": "user_table_rows", + "columnsFrom": ["row_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_row_executions_capability_governed_user_id_user_id_fk": { + "name": "table_row_executions_capability_governed_user_id_user_id_fk", + "tableFrom": "table_row_executions", + "tableTo": "user", + "columnsFrom": ["capability_governed_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "table_row_executions_row_id_group_id_pk": { + "name": "table_row_executions_row_id_group_id_pk", + "columns": ["row_id", "group_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.table_run_dispatches": { + "name": "table_run_dispatches", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "request_id": { + "name": "request_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "mode": { + "name": "mode", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scope": { + "name": "scope", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "cursor": { + "name": "cursor", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "limit": { + "name": "limit", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "processed_count": { + "name": "processed_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "is_manual_run": { + "name": "is_manual_run", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "triggered_by_user_id": { + "name": "triggered_by_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "capability_governed_user_id": { + "name": "capability_governed_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "requested_at": { + "name": "requested_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "heartbeat_at": { + "name": "heartbeat_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "cancelled_at": { + "name": "cancelled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "table_run_dispatches_active_idx": { + "name": "table_run_dispatches_active_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_run_dispatches_watchdog_idx": { + "name": "table_run_dispatches_watchdog_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "requested_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_run_dispatches_governed_active_idx": { + "name": "table_run_dispatches_governed_active_idx", + "columns": [ + { + "expression": "capability_governed_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"table_run_dispatches\".\"status\" IN ('pending', 'dispatching')", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "table_run_dispatches_table_id_user_table_definitions_id_fk": { + "name": "table_run_dispatches_table_id_user_table_definitions_id_fk", + "tableFrom": "table_run_dispatches", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_run_dispatches_workspace_id_workspace_id_fk": { + "name": "table_run_dispatches_workspace_id_workspace_id_fk", + "tableFrom": "table_run_dispatches", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_run_dispatches_triggered_by_user_id_user_id_fk": { + "name": "table_run_dispatches_triggered_by_user_id_user_id_fk", + "tableFrom": "table_run_dispatches", + "tableTo": "user", + "columnsFrom": ["triggered_by_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "table_run_dispatches_capability_governed_user_id_user_id_fk": { + "name": "table_run_dispatches_capability_governed_user_id_user_id_fk", + "tableFrom": "table_run_dispatches", + "tableTo": "user", + "columnsFrom": ["capability_governed_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.table_views": { + "name": "table_views", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "is_default": { + "name": "is_default", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "table_views_table_created_idx": { + "name": "table_views_table_created_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_views_workspace_created_idx": { + "name": "table_views_workspace_created_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_views_table_default_unique": { + "name": "table_views_table_default_unique", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "is_default = true", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "table_views_table_id_user_table_definitions_id_fk": { + "name": "table_views_table_id_user_table_definitions_id_fk", + "tableFrom": "table_views", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_views_workspace_id_workspace_id_fk": { + "name": "table_views_workspace_id_workspace_id_fk", + "tableFrom": "table_views", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_views_created_by_user_id_fk": { + "name": "table_views_created_by_user_id_fk", + "tableFrom": "table_views", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.upload_session": { + "name": "upload_session", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "token_hash": { + "name": "token_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "purpose": { + "name": "purpose", + "type": "upload_session_purpose", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "method": { + "name": "method", + "type": "upload_session_method", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "storage_context": { + "name": "storage_context", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "final_key": { + "name": "final_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "storage_provider": { + "name": "storage_provider", + "type": "upload_session_provider", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "provider_upload_id": { + "name": "provider_upload_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_object_version": { + "name": "provider_object_version", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "file_name": { + "name": "file_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "file_size": { + "name": "file_size", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "part_size": { + "name": "part_size", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "part_count": { + "name": "part_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "upload_session_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'uploading'" + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "processing_lease_id": { + "name": "processing_lease_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "processing_lease_expires_at": { + "name": "processing_lease_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_file_id": { + "name": "completed_file_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "upload_session_token_hash_unique": { + "name": "upload_session_token_hash_unique", + "columns": [ + { + "expression": "token_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "upload_session_final_key_unique": { + "name": "upload_session_final_key_unique", + "columns": [ + { + "expression": "final_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "upload_session_status_expires_at_idx": { + "name": "upload_session_status_expires_at_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.usage_log": { + "name": "usage_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "usage_log_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "usage_log_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "cost": { + "name": "cost", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "event_key": { + "name": "event_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "billing_entity_type": { + "name": "billing_entity_type", + "type": "billing_entity_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "billing_entity_id": { + "name": "billing_entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "billing_period_start": { + "name": "billing_period_start", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "billing_period_end": { + "name": "billing_period_end", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "usage_log_user_created_at_idx": { + "name": "usage_log_user_created_at_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_source_idx": { + "name": "usage_log_source_idx", + "columns": [ + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_workflow_id_idx": { + "name": "usage_log_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_event_key_unique": { + "name": "usage_log_event_key_unique", + "columns": [ + { + "expression": "event_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"usage_log\".\"event_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_billing_entity_period_cost_idx": { + "name": "usage_log_billing_entity_period_cost_idx", + "columns": [ + { + "expression": "billing_entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_period_start", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_period_end", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "cost", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"usage_log\".\"billing_entity_type\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_billing_entity_created_at_cost_idx": { + "name": "usage_log_billing_entity_created_at_cost_idx", + "columns": [ + { + "expression": "billing_entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "cost", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"usage_log\".\"billing_entity_type\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_workspace_created_at_cost_idx": { + "name": "usage_log_workspace_created_at_cost_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "cost", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_execution_id_idx": { + "name": "usage_log_execution_id_idx", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "usage_log_user_id_user_id_fk": { + "name": "usage_log_user_id_user_id_fk", + "tableFrom": "usage_log", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "usage_log_workspace_id_workspace_id_fk": { + "name": "usage_log_workspace_id_workspace_id_fk", + "tableFrom": "usage_log", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "usage_log_workflow_id_workflow_id_fk": { + "name": "usage_log_workflow_id_workflow_id_fk", + "tableFrom": "usage_log", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "usage_log_billing_scope_all_or_none": { + "name": "usage_log_billing_scope_all_or_none", + "value": "(\n (\"usage_log\".\"billing_entity_type\" IS NULL AND \"usage_log\".\"billing_entity_id\" IS NULL AND \"usage_log\".\"billing_period_start\" IS NULL AND \"usage_log\".\"billing_period_end\" IS NULL)\n OR\n (\"usage_log\".\"billing_entity_type\" IS NOT NULL AND \"usage_log\".\"billing_entity_id\" IS NOT NULL AND \"usage_log\".\"billing_period_start\" IS NOT NULL AND \"usage_log\".\"billing_period_end\" IS NOT NULL AND \"usage_log\".\"billing_period_start\" < \"usage_log\".\"billing_period_end\")\n )" + } + }, + "isRLSEnabled": false + }, + "public.user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "normalized_email": { + "name": "normalized_email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email_verified": { + "name": "email_verified", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "image": { + "name": "image", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "stripe_customer_id": { + "name": "stripe_customer_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'user'" + }, + "banned": { + "name": "banned", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ban_reason": { + "name": "ban_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ban_expires": { + "name": "ban_expires", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "suspended_at": { + "name": "suspended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "suspension_source": { + "name": "suspension_source", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "user_email_lower_idx": { + "name": "user_email_lower_idx", + "columns": [ + { + "expression": "lower(btrim(\"email\"))", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_gmail_mailbox_idx": { + "name": "user_gmail_mailbox_idx", + "columns": [ + { + "expression": "(CASE WHEN split_part(lower(btrim(\"email\")), '@', 2) IN ('gmail.com', 'googlemail.com') THEN replace(split_part(split_part(lower(btrim(\"email\")), '@', 1), '+', 1), '.', '') || '@gmail.com' END)", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "(CASE WHEN split_part(lower(btrim(\"user\".\"email\")), '@', 2) IN ('gmail.com', 'googlemail.com') THEN replace(split_part(split_part(lower(btrim(\"user\".\"email\")), '@', 1), '+', 1), '.', '') || '@gmail.com' END) IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_email_unique": { + "name": "user_email_unique", + "nullsNotDistinct": false, + "columns": ["email"] + }, + "user_normalized_email_unique": { + "name": "user_normalized_email_unique", + "nullsNotDistinct": false, + "columns": ["normalized_email"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_stats": { + "name": "user_stats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "current_usage_limit": { + "name": "current_usage_limit", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'5'" + }, + "usage_limit_updated_at": { + "name": "usage_limit_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "last_period_cost": { + "name": "last_period_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'0'" + }, + "billed_overage_this_period": { + "name": "billed_overage_this_period", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "credit_balance": { + "name": "credit_balance", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "last_period_copilot_cost": { + "name": "last_period_copilot_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'0'" + }, + "storage_used_bytes": { + "name": "storage_used_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "free_tier_eligible": { + "name": "free_tier_eligible", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "billing_blocked": { + "name": "billing_blocked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "billing_blocked_reason": { + "name": "billing_blocked_reason", + "type": "billing_blocked_reason", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "limit_notifications": { + "name": "limit_notifications", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + } + }, + "indexes": {}, + "foreignKeys": { + "user_stats_user_id_user_id_fk": { + "name": "user_stats_user_id_user_id_fk", + "tableFrom": "user_stats", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_stats_user_id_unique": { + "name": "user_stats_user_id_unique", + "nullsNotDistinct": false, + "columns": ["user_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_table_definitions": { + "name": "user_table_definitions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "folder_id": { + "name": "folder_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema": { + "name": "schema", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "max_rows": { + "name": "max_rows", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 10000 + }, + "row_count": { + "name": "row_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "rows_version": { + "name": "rows_version", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "schema_locked": { + "name": "schema_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "insert_locked": { + "name": "insert_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "update_locked": { + "name": "update_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "delete_locked": { + "name": "delete_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "user_table_def_workspace_id_idx": { + "name": "user_table_def_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_def_folder_id_idx": { + "name": "user_table_def_folder_id_idx", + "columns": [ + { + "expression": "folder_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_def_created_by_idx": { + "name": "user_table_def_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "user_table_def_workspace_name_unique": { + "name": "user_table_def_workspace_name_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"user_table_definitions\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_def_archived_at_idx": { + "name": "user_table_def_archived_at_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_def_workspace_archived_partial_idx": { + "name": "user_table_def_workspace_archived_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"user_table_definitions\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_table_definitions_workspace_id_workspace_id_fk": { + "name": "user_table_definitions_workspace_id_workspace_id_fk", + "tableFrom": "user_table_definitions", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_table_definitions_folder_id_folder_id_fk": { + "name": "user_table_definitions_folder_id_folder_id_fk", + "tableFrom": "user_table_definitions", + "tableTo": "folder", + "columnsFrom": ["folder_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "user_table_definitions_created_by_user_id_fk": { + "name": "user_table_definitions_created_by_user_id_fk", + "tableFrom": "user_table_definitions", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_table_row_changes": { + "name": "user_table_row_changes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "bigint", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "user_table_row_changes_id_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": "1", + "cycle": false + } + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "row_delta": { + "name": "row_delta", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "user_table_row_changes_table_id_idx": { + "name": "user_table_row_changes_table_id_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_table_row_changes_table_id_user_table_definitions_id_fk": { + "name": "user_table_row_changes_table_id_user_table_definitions_id_fk", + "tableFrom": "user_table_row_changes", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_table_row_secret_provenance": { + "name": "user_table_row_secret_provenance", + "schema": "", + "columns": { + "row_id": { + "name": "row_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "content_updated_at": { + "name": "content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "user_table_row_secret_provenance_row_id_user_table_rows_id_fk": { + "name": "user_table_row_secret_provenance_row_id_user_table_rows_id_fk", + "tableFrom": "user_table_row_secret_provenance", + "tableTo": "user_table_rows", + "columnsFrom": ["row_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "user_table_row_secret_provenance_status_check": { + "name": "user_table_row_secret_provenance_status_check", + "value": "\"user_table_row_secret_provenance\".\"status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.user_table_rows": { + "name": "user_table_rows", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "position": { + "name": "position", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "order_key": { + "name": "order_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "user_table_rows_created_by_idx": { + "name": "user_table_rows_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"user_table_rows\".\"created_by\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "user_table_rows_tenant_data_gin_idx": { + "name": "user_table_rows_tenant_data_gin_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "\"data\" jsonb_path_ops", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": { + "fastupdate": "off" + } + }, + "user_table_rows_workspace_table_idx": { + "name": "user_table_rows_workspace_table_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_rows_table_position_idx": { + "name": "user_table_rows_table_position_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "position", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_rows_table_order_key_idx": { + "name": "user_table_rows_table_order_key_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_rows_table_created_id_idx": { + "name": "user_table_rows_table_created_id_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_rows_table_id_id_idx": { + "name": "user_table_rows_table_id_id_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_table_rows_table_id_user_table_definitions_id_fk": { + "name": "user_table_rows_table_id_user_table_definitions_id_fk", + "tableFrom": "user_table_rows", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_table_rows_workspace_id_workspace_id_fk": { + "name": "user_table_rows_workspace_id_workspace_id_fk", + "tableFrom": "user_table_rows", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_table_rows_created_by_user_id_fk": { + "name": "user_table_rows_created_by_user_id_fk", + "tableFrom": "user_table_rows", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.verification": { + "name": "verification", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "identifier": { + "name": "identifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "verification_identifier_idx": { + "name": "verification_identifier_idx", + "columns": [ + { + "expression": "identifier", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "verification_expires_at_idx": { + "name": "verification_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.waitlist": { + "name": "waitlist", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "waitlist_email_unique": { + "name": "waitlist_email_unique", + "nullsNotDistinct": false, + "columns": ["email"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.webhook": { + "name": "webhook", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "registration_status": { + "name": "registration_status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "registration_generation": { + "name": "registration_generation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "config_fingerprint": { + "name": "config_fingerprint", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "prepared_at": { + "name": "prepared_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "block_id": { + "name": "block_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "routing_key": { + "name": "routing_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider": { + "name": "provider", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_config": { + "name": "provider_config", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "failed_count": { + "name": "failed_count", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "last_failed_at": { + "name": "last_failed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "path_deployment_unique": { + "name": "path_deployment_unique", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"webhook\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_workflow_deployment_idx": { + "name": "webhook_workflow_deployment_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_routing_key_active_idx": { + "name": "webhook_routing_key_active_idx", + "columns": [ + { + "expression": "routing_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"webhook\".\"archived_at\" IS NULL AND \"webhook\".\"routing_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_archived_at_partial_idx": { + "name": "webhook_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"webhook\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_webhook_on_provider_is_active_workflow_id_deploym_bdeed5468": { + "name": "idx_webhook_on_provider_is_active_workflow_id_deploym_bdeed5468", + "columns": [ + { + "expression": "provider", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "is_active", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_webhook_on_workflow_id_block_id_updated_at_desc": { + "name": "idx_webhook_on_workflow_id_block_id_updated_at_desc", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": false, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_active_registration_unique": { + "name": "webhook_active_registration_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"webhook\".\"registration_status\" = 'active' AND \"webhook\".\"block_id\" IS NOT NULL AND \"webhook\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_candidate_registration_unique": { + "name": "webhook_candidate_registration_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"webhook\".\"registration_status\" = 'candidate' AND \"webhook\".\"block_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_registration_status_generation_idx": { + "name": "webhook_registration_status_generation_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "registration_status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "registration_generation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "webhook_workflow_id_workflow_id_fk": { + "name": "webhook_workflow_id_workflow_id_fk", + "tableFrom": "webhook", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "webhook_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "webhook_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "webhook", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "webhook_registration_status_check": { + "name": "webhook_registration_status_check", + "value": "\"webhook\".\"registration_status\" IS NULL OR \"webhook\".\"registration_status\" IN ('active', 'candidate', 'retired', 'orphaned')" + }, + "webhook_registration_generation_check": { + "name": "webhook_registration_generation_check", + "value": "\"webhook\".\"registration_generation\" IS NULL OR \"webhook\".\"registration_generation\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.webhook_path_claim": { + "name": "webhook_path_claim", + "schema": "", + "columns": { + "path": { + "name": "path", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "generation": { + "name": "generation", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "webhook_path_claim_workflow_idx": { + "name": "webhook_path_claim_workflow_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "webhook_path_claim_workflow_id_workflow_id_fk": { + "name": "webhook_path_claim_workflow_id_workflow_id_fk", + "tableFrom": "webhook_path_claim", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "webhook_path_claim_generation_check": { + "name": "webhook_path_claim_generation_check", + "value": "\"webhook_path_claim\".\"generation\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.workflow": { + "name": "workflow", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "folder_id": { + "name": "folder_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_synced": { + "name": "last_synced", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "is_deployed": { + "name": "is_deployed", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "deployed_at": { + "name": "deployed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "is_public_api": { + "name": "is_public_api", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "locked": { + "name": "locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "fork_sync_excluded": { + "name": "fork_sync_excluded", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "run_count": { + "name": "run_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_run_at": { + "name": "last_run_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "variables": { + "name": "variables", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "code_meta": { + "name": "code_meta", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workflow_workspace_id_idx": { + "name": "workflow_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_user_workspace_idx": { + "name": "workflow_user_workspace_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_workspace_folder_name_active_unique": { + "name": "workflow_workspace_folder_name_active_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"folder_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_folder_sort_idx": { + "name": "workflow_folder_sort_idx", + "columns": [ + { + "expression": "folder_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sort_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_active_workspace_sort_idx": { + "name": "workflow_active_workspace_sort_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sort_order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_archived_at_idx": { + "name": "workflow_archived_at_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_workspace_archived_partial_idx": { + "name": "workflow_workspace_archived_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_user_id_user_id_fk": { + "name": "workflow_user_id_user_id_fk", + "tableFrom": "workflow", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_workspace_id_workspace_id_fk": { + "name": "workflow_workspace_id_workspace_id_fk", + "tableFrom": "workflow", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_folder_id_folder_id_fk": { + "name": "workflow_folder_id_folder_id_fk", + "tableFrom": "workflow", + "tableTo": "folder", + "columnsFrom": ["folder_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_blocks": { + "name": "workflow_blocks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "position_x": { + "name": "position_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "position_y": { + "name": "position_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "horizontal_handles": { + "name": "horizontal_handles", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "is_wide": { + "name": "is_wide", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "advanced_mode": { + "name": "advanced_mode", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "trigger_mode": { + "name": "trigger_mode", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "error_enabled": { + "name": "error_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "retry": { + "name": "retry", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "locked": { + "name": "locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "sub_blocks": { + "name": "sub_blocks", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "outputs": { + "name": "outputs", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_blocks_workflow_id_idx": { + "name": "workflow_blocks_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_blocks_type_idx": { + "name": "workflow_blocks_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_blocks_workflow_id_workflow_id_fk": { + "name": "workflow_blocks_workflow_id_workflow_id_fk", + "tableFrom": "workflow_blocks", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_checkpoints": { + "name": "workflow_checkpoints", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "message_id": { + "name": "message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_state": { + "name": "workflow_state", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_checkpoints_chat_id_idx": { + "name": "workflow_checkpoints_chat_id_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_message_id_idx": { + "name": "workflow_checkpoints_message_id_idx", + "columns": [ + { + "expression": "message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_user_workflow_idx": { + "name": "workflow_checkpoints_user_workflow_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_workflow_chat_idx": { + "name": "workflow_checkpoints_workflow_chat_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_created_at_idx": { + "name": "workflow_checkpoints_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_chat_created_at_idx": { + "name": "workflow_checkpoints_chat_created_at_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_checkpoints_user_id_user_id_fk": { + "name": "workflow_checkpoints_user_id_user_id_fk", + "tableFrom": "workflow_checkpoints", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_checkpoints_workflow_id_workflow_id_fk": { + "name": "workflow_checkpoints_workflow_id_workflow_id_fk", + "tableFrom": "workflow_checkpoints", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_checkpoints_chat_id_copilot_chats_id_fk": { + "name": "workflow_checkpoints_chat_id_copilot_chats_id_fk", + "tableFrom": "workflow_checkpoints", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_deployment_operation": { + "name": "workflow_deployment_operation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "previous_active_version_id": { + "name": "previous_active_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "action": { + "name": "action", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "protocol_version": { + "name": "protocol_version", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "generation": { + "name": "generation", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'preparing'" + }, + "component_readiness": { + "name": "component_readiness", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "error_code": { + "name": "error_code", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "idempotency_key": { + "name": "idempotency_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "request_hash": { + "name": "request_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "actor_id": { + "name": "actor_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_deployment_operation_workflow_generation_unique": { + "name": "workflow_deployment_operation_workflow_generation_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "generation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_workflow_idempotency_unique": { + "name": "workflow_deployment_operation_workflow_idempotency_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "idempotency_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_deployment_operation\".\"idempotency_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_workflow_in_flight_unique": { + "name": "workflow_deployment_operation_workflow_in_flight_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_deployment_operation\".\"status\" IN ('preparing', 'activating')", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_workflow_status_idx": { + "name": "workflow_deployment_operation_workflow_status_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_deployment_version_idx": { + "name": "workflow_deployment_operation_deployment_version_idx", + "columns": [ + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_workflow_version_generation_idx": { + "name": "workflow_deployment_operation_workflow_version_generation_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "generation", + "isExpression": false, + "asc": false, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_deployment_operation_workflow_id_workflow_id_fk": { + "name": "workflow_deployment_operation_workflow_id_workflow_id_fk", + "tableFrom": "workflow_deployment_operation", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_deployment_operation_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "workflow_deployment_operation_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "workflow_deployment_operation", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_deployment_operation_previous_active_version_id_workflow_deployment_version_id_fk": { + "name": "workflow_deployment_operation_previous_active_version_id_workflow_deployment_version_id_fk", + "tableFrom": "workflow_deployment_operation", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["previous_active_version_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workflow_deployment_operation_action_check": { + "name": "workflow_deployment_operation_action_check", + "value": "\"workflow_deployment_operation\".\"action\" IN ('deploy', 'activate')" + }, + "workflow_deployment_operation_status_check": { + "name": "workflow_deployment_operation_status_check", + "value": "\"workflow_deployment_operation\".\"status\" IN ('preparing', 'activating', 'active', 'failed', 'superseded')" + }, + "workflow_deployment_operation_generation_check": { + "name": "workflow_deployment_operation_generation_check", + "value": "\"workflow_deployment_operation\".\"generation\" > 0" + }, + "workflow_deployment_operation_protocol_version_check": { + "name": "workflow_deployment_operation_protocol_version_check", + "value": "\"workflow_deployment_operation\".\"protocol_version\" > 0" + } + }, + "isRLSEnabled": false + }, + "public.workflow_deployment_version": { + "name": "workflow_deployment_version", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "state": { + "name": "state", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workflow_deployment_version_workflow_version_unique": { + "name": "workflow_deployment_version_workflow_version_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_version_workflow_active_idx": { + "name": "workflow_deployment_version_workflow_active_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "is_active", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_version_created_at_idx": { + "name": "workflow_deployment_version_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_deployment_version_workflow_id_workflow_id_fk": { + "name": "workflow_deployment_version_workflow_id_workflow_id_fk", + "tableFrom": "workflow_deployment_version", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_edges": { + "name": "workflow_edges", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_block_id": { + "name": "source_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_block_id": { + "name": "target_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_handle": { + "name": "source_handle", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "target_handle": { + "name": "target_handle", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_edges_workflow_source_idx": { + "name": "workflow_edges_workflow_source_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_edges_workflow_target_idx": { + "name": "workflow_edges_workflow_target_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_edges_workflow_id_workflow_id_fk": { + "name": "workflow_edges_workflow_id_workflow_id_fk", + "tableFrom": "workflow_edges", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_edges_source_block_id_workflow_blocks_id_fk": { + "name": "workflow_edges_source_block_id_workflow_blocks_id_fk", + "tableFrom": "workflow_edges", + "tableTo": "workflow_blocks", + "columnsFrom": ["source_block_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_edges_target_block_id_workflow_blocks_id_fk": { + "name": "workflow_edges_target_block_id_workflow_blocks_id_fk", + "tableFrom": "workflow_edges", + "tableTo": "workflow_blocks", + "columnsFrom": ["target_block_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_execution_logs": { + "name": "workflow_execution_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "state_snapshot_id": { + "name": "state_snapshot_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "level": { + "name": "level", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "trigger": { + "name": "trigger", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "execution_deadline_at": { + "name": "execution_deadline_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "ended_at": { + "name": "ended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "total_duration_ms": { + "name": "total_duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "execution_data": { + "name": "execution_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "cost_total": { + "name": "cost_total", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "models_used": { + "name": "models_used", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "files": { + "name": "files", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_execution_logs_state_snapshot_id_idx": { + "name": "workflow_execution_logs_state_snapshot_id_idx", + "columns": [ + { + "expression": "state_snapshot_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_deployment_version_id_idx": { + "name": "workflow_execution_logs_deployment_version_id_idx", + "columns": [ + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_trigger_idx": { + "name": "workflow_execution_logs_trigger_idx", + "columns": [ + { + "expression": "trigger", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_level_idx": { + "name": "workflow_execution_logs_level_idx", + "columns": [ + { + "expression": "level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_started_at_idx": { + "name": "workflow_execution_logs_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_execution_id_unique": { + "name": "workflow_execution_logs_execution_id_unique", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_workflow_started_at_idx": { + "name": "workflow_execution_logs_workflow_started_at_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_workspace_activity_level_idx": { + "name": "workflow_execution_logs_workspace_activity_level_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "total_duration_ms", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "trigger", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_workspace_started_at_id_desc_idx": { + "name": "workflow_execution_logs_workspace_started_at_id_desc_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "\"started_at\" DESC NULLS LAST", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "\"id\" DESC", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_workspace_cost_total_idx": { + "name": "workflow_execution_logs_workspace_cost_total_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "cost_total", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_models_used_idx": { + "name": "workflow_execution_logs_models_used_idx", + "columns": [ + { + "expression": "models_used", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + }, + "workflow_execution_logs_workspace_ended_at_id_idx": { + "name": "workflow_execution_logs_workspace_ended_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"ended_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_running_started_at_idx": { + "name": "workflow_execution_logs_running_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "status = 'running'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_running_deadline_idx": { + "name": "workflow_execution_logs_running_deadline_idx", + "columns": [ + { + "expression": "execution_deadline_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_execution_logs\".\"status\" = 'running' AND \"workflow_execution_logs\".\"execution_deadline_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_redacting_started_at_idx": { + "name": "workflow_execution_logs_redacting_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "status = 'redacting'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_redacting_deadline_idx": { + "name": "workflow_execution_logs_redacting_deadline_idx", + "columns": [ + { + "expression": "execution_deadline_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_execution_logs\".\"status\" = 'redacting' AND \"workflow_execution_logs\".\"execution_deadline_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_completed_ended_at_idx": { + "name": "workflow_execution_logs_completed_ended_at_idx", + "columns": [ + { + "expression": "ended_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_execution_logs\".\"status\" = 'completed' AND \"workflow_execution_logs\".\"level\" = 'info' AND \"workflow_execution_logs\".\"ended_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_execution_logs_workflow_id_workflow_id_fk": { + "name": "workflow_execution_logs_workflow_id_workflow_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workflow_execution_logs_workspace_id_workspace_id_fk": { + "name": "workflow_execution_logs_workspace_id_workspace_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_execution_logs_state_snapshot_id_workflow_execution_snapshots_id_fk": { + "name": "workflow_execution_logs_state_snapshot_id_workflow_execution_snapshots_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workflow_execution_snapshots", + "columnsFrom": ["state_snapshot_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workflow_execution_logs_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "workflow_execution_logs_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_execution_snapshots": { + "name": "workflow_execution_snapshots", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "state_hash": { + "name": "state_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "state_data": { + "name": "state_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_snapshots_hash_idx": { + "name": "workflow_snapshots_hash_idx", + "columns": [ + { + "expression": "state_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_snapshots_workflow_hash_idx": { + "name": "workflow_snapshots_workflow_hash_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "state_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_snapshots_created_at_idx": { + "name": "workflow_snapshots_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_execution_snapshots_workflow_id_workflow_id_fk": { + "name": "workflow_execution_snapshots_workflow_id_workflow_id_fk", + "tableFrom": "workflow_execution_snapshots", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_mcp_server": { + "name": "workflow_mcp_server", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_public": { + "name": "is_public", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_mcp_server_workspace_id_idx": { + "name": "workflow_mcp_server_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_server_created_by_idx": { + "name": "workflow_mcp_server_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_server_deleted_at_idx": { + "name": "workflow_mcp_server_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_server_workspace_deleted_partial_idx": { + "name": "workflow_mcp_server_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_mcp_server\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_mcp_server_workspace_id_workspace_id_fk": { + "name": "workflow_mcp_server_workspace_id_workspace_id_fk", + "tableFrom": "workflow_mcp_server", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_mcp_server_created_by_user_id_fk": { + "name": "workflow_mcp_server_created_by_user_id_fk", + "tableFrom": "workflow_mcp_server", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_mcp_tool": { + "name": "workflow_mcp_tool", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tool_name": { + "name": "tool_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tool_description": { + "name": "tool_description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "parameter_schema": { + "name": "parameter_schema", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "parameter_description_overrides": { + "name": "parameter_description_overrides", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'::json" + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_mcp_tool_server_id_idx": { + "name": "workflow_mcp_tool_server_id_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_tool_workflow_id_idx": { + "name": "workflow_mcp_tool_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_tool_server_workflow_unique": { + "name": "workflow_mcp_tool_server_workflow_unique", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_mcp_tool\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_tool_archived_at_partial_idx": { + "name": "workflow_mcp_tool_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_mcp_tool\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_mcp_tool_server_id_workflow_mcp_server_id_fk": { + "name": "workflow_mcp_tool_server_id_workflow_mcp_server_id_fk", + "tableFrom": "workflow_mcp_tool", + "tableTo": "workflow_mcp_server", + "columnsFrom": ["server_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_mcp_tool_workflow_id_workflow_id_fk": { + "name": "workflow_mcp_tool_workflow_id_workflow_id_fk", + "tableFrom": "workflow_mcp_tool", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_schedule": { + "name": "workflow_schedule", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deployment_operation_id": { + "name": "deployment_operation_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "block_id": { + "name": "block_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cron_expression": { + "name": "cron_expression", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "next_run_at": { + "name": "next_run_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_ran_at": { + "name": "last_ran_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_queued_at": { + "name": "last_queued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "trigger_type": { + "name": "trigger_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "timezone": { + "name": "timezone", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'UTC'" + }, + "failed_count": { + "name": "failed_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "infra_retry_count": { + "name": "infra_retry_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "last_failed_at": { + "name": "last_failed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "source_type": { + "name": "source_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'workflow'" + }, + "job_title": { + "name": "job_title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "prompt": { + "name": "prompt", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lifecycle": { + "name": "lifecycle", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'persistent'" + }, + "success_condition": { + "name": "success_condition", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "max_runs": { + "name": "max_runs", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "run_count": { + "name": "run_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "source_chat_id": { + "name": "source_chat_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_task_name": { + "name": "source_task_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_user_id": { + "name": "source_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_workspace_id": { + "name": "source_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_scope": { + "name": "secret_scope", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'all'" + }, + "mounted_secrets": { + "name": "mounted_secrets", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "job_history": { + "name": "job_history", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "contexts": { + "name": "contexts", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "excluded_dates": { + "name": "excluded_dates", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "ends_at": { + "name": "ends_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "run_budget_usd": { + "name": "run_budget_usd", + "type": "numeric(12, 4)", + "primaryKey": false, + "notNull": false + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_schedule_workflow_block_deployment_unique": { + "name": "workflow_schedule_workflow_block_deployment_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_schedule\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_schedule_workflow_deployment_idx": { + "name": "workflow_schedule_workflow_deployment_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_schedule_archived_at_partial_idx": { + "name": "workflow_schedule_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_schedule\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_workflow_schedule_on_source_workspace_id_source_t_c07f3bba6": { + "name": "idx_workflow_schedule_on_source_workspace_id_source_t_c07f3bba6", + "columns": [ + { + "expression": "source_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_schedule_due_workflow_idx": { + "name": "workflow_schedule_due_workflow_idx", + "columns": [ + { + "expression": "next_run_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_queued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_schedule\".\"archived_at\" IS NULL AND \"workflow_schedule\".\"status\" NOT IN ('disabled', 'completed') AND (\"workflow_schedule\".\"source_type\" = 'workflow' OR \"workflow_schedule\".\"source_type\" IS NULL)", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_schedule_due_job_idx": { + "name": "workflow_schedule_due_job_idx", + "columns": [ + { + "expression": "next_run_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_queued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_schedule\".\"archived_at\" IS NULL AND \"workflow_schedule\".\"status\" NOT IN ('disabled', 'completed') AND \"workflow_schedule\".\"source_type\" = 'job'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_schedule_workflow_id_workflow_id_fk": { + "name": "workflow_schedule_workflow_id_workflow_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_schedule_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "workflow_schedule_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_schedule_deployment_operation_id_workflow_deployment_operation_id_fk": { + "name": "workflow_schedule_deployment_operation_id_workflow_deployment_operation_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "workflow_deployment_operation", + "columnsFrom": ["deployment_operation_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workflow_schedule_source_user_id_user_id_fk": { + "name": "workflow_schedule_source_user_id_user_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "user", + "columnsFrom": ["source_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_schedule_source_workspace_id_workspace_id_fk": { + "name": "workflow_schedule_source_workspace_id_workspace_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "workspace", + "columnsFrom": ["source_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_subflows": { + "name": "workflow_subflows", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_subflows_workflow_type_idx": { + "name": "workflow_subflows_workflow_type_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_subflows_workflow_id_workflow_id_fk": { + "name": "workflow_subflows_workflow_id_workflow_id_fk", + "tableFrom": "workflow_subflows", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_test": { + "name": "workflow_test", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "body_file_id": { + "name": "body_file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "cases": { + "name": "cases", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "source_hash": { + "name": "source_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_by_user_id": { + "name": "created_by_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_test_workspace_name_unique": { + "name": "workflow_test_workspace_name_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_test\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_test_body_file_unique": { + "name": "workflow_test_body_file_unique", + "columns": [ + { + "expression": "body_file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_test_workspace_id_workspace_id_fk": { + "name": "workflow_test_workspace_id_workspace_id_fk", + "tableFrom": "workflow_test", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_test_body_file_id_workspace_files_id_fk": { + "name": "workflow_test_body_file_id_workspace_files_id_fk", + "tableFrom": "workflow_test", + "tableTo": "workspace_files", + "columnsFrom": ["body_file_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workflow_test_created_by_user_id_user_id_fk": { + "name": "workflow_test_created_by_user_id_user_id_fk", + "tableFrom": "workflow_test", + "tableTo": "user", + "columnsFrom": ["created_by_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_test_run": { + "name": "workflow_test_run", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "test_id": { + "name": "test_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "passed": { + "name": "passed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "failed": { + "name": "failed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "skipped": { + "name": "skipped", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "report": { + "name": "report", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_hash": { + "name": "source_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ran_against": { + "name": "ran_against", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "progress": { + "name": "progress", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "triggered_by_actor": { + "name": "triggered_by_actor", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "triggered_by_user_id": { + "name": "triggered_by_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workflow_test_run_test_version_started_idx": { + "name": "workflow_test_run_test_version_started_idx", + "columns": [ + { + "expression": "test_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_test_run_test_id_workflow_test_id_fk": { + "name": "workflow_test_run_test_id_workflow_test_id_fk", + "tableFrom": "workflow_test_run", + "tableTo": "workflow_test", + "columnsFrom": ["test_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_test_run_workspace_id_workspace_id_fk": { + "name": "workflow_test_run_workspace_id_workspace_id_fk", + "tableFrom": "workflow_test_run", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_test_run_triggered_by_user_id_user_id_fk": { + "name": "workflow_test_run_triggered_by_user_id_user_id_fk", + "tableFrom": "workflow_test_run", + "tableTo": "user", + "columnsFrom": ["triggered_by_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workflow_test_run_version_check": { + "name": "workflow_test_run_version_check", + "value": "\"workflow_test_run\".\"version\" IN ('draft', 'deployed')" + }, + "workflow_test_run_status_check": { + "name": "workflow_test_run_status_check", + "value": "\"workflow_test_run\".\"status\" IN ('running', 'passed', 'failed', 'error')" + }, + "workflow_test_run_completed_check": { + "name": "workflow_test_run_completed_check", + "value": "(\"workflow_test_run\".\"status\" = 'running') = (\"workflow_test_run\".\"completed_at\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.workload_identity_pending_subject": { + "name": "workload_identity_pending_subject", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider": { + "name": "provider", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject": { + "name": "subject", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "workload_identity_pending_subject_subject_unique": { + "name": "workload_identity_pending_subject_subject_unique", + "columns": [ + { + "expression": "subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workload_identity_pending_subject_issuer_idx": { + "name": "workload_identity_pending_subject_issuer_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workload_identity_pending_subject_user_id_idx": { + "name": "workload_identity_pending_subject_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workload_identity_pending_subject_workspace_id_workspace_id_fk": { + "name": "workload_identity_pending_subject_workspace_id_workspace_id_fk", + "tableFrom": "workload_identity_pending_subject", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workload_identity_pending_subject_user_id_user_id_fk": { + "name": "workload_identity_pending_subject_user_id_user_id_fk", + "tableFrom": "workload_identity_pending_subject", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace": { + "name": "workspace", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "color": { + "name": "color", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'#33C482'" + }, + "logo_url": { + "name": "logo_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "owner_id": { + "name": "owner_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_scope_key": { + "name": "organization_scope_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "CASE WHEN organization_id IS NULL THEN 'personal' ELSE 'organization:' || organization_id END", + "type": "stored" + } + }, + "project_id": { + "name": "project_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_mode": { + "name": "workspace_mode", + "type": "workspace_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'grandfathered_shared'" + }, + "billed_account_user_id": { + "name": "billed_account_user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "storage_used_bytes": { + "name": "storage_used_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "allow_personal_api_keys": { + "name": "allow_personal_api_keys", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "inbox_enabled": { + "name": "inbox_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "inbox_address": { + "name": "inbox_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "inbox_provider_id": { + "name": "inbox_provider_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "inbox_secret_scope": { + "name": "inbox_secret_scope", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'all'" + }, + "inbox_mounted_secrets": { + "name": "inbox_mounted_secrets", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "organization_assigned_at": { + "name": "organization_assigned_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "forked_from_workspace_id": { + "name": "forked_from_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "fork_sync_new_workflows_excluded": { + "name": "fork_sync_new_workflows_excluded", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_owner_id_idx": { + "name": "workspace_owner_id_idx", + "columns": [ + { + "expression": "owner_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_organization_id_idx": { + "name": "workspace_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_billed_account_user_id_idx": { + "name": "workspace_billed_account_user_id_idx", + "columns": [ + { + "expression": "billed_account_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_project_id_id_idx": { + "name": "workspace_project_id_id_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_mode_idx": { + "name": "workspace_mode_idx", + "columns": [ + { + "expression": "workspace_mode", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_forked_from_workspace_id_idx": { + "name": "workspace_forked_from_workspace_id_idx", + "columns": [ + { + "expression": "forked_from_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_inbox_provider_id_idx": { + "name": "workspace_inbox_provider_id_idx", + "columns": [ + { + "expression": "inbox_provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace\".\"inbox_provider_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_owner_id_user_id_fk": { + "name": "workspace_owner_id_user_id_fk", + "tableFrom": "workspace", + "tableTo": "user", + "columnsFrom": ["owner_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_organization_id_organization_id_fk": { + "name": "workspace_organization_id_organization_id_fk", + "tableFrom": "workspace", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workspace_project_id_project_id_fk": { + "name": "workspace_project_id_project_id_fk", + "tableFrom": "workspace", + "tableTo": "project", + "columnsFrom": ["project_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "workspace_billed_account_user_id_user_id_fk": { + "name": "workspace_billed_account_user_id_user_id_fk", + "tableFrom": "workspace", + "tableTo": "user", + "columnsFrom": ["billed_account_user_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workspace_forked_from_workspace_id_workspace_id_fk": { + "name": "workspace_forked_from_workspace_id_workspace_id_fk", + "tableFrom": "workspace", + "tableTo": "workspace", + "columnsFrom": ["forked_from_workspace_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workspace_project_organization_fk": { + "name": "workspace_project_organization_fk", + "tableFrom": "workspace", + "tableTo": "project", + "columnsFrom": ["project_id", "organization_scope_key"], + "columnsTo": ["id", "organization_scope_key"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workspace_fork_project_fk": { + "name": "workspace_fork_project_fk", + "tableFrom": "workspace", + "tableTo": "workspace", + "columnsFrom": ["forked_from_workspace_id", "project_id"], + "columnsTo": ["id", "project_id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "workspace_id_project_unique": { + "name": "workspace_id_project_unique", + "nullsNotDistinct": false, + "columns": ["id", "project_id"] + } + }, + "policies": {}, + "checkConstraints": { + "workspace_storage_used_bytes_non_negative": { + "name": "workspace_storage_used_bytes_non_negative", + "value": "\"workspace\".\"storage_used_bytes\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.workspace_byok_keys": { + "name": "workspace_byok_keys", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "encrypted_api_key": { + "name": "encrypted_api_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_byok_workspace_provider_idx": { + "name": "workspace_byok_workspace_provider_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_byok_keys_workspace_id_workspace_id_fk": { + "name": "workspace_byok_keys_workspace_id_workspace_id_fk", + "tableFrom": "workspace_byok_keys", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_byok_keys_created_by_user_id_fk": { + "name": "workspace_byok_keys_created_by_user_id_fk", + "tableFrom": "workspace_byok_keys", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_environment": { + "name": "workspace_environment", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "variables": { + "name": "variables", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_environment_workspace_unique": { + "name": "workspace_environment_workspace_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_environment_workspace_id_workspace_id_fk": { + "name": "workspace_environment_workspace_id_workspace_id_fk", + "tableFrom": "workspace_environment", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file": { + "name": "workspace_file", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_file_workspace_id_idx": { + "name": "workspace_file_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_deleted_at_idx": { + "name": "workspace_file_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_workspace_deleted_partial_idx": { + "name": "workspace_file_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_uploaded_by_idx": { + "name": "workspace_file_uploaded_by_idx", + "columns": [ + { + "expression": "uploaded_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_workspace_id_workspace_id_fk": { + "name": "workspace_file_workspace_id_workspace_id_fk", + "tableFrom": "workspace_file", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_uploaded_by_user_id_fk": { + "name": "workspace_file_uploaded_by_user_id_fk", + "tableFrom": "workspace_file", + "tableTo": "user", + "columnsFrom": ["uploaded_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "workspace_file_key_unique": { + "name": "workspace_file_key_unique", + "nullsNotDistinct": false, + "columns": ["key"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_collab_state": { + "name": "workspace_file_collab_state", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "doc_state": { + "name": "doc_state", + "type": "bytea", + "primaryKey": false, + "notNull": true + }, + "source_hash": { + "name": "source_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "workspace_file_collab_state_file_id_workspace_files_id_fk": { + "name": "workspace_file_collab_state_file_id_workspace_files_id_fk", + "tableFrom": "workspace_file_collab_state", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_search_backfill": { + "name": "workspace_file_search_backfill", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "after_workspace_id": { + "name": "after_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "after_entity_type": { + "name": "after_entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "after_entity_id": { + "name": "after_entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "after_file_id": { + "name": "after_file_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_search_build": { + "name": "workspace_file_search_build", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "artifact_key": { + "name": "artifact_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workspace_file_search_build_file_idx": { + "name": "workspace_file_search_build_file_idx", + "columns": [ + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_build_cleanup_idx": { + "name": "workspace_file_search_build_cleanup_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_build\".\"expires_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "file_search_build_owner_check": { + "name": "file_search_build_owner_check", + "value": "(\"workspace_file_search_build\".\"entity_type\" IS NULL AND \"workspace_file_search_build\".\"entity_id\" IS NULL AND \"workspace_file_search_build\".\"workspace_id\" IS NOT NULL) OR (\"workspace_file_search_build\".\"entity_type\" = 'workspace' AND \"workspace_file_search_build\".\"entity_id\" = \"workspace_file_search_build\".\"workspace_id\") OR (\"workspace_file_search_build\".\"entity_type\" = 'project' AND length(\"workspace_file_search_build\".\"entity_id\") > 0 AND \"workspace_file_search_build\".\"workspace_id\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.workspace_file_search_chunk": { + "name": "workspace_file_search_chunk", + "schema": "", + "columns": { + "build_id": { + "name": "build_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ordinal": { + "name": "ordinal", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "line_start": { + "name": "line_start", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "fragment": { + "name": "fragment", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "overlap": { + "name": "overlap", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "file_search_chunk_owner_content_idx": { + "name": "file_search_chunk_owner_content_idx", + "columns": [ + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "content", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "gin_trgm_ops" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_chunk\".\"entity_type\" = 'project'", + "concurrently": true, + "method": "gin", + "with": { + "fastupdate": "off" + } + }, + "workspace_file_search_chunk_line_idx": { + "name": "workspace_file_search_chunk_line_idx", + "columns": [ + { + "expression": "build_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "line_start", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "ordinal", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_chunk_content_idx": { + "name": "workspace_file_search_chunk_content_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "content", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "gin_trgm_ops" + } + ], + "isUnique": false, + "concurrently": true, + "method": "gin", + "with": { + "fastupdate": "off" + } + } + }, + "foreignKeys": { + "workspace_file_search_chunk_build_id_workspace_file_search_build_id_fk": { + "name": "workspace_file_search_chunk_build_id_workspace_file_search_build_id_fk", + "tableFrom": "workspace_file_search_chunk", + "tableTo": "workspace_file_search_build", + "columnsFrom": ["build_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "workspace_file_search_chunk_pk": { + "name": "workspace_file_search_chunk_pk", + "columns": ["build_id", "ordinal"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "file_search_chunk_owner_check": { + "name": "file_search_chunk_owner_check", + "value": "(\"workspace_file_search_chunk\".\"entity_type\" IS NULL AND \"workspace_file_search_chunk\".\"entity_id\" IS NULL AND \"workspace_file_search_chunk\".\"workspace_id\" IS NOT NULL) OR (\"workspace_file_search_chunk\".\"entity_type\" = 'workspace' AND \"workspace_file_search_chunk\".\"entity_id\" = \"workspace_file_search_chunk\".\"workspace_id\") OR (\"workspace_file_search_chunk\".\"entity_type\" = 'project' AND length(\"workspace_file_search_chunk\".\"entity_id\") > 0 AND \"workspace_file_search_chunk\".\"workspace_id\" IS NULL)" + }, + "workspace_file_search_chunk_content_size": { + "name": "workspace_file_search_chunk_content_size", + "value": "octet_length(\"workspace_file_search_chunk\".\"content\") <= 8192" + }, + "workspace_file_search_chunk_position": { + "name": "workspace_file_search_chunk_position", + "value": "\"workspace_file_search_chunk\".\"ordinal\" >= 0 AND \"workspace_file_search_chunk\".\"line_start\" > 0 AND \"workspace_file_search_chunk\".\"overlap\" BETWEEN 0 AND 2" + } + }, + "isRLSEnabled": false + }, + "public.workspace_file_search_dispatch_queue": { + "name": "workspace_file_search_dispatch_queue", + "schema": "", + "columns": { + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "enqueued_at": { + "name": "enqueued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_dispatched_at": { + "name": "last_dispatched_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_file_search_dispatch_queue_schedule_idx": { + "name": "workspace_file_search_dispatch_queue_schedule_idx", + "columns": [ + { + "expression": "last_dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "first" + }, + { + "expression": "enqueued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_search_queue_workspace_fk": { + "name": "workspace_file_search_queue_workspace_fk", + "tableFrom": "workspace_file_search_dispatch_queue", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_search_index": { + "name": "workspace_file_search_index", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "workspace_file_search_index_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "partial": { + "name": "partial", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "line_count": { + "name": "line_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "indexed_bytes": { + "name": "indexed_bytes", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "dispatched_at": { + "name": "dispatched_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_file_search_index_workspace_status_idx": { + "name": "workspace_file_search_index_workspace_status_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_index_pending_dispatch_idx": { + "name": "workspace_file_search_index_pending_dispatch_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_index\".\"status\" = 'pending' AND \"workspace_file_search_index\".\"dispatched_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_index_active_dispatch_idx": { + "name": "workspace_file_search_index_active_dispatch_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_index\".\"status\" = 'pending' AND \"workspace_file_search_index\".\"dispatched_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_search_index_file_fk": { + "name": "workspace_file_search_index_file_fk", + "tableFrom": "workspace_file_search_index", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_search_index_workspace_fk": { + "name": "workspace_file_search_index_workspace_fk", + "tableFrom": "workspace_file_search_index", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "workspace_file_search_index_pk": { + "name": "workspace_file_search_index_pk", + "columns": ["file_id", "source_content_updated_at"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_search_revision": { + "name": "workspace_file_search_revision", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "workspace_file_search_index_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "build_id": { + "name": "build_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "line_count": { + "name": "line_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "indexed_bytes": { + "name": "indexed_bytes", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "chunk_count": { + "name": "chunk_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "dispatched_at": { + "name": "dispatched_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "handoff_expires_at": { + "name": "handoff_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "file_search_revision_owner_pending_idx": { + "name": "file_search_revision_owner_pending_idx", + "columns": [ + { + "expression": "coalesce(\"entity_type\", 'workspace')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"entity_id\", \"workspace_id\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_revision\".\"status\" = 'pending' AND \"workspace_file_search_revision\".\"dispatched_at\" IS NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "file_search_revision_owner_status_idx": { + "name": "file_search_revision_owner_status_idx", + "columns": [ + { + "expression": "coalesce(\"entity_type\", 'workspace')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"entity_id\", \"workspace_id\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_file_search_revision_workspace_status_idx": { + "name": "workspace_file_search_revision_workspace_status_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_revision_build_idx": { + "name": "workspace_file_search_revision_build_idx", + "columns": [ + { + "expression": "build_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_revision_pending_idx": { + "name": "workspace_file_search_revision_pending_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_revision\".\"status\" = 'pending' AND \"workspace_file_search_revision\".\"dispatched_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_revision_active_idx": { + "name": "workspace_file_search_revision_active_idx", + "columns": [ + { + "expression": "dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_revision\".\"status\" = 'pending' AND \"workspace_file_search_revision\".\"dispatched_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_search_revision_file_id_workspace_files_id_fk": { + "name": "workspace_file_search_revision_file_id_workspace_files_id_fk", + "tableFrom": "workspace_file_search_revision", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_search_revision_build_id_workspace_file_search_build_id_fk": { + "name": "workspace_file_search_revision_build_id_workspace_file_search_build_id_fk", + "tableFrom": "workspace_file_search_revision", + "tableTo": "workspace_file_search_build", + "columnsFrom": ["build_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "file_search_revision_owner_check": { + "name": "file_search_revision_owner_check", + "value": "(\"workspace_file_search_revision\".\"entity_type\" IS NULL AND \"workspace_file_search_revision\".\"entity_id\" IS NULL AND \"workspace_file_search_revision\".\"workspace_id\" IS NOT NULL) OR (\"workspace_file_search_revision\".\"entity_type\" = 'workspace' AND \"workspace_file_search_revision\".\"entity_id\" = \"workspace_file_search_revision\".\"workspace_id\") OR (\"workspace_file_search_revision\".\"entity_type\" = 'project' AND length(\"workspace_file_search_revision\".\"entity_id\") > 0 AND \"workspace_file_search_revision\".\"workspace_id\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.workspace_file_search_segment": { + "name": "workspace_file_search_segment", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "line_number": { + "name": "line_number", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "segment_number": { + "name": "segment_number", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "segment_start": { + "name": "segment_start", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "line_length": { + "name": "line_length", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "workspace_file_search_segment_workspace_revision_idx": { + "name": "workspace_file_search_segment_workspace_revision_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_segment_workspace_content_trgm_idx": { + "name": "workspace_file_search_segment_workspace_content_trgm_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "content", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "gin_trgm_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_search_segment_file_fk": { + "name": "workspace_file_search_segment_file_fk", + "tableFrom": "workspace_file_search_segment", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_search_segment_workspace_fk": { + "name": "workspace_file_search_segment_workspace_fk", + "tableFrom": "workspace_file_search_segment", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "workspace_file_search_segment_pk": { + "name": "workspace_file_search_segment_pk", + "columns": ["file_id", "source_content_updated_at", "line_number", "segment_number"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_secret_provenance": { + "name": "workspace_file_secret_provenance", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "content_updated_at": { + "name": "content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "workspace_file_secret_provenance_file_id_workspace_files_id_fk": { + "name": "workspace_file_secret_provenance_file_id_workspace_files_id_fk", + "tableFrom": "workspace_file_secret_provenance", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workspace_file_secret_provenance_status_check": { + "name": "workspace_file_secret_provenance_status_check", + "value": "\"workspace_file_secret_provenance\".\"status\" IN ('exact', 'unknown', 'unrecorded')" + } + }, + "isRLSEnabled": false + }, + "public.workspace_file_version": { + "name": "workspace_file_version", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "superseded_at": { + "name": "superseded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "workspace_file_version_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "author_user_ids": { + "name": "author_user_ids", + "type": "text[]", + "primaryKey": false, + "notNull": true, + "default": "'{}'::text[]" + }, + "restored_from_version": { + "name": "restored_from_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_status": { + "name": "secret_provenance_status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_entries": { + "name": "secret_provenance_entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_file_version_file_version_unique": { + "name": "workspace_file_version_file_version_unique", + "columns": [ + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_version_key_unique": { + "name": "workspace_file_version_key_unique", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_version_workspace_id_idx": { + "name": "workspace_file_version_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_version_workspace_superseded_idx": { + "name": "workspace_file_version_workspace_superseded_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "superseded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_version\".\"superseded_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_version_file_id_workspace_files_id_fk": { + "name": "workspace_file_version_file_id_workspace_files_id_fk", + "tableFrom": "workspace_file_version", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_version_workspace_id_workspace_id_fk": { + "name": "workspace_file_version_workspace_id_workspace_id_fk", + "tableFrom": "workspace_file_version", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workspace_file_version_provenance_status_check": { + "name": "workspace_file_version_provenance_status_check", + "value": "\"workspace_file_version\".\"secret_provenance_status\" IS NULL OR \"workspace_file_version\".\"secret_provenance_status\" IN ('exact', 'unknown', 'unrecorded')" + } + }, + "isRLSEnabled": false + }, + "public.workspace_files": { + "name": "workspace_files", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "folder_id": { + "name": "folder_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "context": { + "name": "context", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "message_id": { + "name": "message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "original_name": { + "name": "original_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "content_updated_at": { + "name": "content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "date_trunc('milliseconds', now())" + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workspace_files_project_id_idx": { + "name": "workspace_files_project_id_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_project_folder_name_active_unique": { + "name": "workspace_files_project_folder_name_active_unique", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"folder_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "original_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"project_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_key_active_unique": { + "name": "workspace_files_key_active_unique", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace_files\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_folder_name_active_unique": { + "name": "workspace_files_workspace_folder_name_active_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"folder_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "original_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_search_owner_keyset_idx": { + "name": "workspace_files_search_owner_keyset_idx", + "columns": [ + { + "expression": "(CASE WHEN \"project_id\" IS NOT NULL THEN 'project' ELSE 'workspace' END)", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"project_id\", \"workspace_id\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND ((\"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL) OR (\"workspace_files\".\"context\" = 'project' AND \"workspace_files\".\"project_id\" IS NOT NULL))", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_active_keyset_idx": { + "name": "workspace_files_workspace_active_keyset_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_active_uploaded_idx": { + "name": "workspace_files_workspace_active_uploaded_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "uploaded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_active_updated_idx": { + "name": "workspace_files_workspace_active_updated_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_folder_uploaded_idx": { + "name": "workspace_files_workspace_folder_uploaded_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"folder_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "uploaded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_name_trgm_idx": { + "name": "workspace_files_workspace_name_trgm_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "original_name", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "gin_trgm_ops" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "gin", + "with": { + "fastupdate": "off" + } + }, + "workspace_files_workspace_display_name_idx": { + "name": "workspace_files_workspace_display_name_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "regexp_replace(regexp_replace(regexp_replace(normalize(\"original_name\", NFC), '^[ \\t\\n\\v\\f\\r\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+|[ \\t\\n\\v\\f\\r\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+$', '', 'g'), '[\\x01-\\x1f\\x7f]', '', 'g'), '[ \\t\\n\\v\\f\\r\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+', ' ', 'g')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_chat_display_name_unique": { + "name": "workspace_files_chat_display_name_unique", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "display_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace_files\".\"context\" = 'mothership' AND \"workspace_files\".\"chat_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_organization_id_idx": { + "name": "workspace_files_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_key_idx": { + "name": "workspace_files_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_user_id_idx": { + "name": "workspace_files_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_id_idx": { + "name": "workspace_files_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_folder_id_idx": { + "name": "workspace_files_folder_id_idx", + "columns": [ + { + "expression": "folder_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_context_idx": { + "name": "workspace_files_context_idx", + "columns": [ + { + "expression": "context", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_chat_id_idx": { + "name": "workspace_files_chat_id_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_deleted_at_idx": { + "name": "workspace_files_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_deleted_partial_idx": { + "name": "workspace_files_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_files_project_id_project_id_fk": { + "name": "workspace_files_project_id_project_id_fk", + "tableFrom": "workspace_files", + "tableTo": "project", + "columnsFrom": ["project_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "workspace_files_user_id_user_id_fk": { + "name": "workspace_files_user_id_user_id_fk", + "tableFrom": "workspace_files", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_files_workspace_id_workspace_id_fk": { + "name": "workspace_files_workspace_id_workspace_id_fk", + "tableFrom": "workspace_files", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_files_organization_id_organization_id_fk": { + "name": "workspace_files_organization_id_organization_id_fk", + "tableFrom": "workspace_files", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_files_folder_id_folder_id_fk": { + "name": "workspace_files_folder_id_folder_id_fk", + "tableFrom": "workspace_files", + "tableTo": "folder", + "columnsFrom": ["folder_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workspace_files_chat_id_copilot_chats_id_fk": { + "name": "workspace_files_chat_id_copilot_chats_id_fk", + "tableFrom": "workspace_files", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workspace_files_owner_check": { + "name": "workspace_files_owner_check", + "value": "num_nonnulls(\"workspace_files\".\"workspace_id\", \"workspace_files\".\"project_id\", \"workspace_files\".\"organization_id\") <= 1" + }, + "workspace_files_workspace_binding_check": { + "name": "workspace_files_workspace_binding_check", + "value": "\"workspace_files\".\"context\" NOT IN ('workspace', 'chat', 'mothership', 'execution', 'workspace-logos') OR \"workspace_files\".\"workspace_id\" IS NOT NULL" + }, + "workspace_files_project_binding_check": { + "name": "workspace_files_project_binding_check", + "value": "(\"workspace_files\".\"project_id\" IS NOT NULL) = (\"workspace_files\".\"context\" = 'project') AND (\"workspace_files\".\"project_id\" IS NULL OR \"workspace_files\".\"chat_id\" IS NULL)" + }, + "workspace_files_organization_binding_check": { + "name": "workspace_files_organization_binding_check", + "value": "\"workspace_files\".\"organization_id\" IS NULL OR (\"workspace_files\".\"workspace_id\" IS NULL AND \"workspace_files\".\"context\" = 'knowledge-base' AND \"workspace_files\".\"folder_id\" IS NULL AND \"workspace_files\".\"chat_id\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.workspace_fork_block_map": { + "name": "workspace_fork_block_map", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "parent_workflow_id": { + "name": "parent_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "parent_block_id": { + "name": "parent_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "child_workflow_id": { + "name": "child_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "child_block_id": { + "name": "child_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_fork_block_map_child_ws_parent_unique": { + "name": "workspace_fork_block_map_child_ws_parent_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_block_map_child_ws_child_unique": { + "name": "workspace_fork_block_map_child_ws_child_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "child_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_block_map_child_ws_parent_wf_idx": { + "name": "workspace_fork_block_map_child_ws_parent_wf_idx", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_block_map_child_ws_child_wf_idx": { + "name": "workspace_fork_block_map_child_ws_child_wf_idx", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "child_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_block_map_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_block_map_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_block_map", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_fork_dependent_value": { + "name": "workspace_fork_dependent_value", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_workflow_id": { + "name": "target_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_block_id": { + "name": "target_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sub_block_key": { + "name": "sub_block_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_fork_dependent_value_field_unique": { + "name": "workspace_fork_dependent_value_field_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sub_block_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_dependent_value_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_dependent_value_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_dependent_value", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_fork_promote_run": { + "name": "workspace_fork_promote_run", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_workspace_id": { + "name": "source_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_workspace_id": { + "name": "target_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "direction": { + "name": "direction", + "type": "workspace_fork_promote_direction", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "snapshot": { + "name": "snapshot", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_fork_promote_run_child_ws_target_unique": { + "name": "workspace_fork_promote_run_child_ws_target_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_promote_run_target_ws_idx": { + "name": "workspace_fork_promote_run_target_ws_idx", + "columns": [ + { + "expression": "target_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_promote_run_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_promote_run_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_promote_run", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_fork_promote_run_created_by_user_id_fk": { + "name": "workspace_fork_promote_run_created_by_user_id_fk", + "tableFrom": "workspace_fork_promote_run", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_fork_resource_map": { + "name": "workspace_fork_resource_map", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_type": { + "name": "resource_type", + "type": "workspace_fork_resource_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "parent_resource_id": { + "name": "parent_resource_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "child_resource_id": { + "name": "child_resource_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_fork_resource_map_child_type_parent_unique": { + "name": "workspace_fork_resource_map_child_type_parent_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_resource_map_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_resource_map_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_resource_map", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_fork_resource_map_created_by_user_id_fk": { + "name": "workspace_fork_resource_map_created_by_user_id_fk", + "tableFrom": "workspace_fork_resource_map", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_fork_workflow_sync": { + "name": "workspace_fork_workflow_sync", + "schema": "", + "columns": { + "deployment_operation_id": { + "name": "deployment_operation_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_workflow_id": { + "name": "source_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_workflow_id": { + "name": "target_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_deployment_version_id": { + "name": "source_deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sequence": { + "name": "sequence", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "identity": { + "type": "always", + "name": "workspace_fork_workflow_sync_sequence_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": "1", + "cycle": false + } + }, + "promote_run_id": { + "name": "promote_run_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "activated_at": { + "name": "activated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "rollback_operation_id": { + "name": "rollback_operation_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "rolled_back_at": { + "name": "rolled_back_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workspace_fork_workflow_sync_baseline_idx": { + "name": "workspace_fork_workflow_sync_baseline_idx", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sequence", + "isExpression": false, + "asc": false, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_fork_workflow_sync\".\"activated_at\" IS NOT NULL AND \"workspace_fork_workflow_sync\".\"rolled_back_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_run_idx": { + "name": "workspace_fork_workflow_sync_run_idx", + "columns": [ + { + "expression": "promote_run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_rollback_idx": { + "name": "workspace_fork_workflow_sync_rollback_idx", + "columns": [ + { + "expression": "rollback_operation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_fork_workflow_sync\".\"rollback_operation_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_source_idx": { + "name": "workspace_fork_workflow_sync_source_idx", + "columns": [ + { + "expression": "source_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_target_idx": { + "name": "workspace_fork_workflow_sync_target_idx", + "columns": [ + { + "expression": "target_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_child_workspace_idx": { + "name": "workspace_fork_workflow_sync_child_workspace_idx", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_workflow_sync_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_workflow_sync_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_workflow_sync", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_fork_workflow_sync_source_workflow_id_workflow_id_fk": { + "name": "workspace_fork_workflow_sync_source_workflow_id_workflow_id_fk", + "tableFrom": "workspace_fork_workflow_sync", + "tableTo": "workflow", + "columnsFrom": ["source_workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_fork_workflow_sync_target_workflow_id_workflow_id_fk": { + "name": "workspace_fork_workflow_sync_target_workflow_id_workflow_id_fk", + "tableFrom": "workspace_fork_workflow_sync", + "tableTo": "workflow", + "columnsFrom": ["target_workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_operation_receipt": { + "name": "workspace_operation_receipt", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "request_id": { + "name": "request_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "request_hash": { + "name": "request_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "report": { + "name": "report", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_operation_receipt_request_unique": { + "name": "workspace_operation_receipt_request_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "request_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_operation_receipt_workspace_created_idx": { + "name": "workspace_operation_receipt_workspace_created_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_operation_receipt_workspace_id_workspace_id_fk": { + "name": "workspace_operation_receipt_workspace_id_workspace_id_fk", + "tableFrom": "workspace_operation_receipt", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_resource_binding": { + "name": "workspace_resource_binding", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "workspace_resource_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "origin": { + "name": "origin", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_resource_binding_ws_kind_key_unique": { + "name": "workspace_resource_binding_ws_kind_key_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "kind", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_resource_binding_ws_kind_resource_unique": { + "name": "workspace_resource_binding_ws_kind_resource_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "kind", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_resource_binding_workspace_id_workspace_id_fk": { + "name": "workspace_resource_binding_workspace_id_workspace_id_fk", + "tableFrom": "workspace_resource_binding", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_resource_binding_created_by_user_id_fk": { + "name": "workspace_resource_binding_created_by_user_id_fk", + "tableFrom": "workspace_resource_binding", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workspace_resource_binding_key_format": { + "name": "workspace_resource_binding_key_format", + "value": "\"workspace_resource_binding\".\"key\" ~ '^[a-z][a-z0-9_-]{0,63}$'" + }, + "workspace_resource_binding_origin_check": { + "name": "workspace_resource_binding_origin_check", + "value": "\"workspace_resource_binding\".\"origin\" IN ('allocated', 'adopted', 'created')" + } + }, + "isRLSEnabled": false + }, + "public.workspace_sandbox": { + "name": "workspace_sandbox", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "language": { + "name": "language", + "type": "sandbox_language", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "dependencies": { + "name": "dependencies", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "cli_tools": { + "name": "cli_tools", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "system_packages": { + "name": "system_packages", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "spec_hash": { + "name": "spec_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_sandbox_workspace_name_unique": { + "name": "workspace_sandbox_workspace_name_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_sandbox_spec_hash_idx": { + "name": "workspace_sandbox_spec_hash_idx", + "columns": [ + { + "expression": "spec_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_sandbox_workspace_id_workspace_id_fk": { + "name": "workspace_sandbox_workspace_id_workspace_id_fk", + "tableFrom": "workspace_sandbox", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_sandbox_created_by_user_id_fk": { + "name": "workspace_sandbox_created_by_user_id_fk", + "tableFrom": "workspace_sandbox", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_visit": { + "name": "workspace_visit", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "visited_at": { + "name": "visited_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_visit_workspace_idx": { + "name": "workspace_visit_workspace_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_visit_user_id_user_id_fk": { + "name": "workspace_visit_user_id_user_id_fk", + "tableFrom": "workspace_visit", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_visit_workspace_id_workspace_id_fk": { + "name": "workspace_visit_workspace_id_workspace_id_fk", + "tableFrom": "workspace_visit", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "workspace_visit_user_id_workspace_id_pk": { + "name": "workspace_visit_user_id_workspace_id_pk", + "columns": ["user_id", "workspace_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.api_key_access": { + "name": "api_key_access", + "schema": "public", + "values": ["read", "write"] + }, + "public.aws_marketplace_license_status": { + "name": "aws_marketplace_license_status", + "schema": "public", + "values": ["pending", "active", "inactive"] + }, + "public.aws_marketplace_usage_report_status": { + "name": "aws_marketplace_usage_report_status", + "schema": "public", + "values": ["pending", "reported", "rejected"] + }, + "public.background_work_kind": { + "name": "background_work_kind", + "schema": "public", + "values": ["deployment_side_effects", "fork_content_copy", "fork_sync", "fork_rollback"] + }, + "public.background_work_status_value": { + "name": "background_work_status_value", + "schema": "public", + "values": ["pending", "processing", "completed", "completed_with_warnings", "failed"] + }, + "public.billing_blocked_reason": { + "name": "billing_blocked_reason", + "schema": "public", + "values": ["payment_failed", "dispute"] + }, + "public.billing_entity_type": { + "name": "billing_entity_type", + "schema": "public", + "values": ["user", "organization"] + }, + "public.chat_type": { + "name": "chat_type", + "schema": "public", + "values": ["mothership", "copilot"] + }, + "public.copilot_async_tool_status": { + "name": "copilot_async_tool_status", + "schema": "public", + "values": ["pending", "running", "completed", "failed", "cancelled", "delivered"] + }, + "public.copilot_run_status": { + "name": "copilot_run_status", + "schema": "public", + "values": ["active", "paused_waiting_for_tool", "resuming", "complete", "error", "cancelled"] + }, + "public.copilot_tool_permission_decision": { + "name": "copilot_tool_permission_decision", + "schema": "public", + "values": ["allow", "allow_chat", "always_allow", "skip"] + }, + "public.credential_group_enrollment_status": { + "name": "credential_group_enrollment_status", + "schema": "public", + "values": ["invited", "delivery_failed", "in_progress", "completed", "revoked"] + }, + "public.credential_group_status": { + "name": "credential_group_status", + "schema": "public", + "values": ["active", "disabled"] + }, + "public.credential_member_role": { + "name": "credential_member_role", + "schema": "public", + "values": ["admin", "member"] + }, + "public.credential_member_status": { + "name": "credential_member_status", + "schema": "public", + "values": ["active", "pending", "revoked"] + }, + "public.credential_type": { + "name": "credential_type", + "schema": "public", + "values": [ + "oauth", + "managed_oauth", + "managed_mcp", + "env_workspace", + "env_personal", + "service_account", + "personal_token" + ] + }, + "public.data_drain_cadence": { + "name": "data_drain_cadence", + "schema": "public", + "values": ["hourly", "daily"] + }, + "public.data_drain_destination": { + "name": "data_drain_destination", + "schema": "public", + "values": [ + "s3", + "gcs", + "azure_blob", + "sentinel", + "datadog", + "bigquery", + "snowflake", + "webhook" + ] + }, + "public.data_drain_run_status": { + "name": "data_drain_run_status", + "schema": "public", + "values": ["running", "success", "failed"] + }, + "public.data_drain_run_trigger": { + "name": "data_drain_run_trigger", + "schema": "public", + "values": ["cron", "manual"] + }, + "public.data_drain_source": { + "name": "data_drain_source", + "schema": "public", + "values": ["workflow_logs", "job_logs", "audit_logs", "copilot_chats", "copilot_runs"] + }, + "public.execution_large_value_reference_source": { + "name": "execution_large_value_reference_source", + "schema": "public", + "values": ["execution_log", "paused_snapshot"] + }, + "public.folder_resource_type": { + "name": "folder_resource_type", + "schema": "public", + "values": ["workflow", "file", "knowledge_base", "table"] + }, + "public.invitation_kind": { + "name": "invitation_kind", + "schema": "public", + "values": ["organization", "workspace"] + }, + "public.invitation_membership_intent": { + "name": "invitation_membership_intent", + "schema": "public", + "values": ["internal", "external"] + }, + "public.invitation_status": { + "name": "invitation_status", + "schema": "public", + "values": ["pending", "accepted", "rejected", "cancelled", "expired"] + }, + "public.managed_oauth_credential_status": { + "name": "managed_oauth_credential_status", + "schema": "public", + "values": ["active", "needs_reauth", "revoked"] + }, + "public.permission_type": { + "name": "permission_type", + "schema": "public", + "values": ["admin", "write", "read"] + }, + "public.sandbox_image_status": { + "name": "sandbox_image_status", + "schema": "public", + "values": ["pending", "building", "ready", "failed"] + }, + "public.sandbox_language": { + "name": "sandbox_language", + "schema": "public", + "values": ["javascript", "python"] + }, + "public.secret_usage_scope": { + "name": "secret_usage_scope", + "schema": "public", + "values": ["workspace", "personal"] + }, + "public.secret_usage_source": { + "name": "secret_usage_source", + "schema": "public", + "values": ["workflow", "copilot", "mcp"] + }, + "public.upload_session_method": { + "name": "upload_session_method", + "schema": "public", + "values": ["put", "multipart"] + }, + "public.upload_session_provider": { + "name": "upload_session_provider", + "schema": "public", + "values": ["local", "s3", "blob", "gcs"] + }, + "public.upload_session_purpose": { + "name": "upload_session_purpose", + "schema": "public", + "values": [ + "workspace_file", + "project_file", + "table_import", + "knowledge_import", + "knowledge_document", + "profile_picture", + "workspace_logo", + "organization_logo", + "mothership_attachment", + "execution_attachment" + ] + }, + "public.upload_session_status": { + "name": "upload_session_status", + "schema": "public", + "values": [ + "uploading", + "completing", + "finalizing", + "completed", + "aborting", + "aborted", + "failed", + "expired" + ] + }, + "public.usage_log_category": { + "name": "usage_log_category", + "schema": "public", + "values": ["model", "fixed", "tool", "model_unbilled"] + }, + "public.usage_log_source": { + "name": "usage_log_source", + "schema": "public", + "values": [ + "workflow", + "wand", + "copilot", + "workspace-chat", + "mcp_copilot", + "mothership_block", + "knowledge-base", + "voice-input", + "enrichment", + "voice-output", + "api-tool", + "workflow-test" + ] + }, + "public.workspace_file_search_index_status": { + "name": "workspace_file_search_index_status", + "schema": "public", + "values": ["pending", "ready", "skipped", "failed"] + }, + "public.workspace_file_version_source": { + "name": "workspace_file_version_source", + "schema": "public", + "values": ["upload", "user", "api", "copilot", "workflow", "collab", "revert", "unknown"] + }, + "public.workspace_fork_promote_direction": { + "name": "workspace_fork_promote_direction", + "schema": "public", + "values": ["push", "pull"] + }, + "public.workspace_fork_resource_type": { + "name": "workspace_fork_resource_type", + "schema": "public", + "values": [ + "workflow", + "oauth_credential", + "service_account_credential", + "env_var", + "table", + "knowledge_base", + "knowledge_document", + "file", + "file_folder", + "mcp_server", + "workflow_mcp_server", + "custom_block", + "custom_tool", + "skill", + "sandbox" + ] + }, + "public.workspace_mode": { + "name": "workspace_mode", + "schema": "public", + "values": ["personal", "organization", "grandfathered_shared"] + }, + "public.workspace_resource_kind": { + "name": "workspace_resource_kind", + "schema": "public", + "values": [ + "credential", + "knowledge-base", + "knowledge-document", + "table", + "file", + "file-folder", + "mcp-server", + "custom-tool", + "custom-block", + "skill", + "sandbox", + "workflow" + ] + } + }, + "schemas": {}, + "sequences": { + "public.copilot_async_tool_calls_persist_seq": { + "name": "copilot_async_tool_calls_persist_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": "1", + "cycle": false + } + }, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} diff --git a/packages/db/migrations/meta/_journal.json b/packages/db/migrations/meta/_journal.json index 00fa9a7a352..c9f609834dc 100644 --- a/packages/db/migrations/meta/_journal.json +++ b/packages/db/migrations/meta/_journal.json @@ -3221,6 +3221,13 @@ "when": 1794802862619, "tag": "0460_workflow_code_meta", "breakpoints": true + }, + { + "idx": 461, + "version": "7", + "when": 1794808065145, + "tag": "0461_workspace_resource_binding", + "breakpoints": true } ] } diff --git a/packages/db/schema.ts b/packages/db/schema.ts index 966ec4d2e9c..282b6029bb0 100644 --- a/packages/db/schema.ts +++ b/packages/db/schema.ts @@ -2704,6 +2704,77 @@ export const workspaceForkBlockMap = pgTable( }) ) +/** + * Resource kinds a workflow-source key can name: `ResourceKind` from `@sim/workflow-code`, which is + * `PortableResourceKind` from `@sim/workflow-types/resources` minus `env-var` (env names are their + * own keys). The binding service writes and reads this column as `ResourceKind`, so the two lists + * cannot drift without a type error. + */ +export const workspaceResourceKindEnum = pgEnum('workspace_resource_kind', [ + 'credential', + 'knowledge-base', + 'knowledge-document', + 'table', + 'file', + 'file-folder', + 'mcp-server', + 'custom-tool', + 'custom-block', + 'skill', + 'sandbox', + 'workflow', +]) + +/** + * Persisted resource keys for workflow source: `table('leads')` names the table bound to + * `(workspace, 'table', 'leads')` here, never one found by slugifying names. A key is allocated + * once, from the resource's name at that moment, and never changes: renaming the resource keeps + * it, and deleting the resource leaves the row pointing at the dead id so a later file reports the + * key as unresolved instead of silently binding another resource. Only the workspace cascades. + * + * `resource_id` is plain text with no FK: one column spans every kind's table, and the row must + * outlive the resource it names. `origin` records how the row came to exist: `allocated` (lazily, + * the first time source referenced the resource), `adopted` (a later sync bound an existing + * resource to a key), or `created` (a sync created the resource for the key). + */ +export const workspaceResourceBinding = pgTable( + 'workspace_resource_binding', + { + id: text('id').primaryKey(), + workspaceId: text('workspace_id') + .notNull() + .references(() => workspace.id, { onDelete: 'cascade' }), + kind: workspaceResourceKindEnum('kind').notNull(), + key: text('key').notNull(), + resourceId: text('resource_id').notNull(), + origin: text('origin', { enum: ['allocated', 'adopted', 'created'] }).notNull(), + /** SET NULL: removing a user must not unbind the keys their source reads allocated. */ + createdBy: text('created_by').references(() => user.id, { onDelete: 'set null' }), + createdAt: timestamp('created_at').notNull().defaultNow(), + updatedAt: timestamp('updated_at').notNull().defaultNow(), + }, + (table) => ({ + keyUnique: uniqueIndex('workspace_resource_binding_ws_kind_key_unique').on( + table.workspaceId, + table.kind, + table.key + ), + resourceUnique: uniqueIndex('workspace_resource_binding_ws_kind_resource_unique').on( + table.workspaceId, + table.kind, + table.resourceId + ), + keyFormat: check( + 'workspace_resource_binding_key_format', + sql`${table.key} ~ '^[a-z][a-z0-9_-]{0,63}$'` + ), + originCheck: check( + 'workspace_resource_binding_origin_check', + sql`${table.origin} IN ('allocated', 'adopted', 'created')` + ), + }) +) + /** * The user's stored dependent-field re-picks for an edge: a (target workflow, target block, * subblock) -> selected value mapping (a Gmail label, a KB document, a sheet tab). The sync diff --git a/packages/testing/src/mocks/schema-tables.generated.ts b/packages/testing/src/mocks/schema-tables.generated.ts index 05dfaff17c2..a529016b248 100644 --- a/packages/testing/src/mocks/schema-tables.generated.ts +++ b/packages/testing/src/mocks/schema-tables.generated.ts @@ -663,6 +663,17 @@ export const GENERATED_SCHEMA_TABLES = { 'createdAt', 'updatedAt', ], + workspaceResourceBinding: [ + 'id', + 'workspaceId', + 'kind', + 'key', + 'resourceId', + 'origin', + 'createdBy', + 'createdAt', + 'updatedAt', + ], workspaceForkDependentValue: [ 'id', 'childWorkspaceId', @@ -2336,6 +2347,20 @@ export const GENERATED_SCHEMA_ENUMS = { 'skill', 'sandbox', ], + workspaceResourceKindEnum: [ + 'credential', + 'knowledge-base', + 'knowledge-document', + 'table', + 'file', + 'file-folder', + 'mcp-server', + 'custom-tool', + 'custom-block', + 'skill', + 'sandbox', + 'workflow', + ], workspaceForkPromoteDirectionEnum: ['push', 'pull'], backgroundWorkKindEnum: [ 'deployment_side_effects', From 3da69c95f35f4f7d722980a0416bda9f6c8518f0 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:49:41 -0800 Subject: [PATCH 099/428] fix(workflows): type the source fingerprint, header anchor and e2e catalog guard --- .../application/apply-workflow-source.ts | 7 ++++--- .../persistence/code-meta.integration.ts | 9 +++++---- apps/sim/scripts/test-workflow-source-e2e.ts | 16 ++++++++++++++-- 3 files changed, 23 insertions(+), 9 deletions(-) diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.ts b/apps/sim/lib/workflows/application/apply-workflow-source.ts index a284858381d..73899044dd9 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.ts @@ -25,6 +25,7 @@ import { type ResourceKeyResolver, type ResourceKind, renamesBetween, + type SourceFingerprint, type SourceSpan, sourceFingerprint, type WorkflowCodeMetaV1, @@ -220,7 +221,7 @@ function fingerprintOf( stored: StoredSource, catalog: BlockCatalog, resources: ResourceKeyResolver -): string { +): SourceFingerprint { const { workflow, identity } = canonicalize(stored.state, { catalog, meta: stored.meta, @@ -605,7 +606,7 @@ function mergeCurrentLayout( interface Reprinted { files: Record lock: WorkflowLockV1 - fingerprint: string + fingerprint: SourceFingerprint } /** @@ -728,7 +729,7 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ sdkMajor: catalog.sdkMajor, catalogVersion: catalog.hash, } - const lockBaseFor = (fingerprint: string): LockBase => ({ + const lockBaseFor = (fingerprint: SourceFingerprint): LockBase => ({ workspaceId: context.workspaceId, baseFingerprint: fingerprint, catalogHash: catalog.hash, diff --git a/apps/sim/lib/workflows/persistence/code-meta.integration.ts b/apps/sim/lib/workflows/persistence/code-meta.integration.ts index 91b27fd42be..d17d5689c02 100644 --- a/apps/sim/lib/workflows/persistence/code-meta.integration.ts +++ b/apps/sim/lib/workflows/persistence/code-meta.integration.ts @@ -89,13 +89,14 @@ function graph(blocks: BlockState[]): WorkflowState { const anchorFetch = encodeAnchor({ kind: 'block', block: fetchId }) const anchorCleanup = encodeAnchor({ kind: 'param', block: cleanupId, param: 'code' }) const anchorVariable = encodeAnchor({ kind: 'var', variable: variableId }) +const anchorHeader = encodeAnchor({ kind: 'header' }) const storedMeta: WorkflowCodeMetaV1 = { v: 1, bindings: { [fetchId]: 'fetchUser', [sendId]: 'notify', [cleanupId]: 'tidy' }, order: { [fetchId]: 0, [sendId]: 1, [cleanupId]: 2 }, comments: { - header: [{ text: ' onboarding flow', kind: 'line', placement: 'leading' }], + [anchorHeader]: [{ text: ' onboarding flow', kind: 'line', placement: 'leading' }], [anchorFetch]: [{ text: ' loads the account', kind: 'line', placement: 'leading' }], [anchorCleanup]: [{ text: ' best effort', kind: 'line', placement: 'trailing' }], [anchorVariable]: [{ text: ' retry budget', kind: 'line', placement: 'trailing' }], @@ -210,14 +211,14 @@ describe('workflow.code_meta against real Postgres', () => { expect(afterDelete.bindings).toEqual({ [fetchId]: 'fetchUser', [sendId]: 'notify' }) expect(afterDelete.order).toEqual({ [fetchId]: 0, [sendId]: 1 }) expect(Object.keys(afterDelete.comments).sort()).toEqual( - [anchorFetch, anchorVariable, 'header'].sort() + [anchorFetch, anchorVariable, anchorHeader].sort() ) await db.transaction((tx) => pruneWorkflowCodeMeta(tx, workflowId, { variables: (id) => id !== variableId }) ) expect(Object.keys((await storedCodeMeta(workflowId)).comments).sort()).toEqual( - [anchorFetch, 'header'].sort() + [anchorFetch, anchorHeader].sort() ) }) @@ -248,7 +249,7 @@ describe('workflow.code_meta against real Postgres', () => { [copiedSend ?? '']: 'notify', }) expect(Object.keys(meta.comments).sort()).toEqual( - [encodeAnchor({ kind: 'block', block: copiedFetch ?? '' }), 'header'].sort() + [encodeAnchor({ kind: 'block', block: copiedFetch ?? '' }), anchorHeader].sort() ) expect(JSON.stringify(meta)).not.toContain(fetchId) expect(await storedCodeMeta(workflowId)).toMatchObject({ bindings: { [fetchId]: 'fetchUser' } }) diff --git a/apps/sim/scripts/test-workflow-source-e2e.ts b/apps/sim/scripts/test-workflow-source-e2e.ts index c72a505fdee..36ec6637ec4 100644 --- a/apps/sim/scripts/test-workflow-source-e2e.ts +++ b/apps/sim/scripts/test-workflow-source-e2e.ts @@ -159,8 +159,20 @@ async function readCatalog(): Promise { ) ) const catalog: unknown = parsed.data - assert(isRecordLike(catalog) && typeof catalog.hash === 'string', 'Expected a block catalog') - return catalog as BlockCatalog + assert(isBlockCatalog(catalog), 'Expected a block catalog') + return catalog +} + +/** The catalog fields this script reads; the response contract already validated the rest. */ +function isBlockCatalog(value: unknown): value is BlockCatalog { + return ( + isRecordLike(value) && + typeof value.hash === 'string' && + typeof value.sdkMajor === 'number' && + isRecordLike(value.blocks) && + isRecordLike(value.builders) && + isRecordLike(value.triggers) + ) } async function readStoredState(): Promise { From 8ea05aa6473bc0797f29743b4f2f4d624020dfe5 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:51:25 -0800 Subject: [PATCH 100/428] fix(api): use approved placeholder ids in the workflow source openapi examples --- apps/docs/openapi-v2-workflows.json | 40 +++++++++---------- .../contracts/v2/openapi/workflow-source.ts | 8 ++-- 2 files changed, 24 insertions(+), 24 deletions(-) diff --git a/apps/docs/openapi-v2-workflows.json b/apps/docs/openapi-v2-workflows.json index 9541a736e3d..0a078d3db14 100644 --- a/apps/docs/openapi-v2-workflows.json +++ b/apps/docs/openapi-v2-workflows.json @@ -5982,8 +5982,8 @@ "summary": "Response example 1", "value": { "data": { - "workflowId": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", - "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "workflowId": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36", + "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", "files": { "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" }, @@ -5991,7 +5991,7 @@ "lockVersion": 1, "blocks": { "start": { - "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "id": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77", "parent": null, "binding": "start", "order": 0 @@ -6000,7 +6000,7 @@ "variables": {} }, "lockBase": { - "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" }, @@ -6098,7 +6098,7 @@ "lockVersion": 1, "blocks": { "start": { - "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "id": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77", "parent": null, "binding": "start", "order": 0 @@ -6107,7 +6107,7 @@ "variables": {} }, "lockBase": { - "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" }, @@ -6142,8 +6142,8 @@ "summary": "Response example 1", "value": { "data": { - "workflowId": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", - "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "workflowId": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36", + "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", "dryRun": false, "applied": false, "diff": { @@ -6173,7 +6173,7 @@ "lockVersion": 1, "blocks": { "start": { - "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "id": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77", "parent": null, "binding": "start", "order": 0 @@ -6182,7 +6182,7 @@ "variables": {} }, "lockBase": { - "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" }, @@ -17870,8 +17870,8 @@ "examples": [ { "data": { - "workflowId": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", - "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "workflowId": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36", + "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", "files": { "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" }, @@ -17879,7 +17879,7 @@ "lockVersion": 1, "blocks": { "start": { - "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "id": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77", "parent": null, "binding": "start", "order": 0 @@ -17888,7 +17888,7 @@ "variables": {} }, "lockBase": { - "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" }, @@ -18388,8 +18388,8 @@ "examples": [ { "data": { - "workflowId": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", - "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "workflowId": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36", + "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", "dryRun": false, "applied": false, "diff": { @@ -18419,7 +18419,7 @@ "lockVersion": 1, "blocks": { "start": { - "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "id": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77", "parent": null, "binding": "start", "order": 0 @@ -18428,7 +18428,7 @@ "variables": {} }, "lockBase": { - "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" }, @@ -18664,7 +18664,7 @@ "lockVersion": 1, "blocks": { "start": { - "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "id": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77", "parent": null, "binding": "start", "order": 0 @@ -18673,7 +18673,7 @@ "variables": {} }, "lockBase": { - "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" }, diff --git a/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts index a8d29033566..ed7518e211c 100644 --- a/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts +++ b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts @@ -12,13 +12,13 @@ import { import { defineOpenApiRoute } from '@/lib/api/openapi/types' import { workflowOperations } from '@/lib/workflows/application/operations' -const BLOCK_ID = '5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47' +const BLOCK_ID = 'a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77' const FINGERPRINT = 'sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d' const CATALOG_HASH = '3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a' const WORKFLOW_SOURCE_EXAMPLE = { - workflowId: '3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8', - workspaceId: '7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28', + workflowId: '3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36', + workspaceId: 'a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64', files: { 'workflow.ts': "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n", @@ -29,7 +29,7 @@ const WORKFLOW_SOURCE_EXAMPLE = { variables: {}, }, lockBase: { - workspaceId: '7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28', + workspaceId: 'a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64', baseFingerprint: FINGERPRINT, catalogHash: CATALOG_HASH, }, From a80b5b509525c92866a1399bb4876ff286cc1b53 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:52:45 -0800 Subject: [PATCH 101/428] fix(api): publish the 413 the apply workflow source body read can raise --- apps/docs/openapi-v2-workflows.json | 3 +++ apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/docs/openapi-v2-workflows.json b/apps/docs/openapi-v2-workflows.json index 0a078d3db14..512a5e33e34 100644 --- a/apps/docs/openapi-v2-workflows.json +++ b/apps/docs/openapi-v2-workflows.json @@ -6211,6 +6211,9 @@ "409": { "$ref": "#/components/responses/Conflict" }, + "413": { + "$ref": "#/components/responses/PayloadTooLarge" + }, "423": { "$ref": "#/components/responses/Locked" }, diff --git a/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts index ed7518e211c..74732f9688e 100644 --- a/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts +++ b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts @@ -79,7 +79,7 @@ export const workflowSourceOpenApiRoutes = [ summary: 'Apply workflow source', description: `Write TypeScript workflow source to the saved draft in one all-or-nothing write. Send the files, lock and \`fingerprint\` from Get Workflow Source with your edits. Requires workspace write access. The live deployment is unchanged.\n\nThe server compiles the files and checks them against the same rules as canvas and operation edits. Any error returns \`400\` with \`details.code\` \`SOURCE_REJECTED\` and \`details.diagnostics\` (each with a file, line and column), and nothing is saved. A \`409\` means the draft changed since the source was read (\`details.currentFingerprint\`): get the source again, reapply the edit and retry. Locked blocks cannot be changed from source. Unchanged blocks keep their ids and stored values, renamed blocks keep their ids, and existing blocks keep their canvas positions. Source that matches the draft returns \`applied: false\` without saving. The response re-prints the saved source with its new lock and fingerprint. \`dryRun=true\` runs every check without saving and always returns \`200\`. Returns \`403\` while code-first workflows are not enabled. ${WORKSPACE_API_KEY_DENIED}`, tags: ['Workflows'], - errors: RESOURCE_MUTATION_ERRORS, + errors: [...RESOURCE_MUTATION_ERRORS, 'PayloadTooLarge'], success: { description: 'The applied (or evaluated) source.', headers: RATE_LIMIT_HEADERS }, }, { From 20ee81b4f3116d2258e31a4a3fb414abb4d0a7c9 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:55:39 -0800 Subject: [PATCH 102/428] feat(workflows): resolve workflow-source resource keys through persisted bindings Keys come from workspace_resource_binding only: allocated lazily and idempotently from the name on first reference, stable across renames, and left bound to a deleted resource so a later file reports the key unresolved instead of rebinding a same-named resource. --- .../application/apply-workflow-source.ts | 40 +- .../application/get-workflow-source.ts | 14 +- apps/sim/lib/workflows/code/resources.test.ts | 61 --- apps/sim/lib/workflows/code/resources.ts | 208 +++------ .../resource-bindings.integration.ts | 317 ++++++++++++++ .../lib/workspaces/resource-bindings.test.ts | 45 ++ apps/sim/lib/workspaces/resource-bindings.ts | 399 ++++++++++++++++++ packages/db/schema.ts | 4 +- 8 files changed, 848 insertions(+), 240 deletions(-) delete mode 100644 apps/sim/lib/workflows/code/resources.test.ts create mode 100644 apps/sim/lib/workspaces/resource-bindings.integration.ts create mode 100644 apps/sim/lib/workspaces/resource-bindings.test.ts create mode 100644 apps/sim/lib/workspaces/resource-bindings.ts diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.ts b/apps/sim/lib/workflows/application/apply-workflow-source.ts index a284858381d..424c577712c 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.ts @@ -1,5 +1,5 @@ import { AuditAction, AuditResourceType } from '@sim/audit' -import { resolvePrincipalAttribution } from '@sim/auth/principal' +import { resolvePrincipalAttribution, resolvePrincipalSubjectUserId } from '@sim/auth/principal' import { db } from '@sim/db' import { workflowBlocks, workflow as workflowTable } from '@sim/db/schema' import { createLogger } from '@sim/logger' @@ -91,6 +91,7 @@ import { } from '@/lib/workflows/source/protected' import { buildSubBlockValues } from '@/lib/workflows/subblocks/visibility' import { parseWorkflowVariables } from '@/lib/workflows/variables/parse' +import type { ResourceKeyRef } from '@/lib/workspaces/resource-bindings' import { getBlock } from '@/blocks/registry' const logger = createLogger('ApplyWorkflowSource') @@ -229,18 +230,22 @@ function fingerprintOf( return sourceFingerprint(workflow, identity) } -/** Every resource kind a compiled model references, so only those tables are read. */ -function collectResourceKinds(value: unknown, kinds: Set): void { +/** Every `(kind, key)` resource reference in a compiled model, for binding lookup. */ +function collectResourceKeys(value: unknown, refs: ResourceKeyRef[]): void { if (Array.isArray(value)) { - for (const item of value) collectResourceKinds(item, kinds) + for (const item of value) collectResourceKeys(item, refs) return } if (value === null || typeof value !== 'object') return const record = value as Record - if (record.$sim === 'resource' && typeof record.kind === 'string') { - kinds.add(record.kind as ResourceKind) + if ( + record.$sim === 'resource' && + typeof record.kind === 'string' && + typeof record.key === 'string' + ) { + refs.push({ kind: record.kind as ResourceKind, key: record.key }) } - for (const nested of Object.values(record)) collectResourceKinds(nested, kinds) + for (const nested of Object.values(record)) collectResourceKeys(nested, refs) } /** @@ -717,7 +722,10 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ meta: stored.meta, resources: recording.resolver, }).identity - let resources = await loadResourceKeyResolver(context.workspaceId, recording.requestedKinds) + const createdBy = resolvePrincipalSubjectUserId(principal) ?? null + let resources = await loadResourceKeyResolver(context.workspaceId, recording.references, { + createdBy, + }) const currentFingerprint = fingerprintOf(stored, catalog, resources) const base = { @@ -790,13 +798,15 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ } const compiledModel = { ...compiled, workflow: compiled.workflow } - const compiledKinds = new Set() - collectResourceKinds(compiled.workflow.blocks, compiledKinds) - if ([...compiledKinds].some((kind) => !recording.requestedKinds.has(kind))) { - resources = await loadResourceKeyResolver(context.workspaceId, [ - ...recording.requestedKinds, - ...compiledKinds, - ]) + const compiledKeys: ResourceKeyRef[] = [] + collectResourceKeys(compiled.workflow.blocks, compiledKeys) + const currentResources = resources + if (compiledKeys.some(({ kind, key }) => currentResources.toId(kind, key) === null)) { + resources = await loadResourceKeyResolver( + context.workspaceId, + { ids: recording.references.ids, keys: compiledKeys }, + { createdBy } + ) } const hasLockEntries = diff --git a/apps/sim/lib/workflows/application/get-workflow-source.ts b/apps/sim/lib/workflows/application/get-workflow-source.ts index 9c9d79ef221..d392008a0b9 100644 --- a/apps/sim/lib/workflows/application/get-workflow-source.ts +++ b/apps/sim/lib/workflows/application/get-workflow-source.ts @@ -1,3 +1,4 @@ +import { resolvePrincipalSubjectUserId } from '@sim/auth/principal' import { compareStrings } from '@sim/utils/string' import { type CanonicalWorkflow, @@ -107,9 +108,12 @@ function usedBlockTypes(workflow: CanonicalWorkflow): string[] { * * Loads the stored, migrated graph; builds the per-workflow compile catalog (the blocks this * caller may place plus every type already in the workflow); projects the graph to the canonical - * model with resource ids lifted to provisional keys; and prints it with the bindings, order and - * comments `workflow.code_meta` keeps, so the lock comes from the same place. Pure read: no audit, so it - * stays head-safe and pollable like `GET /state`. + * model with resource ids lifted to their persisted keys; and prints it with the bindings, order and + * comments `workflow.code_meta` keeps, so the lock comes from the same place. No audit, so it stays + * head-safe and pollable like `GET /state`. The one write is resource-key allocation: the first + * get that references a resource with no key binds one (`resolveKeys`). That is idempotent + * identity metadata, not a change to any resource, so read access may cause it; later gets only + * read the binding. */ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ operation: workflowOperations.readSource, @@ -144,7 +148,9 @@ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ const recording = createRecordingResolver() canonicalize(state, { catalog, meta, resources: recording.resolver }) - const resources = await loadResourceKeyResolver(context.workspaceId, recording.requestedKinds) + const resources = await loadResourceKeyResolver(context.workspaceId, recording.references, { + createdBy: resolvePrincipalSubjectUserId(principal) ?? null, + }) const canonical = canonicalize(state, { catalog, meta, resources }) const codeMeta = readCodeMetaValue(context.workflowId, context.workflow.codeMeta) diff --git a/apps/sim/lib/workflows/code/resources.test.ts b/apps/sim/lib/workflows/code/resources.test.ts deleted file mode 100644 index 73646bfeec8..00000000000 --- a/apps/sim/lib/workflows/code/resources.test.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { assignResourceKeys } from '@/lib/workflows/code/resources' - -const at = (ms: number) => new Date(ms) - -describe('assignResourceKeys', () => { - it('gives the earliest-created resource the bare slug whatever order rows arrive in', () => { - const rows = [ - { id: 'b', name: 'Leads', createdAt: at(2) }, - { id: 'a', name: 'leads!', createdAt: at(1) }, - { id: 'c', name: 'LEADS', createdAt: at(3) }, - ] - - const forward = assignResourceKeys('table', rows) - const reversed = assignResourceKeys('table', [...rows].reverse()) - - expect(Object.fromEntries(forward.byId)).toEqual({ a: 'leads', b: 'leads-2', c: 'leads-3' }) - expect(Object.fromEntries(reversed.byId)).toEqual(Object.fromEntries(forward.byId)) - }) - - it('breaks a creation-time tie by id', () => { - const keys = assignResourceKeys('table', [ - { id: 'z', name: 'Docs', createdAt: at(1) }, - { id: 'y', name: 'Docs', createdAt: at(1) }, - ]) - - expect(keys.byId.get('y')).toBe('docs') - expect(keys.byId.get('z')).toBe('docs-2') - }) - - it('skips a suffix another resource already holds as its own slug', () => { - const keys = assignResourceKeys('knowledge-base', [ - { id: 'a', name: 'Docs', createdAt: at(1) }, - { id: 'b', name: 'docs 2', createdAt: at(2) }, - { id: 'c', name: 'Docs', createdAt: at(3) }, - ]) - - expect(keys.byId.get('b')).toBe('docs-2') - expect(keys.byId.get('c')).toBe('docs-3') - expect(new Set(keys.byId.values()).size).toBe(3) - }) - - it('keys a name with no slug characters by its kind', () => { - const keys = assignResourceKeys('credential', [ - { id: 'a', name: '***', createdAt: at(1) }, - { id: 'b', name: '', createdAt: at(2) }, - ]) - - expect(keys.byId.get('a')).toBe('credential') - expect(keys.byId.get('b')).toBe('credential-2') - }) - - it('maps every key back to the id it was assigned', () => { - const keys = assignResourceKeys('workflow', [ - { id: 'a', name: 'Enrich', createdAt: at(1) }, - { id: 'b', name: 'Enrich', createdAt: at(2) }, - ]) - - for (const [id, key] of keys.byId) expect(keys.byKey.get(key)).toBe(id) - }) -}) diff --git a/apps/sim/lib/workflows/code/resources.ts b/apps/sim/lib/workflows/code/resources.ts index b6df01c44d2..51136cf787b 100644 --- a/apps/sim/lib/workflows/code/resources.ts +++ b/apps/sim/lib/workflows/code/resources.ts @@ -1,190 +1,82 @@ -import { db } from '@sim/db' -import { - credential, - customTools, - folder, - knowledgeBase, - mcpServers, - skill, - userTableDefinitions, - workflow, -} from '@sim/db/schema' -import { compareStrings, slugify } from '@sim/utils/string' import type { ResourceKeyResolver, ResourceKind } from '@sim/workflow-code' -import { and, asc, eq, isNull } from 'drizzle-orm' +import { + type ResourceIdRef, + type ResourceKeyMap, + type ResourceKeyRef, + resolveIds, + resolveKeys, +} from '@/lib/workspaces/resource-bindings' /** * Resource keys for workflow source: `table('leads')`, `kb('docs')`, `binding('support-slack')`. * - * PROVISIONAL. Until the repo phase adds a binding table, a key is derived from the resource's - * current name: its slug, with `-2`, `-3`, … for later resources whose slug is already taken - * (ordered by creation time, then id, so the assignment is deterministic). A rename therefore - * changes the key, and deleting the older of two same-named resources moves the bare key to the - * newer one. Keys are a read-side projection only: nothing stores them yet. - * - * Credentials are keyed by display name and print as `binding(key)`. A kind with no workspace - * table here (`sandbox`, `file`, …), a deleted or archived resource, and an id from another - * workspace all resolve to `null`, which canonicalize keeps verbatim as `$sim: 'unresolved'`. + * Keys come only from the workspace's persisted bindings (`@/lib/workspaces/resource-bindings`), + * never from a resource's current name: a rename keeps the key, and deleting a resource leaves its + * key bound to the dead id, so the key is unresolved rather than re-pointed. A stored id that is + * deleted, archived, of a kind with no workspace table, or from another workspace resolves to + * `null`, which canonicalize keeps verbatim as `$sim: 'unresolved'`; a key with no live binding + * resolves to `null`, which materialize reports as `E_MAT_UNKNOWN_RESOURCE`. */ -/** Rows per kind read to assign keys; past it, later-created resources stay unresolved. */ -const MAX_RESOURCES_PER_KIND = 50_000 - -interface ResourceRow { - id: string - name: string - createdAt: Date -} - -type ResourceLoader = (workspaceId: string) => Promise - -const LOADERS: Partial> = { - table: (workspaceId) => - db - .select({ - id: userTableDefinitions.id, - name: userTableDefinitions.name, - createdAt: userTableDefinitions.createdAt, - }) - .from(userTableDefinitions) - .where( - and( - eq(userTableDefinitions.workspaceId, workspaceId), - isNull(userTableDefinitions.archivedAt) - ) - ) - .orderBy(asc(userTableDefinitions.createdAt), asc(userTableDefinitions.id)) - .limit(MAX_RESOURCES_PER_KIND), - 'knowledge-base': (workspaceId) => - db - .select({ - id: knowledgeBase.id, - name: knowledgeBase.name, - createdAt: knowledgeBase.createdAt, - }) - .from(knowledgeBase) - .where(and(eq(knowledgeBase.workspaceId, workspaceId), isNull(knowledgeBase.deletedAt))) - .orderBy(asc(knowledgeBase.createdAt), asc(knowledgeBase.id)) - .limit(MAX_RESOURCES_PER_KIND), - workflow: (workspaceId) => - db - .select({ id: workflow.id, name: workflow.name, createdAt: workflow.createdAt }) - .from(workflow) - .where(and(eq(workflow.workspaceId, workspaceId), isNull(workflow.archivedAt))) - .orderBy(asc(workflow.createdAt), asc(workflow.id)) - .limit(MAX_RESOURCES_PER_KIND), - 'custom-tool': (workspaceId) => - db - .select({ id: customTools.id, name: customTools.title, createdAt: customTools.createdAt }) - .from(customTools) - .where(eq(customTools.workspaceId, workspaceId)) - .orderBy(asc(customTools.createdAt), asc(customTools.id)) - .limit(MAX_RESOURCES_PER_KIND), - 'mcp-server': (workspaceId) => - db - .select({ id: mcpServers.id, name: mcpServers.name, createdAt: mcpServers.createdAt }) - .from(mcpServers) - .where(and(eq(mcpServers.workspaceId, workspaceId), isNull(mcpServers.deletedAt))) - .orderBy(asc(mcpServers.createdAt), asc(mcpServers.id)) - .limit(MAX_RESOURCES_PER_KIND), - skill: (workspaceId) => - db - .select({ id: skill.id, name: skill.name, createdAt: skill.createdAt }) - .from(skill) - .where(eq(skill.workspaceId, workspaceId)) - .orderBy(asc(skill.createdAt), asc(skill.id)) - .limit(MAX_RESOURCES_PER_KIND), - credential: (workspaceId) => - db - .select({ id: credential.id, name: credential.displayName, createdAt: credential.createdAt }) - .from(credential) - .where(eq(credential.workspaceId, workspaceId)) - .orderBy(asc(credential.createdAt), asc(credential.id)) - .limit(MAX_RESOURCES_PER_KIND), - 'file-folder': (workspaceId) => - db - .select({ id: folder.id, name: folder.name, createdAt: folder.createdAt }) - .from(folder) - .where( - and( - eq(folder.workspaceId, workspaceId), - eq(folder.resourceType, 'file'), - isNull(folder.deletedAt) - ) - ) - .orderBy(asc(folder.createdAt), asc(folder.id)) - .limit(MAX_RESOURCES_PER_KIND), -} - -/** Bidirectional id ↔ key maps for one kind. */ -interface KindKeys { - byId: Map - byKey: Map -} - -/** - * Assigns each resource its provisional key: the name's slug (or the kind when the slug is - * empty), suffixed `-2`, `-3`, … when an earlier resource already holds it. Earlier means - * created first, ties broken by id, whatever order `rows` arrives in. - */ -export function assignResourceKeys(kind: ResourceKind, rows: readonly ResourceRow[]): KindKeys { - const ordered = [...rows].sort( - (a, b) => a.createdAt.getTime() - b.createdAt.getTime() || compareStrings(a.id, b.id) - ) - const byId = new Map() - const byKey = new Map() - for (const row of ordered) { - if (byId.has(row.id)) continue - const base = slugify(row.name) || kind - let key = base - for (let suffix = 2; byKey.has(key); suffix += 1) key = `${base}-${suffix}` - byId.set(row.id, key) - byKey.set(key, row.id) - } - return { byId, byKey } +/** The `(kind, id)` and `(kind, key)` pairs a pass asked a resolver about. */ +interface ResourceReferences { + ids: ResourceIdRef[] + keys: ResourceKeyRef[] } /** - * A resolver that answers nothing and records every `(kind, id)` canonicalize asked about, so a - * first pass learns which kinds a workflow references before any resource table is read. + * A resolver that answers nothing and records every `(kind, id)` and `(kind, key)` it was asked + * about, so a first canonicalize pass learns which resources a workflow references before any + * binding is read or allocated. */ export function createRecordingResolver(): { resolver: ResourceKeyResolver - requestedKinds: Set + references: ResourceReferences } { - const requestedKinds = new Set() + const references: ResourceReferences = { ids: [], keys: [] } return { - requestedKinds, + references, resolver: { - toKey(kind) { - requestedKinds.add(kind) + toKey(kind, id) { + references.ids.push({ kind, id }) return null }, - toId() { + toId(kind, key) { + references.keys.push({ kind, key }) return null }, }, } } +interface LoadResourceKeyResolverOptions { + /** Attribution for keys allocated by this load; `null` for an actorless caller. */ + createdBy?: string | null +} + /** - * Loads the resource keys of `kinds` in one workspace and returns a resolver over them. Only - * this workspace's live resources are read, so an id from elsewhere never resolves. + * Resolves `references` in one workspace through its bindings and returns a resolver over the + * result: each referenced live resource's key (allocated on first reference, see `resolveKeys`) + * and each referenced key's live resource, in both directions (so a fingerprint taken after + * writing a key's id prints that key). Nothing outside `references` resolves. */ export async function loadResourceKeyResolver( workspaceId: string, - kinds: Iterable + references: Partial, + options: LoadResourceKeyResolverOptions = {} ): Promise { - const loaded = new Map() - await Promise.all( - [...new Set(kinds)].map(async (kind) => { - const load = LOADERS[kind] - if (!load) return - loaded.set(kind, assignResourceKeys(kind, await load(workspaceId))) - }) - ) + const [keysById, idsByKey] = await Promise.all([ + resolveKeys(workspaceId, references.ids ?? [], { createdBy: options.createdBy ?? null }), + resolveIds(workspaceId, references.keys ?? []), + ]) + const invert = (map: ResourceKeyMap): ResourceKeyMap => + new Map([...map].map(([kind, pairs]) => [kind, new Map([...pairs].map(([a, b]) => [b, a]))])) + const keysByIdFromKeys = invert(idsByKey) + const idsByKeyFromIds = invert(keysById) + const lookup = (map: ResourceKeyMap, kind: ResourceKind, value: string) => + map.get(kind)?.get(value) ?? null return { - toKey: (kind, id) => loaded.get(kind)?.byId.get(id) ?? null, - toId: (kind, key) => loaded.get(kind)?.byKey.get(key) ?? null, + toKey: (kind, id) => lookup(keysById, kind, id) ?? lookup(keysByIdFromKeys, kind, id), + toId: (kind, key) => lookup(idsByKey, kind, key) ?? lookup(idsByKeyFromIds, kind, key), } } diff --git a/apps/sim/lib/workspaces/resource-bindings.integration.ts b/apps/sim/lib/workspaces/resource-bindings.integration.ts new file mode 100644 index 00000000000..13c51f14c4d --- /dev/null +++ b/apps/sim/lib/workspaces/resource-bindings.integration.ts @@ -0,0 +1,317 @@ +import { db } from '@sim/db' +import { + credential, + customTools, + knowledgeBase, + mcpServers, + skill, + user, + userTableDefinitions, + workflow, + workspace, + workspaceResourceBinding, +} from '@sim/db/schema' +import { deleteWorkspaceFixture, insertWorkspaceFixture } from '@sim/db/testing/workspace-fixtures' +import { generateId } from '@sim/utils/id' +import type { ResourceKind } from '@sim/workflow-code' +import { and, eq, inArray } from 'drizzle-orm' +import { afterAll, beforeAll, describe, expect, it } from 'vitest' +import { loadResourceKeyResolver } from '@/lib/workflows/code/resources' +import { resolveIds, resolveKeys } from '@/lib/workspaces/resource-bindings' + +const userId = generateId() +const workspaceId = generateId() +const otherWorkspaceId = generateId() + +/** Creation times far enough apart that "older" is unambiguous. */ +const at = (minute: number) => new Date(Date.UTC(2026, 10, 1, 0, minute)) + +async function insertTable(id: string, wsId: string, name: string, createdAt: Date) { + await db.insert(userTableDefinitions).values({ + id, + workspaceId: wsId, + name, + schema: { columns: [] }, + createdBy: userId, + createdAt, + updatedAt: createdAt, + }) +} + +async function keyOf(kind: ResourceKind, id: string, wsId = workspaceId) { + return (await resolveKeys(wsId, [{ kind, id }], { createdBy: userId })).get(kind)?.get(id) +} + +async function idOf(kind: ResourceKind, key: string, wsId = workspaceId) { + return (await resolveIds(wsId, [{ kind, key }])).get(kind)?.get(key) +} + +async function bindingRows(wsId: string, kind: ResourceKind, resourceId: string) { + return db + .select({ key: workspaceResourceBinding.key, origin: workspaceResourceBinding.origin }) + .from(workspaceResourceBinding) + .where( + and( + eq(workspaceResourceBinding.workspaceId, wsId), + eq(workspaceResourceBinding.kind, kind), + eq(workspaceResourceBinding.resourceId, resourceId) + ) + ) +} + +describe('workspace resource bindings against PostgreSQL', () => { + beforeAll(async () => { + const now = new Date() + await db.insert(user).values({ + id: userId, + name: 'Resource binding fixture', + email: `${userId}@fixture.test`, + emailVerified: true, + createdAt: now, + updatedAt: now, + }) + await insertWorkspaceFixture( + db, + [workspaceId, otherWorkspaceId].map((id) => ({ + id, + name: 'Resource binding fixture', + ownerId: userId, + billedAccountUserId: userId, + })) + ) + }) + + afterAll(async () => { + await deleteWorkspaceFixture(db, inArray(workspace.id, [workspaceId, otherWorkspaceId])) + await db.delete(user).where(eq(user.id, userId)) + await db.$client.end() + }) + + it('allocates a key from the name once, and returns it again without a second row', async () => { + const older = generateId() + const newer = generateId() + await insertTable(older, workspaceId, 'Leads', at(1)) + await insertTable(newer, workspaceId, 'leads!', at(2)) + + const first = await resolveKeys( + workspaceId, + [ + { kind: 'table', id: newer }, + { kind: 'table', id: older }, + ], + { createdBy: userId } + ) + expect(first.get('table')?.get(older)).toBe('leads') + expect(first.get('table')?.get(newer)).toBe('leads-2') + + expect(await keyOf('table', older)).toBe('leads') + expect(await bindingRows(workspaceId, 'table', older)).toEqual([ + { key: 'leads', origin: 'allocated' }, + ]) + expect(await idOf('table', 'leads-2')).toBe(newer) + }) + + it('gives one key to a resource two concurrent calls allocate', async () => { + const id = generateId() + await insertTable(id, workspaceId, 'Orders', at(3)) + + const keys = await Promise.all(Array.from({ length: 6 }, () => keyOf('table', id))) + + expect(new Set(keys)).toEqual(new Set(['orders'])) + expect(await bindingRows(workspaceId, 'table', id)).toHaveLength(1) + }) + + it('gives distinct keys to same-named resources allocated concurrently', async () => { + const ids = [generateId(), generateId(), generateId()] + await Promise.all( + ids.map((id, index) => insertTable(id, workspaceId, 'Invoices', at(4 + index))) + ) + + const keys = await Promise.all(ids.map((id) => keyOf('table', id))) + + expect(new Set(keys)).toEqual(new Set(['invoices', 'invoices-2', 'invoices-3'])) + }) + + it('keeps every kind’s key through a rename', async () => { + const ids = { + table: generateId(), + kb: generateId(), + workflow: generateId(), + tool: generateId(), + skill: generateId(), + mcp: generateId(), + credential: generateId(), + } + const now = at(10) + await insertTable(ids.table, workspaceId, 'Rename Table', now) + await db.insert(knowledgeBase).values({ + id: ids.kb, + userId, + workspaceId, + name: 'Rename KB', + createdAt: now, + updatedAt: now, + }) + await db.insert(workflow).values({ + id: ids.workflow, + userId, + workspaceId, + name: 'Rename Workflow', + lastSynced: now, + createdAt: now, + updatedAt: now, + }) + await db.insert(customTools).values({ + id: ids.tool, + workspaceId, + userId, + title: 'Rename Tool', + schema: {}, + code: 'return 1', + createdAt: now, + updatedAt: now, + }) + await db.insert(skill).values({ + id: ids.skill, + workspaceId, + userId, + name: 'rename-skill', + description: 'fixture', + content: 'fixture', + createdAt: now, + updatedAt: now, + }) + await db.insert(mcpServers).values({ + id: ids.mcp, + workspaceId, + createdBy: userId, + name: 'Rename MCP', + transport: 'streamable-http', + createdAt: now, + updatedAt: now, + }) + await db.insert(credential).values({ + id: ids.credential, + workspaceId, + type: 'env_workspace', + displayName: 'Rename Credential', + envKey: `RENAME_${ids.credential.replaceAll('-', '_').toUpperCase()}`, + createdBy: userId, + createdAt: now, + updatedAt: now, + }) + + const cases: Array<[ResourceKind, string, string, () => Promise]> = [ + [ + 'table', + ids.table, + 'rename-table', + () => + db + .update(userTableDefinitions) + .set({ name: 'Renamed' }) + .where(eq(userTableDefinitions.id, ids.table)), + ], + [ + 'knowledge-base', + ids.kb, + 'rename-kb', + () => db.update(knowledgeBase).set({ name: 'Renamed' }).where(eq(knowledgeBase.id, ids.kb)), + ], + [ + 'workflow', + ids.workflow, + 'rename-workflow', + () => db.update(workflow).set({ name: 'Renamed' }).where(eq(workflow.id, ids.workflow)), + ], + [ + 'custom-tool', + ids.tool, + 'rename-tool', + () => db.update(customTools).set({ title: 'Renamed' }).where(eq(customTools.id, ids.tool)), + ], + [ + 'skill', + ids.skill, + 'rename-skill', + () => db.update(skill).set({ name: 'renamed' }).where(eq(skill.id, ids.skill)), + ], + [ + 'mcp-server', + ids.mcp, + 'rename-mcp', + () => db.update(mcpServers).set({ name: 'Renamed' }).where(eq(mcpServers.id, ids.mcp)), + ], + [ + 'credential', + ids.credential, + 'rename-credential', + () => + db + .update(credential) + .set({ displayName: 'Renamed' }) + .where(eq(credential.id, ids.credential)), + ], + ] + + for (const [kind, id, expectedKey, rename] of cases) { + expect(await keyOf(kind, id)).toBe(expectedKey) + await rename() + expect(await keyOf(kind, id)).toBe(expectedKey) + expect(await idOf(kind, expectedKey)).toBe(id) + expect(await idOf(kind, 'renamed')).toBeUndefined() + } + }) + + it('never re-points the key of a deleted older resource at a newer same-named one', async () => { + const older = generateId() + const newer = generateId() + await insertTable(older, workspaceId, 'Docs', at(20)) + await insertTable(newer, workspaceId, 'Docs', at(21)) + expect(await keyOf('table', older)).toBe('docs') + + await db + .update(userTableDefinitions) + .set({ archivedAt: new Date() }) + .where(eq(userTableDefinitions.id, older)) + + expect(await idOf('table', 'docs')).toBeUndefined() + expect(await keyOf('table', older)).toBeUndefined() + expect(await keyOf('table', newer)).toBe('docs-2') + expect(await bindingRows(workspaceId, 'table', older)).toEqual([ + { key: 'docs', origin: 'allocated' }, + ]) + + const resolver = await loadResourceKeyResolver(workspaceId, { + ids: [{ kind: 'table', id: newer }], + keys: [{ kind: 'table', key: 'docs' }], + }) + expect(resolver.toId('table', 'docs')).toBeNull() + expect(resolver.toId('table', 'docs-2')).toBe(newer) + }) + + it('never resolves a key or id across workspaces', async () => { + const foreign = generateId() + await insertTable(foreign, otherWorkspaceId, 'Payroll', at(30)) + expect(await keyOf('table', foreign, otherWorkspaceId)).toBe('payroll') + + expect(await idOf('table', 'payroll')).toBeUndefined() + expect(await keyOf('table', foreign)).toBeUndefined() + expect(await bindingRows(workspaceId, 'table', foreign)).toEqual([]) + }) + + it('allocates inside the caller’s transaction and rolls back with it', async () => { + const id = generateId() + await insertTable(id, workspaceId, 'Rollback', at(40)) + + await expect( + db.transaction(async (tx) => { + const keys = await resolveKeys(workspaceId, [{ kind: 'table', id }], { executor: tx }) + expect(keys.get('table')?.get(id)).toBe('rollback') + throw new Error('roll back') + }) + ).rejects.toThrow('roll back') + + expect(await bindingRows(workspaceId, 'table', id)).toEqual([]) + }) +}) diff --git a/apps/sim/lib/workspaces/resource-bindings.test.ts b/apps/sim/lib/workspaces/resource-bindings.test.ts new file mode 100644 index 00000000000..2fd20aff437 --- /dev/null +++ b/apps/sim/lib/workspaces/resource-bindings.test.ts @@ -0,0 +1,45 @@ +import { describe, expect, it } from 'vitest' +import { nextFreeKey, resourceKeyBase } from '@/lib/workspaces/resource-bindings' + +const KEY_FORMAT = /^[a-z][a-z0-9_-]{0,63}$/ + +describe('resourceKeyBase', () => { + it('slugs the name', () => { + expect(resourceKeyBase('table', 'Leads (EU)!')).toBe('leads-eu') + }) + + it('keys a name with no slug characters by its kind', () => { + expect(resourceKeyBase('knowledge-base', '***')).toBe('knowledge-base') + expect(resourceKeyBase('credential', '')).toBe('credential') + }) + + it('prefixes the kind when the slug starts with a digit', () => { + expect(resourceKeyBase('table', '2026 Leads')).toBe('table-2026-leads') + }) + + it('cuts an overlong name to the key length without a trailing hyphen', () => { + const base = resourceKeyBase('table', `${'a'.repeat(63)} b`) + expect(base).toBe('a'.repeat(63)) + expect(base).toMatch(KEY_FORMAT) + }) +}) + +describe('nextFreeKey', () => { + it('returns the base when it is free', () => { + expect(nextFreeKey('leads', new Set(['leads-2']))).toBe('leads') + }) + + it('skips every suffix already taken', () => { + expect(nextFreeKey('leads', new Set(['leads', 'leads-2', 'leads-3']))).toBe('leads-4') + }) + + it('cuts a full-length base so the suffixed key still fits the stored format', () => { + const base = 'b'.repeat(64) + const taken = new Set([base]) + const key = nextFreeKey(base, taken) + expect(key).toBe(`${'b'.repeat(62)}-2`) + expect(key).toMatch(KEY_FORMAT) + taken.add(key) + expect(nextFreeKey(base, taken)).toBe(`${'b'.repeat(62)}-3`) + }) +}) diff --git a/apps/sim/lib/workspaces/resource-bindings.ts b/apps/sim/lib/workspaces/resource-bindings.ts new file mode 100644 index 00000000000..36cdc230a4c --- /dev/null +++ b/apps/sim/lib/workspaces/resource-bindings.ts @@ -0,0 +1,399 @@ +import { db } from '@sim/db' +import { + credential, + customTools, + folder, + knowledgeBase, + mcpServers, + skill, + userTableDefinitions, + workflow, + workspaceResourceBinding, +} from '@sim/db/schema' +import { createLogger } from '@sim/logger' +import { generateId } from '@sim/utils/id' +import { compareStrings, slugify } from '@sim/utils/string' +import type { ResourceKind } from '@sim/workflow-code' +import { and, eq, inArray, isNull, like, or } from 'drizzle-orm' +import type { DbOrTx } from '@/lib/db/types' + +/** + * Persisted resource keys (`workspace_resource_binding`): the only mapping between a workflow + * source key such as `table('leads')` and a resource id. + * + * A key is allocated the first time something needs one for a resource, derived from the + * resource's name at that moment, and never changes afterwards. Renaming the resource keeps its + * key; deleting it leaves the binding on the dead id, so the key stops resolving instead of + * moving to another resource with the same name. Only resources that are live in the given + * workspace resolve in either direction, so an id or key from another workspace never does. + * + * Both functions join the caller's transaction when given one (`executor`). Allocation re-reads + * after each insert, so the caller's transaction must run at READ COMMITTED (the default). + */ + +const logger = createLogger('ResourceBindings') + +const MAX_KEY_LENGTH = 64 + +/** + * Characters of a key base compared when collecting taken keys: a suffixed key keeps at least + * this much of its base, so every key a candidate could collide with shares this prefix. + */ +const TAKEN_PREFIX_LENGTH = 48 + +/** Insert rounds before an allocation that keeps losing races is left unresolved. */ +const MAX_ALLOCATION_ROUNDS = 5 + +interface LiveResource { + id: string + name: string + createdAt: Date +} + +type LiveResourceLoader = ( + executor: DbOrTx, + workspaceId: string, + ids: string[] +) => Promise + +/** + * Reads the live resources among `ids` in one workspace: archived, deleted and foreign rows are + * left out. A kind without a loader has no workspace table to check and never resolves. + */ +const LIVE_RESOURCE_LOADERS: Partial> = { + table: (executor, workspaceId, ids) => + executor + .select({ + id: userTableDefinitions.id, + name: userTableDefinitions.name, + createdAt: userTableDefinitions.createdAt, + }) + .from(userTableDefinitions) + .where( + and( + eq(userTableDefinitions.workspaceId, workspaceId), + inArray(userTableDefinitions.id, ids), + isNull(userTableDefinitions.archivedAt) + ) + ), + 'knowledge-base': (executor, workspaceId, ids) => + executor + .select({ + id: knowledgeBase.id, + name: knowledgeBase.name, + createdAt: knowledgeBase.createdAt, + }) + .from(knowledgeBase) + .where( + and( + eq(knowledgeBase.workspaceId, workspaceId), + inArray(knowledgeBase.id, ids), + isNull(knowledgeBase.deletedAt) + ) + ), + workflow: (executor, workspaceId, ids) => + executor + .select({ id: workflow.id, name: workflow.name, createdAt: workflow.createdAt }) + .from(workflow) + .where( + and( + eq(workflow.workspaceId, workspaceId), + inArray(workflow.id, ids), + isNull(workflow.archivedAt) + ) + ), + 'custom-tool': (executor, workspaceId, ids) => + executor + .select({ id: customTools.id, name: customTools.title, createdAt: customTools.createdAt }) + .from(customTools) + .where(and(eq(customTools.workspaceId, workspaceId), inArray(customTools.id, ids))), + 'mcp-server': (executor, workspaceId, ids) => + executor + .select({ id: mcpServers.id, name: mcpServers.name, createdAt: mcpServers.createdAt }) + .from(mcpServers) + .where( + and( + eq(mcpServers.workspaceId, workspaceId), + inArray(mcpServers.id, ids), + isNull(mcpServers.deletedAt) + ) + ), + skill: (executor, workspaceId, ids) => + executor + .select({ id: skill.id, name: skill.name, createdAt: skill.createdAt }) + .from(skill) + .where(and(eq(skill.workspaceId, workspaceId), inArray(skill.id, ids))), + credential: (executor, workspaceId, ids) => + executor + .select({ id: credential.id, name: credential.displayName, createdAt: credential.createdAt }) + .from(credential) + .where(and(eq(credential.workspaceId, workspaceId), inArray(credential.id, ids))), + 'file-folder': (executor, workspaceId, ids) => + executor + .select({ id: folder.id, name: folder.name, createdAt: folder.createdAt }) + .from(folder) + .where( + and( + eq(folder.workspaceId, workspaceId), + inArray(folder.id, ids), + eq(folder.resourceType, 'file'), + isNull(folder.deletedAt) + ) + ), +} + +export interface ResourceIdRef { + kind: ResourceKind + id: string +} + +export interface ResourceKeyRef { + kind: ResourceKind + key: string +} + +/** kind → (id → key), or kind → (key → id); only live, bound resources appear. */ +export type ResourceKeyMap = Map> + +interface BindingOptions { + /** The caller's transaction, when the lookup must see or join its writes. */ + executor?: DbOrTx +} + +interface ResolveKeysOptions extends BindingOptions { + /** The human the allocation is attributed to; `null` for an actorless caller. */ + createdBy?: string | null +} + +function trimKey(value: string, maxLength: number): string { + return value.slice(0, maxLength).replace(/-+$/, '') +} + +/** + * The key a resource is first offered: its name's slug, or the kind when the name has no slug + * characters; prefixed with the kind when the slug starts with a digit, and cut to the key + * length. Always matches the stored key format `^[a-z][a-z0-9_-]{0,63}$`. + */ +export function resourceKeyBase(kind: ResourceKind, name: string): string { + const slug = slugify(name) + const base = slug === '' ? kind : /^[a-z]/.test(slug) ? slug : `${kind}-${slug}` + return trimKey(base, MAX_KEY_LENGTH) +} + +/** `base` when free, else the first free `base-2`, `base-3`, … (the base cut to fit). */ +export function nextFreeKey(base: string, taken: ReadonlySet): string { + if (!taken.has(base)) return base + for (let suffix = 2; ; suffix += 1) { + const tail = `-${suffix}` + const key = `${trimKey(base, MAX_KEY_LENGTH - tail.length)}${tail}` + if (!taken.has(key)) return key + } +} + +function groupByKind( + refs: Iterable, + value: (ref: T) => string +): Map { + const grouped = new Map>() + for (const ref of refs) { + const values = grouped.get(ref.kind) ?? new Set() + values.add(value(ref)) + grouped.set(ref.kind, values) + } + return new Map([...grouped].map(([kind, values]) => [kind, [...values]])) +} + +async function loadLiveResources( + executor: DbOrTx, + workspaceId: string, + kind: ResourceKind, + ids: string[] +): Promise { + const load = LIVE_RESOURCE_LOADERS[kind] + if (!load || ids.length === 0) return [] + return load(executor, workspaceId, ids) +} + +async function readBindingsByResource( + executor: DbOrTx, + workspaceId: string, + kind: ResourceKind, + resourceIds: string[] +): Promise> { + if (resourceIds.length === 0) return new Map() + const rows = await executor + .select({ resourceId: workspaceResourceBinding.resourceId, key: workspaceResourceBinding.key }) + .from(workspaceResourceBinding) + .where( + and( + eq(workspaceResourceBinding.workspaceId, workspaceId), + eq(workspaceResourceBinding.kind, kind), + inArray(workspaceResourceBinding.resourceId, resourceIds) + ) + ) + return new Map(rows.map((row) => [row.resourceId, row.key])) +} + +async function readTakenKeys( + executor: DbOrTx, + workspaceId: string, + kind: ResourceKind, + bases: string[] +): Promise> { + const prefixes = [...new Set(bases.map((base) => base.slice(0, TAKEN_PREFIX_LENGTH)))] + const rows = await executor + .select({ key: workspaceResourceBinding.key }) + .from(workspaceResourceBinding) + .where( + and( + eq(workspaceResourceBinding.workspaceId, workspaceId), + eq(workspaceResourceBinding.kind, kind), + or(...prefixes.map((prefix) => like(workspaceResourceBinding.key, `${prefix}%`))) + ) + ) + return new Set(rows.map((row) => row.key)) +} + +/** + * Binds every unbound resource in `unbound` and returns the keys now bound to them. Each round + * offers the oldest resource the lowest free key and inserts with on-conflict-do-nothing: a row + * that loses a race (the resource bound concurrently, or its key taken by another resource) is + * skipped and re-read, so concurrent callers converge on one key per resource. + */ +async function allocateKeys( + executor: DbOrTx, + workspaceId: string, + kind: ResourceKind, + unbound: LiveResource[], + createdBy: string | null +): Promise> { + const allocated = new Map() + let pending = [...unbound].sort( + (a, b) => a.createdAt.getTime() - b.createdAt.getTime() || compareStrings(a.id, b.id) + ) + for (let round = 0; round < MAX_ALLOCATION_ROUNDS && pending.length > 0; round += 1) { + const bases = new Map(pending.map((row) => [row.id, resourceKeyBase(kind, row.name)])) + const taken = await readTakenKeys(executor, workspaceId, kind, [...bases.values()]) + const now = new Date() + const values = pending.map((row) => { + const key = nextFreeKey(bases.get(row.id) ?? kind, taken) + taken.add(key) + return { + id: generateId(), + workspaceId, + kind, + key, + resourceId: row.id, + origin: 'allocated' as const, + createdBy, + createdAt: now, + updatedAt: now, + } + }) + await executor.insert(workspaceResourceBinding).values(values).onConflictDoNothing() + const bound = await readBindingsByResource( + executor, + workspaceId, + kind, + pending.map((row) => row.id) + ) + for (const [resourceId, key] of bound) allocated.set(resourceId, key) + pending = pending.filter((row) => !bound.has(row.id)) + } + if (pending.length > 0) { + logger.warn('Resource key allocation did not converge; leaving resources unresolved', { + workspaceId, + kind, + unresolvedCount: pending.length, + }) + } + return allocated +} + +/** + * The key of each referenced resource that is live in `workspaceId`, allocating one for a + * resource that has none yet. Ids that are deleted, archived, from another workspace, or of a + * kind with no workspace table are left out (the caller treats them as unresolved). + * + * Allocation is a metadata write that callers with read access may cause (`source get`): it is + * idempotent identity allocation that changes no resource, only records the name the resource is + * printed under from now on, and a second call returns the same key without writing. Concurrent + * calls for the same resource insert with on-conflict-do-nothing and re-read, so they agree on one + * key. + */ +export async function resolveKeys( + workspaceId: string, + refs: Iterable, + options: ResolveKeysOptions = {} +): Promise { + const executor = options.executor ?? db + const resolved: ResourceKeyMap = new Map() + for (const [kind, ids] of groupByKind(refs, (ref) => ref.id)) { + const live = await loadLiveResources(executor, workspaceId, kind, ids) + if (live.length === 0) continue + const keys = await readBindingsByResource( + executor, + workspaceId, + kind, + live.map((row) => row.id) + ) + const unbound = live.filter((row) => !keys.has(row.id)) + if (unbound.length > 0) { + const allocated = await allocateKeys( + executor, + workspaceId, + kind, + unbound, + options.createdBy ?? null + ) + for (const [id, key] of allocated) keys.set(id, key) + } + resolved.set(kind, keys) + } + return resolved +} + +/** + * The resource each key is bound to in `workspaceId`, when that resource is still live. A key + * with no binding, or bound to a deleted or archived resource, is left out: it is never re-pointed + * at another resource. Never allocates. + */ +export async function resolveIds( + workspaceId: string, + refs: Iterable, + options: BindingOptions = {} +): Promise { + const executor = options.executor ?? db + const resolved: ResourceKeyMap = new Map() + for (const [kind, keys] of groupByKind(refs, (ref) => ref.key)) { + if (!LIVE_RESOURCE_LOADERS[kind]) continue + const rows = await executor + .select({ + key: workspaceResourceBinding.key, + resourceId: workspaceResourceBinding.resourceId, + }) + .from(workspaceResourceBinding) + .where( + and( + eq(workspaceResourceBinding.workspaceId, workspaceId), + eq(workspaceResourceBinding.kind, kind), + inArray(workspaceResourceBinding.key, keys) + ) + ) + if (rows.length === 0) continue + const live = new Set( + ( + await loadLiveResources( + executor, + workspaceId, + kind, + rows.map((row) => row.resourceId) + ) + ).map((row) => row.id) + ) + const ids = new Map() + for (const row of rows) if (live.has(row.resourceId)) ids.set(row.key, row.resourceId) + if (ids.size > 0) resolved.set(kind, ids) + } + return resolved +} diff --git a/packages/db/schema.ts b/packages/db/schema.ts index 282b6029bb0..287c53f5f24 100644 --- a/packages/db/schema.ts +++ b/packages/db/schema.ts @@ -2707,8 +2707,8 @@ export const workspaceForkBlockMap = pgTable( /** * Resource kinds a workflow-source key can name: `ResourceKind` from `@sim/workflow-code`, which is * `PortableResourceKind` from `@sim/workflow-types/resources` minus `env-var` (env names are their - * own keys). The binding service writes and reads this column as `ResourceKind`, so the two lists - * cannot drift without a type error. + * own keys). Kept as a literal list so `@sim/db` takes no dependency on the workflow packages; the + * binding service writes this column from a `ResourceKind`, so a kind missing here is a type error. */ export const workspaceResourceKindEnum = pgEnum('workspace_resource_kind', [ 'credential', From 67c8f79fbbb6a7dc978b9da2017e7ca0fa42c31a Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:56:22 -0800 Subject: [PATCH 103/428] fix(workflow-code): scope the activity canonical index to the block's serialized surface --- .../src/canonicalize/index.test.ts | 78 ++++++++++++++++++- .../workflow-code/src/canonicalize/index.ts | 6 +- .../workflow-code/src/canonicalize/modes.ts | 24 +++++- 3 files changed, 101 insertions(+), 7 deletions(-) diff --git a/packages/workflow-code/src/canonicalize/index.test.ts b/packages/workflow-code/src/canonicalize/index.test.ts index e662661d25e..4c8620b7656 100644 --- a/packages/workflow-code/src/canonicalize/index.test.ts +++ b/packages/workflow-code/src/canonicalize/index.test.ts @@ -9,7 +9,8 @@ import { canonicalize } from '.' /* * The catalog below is hand-projected from real registry configs (apps/sim/blocks/blocks: * slack.ts, agent.ts, condition.ts, router_v2.ts, function.ts, variables.ts, api.ts, - * start_trigger.ts, table.ts) down to the fields canonicalize reads. Quirk numbers refer to + * start_trigger.ts, table.ts, gmail.ts with triggers/gmail/poller.ts, generic_webhook.ts with + * triggers/generic/webhook.ts) down to the fields canonicalize reads. Quirk numbers refer to * s1 §5. */ @@ -216,6 +217,39 @@ const CATALOG: BlockCatalog = { ], { category: 'triggers' } ), + gmail: block('gmail', [ + sb({ id: 'operation', type: 'dropdown', surface: 'action' }), + sb({ + id: 'credential', + type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', + surface: 'action', + }), + sb({ + id: 'manualCredential', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + surface: 'action', + }), + sb({ + id: 'triggerCredentials', + type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'trigger', + surface: 'trigger', + }), + sb({ id: 'labelIds', type: 'dropdown', mode: 'trigger', surface: 'trigger' }), + ]), + generic_webhook: block( + 'generic_webhook', + [ + sb({ id: 'requireAuth', type: 'switch', mode: 'trigger', surface: 'trigger' }), + sb({ id: 'token', type: 'short-input', mode: 'trigger', surface: 'trigger' }), + ], + { category: 'triggers' } + ), custom_block_acme: block( 'custom_block_acme', [ @@ -682,6 +716,48 @@ describe('canonicalize: inactive annotation (step 9, quirks 1, 10, 14)', () => { expect(action.workflow.annotations.inactive.slack).toEqual(['signingSecret']) }) + it('keeps a trigger field active in trigger mode when it shares a canonical id with an action pair', () => { + const trigger = run( + workflow([ + blockState( + 'b1', + 'gmail', + 'Gmail', + { triggerCredentials: 'cred-1', labelIds: 'INBOX' }, + { triggerMode: true } + ), + ]) + ) + expect(trigger.workflow.annotations.inactive.gmail).toBeUndefined() + const action = run( + workflow([ + blockState('b1', 'gmail', 'Gmail', { + operation: 'send_gmail', + credential: 'cred-1', + triggerCredentials: 'cred-1', + }), + ]) + ) + expect(action.workflow.annotations.inactive.gmail).toEqual(['triggerCredentials']) + }) + + it('keeps every field of a trigger-category block active in and out of trigger mode', () => { + for (const triggerMode of [false, true]) { + const result = run( + workflow([ + blockState( + 'b1', + 'generic_webhook', + 'Webhook', + { requireAuth: true, token: 't' }, + { triggerMode } + ), + ]) + ) + expect(result.workflow.annotations.inactive.webhook).toBeUndefined() + } + }) + it('marks tool-input-only and undeclared fields inactive, except on custom blocks (quirk 18)', () => { const result = run( workflow([ diff --git a/packages/workflow-code/src/canonicalize/index.ts b/packages/workflow-code/src/canonicalize/index.ts index f919d177982..1404576179c 100644 --- a/packages/workflow-code/src/canonicalize/index.ts +++ b/packages/workflow-code/src/canonicalize/index.ts @@ -7,7 +7,7 @@ import { resolveEffectiveErrorEnabled, } from '@sim/workflow-types/workflow' import type { CanonicalizeFn } from '../api' -import { buildCanonicalIndex, type CanonicalModeOverrides } from '../catalog/canonical-index' +import type { CanonicalModeOverrides } from '../catalog/canonical-index' import type { CanonicalizeDiagnosticCode } from '../diagnostics/codes' import type { Diagnostic } from '../diagnostics/frame' import type { LockIdentity, LockIdentityBlock, LockLayout } from '../lock' @@ -27,7 +27,7 @@ import { type LiftedBranches, liftBranches } from './branches' import { type CanonContext, catalogBlock, report } from './context' import { canonicalEdges } from './edges' import { assignBlockKeys, assignVariableKeys } from './keys' -import { effectiveModes } from './modes' +import { buildCanonicalIndexForSurface, effectiveModes } from './modes' import { canonicalParams } from './params' import { loopSpec, parallelSpec, SUBFLOW_DATA_KEYS } from './subflows' import { toJson, toValue } from './values' @@ -264,7 +264,7 @@ export const canonicalize: CanonicalizeFn = (state, options) => { advancedMode, values: activityValues, overrides, - index: buildCanonicalIndex(catalog.subBlocks), + index: buildCanonicalIndexForSurface(catalog, triggerMode), } const inactiveIds = Object.keys(params).filter((paramId) => isInactive(paramId, activityInputs) diff --git a/packages/workflow-code/src/canonicalize/modes.ts b/packages/workflow-code/src/canonicalize/modes.ts index 284f25c3a8e..9f2b2d583ee 100644 --- a/packages/workflow-code/src/canonicalize/modes.ts +++ b/packages/workflow-code/src/canonicalize/modes.ts @@ -1,5 +1,6 @@ import { buildCanonicalIndex, + type CanonicalIndex, type CanonicalModeOverrides, isCanonicalPair, resolveCanonicalMode, @@ -24,9 +25,7 @@ export function effectiveModes( overrides: CanonicalModeOverrides | undefined, legacyAdvancedMode: boolean ): Record { - const index = buildCanonicalIndex( - block.subBlocks.filter((subBlock) => onBlockSurface(block, subBlock, triggerMode)) - ) + const index = buildCanonicalIndexForSurface(block, triggerMode) const modes: Record = {} for (const group of Object.values(index.groupsById)) { if (!isCanonicalPair(group)) continue @@ -37,6 +36,25 @@ export function effectiveModes( return modes } +/** + * The canonical groups of the surface the block serializes: the trigger surface in trigger mode, + * the action surface otherwise, and both for a trigger block. + * + * A block that is both an action and a trigger declares both surfaces in one `subBlocks` list, and + * they share `canonicalParamId`s under different ids (Gmail's `credential`/`manualCredential` and + * `triggerCredentials` are all `oauthCredential`). Indexed together, the trigger member joins the + * action pair without being either of its members, so it reads as the pair's dormant side. + */ +export function buildCanonicalIndexForSurface( + block: Pick, + triggerMode: boolean +): CanonicalIndex { + const onSurface = block.subBlocks.filter((subBlock) => + onBlockSurface(block, subBlock, triggerMode) + ) + return buildCanonicalIndex(onSurface) +} + function onBlockSurface( block: Pick, subBlock: CatalogSubBlock, From 08bb79919490053c7876ee9243d127e65ce5522e Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:48:11 -0800 Subject: [PATCH 104/428] feat(db): add workspace_resource_binding for persisted workflow-source resource keys --- .../0461_workspace_resource_binding.sql | 19 + .../db/migrations/meta/0461_snapshot.json | 33377 ++++++++++++++++ packages/db/migrations/meta/_journal.json | 7 + packages/db/schema.ts | 71 + .../src/mocks/schema-tables.generated.ts | 25 + 5 files changed, 33499 insertions(+) create mode 100644 packages/db/migrations/0461_workspace_resource_binding.sql create mode 100644 packages/db/migrations/meta/0461_snapshot.json diff --git a/packages/db/migrations/0461_workspace_resource_binding.sql b/packages/db/migrations/0461_workspace_resource_binding.sql new file mode 100644 index 00000000000..0e4e8eb69aa --- /dev/null +++ b/packages/db/migrations/0461_workspace_resource_binding.sql @@ -0,0 +1,19 @@ +CREATE TYPE "public"."workspace_resource_kind" AS ENUM('credential', 'knowledge-base', 'knowledge-document', 'table', 'file', 'file-folder', 'mcp-server', 'custom-tool', 'custom-block', 'skill', 'sandbox', 'workflow');--> statement-breakpoint +CREATE TABLE "workspace_resource_binding" ( + "id" text PRIMARY KEY NOT NULL, + "workspace_id" text NOT NULL, + "kind" "workspace_resource_kind" NOT NULL, + "key" text NOT NULL, + "resource_id" text NOT NULL, + "origin" text NOT NULL, + "created_by" text, + "created_at" timestamp DEFAULT now() NOT NULL, + "updated_at" timestamp DEFAULT now() NOT NULL, + CONSTRAINT "workspace_resource_binding_key_format" CHECK ("workspace_resource_binding"."key" ~ '^[a-z][a-z0-9_-]{0,63}$'), + CONSTRAINT "workspace_resource_binding_origin_check" CHECK ("workspace_resource_binding"."origin" IN ('allocated', 'adopted', 'created')) +); +--> statement-breakpoint +ALTER TABLE "workspace_resource_binding" ADD CONSTRAINT "workspace_resource_binding_workspace_id_workspace_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspace"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "workspace_resource_binding" ADD CONSTRAINT "workspace_resource_binding_created_by_user_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."user"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +CREATE UNIQUE INDEX "workspace_resource_binding_ws_kind_key_unique" ON "workspace_resource_binding" USING btree ("workspace_id","kind","key");--> statement-breakpoint +CREATE UNIQUE INDEX "workspace_resource_binding_ws_kind_resource_unique" ON "workspace_resource_binding" USING btree ("workspace_id","kind","resource_id"); \ No newline at end of file diff --git a/packages/db/migrations/meta/0461_snapshot.json b/packages/db/migrations/meta/0461_snapshot.json new file mode 100644 index 00000000000..583ed565d98 --- /dev/null +++ b/packages/db/migrations/meta/0461_snapshot.json @@ -0,0 +1,33377 @@ +{ + "id": "e907c2fa-d260-48f8-844f-d6fe9aa27563", + "prevId": "be3b8806-8ecc-46ba-829d-ec1f22c33724", + "version": "7", + "dialect": "postgresql", + "tables": { + "public.account": { + "name": "account", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "account_id": { + "name": "account_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token": { + "name": "access_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_token": { + "name": "refresh_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "id_token": { + "name": "id_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "access_token_expires_at": { + "name": "access_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "refresh_token_expires_at": { + "name": "refresh_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scope": { + "name": "scope", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oauth_config": { + "name": "oauth_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_revoked_at": { + "name": "refresh_revoked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "refresh_revoked_code": { + "name": "refresh_revoked_code", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_revoked_token_hash": { + "name": "refresh_revoked_token_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "account_user_id_idx": { + "name": "account_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_account_on_account_id_provider_id": { + "name": "idx_account_on_account_id_provider_id", + "columns": [ + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "account_user_id_user_id_fk": { + "name": "account_user_id_user_id_fk", + "tableFrom": "account", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.agent_memory_turn": { + "name": "agent_memory_turn", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "memory_id": { + "name": "memory_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "block_id": { + "name": "block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "node_id": { + "name": "node_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_order": { + "name": "execution_order", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "encrypted_state": { + "name": "encrypted_state", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "agent_memory_turn_invocation_unique": { + "name": "agent_memory_turn_invocation_unique", + "columns": [ + { + "expression": "memory_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "node_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "agent_memory_turn_workflow_idx": { + "name": "agent_memory_turn_workflow_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "agent_memory_turn_memory_id_memory_id_fk": { + "name": "agent_memory_turn_memory_id_memory_id_fk", + "tableFrom": "agent_memory_turn", + "tableTo": "memory", + "columnsFrom": ["memory_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "agent_memory_turn_workflow_id_workflow_id_fk": { + "name": "agent_memory_turn_workflow_id_workflow_id_fk", + "tableFrom": "agent_memory_turn", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.api_key": { + "name": "api_key", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key_hash": { + "name": "key_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'personal'" + }, + "access": { + "name": "access", + "type": "api_key_access", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'write'" + }, + "last_used": { + "name": "last_used", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "api_key_workspace_type_idx": { + "name": "api_key_workspace_type_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "api_key_user_type_idx": { + "name": "api_key_user_type_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "api_key_key_hash_idx": { + "name": "api_key_key_hash_idx", + "columns": [ + { + "expression": "key_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "api_key_user_id_user_id_fk": { + "name": "api_key_user_id_user_id_fk", + "tableFrom": "api_key", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "api_key_workspace_id_workspace_id_fk": { + "name": "api_key_workspace_id_workspace_id_fk", + "tableFrom": "api_key", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "api_key_created_by_user_id_fk": { + "name": "api_key_created_by_user_id_fk", + "tableFrom": "api_key", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "api_key_key_unique": { + "name": "api_key_key_unique", + "nullsNotDistinct": false, + "columns": ["key"] + } + }, + "policies": {}, + "checkConstraints": { + "workspace_type_check": { + "name": "workspace_type_check", + "value": "(type = 'workspace' AND workspace_id IS NOT NULL) OR (type = 'personal' AND workspace_id IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.assistant_tool_permission": { + "name": "assistant_tool_permission", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "read_policy": { + "name": "read_policy", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'allow'" + }, + "write_policy": { + "name": "write_policy", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'ask'" + }, + "overrides": { + "name": "overrides", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "assistant_tool_permission_credential_idx": { + "name": "assistant_tool_permission_credential_idx", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "assistant_tool_permission_user_idx": { + "name": "assistant_tool_permission_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "assistant_tool_permission_organization_id_organization_id_fk": { + "name": "assistant_tool_permission_organization_id_organization_id_fk", + "tableFrom": "assistant_tool_permission", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assistant_tool_permission_user_id_user_id_fk": { + "name": "assistant_tool_permission_user_id_user_id_fk", + "tableFrom": "assistant_tool_permission", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "assistant_tool_permission_credential_id_credential_id_fk": { + "name": "assistant_tool_permission_credential_id_credential_id_fk", + "tableFrom": "assistant_tool_permission", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "assistant_tool_permission_organization_id_user_id_credential_id_pk": { + "name": "assistant_tool_permission_organization_id_user_id_credential_id_pk", + "columns": ["organization_id", "user_id", "credential_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "assistant_tool_permission_policy_check": { + "name": "assistant_tool_permission_policy_check", + "value": "\"assistant_tool_permission\".\"read_policy\" IN ('allow', 'ask', 'block') AND \"assistant_tool_permission\".\"write_policy\" IN ('allow', 'ask', 'block')" + }, + "assistant_tool_permission_revision_check": { + "name": "assistant_tool_permission_revision_check", + "value": "\"assistant_tool_permission\".\"revision\" > 0" + } + }, + "isRLSEnabled": false + }, + "public.async_jobs": { + "name": "async_jobs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "run_at": { + "name": "run_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "attempts": { + "name": "attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_attempts": { + "name": "max_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 3 + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "output": { + "name": "output", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "async_jobs_status_started_at_idx": { + "name": "async_jobs_status_started_at_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "async_jobs_status_completed_at_idx": { + "name": "async_jobs_status_completed_at_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "completed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "async_jobs_schedule_pending_run_at_idx": { + "name": "async_jobs_schedule_pending_run_at_idx", + "columns": [ + { + "expression": "run_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"async_jobs\".\"type\" = 'schedule-execution' AND \"async_jobs\".\"status\" = 'pending'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "async_jobs_schedule_processing_started_at_idx": { + "name": "async_jobs_schedule_processing_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"async_jobs\".\"type\" = 'schedule-execution' AND \"async_jobs\".\"status\" = 'processing'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "async_jobs_schedule_unreconciled_terminal_idx": { + "name": "async_jobs_schedule_unreconciled_terminal_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"async_jobs\".\"type\" = 'schedule-execution' AND \"async_jobs\".\"status\" IN ('completed', 'failed', 'cancelled') AND COALESCE(\"async_jobs\".\"metadata\" ->> 'scheduleReconciled', 'false') <> 'true'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.audit_log": { + "name": "audit_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "actor_id": { + "name": "actor_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "action": { + "name": "action", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_type": { + "name": "resource_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "actor_name": { + "name": "actor_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "actor_email": { + "name": "actor_email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "resource_name": { + "name": "resource_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "ip_address": { + "name": "ip_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "surface": { + "name": "surface", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "audit_log_workspace_created_idx": { + "name": "audit_log_workspace_created_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_log_workspace_created_at_id_idx": { + "name": "audit_log_workspace_created_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"created_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_log_actor_created_idx": { + "name": "audit_log_actor_created_idx", + "columns": [ + { + "expression": "actor_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_log_org_level_created_at_id_idx": { + "name": "audit_log_org_level_created_at_id_idx", + "columns": [ + { + "expression": "(\"metadata\"->>'organizationId')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"created_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"audit_log\".\"workspace_id\" IS NULL AND (\"audit_log\".\"metadata\"->>'organizationId') IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "audit_log_resource_idx": { + "name": "audit_log_resource_idx", + "columns": [ + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "audit_log_action_idx": { + "name": "audit_log_action_idx", + "columns": [ + { + "expression": "action", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "audit_log_workspace_id_workspace_id_fk": { + "name": "audit_log_workspace_id_workspace_id_fk", + "tableFrom": "audit_log", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "audit_log_actor_id_user_id_fk": { + "name": "audit_log_actor_id_user_id_fk", + "tableFrom": "audit_log", + "tableTo": "user", + "columnsFrom": ["actor_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aws_marketplace_license": { + "name": "aws_marketplace_license", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "license_arn": { + "name": "license_arn", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "product_code": { + "name": "product_code", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "customer_aws_account_id": { + "name": "customer_aws_account_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "agreement_id": { + "name": "agreement_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "agreement_seen_at": { + "name": "agreement_seen_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "renewed_agreement_id": { + "name": "renewed_agreement_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "aws_marketplace_license_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "dimension": { + "name": "dimension", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "quantity": { + "name": "quantity", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_verified_at": { + "name": "last_verified_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "last_verification_attempt_at": { + "name": "last_verification_attempt_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "license_event_received_at": { + "name": "license_event_received_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "claim_token_hash": { + "name": "claim_token_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "claim_expires_at": { + "name": "claim_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "linked_by_user_id": { + "name": "linked_by_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_linked_at": { + "name": "organization_linked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "ended_at": { + "name": "ended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "contact_email": { + "name": "contact_email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "company_name": { + "name": "company_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "aws_marketplace_license_arn_unique": { + "name": "aws_marketplace_license_arn_unique", + "columns": [ + { + "expression": "license_arn", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_claim_token_hash_unique": { + "name": "aws_marketplace_license_claim_token_hash_unique", + "columns": [ + { + "expression": "claim_token_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_agreement_id_idx": { + "name": "aws_marketplace_license_agreement_id_idx", + "columns": [ + { + "expression": "agreement_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_renewed_agreement_id_idx": { + "name": "aws_marketplace_license_renewed_agreement_id_idx", + "columns": [ + { + "expression": "renewed_agreement_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_account_product_idx": { + "name": "aws_marketplace_license_account_product_idx", + "columns": [ + { + "expression": "customer_aws_account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "product_code", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_last_attempt_idx": { + "name": "aws_marketplace_license_last_attempt_idx", + "columns": [ + { + "expression": "last_verification_attempt_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_organization_id_idx": { + "name": "aws_marketplace_license_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_license_linked_by_user_id_idx": { + "name": "aws_marketplace_license_linked_by_user_id_idx", + "columns": [ + { + "expression": "linked_by_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "aws_marketplace_license_organization_id_organization_id_fk": { + "name": "aws_marketplace_license_organization_id_organization_id_fk", + "tableFrom": "aws_marketplace_license", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "aws_marketplace_license_linked_by_user_id_user_id_fk": { + "name": "aws_marketplace_license_linked_by_user_id_user_id_fk", + "tableFrom": "aws_marketplace_license", + "tableTo": "user", + "columnsFrom": ["linked_by_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aws_marketplace_usage_report": { + "name": "aws_marketplace_usage_report", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "license_id": { + "name": "license_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "dimension": { + "name": "dimension", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "hour_start": { + "name": "hour_start", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "quantity": { + "name": "quantity", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "aws_marketplace_usage_report_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "sent_at": { + "name": "sent_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "metering_record_id": { + "name": "metering_record_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reported_at": { + "name": "reported_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "aws_marketplace_usage_report_license_dimension_hour_unique": { + "name": "aws_marketplace_usage_report_license_dimension_hour_unique", + "columns": [ + { + "expression": "license_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "dimension", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "hour_start", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_usage_report_status_hour_idx": { + "name": "aws_marketplace_usage_report_status_hour_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "hour_start", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "aws_marketplace_usage_report_organization_id_idx": { + "name": "aws_marketplace_usage_report_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "aws_marketplace_usage_report_organization_id_organization_id_fk": { + "name": "aws_marketplace_usage_report_organization_id_organization_id_fk", + "tableFrom": "aws_marketplace_usage_report", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "aws_marketplace_usage_report_license_id_aws_marketplace_license_id_fk": { + "name": "aws_marketplace_usage_report_license_id_aws_marketplace_license_id_fk", + "tableFrom": "aws_marketplace_usage_report", + "tableTo": "aws_marketplace_license", + "columnsFrom": ["license_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.aws_marketplace_usage_tally": { + "name": "aws_marketplace_usage_tally", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "dimension": { + "name": "dimension", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "period_start": { + "name": "period_start", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "counted_from": { + "name": "counted_from", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "cost_usd": { + "name": "cost_usd", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "units": { + "name": "units", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "aws_marketplace_usage_tally_organization_id_organization_id_fk": { + "name": "aws_marketplace_usage_tally_organization_id_organization_id_fk", + "tableFrom": "aws_marketplace_usage_tally", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "aws_marketplace_usage_tally_organization_id_dimension_period_start_pk": { + "name": "aws_marketplace_usage_tally_organization_id_dimension_period_start_pk", + "columns": ["organization_id", "dimension", "period_start"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.background_work_status": { + "name": "background_work_status", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "kind": { + "name": "kind", + "type": "background_work_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "background_work_status_value", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "message": { + "name": "message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "background_work_status_workspace_status_idx": { + "name": "background_work_status_workspace_status_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "background_work_status_workflow_status_idx": { + "name": "background_work_status_workflow_status_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "background_work_status_meta_child_ws_idx": { + "name": "background_work_status_meta_child_ws_idx", + "columns": [ + { + "expression": "(\"metadata\" ->> 'childWorkspaceId')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "background_work_status_meta_other_ws_idx": { + "name": "background_work_status_meta_other_ws_idx", + "columns": [ + { + "expression": "(\"metadata\" ->> 'otherWorkspaceId')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "background_work_status_workspace_id_workspace_id_fk": { + "name": "background_work_status_workspace_id_workspace_id_fk", + "tableFrom": "background_work_status", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "background_work_status_workflow_id_workflow_id_fk": { + "name": "background_work_status_workflow_id_workflow_id_fk", + "tableFrom": "background_work_status", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.changelog_change": { + "name": "changelog_change", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "release_id": { + "name": "release_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "position": { + "name": "position", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "text": { + "name": "text", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "changelog_change_release_position_unique": { + "name": "changelog_change_release_position_unique", + "columns": [ + { + "expression": "release_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "position", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "changelog_change_release_id_changelog_release_id_fk": { + "name": "changelog_change_release_id_changelog_release_id_fk", + "tableFrom": "changelog_change", + "tableTo": "changelog_release", + "columnsFrom": ["release_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "changelog_change_workflow_id_workflow_id_fk": { + "name": "changelog_change_workflow_id_workflow_id_fk", + "tableFrom": "changelog_change", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "changelog_change_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "changelog_change_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "changelog_change", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "changelog_change_chat_id_copilot_chats_id_fk": { + "name": "changelog_change_chat_id_copilot_chats_id_fk", + "tableFrom": "changelog_change", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.changelog_release": { + "name": "changelog_release", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version_major": { + "name": "version_major", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "version_minor": { + "name": "version_minor", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "version_patch": { + "name": "version_patch", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "bump_reason": { + "name": "bump_reason", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "body_file_id": { + "name": "body_file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "published_at": { + "name": "published_at", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "changelog_release_workspace_version_unique": { + "name": "changelog_release_workspace_version_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version_major", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version_minor", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version_patch", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "changelog_release_body_file_unique": { + "name": "changelog_release_body_file_unique", + "columns": [ + { + "expression": "body_file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "changelog_release_workspace_published_idx": { + "name": "changelog_release_workspace_published_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "published_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "changelog_release_workspace_id_workspace_id_fk": { + "name": "changelog_release_workspace_id_workspace_id_fk", + "tableFrom": "changelog_release", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "changelog_release_body_file_id_workspace_files_id_fk": { + "name": "changelog_release_body_file_id_workspace_files_id_fk", + "tableFrom": "changelog_release", + "tableTo": "workspace_files", + "columnsFrom": ["body_file_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "changelog_release_created_by_user_id_fk": { + "name": "changelog_release_created_by_user_id_fk", + "tableFrom": "changelog_release", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "changelog_release_updated_by_user_id_fk": { + "name": "changelog_release_updated_by_user_id_fk", + "tableFrom": "changelog_release", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "changelog_release_version_check": { + "name": "changelog_release_version_check", + "value": "\"changelog_release\".\"version_major\" >= 0 AND \"changelog_release\".\"version_minor\" >= 0 AND \"changelog_release\".\"version_patch\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.chat": { + "name": "chat", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "identifier": { + "name": "identifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "customizations": { + "name": "customizations", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'public'" + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "allowed_emails": { + "name": "allowed_emails", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'[]'" + }, + "output_configs": { + "name": "output_configs", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'[]'" + }, + "include_thinking": { + "name": "include_thinking", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "include_tool_calls": { + "name": "include_tool_calls", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "identifier_idx": { + "name": "identifier_idx", + "columns": [ + { + "expression": "identifier", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"chat\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "chat_archived_at_partial_idx": { + "name": "chat_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"chat\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_chat_on_workflow_id_archived_at": { + "name": "idx_chat_on_workflow_id_archived_at", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "chat_user_id_idx": { + "name": "chat_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "chat_workflow_id_workflow_id_fk": { + "name": "chat_workflow_id_workflow_id_fk", + "tableFrom": "chat", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "chat_user_id_user_id_fk": { + "name": "chat_user_id_user_id_fk", + "tableFrom": "chat", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.client_credential_token": { + "name": "client_credential_token", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "encrypted_value": { + "name": "encrypted_value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "access_token_digest": { + "name": "access_token_digest", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "client_credential_token_expires_at_idx": { + "name": "client_credential_token_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"client_credential_token\".\"access_token_digest\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "client_credential_token_access_token_digest_idx": { + "name": "client_credential_token_access_token_digest_idx", + "columns": [ + { + "expression": "access_token_digest", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"client_credential_token\".\"access_token_digest\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_async_tool_calls": { + "name": "copilot_async_tool_calls", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "run_id": { + "name": "run_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "checkpoint_id": { + "name": "checkpoint_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "tool_call_id": { + "name": "tool_call_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tool_name": { + "name": "tool_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "args": { + "name": "args", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "executable_name": { + "name": "executable_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "target_workspace_id": { + "name": "target_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "approved_args": { + "name": "approved_args", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "assistant_action": { + "name": "assistant_action", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "execution_retryable": { + "name": "execution_retryable", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "status": { + "name": "status", + "type": "copilot_async_tool_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "result": { + "name": "result", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "permission_decision": { + "name": "permission_decision", + "type": "copilot_tool_permission_decision", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "permission_decided_at": { + "name": "permission_decided_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "permission_requested_at": { + "name": "permission_requested_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "pickup_deadline_at": { + "name": "pickup_deadline_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "persist_seq": { + "name": "persist_seq", + "type": "bigint", + "primaryKey": false, + "notNull": false, + "default": "nextval('copilot_async_tool_calls_persist_seq')" + }, + "claimed_at": { + "name": "claimed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "claimed_by": { + "name": "claimed_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "browser_download_started_at": { + "name": "browser_download_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "execution_started_at": { + "name": "execution_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "execution_settled_at": { + "name": "execution_settled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "execution_owner_token": { + "name": "execution_owner_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "execution_lease_expires_at": { + "name": "execution_lease_expires_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "execution_revoked_at": { + "name": "execution_revoked_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "execution_attempts": { + "name": "execution_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "execution_deadline_at": { + "name": "execution_deadline_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "client_workflow_execution_id": { + "name": "client_workflow_execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sandbox_processes": { + "name": "sandbox_processes", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_async_tool_calls_checkpoint_id_idx": { + "name": "copilot_async_tool_calls_checkpoint_id_idx", + "columns": [ + { + "expression": "checkpoint_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_async_tool_calls_status_idx": { + "name": "copilot_async_tool_calls_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_async_tool_calls_run_status_idx": { + "name": "copilot_async_tool_calls_run_status_idx", + "columns": [ + { + "expression": "run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_async_tool_calls_tool_call_id_unique": { + "name": "copilot_async_tool_calls_tool_call_id_unique", + "columns": [ + { + "expression": "tool_call_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_async_tool_calls_run_id_copilot_runs_id_fk": { + "name": "copilot_async_tool_calls_run_id_copilot_runs_id_fk", + "tableFrom": "copilot_async_tool_calls", + "tableTo": "copilot_runs", + "columnsFrom": ["run_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_async_tool_calls_checkpoint_id_copilot_run_checkpoints_id_fk": { + "name": "copilot_async_tool_calls_checkpoint_id_copilot_run_checkpoints_id_fk", + "tableFrom": "copilot_async_tool_calls", + "tableTo": "copilot_run_checkpoints", + "columnsFrom": ["checkpoint_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_chats": { + "name": "copilot_chats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "memory_space_id": { + "name": "memory_space_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "chat_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'copilot'" + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'claude-3-7-sonnet-latest'" + }, + "conversation_id": { + "name": "conversation_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "external_conversation_key": { + "name": "external_conversation_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "external_conversation_metadata": { + "name": "external_conversation_metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "preview_yaml": { + "name": "preview_yaml", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "resources": { + "name": "resources", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "auto_allowed_tools": { + "name": "auto_allowed_tools", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "pinned": { + "name": "pinned", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_chats_organization_id_idx": { + "name": "copilot_chats_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_external_conversation_unique": { + "name": "copilot_chats_external_conversation_unique", + "columns": [ + { + "expression": "external_conversation_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"copilot_chats\".\"external_conversation_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_user_org_created_idx": { + "name": "copilot_chats_user_org_created_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_workflow_id_idx": { + "name": "copilot_chats_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_user_workflow_idx": { + "name": "copilot_chats_user_workflow_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_user_workspace_idx": { + "name": "copilot_chats_user_workspace_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_created_at_idx": { + "name": "copilot_chats_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_updated_at_idx": { + "name": "copilot_chats_updated_at_idx", + "columns": [ + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_workspace_created_at_id_idx": { + "name": "copilot_chats_workspace_created_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"created_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_chats_user_workspace_deleted_partial_idx": { + "name": "copilot_chats_user_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_chats\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_chats_user_id_user_id_fk": { + "name": "copilot_chats_user_id_user_id_fk", + "tableFrom": "copilot_chats", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_chats_workflow_id_workflow_id_fk": { + "name": "copilot_chats_workflow_id_workflow_id_fk", + "tableFrom": "copilot_chats", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_chats_workspace_id_workspace_id_fk": { + "name": "copilot_chats_workspace_id_workspace_id_fk", + "tableFrom": "copilot_chats", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_chats_organization_id_organization_id_fk": { + "name": "copilot_chats_organization_id_organization_id_fk", + "tableFrom": "copilot_chats", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "copilot_chats_owner_check": { + "name": "copilot_chats_owner_check", + "value": "num_nonnulls(\"copilot_chats\".\"workspace_id\", \"copilot_chats\".\"organization_id\") <= 1" + }, + "copilot_chats_organization_workflow_check": { + "name": "copilot_chats_organization_workflow_check", + "value": "\"copilot_chats\".\"organization_id\" IS NULL OR \"copilot_chats\".\"workflow_id\" IS NULL" + } + }, + "isRLSEnabled": false + }, + "public.copilot_feedback": { + "name": "copilot_feedback", + "schema": "", + "columns": { + "feedback_id": { + "name": "feedback_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_query": { + "name": "user_query", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "agent_response": { + "name": "agent_response", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "is_positive": { + "name": "is_positive", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "feedback": { + "name": "feedback", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_yaml": { + "name": "workflow_yaml", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_feedback_user_id_idx": { + "name": "copilot_feedback_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_chat_id_idx": { + "name": "copilot_feedback_chat_id_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_user_chat_idx": { + "name": "copilot_feedback_user_chat_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_is_positive_idx": { + "name": "copilot_feedback_is_positive_idx", + "columns": [ + { + "expression": "is_positive", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_feedback_created_at_idx": { + "name": "copilot_feedback_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_feedback_user_id_user_id_fk": { + "name": "copilot_feedback_user_id_user_id_fk", + "tableFrom": "copilot_feedback", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_feedback_chat_id_copilot_chats_id_fk": { + "name": "copilot_feedback_chat_id_copilot_chats_id_fk", + "tableFrom": "copilot_feedback", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_messages": { + "name": "copilot_messages", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "message_id": { + "name": "message_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "display_content": { + "name": "display_content", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "stream_id": { + "name": "stream_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "seq": { + "name": "seq", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_messages_chat_message_unique": { + "name": "copilot_messages_chat_message_unique", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_messages_chat_created_at_idx": { + "name": "copilot_messages_chat_created_at_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_messages\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_messages_chat_seq_idx": { + "name": "copilot_messages_chat_seq_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "seq", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_messages\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_messages_chat_stream_idx": { + "name": "copilot_messages_chat_stream_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "stream_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_messages\".\"stream_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_messages_user_created_at_idx": { + "name": "copilot_messages_user_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_messages\".\"role\" = 'user' AND \"copilot_messages\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_messages_chat_id_copilot_chats_id_fk": { + "name": "copilot_messages_chat_id_copilot_chats_id_fk", + "tableFrom": "copilot_messages", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_organization_request_stops": { + "name": "copilot_organization_request_stops", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stream_id": { + "name": "stream_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stopped_at": { + "name": "stopped_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "copilot_organization_request_stops_user_id_user_id_fk": { + "name": "copilot_organization_request_stops_user_id_user_id_fk", + "tableFrom": "copilot_organization_request_stops", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_organization_request_stops_organization_id_organization_id_fk": { + "name": "copilot_organization_request_stops_organization_id_organization_id_fk", + "tableFrom": "copilot_organization_request_stops", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "copilot_organization_request_stops_user_id_organization_id_stream_id_pk": { + "name": "copilot_organization_request_stops_user_id_organization_id_stream_id_pk", + "columns": ["user_id", "organization_id", "stream_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_request_stops": { + "name": "copilot_request_stops", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stream_id": { + "name": "stream_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stopped_at": { + "name": "stopped_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "copilot_request_stops_user_id_user_id_fk": { + "name": "copilot_request_stops_user_id_user_id_fk", + "tableFrom": "copilot_request_stops", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_request_stops_workspace_id_workspace_id_fk": { + "name": "copilot_request_stops_workspace_id_workspace_id_fk", + "tableFrom": "copilot_request_stops", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "copilot_request_stops_user_id_workspace_id_stream_id_pk": { + "name": "copilot_request_stops_user_id_workspace_id_stream_id_pk", + "columns": ["user_id", "workspace_id", "stream_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_run_checkpoints": { + "name": "copilot_run_checkpoints", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "run_id": { + "name": "run_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "pending_tool_call_id": { + "name": "pending_tool_call_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "conversation_snapshot": { + "name": "conversation_snapshot", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "agent_state": { + "name": "agent_state", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "provider_request": { + "name": "provider_request", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "copilot_run_checkpoints_pending_tool_call_id_idx": { + "name": "copilot_run_checkpoints_pending_tool_call_id_idx", + "columns": [ + { + "expression": "pending_tool_call_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_run_checkpoints_run_pending_tool_unique": { + "name": "copilot_run_checkpoints_run_pending_tool_unique", + "columns": [ + { + "expression": "run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "pending_tool_call_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_run_checkpoints_run_id_copilot_runs_id_fk": { + "name": "copilot_run_checkpoints_run_id_copilot_runs_id_fk", + "tableFrom": "copilot_run_checkpoints", + "tableTo": "copilot_runs", + "columnsFrom": ["run_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_runs": { + "name": "copilot_runs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tool_execution_version": { + "name": "tool_execution_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "tool_admission_closed_at": { + "name": "tool_admission_closed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "parent_run_id": { + "name": "parent_run_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stream_id": { + "name": "stream_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "agent": { + "name": "agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "model": { + "name": "model", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider": { + "name": "provider", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "copilot_run_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "request_context": { + "name": "request_context", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "desktop_device_id": { + "name": "desktop_device_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "copilot_runs_parent_run_id_idx": { + "name": "copilot_runs_parent_run_id_idx", + "columns": [ + { + "expression": "parent_run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_chat_started_at_idx": { + "name": "copilot_runs_chat_started_at_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_user_id_idx": { + "name": "copilot_runs_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_workflow_id_idx": { + "name": "copilot_runs_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_status_idx": { + "name": "copilot_runs_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_chat_execution_idx": { + "name": "copilot_runs_chat_execution_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_execution_started_at_idx": { + "name": "copilot_runs_execution_started_at_idx", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_workspace_completed_at_id_idx": { + "name": "copilot_runs_workspace_completed_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"completed_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_stream_id_unique": { + "name": "copilot_runs_stream_id_unique", + "columns": [ + { + "expression": "stream_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "copilot_runs_desktop_device_started_at_idx": { + "name": "copilot_runs_desktop_device_started_at_idx", + "columns": [ + { + "expression": "desktop_device_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"copilot_runs\".\"desktop_device_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "copilot_runs_chat_id_copilot_chats_id_fk": { + "name": "copilot_runs_chat_id_copilot_chats_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_user_id_user_id_fk": { + "name": "copilot_runs_user_id_user_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_workflow_id_workflow_id_fk": { + "name": "copilot_runs_workflow_id_workflow_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_workspace_id_workspace_id_fk": { + "name": "copilot_runs_workspace_id_workspace_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_organization_id_organization_id_fk": { + "name": "copilot_runs_organization_id_organization_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "copilot_runs_desktop_device_id_desktop_devices_id_fk": { + "name": "copilot_runs_desktop_device_id_desktop_devices_id_fk", + "tableFrom": "copilot_runs", + "tableTo": "desktop_devices", + "columnsFrom": ["desktop_device_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.copilot_service_usage": { + "name": "copilot_service_usage", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true + }, + "stream_id": { + "name": "stream_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "tool_call_id": { + "name": "tool_call_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "service": { + "name": "service", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "cost_usd": { + "name": "cost_usd", + "type": "numeric(12, 8)", + "primaryKey": false, + "notNull": false + }, + "worker_origin": { + "name": "worker_origin", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "next_attempt_at": { + "name": "next_attempt_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "attempts": { + "name": "attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "delivered_at": { + "name": "delivered_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "copilot_service_usage_pending_idx": { + "name": "copilot_service_usage_pending_idx", + "columns": [ + { + "expression": "next_attempt_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "delivered_at IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.credential": { + "name": "credential", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "slack_app_id": { + "name": "slack_app_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "credential_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "unredacted": { + "name": "unredacted", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "account_id": { + "name": "account_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "env_key": { + "name": "env_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "env_owner_user_id": { + "name": "env_owner_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_service_account_key": { + "name": "encrypted_service_account_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_personal_token": { + "name": "encrypted_personal_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "authorization_app_id": { + "name": "authorization_app_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_group_enrollment_id": { + "name": "credential_group_enrollment_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_group_option_id": { + "name": "credential_group_option_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mcp_server_id": { + "name": "mcp_server_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mcp_oauth_config_version": { + "name": "mcp_oauth_config_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "managed_oauth_scope_version": { + "name": "managed_oauth_scope_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "provider_subject_id": { + "name": "provider_subject_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_tenant_id": { + "name": "provider_tenant_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "managed_oauth_status": { + "name": "managed_oauth_status", + "type": "managed_oauth_credential_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "granted_scopes": { + "name": "granted_scopes", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "provider_metadata": { + "name": "provider_metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "encrypted_oauth_token_set": { + "name": "encrypted_oauth_token_set", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "mcp_tools": { + "name": "mcp_tools", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "mcp_tools_refreshed_at": { + "name": "mcp_tools_refreshed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "granted_at": { + "name": "granted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "revoked_at": { + "name": "revoked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "access_token_expires_at": { + "name": "access_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "refresh_token_expires_at": { + "name": "refresh_token_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_refreshed_at": { + "name": "last_refreshed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "credential_organization_id_idx": { + "name": "credential_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_organization_account_unique": { + "name": "credential_organization_account_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential\".\"account_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_org_personal_token_unique": { + "name": "credential_org_personal_token_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_subject_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential\".\"type\" = 'personal_token'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_workspace_id_idx": { + "name": "credential_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_type_idx": { + "name": "credential_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_provider_id_idx": { + "name": "credential_provider_id_idx", + "columns": [ + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_account_id_idx": { + "name": "credential_account_id_idx", + "columns": [ + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_env_owner_user_id_idx": { + "name": "credential_env_owner_user_id_idx", + "columns": [ + { + "expression": "env_owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_idx": { + "name": "credential_group_enrollment_idx", + "columns": [ + { + "expression": "credential_group_enrollment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_mcp_server_idx": { + "name": "credential_mcp_server_idx", + "columns": [ + { + "expression": "mcp_server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_option_identity_unique": { + "name": "credential_group_option_identity_unique", + "columns": [ + { + "expression": "credential_group_enrollment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "credential_group_option_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_subject_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"provider_tenant_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential\".\"type\" = 'managed_oauth'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_managed_mcp_enrollment_server_identity_unique": { + "name": "credential_managed_mcp_enrollment_server_identity_unique", + "columns": [ + { + "expression": "credential_group_enrollment_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "mcp_server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"provider_subject_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"provider_tenant_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential\".\"type\" = 'managed_mcp'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_workspace_account_unique": { + "name": "credential_workspace_account_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "account_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "account_id IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_workspace_env_unique": { + "name": "credential_workspace_env_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "env_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "type = 'env_workspace'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_workspace_personal_env_unique": { + "name": "credential_workspace_personal_env_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "env_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "env_owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "type = 'env_personal'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_personal_token_identity_unique": { + "name": "credential_personal_token_identity_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_subject_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "type = 'personal_token'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "credential_workspace_id_workspace_id_fk": { + "name": "credential_workspace_id_workspace_id_fk", + "tableFrom": "credential", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_organization_id_organization_id_fk": { + "name": "credential_organization_id_organization_id_fk", + "tableFrom": "credential", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_slack_app_id_slack_app_id_fk": { + "name": "credential_slack_app_id_slack_app_id_fk", + "tableFrom": "credential", + "tableTo": "slack_app", + "columnsFrom": ["slack_app_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "credential_account_id_account_id_fk": { + "name": "credential_account_id_account_id_fk", + "tableFrom": "credential", + "tableTo": "account", + "columnsFrom": ["account_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_env_owner_user_id_user_id_fk": { + "name": "credential_env_owner_user_id_user_id_fk", + "tableFrom": "credential", + "tableTo": "user", + "columnsFrom": ["env_owner_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_credential_group_enrollment_id_credential_group_enrollment_id_fk": { + "name": "credential_credential_group_enrollment_id_credential_group_enrollment_id_fk", + "tableFrom": "credential", + "tableTo": "credential_group_enrollment", + "columnsFrom": ["credential_group_enrollment_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_mcp_server_id_mcp_servers_id_fk": { + "name": "credential_mcp_server_id_mcp_servers_id_fk", + "tableFrom": "credential", + "tableTo": "mcp_servers", + "columnsFrom": ["mcp_server_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_created_by_user_id_fk": { + "name": "credential_created_by_user_id_fk", + "tableFrom": "credential", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "credential_owner_check": { + "name": "credential_owner_check", + "value": "num_nonnulls(\"credential\".\"workspace_id\", \"credential\".\"organization_id\") = 1" + }, + "credential_organization_type_check": { + "name": "credential_organization_type_check", + "value": "\"credential\".\"organization_id\" IS NULL OR \"credential\".\"type\" IN ('oauth', 'managed_oauth', 'managed_mcp', 'service_account', 'personal_token')" + }, + "credential_personal_token_source_check": { + "name": "credential_personal_token_source_check", + "value": "(type::text <> 'personal_token') OR (\n created_by IS NOT NULL\n AND provider_id IS NOT NULL\n AND provider_id = 'gitlab'\n AND provider_subject_id IS NOT NULL\n AND provider_tenant_id IS NOT NULL\n AND encrypted_personal_token IS NOT NULL\n AND granted_scopes IS NOT NULL\n AND cardinality(granted_scopes) > 0\n AND account_id IS NULL\n AND env_key IS NULL\n AND env_owner_user_id IS NULL\n AND authorization_app_id IS NULL\n AND encrypted_oauth_token_set IS NULL\n AND encrypted_service_account_key IS NULL\n AND unredacted = false\n )" + }, + "credential_oauth_source_check": { + "name": "credential_oauth_source_check", + "value": "(type <> 'oauth') OR (account_id IS NOT NULL AND provider_id IS NOT NULL)" + }, + "credential_managed_oauth_source_check": { + "name": "credential_managed_oauth_source_check", + "value": "(type::text <> 'managed_oauth') OR (\n account_id IS NULL\n AND provider_id IS NOT NULL\n AND authorization_app_id IS NOT NULL\n AND provider_subject_id IS NOT NULL\n AND managed_oauth_status IS NOT NULL\n AND granted_scopes IS NOT NULL\n AND encrypted_oauth_token_set IS NOT NULL\n AND granted_at IS NOT NULL\n )" + }, + "credential_managed_oauth_group_binding_check": { + "name": "credential_managed_oauth_group_binding_check", + "value": "(type::text <> 'managed_oauth') OR (\n credential_group_enrollment_id IS NOT NULL\n AND credential_group_option_id IS NOT NULL\n AND managed_oauth_scope_version IS NOT NULL\n AND managed_oauth_scope_version > 0\n )" + }, + "credential_managed_mcp_source_check": { + "name": "credential_managed_mcp_source_check", + "value": "(type::text <> 'managed_mcp') OR (\n id LIKE 'mcp-cg-%'\n AND account_id IS NULL\n AND provider_id IS NULL\n AND authorization_app_id IS NULL\n AND credential_group_enrollment_id IS NOT NULL\n AND credential_group_option_id IS NULL\n AND mcp_server_id IS NOT NULL\n AND managed_oauth_status IS NOT NULL\n AND (managed_oauth_status <> 'active' OR (\n encrypted_oauth_token_set IS NOT NULL\n AND mcp_tools IS NOT NULL\n ))\n AND granted_at IS NOT NULL\n AND managed_oauth_scope_version IS NULL\n AND granted_scopes IS NULL\n AND provider_metadata IS NULL\n AND created_by IS NULL\n AND env_key IS NULL\n AND env_owner_user_id IS NULL\n AND encrypted_service_account_key IS NULL\n AND unredacted = false\n )" + }, + "credential_creator_source_check": { + "name": "credential_creator_source_check", + "value": "(type::text = 'managed_mcp') OR created_by IS NOT NULL" + }, + "credential_workspace_env_source_check": { + "name": "credential_workspace_env_source_check", + "value": "(type <> 'env_workspace') OR (env_key IS NOT NULL AND env_owner_user_id IS NULL)" + }, + "credential_personal_env_source_check": { + "name": "credential_personal_env_source_check", + "value": "(type <> 'env_personal') OR (env_key IS NOT NULL AND env_owner_user_id IS NOT NULL)" + } + }, + "isRLSEnabled": false + }, + "public.credential_group": { + "name": "credential_group", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "public_id": { + "name": "public_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "options": { + "name": "options", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "encrypted_provider_configuration": { + "name": "encrypted_provider_configuration", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "credential_group_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "credential_group_organization_unique": { + "name": "credential_group_organization_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_public_id_unique": { + "name": "credential_group_public_id_unique", + "columns": [ + { + "expression": "public_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_workspace_unique": { + "name": "credential_group_workspace_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "credential_group_workspace_id_workspace_id_fk": { + "name": "credential_group_workspace_id_workspace_id_fk", + "tableFrom": "credential_group", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_group_organization_id_organization_id_fk": { + "name": "credential_group_organization_id_organization_id_fk", + "tableFrom": "credential_group", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_group_created_by_user_id_fk": { + "name": "credential_group_created_by_user_id_fk", + "tableFrom": "credential_group", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "credential_group_owner_check": { + "name": "credential_group_owner_check", + "value": "num_nonnulls(\"credential_group\".\"workspace_id\", \"credential_group\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.credential_group_enrollment": { + "name": "credential_group_enrollment", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "credential_group_id": { + "name": "credential_group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "credential_group_enrollment_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'invited'" + }, + "invitation_token_hash": { + "name": "invitation_token_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "invitation_expires_at": { + "name": "invitation_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "invited_at": { + "name": "invited_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "sent_at": { + "name": "sent_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "revoked_at": { + "name": "revoked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_delivery_error": { + "name": "last_delivery_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "credential_group_enrollment_group_user_unique": { + "name": "credential_group_enrollment_group_user_unique", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"credential_group_enrollment\".\"user_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_user_id_idx": { + "name": "credential_group_enrollment_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_group_email_unique": { + "name": "credential_group_enrollment_group_email_unique", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_invitation_token_hash_unique": { + "name": "credential_group_enrollment_invitation_token_hash_unique", + "columns": [ + { + "expression": "invitation_token_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_group_status_idx": { + "name": "credential_group_enrollment_group_status_idx", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_group_enrollment_group_invited_at_id_idx": { + "name": "credential_group_enrollment_group_invited_at_id_idx", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "invited_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "credential_group_enrollment_credential_group_id_credential_group_id_fk": { + "name": "credential_group_enrollment_credential_group_id_credential_group_id_fk", + "tableFrom": "credential_group_enrollment", + "tableTo": "credential_group", + "columnsFrom": ["credential_group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_group_enrollment_user_id_user_id_fk": { + "name": "credential_group_enrollment_user_id_user_id_fk", + "tableFrom": "credential_group_enrollment", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_group_enrollment_created_by_user_id_fk": { + "name": "credential_group_enrollment_created_by_user_id_fk", + "tableFrom": "credential_group_enrollment", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "credential_group_enrollment_normalized_email_check": { + "name": "credential_group_enrollment_normalized_email_check", + "value": "\"credential_group_enrollment\".\"email\" = lower(btrim(\"credential_group_enrollment\".\"email\")) AND length(\"credential_group_enrollment\".\"email\") BETWEEN 3 AND 320" + }, + "credential_group_enrollment_invitation_token_hash_length_check": { + "name": "credential_group_enrollment_invitation_token_hash_length_check", + "value": "length(\"credential_group_enrollment\".\"invitation_token_hash\") = 64" + } + }, + "isRLSEnabled": false + }, + "public.credential_member": { + "name": "credential_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "credential_member_role", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'member'" + }, + "status": { + "name": "status", + "type": "credential_member_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "joined_at": { + "name": "joined_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "invited_by": { + "name": "invited_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "credential_member_user_id_idx": { + "name": "credential_member_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_member_role_idx": { + "name": "credential_member_role_idx", + "columns": [ + { + "expression": "role", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_member_status_idx": { + "name": "credential_member_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "credential_member_unique": { + "name": "credential_member_unique", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "credential_member_credential_id_credential_id_fk": { + "name": "credential_member_credential_id_credential_id_fk", + "tableFrom": "credential_member", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_member_user_id_user_id_fk": { + "name": "credential_member_user_id_user_id_fk", + "tableFrom": "credential_member", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "credential_member_invited_by_user_id_fk": { + "name": "credential_member_invited_by_user_id_fk", + "tableFrom": "credential_member", + "tableTo": "user", + "columnsFrom": ["invited_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_block": { + "name": "custom_block", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "icon_url": { + "name": "icon_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "inputs": { + "name": "inputs", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "outputs": { + "name": "outputs", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "trace_child_runs": { + "name": "trace_child_runs", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_block_workflow_id_idx": { + "name": "custom_block_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "custom_block_organization_type_unique": { + "name": "custom_block_organization_type_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_block_organization_id_organization_id_fk": { + "name": "custom_block_organization_id_organization_id_fk", + "tableFrom": "custom_block", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "custom_block_workflow_id_workflow_id_fk": { + "name": "custom_block_workflow_id_workflow_id_fk", + "tableFrom": "custom_block", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "custom_block_created_by_user_id_fk": { + "name": "custom_block_created_by_user_id_fk", + "tableFrom": "custom_block", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.custom_tools": { + "name": "custom_tools", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "schema": { + "name": "schema", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "code": { + "name": "code", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "custom_tools_workspace_title_unique": { + "name": "custom_tools_workspace_title_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "title", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "custom_tools_workspace_id_workspace_id_fk": { + "name": "custom_tools_workspace_id_workspace_id_fk", + "tableFrom": "custom_tools", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "custom_tools_user_id_user_id_fk": { + "name": "custom_tools_user_id_user_id_fk", + "tableFrom": "custom_tools", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.dashboard": { + "name": "dashboard", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "dashboard_workspace_id_unique": { + "name": "dashboard_workspace_id_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "dashboard_workspace_id_workspace_id_fk": { + "name": "dashboard_workspace_id_workspace_id_fk", + "tableFrom": "dashboard", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "dashboard_created_by_user_id_fk": { + "name": "dashboard_created_by_user_id_fk", + "tableFrom": "dashboard", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "dashboard_updated_by_user_id_fk": { + "name": "dashboard_updated_by_user_id_fk", + "tableFrom": "dashboard", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.data_drain_runs": { + "name": "data_drain_runs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "drain_id": { + "name": "drain_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "data_drain_run_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "trigger": { + "name": "trigger", + "type": "data_drain_run_trigger", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "finished_at": { + "name": "finished_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "rows_exported": { + "name": "rows_exported", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "bytes_written": { + "name": "bytes_written", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "cursor_before": { + "name": "cursor_before", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cursor_after": { + "name": "cursor_after", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "locators": { + "name": "locators", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + } + }, + "indexes": { + "data_drain_runs_drain_started_idx": { + "name": "data_drain_runs_drain_started_idx", + "columns": [ + { + "expression": "drain_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "data_drain_runs_drain_id_data_drains_id_fk": { + "name": "data_drain_runs_drain_id_data_drains_id_fk", + "tableFrom": "data_drain_runs", + "tableTo": "data_drains", + "columnsFrom": ["drain_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.data_drains": { + "name": "data_drains", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "data_drain_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "destination_type": { + "name": "destination_type", + "type": "data_drain_destination", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "destination_config": { + "name": "destination_config", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "destination_credentials": { + "name": "destination_credentials", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "schedule_cadence": { + "name": "schedule_cadence", + "type": "data_drain_cadence", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "cursor": { + "name": "cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_run_at": { + "name": "last_run_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_success_at": { + "name": "last_success_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "data_drains_due_idx": { + "name": "data_drains_due_idx", + "columns": [ + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_run_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "data_drains_org_name_unique": { + "name": "data_drains_org_name_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "data_drains_organization_id_organization_id_fk": { + "name": "data_drains_organization_id_organization_id_fk", + "tableFrom": "data_drains", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "data_drains_created_by_user_id_fk": { + "name": "data_drains_created_by_user_id_fk", + "tableFrom": "data_drains", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.deleted_account_identity": { + "name": "deleted_account_identity", + "schema": "", + "columns": { + "identity_hash": { + "name": "identity_hash", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "deleted_account_identity_expires_at_idx": { + "name": "deleted_account_identity_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.desktop_devices": { + "name": "desktop_devices", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "session_id": { + "name": "session_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "app_version": { + "name": "app_version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "platform": { + "name": "platform", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "capabilities": { + "name": "capabilities", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "revoked_at": { + "name": "revoked_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "desktop_devices_user_id_idx": { + "name": "desktop_devices_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "desktop_devices_session_id_idx": { + "name": "desktop_devices_session_id_idx", + "columns": [ + { + "expression": "session_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "desktop_devices_user_id_user_id_fk": { + "name": "desktop_devices_user_id_user_id_fk", + "tableFrom": "desktop_devices", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "desktop_devices_session_id_session_id_fk": { + "name": "desktop_devices_session_id_session_id_fk", + "tableFrom": "desktop_devices", + "tableTo": "session", + "columnsFrom": ["session_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.docs_embeddings": { + "name": "docs_embeddings", + "schema": "", + "columns": { + "chunk_id": { + "name": "chunk_id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "chunk_text": { + "name": "chunk_text", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_document": { + "name": "source_document", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_link": { + "name": "source_link", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header_text": { + "name": "header_text", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "header_level": { + "name": "header_level", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "embedding": { + "name": "embedding", + "type": "vector(1536)", + "primaryKey": false, + "notNull": true + }, + "embedding_model": { + "name": "embedding_model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text-embedding-3-small'" + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "chunk_text_tsv": { + "name": "chunk_text_tsv", + "type": "tsvector", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "to_tsvector('english', \"docs_embeddings\".\"chunk_text\")", + "type": "stored" + } + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "docs_emb_source_document_idx": { + "name": "docs_emb_source_document_idx", + "columns": [ + { + "expression": "source_document", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_header_level_idx": { + "name": "docs_emb_header_level_idx", + "columns": [ + { + "expression": "header_level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_source_header_idx": { + "name": "docs_emb_source_header_idx", + "columns": [ + { + "expression": "source_document", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "header_level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_model_idx": { + "name": "docs_emb_model_idx", + "columns": [ + { + "expression": "embedding_model", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_emb_created_at_idx": { + "name": "docs_emb_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "docs_embedding_vector_hnsw_idx": { + "name": "docs_embedding_vector_hnsw_idx", + "columns": [ + { + "expression": "embedding", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "vector_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "docs_emb_metadata_gin_idx": { + "name": "docs_emb_metadata_gin_idx", + "columns": [ + { + "expression": "metadata", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + }, + "docs_emb_chunk_text_fts_idx": { + "name": "docs_emb_chunk_text_fts_idx", + "columns": [ + { + "expression": "chunk_text_tsv", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "docs_embedding_not_null_check": { + "name": "docs_embedding_not_null_check", + "value": "\"embedding\" IS NOT NULL" + }, + "docs_header_level_check": { + "name": "docs_header_level_check", + "value": "\"header_level\" >= 1 AND \"header_level\" <= 6" + } + }, + "isRLSEnabled": false + }, + "public.document": { + "name": "document", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "filename": { + "name": "filename", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "file_url": { + "name": "file_url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "storage_key": { + "name": "storage_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "file_size": { + "name": "file_size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "mime_type": { + "name": "mime_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chunk_count": { + "name": "chunk_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "character_count": { + "name": "character_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "processing_status": { + "name": "processing_status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "processing_attempts": { + "name": "processing_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "processing_queued_at": { + "name": "processing_queued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "processing_queue_token": { + "name": "processing_queue_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "processing_started_at": { + "name": "processing_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "processing_deferred_until": { + "name": "processing_deferred_until", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "processing_completed_at": { + "name": "processing_completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "processing_error": { + "name": "processing_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "processing_recovery_after": { + "name": "processing_recovery_after", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "user_excluded": { + "name": "user_excluded", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "tag1": { + "name": "tag1", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag2": { + "name": "tag2", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag3": { + "name": "tag3", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag4": { + "name": "tag4", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag5": { + "name": "tag5", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag6": { + "name": "tag6", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag7": { + "name": "tag7", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "number1": { + "name": "number1", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number2": { + "name": "number2", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number3": { + "name": "number3", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number4": { + "name": "number4", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number5": { + "name": "number5", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "date1": { + "name": "date1", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "date2": { + "name": "date2", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "boolean1": { + "name": "boolean1", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "boolean2": { + "name": "boolean2", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "boolean3": { + "name": "boolean3", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_url": { + "name": "source_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "acl": { + "name": "acl", + "type": "text[]", + "primaryKey": false, + "notNull": true, + "default": "'{ws}'::text[]" + }, + "acl_requirements": { + "name": "acl_requirements", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "acl_verified_at": { + "name": "acl_verified_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "source_modified_at": { + "name": "source_modified_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "source_seen_at": { + "name": "source_seen_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "doc_uploaded_by_idx": { + "name": "doc_uploaded_by_idx", + "columns": [ + { + "expression": "uploaded_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"uploaded_by\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_kb_source_modified_idx": { + "name": "doc_kb_source_modified_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_modified_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"deleted_at\" IS NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_acl_gin_idx": { + "name": "doc_acl_gin_idx", + "columns": [ + { + "expression": "acl", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "array_ops" + } + ], + "isUnique": false, + "where": "\"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "gin", + "with": {} + }, + "doc_filename_idx": { + "name": "doc_filename_idx", + "columns": [ + { + "expression": "filename", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_processing_status_idx": { + "name": "doc_processing_status_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "processing_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_processing_recovery_idx": { + "name": "doc_connector_processing_recovery_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "uploaded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"processing_status\" IN ('pending', 'processing', 'failed') AND \"document\".\"connector_id\" IS NOT NULL AND \"document\".\"content_hash\" IS NOT NULL AND \"document\".\"storage_key\" IS NOT NULL AND \"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL AND \"document\".\"deleted_at\" IS NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_connector_processing_status_idx": { + "name": "doc_connector_processing_status_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "processing_status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"processing_status\" IN ('pending', 'processing', 'failed') AND \"document\".\"connector_id\" IS NOT NULL AND \"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL AND \"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_external_id_idx": { + "name": "doc_connector_external_id_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_source_lookup_idx": { + "name": "doc_connector_source_lookup_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_reconciliation_v2_idx": { + "name": "doc_connector_reconciliation_v2_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_active_kb_token_count_idx": { + "name": "doc_active_kb_token_count_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "token_count", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL AND \"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_storage_key_idx": { + "name": "doc_storage_key_idx", + "columns": [ + { + "expression": "storage_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"storage_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_archived_at_partial_idx": { + "name": "doc_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_deleted_at_partial_idx": { + "name": "doc_deleted_at_partial_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_tombstone_idx": { + "name": "doc_connector_tombstone_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"archived_at\" IS NULL AND (\"document\".\"deleted_at\" IS NOT NULL OR \"document\".\"content_hash\" IS NULL)", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_connector_live_idx": { + "name": "doc_connector_live_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"document\".\"user_excluded\" = false AND \"document\".\"archived_at\" IS NULL AND \"document\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag1_lower_idx": { + "name": "doc_kb_tag1_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag1\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag2_lower_idx": { + "name": "doc_kb_tag2_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag2\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag3_lower_idx": { + "name": "doc_kb_tag3_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag3\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag4_lower_idx": { + "name": "doc_kb_tag4_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag4\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag5_lower_idx": { + "name": "doc_kb_tag5_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag5\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag6_lower_idx": { + "name": "doc_kb_tag6_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag6\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_kb_tag7_lower_idx": { + "name": "doc_kb_tag7_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag7\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number1_idx": { + "name": "doc_number1_idx", + "columns": [ + { + "expression": "number1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number2_idx": { + "name": "doc_number2_idx", + "columns": [ + { + "expression": "number2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number3_idx": { + "name": "doc_number3_idx", + "columns": [ + { + "expression": "number3", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number4_idx": { + "name": "doc_number4_idx", + "columns": [ + { + "expression": "number4", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_number5_idx": { + "name": "doc_number5_idx", + "columns": [ + { + "expression": "number5", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_date1_idx": { + "name": "doc_date1_idx", + "columns": [ + { + "expression": "date1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_date2_idx": { + "name": "doc_date2_idx", + "columns": [ + { + "expression": "date2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "doc_boolean1_idx": { + "name": "doc_boolean1_idx", + "columns": [ + { + "expression": "boolean1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_boolean2_idx": { + "name": "doc_boolean2_idx", + "columns": [ + { + "expression": "boolean2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "doc_boolean3_idx": { + "name": "doc_boolean3_idx", + "columns": [ + { + "expression": "boolean3", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "document_knowledge_base_id_knowledge_base_id_fk": { + "name": "document_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "document", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "document_connector_id_knowledge_connector_id_fk": { + "name": "document_connector_id_knowledge_connector_id_fk", + "tableFrom": "document", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "document_uploaded_by_user_id_fk": { + "name": "document_uploaded_by_user_id_fk", + "tableFrom": "document", + "tableTo": "user", + "columnsFrom": ["uploaded_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "doc_acl_token_shape_check": { + "name": "doc_acl_token_shape_check", + "value": "array_position(\"document\".\"acl\", NULL) IS NULL AND (cardinality(\"document\".\"acl\") = 0 OR (cardinality(\"document\".\"acl\") = array_length(string_to_array(array_to_string(\"document\".\"acl\", E'\\n'), E'\\n'), 1) AND array_to_string(\"document\".\"acl\", E'\\n') ~ '^((ws|pub|link|u:[^\\nA-Z]+@[^\\nA-Z]+|[gs]:[^\\n:]+:[^\\n:]+:[^\\n]+)(\\n(ws|pub|link|u:[^\\nA-Z]+@[^\\nA-Z]+|[gs]:[^\\n:]+:[^\\n:]+:[^\\n]+))*)$'))" + } + }, + "isRLSEnabled": false + }, + "public.document_secret_provenance": { + "name": "document_secret_provenance", + "schema": "", + "columns": { + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "source_hash": { + "name": "source_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "document_secret_provenance_document_id_document_id_fk": { + "name": "document_secret_provenance_document_id_document_id_fk", + "tableFrom": "document_secret_provenance", + "tableTo": "document", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "document_secret_provenance_status_check": { + "name": "document_secret_provenance_status_check", + "value": "\"document_secret_provenance\".\"status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.embedding": { + "name": "embedding", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chunk_index": { + "name": "chunk_index", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "chunk_hash": { + "name": "chunk_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "content_length": { + "name": "content_length", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "embedding": { + "name": "embedding", + "type": "vector(1536)", + "primaryKey": false, + "notNull": false + }, + "embedding_384": { + "name": "embedding_384", + "type": "vector(384)", + "primaryKey": false, + "notNull": false + }, + "embedding_768": { + "name": "embedding_768", + "type": "vector(768)", + "primaryKey": false, + "notNull": false + }, + "embedding_1024": { + "name": "embedding_1024", + "type": "vector(1024)", + "primaryKey": false, + "notNull": false + }, + "embedding_3072": { + "name": "embedding_3072", + "type": "vector(3072)", + "primaryKey": false, + "notNull": false + }, + "embedding_model": { + "name": "embedding_model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text-embedding-3-small'" + }, + "start_offset": { + "name": "start_offset", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "end_offset": { + "name": "end_offset", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "tag1": { + "name": "tag1", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag2": { + "name": "tag2", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag3": { + "name": "tag3", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag4": { + "name": "tag4", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag5": { + "name": "tag5", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag6": { + "name": "tag6", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tag7": { + "name": "tag7", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "number1": { + "name": "number1", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number2": { + "name": "number2", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number3": { + "name": "number3", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number4": { + "name": "number4", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "number5": { + "name": "number5", + "type": "double precision", + "primaryKey": false, + "notNull": false + }, + "date1": { + "name": "date1", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "date2": { + "name": "date2", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "boolean1": { + "name": "boolean1", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "boolean2": { + "name": "boolean2", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "boolean3": { + "name": "boolean3", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "content_tsv": { + "name": "content_tsv", + "type": "tsvector", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "to_tsvector('english', \"embedding\".\"content\")", + "type": "stored" + } + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "emb_doc_chunk_idx": { + "name": "emb_doc_chunk_idx", + "columns": [ + { + "expression": "document_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chunk_index", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_model_idx": { + "name": "emb_kb_model_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "embedding_model", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_enabled_idx": { + "name": "emb_kb_enabled_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_doc_enabled_idx": { + "name": "emb_doc_enabled_idx", + "columns": [ + { + "expression": "document_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag1_lower_idx": { + "name": "emb_kb_tag1_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag1\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag2_lower_idx": { + "name": "emb_kb_tag2_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag2\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag3_lower_idx": { + "name": "emb_kb_tag3_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag3\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag4_lower_idx": { + "name": "emb_kb_tag4_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag4\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag5_lower_idx": { + "name": "emb_kb_tag5_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag5\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag6_lower_idx": { + "name": "emb_kb_tag6_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag6\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_kb_tag7_lower_idx": { + "name": "emb_kb_tag7_lower_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "lower(\"tag7\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number1_idx": { + "name": "emb_number1_idx", + "columns": [ + { + "expression": "number1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number2_idx": { + "name": "emb_number2_idx", + "columns": [ + { + "expression": "number2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number3_idx": { + "name": "emb_number3_idx", + "columns": [ + { + "expression": "number3", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number4_idx": { + "name": "emb_number4_idx", + "columns": [ + { + "expression": "number4", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_number5_idx": { + "name": "emb_number5_idx", + "columns": [ + { + "expression": "number5", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_date1_idx": { + "name": "emb_date1_idx", + "columns": [ + { + "expression": "date1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "emb_date2_idx": { + "name": "emb_date2_idx", + "columns": [ + { + "expression": "date2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "emb_boolean1_idx": { + "name": "emb_boolean1_idx", + "columns": [ + { + "expression": "boolean1", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_boolean2_idx": { + "name": "emb_boolean2_idx", + "columns": [ + { + "expression": "boolean2", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_boolean3_idx": { + "name": "emb_boolean3_idx", + "columns": [ + { + "expression": "boolean3", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "emb_content_fts_idx": { + "name": "emb_content_fts_idx", + "columns": [ + { + "expression": "content_tsv", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": { + "fastupdate": "off" + } + } + }, + "foreignKeys": { + "embedding_knowledge_base_id_knowledge_base_id_fk": { + "name": "embedding_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "embedding", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "embedding_document_id_document_id_fk": { + "name": "embedding_document_id_document_id_fk", + "tableFrom": "embedding", + "tableTo": "document", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "embedding_width_check": { + "name": "embedding_width_check", + "value": "num_nonnulls(\"embedding\", \"embedding_384\", \"embedding_768\", \"embedding_1024\", \"embedding_3072\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.embedding_search": { + "name": "embedding_search", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "acl": { + "name": "acl", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "binary": { + "name": "binary", + "type": "bit(1536)", + "primaryKey": false, + "notNull": false + }, + "binary_384": { + "name": "binary_384", + "type": "bit(384)", + "primaryKey": false, + "notNull": false + }, + "binary_768": { + "name": "binary_768", + "type": "bit(768)", + "primaryKey": false, + "notNull": false + }, + "binary_1024": { + "name": "binary_1024", + "type": "bit(1024)", + "primaryKey": false, + "notNull": false + }, + "binary_3072": { + "name": "binary_3072", + "type": "bit(3072)", + "primaryKey": false, + "notNull": false + }, + "vector": { + "name": "vector", + "type": "halfvec(1536)", + "primaryKey": false, + "notNull": false + }, + "vector_384": { + "name": "vector_384", + "type": "halfvec(384)", + "primaryKey": false, + "notNull": false + }, + "vector_512": { + "name": "vector_512", + "type": "halfvec(512)", + "primaryKey": false, + "notNull": false + }, + "vector_768": { + "name": "vector_768", + "type": "halfvec(768)", + "primaryKey": false, + "notNull": false + }, + "vector_1024": { + "name": "vector_1024", + "type": "halfvec(1024)", + "primaryKey": false, + "notNull": false + }, + "vector_3072": { + "name": "vector_3072", + "type": "halfvec(3072)", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "embedding_search_kb_idx": { + "name": "embedding_search_kb_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "embedding_search_document_lookup_idx": { + "name": "embedding_search_document_lookup_idx", + "columns": [ + { + "expression": "document_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"embedding_search\".\"enabled\"", + "concurrently": true, + "method": "btree", + "with": {} + }, + "embedding_search_cosine_hnsw_idx": { + "name": "embedding_search_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_512_cosine_hnsw_idx": { + "name": "embedding_search_512_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_512", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_384_cosine_hnsw_idx": { + "name": "embedding_search_384_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_384", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_768_cosine_hnsw_idx": { + "name": "embedding_search_768_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_768", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_1024_cosine_hnsw_idx": { + "name": "embedding_search_1024_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_1024", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + }, + "embedding_search_3072_cosine_hnsw_idx": { + "name": "embedding_search_3072_cosine_hnsw_idx", + "columns": [ + { + "expression": "vector_3072", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "halfvec_cosine_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "hnsw", + "with": { + "m": 16, + "ef_construction": 64 + } + } + }, + "foreignKeys": { + "embedding_search_id_embedding_id_fk": { + "name": "embedding_search_id_embedding_id_fk", + "tableFrom": "embedding_search", + "tableTo": "embedding", + "columnsFrom": ["id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "embedding_search_width_check": { + "name": "embedding_search_width_check", + "value": "num_nonnulls(\"binary\", \"binary_384\", \"binary_768\", \"binary_1024\", \"binary_3072\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.embedding_secret_provenance": { + "name": "embedding_secret_provenance", + "schema": "", + "columns": { + "embedding_id": { + "name": "embedding_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "embedding_secret_provenance_embedding_id_embedding_id_fk": { + "name": "embedding_secret_provenance_embedding_id_embedding_id_fk", + "tableFrom": "embedding_secret_provenance", + "tableTo": "embedding", + "columnsFrom": ["embedding_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "embedding_secret_provenance_status_check": { + "name": "embedding_secret_provenance_status_check", + "value": "\"embedding_secret_provenance\".\"status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.environment": { + "name": "environment", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "variables": { + "name": "variables", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "environment_user_id_user_id_fk": { + "name": "environment_user_id_user_id_fk", + "tableFrom": "environment", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "environment_user_id_unique": { + "name": "environment_user_id_unique", + "nullsNotDistinct": false, + "columns": ["user_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.execution_large_value_dependencies": { + "name": "execution_large_value_dependencies", + "schema": "", + "columns": { + "parent_key": { + "name": "parent_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "child_key": { + "name": "child_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "execution_large_value_dependencies_workspace_parent_key_idx": { + "name": "execution_large_value_dependencies_workspace_parent_key_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_value_dependencies_workspace_child_key_idx": { + "name": "execution_large_value_dependencies_workspace_child_key_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "child_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "execution_large_value_dependencies_workspace_id_workspace_id_fk": { + "name": "execution_large_value_dependencies_workspace_id_workspace_id_fk", + "tableFrom": "execution_large_value_dependencies", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "execution_large_value_dependencies_parent_key_child_key_pk": { + "name": "execution_large_value_dependencies_parent_key_child_key_pk", + "columns": ["parent_key", "child_key"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.execution_large_value_references": { + "name": "execution_large_value_references", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "execution_large_value_reference_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "execution_large_value_references_workspace_execution_source_idx": { + "name": "execution_large_value_references_workspace_execution_source_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_value_references_workflow_id_idx": { + "name": "execution_large_value_references_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "execution_large_value_references_workspace_id_workspace_id_fk": { + "name": "execution_large_value_references_workspace_id_workspace_id_fk", + "tableFrom": "execution_large_value_references", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "execution_large_value_references_workflow_id_workflow_id_fk": { + "name": "execution_large_value_references_workflow_id_workflow_id_fk", + "tableFrom": "execution_large_value_references", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "execution_large_value_references_key_execution_id_source_pk": { + "name": "execution_large_value_references_key_execution_id_source_pk", + "columns": ["key", "execution_id", "source"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.execution_large_values": { + "name": "execution_large_values", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "owner_execution_id": { + "name": "owner_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "execution_large_values_owner_execution_id_idx": { + "name": "execution_large_values_owner_execution_id_idx", + "columns": [ + { + "expression": "owner_execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_values_cleanup_idx": { + "name": "execution_large_values_cleanup_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"execution_large_values\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_values_tombstone_cleanup_idx": { + "name": "execution_large_values_tombstone_cleanup_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"execution_large_values\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_values_workflow_id_idx": { + "name": "execution_large_values_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "execution_large_values_workspace_id_idx": { + "name": "execution_large_values_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "execution_large_values_workspace_id_workspace_id_fk": { + "name": "execution_large_values_workspace_id_workspace_id_fk", + "tableFrom": "execution_large_values", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "execution_large_values_workflow_id_workflow_id_fk": { + "name": "execution_large_values_workflow_id_workflow_id_fk", + "tableFrom": "execution_large_values", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.file_search_dependency": { + "name": "file_search_dependency", + "schema": "", + "columns": { + "build_id": { + "name": "build_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "file_search_dependency_file_idx": { + "name": "file_search_dependency_file_idx", + "columns": [ + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "build_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "file_search_dependency_owner_idx": { + "name": "file_search_dependency_owner_idx", + "columns": [ + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "build_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "file_search_dependency_build_id_workspace_file_search_build_id_fk": { + "name": "file_search_dependency_build_id_workspace_file_search_build_id_fk", + "tableFrom": "file_search_dependency", + "tableTo": "workspace_file_search_build", + "columnsFrom": ["build_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "file_search_dependency_build_id_file_id_pk": { + "name": "file_search_dependency_build_id_file_id_pk", + "columns": ["build_id", "file_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.file_search_dispatch_queue": { + "name": "file_search_dispatch_queue", + "schema": "", + "columns": { + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "enqueued_at": { + "name": "enqueued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_dispatched_at": { + "name": "last_dispatched_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "file_search_dispatch_schedule_idx": { + "name": "file_search_dispatch_schedule_idx", + "columns": [ + { + "expression": "last_dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "first" + }, + { + "expression": "enqueued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": { + "file_search_dispatch_queue_entity_type_entity_id_pk": { + "name": "file_search_dispatch_queue_entity_type_entity_id_pk", + "columns": ["entity_type", "entity_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "file_search_dispatch_owner_check": { + "name": "file_search_dispatch_owner_check", + "value": "\"file_search_dispatch_queue\".\"entity_type\" IN ('workspace', 'project') AND length(\"file_search_dispatch_queue\".\"entity_id\") > 0" + } + }, + "isRLSEnabled": false + }, + "public.folder": { + "name": "folder", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "resource_type": { + "name": "resource_type", + "type": "folder_resource_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "parent_id": { + "name": "parent_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "locked": { + "name": "locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "folder_project_id_idx": { + "name": "folder_project_id_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "folder_project_resource_parent_name_active_unique": { + "name": "folder_project_resource_parent_name_active_unique", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"parent_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"folder\".\"deleted_at\" IS NULL AND \"folder\".\"project_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "folder_user_idx": { + "name": "folder_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_workspace_resource_parent_idx": { + "name": "folder_workspace_resource_parent_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_parent_sort_idx": { + "name": "folder_parent_sort_idx", + "columns": [ + { + "expression": "parent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sort_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_deleted_at_idx": { + "name": "folder_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_workspace_deleted_partial_idx": { + "name": "folder_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"folder\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "folder_workspace_resource_parent_name_active_unique": { + "name": "folder_workspace_resource_parent_name_active_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"parent_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"folder\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "folder_project_id_project_id_fk": { + "name": "folder_project_id_project_id_fk", + "tableFrom": "folder", + "tableTo": "project", + "columnsFrom": ["project_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "folder_user_id_user_id_fk": { + "name": "folder_user_id_user_id_fk", + "tableFrom": "folder", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_workspace_id_workspace_id_fk": { + "name": "folder_workspace_id_workspace_id_fk", + "tableFrom": "folder", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "folder_parent_id_folder_id_fk": { + "name": "folder_parent_id_folder_id_fk", + "tableFrom": "folder", + "tableTo": "folder", + "columnsFrom": ["parent_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "folder_workspace_parent_owner_fk": { + "name": "folder_workspace_parent_owner_fk", + "tableFrom": "folder", + "tableTo": "folder", + "columnsFrom": ["parent_id", "workspace_id", "resource_type"], + "columnsTo": ["id", "workspace_id", "resource_type"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "folder_project_parent_owner_fk": { + "name": "folder_project_parent_owner_fk", + "tableFrom": "folder", + "tableTo": "folder", + "columnsFrom": ["parent_id", "project_id", "resource_type"], + "columnsTo": ["id", "project_id", "resource_type"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "folder_workspace_owner_type_unique": { + "name": "folder_workspace_owner_type_unique", + "nullsNotDistinct": false, + "columns": ["id", "workspace_id", "resource_type"] + }, + "folder_project_owner_type_unique": { + "name": "folder_project_owner_type_unique", + "nullsNotDistinct": false, + "columns": ["id", "project_id", "resource_type"] + } + }, + "policies": {}, + "checkConstraints": { + "folder_owner_check": { + "name": "folder_owner_check", + "value": "num_nonnulls(\"folder\".\"workspace_id\", \"folder\".\"project_id\") = 1 AND (\"folder\".\"project_id\" IS NULL OR \"folder\".\"resource_type\" = 'file')" + } + }, + "isRLSEnabled": false + }, + "public.idempotency_key": { + "name": "idempotency_key", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "result": { + "name": "result", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "idempotency_key_created_at_idx": { + "name": "idempotency_key_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.invitation": { + "name": "invitation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "invitation_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'organization'" + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "inviter_id": { + "name": "inviter_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "membership_intent": { + "name": "membership_intent", + "type": "invitation_membership_intent", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'internal'" + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "invitation_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "invitation_email_idx": { + "name": "invitation_email_idx", + "columns": [ + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "invitation_organization_id_idx": { + "name": "invitation_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "invitation_status_idx": { + "name": "invitation_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "invitation_pending_email_org_unique": { + "name": "invitation_pending_email_org_unique", + "columns": [ + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"invitation\".\"status\" = 'pending' AND \"invitation\".\"organization_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "invitation_inviter_id_user_id_fk": { + "name": "invitation_inviter_id_user_id_fk", + "tableFrom": "invitation", + "tableTo": "user", + "columnsFrom": ["inviter_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "invitation_organization_id_organization_id_fk": { + "name": "invitation_organization_id_organization_id_fk", + "tableFrom": "invitation", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "invitation_token_unique": { + "name": "invitation_token_unique", + "nullsNotDistinct": false, + "columns": ["token"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.invitation_workspace_grant": { + "name": "invitation_workspace_grant", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "invitation_id": { + "name": "invitation_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "permission": { + "name": "permission", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "invitation_workspace_grant_unique": { + "name": "invitation_workspace_grant_unique", + "columns": [ + { + "expression": "invitation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "invitation_workspace_grant_workspace_id_idx": { + "name": "invitation_workspace_grant_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "invitation_workspace_grant_invitation_id_invitation_id_fk": { + "name": "invitation_workspace_grant_invitation_id_invitation_id_fk", + "tableFrom": "invitation_workspace_grant", + "tableTo": "invitation", + "columnsFrom": ["invitation_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "invitation_workspace_grant_workspace_id_workspace_id_fk": { + "name": "invitation_workspace_grant_workspace_id_workspace_id_fk", + "tableFrom": "invitation_workspace_grant", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.job_execution_logs": { + "name": "job_execution_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "schedule_id": { + "name": "schedule_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "level": { + "name": "level", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "trigger": { + "name": "trigger", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "ended_at": { + "name": "ended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "total_duration_ms": { + "name": "total_duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "execution_data": { + "name": "execution_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "cost": { + "name": "cost", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "occurrence_at": { + "name": "occurrence_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "outcome": { + "name": "outcome", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "summary": { + "name": "summary", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "billing_request_id": { + "name": "billing_request_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "job_execution_logs_schedule_occurrence_unique": { + "name": "job_execution_logs_schedule_occurrence_unique", + "columns": [ + { + "expression": "schedule_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "occurrence_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_billing_request_unique": { + "name": "job_execution_logs_billing_request_unique", + "columns": [ + { + "expression": "billing_request_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"job_execution_logs\".\"billing_request_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_open_idx": { + "name": "job_execution_logs_open_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"job_execution_logs\".\"status\" IN ('queued', 'running')", + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_workspace_started_at_idx": { + "name": "job_execution_logs_workspace_started_at_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_workspace_ended_at_id_idx": { + "name": "job_execution_logs_workspace_ended_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"ended_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_execution_id_unique": { + "name": "job_execution_logs_execution_id_unique", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "job_execution_logs_trigger_idx": { + "name": "job_execution_logs_trigger_idx", + "columns": [ + { + "expression": "trigger", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "job_execution_logs_schedule_id_workflow_schedule_id_fk": { + "name": "job_execution_logs_schedule_id_workflow_schedule_id_fk", + "tableFrom": "job_execution_logs", + "tableTo": "workflow_schedule", + "columnsFrom": ["schedule_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "job_execution_logs_workspace_id_workspace_id_fk": { + "name": "job_execution_logs_workspace_id_workspace_id_fk", + "tableFrom": "job_execution_logs", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_base": { + "name": "knowledge_base", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "folder_id": { + "name": "folder_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_search_index": { + "name": "is_search_index", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "token_count": { + "name": "token_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "embedding_model": { + "name": "embedding_model", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text-embedding-3-small'" + }, + "embedding_dimension": { + "name": "embedding_dimension", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1536 + }, + "chunking_config": { + "name": "chunking_config", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{\"maxSize\": 1024, \"minSize\": 1, \"overlap\": 200}'" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "kb_organization_id_idx": { + "name": "kb_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_organization_search_index_unique": { + "name": "kb_organization_search_index_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"knowledge_base\".\"is_search_index\" = true AND \"knowledge_base\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_organization_name_active_unique": { + "name": "kb_organization_name_active_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"knowledge_base\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_workspace_id_idx": { + "name": "kb_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_user_workspace_idx": { + "name": "kb_user_workspace_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_folder_id_idx": { + "name": "kb_folder_id_idx", + "columns": [ + { + "expression": "folder_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_deleted_at_idx": { + "name": "kb_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_workspace_deleted_partial_idx": { + "name": "kb_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_base\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_workspace_name_active_unique": { + "name": "kb_workspace_name_active_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"knowledge_base\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_workspace_search_index_unique": { + "name": "kb_workspace_search_index_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"knowledge_base\".\"is_search_index\" = true AND \"knowledge_base\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_base_user_id_user_id_fk": { + "name": "knowledge_base_user_id_user_id_fk", + "tableFrom": "knowledge_base", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_base_workspace_id_workspace_id_fk": { + "name": "knowledge_base_workspace_id_workspace_id_fk", + "tableFrom": "knowledge_base", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_base_organization_id_organization_id_fk": { + "name": "knowledge_base_organization_id_organization_id_fk", + "tableFrom": "knowledge_base", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_base_folder_id_folder_id_fk": { + "name": "knowledge_base_folder_id_folder_id_fk", + "tableFrom": "knowledge_base", + "tableTo": "folder", + "columnsFrom": ["folder_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kb_owner_check": { + "name": "kb_owner_check", + "value": "num_nonnulls(\"knowledge_base\".\"workspace_id\", \"knowledge_base\".\"organization_id\") = 1" + }, + "kb_organization_search_index_check": { + "name": "kb_organization_search_index_check", + "value": "\"knowledge_base\".\"organization_id\" IS NULL OR \"knowledge_base\".\"is_search_index\"" + }, + "kb_organization_folder_check": { + "name": "kb_organization_folder_check", + "value": "\"knowledge_base\".\"organization_id\" IS NULL OR \"knowledge_base\".\"folder_id\" IS NULL" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_base_import": { + "name": "knowledge_base_import", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_key": { + "name": "source_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "documents_total": { + "name": "documents_total", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "documents_imported": { + "name": "documents_imported", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "documents_failed": { + "name": "documents_failed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "vectors_reused": { + "name": "vectors_reused", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "failures": { + "name": "failures", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "knowledge_base_import_watchdog_idx": { + "name": "knowledge_base_import_watchdog_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "knowledge_base_import_knowledge_base_id_idx": { + "name": "knowledge_base_import_knowledge_base_id_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_base_import_workspace_id_workspace_id_fk": { + "name": "knowledge_base_import_workspace_id_workspace_id_fk", + "tableFrom": "knowledge_base_import", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_base_import_knowledge_base_id_knowledge_base_id_fk": { + "name": "knowledge_base_import_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "knowledge_base_import", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_base_tag_definitions": { + "name": "knowledge_base_tag_definitions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tag_slot": { + "name": "tag_slot", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "field_type": { + "name": "field_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'text'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "kb_tag_definitions_kb_slot_idx": { + "name": "kb_tag_definitions_kb_slot_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tag_slot", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kb_tag_definitions_kb_display_name_idx": { + "name": "kb_tag_definitions_kb_display_name_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "display_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_base_tag_definitions_knowledge_base_id_knowledge_base_id_fk": { + "name": "knowledge_base_tag_definitions_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "knowledge_base_tag_definitions", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_connector": { + "name": "knowledge_connector", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "connector_type": { + "name": "connector_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_api_key": { + "name": "encrypted_api_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_config": { + "name": "source_config", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "sync_mode": { + "name": "sync_mode", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'full'" + }, + "sync_interval_minutes": { + "name": "sync_interval_minutes", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1440 + }, + "access_mode": { + "name": "access_mode", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'workspace'" + }, + "credential_group_id": { + "name": "credential_group_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_group_option_id": { + "name": "credential_group_option_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "member_sync_status": { + "name": "member_sync_status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'idle'" + }, + "member_sync_lock_token": { + "name": "member_sync_lock_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "member_sync_lock_lease_at": { + "name": "member_sync_lock_lease_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "next_member_sync_at": { + "name": "next_member_sync_at", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": false + }, + "last_member_sync_at": { + "name": "last_member_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_member_sync_error": { + "name": "last_member_sync_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "member_sync_consecutive_failures": { + "name": "member_sync_consecutive_failures", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "access_rewrite_pending": { + "name": "access_rewrite_pending", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "image_removal_pending": { + "name": "image_removal_pending", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "member_tombstone_cursor": { + "name": "member_tombstone_cursor", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "member_resurrection_cursor": { + "name": "member_resurrection_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "last_sync_at": { + "name": "last_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_sync_error": { + "name": "last_sync_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_sync_doc_count": { + "name": "last_sync_doc_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "listing_checkpoint": { + "name": "listing_checkpoint", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "directory_checkpoint": { + "name": "directory_checkpoint", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "next_sync_at": { + "name": "next_sync_at", + "type": "timestamp (3)", + "primaryKey": false, + "notNull": false + }, + "next_directory_sync_at": { + "name": "next_directory_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "consecutive_failures": { + "name": "consecutive_failures", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "sync_lock_token": { + "name": "sync_lock_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sync_lock_lease_at": { + "name": "sync_lock_lease_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "detached_at": { + "name": "detached_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "detach_reserved_bytes": { + "name": "detach_reserved_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": { + "kc_knowledge_base_id_idx": { + "name": "kc_knowledge_base_id_idx", + "columns": [ + { + "expression": "knowledge_base_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_status_next_sync_idx": { + "name": "kc_status_next_sync_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "next_sync_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_archived_at_partial_idx": { + "name": "kc_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_deleted_at_partial_idx": { + "name": "kc_deleted_at_partial_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_member_sync_due_idx": { + "name": "kc_member_sync_due_idx", + "columns": [ + { + "expression": "member_sync_status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "next_member_sync_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector\".\"access_mode\" = 'members' AND \"knowledge_connector\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kc_directory_sync_due_idx": { + "name": "kc_directory_sync_due_idx", + "columns": [ + { + "expression": "next_directory_sync_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector\".\"access_mode\" = 'admin' AND \"knowledge_connector\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_knowledge_base_id_knowledge_base_id_fk": { + "name": "knowledge_connector_knowledge_base_id_knowledge_base_id_fk", + "tableFrom": "knowledge_connector", + "tableTo": "knowledge_base", + "columnsFrom": ["knowledge_base_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_connector_credential_group_id_credential_group_id_fk": { + "name": "knowledge_connector_credential_group_id_credential_group_id_fk", + "tableFrom": "knowledge_connector", + "tableTo": "credential_group", + "columnsFrom": ["credential_group_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kc_access_mode_check": { + "name": "kc_access_mode_check", + "value": "\"knowledge_connector\".\"access_mode\" IN ('workspace', 'members', 'admin')" + }, + "kc_member_sync_status_check": { + "name": "kc_member_sync_status_check", + "value": "\"knowledge_connector\".\"member_sync_status\" IN ('idle', 'pending', 'running', 'error', 'disabled')" + }, + "kc_sync_lock_exclusive_check": { + "name": "kc_sync_lock_exclusive_check", + "value": "NOT (\"knowledge_connector\".\"sync_lock_token\" IS NOT NULL AND \"knowledge_connector\".\"member_sync_lock_token\" IS NOT NULL)" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_member": { + "name": "knowledge_connector_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject_token": { + "name": "subject_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "consecutive_failures": { + "name": "consecutive_failures", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "next_attempt_at": { + "name": "next_attempt_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_started_at": { + "name": "last_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_complete_listing_at": { + "name": "last_complete_listing_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_listed_count": { + "name": "last_listed_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "member_synced_through": { + "name": "member_synced_through", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scope_renewed_at": { + "name": "scope_renewed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scope_renewal_cursor": { + "name": "scope_renewal_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "scope_renewal_started_at": { + "name": "scope_renewal_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "change_cursor": { + "name": "change_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "listing_checkpoint": { + "name": "listing_checkpoint", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "suspended_at": { + "name": "suspended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "kcm_organization_id_idx": { + "name": "kcm_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcm_connector_credential_unique": { + "name": "kcm_connector_credential_unique", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcm_connector_queue_idx": { + "name": "kcm_connector_queue_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "next_attempt_at", + "isExpression": false, + "asc": true, + "nulls": "first" + }, + { + "expression": "last_started_at", + "isExpression": false, + "asc": true, + "nulls": "first" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcm_credential_idx": { + "name": "kcm_credential_idx", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_member_workspace_id_workspace_id_fk": { + "name": "knowledge_connector_member_workspace_id_workspace_id_fk", + "tableFrom": "knowledge_connector_member", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_connector_member_organization_id_organization_id_fk": { + "name": "knowledge_connector_member_organization_id_organization_id_fk", + "tableFrom": "knowledge_connector_member", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_connector_member_connector_id_knowledge_connector_id_fk": { + "name": "knowledge_connector_member_connector_id_knowledge_connector_id_fk", + "tableFrom": "knowledge_connector_member", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_connector_member_credential_id_credential_id_fk": { + "name": "knowledge_connector_member_credential_id_credential_id_fk", + "tableFrom": "knowledge_connector_member", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcm_owner_check": { + "name": "kcm_owner_check", + "value": "num_nonnulls(\"knowledge_connector_member\".\"workspace_id\", \"knowledge_connector_member\".\"organization_id\") = 1" + }, + "kcm_status_check": { + "name": "kcm_status_check", + "value": "\"knowledge_connector_member\".\"status\" IN ('active', 'suspended', 'disabled')" + }, + "kcm_subject_token_shape_check": { + "name": "kcm_subject_token_shape_check", + "value": "\"knowledge_connector_member\".\"subject_token\" ~ '^s:[^:]+:[^:]+:.+$'" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_member_sync_log": { + "name": "knowledge_connector_member_sync_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "members_claimed": { + "name": "members_claimed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "members_completed": { + "name": "members_completed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "members_incomplete": { + "name": "members_incomplete", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "members_failed": { + "name": "members_failed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_failed": { + "name": "docs_failed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "processing_dispatch_failed": { + "name": "processing_dispatch_failed", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "docs_listed": { + "name": "docs_listed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_added": { + "name": "docs_added", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_updated": { + "name": "docs_updated", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_unchanged": { + "name": "docs_unchanged", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_hydrated_once": { + "name": "docs_hydrated_once", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "observations_added": { + "name": "observations_added", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "observations_renewed": { + "name": "observations_renewed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "observations_removed": { + "name": "observations_removed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_tombstoned": { + "name": "docs_tombstoned", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_resurrected": { + "name": "docs_resurrected", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_purged": { + "name": "docs_purged", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "credentials_audited": { + "name": "credentials_audited", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "database_failure_class": { + "name": "database_failure_class", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "kcmsl_connector_started_at_idx": { + "name": "kcmsl_connector_started_at_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "\"started_at\" DESC", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcmsl_started_at_partial_idx": { + "name": "kcmsl_started_at_partial_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector_member_sync_log\".\"status\" = 'started'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_member_sync_log_connector_id_knowledge_connector_id_fk": { + "name": "knowledge_connector_member_sync_log_connector_id_knowledge_connector_id_fk", + "tableFrom": "knowledge_connector_member_sync_log", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcmsl_status_check": { + "name": "kcmsl_status_check", + "value": "\"knowledge_connector_member_sync_log\".\"status\" IN ('started', 'partial', 'completed', 'failed')" + }, + "kcmsl_database_failure_class_check": { + "name": "kcmsl_database_failure_class_check", + "value": "\"knowledge_connector_member_sync_log\".\"database_failure_class\" IN ('capacity', 'conflict', 'connection')" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_partition": { + "name": "knowledge_connector_partition", + "schema": "", + "columns": { + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "partition_key": { + "name": "partition_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "generation_id": { + "name": "generation_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "context": { + "name": "context", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "cursor": { + "name": "cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "attempts": { + "name": "attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "retry_at": { + "name": "retry_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_served_at": { + "name": "last_served_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "failure": { + "name": "failure", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "permission_cursor": { + "name": "permission_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "permission_attempts": { + "name": "permission_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "permission_retry_at": { + "name": "permission_retry_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "permission_last_served_at": { + "name": "permission_last_served_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "permission_started_at": { + "name": "permission_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "permission_failure": { + "name": "permission_failure", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "kcp_content_due_idx": { + "name": "kcp_content_due_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "generation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "retry_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_served_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcp_permission_due_idx": { + "name": "kcp_permission_due_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "generation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "permission_retry_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "permission_last_served_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_partition_connector_id_knowledge_connector_id_fk": { + "name": "knowledge_connector_partition_connector_id_knowledge_connector_id_fk", + "tableFrom": "knowledge_connector_partition", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "kcp_pk": { + "name": "kcp_pk", + "columns": ["connector_id", "partition_key"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcp_partition_key_check": { + "name": "kcp_partition_key_check", + "value": "octet_length(\"knowledge_connector_partition\".\"partition_key\") BETWEEN 1 AND 1024" + }, + "kcp_context_check": { + "name": "kcp_context_check", + "value": "jsonb_typeof(\"knowledge_connector_partition\".\"context\") = 'object' AND octet_length(\"knowledge_connector_partition\".\"context\"::text) <= 16384" + }, + "kcp_status_check": { + "name": "kcp_status_check", + "value": "\"knowledge_connector_partition\".\"status\" IN ('pending', 'complete', 'blocked')" + }, + "kcp_cursor_check": { + "name": "kcp_cursor_check", + "value": "(\"knowledge_connector_partition\".\"cursor\" IS NULL OR octet_length(\"knowledge_connector_partition\".\"cursor\") <= 393216) AND (\"knowledge_connector_partition\".\"permission_cursor\" IS NULL OR octet_length(\"knowledge_connector_partition\".\"permission_cursor\") <= 393216)" + }, + "kcp_attempts_check": { + "name": "kcp_attempts_check", + "value": "\"knowledge_connector_partition\".\"attempts\" >= 0 AND \"knowledge_connector_partition\".\"permission_attempts\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_permission_grant": { + "name": "knowledge_connector_permission_grant", + "schema": "", + "columns": { + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "group_key": { + "name": "group_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject_token": { + "name": "subject_token", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "kcpg_subject_idx": { + "name": "kcpg_subject_idx", + "columns": [ + { + "expression": "subject_token", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "group_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "kcpg_snapshot_fk": { + "name": "kcpg_snapshot_fk", + "tableFrom": "knowledge_connector_permission_grant", + "tableTo": "knowledge_connector_permission_snapshot", + "columnsFrom": ["connector_id"], + "columnsTo": ["connector_id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "kcpg_pk": { + "name": "kcpg_pk", + "columns": ["connector_id", "group_key", "subject_token"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcpg_group_check": { + "name": "kcpg_group_check", + "value": "length(\"knowledge_connector_permission_grant\".\"group_key\") BETWEEN 1 AND 255" + }, + "kcpg_subject_check": { + "name": "kcpg_subject_check", + "value": "\"knowledge_connector_permission_grant\".\"subject_token\" ~ '^u:[^[:space:]A-Z]+@[^[:space:]A-Z]+$'" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_permission_snapshot": { + "name": "knowledge_connector_permission_snapshot", + "schema": "", + "columns": { + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "kcps_connector_fk": { + "name": "kcps_connector_fk", + "tableFrom": "knowledge_connector_permission_snapshot", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcps_revision_check": { + "name": "kcps_revision_check", + "value": "\"knowledge_connector_permission_snapshot\".\"revision\" > 0" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_connector_sync_log": { + "name": "knowledge_connector_sync_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connector_id": { + "name": "connector_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "docs_added": { + "name": "docs_added", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_updated": { + "name": "docs_updated", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_deleted": { + "name": "docs_deleted", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_unchanged": { + "name": "docs_unchanged", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_skipped": { + "name": "docs_skipped", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "docs_failed": { + "name": "docs_failed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "listed_count": { + "name": "listed_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "database_failure_class": { + "name": "database_failure_class", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "kcsl_connector_started_at_idx": { + "name": "kcsl_connector_started_at_idx", + "columns": [ + { + "expression": "connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "\"started_at\" DESC", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcsl_started_at_partial_idx": { + "name": "kcsl_started_at_partial_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector_sync_log\".\"status\" = 'started'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "kcsl_terminal_started_at_idx": { + "name": "kcsl_terminal_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"knowledge_connector_sync_log\".\"status\" IN ('completed', 'failed')", + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_connector_sync_log_connector_id_knowledge_connector_id_fk": { + "name": "knowledge_connector_sync_log_connector_id_knowledge_connector_id_fk", + "tableFrom": "knowledge_connector_sync_log", + "tableTo": "knowledge_connector", + "columnsFrom": ["connector_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "kcsl_database_failure_class_check": { + "name": "kcsl_database_failure_class_check", + "value": "\"knowledge_connector_sync_log\".\"database_failure_class\" IN ('capacity', 'conflict', 'connection')" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_document_observation": { + "name": "knowledge_document_observation", + "schema": "", + "columns": { + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "member_id": { + "name": "member_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "last_seen_at": { + "name": "last_seen_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "run_id": { + "name": "run_id", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "kdo_member_idx": { + "name": "kdo_member_idx", + "columns": [ + { + "expression": "member_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_document_observation_document_id_document_id_fk": { + "name": "knowledge_document_observation_document_id_document_id_fk", + "tableFrom": "knowledge_document_observation", + "tableTo": "document", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_document_observation_member_id_knowledge_connector_member_id_fk": { + "name": "knowledge_document_observation_member_id_knowledge_connector_member_id_fk", + "tableFrom": "knowledge_document_observation", + "tableTo": "knowledge_connector_member", + "columnsFrom": ["member_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "knowledge_document_observation_document_id_member_id_pk": { + "name": "knowledge_document_observation_document_id_member_id_pk", + "columns": ["document_id", "member_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_external_directory": { + "name": "knowledge_external_directory", + "schema": "", + "columns": { + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sync_lock_token": { + "name": "sync_lock_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sync_lock_lease_at": { + "name": "sync_lock_lease_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_started_at": { + "name": "last_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_complete_sync_at": { + "name": "last_complete_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "ked_workspace_identity_unique": { + "name": "ked_workspace_identity_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "ked_organization_identity_unique": { + "name": "ked_organization_identity_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_external_directory_workspace_id_workspace_id_fk": { + "name": "knowledge_external_directory_workspace_id_workspace_id_fk", + "tableFrom": "knowledge_external_directory", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "knowledge_external_directory_organization_id_organization_id_fk": { + "name": "knowledge_external_directory_organization_id_organization_id_fk", + "tableFrom": "knowledge_external_directory", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "ked_owner_check": { + "name": "ked_owner_check", + "value": "num_nonnulls(\"knowledge_external_directory\".\"workspace_id\", \"knowledge_external_directory\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_external_group": { + "name": "knowledge_external_group", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tenant_id": { + "name": "tenant_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_group_id": { + "name": "external_group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "last_synced_at": { + "name": "last_synced_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "keg_organization_identity_unique": { + "name": "keg_organization_identity_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "keg_organization_synced_idx": { + "name": "keg_organization_synced_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_synced_at", + "isExpression": false, + "asc": true, + "nulls": "first" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "keg_identity_unique": { + "name": "keg_identity_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "tenant_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "keg_workspace_synced_idx": { + "name": "keg_workspace_synced_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_synced_at", + "isExpression": false, + "asc": true, + "nulls": "first" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_external_group_organization_id_organization_id_fk": { + "name": "knowledge_external_group_organization_id_organization_id_fk", + "tableFrom": "knowledge_external_group", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "keg_workspace_fk": { + "name": "keg_workspace_fk", + "tableFrom": "knowledge_external_group", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "keg_owner_check": { + "name": "keg_owner_check", + "value": "num_nonnulls(\"knowledge_external_group\".\"workspace_id\", \"knowledge_external_group\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.knowledge_external_group_member": { + "name": "knowledge_external_group_member", + "schema": "", + "columns": { + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject_token": { + "name": "subject_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "kegm_subject_token_idx": { + "name": "kegm_subject_token_idx", + "columns": [ + { + "expression": "subject_token", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "kegm_group_fk": { + "name": "kegm_group_fk", + "tableFrom": "knowledge_external_group_member", + "tableTo": "knowledge_external_group", + "columnsFrom": ["group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "knowledge_external_group_member_group_id_subject_token_pk": { + "name": "knowledge_external_group_member_group_id_subject_token_pk", + "columns": ["group_id", "subject_token"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.knowledge_projection_dirty": { + "name": "knowledge_projection_dirty", + "schema": "", + "columns": { + "document_id": { + "name": "document_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "generation": { + "name": "generation", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "content": { + "name": "content", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "marked_at": { + "name": "marked_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "knowledge_projection_dirty_marked_at_idx": { + "name": "knowledge_projection_dirty_marked_at_idx", + "columns": [ + { + "expression": "marked_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "knowledge_projection_dirty_document_id_document_id_fk": { + "name": "knowledge_projection_dirty_document_id_document_id_fk", + "tableFrom": "knowledge_projection_dirty", + "tableTo": "document", + "columnsFrom": ["document_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mcp_server_oauth": { + "name": "mcp_server_oauth", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "mcp_server_id": { + "name": "mcp_server_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_information": { + "name": "client_information", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tokens": { + "name": "tokens", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "code_verifier": { + "name": "code_verifier", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "state": { + "name": "state", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "state_created_at": { + "name": "state_created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_refreshed_at": { + "name": "last_refreshed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mcp_server_oauth_server_unique": { + "name": "mcp_server_oauth_server_unique", + "columns": [ + { + "expression": "mcp_server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_server_oauth_state_idx": { + "name": "mcp_server_oauth_state_idx", + "columns": [ + { + "expression": "state", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mcp_server_oauth_mcp_server_id_mcp_servers_id_fk": { + "name": "mcp_server_oauth_mcp_server_id_mcp_servers_id_fk", + "tableFrom": "mcp_server_oauth", + "tableTo": "mcp_servers", + "columnsFrom": ["mcp_server_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcp_server_oauth_user_id_user_id_fk": { + "name": "mcp_server_oauth_user_id_user_id_fk", + "tableFrom": "mcp_server_oauth", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "mcp_server_oauth_workspace_id_workspace_id_fk": { + "name": "mcp_server_oauth_workspace_id_workspace_id_fk", + "tableFrom": "mcp_server_oauth", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcp_server_oauth_organization_id_organization_id_fk": { + "name": "mcp_server_oauth_organization_id_organization_id_fk", + "tableFrom": "mcp_server_oauth", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "mcp_server_oauth_owner_check": { + "name": "mcp_server_oauth_owner_check", + "value": "num_nonnulls(\"mcp_server_oauth\".\"workspace_id\", \"mcp_server_oauth\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.mcp_servers": { + "name": "mcp_servers", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_group_id": { + "name": "credential_group_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "managed_connector_id": { + "name": "managed_connector_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oauth_config_version": { + "name": "oauth_config_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "transport": { + "name": "transport", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'headers'" + }, + "oauth_client_id": { + "name": "oauth_client_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oauth_client_secret": { + "name": "oauth_client_secret", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "headers": { + "name": "headers", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "timeout": { + "name": "timeout", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 30000 + }, + "retries": { + "name": "retries", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 3 + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "last_connected": { + "name": "last_connected", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "connection_status": { + "name": "connection_status", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'disconnected'" + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status_config": { + "name": "status_config", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "tool_count": { + "name": "tool_count", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "last_tools_refresh": { + "name": "last_tools_refresh", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "total_requests": { + "name": "total_requests", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "last_used": { + "name": "last_used", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mcp_servers_organization_id_idx": { + "name": "mcp_servers_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_servers_workspace_enabled_idx": { + "name": "mcp_servers_workspace_enabled_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "enabled", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_servers_credential_group_idx": { + "name": "mcp_servers_credential_group_idx", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_servers_credential_group_managed_connector_unique": { + "name": "mcp_servers_credential_group_managed_connector_unique", + "columns": [ + { + "expression": "credential_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "managed_connector_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"mcp_servers\".\"credential_group_id\" IS NOT NULL AND \"mcp_servers\".\"managed_connector_id\" IS NOT NULL AND \"mcp_servers\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "mcp_servers_workspace_deleted_partial_idx": { + "name": "mcp_servers_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"mcp_servers\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mcp_servers_workspace_id_workspace_id_fk": { + "name": "mcp_servers_workspace_id_workspace_id_fk", + "tableFrom": "mcp_servers", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcp_servers_organization_id_organization_id_fk": { + "name": "mcp_servers_organization_id_organization_id_fk", + "tableFrom": "mcp_servers", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mcp_servers_credential_group_id_credential_group_id_fk": { + "name": "mcp_servers_credential_group_id_credential_group_id_fk", + "tableFrom": "mcp_servers", + "tableTo": "credential_group", + "columnsFrom": ["credential_group_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "mcp_servers_created_by_user_id_fk": { + "name": "mcp_servers_created_by_user_id_fk", + "tableFrom": "mcp_servers", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "mcp_servers_owner_check": { + "name": "mcp_servers_owner_check", + "value": "num_nonnulls(\"mcp_servers\".\"workspace_id\", \"mcp_servers\".\"organization_id\") = 1" + }, + "mcp_servers_organization_managed_check": { + "name": "mcp_servers_organization_managed_check", + "value": "\"mcp_servers\".\"organization_id\" IS NULL OR \"mcp_servers\".\"credential_group_id\" IS NOT NULL" + }, + "mcp_servers_credential_group_managed_connector_check": { + "name": "mcp_servers_credential_group_managed_connector_check", + "value": "\"mcp_servers\".\"credential_group_id\" IS NULL OR \"mcp_servers\".\"managed_connector_id\" IS NOT NULL" + }, + "mcp_servers_managed_connector_oauth_check": { + "name": "mcp_servers_managed_connector_oauth_check", + "value": "\"mcp_servers\".\"managed_connector_id\" IS NULL OR \"mcp_servers\".\"auth_type\" = 'oauth'" + } + }, + "isRLSEnabled": false + }, + "public.member": { + "name": "member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "member_user_id_unique": { + "name": "member_user_id_unique", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "member_organization_id_idx": { + "name": "member_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "member_user_id_user_id_fk": { + "name": "member_user_id_user_id_fk", + "tableFrom": "member", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "member_organization_id_organization_id_fk": { + "name": "member_organization_id_organization_id_fk", + "tableFrom": "member", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.member_profile": { + "name": "member_profile", + "schema": "", + "columns": { + "member_id": { + "name": "member_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "department": { + "name": "department", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "start_date": { + "name": "start_date", + "type": "date", + "primaryKey": false, + "notNull": false + }, + "manager_member_id": { + "name": "manager_member_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "member_profile_manager_member_id_idx": { + "name": "member_profile_manager_member_id_idx", + "columns": [ + { + "expression": "manager_member_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "member_profile_updated_by_idx": { + "name": "member_profile_updated_by_idx", + "columns": [ + { + "expression": "updated_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "member_profile_member_id_member_id_fk": { + "name": "member_profile_member_id_member_id_fk", + "tableFrom": "member_profile", + "tableTo": "member", + "columnsFrom": ["member_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "member_profile_manager_member_id_member_id_fk": { + "name": "member_profile_manager_member_id_member_id_fk", + "tableFrom": "member_profile", + "tableTo": "member", + "columnsFrom": ["manager_member_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "member_profile_updated_by_user_id_fk": { + "name": "member_profile_updated_by_user_id_fk", + "tableFrom": "member_profile", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "member_profile_not_own_manager": { + "name": "member_profile_not_own_manager", + "value": "\"member_profile\".\"manager_member_id\" <> \"member_profile\".\"member_id\"" + } + }, + "isRLSEnabled": false + }, + "public.memory": { + "name": "memory", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "storage_version": { + "name": "storage_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "encrypted_context_summary": { + "name": "encrypted_context_summary", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "memory_key_idx": { + "name": "memory_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "memory_workspace_key_idx": { + "name": "memory_workspace_key_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "memory_workspace_deleted_partial_idx": { + "name": "memory_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"memory\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "memory_workspace_id_workspace_id_fk": { + "name": "memory_workspace_id_workspace_id_fk", + "tableFrom": "memory", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.memory_artifact": { + "name": "memory_artifact", + "schema": "", + "columns": { + "memory_id": { + "name": "memory_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "memory_artifact_key_idx": { + "name": "memory_artifact_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "memory_artifact_memory_id_memory_id_fk": { + "name": "memory_artifact_memory_id_memory_id_fk", + "tableFrom": "memory_artifact", + "tableTo": "memory", + "columnsFrom": ["memory_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "memory_artifact_key_execution_large_values_key_fk": { + "name": "memory_artifact_key_execution_large_values_key_fk", + "tableFrom": "memory_artifact", + "tableTo": "execution_large_values", + "columnsFrom": ["key"], + "columnsTo": ["key"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "memory_artifact_memory_id_key_pk": { + "name": "memory_artifact_memory_id_key_pk", + "columns": ["memory_id", "key"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.memory_item": { + "name": "memory_item", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "memory_id": { + "name": "memory_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sequence": { + "name": "sequence", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "identity": { + "type": "always", + "name": "memory_item_sequence_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": "1", + "cycle": false + } + }, + "append_key": { + "name": "append_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "turn_id": { + "name": "turn_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provenance_status": { + "name": "provenance_status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provenance_entries": { + "name": "provenance_entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "memory_item_append_unique": { + "name": "memory_item_append_unique", + "columns": [ + { + "expression": "memory_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "append_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "memory_item_sequence_idx": { + "name": "memory_item_sequence_idx", + "columns": [ + { + "expression": "memory_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sequence", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "memory_item_memory_id_memory_id_fk": { + "name": "memory_item_memory_id_memory_id_fk", + "tableFrom": "memory_item", + "tableTo": "memory", + "columnsFrom": ["memory_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "memory_item_kind_check": { + "name": "memory_item_kind_check", + "value": "\"memory_item\".\"kind\" IN ('message', 'exchange')" + }, + "memory_item_provenance_status_check": { + "name": "memory_item_provenance_status_check", + "value": "\"memory_item\".\"provenance_status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.memory_secret_provenance": { + "name": "memory_secret_provenance", + "schema": "", + "columns": { + "memory_id": { + "name": "memory_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "memory_secret_provenance_memory_id_memory_id_fk": { + "name": "memory_secret_provenance_memory_id_memory_id_fk", + "tableFrom": "memory_secret_provenance", + "tableTo": "memory", + "columnsFrom": ["memory_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "memory_secret_provenance_status_check": { + "name": "memory_secret_provenance_status_check", + "value": "\"memory_secret_provenance\".\"status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.mothership_benchmark_runs": { + "name": "mothership_benchmark_runs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "benchmark_id": { + "name": "benchmark_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "evaluation_key": { + "name": "evaluation_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reviews": { + "name": "reviews", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "reviewed_at": { + "name": "reviewed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "correct": { + "name": "correct", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "automatic_correct": { + "name": "automatic_correct", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "total": { + "name": "total", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "artifacts": { + "name": "artifacts", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mothership_benchmark_runs_benchmark_created_idx": { + "name": "mothership_benchmark_runs_benchmark_created_idx", + "columns": [ + { + "expression": "benchmark_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_benchmark_runs_benchmark_id_mothership_benchmarks_id_fk": { + "name": "mothership_benchmark_runs_benchmark_id_mothership_benchmarks_id_fk", + "tableFrom": "mothership_benchmark_runs", + "tableTo": "mothership_benchmarks", + "columnsFrom": ["benchmark_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "mothership_benchmark_runs_score_check": { + "name": "mothership_benchmark_runs_score_check", + "value": "\"mothership_benchmark_runs\".\"total\" > 0 AND \"mothership_benchmark_runs\".\"correct\" >= 0 AND \"mothership_benchmark_runs\".\"correct\" <= \"mothership_benchmark_runs\".\"total\"" + }, + "mothership_benchmark_runs_version_check": { + "name": "mothership_benchmark_runs_version_check", + "value": "\"mothership_benchmark_runs\".\"version\" > 0" + }, + "mothership_benchmark_runs_automatic_score_check": { + "name": "mothership_benchmark_runs_automatic_score_check", + "value": "\"mothership_benchmark_runs\".\"automatic_correct\" >= 0 AND \"mothership_benchmark_runs\".\"automatic_correct\" <= \"mothership_benchmark_runs\".\"total\"" + } + }, + "isRLSEnabled": false + }, + "public.mothership_benchmarks": { + "name": "mothership_benchmarks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "run_as_user_id": { + "name": "run_as_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_workspace_id": { + "name": "source_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "artifacts": { + "name": "artifacts", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "running_stage": { + "name": "running_stage", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "attempt_id": { + "name": "attempt_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lease_expires_at": { + "name": "lease_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "planner_chat_id": { + "name": "planner_chat_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mothership_benchmarks_owner_created_idx": { + "name": "mothership_benchmarks_owner_created_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "mothership_benchmarks_workspace_idx": { + "name": "mothership_benchmarks_workspace_idx", + "columns": [ + { + "expression": "source_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_benchmarks_organization_id_organization_id_fk": { + "name": "mothership_benchmarks_organization_id_organization_id_fk", + "tableFrom": "mothership_benchmarks", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_benchmarks_user_id_user_id_fk": { + "name": "mothership_benchmarks_user_id_user_id_fk", + "tableFrom": "mothership_benchmarks", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_benchmarks_run_as_user_id_user_id_fk": { + "name": "mothership_benchmarks_run_as_user_id_user_id_fk", + "tableFrom": "mothership_benchmarks", + "tableTo": "user", + "columnsFrom": ["run_as_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_benchmarks_source_workspace_id_workspace_id_fk": { + "name": "mothership_benchmarks_source_workspace_id_workspace_id_fk", + "tableFrom": "mothership_benchmarks", + "tableTo": "workspace", + "columnsFrom": ["source_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "mothership_benchmarks_version_check": { + "name": "mothership_benchmarks_version_check", + "value": "\"mothership_benchmarks\".\"version\" > 0" + }, + "mothership_benchmarks_attempt_check": { + "name": "mothership_benchmarks_attempt_check", + "value": "(\"mothership_benchmarks\".\"running_stage\" IS NULL AND \"mothership_benchmarks\".\"attempt_id\" IS NULL AND \"mothership_benchmarks\".\"lease_expires_at\" IS NULL) OR (\"mothership_benchmarks\".\"running_stage\" IS NOT NULL AND \"mothership_benchmarks\".\"running_stage\" IN ('distill', 'redact', 'plan', 'reconstruct', 'grade') AND \"mothership_benchmarks\".\"attempt_id\" IS NOT NULL AND \"mothership_benchmarks\".\"lease_expires_at\" IS NOT NULL)" + } + }, + "isRLSEnabled": false + }, + "public.mothership_inbox_allowed_sender": { + "name": "mothership_inbox_allowed_sender", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "label": { + "name": "label", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "added_by": { + "name": "added_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "inbox_sender_ws_email_idx": { + "name": "inbox_sender_ws_email_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_inbox_allowed_sender_workspace_id_workspace_id_fk": { + "name": "mothership_inbox_allowed_sender_workspace_id_workspace_id_fk", + "tableFrom": "mothership_inbox_allowed_sender", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_inbox_allowed_sender_added_by_user_id_fk": { + "name": "mothership_inbox_allowed_sender_added_by_user_id_fk", + "tableFrom": "mothership_inbox_allowed_sender", + "tableTo": "user", + "columnsFrom": ["added_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_inbox_task": { + "name": "mothership_inbox_task", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "from_email": { + "name": "from_email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sender_authenticated": { + "name": "sender_authenticated", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "from_name": { + "name": "from_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subject": { + "name": "subject", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "body_preview": { + "name": "body_preview", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "body_text": { + "name": "body_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "body_html": { + "name": "body_html", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email_message_id": { + "name": "email_message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "in_reply_to": { + "name": "in_reply_to", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "response_message_id": { + "name": "response_message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "agentmail_message_id": { + "name": "agentmail_message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'received'" + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "trigger_job_id": { + "name": "trigger_job_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "result_summary": { + "name": "result_summary", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "rejection_reason": { + "name": "rejection_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "has_attachments": { + "name": "has_attachments", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "cc_recipients": { + "name": "cc_recipients", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "processing_started_at": { + "name": "processing_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "inbox_task_ws_created_at_idx": { + "name": "inbox_task_ws_created_at_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "inbox_task_ws_status_idx": { + "name": "inbox_task_ws_status_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "inbox_task_response_msg_id_idx": { + "name": "inbox_task_response_msg_id_idx", + "columns": [ + { + "expression": "response_message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "inbox_task_email_msg_id_idx": { + "name": "inbox_task_email_msg_id_idx", + "columns": [ + { + "expression": "email_message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_inbox_task_workspace_id_workspace_id_fk": { + "name": "mothership_inbox_task_workspace_id_workspace_id_fk", + "tableFrom": "mothership_inbox_task", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_inbox_task_chat_id_copilot_chats_id_fk": { + "name": "mothership_inbox_task_chat_id_copilot_chats_id_fk", + "tableFrom": "mothership_inbox_task", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_inbox_webhook": { + "name": "mothership_inbox_webhook", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "webhook_id": { + "name": "webhook_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret": { + "name": "secret", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "mothership_inbox_webhook_workspace_id_workspace_id_fk": { + "name": "mothership_inbox_webhook_workspace_id_workspace_id_fk", + "tableFrom": "mothership_inbox_webhook", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "mothership_inbox_webhook_workspace_id_unique": { + "name": "mothership_inbox_webhook_workspace_id_unique", + "nullsNotDistinct": false, + "columns": ["workspace_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_memory_selections": { + "name": "mothership_memory_selections", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "space_id": { + "name": "space_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "mothership_memory_selections_user_id_user_id_fk": { + "name": "mothership_memory_selections_user_id_user_id_fk", + "tableFrom": "mothership_memory_selections", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_memory_selections_organization_id_organization_id_fk": { + "name": "mothership_memory_selections_organization_id_organization_id_fk", + "tableFrom": "mothership_memory_selections", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_memory_selections_space_id_mothership_memory_spaces_id_fk": { + "name": "mothership_memory_selections_space_id_mothership_memory_spaces_id_fk", + "tableFrom": "mothership_memory_selections", + "tableTo": "mothership_memory_spaces", + "columnsFrom": ["space_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "mothership_memory_selections_user_id_organization_id_pk": { + "name": "mothership_memory_selections_user_id_organization_id_pk", + "columns": ["user_id", "organization_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_memory_spaces": { + "name": "mothership_memory_spaces", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "mothership_memory_spaces_owner_idx": { + "name": "mothership_memory_spaces_owner_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "mothership_memory_spaces_user_id_user_id_fk": { + "name": "mothership_memory_spaces_user_id_user_id_fk", + "tableFrom": "mothership_memory_spaces", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "mothership_memory_spaces_organization_id_organization_id_fk": { + "name": "mothership_memory_spaces_organization_id_organization_id_fk", + "tableFrom": "mothership_memory_spaces", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.mothership_resource_effects": { + "name": "mothership_resource_effects", + "schema": "", + "columns": { + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "effect_id": { + "name": "effect_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "mothership_resource_effects_chat_id_copilot_chats_id_fk": { + "name": "mothership_resource_effects_chat_id_copilot_chats_id_fk", + "tableFrom": "mothership_resource_effects", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "mothership_resource_effects_chat_id_effect_id_pk": { + "name": "mothership_resource_effects_chat_id_effect_id_pk", + "columns": ["chat_id", "effect_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.oauth_access_token": { + "name": "oauth_access_token", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "session_id": { + "name": "session_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "refresh_id": { + "name": "refresh_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "scopes": { + "name": "scopes", + "type": "text[]", + "primaryKey": false, + "notNull": true + }, + "resource": { + "name": "resource", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "oauth_access_token_client_id_idx": { + "name": "oauth_access_token_client_id_idx", + "columns": [ + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_access_token_session_id_idx": { + "name": "oauth_access_token_session_id_idx", + "columns": [ + { + "expression": "session_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_access_token_refresh_id_idx": { + "name": "oauth_access_token_refresh_id_idx", + "columns": [ + { + "expression": "refresh_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_access_token_user_client_idx": { + "name": "oauth_access_token_user_client_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_access_token_expires_at_idx": { + "name": "oauth_access_token_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_access_token_client_id_oauth_client_client_id_fk": { + "name": "oauth_access_token_client_id_oauth_client_client_id_fk", + "tableFrom": "oauth_access_token", + "tableTo": "oauth_client", + "columnsFrom": ["client_id"], + "columnsTo": ["client_id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_access_token_session_id_session_id_fk": { + "name": "oauth_access_token_session_id_session_id_fk", + "tableFrom": "oauth_access_token", + "tableTo": "session", + "columnsFrom": ["session_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "oauth_access_token_user_id_user_id_fk": { + "name": "oauth_access_token_user_id_user_id_fk", + "tableFrom": "oauth_access_token", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_access_token_refresh_id_oauth_refresh_token_id_fk": { + "name": "oauth_access_token_refresh_id_oauth_refresh_token_id_fk", + "tableFrom": "oauth_access_token", + "tableTo": "oauth_refresh_token", + "columnsFrom": ["refresh_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "oauth_access_token_token_unique": { + "name": "oauth_access_token_token_unique", + "nullsNotDistinct": false, + "columns": ["token"] + } + }, + "policies": {}, + "checkConstraints": { + "oauth_access_token_search_resource_check": { + "name": "oauth_access_token_search_resource_check", + "value": "NOT ('search:read' = ANY(\"oauth_access_token\".\"scopes\")) OR \"oauth_access_token\".\"resource\" IS NOT NULL" + } + }, + "isRLSEnabled": false + }, + "public.oauth_client": { + "name": "oauth_client", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_secret": { + "name": "client_secret", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "disabled": { + "name": "disabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "skip_consent": { + "name": "skip_consent", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "enable_end_session": { + "name": "enable_end_session", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "subject_type": { + "name": "subject_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "scopes": { + "name": "scopes", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "uri": { + "name": "uri", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "icon": { + "name": "icon", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "contacts": { + "name": "contacts", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "tos": { + "name": "tos", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "policy": { + "name": "policy", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "software_id": { + "name": "software_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "software_version": { + "name": "software_version", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "software_statement": { + "name": "software_statement", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "redirect_uris": { + "name": "redirect_uris", + "type": "text[]", + "primaryKey": false, + "notNull": true + }, + "post_logout_redirect_uris": { + "name": "post_logout_redirect_uris", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "token_endpoint_auth_method": { + "name": "token_endpoint_auth_method", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "grant_types": { + "name": "grant_types", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "response_types": { + "name": "response_types", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "public": { + "name": "public", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "require_pkce": { + "name": "require_pkce", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "oauth_client_user_id_idx": { + "name": "oauth_client_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_client_user_id_user_id_fk": { + "name": "oauth_client_user_id_user_id_fk", + "tableFrom": "oauth_client", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "oauth_client_client_id_unique": { + "name": "oauth_client_client_id_unique", + "nullsNotDistinct": false, + "columns": ["client_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.oauth_consent": { + "name": "oauth_consent", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "scopes": { + "name": "scopes", + "type": "text[]", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "oauth_consent_client_id_idx": { + "name": "oauth_consent_client_id_idx", + "columns": [ + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_consent_client_id_oauth_client_client_id_fk": { + "name": "oauth_consent_client_id_oauth_client_client_id_fk", + "tableFrom": "oauth_consent", + "tableTo": "oauth_client", + "columnsFrom": ["client_id"], + "columnsTo": ["client_id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_consent_user_id_user_id_fk": { + "name": "oauth_consent_user_id_user_id_fk", + "tableFrom": "oauth_consent", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "oauth_consent_user_client_reference_unique": { + "name": "oauth_consent_user_client_reference_unique", + "nullsNotDistinct": true, + "columns": ["user_id", "client_id", "reference_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.oauth_refresh_token": { + "name": "oauth_refresh_token", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "session_id": { + "name": "session_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "revoked": { + "name": "revoked", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "auth_time": { + "name": "auth_time", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "scopes": { + "name": "scopes", + "type": "text[]", + "primaryKey": false, + "notNull": true + }, + "resource": { + "name": "resource", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "family_id": { + "name": "family_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "generation": { + "name": "generation", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "oauth_refresh_token_client_id_idx": { + "name": "oauth_refresh_token_client_id_idx", + "columns": [ + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_refresh_token_session_id_idx": { + "name": "oauth_refresh_token_session_id_idx", + "columns": [ + { + "expression": "session_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_refresh_token_user_client_idx": { + "name": "oauth_refresh_token_user_client_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_refresh_token_expires_at_idx": { + "name": "oauth_refresh_token_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_refresh_token_client_id_oauth_client_client_id_fk": { + "name": "oauth_refresh_token_client_id_oauth_client_client_id_fk", + "tableFrom": "oauth_refresh_token", + "tableTo": "oauth_client", + "columnsFrom": ["client_id"], + "columnsTo": ["client_id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_refresh_token_session_id_session_id_fk": { + "name": "oauth_refresh_token_session_id_session_id_fk", + "tableFrom": "oauth_refresh_token", + "tableTo": "session", + "columnsFrom": ["session_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "oauth_refresh_token_user_id_user_id_fk": { + "name": "oauth_refresh_token_user_id_user_id_fk", + "tableFrom": "oauth_refresh_token", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_refresh_token_family_id_oauth_token_family_id_fk": { + "name": "oauth_refresh_token_family_id_oauth_token_family_id_fk", + "tableFrom": "oauth_refresh_token", + "tableTo": "oauth_token_family", + "columnsFrom": ["family_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "oauth_refresh_token_token_unique": { + "name": "oauth_refresh_token_token_unique", + "nullsNotDistinct": false, + "columns": ["token"] + }, + "oauth_refresh_token_family_generation_unique": { + "name": "oauth_refresh_token_family_generation_unique", + "nullsNotDistinct": false, + "columns": ["family_id", "generation"] + } + }, + "policies": {}, + "checkConstraints": { + "oauth_refresh_token_generation_check": { + "name": "oauth_refresh_token_generation_check", + "value": "\"oauth_refresh_token\".\"generation\" BETWEEN 0 AND 1000" + }, + "oauth_refresh_token_search_resource_check": { + "name": "oauth_refresh_token_search_resource_check", + "value": "NOT ('search:read' = ANY(\"oauth_refresh_token\".\"scopes\")) OR \"oauth_refresh_token\".\"resource\" IS NOT NULL" + } + }, + "isRLSEnabled": false + }, + "public.oauth_token_family": { + "name": "oauth_token_family", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "session_id": { + "name": "session_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "consent_id": { + "name": "consent_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "current_generation": { + "name": "current_generation", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "oauth_token_family_client_id_idx": { + "name": "oauth_token_family_client_id_idx", + "columns": [ + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_token_family_session_id_idx": { + "name": "oauth_token_family_session_id_idx", + "columns": [ + { + "expression": "session_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_token_family_user_client_idx": { + "name": "oauth_token_family_user_client_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "client_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_token_family_consent_id_idx": { + "name": "oauth_token_family_consent_id_idx", + "columns": [ + { + "expression": "consent_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "oauth_token_family_expires_at_idx": { + "name": "oauth_token_family_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "oauth_token_family_client_id_oauth_client_client_id_fk": { + "name": "oauth_token_family_client_id_oauth_client_client_id_fk", + "tableFrom": "oauth_token_family", + "tableTo": "oauth_client", + "columnsFrom": ["client_id"], + "columnsTo": ["client_id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_token_family_session_id_session_id_fk": { + "name": "oauth_token_family_session_id_session_id_fk", + "tableFrom": "oauth_token_family", + "tableTo": "session", + "columnsFrom": ["session_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "oauth_token_family_user_id_user_id_fk": { + "name": "oauth_token_family_user_id_user_id_fk", + "tableFrom": "oauth_token_family", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "oauth_token_family_consent_id_oauth_consent_id_fk": { + "name": "oauth_token_family_consent_id_oauth_consent_id_fk", + "tableFrom": "oauth_token_family", + "tableTo": "oauth_consent", + "columnsFrom": ["consent_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "oauth_token_family_generation_check": { + "name": "oauth_token_family_generation_check", + "value": "\"oauth_token_family\".\"current_generation\" BETWEEN 0 AND 1000" + } + }, + "isRLSEnabled": false + }, + "public.organization": { + "name": "organization", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "slug": { + "name": "slug", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "logo": { + "name": "logo", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "session_policy_settings": { + "name": "session_policy_settings", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "security_policy_version": { + "name": "security_policy_version", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "require_sso": { + "name": "require_sso", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "whitelabel_settings": { + "name": "whitelabel_settings", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "data_retention_settings": { + "name": "data_retention_settings", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "org_usage_limit": { + "name": "org_usage_limit", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "storage_used_bytes": { + "name": "storage_used_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "limit_notifications": { + "name": "limit_notifications", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "credit_balance": { + "name": "credit_balance", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_access_request_settings": { + "name": "organization_access_request_settings", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "allow_requests": { + "name": "allow_requests", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": { + "organization_access_request_settings_organization_id_organization_id_fk": { + "name": "organization_access_request_settings_organization_id_organization_id_fk", + "tableFrom": "organization_access_request_settings", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_access_request_settings_updated_by_user_id_fk": { + "name": "organization_access_request_settings_updated_by_user_id_fk", + "tableFrom": "organization_access_request_settings", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_byok_keys": { + "name": "organization_byok_keys", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "encrypted_api_key": { + "name": "encrypted_api_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "organization_byok_organization_provider_idx": { + "name": "organization_byok_organization_provider_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_byok_keys_organization_id_organization_id_fk": { + "name": "organization_byok_keys_organization_id_organization_id_fk", + "tableFrom": "organization_byok_keys", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_byok_keys_created_by_user_id_fk": { + "name": "organization_byok_keys_created_by_user_id_fk", + "tableFrom": "organization_byok_keys", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_member_usage_limit": { + "name": "organization_member_usage_limit", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "usage_limit": { + "name": "usage_limit", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "set_by": { + "name": "set_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "org_member_usage_limit_org_user_unique": { + "name": "org_member_usage_limit_org_user_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "org_member_usage_limit_organization_id_idx": { + "name": "org_member_usage_limit_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_member_usage_limit_organization_id_organization_id_fk": { + "name": "organization_member_usage_limit_organization_id_organization_id_fk", + "tableFrom": "organization_member_usage_limit", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_member_usage_limit_user_id_user_id_fk": { + "name": "organization_member_usage_limit_user_id_user_id_fk", + "tableFrom": "organization_member_usage_limit", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_member_usage_limit_set_by_user_id_fk": { + "name": "organization_member_usage_limit_set_by_user_id_fk", + "tableFrom": "organization_member_usage_limit", + "tableTo": "user", + "columnsFrom": ["set_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_search_history": { + "name": "organization_search_history", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sources": { + "name": "sources", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "queries": { + "name": "queries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + } + }, + "indexes": { + "organization_search_history_user_idx": { + "name": "organization_search_history_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_search_history_organization_id_organization_id_fk": { + "name": "organization_search_history_organization_id_organization_id_fk", + "tableFrom": "organization_search_history", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_search_history_user_id_user_id_fk": { + "name": "organization_search_history_user_id_user_id_fk", + "tableFrom": "organization_search_history", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "organization_search_history_organization_id_user_id_pk": { + "name": "organization_search_history_organization_id_user_id_pk", + "columns": ["organization_id", "user_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_search_integration": { + "name": "organization_search_integration", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "connector_type": { + "name": "connector_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "approved": { + "name": "approved", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "organization_search_integration_organization_id_organization_id_fk": { + "name": "organization_search_integration_organization_id_organization_id_fk", + "tableFrom": "organization_search_integration", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "organization_search_integration_organization_id_connector_type_pk": { + "name": "organization_search_integration_organization_id_connector_type_pk", + "columns": ["organization_id", "connector_type"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_search_mcp_invocation": { + "name": "organization_search_mcp_invocation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "auth_kind": { + "name": "auth_kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "oauth_client_id": { + "name": "oauth_client_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "client_name": { + "name": "client_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "tool_name": { + "name": "tool_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "outcome": { + "name": "outcome", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "duration_ms": { + "name": "duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp with time zone", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "organization_search_mcp_invocation_org_created_idx": { + "name": "organization_search_mcp_invocation_org_created_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "organization_search_mcp_invocation_user_idx": { + "name": "organization_search_mcp_invocation_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "org_search_mcp_invocation_org_fk": { + "name": "org_search_mcp_invocation_org_fk", + "tableFrom": "organization_search_mcp_invocation", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "org_search_mcp_invocation_user_fk": { + "name": "org_search_mcp_invocation_user_fk", + "tableFrom": "organization_search_mcp_invocation", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "organization_search_mcp_invocation_tool_check": { + "name": "organization_search_mcp_invocation_tool_check", + "value": "\"organization_search_mcp_invocation\".\"tool_name\" IN ('search', 'read_document', 'chat')" + }, + "organization_search_mcp_invocation_outcome_check": { + "name": "organization_search_mcp_invocation_outcome_check", + "value": "\"organization_search_mcp_invocation\".\"outcome\" IN ('success', 'error', 'cancelled', 'rate_limited')" + }, + "organization_search_mcp_invocation_duration_check": { + "name": "organization_search_mcp_invocation_duration_check", + "value": "\"organization_search_mcp_invocation\".\"duration_ms\" >= 0" + }, + "organization_search_mcp_invocation_client_name_check": { + "name": "organization_search_mcp_invocation_client_name_check", + "value": "length(\"organization_search_mcp_invocation\".\"client_name\") <= 256" + }, + "organization_search_mcp_invocation_auth_check": { + "name": "organization_search_mcp_invocation_auth_check", + "value": "(\"organization_search_mcp_invocation\".\"auth_kind\" = 'oauth_access_token' AND \"organization_search_mcp_invocation\".\"oauth_client_id\" IS NOT NULL)\n OR (\"organization_search_mcp_invocation\".\"auth_kind\" IN ('personal_api_key', 'workspace_api_key') AND \"organization_search_mcp_invocation\".\"oauth_client_id\" IS NULL AND \"organization_search_mcp_invocation\".\"client_name\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.organization_secret": { + "name": "organization_secret", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "source_id": { + "name": "source_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "owner_user_id": { + "name": "owner_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "encrypted_value": { + "name": "encrypted_value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "organization_secret_shared_unique": { + "name": "organization_secret_shared_unique", + "columns": [ + { + "expression": "source_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"organization_secret\".\"owner_user_id\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "organization_secret_member_unique": { + "name": "organization_secret_member_unique", + "columns": [ + { + "expression": "source_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"organization_secret\".\"owner_user_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "organization_secret_owner_idx": { + "name": "organization_secret_owner_idx", + "columns": [ + { + "expression": "owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_secret_source_id_organization_secret_source_id_fk": { + "name": "organization_secret_source_id_organization_secret_source_id_fk", + "tableFrom": "organization_secret", + "tableTo": "organization_secret_source", + "columnsFrom": ["source_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "organization_secret_owner_user_id_user_id_fk": { + "name": "organization_secret_owner_user_id_user_id_fk", + "tableFrom": "organization_secret", + "tableTo": "user", + "columnsFrom": ["owner_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.organization_secret_source": { + "name": "organization_secret_source", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "mode": { + "name": "mode", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "organization_secret_source_org_unique": { + "name": "organization_secret_source_org_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "organization_secret_source_organization_id_organization_id_fk": { + "name": "organization_secret_source_organization_id_organization_id_fk", + "tableFrom": "organization_secret_source", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "organization_secret_source_mode_check": { + "name": "organization_secret_source_mode_check", + "value": "\"organization_secret_source\".\"mode\" IN ('organization', 'member')" + } + }, + "isRLSEnabled": false + }, + "public.outbox_event": { + "name": "outbox_event", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "event_type": { + "name": "event_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "attempts": { + "name": "attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "max_attempts": { + "name": "max_attempts", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 10 + }, + "available_at": { + "name": "available_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "locked_at": { + "name": "locked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "processed_at": { + "name": "processed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "outbox_event_status_available_idx": { + "name": "outbox_event_status_available_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "available_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "outbox_event_pending_type_available_idx": { + "name": "outbox_event_pending_type_available_idx", + "columns": [ + { + "expression": "event_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "available_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"outbox_event\".\"status\" = 'pending'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "outbox_event_locked_at_idx": { + "name": "outbox_event_locked_at_idx", + "columns": [ + { + "expression": "locked_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "outbox_event_type_created_idx": { + "name": "outbox_event_type_created_idx", + "columns": [ + { + "expression": "event_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.paused_executions": { + "name": "paused_executions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_snapshot": { + "name": "execution_snapshot", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "pause_points": { + "name": "pause_points", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "total_pause_count": { + "name": "total_pause_count", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "resumed_count": { + "name": "resumed_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "automatic_resume_retry_count": { + "name": "automatic_resume_retry_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'paused'" + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "paused_at": { + "name": "paused_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "next_resume_at": { + "name": "next_resume_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "paused_executions_workflow_id_idx": { + "name": "paused_executions_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "paused_executions_status_idx": { + "name": "paused_executions_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "paused_executions_execution_id_unique": { + "name": "paused_executions_execution_id_unique", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "paused_executions_next_resume_at_idx": { + "name": "paused_executions_next_resume_at_idx", + "columns": [ + { + "expression": "next_resume_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "status = 'paused' AND next_resume_at IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "paused_executions_workflow_id_workflow_id_fk": { + "name": "paused_executions_workflow_id_workflow_id_fk", + "tableFrom": "paused_executions", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pending_credential_draft": { + "name": "pending_credential_draft", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "oauth_config": { + "name": "oauth_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "pending_draft_organization_id_idx": { + "name": "pending_draft_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pending_draft_user_provider_org": { + "name": "pending_draft_user_provider_org", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pending_draft_user_provider_ws": { + "name": "pending_draft_user_provider_ws", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pending_credential_draft_user_id_user_id_fk": { + "name": "pending_credential_draft_user_id_user_id_fk", + "tableFrom": "pending_credential_draft", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pending_credential_draft_workspace_id_workspace_id_fk": { + "name": "pending_credential_draft_workspace_id_workspace_id_fk", + "tableFrom": "pending_credential_draft", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pending_credential_draft_organization_id_organization_id_fk": { + "name": "pending_credential_draft_organization_id_organization_id_fk", + "tableFrom": "pending_credential_draft", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pending_credential_draft_credential_id_credential_id_fk": { + "name": "pending_credential_draft_credential_id_credential_id_fk", + "tableFrom": "pending_credential_draft", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "pending_draft_owner_check": { + "name": "pending_draft_owner_check", + "value": "num_nonnulls(\"pending_credential_draft\".\"workspace_id\", \"pending_credential_draft\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.people_directory_entry": { + "name": "people_directory_entry", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "department": { + "name": "department", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "manager_external_id": { + "name": "manager_external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "people_directory_entry_source_id_idx": { + "name": "people_directory_entry_source_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "people_directory_entry_email_idx": { + "name": "people_directory_entry_email_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "people_directory_entry_manager_idx": { + "name": "people_directory_entry_manager_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "manager_external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "people_directory_entry_organization_id_people_directory_sync_organization_id_fk": { + "name": "people_directory_entry_organization_id_people_directory_sync_organization_id_fk", + "tableFrom": "people_directory_entry", + "tableTo": "people_directory_sync", + "columnsFrom": ["organization_id"], + "columnsTo": ["organization_id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.people_directory_page": { + "name": "people_directory_page", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "run_id": { + "name": "run_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "page_hash": { + "name": "page_hash", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": {}, + "foreignKeys": { + "people_directory_page_organization_id_people_directory_sync_organization_id_fk": { + "name": "people_directory_page_organization_id_people_directory_sync_organization_id_fk", + "tableFrom": "people_directory_page", + "tableTo": "people_directory_sync", + "columnsFrom": ["organization_id"], + "columnsTo": ["organization_id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "people_directory_page_organization_id_run_id_page_hash_pk": { + "name": "people_directory_page_organization_id_run_id_page_hash_pk", + "columns": ["organization_id", "run_id", "page_hash"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.people_directory_scim_change": { + "name": "people_directory_scim_change", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "changed_at": { + "name": "changed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "people_directory_scim_change_due_idx": { + "name": "people_directory_scim_change_due_idx", + "columns": [ + { + "expression": "changed_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "people_directory_scim_change_organization_id_organization_id_fk": { + "name": "people_directory_scim_change_organization_id_organization_id_fk", + "tableFrom": "people_directory_scim_change", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.people_directory_stage": { + "name": "people_directory_stage", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "run_id": { + "name": "run_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "proposed_id": { + "name": "proposed_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "department": { + "name": "department", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "location": { + "name": "location", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "manager_external_id": { + "name": "manager_external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reports_cursor": { + "name": "reports_cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reports_complete": { + "name": "reports_complete", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + } + }, + "indexes": { + "people_directory_stage_email_idx": { + "name": "people_directory_stage_email_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "email", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "people_directory_stage_pending_idx": { + "name": "people_directory_stage_pending_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "NOT \"people_directory_stage\".\"reports_complete\"", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "people_directory_stage_organization_id_people_directory_sync_organization_id_fk": { + "name": "people_directory_stage_organization_id_people_directory_sync_organization_id_fk", + "tableFrom": "people_directory_stage", + "tableTo": "people_directory_sync", + "columnsFrom": ["organization_id"], + "columnsTo": ["organization_id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "people_directory_stage_organization_id_run_id_external_id_pk": { + "name": "people_directory_stage_organization_id_run_id_external_id_pk", + "columns": ["organization_id", "run_id", "external_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.people_directory_sync": { + "name": "people_directory_sync", + "schema": "", + "columns": { + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_target": { + "name": "source_target", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_credential": { + "name": "encrypted_credential", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "configured_by": { + "name": "configured_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lease_token": { + "name": "lease_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lease_expires_at": { + "name": "lease_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "run_id": { + "name": "run_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "run_started_at": { + "name": "run_started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "phase": { + "name": "phase", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cursor": { + "name": "cursor", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "users_read": { + "name": "users_read", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "retry_count": { + "name": "retry_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "next_sync_at": { + "name": "next_sync_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_attempt_at": { + "name": "last_attempt_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_success_at": { + "name": "last_success_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_failed_at": { + "name": "last_failed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_error": { + "name": "last_error", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "people_directory_sync_due_idx": { + "name": "people_directory_sync_due_idx", + "columns": [ + { + "expression": "next_sync_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "people_directory_sync_organization_id_organization_id_fk": { + "name": "people_directory_sync_organization_id_organization_id_fk", + "tableFrom": "people_directory_sync", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "people_directory_sync_configured_by_user_id_fk": { + "name": "people_directory_sync_configured_by_user_id_fk", + "tableFrom": "people_directory_sync", + "tableTo": "user", + "columnsFrom": ["configured_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.permission_access_request": { + "name": "permission_access_request", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "requester_id": { + "name": "requester_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "scope_key": { + "name": "scope_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_key": { + "name": "target_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target": { + "name": "target", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "target_label": { + "name": "target_label", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "membership_id": { + "name": "membership_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "group_name": { + "name": "group_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reason": { + "name": "reason", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "decision_reason": { + "name": "decision_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "decided_by": { + "name": "decided_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "decision": { + "name": "decision", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "decided_at": { + "name": "decided_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "permission_access_request_pending_unique": { + "name": "permission_access_request_pending_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "requester_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"permission_access_request\".\"status\" = 'pending'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_access_request_org_queue_idx": { + "name": "permission_access_request_org_queue_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_access_request_requester_idx": { + "name": "permission_access_request_requester_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "requester_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scope_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permission_access_request_organization_id_organization_id_fk": { + "name": "permission_access_request_organization_id_organization_id_fk", + "tableFrom": "permission_access_request", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_access_request_requester_id_user_id_fk": { + "name": "permission_access_request_requester_id_user_id_fk", + "tableFrom": "permission_access_request", + "tableTo": "user", + "columnsFrom": ["requester_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_access_request_decided_by_user_id_fk": { + "name": "permission_access_request_decided_by_user_id_fk", + "tableFrom": "permission_access_request", + "tableTo": "user", + "columnsFrom": ["decided_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "permission_access_request_status_check": { + "name": "permission_access_request_status_check", + "value": "\"permission_access_request\".\"status\" in ('pending', 'fulfilled', 'declined', 'cancelled', 'closed')" + } + }, + "isRLSEnabled": false + }, + "public.permission_group": { + "name": "permission_group", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "is_default": { + "name": "is_default", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "membership_mode": { + "name": "membership_mode", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'inherit'" + } + }, + "indexes": { + "permission_group_created_by_idx": { + "name": "permission_group_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_group_organization_name_unique": { + "name": "permission_group_organization_name_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_group_organization_default_unique": { + "name": "permission_group_organization_default_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "is_default = true", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permission_group_organization_id_organization_id_fk": { + "name": "permission_group_organization_id_organization_id_fk", + "tableFrom": "permission_group", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_created_by_user_id_fk": { + "name": "permission_group_created_by_user_id_fk", + "tableFrom": "permission_group", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.permission_group_member": { + "name": "permission_group_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "permission_group_id": { + "name": "permission_group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "assigned_by": { + "name": "assigned_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "assigned_at": { + "name": "assigned_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "permission_group_member_group_user_unique": { + "name": "permission_group_member_group_user_unique", + "columns": [ + { + "expression": "permission_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_group_member_organization_user_idx": { + "name": "permission_group_member_organization_user_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permission_group_member_permission_group_id_permission_group_id_fk": { + "name": "permission_group_member_permission_group_id_permission_group_id_fk", + "tableFrom": "permission_group_member", + "tableTo": "permission_group", + "columnsFrom": ["permission_group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_member_organization_id_organization_id_fk": { + "name": "permission_group_member_organization_id_organization_id_fk", + "tableFrom": "permission_group_member", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_member_user_id_user_id_fk": { + "name": "permission_group_member_user_id_user_id_fk", + "tableFrom": "permission_group_member", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_member_assigned_by_user_id_fk": { + "name": "permission_group_member_assigned_by_user_id_fk", + "tableFrom": "permission_group_member", + "tableTo": "user", + "columnsFrom": ["assigned_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.permission_group_workspace": { + "name": "permission_group_workspace", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "permission_group_id": { + "name": "permission_group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "permission_group_workspace_workspace_id_idx": { + "name": "permission_group_workspace_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permission_group_workspace_group_workspace_unique": { + "name": "permission_group_workspace_group_workspace_unique", + "columns": [ + { + "expression": "permission_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permission_group_workspace_permission_group_id_permission_group_id_fk": { + "name": "permission_group_workspace_permission_group_id_permission_group_id_fk", + "tableFrom": "permission_group_workspace", + "tableTo": "permission_group", + "columnsFrom": ["permission_group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_workspace_workspace_id_workspace_id_fk": { + "name": "permission_group_workspace_workspace_id_workspace_id_fk", + "tableFrom": "permission_group_workspace", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "permission_group_workspace_organization_id_organization_id_fk": { + "name": "permission_group_workspace_organization_id_organization_id_fk", + "tableFrom": "permission_group_workspace", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.permissions": { + "name": "permissions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "permission_type": { + "name": "permission_type", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "permissions_entity_idx": { + "name": "permissions_entity_idx", + "columns": [ + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permissions_user_entity_permission_idx": { + "name": "permissions_user_entity_permission_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "permission_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "permissions_unique_constraint": { + "name": "permissions_unique_constraint", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "permissions_user_id_user_id_fk": { + "name": "permissions_user_id_user_id_fk", + "tableFrom": "permissions", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.pinned_item": { + "name": "pinned_item", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_type": { + "name": "resource_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "pinned_at": { + "name": "pinned_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "pinned_item_user_workspace_idx": { + "name": "pinned_item_user_workspace_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pinned_item_resource_idx": { + "name": "pinned_item_resource_idx", + "columns": [ + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "pinned_item_user_resource_unique": { + "name": "pinned_item_user_resource_unique", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "pinned_item_user_id_user_id_fk": { + "name": "pinned_item_user_id_user_id_fk", + "tableFrom": "pinned_item", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "pinned_item_workspace_id_workspace_id_fk": { + "name": "pinned_item_workspace_id_workspace_id_fk", + "tableFrom": "pinned_item", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.project": { + "name": "project", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_scope_key": { + "name": "organization_scope_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "CASE WHEN organization_id IS NULL THEN 'personal' ELSE 'organization:' || organization_id END", + "type": "stored" + } + }, + "owner_id": { + "name": "owner_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "project_organization_archive_id_idx": { + "name": "project_organization_archive_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "project_owner_archive_id_idx": { + "name": "project_owner_archive_id_idx", + "columns": [ + { + "expression": "owner_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "project_organization_id_organization_id_fk": { + "name": "project_organization_id_organization_id_fk", + "tableFrom": "project", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "project_owner_id_user_id_fk": { + "name": "project_owner_id_user_id_fk", + "tableFrom": "project", + "tableTo": "user", + "columnsFrom": ["owner_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "project_id_organization_scope_unique": { + "name": "project_id_organization_scope_unique", + "nullsNotDistinct": false, + "columns": ["id", "organization_scope_key"] + } + }, + "policies": {}, + "checkConstraints": { + "project_name_length": { + "name": "project_name_length", + "value": "char_length(btrim(\"project\".\"name\")) BETWEEN 1 AND 100" + } + }, + "isRLSEnabled": false + }, + "public.public_share": { + "name": "public_share", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "resource_type": { + "name": "resource_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "auth_type": { + "name": "auth_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'public'" + }, + "password": { + "name": "password", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "allowed_emails": { + "name": "allowed_emails", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'[]'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "public_share_entity_id_idx": { + "name": "public_share_entity_id_idx", + "columns": [ + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "public_share_token_unique": { + "name": "public_share_token_unique", + "columns": [ + { + "expression": "token", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "public_share_resource_unique": { + "name": "public_share_resource_unique", + "columns": [ + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "public_share_resource_id_idx": { + "name": "public_share_resource_id_idx", + "columns": [ + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "public_share_workspace_id_idx": { + "name": "public_share_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "public_share_workspace_id_workspace_id_fk": { + "name": "public_share_workspace_id_workspace_id_fk", + "tableFrom": "public_share", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "public_share_created_by_user_id_fk": { + "name": "public_share_created_by_user_id_fk", + "tableFrom": "public_share", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "public_share_entity_binding_check": { + "name": "public_share_entity_binding_check", + "value": "\n (\"public_share\".\"entity_type\" IS NULL AND \"public_share\".\"entity_id\" IS NULL AND \"public_share\".\"workspace_id\" IS NOT NULL)\n OR (\"public_share\".\"entity_type\" IS NOT NULL AND \"public_share\".\"entity_id\" IS NOT NULL AND char_length(\"public_share\".\"entity_id\") > 0\n AND ((\"public_share\".\"entity_type\" = 'workspace' AND \"public_share\".\"workspace_id\" IS NOT NULL AND \"public_share\".\"entity_id\" = \"public_share\".\"workspace_id\")\n OR (\"public_share\".\"entity_type\" = 'project' AND \"public_share\".\"workspace_id\" IS NULL AND \"public_share\".\"resource_type\" = 'file')))\n " + } + }, + "isRLSEnabled": false + }, + "public.rate_limit_bucket": { + "name": "rate_limit_bucket", + "schema": "", + "columns": { + "key": { + "name": "key", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "tokens": { + "name": "tokens", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "last_refill_at": { + "name": "last_refill_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "blocked_until": { + "name": "blocked_until", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "capacity_state": { + "name": "capacity_state", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.resource_policy": { + "name": "resource_policy", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "resource_type": { + "name": "resource_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 1 + }, + "document": { + "name": "document", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_by": { + "name": "updated_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "resource_policy_organization_id_idx": { + "name": "resource_policy_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_policy_resource_unique": { + "name": "resource_policy_resource_unique", + "columns": [ + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resource_policy_workspace_id_idx": { + "name": "resource_policy_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resource_policy_workspace_id_workspace_id_fk": { + "name": "resource_policy_workspace_id_workspace_id_fk", + "tableFrom": "resource_policy", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "resource_policy_organization_id_organization_id_fk": { + "name": "resource_policy_organization_id_organization_id_fk", + "tableFrom": "resource_policy", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "resource_policy_created_by_user_id_fk": { + "name": "resource_policy_created_by_user_id_fk", + "tableFrom": "resource_policy", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "resource_policy_updated_by_user_id_fk": { + "name": "resource_policy_updated_by_user_id_fk", + "tableFrom": "resource_policy", + "tableTo": "user", + "columnsFrom": ["updated_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "resource_policy_owner_check": { + "name": "resource_policy_owner_check", + "value": "num_nonnulls(\"resource_policy\".\"workspace_id\", \"resource_policy\".\"organization_id\") = 1" + } + }, + "isRLSEnabled": false + }, + "public.resume_queue": { + "name": "resume_queue", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "paused_execution_id": { + "name": "paused_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "parent_execution_id": { + "name": "parent_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "new_execution_id": { + "name": "new_execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "context_id": { + "name": "context_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resume_input": { + "name": "resume_input", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "queued_at": { + "name": "queued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "claimed_at": { + "name": "claimed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "resume_queue_parent_status_idx": { + "name": "resume_queue_parent_status_idx", + "columns": [ + { + "expression": "parent_execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "queued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "resume_queue_new_execution_idx": { + "name": "resume_queue_new_execution_idx", + "columns": [ + { + "expression": "new_execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "resume_queue_paused_execution_id_paused_executions_id_fk": { + "name": "resume_queue_paused_execution_id_paused_executions_id_fk", + "tableFrom": "resume_queue", + "tableTo": "paused_executions", + "columnsFrom": ["paused_execution_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sandbox_image": { + "name": "sandbox_image", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "provider": { + "name": "provider", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "spec_hash": { + "name": "spec_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "spec": { + "name": "spec", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "sandbox_image_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "image_ref": { + "name": "image_ref", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_image_id": { + "name": "provider_image_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "build_id": { + "name": "build_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "materialization_generation": { + "name": "materialization_generation", + "type": "bigint", + "primaryKey": false, + "notNull": false + }, + "error_code": { + "name": "error_code", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_detail": { + "name": "error_detail", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_used_at": { + "name": "last_used_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sandbox_image_provider_spec_unique": { + "name": "sandbox_image_provider_spec_unique", + "columns": [ + { + "expression": "provider", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "spec_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sandbox_image_status_idx": { + "name": "sandbox_image_status_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sandbox_image_last_used_idx": { + "name": "sandbox_image_last_used_idx", + "columns": [ + { + "expression": "last_used_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_connection": { + "name": "scim_connection", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "settings": { + "name": "settings", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "last_request_at": { + "name": "last_request_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "reconcile_lock_token": { + "name": "reconcile_lock_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "reconcile_lease_at": { + "name": "reconcile_lease_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "reconciled_at": { + "name": "reconciled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_connection_organization_unique": { + "name": "scim_connection_organization_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_connection_reconcile_due_idx": { + "name": "scim_connection_reconcile_due_idx", + "columns": [ + { + "expression": "reconciled_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_connection_organization_id_organization_id_fk": { + "name": "scim_connection_organization_id_organization_id_fk", + "tableFrom": "scim_connection", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_connection_created_by_user_id_fk": { + "name": "scim_connection_created_by_user_id_fk", + "tableFrom": "scim_connection", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_credential": { + "name": "scim_credential", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "token_hash": { + "name": "token_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "token_prefix": { + "name": "token_prefix", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scopes": { + "name": "scopes", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "revoked_at": { + "name": "revoked_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "revoked_by": { + "name": "revoked_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_used_at": { + "name": "last_used_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_credential_token_hash_unique": { + "name": "scim_credential_token_hash_unique", + "columns": [ + { + "expression": "token_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_credential_connection_idx": { + "name": "scim_credential_connection_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_credential_connection_id_scim_connection_id_fk": { + "name": "scim_credential_connection_id_scim_connection_id_fk", + "tableFrom": "scim_credential", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_credential_revoked_by_user_id_fk": { + "name": "scim_credential_revoked_by_user_id_fk", + "tableFrom": "scim_credential", + "tableTo": "user", + "columnsFrom": ["revoked_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "scim_credential_created_by_user_id_fk": { + "name": "scim_credential_created_by_user_id_fk", + "tableFrom": "scim_credential", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_group": { + "name": "scim_group", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name_key": { + "name": "display_name_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "order_key": { + "name": "order_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_group_connection_display_name_unique": { + "name": "scim_group_connection_display_name_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "display_name_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_connection_external_id_unique": { + "name": "scim_group_connection_external_id_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "external_id is not null", + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_connection_order_idx": { + "name": "scim_group_connection_order_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_group_connection_id_scim_connection_id_fk": { + "name": "scim_group_connection_id_scim_connection_id_fk", + "tableFrom": "scim_group", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_group_mapping": { + "name": "scim_group_mapping", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_kind": { + "name": "target_kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "permission_group_id": { + "name": "permission_group_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "permission_type": { + "name": "permission_type", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'manual'" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_group_mapping_permission_group_idx": { + "name": "scim_group_mapping_permission_group_idx", + "columns": [ + { + "expression": "permission_group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_mapping_workspace_idx": { + "name": "scim_group_mapping_workspace_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_mapping_group_target_unique": { + "name": "scim_group_mapping_group_target_unique", + "columns": [ + { + "expression": "group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_kind", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"permission_group_id\", \"workspace_id\", \"role\")", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_group_mapping_group_id_scim_group_id_fk": { + "name": "scim_group_mapping_group_id_scim_group_id_fk", + "tableFrom": "scim_group_mapping", + "tableTo": "scim_group", + "columnsFrom": ["group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_group_mapping_permission_group_id_permission_group_id_fk": { + "name": "scim_group_mapping_permission_group_id_permission_group_id_fk", + "tableFrom": "scim_group_mapping", + "tableTo": "permission_group", + "columnsFrom": ["permission_group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_group_mapping_workspace_id_workspace_id_fk": { + "name": "scim_group_mapping_workspace_id_workspace_id_fk", + "tableFrom": "scim_group_mapping", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_group_mapping_created_by_user_id_fk": { + "name": "scim_group_mapping_created_by_user_id_fk", + "tableFrom": "scim_group_mapping", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "scim_group_mapping_target_shape": { + "name": "scim_group_mapping_target_shape", + "value": "(\n (\"scim_group_mapping\".\"target_kind\" = 'permission_group' AND \"scim_group_mapping\".\"permission_group_id\" IS NOT NULL AND \"scim_group_mapping\".\"workspace_id\" IS NULL AND \"scim_group_mapping\".\"permission_type\" IS NULL AND \"scim_group_mapping\".\"role\" IS NULL)\n OR (\"scim_group_mapping\".\"target_kind\" = 'workspace' AND \"scim_group_mapping\".\"workspace_id\" IS NOT NULL AND \"scim_group_mapping\".\"permission_type\" IS NOT NULL AND \"scim_group_mapping\".\"permission_group_id\" IS NULL AND \"scim_group_mapping\".\"role\" IS NULL)\n OR (\"scim_group_mapping\".\"target_kind\" = 'org_role' AND \"scim_group_mapping\".\"role\" IS NOT NULL AND \"scim_group_mapping\".\"permission_group_id\" IS NULL AND \"scim_group_mapping\".\"workspace_id\" IS NULL AND \"scim_group_mapping\".\"permission_type\" IS NULL)\n )" + } + }, + "isRLSEnabled": false + }, + "public.scim_group_member": { + "name": "scim_group_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scim_user_id": { + "name": "scim_user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_group_member_group_user_unique": { + "name": "scim_group_member_group_user_unique", + "columns": [ + { + "expression": "group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "scim_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_group_member_scim_user_idx": { + "name": "scim_group_member_scim_user_idx", + "columns": [ + { + "expression": "scim_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_group_member_group_id_scim_group_id_fk": { + "name": "scim_group_member_group_id_scim_group_id_fk", + "tableFrom": "scim_group_member", + "tableTo": "scim_group", + "columnsFrom": ["group_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_group_member_scim_user_id_scim_user_id_fk": { + "name": "scim_group_member_scim_user_id_scim_user_id_fk", + "tableFrom": "scim_group_member", + "tableTo": "scim_user", + "columnsFrom": ["scim_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_projection_grant": { + "name": "scim_projection_grant", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scim_user_id": { + "name": "scim_user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_kind": { + "name": "target_kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_id": { + "name": "target_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "permission_type": { + "name": "permission_type", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "baseline_permission": { + "name": "baseline_permission", + "type": "permission_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "origin": { + "name": "origin", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'directory'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_projection_grant_user_target_unique": { + "name": "scim_projection_grant_user_target_unique", + "columns": [ + { + "expression": "scim_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_kind", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_projection_grant_connection_idx": { + "name": "scim_projection_grant_connection_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_projection_grant_connection_id_scim_connection_id_fk": { + "name": "scim_projection_grant_connection_id_scim_connection_id_fk", + "tableFrom": "scim_projection_grant", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_projection_grant_scim_user_id_scim_user_id_fk": { + "name": "scim_projection_grant_scim_user_id_scim_user_id_fk", + "tableFrom": "scim_projection_grant", + "tableTo": "scim_user", + "columnsFrom": ["scim_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_request_log": { + "name": "scim_request_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "method": { + "name": "method", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "scim_type": { + "name": "scim_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "detail": { + "name": "detail", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "duration_ms": { + "name": "duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_request_log_connection_created_idx": { + "name": "scim_request_log_connection_created_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_request_log_connection_id_scim_connection_id_fk": { + "name": "scim_request_log_connection_id_scim_connection_id_fk", + "tableFrom": "scim_request_log", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_user": { + "name": "scim_user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_name": { + "name": "user_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active": { + "name": "active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "attributes": { + "name": "attributes", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "order_key": { + "name": "order_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_user_connection_user_unique": { + "name": "scim_user_connection_user_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_connection_user_name_unique": { + "name": "scim_user_connection_user_name_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_connection_external_id_unique": { + "name": "scim_user_connection_external_id_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "external_id is not null", + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_connection_order_idx": { + "name": "scim_user_connection_order_idx", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_user_idx": { + "name": "scim_user_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_user_connection_id_scim_connection_id_fk": { + "name": "scim_user_connection_id_scim_connection_id_fk", + "tableFrom": "scim_user", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_user_user_id_user_id_fk": { + "name": "scim_user_user_id_user_id_fk", + "tableFrom": "scim_user", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.scim_user_tombstone": { + "name": "scim_user_tombstone", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "connection_id": { + "name": "connection_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "external_id": { + "name": "external_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "scim_user_tombstone_connection_external_id_unique": { + "name": "scim_user_tombstone_connection_external_id_unique", + "columns": [ + { + "expression": "connection_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "external_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "scim_user_tombstone_user_idx": { + "name": "scim_user_tombstone_user_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "scim_user_tombstone_connection_id_scim_connection_id_fk": { + "name": "scim_user_tombstone_connection_id_scim_connection_id_fk", + "tableFrom": "scim_user_tombstone", + "tableTo": "scim_connection", + "columnsFrom": ["connection_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "scim_user_tombstone_user_id_user_id_fk": { + "name": "scim_user_tombstone_user_id_user_id_fk", + "tableFrom": "scim_user_tombstone", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.secret_usage": { + "name": "secret_usage", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret_name": { + "name": "secret_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "secret_scope": { + "name": "secret_scope", + "type": "secret_usage_scope", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "secret_owner_user_id": { + "name": "secret_owner_user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "source": { + "name": "source", + "type": "secret_usage_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "actor_user_id": { + "name": "actor_user_id", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "usage_date": { + "name": "usage_date", + "type": "date", + "primaryKey": false, + "notNull": true + }, + "use_count": { + "name": "use_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_used_at": { + "name": "last_used_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "last_execution_id": { + "name": "last_execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_trigger": { + "name": "last_trigger", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "secret_usage_bucket_unique": { + "name": "secret_usage_bucket_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_name", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_scope", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "actor_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "usage_date", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "secret_usage_secret_recent_idx": { + "name": "secret_usage_secret_recent_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_name", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_scope", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "secret_owner_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_used_at", + "isExpression": false, + "asc": false, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "secret_usage_workspace_id_workspace_id_fk": { + "name": "secret_usage_workspace_id_workspace_id_fk", + "tableFrom": "secret_usage", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.session": { + "name": "session", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "token": { + "name": "token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "ip_address": { + "name": "ip_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_agent": { + "name": "user_agent", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "active_organization_id": { + "name": "active_organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "impersonated_by": { + "name": "impersonated_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "session_user_id_idx": { + "name": "session_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "session_user_id_user_id_fk": { + "name": "session_user_id_user_id_fk", + "tableFrom": "session", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "session_active_organization_id_organization_id_fk": { + "name": "session_active_organization_id_organization_id_fk", + "tableFrom": "session", + "tableTo": "organization", + "columnsFrom": ["active_organization_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "session_token_unique": { + "name": "session_token_unique", + "nullsNotDistinct": false, + "columns": ["token"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.settings": { + "name": "settings", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "theme": { + "name": "theme", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'system'" + }, + "auto_connect": { + "name": "auto_connect", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "telemetry_enabled": { + "name": "telemetry_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "email_preferences": { + "name": "email_preferences", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "billing_usage_notifications_enabled": { + "name": "billing_usage_notifications_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "super_user_mode_enabled": { + "name": "super_user_mode_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "mothership_environment": { + "name": "mothership_environment", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'default'" + }, + "error_notifications_enabled": { + "name": "error_notifications_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "snap_to_grid_size": { + "name": "snap_to_grid_size", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "show_action_bar": { + "name": "show_action_bar", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "auto_focus_on_click": { + "name": "auto_focus_on_click", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "timezone": { + "name": "timezone", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "copilot_auto_allowed_tools": { + "name": "copilot_auto_allowed_tools", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "last_active_workspace_id": { + "name": "last_active_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "settings_user_id_user_id_fk": { + "name": "settings_user_id_user_id_fk", + "tableFrom": "settings", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "settings_user_id_unique": { + "name": "settings_user_id_unique", + "nullsNotDistinct": false, + "columns": ["user_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sim_link": { + "name": "sim_link", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "normalized_name": { + "name": "normalized_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "url": { + "name": "url", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "default_url": { + "name": "default_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "unlisted": { + "name": "unlisted", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "restrict_edit": { + "name": "restrict_edit", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "visit_count": { + "name": "visit_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_visited_at": { + "name": "last_visited_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sim_link_organization_name_unique": { + "name": "sim_link_organization_name_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "normalized_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sim_link_created_by_idx": { + "name": "sim_link_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sim_link_organization_id_organization_id_fk": { + "name": "sim_link_organization_id_organization_id_fk", + "tableFrom": "sim_link", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sim_link_created_by_user_id_fk": { + "name": "sim_link_created_by_user_id_fk", + "tableFrom": "sim_link", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sim_trigger_state": { + "name": "sim_trigger_state", + "schema": "", + "columns": { + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "block_id": { + "name": "block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scope_key": { + "name": "scope_key", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "''" + }, + "last_fired_at": { + "name": "last_fired_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "sim_trigger_state_workflow_id_workflow_id_fk": { + "name": "sim_trigger_state_workflow_id_workflow_id_fk", + "tableFrom": "sim_trigger_state", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "sim_trigger_state_workflow_id_block_id_scope_key_pk": { + "name": "sim_trigger_state_workflow_id_block_id_scope_key_pk", + "columns": ["workflow_id", "block_id", "scope_key"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.skill": { + "name": "skill", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "skill_workspace_name_unique": { + "name": "skill_workspace_name_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "skill_workspace_id_workspace_id_fk": { + "name": "skill_workspace_id_workspace_id_fk", + "tableFrom": "skill", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "skill_user_id_user_id_fk": { + "name": "skill_user_id_user_id_fk", + "tableFrom": "skill", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.skill_member": { + "name": "skill_member", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "skill_id": { + "name": "skill_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "invited_by": { + "name": "invited_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "skill_member_user_id_idx": { + "name": "skill_member_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "skill_member_unique": { + "name": "skill_member_unique", + "columns": [ + { + "expression": "skill_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "skill_member_skill_id_skill_id_fk": { + "name": "skill_member_skill_id_skill_id_fk", + "tableFrom": "skill_member", + "tableTo": "skill", + "columnsFrom": ["skill_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "skill_member_user_id_user_id_fk": { + "name": "skill_member_user_id_user_id_fk", + "tableFrom": "skill_member", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "skill_member_invited_by_user_id_fk": { + "name": "skill_member_invited_by_user_id_fk", + "tableFrom": "skill_member", + "tableTo": "user", + "columnsFrom": ["invited_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.slack_app": { + "name": "slack_app", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "client_id": { + "name": "client_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_client_secret": { + "name": "encrypted_client_secret", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "encrypted_signing_secret": { + "name": "encrypted_signing_secret", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "revision": { + "name": "revision", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "slack_app_organization_id_organization_id_fk": { + "name": "slack_app_organization_id_organization_id_fk", + "tableFrom": "slack_app", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "slack_app_owner_check": { + "name": "slack_app_owner_check", + "value": "(\"slack_app\".\"kind\" = 'custom' AND \"slack_app\".\"organization_id\" IS NOT NULL) OR (\"slack_app\".\"kind\" = 'shared' AND \"slack_app\".\"organization_id\" IS NULL)" + }, + "slack_app_custom_credentials_check": { + "name": "slack_app_custom_credentials_check", + "value": "\"slack_app\".\"kind\" = 'shared' OR (\"slack_app\".\"client_id\" IS NOT NULL AND \"slack_app\".\"encrypted_client_secret\" IS NOT NULL AND \"slack_app\".\"encrypted_signing_secret\" IS NOT NULL)" + } + }, + "isRLSEnabled": false + }, + "public.slack_search_installation": { + "name": "slack_search_installation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "credential_id": { + "name": "credential_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "app_id": { + "name": "app_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "slack_app_id": { + "name": "slack_app_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "team_id": { + "name": "team_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "team_name": { + "name": "team_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "bot_user_id": { + "name": "bot_user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "enterprise_id": { + "name": "enterprise_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "credential_version": { + "name": "credential_version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "revision": { + "name": "revision", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "last_outcome": { + "name": "last_outcome", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_event_at": { + "name": "last_event_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "slack_search_installation_organization_idx": { + "name": "slack_search_installation_organization_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_installation_credential_unique": { + "name": "slack_search_installation_credential_unique", + "columns": [ + { + "expression": "credential_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_installation_app_team_unique": { + "name": "slack_search_installation_app_team_unique", + "columns": [ + { + "expression": "app_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "team_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_installation_active_team_unique": { + "name": "slack_search_installation_active_team_unique", + "columns": [ + { + "expression": "team_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"slack_search_installation\".\"enabled\" = true", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "slack_search_installation_organization_id_organization_id_fk": { + "name": "slack_search_installation_organization_id_organization_id_fk", + "tableFrom": "slack_search_installation", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "slack_search_installation_credential_id_credential_id_fk": { + "name": "slack_search_installation_credential_id_credential_id_fk", + "tableFrom": "slack_search_installation", + "tableTo": "credential", + "columnsFrom": ["credential_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "slack_search_installation_slack_app_id_slack_app_id_fk": { + "name": "slack_search_installation_slack_app_id_slack_app_id_fk", + "tableFrom": "slack_search_installation", + "tableTo": "slack_app", + "columnsFrom": ["slack_app_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.slack_search_turn": { + "name": "slack_search_turn", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "ordinal": { + "name": "ordinal", + "type": "integer", + "primaryKey": false, + "notNull": true, + "identity": { + "type": "always", + "name": "slack_search_turn_ordinal_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "2147483647", + "cache": "1", + "cycle": false + } + }, + "installation_id": { + "name": "installation_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "conversation_key": { + "name": "conversation_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "event_id": { + "name": "event_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "lease_id": { + "name": "lease_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lease_expires_at": { + "name": "lease_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "outcome": { + "name": "outcome", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "slack_search_turn_event_unique": { + "name": "slack_search_turn_event_unique", + "columns": [ + { + "expression": "installation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "event_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_turn_pending_idx": { + "name": "slack_search_turn_pending_idx", + "columns": [ + { + "expression": "installation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_turn_thread_idx": { + "name": "slack_search_turn_thread_idx", + "columns": [ + { + "expression": "conversation_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "slack_search_turn_active_thread_unique": { + "name": "slack_search_turn_active_thread_unique", + "columns": [ + { + "expression": "conversation_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"slack_search_turn\".\"status\" = 'running'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "slack_search_turn_installation_id_slack_search_installation_id_fk": { + "name": "slack_search_turn_installation_id_slack_search_installation_id_fk", + "tableFrom": "slack_search_turn", + "tableTo": "slack_search_installation", + "columnsFrom": ["installation_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sso_domain": { + "name": "sso_domain", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "verification_token": { + "name": "verification_token", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "verified_at": { + "name": "verified_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "primary_provider_id": { + "name": "primary_provider_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "sso_domain_domain_idx": { + "name": "sso_domain_domain_idx", + "columns": [ + { + "expression": "domain", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_domain_org_domain_unique": { + "name": "sso_domain_org_domain_unique", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "domain", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_domain_verified_unique": { + "name": "sso_domain_verified_unique", + "columns": [ + { + "expression": "domain", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "status = 'verified'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sso_domain_organization_id_organization_id_fk": { + "name": "sso_domain_organization_id_organization_id_fk", + "tableFrom": "sso_domain", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sso_domain_created_by_user_id_fk": { + "name": "sso_domain_created_by_user_id_fk", + "tableFrom": "sso_domain", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.sso_provider": { + "name": "sso_provider", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "issuer": { + "name": "issuer", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "oidc_config": { + "name": "oidc_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "saml_config": { + "name": "saml_config", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "domain_verified": { + "name": "domain_verified", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "jit_provisioning_enabled": { + "name": "jit_provisioning_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + } + }, + "indexes": { + "sso_provider_provider_id_unique": { + "name": "sso_provider_provider_id_unique", + "columns": [ + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_provider_domain_idx": { + "name": "sso_provider_domain_idx", + "columns": [ + { + "expression": "domain", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_provider_user_id_idx": { + "name": "sso_provider_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "sso_provider_organization_id_idx": { + "name": "sso_provider_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "sso_provider_user_id_user_id_fk": { + "name": "sso_provider_user_id_user_id_fk", + "tableFrom": "sso_provider", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "sso_provider_organization_id_organization_id_fk": { + "name": "sso_provider_organization_id_organization_id_fk", + "tableFrom": "sso_provider", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.subscription": { + "name": "subscription", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "plan": { + "name": "plan", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "reference_id": { + "name": "reference_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "stripe_customer_id": { + "name": "stripe_customer_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stripe_subscription_id": { + "name": "stripe_subscription_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "period_start": { + "name": "period_start", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "period_end": { + "name": "period_end", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "cancel_at_period_end": { + "name": "cancel_at_period_end", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "cancel_at": { + "name": "cancel_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "canceled_at": { + "name": "canceled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "ended_at": { + "name": "ended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "seats": { + "name": "seats", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "trial_start": { + "name": "trial_start", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "trial_end": { + "name": "trial_end", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "billing_interval": { + "name": "billing_interval", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stripe_schedule_id": { + "name": "stripe_schedule_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "metadata": { + "name": "metadata", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "last_closed_period_start": { + "name": "last_closed_period_start", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "subscription_reference_status_idx": { + "name": "subscription_reference_status_idx", + "columns": [ + { + "expression": "reference_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "subscription_cycle_close_lagging_idx": { + "name": "subscription_cycle_close_lagging_idx", + "columns": [ + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"subscription\".\"status\" in ('active', 'past_due') and \"subscription\".\"period_start\" is not null and (\"subscription\".\"last_closed_period_start\" is null or \"subscription\".\"last_closed_period_start\" < \"subscription\".\"period_start\")", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "check_enterprise_metadata": { + "name": "check_enterprise_metadata", + "value": "plan != 'enterprise' OR metadata IS NOT NULL" + } + }, + "isRLSEnabled": false + }, + "public.table_jobs": { + "name": "table_jobs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "payload": { + "name": "payload", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "rows_processed": { + "name": "rows_processed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "table_jobs_one_active_per_table": { + "name": "table_jobs_one_active_per_table", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"table_jobs\".\"status\" = 'running' AND \"table_jobs\".\"type\" <> 'export'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_jobs_watchdog_idx": { + "name": "table_jobs_watchdog_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_jobs_table_started_idx": { + "name": "table_jobs_table_started_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "table_jobs_table_id_user_table_definitions_id_fk": { + "name": "table_jobs_table_id_user_table_definitions_id_fk", + "tableFrom": "table_jobs", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_jobs_workspace_id_workspace_id_fk": { + "name": "table_jobs_workspace_id_workspace_id_fk", + "tableFrom": "table_jobs", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.table_row_executions": { + "name": "table_row_executions", + "schema": "", + "columns": { + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "row_id": { + "name": "row_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "group_id": { + "name": "group_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "job_id": { + "name": "job_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "running_block_ids": { + "name": "running_block_ids", + "type": "text[]", + "primaryKey": false, + "notNull": true, + "default": "'{}'::text[]" + }, + "block_errors": { + "name": "block_errors", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "cancelled_at": { + "name": "cancelled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "capability_governed_user_id": { + "name": "capability_governed_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "enrichment_details": { + "name": "enrichment_details", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "table_row_executions_table_status_idx": { + "name": "table_row_executions_table_status_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"table_row_executions\".\"status\" IN ('queued', 'running', 'pending')", + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_row_executions_execution_id_idx": { + "name": "table_row_executions_execution_id_idx", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"table_row_executions\".\"execution_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_row_executions_table_group_idx": { + "name": "table_row_executions_table_group_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "group_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "table_row_executions_table_id_user_table_definitions_id_fk": { + "name": "table_row_executions_table_id_user_table_definitions_id_fk", + "tableFrom": "table_row_executions", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_row_executions_row_id_user_table_rows_id_fk": { + "name": "table_row_executions_row_id_user_table_rows_id_fk", + "tableFrom": "table_row_executions", + "tableTo": "user_table_rows", + "columnsFrom": ["row_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_row_executions_capability_governed_user_id_user_id_fk": { + "name": "table_row_executions_capability_governed_user_id_user_id_fk", + "tableFrom": "table_row_executions", + "tableTo": "user", + "columnsFrom": ["capability_governed_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "table_row_executions_row_id_group_id_pk": { + "name": "table_row_executions_row_id_group_id_pk", + "columns": ["row_id", "group_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.table_run_dispatches": { + "name": "table_run_dispatches", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "request_id": { + "name": "request_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "mode": { + "name": "mode", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "scope": { + "name": "scope", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "cursor": { + "name": "cursor", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "limit": { + "name": "limit", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "processed_count": { + "name": "processed_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "is_manual_run": { + "name": "is_manual_run", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "triggered_by_user_id": { + "name": "triggered_by_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "capability_governed_user_id": { + "name": "capability_governed_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "requested_at": { + "name": "requested_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "heartbeat_at": { + "name": "heartbeat_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "cancelled_at": { + "name": "cancelled_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "table_run_dispatches_active_idx": { + "name": "table_run_dispatches_active_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_run_dispatches_watchdog_idx": { + "name": "table_run_dispatches_watchdog_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "requested_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_run_dispatches_governed_active_idx": { + "name": "table_run_dispatches_governed_active_idx", + "columns": [ + { + "expression": "capability_governed_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"table_run_dispatches\".\"status\" IN ('pending', 'dispatching')", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "table_run_dispatches_table_id_user_table_definitions_id_fk": { + "name": "table_run_dispatches_table_id_user_table_definitions_id_fk", + "tableFrom": "table_run_dispatches", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_run_dispatches_workspace_id_workspace_id_fk": { + "name": "table_run_dispatches_workspace_id_workspace_id_fk", + "tableFrom": "table_run_dispatches", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_run_dispatches_triggered_by_user_id_user_id_fk": { + "name": "table_run_dispatches_triggered_by_user_id_user_id_fk", + "tableFrom": "table_run_dispatches", + "tableTo": "user", + "columnsFrom": ["triggered_by_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "table_run_dispatches_capability_governed_user_id_user_id_fk": { + "name": "table_run_dispatches_capability_governed_user_id_user_id_fk", + "tableFrom": "table_run_dispatches", + "tableTo": "user", + "columnsFrom": ["capability_governed_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.table_views": { + "name": "table_views", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "is_default": { + "name": "is_default", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "table_views_table_created_idx": { + "name": "table_views_table_created_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_views_workspace_created_idx": { + "name": "table_views_workspace_created_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "table_views_table_default_unique": { + "name": "table_views_table_default_unique", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "is_default = true", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "table_views_table_id_user_table_definitions_id_fk": { + "name": "table_views_table_id_user_table_definitions_id_fk", + "tableFrom": "table_views", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_views_workspace_id_workspace_id_fk": { + "name": "table_views_workspace_id_workspace_id_fk", + "tableFrom": "table_views", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "table_views_created_by_user_id_fk": { + "name": "table_views_created_by_user_id_fk", + "tableFrom": "table_views", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.upload_session": { + "name": "upload_session", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "token_hash": { + "name": "token_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "knowledge_base_id": { + "name": "knowledge_base_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "purpose": { + "name": "purpose", + "type": "upload_session_purpose", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "method": { + "name": "method", + "type": "upload_session_method", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "storage_context": { + "name": "storage_context", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "final_key": { + "name": "final_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "storage_provider": { + "name": "storage_provider", + "type": "upload_session_provider", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "provider_upload_id": { + "name": "provider_upload_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_object_version": { + "name": "provider_object_version", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "file_name": { + "name": "file_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "file_size": { + "name": "file_size", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "part_size": { + "name": "part_size", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "part_count": { + "name": "part_count", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "status": { + "name": "status", + "type": "upload_session_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'uploading'" + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "processing_lease_id": { + "name": "processing_lease_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "processing_lease_expires_at": { + "name": "processing_lease_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "completed_file_id": { + "name": "completed_file_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "upload_session_token_hash_unique": { + "name": "upload_session_token_hash_unique", + "columns": [ + { + "expression": "token_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "upload_session_final_key_unique": { + "name": "upload_session_final_key_unique", + "columns": [ + { + "expression": "final_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "upload_session_status_expires_at_idx": { + "name": "upload_session_status_expires_at_idx", + "columns": [ + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.usage_log": { + "name": "usage_log", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "category": { + "name": "category", + "type": "usage_log_category", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "usage_log_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "cost": { + "name": "cost", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "event_key": { + "name": "event_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "billing_entity_type": { + "name": "billing_entity_type", + "type": "billing_entity_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "billing_entity_id": { + "name": "billing_entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "billing_period_start": { + "name": "billing_period_start", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "billing_period_end": { + "name": "billing_period_end", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "usage_log_user_created_at_idx": { + "name": "usage_log_user_created_at_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_source_idx": { + "name": "usage_log_source_idx", + "columns": [ + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_workflow_id_idx": { + "name": "usage_log_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_event_key_unique": { + "name": "usage_log_event_key_unique", + "columns": [ + { + "expression": "event_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"usage_log\".\"event_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_billing_entity_period_cost_idx": { + "name": "usage_log_billing_entity_period_cost_idx", + "columns": [ + { + "expression": "billing_entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_period_start", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_period_end", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "cost", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"usage_log\".\"billing_entity_type\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_billing_entity_created_at_cost_idx": { + "name": "usage_log_billing_entity_created_at_cost_idx", + "columns": [ + { + "expression": "billing_entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "cost", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"usage_log\".\"billing_entity_type\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_workspace_created_at_cost_idx": { + "name": "usage_log_workspace_created_at_cost_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_entity_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "billing_entity_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "cost", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "usage_log_execution_id_idx": { + "name": "usage_log_execution_id_idx", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "usage_log_user_id_user_id_fk": { + "name": "usage_log_user_id_user_id_fk", + "tableFrom": "usage_log", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "usage_log_workspace_id_workspace_id_fk": { + "name": "usage_log_workspace_id_workspace_id_fk", + "tableFrom": "usage_log", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "usage_log_workflow_id_workflow_id_fk": { + "name": "usage_log_workflow_id_workflow_id_fk", + "tableFrom": "usage_log", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "usage_log_billing_scope_all_or_none": { + "name": "usage_log_billing_scope_all_or_none", + "value": "(\n (\"usage_log\".\"billing_entity_type\" IS NULL AND \"usage_log\".\"billing_entity_id\" IS NULL AND \"usage_log\".\"billing_period_start\" IS NULL AND \"usage_log\".\"billing_period_end\" IS NULL)\n OR\n (\"usage_log\".\"billing_entity_type\" IS NOT NULL AND \"usage_log\".\"billing_entity_id\" IS NOT NULL AND \"usage_log\".\"billing_period_start\" IS NOT NULL AND \"usage_log\".\"billing_period_end\" IS NOT NULL AND \"usage_log\".\"billing_period_start\" < \"usage_log\".\"billing_period_end\")\n )" + } + }, + "isRLSEnabled": false + }, + "public.user": { + "name": "user", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "normalized_email": { + "name": "normalized_email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email_verified": { + "name": "email_verified", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "image": { + "name": "image", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "stripe_customer_id": { + "name": "stripe_customer_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "role": { + "name": "role", + "type": "text", + "primaryKey": false, + "notNull": false, + "default": "'user'" + }, + "banned": { + "name": "banned", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": false + }, + "ban_reason": { + "name": "ban_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ban_expires": { + "name": "ban_expires", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "suspended_at": { + "name": "suspended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "suspension_source": { + "name": "suspension_source", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "user_email_lower_idx": { + "name": "user_email_lower_idx", + "columns": [ + { + "expression": "lower(btrim(\"email\"))", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_gmail_mailbox_idx": { + "name": "user_gmail_mailbox_idx", + "columns": [ + { + "expression": "(CASE WHEN split_part(lower(btrim(\"email\")), '@', 2) IN ('gmail.com', 'googlemail.com') THEN replace(split_part(split_part(lower(btrim(\"email\")), '@', 1), '+', 1), '.', '') || '@gmail.com' END)", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "(CASE WHEN split_part(lower(btrim(\"user\".\"email\")), '@', 2) IN ('gmail.com', 'googlemail.com') THEN replace(split_part(split_part(lower(btrim(\"user\".\"email\")), '@', 1), '+', 1), '.', '') || '@gmail.com' END) IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_email_unique": { + "name": "user_email_unique", + "nullsNotDistinct": false, + "columns": ["email"] + }, + "user_normalized_email_unique": { + "name": "user_normalized_email_unique", + "nullsNotDistinct": false, + "columns": ["normalized_email"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_stats": { + "name": "user_stats", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "current_usage_limit": { + "name": "current_usage_limit", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'5'" + }, + "usage_limit_updated_at": { + "name": "usage_limit_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "last_period_cost": { + "name": "last_period_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'0'" + }, + "billed_overage_this_period": { + "name": "billed_overage_this_period", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "credit_balance": { + "name": "credit_balance", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "last_period_copilot_cost": { + "name": "last_period_copilot_cost", + "type": "numeric", + "primaryKey": false, + "notNull": false, + "default": "'0'" + }, + "storage_used_bytes": { + "name": "storage_used_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "free_tier_eligible": { + "name": "free_tier_eligible", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "billing_blocked": { + "name": "billing_blocked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "billing_blocked_reason": { + "name": "billing_blocked_reason", + "type": "billing_blocked_reason", + "typeSchema": "public", + "primaryKey": false, + "notNull": false + }, + "limit_notifications": { + "name": "limit_notifications", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + } + }, + "indexes": {}, + "foreignKeys": { + "user_stats_user_id_user_id_fk": { + "name": "user_stats_user_id_user_id_fk", + "tableFrom": "user_stats", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "user_stats_user_id_unique": { + "name": "user_stats_user_id_unique", + "nullsNotDistinct": false, + "columns": ["user_id"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_table_definitions": { + "name": "user_table_definitions", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "folder_id": { + "name": "folder_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "schema": { + "name": "schema", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "metadata": { + "name": "metadata", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "max_rows": { + "name": "max_rows", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 10000 + }, + "row_count": { + "name": "row_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "rows_version": { + "name": "rows_version", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "schema_locked": { + "name": "schema_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "insert_locked": { + "name": "insert_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "update_locked": { + "name": "update_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "delete_locked": { + "name": "delete_locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "user_table_def_workspace_id_idx": { + "name": "user_table_def_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_def_folder_id_idx": { + "name": "user_table_def_folder_id_idx", + "columns": [ + { + "expression": "folder_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_def_created_by_idx": { + "name": "user_table_def_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "user_table_def_workspace_name_unique": { + "name": "user_table_def_workspace_name_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"user_table_definitions\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_def_archived_at_idx": { + "name": "user_table_def_archived_at_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_def_workspace_archived_partial_idx": { + "name": "user_table_def_workspace_archived_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"user_table_definitions\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_table_definitions_workspace_id_workspace_id_fk": { + "name": "user_table_definitions_workspace_id_workspace_id_fk", + "tableFrom": "user_table_definitions", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_table_definitions_folder_id_folder_id_fk": { + "name": "user_table_definitions_folder_id_folder_id_fk", + "tableFrom": "user_table_definitions", + "tableTo": "folder", + "columnsFrom": ["folder_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "user_table_definitions_created_by_user_id_fk": { + "name": "user_table_definitions_created_by_user_id_fk", + "tableFrom": "user_table_definitions", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_table_row_changes": { + "name": "user_table_row_changes", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "bigint", + "primaryKey": true, + "notNull": true, + "identity": { + "type": "always", + "name": "user_table_row_changes_id_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": "1", + "cycle": false + } + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "row_delta": { + "name": "row_delta", + "type": "integer", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "user_table_row_changes_table_id_idx": { + "name": "user_table_row_changes_table_id_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_table_row_changes_table_id_user_table_definitions_id_fk": { + "name": "user_table_row_changes_table_id_user_table_definitions_id_fk", + "tableFrom": "user_table_row_changes", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.user_table_row_secret_provenance": { + "name": "user_table_row_secret_provenance", + "schema": "", + "columns": { + "row_id": { + "name": "row_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "content_updated_at": { + "name": "content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "user_table_row_secret_provenance_row_id_user_table_rows_id_fk": { + "name": "user_table_row_secret_provenance_row_id_user_table_rows_id_fk", + "tableFrom": "user_table_row_secret_provenance", + "tableTo": "user_table_rows", + "columnsFrom": ["row_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "user_table_row_secret_provenance_status_check": { + "name": "user_table_row_secret_provenance_status_check", + "value": "\"user_table_row_secret_provenance\".\"status\" IN ('exact', 'unknown')" + } + }, + "isRLSEnabled": false + }, + "public.user_table_rows": { + "name": "user_table_rows", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "table_id": { + "name": "table_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "position": { + "name": "position", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "order_key": { + "name": "order_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "user_table_rows_created_by_idx": { + "name": "user_table_rows_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"user_table_rows\".\"created_by\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "user_table_rows_tenant_data_gin_idx": { + "name": "user_table_rows_tenant_data_gin_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "\"data\" jsonb_path_ops", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": { + "fastupdate": "off" + } + }, + "user_table_rows_workspace_table_idx": { + "name": "user_table_rows_workspace_table_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_rows_table_position_idx": { + "name": "user_table_rows_table_position_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "position", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_rows_table_order_key_idx": { + "name": "user_table_rows_table_order_key_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "order_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_rows_table_created_id_idx": { + "name": "user_table_rows_table_created_id_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "user_table_rows_table_id_id_idx": { + "name": "user_table_rows_table_id_id_idx", + "columns": [ + { + "expression": "table_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "user_table_rows_table_id_user_table_definitions_id_fk": { + "name": "user_table_rows_table_id_user_table_definitions_id_fk", + "tableFrom": "user_table_rows", + "tableTo": "user_table_definitions", + "columnsFrom": ["table_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_table_rows_workspace_id_workspace_id_fk": { + "name": "user_table_rows_workspace_id_workspace_id_fk", + "tableFrom": "user_table_rows", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "user_table_rows_created_by_user_id_fk": { + "name": "user_table_rows_created_by_user_id_fk", + "tableFrom": "user_table_rows", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.verification": { + "name": "verification", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "identifier": { + "name": "identifier", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "verification_identifier_idx": { + "name": "verification_identifier_idx", + "columns": [ + { + "expression": "identifier", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "verification_expires_at_idx": { + "name": "verification_expires_at_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.waitlist": { + "name": "waitlist", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "waitlist_email_unique": { + "name": "waitlist_email_unique", + "nullsNotDistinct": false, + "columns": ["email"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.webhook": { + "name": "webhook", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "registration_status": { + "name": "registration_status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "registration_generation": { + "name": "registration_generation", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "config_fingerprint": { + "name": "config_fingerprint", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "prepared_at": { + "name": "prepared_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "block_id": { + "name": "block_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "path": { + "name": "path", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "routing_key": { + "name": "routing_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider": { + "name": "provider", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "provider_config": { + "name": "provider_config", + "type": "json", + "primaryKey": false, + "notNull": false + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "failed_count": { + "name": "failed_count", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "last_failed_at": { + "name": "last_failed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "path_deployment_unique": { + "name": "path_deployment_unique", + "columns": [ + { + "expression": "path", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"webhook\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_workflow_deployment_idx": { + "name": "webhook_workflow_deployment_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_routing_key_active_idx": { + "name": "webhook_routing_key_active_idx", + "columns": [ + { + "expression": "routing_key", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"webhook\".\"archived_at\" IS NULL AND \"webhook\".\"routing_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_archived_at_partial_idx": { + "name": "webhook_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"webhook\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_webhook_on_provider_is_active_workflow_id_deploym_bdeed5468": { + "name": "idx_webhook_on_provider_is_active_workflow_id_deploym_bdeed5468", + "columns": [ + { + "expression": "provider", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "is_active", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_webhook_on_workflow_id_block_id_updated_at_desc": { + "name": "idx_webhook_on_workflow_id_block_id_updated_at_desc", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": false, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_active_registration_unique": { + "name": "webhook_active_registration_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"webhook\".\"registration_status\" = 'active' AND \"webhook\".\"block_id\" IS NOT NULL AND \"webhook\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_candidate_registration_unique": { + "name": "webhook_candidate_registration_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"webhook\".\"registration_status\" = 'candidate' AND \"webhook\".\"block_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "webhook_registration_status_generation_idx": { + "name": "webhook_registration_status_generation_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "registration_status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "registration_generation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "webhook_workflow_id_workflow_id_fk": { + "name": "webhook_workflow_id_workflow_id_fk", + "tableFrom": "webhook", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "webhook_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "webhook_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "webhook", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "webhook_registration_status_check": { + "name": "webhook_registration_status_check", + "value": "\"webhook\".\"registration_status\" IS NULL OR \"webhook\".\"registration_status\" IN ('active', 'candidate', 'retired', 'orphaned')" + }, + "webhook_registration_generation_check": { + "name": "webhook_registration_generation_check", + "value": "\"webhook\".\"registration_generation\" IS NULL OR \"webhook\".\"registration_generation\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.webhook_path_claim": { + "name": "webhook_path_claim", + "schema": "", + "columns": { + "path": { + "name": "path", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "generation": { + "name": "generation", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "webhook_path_claim_workflow_idx": { + "name": "webhook_path_claim_workflow_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "webhook_path_claim_workflow_id_workflow_id_fk": { + "name": "webhook_path_claim_workflow_id_workflow_id_fk", + "tableFrom": "webhook_path_claim", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "webhook_path_claim_generation_check": { + "name": "webhook_path_claim_generation_check", + "value": "\"webhook_path_claim\".\"generation\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.workflow": { + "name": "workflow", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "folder_id": { + "name": "folder_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "sort_order": { + "name": "sort_order", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "last_synced": { + "name": "last_synced", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "is_deployed": { + "name": "is_deployed", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "deployed_at": { + "name": "deployed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "is_public_api": { + "name": "is_public_api", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "locked": { + "name": "locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "fork_sync_excluded": { + "name": "fork_sync_excluded", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "run_count": { + "name": "run_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "last_run_at": { + "name": "last_run_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "variables": { + "name": "variables", + "type": "json", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "code_meta": { + "name": "code_meta", + "type": "jsonb", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workflow_workspace_id_idx": { + "name": "workflow_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_user_workspace_idx": { + "name": "workflow_user_workspace_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_workspace_folder_name_active_unique": { + "name": "workflow_workspace_folder_name_active_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"folder_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_folder_sort_idx": { + "name": "workflow_folder_sort_idx", + "columns": [ + { + "expression": "folder_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sort_order", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_active_workspace_sort_idx": { + "name": "workflow_active_workspace_sort_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sort_order", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_archived_at_idx": { + "name": "workflow_archived_at_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_workspace_archived_partial_idx": { + "name": "workflow_workspace_archived_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_user_id_user_id_fk": { + "name": "workflow_user_id_user_id_fk", + "tableFrom": "workflow", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_workspace_id_workspace_id_fk": { + "name": "workflow_workspace_id_workspace_id_fk", + "tableFrom": "workflow", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_folder_id_folder_id_fk": { + "name": "workflow_folder_id_folder_id_fk", + "tableFrom": "workflow", + "tableTo": "folder", + "columnsFrom": ["folder_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_blocks": { + "name": "workflow_blocks", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "position_x": { + "name": "position_x", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "position_y": { + "name": "position_y", + "type": "numeric", + "primaryKey": false, + "notNull": true + }, + "enabled": { + "name": "enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "horizontal_handles": { + "name": "horizontal_handles", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "is_wide": { + "name": "is_wide", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "advanced_mode": { + "name": "advanced_mode", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "trigger_mode": { + "name": "trigger_mode", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "error_enabled": { + "name": "error_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "retry": { + "name": "retry", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "locked": { + "name": "locked", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "height": { + "name": "height", + "type": "numeric", + "primaryKey": false, + "notNull": true, + "default": "'0'" + }, + "sub_blocks": { + "name": "sub_blocks", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "outputs": { + "name": "outputs", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "data": { + "name": "data", + "type": "jsonb", + "primaryKey": false, + "notNull": false, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_blocks_workflow_id_idx": { + "name": "workflow_blocks_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_blocks_type_idx": { + "name": "workflow_blocks_type_idx", + "columns": [ + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_blocks_workflow_id_workflow_id_fk": { + "name": "workflow_blocks_workflow_id_workflow_id_fk", + "tableFrom": "workflow_blocks", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_checkpoints": { + "name": "workflow_checkpoints", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "message_id": { + "name": "message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workflow_state": { + "name": "workflow_state", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_checkpoints_chat_id_idx": { + "name": "workflow_checkpoints_chat_id_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_message_id_idx": { + "name": "workflow_checkpoints_message_id_idx", + "columns": [ + { + "expression": "message_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_user_workflow_idx": { + "name": "workflow_checkpoints_user_workflow_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_workflow_chat_idx": { + "name": "workflow_checkpoints_workflow_chat_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_created_at_idx": { + "name": "workflow_checkpoints_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_checkpoints_chat_created_at_idx": { + "name": "workflow_checkpoints_chat_created_at_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_checkpoints_user_id_user_id_fk": { + "name": "workflow_checkpoints_user_id_user_id_fk", + "tableFrom": "workflow_checkpoints", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_checkpoints_workflow_id_workflow_id_fk": { + "name": "workflow_checkpoints_workflow_id_workflow_id_fk", + "tableFrom": "workflow_checkpoints", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_checkpoints_chat_id_copilot_chats_id_fk": { + "name": "workflow_checkpoints_chat_id_copilot_chats_id_fk", + "tableFrom": "workflow_checkpoints", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_deployment_operation": { + "name": "workflow_deployment_operation", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "previous_active_version_id": { + "name": "previous_active_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "action": { + "name": "action", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "protocol_version": { + "name": "protocol_version", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "generation": { + "name": "generation", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'preparing'" + }, + "component_readiness": { + "name": "component_readiness", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'::jsonb" + }, + "error_code": { + "name": "error_code", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "error_message": { + "name": "error_message", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "idempotency_key": { + "name": "idempotency_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "request_hash": { + "name": "request_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "actor_id": { + "name": "actor_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_deployment_operation_workflow_generation_unique": { + "name": "workflow_deployment_operation_workflow_generation_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "generation", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_workflow_idempotency_unique": { + "name": "workflow_deployment_operation_workflow_idempotency_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "idempotency_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_deployment_operation\".\"idempotency_key\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_workflow_in_flight_unique": { + "name": "workflow_deployment_operation_workflow_in_flight_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_deployment_operation\".\"status\" IN ('preparing', 'activating')", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_workflow_status_idx": { + "name": "workflow_deployment_operation_workflow_status_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_deployment_version_idx": { + "name": "workflow_deployment_operation_deployment_version_idx", + "columns": [ + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_operation_workflow_version_generation_idx": { + "name": "workflow_deployment_operation_workflow_version_generation_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "generation", + "isExpression": false, + "asc": false, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_deployment_operation_workflow_id_workflow_id_fk": { + "name": "workflow_deployment_operation_workflow_id_workflow_id_fk", + "tableFrom": "workflow_deployment_operation", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_deployment_operation_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "workflow_deployment_operation_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "workflow_deployment_operation", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_deployment_operation_previous_active_version_id_workflow_deployment_version_id_fk": { + "name": "workflow_deployment_operation_previous_active_version_id_workflow_deployment_version_id_fk", + "tableFrom": "workflow_deployment_operation", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["previous_active_version_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workflow_deployment_operation_action_check": { + "name": "workflow_deployment_operation_action_check", + "value": "\"workflow_deployment_operation\".\"action\" IN ('deploy', 'activate')" + }, + "workflow_deployment_operation_status_check": { + "name": "workflow_deployment_operation_status_check", + "value": "\"workflow_deployment_operation\".\"status\" IN ('preparing', 'activating', 'active', 'failed', 'superseded')" + }, + "workflow_deployment_operation_generation_check": { + "name": "workflow_deployment_operation_generation_check", + "value": "\"workflow_deployment_operation\".\"generation\" > 0" + }, + "workflow_deployment_operation_protocol_version_check": { + "name": "workflow_deployment_operation_protocol_version_check", + "value": "\"workflow_deployment_operation\".\"protocol_version\" > 0" + } + }, + "isRLSEnabled": false + }, + "public.workflow_deployment_version": { + "name": "workflow_deployment_version", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "state": { + "name": "state", + "type": "json", + "primaryKey": false, + "notNull": true + }, + "is_active": { + "name": "is_active", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workflow_deployment_version_workflow_version_unique": { + "name": "workflow_deployment_version_workflow_version_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_version_workflow_active_idx": { + "name": "workflow_deployment_version_workflow_active_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "is_active", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_deployment_version_created_at_idx": { + "name": "workflow_deployment_version_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_deployment_version_workflow_id_workflow_id_fk": { + "name": "workflow_deployment_version_workflow_id_workflow_id_fk", + "tableFrom": "workflow_deployment_version", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_edges": { + "name": "workflow_edges", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_block_id": { + "name": "source_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_block_id": { + "name": "target_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_handle": { + "name": "source_handle", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "target_handle": { + "name": "target_handle", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_edges_workflow_source_idx": { + "name": "workflow_edges_workflow_source_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_edges_workflow_target_idx": { + "name": "workflow_edges_workflow_target_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_edges_workflow_id_workflow_id_fk": { + "name": "workflow_edges_workflow_id_workflow_id_fk", + "tableFrom": "workflow_edges", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_edges_source_block_id_workflow_blocks_id_fk": { + "name": "workflow_edges_source_block_id_workflow_blocks_id_fk", + "tableFrom": "workflow_edges", + "tableTo": "workflow_blocks", + "columnsFrom": ["source_block_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_edges_target_block_id_workflow_blocks_id_fk": { + "name": "workflow_edges_target_block_id_workflow_blocks_id_fk", + "tableFrom": "workflow_edges", + "tableTo": "workflow_blocks", + "columnsFrom": ["target_block_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_execution_logs": { + "name": "workflow_execution_logs", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "execution_id": { + "name": "execution_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "state_snapshot_id": { + "name": "state_snapshot_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "level": { + "name": "level", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "trigger": { + "name": "trigger", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "execution_deadline_at": { + "name": "execution_deadline_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "ended_at": { + "name": "ended_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "total_duration_ms": { + "name": "total_duration_ms", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "execution_data": { + "name": "execution_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "cost_total": { + "name": "cost_total", + "type": "numeric", + "primaryKey": false, + "notNull": false + }, + "models_used": { + "name": "models_used", + "type": "text[]", + "primaryKey": false, + "notNull": false + }, + "files": { + "name": "files", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_execution_logs_state_snapshot_id_idx": { + "name": "workflow_execution_logs_state_snapshot_id_idx", + "columns": [ + { + "expression": "state_snapshot_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_deployment_version_id_idx": { + "name": "workflow_execution_logs_deployment_version_id_idx", + "columns": [ + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_trigger_idx": { + "name": "workflow_execution_logs_trigger_idx", + "columns": [ + { + "expression": "trigger", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_level_idx": { + "name": "workflow_execution_logs_level_idx", + "columns": [ + { + "expression": "level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_started_at_idx": { + "name": "workflow_execution_logs_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_execution_id_unique": { + "name": "workflow_execution_logs_execution_id_unique", + "columns": [ + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_workflow_started_at_idx": { + "name": "workflow_execution_logs_workflow_started_at_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_workspace_activity_level_idx": { + "name": "workflow_execution_logs_workspace_activity_level_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "total_duration_ms", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "trigger", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "level", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_workspace_started_at_id_desc_idx": { + "name": "workflow_execution_logs_workspace_started_at_id_desc_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "\"started_at\" DESC NULLS LAST", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "\"id\" DESC", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_workspace_cost_total_idx": { + "name": "workflow_execution_logs_workspace_cost_total_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "cost_total", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_models_used_idx": { + "name": "workflow_execution_logs_models_used_idx", + "columns": [ + { + "expression": "models_used", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + }, + "workflow_execution_logs_workspace_ended_at_id_idx": { + "name": "workflow_execution_logs_workspace_ended_at_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "date_trunc('milliseconds', \"ended_at\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_running_started_at_idx": { + "name": "workflow_execution_logs_running_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "status = 'running'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_running_deadline_idx": { + "name": "workflow_execution_logs_running_deadline_idx", + "columns": [ + { + "expression": "execution_deadline_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_execution_logs\".\"status\" = 'running' AND \"workflow_execution_logs\".\"execution_deadline_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_redacting_started_at_idx": { + "name": "workflow_execution_logs_redacting_started_at_idx", + "columns": [ + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "status = 'redacting'", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_redacting_deadline_idx": { + "name": "workflow_execution_logs_redacting_deadline_idx", + "columns": [ + { + "expression": "execution_deadline_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_execution_logs\".\"status\" = 'redacting' AND \"workflow_execution_logs\".\"execution_deadline_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_execution_logs_completed_ended_at_idx": { + "name": "workflow_execution_logs_completed_ended_at_idx", + "columns": [ + { + "expression": "ended_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "execution_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_execution_logs\".\"status\" = 'completed' AND \"workflow_execution_logs\".\"level\" = 'info' AND \"workflow_execution_logs\".\"ended_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_execution_logs_workflow_id_workflow_id_fk": { + "name": "workflow_execution_logs_workflow_id_workflow_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workflow_execution_logs_workspace_id_workspace_id_fk": { + "name": "workflow_execution_logs_workspace_id_workspace_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_execution_logs_state_snapshot_id_workflow_execution_snapshots_id_fk": { + "name": "workflow_execution_logs_state_snapshot_id_workflow_execution_snapshots_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workflow_execution_snapshots", + "columnsFrom": ["state_snapshot_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workflow_execution_logs_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "workflow_execution_logs_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "workflow_execution_logs", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_execution_snapshots": { + "name": "workflow_execution_snapshots", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "state_hash": { + "name": "state_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "state_data": { + "name": "state_data", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_snapshots_hash_idx": { + "name": "workflow_snapshots_hash_idx", + "columns": [ + { + "expression": "state_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_snapshots_workflow_hash_idx": { + "name": "workflow_snapshots_workflow_hash_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "state_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_snapshots_created_at_idx": { + "name": "workflow_snapshots_created_at_idx", + "columns": [ + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_execution_snapshots_workflow_id_workflow_id_fk": { + "name": "workflow_execution_snapshots_workflow_id_workflow_id_fk", + "tableFrom": "workflow_execution_snapshots", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_mcp_server": { + "name": "workflow_mcp_server", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_public": { + "name": "is_public", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_mcp_server_workspace_id_idx": { + "name": "workflow_mcp_server_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_server_created_by_idx": { + "name": "workflow_mcp_server_created_by_idx", + "columns": [ + { + "expression": "created_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_server_deleted_at_idx": { + "name": "workflow_mcp_server_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_server_workspace_deleted_partial_idx": { + "name": "workflow_mcp_server_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_mcp_server\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_mcp_server_workspace_id_workspace_id_fk": { + "name": "workflow_mcp_server_workspace_id_workspace_id_fk", + "tableFrom": "workflow_mcp_server", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_mcp_server_created_by_user_id_fk": { + "name": "workflow_mcp_server_created_by_user_id_fk", + "tableFrom": "workflow_mcp_server", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_mcp_tool": { + "name": "workflow_mcp_tool", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "server_id": { + "name": "server_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tool_name": { + "name": "tool_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "tool_description": { + "name": "tool_description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "parameter_schema": { + "name": "parameter_schema", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "parameter_description_overrides": { + "name": "parameter_description_overrides", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'::json" + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_mcp_tool_server_id_idx": { + "name": "workflow_mcp_tool_server_id_idx", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_tool_workflow_id_idx": { + "name": "workflow_mcp_tool_workflow_id_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_tool_server_workflow_unique": { + "name": "workflow_mcp_tool_server_workflow_unique", + "columns": [ + { + "expression": "server_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_mcp_tool\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_mcp_tool_archived_at_partial_idx": { + "name": "workflow_mcp_tool_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_mcp_tool\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_mcp_tool_server_id_workflow_mcp_server_id_fk": { + "name": "workflow_mcp_tool_server_id_workflow_mcp_server_id_fk", + "tableFrom": "workflow_mcp_tool", + "tableTo": "workflow_mcp_server", + "columnsFrom": ["server_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_mcp_tool_workflow_id_workflow_id_fk": { + "name": "workflow_mcp_tool_workflow_id_workflow_id_fk", + "tableFrom": "workflow_mcp_tool", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_schedule": { + "name": "workflow_schedule", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deployment_version_id": { + "name": "deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deployment_operation_id": { + "name": "deployment_operation_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "block_id": { + "name": "block_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "cron_expression": { + "name": "cron_expression", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "next_run_at": { + "name": "next_run_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_ran_at": { + "name": "last_ran_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "last_queued_at": { + "name": "last_queued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "trigger_type": { + "name": "trigger_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "timezone": { + "name": "timezone", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'UTC'" + }, + "failed_count": { + "name": "failed_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "infra_retry_count": { + "name": "infra_retry_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'active'" + }, + "last_failed_at": { + "name": "last_failed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "source_type": { + "name": "source_type", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'workflow'" + }, + "job_title": { + "name": "job_title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "prompt": { + "name": "prompt", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "lifecycle": { + "name": "lifecycle", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'persistent'" + }, + "success_condition": { + "name": "success_condition", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "max_runs": { + "name": "max_runs", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "run_count": { + "name": "run_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "source_chat_id": { + "name": "source_chat_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_task_name": { + "name": "source_task_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_user_id": { + "name": "source_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_workspace_id": { + "name": "source_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_scope": { + "name": "secret_scope", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'all'" + }, + "mounted_secrets": { + "name": "mounted_secrets", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "job_history": { + "name": "job_history", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "contexts": { + "name": "contexts", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "excluded_dates": { + "name": "excluded_dates", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "ends_at": { + "name": "ends_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "run_budget_usd": { + "name": "run_budget_usd", + "type": "numeric(12, 4)", + "primaryKey": false, + "notNull": false + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_schedule_workflow_block_deployment_unique": { + "name": "workflow_schedule_workflow_block_deployment_unique", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_schedule\".\"archived_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_schedule_workflow_deployment_idx": { + "name": "workflow_schedule_workflow_deployment_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_schedule_archived_at_partial_idx": { + "name": "workflow_schedule_archived_at_partial_idx", + "columns": [ + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_schedule\".\"archived_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "idx_workflow_schedule_on_source_workspace_id_source_t_c07f3bba6": { + "name": "idx_workflow_schedule_on_source_workspace_id_source_t_c07f3bba6", + "columns": [ + { + "expression": "source_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "archived_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_schedule_due_workflow_idx": { + "name": "workflow_schedule_due_workflow_idx", + "columns": [ + { + "expression": "next_run_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_queued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deployment_version_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_schedule\".\"archived_at\" IS NULL AND \"workflow_schedule\".\"status\" NOT IN ('disabled', 'completed') AND (\"workflow_schedule\".\"source_type\" = 'workflow' OR \"workflow_schedule\".\"source_type\" IS NULL)", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_schedule_due_job_idx": { + "name": "workflow_schedule_due_job_idx", + "columns": [ + { + "expression": "next_run_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "last_queued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workflow_schedule\".\"archived_at\" IS NULL AND \"workflow_schedule\".\"status\" NOT IN ('disabled', 'completed') AND \"workflow_schedule\".\"source_type\" = 'job'", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_schedule_workflow_id_workflow_id_fk": { + "name": "workflow_schedule_workflow_id_workflow_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_schedule_deployment_version_id_workflow_deployment_version_id_fk": { + "name": "workflow_schedule_deployment_version_id_workflow_deployment_version_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "workflow_deployment_version", + "columnsFrom": ["deployment_version_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_schedule_deployment_operation_id_workflow_deployment_operation_id_fk": { + "name": "workflow_schedule_deployment_operation_id_workflow_deployment_operation_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "workflow_deployment_operation", + "columnsFrom": ["deployment_operation_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workflow_schedule_source_user_id_user_id_fk": { + "name": "workflow_schedule_source_user_id_user_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "user", + "columnsFrom": ["source_user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_schedule_source_workspace_id_workspace_id_fk": { + "name": "workflow_schedule_source_workspace_id_workspace_id_fk", + "tableFrom": "workflow_schedule", + "tableTo": "workspace", + "columnsFrom": ["source_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_subflows": { + "name": "workflow_subflows", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "config": { + "name": "config", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_subflows_workflow_type_idx": { + "name": "workflow_subflows_workflow_type_idx", + "columns": [ + { + "expression": "workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "type", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_subflows_workflow_id_workflow_id_fk": { + "name": "workflow_subflows_workflow_id_workflow_id_fk", + "tableFrom": "workflow_subflows", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_test": { + "name": "workflow_test", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "description": { + "name": "description", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "body_file_id": { + "name": "body_file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "cases": { + "name": "cases", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'" + }, + "source_hash": { + "name": "source_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_by_user_id": { + "name": "created_by_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workflow_test_workspace_name_unique": { + "name": "workflow_test_workspace_name_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workflow_test\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workflow_test_body_file_unique": { + "name": "workflow_test_body_file_unique", + "columns": [ + { + "expression": "body_file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_test_workspace_id_workspace_id_fk": { + "name": "workflow_test_workspace_id_workspace_id_fk", + "tableFrom": "workflow_test", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_test_body_file_id_workspace_files_id_fk": { + "name": "workflow_test_body_file_id_workspace_files_id_fk", + "tableFrom": "workflow_test", + "tableTo": "workspace_files", + "columnsFrom": ["body_file_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workflow_test_created_by_user_id_user_id_fk": { + "name": "workflow_test_created_by_user_id_user_id_fk", + "tableFrom": "workflow_test", + "tableTo": "user", + "columnsFrom": ["created_by_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workflow_test_run": { + "name": "workflow_test_run", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "test_id": { + "name": "test_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "version": { + "name": "version", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'running'" + }, + "passed": { + "name": "passed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "failed": { + "name": "failed", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "skipped": { + "name": "skipped", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "report": { + "name": "report", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "error": { + "name": "error", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_hash": { + "name": "source_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ran_against": { + "name": "ran_against", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "progress": { + "name": "progress", + "type": "jsonb", + "primaryKey": false, + "notNull": false + }, + "triggered_by_actor": { + "name": "triggered_by_actor", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "triggered_by_user_id": { + "name": "triggered_by_user_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "started_at": { + "name": "started_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workflow_test_run_test_version_started_idx": { + "name": "workflow_test_run_test_version_started_idx", + "columns": [ + { + "expression": "test_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "started_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workflow_test_run_test_id_workflow_test_id_fk": { + "name": "workflow_test_run_test_id_workflow_test_id_fk", + "tableFrom": "workflow_test_run", + "tableTo": "workflow_test", + "columnsFrom": ["test_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_test_run_workspace_id_workspace_id_fk": { + "name": "workflow_test_run_workspace_id_workspace_id_fk", + "tableFrom": "workflow_test_run", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workflow_test_run_triggered_by_user_id_user_id_fk": { + "name": "workflow_test_run_triggered_by_user_id_user_id_fk", + "tableFrom": "workflow_test_run", + "tableTo": "user", + "columnsFrom": ["triggered_by_user_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workflow_test_run_version_check": { + "name": "workflow_test_run_version_check", + "value": "\"workflow_test_run\".\"version\" IN ('draft', 'deployed')" + }, + "workflow_test_run_status_check": { + "name": "workflow_test_run_status_check", + "value": "\"workflow_test_run\".\"status\" IN ('running', 'passed', 'failed', 'error')" + }, + "workflow_test_run_completed_check": { + "name": "workflow_test_run_completed_check", + "value": "(\"workflow_test_run\".\"status\" = 'running') = (\"workflow_test_run\".\"completed_at\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.workload_identity_pending_subject": { + "name": "workload_identity_pending_subject", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider": { + "name": "provider", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "subject": { + "name": "subject", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "workload_identity_pending_subject_subject_unique": { + "name": "workload_identity_pending_subject_subject_unique", + "columns": [ + { + "expression": "subject", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workload_identity_pending_subject_issuer_idx": { + "name": "workload_identity_pending_subject_issuer_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workload_identity_pending_subject_user_id_idx": { + "name": "workload_identity_pending_subject_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workload_identity_pending_subject_workspace_id_workspace_id_fk": { + "name": "workload_identity_pending_subject_workspace_id_workspace_id_fk", + "tableFrom": "workload_identity_pending_subject", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workload_identity_pending_subject_user_id_user_id_fk": { + "name": "workload_identity_pending_subject_user_id_user_id_fk", + "tableFrom": "workload_identity_pending_subject", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace": { + "name": "workspace", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "color": { + "name": "color", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'#33C482'" + }, + "logo_url": { + "name": "logo_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "owner_id": { + "name": "owner_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_scope_key": { + "name": "organization_scope_key", + "type": "text", + "primaryKey": false, + "notNull": false, + "generated": { + "as": "CASE WHEN organization_id IS NULL THEN 'personal' ELSE 'organization:' || organization_id END", + "type": "stored" + } + }, + "project_id": { + "name": "project_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_mode": { + "name": "workspace_mode", + "type": "workspace_mode", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'grandfathered_shared'" + }, + "billed_account_user_id": { + "name": "billed_account_user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "storage_used_bytes": { + "name": "storage_used_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "allow_personal_api_keys": { + "name": "allow_personal_api_keys", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": true + }, + "inbox_enabled": { + "name": "inbox_enabled", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "inbox_address": { + "name": "inbox_address", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "inbox_provider_id": { + "name": "inbox_provider_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "inbox_secret_scope": { + "name": "inbox_secret_scope", + "type": "text", + "primaryKey": false, + "notNull": true, + "default": "'all'" + }, + "inbox_mounted_secrets": { + "name": "inbox_mounted_secrets", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "archived_at": { + "name": "archived_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "organization_assigned_at": { + "name": "organization_assigned_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "forked_from_workspace_id": { + "name": "forked_from_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "fork_sync_new_workflows_excluded": { + "name": "fork_sync_new_workflows_excluded", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_owner_id_idx": { + "name": "workspace_owner_id_idx", + "columns": [ + { + "expression": "owner_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_organization_id_idx": { + "name": "workspace_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_billed_account_user_id_idx": { + "name": "workspace_billed_account_user_id_idx", + "columns": [ + { + "expression": "billed_account_user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_project_id_id_idx": { + "name": "workspace_project_id_id_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_mode_idx": { + "name": "workspace_mode_idx", + "columns": [ + { + "expression": "workspace_mode", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_forked_from_workspace_id_idx": { + "name": "workspace_forked_from_workspace_id_idx", + "columns": [ + { + "expression": "forked_from_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_inbox_provider_id_idx": { + "name": "workspace_inbox_provider_id_idx", + "columns": [ + { + "expression": "inbox_provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace\".\"inbox_provider_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_owner_id_user_id_fk": { + "name": "workspace_owner_id_user_id_fk", + "tableFrom": "workspace", + "tableTo": "user", + "columnsFrom": ["owner_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_organization_id_organization_id_fk": { + "name": "workspace_organization_id_organization_id_fk", + "tableFrom": "workspace", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workspace_project_id_project_id_fk": { + "name": "workspace_project_id_project_id_fk", + "tableFrom": "workspace", + "tableTo": "project", + "columnsFrom": ["project_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "workspace_billed_account_user_id_user_id_fk": { + "name": "workspace_billed_account_user_id_user_id_fk", + "tableFrom": "workspace", + "tableTo": "user", + "columnsFrom": ["billed_account_user_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workspace_forked_from_workspace_id_workspace_id_fk": { + "name": "workspace_forked_from_workspace_id_workspace_id_fk", + "tableFrom": "workspace", + "tableTo": "workspace", + "columnsFrom": ["forked_from_workspace_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workspace_project_organization_fk": { + "name": "workspace_project_organization_fk", + "tableFrom": "workspace", + "tableTo": "project", + "columnsFrom": ["project_id", "organization_scope_key"], + "columnsTo": ["id", "organization_scope_key"], + "onDelete": "no action", + "onUpdate": "no action" + }, + "workspace_fork_project_fk": { + "name": "workspace_fork_project_fk", + "tableFrom": "workspace", + "tableTo": "workspace", + "columnsFrom": ["forked_from_workspace_id", "project_id"], + "columnsTo": ["id", "project_id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "workspace_id_project_unique": { + "name": "workspace_id_project_unique", + "nullsNotDistinct": false, + "columns": ["id", "project_id"] + } + }, + "policies": {}, + "checkConstraints": { + "workspace_storage_used_bytes_non_negative": { + "name": "workspace_storage_used_bytes_non_negative", + "value": "\"workspace\".\"storage_used_bytes\" >= 0" + } + }, + "isRLSEnabled": false + }, + "public.workspace_byok_keys": { + "name": "workspace_byok_keys", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "provider_id": { + "name": "provider_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "encrypted_api_key": { + "name": "encrypted_api_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_byok_workspace_provider_idx": { + "name": "workspace_byok_workspace_provider_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "provider_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_byok_keys_workspace_id_workspace_id_fk": { + "name": "workspace_byok_keys_workspace_id_workspace_id_fk", + "tableFrom": "workspace_byok_keys", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_byok_keys_created_by_user_id_fk": { + "name": "workspace_byok_keys_created_by_user_id_fk", + "tableFrom": "workspace_byok_keys", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_environment": { + "name": "workspace_environment", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "variables": { + "name": "variables", + "type": "json", + "primaryKey": false, + "notNull": true, + "default": "'{}'" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_environment_workspace_unique": { + "name": "workspace_environment_workspace_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_environment_workspace_id_workspace_id_fk": { + "name": "workspace_environment_workspace_id_workspace_id_fk", + "tableFrom": "workspace_environment", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file": { + "name": "workspace_file", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "size": { + "name": "size", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "type": { + "name": "type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "uploaded_by": { + "name": "uploaded_by", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_file_workspace_id_idx": { + "name": "workspace_file_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_deleted_at_idx": { + "name": "workspace_file_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_workspace_deleted_partial_idx": { + "name": "workspace_file_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_uploaded_by_idx": { + "name": "workspace_file_uploaded_by_idx", + "columns": [ + { + "expression": "uploaded_by", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_workspace_id_workspace_id_fk": { + "name": "workspace_file_workspace_id_workspace_id_fk", + "tableFrom": "workspace_file", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_uploaded_by_user_id_fk": { + "name": "workspace_file_uploaded_by_user_id_fk", + "tableFrom": "workspace_file", + "tableTo": "user", + "columnsFrom": ["uploaded_by"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": { + "workspace_file_key_unique": { + "name": "workspace_file_key_unique", + "nullsNotDistinct": false, + "columns": ["key"] + } + }, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_collab_state": { + "name": "workspace_file_collab_state", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "doc_state": { + "name": "doc_state", + "type": "bytea", + "primaryKey": false, + "notNull": true + }, + "source_hash": { + "name": "source_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "workspace_file_collab_state_file_id_workspace_files_id_fk": { + "name": "workspace_file_collab_state_file_id_workspace_files_id_fk", + "tableFrom": "workspace_file_collab_state", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_search_backfill": { + "name": "workspace_file_search_backfill", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "after_workspace_id": { + "name": "after_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "after_entity_type": { + "name": "after_entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "after_entity_id": { + "name": "after_entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "after_file_id": { + "name": "after_file_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "completed_at": { + "name": "completed_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_search_build": { + "name": "workspace_file_search_build", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "artifact_key": { + "name": "artifact_key", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workspace_file_search_build_file_idx": { + "name": "workspace_file_search_build_file_idx", + "columns": [ + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_build_cleanup_idx": { + "name": "workspace_file_search_build_cleanup_idx", + "columns": [ + { + "expression": "expires_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_build\".\"expires_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "file_search_build_owner_check": { + "name": "file_search_build_owner_check", + "value": "(\"workspace_file_search_build\".\"entity_type\" IS NULL AND \"workspace_file_search_build\".\"entity_id\" IS NULL AND \"workspace_file_search_build\".\"workspace_id\" IS NOT NULL) OR (\"workspace_file_search_build\".\"entity_type\" = 'workspace' AND \"workspace_file_search_build\".\"entity_id\" = \"workspace_file_search_build\".\"workspace_id\") OR (\"workspace_file_search_build\".\"entity_type\" = 'project' AND length(\"workspace_file_search_build\".\"entity_id\") > 0 AND \"workspace_file_search_build\".\"workspace_id\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.workspace_file_search_chunk": { + "name": "workspace_file_search_chunk", + "schema": "", + "columns": { + "build_id": { + "name": "build_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "ordinal": { + "name": "ordinal", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "line_start": { + "name": "line_start", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "fragment": { + "name": "fragment", + "type": "boolean", + "primaryKey": false, + "notNull": true + }, + "overlap": { + "name": "overlap", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "file_search_chunk_owner_content_idx": { + "name": "file_search_chunk_owner_content_idx", + "columns": [ + { + "expression": "entity_type", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "entity_id", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "content", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "gin_trgm_ops" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_chunk\".\"entity_type\" = 'project'", + "concurrently": true, + "method": "gin", + "with": { + "fastupdate": "off" + } + }, + "workspace_file_search_chunk_line_idx": { + "name": "workspace_file_search_chunk_line_idx", + "columns": [ + { + "expression": "build_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "line_start", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "ordinal", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_chunk_content_idx": { + "name": "workspace_file_search_chunk_content_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "content", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "gin_trgm_ops" + } + ], + "isUnique": false, + "concurrently": true, + "method": "gin", + "with": { + "fastupdate": "off" + } + } + }, + "foreignKeys": { + "workspace_file_search_chunk_build_id_workspace_file_search_build_id_fk": { + "name": "workspace_file_search_chunk_build_id_workspace_file_search_build_id_fk", + "tableFrom": "workspace_file_search_chunk", + "tableTo": "workspace_file_search_build", + "columnsFrom": ["build_id"], + "columnsTo": ["id"], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "workspace_file_search_chunk_pk": { + "name": "workspace_file_search_chunk_pk", + "columns": ["build_id", "ordinal"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "file_search_chunk_owner_check": { + "name": "file_search_chunk_owner_check", + "value": "(\"workspace_file_search_chunk\".\"entity_type\" IS NULL AND \"workspace_file_search_chunk\".\"entity_id\" IS NULL AND \"workspace_file_search_chunk\".\"workspace_id\" IS NOT NULL) OR (\"workspace_file_search_chunk\".\"entity_type\" = 'workspace' AND \"workspace_file_search_chunk\".\"entity_id\" = \"workspace_file_search_chunk\".\"workspace_id\") OR (\"workspace_file_search_chunk\".\"entity_type\" = 'project' AND length(\"workspace_file_search_chunk\".\"entity_id\") > 0 AND \"workspace_file_search_chunk\".\"workspace_id\" IS NULL)" + }, + "workspace_file_search_chunk_content_size": { + "name": "workspace_file_search_chunk_content_size", + "value": "octet_length(\"workspace_file_search_chunk\".\"content\") <= 8192" + }, + "workspace_file_search_chunk_position": { + "name": "workspace_file_search_chunk_position", + "value": "\"workspace_file_search_chunk\".\"ordinal\" >= 0 AND \"workspace_file_search_chunk\".\"line_start\" > 0 AND \"workspace_file_search_chunk\".\"overlap\" BETWEEN 0 AND 2" + } + }, + "isRLSEnabled": false + }, + "public.workspace_file_search_dispatch_queue": { + "name": "workspace_file_search_dispatch_queue", + "schema": "", + "columns": { + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "enqueued_at": { + "name": "enqueued_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "last_dispatched_at": { + "name": "last_dispatched_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_file_search_dispatch_queue_schedule_idx": { + "name": "workspace_file_search_dispatch_queue_schedule_idx", + "columns": [ + { + "expression": "last_dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "first" + }, + { + "expression": "enqueued_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_search_queue_workspace_fk": { + "name": "workspace_file_search_queue_workspace_fk", + "tableFrom": "workspace_file_search_dispatch_queue", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_search_index": { + "name": "workspace_file_search_index", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "workspace_file_search_index_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "partial": { + "name": "partial", + "type": "boolean", + "primaryKey": false, + "notNull": true, + "default": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "line_count": { + "name": "line_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "indexed_bytes": { + "name": "indexed_bytes", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "dispatched_at": { + "name": "dispatched_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_file_search_index_workspace_status_idx": { + "name": "workspace_file_search_index_workspace_status_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_index_pending_dispatch_idx": { + "name": "workspace_file_search_index_pending_dispatch_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_index\".\"status\" = 'pending' AND \"workspace_file_search_index\".\"dispatched_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_index_active_dispatch_idx": { + "name": "workspace_file_search_index_active_dispatch_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_index\".\"status\" = 'pending' AND \"workspace_file_search_index\".\"dispatched_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_search_index_file_fk": { + "name": "workspace_file_search_index_file_fk", + "tableFrom": "workspace_file_search_index", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_search_index_workspace_fk": { + "name": "workspace_file_search_index_workspace_fk", + "tableFrom": "workspace_file_search_index", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "workspace_file_search_index_pk": { + "name": "workspace_file_search_index_pk", + "columns": ["file_id", "source_content_updated_at"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_search_revision": { + "name": "workspace_file_search_revision", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_type": { + "name": "entity_type", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "entity_id": { + "name": "entity_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "workspace_file_search_index_status", + "typeSchema": "public", + "primaryKey": false, + "notNull": true, + "default": "'pending'" + }, + "build_id": { + "name": "build_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "failure_reason": { + "name": "failure_reason", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "line_count": { + "name": "line_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "indexed_bytes": { + "name": "indexed_bytes", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "chunk_count": { + "name": "chunk_count", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "dispatched_at": { + "name": "dispatched_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "handoff_expires_at": { + "name": "handoff_expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "file_search_revision_owner_pending_idx": { + "name": "file_search_revision_owner_pending_idx", + "columns": [ + { + "expression": "coalesce(\"entity_type\", 'workspace')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"entity_id\", \"workspace_id\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_revision\".\"status\" = 'pending' AND \"workspace_file_search_revision\".\"dispatched_at\" IS NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "file_search_revision_owner_status_idx": { + "name": "file_search_revision_owner_status_idx", + "columns": [ + { + "expression": "coalesce(\"entity_type\", 'workspace')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"entity_id\", \"workspace_id\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_file_search_revision_workspace_status_idx": { + "name": "workspace_file_search_revision_workspace_status_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "status", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_revision_build_idx": { + "name": "workspace_file_search_revision_build_idx", + "columns": [ + { + "expression": "build_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_revision_pending_idx": { + "name": "workspace_file_search_revision_pending_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_revision\".\"status\" = 'pending' AND \"workspace_file_search_revision\".\"dispatched_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_revision_active_idx": { + "name": "workspace_file_search_revision_active_idx", + "columns": [ + { + "expression": "dispatched_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_search_revision\".\"status\" = 'pending' AND \"workspace_file_search_revision\".\"dispatched_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_search_revision_file_id_workspace_files_id_fk": { + "name": "workspace_file_search_revision_file_id_workspace_files_id_fk", + "tableFrom": "workspace_file_search_revision", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_search_revision_build_id_workspace_file_search_build_id_fk": { + "name": "workspace_file_search_revision_build_id_workspace_file_search_build_id_fk", + "tableFrom": "workspace_file_search_revision", + "tableTo": "workspace_file_search_build", + "columnsFrom": ["build_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "file_search_revision_owner_check": { + "name": "file_search_revision_owner_check", + "value": "(\"workspace_file_search_revision\".\"entity_type\" IS NULL AND \"workspace_file_search_revision\".\"entity_id\" IS NULL AND \"workspace_file_search_revision\".\"workspace_id\" IS NOT NULL) OR (\"workspace_file_search_revision\".\"entity_type\" = 'workspace' AND \"workspace_file_search_revision\".\"entity_id\" = \"workspace_file_search_revision\".\"workspace_id\") OR (\"workspace_file_search_revision\".\"entity_type\" = 'project' AND length(\"workspace_file_search_revision\".\"entity_id\") > 0 AND \"workspace_file_search_revision\".\"workspace_id\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.workspace_file_search_segment": { + "name": "workspace_file_search_segment", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_content_updated_at": { + "name": "source_content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "line_number": { + "name": "line_number", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "segment_number": { + "name": "segment_number", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "segment_start": { + "name": "segment_start", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "line_length": { + "name": "line_length", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": true + } + }, + "indexes": { + "workspace_file_search_segment_workspace_revision_idx": { + "name": "workspace_file_search_segment_workspace_revision_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_content_updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_search_segment_workspace_content_trgm_idx": { + "name": "workspace_file_search_segment_workspace_content_trgm_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "content", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "gin_trgm_ops" + } + ], + "isUnique": false, + "concurrently": false, + "method": "gin", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_search_segment_file_fk": { + "name": "workspace_file_search_segment_file_fk", + "tableFrom": "workspace_file_search_segment", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_search_segment_workspace_fk": { + "name": "workspace_file_search_segment_workspace_fk", + "tableFrom": "workspace_file_search_segment", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "workspace_file_search_segment_pk": { + "name": "workspace_file_search_segment_pk", + "columns": ["file_id", "source_content_updated_at", "line_number", "segment_number"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_file_secret_provenance": { + "name": "workspace_file_secret_provenance", + "schema": "", + "columns": { + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "content_updated_at": { + "name": "content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true + }, + "status": { + "name": "status", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "entries": { + "name": "entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "workspace_file_secret_provenance_file_id_workspace_files_id_fk": { + "name": "workspace_file_secret_provenance_file_id_workspace_files_id_fk", + "tableFrom": "workspace_file_secret_provenance", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workspace_file_secret_provenance_status_check": { + "name": "workspace_file_secret_provenance_status_check", + "value": "\"workspace_file_secret_provenance\".\"status\" IN ('exact', 'unknown', 'unrecorded')" + } + }, + "isRLSEnabled": false + }, + "public.workspace_file_version": { + "name": "workspace_file_version", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "file_id": { + "name": "file_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "version": { + "name": "version", + "type": "integer", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": true + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "content_hash": { + "name": "content_hash", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "superseded_at": { + "name": "superseded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "source": { + "name": "source", + "type": "workspace_file_version_source", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "author_user_ids": { + "name": "author_user_ids", + "type": "text[]", + "primaryKey": false, + "notNull": true, + "default": "'{}'::text[]" + }, + "restored_from_version": { + "name": "restored_from_version", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_status": { + "name": "secret_provenance_status", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "secret_provenance_entries": { + "name": "secret_provenance_entries", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_file_version_file_version_unique": { + "name": "workspace_file_version_file_version_unique", + "columns": [ + { + "expression": "file_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "version", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_version_key_unique": { + "name": "workspace_file_version_key_unique", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_version_workspace_id_idx": { + "name": "workspace_file_version_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_file_version_workspace_superseded_idx": { + "name": "workspace_file_version_workspace_superseded_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "superseded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_file_version\".\"superseded_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_file_version_file_id_workspace_files_id_fk": { + "name": "workspace_file_version_file_id_workspace_files_id_fk", + "tableFrom": "workspace_file_version", + "tableTo": "workspace_files", + "columnsFrom": ["file_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_file_version_workspace_id_workspace_id_fk": { + "name": "workspace_file_version_workspace_id_workspace_id_fk", + "tableFrom": "workspace_file_version", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workspace_file_version_provenance_status_check": { + "name": "workspace_file_version_provenance_status_check", + "value": "\"workspace_file_version\".\"secret_provenance_status\" IS NULL OR \"workspace_file_version\".\"secret_provenance_status\" IN ('exact', 'unknown', 'unrecorded')" + } + }, + "isRLSEnabled": false + }, + "public.workspace_files": { + "name": "workspace_files", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "project_id": { + "name": "project_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "organization_id": { + "name": "organization_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "folder_id": { + "name": "folder_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "context": { + "name": "context", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "chat_id": { + "name": "chat_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "message_id": { + "name": "message_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "original_name": { + "name": "original_name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "display_name": { + "name": "display_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "content_type": { + "name": "content_type", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "size_bytes": { + "name": "size_bytes", + "type": "bigint", + "primaryKey": false, + "notNull": false + }, + "width": { + "name": "width", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "height": { + "name": "height", + "type": "integer", + "primaryKey": false, + "notNull": false + }, + "deleted_at": { + "name": "deleted_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "uploaded_at": { + "name": "uploaded_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "content_updated_at": { + "name": "content_updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "date_trunc('milliseconds', now())" + }, + "secret_provenance_version": { + "name": "secret_provenance_version", + "type": "integer", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workspace_files_project_id_idx": { + "name": "workspace_files_project_id_idx", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_project_folder_name_active_unique": { + "name": "workspace_files_project_folder_name_active_unique", + "columns": [ + { + "expression": "project_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"folder_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "original_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"project_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_key_active_unique": { + "name": "workspace_files_key_active_unique", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace_files\".\"deleted_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_folder_name_active_unique": { + "name": "workspace_files_workspace_folder_name_active_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"folder_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "original_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_search_owner_keyset_idx": { + "name": "workspace_files_search_owner_keyset_idx", + "columns": [ + { + "expression": "(CASE WHEN \"project_id\" IS NOT NULL THEN 'project' ELSE 'workspace' END)", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"project_id\", \"workspace_id\")", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND ((\"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL) OR (\"workspace_files\".\"context\" = 'project' AND \"workspace_files\".\"project_id\" IS NOT NULL))", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_active_keyset_idx": { + "name": "workspace_files_workspace_active_keyset_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_active_uploaded_idx": { + "name": "workspace_files_workspace_active_uploaded_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "uploaded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_active_updated_idx": { + "name": "workspace_files_workspace_active_updated_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "updated_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_folder_uploaded_idx": { + "name": "workspace_files_workspace_folder_uploaded_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "coalesce(\"folder_id\", '')", + "asc": true, + "isExpression": true, + "nulls": "last" + }, + { + "expression": "uploaded_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_name_trgm_idx": { + "name": "workspace_files_workspace_name_trgm_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "text_ops" + }, + { + "expression": "original_name", + "isExpression": false, + "asc": true, + "nulls": "last", + "opclass": "gin_trgm_ops" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "gin", + "with": { + "fastupdate": "off" + } + }, + "workspace_files_workspace_display_name_idx": { + "name": "workspace_files_workspace_display_name_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "regexp_replace(regexp_replace(regexp_replace(normalize(\"original_name\", NFC), '^[ \\t\\n\\v\\f\\r\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+|[ \\t\\n\\v\\f\\r\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+$', '', 'g'), '[\\x01-\\x1f\\x7f]', '', 'g'), '[ \\t\\n\\v\\f\\r\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]+', ' ', 'g')", + "asc": true, + "isExpression": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NULL AND \"workspace_files\".\"context\" = 'workspace' AND \"workspace_files\".\"workspace_id\" IS NOT NULL", + "concurrently": true, + "method": "btree", + "with": {} + }, + "workspace_files_chat_display_name_unique": { + "name": "workspace_files_chat_display_name_unique", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "display_name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "where": "\"workspace_files\".\"context\" = 'mothership' AND \"workspace_files\".\"chat_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_organization_id_idx": { + "name": "workspace_files_organization_id_idx", + "columns": [ + { + "expression": "organization_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_key_idx": { + "name": "workspace_files_key_idx", + "columns": [ + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_user_id_idx": { + "name": "workspace_files_user_id_idx", + "columns": [ + { + "expression": "user_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_id_idx": { + "name": "workspace_files_workspace_id_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_folder_id_idx": { + "name": "workspace_files_folder_id_idx", + "columns": [ + { + "expression": "folder_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_context_idx": { + "name": "workspace_files_context_idx", + "columns": [ + { + "expression": "context", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_chat_id_idx": { + "name": "workspace_files_chat_id_idx", + "columns": [ + { + "expression": "chat_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_deleted_at_idx": { + "name": "workspace_files_deleted_at_idx", + "columns": [ + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_files_workspace_deleted_partial_idx": { + "name": "workspace_files_workspace_deleted_partial_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "deleted_at", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_files\".\"deleted_at\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_files_project_id_project_id_fk": { + "name": "workspace_files_project_id_project_id_fk", + "tableFrom": "workspace_files", + "tableTo": "project", + "columnsFrom": ["project_id"], + "columnsTo": ["id"], + "onDelete": "restrict", + "onUpdate": "no action" + }, + "workspace_files_user_id_user_id_fk": { + "name": "workspace_files_user_id_user_id_fk", + "tableFrom": "workspace_files", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_files_workspace_id_workspace_id_fk": { + "name": "workspace_files_workspace_id_workspace_id_fk", + "tableFrom": "workspace_files", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_files_organization_id_organization_id_fk": { + "name": "workspace_files_organization_id_organization_id_fk", + "tableFrom": "workspace_files", + "tableTo": "organization", + "columnsFrom": ["organization_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_files_folder_id_folder_id_fk": { + "name": "workspace_files_folder_id_folder_id_fk", + "tableFrom": "workspace_files", + "tableTo": "folder", + "columnsFrom": ["folder_id"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + }, + "workspace_files_chat_id_copilot_chats_id_fk": { + "name": "workspace_files_chat_id_copilot_chats_id_fk", + "tableFrom": "workspace_files", + "tableTo": "copilot_chats", + "columnsFrom": ["chat_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workspace_files_owner_check": { + "name": "workspace_files_owner_check", + "value": "num_nonnulls(\"workspace_files\".\"workspace_id\", \"workspace_files\".\"project_id\", \"workspace_files\".\"organization_id\") <= 1" + }, + "workspace_files_workspace_binding_check": { + "name": "workspace_files_workspace_binding_check", + "value": "\"workspace_files\".\"context\" NOT IN ('workspace', 'chat', 'mothership', 'execution', 'workspace-logos') OR \"workspace_files\".\"workspace_id\" IS NOT NULL" + }, + "workspace_files_project_binding_check": { + "name": "workspace_files_project_binding_check", + "value": "(\"workspace_files\".\"project_id\" IS NOT NULL) = (\"workspace_files\".\"context\" = 'project') AND (\"workspace_files\".\"project_id\" IS NULL OR \"workspace_files\".\"chat_id\" IS NULL)" + }, + "workspace_files_organization_binding_check": { + "name": "workspace_files_organization_binding_check", + "value": "\"workspace_files\".\"organization_id\" IS NULL OR (\"workspace_files\".\"workspace_id\" IS NULL AND \"workspace_files\".\"context\" = 'knowledge-base' AND \"workspace_files\".\"folder_id\" IS NULL AND \"workspace_files\".\"chat_id\" IS NULL)" + } + }, + "isRLSEnabled": false + }, + "public.workspace_fork_block_map": { + "name": "workspace_fork_block_map", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "parent_workflow_id": { + "name": "parent_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "parent_block_id": { + "name": "parent_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "child_workflow_id": { + "name": "child_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "child_block_id": { + "name": "child_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_fork_block_map_child_ws_parent_unique": { + "name": "workspace_fork_block_map_child_ws_parent_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_block_map_child_ws_child_unique": { + "name": "workspace_fork_block_map_child_ws_child_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "child_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_block_map_child_ws_parent_wf_idx": { + "name": "workspace_fork_block_map_child_ws_parent_wf_idx", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_block_map_child_ws_child_wf_idx": { + "name": "workspace_fork_block_map_child_ws_child_wf_idx", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "child_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_block_map_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_block_map_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_block_map", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_fork_dependent_value": { + "name": "workspace_fork_dependent_value", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_workflow_id": { + "name": "target_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_block_id": { + "name": "target_block_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sub_block_key": { + "name": "sub_block_key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_fork_dependent_value_field_unique": { + "name": "workspace_fork_dependent_value_field_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_block_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sub_block_key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_dependent_value_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_dependent_value_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_dependent_value", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_fork_promote_run": { + "name": "workspace_fork_promote_run", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_workspace_id": { + "name": "source_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_workspace_id": { + "name": "target_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "direction": { + "name": "direction", + "type": "workspace_fork_promote_direction", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "snapshot": { + "name": "snapshot", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_fork_promote_run_child_ws_target_unique": { + "name": "workspace_fork_promote_run_child_ws_target_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_promote_run_target_ws_idx": { + "name": "workspace_fork_promote_run_target_ws_idx", + "columns": [ + { + "expression": "target_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_promote_run_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_promote_run_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_promote_run", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_fork_promote_run_created_by_user_id_fk": { + "name": "workspace_fork_promote_run_created_by_user_id_fk", + "tableFrom": "workspace_fork_promote_run", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_fork_resource_map": { + "name": "workspace_fork_resource_map", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_type": { + "name": "resource_type", + "type": "workspace_fork_resource_type", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "parent_resource_id": { + "name": "parent_resource_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "child_resource_id": { + "name": "child_resource_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_fork_resource_map_child_type_parent_unique": { + "name": "workspace_fork_resource_map_child_type_parent_unique", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_type", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "parent_resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_resource_map_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_resource_map_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_resource_map", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_fork_resource_map_created_by_user_id_fk": { + "name": "workspace_fork_resource_map_created_by_user_id_fk", + "tableFrom": "workspace_fork_resource_map", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_fork_workflow_sync": { + "name": "workspace_fork_workflow_sync", + "schema": "", + "columns": { + "deployment_operation_id": { + "name": "deployment_operation_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "child_workspace_id": { + "name": "child_workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_workflow_id": { + "name": "source_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "target_workflow_id": { + "name": "target_workflow_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "source_deployment_version_id": { + "name": "source_deployment_version_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "sequence": { + "name": "sequence", + "type": "bigint", + "primaryKey": false, + "notNull": true, + "identity": { + "type": "always", + "name": "workspace_fork_workflow_sync_sequence_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": "1", + "cycle": false + } + }, + "promote_run_id": { + "name": "promote_run_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "activated_at": { + "name": "activated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + }, + "rollback_operation_id": { + "name": "rollback_operation_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "rolled_back_at": { + "name": "rolled_back_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false + } + }, + "indexes": { + "workspace_fork_workflow_sync_baseline_idx": { + "name": "workspace_fork_workflow_sync_baseline_idx", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "source_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "sequence", + "isExpression": false, + "asc": false, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_fork_workflow_sync\".\"activated_at\" IS NOT NULL AND \"workspace_fork_workflow_sync\".\"rolled_back_at\" IS NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_run_idx": { + "name": "workspace_fork_workflow_sync_run_idx", + "columns": [ + { + "expression": "promote_run_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "target_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_rollback_idx": { + "name": "workspace_fork_workflow_sync_rollback_idx", + "columns": [ + { + "expression": "rollback_operation_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "where": "\"workspace_fork_workflow_sync\".\"rollback_operation_id\" IS NOT NULL", + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_source_idx": { + "name": "workspace_fork_workflow_sync_source_idx", + "columns": [ + { + "expression": "source_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_target_idx": { + "name": "workspace_fork_workflow_sync_target_idx", + "columns": [ + { + "expression": "target_workflow_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_fork_workflow_sync_child_workspace_idx": { + "name": "workspace_fork_workflow_sync_child_workspace_idx", + "columns": [ + { + "expression": "child_workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_fork_workflow_sync_child_workspace_id_workspace_id_fk": { + "name": "workspace_fork_workflow_sync_child_workspace_id_workspace_id_fk", + "tableFrom": "workspace_fork_workflow_sync", + "tableTo": "workspace", + "columnsFrom": ["child_workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_fork_workflow_sync_source_workflow_id_workflow_id_fk": { + "name": "workspace_fork_workflow_sync_source_workflow_id_workflow_id_fk", + "tableFrom": "workspace_fork_workflow_sync", + "tableTo": "workflow", + "columnsFrom": ["source_workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_fork_workflow_sync_target_workflow_id_workflow_id_fk": { + "name": "workspace_fork_workflow_sync_target_workflow_id_workflow_id_fk", + "tableFrom": "workspace_fork_workflow_sync", + "tableTo": "workflow", + "columnsFrom": ["target_workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_operation_receipt": { + "name": "workspace_operation_receipt", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "request_id": { + "name": "request_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "request_hash": { + "name": "request_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "report": { + "name": "report", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_operation_receipt_request_unique": { + "name": "workspace_operation_receipt_request_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "request_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_operation_receipt_workspace_created_idx": { + "name": "workspace_operation_receipt_workspace_created_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "created_at", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_operation_receipt_workspace_id_workspace_id_fk": { + "name": "workspace_operation_receipt_workspace_id_workspace_id_fk", + "tableFrom": "workspace_operation_receipt", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_resource_binding": { + "name": "workspace_resource_binding", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "kind": { + "name": "kind", + "type": "workspace_resource_kind", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "key": { + "name": "key", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "resource_id": { + "name": "resource_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "origin": { + "name": "origin", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_resource_binding_ws_kind_key_unique": { + "name": "workspace_resource_binding_ws_kind_key_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "kind", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "key", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_resource_binding_ws_kind_resource_unique": { + "name": "workspace_resource_binding_ws_kind_resource_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "kind", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "resource_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_resource_binding_workspace_id_workspace_id_fk": { + "name": "workspace_resource_binding_workspace_id_workspace_id_fk", + "tableFrom": "workspace_resource_binding", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_resource_binding_created_by_user_id_fk": { + "name": "workspace_resource_binding_created_by_user_id_fk", + "tableFrom": "workspace_resource_binding", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": { + "workspace_resource_binding_key_format": { + "name": "workspace_resource_binding_key_format", + "value": "\"workspace_resource_binding\".\"key\" ~ '^[a-z][a-z0-9_-]{0,63}$'" + }, + "workspace_resource_binding_origin_check": { + "name": "workspace_resource_binding_origin_check", + "value": "\"workspace_resource_binding\".\"origin\" IN ('allocated', 'adopted', 'created')" + } + }, + "isRLSEnabled": false + }, + "public.workspace_sandbox": { + "name": "workspace_sandbox", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "language": { + "name": "language", + "type": "sandbox_language", + "typeSchema": "public", + "primaryKey": false, + "notNull": true + }, + "dependencies": { + "name": "dependencies", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "cli_tools": { + "name": "cli_tools", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "system_packages": { + "name": "system_packages", + "type": "jsonb", + "primaryKey": false, + "notNull": true, + "default": "'[]'::jsonb" + }, + "spec_hash": { + "name": "spec_hash", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "created_by": { + "name": "created_by", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_sandbox_workspace_name_unique": { + "name": "workspace_sandbox_workspace_name_unique", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + }, + { + "expression": "name", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": true, + "concurrently": false, + "method": "btree", + "with": {} + }, + "workspace_sandbox_spec_hash_idx": { + "name": "workspace_sandbox_spec_hash_idx", + "columns": [ + { + "expression": "spec_hash", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_sandbox_workspace_id_workspace_id_fk": { + "name": "workspace_sandbox_workspace_id_workspace_id_fk", + "tableFrom": "workspace_sandbox", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_sandbox_created_by_user_id_fk": { + "name": "workspace_sandbox_created_by_user_id_fk", + "tableFrom": "workspace_sandbox", + "tableTo": "user", + "columnsFrom": ["created_by"], + "columnsTo": ["id"], + "onDelete": "set null", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, + "public.workspace_visit": { + "name": "workspace_visit", + "schema": "", + "columns": { + "user_id": { + "name": "user_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "workspace_id": { + "name": "workspace_id", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "visited_at": { + "name": "visited_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": { + "workspace_visit_workspace_idx": { + "name": "workspace_visit_workspace_idx", + "columns": [ + { + "expression": "workspace_id", + "isExpression": false, + "asc": true, + "nulls": "last" + } + ], + "isUnique": false, + "concurrently": false, + "method": "btree", + "with": {} + } + }, + "foreignKeys": { + "workspace_visit_user_id_user_id_fk": { + "name": "workspace_visit_user_id_user_id_fk", + "tableFrom": "workspace_visit", + "tableTo": "user", + "columnsFrom": ["user_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + }, + "workspace_visit_workspace_id_workspace_id_fk": { + "name": "workspace_visit_workspace_id_workspace_id_fk", + "tableFrom": "workspace_visit", + "tableTo": "workspace", + "columnsFrom": ["workspace_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": { + "workspace_visit_user_id_workspace_id_pk": { + "name": "workspace_visit_user_id_workspace_id_pk", + "columns": ["user_id", "workspace_id"] + } + }, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + } + }, + "enums": { + "public.api_key_access": { + "name": "api_key_access", + "schema": "public", + "values": ["read", "write"] + }, + "public.aws_marketplace_license_status": { + "name": "aws_marketplace_license_status", + "schema": "public", + "values": ["pending", "active", "inactive"] + }, + "public.aws_marketplace_usage_report_status": { + "name": "aws_marketplace_usage_report_status", + "schema": "public", + "values": ["pending", "reported", "rejected"] + }, + "public.background_work_kind": { + "name": "background_work_kind", + "schema": "public", + "values": ["deployment_side_effects", "fork_content_copy", "fork_sync", "fork_rollback"] + }, + "public.background_work_status_value": { + "name": "background_work_status_value", + "schema": "public", + "values": ["pending", "processing", "completed", "completed_with_warnings", "failed"] + }, + "public.billing_blocked_reason": { + "name": "billing_blocked_reason", + "schema": "public", + "values": ["payment_failed", "dispute"] + }, + "public.billing_entity_type": { + "name": "billing_entity_type", + "schema": "public", + "values": ["user", "organization"] + }, + "public.chat_type": { + "name": "chat_type", + "schema": "public", + "values": ["mothership", "copilot"] + }, + "public.copilot_async_tool_status": { + "name": "copilot_async_tool_status", + "schema": "public", + "values": ["pending", "running", "completed", "failed", "cancelled", "delivered"] + }, + "public.copilot_run_status": { + "name": "copilot_run_status", + "schema": "public", + "values": ["active", "paused_waiting_for_tool", "resuming", "complete", "error", "cancelled"] + }, + "public.copilot_tool_permission_decision": { + "name": "copilot_tool_permission_decision", + "schema": "public", + "values": ["allow", "allow_chat", "always_allow", "skip"] + }, + "public.credential_group_enrollment_status": { + "name": "credential_group_enrollment_status", + "schema": "public", + "values": ["invited", "delivery_failed", "in_progress", "completed", "revoked"] + }, + "public.credential_group_status": { + "name": "credential_group_status", + "schema": "public", + "values": ["active", "disabled"] + }, + "public.credential_member_role": { + "name": "credential_member_role", + "schema": "public", + "values": ["admin", "member"] + }, + "public.credential_member_status": { + "name": "credential_member_status", + "schema": "public", + "values": ["active", "pending", "revoked"] + }, + "public.credential_type": { + "name": "credential_type", + "schema": "public", + "values": [ + "oauth", + "managed_oauth", + "managed_mcp", + "env_workspace", + "env_personal", + "service_account", + "personal_token" + ] + }, + "public.data_drain_cadence": { + "name": "data_drain_cadence", + "schema": "public", + "values": ["hourly", "daily"] + }, + "public.data_drain_destination": { + "name": "data_drain_destination", + "schema": "public", + "values": [ + "s3", + "gcs", + "azure_blob", + "sentinel", + "datadog", + "bigquery", + "snowflake", + "webhook" + ] + }, + "public.data_drain_run_status": { + "name": "data_drain_run_status", + "schema": "public", + "values": ["running", "success", "failed"] + }, + "public.data_drain_run_trigger": { + "name": "data_drain_run_trigger", + "schema": "public", + "values": ["cron", "manual"] + }, + "public.data_drain_source": { + "name": "data_drain_source", + "schema": "public", + "values": ["workflow_logs", "job_logs", "audit_logs", "copilot_chats", "copilot_runs"] + }, + "public.execution_large_value_reference_source": { + "name": "execution_large_value_reference_source", + "schema": "public", + "values": ["execution_log", "paused_snapshot"] + }, + "public.folder_resource_type": { + "name": "folder_resource_type", + "schema": "public", + "values": ["workflow", "file", "knowledge_base", "table"] + }, + "public.invitation_kind": { + "name": "invitation_kind", + "schema": "public", + "values": ["organization", "workspace"] + }, + "public.invitation_membership_intent": { + "name": "invitation_membership_intent", + "schema": "public", + "values": ["internal", "external"] + }, + "public.invitation_status": { + "name": "invitation_status", + "schema": "public", + "values": ["pending", "accepted", "rejected", "cancelled", "expired"] + }, + "public.managed_oauth_credential_status": { + "name": "managed_oauth_credential_status", + "schema": "public", + "values": ["active", "needs_reauth", "revoked"] + }, + "public.permission_type": { + "name": "permission_type", + "schema": "public", + "values": ["admin", "write", "read"] + }, + "public.sandbox_image_status": { + "name": "sandbox_image_status", + "schema": "public", + "values": ["pending", "building", "ready", "failed"] + }, + "public.sandbox_language": { + "name": "sandbox_language", + "schema": "public", + "values": ["javascript", "python"] + }, + "public.secret_usage_scope": { + "name": "secret_usage_scope", + "schema": "public", + "values": ["workspace", "personal"] + }, + "public.secret_usage_source": { + "name": "secret_usage_source", + "schema": "public", + "values": ["workflow", "copilot", "mcp"] + }, + "public.upload_session_method": { + "name": "upload_session_method", + "schema": "public", + "values": ["put", "multipart"] + }, + "public.upload_session_provider": { + "name": "upload_session_provider", + "schema": "public", + "values": ["local", "s3", "blob", "gcs"] + }, + "public.upload_session_purpose": { + "name": "upload_session_purpose", + "schema": "public", + "values": [ + "workspace_file", + "project_file", + "table_import", + "knowledge_import", + "knowledge_document", + "profile_picture", + "workspace_logo", + "organization_logo", + "mothership_attachment", + "execution_attachment" + ] + }, + "public.upload_session_status": { + "name": "upload_session_status", + "schema": "public", + "values": [ + "uploading", + "completing", + "finalizing", + "completed", + "aborting", + "aborted", + "failed", + "expired" + ] + }, + "public.usage_log_category": { + "name": "usage_log_category", + "schema": "public", + "values": ["model", "fixed", "tool", "model_unbilled"] + }, + "public.usage_log_source": { + "name": "usage_log_source", + "schema": "public", + "values": [ + "workflow", + "wand", + "copilot", + "workspace-chat", + "mcp_copilot", + "mothership_block", + "knowledge-base", + "voice-input", + "enrichment", + "voice-output", + "api-tool", + "workflow-test" + ] + }, + "public.workspace_file_search_index_status": { + "name": "workspace_file_search_index_status", + "schema": "public", + "values": ["pending", "ready", "skipped", "failed"] + }, + "public.workspace_file_version_source": { + "name": "workspace_file_version_source", + "schema": "public", + "values": ["upload", "user", "api", "copilot", "workflow", "collab", "revert", "unknown"] + }, + "public.workspace_fork_promote_direction": { + "name": "workspace_fork_promote_direction", + "schema": "public", + "values": ["push", "pull"] + }, + "public.workspace_fork_resource_type": { + "name": "workspace_fork_resource_type", + "schema": "public", + "values": [ + "workflow", + "oauth_credential", + "service_account_credential", + "env_var", + "table", + "knowledge_base", + "knowledge_document", + "file", + "file_folder", + "mcp_server", + "workflow_mcp_server", + "custom_block", + "custom_tool", + "skill", + "sandbox" + ] + }, + "public.workspace_mode": { + "name": "workspace_mode", + "schema": "public", + "values": ["personal", "organization", "grandfathered_shared"] + }, + "public.workspace_resource_kind": { + "name": "workspace_resource_kind", + "schema": "public", + "values": [ + "credential", + "knowledge-base", + "knowledge-document", + "table", + "file", + "file-folder", + "mcp-server", + "custom-tool", + "custom-block", + "skill", + "sandbox", + "workflow" + ] + } + }, + "schemas": {}, + "sequences": { + "public.copilot_async_tool_calls_persist_seq": { + "name": "copilot_async_tool_calls_persist_seq", + "schema": "public", + "increment": "1", + "startWith": "1", + "minValue": "1", + "maxValue": "9223372036854775807", + "cache": "1", + "cycle": false + } + }, + "roles": {}, + "policies": {}, + "views": {}, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} diff --git a/packages/db/migrations/meta/_journal.json b/packages/db/migrations/meta/_journal.json index 00fa9a7a352..c9f609834dc 100644 --- a/packages/db/migrations/meta/_journal.json +++ b/packages/db/migrations/meta/_journal.json @@ -3221,6 +3221,13 @@ "when": 1794802862619, "tag": "0460_workflow_code_meta", "breakpoints": true + }, + { + "idx": 461, + "version": "7", + "when": 1794808065145, + "tag": "0461_workspace_resource_binding", + "breakpoints": true } ] } diff --git a/packages/db/schema.ts b/packages/db/schema.ts index 966ec4d2e9c..282b6029bb0 100644 --- a/packages/db/schema.ts +++ b/packages/db/schema.ts @@ -2704,6 +2704,77 @@ export const workspaceForkBlockMap = pgTable( }) ) +/** + * Resource kinds a workflow-source key can name: `ResourceKind` from `@sim/workflow-code`, which is + * `PortableResourceKind` from `@sim/workflow-types/resources` minus `env-var` (env names are their + * own keys). The binding service writes and reads this column as `ResourceKind`, so the two lists + * cannot drift without a type error. + */ +export const workspaceResourceKindEnum = pgEnum('workspace_resource_kind', [ + 'credential', + 'knowledge-base', + 'knowledge-document', + 'table', + 'file', + 'file-folder', + 'mcp-server', + 'custom-tool', + 'custom-block', + 'skill', + 'sandbox', + 'workflow', +]) + +/** + * Persisted resource keys for workflow source: `table('leads')` names the table bound to + * `(workspace, 'table', 'leads')` here, never one found by slugifying names. A key is allocated + * once, from the resource's name at that moment, and never changes: renaming the resource keeps + * it, and deleting the resource leaves the row pointing at the dead id so a later file reports the + * key as unresolved instead of silently binding another resource. Only the workspace cascades. + * + * `resource_id` is plain text with no FK: one column spans every kind's table, and the row must + * outlive the resource it names. `origin` records how the row came to exist: `allocated` (lazily, + * the first time source referenced the resource), `adopted` (a later sync bound an existing + * resource to a key), or `created` (a sync created the resource for the key). + */ +export const workspaceResourceBinding = pgTable( + 'workspace_resource_binding', + { + id: text('id').primaryKey(), + workspaceId: text('workspace_id') + .notNull() + .references(() => workspace.id, { onDelete: 'cascade' }), + kind: workspaceResourceKindEnum('kind').notNull(), + key: text('key').notNull(), + resourceId: text('resource_id').notNull(), + origin: text('origin', { enum: ['allocated', 'adopted', 'created'] }).notNull(), + /** SET NULL: removing a user must not unbind the keys their source reads allocated. */ + createdBy: text('created_by').references(() => user.id, { onDelete: 'set null' }), + createdAt: timestamp('created_at').notNull().defaultNow(), + updatedAt: timestamp('updated_at').notNull().defaultNow(), + }, + (table) => ({ + keyUnique: uniqueIndex('workspace_resource_binding_ws_kind_key_unique').on( + table.workspaceId, + table.kind, + table.key + ), + resourceUnique: uniqueIndex('workspace_resource_binding_ws_kind_resource_unique').on( + table.workspaceId, + table.kind, + table.resourceId + ), + keyFormat: check( + 'workspace_resource_binding_key_format', + sql`${table.key} ~ '^[a-z][a-z0-9_-]{0,63}$'` + ), + originCheck: check( + 'workspace_resource_binding_origin_check', + sql`${table.origin} IN ('allocated', 'adopted', 'created')` + ), + }) +) + /** * The user's stored dependent-field re-picks for an edge: a (target workflow, target block, * subblock) -> selected value mapping (a Gmail label, a KB document, a sheet tab). The sync diff --git a/packages/testing/src/mocks/schema-tables.generated.ts b/packages/testing/src/mocks/schema-tables.generated.ts index 05dfaff17c2..a529016b248 100644 --- a/packages/testing/src/mocks/schema-tables.generated.ts +++ b/packages/testing/src/mocks/schema-tables.generated.ts @@ -663,6 +663,17 @@ export const GENERATED_SCHEMA_TABLES = { 'createdAt', 'updatedAt', ], + workspaceResourceBinding: [ + 'id', + 'workspaceId', + 'kind', + 'key', + 'resourceId', + 'origin', + 'createdBy', + 'createdAt', + 'updatedAt', + ], workspaceForkDependentValue: [ 'id', 'childWorkspaceId', @@ -2336,6 +2347,20 @@ export const GENERATED_SCHEMA_ENUMS = { 'skill', 'sandbox', ], + workspaceResourceKindEnum: [ + 'credential', + 'knowledge-base', + 'knowledge-document', + 'table', + 'file', + 'file-folder', + 'mcp-server', + 'custom-tool', + 'custom-block', + 'skill', + 'sandbox', + 'workflow', + ], workspaceForkPromoteDirectionEnum: ['push', 'pull'], backgroundWorkKindEnum: [ 'deployment_side_effects', From 30157355b427691a8a908ae623a91c61adbab209 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:55:39 -0800 Subject: [PATCH 105/428] feat(workflows): resolve workflow-source resource keys through persisted bindings Keys come from workspace_resource_binding only: allocated lazily and idempotently from the name on first reference, stable across renames, and left bound to a deleted resource so a later file reports the key unresolved instead of rebinding a same-named resource. --- .../application/apply-workflow-source.ts | 40 +- .../application/get-workflow-source.ts | 14 +- apps/sim/lib/workflows/code/resources.test.ts | 61 --- apps/sim/lib/workflows/code/resources.ts | 208 +++------ .../resource-bindings.integration.ts | 317 ++++++++++++++ .../lib/workspaces/resource-bindings.test.ts | 45 ++ apps/sim/lib/workspaces/resource-bindings.ts | 399 ++++++++++++++++++ packages/db/schema.ts | 4 +- 8 files changed, 848 insertions(+), 240 deletions(-) delete mode 100644 apps/sim/lib/workflows/code/resources.test.ts create mode 100644 apps/sim/lib/workspaces/resource-bindings.integration.ts create mode 100644 apps/sim/lib/workspaces/resource-bindings.test.ts create mode 100644 apps/sim/lib/workspaces/resource-bindings.ts diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.ts b/apps/sim/lib/workflows/application/apply-workflow-source.ts index a284858381d..424c577712c 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.ts @@ -1,5 +1,5 @@ import { AuditAction, AuditResourceType } from '@sim/audit' -import { resolvePrincipalAttribution } from '@sim/auth/principal' +import { resolvePrincipalAttribution, resolvePrincipalSubjectUserId } from '@sim/auth/principal' import { db } from '@sim/db' import { workflowBlocks, workflow as workflowTable } from '@sim/db/schema' import { createLogger } from '@sim/logger' @@ -91,6 +91,7 @@ import { } from '@/lib/workflows/source/protected' import { buildSubBlockValues } from '@/lib/workflows/subblocks/visibility' import { parseWorkflowVariables } from '@/lib/workflows/variables/parse' +import type { ResourceKeyRef } from '@/lib/workspaces/resource-bindings' import { getBlock } from '@/blocks/registry' const logger = createLogger('ApplyWorkflowSource') @@ -229,18 +230,22 @@ function fingerprintOf( return sourceFingerprint(workflow, identity) } -/** Every resource kind a compiled model references, so only those tables are read. */ -function collectResourceKinds(value: unknown, kinds: Set): void { +/** Every `(kind, key)` resource reference in a compiled model, for binding lookup. */ +function collectResourceKeys(value: unknown, refs: ResourceKeyRef[]): void { if (Array.isArray(value)) { - for (const item of value) collectResourceKinds(item, kinds) + for (const item of value) collectResourceKeys(item, refs) return } if (value === null || typeof value !== 'object') return const record = value as Record - if (record.$sim === 'resource' && typeof record.kind === 'string') { - kinds.add(record.kind as ResourceKind) + if ( + record.$sim === 'resource' && + typeof record.kind === 'string' && + typeof record.key === 'string' + ) { + refs.push({ kind: record.kind as ResourceKind, key: record.key }) } - for (const nested of Object.values(record)) collectResourceKinds(nested, kinds) + for (const nested of Object.values(record)) collectResourceKeys(nested, refs) } /** @@ -717,7 +722,10 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ meta: stored.meta, resources: recording.resolver, }).identity - let resources = await loadResourceKeyResolver(context.workspaceId, recording.requestedKinds) + const createdBy = resolvePrincipalSubjectUserId(principal) ?? null + let resources = await loadResourceKeyResolver(context.workspaceId, recording.references, { + createdBy, + }) const currentFingerprint = fingerprintOf(stored, catalog, resources) const base = { @@ -790,13 +798,15 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ } const compiledModel = { ...compiled, workflow: compiled.workflow } - const compiledKinds = new Set() - collectResourceKinds(compiled.workflow.blocks, compiledKinds) - if ([...compiledKinds].some((kind) => !recording.requestedKinds.has(kind))) { - resources = await loadResourceKeyResolver(context.workspaceId, [ - ...recording.requestedKinds, - ...compiledKinds, - ]) + const compiledKeys: ResourceKeyRef[] = [] + collectResourceKeys(compiled.workflow.blocks, compiledKeys) + const currentResources = resources + if (compiledKeys.some(({ kind, key }) => currentResources.toId(kind, key) === null)) { + resources = await loadResourceKeyResolver( + context.workspaceId, + { ids: recording.references.ids, keys: compiledKeys }, + { createdBy } + ) } const hasLockEntries = diff --git a/apps/sim/lib/workflows/application/get-workflow-source.ts b/apps/sim/lib/workflows/application/get-workflow-source.ts index 9c9d79ef221..d392008a0b9 100644 --- a/apps/sim/lib/workflows/application/get-workflow-source.ts +++ b/apps/sim/lib/workflows/application/get-workflow-source.ts @@ -1,3 +1,4 @@ +import { resolvePrincipalSubjectUserId } from '@sim/auth/principal' import { compareStrings } from '@sim/utils/string' import { type CanonicalWorkflow, @@ -107,9 +108,12 @@ function usedBlockTypes(workflow: CanonicalWorkflow): string[] { * * Loads the stored, migrated graph; builds the per-workflow compile catalog (the blocks this * caller may place plus every type already in the workflow); projects the graph to the canonical - * model with resource ids lifted to provisional keys; and prints it with the bindings, order and - * comments `workflow.code_meta` keeps, so the lock comes from the same place. Pure read: no audit, so it - * stays head-safe and pollable like `GET /state`. + * model with resource ids lifted to their persisted keys; and prints it with the bindings, order and + * comments `workflow.code_meta` keeps, so the lock comes from the same place. No audit, so it stays + * head-safe and pollable like `GET /state`. The one write is resource-key allocation: the first + * get that references a resource with no key binds one (`resolveKeys`). That is idempotent + * identity metadata, not a change to any resource, so read access may cause it; later gets only + * read the binding. */ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ operation: workflowOperations.readSource, @@ -144,7 +148,9 @@ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ const recording = createRecordingResolver() canonicalize(state, { catalog, meta, resources: recording.resolver }) - const resources = await loadResourceKeyResolver(context.workspaceId, recording.requestedKinds) + const resources = await loadResourceKeyResolver(context.workspaceId, recording.references, { + createdBy: resolvePrincipalSubjectUserId(principal) ?? null, + }) const canonical = canonicalize(state, { catalog, meta, resources }) const codeMeta = readCodeMetaValue(context.workflowId, context.workflow.codeMeta) diff --git a/apps/sim/lib/workflows/code/resources.test.ts b/apps/sim/lib/workflows/code/resources.test.ts deleted file mode 100644 index 73646bfeec8..00000000000 --- a/apps/sim/lib/workflows/code/resources.test.ts +++ /dev/null @@ -1,61 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { assignResourceKeys } from '@/lib/workflows/code/resources' - -const at = (ms: number) => new Date(ms) - -describe('assignResourceKeys', () => { - it('gives the earliest-created resource the bare slug whatever order rows arrive in', () => { - const rows = [ - { id: 'b', name: 'Leads', createdAt: at(2) }, - { id: 'a', name: 'leads!', createdAt: at(1) }, - { id: 'c', name: 'LEADS', createdAt: at(3) }, - ] - - const forward = assignResourceKeys('table', rows) - const reversed = assignResourceKeys('table', [...rows].reverse()) - - expect(Object.fromEntries(forward.byId)).toEqual({ a: 'leads', b: 'leads-2', c: 'leads-3' }) - expect(Object.fromEntries(reversed.byId)).toEqual(Object.fromEntries(forward.byId)) - }) - - it('breaks a creation-time tie by id', () => { - const keys = assignResourceKeys('table', [ - { id: 'z', name: 'Docs', createdAt: at(1) }, - { id: 'y', name: 'Docs', createdAt: at(1) }, - ]) - - expect(keys.byId.get('y')).toBe('docs') - expect(keys.byId.get('z')).toBe('docs-2') - }) - - it('skips a suffix another resource already holds as its own slug', () => { - const keys = assignResourceKeys('knowledge-base', [ - { id: 'a', name: 'Docs', createdAt: at(1) }, - { id: 'b', name: 'docs 2', createdAt: at(2) }, - { id: 'c', name: 'Docs', createdAt: at(3) }, - ]) - - expect(keys.byId.get('b')).toBe('docs-2') - expect(keys.byId.get('c')).toBe('docs-3') - expect(new Set(keys.byId.values()).size).toBe(3) - }) - - it('keys a name with no slug characters by its kind', () => { - const keys = assignResourceKeys('credential', [ - { id: 'a', name: '***', createdAt: at(1) }, - { id: 'b', name: '', createdAt: at(2) }, - ]) - - expect(keys.byId.get('a')).toBe('credential') - expect(keys.byId.get('b')).toBe('credential-2') - }) - - it('maps every key back to the id it was assigned', () => { - const keys = assignResourceKeys('workflow', [ - { id: 'a', name: 'Enrich', createdAt: at(1) }, - { id: 'b', name: 'Enrich', createdAt: at(2) }, - ]) - - for (const [id, key] of keys.byId) expect(keys.byKey.get(key)).toBe(id) - }) -}) diff --git a/apps/sim/lib/workflows/code/resources.ts b/apps/sim/lib/workflows/code/resources.ts index b6df01c44d2..51136cf787b 100644 --- a/apps/sim/lib/workflows/code/resources.ts +++ b/apps/sim/lib/workflows/code/resources.ts @@ -1,190 +1,82 @@ -import { db } from '@sim/db' -import { - credential, - customTools, - folder, - knowledgeBase, - mcpServers, - skill, - userTableDefinitions, - workflow, -} from '@sim/db/schema' -import { compareStrings, slugify } from '@sim/utils/string' import type { ResourceKeyResolver, ResourceKind } from '@sim/workflow-code' -import { and, asc, eq, isNull } from 'drizzle-orm' +import { + type ResourceIdRef, + type ResourceKeyMap, + type ResourceKeyRef, + resolveIds, + resolveKeys, +} from '@/lib/workspaces/resource-bindings' /** * Resource keys for workflow source: `table('leads')`, `kb('docs')`, `binding('support-slack')`. * - * PROVISIONAL. Until the repo phase adds a binding table, a key is derived from the resource's - * current name: its slug, with `-2`, `-3`, … for later resources whose slug is already taken - * (ordered by creation time, then id, so the assignment is deterministic). A rename therefore - * changes the key, and deleting the older of two same-named resources moves the bare key to the - * newer one. Keys are a read-side projection only: nothing stores them yet. - * - * Credentials are keyed by display name and print as `binding(key)`. A kind with no workspace - * table here (`sandbox`, `file`, …), a deleted or archived resource, and an id from another - * workspace all resolve to `null`, which canonicalize keeps verbatim as `$sim: 'unresolved'`. + * Keys come only from the workspace's persisted bindings (`@/lib/workspaces/resource-bindings`), + * never from a resource's current name: a rename keeps the key, and deleting a resource leaves its + * key bound to the dead id, so the key is unresolved rather than re-pointed. A stored id that is + * deleted, archived, of a kind with no workspace table, or from another workspace resolves to + * `null`, which canonicalize keeps verbatim as `$sim: 'unresolved'`; a key with no live binding + * resolves to `null`, which materialize reports as `E_MAT_UNKNOWN_RESOURCE`. */ -/** Rows per kind read to assign keys; past it, later-created resources stay unresolved. */ -const MAX_RESOURCES_PER_KIND = 50_000 - -interface ResourceRow { - id: string - name: string - createdAt: Date -} - -type ResourceLoader = (workspaceId: string) => Promise - -const LOADERS: Partial> = { - table: (workspaceId) => - db - .select({ - id: userTableDefinitions.id, - name: userTableDefinitions.name, - createdAt: userTableDefinitions.createdAt, - }) - .from(userTableDefinitions) - .where( - and( - eq(userTableDefinitions.workspaceId, workspaceId), - isNull(userTableDefinitions.archivedAt) - ) - ) - .orderBy(asc(userTableDefinitions.createdAt), asc(userTableDefinitions.id)) - .limit(MAX_RESOURCES_PER_KIND), - 'knowledge-base': (workspaceId) => - db - .select({ - id: knowledgeBase.id, - name: knowledgeBase.name, - createdAt: knowledgeBase.createdAt, - }) - .from(knowledgeBase) - .where(and(eq(knowledgeBase.workspaceId, workspaceId), isNull(knowledgeBase.deletedAt))) - .orderBy(asc(knowledgeBase.createdAt), asc(knowledgeBase.id)) - .limit(MAX_RESOURCES_PER_KIND), - workflow: (workspaceId) => - db - .select({ id: workflow.id, name: workflow.name, createdAt: workflow.createdAt }) - .from(workflow) - .where(and(eq(workflow.workspaceId, workspaceId), isNull(workflow.archivedAt))) - .orderBy(asc(workflow.createdAt), asc(workflow.id)) - .limit(MAX_RESOURCES_PER_KIND), - 'custom-tool': (workspaceId) => - db - .select({ id: customTools.id, name: customTools.title, createdAt: customTools.createdAt }) - .from(customTools) - .where(eq(customTools.workspaceId, workspaceId)) - .orderBy(asc(customTools.createdAt), asc(customTools.id)) - .limit(MAX_RESOURCES_PER_KIND), - 'mcp-server': (workspaceId) => - db - .select({ id: mcpServers.id, name: mcpServers.name, createdAt: mcpServers.createdAt }) - .from(mcpServers) - .where(and(eq(mcpServers.workspaceId, workspaceId), isNull(mcpServers.deletedAt))) - .orderBy(asc(mcpServers.createdAt), asc(mcpServers.id)) - .limit(MAX_RESOURCES_PER_KIND), - skill: (workspaceId) => - db - .select({ id: skill.id, name: skill.name, createdAt: skill.createdAt }) - .from(skill) - .where(eq(skill.workspaceId, workspaceId)) - .orderBy(asc(skill.createdAt), asc(skill.id)) - .limit(MAX_RESOURCES_PER_KIND), - credential: (workspaceId) => - db - .select({ id: credential.id, name: credential.displayName, createdAt: credential.createdAt }) - .from(credential) - .where(eq(credential.workspaceId, workspaceId)) - .orderBy(asc(credential.createdAt), asc(credential.id)) - .limit(MAX_RESOURCES_PER_KIND), - 'file-folder': (workspaceId) => - db - .select({ id: folder.id, name: folder.name, createdAt: folder.createdAt }) - .from(folder) - .where( - and( - eq(folder.workspaceId, workspaceId), - eq(folder.resourceType, 'file'), - isNull(folder.deletedAt) - ) - ) - .orderBy(asc(folder.createdAt), asc(folder.id)) - .limit(MAX_RESOURCES_PER_KIND), -} - -/** Bidirectional id ↔ key maps for one kind. */ -interface KindKeys { - byId: Map - byKey: Map -} - -/** - * Assigns each resource its provisional key: the name's slug (or the kind when the slug is - * empty), suffixed `-2`, `-3`, … when an earlier resource already holds it. Earlier means - * created first, ties broken by id, whatever order `rows` arrives in. - */ -export function assignResourceKeys(kind: ResourceKind, rows: readonly ResourceRow[]): KindKeys { - const ordered = [...rows].sort( - (a, b) => a.createdAt.getTime() - b.createdAt.getTime() || compareStrings(a.id, b.id) - ) - const byId = new Map() - const byKey = new Map() - for (const row of ordered) { - if (byId.has(row.id)) continue - const base = slugify(row.name) || kind - let key = base - for (let suffix = 2; byKey.has(key); suffix += 1) key = `${base}-${suffix}` - byId.set(row.id, key) - byKey.set(key, row.id) - } - return { byId, byKey } +/** The `(kind, id)` and `(kind, key)` pairs a pass asked a resolver about. */ +interface ResourceReferences { + ids: ResourceIdRef[] + keys: ResourceKeyRef[] } /** - * A resolver that answers nothing and records every `(kind, id)` canonicalize asked about, so a - * first pass learns which kinds a workflow references before any resource table is read. + * A resolver that answers nothing and records every `(kind, id)` and `(kind, key)` it was asked + * about, so a first canonicalize pass learns which resources a workflow references before any + * binding is read or allocated. */ export function createRecordingResolver(): { resolver: ResourceKeyResolver - requestedKinds: Set + references: ResourceReferences } { - const requestedKinds = new Set() + const references: ResourceReferences = { ids: [], keys: [] } return { - requestedKinds, + references, resolver: { - toKey(kind) { - requestedKinds.add(kind) + toKey(kind, id) { + references.ids.push({ kind, id }) return null }, - toId() { + toId(kind, key) { + references.keys.push({ kind, key }) return null }, }, } } +interface LoadResourceKeyResolverOptions { + /** Attribution for keys allocated by this load; `null` for an actorless caller. */ + createdBy?: string | null +} + /** - * Loads the resource keys of `kinds` in one workspace and returns a resolver over them. Only - * this workspace's live resources are read, so an id from elsewhere never resolves. + * Resolves `references` in one workspace through its bindings and returns a resolver over the + * result: each referenced live resource's key (allocated on first reference, see `resolveKeys`) + * and each referenced key's live resource, in both directions (so a fingerprint taken after + * writing a key's id prints that key). Nothing outside `references` resolves. */ export async function loadResourceKeyResolver( workspaceId: string, - kinds: Iterable + references: Partial, + options: LoadResourceKeyResolverOptions = {} ): Promise { - const loaded = new Map() - await Promise.all( - [...new Set(kinds)].map(async (kind) => { - const load = LOADERS[kind] - if (!load) return - loaded.set(kind, assignResourceKeys(kind, await load(workspaceId))) - }) - ) + const [keysById, idsByKey] = await Promise.all([ + resolveKeys(workspaceId, references.ids ?? [], { createdBy: options.createdBy ?? null }), + resolveIds(workspaceId, references.keys ?? []), + ]) + const invert = (map: ResourceKeyMap): ResourceKeyMap => + new Map([...map].map(([kind, pairs]) => [kind, new Map([...pairs].map(([a, b]) => [b, a]))])) + const keysByIdFromKeys = invert(idsByKey) + const idsByKeyFromIds = invert(keysById) + const lookup = (map: ResourceKeyMap, kind: ResourceKind, value: string) => + map.get(kind)?.get(value) ?? null return { - toKey: (kind, id) => loaded.get(kind)?.byId.get(id) ?? null, - toId: (kind, key) => loaded.get(kind)?.byKey.get(key) ?? null, + toKey: (kind, id) => lookup(keysById, kind, id) ?? lookup(keysByIdFromKeys, kind, id), + toId: (kind, key) => lookup(idsByKey, kind, key) ?? lookup(idsByKeyFromIds, kind, key), } } diff --git a/apps/sim/lib/workspaces/resource-bindings.integration.ts b/apps/sim/lib/workspaces/resource-bindings.integration.ts new file mode 100644 index 00000000000..13c51f14c4d --- /dev/null +++ b/apps/sim/lib/workspaces/resource-bindings.integration.ts @@ -0,0 +1,317 @@ +import { db } from '@sim/db' +import { + credential, + customTools, + knowledgeBase, + mcpServers, + skill, + user, + userTableDefinitions, + workflow, + workspace, + workspaceResourceBinding, +} from '@sim/db/schema' +import { deleteWorkspaceFixture, insertWorkspaceFixture } from '@sim/db/testing/workspace-fixtures' +import { generateId } from '@sim/utils/id' +import type { ResourceKind } from '@sim/workflow-code' +import { and, eq, inArray } from 'drizzle-orm' +import { afterAll, beforeAll, describe, expect, it } from 'vitest' +import { loadResourceKeyResolver } from '@/lib/workflows/code/resources' +import { resolveIds, resolveKeys } from '@/lib/workspaces/resource-bindings' + +const userId = generateId() +const workspaceId = generateId() +const otherWorkspaceId = generateId() + +/** Creation times far enough apart that "older" is unambiguous. */ +const at = (minute: number) => new Date(Date.UTC(2026, 10, 1, 0, minute)) + +async function insertTable(id: string, wsId: string, name: string, createdAt: Date) { + await db.insert(userTableDefinitions).values({ + id, + workspaceId: wsId, + name, + schema: { columns: [] }, + createdBy: userId, + createdAt, + updatedAt: createdAt, + }) +} + +async function keyOf(kind: ResourceKind, id: string, wsId = workspaceId) { + return (await resolveKeys(wsId, [{ kind, id }], { createdBy: userId })).get(kind)?.get(id) +} + +async function idOf(kind: ResourceKind, key: string, wsId = workspaceId) { + return (await resolveIds(wsId, [{ kind, key }])).get(kind)?.get(key) +} + +async function bindingRows(wsId: string, kind: ResourceKind, resourceId: string) { + return db + .select({ key: workspaceResourceBinding.key, origin: workspaceResourceBinding.origin }) + .from(workspaceResourceBinding) + .where( + and( + eq(workspaceResourceBinding.workspaceId, wsId), + eq(workspaceResourceBinding.kind, kind), + eq(workspaceResourceBinding.resourceId, resourceId) + ) + ) +} + +describe('workspace resource bindings against PostgreSQL', () => { + beforeAll(async () => { + const now = new Date() + await db.insert(user).values({ + id: userId, + name: 'Resource binding fixture', + email: `${userId}@fixture.test`, + emailVerified: true, + createdAt: now, + updatedAt: now, + }) + await insertWorkspaceFixture( + db, + [workspaceId, otherWorkspaceId].map((id) => ({ + id, + name: 'Resource binding fixture', + ownerId: userId, + billedAccountUserId: userId, + })) + ) + }) + + afterAll(async () => { + await deleteWorkspaceFixture(db, inArray(workspace.id, [workspaceId, otherWorkspaceId])) + await db.delete(user).where(eq(user.id, userId)) + await db.$client.end() + }) + + it('allocates a key from the name once, and returns it again without a second row', async () => { + const older = generateId() + const newer = generateId() + await insertTable(older, workspaceId, 'Leads', at(1)) + await insertTable(newer, workspaceId, 'leads!', at(2)) + + const first = await resolveKeys( + workspaceId, + [ + { kind: 'table', id: newer }, + { kind: 'table', id: older }, + ], + { createdBy: userId } + ) + expect(first.get('table')?.get(older)).toBe('leads') + expect(first.get('table')?.get(newer)).toBe('leads-2') + + expect(await keyOf('table', older)).toBe('leads') + expect(await bindingRows(workspaceId, 'table', older)).toEqual([ + { key: 'leads', origin: 'allocated' }, + ]) + expect(await idOf('table', 'leads-2')).toBe(newer) + }) + + it('gives one key to a resource two concurrent calls allocate', async () => { + const id = generateId() + await insertTable(id, workspaceId, 'Orders', at(3)) + + const keys = await Promise.all(Array.from({ length: 6 }, () => keyOf('table', id))) + + expect(new Set(keys)).toEqual(new Set(['orders'])) + expect(await bindingRows(workspaceId, 'table', id)).toHaveLength(1) + }) + + it('gives distinct keys to same-named resources allocated concurrently', async () => { + const ids = [generateId(), generateId(), generateId()] + await Promise.all( + ids.map((id, index) => insertTable(id, workspaceId, 'Invoices', at(4 + index))) + ) + + const keys = await Promise.all(ids.map((id) => keyOf('table', id))) + + expect(new Set(keys)).toEqual(new Set(['invoices', 'invoices-2', 'invoices-3'])) + }) + + it('keeps every kind’s key through a rename', async () => { + const ids = { + table: generateId(), + kb: generateId(), + workflow: generateId(), + tool: generateId(), + skill: generateId(), + mcp: generateId(), + credential: generateId(), + } + const now = at(10) + await insertTable(ids.table, workspaceId, 'Rename Table', now) + await db.insert(knowledgeBase).values({ + id: ids.kb, + userId, + workspaceId, + name: 'Rename KB', + createdAt: now, + updatedAt: now, + }) + await db.insert(workflow).values({ + id: ids.workflow, + userId, + workspaceId, + name: 'Rename Workflow', + lastSynced: now, + createdAt: now, + updatedAt: now, + }) + await db.insert(customTools).values({ + id: ids.tool, + workspaceId, + userId, + title: 'Rename Tool', + schema: {}, + code: 'return 1', + createdAt: now, + updatedAt: now, + }) + await db.insert(skill).values({ + id: ids.skill, + workspaceId, + userId, + name: 'rename-skill', + description: 'fixture', + content: 'fixture', + createdAt: now, + updatedAt: now, + }) + await db.insert(mcpServers).values({ + id: ids.mcp, + workspaceId, + createdBy: userId, + name: 'Rename MCP', + transport: 'streamable-http', + createdAt: now, + updatedAt: now, + }) + await db.insert(credential).values({ + id: ids.credential, + workspaceId, + type: 'env_workspace', + displayName: 'Rename Credential', + envKey: `RENAME_${ids.credential.replaceAll('-', '_').toUpperCase()}`, + createdBy: userId, + createdAt: now, + updatedAt: now, + }) + + const cases: Array<[ResourceKind, string, string, () => Promise]> = [ + [ + 'table', + ids.table, + 'rename-table', + () => + db + .update(userTableDefinitions) + .set({ name: 'Renamed' }) + .where(eq(userTableDefinitions.id, ids.table)), + ], + [ + 'knowledge-base', + ids.kb, + 'rename-kb', + () => db.update(knowledgeBase).set({ name: 'Renamed' }).where(eq(knowledgeBase.id, ids.kb)), + ], + [ + 'workflow', + ids.workflow, + 'rename-workflow', + () => db.update(workflow).set({ name: 'Renamed' }).where(eq(workflow.id, ids.workflow)), + ], + [ + 'custom-tool', + ids.tool, + 'rename-tool', + () => db.update(customTools).set({ title: 'Renamed' }).where(eq(customTools.id, ids.tool)), + ], + [ + 'skill', + ids.skill, + 'rename-skill', + () => db.update(skill).set({ name: 'renamed' }).where(eq(skill.id, ids.skill)), + ], + [ + 'mcp-server', + ids.mcp, + 'rename-mcp', + () => db.update(mcpServers).set({ name: 'Renamed' }).where(eq(mcpServers.id, ids.mcp)), + ], + [ + 'credential', + ids.credential, + 'rename-credential', + () => + db + .update(credential) + .set({ displayName: 'Renamed' }) + .where(eq(credential.id, ids.credential)), + ], + ] + + for (const [kind, id, expectedKey, rename] of cases) { + expect(await keyOf(kind, id)).toBe(expectedKey) + await rename() + expect(await keyOf(kind, id)).toBe(expectedKey) + expect(await idOf(kind, expectedKey)).toBe(id) + expect(await idOf(kind, 'renamed')).toBeUndefined() + } + }) + + it('never re-points the key of a deleted older resource at a newer same-named one', async () => { + const older = generateId() + const newer = generateId() + await insertTable(older, workspaceId, 'Docs', at(20)) + await insertTable(newer, workspaceId, 'Docs', at(21)) + expect(await keyOf('table', older)).toBe('docs') + + await db + .update(userTableDefinitions) + .set({ archivedAt: new Date() }) + .where(eq(userTableDefinitions.id, older)) + + expect(await idOf('table', 'docs')).toBeUndefined() + expect(await keyOf('table', older)).toBeUndefined() + expect(await keyOf('table', newer)).toBe('docs-2') + expect(await bindingRows(workspaceId, 'table', older)).toEqual([ + { key: 'docs', origin: 'allocated' }, + ]) + + const resolver = await loadResourceKeyResolver(workspaceId, { + ids: [{ kind: 'table', id: newer }], + keys: [{ kind: 'table', key: 'docs' }], + }) + expect(resolver.toId('table', 'docs')).toBeNull() + expect(resolver.toId('table', 'docs-2')).toBe(newer) + }) + + it('never resolves a key or id across workspaces', async () => { + const foreign = generateId() + await insertTable(foreign, otherWorkspaceId, 'Payroll', at(30)) + expect(await keyOf('table', foreign, otherWorkspaceId)).toBe('payroll') + + expect(await idOf('table', 'payroll')).toBeUndefined() + expect(await keyOf('table', foreign)).toBeUndefined() + expect(await bindingRows(workspaceId, 'table', foreign)).toEqual([]) + }) + + it('allocates inside the caller’s transaction and rolls back with it', async () => { + const id = generateId() + await insertTable(id, workspaceId, 'Rollback', at(40)) + + await expect( + db.transaction(async (tx) => { + const keys = await resolveKeys(workspaceId, [{ kind: 'table', id }], { executor: tx }) + expect(keys.get('table')?.get(id)).toBe('rollback') + throw new Error('roll back') + }) + ).rejects.toThrow('roll back') + + expect(await bindingRows(workspaceId, 'table', id)).toEqual([]) + }) +}) diff --git a/apps/sim/lib/workspaces/resource-bindings.test.ts b/apps/sim/lib/workspaces/resource-bindings.test.ts new file mode 100644 index 00000000000..2fd20aff437 --- /dev/null +++ b/apps/sim/lib/workspaces/resource-bindings.test.ts @@ -0,0 +1,45 @@ +import { describe, expect, it } from 'vitest' +import { nextFreeKey, resourceKeyBase } from '@/lib/workspaces/resource-bindings' + +const KEY_FORMAT = /^[a-z][a-z0-9_-]{0,63}$/ + +describe('resourceKeyBase', () => { + it('slugs the name', () => { + expect(resourceKeyBase('table', 'Leads (EU)!')).toBe('leads-eu') + }) + + it('keys a name with no slug characters by its kind', () => { + expect(resourceKeyBase('knowledge-base', '***')).toBe('knowledge-base') + expect(resourceKeyBase('credential', '')).toBe('credential') + }) + + it('prefixes the kind when the slug starts with a digit', () => { + expect(resourceKeyBase('table', '2026 Leads')).toBe('table-2026-leads') + }) + + it('cuts an overlong name to the key length without a trailing hyphen', () => { + const base = resourceKeyBase('table', `${'a'.repeat(63)} b`) + expect(base).toBe('a'.repeat(63)) + expect(base).toMatch(KEY_FORMAT) + }) +}) + +describe('nextFreeKey', () => { + it('returns the base when it is free', () => { + expect(nextFreeKey('leads', new Set(['leads-2']))).toBe('leads') + }) + + it('skips every suffix already taken', () => { + expect(nextFreeKey('leads', new Set(['leads', 'leads-2', 'leads-3']))).toBe('leads-4') + }) + + it('cuts a full-length base so the suffixed key still fits the stored format', () => { + const base = 'b'.repeat(64) + const taken = new Set([base]) + const key = nextFreeKey(base, taken) + expect(key).toBe(`${'b'.repeat(62)}-2`) + expect(key).toMatch(KEY_FORMAT) + taken.add(key) + expect(nextFreeKey(base, taken)).toBe(`${'b'.repeat(62)}-3`) + }) +}) diff --git a/apps/sim/lib/workspaces/resource-bindings.ts b/apps/sim/lib/workspaces/resource-bindings.ts new file mode 100644 index 00000000000..36cdc230a4c --- /dev/null +++ b/apps/sim/lib/workspaces/resource-bindings.ts @@ -0,0 +1,399 @@ +import { db } from '@sim/db' +import { + credential, + customTools, + folder, + knowledgeBase, + mcpServers, + skill, + userTableDefinitions, + workflow, + workspaceResourceBinding, +} from '@sim/db/schema' +import { createLogger } from '@sim/logger' +import { generateId } from '@sim/utils/id' +import { compareStrings, slugify } from '@sim/utils/string' +import type { ResourceKind } from '@sim/workflow-code' +import { and, eq, inArray, isNull, like, or } from 'drizzle-orm' +import type { DbOrTx } from '@/lib/db/types' + +/** + * Persisted resource keys (`workspace_resource_binding`): the only mapping between a workflow + * source key such as `table('leads')` and a resource id. + * + * A key is allocated the first time something needs one for a resource, derived from the + * resource's name at that moment, and never changes afterwards. Renaming the resource keeps its + * key; deleting it leaves the binding on the dead id, so the key stops resolving instead of + * moving to another resource with the same name. Only resources that are live in the given + * workspace resolve in either direction, so an id or key from another workspace never does. + * + * Both functions join the caller's transaction when given one (`executor`). Allocation re-reads + * after each insert, so the caller's transaction must run at READ COMMITTED (the default). + */ + +const logger = createLogger('ResourceBindings') + +const MAX_KEY_LENGTH = 64 + +/** + * Characters of a key base compared when collecting taken keys: a suffixed key keeps at least + * this much of its base, so every key a candidate could collide with shares this prefix. + */ +const TAKEN_PREFIX_LENGTH = 48 + +/** Insert rounds before an allocation that keeps losing races is left unresolved. */ +const MAX_ALLOCATION_ROUNDS = 5 + +interface LiveResource { + id: string + name: string + createdAt: Date +} + +type LiveResourceLoader = ( + executor: DbOrTx, + workspaceId: string, + ids: string[] +) => Promise + +/** + * Reads the live resources among `ids` in one workspace: archived, deleted and foreign rows are + * left out. A kind without a loader has no workspace table to check and never resolves. + */ +const LIVE_RESOURCE_LOADERS: Partial> = { + table: (executor, workspaceId, ids) => + executor + .select({ + id: userTableDefinitions.id, + name: userTableDefinitions.name, + createdAt: userTableDefinitions.createdAt, + }) + .from(userTableDefinitions) + .where( + and( + eq(userTableDefinitions.workspaceId, workspaceId), + inArray(userTableDefinitions.id, ids), + isNull(userTableDefinitions.archivedAt) + ) + ), + 'knowledge-base': (executor, workspaceId, ids) => + executor + .select({ + id: knowledgeBase.id, + name: knowledgeBase.name, + createdAt: knowledgeBase.createdAt, + }) + .from(knowledgeBase) + .where( + and( + eq(knowledgeBase.workspaceId, workspaceId), + inArray(knowledgeBase.id, ids), + isNull(knowledgeBase.deletedAt) + ) + ), + workflow: (executor, workspaceId, ids) => + executor + .select({ id: workflow.id, name: workflow.name, createdAt: workflow.createdAt }) + .from(workflow) + .where( + and( + eq(workflow.workspaceId, workspaceId), + inArray(workflow.id, ids), + isNull(workflow.archivedAt) + ) + ), + 'custom-tool': (executor, workspaceId, ids) => + executor + .select({ id: customTools.id, name: customTools.title, createdAt: customTools.createdAt }) + .from(customTools) + .where(and(eq(customTools.workspaceId, workspaceId), inArray(customTools.id, ids))), + 'mcp-server': (executor, workspaceId, ids) => + executor + .select({ id: mcpServers.id, name: mcpServers.name, createdAt: mcpServers.createdAt }) + .from(mcpServers) + .where( + and( + eq(mcpServers.workspaceId, workspaceId), + inArray(mcpServers.id, ids), + isNull(mcpServers.deletedAt) + ) + ), + skill: (executor, workspaceId, ids) => + executor + .select({ id: skill.id, name: skill.name, createdAt: skill.createdAt }) + .from(skill) + .where(and(eq(skill.workspaceId, workspaceId), inArray(skill.id, ids))), + credential: (executor, workspaceId, ids) => + executor + .select({ id: credential.id, name: credential.displayName, createdAt: credential.createdAt }) + .from(credential) + .where(and(eq(credential.workspaceId, workspaceId), inArray(credential.id, ids))), + 'file-folder': (executor, workspaceId, ids) => + executor + .select({ id: folder.id, name: folder.name, createdAt: folder.createdAt }) + .from(folder) + .where( + and( + eq(folder.workspaceId, workspaceId), + inArray(folder.id, ids), + eq(folder.resourceType, 'file'), + isNull(folder.deletedAt) + ) + ), +} + +export interface ResourceIdRef { + kind: ResourceKind + id: string +} + +export interface ResourceKeyRef { + kind: ResourceKind + key: string +} + +/** kind → (id → key), or kind → (key → id); only live, bound resources appear. */ +export type ResourceKeyMap = Map> + +interface BindingOptions { + /** The caller's transaction, when the lookup must see or join its writes. */ + executor?: DbOrTx +} + +interface ResolveKeysOptions extends BindingOptions { + /** The human the allocation is attributed to; `null` for an actorless caller. */ + createdBy?: string | null +} + +function trimKey(value: string, maxLength: number): string { + return value.slice(0, maxLength).replace(/-+$/, '') +} + +/** + * The key a resource is first offered: its name's slug, or the kind when the name has no slug + * characters; prefixed with the kind when the slug starts with a digit, and cut to the key + * length. Always matches the stored key format `^[a-z][a-z0-9_-]{0,63}$`. + */ +export function resourceKeyBase(kind: ResourceKind, name: string): string { + const slug = slugify(name) + const base = slug === '' ? kind : /^[a-z]/.test(slug) ? slug : `${kind}-${slug}` + return trimKey(base, MAX_KEY_LENGTH) +} + +/** `base` when free, else the first free `base-2`, `base-3`, … (the base cut to fit). */ +export function nextFreeKey(base: string, taken: ReadonlySet): string { + if (!taken.has(base)) return base + for (let suffix = 2; ; suffix += 1) { + const tail = `-${suffix}` + const key = `${trimKey(base, MAX_KEY_LENGTH - tail.length)}${tail}` + if (!taken.has(key)) return key + } +} + +function groupByKind( + refs: Iterable, + value: (ref: T) => string +): Map { + const grouped = new Map>() + for (const ref of refs) { + const values = grouped.get(ref.kind) ?? new Set() + values.add(value(ref)) + grouped.set(ref.kind, values) + } + return new Map([...grouped].map(([kind, values]) => [kind, [...values]])) +} + +async function loadLiveResources( + executor: DbOrTx, + workspaceId: string, + kind: ResourceKind, + ids: string[] +): Promise { + const load = LIVE_RESOURCE_LOADERS[kind] + if (!load || ids.length === 0) return [] + return load(executor, workspaceId, ids) +} + +async function readBindingsByResource( + executor: DbOrTx, + workspaceId: string, + kind: ResourceKind, + resourceIds: string[] +): Promise> { + if (resourceIds.length === 0) return new Map() + const rows = await executor + .select({ resourceId: workspaceResourceBinding.resourceId, key: workspaceResourceBinding.key }) + .from(workspaceResourceBinding) + .where( + and( + eq(workspaceResourceBinding.workspaceId, workspaceId), + eq(workspaceResourceBinding.kind, kind), + inArray(workspaceResourceBinding.resourceId, resourceIds) + ) + ) + return new Map(rows.map((row) => [row.resourceId, row.key])) +} + +async function readTakenKeys( + executor: DbOrTx, + workspaceId: string, + kind: ResourceKind, + bases: string[] +): Promise> { + const prefixes = [...new Set(bases.map((base) => base.slice(0, TAKEN_PREFIX_LENGTH)))] + const rows = await executor + .select({ key: workspaceResourceBinding.key }) + .from(workspaceResourceBinding) + .where( + and( + eq(workspaceResourceBinding.workspaceId, workspaceId), + eq(workspaceResourceBinding.kind, kind), + or(...prefixes.map((prefix) => like(workspaceResourceBinding.key, `${prefix}%`))) + ) + ) + return new Set(rows.map((row) => row.key)) +} + +/** + * Binds every unbound resource in `unbound` and returns the keys now bound to them. Each round + * offers the oldest resource the lowest free key and inserts with on-conflict-do-nothing: a row + * that loses a race (the resource bound concurrently, or its key taken by another resource) is + * skipped and re-read, so concurrent callers converge on one key per resource. + */ +async function allocateKeys( + executor: DbOrTx, + workspaceId: string, + kind: ResourceKind, + unbound: LiveResource[], + createdBy: string | null +): Promise> { + const allocated = new Map() + let pending = [...unbound].sort( + (a, b) => a.createdAt.getTime() - b.createdAt.getTime() || compareStrings(a.id, b.id) + ) + for (let round = 0; round < MAX_ALLOCATION_ROUNDS && pending.length > 0; round += 1) { + const bases = new Map(pending.map((row) => [row.id, resourceKeyBase(kind, row.name)])) + const taken = await readTakenKeys(executor, workspaceId, kind, [...bases.values()]) + const now = new Date() + const values = pending.map((row) => { + const key = nextFreeKey(bases.get(row.id) ?? kind, taken) + taken.add(key) + return { + id: generateId(), + workspaceId, + kind, + key, + resourceId: row.id, + origin: 'allocated' as const, + createdBy, + createdAt: now, + updatedAt: now, + } + }) + await executor.insert(workspaceResourceBinding).values(values).onConflictDoNothing() + const bound = await readBindingsByResource( + executor, + workspaceId, + kind, + pending.map((row) => row.id) + ) + for (const [resourceId, key] of bound) allocated.set(resourceId, key) + pending = pending.filter((row) => !bound.has(row.id)) + } + if (pending.length > 0) { + logger.warn('Resource key allocation did not converge; leaving resources unresolved', { + workspaceId, + kind, + unresolvedCount: pending.length, + }) + } + return allocated +} + +/** + * The key of each referenced resource that is live in `workspaceId`, allocating one for a + * resource that has none yet. Ids that are deleted, archived, from another workspace, or of a + * kind with no workspace table are left out (the caller treats them as unresolved). + * + * Allocation is a metadata write that callers with read access may cause (`source get`): it is + * idempotent identity allocation that changes no resource, only records the name the resource is + * printed under from now on, and a second call returns the same key without writing. Concurrent + * calls for the same resource insert with on-conflict-do-nothing and re-read, so they agree on one + * key. + */ +export async function resolveKeys( + workspaceId: string, + refs: Iterable, + options: ResolveKeysOptions = {} +): Promise { + const executor = options.executor ?? db + const resolved: ResourceKeyMap = new Map() + for (const [kind, ids] of groupByKind(refs, (ref) => ref.id)) { + const live = await loadLiveResources(executor, workspaceId, kind, ids) + if (live.length === 0) continue + const keys = await readBindingsByResource( + executor, + workspaceId, + kind, + live.map((row) => row.id) + ) + const unbound = live.filter((row) => !keys.has(row.id)) + if (unbound.length > 0) { + const allocated = await allocateKeys( + executor, + workspaceId, + kind, + unbound, + options.createdBy ?? null + ) + for (const [id, key] of allocated) keys.set(id, key) + } + resolved.set(kind, keys) + } + return resolved +} + +/** + * The resource each key is bound to in `workspaceId`, when that resource is still live. A key + * with no binding, or bound to a deleted or archived resource, is left out: it is never re-pointed + * at another resource. Never allocates. + */ +export async function resolveIds( + workspaceId: string, + refs: Iterable, + options: BindingOptions = {} +): Promise { + const executor = options.executor ?? db + const resolved: ResourceKeyMap = new Map() + for (const [kind, keys] of groupByKind(refs, (ref) => ref.key)) { + if (!LIVE_RESOURCE_LOADERS[kind]) continue + const rows = await executor + .select({ + key: workspaceResourceBinding.key, + resourceId: workspaceResourceBinding.resourceId, + }) + .from(workspaceResourceBinding) + .where( + and( + eq(workspaceResourceBinding.workspaceId, workspaceId), + eq(workspaceResourceBinding.kind, kind), + inArray(workspaceResourceBinding.key, keys) + ) + ) + if (rows.length === 0) continue + const live = new Set( + ( + await loadLiveResources( + executor, + workspaceId, + kind, + rows.map((row) => row.resourceId) + ) + ).map((row) => row.id) + ) + const ids = new Map() + for (const row of rows) if (live.has(row.resourceId)) ids.set(row.key, row.resourceId) + if (ids.size > 0) resolved.set(kind, ids) + } + return resolved +} diff --git a/packages/db/schema.ts b/packages/db/schema.ts index 282b6029bb0..287c53f5f24 100644 --- a/packages/db/schema.ts +++ b/packages/db/schema.ts @@ -2707,8 +2707,8 @@ export const workspaceForkBlockMap = pgTable( /** * Resource kinds a workflow-source key can name: `ResourceKind` from `@sim/workflow-code`, which is * `PortableResourceKind` from `@sim/workflow-types/resources` minus `env-var` (env names are their - * own keys). The binding service writes and reads this column as `ResourceKind`, so the two lists - * cannot drift without a type error. + * own keys). Kept as a literal list so `@sim/db` takes no dependency on the workflow packages; the + * binding service writes this column from a `ResourceKind`, so a kind missing here is a type error. */ export const workspaceResourceKindEnum = pgEnum('workspace_resource_kind', [ 'credential', From 63182e649941f2ef2c86779794bab56c01124064 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:56:46 -0800 Subject: [PATCH 106/428] chore(audits): shrink the relative-import baseline for the subblock tests --- scripts/check-source-conventions.baseline.json | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/scripts/check-source-conventions.baseline.json b/scripts/check-source-conventions.baseline.json index 0129b4138ed..df10085192e 100644 --- a/scripts/check-source-conventions.baseline.json +++ b/scripts/check-source-conventions.baseline.json @@ -289,8 +289,7 @@ "apps/sim/lib/workflows/migrations/whatsapp-interactive-type.test.ts": 1, "apps/sim/lib/workflows/references/binding-credentials.test.ts": 2, "apps/sim/lib/workflows/schedules/deploy.test.ts": 4, - "apps/sim/lib/workflows/subblocks/context.test.ts": 2, - "apps/sim/lib/workflows/subblocks/visibility.test.ts": 1, + "apps/sim/lib/workflows/subblocks/context.test.ts": 1, "apps/sim/next.config.ts": 5, "apps/sim/providers/gemini/core.ts": 1, "apps/sim/providers/gemini/streaming-tool-loop.ts": 2, From 028cfd8dcfe72f47a88e2895888a76b701d0dfa9 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:59:07 -0800 Subject: [PATCH 107/428] chore(workflows): clear the knip findings on the workflow code branch --- apps/sim/hooks/queries/workflow-source.ts | 2 +- apps/sim/lib/api/contracts/v2/block-catalog.ts | 6 +++--- apps/sim/lib/workflows/source/graph-diff.ts | 2 +- apps/sim/package.json | 1 + bun.lock | 1 + knip.jsonc | 10 +++++++++- packages/workflow-code/src/canonicalize/context.ts | 10 +--------- packages/workflow-code/src/canonicalize/values.ts | 2 +- packages/workflow-code/src/compile/context.ts | 2 +- packages/workflow-code/src/compile/parse.ts | 4 ++-- packages/workflow-code/src/compile/values.ts | 2 +- .../src/materialize/fixtures.test-helpers.ts | 2 +- packages/workflow-code/src/materialize/identity.ts | 2 +- packages/workflow-code/src/materialize/values.ts | 2 +- scripts/check-unused-exports.baseline.json | 3 --- 15 files changed, 25 insertions(+), 26 deletions(-) diff --git a/apps/sim/hooks/queries/workflow-source.ts b/apps/sim/hooks/queries/workflow-source.ts index 58796f64a1b..7d829240d21 100644 --- a/apps/sim/hooks/queries/workflow-source.ts +++ b/apps/sim/hooks/queries/workflow-source.ts @@ -3,7 +3,7 @@ import { requestJson } from '@/lib/api/client/request' import { getWorkflowSourceContract, type WorkflowSource } from '@/lib/api/contracts/workflow-source' /** The Code tab invalidates after every persisted edit, so staleness only covers idle refocus. */ -export const WORKFLOW_SOURCE_STALE_TIME = 30_000 +const WORKFLOW_SOURCE_STALE_TIME = 30_000 export const workflowSourceKeys = { all: ['workflow-source'] as const, diff --git a/apps/sim/lib/api/contracts/v2/block-catalog.ts b/apps/sim/lib/api/contracts/v2/block-catalog.ts index bde90f32756..719f8d220de 100644 --- a/apps/sim/lib/api/contracts/v2/block-catalog.ts +++ b/apps/sim/lib/api/contracts/v2/block-catalog.ts @@ -22,7 +22,7 @@ import { v2DataResponse } from '@/lib/api/contracts/v2/shared' * per-block accessors) from `@sim/workflow-code` rather than walking these references themselves. */ -export const v2BlockCatalogQuerySchema = z +const v2BlockCatalogQuerySchema = z .object({ workflowId: workflowIdSchema .optional() @@ -32,13 +32,13 @@ export const v2BlockCatalogQuerySchema = z }) .strict() -export const v2BlockCatalogParamsSchema = z.object({ +const v2BlockCatalogParamsSchema = z.object({ workspaceId: workspaceIdSchema.describe( 'Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what the catalog contains.' ), }) -export const v2BlockCatalogHeadersSchema = z.object({ +const v2BlockCatalogHeadersSchema = z.object({ 'if-none-match': z .string() .max(1024, 'if-none-match must be at most 1024 characters') diff --git a/apps/sim/lib/workflows/source/graph-diff.ts b/apps/sim/lib/workflows/source/graph-diff.ts index b0971cdc2ca..1d6034e9f60 100644 --- a/apps/sim/lib/workflows/source/graph-diff.ts +++ b/apps/sim/lib/workflows/source/graph-diff.ts @@ -15,7 +15,7 @@ const LAYOUT_BLOCK_KEYS: ReadonlySet = new Set(['position', 'height', 'l const LAYOUT_DATA_KEYS: ReadonlySet = new Set(['width', 'height']) /** One block present on both sides whose semantic content differs. */ -export interface ModifiedBlock { +interface ModifiedBlock { id: string /** Subblock ids whose stored entry differs, in sorted order. */ subBlocks: string[] diff --git a/apps/sim/package.json b/apps/sim/package.json index 0adf26062af..cbd6940864e 100644 --- a/apps/sim/package.json +++ b/apps/sim/package.json @@ -339,6 +339,7 @@ "@vitest/spy": "5.1.0", "buffer": "5.6.0", "chai": "6.3.0", + "fast-check": "3.23.2", "node-gyp": "12.4.0", "postcss": "^8.5.30", "postcss-load-config": "6.0.1", diff --git a/bun.lock b/bun.lock index b2e905b9931..fe5869c2c9c 100644 --- a/bun.lock +++ b/bun.lock @@ -488,6 +488,7 @@ "@vitest/spy": "5.1.0", "buffer": "5.6.0", "chai": "6.3.0", + "fast-check": "3.23.2", "node-gyp": "12.4.0", "postcss": "^8.5.30", "postcss-load-config": "6.0.1", diff --git a/knip.jsonc b/knip.jsonc index 3bd59559cf8..79be1c784d1 100644 --- a/knip.jsonc +++ b/knip.jsonc @@ -180,9 +180,17 @@ // this setting once those import it. "packages/workflow-code": { "includeEntryExports": false }, // The SDK's codegen is consumed by the catalog route and `sim types` in Wave 3. + // `test/examples` and `test/negative` are type-check fixtures: nothing imports them, because + // `test/typecheck-project.ts` globs them into a tsconfig that a test runs tsgo against. "packages/workflow-sdk": { "includeEntryExports": false, - "entry": ["src/runtime.ts", "src/codegen/index.ts", "scripts/*.ts"] + "entry": [ + "src/runtime.ts", + "src/codegen/index.ts", + "scripts/*.ts", + "test/examples/*.ts", + "test/negative/*.ts" + ] }, // This shared config is consumed by apps that own the Next dependency. "packages/tsconfig": { "ignoreUnresolved": ["next"] } diff --git a/packages/workflow-code/src/canonicalize/context.ts b/packages/workflow-code/src/canonicalize/context.ts index 4da3c33cf08..ca6052f87b8 100644 --- a/packages/workflow-code/src/canonicalize/context.ts +++ b/packages/workflow-code/src/canonicalize/context.ts @@ -1,5 +1,5 @@ import type { ResourceKeyResolver } from '../api' -import type { BlockCatalog, CatalogBlock, CatalogSubBlock } from '../catalog/types' +import type { BlockCatalog, CatalogBlock } from '../catalog/types' import { catalogBlock as readCatalogBlock } from '../catalog/view' import type { CanonicalizeDiagnosticCode } from '../diagnostics/codes' import type { Diagnostic } from '../diagnostics/frame' @@ -34,11 +34,3 @@ export function report(context: CanonContext, diagnostic: Diagnostic subBlock.id === id) : [] -} diff --git a/packages/workflow-code/src/canonicalize/values.ts b/packages/workflow-code/src/canonicalize/values.ts index 70a23244b85..b00de000197 100644 --- a/packages/workflow-code/src/canonicalize/values.ts +++ b/packages/workflow-code/src/canonicalize/values.ts @@ -39,7 +39,7 @@ export function toJson(value: unknown): Json { * variable by normalized name or id (resolvers/workflow.ts:54-56). Tokens the executor would not * treat as references, and references that resolve to nothing, are left verbatim. */ -export function rewriteReferences(text: string, context: CanonContext): string { +function rewriteReferences(text: string, context: CanonContext): string { if (!text.includes('<')) return text return text.replace(REFERENCE_CANDIDATE, (match: string, inner: string) => { if (!isLikelyWorkflowReferenceSegment(match)) return match diff --git a/packages/workflow-code/src/compile/context.ts b/packages/workflow-code/src/compile/context.ts index 50420e3b31c..afb75f22fd8 100644 --- a/packages/workflow-code/src/compile/context.ts +++ b/packages/workflow-code/src/compile/context.ts @@ -87,7 +87,7 @@ interface ImpliedEdge { } /** Code-file reads within one compile: each distinct file is read and parsed once. */ -export interface CodeFileBudget { +interface CodeFileBudget { /** Repo-relative path → stored code, or `null` when the file was rejected. */ reads: Map /** `file()` references seen so far. */ diff --git a/packages/workflow-code/src/compile/parse.ts b/packages/workflow-code/src/compile/parse.ts index bcf39670461..2eac4c49736 100644 --- a/packages/workflow-code/src/compile/parse.ts +++ b/packages/workflow-code/src/compile/parse.ts @@ -35,7 +35,7 @@ const SKIPPED_KEYS = new Set([ 'extra', ]) -export function isNode(value: unknown): value is Node { +function isNode(value: unknown): value is Node { return ( typeof value === 'object' && value !== null && @@ -44,7 +44,7 @@ export function isNode(value: unknown): value is Node { } /** Every child AST node of `node`, in no particular order. */ -export function childNodes(node: Node): Node[] { +function childNodes(node: Node): Node[] { const children: Node[] = [] for (const [key, value] of Object.entries(node)) { if (SKIPPED_KEYS.has(key)) continue diff --git a/packages/workflow-code/src/compile/values.ts b/packages/workflow-code/src/compile/values.ts index 05cddc2f8c2..fbc1e53a96a 100644 --- a/packages/workflow-code/src/compile/values.ts +++ b/packages/workflow-code/src/compile/values.ts @@ -133,7 +133,7 @@ function rejectNode(ctx: CompileContext, node: Node, site?: ValueSite): null { } /** The literal text of a property key, or `null` (after reporting) for a computed key. */ -export function propertyKey(ctx: CompileContext, property: ObjectProperty): string | null { +function propertyKey(ctx: CompileContext, property: ObjectProperty): string | null { if (property.computed) { report(ctx, property, 'Computed keys are not supported.', HINTS.computedKey) return null diff --git a/packages/workflow-code/src/materialize/fixtures.test-helpers.ts b/packages/workflow-code/src/materialize/fixtures.test-helpers.ts index 542583f549f..706cbc4ac5b 100644 --- a/packages/workflow-code/src/materialize/fixtures.test-helpers.ts +++ b/packages/workflow-code/src/materialize/fixtures.test-helpers.ts @@ -291,7 +291,7 @@ export function edge( return { id, source, target, sourceHandle, targetHandle: 'target', type: 'default', ...extra } } -export const META = { name: 'Fixture', description: null } +const META = { name: 'Fixture', description: null } export const RESOURCES: ResourceKeyResolver = { toKey: (kind, id) => (id.startsWith('missing') ? null : `${kind}:${id}`), diff --git a/packages/workflow-code/src/materialize/identity.ts b/packages/workflow-code/src/materialize/identity.ts index eef1814902d..3e51c2b13f0 100644 --- a/packages/workflow-code/src/materialize/identity.ts +++ b/packages/workflow-code/src/materialize/identity.ts @@ -14,7 +14,7 @@ import type { BlockKey, CanonicalWorkflow } from '../model' import { catalogBlock, report } from './context' /** The stored graph being replaced, with its canonical projection (keys, identity). */ -export interface PrevGraph { +interface PrevGraph { state: { blocks: Record } canonical: CanonicalizeResult } diff --git a/packages/workflow-code/src/materialize/values.ts b/packages/workflow-code/src/materialize/values.ts index dc3936d06a3..0786bbe9a94 100644 --- a/packages/workflow-code/src/materialize/values.ts +++ b/packages/workflow-code/src/materialize/values.ts @@ -41,7 +41,7 @@ export function deepEqual(left: unknown, right: unknown): boolean { ) } -export function isSimNode(value: unknown): value is SimNode { +function isSimNode(value: unknown): value is SimNode { return isRecordLike(value) && typeof value.$sim === 'string' && SIM_NODE_KINDS.has(value.$sim) } diff --git a/scripts/check-unused-exports.baseline.json b/scripts/check-unused-exports.baseline.json index 1d35047b0bf..f7ba5d7ca25 100644 --- a/scripts/check-unused-exports.baseline.json +++ b/scripts/check-unused-exports.baseline.json @@ -5078,7 +5078,6 @@ "apps/sim/lib/workflows/diff/types.ts#FieldDiffStatus", "apps/sim/lib/workflows/dynamic-handle-topology.ts#getDynamicHandleSubblockId", "apps/sim/lib/workflows/editing/block-enablement.ts#findDescendants", - "apps/sim/lib/workflows/editing/block-enablement.ts#hasDisabledAncestor", "apps/sim/lib/workflows/editing/builders.ts#createSeededValueGate", "apps/sim/lib/workflows/editing/engine.ts#topologicalSortInserts", "apps/sim/lib/workflows/editing/lint.ts#WorkflowLintEmptyOutgoingPort", @@ -5104,8 +5103,6 @@ "apps/sim/lib/workflows/input-file-schema.ts#workflowStoredFileInputSchema", "apps/sim/lib/workflows/input-file-schema.ts#workflowUploadFileInputSchema", "apps/sim/lib/workflows/input-format-schema.ts#inputFormatFieldStateSchema", - "apps/sim/lib/workflows/migrations/subblock-migrations.ts#CANONICAL_ID_MIGRATIONS", - "apps/sim/lib/workflows/migrations/subblock-migrations.ts#CanonicalIdMigration", "apps/sim/lib/workflows/operations/export-workflow.ts#WorkflowExportEdge", "apps/sim/lib/workflows/operations/import-workflow.ts#describeStrippedWorkspaceBindings", "apps/sim/lib/workflows/persistence/custom-tools-persistence.ts#extractCustomToolsFromWorkflowState", From 53001f80039212ff079b360bb03fba286d5bfda5 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:59:30 -0800 Subject: [PATCH 108/428] test(workflows): key the header comment through encodeAnchor in the source lock test --- apps/sim/lib/workflows/code/source-lock.test.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/apps/sim/lib/workflows/code/source-lock.test.ts b/apps/sim/lib/workflows/code/source-lock.test.ts index 577c6e2c083..24685711618 100644 --- a/apps/sim/lib/workflows/code/source-lock.test.ts +++ b/apps/sim/lib/workflows/code/source-lock.test.ts @@ -173,7 +173,9 @@ describe('mergeCodeMetaFromLock', () => { [encodeAnchor({ kind: 'block', block: 'nosuchblock' })]: [ { text: ' dropped', kind: 'line', placement: 'leading' }, ], - header: [{ text: ' kept', kind: 'line', placement: 'leading' }], + [encodeAnchor({ kind: 'header' })]: [ + { text: ' kept', kind: 'line', placement: 'leading' }, + ], }, }, }, From f6d8ae0566e40a50bbcb804fcd97fd17679fec75 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 21:56:22 -0800 Subject: [PATCH 109/428] fix(workflow-code): scope the activity canonical index to the block's serialized surface --- .../src/canonicalize/index.test.ts | 78 ++++++++++++++++++- .../workflow-code/src/canonicalize/index.ts | 6 +- .../workflow-code/src/canonicalize/modes.ts | 24 +++++- 3 files changed, 101 insertions(+), 7 deletions(-) diff --git a/packages/workflow-code/src/canonicalize/index.test.ts b/packages/workflow-code/src/canonicalize/index.test.ts index e662661d25e..4c8620b7656 100644 --- a/packages/workflow-code/src/canonicalize/index.test.ts +++ b/packages/workflow-code/src/canonicalize/index.test.ts @@ -9,7 +9,8 @@ import { canonicalize } from '.' /* * The catalog below is hand-projected from real registry configs (apps/sim/blocks/blocks: * slack.ts, agent.ts, condition.ts, router_v2.ts, function.ts, variables.ts, api.ts, - * start_trigger.ts, table.ts) down to the fields canonicalize reads. Quirk numbers refer to + * start_trigger.ts, table.ts, gmail.ts with triggers/gmail/poller.ts, generic_webhook.ts with + * triggers/generic/webhook.ts) down to the fields canonicalize reads. Quirk numbers refer to * s1 §5. */ @@ -216,6 +217,39 @@ const CATALOG: BlockCatalog = { ], { category: 'triggers' } ), + gmail: block('gmail', [ + sb({ id: 'operation', type: 'dropdown', surface: 'action' }), + sb({ + id: 'credential', + type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'basic', + surface: 'action', + }), + sb({ + id: 'manualCredential', + type: 'short-input', + canonicalParamId: 'oauthCredential', + mode: 'advanced', + surface: 'action', + }), + sb({ + id: 'triggerCredentials', + type: 'oauth-input', + canonicalParamId: 'oauthCredential', + mode: 'trigger', + surface: 'trigger', + }), + sb({ id: 'labelIds', type: 'dropdown', mode: 'trigger', surface: 'trigger' }), + ]), + generic_webhook: block( + 'generic_webhook', + [ + sb({ id: 'requireAuth', type: 'switch', mode: 'trigger', surface: 'trigger' }), + sb({ id: 'token', type: 'short-input', mode: 'trigger', surface: 'trigger' }), + ], + { category: 'triggers' } + ), custom_block_acme: block( 'custom_block_acme', [ @@ -682,6 +716,48 @@ describe('canonicalize: inactive annotation (step 9, quirks 1, 10, 14)', () => { expect(action.workflow.annotations.inactive.slack).toEqual(['signingSecret']) }) + it('keeps a trigger field active in trigger mode when it shares a canonical id with an action pair', () => { + const trigger = run( + workflow([ + blockState( + 'b1', + 'gmail', + 'Gmail', + { triggerCredentials: 'cred-1', labelIds: 'INBOX' }, + { triggerMode: true } + ), + ]) + ) + expect(trigger.workflow.annotations.inactive.gmail).toBeUndefined() + const action = run( + workflow([ + blockState('b1', 'gmail', 'Gmail', { + operation: 'send_gmail', + credential: 'cred-1', + triggerCredentials: 'cred-1', + }), + ]) + ) + expect(action.workflow.annotations.inactive.gmail).toEqual(['triggerCredentials']) + }) + + it('keeps every field of a trigger-category block active in and out of trigger mode', () => { + for (const triggerMode of [false, true]) { + const result = run( + workflow([ + blockState( + 'b1', + 'generic_webhook', + 'Webhook', + { requireAuth: true, token: 't' }, + { triggerMode } + ), + ]) + ) + expect(result.workflow.annotations.inactive.webhook).toBeUndefined() + } + }) + it('marks tool-input-only and undeclared fields inactive, except on custom blocks (quirk 18)', () => { const result = run( workflow([ diff --git a/packages/workflow-code/src/canonicalize/index.ts b/packages/workflow-code/src/canonicalize/index.ts index f919d177982..1404576179c 100644 --- a/packages/workflow-code/src/canonicalize/index.ts +++ b/packages/workflow-code/src/canonicalize/index.ts @@ -7,7 +7,7 @@ import { resolveEffectiveErrorEnabled, } from '@sim/workflow-types/workflow' import type { CanonicalizeFn } from '../api' -import { buildCanonicalIndex, type CanonicalModeOverrides } from '../catalog/canonical-index' +import type { CanonicalModeOverrides } from '../catalog/canonical-index' import type { CanonicalizeDiagnosticCode } from '../diagnostics/codes' import type { Diagnostic } from '../diagnostics/frame' import type { LockIdentity, LockIdentityBlock, LockLayout } from '../lock' @@ -27,7 +27,7 @@ import { type LiftedBranches, liftBranches } from './branches' import { type CanonContext, catalogBlock, report } from './context' import { canonicalEdges } from './edges' import { assignBlockKeys, assignVariableKeys } from './keys' -import { effectiveModes } from './modes' +import { buildCanonicalIndexForSurface, effectiveModes } from './modes' import { canonicalParams } from './params' import { loopSpec, parallelSpec, SUBFLOW_DATA_KEYS } from './subflows' import { toJson, toValue } from './values' @@ -264,7 +264,7 @@ export const canonicalize: CanonicalizeFn = (state, options) => { advancedMode, values: activityValues, overrides, - index: buildCanonicalIndex(catalog.subBlocks), + index: buildCanonicalIndexForSurface(catalog, triggerMode), } const inactiveIds = Object.keys(params).filter((paramId) => isInactive(paramId, activityInputs) diff --git a/packages/workflow-code/src/canonicalize/modes.ts b/packages/workflow-code/src/canonicalize/modes.ts index 284f25c3a8e..9f2b2d583ee 100644 --- a/packages/workflow-code/src/canonicalize/modes.ts +++ b/packages/workflow-code/src/canonicalize/modes.ts @@ -1,5 +1,6 @@ import { buildCanonicalIndex, + type CanonicalIndex, type CanonicalModeOverrides, isCanonicalPair, resolveCanonicalMode, @@ -24,9 +25,7 @@ export function effectiveModes( overrides: CanonicalModeOverrides | undefined, legacyAdvancedMode: boolean ): Record { - const index = buildCanonicalIndex( - block.subBlocks.filter((subBlock) => onBlockSurface(block, subBlock, triggerMode)) - ) + const index = buildCanonicalIndexForSurface(block, triggerMode) const modes: Record = {} for (const group of Object.values(index.groupsById)) { if (!isCanonicalPair(group)) continue @@ -37,6 +36,25 @@ export function effectiveModes( return modes } +/** + * The canonical groups of the surface the block serializes: the trigger surface in trigger mode, + * the action surface otherwise, and both for a trigger block. + * + * A block that is both an action and a trigger declares both surfaces in one `subBlocks` list, and + * they share `canonicalParamId`s under different ids (Gmail's `credential`/`manualCredential` and + * `triggerCredentials` are all `oauthCredential`). Indexed together, the trigger member joins the + * action pair without being either of its members, so it reads as the pair's dormant side. + */ +export function buildCanonicalIndexForSurface( + block: Pick, + triggerMode: boolean +): CanonicalIndex { + const onSurface = block.subBlocks.filter((subBlock) => + onBlockSurface(block, subBlock, triggerMode) + ) + return buildCanonicalIndex(onSurface) +} + function onBlockSurface( block: Pick, subBlock: CatalogSubBlock, From 0fde3275af3c658962842781fc0b0bc8e3623439 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:05:46 -0800 Subject: [PATCH 110/428] contract(workflow-code): per-operation and per-model visibility data on catalog subblocks visibleWhen holds the clause on other fields an opaque condition still asks under each shown operation; visibleForModel says, per model option, whether a model-dependent condition shows the field. Additive and read by compile field checks only; canonicalize keeps condition opaque. --- apps/sim/lib/api/contracts/v2/block-catalog.ts | 10 ++++++++++ packages/workflow-code/src/catalog/types.ts | 13 +++++++++++++ 2 files changed, 23 insertions(+) diff --git a/apps/sim/lib/api/contracts/v2/block-catalog.ts b/apps/sim/lib/api/contracts/v2/block-catalog.ts index bde90f32756..7c61fd456c6 100644 --- a/apps/sim/lib/api/contracts/v2/block-catalog.ts +++ b/apps/sim/lib/api/contracts/v2/block-catalog.ts @@ -115,6 +115,16 @@ const catalogSubBlockSchema = z .record(z.string(), z.boolean()) .optional() .describe('Per operation id: whether an opaque condition can show this field.'), + visibleWhen: z + .record(z.string(), conditionClauseSchema) + .optional() + .describe( + 'Per operation id: the clause on other fields an opaque condition still asks to show this field.' + ), + visibleForModel: z + .record(z.string(), z.boolean()) + .optional() + .describe('Per model id: whether an opaque condition shows this field.'), required: z .union([z.boolean(), catalogConditionSchema]) .optional() diff --git a/packages/workflow-code/src/catalog/types.ts b/packages/workflow-code/src/catalog/types.ts index b0048ee880a..583b8cbf232 100644 --- a/packages/workflow-code/src/catalog/types.ts +++ b/packages/workflow-code/src/catalog/types.ts @@ -107,6 +107,19 @@ export interface CatalogSubBlock { * consumers evaluate themselves. An operation missing from the map counts as visible. */ visibleFor?: Record + /** + * Per operation id that `visibleFor` shows, the data clause on other fields the condition still + * asks under that operation (Slack's `send` keeps the channel behind `destinationType`). An + * operation missing here asks nothing more. Read by compile's field checks only. + */ + visibleWhen?: Record + /** + * Per model id of the block's own `model` options, whether this subBlock is visible, precomputed + * when `condition` is a function of the selected model (the Vertex, Bedrock and API key fields of + * model blocks). A model the condition cannot decide alone is left out. Read by compile's field + * checks only. + */ + visibleForModel?: Record required?: boolean | CatalogCondition /** UI clearing and fetch ordering only; never part of types or visibility (s2 §2). */ dependsOn?: { all: SubBlockId[]; any: SubBlockId[] } From 963f194247550b0a2a6b9d36cbda7302fe83dc89 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:05:47 -0800 Subject: [PATCH 111/428] fix(workflow-code): decide required-field warnings from what the block runs with W_REQUIRED_MISSING now evaluates visibility against the written values plus catalog defaults, using the catalog's per-operation and per-model visibility data (computed in the catalog builder), and never warns on a field whose visibility or requiredness the catalog cannot decide. Trigger-mode output paths resolve against the trigger's outputs. Table params are typed as the printer writes them. The five SDK examples compile against the real catalog with no diagnostics, and a corpus property checks no warning names a field the registry's own condition hides. --- .../sim/lib/workflows/code/catalog/project.ts | 164 ++++++++++++++++-- .../lib/workflows/code/sdk-examples.test.ts | 126 ++++++++++++++ packages/workflow-code/src/compile/blocks.ts | 7 +- .../src/compile/validate-catalog.ts | 135 ++++++++++++-- packages/workflow-code/src/compile/values.ts | 5 +- .../workflow-sdk/src/codegen/map-subblock.ts | 24 +-- .../test/examples/lead-enrichment.ts | 2 +- .../test/examples/scheduled-report.ts | 4 - 8 files changed, 409 insertions(+), 58 deletions(-) create mode 100644 apps/sim/lib/workflows/code/sdk-examples.test.ts diff --git a/apps/sim/lib/workflows/code/catalog/project.ts b/apps/sim/lib/workflows/code/catalog/project.ts index 84046c65289..d674d22331e 100644 --- a/apps/sim/lib/workflows/code/catalog/project.ts +++ b/apps/sim/lib/workflows/code/catalog/project.ts @@ -11,6 +11,7 @@ import type { Json, SubBlockConditionClause, } from '@sim/workflow-code' +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' import type { OutputCondition, PrimitiveValueType } from '@sim/workflow-types/blocks' import { isWorkflowAnnotationOnlyBlockType } from '@sim/workflow-types/workflow' import { resolveSubBlockOptions } from '@/lib/catalog/projection/subblock' @@ -103,24 +104,134 @@ function excludedByOperation(clause: SubBlockConditionClause, operation: string) type ConditionThunk = (values: Record) => RegistryClause -function projectConditionThunk( - thunk: ConditionThunk, +/** + * What a clause still asks once `operation` decided its operation parts: `null` when the + * operation excludes it, `true` when nothing else is asked, else the clause on other fields. + */ +function residualAfterOperation( + clause: SubBlockConditionClause, + operation: string +): SubBlockConditionClause | true | null { + if (excludedByOperation(clause, operation)) return null + const and = clause.and + if (clause.field === 'operation') { + if (!and || and.field === 'operation') return true + const rest: SubBlockConditionClause = { field: and.field, value: and.value ?? null } + if (and.not !== undefined) rest.not = and.not + return rest + } + if (and?.field === 'operation') { + const rest: SubBlockConditionClause = { field: clause.field, value: clause.value } + if (clause.not !== undefined) rest.not = clause.not + return rest + } + return clause +} + +/** What a function condition is probed with: operations, model ids and dropdown values. */ +interface ConditionInputs { operations: readonly string[] -): { condition: CatalogCondition; visibleFor?: Record } { + /** The block's literal `model` options. */ + models: readonly string[] + /** Each value a static dropdown can hold, `undefined` (unset) included. */ + choices: ReadonlyMap> +} + +/** Value combinations tried per model before that model is left undecided. */ +const MAX_MODEL_PROBE_VARIANTS = 16 + +function clauseFields(clause: SubBlockConditionClause): string[] { + return clause.and ? [clause.field, clause.and.field] : [clause.field] +} + +/** + * Whether `thunk` shows its field for `model` whatever the dropdowns it also reads hold: `true` + * or `false` when every combination agrees, `undefined` when they disagree or a read or returned + * clause reaches a field the probe cannot enumerate. + */ +function visibleForModel( + thunk: ConditionThunk, + model: string, + choices: ConditionInputs['choices'] +): boolean | undefined { + const outcomes = new Set() + let pending: Array> = [{ model }] + let probes = 0 + while (pending.length > 0) { + const next: Array> = [] + for (const bag of pending) { + probes += 1 + if (probes > MAX_MODEL_PROBE_VARIANTS) return undefined + const probe = probeThunk(thunk, bag) + if (!probe.ok || probe.reads.has('*')) return undefined + const unbound = [...probe.reads].find((read) => !Object.hasOwn(bag, read)) + if (unbound !== undefined) { + const values = choices.get(unbound) + if (!values) return undefined + for (const value of values) next.push({ ...bag, [unbound]: value }) + continue + } + const clause = copyClause(probe.result) + if (clauseFields(clause).some((field) => !Object.hasOwn(bag, field))) return undefined + outcomes.add(evaluateSubBlockCondition(clause, bag)) + } + pending = next + } + return outcomes.size === 1 ? outcomes.has(true) : undefined +} + +/** + * Per model id of the block, whether a model-dependent condition shows its field, or `undefined` + * when the condition does not read the model. Models it cannot decide alone are left out. + */ +function projectVisibleForModel( + thunk: ConditionThunk, + inputs: ConditionInputs +): Record | undefined { + if (inputs.models.length === 0) return undefined + if (!probeThunk(thunk, { model: inputs.models[0] }).reads.has('model')) return undefined + const visible: Record = {} + for (const model of inputs.models) { + const shown = visibleForModel(thunk, model, inputs.choices) + if (shown !== undefined) visible[model] = shown + } + return Object.keys(visible).length > 0 ? visible : undefined +} + +interface ProjectedCondition { + condition: CatalogCondition + visibleFor?: Record + visibleWhen?: Record + visibleForModel?: Record +} + +/** + * A function condition as data: evaluated when it reads no value; expanded per operation into + * `visibleFor` when it reads only `operation`, with the clause on other fields each shown + * operation still asks in `visibleWhen`; expanded per model into `visibleForModel` when it reads + * the model. `condition` itself stays opaque for anything that reads values. + */ +function projectConditionThunk(thunk: ConditionThunk, inputs: ConditionInputs): ProjectedCondition { const probe = probeThunk(thunk) if (probe.ok && probe.reads.size === 0) return { condition: copyClause(probe.result) } - if (operations.length === 0 || !readsOnly(probe.reads, OPERATION_ONLY)) { - return { condition: OPAQUE } + if (inputs.operations.length === 0 || !readsOnly(probe.reads, OPERATION_ONLY)) { + const perModel = projectVisibleForModel(thunk, inputs) + return perModel ? { condition: OPAQUE, visibleForModel: perModel } : { condition: OPAQUE } } const visibleFor: Record = {} - for (const operation of operations) { + const visibleWhen: Record = {} + for (const operation of inputs.operations) { const perOperation = probeThunk(thunk, { operation }) if (!perOperation.ok || !readsOnly(perOperation.reads, OPERATION_ONLY)) { return { condition: OPAQUE } } - visibleFor[operation] = !excludedByOperation(copyClause(perOperation.result), operation) + const residual = residualAfterOperation(copyClause(perOperation.result), operation) + visibleFor[operation] = residual !== null + if (residual !== null && residual !== true) visibleWhen[operation] = residual } - return { condition: OPAQUE, visibleFor } + return Object.keys(visibleWhen).length > 0 + ? { condition: OPAQUE, visibleFor, visibleWhen } + : { condition: OPAQUE, visibleFor } } function projectRequired( @@ -201,9 +312,8 @@ function subBlockSurface(subBlock: SubBlockConfig): 'action' | 'trigger' { return subBlock.mode === 'trigger' || subBlock.mode === 'trigger-advanced' ? 'trigger' : 'action' } -interface SubBlockContext { +interface SubBlockContext extends ConditionInputs { blockType: string - operations: readonly string[] /** Whether this block has trigger-surface subBlocks, so every subBlock records its surface. */ tagSurface: boolean report: ProjectionReport @@ -230,12 +340,14 @@ function projectSubBlock(subBlock: SubBlockConfig, ctx: SubBlockContext): Catalo if (subBlock.condition !== undefined) { if (typeof subBlock.condition === 'function') { - const { condition, visibleFor } = projectConditionThunk( + const { condition, visibleFor, visibleWhen, visibleForModel } = projectConditionThunk( subBlock.condition as ConditionThunk, - ctx.operations + ctx ) projected.condition = condition if (visibleFor) projected.visibleFor = visibleFor + if (visibleWhen) projected.visibleWhen = visibleWhen + if (visibleForModel) projected.visibleForModel = visibleForModel if ('opaque' in condition) site('condition', visibleFor !== undefined) } else { projected.condition = copyClause(subBlock.condition) @@ -438,6 +550,24 @@ function projectLegacyIds(type: string): CatalogLegacyId[] | undefined { }) } +/** A block's literal `model` options and static dropdown values, for model-condition probes. */ +function conditionChoices(block: BlockConfig): Pick { + let models: string[] = [] + const choices = new Map>() + for (const subBlock of block.subBlocks) { + if (subBlock.id !== 'model' && subBlock.type !== 'dropdown') continue + const options = projectOptions(subBlock) + if (!Array.isArray(options)) continue + const ids = options.map((option) => option.id) + if (subBlock.id === 'model') { + if (models.length === 0) models = ids + } else if (!choices.has(subBlock.id)) { + choices.set(subBlock.id, [...ids, undefined]) + } + } + return { models, choices } +} + export interface ProjectedBlock { block: CatalogBlock /** Docs-shard text, kept out of the core shard. */ @@ -448,7 +578,13 @@ export interface ProjectedBlock { export function projectBlock(block: BlockConfig, report: ProjectionReport): ProjectedBlock { const operations = operationOptions(block).map((operation) => operation.id) const tagSurface = block.subBlocks.some((subBlock) => subBlockSurface(subBlock) === 'trigger') - const ctx: SubBlockContext = { blockType: block.type, operations, tagSurface, report } + const ctx: SubBlockContext = { + blockType: block.type, + operations, + ...conditionChoices(block), + tagSurface, + report, + } const projected: CatalogBlock = { type: block.type, @@ -523,6 +659,8 @@ export function projectTrigger(trigger: TriggerConfig, report: ProjectionReport) const ctx: SubBlockContext = { blockType: `trigger:${trigger.id}`, operations: [], + models: [], + choices: new Map(), tagSurface: false, report, } diff --git a/apps/sim/lib/workflows/code/sdk-examples.test.ts b/apps/sim/lib/workflows/code/sdk-examples.test.ts new file mode 100644 index 00000000000..27efef8d0f1 --- /dev/null +++ b/apps/sim/lib/workflows/code/sdk-examples.test.ts @@ -0,0 +1,126 @@ +/** + * Field checks against the REAL block catalog, on hosted Sim (where hosted models need no API + * key): the five SDK example workflows compile with no diagnostics at all, and across the + * registry corpus `W_REQUIRED_MISSING` never names a field the editor itself hides under the + * block's stored values. The oracle is the registry's own condition, evaluated on the stored + * values, never the catalog's projection of it. + */ +import { readdirSync, readFileSync } from 'node:fs' +import path from 'node:path' +import { resetEnvFlagsMock, setEnvFlags } from '@sim/testing/mocks/env-flags.mock' +import { afterAll, describe, expect, it, vi } from 'vitest' + +vi.unmock('@/blocks/registry') + +import { canonicalize, compileWorkflow, printWorkflow } from '@sim/workflow-code' +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' +import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' +import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' +import { type CorpusCase, generateRegistryCorpus } from '@/lib/workflows/code/corpus' +import { buildSubBlockValues } from '@/lib/workflows/subblocks/visibility' +import { getBlock, getBlockRegistry } from '@/blocks/registry' +import { SDK_NAMES } from '@/blocks/sdk-names.generated' +import type { WorkflowState } from '@/stores/workflows/workflow/types' + +setEnvFlags({ isHosted: true }) +afterAll(resetEnvFlagsMock) + +const { catalog } = buildBlockCatalog({ + blocks: Object.values(getBlockRegistry()), + trigger: registryTrigger, + sdkNames: SDK_NAMES, +}) + +const EXAMPLES_DIR = path.resolve(process.cwd(), '../../packages/workflow-sdk/test/examples') +/** The code file `lead-enrichment.ts` references. */ +const EXAMPLE_CODE_FILES = new Map([['functions/score.js', 'return { score: 1 }\n']]) +const CASES_PER_BLOCK_TYPE = 2 + +/** Field types whose values decide other fields' visibility; every other value is emptied. */ +const DRIVER_TYPES = new Set(['dropdown', 'combobox', 'switch', 'checkbox']) + +/** + * The case with every non-driver field emptied, so required fields go missing while the values + * that decide visibility (operation, model, destination switches) stay as stored. + */ +function withoutFreeText(state: WorkflowState): WorkflowState { + const blocks: WorkflowState['blocks'] = {} + for (const [id, block] of Object.entries(state.blocks)) { + const subBlocks: typeof block.subBlocks = {} + for (const [key, sub] of Object.entries(block.subBlocks ?? {})) { + subBlocks[key] = DRIVER_TYPES.has(sub.type) ? sub : { ...sub, value: null } + } + blocks[id] = { ...block, subBlocks } + } + return { ...state, blocks } +} + +/** One per-block case per kind for each block type, plus every structural case. */ +function sampledCorpus(corpus: CorpusCase[]): CorpusCase[] { + const seen = new Map() + return corpus.filter((corpusCase) => { + if (corpusCase.unknownTypes) return false + const [, type = ''] = corpusCase.id.split(':') + const count = seen.get(type) ?? 0 + seen.set(type, count + 1) + return count < CASES_PER_BLOCK_TYPE + }) +} + +describe('catalog field checks on the SDK examples and the registry corpus', () => { + it.each(readdirSync(EXAMPLES_DIR).filter((name) => name.endsWith('.ts')))( + '%s compiles with no diagnostics', + (name) => { + const result = compileWorkflow({ + entry: { path: 'workflow.ts', text: readFileSync(path.join(EXAMPLES_DIR, name), 'utf8') }, + files: EXAMPLE_CODE_FILES, + catalog, + sdkMajor: catalog.sdkMajor, + }) + expect( + result.diagnostics.map( + (diagnostic) => + `${diagnostic.code} ${diagnostic.blockKey ?? ''}.${diagnostic.param ?? ''}: ${diagnostic.message}` + ) + ).toEqual([]) + } + ) + + it('never reports a required field the editor hides under the stored values, even with every free-text field empty', () => { + const violations: string[] = [] + let reported = 0 + for (const corpusCase of sampledCorpus(generateRegistryCorpus())) { + const state = withoutFreeText(corpusCase.state) + const meta = { name: corpusCase.id, description: null } + const canonical = canonicalize(state, { catalog, meta }) + const [entry] = printWorkflow({ + workflow: canonical.workflow, + catalog, + options: { functionCode: 'inline' }, + }).files + const compiled = compileWorkflow({ + entry: { path: entry.path, text: entry.text }, + files: new Map(), + catalog, + sdkMajor: catalog.sdkMajor, + }) + for (const diagnostic of compiled.diagnostics) { + if (diagnostic.code !== 'W_REQUIRED_MISSING' || !diagnostic.blockKey) continue + reported += 1 + const blockId = canonical.identity.blocks[diagnostic.blockKey]?.id + const block = blockId ? state.blocks[blockId] : undefined + const config = block ? getBlock(block.type) : undefined + if (!block || !config) continue + const values = buildSubBlockValues(block.subBlocks ?? {}) + const members = config.subBlocks.filter( + (sub) => sub.id === diagnostic.param || sub.canonicalParamId === diagnostic.param + ) + if (!members.some((sub) => evaluateSubBlockCondition(sub.condition, values))) { + violations.push(`${corpusCase.id} ${diagnostic.blockKey}.${diagnostic.param}`) + } + } + } + expect(reported).toBeGreaterThan(0) + expect(violations).toEqual([]) + }) +}) diff --git a/packages/workflow-code/src/compile/blocks.ts b/packages/workflow-code/src/compile/blocks.ts index 4fbf89df0a2..2fdc43a7624 100644 --- a/packages/workflow-code/src/compile/blocks.ts +++ b/packages/workflow-code/src/compile/blocks.ts @@ -28,9 +28,9 @@ import { type CatalogField, type FieldIndex, isModalPair, - isRequired, isVisible, memberFor, + missingRequiredFields, valueKindMatches, } from './validate-catalog' import { @@ -942,10 +942,7 @@ function checkFields( { hint: 'Move it into params.', blockKey: decl.key, param: id } ) } - for (const field of index.fields.values()) { - const members = field.kind === 'single' ? [field.sub] : field.members - const required = members.some((sub) => isVisible(sub, values) && isRequired(sub, values)) - if (!required || members.some((sub) => Object.hasOwn(params, sub.id))) continue + for (const field of missingRequiredFields(index, values, (id) => Object.hasOwn(params, id))) { const todo = state.todos.get(field.param) ctx.reporter.report( 'W_REQUIRED_MISSING', diff --git a/packages/workflow-code/src/compile/validate-catalog.ts b/packages/workflow-code/src/compile/validate-catalog.ts index 06126d263ec..ca4f7d4eb40 100644 --- a/packages/workflow-code/src/compile/validate-catalog.ts +++ b/packages/workflow-code/src/compile/validate-catalog.ts @@ -1,11 +1,14 @@ import { isRecordLike } from '@sim/utils/object' import type { + BlockCatalog, CatalogBlock, - CatalogCondition, + CatalogBuilder, + CatalogOutput, CatalogSubBlock, CatalogValueKind, SubBlockConditionClause, } from '../catalog/types' +import { catalogTrigger } from '../catalog/view' import type { CanonicalParamId, SubBlockId, Value } from '../model' /** @@ -112,38 +115,132 @@ function clauseMatches( } /** - * Evaluates a subBlock condition the way the editor does (`evaluateSubBlockCondition`, - * lib/workflows/subblocks/visibility.ts). An opaque function condition uses the projection's - * per-operation answer, and counts as visible when there is none (s1 canonicalize step 9). + * Evaluates a data condition the way the editor does (`evaluateSubBlockCondition`, + * lib/workflows/subblocks/visibility.ts). */ function conditionHolds( - condition: CatalogCondition | undefined, - values: ReadonlyMap, - visibleFor: Record | undefined + clause: SubBlockConditionClause, + values: ReadonlyMap ): boolean { - if (!condition) return true - if ('opaque' in condition) { - const operation = values.get('operation') - if (typeof operation === 'string' && visibleFor && Object.hasOwn(visibleFor, operation)) { - return visibleFor[operation] - } - return true - } - const clause: SubBlockConditionClause = condition if (!clauseMatches(clause, values)) return false return clause.and ? clauseMatches(clause.and, values) : true } +/** Whether the catalog's data decides a field shown, hidden, or cannot tell. */ +type Visibility = 'visible' | 'hidden' | 'undecided' + +/** + * Visibility under `values`. A data condition is evaluated as the editor does. An opaque one is + * decided only by the data the catalog precomputed for it: + * - per operation, `visibleFor` (hidden when false) and the clause `visibleWhen` still asks then + * (absent: shown); + * - per model, `visibleForModel`, for a model that is one of the block's literal options. A model + * held as a reference or template, or not offered, is undecided. + * Anything else is undecided: field checks never warn on a field they cannot place. + */ +function visibility(sub: CatalogSubBlock, values: ReadonlyMap): Visibility { + const condition = sub.condition + if (!condition) return 'visible' + if (!('opaque' in condition)) { + return conditionHolds(condition, values) ? 'visible' : 'hidden' + } + const operation = values.get('operation') + if (typeof operation === 'string' && sub.visibleFor && Object.hasOwn(sub.visibleFor, operation)) { + if (!sub.visibleFor[operation]) return 'hidden' + const asked = sub.visibleWhen?.[operation] + if (!asked) return 'visible' + return conditionHolds(asked, values) ? 'visible' : 'hidden' + } + const model = values.get('model') + if ( + typeof model === 'string' && + sub.visibleForModel && + Object.hasOwn(sub.visibleForModel, model) + ) { + return sub.visibleForModel[model] ? 'visible' : 'hidden' + } + return 'undecided' +} + +/** Whether a field may be shown: only a field the catalog's data decides hidden is not. */ export function isVisible(sub: CatalogSubBlock, values: ReadonlyMap): boolean { - return conditionHolds(sub.condition, values, sub.visibleFor) + return visibility(sub, values) !== 'hidden' +} + +/** + * The output schemas a declared block can expose. A trigger-mode builder runs as its trigger, so + * its outputs are that trigger's (the builder's pinned `selectedTriggerId`, else every trigger the + * block offers) besides the block's own; any other block exposes its own outputs. + */ +export function outputSchemasFor( + catalog: BlockCatalog, + block: CatalogBlock, + builder: CatalogBuilder | undefined +): Array> { + if (!builder?.triggerMode) return [block.outputs] + const pinned = builder.fixed?.selectedTriggerId + const ids = pinned !== undefined ? [pinned] : (block.triggers?.available ?? []) + const triggers = ids.flatMap((id) => catalogTrigger(catalog, id)?.outputs ?? []) + return [block.outputs, ...triggers] +} + +/** A field's catalog default: the editor's `defaultValue`, else a constant `value()` thunk. */ +function catalogDefault(sub: CatalogSubBlock): Value | undefined { + if (sub.defaultValue !== undefined) return sub.defaultValue + return sub.valueDefault && 'constant' in sub.valueDefault ? sub.valueDefault.constant : undefined +} + +/** + * The values a block runs with: what the source wrote, plus each unwritten field's catalog default + * (an omitted param means the default the canvas writes on creation, such as Slack's + * `destinationType: 'channel'` or the agent's default model). + */ +function effectiveValues( + index: FieldIndex, + written: ReadonlyMap +): Map { + const values = new Map(written) + for (const sub of index.subBlocks.values()) { + if (values.has(sub.id)) continue + const fallback = catalogDefault(sub) + if (fallback !== undefined) values.set(sub.id, fallback) + } + return values +} + +/** + * The fields a block leaves empty although they are required under the values it runs with + * (`W_REQUIRED_MISSING`). A field counts when no member holds a value and some member is + * certainly visible and certainly required, evaluated against the written values plus catalog + * defaults: a provider's credential fields never count for a model of another provider, and the + * half of a channel/DM switch the block does not use never counts. The server's lint, which runs + * the registry's own conditions, still reports what this static check cannot decide. + */ +export function missingRequiredFields( + index: FieldIndex, + written: ReadonlyMap, + isWritten: (subBlockId: SubBlockId) => boolean +): CatalogField[] { + const values = effectiveValues(index, written) + const missing: CatalogField[] = [] + for (const field of index.fields.values()) { + const members = field.kind === 'single' ? [field.sub] : field.members + if (members.some((sub) => isWritten(sub.id))) continue + if (members.some((sub) => visibility(sub, values) === 'visible' && isRequired(sub, values))) { + missing.push(field) + } + } + return missing } -export function isRequired(sub: CatalogSubBlock, values: ReadonlyMap): boolean { +/** Whether a field certainly needs a value: an opaque `required` function is not decided. */ +function isRequired(sub: CatalogSubBlock, values: ReadonlyMap): boolean { if (sub.defaultValue !== undefined || sub.valueDefault !== undefined) return false if (sub.hidden || sub.readOnly) return false if (sub.required === undefined || sub.required === false) return false if (sub.required === true) return true - return conditionHolds(sub.required, values, undefined) + if ('opaque' in sub.required) return false + return conditionHolds(sub.required, values) } function isPlainObject(value: Value): boolean { diff --git a/packages/workflow-code/src/compile/values.ts b/packages/workflow-code/src/compile/values.ts index 05cddc2f8c2..6b0f0d28d6a 100644 --- a/packages/workflow-code/src/compile/values.ts +++ b/packages/workflow-code/src/compile/values.ts @@ -32,6 +32,7 @@ import { visibleNames, } from './context' import { didYouMean, HINTS, hintForNode } from './hints' +import { outputSchemasFor } from './validate-catalog' /** Where a value is compiled: the block it belongs to and the scope its identifiers resolve in. */ export interface ValueSite { @@ -577,7 +578,9 @@ function checkOutputPath( } const block = catalogBlockOf(target) if (!block || block.dynamicOutputs) return - if (!outputKnown(block.outputs, segments)) { + const builder = target.builder.kind === 'catalog' ? target.builder.builder : undefined + const schemas = outputSchemasFor(ctx.catalog, block, builder) + if (!schemas.some((outputs) => outputKnown(outputs, segments))) { ctx.reporter.report( 'W_UNKNOWN_OUTPUT_PATH', `${block.name} has no output ${formatStoredPath(segments)}.`, diff --git a/packages/workflow-sdk/src/codegen/map-subblock.ts b/packages/workflow-sdk/src/codegen/map-subblock.ts index d2959042c6b..267e99d20bf 100644 --- a/packages/workflow-sdk/src/codegen/map-subblock.ts +++ b/packages/workflow-sdk/src/codegen/map-subblock.ts @@ -46,23 +46,17 @@ function bounds(subBlock: CatalogSubBlock): string[] { return parts.length > 0 ? [`Range: ${parts.join(', ')}.`] : [] } -function isKeyValueTable(columns: readonly string[] | undefined): boolean { - return ( - columns !== undefined && - columns.length === 2 && - /^(key|name)$/i.test(columns[0]) && - /^value$/i.test(columns[1]) - ) -} - +/** + * A table holds rows as the printer writes them, `[{ cells: { Key: …, Value: … } }]`, with one + * optional cell per declared column. + */ function tableType(subBlock: CatalogSubBlock): string { const { columns } = subBlock - if (isKeyValueTable(columns)) return 'Record>' - if (columns && columns.length > 0) { - const row = columns.map((column) => `${quote(column)}?: Value`).join('; ') - return `Array<{ ${row} }>` - } - return 'Record> | Array>>' + const cells = + columns && columns.length > 0 + ? `{ ${columns.map((column) => `${quote(column)}?: Value`).join('; ')} }` + : 'Record>' + return `Array<{ cells: ${cells} }>` } function codeType(subBlock: CatalogSubBlock): string { diff --git a/packages/workflow-sdk/test/examples/lead-enrichment.ts b/packages/workflow-sdk/test/examples/lead-enrichment.ts index 73beb6898c6..0286fd088cc 100644 --- a/packages/workflow-sdk/test/examples/lead-enrichment.ts +++ b/packages/workflow-sdk/test/examples/lead-enrichment.ts @@ -32,7 +32,7 @@ export default workflow('Lead enrichment', {}, () => { const lookup = api('Lookup', { url: t`https://crm.example.com/c/${p.currentItem.email}`, method: 'GET', - headers: { Authorization: t`Bearer ${env.CRM_KEY}` }, + headers: [{ cells: { Key: 'Authorization', Value: t`Bearer ${env.CRM_KEY}` } }], }) const score = fn('Score', { language: 'javascript', code: file('./functions/score.js') }) const save = table.updateRowById('Save', { diff --git a/packages/workflow-sdk/test/examples/scheduled-report.ts b/packages/workflow-sdk/test/examples/scheduled-report.ts index 89f38a00727..a835df5276a 100644 --- a/packages/workflow-sdk/test/examples/scheduled-report.ts +++ b/packages/workflow-sdk/test/examples/scheduled-report.ts @@ -2,10 +2,8 @@ import { agent, binding, - customTool, gmail, googleSheets, - mcp, md, note, picked, @@ -28,8 +26,6 @@ export default workflow('Invoice report', {}, () => { { oauthCredential: binding('finance-google'), spreadsheetId: picked('1AbC') }, { usageControl: 'auto' } ), - customTool('lookup-vendor'), - mcp('linear').tool('create_issue'), ], }) const send = gmail.sendEmail('Send summary', { From 9bc70b9b4a192dc3a7b41bac6e8d8ef5b31bea1d Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:07:01 -0800 Subject: [PATCH 112/428] docs(workflow-sdk): complete BlockMeta, document the sdk header, agent-facing readme --- packages/workflow-sdk/README.md | 97 +++++++++++++++---- .../src/codegen/core-text.generated.ts | 2 +- packages/workflow-sdk/src/core.d.ts | 23 +++++ 3 files changed, 100 insertions(+), 22 deletions(-) diff --git a/packages/workflow-sdk/README.md b/packages/workflow-sdk/README.md index 6956900c7e9..078c8d5aeee 100644 --- a/packages/workflow-sdk/README.md +++ b/packages/workflow-sdk/README.md @@ -1,39 +1,94 @@ # @sim/workflow-sdk The authoring surface for Sim workflows written as TypeScript. A workflow file imports from this -package, but **nothing in it ever runs**: `@sim/workflow-code` compiles the file statically, and -every runtime export throws `SimSdkNotExecutable`. +package, but **nothing in it ever runs**: the server compiles the file statically, and every +runtime export throws `SimSdkNotExecutable`. -## Modules +## Editing a workflow (for agents) + +```bash +sim workflows source get --out ./wf # write the source tree +# edit ./wf/workflow.ts (and ./wf/functions/*) +tsc -p ./wf # optional: type-check locally +sim workflows source apply --from ./wf --dry-run # check, write nothing +sim workflows source apply --from ./wf --yes # save the draft +``` + +To create a workflow instead, write `workflow.ts` in an empty directory and run +`sim workflows source apply --new --from ./wf [--name ] [--folder ] --yes`; it prints +the new workflow id and writes the lock files back into the directory. + +- Every file starts with `// @sim-sdk 1`, then imports from `@sim/workflow-sdk`. +- `apply` asks for confirmation on a terminal. Anywhere else pass `--yes` (it exits 2 without it). + `--dry-run` never asks. +- Apply only ever changes the draft. Deploy separately. +- Keep `.sim/lock.json` and `.sim/base.json`: they bind each block in the file to its stored id. + Renaming a block's const or display name keeps its id; deleting the lock does not. + +## What `--out` writes | Path | Contents | |------|----------| -| `src/core.d.ts` | Authoring types: `Ref`, `Value`, `Template`, the `t`/`js`/`py`/`sh`/`json`/`md` tags, `ref`/`raw`/`todo`/`file`/`env`, resource constructors, `BlockMeta`, `Node`/`Block`/`Branches`, `workflow`, `loop`, `parallel`, the special builders (`condition`, `router`, `fn`, `runWorkflow`, `human`, `response`, `setVariables`, `note`), `edge` and the generic `block`. It exports exactly `SDK_CORE_EXPORTS` from `@sim/workflow-code` | -| `src/runtime.ts` | The runtime entry: every export throws `SimSdkNotExecutable` | -| `src/codegen/` | `generateSdkTypes(catalog)` (block catalog → `.d.ts`) and `generateWorkspaceTypes(manifest)` (`workspace.d.ts`) | +| `workflow.ts`, `functions/*` | The source. Edit these. | +| `.sim/lock.json`, `.sim/base.json` | Identity lock and the fingerprint the source was read at. Do not edit. | +| `.sim/sdk/core.d.ts` | This package's authoring types (`BlockMeta`, `t`, `env`, `table`, `binding`, ...). | +| `.sim/sdk/blocks/{type}.d.ts` | One file per block type with its builders: every block, not only the ones in use. | +| `.sim/sdk/operations/{type}/{operation}.d.ts` | One operation's params and outputs, about 1-2 KB each. Read these to learn a block. | +| `.sim/sdk/workspace.d.ts` | This workspace's tables (with columns), knowledge bases, credential bindings, workflows (with inputs) and env var names, so `table('tickets')`, `binding('support-slack')` and `env.X` are checked. | +| `tsconfig.json` | Resolves `@sim/workflow-sdk` to `.sim/sdk`. | +| `AGENTS.md` | A pointer to this README. | + +The block declarations come from the workspace's block catalog, cached by ETag in the CLI's config +directory, so a second `get` in the same workspace does not download it again. -## Generated files +## Diagnostics -`generateSdkTypes` returns files sorted by path, byte-identical for the same catalog: +`apply` prints one finding per line, pinned to the file you sent: -- `blocks/{type}.d.ts`: augments `@sim/workflow-sdk` with that block's builders, tool forms - (`slack.tool.sendMessage(...)`) and `SpecialBuilderTypes` entries. -- `operations/{type}/{operation}.d.ts`: one operation's params and output types. -- `models.d.ts`: model ids, apart so a model-list change touches one file. -- `index.d.ts`: imports the rest; the only file that names the catalog hash. +``` +workflow.ts:12:5 error E_UNKNOWN_PARAM: Slack has no param credential. + 11 | const notify = slack.sendMessage('Notify', { +> 12 | credential: binding('support-slack'), + | ^^^^^^^^^^ + 13 | channel: 'C0SUPPORT', + hint: Write it as oauthCredential; the value kind picks the basic or advanced field. +``` -Builder names come from the catalog's frozen `builders` map; codegen never invents one. Param -names are subBlock ids, or the `canonicalParamId` of a basic/advanced pair. Each operation's -params are narrowed by the visibility evaluator: always visible (required when the field is -required and has no default), sometimes visible (optional, with `@when`), never visible (dropped). -One small dropdown that gates disjoint fields becomes one nested union level. +The format is `file:line:column severity CODE: message`, then the source frame, then the hint. +Errors (`E_*`) refuse the whole apply and nothing is saved. Warnings (`W_*`) are saved as written; +they name real problems (a required field left empty, an output path no block has), so read them. +The API returns the same findings in `data.diagnostics` (or `error.details.diagnostics` when the +apply is refused) with `file`, `line`, `column`, `code`, `severity`, `message` and `hint`. + +## When the apply answers 409 (`SOURCE_STALE`) + +Someone changed the workflow since you read it. Nothing was saved. Rebase: + +1. `sim workflows source get --out ./wf-fresh`. +2. Re-apply your edit to `./wf-fresh/workflow.ts` (diff your copy against the old source to find + it), then `apply --from ./wf-fresh --dry-run`, then apply. + +Never copy the old `.sim/` files over the fresh ones: the fingerprint in `.sim/base.json` is what +makes the next apply safe. + +## Package layout (for maintainers) + +| Path | Contents | +|------|----------| +| `src/core.d.ts` | Authoring types. It exports exactly `SDK_CORE_EXPORTS` from `@sim/workflow-code`; after editing it run `bun scripts/generate-core-text.ts` | +| `src/runtime.ts` | The runtime entry: every export throws `SimSdkNotExecutable` | +| `src/codegen/` | `generateSdkTypes(catalog)` (block catalog → `.d.ts`) and `generateWorkspaceTypes(manifest)` (`workspace.d.ts`) | -## Checking the generated types +`generateSdkTypes` is deterministic (same catalog, byte-identical files sorted by path). Builder +names come from the catalog's frozen `builders` map. Param names are subBlock ids, or the +`canonicalParamId` of a basic/advanced pair, narrowed per operation by the visibility evaluator. ```bash bun run test # determinism, locality, evaluator, type-check bun scripts/typecheck-fixtures.ts # sizes, then tsc over test/examples and test/negative ``` -`test/fixtures/catalog.json` is projected from 18 real registry blocks; `test/examples` are the -five s2 example workflows, and `test/negative` holds code each generated type must reject. +`test/fixtures/catalog.json` is projected from 18 real registry blocks; `test/examples` are five +example workflows (also compiled against the real catalog with zero diagnostics in +`apps/sim/lib/workflows/code/sdk-examples.test.ts`), and `test/negative` holds code each generated +type must reject. diff --git a/packages/workflow-sdk/src/codegen/core-text.generated.ts b/packages/workflow-sdk/src/codegen/core-text.generated.ts index c2e1016ebe5..e647109ce11 100644 --- a/packages/workflow-sdk/src/codegen/core-text.generated.ts +++ b/packages/workflow-sdk/src/codegen/core-text.generated.ts @@ -1,4 +1,4 @@ // Generated by scripts/generate-core-text.ts from src/core.d.ts; do not edit. /** The text of `core.d.ts`, the workflow SDK authoring declarations. */ -export const CORE_DTS = "/**\n * The authoring surface for Sim workflows written as TypeScript (s2 §2).\n *\n * Nothing declared here runs. `@sim/workflow-code` compiles a workflow file statically, and every\n * runtime export of this package throws `SimSdkNotExecutable`. These declarations exist so an\n * editor, `tsgo --noEmit` or an agent can check a workflow file before the compiler sees it.\n *\n * Block builders (`slack.sendMessage`, `agent`, `trigger.gmail.poller`, ...) are not declared here:\n * they are generated from the block catalog into `blocks/{type}.d.ts`, which augment this module.\n * The generic `block(type, name, params)` covers any stored type without a builder.\n */\n\n/** Plain JSON. */\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json }\n\ndeclare const REF: unique symbol\ndeclare const TEMPLATE: unique symbol\ndeclare const ENV: unique symbol\ndeclare const RESOURCE: unique symbol\ndeclare const TOOL: unique symbol\ndeclare const NODE: unique symbol\ndeclare const FILE_BODY: unique symbol\ndeclare const RAW: unique symbol\n\n/** Any reference, whatever it points at. */\nexport interface AnyRef {\n readonly [REF]: unknown\n}\n\ntype RefPaths = [Json] extends [T]\n ? { readonly [key: string]: Ref }\n : T extends readonly (infer E)[]\n ? { readonly [index: number]: Ref; readonly length: Ref }\n : T extends object\n ? { readonly [K in keyof T]-?: Ref }\n : unknown\n\n/**\n * A typed reference to a block output, compiled to `` (build-spec decision 8).\n * Paths map exactly: `.seg`, `['seg']` and `[n]`. Untyped JSON allows any path.\n */\nexport type Ref = { readonly [REF]: T } & RefPaths\n\n/** Text with references in it, written with one of the tags below. */\nexport type Template = string & { readonly [TEMPLATE]: true }\n\n/** A workspace environment variable, compiled to `{{NAME}}`. */\nexport interface EnvRef {\n readonly [ENV]: string\n}\n\n/** A param value: a literal, a reference, a template or an environment variable. */\nexport type Value = T | AnyRef | Template | EnvRef\n\n/** JSON whose leaves may be references, templates or environment variables. */\nexport type JsonWithRefs =\n | null\n | boolean\n | number\n | string\n | AnyRef\n | Template\n | EnvRef\n | JsonWithRefs[]\n | { [key: string]: JsonWithRefs }\n\n/** A literal union that still accepts any other string (option ids read from values). */\nexport type LiteralUnion = T | (string & {})\n\n/** A `time-input` value, `HH:MM`. */\nexport type TimeString = `${number}:${number}`\n\ntype Interpolation = AnyRef | EnvRef | VarRef | string | number | boolean\n\n/** Text with interpolated references: `` t`New ${cls.category} ticket` ``. */\nexport declare function t(strings: TemplateStringsArray, ...values: Interpolation[]): Template\n/** JavaScript code (condition expressions, inline function code). */\nexport declare const js: typeof t\n/** Python code. */\nexport declare const py: typeof t\n/** Shell code. */\nexport declare const sh: typeof t\n/** JSON text kept verbatim, for bodies an object literal cannot reproduce byte for byte. */\nexport declare const json: typeof t\n/** Markdown text (note content). */\nexport declare const md: typeof t\n\n/** A reference with a non-canonical spelling, such as `ref('Classify.content')`. */\nexport declare function ref(path: string): Ref\n\n/** A stored value outside the generated type (a legacy option id, say), kept verbatim. */\nexport declare function raw(value: unknown): T & { readonly [RAW]: true }\n\n/** A required value that is still missing; compiles to absent, so canvas drafts type-check. */\nexport declare function todo(): never\n\n/** Function code kept in a file next to the workflow (`.js`, `.py` or `.sh`), stored verbatim. */\nexport interface FileBody {\n readonly [FILE_BODY]: string\n}\nexport declare function file(path: `./${string}`): FileBody\n\n/**\n * Environment variable names known to the workspace. `workspace.d.ts` adds one member per name;\n * until it exists `env` accepts any name.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceEnv {}\n\nexport declare const env: keyof WorkspaceEnv extends never\n ? { readonly [name: string]: EnvRef }\n : { readonly [K in keyof WorkspaceEnv]: EnvRef }\n\n/**\n * Workspace resources by stable key, filled in by the generated `workspace.d.ts`. Each map's\n * values describe the resource: a table's row type, a binding's service, a workflow's inputs.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceTables {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceKnowledgeBases {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceBindings {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceWorkflows {}\n\ntype KeyOf = keyof M extends never ? string : Extract\n\nexport type TableKey = KeyOf\nexport type KnowledgeBaseKey = KeyOf\nexport type BindingKey = KeyOf\nexport type WorkflowKey = KeyOf\n\n/** A workspace resource by stable key, compiled to the resource's internal id. */\nexport interface ResourceRef {\n readonly [RESOURCE]: Kind\n readonly key: Key\n}\n\n/** A credential binding: `binding('support-slack')`. */\nexport type Binding = ResourceRef<'credential', Key>\nexport declare function binding(key: K): Binding\n\n/** The columns of a workspace table, or loose JSON when `workspace.d.ts` does not know it. */\nexport type TableColumns = K extends keyof WorkspaceTables\n ? WorkspaceTables[K]\n : { [column: string]: Json }\n/** One stored row: its columns plus the row id. */\nexport type TableRow = TableColumns & { id: string }\n/** Column values written to a row. */\nexport type TableData = K extends keyof WorkspaceTables\n ? { [C in keyof WorkspaceTables[K]]?: Value | JsonWithRefs }\n : { [column: string]: JsonWithRefs }\n\n/** A workspace table: `table('leads')`. Table block operations live on `table.*`. */\nexport type TableRef = ResourceRef<'table', Key>\nexport declare function table(key: K): TableRef\n\n/** A knowledge base: `kb('docs')`. */\nexport type KnowledgeBaseRef = ResourceRef<'knowledge-base', Key>\nexport declare function kb(key: K): KnowledgeBaseRef\n\n/** A workspace skill: `skill('triage')`. */\nexport type SkillRef = ResourceRef<'skill'>\nexport declare function skill(key: string): SkillRef\n\n/** A sandbox image: `sandbox('node-ml')`. */\nexport type SandboxRef = ResourceRef<'sandbox'>\nexport declare function sandbox(key: string): SandboxRef\n\n/** A workspace folder: `folder('reports')`. */\nexport type FolderRef = ResourceRef<'file-folder'>\nexport declare function folder(key: string): FolderRef\n\n/** A workspace file upload: `upload('contracts/acme.pdf')`. */\nexport type Upload = ResourceRef<'file'>\nexport declare function upload(path: string): Upload\n\n/** An opaque provider id chosen in a remote selector: `picked('C0123')`. */\nexport interface Picked {\n readonly [RESOURCE]: 'picked'\n readonly id: string\n}\nexport declare function picked(id: string): Picked\n\n/** A file produced at run time (`file` / `file[]` outputs). */\nexport interface SimFile {\n id: string\n name: string\n url: string\n size: number\n type: string\n key: string\n}\n\n// Agent tools\n\n/** One entry of an agent's `tools` list. */\nexport interface Tool {\n readonly [TOOL]: true\n}\n\n/** How the model may use a tool. */\nexport interface ToolOpts {\n usageControl?: 'auto' | 'force' | 'none'\n usageControlExpression?: string\n title?: string\n}\n\n/** A custom tool by key: `customTool('lookup-order')`. */\nexport declare function customTool(key: string, options?: ToolOpts): Tool\nexport declare namespace customTool {\n /** A custom tool snapshot that has drifted from the workspace tool. */\n function inline(definition: { schema: Json; code: string | Template; title?: string }): Tool\n}\n\n/** An MCP server by key; `mcp('linear').tool('create_issue')`. */\nexport interface McpServerRef extends ResourceRef<'mcp-server'> {\n tool(name: string, options?: ToolOpts & { args?: Record }): Tool\n}\nexport declare function mcp(key: string): McpServerRef\n\n// Graph\n\n/** Block-level fields (`BlockState`), written as the third builder argument. */\nexport interface BlockMeta {\n /**\n * A legacy key the display name cannot carry (a `name~n` collision key or a reserved name such\n * as `Loop`). Printed only for such a stored block; apply accepts it only for a key the stored\n * workflow already has, so it can never introduce one.\n */\n key?: string\n /** Stored as `enabled: false`. */\n disabled?: true\n /** Protected: apply refuses any change to this block. */\n locked?: true\n /** Exposes the error port without an `onError` edge. */\n errorPort?: boolean\n /** The block-level advanced toggle (`advancedMode`). */\n advancedMode?: boolean\n retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number }\n /** Pair modes that cannot be derived from the value written. */\n modes?: Record\n /** Stale values under hidden conditions, kept verbatim. */\n inactive?: Record\n}\n\n/** Anything an edge can point at. */\nexport type Target = Node | Group\n\n/** A block or container in the graph. */\nexport interface Node {\n readonly [NODE]: true\n /** Wires this node's default port to each target. Returns the target, or a group of them. */\n to(...targets: T): T extends [infer One] ? One : Group\n /** Wires this node's error port to each target. */\n onError(...targets: Target[]): void\n}\n\n/** Several nodes; `.to()` wires every member (fan-in). */\nexport interface Group {\n to(...targets: Target[]): Group\n}\n\n/** A block: a node whose outputs can be referenced. */\nexport type Block = Node & Ref\n\n/** The named ports of a condition or router. */\nexport type Branches = { readonly [P in K]: Node }\n\n/** Trigger builders (`trigger.start`, `trigger.gmail.poller`, ...), generated from the catalog. */\nexport declare namespace trigger {}\n\n/** Builders for hidden legacy block versions (`legacy.slack.send`), generated from the catalog. */\nexport declare namespace legacy {}\n\n/** A raw edge from a handle the SDK has no name for (a legacy or unknown port). */\nexport declare function edge(from: Node, handle: string, to: Target): void\n\n/** Any stored block type without a builder (legacy, unknown or custom), with untyped outputs. */\nexport declare function block(\n type: string,\n name: string,\n params: Record,\n meta?: BlockMeta\n): Block\n\n// Workflow and variables\n\nexport type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'plain'\n\nexport interface VariableDeclaration {\n type: VariableType\n value?: Json\n}\n\nexport type VariableDeclarations = Record\n\ndeclare const VAR: unique symbol\n\n/** A workflow variable, compiled to ``. */\nexport interface VarRef {\n readonly [VAR]: string\n}\n\ntype VariableValue = T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'string' | 'plain'\n ? string\n : Json\n\nexport type VarRefs = {\n readonly [K in keyof V]: VarRef & Ref>\n}\n\n/**\n * Workflow variables by name, untyped. Prefer the `vars` the `workflow()` body receives, which is\n * typed from the declared variables.\n */\nexport declare const vars: { readonly [name: string]: VarRef & Ref }\n\ndeclare const WORKFLOW_DEF: unique symbol\n\n/** The default export of a workflow file. */\nexport interface WorkflowDef {\n readonly [WORKFLOW_DEF]: true\n}\n\n/** A child workflow by key, for `runWorkflow` or as an agent tool. */\nexport interface WorkflowRef extends ResourceRef<'workflow', Key> {\n asTool(options?: ToolOpts): Tool\n}\n\n/** Declares a workflow. The body wires blocks; it never runs. */\nexport declare function workflow>(\n name: string,\n options: { description?: string; variables?: V },\n body: (scope: { vars: VarRefs }) => void\n): WorkflowDef\n/** A child workflow by key: `workflow('enrich-lead')`. */\nexport declare function workflow(key: K): WorkflowRef\n\n// Containers\n\ntype ItemOf = C extends { readonly [REF]: readonly (infer E)[] }\n ? E\n : C extends readonly (infer E)[]\n ? E\n : Json\n\n/** Inside a loop or parallel body. */\nexport interface SubflowScope {\n /** The container's start port, into its first child. */\n readonly start: Node\n readonly index: Ref\n readonly currentItem: Ref\n readonly items: Ref\n}\n\nexport interface SubflowOutput {\n results: Json[]\n}\n\n/** A loop or parallel container. Its `.to()` wires the port taken after it finishes. */\nexport type Container = Block\n\ntype Collection = AnyRef | Template | Json[] | string\n\nexport declare const loop: {\n for(\n name: string,\n params: { count: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n forEach(\n name: string,\n params: { collection: C },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n while(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n doWhile(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n}\n\nexport declare const parallel: {\n count(\n name: string,\n params: { count: number; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n collection(\n name: string,\n params: { collection: C; batchSize?: number },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n}\n\n// Blocks with a source form of their own\n\n/**\n * Params and outputs of the blocks below, generated from the catalog. Each entry is\n * `{ params; output }`; without generated types the params are loose.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface SpecialBuilderTypes {}\n\ntype SpecialParams = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { params: infer P }\n ? P\n : never\n : Record\n\ntype SpecialOutput = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { output: infer O }\n ? O\n : never\n : Json\n\n/** A condition expression, or `true` for the `else` branch. */\nexport type BranchExpression = Template | string | true\n\n/**\n * Keys of a condition written with no rows (`condition('Name', {})`, the source form of rows\n * that were never persisted): the implicit `if` and `else` ports stay addressable.\n */\ntype ConditionKeys = keyof B extends never ? 'if' | 'else' : Extract\ntype RouterKeys = keyof R extends never ? 'route0' : Extract\n\n/** A condition: named branches, the last one `else` when there are two or more. */\nexport declare function condition>(\n name: string,\n branches: B,\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A router: named routes described for the model. */\nexport declare function router>(\n name: string,\n params: SpecialParams<'router'> & { routes: R },\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A function block. `code` is inline (`` js`...` ``) or a file (`file('./functions/x.js')`). */\nexport declare function fn(\n name: string,\n params: SpecialParams<'fn'> & { code: Template | FileBody | string },\n meta?: BlockMeta\n): Block>\n\n/** Runs a child workflow. */\nexport declare function runWorkflow(\n name: string,\n params: SpecialParams<'runWorkflow'>,\n meta?: BlockMeta\n): Block>\n\n/** Pauses for a person; the form in `inputFormat` types `submission`. */\nexport declare function human>(\n name: string,\n params: SpecialParams<'human'> & { inputFormat?: F },\n meta?: BlockMeta\n): Block, 'submission'> & { submission: InputFieldsOutput }>\n\n/** Ends the workflow with an API response. */\nexport declare function response(\n name: string,\n params: SpecialParams<'response'>,\n meta?: BlockMeta\n): Block>\n\n/** Assigns workflow variables. */\nexport declare function setVariables(\n name: string,\n params: SpecialParams<'setVariables'>,\n meta?: BlockMeta\n): Block>\n\ndeclare const ANNOTATION: unique symbol\n\n/** A canvas note: no edges, no outputs. */\nexport interface Annotation {\n readonly [ANNOTATION]: true\n}\nexport declare function note(\n name: string,\n params: SpecialParams<'note'>,\n meta?: BlockMeta\n): Annotation\n\n// Structured param shapes\n\n/** Type names an input-format field may declare. */\nexport type InputFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'file[]'\n\n/** A structured input field: its type plus a default value, description or required flag. */\nexport interface InputFieldSpec {\n type: InputFieldType\n value?: JsonWithRefs\n description?: string\n required?: boolean\n}\n\n/** `input-format` fields by name: `{ subject: 'string', amount: { type: 'number', value: 0 } }`. */\nexport type InputFields = Record\n\ntype InputFieldValue = T extends 'string'\n ? string\n : T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'array'\n ? Json[]\n : T extends 'file[]'\n ? SimFile[]\n : Json\n\n/** The outputs an `input-format` declares. */\nexport type InputFieldsOutput = {\n [K in keyof F]: F[K] extends { type: infer T } ? InputFieldValue : InputFieldValue\n}\n\n/** `response-format` fields: `{ ok: true, id: { type: 'string', value: row.id } }`. */\nexport type ResponseFields = Record\n\n/** An agent message. */\nexport interface Message {\n role: 'system' | 'user' | 'assistant'\n content: Value\n}\n\n/** One `variables-input` assignment. */\nexport interface VariableAssignment {\n variable: VarRef\n value: JsonWithRefs\n}\n\n/** Child workflow inputs by name (`input-mapping`, `workflow-input-mapper`). */\nexport type InputMapping = Record\n\n/** A table filter by column: `{ status: { $eq: 'new' } }`. */\nexport type Filter = Record\n\n/** A table sort by column: `{ createdAt: 'desc' }`. */\nexport type Sort =\n | Record\n | Array<{ column: string; direction: 'asc' | 'desc' }>\n\n/** One knowledge tag filter. */\nexport interface TagFilter {\n tagName: string\n tagValue: Value\n [key: string]: JsonWithRefs\n}\n\n/** One document tag. */\nexport interface DocumentTag {\n tagName: string\n value: Value\n [key: string]: JsonWithRefs\n}\n\n/** One `eval-input` metric. */\nexport interface EvalMetric {\n name: string\n description?: string\n range?: { min: number; max: number }\n [key: string]: JsonWithRefs | undefined\n}\n\n/** One `model-fallback-list` entry. */\nexport interface ModelFallback {\n model: LiteralUnion\n [key: string]: JsonWithRefs\n}\n\n/**\n * Model ids, generated into `models.d.ts` (which adds one member per model). Kept apart from the\n * block files so a model-list change touches one file.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface ModelIds {}\nexport type Model = Extract\n\n/** A JSON Schema `responseFormat`, or `{ name, strict, schema }` around one. */\nexport type ResponseFormat = JsonWithRefs\n\ntype Depth = [never, 0, 1, 2, 3, 4]\n\ntype FromSchema = [D] extends [never]\n ? Json\n : S extends { enum: readonly (infer E)[] }\n ? E\n : S extends { type: 'object'; properties: infer P }\n ? { [K in keyof P]: FromSchema }\n : S extends { type: 'array'; items: infer I }\n ? FromSchema[]\n : S extends { type: 'string' }\n ? string\n : S extends { type: 'number' | 'integer' }\n ? number\n : S extends { type: 'boolean' }\n ? boolean\n : Json\n\n/**\n * The outputs a literal `responseFormat` adds, read from its JSON Schema with recursion capped at\n * depth 4. A template or reference adds untyped JSON.\n */\nexport type ResponseFormatOutput = [RF] extends [undefined]\n ? unknown\n : RF extends { schema: infer S }\n ? FromSchema\n : RF extends { type: 'object'; properties: object }\n ? FromSchema\n : { [key: string]: Json }\n" +export const CORE_DTS = "/**\n * The authoring surface for Sim workflows written as TypeScript (s2 §2).\n *\n * Nothing declared here runs. `@sim/workflow-code` compiles a workflow file statically, and every\n * runtime export of this package throws `SimSdkNotExecutable`. These declarations exist so an\n * editor, `tsgo --noEmit` or an agent can check a workflow file before the compiler sees it.\n *\n * Block builders (`slack.sendMessage`, `agent`, `trigger.gmail.poller`, ...) are not declared here:\n * they are generated from the block catalog into `blocks/{type}.d.ts`, which augment this module.\n * The generic `block(type, name, params)` covers any stored type without a builder.\n *\n * Every workflow file starts with the SDK header line, before any import:\n *\n * ```ts\n * // @sim-sdk 1\n * import { agent, trigger, workflow } from '@sim/workflow-sdk'\n * ```\n *\n * The number is the SDK major version the file is written against. A file without the header is\n * refused with `E_SDK_HEADER`, and one written for a newer major than the server supports with\n * `E_SDK_MAJOR`.\n */\n\n/** Plain JSON. */\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json }\n\ndeclare const REF: unique symbol\ndeclare const TEMPLATE: unique symbol\ndeclare const ENV: unique symbol\ndeclare const RESOURCE: unique symbol\ndeclare const TOOL: unique symbol\ndeclare const NODE: unique symbol\ndeclare const FILE_BODY: unique symbol\ndeclare const RAW: unique symbol\n\n/** Any reference, whatever it points at. */\nexport interface AnyRef {\n readonly [REF]: unknown\n}\n\ntype RefPaths = [Json] extends [T]\n ? { readonly [key: string]: Ref }\n : T extends readonly (infer E)[]\n ? { readonly [index: number]: Ref; readonly length: Ref }\n : T extends object\n ? { readonly [K in keyof T]-?: Ref }\n : unknown\n\n/**\n * A typed reference to a block output, compiled to `` (build-spec decision 8).\n * Paths map exactly: `.seg`, `['seg']` and `[n]`. Untyped JSON allows any path.\n */\nexport type Ref = { readonly [REF]: T } & RefPaths\n\n/** Text with references in it, written with one of the tags below. */\nexport type Template = string & { readonly [TEMPLATE]: true }\n\n/** A workspace environment variable, compiled to `{{NAME}}`. */\nexport interface EnvRef {\n readonly [ENV]: string\n}\n\n/** A param value: a literal, a reference, a template or an environment variable. */\nexport type Value = T | AnyRef | Template | EnvRef\n\n/** JSON whose leaves may be references, templates or environment variables. */\nexport type JsonWithRefs =\n | null\n | boolean\n | number\n | string\n | AnyRef\n | Template\n | EnvRef\n | JsonWithRefs[]\n | { [key: string]: JsonWithRefs }\n\n/** A literal union that still accepts any other string (option ids read from values). */\nexport type LiteralUnion = T | (string & {})\n\n/** A `time-input` value, `HH:MM`. */\nexport type TimeString = `${number}:${number}`\n\ntype Interpolation = AnyRef | EnvRef | VarRef | string | number | boolean\n\n/** Text with interpolated references: `` t`New ${cls.category} ticket` ``. */\nexport declare function t(strings: TemplateStringsArray, ...values: Interpolation[]): Template\n/** JavaScript code (condition expressions, inline function code). */\nexport declare const js: typeof t\n/** Python code. */\nexport declare const py: typeof t\n/** Shell code. */\nexport declare const sh: typeof t\n/** JSON text kept verbatim, for bodies an object literal cannot reproduce byte for byte. */\nexport declare const json: typeof t\n/** Markdown text (note content). */\nexport declare const md: typeof t\n\n/** A reference with a non-canonical spelling, such as `ref('Classify.content')`. */\nexport declare function ref(path: string): Ref\n\n/** A stored value outside the generated type (a legacy option id, say), kept verbatim. */\nexport declare function raw(value: unknown): T & { readonly [RAW]: true }\n\n/** A required value that is still missing; compiles to absent, so canvas drafts type-check. */\nexport declare function todo(): never\n\n/** Function code kept in a file next to the workflow (`.js`, `.py` or `.sh`), stored verbatim. */\nexport interface FileBody {\n readonly [FILE_BODY]: string\n}\nexport declare function file(path: `./${string}`): FileBody\n\n/**\n * Environment variable names known to the workspace. `workspace.d.ts` adds one member per name;\n * until it exists `env` accepts any name.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceEnv {}\n\nexport declare const env: keyof WorkspaceEnv extends never\n ? { readonly [name: string]: EnvRef }\n : { readonly [K in keyof WorkspaceEnv]: EnvRef }\n\n/**\n * Workspace resources by stable key, filled in by the generated `workspace.d.ts`. Each map's\n * values describe the resource: a table's row type, a binding's service, a workflow's inputs.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceTables {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceKnowledgeBases {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceBindings {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceWorkflows {}\n\ntype KeyOf = keyof M extends never ? string : Extract\n\nexport type TableKey = KeyOf\nexport type KnowledgeBaseKey = KeyOf\nexport type BindingKey = KeyOf\nexport type WorkflowKey = KeyOf\n\n/** A workspace resource by stable key, compiled to the resource's internal id. */\nexport interface ResourceRef {\n readonly [RESOURCE]: Kind\n readonly key: Key\n}\n\n/** A credential binding: `binding('support-slack')`. */\nexport type Binding = ResourceRef<'credential', Key>\nexport declare function binding(key: K): Binding\n\n/** The columns of a workspace table, or loose JSON when `workspace.d.ts` does not know it. */\nexport type TableColumns = K extends keyof WorkspaceTables\n ? WorkspaceTables[K]\n : { [column: string]: Json }\n/** One stored row: its columns plus the row id. */\nexport type TableRow = TableColumns & { id: string }\n/** Column values written to a row. */\nexport type TableData = K extends keyof WorkspaceTables\n ? { [C in keyof WorkspaceTables[K]]?: Value | JsonWithRefs }\n : { [column: string]: JsonWithRefs }\n\n/** A workspace table: `table('leads')`. Table block operations live on `table.*`. */\nexport type TableRef = ResourceRef<'table', Key>\nexport declare function table(key: K): TableRef\n\n/** A knowledge base: `kb('docs')`. */\nexport type KnowledgeBaseRef = ResourceRef<'knowledge-base', Key>\nexport declare function kb(key: K): KnowledgeBaseRef\n\n/** A workspace skill: `skill('triage')`. */\nexport type SkillRef = ResourceRef<'skill'>\nexport declare function skill(key: string): SkillRef\n\n/** A sandbox image: `sandbox('node-ml')`. */\nexport type SandboxRef = ResourceRef<'sandbox'>\nexport declare function sandbox(key: string): SandboxRef\n\n/** A workspace folder: `folder('reports')`. */\nexport type FolderRef = ResourceRef<'file-folder'>\nexport declare function folder(key: string): FolderRef\n\n/** A workspace file upload: `upload('contracts/acme.pdf')`. */\nexport type Upload = ResourceRef<'file'>\nexport declare function upload(path: string): Upload\n\n/** An opaque provider id chosen in a remote selector: `picked('C0123')`. */\nexport interface Picked {\n readonly [RESOURCE]: 'picked'\n readonly id: string\n}\nexport declare function picked(id: string): Picked\n\n/** A file produced at run time (`file` / `file[]` outputs). */\nexport interface SimFile {\n id: string\n name: string\n url: string\n size: number\n type: string\n key: string\n}\n\n// Agent tools\n\n/** One entry of an agent's `tools` list. */\nexport interface Tool {\n readonly [TOOL]: true\n}\n\n/** How the model may use a tool. */\nexport interface ToolOpts {\n usageControl?: 'auto' | 'force' | 'none'\n usageControlExpression?: string\n title?: string\n}\n\n/** A custom tool by key: `customTool('lookup-order')`. */\nexport declare function customTool(key: string, options?: ToolOpts): Tool\nexport declare namespace customTool {\n /** A custom tool snapshot that has drifted from the workspace tool. */\n function inline(definition: { schema: Json; code: string | Template; title?: string }): Tool\n}\n\n/** An MCP server by key; `mcp('linear').tool('create_issue')`. */\nexport interface McpServerRef extends ResourceRef<'mcp-server'> {\n tool(name: string, options?: ToolOpts & { args?: Record }): Tool\n}\nexport declare function mcp(key: string): McpServerRef\n\n// Graph\n\n/** Block-level fields (`BlockState`), written as the third builder argument. */\nexport interface BlockMeta {\n /**\n * A legacy key the display name cannot carry (a `name~n` collision key or a reserved name such\n * as `Loop`). Printed only for such a stored block; apply accepts it only for a key the stored\n * workflow already has, so it can never introduce one.\n */\n key?: string\n /** Stored as `enabled: false`. */\n disabled?: true\n /** Protected: apply refuses any change to this block. */\n locked?: true\n /** Exposes the error port without an `onError` edge. */\n errorPort?: boolean\n /** The block-level advanced toggle (`advancedMode`). */\n advancedMode?: boolean\n /**\n * Runs the block as its trigger (`triggerMode`). Trigger builders (`trigger.gmail.poller`) set\n * it themselves; write it on any other builder only for a block stored in trigger mode.\n */\n triggerMode?: boolean\n retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number }\n /** Pair modes that cannot be derived from the value written. */\n modes?: Record\n /**\n * Per branch key of a condition or router, the row's display `title` and any stored fields the\n * SDK has no syntax for (`extra`, plain JSON).\n */\n branches?: Record }>\n /** Stale values under hidden conditions, kept verbatim. */\n inactive?: Record\n /** Stored block data the SDK has no syntax for, kept verbatim (plain JSON). */\n $unknown?: Record\n}\n\n/** Anything an edge can point at. */\nexport type Target = Node | Group\n\n/** A block or container in the graph. */\nexport interface Node {\n readonly [NODE]: true\n /** Wires this node's default port to each target. Returns the target, or a group of them. */\n to(...targets: T): T extends [infer One] ? One : Group\n /** Wires this node's error port to each target. */\n onError(...targets: Target[]): void\n}\n\n/** Several nodes; `.to()` wires every member (fan-in). */\nexport interface Group {\n to(...targets: Target[]): Group\n}\n\n/** A block: a node whose outputs can be referenced. */\nexport type Block = Node & Ref\n\n/** The named ports of a condition or router. */\nexport type Branches = { readonly [P in K]: Node }\n\n/** Trigger builders (`trigger.start`, `trigger.gmail.poller`, ...), generated from the catalog. */\nexport declare namespace trigger {}\n\n/** Builders for hidden legacy block versions (`legacy.slack.send`), generated from the catalog. */\nexport declare namespace legacy {}\n\n/** A raw edge from a handle the SDK has no name for (a legacy or unknown port). */\nexport declare function edge(from: Node, handle: string, to: Target): void\n\n/** Any stored block type without a builder (legacy, unknown or custom), with untyped outputs. */\nexport declare function block(\n type: string,\n name: string,\n params: Record,\n meta?: BlockMeta\n): Block\n\n// Workflow and variables\n\nexport type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'plain'\n\nexport interface VariableDeclaration {\n type: VariableType\n value?: Json\n}\n\nexport type VariableDeclarations = Record\n\ndeclare const VAR: unique symbol\n\n/** A workflow variable, compiled to ``. */\nexport interface VarRef {\n readonly [VAR]: string\n}\n\ntype VariableValue = T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'string' | 'plain'\n ? string\n : Json\n\nexport type VarRefs = {\n readonly [K in keyof V]: VarRef & Ref>\n}\n\n/**\n * Workflow variables by name, untyped. Prefer the `vars` the `workflow()` body receives, which is\n * typed from the declared variables.\n */\nexport declare const vars: { readonly [name: string]: VarRef & Ref }\n\ndeclare const WORKFLOW_DEF: unique symbol\n\n/** The default export of a workflow file. */\nexport interface WorkflowDef {\n readonly [WORKFLOW_DEF]: true\n}\n\n/** A child workflow by key, for `runWorkflow` or as an agent tool. */\nexport interface WorkflowRef extends ResourceRef<'workflow', Key> {\n asTool(options?: ToolOpts): Tool\n}\n\n/** Declares a workflow. The body wires blocks; it never runs. */\nexport declare function workflow>(\n name: string,\n options: { description?: string; variables?: V },\n body: (scope: { vars: VarRefs }) => void\n): WorkflowDef\n/** A child workflow by key: `workflow('enrich-lead')`. */\nexport declare function workflow(key: K): WorkflowRef\n\n// Containers\n\ntype ItemOf = C extends { readonly [REF]: readonly (infer E)[] }\n ? E\n : C extends readonly (infer E)[]\n ? E\n : Json\n\n/** Inside a loop or parallel body. */\nexport interface SubflowScope {\n /** The container's start port, into its first child. */\n readonly start: Node\n readonly index: Ref\n readonly currentItem: Ref\n readonly items: Ref\n}\n\nexport interface SubflowOutput {\n results: Json[]\n}\n\n/** A loop or parallel container. Its `.to()` wires the port taken after it finishes. */\nexport type Container = Block\n\ntype Collection = AnyRef | Template | Json[] | string\n\nexport declare const loop: {\n for(\n name: string,\n params: { count: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n forEach(\n name: string,\n params: { collection: C },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n while(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n doWhile(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n}\n\nexport declare const parallel: {\n count(\n name: string,\n params: { count: number; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n collection(\n name: string,\n params: { collection: C; batchSize?: number },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n}\n\n// Blocks with a source form of their own\n\n/**\n * Params and outputs of the blocks below, generated from the catalog. Each entry is\n * `{ params; output }`; without generated types the params are loose.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface SpecialBuilderTypes {}\n\ntype SpecialParams = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { params: infer P }\n ? P\n : never\n : Record\n\ntype SpecialOutput = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { output: infer O }\n ? O\n : never\n : Json\n\n/** A condition expression, or `true` for the `else` branch. */\nexport type BranchExpression = Template | string | true\n\n/**\n * Keys of a condition written with no rows (`condition('Name', {})`, the source form of rows\n * that were never persisted): the implicit `if` and `else` ports stay addressable.\n */\ntype ConditionKeys = keyof B extends never ? 'if' | 'else' : Extract\ntype RouterKeys = keyof R extends never ? 'route0' : Extract\n\n/** A condition: named branches, the last one `else` when there are two or more. */\nexport declare function condition>(\n name: string,\n branches: B,\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A router: named routes described for the model. */\nexport declare function router>(\n name: string,\n params: SpecialParams<'router'> & { routes: R },\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A function block. `code` is inline (`` js`...` ``) or a file (`file('./functions/x.js')`). */\nexport declare function fn(\n name: string,\n params: SpecialParams<'fn'> & { code: Template | FileBody | string },\n meta?: BlockMeta\n): Block>\n\n/** Runs a child workflow. */\nexport declare function runWorkflow(\n name: string,\n params: SpecialParams<'runWorkflow'>,\n meta?: BlockMeta\n): Block>\n\n/** Pauses for a person; the form in `inputFormat` types `submission`. */\nexport declare function human>(\n name: string,\n params: SpecialParams<'human'> & { inputFormat?: F },\n meta?: BlockMeta\n): Block, 'submission'> & { submission: InputFieldsOutput }>\n\n/** Ends the workflow with an API response. */\nexport declare function response(\n name: string,\n params: SpecialParams<'response'>,\n meta?: BlockMeta\n): Block>\n\n/** Assigns workflow variables. */\nexport declare function setVariables(\n name: string,\n params: SpecialParams<'setVariables'>,\n meta?: BlockMeta\n): Block>\n\ndeclare const ANNOTATION: unique symbol\n\n/** A canvas note: no edges, no outputs. */\nexport interface Annotation {\n readonly [ANNOTATION]: true\n}\nexport declare function note(\n name: string,\n params: SpecialParams<'note'>,\n meta?: BlockMeta\n): Annotation\n\n// Structured param shapes\n\n/** Type names an input-format field may declare. */\nexport type InputFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'file[]'\n\n/** A structured input field: its type plus a default value, description or required flag. */\nexport interface InputFieldSpec {\n type: InputFieldType\n value?: JsonWithRefs\n description?: string\n required?: boolean\n}\n\n/** `input-format` fields by name: `{ subject: 'string', amount: { type: 'number', value: 0 } }`. */\nexport type InputFields = Record\n\ntype InputFieldValue = T extends 'string'\n ? string\n : T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'array'\n ? Json[]\n : T extends 'file[]'\n ? SimFile[]\n : Json\n\n/** The outputs an `input-format` declares. */\nexport type InputFieldsOutput = {\n [K in keyof F]: F[K] extends { type: infer T } ? InputFieldValue : InputFieldValue\n}\n\n/** `response-format` fields: `{ ok: true, id: { type: 'string', value: row.id } }`. */\nexport type ResponseFields = Record\n\n/** An agent message. */\nexport interface Message {\n role: 'system' | 'user' | 'assistant'\n content: Value\n}\n\n/** One `variables-input` assignment. */\nexport interface VariableAssignment {\n variable: VarRef\n value: JsonWithRefs\n}\n\n/** Child workflow inputs by name (`input-mapping`, `workflow-input-mapper`). */\nexport type InputMapping = Record\n\n/** A table filter by column: `{ status: { $eq: 'new' } }`. */\nexport type Filter = Record\n\n/** A table sort by column: `{ createdAt: 'desc' }`. */\nexport type Sort =\n | Record\n | Array<{ column: string; direction: 'asc' | 'desc' }>\n\n/** One knowledge tag filter. */\nexport interface TagFilter {\n tagName: string\n tagValue: Value\n [key: string]: JsonWithRefs\n}\n\n/** One document tag. */\nexport interface DocumentTag {\n tagName: string\n value: Value\n [key: string]: JsonWithRefs\n}\n\n/** One `eval-input` metric. */\nexport interface EvalMetric {\n name: string\n description?: string\n range?: { min: number; max: number }\n [key: string]: JsonWithRefs | undefined\n}\n\n/** One `model-fallback-list` entry. */\nexport interface ModelFallback {\n model: LiteralUnion\n [key: string]: JsonWithRefs\n}\n\n/**\n * Model ids, generated into `models.d.ts` (which adds one member per model). Kept apart from the\n * block files so a model-list change touches one file.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface ModelIds {}\nexport type Model = Extract\n\n/** A JSON Schema `responseFormat`, or `{ name, strict, schema }` around one. */\nexport type ResponseFormat = JsonWithRefs\n\ntype Depth = [never, 0, 1, 2, 3, 4]\n\ntype FromSchema = [D] extends [never]\n ? Json\n : S extends { enum: readonly (infer E)[] }\n ? E\n : S extends { type: 'object'; properties: infer P }\n ? { [K in keyof P]: FromSchema }\n : S extends { type: 'array'; items: infer I }\n ? FromSchema[]\n : S extends { type: 'string' }\n ? string\n : S extends { type: 'number' | 'integer' }\n ? number\n : S extends { type: 'boolean' }\n ? boolean\n : Json\n\n/**\n * The outputs a literal `responseFormat` adds, read from its JSON Schema with recursion capped at\n * depth 4. A template or reference adds untyped JSON.\n */\nexport type ResponseFormatOutput = [RF] extends [undefined]\n ? unknown\n : RF extends { schema: infer S }\n ? FromSchema\n : RF extends { type: 'object'; properties: object }\n ? FromSchema\n : { [key: string]: Json }\n" diff --git a/packages/workflow-sdk/src/core.d.ts b/packages/workflow-sdk/src/core.d.ts index b0d73f15d31..a221e0abb64 100644 --- a/packages/workflow-sdk/src/core.d.ts +++ b/packages/workflow-sdk/src/core.d.ts @@ -8,6 +8,17 @@ * Block builders (`slack.sendMessage`, `agent`, `trigger.gmail.poller`, ...) are not declared here: * they are generated from the block catalog into `blocks/{type}.d.ts`, which augment this module. * The generic `block(type, name, params)` covers any stored type without a builder. + * + * Every workflow file starts with the SDK header line, before any import: + * + * ```ts + * // @sim-sdk 1 + * import { agent, trigger, workflow } from '@sim/workflow-sdk' + * ``` + * + * The number is the SDK major version the file is written against. A file without the header is + * refused with `E_SDK_HEADER`, and one written for a newer major than the server supports with + * `E_SDK_MAJOR`. */ /** Plain JSON. */ @@ -238,11 +249,23 @@ export interface BlockMeta { errorPort?: boolean /** The block-level advanced toggle (`advancedMode`). */ advancedMode?: boolean + /** + * Runs the block as its trigger (`triggerMode`). Trigger builders (`trigger.gmail.poller`) set + * it themselves; write it on any other builder only for a block stored in trigger mode. + */ + triggerMode?: boolean retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number } /** Pair modes that cannot be derived from the value written. */ modes?: Record + /** + * Per branch key of a condition or router, the row's display `title` and any stored fields the + * SDK has no syntax for (`extra`, plain JSON). + */ + branches?: Record }> /** Stale values under hidden conditions, kept verbatim. */ inactive?: Record + /** Stored block data the SDK has no syntax for, kept verbatim (plain JSON). */ + $unknown?: Record } /** Anything an edge can point at. */ From a4133b3527ba2cdadbf34d1d57983ddccc2e94c7 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:07:13 -0800 Subject: [PATCH 113/428] perf(workflows): cache the compile catalog by the content its build reads Every source get, source apply and block-catalog read rebuilt the whole registry catalog (about 80 ms warm, 250 ms cold). buildCodeCatalog now serves it from an lru-cache keyed by a hash of what the build reads: the included built-in types, each included custom block's full row, the not-addable stored types and the organization scope. A custom block publish, an allowlist change or a preview reveal changes the key, so no invalidator is needed, and one organization's custom blocks are never served to another. --- .../code/catalog/workspace-catalog.test.ts | 92 +++++++++++++++++++ .../code/catalog/workspace-catalog.ts | 70 +++++++++++++- 2 files changed, 158 insertions(+), 4 deletions(-) create mode 100644 apps/sim/lib/workflows/code/catalog/workspace-catalog.test.ts diff --git a/apps/sim/lib/workflows/code/catalog/workspace-catalog.test.ts b/apps/sim/lib/workflows/code/catalog/workspace-catalog.test.ts new file mode 100644 index 00000000000..9bf301a56e9 --- /dev/null +++ b/apps/sim/lib/workflows/code/catalog/workspace-catalog.test.ts @@ -0,0 +1,92 @@ +/** + * The compile-catalog cache is shared by every request in the process, so its key is a tenant + * boundary. These cover the two ways a wrong key would surface: one organization's custom blocks + * served to another, and a custom block publish that keeps serving the catalog from before it. + */ +import { catalogBlock } from '@sim/workflow-code' +import { describe, expect, it, vi } from 'vitest' + +vi.unmock('@/blocks/registry') + +import { type CatalogGate, withCatalogBlockScope } from '@/lib/catalog/application/context' +import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog' +import type { CustomBlockOverlayRow } from '@/blocks/custom/server-overlay' + +function gateWith(customBlockRows: CustomBlockOverlayRow[]): CatalogGate { + return { + visibility: { revealed: new Set(), disabled: new Set(), previewTagged: new Set() }, + allowedIntegrations: null, + customBlockRows, + } +} + +function customRow(type: string, inputNames: string[]): CustomBlockOverlayRow { + return { + type, + name: type, + description: 'Deployed as a block', + workflowId: `${type}-workflow`, + inputFields: inputNames.map((name) => ({ id: `${type}-${name}`, name, type: 'string' })), + } +} + +function catalogFor(organizationId: string, gate: CatalogGate) { + return withCatalogBlockScope(gate, async () => + buildCodeCatalog({ gate, organizationId, storedTypes: [] }) + ) +} + +function inputIds(catalog: Awaited>['catalog'], type: string) { + return catalogBlock(catalog, type)?.subBlocks.map((subBlock) => subBlock.id) ?? [] +} + +describe('compile catalog cache', () => { + it('never serves one organization the catalog holding another organization custom blocks', async () => { + const orgA = await catalogFor('org-a', gateWith([customRow('custom_block_a', ['lead'])])) + const orgB = await catalogFor('org-b', gateWith([customRow('custom_block_b', ['ticket'])])) + const orgC = await catalogFor('org-c', gateWith([])) + + expect(catalogBlock(orgA.catalog, 'custom_block_a')).toBeDefined() + expect(catalogBlock(orgA.catalog, 'custom_block_b')).toBeUndefined() + expect(catalogBlock(orgB.catalog, 'custom_block_b')).toBeDefined() + expect(catalogBlock(orgB.catalog, 'custom_block_a')).toBeUndefined() + expect(catalogBlock(orgC.catalog, 'custom_block_a')).toBeUndefined() + expect(catalogBlock(orgC.catalog, 'custom_block_b')).toBeUndefined() + expect(new Set([orgA.catalog.hash, orgB.catalog.hash, orgC.catalog.hash]).size).toBe(3) + }) + + it('scopes a catalog to its organization even when another holds an identical custom block', async () => { + const row = customRow('custom_block_shared', ['lead']) + const first = await catalogFor('org-d', gateWith([row])) + const second = await catalogFor('org-e', gateWith([{ ...row }])) + + expect(first.catalog.scope).toEqual({ organizationId: 'org-d' }) + expect(second.catalog.scope).toEqual({ organizationId: 'org-e' }) + }) + + it('serves the new catalog after a custom block is republished with different inputs', async () => { + const before = await catalogFor('org-f', gateWith([customRow('custom_block_f', ['lead'])])) + const cached = await catalogFor('org-f', gateWith([customRow('custom_block_f', ['lead'])])) + const after = await catalogFor( + 'org-f', + gateWith([customRow('custom_block_f', ['lead', 'score'])]) + ) + + expect(cached).toBe(before) + expect(after).not.toBe(before) + expect(after.catalog.hash).not.toBe(before.catalog.hash) + expect(inputIds(before.catalog, 'custom_block_f')).not.toContain('custom_block_f-score') + expect(inputIds(after.catalog, 'custom_block_f')).toContain('custom_block_f-score') + }) + + it('serves the new catalog after a custom block is disabled', async () => { + const enabled = await catalogFor('org-g', gateWith([customRow('custom_block_g', ['lead'])])) + const disabled = await catalogFor( + 'org-g', + gateWith([{ ...customRow('custom_block_g', ['lead']), enabled: false }]) + ) + + expect(catalogBlock(enabled.catalog, 'custom_block_g')).toBeDefined() + expect(catalogBlock(disabled.catalog, 'custom_block_g')).toBeUndefined() + }) +}) diff --git a/apps/sim/lib/workflows/code/catalog/workspace-catalog.ts b/apps/sim/lib/workflows/code/catalog/workspace-catalog.ts index d64ac56b6dd..a9f8a59169a 100644 --- a/apps/sim/lib/workflows/code/catalog/workspace-catalog.ts +++ b/apps/sim/lib/workflows/code/catalog/workspace-catalog.ts @@ -1,3 +1,6 @@ +import { createHash } from 'node:crypto' +import { compareStrings } from '@sim/utils/string' +import { LRUCache } from 'lru-cache' import type { CatalogGate } from '@/lib/catalog/application/context' import { isBlockVisibleToCaller } from '@/lib/catalog/application/context' import { buildBlockCatalog, type CatalogBuildResult } from '@/lib/workflows/code/catalog/build' @@ -15,6 +18,56 @@ interface CodeCatalogScope { storedTypes?: readonly string[] } +/** + * Built catalogs by content key ({@link catalogCacheKey}). A build projects and hashes the whole + * registry (about 80 ms warm, 250 ms cold), and every source get, apply and catalog read + * asks for one. Distinct keys per process are few: one per distinct gate outcome (visibility, + * allowlist, a workspace's custom blocks, not-addable stored types). An entry is about 6 MB of heap, + * so the ceiling (about 100 MB) is a memory backstop, not an operating limit. + * + * No TTL and no invalidator: the key is the content the build reads, so a custom block publish, + * an allowlist change or a preview reveal yields a new key, and the old entry ages out. Built-in + * block configs are constants for the life of the process (a deploy is a new process). + */ +const CATALOG_CACHE_MAX = 16 +const compileCatalogs = new LRUCache({ max: CATALOG_CACHE_MAX }) + +/** + * The content a build reads, hashed: every included built-in type (the registry config is a + * process constant), every included custom block's full row (the config is derived from the row + * alone), the types marked not addable, and the organization the catalog is scoped to. The rows + * and the scope are in the key, so a catalog holding one organization's custom blocks is never + * served to another. `null` when an included type is neither built in nor one of the gate's custom + * blocks: its config cannot be keyed, so that build is not cached. + */ +function catalogCacheKey( + included: ReadonlyMap, + notAddable: ReadonlySet, + scopeOrganizationId: string | null, + gate: CatalogGate +): string | null { + const registry = getBlockRegistry() + const rowsByType = new Map(gate.customBlockRows.map((row) => [row.type, row])) + const builtIn: string[] = [] + const custom: string[] = [] + for (const [type, config] of included) { + if (Object.hasOwn(registry, type) && registry[type] === config) { + builtIn.push(type) + continue + } + const row = rowsByType.get(type) + if (!row) return null + custom.push(JSON.stringify([type, row])) + } + const key = JSON.stringify({ + builtIn: builtIn.sort(compareStrings), + custom: custom.sort(compareStrings), + notAddable: [...notAddable].sort(compareStrings), + scope: scopeOrganizationId, + }) + return createHash('sha256').update(key).digest('hex') +} + /** * The workspace catalog, or with `storedTypes` the per-workflow compile catalog: the blocks this * caller may place, sunset blocks included (existing placements must still compile), plus every @@ -23,6 +76,9 @@ interface CodeCatalogScope { * MUST run inside `withCatalogBlockScope(gate, …)`: visibility and the org's custom blocks are * resolved from that scope. Built-in blocks are projected from the raw registry config, not the * viewer projection, so a revealed preview block's display suffix never changes the hash. + * + * Served from a process cache keyed by the content the build reads; callers share the result and + * must not mutate it. */ export function buildCodeCatalog(scope: CodeCatalogScope): CatalogBuildResult { const registry = getBlockRegistry() @@ -41,16 +97,22 @@ export function buildCodeCatalog(scope: CodeCatalogScope): CatalogBuildResult { notAddable.add(type) } - return buildBlockCatalog( + const scopeOrganizationId = + scope.organizationId && scope.gate.customBlockRows.length > 0 ? scope.organizationId : null + const key = catalogCacheKey(included, notAddable, scopeOrganizationId, scope.gate) + const cached = key === null ? undefined : compileCatalogs.get(key) + if (cached !== undefined) return cached + + const built = buildBlockCatalog( { blocks: [...included.values()], notAddable, trigger: registryTrigger, sdkNames: SDK_NAMES, - ...(scope.organizationId && scope.gate.customBlockRows.length > 0 - ? { scope: { organizationId: scope.organizationId } } - : {}), + ...(scopeOrganizationId ? { scope: { organizationId: scopeOrganizationId } } : {}), }, { metadata: getToolMetadata, outputs: getToolOutputsMetadata } ) + if (key !== null) compileCatalogs.set(key, built) + return built } From 27be6afae54ad002125ee3e8ce531069483d20c3 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:07:24 -0800 Subject: [PATCH 114/428] perf(workflows): move code_meta to a side table and canonicalize stored state once code_meta moves off the hot workflow row into workflow_code_meta (workflow_id pk references workflow on delete cascade, meta jsonb, updated_at). The unreleased migration 0460 is regenerated to create the table instead of adding the column. Writes upsert and an empty value deletes the row; the prune keeps its compare-and-set. Duplicate, fork and promote copy it by source workflow id, so the deployed-workflow listing no longer selects it, and source get/apply read it only where they print. Source get canonicalized the stored graph twice and apply up to seven times. canonicalizeStored loads the resource kinds the workflow referenced last time before one pass (a newly referenced kind costs a second pass); the lock is applied only when it renames a branch row; the re-print reuses the lockless result for the fingerprint; and the fingerprint re-check under the row lock reuses it when the re-read graph is unchanged. --- .../database/code-meta-prune.integration.ts | 159 ++++++++++ .../lib/copy/copy-workflows.ts | 57 ++-- .../lib/copy/deploy-bridge.ts | 3 - .../ee/workspace-forking/lib/create-fork.ts | 2 +- .../lib/promote/promote-plan.ts | 3 - .../workspace-forking/lib/promote/promote.ts | 1 + .../apply-workflow-source.integration.ts | 9 +- .../application/apply-workflow-source.ts | 136 +++++---- .../application/get-workflow-source.ts | 26 +- apps/sim/lib/workflows/code/resources.ts | 23 -- .../workflows/code/stored-canonical.test.ts | 285 ++++++++++++++++++ .../lib/workflows/code/stored-canonical.ts | 134 ++++++++ .../persistence/code-meta.integration.ts | 83 ++++- .../lib/workflows/persistence/duplicate.ts | 26 +- .../db/migrations/0460_workflow_code_meta.sql | 8 +- .../db/migrations/meta/0460_snapshot.json | 50 ++- packages/db/migrations/meta/_journal.json | 2 +- packages/db/schema.ts | 23 +- .../src/mocks/schema-tables.generated.ts | 2 +- packages/workflow-code/DESIGN.md | 4 + .../workflow-persistence/src/code-meta.ts | 84 +++--- 21 files changed, 909 insertions(+), 211 deletions(-) create mode 100644 apps/realtime/src/database/code-meta-prune.integration.ts create mode 100644 apps/sim/lib/workflows/code/stored-canonical.test.ts create mode 100644 apps/sim/lib/workflows/code/stored-canonical.ts diff --git a/apps/realtime/src/database/code-meta-prune.integration.ts b/apps/realtime/src/database/code-meta-prune.integration.ts new file mode 100644 index 00000000000..fed2d68bbe1 --- /dev/null +++ b/apps/realtime/src/database/code-meta-prune.integration.ts @@ -0,0 +1,159 @@ +/** + * Real PostgreSQL coverage: canvas deletes through the realtime server prune the deleted blocks' + * and variables' entries from the `workflow_code_meta` side table, and delete its row once nothing + * is left, so source bindings and comments never outlive what they describe. + */ +import { mkdir, writeFile } from 'node:fs/promises' +import { dirname, resolve } from 'node:path' +import { db } from '@sim/db' +import { user, workflow, workflowBlocks, workflowCodeMeta, workspace } from '@sim/db/schema' +import { deleteWorkspaceFixture, insertWorkspaceFixture } from '@sim/db/testing/workspace-fixtures' +import { + BLOCKS_OPERATIONS, + OPERATION_TARGETS, + VARIABLE_OPERATIONS, +} from '@sim/realtime-protocol/constants' +import { getErrorMessage } from '@sim/utils/errors' +import { generateId } from '@sim/utils/id' +import { writeWorkflowCodeMeta } from '@sim/workflow-persistence/code-meta' +import { eq } from 'drizzle-orm' +import { afterAll, beforeAll, describe, expect, it } from 'vitest' +import { persistWorkflowOperation } from '@/database/operations' + +const userId = generateId() +const workspaceId = generateId() +const workflowId = generateId() +const keptId = generateId() +const deletedId = generateId() +const variableId = generateId() +const checks: { name: string; status: 'passed' | 'failed'; durationMs: number; error?: string }[] = + [] + +type StoredCodeMeta = NonNullable[2]> + +/** Registers a test and records its status and duration in the suite report. */ +function check(name: string, run: () => Promise) { + it(name, async () => { + const started = performance.now() + try { + await run() + checks.push({ name, status: 'passed', durationMs: performance.now() - started }) + } catch (error) { + checks.push({ + name, + status: 'failed', + durationMs: performance.now() - started, + error: getErrorMessage(error), + }) + throw error + } + }) +} + +function persist(target: string, operation: string, payload: unknown) { + return persistWorkflowOperation(workflowId, { + target, + operation, + payload, + timestamp: Date.now(), + userId, + }) +} + +async function storedMeta(): Promise { + const [row] = await db + .select({ meta: workflowCodeMeta.meta }) + .from(workflowCodeMeta) + .where(eq(workflowCodeMeta.workflowId, workflowId)) + return row?.meta +} + +describe('workflow_code_meta pruning on realtime canvas deletes', () => { + beforeAll(async () => { + const now = new Date() + await db.insert(user).values({ + id: userId, + name: 'Code meta prune fixture', + email: `${userId}@code-meta-prune.test`, + emailVerified: true, + createdAt: now, + updatedAt: now, + }) + await insertWorkspaceFixture(db, { + id: workspaceId, + name: 'Code meta prune', + ownerId: userId, + billedAccountUserId: userId, + }) + await db.insert(workflow).values({ + id: workflowId, + userId, + workspaceId, + name: 'Code meta prune', + lastSynced: now, + createdAt: now, + updatedAt: now, + variables: { + [variableId]: { id: variableId, workflowId, name: 'retries', type: 'number', value: 3 }, + }, + }) + await db.insert(workflowBlocks).values( + [keptId, deletedId].map((id, index) => ({ + id, + workflowId, + type: 'function', + name: `Block ${index}`, + positionX: '0', + positionY: String(index * 100), + })) + ) + }) + + afterAll(async () => { + const reportPath = + process.env.REALTIME_CODE_META_PRUNE_REPORT_PATH ?? + resolve('test-results/realtime-code-meta-prune.json') + await mkdir(dirname(reportPath), { recursive: true }) + await writeFile(reportPath, JSON.stringify({ checks }, null, 2)) + await deleteWorkspaceFixture(db, eq(workspace.ownerId, userId)) + await db.delete(user).where(eq(user.id, userId)) + }) + + check('a block delete drops its entries and keeps the rest', async () => { + const meta: StoredCodeMeta = { + v: 1, + bindings: { [keptId]: 'kept', [deletedId]: 'doomed' }, + order: { [keptId]: 0, [deletedId]: 1 }, + comments: {}, + } + await writeWorkflowCodeMeta(db, workflowId, meta) + + await persist(OPERATION_TARGETS.BLOCKS, BLOCKS_OPERATIONS.BATCH_REMOVE_BLOCKS, { + ids: [deletedId], + }) + + expect(await storedMeta()).toEqual({ + v: 1, + bindings: { [keptId]: 'kept' }, + order: { [keptId]: 0 }, + comments: {}, + }) + }) + + check('a variable delete that leaves nothing removes the row', async () => { + const meta: StoredCodeMeta = { + v: 1, + bindings: {}, + order: {}, + comments: { + [`var:${variableId}`]: [{ text: ' retry budget', kind: 'line', placement: 'trailing' }], + }, + } + await writeWorkflowCodeMeta(db, workflowId, meta) + expect(await storedMeta()).toBeDefined() + + await persist(OPERATION_TARGETS.VARIABLE, VARIABLE_OPERATIONS.REMOVE, { variableId }) + + expect(await storedMeta()).toBeUndefined() + }) +}) diff --git a/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts b/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts index 875109c3d46..54d62921bba 100644 --- a/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts +++ b/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts @@ -3,12 +3,8 @@ import { createLogger } from '@sim/logger' import { generateId } from '@sim/utils/id' import { isRecordLike } from '@sim/utils/object' import type { CanonicalModeOverrides } from '@sim/workflow-code/catalog/canonical-index' -import { - isEmptyCodeMeta, - remapCodeMeta, - type WorkflowCodeMetaV1, -} from '@sim/workflow-code/code-meta' -import { readCodeMetaValue } from '@sim/workflow-persistence/code-meta' +import { remapCodeMeta } from '@sim/workflow-code/code-meta' +import { readWorkflowCodeMeta, writeWorkflowCodeMeta } from '@sim/workflow-persistence/code-meta' import { and, eq, inArray, isNull } from 'drizzle-orm' import type { FolderResourceType } from '@/lib/api/contracts/folders' import { generateRequestId } from '@/lib/core/utils/request' @@ -403,19 +399,6 @@ export interface CopyWorkflowResult { blockIdMapping: Map } -/** The source's `code_meta` re-keyed onto the copy, or `null` when nothing survives the copy. */ -function copiedCodeMeta( - targetWorkflowId: string, - stored: unknown, - blockIdMapping: ReadonlyMap, - varIdMapping: ReadonlyMap -): WorkflowCodeMetaV1 | null { - const source = readCodeMetaValue(targetWorkflowId, stored) - if (!source) return null - const copied = remapCodeMeta(source, blockIdMapping, varIdMapping) - return isEmptyCodeMeta(copied) ? null : copied -} - export interface CopyWorkflowStateParams { tx: DbOrTx targetWorkflowId: string @@ -438,13 +421,13 @@ export interface CopyWorkflowStateParams { * the child starts undeployed and private (going public is an explicit act there). */ isPublicApi?: boolean - /** - * The source's stored `workflow.code_meta`. Written onto the target re-keyed to the copied - * block and variable ids, so source bindings, order and comments follow the copy. Omitted - * leaves the target's own value untouched. - */ - codeMeta?: unknown } + /** + * The source workflow whose code metadata (source bindings, order and comments) is written onto + * the target, re-keyed to the copied block and variable ids. A source without any clears the + * target's. Omitted leaves the target's own value untouched. + */ + codeMetaSourceWorkflowId?: string /** source workflow id -> target workflow id, for `workflow-selector` references */ workflowIdMap: Map /** source folder id -> target folder id */ @@ -516,6 +499,7 @@ export async function copyWorkflowStateIntoTarget( now, sourceState, sourceMeta, + codeMetaSourceWorkflowId, workflowIdMap, folderIdMap, transformSubBlocks, @@ -734,21 +718,8 @@ export async function copyWorkflowStateIntoTarget( // write below uses the same (folderId, name), so the registry stays consistent with it. nameRegistry.claim(targetFolderId, resolvedName, targetWorkflowId) - const codeMetaPatch = - sourceMeta.codeMeta === undefined - ? {} - : { - codeMeta: copiedCodeMeta( - targetWorkflowId, - sourceMeta.codeMeta, - blockIdMapping, - varIdMapping - ), - } - if (mode === 'create') { await tx.insert(workflow).values({ - ...codeMetaPatch, id: targetWorkflowId, userId, workspaceId: targetWorkspaceId, @@ -781,11 +752,19 @@ export async function copyWorkflowStateIntoTarget( lastSynced: now, updatedAt: now, ...(sourceMeta.isPublicApi !== undefined ? { isPublicApi: sourceMeta.isPublicApi } : {}), - ...codeMetaPatch, }) .where(eq(workflow.id, targetWorkflowId)) } + if (codeMetaSourceWorkflowId !== undefined) { + const sourceCodeMeta = await readWorkflowCodeMeta(tx, codeMetaSourceWorkflowId) + await writeWorkflowCodeMeta( + tx, + targetWorkflowId, + sourceCodeMeta ? remapCodeMeta(sourceCodeMeta, blockIdMapping, varIdMapping) : null + ) + } + const remappedState: WorkflowState = { blocks: newBlocks, edges: newEdges, diff --git a/apps/sim/ee/workspace-forking/lib/copy/deploy-bridge.ts b/apps/sim/ee/workspace-forking/lib/copy/deploy-bridge.ts index 25de0edd58e..aa8fbf734ff 100644 --- a/apps/sim/ee/workspace-forking/lib/copy/deploy-bridge.ts +++ b/apps/sim/ee/workspace-forking/lib/copy/deploy-bridge.ts @@ -36,8 +36,6 @@ export interface DeployedWorkflowSummary { sortOrder: number /** Whether the deployed API accepts unauthenticated calls; carried onto sync targets. */ isPublicApi: boolean - /** Stored `workflow.code_meta`, re-keyed onto each copy (see copyWorkflowStateIntoTarget). */ - codeMeta?: unknown } /** @@ -64,7 +62,6 @@ export async function listDeployedWorkflows( folderId: workflow.folderId, sortOrder: workflow.sortOrder, isPublicApi: workflow.isPublicApi, - codeMeta: workflow.codeMeta, }) .from(workflow) .where( diff --git a/apps/sim/ee/workspace-forking/lib/create-fork.ts b/apps/sim/ee/workspace-forking/lib/create-fork.ts index a7fe1ce42a6..1552d09ca94 100644 --- a/apps/sim/ee/workspace-forking/lib/create-fork.ts +++ b/apps/sim/ee/workspace-forking/lib/create-fork.ts @@ -459,8 +459,8 @@ export async function createFork(params: CreateForkParams): Promise [file.path, file.text])), lock: buildLockFromState(codeMeta, canonical, printed.hints), - fingerprint: fingerprintOf({ state, meta }, catalog, resources), + fingerprint: base.fingerprint, } } @@ -684,9 +708,13 @@ function emptySummary(): SourceDiffSummary { * The write is one `replaceWorkflowNormalizedState` under the workflow row lock, which re-checks * the fingerprint (409 when the draft moved), keeps current canvas positions for existing blocks * and asserts the protected-block merge is the identity, then stores the submission's bindings, - * order and comments in `workflow.code_meta` in the same transaction. A source that changes only - * those (a renamed const, a moved declaration, a comment) is a graph no-op that stores just - * `code_meta`, so the next `source get` prints it. Draft only: it never deploys. + * order and comments as the workflow's code metadata in the same transaction. A source that + * changes only those (a renamed const, a moved declaration, a comment) is a graph no-op that + * stores just the code metadata, so the next `source get` prints it. Draft only: it never deploys. + * + * The stored graph is canonicalized once and that result is reused for the fingerprint, the diff + * base and the re-print; the re-check under the row lock reuses it too when the re-read graph is + * unchanged. */ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ operation: workflowOperations.applySource, @@ -702,8 +730,10 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ }).attributedUserId const isCopilot = principal.kind === 'delegated' && principal.serviceId === 'copilot' - const stored = await loadStoredSource(context) - const storedCodeMeta = readCodeMetaValue(context.workflowId, context.workflow.codeMeta) + const [stored, storedCodeMeta] = await Promise.all([ + loadStoredSource(context), + readWorkflowCodeMeta(db, context.workflowId), + ]) const storedTypes = [...new Set(Object.values(stored.state.blocks).map((b) => b.type))] const { catalog } = buildCodeCatalog({ gate, @@ -711,14 +741,17 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ storedTypes, }) - const recording = createRecordingResolver() - const storedIdentity = canonicalize(stored.state, { - catalog, + const storedSource = await canonicalizeStored({ + workflowId: context.workflowId, + workspaceId: context.workspaceId, + state: stored.state, meta: stored.meta, - resources: recording.resolver, - }).identity - let resources = await loadResourceKeyResolver(context.workspaceId, recording.requestedKinds) - const currentFingerprint = fingerprintOf(stored, catalog, resources) + catalog, + }) + const storedCanonical = storedSource.canonical + const storedIdentity = storedCanonical.identity + let resources = storedSource.resources + const currentFingerprint = sourceFingerprint(storedCanonical.workflow, storedIdentity) const base = { workflowId: context.workflowId, @@ -792,9 +825,9 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ const compiledKinds = new Set() collectResourceKinds(compiled.workflow.blocks, compiledKinds) - if ([...compiledKinds].some((kind) => !recording.requestedKinds.has(kind))) { + if ([...compiledKinds].some((kind) => !storedSource.loadedKinds.has(kind))) { resources = await loadResourceKeyResolver(context.workspaceId, [ - ...recording.requestedKinds, + ...storedSource.loadedKinds, ...compiledKinds, ]) } @@ -863,12 +896,12 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ return refuse([...compiled.diagnostics, ...materializeDiagnostics].map(locate)) } - const baseCanonical = canonicalize(stored.state, { - catalog, - meta: stored.meta, - lock, - resources, - }) + const baseCanonical = canonicalizeUnderLock( + stored.state, + { catalog, meta: stored.meta, resources }, + storedCanonical, + lock + ) const canonicalDiff = diffCanonical( baseCanonical.workflow, compiled.workflow, @@ -995,28 +1028,27 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ const lockAfter = boundLock(materialized.identity, lock) const nextCodeMeta = mergeCodeMetaFromLock(storedCodeMeta, lockAfter, compiledModel) const usesCodeFiles = Object.values(compiled.hints.blocks).some((hint) => hint.codeFile) - const reprintFrom = (state: WorkflowState) => - reprint({ + const printBaseOf = (state: WorkflowState, lockless?: CanonicalizeResult) => + printBase({ state, meta: stored.meta, identity: materialized.identity, - codeMeta: nextCodeMeta, - usesCodeFiles, catalog, resources, + ...(lockless ? { lockless } : {}), }) + const reprintFrom = (base: PrintBase) => + reprint({ base, codeMeta: nextCodeMeta, usesCodeFiles, catalog }) if (noop) { - const printed = reprintFrom(stored.state) + const storedBase = printBaseOf(stored.state, storedCanonical) + const printed = reprintFrom(storedBase) if (!input.dryRun) { const storedPrint = reprint({ - state: stored.state, - meta: stored.meta, - identity: materialized.identity, + base: storedBase, codeMeta: storedCodeMeta, usesCodeFiles, catalog, - resources, }) if ( !isEqual(printed.files, storedPrint.files) || @@ -1047,7 +1079,7 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ context.workflowId, collectWorkflowGraphIds(prepared.state) ) - const printed = reprintFrom({ ...prepared.state, variables: storedVariables }) + const printed = reprintFrom(printBaseOf({ ...prepared.state, variables: storedVariables })) logger.info('Evaluated workflow source without persisting', { workflowId: context.workflowId, workspaceId: context.workspaceId, @@ -1087,7 +1119,9 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ subjectUserId, state: async (tx) => { const current = await loadStoredSource(context, tx) - const fingerprint = fingerprintOf(current, catalog, resources) + const fingerprint = isEqual(current, stored) + ? currentFingerprint + : fingerprintOf(current, catalog, resources) if (fingerprint !== input.baseFingerprint) { throw new WorkflowSourceStaleError(fingerprint) } @@ -1112,7 +1146,7 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ }, }) - const printed = reprintFrom({ ...persisted.state, variables: storedVariables }) + const printed = reprintFrom(printBaseOf({ ...persisted.state, variables: storedVariables })) logger.info('Applied workflow source', { workflowId: context.workflowId, workspaceId: context.workspaceId, diff --git a/apps/sim/lib/workflows/application/get-workflow-source.ts b/apps/sim/lib/workflows/application/get-workflow-source.ts index 9c9d79ef221..0de5dc2d095 100644 --- a/apps/sim/lib/workflows/application/get-workflow-source.ts +++ b/apps/sim/lib/workflows/application/get-workflow-source.ts @@ -1,9 +1,9 @@ +import { db } from '@sim/db' import { compareStrings } from '@sim/utils/string' import { type CanonicalWorkflow, type CodeComment, canonicalHash, - canonicalize, type Diagnostic, encodeAnchor, type LockBase, @@ -13,7 +13,7 @@ import { sourceFingerprint, type WorkflowLockV1, } from '@sim/workflow-code' -import { readCodeMetaValue } from '@sim/workflow-persistence/code-meta' +import { readWorkflowCodeMeta } from '@sim/workflow-persistence/code-meta' import type { WorkflowState } from '@sim/workflow-types/workflow' import { resolveCatalogGate, withCatalogBlockScope } from '@/lib/catalog/application/context' import { defineAuthorizedWorkflowUseCase } from '@/lib/workflows/application/authorized-workflow-use-case' @@ -22,8 +22,8 @@ import { resolvePrincipalWorkflowContext } from '@/lib/workflows/application/pri import { loadWorkflowGraph } from '@/lib/workflows/application/read-workflow-graph' import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog' import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' -import { createRecordingResolver, loadResourceKeyResolver } from '@/lib/workflows/code/resources' import { buildLockFromState, codeMetaPrintInputs } from '@/lib/workflows/code/source-lock' +import { canonicalizeStored } from '@/lib/workflows/code/stored-canonical' /** Directory function-code files are printed into when `functionCode` is `files`. */ const FUNCTION_CODE_DIR = 'functions' @@ -108,17 +108,19 @@ function usedBlockTypes(workflow: CanonicalWorkflow): string[] { * Loads the stored, migrated graph; builds the per-workflow compile catalog (the blocks this * caller may place plus every type already in the workflow); projects the graph to the canonical * model with resource ids lifted to provisional keys; and prints it with the bindings, order and - * comments `workflow.code_meta` keeps, so the lock comes from the same place. Pure read: no audit, so it - * stays head-safe and pollable like `GET /state`. + * comments the workflow's code metadata keeps, so the lock comes from the same place. The catalog + * comes from the process cache and the stored graph is canonicalized once. Pure read: no audit, so + * it stays head-safe and pollable like `GET /state`. */ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ operation: workflowOperations.readSource, resolveContext: resolvePrincipalWorkflowContext, async execute({ principal, input, context }): Promise { await requireWorkflowCodeEnabled() - const [graph, gate] = await Promise.all([ + const [graph, gate, codeMeta] = await Promise.all([ loadWorkflowGraph(context), resolveCatalogGate(principal, context, { customBlockInputs: true }), + readWorkflowCodeMeta(db, context.workflowId), ]) const state: WorkflowState = { blocks: graph.blocks, @@ -142,12 +144,14 @@ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ return catalog }) - const recording = createRecordingResolver() - canonicalize(state, { catalog, meta, resources: recording.resolver }) - const resources = await loadResourceKeyResolver(context.workspaceId, recording.requestedKinds) - const canonical = canonicalize(state, { catalog, meta, resources }) + const { canonical } = await canonicalizeStored({ + workflowId: context.workflowId, + workspaceId: context.workspaceId, + state, + meta, + catalog, + }) - const codeMeta = readCodeMetaValue(context.workflowId, context.workflow.codeMeta) const metaInputs = codeMetaPrintInputs(codeMeta, canonical) const withComments: CanonicalWorkflow = { ...canonical.workflow, diff --git a/apps/sim/lib/workflows/code/resources.ts b/apps/sim/lib/workflows/code/resources.ts index b6df01c44d2..b29f818e0a0 100644 --- a/apps/sim/lib/workflows/code/resources.ts +++ b/apps/sim/lib/workflows/code/resources.ts @@ -144,29 +144,6 @@ export function assignResourceKeys(kind: ResourceKind, rows: readonly ResourceRo return { byId, byKey } } -/** - * A resolver that answers nothing and records every `(kind, id)` canonicalize asked about, so a - * first pass learns which kinds a workflow references before any resource table is read. - */ -export function createRecordingResolver(): { - resolver: ResourceKeyResolver - requestedKinds: Set -} { - const requestedKinds = new Set() - return { - requestedKinds, - resolver: { - toKey(kind) { - requestedKinds.add(kind) - return null - }, - toId() { - return null - }, - }, - } -} - /** * Loads the resource keys of `kinds` in one workspace and returns a resolver over them. Only * this workspace's live resources are read, so an id from elsewhere never resolves. diff --git a/apps/sim/lib/workflows/code/stored-canonical.test.ts b/apps/sim/lib/workflows/code/stored-canonical.test.ts new file mode 100644 index 00000000000..9b4a196b687 --- /dev/null +++ b/apps/sim/lib/workflows/code/stored-canonical.test.ts @@ -0,0 +1,285 @@ +/** + * Reusing one canonicalize per source get or apply is only safe when the reused result equals + * what a fresh canonicalize would give. Failure modes covered: + * - a lock that renames a branch row is treated as changing nothing (stale diff base, wrong print); + * - a lock that keys only some rows, or keys rows the stored graph lacks, is wrongly refused or + * wrongly accepted; + * - a remembered resource-kind hint goes stale when a workflow starts referencing a new kind, and + * the stored graph is canonicalized against a resolver that cannot answer for it; + * - a warm workflow still pays a second canonicalize pass. + */ +import { + type BlockCatalog, + type CatalogBlock, + canonicalize, + expandBlockCatalog, + type ResourceKeyResolver, + type ResourceKind, + type WorkflowLockV1, +} from '@sim/workflow-code' +import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' +import { isEqual } from 'es-toolkit' +import { beforeEach, describe, expect, it, vi } from 'vitest' + +const hoisted = vi.hoisted(() => ({ + loadResourceKeyResolver: vi.fn(), +})) + +vi.mock('@/lib/workflows/code/resources', () => ({ + loadResourceKeyResolver: hoisted.loadResourceKeyResolver, +})) +vi.unmock('@/blocks/registry') + +import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' +import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' +import { + canonicalizeStored, + canonicalizeUnderLock, + lockKeepsCanonical, +} from '@/lib/workflows/code/stored-canonical' +import { getBlockRegistry } from '@/blocks/registry' +import { SDK_NAMES } from '@/blocks/sdk-names.generated' + +const { catalog } = buildBlockCatalog({ + blocks: Object.values(getBlockRegistry()), + trigger: registryTrigger, + sdkNames: SDK_NAMES, +}) +const meta = { name: 'Reuse', description: null } + +function block( + id: string, + type: string, + name: string, + values: Record +): BlockState { + return { + id, + type, + name, + position: { x: 0, y: 0 }, + enabled: true, + outputs: {}, + subBlocks: Object.fromEntries( + Object.entries(values).map(([subId, value]) => [ + subId, + { id: subId, type: 'short-input', value }, + ]) + ), + } as BlockState +} + +function state(blocks: BlockState[]): WorkflowState { + return { + blocks: Object.fromEntries(blocks.map((entry) => [entry.id, entry])), + edges: [], + loops: {}, + parallels: {}, + variables: {}, + } +} + +const conditionRows = [ + { id: 'cond-a', title: 'if', value: ' > 1' }, + { id: 'cond-b', title: 'else if', value: ' > 0' }, + { id: 'cond-c', title: 'else', value: '' }, +] +const branching = state([ + block('cond', 'condition', 'Gate', { conditions: JSON.stringify(conditionRows) }), + block('route', 'router_v2', 'Route', { + routes: JSON.stringify([ + { id: 'route-a', title: 'Sales', value: 'sales' }, + { id: 'route-b', title: 'Support', value: 'support', key: 'help' }, + ]), + }), +]) + +function lockOf(blocks: WorkflowLockV1['blocks']): WorkflowLockV1 { + return { lockVersion: 1, blocks, variables: {} } +} + +describe('lockKeepsCanonical', () => { + const lockless = canonicalize(branching, { catalog, meta }) + const keys = lockless.identity.blocks + const gate = Object.values(keys).find((entry) => entry.id === 'cond') + const route = Object.values(keys).find((entry) => entry.id === 'route') + if (!gate?.branches || !route?.branches) throw new Error('fixture lost its branches') + const gateBranches = gate.branches + const routeBranches = route.branches + const gateKeyOf = (rowId: string) => + Object.entries(gateBranches).find(([, id]) => id === rowId)?.[0] ?? '' + + const cases: Array<[string, WorkflowLockV1 | null]> = [ + ['no lock', null], + ['a lock without branches', lockOf({ gate: { id: 'cond', binding: 'gate', order: 0 } })], + [ + 'every row keyed as the lockless pass keys it', + lockOf({ + gate: { id: 'cond', binding: 'gate', order: 0, branches: gateBranches }, + route: { id: 'route', binding: 'route', order: 1, branches: routeBranches }, + }), + ], + [ + 'one row keyed as the lockless pass keys it', + lockOf({ + gate: { + id: 'cond', + binding: 'gate', + order: 0, + branches: { [gateKeyOf('cond-c')]: 'cond-c' }, + }, + }), + ], + [ + 'keys for rows and blocks the graph does not have', + lockOf({ + gate: { id: 'cond', binding: 'gate', order: 0, branches: { stale: 'cond-gone' } }, + ghost: { id: 'ghost', binding: 'ghost', order: 1, branches: { if: 'ghost-if' } }, + }), + ], + [ + 'a row renamed by the lock', + lockOf({ + gate: { id: 'cond', binding: 'gate', order: 0, branches: { highValue: 'cond-a' } }, + }), + ], + [ + 'two rows swapped by the lock', + lockOf({ + gate: { + id: 'cond', + binding: 'gate', + order: 0, + branches: { [gateKeyOf('cond-a')]: 'cond-b', [gateKeyOf('cond-b')]: 'cond-a' }, + }, + }), + ], + [ + 'a router row given another key', + lockOf({ + route: { id: 'route', binding: 'route', order: 1, branches: { sales: 'route-b' } }, + }), + ], + ] + + it.each(cases)('agrees with a fresh canonicalize for %s', (_name, lock) => { + const locked = canonicalize(branching, { catalog, meta, lock }) + expect(lockKeepsCanonical(lock, lockless.identity)).toBe(isEqual(locked, lockless)) + }) + + it('covers locks that change the result and locks that do not', () => { + const outcomes = cases.map(([, lock]) => + isEqual(canonicalize(branching, { catalog, meta, lock }), lockless) + ) + expect(outcomes).toContain(true) + expect(outcomes).toContain(false) + }) + + it('returns the lockless result only when the lock changes nothing', () => { + const options = { catalog, meta, resources: { toKey: () => null, toId: () => null } } + const agreeing = lockOf({ + gate: { id: 'cond', binding: 'gate', order: 0, branches: gateBranches }, + }) + const renaming = lockOf({ + gate: { id: 'cond', binding: 'gate', order: 0, branches: { highValue: 'cond-a' } }, + }) + expect(canonicalizeUnderLock(branching, options, lockless, agreeing)).toBe(lockless) + const renamed = canonicalizeUnderLock(branching, options, lockless, renaming) + expect(renamed).not.toBe(lockless) + expect(renamed).toEqual(canonicalize(branching, { ...options, lock: renaming })) + }) +}) + +/** A block type with a single-select resource field of `kind` that serializes in basic mode. */ +function resourceField(kind: ResourceKind): { type: string; subBlockId: string } { + const expanded = expandBlockCatalog(catalog) + for (const [type, entry] of Object.entries(expanded.blocks) as Array<[string, CatalogBlock]>) { + const field = entry.subBlocks.find( + (subBlock) => + subBlock.valueKind === 'resource' && + subBlock.resourceKind === kind && + !subBlock.multiple && + subBlock.condition === undefined + ) + if (field) return { type, subBlockId: field.id } + } + throw new Error(`no block with a ${kind} field`) +} + +/** Resolves `-id` to `-key` for every loaded kind, like the real loader. */ +function fakeResolver(kinds: Iterable): ResourceKeyResolver { + const loaded = new Set(kinds) + return { + toKey: (kind, id) => (loaded.has(kind) && id === `${kind}-id` ? `${kind}-key` : null), + toId: (kind, key) => (loaded.has(kind) && key === `${kind}-key` ? `${kind}-id` : null), + } +} + +describe('canonicalizeStored', () => { + const table = resourceField('table') + const knowledge = resourceField('knowledge-base') + const withTable = state([block('t', table.type, 'Rows', { [table.subBlockId]: 'table-id' })]) + const withTableAndKb = state([ + block('t', table.type, 'Rows', { [table.subBlockId]: 'table-id' }), + block('k', knowledge.type, 'Docs', { [knowledge.subBlockId]: 'knowledge-base-id' }), + ]) + const expected = (graph: WorkflowState, kinds: ResourceKind[]) => + canonicalize(graph, { catalog, meta, resources: fakeResolver(kinds) }) + + beforeEach(() => { + hoisted.loadResourceKeyResolver.mockImplementation( + async (_workspaceId: string, kinds: Iterable) => fakeResolver(kinds) + ) + }) + + it('resolves resource keys on a cold workflow, then needs one pass once warm', async () => { + const input = { + workflowId: 'wf-warm', + workspaceId: 'ws', + meta, + catalog: catalog as BlockCatalog, + } + const cold = await canonicalizeStored({ ...input, state: withTable }) + expect(cold.canonical).toEqual(expected(withTable, ['table'])) + expect(JSON.stringify(cold.canonical.workflow)).toContain('table-key') + + hoisted.loadResourceKeyResolver.mockClear() + const warm = await canonicalizeStored({ ...input, state: withTable }) + expect(warm.canonical).toEqual(cold.canonical) + expect(hoisted.loadResourceKeyResolver).toHaveBeenCalledTimes(1) + expect([...hoisted.loadResourceKeyResolver.mock.calls[0][1]]).toEqual(['table']) + }) + + it('re-resolves when a workflow starts referencing a kind its hint lacks', async () => { + const input = { + workflowId: 'wf-grows', + workspaceId: 'ws', + meta, + catalog: catalog as BlockCatalog, + } + await canonicalizeStored({ ...input, state: withTable }) + const grown = await canonicalizeStored({ ...input, state: withTableAndKb }) + expect(grown.canonical).toEqual(expected(withTableAndKb, ['table', 'knowledge-base'])) + expect(JSON.stringify(grown.canonical.workflow)).toContain('knowledge-base-key') + expect([...grown.loadedKinds].sort()).toEqual(['knowledge-base', 'table']) + }) + + it('keeps the remembered kinds per workflow', async () => { + await canonicalizeStored({ + workflowId: 'wf-one', + workspaceId: 'ws', + meta, + catalog, + state: withTableAndKb, + }) + hoisted.loadResourceKeyResolver.mockClear() + await canonicalizeStored({ + workflowId: 'wf-two', + workspaceId: 'ws', + meta, + catalog, + state: withTable, + }) + expect([...hoisted.loadResourceKeyResolver.mock.calls[0][1]]).toEqual([]) + }) +}) diff --git a/apps/sim/lib/workflows/code/stored-canonical.ts b/apps/sim/lib/workflows/code/stored-canonical.ts new file mode 100644 index 00000000000..d03e085145b --- /dev/null +++ b/apps/sim/lib/workflows/code/stored-canonical.ts @@ -0,0 +1,134 @@ +/** + * One canonicalize of a stored workflow per source get or apply. + * + * Canonicalize is the dominant per-request cost after the catalog. Two facts let a request reuse + * one result instead of re-running it: + * + * - Resource keys. Canonicalize asks the resolver only about the kinds the graph references, so a + * resolver that has loaded a superset of those kinds gives the same result as one that loaded + * exactly them. The kinds a workflow asked for last time are remembered, loaded up front, and + * checked after the pass; only a workflow that gained a kind pays a second pass. + * - The lock. Canonicalize reads a lock only for branch keys, by row id + * (`CanonicalizeOptions.lock`: it never changes block keys). When every key the lock supplies + * for a row equals the key the lockless pass gave that row, the lock changes nothing. + */ +import { + type BlockCatalog, + type BranchKey, + type CanonicalizeResult, + type CanonicalWorkflowMeta, + canonicalize, + type LockIdentity, + type ResourceKeyResolver, + type ResourceKind, + type WorkflowLockV1, +} from '@sim/workflow-code' +import type { WorkflowState } from '@sim/workflow-types/workflow' +import { LRUCache } from 'lru-cache' +import { loadResourceKeyResolver } from '@/lib/workflows/code/resources' + +/** + * Resource kinds each workflow's stored graph referenced on its last canonicalize: a hint for + * which resource tables to read before the pass. A stale entry costs at most one extra table read + * (a kind no longer referenced) or one extra pass (a kind newly referenced), never a wrong result. + * Entries are a handful of kind names, so the ceiling is a memory backstop. + */ +const referencedKindsByWorkflow = new LRUCache>({ + max: 20_000, +}) + +interface StoredCanonicalInput { + workflowId: string + workspaceId: string + state: WorkflowState + meta: CanonicalWorkflowMeta + catalog: BlockCatalog +} + +interface StoredCanonical { + /** The lockless canonical model of the stored graph, resource ids lifted to keys. */ + canonical: CanonicalizeResult + /** Answers every kind in `loadedKinds` from this workspace's live resources. */ + resources: ResourceKeyResolver + /** The kinds `resources` has loaded: every kind the stored graph references, maybe more. */ + loadedKinds: ReadonlySet +} + +/** + * Canonicalizes the stored graph with its resource keys, normally in one pass. The result equals + * a recording pass followed by a pass over a resolver for exactly the recorded kinds. + */ +export async function canonicalizeStored(input: StoredCanonicalInput): Promise { + const { workflowId, workspaceId, state, meta, catalog } = input + let loadedKinds: ReadonlySet = + referencedKindsByWorkflow.get(workflowId) ?? new Set() + let resources = await loadResourceKeyResolver(workspaceId, loadedKinds) + for (;;) { + const referenced = new Set() + const canonical = canonicalize(state, { + catalog, + meta, + resources: { + toKey(kind, id) { + referenced.add(kind) + return resources.toKey(kind, id) + }, + toId(kind, key) { + referenced.add(kind) + return resources.toId(kind, key) + }, + }, + }) + const missing = [...referenced].filter((kind) => !loadedKinds.has(kind)) + if (missing.length === 0) { + referencedKindsByWorkflow.set(workflowId, referenced) + return { canonical, resources, loadedKinds } + } + loadedKinds = new Set([...loadedKinds, ...missing]) + resources = await loadResourceKeyResolver(workspaceId, loadedKinds) + } +} + +/** + * Whether canonicalizing with `lock` gives exactly `lockless` (the same state canonicalized with + * no lock). The lock's branch keys are read by block id then row id, the later entry for an id + * winning, as canonicalize reads them. A row the lock keys must already have that key; a row it + * does not key keeps its lockless key, because the keys the lock pre-assigns are other rows' own + * lockless keys and so never displace one. + */ +export function lockKeepsCanonical( + lock: Pick | null | undefined, + lockless: LockIdentity +): boolean { + const lockKeysById = new Map>() + for (const entry of Object.values(lock?.blocks ?? {})) { + if (!entry.branches) continue + const byRow = new Map() + for (const [key, rowId] of Object.entries(entry.branches)) byRow.set(rowId, key) + lockKeysById.set(entry.id, byRow) + } + if (lockKeysById.size === 0) return true + for (const block of Object.values(lockless.blocks)) { + const byRow = block.branches ? lockKeysById.get(block.id) : undefined + if (!byRow || !block.branches) continue + for (const [key, rowId] of Object.entries(block.branches)) { + const locked = byRow.get(rowId) + if (locked !== undefined && locked !== key) return false + } + } + return true +} + +/** + * `state` canonicalized with `lock`, reusing `lockless` (the same state, catalog, meta and + * resources with no lock) when the lock changes nothing. + */ +export function canonicalizeUnderLock( + state: WorkflowState, + options: { catalog: BlockCatalog; meta: CanonicalWorkflowMeta; resources: ResourceKeyResolver }, + lockless: CanonicalizeResult, + lock: WorkflowLockV1 +): CanonicalizeResult { + if (lockKeepsCanonical(lock, lockless.identity)) return lockless + return canonicalize(state, { ...options, lock }) +} diff --git a/apps/sim/lib/workflows/persistence/code-meta.integration.ts b/apps/sim/lib/workflows/persistence/code-meta.integration.ts index 91b27fd42be..4fd2d37c4ad 100644 --- a/apps/sim/lib/workflows/persistence/code-meta.integration.ts +++ b/apps/sim/lib/workflows/persistence/code-meta.integration.ts @@ -1,13 +1,15 @@ /** - * `workflow.code_meta` against real Postgres: it survives a canvas rename (keyed by block id), is - * pruned when blocks or variables are deleted, follows duplicate and fork onto the copied ids, and - * never counts as a deploy change. + * Workflow code metadata (the `workflow_code_meta` side table) against real Postgres: it survives + * a canvas rename (keyed by block id), is pruned when blocks or variables are deleted (and its row + * removed once nothing is left), follows duplicate and fork onto the copied ids, goes with its + * workflow on delete, stays off the workflow row, and never counts as a deploy change. */ import { db } from '@sim/db' import { user, workflow, workflowBlocks, + workflowCodeMeta, workflowDeploymentVersion, workspace, } from '@sim/db/schema' @@ -108,6 +110,14 @@ async function storedCodeMeta(id: string): Promise { return meta } +async function codeMetaRowCount(id: string): Promise { + const rows = await db + .select({ workflowId: workflowCodeMeta.workflowId }) + .from(workflowCodeMeta) + .where(eq(workflowCodeMeta.workflowId, id)) + return rows.length +} + async function deployCurrentDraft(): Promise { const state = await loadWorkflowDeploymentSnapshot(workflowId) if (!state) throw new Error('missing draft') @@ -166,16 +176,47 @@ afterAll(async () => { await db.$client.end() }) -describe('workflow.code_meta against real Postgres', () => { - it('stores code_meta without making the draft differ from its deployment', async () => { +describe('workflow_code_meta against real Postgres', () => { + it('stores code_meta in the side table without making the draft differ from its deployment', async () => { expect(await checkNeedsRedeployment(workflowId)).toBe(false) + expect(await codeMetaRowCount(workflowId)).toBe(0) await writeWorkflowCodeMeta(db, workflowId, storedMeta) expect(await storedCodeMeta(workflowId)).toEqual(storedMeta) + expect(await codeMetaRowCount(workflowId)).toBe(1) expect(await checkNeedsRedeployment(workflowId)).toBe(false) const snapshot = await loadWorkflowDeploymentSnapshot(workflowId) expect(JSON.stringify(snapshot)).not.toContain('fetchUser') + const [row] = await db.select().from(workflow).where(eq(workflow.id, workflowId)) + expect(JSON.stringify(row)).not.toContain('fetchUser') + }) + + it('overwrites on a second write, and deletes the row when the value becomes empty', async () => { + const scratchId = generateId() + const now = new Date() + await db.insert(workflow).values({ + id: scratchId, + userId: ownerId, + workspaceId, + name: 'Code meta scratch', + lastSynced: now, + createdAt: now, + updatedAt: now, + }) + await writeWorkflowCodeMeta(db, scratchId, storedMeta) + const rewritten = { ...storedMeta, bindings: { [fetchId]: 'loadUser' } } + await writeWorkflowCodeMeta(db, scratchId, rewritten) + expect(await storedCodeMeta(scratchId)).toEqual(rewritten) + expect(await codeMetaRowCount(scratchId)).toBe(1) + + await writeWorkflowCodeMeta(db, scratchId, { v: 1, bindings: {}, order: {}, comments: {} }) + expect(await codeMetaRowCount(scratchId)).toBe(0) + expect(await readWorkflowCodeMeta(db, scratchId)).toBeNull() + + await writeWorkflowCodeMeta(db, scratchId, storedMeta) + await db.delete(workflow).where(eq(workflow.id, scratchId)) + expect(await codeMetaRowCount(scratchId)).toBe(0) }) it('keeps every entry across a canvas rename, so the lock keeps the binding', async () => { @@ -221,6 +262,32 @@ describe('workflow.code_meta against real Postgres', () => { ) }) + it('skips a prune whose read is stale, and removes the row when a prune empties it', async () => { + const scratchId = generateId() + const now = new Date() + await db.insert(workflow).values({ + id: scratchId, + userId: ownerId, + workspaceId, + name: 'Code meta prune scratch', + lastSynced: now, + createdAt: now, + updatedAt: now, + }) + const onlyFetch: WorkflowCodeMetaV1 = { + v: 1, + bindings: { [fetchId]: 'fetchUser' }, + order: { [fetchId]: 0 }, + comments: {}, + } + await writeWorkflowCodeMeta(db, scratchId, onlyFetch) + await db.transaction((tx) => + pruneWorkflowCodeMeta(tx, scratchId, { blocks: (id) => id !== fetchId }) + ) + expect(await codeMetaRowCount(scratchId)).toBe(0) + await db.delete(workflow).where(eq(workflow.id, scratchId)) + }) + it('re-keys code_meta onto the copy when the workflow is duplicated', async () => { const copy = await db.transaction((tx) => duplicateWorkflow({ @@ -257,10 +324,6 @@ describe('workflow.code_meta against real Postgres', () => { it('re-keys code_meta onto the derived block ids when the workflow is forked', async () => { const sourceState = await loadWorkflowDeploymentSnapshot(workflowId) if (!sourceState) throw new Error('missing draft') - const [sourceRow] = await db - .select({ codeMeta: workflow.codeMeta }) - .from(workflow) - .where(eq(workflow.id, workflowId)) const targetWorkflowId = generateId() await db.transaction(async (tx) => { @@ -277,8 +340,8 @@ describe('workflow.code_meta against real Postgres', () => { description: null, folderId: null, sortOrder: 0, - codeMeta: sourceRow?.codeMeta, }, + codeMetaSourceWorkflowId: workflowId, workflowIdMap: new Map([[workflowId, targetWorkflowId]]), folderIdMap: new Map(), nameRegistry: await loadWorkflowNameRegistry(tx, forkWorkspaceId), diff --git a/apps/sim/lib/workflows/persistence/duplicate.ts b/apps/sim/lib/workflows/persistence/duplicate.ts index 91f5b6dc05f..1538cc898d7 100644 --- a/apps/sim/lib/workflows/persistence/duplicate.ts +++ b/apps/sim/lib/workflows/persistence/duplicate.ts @@ -13,8 +13,8 @@ import { } from '@sim/platform-authz/workflow' import { generateId } from '@sim/utils/id' import { isRecordLike } from '@sim/utils/object' -import { isEmptyCodeMeta, remapCodeMeta } from '@sim/workflow-code/code-meta' -import { readCodeMetaValue } from '@sim/workflow-persistence/code-meta' +import { remapCodeMeta } from '@sim/workflow-code/code-meta' +import { readWorkflowCodeMeta, writeWorkflowCodeMeta } from '@sim/workflow-persistence/code-meta' import { normalizeWorkflowEdgeSourceHandle, normalizeWorkflowEdgeTargetHandle, @@ -459,18 +459,16 @@ export async function duplicateWorkflow( } // The copy keeps the source's bindings, order and comments under its new block ids. - const sourceCodeMeta = readCodeMetaValue(sourceWorkflowId, source.codeMeta) - const codeMeta = sourceCodeMeta - ? remapCodeMeta(sourceCodeMeta, blockIdMapping, varIdMapping) - : null - - await tx - .update(workflow) - .set({ - updatedAt: now, - codeMeta: codeMeta && !isEmptyCodeMeta(codeMeta) ? codeMeta : null, - }) - .where(eq(workflow.id, newWorkflowId)) + const sourceCodeMeta = await readWorkflowCodeMeta(tx, sourceWorkflowId) + if (sourceCodeMeta) { + await writeWorkflowCodeMeta( + tx, + newWorkflowId, + remapCodeMeta(sourceCodeMeta, blockIdMapping, varIdMapping) + ) + } + + await tx.update(workflow).set({ updatedAt: now }).where(eq(workflow.id, newWorkflowId)) const finalWorkspaceId = workspaceId || source.workspaceId if (!finalWorkspaceId) { diff --git a/packages/db/migrations/0460_workflow_code_meta.sql b/packages/db/migrations/0460_workflow_code_meta.sql index 7855b7e398e..f0449a0247e 100644 --- a/packages/db/migrations/0460_workflow_code_meta.sql +++ b/packages/db/migrations/0460_workflow_code_meta.sql @@ -1 +1,7 @@ -ALTER TABLE "workflow" ADD COLUMN "code_meta" jsonb; \ No newline at end of file +CREATE TABLE "workflow_code_meta" ( + "workflow_id" text PRIMARY KEY NOT NULL, + "meta" jsonb NOT NULL, + "updated_at" timestamp DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "workflow_code_meta" ADD CONSTRAINT "workflow_code_meta_workflow_id_workflow_id_fk" FOREIGN KEY ("workflow_id") REFERENCES "public"."workflow"("id") ON DELETE cascade ON UPDATE no action; \ No newline at end of file diff --git a/packages/db/migrations/meta/0460_snapshot.json b/packages/db/migrations/meta/0460_snapshot.json index c7f2b4d43cf..f8047e1902e 100644 --- a/packages/db/migrations/meta/0460_snapshot.json +++ b/packages/db/migrations/meta/0460_snapshot.json @@ -1,5 +1,5 @@ { - "id": "be3b8806-8ecc-46ba-829d-ec1f22c33724", + "id": "67861d7e-3340-4164-a979-5b43c92ddedd", "prevId": "7f748ca5-f85f-40f6-83ac-5bb4bb778fa8", "version": "7", "dialect": "postgresql", @@ -26026,12 +26026,6 @@ "type": "timestamp", "primaryKey": false, "notNull": false - }, - "code_meta": { - "name": "code_meta", - "type": "jsonb", - "primaryKey": false, - "notNull": false } }, "indexes": { @@ -26615,6 +26609,48 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "public.workflow_code_meta": { + "name": "workflow_code_meta", + "schema": "", + "columns": { + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "meta": { + "name": "meta", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "workflow_code_meta_workflow_id_workflow_id_fk": { + "name": "workflow_code_meta_workflow_id_workflow_id_fk", + "tableFrom": "workflow_code_meta", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "public.workflow_deployment_operation": { "name": "workflow_deployment_operation", "schema": "", diff --git a/packages/db/migrations/meta/_journal.json b/packages/db/migrations/meta/_journal.json index 00fa9a7a352..cc9c5b338b7 100644 --- a/packages/db/migrations/meta/_journal.json +++ b/packages/db/migrations/meta/_journal.json @@ -3218,7 +3218,7 @@ { "idx": 460, "version": "7", - "when": 1794802862619, + "when": 1794808198951, "tag": "0460_workflow_code_meta", "breakpoints": true } diff --git a/packages/db/schema.ts b/packages/db/schema.ts index 966ec4d2e9c..6f85312c866 100644 --- a/packages/db/schema.ts +++ b/packages/db/schema.ts @@ -454,13 +454,6 @@ export const workflow = pgTable( lastRunAt: timestamp('last_run_at'), variables: json('variables').default('{}'), archivedAt: timestamp('archived_at'), - /** - * Source-form facts the graph does not hold (each block's TS binding, declaration order, and - * comments), keyed by block id so canvas edits never orphan them. Shape and validator: - * `WorkflowCodeMetaV1` / `parseCodeMeta` in `@sim/workflow-code/code-meta`. Not part of the - * workflow state, so it never counts as a deploy change. `null` until a source is applied. - */ - codeMeta: jsonb('code_meta'), }, (table) => ({ workspaceIdIdx: index('workflow_workspace_id_idx').on(table.workspaceId), @@ -479,6 +472,22 @@ export const workflow = pgTable( }) ) +/** + * Source-form facts a workflow's graph does not hold (each block's TS binding, declaration order, + * and comments), keyed by block id so canvas edits never orphan them. Shape and validator: + * `WorkflowCodeMetaV1` / `parseCodeMeta` in `@sim/workflow-code/code-meta`. A side table rather + * than a `workflow` column, so the hot workflow row (and every `select()` of it) never carries it; + * only the source get/apply, copy and prune paths read it. Not part of the workflow state, so it + * never counts as a deploy change. No row until a source is applied; an empty value deletes it. + */ +export const workflowCodeMeta = pgTable('workflow_code_meta', { + workflowId: text('workflow_id') + .primaryKey() + .references(() => workflow.id, { onDelete: 'cascade' }), + meta: jsonb('meta').notNull(), + updatedAt: timestamp('updated_at').notNull().defaultNow(), +}) + export const workflowBlocks = pgTable( 'workflow_blocks', { diff --git a/packages/testing/src/mocks/schema-tables.generated.ts b/packages/testing/src/mocks/schema-tables.generated.ts index 05dfaff17c2..91f18088969 100644 --- a/packages/testing/src/mocks/schema-tables.generated.ts +++ b/packages/testing/src/mocks/schema-tables.generated.ts @@ -90,8 +90,8 @@ export const GENERATED_SCHEMA_TABLES = { 'lastRunAt', 'variables', 'archivedAt', - 'codeMeta', ], + workflowCodeMeta: ['workflowId', 'meta', 'updatedAt'], workflowBlocks: [ 'id', 'workflowId', diff --git a/packages/workflow-code/DESIGN.md b/packages/workflow-code/DESIGN.md index 0afd85b56f6..5eaae99046a 100644 --- a/packages/workflow-code/DESIGN.md +++ b/packages/workflow-code/DESIGN.md @@ -264,3 +264,7 @@ instead of failing at run time. - `CompileInput.knownKeys` (the lock's block keys) gates the new `meta.key` override, which is how source carries a legacy `name~n` collision key or a reserved name (`Loop`, `Parallel`) without being able to introduce one. A violation is `E_KEY_OVERRIDE`. + - Wave 4D: it is stored in the `workflow_code_meta(workflow_id pk → workflow on delete + cascade, meta jsonb, updated_at)` side table, not on the `workflow` row, so no `select()` of + the hot row loads it. Only source get/apply, duplicate, fork/promote copy and the prune on + block or variable delete read it. An empty value deletes the row. diff --git a/packages/workflow-persistence/src/code-meta.ts b/packages/workflow-persistence/src/code-meta.ts index 7c6edd271c7..adf725505ee 100644 --- a/packages/workflow-persistence/src/code-meta.ts +++ b/packages/workflow-persistence/src/code-meta.ts @@ -1,13 +1,15 @@ /** - * Reads and writes `workflow.code_meta` (`WorkflowCodeMetaV1`): the bindings, declaration order - * and comments a workflow's source form keeps beside its graph, keyed by block id. It lives on the - * workflow row, not in the normalized state, so it never counts as a deploy change. + * Reads and writes a workflow's code metadata (`WorkflowCodeMetaV1`): the bindings, declaration + * order and comments its source form keeps beside the graph, keyed by block id. It lives in the + * `workflow_code_meta` side table, not on the workflow row or in the normalized state, so it never + * counts as a deploy change and no ordinary read of the workflow row loads it. A workflow has no + * row until a source is applied, and an empty value deletes the row. * * Shared by apps/sim and apps/realtime, so every path that deletes blocks or variables can prune * their entries in the same transaction. Readers still tolerate stale ids. */ -import { workflow } from '@sim/db' +import { workflowCodeMeta } from '@sim/db' import { createLogger } from '@sim/logger' import { codeMetaEquals, @@ -25,7 +27,7 @@ const logger = createLogger('WorkflowCodeMeta') * Validates a stored value. An invalid value reads as `null` (and is logged), so one corrupt * entry degrades to derived bindings and order instead of failing a read. */ -export function readCodeMetaValue(workflowId: string, stored: unknown): WorkflowCodeMetaV1 | null { +function readCodeMetaValue(workflowId: string, stored: unknown): WorkflowCodeMetaV1 | null { if (stored === null || stored === undefined) return null const parsed = parseCodeMeta(stored) if (parsed.meta) return parsed.meta @@ -36,61 +38,73 @@ export function readCodeMetaValue(workflowId: string, stored: unknown): Workflow return null } -/** The workflow's `code_meta`, or `null` when it has none or the stored value is invalid. */ +/** The stored value as written, or `undefined` when the workflow has no row. */ +async function readStoredCodeMeta(executor: DbOrTx, workflowId: string): Promise { + const [row] = await executor + .select({ meta: workflowCodeMeta.meta }) + .from(workflowCodeMeta) + .where(eq(workflowCodeMeta.workflowId, workflowId)) + .limit(1) + return row?.meta +} + +/** The workflow's code metadata, or `null` when it has none or the stored value is invalid. */ export async function readWorkflowCodeMeta( executor: DbOrTx, workflowId: string ): Promise { - const [row] = await executor - .select({ codeMeta: workflow.codeMeta }) - .from(workflow) - .where(eq(workflow.id, workflowId)) - .limit(1) - return row ? readCodeMetaValue(workflowId, row.codeMeta) : null + return readCodeMetaValue(workflowId, await readStoredCodeMeta(executor, workflowId)) } -/** Stores `meta`; an empty value is stored as `null`, so untouched workflows stay `null`. */ +/** + * Stores `meta` for an existing workflow (the row references it). An empty value deletes the row, + * so untouched workflows keep none. + */ export async function writeWorkflowCodeMeta( executor: DbOrTx, workflowId: string, meta: WorkflowCodeMetaV1 | null ): Promise { + if (!meta || isEmptyCodeMeta(meta)) { + await executor.delete(workflowCodeMeta).where(eq(workflowCodeMeta.workflowId, workflowId)) + return + } + const updatedAt = new Date() await executor - .update(workflow) - .set({ codeMeta: meta && !isEmptyCodeMeta(meta) ? meta : null }) - .where(eq(workflow.id, workflowId)) + .insert(workflowCodeMeta) + .values({ workflowId, meta, updatedAt }) + .onConflictDoUpdate({ target: workflowCodeMeta.workflowId, set: { meta, updatedAt } }) } /** * Drops the entries of blocks and variables that no longer exist. Call it inside the transaction - * that deletes them. A workflow without `code_meta` costs one primary-key read and no write. + * that deletes them. A workflow without code metadata costs one primary-key read and no write. * - * The write is a compare-and-set on the value just read: when another writer replaced - * `code_meta` in between, its value wins and this prune is skipped (stale ids are harmless, - * every reader filters by the stored graph). + * The write is a compare-and-set on the value just read: when another writer replaced the value + * in between, its value wins and this prune is skipped (stale ids are harmless, every reader + * filters by the stored graph). */ export async function pruneWorkflowCodeMeta( executor: DbOrTx, workflowId: string, live: { blocks?: (id: string) => boolean; variables?: (id: string) => boolean } ): Promise { - const [row] = await executor - .select({ codeMeta: workflow.codeMeta }) - .from(workflow) - .where(eq(workflow.id, workflowId)) - .limit(1) - if (!row || row.codeMeta === null) return - const meta = readCodeMetaValue(workflowId, row.codeMeta) + const stored = await readStoredCodeMeta(executor, workflowId) + if (stored === undefined) return + const meta = readCodeMetaValue(workflowId, stored) if (!meta) return const pruned = pruneCodeMeta(meta, live) if (codeMetaEquals(pruned, meta)) return + const unchanged = and( + eq(workflowCodeMeta.workflowId, workflowId), + sql`${workflowCodeMeta.meta} = ${JSON.stringify(stored)}::jsonb` + ) + if (isEmptyCodeMeta(pruned)) { + await executor.delete(workflowCodeMeta).where(unchanged) + return + } await executor - .update(workflow) - .set({ codeMeta: isEmptyCodeMeta(pruned) ? null : pruned }) - .where( - and( - eq(workflow.id, workflowId), - sql`${workflow.codeMeta} = ${JSON.stringify(row.codeMeta)}::jsonb` - ) - ) + .update(workflowCodeMeta) + .set({ meta: pruned, updatedAt: new Date() }) + .where(unchanged) } From 9957486d3a2bc437f74301b0435706f86f1712fa Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:11:19 -0800 Subject: [PATCH 115/428] fix(workflow-code): inactive means never sent or read by deploy, and the loop count that runs - canonicalize marks a trigger field active when deploy reads it into the webhook provider config (buildProviderConfig), on top of the serializer rule - add executableInactiveParams/executableView/executableEquals: the CWM minus preserved UI state (inactive values, pair member and mode, off-type subflow fields, unknown data residue) - registry-wide property test: no param marked inactive reaches the serializer or deploy, by sentinel substitution - canonicalize takes the loop count that runs (block.data.count || 5), never a count only the loops map holds; corpus subjects take the stored shape (no orphan loops-map entries), and the O2 view compares containers through the loops/parallels maps it runs; KNOWN_O2_FAILURES is empty --- .../code/corpus/fixtures.test-helpers.ts | 103 ++++++++ .../code/corpus/inactive.corpus.test.ts | 153 ++++++++++++ .../code/corpus/roundtrip.corpus.test.ts | 73 +----- .../src/canonicalize/activity.ts | 110 ++++++++- .../src/canonicalize/index.test.ts | 15 ++ .../workflow-code/src/canonicalize/index.ts | 3 +- .../src/canonicalize/subflows.ts | 28 ++- .../src/equivalence/executable.ts | 223 ++++++++++++++++++ .../workflow-code/src/equivalence/index.ts | 14 ++ packages/workflow-code/src/index.ts | 14 +- packages/workflow-code/src/proof/oracles.ts | 12 +- 11 files changed, 669 insertions(+), 79 deletions(-) create mode 100644 apps/sim/lib/workflows/code/corpus/inactive.corpus.test.ts create mode 100644 packages/workflow-code/src/equivalence/executable.ts diff --git a/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts b/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts index 368a26efbf5..bcbb9cde5c3 100644 --- a/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts +++ b/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts @@ -20,7 +20,10 @@ import { import { isRecordLike, omit } from '@sim/utils/object' import { compareStrings } from '@sim/utils/string' import { type BlockCatalog, canonicalize, catalogBlock } from '@sim/workflow-code' +import { workflowStateArbitrary } from '@sim/workflow-code/proof' import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' +import fc from 'fast-check' +import { type CorpusCase, generateRegistryCorpus } from '@/lib/workflows/code/corpus' import type { WorkflowState } from '@/stores/workflows/workflow/types' export interface FixtureState { @@ -90,6 +93,106 @@ export function buildTestingFactoryStates(): FixtureState[] { return fixtures.map(([name, state]) => ({ id: `testing:${name}`, state: stored(state) })) } +/** One workflow a corpus property runs against. */ +export interface ProofSubject { + id: string + blockTypes: string[] + state: WorkflowState + /** Set on corpus cases whose types the registry does not know; the serializer rejects them. */ + unknownTypes?: true +} + +/** + * A state as the normalized tables hold it. Every write path recomputes the loops and parallels + * maps from the container blocks (`prepareWorkflowStateForPersistence`, and `saveWorkflowToNormalizedTables` + * writes `workflow_subflows` rows from `generateLoopBlocks(blocks)`), so a map entry whose id has + * no container block (the pre-container shape the `@sim/testing` loop factory still builds) is + * never stored and never loaded. Entries of existing containers are kept as written. + */ +function persistedShape(state: WorkflowState): WorkflowState { + const containers = (type: string) => + new Set( + Object.values(state.blocks) + .filter((block) => block.type === type) + .map((block) => block.id) + ) + const loopIds = containers('loop') + const parallelIds = containers('parallel') + return { + ...state, + loops: Object.fromEntries(Object.entries(state.loops ?? {}).filter(([id]) => loopIds.has(id))), + parallels: Object.fromEntries( + Object.entries(state.parallels ?? {}).filter(([id]) => parallelIds.has(id)) + ), + } +} + +function fixtureSubject(fixture: FixtureState): ProofSubject { + const blockTypes = [...new Set(Object.values(fixture.state.blocks).map((b) => b.type))].sort( + compareStrings + ) + return { id: fixture.id, blockTypes, state: persistedShape(fixture.state) } +} + +/** Every structural case, plus up to `perType` per-block cases for each type (all when `full`). */ +function budgetedCorpus(corpus: CorpusCase[], perTypeLimit: number, full: boolean): CorpusCase[] { + if (full) return corpus + const perType = new Map() + return corpus.filter((corpusCase) => { + const [, type = ''] = corpusCase.id.split(':') + const isPerBlock = ['operation', 'trigger', 'standalone-advanced', 'error-edge'].includes( + corpusCase.kind + ) + if (!isPerBlock) return true + const count = perType.get(type) ?? 0 + if (count >= perTypeLimit) return false + perType.set(type, count + 1) + return true + }) +} + +export interface SubjectOptions { + /** Per-block corpus cases kept for each block type unless `full`. */ + casesPerBlockType: number + /** `ROUNDTRIP_CORPUS_FULL=1`: the whole generated corpus. */ + full: boolean + fuzzRuns: number + /** `ROUNDTRIP_CORPUS_EXTRA_DIR`: redacted production states written outside the repo. */ + extraDir?: string +} + +/** + * Every workflow the round-trip properties run against: the generated registry corpus, the + * landing templates, the `@sim/testing` states, redacted production states from `extraDir`, and + * fast-check workflows, each in the shape the normalized tables store. + */ +export function roundTripSubjects(options: SubjectOptions): ProofSubject[] { + const corpus: ProofSubject[] = budgetedCorpus( + generateRegistryCorpus(), + options.casesPerBlockType, + options.full + ).map((corpusCase) => ({ + id: corpusCase.id, + blockTypes: corpusCase.blockTypes, + state: persistedShape(corpusCase.state), + ...(corpusCase.unknownTypes && { unknownTypes: true as const }), + })) + return [ + ...corpus, + ...loadLandingTemplateStates().map(fixtureSubject), + ...buildTestingFactoryStates().map(fixtureSubject), + ...(options.extraDir + ? loadWorkflowStatesFromDirectory(options.extraDir, 'redacted').map(fixtureSubject) + : []), + ...fc + .sample(workflowStateArbitrary({ maxBlocks: 8, maxDepth: 2 }), { + numRuns: options.fuzzRuns, + seed: 20261115, + }) + .map((state, i) => fixtureSubject({ id: `fuzz:${i}`, state })), + ] +} + /** Item keys canonicalize drops by design, by structured kind (s1 §4 "Items", quirk 24). */ const DROPPED_ITEM_KEYS: Record = { inputFormat: ['id', 'collapsed'], diff --git a/apps/sim/lib/workflows/code/corpus/inactive.corpus.test.ts b/apps/sim/lib/workflows/code/corpus/inactive.corpus.test.ts new file mode 100644 index 00000000000..6afd1a673b3 --- /dev/null +++ b/apps/sim/lib/workflows/code/corpus/inactive.corpus.test.ts @@ -0,0 +1,153 @@ +/** + * `inactive` means exactly "the serializer never sends this value" (wave 4 governing principle, + * s1 D3). Source omits inactive values and materialize restores them from the stored workflow, so + * a value marked inactive that the serializer does send would silently drop out of the authoring + * surface while still changing what runs. + * + * For every corpus workflow and every param canonicalize marks inactive, this replaces the stored + * value with a unique sentinel and asks the real serializer (`extractBlockParams`, which applies + * the load-time migrations, `shouldSerializeSubBlock`, standalone-advanced and custom-block rules + * and the canonical-pair collapse) for the block's params. The sentinel must not appear. A + * non-empty value is replaced by a non-empty string and an empty one by an empty one (whitespace, + * or a fresh empty array matched by identity), so pair-mode inference and standalone-advanced + * emptiness read the same as before. + */ +import { compareStrings } from '@sim/utils/string' +import { canonicalize, executableInactiveParams } from '@sim/workflow-code' +import { describe, expect, it, vi } from 'vitest' + +vi.unmock('@/blocks/registry') +vi.unmock('@/tools/registry') + +import { buildProviderConfig } from '@/lib/webhooks/deploy' +import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' +import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' +import { roundTripSubjects } from '@/lib/workflows/code/corpus/fixtures.test-helpers' +import { getBlockRegistry } from '@/blocks/registry' +import { SDK_NAMES } from '@/blocks/sdk-names.generated' +import { extractBlockParams } from '@/serializer' +import type { BlockState } from '@/stores/workflows/workflow/types' +import { getTrigger, isTriggerValid } from '@/triggers' +import { resolveBlockTriggerId } from '@/triggers/webhook-url' + +const CASES_PER_BLOCK_TYPE = 3 +const FUZZ_RUNS = 50 +const BUDGET_MS = 60_000 + +const { catalog } = buildBlockCatalog({ + blocks: Object.values(getBlockRegistry()), + trigger: registryTrigger, + sdkNames: SDK_NAMES, +}) + +const subjects = roundTripSubjects({ + casesPerBlockType: CASES_PER_BLOCK_TYPE, + full: process.env.ROUNDTRIP_CORPUS_FULL === '1', + fuzzRuns: FUZZ_RUNS, + extraDir: process.env.ROUNDTRIP_CORPUS_EXTRA_DIR, +}) + +type Sentinel = { kind: 'text'; text: string } | { kind: 'identity'; value: unknown[] } + +function isEmptyValue(value: unknown): boolean { + if (typeof value === 'string') return value.trim().length === 0 + return Array.isArray(value) && value.length === 0 +} + +function sentinelFor(value: unknown, serial: number): Sentinel { + if (Array.isArray(value) && value.length === 0) return { kind: 'identity', value: [] } + if (isEmptyValue(value)) return { kind: 'text', text: ` ${' '.repeat(serial)} ` } + return { kind: 'text', text: `\u0000inactive-sentinel-${serial}\u0000` } +} + +function sentinelValue(sentinel: Sentinel): unknown { + return sentinel.kind === 'text' ? sentinel.text : sentinel.value +} + +/** Whether the sentinel reached the serialized params, as text or by identity. */ +function contains(value: unknown, sentinel: Sentinel): boolean { + if (sentinel.kind === 'identity' && value === sentinel.value) return true + if (typeof value === 'string') return sentinel.kind === 'text' && value.includes(sentinel.text) + if (Array.isArray(value)) return value.some((item) => contains(item, sentinel)) + if (value !== null && typeof value === 'object') { + return Object.values(value).some((item) => contains(item, sentinel)) + } + return false +} + +/** + * What deploy reads from a block acting as a trigger: the trigger it deploys as and the webhook + * provider config (`buildProviderConfig`, which reads the trigger's fields without the + * serializer's visibility rules). `null` when the block deploys no trigger. + */ +function deployRead(block: BlockState): { triggerId: string; config: unknown } | null { + const triggerId = resolveBlockTriggerId(block) + if (!triggerId || !isTriggerValid(triggerId)) return null + return { + triggerId, + config: buildProviderConfig(block, triggerId, getTrigger(triggerId)).providerConfig, + } +} + +function withValue(block: BlockState, id: string, value: unknown): BlockState { + const subBlock = block.subBlocks[id] + return { + ...block, + subBlocks: { ...block.subBlocks, [id]: { ...subBlock, value: value as never } }, + } +} + +describe(`inactive params are never serialized (${subjects.length} workflows)`, () => { + it( + 'no param canonicalize or the executable view treats as inactive reaches the serializer or deploy', + () => { + const leaks: string[] = [] + let checked = 0 + let serial = 0 + for (const subject of subjects) { + if (subject.unknownTypes) continue + const { workflow, identity } = canonicalize(subject.state, { + catalog, + meta: { name: subject.id, description: null }, + }) + for (const [key, block] of Object.entries(workflow.blocks)) { + const blockId = Object.hasOwn(identity.blocks, key) ? identity.blocks[key].id : undefined + const stored = blockId !== undefined ? subject.state.blocks[blockId] : undefined + if (!stored || block.subflow) continue + const ids = new Set([ + ...(Object.hasOwn(workflow.annotations.inactive, key) + ? workflow.annotations.inactive[key] + : []), + ...executableInactiveParams(block, catalog), + ]) + for (const param of [...ids].sort(compareStrings)) { + const original = stored.subBlocks[param]?.value + if (original === null || original === undefined) continue + serial += 1 + const sentinel = sentinelFor(original, serial) + const mutated = withValue(stored, param, sentinelValue(sentinel)) + let params: Record + try { + params = extractBlockParams(mutated) + } catch { + continue + } + checked += 1 + if (contains(params, sentinel)) leaks.push(`${subject.id} ${key}.${param} serializer`) + const before = deployRead(stored) + const after = deployRead(mutated) + if ( + before?.triggerId !== after?.triggerId || + (after && contains(after.config, sentinel)) + ) { + leaks.push(`${subject.id} ${key}.${param} deploy`) + } + } + } + } + expect(checked).toBeGreaterThan(0) + expect(leaks).toEqual([]) + }, + BUDGET_MS + ) +}) diff --git a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts index 3ad37040645..c766ebea4da 100644 --- a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts +++ b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts @@ -40,17 +40,12 @@ import { type OracleResult, type ProofProperty, reportPathVariable, - workflowStateArbitrary, } from '@sim/workflow-code/proof' -import fc from 'fast-check' import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' -import { type CorpusCase, generateRegistryCorpus } from '@/lib/workflows/code/corpus' import { - buildTestingFactoryStates, - type FixtureState, - loadLandingTemplateStates, - loadWorkflowStatesFromDirectory, + type ProofSubject, + roundTripSubjects, withoutLockHeldState, } from '@/lib/workflows/code/corpus/fixtures.test-helpers' import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' @@ -77,55 +72,15 @@ const { catalog } = buildBlockCatalog({ sdkNames: SDK_NAMES, }) -interface ProofSubject { - id: string - blockTypes: string[] - state: WorkflowState - /** Set on corpus cases whose types the registry does not know; the serializer rejects them. */ - unknownTypes?: true -} - /** Properties that serialize the original, which an unknown block type makes throw. */ const SERIALIZING_PROPERTIES: ReadonlySet = new Set(['P2', 'O2']) -function toSubject(fixture: FixtureState): ProofSubject { - const blockTypes = [...new Set(Object.values(fixture.state.blocks).map((b) => b.type))].sort() - return { id: fixture.id, blockTypes, state: fixture.state } -} - -/** Every structural case, plus up to `CASES_PER_BLOCK_TYPE` per-block cases for each type. */ -function budgetedCorpus(corpus: CorpusCase[]): CorpusCase[] { - if (process.env.ROUNDTRIP_CORPUS_FULL === '1') return corpus - const perType = new Map() - return corpus.filter((corpusCase) => { - const [, type = ''] = corpusCase.id.split(':') - const isPerBlock = ['operation', 'trigger', 'standalone-advanced', 'error-edge'].includes( - corpusCase.kind - ) - if (!isPerBlock) return true - const count = perType.get(type) ?? 0 - if (count >= CASES_PER_BLOCK_TYPE) return false - perType.set(type, count + 1) - return true - }) -} - -const subjects: ProofSubject[] = [ - ...budgetedCorpus(generateRegistryCorpus()), - ...loadLandingTemplateStates().map(toSubject), - ...buildTestingFactoryStates().map(toSubject), - ...(process.env.ROUNDTRIP_CORPUS_EXTRA_DIR - ? loadWorkflowStatesFromDirectory(process.env.ROUNDTRIP_CORPUS_EXTRA_DIR, 'redacted').map( - toSubject - ) - : []), - ...fc - .sample(workflowStateArbitrary({ maxBlocks: 8, maxDepth: 2 }), { - numRuns: FUZZ_RUNS, - seed: 20261115, - }) - .map((state, i) => toSubject({ id: `fuzz:${i}`, state })), -] +const subjects: ProofSubject[] = roundTripSubjects({ + casesPerBlockType: CASES_PER_BLOCK_TYPE, + full: process.env.ROUNDTRIP_CORPUS_FULL === '1', + fuzzRuns: FUZZ_RUNS, + extraDir: process.env.ROUNDTRIP_CORPUS_EXTRA_DIR, +}) const report = createProofReport(SUITE) @@ -311,15 +266,11 @@ const SOURCE_FREE_PROPERTIES: ReadonlySet = new Set(['O1', 'O2', /** * Stored shapes a lockless write with no prev cannot reproduce for O2, because the CWM holds no * node for them. O2 must fail on exactly these, besides `KNOWN_FAILURES` for source properties. + * Empty since canonicalize reads the loop count that runs (`block.data.count || 5`, never a count + * only the loops map holds) and the subjects take the stored shape, where every loops-map entry + * has its container block. */ -const KNOWN_O2_FAILURES: Record = { - 'testing:loop': - 'a loops-map entry with no loop block (the pre-container shape); the CWM has no block to ' + - 'carry it, so a write from scratch has no loop', - 'landing-template:meeting-followup-agent-a2357a2f-67f7-40c1-8e64-301bcd604239': - 'a loop whose block.data omits count while the loops map holds it; canonicalize reads the ' + - 'map, and a write from scratch puts count in block.data too (s1 materialize step 6)', -} +const KNOWN_O2_FAILURES: Record = {} function expectedFailures(property: ProofProperty): string[] { if (property === 'O2') return Object.keys(KNOWN_O2_FAILURES).sort(compareStrings) diff --git a/packages/workflow-code/src/canonicalize/activity.ts b/packages/workflow-code/src/canonicalize/activity.ts index 2c67f45c7da..71b22a237e3 100644 --- a/packages/workflow-code/src/canonicalize/activity.ts +++ b/packages/workflow-code/src/canonicalize/activity.ts @@ -6,13 +6,28 @@ import { isNonEmptyValue, resolveCanonicalMode, } from '../catalog/canonical-index' -import type { CatalogBlock, CatalogSubBlock } from '../catalog/types' -import type { SubBlockId } from '../model' +import type { BlockCatalog, CatalogBlock, CatalogSubBlock } from '../catalog/types' +import { catalogTrigger } from '../catalog/view' +import type { CanonicalBlock, SubBlockId } from '../model' +import { setOwn } from '../records' +import { buildCanonicalIndexForSurface } from './modes' /** Agent fields the serializer still forwards with no config, for its legacy migration. */ const LEGACY_AGENT_FIELDS = new Set(['systemPrompt', 'userPrompt', 'memories']) /** A custom block's computed wiring; the serializer recomputes it and never forwards it. */ const CUSTOM_BLOCK_WIRING = new Set(['workflowId', 'inputMapping']) +/** + * Trigger fields deploy never copies into the webhook provider config (`SYSTEM_SUBBLOCK_IDS`, + * triggers/constants.ts). `triggerCredentials` is one of them but is read on its own as the + * credential reference, so it is not listed. + */ +const DEPLOY_SKIPPED_IDS = new Set([ + 'triggerInstructions', + 'webhookUrlDisplay', + 'samplePayload', + 'setupScript', + 'scheduleInfo', +]) export interface ActivityInputs { block: CatalogBlock @@ -23,6 +38,63 @@ export interface ActivityInputs { values: Record overrides: CanonicalModeOverrides | undefined index: CanonicalIndex + /** + * Ids deploy reads into the webhook provider config when the block acts as a trigger + * ({@link deployReadIds}). Active whatever their visibility: deploy reads them without the + * serializer's rules. + */ + deployRead: ReadonlySet +} + +function triggerExists(catalog: BlockCatalog, id: unknown): id is string { + return typeof id === 'string' && catalogTrigger(catalog, id) !== undefined +} + +/** + * `resolveBlockTriggerId` (triggers/webhook-url.ts): a trigger block is its own trigger; a block in + * trigger mode deploys as `selectedTriggerId`, else the stored `triggerId`, else the first trigger + * its config makes available. + */ +function deployedTriggerId( + catalog: BlockCatalog, + block: CatalogBlock, + blockType: string, + triggerMode: boolean, + values: Record +): string | undefined { + if (block.category === 'triggers' && triggerExists(catalog, blockType)) return blockType + if (!triggerMode) return undefined + if (triggerExists(catalog, values.selectedTriggerId)) return values.selectedTriggerId + if (triggerExists(catalog, values.triggerId)) return values.triggerId + const available = block.triggers?.enabled ? block.triggers.available[0] : undefined + return triggerExists(catalog, available) ? available : undefined +} + +/** + * The second half of "active": what deploy reads from a block acting as a trigger + * (`buildProviderConfig`, lib/webhooks/deploy.ts). It copies every trigger-mode field of the + * deployed trigger's definition, visible or not, except the display-only system fields, and reads + * `triggerCredentials` as the credential reference. Trigger-mode fields reach a run through the + * webhook provider config, never through the block serializer. + */ +export function deployReadIds( + catalog: BlockCatalog, + block: CatalogBlock, + blockType: string, + triggerMode: boolean, + values: Record +): ReadonlySet { + const triggerId = deployedTriggerId(catalog, block, blockType, triggerMode, values) + const trigger = triggerId === undefined ? undefined : catalogTrigger(catalog, triggerId) + if (!trigger) return new Set() + const ids = new Set() + for (const subBlock of trigger.subBlocks) { + if (subBlock.mode !== 'trigger' && subBlock.mode !== 'trigger-advanced') continue + if (subBlock.id === 'triggerCredentials' || !DEPLOY_SKIPPED_IDS.has(subBlock.id)) { + ids.add(subBlock.id) + } + } + return ids } /** @@ -64,13 +136,14 @@ function serializes(subBlock: CatalogSubBlock, inputs: ActivityInputs): boolean } /** - * Whether a stored param is inactive: stored, but not forwarded to execution under the block's - * current values (s1 D3, quirks 1 and 10; build-spec decision 2). Mirrors the include rule in + * Whether a stored param is inactive: stored, but neither forwarded by the serializer nor read by + * deploy (`deployReadIds`) under the block's current values (s1 D3, quirks 1 and 10; build-spec decision 2). Mirrors the include rule in * `extractBlockParams` (serializer/index.ts:558-605): a param with declarations is active when * any declaration serializes; one with none is inactive except for the serializer's legacy * agent fields and for a custom block, whose stored fields may be its inputs. */ export function isInactive(id: SubBlockId, inputs: ActivityInputs): boolean { + if (inputs.deployRead.has(id)) return false const isCustom = inputs.block.custom !== undefined if (isCustom && CUSTOM_BLOCK_WIRING.has(id)) return true const declarations = inputs.block.subBlocks.filter((subBlock) => subBlock.id === id) @@ -80,3 +153,32 @@ export function isInactive(id: SubBlockId, inputs: ActivityInputs): boolean { } return !declarations.some((subBlock) => serializes(subBlock, inputs)) } + +/** + * The activity inputs of a canonical block: its CWM values, with its effective modes as explicit + * overrides. The CWM records the mode the serializer resolves for every pair on the block's + * surface (legacy `advancedMode` included), so an override reproduces it. Shared by the printer, + * the executable view and materialize, so all three agree on what is inactive. + */ +export function canonicalActivityInputs( + block: CanonicalBlock, + catalogBlock: CatalogBlock, + catalog: BlockCatalog +): ActivityInputs { + const values: Record = {} + for (const [id, param] of Object.entries(block.params)) { + setOwn(values, id, param.kind === 'value' ? param.value : param.tools) + } + const overrides: CanonicalModeOverrides = { ...block.modes } + setOwn(values, '__canonicalModes', overrides) + return { + block: catalogBlock, + blockType: block.type, + triggerMode: block.triggerMode, + advancedMode: block.advancedMode, + values, + overrides, + index: buildCanonicalIndexForSurface(catalogBlock, block.triggerMode), + deployRead: deployReadIds(catalog, catalogBlock, block.type, block.triggerMode, values), + } +} diff --git a/packages/workflow-code/src/canonicalize/index.test.ts b/packages/workflow-code/src/canonicalize/index.test.ts index 4c8620b7656..cd8a2b1e7d8 100644 --- a/packages/workflow-code/src/canonicalize/index.test.ts +++ b/packages/workflow-code/src/canonicalize/index.test.ts @@ -1119,6 +1119,21 @@ describe('canonicalize: subflows (step 2, quirk 19)', () => { expect(codes(result)).toContain('W_CANON_SUBFLOW_REPAIRED') }) + it('takes the count that runs, not a count only the loops map holds', () => { + const result = run( + workflow([blockState('l1', 'loop', 'Each', {}, { data: { loopType: 'for' } })], { + loops: { + l1: { id: 'l1', nodes: [], iterations: 9, loopType: 'for', enabled: true }, + }, + }) + ) + expect(onlyBlock(result, 'each').subflow).toEqual({ + kind: 'loop', + loopType: 'for', + iterations: 5, + }) + }) + it('keeps an unknown parallel type under opaque data and reports it', () => { const result = run( workflow([ diff --git a/packages/workflow-code/src/canonicalize/index.ts b/packages/workflow-code/src/canonicalize/index.ts index 1404576179c..40a08487d04 100644 --- a/packages/workflow-code/src/canonicalize/index.ts +++ b/packages/workflow-code/src/canonicalize/index.ts @@ -22,7 +22,7 @@ import type { VarKey, } from '../model' import { setOwn } from '../records' -import { isInactive } from './activity' +import { deployReadIds, isInactive } from './activity' import { type LiftedBranches, liftBranches } from './branches' import { type CanonContext, catalogBlock, report } from './context' import { canonicalEdges } from './edges' @@ -265,6 +265,7 @@ export const canonicalize: CanonicalizeFn = (state, options) => { values: activityValues, overrides, index: buildCanonicalIndexForSurface(catalog, triggerMode), + deployRead: deployReadIds(options.catalog, catalog, block.type, triggerMode, rawValues), } const inactiveIds = Object.keys(params).filter((paramId) => isInactive(paramId, activityInputs) diff --git a/packages/workflow-code/src/canonicalize/subflows.ts b/packages/workflow-code/src/canonicalize/subflows.ts index d2f53417047..47a6bd4163a 100644 --- a/packages/workflow-code/src/canonicalize/subflows.ts +++ b/packages/workflow-code/src/canonicalize/subflows.ts @@ -60,9 +60,11 @@ function repaired(context: CanonContext, blockKey: BlockKey, message: string) { /** * A loop's config (s1 canonicalize step 2, quirk 19). `block.data` is read first: the serializer * rebuilds loops from it (`generateLoopBlocks`, serializer/index.ts:175) and the loader syncs the - * subflow row into it (load.ts:186-245), so it is what executes. The loops map fills fields `data` - * omits. Stored values are kept raw, including a `0` count the runtime replaces with 5 - * (`count || 5`), which is reported instead of repaired. Fields storage omits stay absent. + * subflow row's collection and conditions into it (load.ts:186-245), so it is what executes. The + * loops map fills those fields when `data` omits them, but never the count: the loader does not + * sync it, so a count only the map holds never runs, and the spec holds the 5 that does. Stored + * values are otherwise kept raw, including a `0` count the runtime replaces with 5 (`count || 5`), + * which is reported instead of repaired. Optional fields storage omits stay absent. */ export function loopSpec( block: BlockState, @@ -71,8 +73,9 @@ export function loopSpec( context: CanonContext ): SubflowResult { const data: Record = { ...block.data } - // `loopType` and `iterations` are required: the loader always writes both into the loops map - // (load.ts:186-245), so the fallbacks below apply only to a state with no loops map at all. + // `loopType` and `iterations` are required. The type falls back to `for` only for a state with + // no loops map (the loader always writes one); the count falls back to the 5 that runs whenever + // `data.count` is absent. const spec: LoopSpec = { kind: 'loop', loopType: 'for', iterations: DEFAULT_LOOP_ITERATIONS } const rejected: string[] = [] @@ -87,14 +90,17 @@ export function loopSpec( repaired(context, blockKey, `Unknown loop type "${String(loopType)}"; the runtime runs "for"`) } - const iterations = firstDefined(data.count, loop?.iterations) - if (typeof iterations === 'number') { - spec.iterations = iterations - if (iterations === 0) { + // The count that runs is `block.data.count || 5` (`convertLoopBlockToLoop`): the serializer + // rebuilds loops from the blocks and every write recomputes the loops map from them, so a map + // count with no `data.count` never runs. The loader repairs a non-numeric `data.count` from the + // map (load.ts:206-209), the only time the map's count is read. + if (typeof data.count === 'number') { + spec.iterations = data.count + if (data.count === 0) { repaired(context, blockKey, 'Loop count is 0; the runtime runs 5 iterations') } - } else if (iterations !== undefined) { - rejectIfFromData(rejected, data, 'count') + } else if (data.count !== undefined) { + rejected.push('count') if (typeof loop?.iterations === 'number') spec.iterations = loop.iterations repaired(context, blockKey, 'Loop count is not a number; the loader repairs it') } diff --git a/packages/workflow-code/src/equivalence/executable.ts b/packages/workflow-code/src/equivalence/executable.ts new file mode 100644 index 00000000000..8301bec689b --- /dev/null +++ b/packages/workflow-code/src/equivalence/executable.ts @@ -0,0 +1,223 @@ +/** + * The executable projection of a CWM (wave 4 governing principle: source holds what executes). + * Everything the canvas keeps only for itself is stripped, so two workflows that run the same are + * equal here even when their preserved UI state differs: + * - inactive values (stored, never sent: `isInactive` over the CWM, the same rule the printer and + * materialize use); + * - which member of a basic/advanced pair holds the value, and the mode that picks it: the + * serializer sends the effective member's value under the canonical id, so a pair projects to + * one param keyed by its `canonicalParamId`; + * - the config fields of the loop or parallel types not in effect, and storage spellings the + * runtime reads alike (`count: 0` and an absent count both run 5 iterations); + * - unknown `block.data` residue, which nothing executes (a container keeps the subflow keys it + * could not read, because the serializer passes a container's `data` through). + * + * P0/P1 compare this view; O1 still compares stored bytes. + */ + +import { canonicalActivityInputs, isInactive } from '../canonicalize/activity' +import { compareEdges } from '../canonicalize/edges' +import { buildCanonicalIndexForSurface } from '../canonicalize/modes' +import { SUBFLOW_DATA_KEYS } from '../canonicalize/subflows' +import { isCanonicalPair } from '../catalog/canonical-index' +import type { BlockCatalog, CatalogBlock } from '../catalog/types' +import { catalogBlock } from '../catalog/view' +import type { + BlockKey, + CanonicalBlock, + CanonicalBranches, + CanonicalEdge, + CanonicalParam, + CanonicalVariable, + CanonicalWorkflow, + CanonicalWorkflowMeta, + Json, + LoopSpec, + ParallelSpec, + SubBlockId, + VarKey, +} from '../model' +import { setOwn } from '../records' + +/** `count || 5` in `convertLoopBlockToLoop` and the loop orchestrator. */ +const DEFAULT_LOOP_ITERATIONS = 5 +/** `data.count || 5` in `convertParallelBlockToParallel`. */ +const DEFAULT_PARALLEL_COUNT = 5 +const PARALLEL_BATCH_MAX = 20 + +/** A loop or parallel config exactly as the executor reads it for the type in effect. */ +export type ExecutableSubflow = + | { + kind: 'loop' + loopType: LoopSpec['loopType'] + iterations?: number + forEachItems?: Json + whileCondition?: string + doWhileCondition?: string + } + | { + kind: 'parallel' + parallelType: 'count' | 'collection' + count?: number + distribution?: Json + batchSize: number + } + +export interface ExecutableBlock { + key: BlockKey + name: string + type: string + parent: BlockKey | null + enabled: boolean + locked: boolean + triggerMode: boolean + advancedMode: boolean + errorPort: boolean + retry: CanonicalBlock['retry'] + /** Active params; a basic/advanced pair is one param under its canonical id. */ + params: Record + branches?: CanonicalBranches + subflow?: ExecutableSubflow + /** Container `data` keys canonicalize could not read as config; the serializer passes them on. */ + subflowResidue?: Record +} + +export interface ExecutableWorkflow { + meta: CanonicalWorkflowMeta + blocks: Record + edges: CanonicalEdge[] + variables: Record +} + +/** + * The params of a catalog block that never reach execution under its current values: what source + * leaves out and materialize restores from the stored workflow. + */ +export function executableInactiveParams( + block: CanonicalBlock, + catalog: BlockCatalog +): SubBlockId[] { + const declared = catalogBlock(catalog, block.type) + if (!declared || block.subflow) return [] + return inactiveIn(block, declared, catalog) +} + +function inactiveIn( + block: CanonicalBlock, + declared: CatalogBlock, + catalog: BlockCatalog +): SubBlockId[] { + const inputs = canonicalActivityInputs(block, declared, catalog) + return Object.keys(block.params).filter((id) => isInactive(id, inputs)) +} + +function executableLoop(spec: LoopSpec): ExecutableSubflow { + const iterations = spec.iterations || DEFAULT_LOOP_ITERATIONS + switch (spec.loopType) { + case 'for': + return { kind: 'loop', loopType: 'for', iterations } + case 'forEach': + return { kind: 'loop', loopType: 'forEach', forEachItems: spec.forEachItems || '' } + case 'while': + return { kind: 'loop', loopType: 'while', whileCondition: spec.whileCondition || '' } + case 'doWhile': { + const doWhileCondition = spec.doWhileCondition || '' + return doWhileCondition === '' + ? { kind: 'loop', loopType: 'doWhile', doWhileCondition, iterations } + : { kind: 'loop', loopType: 'doWhile', doWhileCondition } + } + } +} + +/** `clampParallelBatchSize`: a missing or non-numeric size is 20, anything else 1–20. */ +function clampBatchSize(batchSize: number | undefined): number { + if (batchSize === undefined || Number.isNaN(batchSize)) return PARALLEL_BATCH_MAX + return Math.max(1, Math.min(PARALLEL_BATCH_MAX, Math.trunc(batchSize))) +} + +function executableParallel(spec: ParallelSpec): ExecutableSubflow { + const parallelType = spec.parallelType ?? 'count' + const batchSize = clampBatchSize(spec.batchSize) + return parallelType === 'count' + ? { + kind: 'parallel', + parallelType, + count: spec.count || DEFAULT_PARALLEL_COUNT, + batchSize, + } + : { kind: 'parallel', parallelType, distribution: spec.distribution || '', batchSize } +} + +/** The executable form of one block's params: inactive values dropped, pairs keyed by id. */ +function executableParams( + block: CanonicalBlock, + declared: CatalogBlock | undefined, + catalog: BlockCatalog +): Record { + if (!declared) return { ...block.params } + const inactive = new Set(inactiveIn(block, declared, catalog)) + const params: Record = {} + for (const [id, param] of Object.entries(block.params)) { + if (!inactive.has(id)) setOwn(params, id, param) + } + const index = buildCanonicalIndexForSurface(declared, block.triggerMode) + for (const group of Object.values(index.groupsById)) { + if (!isCanonicalPair(group)) continue + const members = [group.basicId, ...group.advancedIds].filter( + (id): id is string => id !== undefined && Object.hasOwn(params, id) + ) + if (members.length !== 1) continue + const [member] = members + const value = params[member] + delete params[member] + setOwn(params, group.canonicalId, value) + } + return params +} + +function executableBlock(block: CanonicalBlock, catalog: BlockCatalog): ExecutableBlock { + const declared = block.subflow ? undefined : catalogBlock(catalog, block.type) + const view: ExecutableBlock = { + key: block.key, + name: block.name, + type: block.type, + parent: block.parent, + enabled: block.enabled, + locked: block.locked, + triggerMode: block.triggerMode, + advancedMode: block.advancedMode, + errorPort: block.errorPort, + retry: block.retry, + params: executableParams(block, declared, catalog), + } + if (block.branches) view.branches = block.branches + if (block.subflow) { + view.subflow = + block.subflow.kind === 'loop' + ? executableLoop(block.subflow) + : executableParallel(block.subflow) + const residue: Record = {} + for (const [key, value] of Object.entries(block.opaque?.data ?? {})) { + if (SUBFLOW_DATA_KEYS.has(key)) setOwn(residue, key, value) + } + if (Object.keys(residue).length > 0) view.subflowResidue = residue + } + return view +} + +/** The executable projection of `workflow` (see the module comment). */ +export function executableView( + workflow: CanonicalWorkflow, + catalog: BlockCatalog +): ExecutableWorkflow { + const blocks: Record = {} + for (const [key, block] of Object.entries(workflow.blocks)) { + setOwn(blocks, key, executableBlock(block, catalog)) + } + return { + meta: workflow.meta, + blocks, + edges: [...workflow.edges].sort(compareEdges), + variables: workflow.variables, + } +} diff --git a/packages/workflow-code/src/equivalence/index.ts b/packages/workflow-code/src/equivalence/index.ts index 711ac2cdefa..52993765145 100644 --- a/packages/workflow-code/src/equivalence/index.ts +++ b/packages/workflow-code/src/equivalence/index.ts @@ -5,8 +5,10 @@ import type { CanonicalEqualsFn, CanonicalHashFn, SourceFingerprintFn } from '../api' import { compareEdges } from '../canonicalize/edges' +import type { BlockCatalog } from '../catalog/types' import { sha256Hex, stableStringify } from '../hash' import type { CanonicalWorkflow } from '../model' +import { executableView } from './executable' /** The semantic part of a CWM: everything but annotations, with edges in canonical order. */ function semantic(workflow: CanonicalWorkflow) { @@ -55,3 +57,15 @@ export const canonicalHash: CanonicalHashFn = (workflow) => */ export const sourceFingerprint: SourceFingerprintFn = (workflow, identity) => `sf1:${sha256Hex(stableStringify({ workflow: semantic(workflow), identity }))}` + +/** + * Whether two workflows run the same: their executable views (`executable.ts`) are equal. P0 and + * P1 hold under this; O1 still compares stored bytes. + */ +export function executableEquals( + a: CanonicalWorkflow, + b: CanonicalWorkflow, + catalog: BlockCatalog +): boolean { + return deepEqual(executableView(a, catalog), executableView(b, catalog)) +} diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index cb64130598d..530f5698536 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -127,7 +127,19 @@ export { type SourceSpan, } from './diagnostics/frame' export { diffCanonical, renamesBetween } from './diff' -export { canonicalEquals, canonicalHash, sourceFingerprint } from './equivalence' +export { + canonicalEquals, + canonicalHash, + executableEquals, + sourceFingerprint, +} from './equivalence' +export { + type ExecutableBlock, + type ExecutableSubflow, + type ExecutableWorkflow, + executableInactiveParams, + executableView, +} from './equivalence/executable' export { sha256Hex, stableStringify } from './hash' export { type LockBase, diff --git a/packages/workflow-code/src/proof/oracles.ts b/packages/workflow-code/src/proof/oracles.ts index 45f56fc39ff..b72693ce48e 100644 --- a/packages/workflow-code/src/proof/oracles.ts +++ b/packages/workflow-code/src/proof/oracles.ts @@ -88,6 +88,7 @@ export interface SerializedWorkflowLike { config: { tool?: string; params: Record } canonicalModes?: Record retry?: unknown + metadata?: { id?: string } }> connections: Array<{ source: string @@ -150,15 +151,24 @@ export function assertNoErrors( ) } +/** Container blocks the serializer emits with their raw `block.data` as params. */ +const CONTAINER_TYPES: ReadonlySet = new Set(['loop', 'parallel']) + +/** + * What runs. A loop or parallel block's params are its raw `block.data`, echoed by the serializer + * and read by no handler; the executor runs the container from the `loops` / `parallels` maps it + * rebuilds from that data (`generateLoopBlocks`), so the container config is compared there. + */ function executionView(serialized: SerializedWorkflowLike) { const blocks: Record = {} for (const block of serialized.blocks) { + const isContainer = CONTAINER_TYPES.has(block.metadata?.id ?? '') setOwn(blocks, block.id, { tool: block.config.tool ?? null, enabled: block.enabled ?? true, canonicalModes: block.canonicalModes ?? {}, retry: block.retry ?? null, - params: decodeStructured(block.config.params), + params: isContainer ? {} : decodeStructured(block.config.params), }) } const connections = serialized.connections From dfb1a91cd2b2807ff3862ec9a3938f15e5557d0d Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:16:06 -0800 Subject: [PATCH 116/428] fix(workflow-code): rewrite stored outputs only when their derivation changes Any param edit marked a block's outputs dirty and replaced the stored outputs with what the registry computes today, so a block with stale or empty outputs had them rewritten by an unrelated edit (code, url, apiKey), which the canvas never does. Outputs are now rewritten only when computeOutputs differs between prev and the edited block. A block with no stored data also no longer gains an empty data object on edit. Registry-wide corpus property: with every block's outputs seeded stale, a one-field edit per block changes exactly that stored subBlock value. --- .../code/corpus/outputs.corpus.test.ts | 138 ++++++++++++++++++ .../workflow-code/src/materialize/block.ts | 14 +- .../src/materialize/index.test.ts | 20 ++- 3 files changed, 166 insertions(+), 6 deletions(-) create mode 100644 apps/sim/lib/workflows/code/corpus/outputs.corpus.test.ts diff --git a/apps/sim/lib/workflows/code/corpus/outputs.corpus.test.ts b/apps/sim/lib/workflows/code/corpus/outputs.corpus.test.ts new file mode 100644 index 00000000000..0f97836a593 --- /dev/null +++ b/apps/sim/lib/workflows/code/corpus/outputs.corpus.test.ts @@ -0,0 +1,138 @@ +/** + * Stored outputs are server-owned and derived (s1 D6). A source edit must change exactly the field + * it edits: when the edited param is not one the outputs derive from, the stored outputs stay as + * they are, even when they differ from what the registry would compute today (older blocks, or the + * `outputs: {}` an API-built block can hold). The canvas never rewrites them on such an edit. + * + * Over every corpus workflow, with every block's stored outputs seeded stale (`{}`), this edits one + * active text param per block, one whose change leaves the derived outputs unchanged, and asserts + * the materialized block equals the stored one but for that subBlock's value. + */ +import { compareStrings } from '@sim/utils/string' +import { + type CanonicalWorkflow, + canonicalize, + executableInactiveParams, + materialize, +} from '@sim/workflow-code' +import { describe, expect, it, vi } from 'vitest' + +vi.unmock('@/blocks/registry') +vi.unmock('@/tools/registry') + +import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' +import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' +import { roundTripSubjects } from '@/lib/workflows/code/corpus/fixtures.test-helpers' +import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' +import { getBlockRegistry } from '@/blocks/registry' +import { SDK_NAMES } from '@/blocks/sdk-names.generated' +import type { BlockState, WorkflowState } from '@/stores/workflows/workflow/types' + +const CASES_PER_BLOCK_TYPE = 3 +const FUZZ_RUNS = 50 +const BUDGET_MS = 60_000 +const EDIT_SUFFIX = ' (edited)' + +const hooks = createMaterializeHooks() +const { catalog } = buildBlockCatalog({ + blocks: Object.values(getBlockRegistry()), + trigger: registryTrigger, + sdkNames: SDK_NAMES, +}) + +const subjects = roundTripSubjects({ + casesPerBlockType: CASES_PER_BLOCK_TYPE, + full: process.env.ROUNDTRIP_CORPUS_FULL === '1', + fuzzRuns: FUZZ_RUNS, + extraDir: process.env.ROUNDTRIP_CORPUS_EXTRA_DIR, +}) + +function withStaleOutputs(state: WorkflowState): WorkflowState { + const blocks: WorkflowState['blocks'] = {} + for (const [id, block] of Object.entries(state.blocks)) blocks[id] = { ...block, outputs: {} } + return { ...state, blocks } +} + +function withSubBlockValue(block: BlockState, id: string, value: string): BlockState { + return { + ...block, + subBlocks: { ...block.subBlocks, [id]: { ...block.subBlocks[id], value } }, + } +} + +/** + * The first active, stored text param of a block whose edit leaves the derived outputs unchanged, + * with the stored block as that edit would leave it. + */ +function editableParam( + workflow: CanonicalWorkflow, + key: string, + stored: BlockState +): { param: string; value: string; expected: BlockState } | null { + const block = workflow.blocks[key] + if (block.subflow || block.branches) return null + const inactive = new Set(executableInactiveParams(block, catalog)) + for (const param of Object.keys(block.params).sort(compareStrings)) { + const canonical = block.params[param] + const raw = stored.subBlocks[param]?.value + if (inactive.has(param) || param === 'operation') continue + if (canonical.kind !== 'value' || typeof canonical.value !== 'string') continue + if (typeof raw !== 'string' || raw !== canonical.value || raw.includes('<')) continue + const value = `${raw}${EDIT_SUFFIX}` + const expected = withSubBlockValue(stored, param, value) + const derivedBefore = JSON.stringify(hooks.computeOutputs(stored)) + if (JSON.stringify(hooks.computeOutputs(expected)) !== derivedBefore) continue + return { param, value, expected } + } + return null +} + +describe(`stored outputs survive edits they do not derive from (${subjects.length} workflows)`, () => { + it( + 'a one-field edit changes exactly that stored field', + () => { + const drift: string[] = [] + let edited = 0 + for (const subject of subjects) { + if (subject.unknownTypes) continue + const stale = withStaleOutputs(subject.state) + const { workflow, identity } = canonicalize(stale, { + catalog, + meta: { name: subject.id, description: null }, + }) + const target: CanonicalWorkflow = structuredClone(workflow) + const expected = new Map() + for (const key of Object.keys(workflow.blocks)) { + const id = identity.blocks[key].id + const edit = editableParam(workflow, key, stale.blocks[id]) + if (!edit) continue + target.blocks[key].params[edit.param] = { kind: 'value', value: edit.value } + expected.set(id, edit.expected) + } + if (expected.size === 0) continue + let state: WorkflowState + try { + state = materialize(target, null, { + catalog, + hooks, + prev: stale, + lockFreshness: 'none', + }).state + } catch (error) { + drift.push(`${subject.id}: ${String(error)}`) + continue + } + for (const [id, block] of Object.entries(stale.blocks)) { + edited += expected.has(id) ? 1 : 0 + const want = expected.get(id) ?? block + if (JSON.stringify(state.blocks[id]) !== JSON.stringify(want)) { + drift.push(`${subject.id} ${block.type} ${id}`) + } + } + } + expect(edited).toBeGreaterThan(0) + expect(drift).toEqual([]) + }, + BUDGET_MS + ) +}) diff --git a/packages/workflow-code/src/materialize/block.ts b/packages/workflow-code/src/materialize/block.ts index 628c518a226..16a81f11545 100644 --- a/packages/workflow-code/src/materialize/block.ts +++ b/packages/workflow-code/src/materialize/block.ts @@ -311,9 +311,19 @@ export function buildBlock(inputs: BlockInputs, context: MaterializeContext): Bu } } - block.data = data as BlockData + if (base.data !== undefined || Object.keys(data).length > 0) { + block.data = deepEqual(base.data, data) ? base.data : (data as BlockData) + } block.subBlocks = subBlocks - if (outputsDirty) block.outputs = context.hooks.computeOutputs(block) + // Stored outputs are server-owned and derived. They are rewritten only when the derivation + // itself changes: a block whose stored outputs predate the registry (or were seeded empty) + // keeps them through an edit its outputs do not derive from, as it does on the canvas. + if (outputsDirty) { + const outputs = context.hooks.computeOutputs(block) + if (!prev || !deepEqual(outputs, context.hooks.computeOutputs(prev.block))) { + block.outputs = outputs + } + } let built = block let needsLayout = false diff --git a/packages/workflow-code/src/materialize/index.test.ts b/packages/workflow-code/src/materialize/index.test.ts index 354a25e6d5f..96d125f60b6 100644 --- a/packages/workflow-code/src/materialize/index.test.ts +++ b/packages/workflow-code/src/materialize/index.test.ts @@ -212,18 +212,30 @@ describe('materialize: params keep prev bytes unless they changed', () => { expect(codes(result)).toEqual(['E_MAT_UNKNOWN_RESOURCE']) }) - it('recomputes stored outputs only for blocks that changed', () => { + it('keeps stored outputs through an edit their derivation does not read', () => { const state = workflowState([ blockState('f1', 'function', 'One', { code: 'a' }), - blockState('f2', 'function', 'Two', { code: 'b' }), + blockState('f2', 'function', 'Two', { code: 'b' }, { outputs: {} }), ]) const target = edit(canonical(state).workflow, (draft) => { draft.blocks.two.params.code = { kind: 'value', value: 'c' } }) const result = run(target, null, { prev: state }) expect(result.state.blocks.f1.outputs).toBe(state.blocks.f1.outputs) - expect(result.state.blocks.f2.outputs).toEqual({ - computed: { type: 'string', description: 'function:false' }, + expect(subBlockValue(result.state, 'f2', 'code')).toBe('c') + expect(result.state.blocks.f2.outputs).toBe(state.blocks.f2.outputs) + }) + + it('recomputes stored outputs when an edit changes what they derive from', () => { + const state = workflowState([ + blockState('g1', 'gmail', 'Mail', { operation: 'send' }, { outputs: {} }), + ]) + const target = edit(canonical(state).workflow, (draft) => { + draft.blocks.mail.triggerMode = true + }) + const result = run(target, null, { prev: state }) + expect(result.state.blocks.g1.outputs).toEqual({ + computed: { type: 'string', description: 'gmail:true' }, }) }) From fb8a7a2f1ea9646b0dda8a13b9d86356b5ac4281 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:16:42 -0800 Subject: [PATCH 117/428] test(workflow-code): scale the corpus property timeouts with the corpus size The full corpus (17,043 workflows on EC2) ran P0, P1, P2, P3 and P5 for 164-184 s each, past the fixed 30 s per-test timeout. Each property's timeout is now a per-workflow allowance (20 ms, about twice the measured 11 ms) times the corpus size, floored at the reduced default budget and capped at 15 min. The inactive and outputs corpus properties use the same rule. --- .../workflows/code/corpus/fixtures.test-helpers.ts | 14 ++++++++++++++ .../workflows/code/corpus/inactive.corpus.test.ts | 7 +++++-- .../workflows/code/corpus/outputs.corpus.test.ts | 7 +++++-- .../workflows/code/corpus/roundtrip.corpus.test.ts | 9 ++++++--- 4 files changed, 30 insertions(+), 7 deletions(-) diff --git a/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts b/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts index bcbb9cde5c3..5dbf4b37b0f 100644 --- a/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts +++ b/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts @@ -193,6 +193,20 @@ export function roundTripSubjects(options: SubjectOptions): ProofSubject[] { ] } +/** + * Wall time one corpus property may take, by corpus size. Measured on the full corpus (EC2, + * 17,043 workflows): the slowest properties (P0, which pays for the shared print and compile, then + * P1, P2, P3 and P5) took 164–184 s, about 11 ms per workflow, so each workflow is allowed + * `PER_CASE_MS`, roughly twice that. The reduced default corpus stays under `floorMs`, its CI + * budget, and `CAP_MS` bounds a runaway full run. + */ +const PER_CASE_MS = 20 +const CAP_MS = 900_000 + +export function corpusBudgetMs(caseCount: number, floorMs: number): number { + return Math.min(CAP_MS, Math.max(floorMs, caseCount * PER_CASE_MS)) +} + /** Item keys canonicalize drops by design, by structured kind (s1 §4 "Items", quirk 24). */ const DROPPED_ITEM_KEYS: Record = { inputFormat: ['id', 'collapsed'], diff --git a/apps/sim/lib/workflows/code/corpus/inactive.corpus.test.ts b/apps/sim/lib/workflows/code/corpus/inactive.corpus.test.ts index 6afd1a673b3..bd50d98cf5c 100644 --- a/apps/sim/lib/workflows/code/corpus/inactive.corpus.test.ts +++ b/apps/sim/lib/workflows/code/corpus/inactive.corpus.test.ts @@ -22,7 +22,10 @@ vi.unmock('@/tools/registry') import { buildProviderConfig } from '@/lib/webhooks/deploy' import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' -import { roundTripSubjects } from '@/lib/workflows/code/corpus/fixtures.test-helpers' +import { + corpusBudgetMs, + roundTripSubjects, +} from '@/lib/workflows/code/corpus/fixtures.test-helpers' import { getBlockRegistry } from '@/blocks/registry' import { SDK_NAMES } from '@/blocks/sdk-names.generated' import { extractBlockParams } from '@/serializer' @@ -148,6 +151,6 @@ describe(`inactive params are never serialized (${subjects.length} workflows)`, expect(checked).toBeGreaterThan(0) expect(leaks).toEqual([]) }, - BUDGET_MS + corpusBudgetMs(subjects.length, BUDGET_MS) ) }) diff --git a/apps/sim/lib/workflows/code/corpus/outputs.corpus.test.ts b/apps/sim/lib/workflows/code/corpus/outputs.corpus.test.ts index 0f97836a593..d9d88cd9b17 100644 --- a/apps/sim/lib/workflows/code/corpus/outputs.corpus.test.ts +++ b/apps/sim/lib/workflows/code/corpus/outputs.corpus.test.ts @@ -22,7 +22,10 @@ vi.unmock('@/tools/registry') import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' -import { roundTripSubjects } from '@/lib/workflows/code/corpus/fixtures.test-helpers' +import { + corpusBudgetMs, + roundTripSubjects, +} from '@/lib/workflows/code/corpus/fixtures.test-helpers' import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' import { getBlockRegistry } from '@/blocks/registry' import { SDK_NAMES } from '@/blocks/sdk-names.generated' @@ -133,6 +136,6 @@ describe(`stored outputs survive edits they do not derive from (${subjects.lengt expect(edited).toBeGreaterThan(0) expect(drift).toEqual([]) }, - BUDGET_MS + corpusBudgetMs(subjects.length, BUDGET_MS) ) }) diff --git a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts index c766ebea4da..1c16e42322a 100644 --- a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts +++ b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts @@ -44,6 +44,7 @@ import { import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' import { + corpusBudgetMs, type ProofSubject, roundTripSubjects, withoutLockHeldState, @@ -59,8 +60,10 @@ const SUITE = 'roundtrip-corpus' const CASES_PER_BLOCK_TYPE = 3 const FUZZ_RUNS = 50 /** - * One property over the default corpus. The first property to run pays for the shared source run - * (canonicalize, print, compile per workflow); the whole file stays inside the 60 s CI budget. + * One property over the reduced default corpus. The first property to run pays for the shared + * source run (canonicalize, print, compile per workflow); the whole file stays inside the 60 s CI + * budget. This is the floor of `corpusBudgetMs`, which scales the timeout with the corpus size, + * so `ROUNDTRIP_CORPUS_FULL=1` gets a per-workflow allowance instead of this constant. */ const PROPERTY_BUDGET_MS = 30_000 @@ -333,7 +336,7 @@ describe(`round-trip corpus (${subjects.length} workflows)`, () => { } expect(failed.sort(compareStrings)).toEqual(expectedFailures(property)) }, - PROPERTY_BUDGET_MS + corpusBudgetMs(subjects.length, PROPERTY_BUDGET_MS) ) } From 5e362090dc3dd7f833440e51e897eb0511be7b1b Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:33:11 -0800 Subject: [PATCH 118/428] feat(workflows): v2 resource manifest and create workflow from source GET /api/v2/workspaces/{id}/resource-manifest lists the tables (with columns), knowledge bases, credential bindings (with provider), workflows (with start-block inputs) and env names a workflow file can name, keyed through the persisted resource bindings (resolveKeys allocates a key for a resource no source has named yet). Read role; workspace keys allowed; Copilot not admitted. POST /api/v2/workspaces/{id}/workflows/source creates a workflow from source through the same pipeline as apply with an empty graph as the stored draft: applyWorkflowSource and the new createWorkflowFromSource share one runSourceApply, and the create writes the row, graph, variables and code_meta in one transaction (performCreateWorkflowTransition gains a writeGraph seam). Write role; workspace keys denied. Regenerates the route table, OpenAPI, CLI and MCP artifacts and docs. --- .../(generated)/workflows/meta.json | 2 + apps/docs/content/docs/cli/reference.mdx | 30 +- apps/docs/content/docs/cli/workflows.mdx | 10 +- apps/docs/content/docs/cli/workspaces.mdx | 18 + apps/docs/openapi-v2-resources.json | 435 ++++++ apps/docs/openapi-v2-workflows.json | 1371 +++++++++++++++-- .../v2/workflows/[workflowId]/source/route.ts | 20 +- .../resource-manifest/route.test.ts | 111 ++ .../[workspaceId]/resource-manifest/route.ts | 24 + .../workflows/source/route.test.ts | 173 +++ .../[workspaceId]/workflows/source/route.ts | 70 + .../contracts/v2/openapi/resource-manifest.ts | 69 + .../contracts/v2/openapi/workflow-source.ts | 69 + .../lib/api/contracts/v2/openapi/workflows.ts | 8 +- .../lib/api/contracts/v2/resource-manifest.ts | 95 ++ .../lib/api/contracts/v2/workflow-source.ts | 90 +- .../lib/api/mcp/generated/v2-operations.ts | 23 + .../server/routes/copilot-refused-routes.json | 5 + .../server/routes/v2-route-table.generated.ts | 8 + apps/sim/lib/workflows/api/index.ts | 1 + apps/sim/lib/workflows/api/route-policies.ts | 16 + apps/sim/lib/workflows/api/source-actor.ts | 20 + .../application/apply-workflow-source.ts | 1121 ++++++++------ .../lib/workflows/application/operations.ts | 11 + apps/sim/lib/workflows/code/operations.ts | 20 + .../lib/workflows/code/resource-manifest.ts | 251 +++ .../orchestration/workflow-lifecycle.ts | 12 +- 27 files changed, 3497 insertions(+), 586 deletions(-) create mode 100644 apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.test.ts create mode 100644 apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.ts create mode 100644 apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.test.ts create mode 100644 apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.ts create mode 100644 apps/sim/lib/api/contracts/v2/openapi/resource-manifest.ts create mode 100644 apps/sim/lib/api/contracts/v2/resource-manifest.ts create mode 100644 apps/sim/lib/workflows/api/source-actor.ts create mode 100644 apps/sim/lib/workflows/code/operations.ts create mode 100644 apps/sim/lib/workflows/code/resource-manifest.ts diff --git a/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json b/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json index be08a5c95a0..9f3883e6866 100644 --- a/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json +++ b/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json @@ -12,6 +12,8 @@ "getWorkflowOutline", "getWorkflowSource", "applyWorkflowSource", + "createWorkflowFromSource", + "getResourceManifest", "replaceWorkflowState", "applyWorkflowOperations", "applyWorkflowVariables", diff --git a/apps/docs/content/docs/cli/reference.mdx b/apps/docs/content/docs/cli/reference.mdx index 3176e6a4f1b..8562844fbd6 100644 --- a/apps/docs/content/docs/cli/reference.mdx +++ b/apps/docs/content/docs/cli/reference.mdx @@ -8296,10 +8296,10 @@ API request and response schemas: [getWorkflowSource](/api-reference/workflows/g ### sim workflows source apply -Apply a workflow source directory to the workflow draft +Apply a workflow source directory to a workflow draft, or create one with --new ```bash -sim workflows source apply [options] +sim workflows source apply [workflowId] [options] ``` **Arguments** @@ -8308,7 +8308,7 @@ sim workflows source apply [options] | Argument | Required | Description | | --- | --- | --- | -| `workflowId` | Yes | Workflow whose draft the source replaces | +| `workflowId` | No | Workflow whose draft the source replaces (omit with --new) | @@ -8320,6 +8320,10 @@ sim workflows source apply [options] | --- | --- | --- | | `--from ` | Yes | Source directory: workflow.ts, functions/*, .sim/lock.json and .sim/base.json. | | `--dry-run` | No | Check the source and show the outcome without saving or writing files. | +| `--new` | No | Create a new workflow from the directory instead of updating one. | +| `--name ` | No | With --new: the workflow name (default: the source's). | +| `--folder ` | No | With --new: the folder to create it in (default: the root). | +| `-y, --yes` | No | Apply without asking for confirmation. | @@ -8935,6 +8939,26 @@ sim workspaces block-catalog list [options] API request and response schemas: [getBlockCatalog](/api-reference/catalog/getBlockCatalog). +### sim workspaces resource-manifest get + +List the tables, knowledge bases, credentials, workflows and env names source can name + +```bash +sim workspaces resource-manifest get +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `workspaceId` | Yes | Workspace whose resources to list. | + + + +API request and response schemas: [getResourceManifest](/api-reference/workflows/getResourceManifest). + ### sim workspaces get Get workspace diff --git a/apps/docs/content/docs/cli/workflows.mdx b/apps/docs/content/docs/cli/workflows.mdx index 76e85815772..8cd4b978a1e 100644 --- a/apps/docs/content/docs/cli/workflows.mdx +++ b/apps/docs/content/docs/cli/workflows.mdx @@ -1318,10 +1318,10 @@ sim workflows source get [options] API request and response schemas: [getWorkflowSource](/api-reference/workflows/getWorkflowSource). -### Apply a workflow source directory to the workflow draft +### Apply a workflow source directory to a workflow draft, or create one with --new ```bash -sim workflows source apply [options] +sim workflows source apply [workflowId] [options] ``` **Arguments** @@ -1330,7 +1330,7 @@ sim workflows source apply [options] | Argument | Required | Description | | --- | --- | --- | -| `workflowId` | Yes | Workflow whose draft the source replaces | +| `workflowId` | No | Workflow whose draft the source replaces (omit with --new) | @@ -1342,6 +1342,10 @@ sim workflows source apply [options] | --- | --- | --- | | `--from ` | Yes | Source directory: workflow.ts, functions/*, .sim/lock.json and .sim/base.json. | | `--dry-run` | No | Check the source and show the outcome without saving or writing files. | +| `--new` | No | Create a new workflow from the directory instead of updating one. | +| `--name ` | No | With --new: the workflow name (default: the source's). | +| `--folder ` | No | With --new: the folder to create it in (default: the root). | +| `-y, --yes` | No | Apply without asking for confirmation. | diff --git a/apps/docs/content/docs/cli/workspaces.mdx b/apps/docs/content/docs/cli/workspaces.mdx index 31c4d2627b2..b89d3430976 100644 --- a/apps/docs/content/docs/cli/workspaces.mdx +++ b/apps/docs/content/docs/cli/workspaces.mdx @@ -716,6 +716,24 @@ sim workspaces block-catalog list [options] API request and response schemas: [getBlockCatalog](/api-reference/catalog/getBlockCatalog). +### List the tables, knowledge bases, credentials, workflows and env names source can name + +```bash +sim workspaces resource-manifest get +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `workspaceId` | Yes | Workspace whose resources to list. | + + + +API request and response schemas: [getResourceManifest](/api-reference/workflows/getResourceManifest). + ## Related docs - [Workspace sync](/cli/workflow-sync) diff --git a/apps/docs/openapi-v2-resources.json b/apps/docs/openapi-v2-resources.json index fc827f84ac8..f816db0c0dc 100644 --- a/apps/docs/openapi-v2-resources.json +++ b/apps/docs/openapi-v2-resources.json @@ -29970,6 +29970,151 @@ "type": "boolean" } }, + "visibleWhen": { + "description": "Per operation id: the clause on other fields an opaque condition still asks to show this field.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Sibling field id whose value decides the condition." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." + } + ], + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." + }, + "not": { + "description": "Invert the match.", + "type": "boolean" + }, + "and": { + "description": "A second clause that must hold as well.", + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Second field id." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." + } + ], + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." + }, + "not": { + "description": "Invert the second match.", + "type": "boolean" + } + }, + "required": ["field"], + "additionalProperties": false + } + }, + "required": ["field", "value"], + "additionalProperties": false, + "description": "Holds when `field` holds `value`." + } + }, + "visibleForModel": { + "description": "Per model id: whether an opaque condition shows this field.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "boolean" + } + }, "required": { "description": "Whether a value is required, or the condition under which it is.", "anyOf": [ @@ -30839,6 +30984,151 @@ "type": "boolean" } }, + "visibleWhen": { + "description": "Per operation id: the clause on other fields an opaque condition still asks to show this field.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Sibling field id whose value decides the condition." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." + } + ], + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." + }, + "not": { + "description": "Invert the match.", + "type": "boolean" + }, + "and": { + "description": "A second clause that must hold as well.", + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Second field id." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." + } + ], + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." + }, + "not": { + "description": "Invert the second match.", + "type": "boolean" + } + }, + "required": ["field"], + "additionalProperties": false + } + }, + "required": ["field", "value"], + "additionalProperties": false, + "description": "Holds when `field` holds `value`." + } + }, + "visibleForModel": { + "description": "Per model id: whether an opaque condition shows this field.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "boolean" + } + }, "required": { "description": "Whether a value is required, or the condition under which it is.", "anyOf": [ @@ -31514,6 +31804,151 @@ "type": "boolean" } }, + "visibleWhen": { + "description": "Per operation id: the clause on other fields an opaque condition still asks to show this field.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Sibling field id whose value decides the condition." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." + } + ], + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." + }, + "not": { + "description": "Invert the match.", + "type": "boolean" + }, + "and": { + "description": "A second clause that must hold as well.", + "type": "object", + "properties": { + "field": { + "type": "string", + "description": "Second field id." + }, + "value": { + "anyOf": [ + { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + }, + { + "type": "array", + "items": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "number" + }, + { + "type": "boolean" + } + ] + } + }, + { + "type": "object", + "properties": { + "list": { + "type": "integer", + "minimum": 0, + "maximum": 9007199254740991, + "description": "Index into the catalog `lists` table." + } + }, + "required": ["list"], + "additionalProperties": false, + "description": "A value list stored once in the catalog `lists` table." + } + ], + "description": "Value, or set of accepted values, the named field must hold; a set may be a `lists` reference." + }, + "not": { + "description": "Invert the second match.", + "type": "boolean" + } + }, + "required": ["field"], + "additionalProperties": false + } + }, + "required": ["field", "value"], + "additionalProperties": false, + "description": "Holds when `field` holds `value`." + } + }, + "visibleForModel": { + "description": "Per model id: whether an opaque condition shows this field.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "boolean" + } + }, "required": { "description": "Whether a value is required, or the condition under which it is.", "anyOf": [ diff --git a/apps/docs/openapi-v2-workflows.json b/apps/docs/openapi-v2-workflows.json index 9541a736e3d..532baff4835 100644 --- a/apps/docs/openapi-v2-workflows.json +++ b/apps/docs/openapi-v2-workflows.json @@ -6226,14 +6226,14 @@ } } }, - "/api/v2/workspaces/{workspaceId}/fork/preview": { + "/api/v2/workspaces/{workspaceId}/workflows/source": { "post": { - "operationId": "previewWorkspaceFork", - "summary": "Preview workspace fork", - "description": "Preview deployed workflows and explicitly selected resources for a new child workspace. Requires source workspace Admin access and permission to create a workspace in its organization. The read-only result supplies the fingerprint for Fork workspace with the same choices. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", - "x-sim-operation": "workspaces.fork.preview", + "operationId": "createWorkflowFromSource", + "summary": "Create workflow from source", + "description": "Create a workflow from TypeScript workflow source in one all-or-nothing write. Requires workspace write access. The source is compiled and checked against the same rules as Apply Workflow Source; every block is new. Any error returns `400` with `details.code` `SOURCE_REJECTED` and `details.diagnostics` (each with a file, line and column), and nothing is created. The name defaults to the one in the source's `workflow('…')` call; a name already used in the folder returns `409`. The response carries the new `workflowId` and the source re-printed from what was saved, with its lock and fingerprint, ready for the next apply. The workflow is not deployed. `dryRun=true` runs every check without creating anything and always returns `200`. Returns `403` while code-first workflows are not enabled. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", + "x-sim-operation": "workflows.source.create", "x-oauth-scope": "api:write", - "tags": ["Workspace Sync"], + "tags": ["Workflows"], "security": [ { "apiKey": [] @@ -6247,44 +6247,125 @@ "name": "workspaceId", "in": "path", "required": true, - "description": "Explicit current workspace scope.", + "description": "Workspace in which to create the workflow.", "schema": { "type": "string", "minLength": 1, "maxLength": 128, - "description": "Explicit current workspace scope." + "description": "Workspace in which to create the workflow." + } + }, + { + "name": "dryRun", + "in": "query", + "required": false, + "description": "Run every check without writing, auditing, or notifying collaborators. Always answers `200`: errors are returned in `diagnostics` with `applied: false`, and the files, lock and fingerprint show what a committed apply would store.", + "schema": { + "description": "Run every check without writing, auditing, or notifying collaborators. Always answers `200`: errors are returned in `diagnostics` with `applied: false`, and the files, lock and fingerprint show what a committed apply would store.", + "type": "boolean" } } ], "requestBody": { "required": true, - "description": "Optional child name and explicitly selected resource copies.", + "description": "Source files and where to create the workflow.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PreviewWorkspaceForkBody" + "$ref": "#/components/schemas/CreateWorkflowFromSourceBody" + }, + "examples": { + "example1": { + "summary": "Request example 1", + "value": { + "files": { + "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" + }, + "folderPath": "/Operations" + } + } } } } }, "responses": { "200": { - "description": "Deployed source workflows, selected-copy count, and a preview fingerprint.", + "description": "The created (or evaluated) workflow.", + "headers": { + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PreviewWorkspaceForkResponse" + "$ref": "#/components/schemas/CreateWorkflowFromSourceResponse" }, "examples": { "example1": { "summary": "Response example 1", "value": { "data": { - "previewFingerprint": "c7d158e8cbc5137a2d0a4fc37ddaeb51a3b9757485679a6ad82a7de3fdac4e3a", - "sourceWorkspaceId": "9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94", - "workflows": [], - "selectedResourceCount": 0, - "draftOnly": true + "workflowId": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "dryRun": false, + "applied": true, + "diff": { + "noop": false, + "blocks": { + "added": [ + { + "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "key": "start" + } + ], + "removed": [], + "renamed": [], + "modified": [] + }, + "edges": { + "added": 0, + "removed": 0 + }, + "variables": { + "added": [], + "removed": [], + "modified": [] + } + }, + "diagnostics": [], + "newFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "files": { + "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" + }, + "lock": { + "lockVersion": 1, + "blocks": { + "start": { + "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "parent": null, + "binding": "start", + "order": 0 + } + }, + "variables": {} + }, + "lockBase": { + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" + }, + "mintedIds": { + "start": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47" + }, + "warnings": [], + "needsRedeployment": false } } } @@ -6307,8 +6388,8 @@ "409": { "$ref": "#/components/responses/Conflict" }, - "413": { - "$ref": "#/components/responses/PayloadTooLarge" + "423": { + "$ref": "#/components/responses/Locked" }, "429": { "$ref": "#/components/responses/RateLimited" @@ -6322,20 +6403,20 @@ } } }, - "/api/v2/workspaces/{workspaceId}/fork": { - "post": { - "operationId": "forkWorkspace", - "summary": "Fork workspace", - "description": "Create a child workspace with undeployed drafts of the source's deployed workflows. Requires source workspace Admin access and permission to create a workspace in its organization. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`.\n\nFirst preview the same name and copy choices, then send the returned fingerprint and a stable request ID. The example fingerprint is illustrative. Identical retries return the same committed operation; changed inputs with that ID return `409`. Poll Get workspace operation until selected resource copies finish. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", - "x-sim-operation": "workspaces.fork.create", - "x-oauth-scope": "api:write", - "tags": ["Workspace Sync"], + "/api/v2/workspaces/{workspaceId}/resource-manifest": { + "get": { + "operationId": "getResourceManifest", + "summary": "Get resource manifest", + "description": "List the workspace resources workflow source can name, each with the key source uses for it: tables with their columns, knowledge bases, saved credentials with their provider, workflows with their start-block inputs, and the names (never values) of the environment variables a run can read. A resource keeps its key when renamed; one that no source has named yet is given its key by this call. Each kind lists its oldest 1000 resources, and `truncated` says when there were more. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.", + "x-sim-operation": "workflows.code.resource_manifest.read", + "x-oauth-scope": "api:read", + "tags": ["Workflows"], "security": [ { "apiKey": [] }, { - "oauthBearer": ["api:write"] + "oauthBearer": ["api:read"] } ], "parameters": [ @@ -6343,57 +6424,88 @@ "name": "workspaceId", "in": "path", "required": true, - "description": "Explicit current workspace scope.", + "description": "Workspace whose resources to list.", "schema": { "type": "string", "minLength": 1, "maxLength": 128, - "description": "Explicit current workspace scope." + "description": "Workspace whose resources to list." } } ], - "requestBody": { - "required": true, - "description": "Child name and copy choices, with the actual preview fingerprint and a stable request ID.", - "content": { - "application/json": { - "schema": { - "$ref": "#/components/schemas/ForkWorkspaceBody" - }, - "examples": { - "example1": { - "summary": "Request example 1", - "value": { - "name": "Support sandbox", - "requestId": "fork-support-2026-10-13", - "previewFingerprint": "c7d158e8cbc5137a2d0a4fc37ddaeb51a3b9757485679a6ad82a7de3fdac4e3a" - } - } - } - } - } - }, "responses": { "200": { - "description": "Committed fork receipt and resource-copy progress.", + "description": "The resource manifest.", + "headers": { + "X-RateLimit-Limit": { + "$ref": "#/components/headers/X-RateLimit-Limit" + }, + "X-RateLimit-Remaining": { + "$ref": "#/components/headers/X-RateLimit-Remaining" + }, + "X-RateLimit-Reset": { + "$ref": "#/components/headers/X-RateLimit-Reset" + } + }, "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/ForkWorkspaceResponse" + "$ref": "#/components/schemas/GetResourceManifestResponse" }, "examples": { "example1": { "summary": "Response example 1", "value": { "data": { - "operationId": "e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13", - "requestId": "fork-support-2026-10-13", - "workspaceId": "9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94", - "kind": "workspace_fork", - "applied": true, - "status": "processing", - "resourceIds": ["destination_workflow_id"], - "issues": [] + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "tables": [ + { + "key": "tickets", + "id": "tbl_4f1c2a9e", + "name": "Tickets", + "columns": [ + { + "name": "subject", + "type": "string" + }, + { + "name": "status", + "type": "select", + "options": ["open", "closed"] + } + ] + } + ], + "knowledgeBases": [ + { + "key": "docs", + "id": "kb_93a1e7c2", + "name": "Docs" + } + ], + "bindings": [ + { + "key": "support-slack", + "id": "cred_51d0b8f4", + "name": "Support Slack", + "service": "slack" + } + ], + "workflows": [ + { + "key": "assign-owner", + "id": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", + "name": "Assign owner", + "inputs": [ + { + "name": "leads", + "type": "array" + } + ] + } + ], + "env": ["CRM_KEY"], + "truncated": false } } } @@ -6413,12 +6525,6 @@ "404": { "$ref": "#/components/responses/NotFound" }, - "409": { - "$ref": "#/components/responses/Conflict" - }, - "413": { - "$ref": "#/components/responses/PayloadTooLarge" - }, "429": { "$ref": "#/components/responses/RateLimited" }, @@ -6431,12 +6537,12 @@ } } }, - "/api/v2/workspaces/{workspaceId}/fork/push/preview": { + "/api/v2/workspaces/{workspaceId}/fork/preview": { "post": { - "operationId": "previewWorkspacePush", - "summary": "Preview workspace push", - "description": "Preview changes from this workspace into the other workspace along a direct fork edge. Requires Admin access to both workspaces. The plan lists workflows to create, replace, or archive; replacements overwrite target drafts with the source deployment. Proposed mappings are not saved. Dependent choices use source workflow, block, and field IDs. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", - "x-sim-operation": "workspaces.fork.sync.preview", + "operationId": "previewWorkspaceFork", + "summary": "Preview workspace fork", + "description": "Preview deployed workflows and explicitly selected resources for a new child workspace. Requires source workspace Admin access and permission to create a workspace in its organization. The read-only result supplies the fingerprint for Fork workspace with the same choices. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", + "x-sim-operation": "workspaces.fork.preview", "x-oauth-scope": "api:write", "tags": ["Workspace Sync"], "security": [ @@ -6463,22 +6569,22 @@ ], "requestBody": { "required": true, - "description": "Other workspace and proposed source-to-target sync choices.", + "description": "Optional child name and explicitly selected resource copies.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PreviewWorkspacePushBody" + "$ref": "#/components/schemas/PreviewWorkspaceForkBody" } } } }, "responses": { "200": { - "description": "Current-to-other workflow actions, required choices, and preview fingerprint.", + "description": "Deployed source workflows, selected-copy count, and a preview fingerprint.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PreviewWorkspacePushResponse" + "$ref": "#/components/schemas/PreviewWorkspaceForkResponse" }, "examples": { "example1": { @@ -6486,15 +6592,10 @@ "value": { "data": { "previewFingerprint": "c7d158e8cbc5137a2d0a4fc37ddaeb51a3b9757485679a6ad82a7de3fdac4e3a", - "sourceWorkspaceId": "e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13", - "targetWorkspaceId": "9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94", - "ready": true, + "sourceWorkspaceId": "9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94", "workflows": [], - "unresolvedBindings": [], - "configuration": [], - "excludedTargets": [], - "triggerSlots": [], - "triggerUrlChanges": [] + "selectedResourceCount": 0, + "draftOnly": true } } } @@ -6532,12 +6633,12 @@ } } }, - "/api/v2/workspaces/{workspaceId}/fork/push": { + "/api/v2/workspaces/{workspaceId}/fork": { "post": { - "operationId": "pushWorkspace", - "summary": "Push workspace", - "description": "Apply a reviewed sync from this workspace into the other workspace along a direct fork edge. Requires Admin access to both workspaces. Creates unmatched deployed workflows, overwrites mapped target drafts, and archives mapped targets whose sources were deleted or archived. Undeployed sources alone do not archive targets. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`.\n\nSend `confirm: true`, the fingerprint from a preview with identical choices, and a stable request ID. The example hash is illustrative. Changed or unresolved plans return `409` without applying. Identical retries return the committed operation; changed inputs with that ID return `409`. Copies and deployment activation can finish after the transaction commits. Poll Get workspace operation before treating the target as ready. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", - "x-sim-operation": "workspaces.fork.sync", + "operationId": "forkWorkspace", + "summary": "Fork workspace", + "description": "Create a child workspace with undeployed drafts of the source's deployed workflows. Requires source workspace Admin access and permission to create a workspace in its organization. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`.\n\nFirst preview the same name and copy choices, then send the returned fingerprint and a stable request ID. The example fingerprint is illustrative. Identical retries return the same committed operation; changed inputs with that ID return `409`. Poll Get workspace operation until selected resource copies finish. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", + "x-sim-operation": "workspaces.fork.create", "x-oauth-scope": "api:write", "tags": ["Workspace Sync"], "security": [ @@ -6564,20 +6665,19 @@ ], "requestBody": { "required": true, - "description": "Confirmed current-to-other choices, actual preview fingerprint, and stable request ID.", + "description": "Child name and copy choices, with the actual preview fingerprint and a stable request ID.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PushWorkspaceBody" + "$ref": "#/components/schemas/ForkWorkspaceBody" }, "examples": { "example1": { "summary": "Request example 1", "value": { - "otherWorkspaceId": "9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94", - "requestId": "push-support-2026-10-13", - "previewFingerprint": "c7d158e8cbc5137a2d0a4fc37ddaeb51a3b9757485679a6ad82a7de3fdac4e3a", - "confirm": true + "name": "Support sandbox", + "requestId": "fork-support-2026-10-13", + "previewFingerprint": "c7d158e8cbc5137a2d0a4fc37ddaeb51a3b9757485679a6ad82a7de3fdac4e3a" } } } @@ -6586,11 +6686,11 @@ }, "responses": { "200": { - "description": "Committed push receipt with copy and deployment readiness.", + "description": "Committed fork receipt and resource-copy progress.", "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PushWorkspaceResponse" + "$ref": "#/components/schemas/ForkWorkspaceResponse" }, "examples": { "example1": { @@ -6598,9 +6698,9 @@ "value": { "data": { "operationId": "e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13", - "requestId": "push-support-2026-10-13", + "requestId": "fork-support-2026-10-13", "workspaceId": "9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94", - "kind": "workspace_push", + "kind": "workspace_fork", "applied": true, "status": "processing", "resourceIds": ["destination_workflow_id"], @@ -6642,11 +6742,11 @@ } } }, - "/api/v2/workspaces/{workspaceId}/fork/pull/preview": { + "/api/v2/workspaces/{workspaceId}/fork/push/preview": { "post": { - "operationId": "previewWorkspacePull", - "summary": "Preview workspace pull", - "description": "Preview changes from the other workspace into this workspace along a direct fork edge. Requires Admin access to both workspaces. The plan lists workflows to create, replace, or archive; replacements overwrite target drafts with the source deployment. Proposed mappings are not saved. Dependent choices use source workflow, block, and field IDs. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", + "operationId": "previewWorkspacePush", + "summary": "Preview workspace push", + "description": "Preview changes from this workspace into the other workspace along a direct fork edge. Requires Admin access to both workspaces. The plan lists workflows to create, replace, or archive; replacements overwrite target drafts with the source deployment. Proposed mappings are not saved. Dependent choices use source workflow, block, and field IDs. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", "x-sim-operation": "workspaces.fork.sync.preview", "x-oauth-scope": "api:write", "tags": ["Workspace Sync"], @@ -6678,14 +6778,225 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/PreviewWorkspacePullBody" + "$ref": "#/components/schemas/PreviewWorkspacePushBody" } } } }, "responses": { "200": { - "description": "Other-to-current workflow actions, required choices, and preview fingerprint.", + "description": "Current-to-other workflow actions, required choices, and preview fingerprint.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreviewWorkspacePushResponse" + }, + "examples": { + "example1": { + "summary": "Response example 1", + "value": { + "data": { + "previewFingerprint": "c7d158e8cbc5137a2d0a4fc37ddaeb51a3b9757485679a6ad82a7de3fdac4e3a", + "sourceWorkspaceId": "e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13", + "targetWorkspaceId": "9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94", + "ready": true, + "workflows": [], + "unresolvedBindings": [], + "configuration": [], + "excludedTargets": [], + "triggerSlots": [], + "triggerUrlChanges": [] + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "413": { + "$ref": "#/components/responses/PayloadTooLarge" + }, + "429": { + "$ref": "#/components/responses/RateLimited" + }, + "500": { + "$ref": "#/components/responses/InternalError" + }, + "503": { + "$ref": "#/components/responses/ServiceUnavailable" + } + } + } + }, + "/api/v2/workspaces/{workspaceId}/fork/push": { + "post": { + "operationId": "pushWorkspace", + "summary": "Push workspace", + "description": "Apply a reviewed sync from this workspace into the other workspace along a direct fork edge. Requires Admin access to both workspaces. Creates unmatched deployed workflows, overwrites mapped target drafts, and archives mapped targets whose sources were deleted or archived. Undeployed sources alone do not archive targets. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`.\n\nSend `confirm: true`, the fingerprint from a preview with identical choices, and a stable request ID. The example hash is illustrative. Changed or unresolved plans return `409` without applying. Identical retries return the committed operation; changed inputs with that ID return `409`. Copies and deployment activation can finish after the transaction commits. Poll Get workspace operation before treating the target as ready. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", + "x-sim-operation": "workspaces.fork.sync", + "x-oauth-scope": "api:write", + "tags": ["Workspace Sync"], + "security": [ + { + "apiKey": [] + }, + { + "oauthBearer": ["api:write"] + } + ], + "parameters": [ + { + "name": "workspaceId", + "in": "path", + "required": true, + "description": "Explicit current workspace scope.", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 128, + "description": "Explicit current workspace scope." + } + } + ], + "requestBody": { + "required": true, + "description": "Confirmed current-to-other choices, actual preview fingerprint, and stable request ID.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PushWorkspaceBody" + }, + "examples": { + "example1": { + "summary": "Request example 1", + "value": { + "otherWorkspaceId": "9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94", + "requestId": "push-support-2026-10-13", + "previewFingerprint": "c7d158e8cbc5137a2d0a4fc37ddaeb51a3b9757485679a6ad82a7de3fdac4e3a", + "confirm": true + } + } + } + } + } + }, + "responses": { + "200": { + "description": "Committed push receipt with copy and deployment readiness.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PushWorkspaceResponse" + }, + "examples": { + "example1": { + "summary": "Response example 1", + "value": { + "data": { + "operationId": "e4f8d2b6-9a1c-4e3d-8b7f-5c0a2d9e6f13", + "requestId": "push-support-2026-10-13", + "workspaceId": "9f4c2a10-3b7e-4d58-8f6a-2c1d0e5b7a94", + "kind": "workspace_push", + "applied": true, + "status": "processing", + "resourceIds": ["destination_workflow_id"], + "issues": [] + } + } + } + } + } + } + }, + "400": { + "$ref": "#/components/responses/BadRequest" + }, + "401": { + "$ref": "#/components/responses/Unauthorized" + }, + "403": { + "$ref": "#/components/responses/Forbidden" + }, + "404": { + "$ref": "#/components/responses/NotFound" + }, + "409": { + "$ref": "#/components/responses/Conflict" + }, + "413": { + "$ref": "#/components/responses/PayloadTooLarge" + }, + "429": { + "$ref": "#/components/responses/RateLimited" + }, + "500": { + "$ref": "#/components/responses/InternalError" + }, + "503": { + "$ref": "#/components/responses/ServiceUnavailable" + } + } + } + }, + "/api/v2/workspaces/{workspaceId}/fork/pull/preview": { + "post": { + "operationId": "previewWorkspacePull", + "summary": "Preview workspace pull", + "description": "Preview changes from the other workspace into this workspace along a direct fork edge. Requires Admin access to both workspaces. The plan lists workflows to create, replace, or archive; replacements overwrite target drafts with the source deployment. Proposed mappings are not saved. Dependent choices use source workflow, block, and field IDs. Billing-enabled deployments require Enterprise. Billing-disabled deployments require forking to be enabled by deployment feature configuration, such as `FORKING_ENABLED`. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", + "x-sim-operation": "workspaces.fork.sync.preview", + "x-oauth-scope": "api:write", + "tags": ["Workspace Sync"], + "security": [ + { + "apiKey": [] + }, + { + "oauthBearer": ["api:write"] + } + ], + "parameters": [ + { + "name": "workspaceId", + "in": "path", + "required": true, + "description": "Explicit current workspace scope.", + "schema": { + "type": "string", + "minLength": 1, + "maxLength": 128, + "description": "Explicit current workspace scope." + } + } + ], + "requestBody": { + "required": true, + "description": "Other workspace and proposed source-to-target sync choices.", + "content": { + "application/json": { + "schema": { + "$ref": "#/components/schemas/PreviewWorkspacePullBody" + } + } + } + }, + "responses": { + "200": { + "description": "Other-to-current workflow actions, required choices, and preview fingerprint.", "content": { "application/json": { "schema": { @@ -18681,6 +18992,856 @@ } ] }, + "CreateWorkflowFromSourceResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "workflowId": { + "type": "string", + "description": "Workflow id." + }, + "workspaceId": { + "type": "string", + "description": "Workspace id." + }, + "dryRun": { + "type": "boolean", + "description": "True when nothing was written because `dryRun` was set." + }, + "applied": { + "type": "boolean", + "description": "True only when the draft was written; false on a dry run and on a no-op." + }, + "diff": { + "type": "object", + "properties": { + "noop": { + "type": "boolean", + "description": "True when the source matches the saved draft." + }, + "blocks": { + "type": "object", + "properties": { + "added": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stored block id." + }, + "key": { + "type": "string", + "description": "Block key in the source." + } + }, + "required": ["id", "key"], + "additionalProperties": false, + "description": "A block by id and source key." + }, + "description": "New blocks." + }, + "removed": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stored block id." + }, + "key": { + "type": "string", + "description": "Block key in the source." + } + }, + "required": ["id", "key"], + "additionalProperties": false, + "description": "A block by id and source key." + }, + "description": "Deleted blocks." + }, + "renamed": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stored block id; unchanged by the rename." + }, + "from": { + "type": "string", + "description": "Previous key." + }, + "to": { + "type": "string", + "description": "New key." + } + }, + "required": ["id", "from", "to"], + "additionalProperties": false, + "description": "A renamed block." + }, + "description": "Renamed blocks; each keeps its id." + }, + "modified": { + "type": "array", + "items": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Stored block id." + }, + "key": { + "type": "string", + "description": "Block key in the source." + }, + "fields": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Changed fields, modes (`modes.`) and attributes." + }, + "reparented": { + "description": "Moved into or out of a container.", + "type": "boolean" + } + }, + "required": ["id", "key", "fields"], + "additionalProperties": false, + "description": "A changed block." + }, + "description": "Changed blocks." + } + }, + "required": ["added", "removed", "renamed", "modified"], + "additionalProperties": false, + "description": "Block changes." + }, + "edges": { + "type": "object", + "properties": { + "added": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Connections added." + }, + "removed": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Connections removed." + } + }, + "required": ["added", "removed"], + "additionalProperties": false, + "description": "Connection changes." + }, + "variables": { + "type": "object", + "properties": { + "added": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Variable keys added." + }, + "removed": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Variable keys removed." + }, + "modified": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Variable keys changed." + } + }, + "required": ["added", "removed", "modified"], + "additionalProperties": false, + "description": "Variable changes." + } + }, + "required": ["noop", "blocks", "edges", "variables"], + "additionalProperties": false, + "description": "What the apply changed, or would change on a dry run." + }, + "diagnostics": { + "type": "array", + "items": { + "type": "object", + "properties": { + "code": { + "type": "string", + "description": "Diagnostic code, e.g. `E_UNKNOWN_PARAM` or `E_APPLY_PROTECTED_BLOCK`." + }, + "severity": { + "type": "string", + "enum": ["error", "warning", "info"], + "description": "Diagnostic severity." + }, + "message": { + "type": "string", + "description": "What was found." + }, + "hint": { + "description": "How to address it.", + "type": "string" + }, + "file": { + "description": "Submitted file the finding is in.", + "type": "string" + }, + "line": { + "description": "1-based line in `file`.", + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "column": { + "description": "1-based column in `file`.", + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "endLine": { + "description": "1-based line the finding ends on.", + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "endColumn": { + "description": "1-based column the finding ends at.", + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991 + }, + "frame": { + "description": "The source lines around the finding, with a caret row.", + "type": "string" + }, + "blockKey": { + "description": "Block key the finding is about.", + "type": "string" + }, + "blockId": { + "description": "Stored id of the block the finding is about.", + "type": "string" + }, + "param": { + "description": "Field the finding is about.", + "type": "string" + }, + "path": { + "description": "JSON Pointer into the lock, for a lock finding.", + "type": "string" + } + }, + "required": ["code", "severity", "message"], + "additionalProperties": false, + "description": "A finding from applying workflow source, pinned to the submitted files." + }, + "description": "Warnings, and on a dry run every error a commit would refuse." + }, + "newFingerprint": { + "type": "string", + "description": "Fingerprint of the saved (or, on a dry run, would-be) draft: the next `baseFingerprint`." + }, + "files": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "The source re-printed from what was saved, including any normalized values." + }, + "lock": { + "type": "object", + "properties": { + "lockVersion": { + "type": "number", + "const": 1, + "description": "Lock format version." + }, + "blocks": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "object", + "properties": { + "id": { + "type": "string", + "description": "Block id." + }, + "parent": { + "anyOf": [ + { + "type": "string" + }, + { + "type": "null" + } + ], + "description": "Key of the enclosing loop or parallel, or null." + }, + "branches": { + "description": "Condition or router branch key → stored branch id.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + } + }, + "items": { + "description": "Per field, its id-bearing items (input format fields) in stored order.", + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Item name." + }, + "id": { + "type": "string", + "description": "Item id." + } + }, + "required": ["name", "id"], + "additionalProperties": false, + "description": "One id-bearing list item." + } + } + }, + "binding": { + "type": "string", + "description": "The `const` name the block is printed as." + }, + "order": { + "type": "integer", + "minimum": -9007199254740991, + "maximum": 9007199254740991, + "description": "Declaration-order tie-break." + }, + "layout": { + "type": "object", + "properties": { + "x": { + "type": "number", + "description": "Canvas x position." + }, + "y": { + "type": "number", + "description": "Canvas y position." + }, + "w": { + "description": "Container width.", + "type": "number" + }, + "h": { + "description": "Container height.", + "type": "number" + }, + "height": { + "description": "Stored block height.", + "type": "number" + }, + "horizontalHandles": { + "description": "Handles on the left and right.", + "type": "boolean" + } + }, + "required": ["x", "y"], + "additionalProperties": { + "description": "An `x-` extension field, kept verbatim." + }, + "description": "Stored canvas geometry; applied only to new blocks." + }, + "codeFile": { + "description": "Path of the block’s function-code file.", + "type": "string" + } + }, + "required": ["id", "parent", "binding", "order"], + "additionalProperties": { + "description": "An `x-` extension field, kept verbatim." + }, + "description": "One block’s identity." + }, + "description": "Block key → identity." + }, + "variables": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "Variable key → variable id." + } + }, + "required": ["lockVersion", "blocks", "variables"], + "additionalProperties": { + "description": "An `x-` extension field, kept verbatim." + }, + "description": "Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids." + }, + "lockBase": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "Workspace the workflow belongs to." + }, + "baseFingerprint": { + "type": "string", + "description": "The `fingerprint` this source was read at." + }, + "catalogHash": { + "type": "string", + "description": "Hash of the block catalog the source was printed against." + } + }, + "required": ["workspaceId", "baseFingerprint", "catalogHash"], + "additionalProperties": false, + "description": "Freshness facts for the lock in this environment (`.sim/base.json`)." + }, + "mintedIds": { + "type": "object", + "propertyNames": { + "type": "string" + }, + "additionalProperties": { + "type": "string" + }, + "description": "Block key → id for new blocks whose id was minted rather than taken from the lock." + }, + "warnings": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Non-fatal notes about the write." + }, + "needsRedeployment": { + "type": "boolean", + "description": "Whether the draft now differs from the live deployment; apply never deploys." + } + }, + "required": [ + "workflowId", + "workspaceId", + "dryRun", + "applied", + "diff", + "diagnostics", + "newFingerprint", + "files", + "lock", + "lockBase", + "mintedIds", + "warnings", + "needsRedeployment" + ], + "additionalProperties": false, + "description": "Response data." + } + }, + "required": ["data"], + "additionalProperties": false, + "title": "Create workflow from source response", + "description": "The outcome, with the source re-printed from the saved workflow.", + "examples": [ + { + "data": { + "workflowId": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "dryRun": false, + "applied": true, + "diff": { + "noop": false, + "blocks": { + "added": [ + { + "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "key": "start" + } + ], + "removed": [], + "renamed": [], + "modified": [] + }, + "edges": { + "added": 0, + "removed": 0 + }, + "variables": { + "added": [], + "removed": [], + "modified": [] + } + }, + "diagnostics": [], + "newFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "files": { + "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" + }, + "lock": { + "lockVersion": 1, + "blocks": { + "start": { + "id": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47", + "parent": null, + "binding": "start", + "order": 0 + } + }, + "variables": {} + }, + "lockBase": { + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" + }, + "mintedIds": { + "start": "5b0c2f7e-91d4-4a63-8e2b-0f6d3c9a1e47" + }, + "warnings": [], + "needsRedeployment": false + } + } + ] + }, + "CreateWorkflowFromSourceBody": { + "type": "object", + "properties": { + "files": { + "type": "object", + "propertyNames": { + "type": "string", + "minLength": 1, + "maxLength": 512 + }, + "additionalProperties": { + "type": "string" + }, + "description": "Relative path → file text: `workflow.ts` plus every function-code file it references (for example `functions/score.js`)." + }, + "name": { + "description": "Workflow name. Defaults to the name in the source's `workflow('…')` call.", + "type": "string", + "minLength": 1, + "maxLength": 255 + }, + "description": { + "description": "Workflow description. Defaults to the description in the source.", + "anyOf": [ + { + "type": "string", + "maxLength": 50000 + }, + { + "type": "null" + } + ] + }, + "folderPath": { + "$ref": "#/components/schemas/FolderPathInput" + }, + "provenance": { + "description": "Where the source came from, for the audit log.", + "type": "object", + "properties": { + "client": { + "type": "string", + "enum": ["cli", "copilot", "canvas", "api"], + "description": "What submitted the source." + }, + "gitSha": { + "description": "The commit the source was taken from; recorded in the audit log.", + "type": "string", + "pattern": "^[0-9a-f]{7,64}$" + }, + "repo": { + "description": "The repository the source was taken from.", + "type": "string", + "minLength": 1, + "maxLength": 512 + } + }, + "required": ["client"], + "additionalProperties": false + } + }, + "required": ["files"], + "additionalProperties": false, + "title": "Create workflow from source body", + "description": "Source files and where to create the workflow." + }, + "GetResourceManifestResponse": { + "type": "object", + "properties": { + "data": { + "type": "object", + "properties": { + "workspaceId": { + "type": "string", + "description": "Workspace id." + }, + "tables": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "The key workflow source names this resource by; it never changes once assigned." + }, + "id": { + "type": "string", + "description": "Resource id." + }, + "name": { + "type": "string", + "description": "Current display name." + }, + "columns": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Column name, as row data names it." + }, + "type": { + "type": "string", + "description": "Column type, e.g. `string`, `number`, `boolean`, `json`, `select`." + }, + "options": { + "description": "Option ids a `select` column accepts.", + "type": "array", + "items": { + "type": "string" + } + } + }, + "required": ["name", "type"], + "additionalProperties": false + }, + "description": "Columns in table order." + } + }, + "required": ["key", "id", "name", "columns"], + "additionalProperties": false, + "description": "A table: `table(key)`." + }, + "description": "Tables, oldest first." + }, + "knowledgeBases": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "The key workflow source names this resource by; it never changes once assigned." + }, + "id": { + "type": "string", + "description": "Resource id." + }, + "name": { + "type": "string", + "description": "Current display name." + } + }, + "required": ["key", "id", "name"], + "additionalProperties": false, + "description": "A knowledge base: `kb(key)`." + }, + "description": "Knowledge bases, oldest first." + }, + "bindings": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "The key workflow source names this resource by; it never changes once assigned." + }, + "id": { + "type": "string", + "description": "Resource id." + }, + "name": { + "type": "string", + "description": "Current display name." + }, + "service": { + "type": "string", + "description": "The provider the credential is for, e.g. `slack` or `google-email`." + } + }, + "required": ["key", "id", "name", "service"], + "additionalProperties": false, + "description": "A saved credential: `binding(key)`." + }, + "description": "Credential bindings, oldest first. Secrets are listed under `env`." + }, + "workflows": { + "type": "array", + "items": { + "type": "object", + "properties": { + "key": { + "type": "string", + "description": "The key workflow source names this resource by; it never changes once assigned." + }, + "id": { + "type": "string", + "description": "Resource id." + }, + "name": { + "type": "string", + "description": "Current display name." + }, + "inputs": { + "type": "array", + "items": { + "type": "object", + "properties": { + "name": { + "type": "string", + "description": "Input field name." + }, + "type": { + "type": "string", + "description": "Input field type, e.g. `string` or `number`." + } + }, + "required": ["name", "type"], + "additionalProperties": false + }, + "description": "Inputs the workflow start block declares." + } + }, + "required": ["key", "id", "name", "inputs"], + "additionalProperties": false, + "description": "A workflow: `workflow(key)`." + }, + "description": "Workflows, oldest first." + }, + "env": { + "type": "array", + "items": { + "type": "string" + }, + "description": "Environment variable names a run can read as `env.NAME`: the workspace secrets and, for a user, their personal ones. Never values." + }, + "truncated": { + "type": "boolean", + "description": "True when a kind had more than 1000 resources; only the oldest 1000 of that kind are listed." + } + }, + "required": [ + "workspaceId", + "tables", + "knowledgeBases", + "bindings", + "workflows", + "env", + "truncated" + ], + "additionalProperties": false, + "description": "Response data." + } + }, + "required": ["data"], + "additionalProperties": false, + "title": "Get resource manifest response", + "description": "The workspace resources workflow source can name.", + "examples": [ + { + "data": { + "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "tables": [ + { + "key": "tickets", + "id": "tbl_4f1c2a9e", + "name": "Tickets", + "columns": [ + { + "name": "subject", + "type": "string" + }, + { + "name": "status", + "type": "select", + "options": ["open", "closed"] + } + ] + } + ], + "knowledgeBases": [ + { + "key": "docs", + "id": "kb_93a1e7c2", + "name": "Docs" + } + ], + "bindings": [ + { + "key": "support-slack", + "id": "cred_51d0b8f4", + "name": "Support Slack", + "service": "slack" + } + ], + "workflows": [ + { + "key": "assign-owner", + "id": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", + "name": "Assign owner", + "inputs": [ + { + "name": "leads", + "type": "array" + } + ] + } + ], + "env": ["CRM_KEY"], + "truncated": false + } + } + ] + }, "WorkspaceForkPreview": { "type": "object", "properties": { diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts index 1540d069aa1..4959b5e851a 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts @@ -1,12 +1,10 @@ -import { isUserCredentialPrincipal, type Principal } from '@sim/auth/principal' import { v2ApplyWorkflowSourceContract, v2GetWorkflowSourceContract, } from '@/lib/api/contracts/v2/workflow-source' import { defineV2JsonRoute, v2ApiKeyAuth, v2RateLimits } from '@/lib/api/server/routes' -import type { WorkflowWriteSource } from '@/lib/posthog/events' import { captureServerEvent } from '@/lib/posthog/server' -import { v2WorkflowErrorPolicies } from '@/lib/workflows/api' +import { sourceWriteActor, v2WorkflowErrorPolicies } from '@/lib/workflows/api' import { applyWorkflowSource } from '@/lib/workflows/application/apply-workflow-source' import { getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' import { workflowOperations } from '@/lib/workflows/application/operations' @@ -35,20 +33,6 @@ export const GET = defineV2JsonRoute({ present: (source) => ({ data: source }), }) -/** The user a source apply is attributed to in analytics, and the surface it came through. */ -function sourceActor( - principal: Principal, - client: string | undefined -): { userId: string; source: WorkflowWriteSource } | null { - if (isUserCredentialPrincipal(principal)) { - return { userId: principal.userId, source: client === 'cli' ? 'cli' : 'api' } - } - if (principal.kind === 'delegated' && principal.serviceId === 'copilot') { - return { userId: principal.subjectUserId, source: 'copilot' } - } - return null -} - /** * POST /api/v2/workflows/[workflowId]/source — writes TypeScript source to the draft in one * all-or-nothing write. Error diagnostics answer 400, a stale fingerprint 409, a locked workflow @@ -98,7 +82,7 @@ export const POST = defineV2JsonRoute({ */ onSuccess: ({ principal, input, result }) => { if (!result.applied) return - const actor = sourceActor(principal, input.provenance?.client) + const actor = sourceWriteActor(principal, input.provenance?.client) if (!actor) return const { blocks, edges, variables } = result.diff captureServerEvent( diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.test.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.test.ts new file mode 100644 index 00000000000..6ee70c74d17 --- /dev/null +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.test.ts @@ -0,0 +1,111 @@ +import { + V2_OPERATION_RATE_LIMIT_ALLOWED, + V2_PREAUTH_RATE_LIMIT_ALLOWED, + v2ApiKeyAuthModuleMock, + v2RateLimiterModuleMock, + v2RouteMocks, +} from '@sim/testing' +import { NextRequest } from 'next/server' +import { beforeEach, describe, expect, it, vi } from 'vitest' +import { OrchestrationError } from '@/lib/core/orchestration/types' + +const mocks = vi.hoisted(() => ({ read: vi.fn() })) + +vi.mock('@/lib/api/server/routes/v2-api-key-auth', () => v2ApiKeyAuthModuleMock) +vi.mock('@/lib/core/rate-limiter', () => v2RateLimiterModuleMock) +vi.mock('@/lib/workflows/code/resource-manifest', () => ({ + readResourceManifest: { + operation: { id: 'workflows.code.resource_manifest.read' }, + execute: mocks.read, + }, +})) + +import { GET } from '@/app/api/v2/workspaces/[workspaceId]/resource-manifest/route' + +const WORKSPACE_ID = '11111111-2222-4333-8444-555555555555' + +const auth = { + principal: { + kind: 'workspace_api_key' as const, + workspaceId: WORKSPACE_ID, + keyId: 'key-1', + access: 'read' as const, + }, + rateLimitSubjectIds: ['api-key:key-1', `workspace:${WORKSPACE_ID}`] as const, + rateLimitSubscription: null, + keyType: 'workspace' as const, +} + +const manifest = { + workspaceId: WORKSPACE_ID, + tables: [ + { + key: 'tickets', + id: 'tbl-1', + name: 'Tickets', + columns: [ + { name: 'subject', type: 'string' }, + { name: 'status', type: 'select', options: ['open', 'closed'] }, + ], + }, + ], + knowledgeBases: [{ key: 'docs', id: 'kb-1', name: 'Docs' }], + bindings: [{ key: 'support-slack', id: 'cred-1', name: 'Support Slack', service: 'slack' }], + workflows: [ + { + key: 'assign-owner', + id: 'wf-1', + name: 'Assign owner', + inputs: [{ name: 'leads', type: 'array' }], + }, + ], + env: ['CRM_KEY'], + truncated: false, +} + +function request(query = '') { + return new NextRequest( + `http://localhost:3000/api/v2/workspaces/${WORKSPACE_ID}/resource-manifest${query}`, + { headers: { 'x-api-key': 'key' } } + ) +} + +const context = { params: Promise.resolve({ workspaceId: WORKSPACE_ID }) } + +describe('GET /api/v2/workspaces/{workspaceId}/resource-manifest', () => { + beforeEach(() => { + v2RouteMocks.authenticate.mockResolvedValue(auth) + v2RouteMocks.preauthRate.mockResolvedValue(V2_PREAUTH_RATE_LIMIT_ALLOWED) + v2RouteMocks.operationRate.mockResolvedValue(V2_OPERATION_RATE_LIMIT_ALLOWED) + mocks.read.mockResolvedValue(manifest) + }) + + it('returns the manifest the use case read, for the workspace in the path', async () => { + const response = await GET(request(), context) + + expect(response.status).toBe(200) + expect(response.headers.get('cache-control')).toBe('private, no-store') + expect((await response.json()).data).toEqual(manifest) + expect(mocks.read).toHaveBeenCalledWith( + expect.objectContaining({ input: { workspaceId: WORKSPACE_ID } }) + ) + }) + + it('rejects an unknown query parameter before reading anything', async () => { + const response = await GET(request('?workflowId=wf-1'), context) + + expect(response.status).toBe(400) + expect(mocks.read).not.toHaveBeenCalled() + }) + + it('answers 403 while code-first workflows are off', async () => { + mocks.read.mockRejectedValueOnce( + new OrchestrationError('forbidden', 'Code-first workflows are not enabled') + ) + + const response = await GET(request(), context) + + expect(response.status).toBe(403) + expect((await response.json()).error.code).toBe('FORBIDDEN') + }) +}) diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.ts new file mode 100644 index 00000000000..0a5179ba48e --- /dev/null +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.ts @@ -0,0 +1,24 @@ +import { v2GetResourceManifestContract } from '@/lib/api/contracts/v2/resource-manifest' +import { defineV2JsonRoute, v2ApiKeyAuth, v2RateLimits } from '@/lib/api/server/routes' +import { workflowCodeOperations } from '@/lib/workflows/code/operations' +import { readResourceManifest } from '@/lib/workflows/code/resource-manifest' +import { catalogErrorPolicy } from '@/app/api/v2/lib/catalog' + +export const dynamic = 'force-dynamic' +export const revalidate = 0 + +/** + * GET /api/v2/workspaces/{workspaceId}/resource-manifest — the tables, knowledge bases, credential + * bindings, workflows and env names workflow source can name, by key. Answers 403 while the + * `workflow-code` flag is off. + */ +export const GET = defineV2JsonRoute({ + contract: v2GetResourceManifestContract, + auth: v2ApiKeyAuth, + operation: workflowCodeOperations.readResourceManifest, + rateLimit: v2RateLimits.publicApi, + errorPolicy: catalogErrorPolicy, + mapInput: ({ params }) => ({ workspaceId: params.workspaceId }), + useCase: readResourceManifest, + present: (manifest) => ({ data: manifest }), +}) diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.test.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.test.ts new file mode 100644 index 00000000000..3037dd3bd53 --- /dev/null +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.test.ts @@ -0,0 +1,173 @@ +import { + V2_OPERATION_RATE_LIMIT_ALLOWED, + V2_PREAUTH_RATE_LIMIT_ALLOWED, + v2ApiKeyAuthModuleMock, + v2RateLimiterModuleMock, + v2RouteMocks, +} from '@sim/testing' +import { posthogServerMock, posthogServerMockFns } from '@sim/testing/mocks/posthog-server.mock' +import { NextRequest } from 'next/server' +import { beforeEach, describe, expect, it, vi } from 'vitest' + +const mocks = vi.hoisted(() => ({ create: vi.fn() })) + +vi.mock('@/lib/api/server/routes/v2-api-key-auth', () => v2ApiKeyAuthModuleMock) +vi.mock('@/lib/core/rate-limiter', () => v2RateLimiterModuleMock) +vi.mock('@/lib/workflows/application/apply-workflow-source', () => ({ + createWorkflowFromSource: { + operation: { id: 'workflows.source.create' }, + execute: mocks.create, + }, +})) +vi.mock('@/lib/posthog/server', () => posthogServerMock) + +import { OrchestrationError } from '@/lib/core/orchestration/types' +import { WorkflowSourceRejectedError } from '@/lib/workflows/application/source-error' +import { POST } from '@/app/api/v2/workspaces/[workspaceId]/workflows/source/route' + +const WORKSPACE_ID = '11111111-2222-4333-8444-555555555555' +const WORKFLOW_ID = '66666666-7777-4888-9999-000000000000' +const FINGERPRINT = `sf1:${'c'.repeat(64)}` + +const auth = { + principal: { kind: 'personal_api_key' as const, userId: 'user-1', keyId: 'key-2' }, + rateLimitSubjectIds: ['api-key:key-2'] as const, + rateLimitSubscription: null, + keyType: 'personal' as const, +} + +const files = { + 'workflow.ts': + "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Triage', () => {\n trigger.start('Start')\n})\n", +} + +const created = { + workflowId: WORKFLOW_ID, + workflowName: 'Triage', + workspaceId: WORKSPACE_ID, + dryRun: false, + applied: true, + diff: { + noop: false, + blocks: { added: [{ id: 'b-1', key: 'start' }], removed: [], renamed: [], modified: [] }, + edges: { added: 0, removed: 0 }, + variables: { added: [], removed: [], modified: [] }, + }, + diagnostics: [], + newFingerprint: FINGERPRINT, + files, + lock: { + lockVersion: 1 as const, + blocks: { start: { id: 'b-1', parent: null, binding: 'start', order: 0 } }, + variables: {}, + }, + lockBase: { workspaceId: WORKSPACE_ID, baseFingerprint: FINGERPRINT, catalogHash: 'h' }, + mintedIds: { start: 'b-1' }, + warnings: [], + needsRedeployment: false, + sdkMajor: 1, + catalogVersion: 'h', +} + +function createRequest(body: unknown, query = '') { + return new NextRequest( + `http://localhost:3000/api/v2/workspaces/${WORKSPACE_ID}/workflows/source${query}`, + { + method: 'POST', + headers: { 'x-api-key': 'key', 'content-type': 'application/json' }, + body: JSON.stringify(body), + } + ) +} + +const context = { params: Promise.resolve({ workspaceId: WORKSPACE_ID }) } + +describe('POST /api/v2/workspaces/{workspaceId}/workflows/source', () => { + beforeEach(() => { + v2RouteMocks.authenticate.mockResolvedValue(auth) + v2RouteMocks.preauthRate.mockResolvedValue(V2_PREAUTH_RATE_LIMIT_ALLOWED) + v2RouteMocks.operationRate.mockResolvedValue(V2_OPERATION_RATE_LIMIT_ALLOWED) + mocks.create.mockResolvedValue(created) + }) + + it('creates in the workspace named by the path and returns the new id, files and lock', async () => { + const response = await POST( + createRequest({ files, name: 'Triage', folderPath: 'Ops' }), + context + ) + + expect(response.status).toBe(200) + expect(mocks.create.mock.calls[0][0].input).toEqual({ + workspaceId: WORKSPACE_ID, + files, + name: 'Triage', + folderPath: '/Ops', + }) + const { data } = await response.json() + expect(data.workflowId).toBe(WORKFLOW_ID) + expect(data.lock).toEqual(created.lock) + expect(data.files).toEqual(files) + }) + + it('answers 400 with the line-pinned diagnostics of refused source', async () => { + const diagnostic = { + code: 'E_UNKNOWN_PARAM' as const, + severity: 'error' as const, + message: 'Slack has no param credential.', + file: 'workflow.ts', + line: 5, + column: 3, + } + mocks.create.mockRejectedValue(new WorkflowSourceRejectedError([diagnostic])) + + const response = await POST(createRequest({ files }), context) + + expect(response.status).toBe(400) + expect((await response.json()).error.details).toEqual({ + code: 'SOURCE_REJECTED', + diagnostics: [diagnostic], + }) + }) + + it('answers 409 when the name is taken in the folder', async () => { + mocks.create.mockRejectedValue( + new OrchestrationError('conflict', 'A workflow named "Triage" already exists in this folder') + ) + + const response = await POST(createRequest({ files }), context) + + expect(response.status).toBe(409) + }) + + it.each([ + ['a lock, which a new workflow has no use for', { files, lock: created.lock }], + ['files without workflow.ts', { files: { 'functions/a.js': 'return 1' } }], + ['an empty name', { files, name: ' ' }], + ])('rejects %s with 400 before creating', async (_label, body) => { + const response = await POST(createRequest(body), context) + + expect(response.status).toBe(400) + expect(mocks.create).not.toHaveBeenCalled() + }) + + it('passes dryRun through and keeps an uncommitted create out of analytics', async () => { + mocks.create.mockResolvedValue({ ...created, dryRun: true, applied: false }) + + const response = await POST(createRequest({ files }, '?dryRun=true'), context) + + expect(response.status).toBe(200) + expect(mocks.create.mock.calls[0][0].input).toMatchObject({ dryRun: true }) + expect(posthogServerMockFns.mockCaptureServerEvent).not.toHaveBeenCalled() + }) + + it('records workflow_source_applied for a create the CLI committed', async () => { + await POST(createRequest({ files, provenance: { client: 'cli' } }), context) + + expect(posthogServerMockFns.mockCaptureServerEvent).toHaveBeenCalledWith( + 'user-1', + 'workflow_source_applied', + { workflow_id: WORKFLOW_ID, workspace_id: WORKSPACE_ID, source: 'cli', ok: true, ops: 1 }, + { groups: { workspace: WORKSPACE_ID } } + ) + }) +}) diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.ts new file mode 100644 index 00000000000..e56b34c4a68 --- /dev/null +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.ts @@ -0,0 +1,70 @@ +import { v2CreateWorkflowFromSourceContract } from '@/lib/api/contracts/v2/workflow-source' +import { defineV2JsonRoute, v2ApiKeyAuth, v2RateLimits } from '@/lib/api/server/routes' +import { captureServerEvent } from '@/lib/posthog/server' +import { sourceWriteActor, v2WorkflowErrorPolicies } from '@/lib/workflows/api' +import { createWorkflowFromSource } from '@/lib/workflows/application/apply-workflow-source' +import { workflowOperations } from '@/lib/workflows/application/operations' +import { MAX_IMPORT_BODY_BYTES } from '@/lib/workflows/operations/import-workflow' + +export const dynamic = 'force-dynamic' +export const revalidate = 0 + +/** + * POST /api/v2/workspaces/[workspaceId]/workflows/source — creates a workflow from TypeScript + * source through the same pipeline and checks as an apply, in one all-or-nothing write. Error + * diagnostics answer 400 and nothing is created; a dry run answers 200 with its diagnostics and + * creates nothing. Answers 403 while the `workflow-code` flag is off. + */ +export const POST = defineV2JsonRoute({ + contract: v2CreateWorkflowFromSourceContract, + auth: v2ApiKeyAuth, + operation: workflowOperations.createFromSource, + rateLimit: v2RateLimits.publicApi, + errorPolicy: v2WorkflowErrorPolicies.concealWorkspaceSourceCreate, + parseOptions: { maxBodyBytes: MAX_IMPORT_BODY_BYTES }, + mapInput: ({ params, query, body }) => ({ + workspaceId: params.workspaceId, + files: body.files, + ...(body.name !== undefined ? { name: body.name } : {}), + ...(body.description !== undefined ? { description: body.description } : {}), + ...(body.folderPath !== undefined ? { folderPath: body.folderPath } : {}), + ...(body.provenance ? { provenance: body.provenance } : {}), + ...(query.dryRun !== undefined ? { dryRun: query.dryRun } : {}), + }), + useCase: createWorkflowFromSource, + present: (result) => ({ + data: { + workflowId: result.workflowId, + workspaceId: result.workspaceId, + dryRun: result.dryRun, + applied: result.applied, + diff: result.diff, + diagnostics: result.diagnostics, + newFingerprint: result.newFingerprint, + files: result.files, + lock: result.lock, + lockBase: result.lockBase, + mintedIds: result.mintedIds, + warnings: result.warnings, + needsRedeployment: result.needsRedeployment, + }, + }), + /** Telemetry only, for a create that wrote a workflow; same attribution as an apply. */ + onSuccess: ({ principal, input, result }) => { + if (!result.applied) return + const actor = sourceWriteActor(principal, input.provenance?.client) + if (!actor) return + captureServerEvent( + actor.userId, + 'workflow_source_applied', + { + workflow_id: result.workflowId, + workspace_id: result.workspaceId, + source: actor.source, + ok: true, + ops: result.diff.blocks.added.length + result.diff.edges.added, + }, + { groups: { workspace: result.workspaceId } } + ) + }, +}) diff --git a/apps/sim/lib/api/contracts/v2/openapi/resource-manifest.ts b/apps/sim/lib/api/contracts/v2/openapi/resource-manifest.ts new file mode 100644 index 00000000000..175030e281b --- /dev/null +++ b/apps/sim/lib/api/contracts/v2/openapi/resource-manifest.ts @@ -0,0 +1,69 @@ +import { + documentedSchema, + RATE_LIMIT_HEADERS, + RESOURCE_ERRORS, +} from '@/lib/api/contracts/v2/openapi/shared' +import { v2GetResourceManifestContract } from '@/lib/api/contracts/v2/resource-manifest' +import { defineOpenApiRoute } from '@/lib/api/openapi/types' +import { workflowCodeOperations } from '@/lib/workflows/code/operations' + +const RESOURCE_MANIFEST_EXAMPLE = { + workspaceId: '7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28', + tables: [ + { + key: 'tickets', + id: 'tbl_4f1c2a9e', + name: 'Tickets', + columns: [ + { name: 'subject', type: 'string' }, + { name: 'status', type: 'select', options: ['open', 'closed'] }, + ], + }, + ], + knowledgeBases: [{ key: 'docs', id: 'kb_93a1e7c2', name: 'Docs' }], + bindings: [ + { key: 'support-slack', id: 'cred_51d0b8f4', name: 'Support Slack', service: 'slack' }, + ], + workflows: [ + { + key: 'assign-owner', + id: '3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8', + name: 'Assign owner', + inputs: [{ name: 'leads', type: 'array' }], + }, + ], + env: ['CRM_KEY'], + truncated: false, +} + +export const resourceManifestOpenApiRoutes = [ + defineOpenApiRoute( + v2GetResourceManifestContract, + { + applicationOperation: workflowCodeOperations.readResourceManifest, + operationId: 'getResourceManifest', + summary: 'Get resource manifest', + description: + 'List the workspace resources workflow source can name, each with the key source uses for it: tables with their columns, knowledge bases, saved credentials with their provider, workflows with their start-block inputs, and the names (never values) of the environment variables a run can read. A resource keeps its key when renamed; one that no source has named yet is given its key by this call. Each kind lists its oldest 1000 resources, and `truncated` says when there were more. Returns `403` while code-first workflows are not enabled.', + tags: ['Workflows'], + errors: RESOURCE_ERRORS, + success: { description: 'The resource manifest.', headers: RATE_LIMIT_HEADERS }, + }, + { + query: v2GetResourceManifestContract.query, + params: documentedSchema( + v2GetResourceManifestContract.params, + 'GetResourceManifestParams', + 'Get resource manifest path parameters', + 'Workspace whose resources to list.' + ), + response: documentedSchema( + v2GetResourceManifestContract.response.schema, + 'GetResourceManifestResponse', + 'Get resource manifest response', + 'The workspace resources workflow source can name.', + [{ data: RESOURCE_MANIFEST_EXAMPLE }] + ), + } + ), +] diff --git a/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts index a8d29033566..f34ad146c9c 100644 --- a/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts +++ b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts @@ -7,6 +7,7 @@ import { } from '@/lib/api/contracts/v2/openapi/shared' import { v2ApplyWorkflowSourceContract, + v2CreateWorkflowFromSourceContract, v2GetWorkflowSourceContract, } from '@/lib/api/contracts/v2/workflow-source' import { defineOpenApiRoute } from '@/lib/api/openapi/types' @@ -136,4 +137,72 @@ export const workflowSourceOpenApiRoutes = [ ), } ), + defineOpenApiRoute( + v2CreateWorkflowFromSourceContract, + { + applicationOperation: workflowOperations.createFromSource, + operationId: 'createWorkflowFromSource', + summary: 'Create workflow from source', + description: `Create a workflow from TypeScript workflow source in one all-or-nothing write. Requires workspace write access. The source is compiled and checked against the same rules as Apply Workflow Source; every block is new. Any error returns \`400\` with \`details.code\` \`SOURCE_REJECTED\` and \`details.diagnostics\` (each with a file, line and column), and nothing is created. The name defaults to the one in the source's \`workflow('…')\` call; a name already used in the folder returns \`409\`. The response carries the new \`workflowId\` and the source re-printed from what was saved, with its lock and fingerprint, ready for the next apply. The workflow is not deployed. \`dryRun=true\` runs every check without creating anything and always returns \`200\`. Returns \`403\` while code-first workflows are not enabled. ${WORKSPACE_API_KEY_DENIED}`, + tags: ['Workflows'], + errors: RESOURCE_MUTATION_ERRORS, + success: { description: 'The created (or evaluated) workflow.', headers: RATE_LIMIT_HEADERS }, + }, + { + params: documentedSchema( + v2CreateWorkflowFromSourceContract.params, + 'CreateWorkflowFromSourceParams', + 'Create workflow from source path parameters', + 'Workspace in which to create the workflow.' + ), + query: documentedSchema( + v2CreateWorkflowFromSourceContract.query, + 'CreateWorkflowFromSourceQuery', + 'Create workflow from source query', + 'Whether to evaluate without creating.' + ), + body: documentedSchema( + v2CreateWorkflowFromSourceContract.body, + 'CreateWorkflowFromSourceBody', + 'Create workflow from source body', + 'Source files and where to create the workflow.', + [{ files: WORKFLOW_SOURCE_EXAMPLE.files, folderPath: '/Operations' }] + ), + response: documentedSchema( + v2CreateWorkflowFromSourceContract.response.schema, + 'CreateWorkflowFromSourceResponse', + 'Create workflow from source response', + 'The outcome, with the source re-printed from the saved workflow.', + [ + { + data: { + workflowId: WORKFLOW_SOURCE_EXAMPLE.workflowId, + workspaceId: WORKFLOW_SOURCE_EXAMPLE.workspaceId, + dryRun: false, + applied: true, + diff: { + noop: false, + blocks: { + added: [{ id: BLOCK_ID, key: 'start' }], + removed: [], + renamed: [], + modified: [], + }, + edges: { added: 0, removed: 0 }, + variables: { added: [], removed: [], modified: [] }, + }, + diagnostics: [], + newFingerprint: FINGERPRINT, + files: WORKFLOW_SOURCE_EXAMPLE.files, + lock: WORKFLOW_SOURCE_EXAMPLE.lock, + lockBase: WORKFLOW_SOURCE_EXAMPLE.lockBase, + mintedIds: { start: BLOCK_ID }, + warnings: [], + needsRedeployment: false, + }, + }, + ] + ), + } + ), ] diff --git a/apps/sim/lib/api/contracts/v2/openapi/workflows.ts b/apps/sim/lib/api/contracts/v2/openapi/workflows.ts index 25771b4848a..9b3a3f0c081 100644 --- a/apps/sim/lib/api/contracts/v2/openapi/workflows.ts +++ b/apps/sim/lib/api/contracts/v2/openapi/workflows.ts @@ -5,6 +5,7 @@ import { v2ListChatDeploymentsContract, v2ReplaceWorkflowChatDeploymentContract, } from '@/lib/api/contracts/v2/chat-deployments' +import { resourceManifestOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/resource-manifest' import { documentedSchema, ERROR_RESPONSES, @@ -1813,5 +1814,10 @@ export const workflowsOpenApiDocument = defineOpenApiDocument({ headers: { ...V2_BINARY_DOWNLOAD_HEADERS, ...V2_COMMON_HEADERS }, errorSchema: V2_ERROR_SCHEMA, errorResponses: ERROR_RESPONSES, - routes: [...routes, ...workflowSourceOpenApiRoutes, ...workspaceSyncOpenApiRoutes], + routes: [ + ...routes, + ...workflowSourceOpenApiRoutes, + ...resourceManifestOpenApiRoutes, + ...workspaceSyncOpenApiRoutes, + ], }) diff --git a/apps/sim/lib/api/contracts/v2/resource-manifest.ts b/apps/sim/lib/api/contracts/v2/resource-manifest.ts new file mode 100644 index 00000000000..1f7552a8320 --- /dev/null +++ b/apps/sim/lib/api/contracts/v2/resource-manifest.ts @@ -0,0 +1,95 @@ +import { z } from 'zod' +import { noInputSchema, workspaceIdSchema } from '@/lib/api/contracts/primitives' +import { defineRouteContract } from '@/lib/api/contracts/types' +import { v2DataResponse } from '@/lib/api/contracts/v2/shared' + +const v2ResourceManifestParamsSchema = z + .object({ workspaceId: workspaceIdSchema.describe('Workspace whose resources to list.') }) + .strict() + +const resourceKeySchema = z + .string() + .describe('The key workflow source names this resource by; it never changes once assigned.') + +const manifestResourceSchema = z.object({ + key: resourceKeySchema, + id: z.string().describe('Resource id.'), + name: z.string().describe('Current display name.'), +}) + +const resourceManifestSchema = z + .object({ + workspaceId: z.string().describe('Workspace id.'), + tables: z + .array( + manifestResourceSchema + .extend({ + columns: z + .array( + z.object({ + name: z.string().describe('Column name, as row data names it.'), + type: z + .string() + .describe('Column type, e.g. `string`, `number`, `boolean`, `json`, `select`.'), + options: z + .array(z.string()) + .optional() + .describe('Option ids a `select` column accepts.'), + }) + ) + .describe('Columns in table order.'), + }) + .describe('A table: `table(key)`.') + ) + .describe('Tables, oldest first.'), + knowledgeBases: z + .array(manifestResourceSchema.describe('A knowledge base: `kb(key)`.')) + .describe('Knowledge bases, oldest first.'), + bindings: z + .array( + manifestResourceSchema + .extend({ + service: z + .string() + .describe('The provider the credential is for, e.g. `slack` or `google-email`.'), + }) + .describe('A saved credential: `binding(key)`.') + ) + .describe('Credential bindings, oldest first. Secrets are listed under `env`.'), + workflows: z + .array( + manifestResourceSchema + .extend({ + inputs: z + .array( + z.object({ + name: z.string().describe('Input field name.'), + type: z.string().describe('Input field type, e.g. `string` or `number`.'), + }) + ) + .describe('Inputs the workflow start block declares.'), + }) + .describe('A workflow: `workflow(key)`.') + ) + .describe('Workflows, oldest first.'), + env: z + .array(z.string()) + .describe( + 'Environment variable names a run can read as `env.NAME`: the workspace secrets and, for a user, their personal ones. Never values.' + ), + truncated: z + .boolean() + .describe( + 'True when a kind had more than 1000 resources; only the oldest 1000 of that kind are listed.' + ), + }) + .describe('The workspace resources workflow source can name, by key.') + +/** `GET /api/v2/workspaces/{workspaceId}/resource-manifest`: resources workflow source can name. */ +export const v2GetResourceManifestContract = defineRouteContract({ + method: 'GET', + path: '/api/v2/workspaces/[workspaceId]/resource-manifest', + params: v2ResourceManifestParamsSchema, + query: noInputSchema, + response: { mode: 'json', schema: v2DataResponse(resourceManifestSchema) }, +}) diff --git a/apps/sim/lib/api/contracts/v2/workflow-source.ts b/apps/sim/lib/api/contracts/v2/workflow-source.ts index c5dd1a85f35..79447b65499 100644 --- a/apps/sim/lib/api/contracts/v2/workflow-source.ts +++ b/apps/sim/lib/api/contracts/v2/workflow-source.ts @@ -1,7 +1,7 @@ import { z } from 'zod' -import { booleanQueryFlagSchema } from '@/lib/api/contracts/primitives' +import { booleanQueryFlagSchema, workspaceIdSchema } from '@/lib/api/contracts/primitives' import { defineRouteContract } from '@/lib/api/contracts/types' -import { v2DataResponse } from '@/lib/api/contracts/v2/shared' +import { v2DataResponse, v2FolderPathInputSchema } from '@/lib/api/contracts/v2/shared' import { v2WorkflowIdParamsSchema } from '@/lib/api/contracts/v2/workflows' import { lockBaseSchema, @@ -52,6 +52,29 @@ const sourceFilesSchema = z 'Relative path → file text: `workflow.ts` plus every function-code file it references (for example `functions/score.js`).' ) +const provenanceSchema = z + .object({ + client: z + .enum(['cli', 'copilot', 'canvas', 'api'], { + error: 'provenance.client: expected one of "cli" | "copilot" | "canvas" | "api"', + }) + .describe('What submitted the source.'), + gitSha: z + .string() + .regex(/^[0-9a-f]{7,64}$/, 'provenance.gitSha must be a hexadecimal commit hash') + .optional() + .describe('The commit the source was taken from; recorded in the audit log.'), + repo: z + .string() + .min(1, 'provenance.repo cannot be empty') + .max(512, 'provenance.repo is too long') + .optional() + .describe('The repository the source was taken from.'), + }) + .strict() + .optional() + .describe('Where the source came from, for the audit log.') + const applyWorkflowSourceBodySchema = z .object({ files: sourceFilesSchema, @@ -72,28 +95,7 @@ const applyWorkflowSourceBodySchema = z .describe( '`preserve` (default): existing blocks keep their canvas positions and lock positions apply only to new blocks. `lock`: every block the lock positions moves there.' ), - provenance: z - .object({ - client: z - .enum(['cli', 'copilot', 'canvas', 'api'], { - error: 'provenance.client: expected one of "cli" | "copilot" | "canvas" | "api"', - }) - .describe('What submitted the source.'), - gitSha: z - .string() - .regex(/^[0-9a-f]{7,64}$/, 'provenance.gitSha must be a hexadecimal commit hash') - .optional() - .describe('The commit the source was taken from; recorded in the audit log.'), - repo: z - .string() - .min(1, 'provenance.repo cannot be empty') - .max(512, 'provenance.repo is too long') - .optional() - .describe('The repository the source was taken from.'), - }) - .strict() - .optional() - .describe('Where the source came from, for the audit log.'), + provenance: provenanceSchema, }) .strict() @@ -216,3 +218,43 @@ export const v2ApplyWorkflowSourceContract = defineRouteContract({ body: applyWorkflowSourceBodySchema, response: { mode: 'json', schema: v2DataResponse(applyWorkflowSourceDataSchema) }, }) + +const createWorkflowFromSourceParamsSchema = z + .object({ + workspaceId: workspaceIdSchema.describe('Workspace in which to create the workflow.'), + }) + .strict() + +const createWorkflowFromSourceBodySchema = z + .object({ + files: sourceFilesSchema, + name: z + .string() + .trim() + .min(1, 'name cannot be empty') + .max(255, 'name is too long') + .optional() + .describe("Workflow name. Defaults to the name in the source's `workflow('…')` call."), + description: z + .string() + .max(50_000, 'description is too long') + .nullable() + .optional() + .describe('Workflow description. Defaults to the description in the source.'), + folderPath: v2FolderPathInputSchema.optional(), + provenance: provenanceSchema, + }) + .strict() + +/** + * `POST /api/v2/workspaces/{workspaceId}/workflows/source`: create a workflow from TypeScript + * source, through the same checks as an apply. + */ +export const v2CreateWorkflowFromSourceContract = defineRouteContract({ + method: 'POST', + path: '/api/v2/workspaces/[workspaceId]/workflows/source', + params: createWorkflowFromSourceParamsSchema, + query: applyWorkflowSourceQuerySchema, + body: createWorkflowFromSourceBodySchema, + response: { mode: 'json', schema: v2DataResponse(applyWorkflowSourceDataSchema) }, +}) diff --git a/apps/sim/lib/api/mcp/generated/v2-operations.ts b/apps/sim/lib/api/mcp/generated/v2-operations.ts index 5138af2e7fd..82976db97ca 100644 --- a/apps/sim/lib/api/mcp/generated/v2-operations.ts +++ b/apps/sim/lib/api/mcp/generated/v2-operations.ts @@ -194,6 +194,7 @@ import { v2RemovePermissionGroupMemberContract, v2UpdatePermissionGroupContract, } from '@/lib/api/contracts/v2/permission-groups' +import { v2GetResourceManifestContract } from '@/lib/api/contracts/v2/resource-manifest' import { v2CreateSandboxContract, v2DeleteSandboxContract, @@ -297,6 +298,7 @@ import { } from '@/lib/api/contracts/v2/workflow-mcp-servers' import { v2ApplyWorkflowSourceContract, + v2CreateWorkflowFromSourceContract, v2GetWorkflowSourceContract, } from '@/lib/api/contracts/v2/workflow-source' import { @@ -938,6 +940,17 @@ export const V2_MCP_OPERATIONS = { 'Create a workflow folder at a non-root path with workspace write access. Workspace folder trees exceeding 10,000 folders return `413`.\n\nOAuth scope: `api:write`.', handler: () => import('@/app/api/v2/workflows/folders/route').then((route) => route.POST), }, + createWorkflowFromSource: { + contract: v2CreateWorkflowFromSourceContract, + summary: 'Create workflow from source', + description: + "Create a workflow from TypeScript workflow source in one all-or-nothing write. Requires workspace write access. The source is compiled and checked against the same rules as Apply Workflow Source; every block is new. Any error returns `400` with `details.code` `SOURCE_REJECTED` and `details.diagnostics` (each with a file, line and column), and nothing is created. The name defaults to the one in the source's `workflow('…')` call; a name already used in the folder returns `409`. The response carries the new `workflowId` and the source re-printed from what was saved, with its lock and fingerprint, ready for the next apply. The workflow is not deployed. `dryRun=true` runs every check without creating anything and always returns `200`. Returns `403` while code-first workflows are not enabled. Workspace API keys return `403`; use a personal API key or scoped OAuth token.\n\nOAuth scope: `api:write`.", + workspaceKeyUnsupported: true, + handler: () => + import('@/app/api/v2/workspaces/[workspaceId]/workflows/source/route').then( + (route) => route.POST + ), + }, createWorkflowMcpServer: { contract: v2CreateWorkflowMcpServerContract, summary: 'Create workflow MCP server', @@ -1535,6 +1548,16 @@ export const V2_MCP_OPERATIONS = { (route) => route.GET ), }, + getResourceManifest: { + contract: v2GetResourceManifestContract, + summary: 'Get resource manifest', + description: + 'List the workspace resources workflow source can name, each with the key source uses for it: tables with their columns, knowledge bases, saved credentials with their provider, workflows with their start-block inputs, and the names (never values) of the environment variables a run can read. A resource keeps its key when renamed; one that no source has named yet is given its key by this call. Each kind lists its oldest 1000 resources, and `truncated` says when there were more. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.', + handler: () => + import('@/app/api/v2/workspaces/[workspaceId]/resource-manifest/route').then( + (route) => route.GET + ), + }, getRowEnrichment: { contract: v2GetRowEnrichmentContract, summary: 'Get row group run', diff --git a/apps/sim/lib/api/server/routes/copilot-refused-routes.json b/apps/sim/lib/api/server/routes/copilot-refused-routes.json index 925d314bdce..e3d804d1924 100644 --- a/apps/sim/lib/api/server/routes/copilot-refused-routes.json +++ b/apps/sim/lib/api/server/routes/copilot-refused-routes.json @@ -278,5 +278,10 @@ "method": "GET", "path": "/api/v2/workspaces", "operation": "workspaces.list_public" + }, + { + "method": "GET", + "path": "/api/v2/workspaces/[workspaceId]/resource-manifest", + "operation": "workflows.code.resource_manifest.read" } ] diff --git a/apps/sim/lib/api/server/routes/v2-route-table.generated.ts b/apps/sim/lib/api/server/routes/v2-route-table.generated.ts index 72381d0688f..bb2586b012c 100644 --- a/apps/sim/lib/api/server/routes/v2-route-table.generated.ts +++ b/apps/sim/lib/api/server/routes/v2-route-table.generated.ts @@ -1012,4 +1012,12 @@ export const V2_ROUTES: readonly V2RouteEntry[] = [ pattern: '/api/v2/workspaces/{workspaceId}/permission-config', load: () => import('@/app/api/v2/workspaces/[workspaceId]/permission-config/route'), }, + { + pattern: '/api/v2/workspaces/{workspaceId}/resource-manifest', + load: () => import('@/app/api/v2/workspaces/[workspaceId]/resource-manifest/route'), + }, + { + pattern: '/api/v2/workspaces/{workspaceId}/workflows/source', + load: () => import('@/app/api/v2/workspaces/[workspaceId]/workflows/source/route'), + }, ] diff --git a/apps/sim/lib/workflows/api/index.ts b/apps/sim/lib/workflows/api/index.ts index 15fb042b55a..fa9e2f0925e 100644 --- a/apps/sim/lib/workflows/api/index.ts +++ b/apps/sim/lib/workflows/api/index.ts @@ -7,6 +7,7 @@ export { v2WorkflowErrorPolicies, WORKFLOW_NOT_FOUND_MESSAGE, } from '@/lib/workflows/api/route-policies' +export { sourceWriteActor } from '@/lib/workflows/api/source-actor' export { presentV2WorkflowTrigger, presentV2WorkspaceSchedule, diff --git a/apps/sim/lib/workflows/api/route-policies.ts b/apps/sim/lib/workflows/api/route-policies.ts index cc412279c31..358bb58f5eb 100644 --- a/apps/sim/lib/workflows/api/route-policies.ts +++ b/apps/sim/lib/workflows/api/route-policies.ts @@ -103,6 +103,22 @@ export const v2WorkflowErrorPolicies = { return v2CaughtOrchestrationError(error) }, }), + /** + * Creating a workflow from source: an unreachable workspace is concealed as absent, and refused + * source answers `400` with its line-pinned diagnostics, as an apply does. + */ + concealWorkspaceSourceCreate: createV2ResourceConcealmentPolicy({ + notFoundMessage: 'Workspace not found', + render(error) { + if (error instanceof WorkflowSourceRejectedError) { + return v2ErrorForOrchestration(error.code, error.message, { + code: 'SOURCE_REJECTED', + diagnostics: error.diagnostics, + }) + } + return v2CaughtOrchestrationError(error) + }, + }), concealRunAuthorization: createV2ResourceConcealmentPolicy({ notFoundMessage: 'Run not found', }), diff --git a/apps/sim/lib/workflows/api/source-actor.ts b/apps/sim/lib/workflows/api/source-actor.ts new file mode 100644 index 00000000000..5c534d8fc64 --- /dev/null +++ b/apps/sim/lib/workflows/api/source-actor.ts @@ -0,0 +1,20 @@ +import { isUserCredentialPrincipal, type Principal } from '@sim/auth/principal' +import type { WorkflowWriteSource } from '@/lib/posthog/events' + +/** + * The user a workflow-source write is attributed to in analytics, and the surface it came + * through: a personal key or OAuth token counts as the user behind it (`cli` when the CLI + * submitted it), a Copilot delegation as its subject user. Anything else is not attributed. + */ +export function sourceWriteActor( + principal: Principal, + client: string | undefined +): { userId: string; source: WorkflowWriteSource } | null { + if (isUserCredentialPrincipal(principal)) { + return { userId: principal.userId, source: client === 'cli' ? 'cli' : 'api' } + } + if (principal.kind === 'delegated' && principal.serviceId === 'copilot') { + return { userId: principal.subjectUserId, source: 'copilot' } + } + return null +} diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.ts b/apps/sim/lib/workflows/application/apply-workflow-source.ts index 424c577712c..83b63332393 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.ts @@ -1,8 +1,14 @@ import { AuditAction, AuditResourceType } from '@sim/audit' -import { resolvePrincipalAttribution, resolvePrincipalSubjectUserId } from '@sim/auth/principal' +import { + type Principal, + resolvePrincipalAttribution, + resolvePrincipalSubjectUserId, +} from '@sim/auth/principal' import { db } from '@sim/db' import { workflowBlocks, workflow as workflowTable } from '@sim/db/schema' import { createLogger } from '@sim/logger' +import { assertFolderMutable, FolderLockedError } from '@sim/platform-authz/workflow' +import { generateId } from '@sim/utils/id' import { omit } from '@sim/utils/object' import { type AnchorKey, @@ -46,9 +52,10 @@ import { principalAuditSource } from '@/lib/core/application' import { OrchestrationError } from '@/lib/core/orchestration/types' import type { DbOrTx } from '@/lib/db/types' import { resolvePermissionGroupConfig } from '@/lib/permission-groups/config-scope.server' -import { notifyWorkflowUpdated } from '@/lib/realtime/notify' +import { notifyWorkflowUpdated, notifyWorkspaceWorkflowsChanged } from '@/lib/realtime/notify' import { defineAuthorizedWorkflowUseCase } from '@/lib/workflows/application/authorized-workflow-use-case' import type { ActiveWorkflowApplicationContext } from '@/lib/workflows/application/context' +import { resolveWorkflowFolderPath } from '@/lib/workflows/application/folders' import { layoutChangedBlocks } from '@/lib/workflows/application/graph-write' import { snapshotMcpToolOutputSchemas } from '@/lib/workflows/application/mcp-output-schemas' import { requireMutableWorkflow } from '@/lib/workflows/application/mutability' @@ -60,6 +67,7 @@ import { WorkflowSourceRejectedError, WorkflowSourceStaleError, } from '@/lib/workflows/application/source-error' +import { requireWorkflowTransition } from '@/lib/workflows/application/transition-result' import { normalizeWorkflowVariables } from '@/lib/workflows/application/workflow-variables' import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog' import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' @@ -74,14 +82,23 @@ import { checkNeedsRedeployment } from '@/lib/workflows/deployment-status' import type { WorkflowLintReport } from '@/lib/workflows/editing/lint' import { buildWorkflowLintReport } from '@/lib/workflows/editing/lint-report' import { validateValueForSubBlockType } from '@/lib/workflows/editing/validation' +import { performCreateWorkflowTransition } from '@/lib/workflows/orchestration' import { assertNoWithheldBlockType } from '@/lib/workflows/persistence/block-access-guard' -import { prepareWorkflowStateForPersistence } from '@/lib/workflows/persistence/prepare-state' +import { extractAndPersistCustomTools } from '@/lib/workflows/persistence/custom-tools-persistence' +import { + type PreparedWorkflowState, + prepareWorkflowStateForPersistence, +} from '@/lib/workflows/persistence/prepare-state' import { assertWorkflowGraphIdsUnclaimed, collectWorkflowGraphIds, replaceWorkflowNormalizedState, + WorkflowStatePersistenceError, } from '@/lib/workflows/persistence/replace-normalized-state' -import { loadWorkflowFromNormalizedTables } from '@/lib/workflows/persistence/utils' +import { + loadWorkflowFromNormalizedTables, + saveWorkflowToNormalizedTables, +} from '@/lib/workflows/persistence/utils' import { validateWorkflowState } from '@/lib/workflows/sanitization/validation' import { gateSourceDiff } from '@/lib/workflows/source/gates' import { diffGraphs, type GraphDiff, type SourceGraph } from '@/lib/workflows/source/graph-diff' @@ -91,6 +108,10 @@ import { } from '@/lib/workflows/source/protected' import { buildSubBlockValues } from '@/lib/workflows/subblocks/visibility' import { parseWorkflowVariables } from '@/lib/workflows/variables/parse' +import { + type ActiveWorkspaceApplicationContext, + resolveActiveWorkspaceApplicationContext, +} from '@/lib/workspaces/application/context' import type { ResourceKeyRef } from '@/lib/workspaces/resource-bindings' import { getBlock } from '@/blocks/registry' @@ -102,24 +123,56 @@ const ENTRY_FILE = 'workflow.ts' const FUNCTION_CODE_DIR = 'functions' const CONTAINER_TYPES: ReadonlySet = new Set(['loop', 'parallel']) -export interface ApplyWorkflowSourceInput { - workflowId: string - assertedWorkspaceId?: string +/** What every source submission carries, whether it updates a draft or creates a workflow. */ +interface SourceSubmission { /** Repo-relative path → text: `workflow.ts` plus any function-code files it references. */ files: Record + /** Run the whole pipeline and stop before the write. Never audits or notifies. */ + dryRun?: boolean + /** `preserve` (default): existing blocks keep stored positions. `lock`: lock layout wins. */ + layout?: 'preserve' | 'lock' + provenance?: { client: 'cli' | 'copilot' | 'canvas' | 'api'; gitSha?: string; repo?: string } +} + +export interface ApplyWorkflowSourceInput extends SourceSubmission { + workflowId: string + assertedWorkspaceId?: string /** The identity lock returned by `source get` (or a previous apply). */ lock: WorkflowLockV1 /** The environment facts that came with the lock; a lock read elsewhere is treated as stale. */ lockBase?: LockBase /** The `fingerprint` the source was read at; the apply answers 409 when it no longer matches. */ baseFingerprint: string - /** Run the whole pipeline and stop before the write. Never audits or notifies. */ - dryRun?: boolean - /** `preserve` (default): existing blocks keep stored positions. `lock`: lock layout wins. */ - layout?: 'preserve' | 'lock' - provenance?: { client: 'cli' | 'copilot' | 'canvas' | 'api'; gitSha?: string; repo?: string } } +export interface CreateWorkflowFromSourceInput extends SourceSubmission { + workspaceId: string + /** The new workflow's name; the source's `workflow('…')` name when omitted. */ + name?: string + /** The new workflow's description; the source's when omitted. */ + description?: string | null + /** Containing folder path; the workspace root when omitted. */ + folderPath?: string +} + +/** + * Where a source apply writes: the stored draft of an existing workflow, or a new workflow the + * apply creates, with an empty graph standing in for the stored one (no prev). + */ +type SourceApplyTarget = + | { kind: 'existing'; context: ActiveWorkflowApplicationContext } + | { + kind: 'new' + workspace: ActiveWorkspaceApplicationContext + workflowId: string + name?: string + description?: string | null + folderId: string | null + } + +/** The lock a new workflow starts from: nothing bound yet. */ +const EMPTY_LOCK: WorkflowLockV1 = { lockVersion: 1, blocks: {}, variables: {} } + interface SourceBlockRef { id: string key: string @@ -677,6 +730,70 @@ function emptySummary(): SourceDiffSummary { } } +/** + * Inserts a workflow created from source and its graph in one transaction: the row (with the + * create path's folder, name-conflict and sort rules), the prepared graph under the caller's block + * access, its variables and its `code_meta`. A name taken in the folder is a 409; any failure rolls + * the whole create back. + */ +async function createSourceWorkflow(args: { + target: Extract + name: string + description: string | null + subjectUserId: string + graph: Pick + variables: ReturnType | undefined + codeMeta: WorkflowCodeMetaV1 | null +}): Promise<{ name: string; state: PreparedWorkflowState; warnings: string[] }> { + const { target, subjectUserId } = args + const workspaceId = target.workspace.workspaceId + await assertNoWithheldBlockType({ workspaceId, subjectUserId }, Object.values(args.graph.blocks)) + const prepared = prepareWorkflowStateForPersistence(args.graph) + const transition = await performCreateWorkflowTransition({ + id: target.workflowId, + userId: subjectUserId, + workspaceId, + name: args.name, + description: args.description, + folderId: target.folderId, + writeGraph: async (tx, workflowId) => { + await assertWorkflowGraphIdsUnclaimed(tx, workflowId, collectWorkflowGraphIds(prepared.state)) + const saved = await saveWorkflowToNormalizedTables( + workflowId, + { ...prepared.state, lastSaved: Date.now() } as WorkflowState, + { workspaceId, subjectUserId }, + tx + ) + if (!saved.success) { + throw new WorkflowStatePersistenceError(saved.error ?? 'Unknown persistence failure') + } + if (args.variables !== undefined) { + await tx + .update(workflowTable) + .set({ variables: args.variables }) + .where(eq(workflowTable.id, workflowId)) + } + await writeWorkflowCodeMeta(tx, workflowId, args.codeMeta) + }, + }) + requireWorkflowTransition(transition, 'Failed to create workflow') + if (!transition.workflow) throw new Error('Successful workflow create returned no workflow') + + try { + const { errors } = await extractAndPersistCustomTools( + prepared.state, + workspaceId, + subjectUserId + ) + if (errors.length > 0) { + logger.warn('Some custom tools failed to persist', { workflowId: target.workflowId, errors }) + } + } catch (error) { + logger.error('Failed to persist custom tools', { workflowId: target.workflowId, error }) + } + return { name: transition.workflow.name, state: prepared.state, warnings: prepared.warnings } +} + /** * Applies workflow source (TypeScript) to the stored draft (build-spec decision 11, s4 D1–D12). * @@ -699,437 +816,561 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ async execute({ principal, input, context }): Promise { await requireWorkflowCodeEnabled() await requireMutableWorkflow(context.workflowId) + return runSourceApply(principal, input, { kind: 'existing', context }) + }, + /** Only a committed, non-empty apply is a change worth auditing. */ + projectAudit: ({ principal, input, context, result }) => + result.applied + ? ({ + action: AuditAction.WORKFLOW_UPDATED, + resourceType: AuditResourceType.WORKFLOW, + resourceId: context.workflowId, + resourceName: result.workflowName, + description: `Applied workflow source to workflow "${result.workflowName}"`, + metadata: sourceAuditMetadata(principal, input, result), + } as const) + : [], + afterSuccess: ({ context, result }) => { + if (!result.applied) return + return notifyWorkflowUpdated(context.workflowId) + }, +}) - const gate = await resolveCatalogGate(principal, context, { customBlockInputs: true }) - return withCatalogBlockScope(gate, async () => { - const subjectUserId = resolvePrincipalAttribution(principal, { - workspaceBillingOwnerUserId: context.billedAccountUserId, - }).attributedUserId - const isCopilot = principal.kind === 'delegated' && principal.serviceId === 'copilot' - - const stored = await loadStoredSource(context) - const storedCodeMeta = readCodeMetaValue(context.workflowId, context.workflow.codeMeta) - const storedTypes = [...new Set(Object.values(stored.state.blocks).map((b) => b.type))] - const { catalog } = buildCodeCatalog({ - gate, - organizationId: context.workspaceOrganizationId, - storedTypes, - }) - - const recording = createRecordingResolver() - const storedIdentity = canonicalize(stored.state, { - catalog, - meta: stored.meta, - resources: recording.resolver, - }).identity - const createdBy = resolvePrincipalSubjectUserId(principal) ?? null - let resources = await loadResourceKeyResolver(context.workspaceId, recording.references, { - createdBy, - }) - const currentFingerprint = fingerprintOf(stored, catalog, resources) +/** The audit metadata a committed source write records, for update and create alike. */ +function sourceAuditMetadata( + principal: Principal, + input: SourceSubmission, + result: ApplyWorkflowSourceResult +) { + return { + op: 'apply_source', + blocksAdded: result.diff.blocks.added.length, + blocksRemoved: result.diff.blocks.removed.length, + blocksRenamed: result.diff.blocks.renamed.length, + blocksModified: result.diff.blocks.modified.length, + edgesAdded: result.diff.edges.added, + edgesRemoved: result.diff.edges.removed, + variablesChanged: + result.diff.variables.added.length + + result.diff.variables.removed.length + + result.diff.variables.modified.length, + sdkMajor: result.sdkMajor, + catalogVersion: result.catalogVersion, + ...(input.provenance ? { client: input.provenance.client } : {}), + ...(input.provenance?.gitSha ? { gitSha: input.provenance.gitSha } : {}), + source: principalAuditSource(principal), + } +} - const base = { - workflowId: context.workflowId, - workflowName: context.workflow.name, - workspaceId: context.workspaceId, - dryRun: input.dryRun === true, - sdkMajor: catalog.sdkMajor, - catalogVersion: catalog.hash, +/** + * Creates a workflow from source (`POST /api/v2/workspaces/{id}/workflows/source`): the same + * pipeline as {@link applyWorkflowSource} with an empty graph as the stored draft, so every + * block is new, every id is minted and no fingerprint is checked. The workflow row, its graph, + * variables and `code_meta` are written in one transaction, so a refused or failed create leaves + * nothing behind. A dry run runs every check and creates nothing. + */ +export const createWorkflowFromSource = defineAuthorizedWorkflowUseCase({ + operation: workflowOperations.createFromSource, + resolveContext: ({ input }: { input: CreateWorkflowFromSourceInput }) => + resolveActiveWorkspaceApplicationContext(input.workspaceId), + async execute({ principal, input, context }): Promise { + await requireWorkflowCodeEnabled() + const { folderId } = await resolveWorkflowFolderPath( + context.workspaceId, + input.folderPath ?? '/' + ) + try { + await assertFolderMutable(folderId) + } catch (error) { + if (error instanceof FolderLockedError) throw new OrchestrationError('locked', error.message) + throw error + } + return runSourceApply( + principal, + { ...input, lock: EMPTY_LOCK }, + { + kind: 'new', + workspace: context, + workflowId: generateId(), + ...(input.name !== undefined ? { name: input.name } : {}), + ...(input.description !== undefined ? { description: input.description } : {}), + folderId, } - const lockBaseFor = (fingerprint: string): LockBase => ({ - workspaceId: context.workspaceId, - baseFingerprint: fingerprint, - catalogHash: catalog.hash, - }) + ) + }, + projectAudit: ({ principal, input, result }) => + result.applied + ? ({ + action: AuditAction.WORKFLOW_CREATED, + resourceType: AuditResourceType.WORKFLOW, + resourceId: result.workflowId, + resourceName: result.workflowName, + description: `Created workflow "${result.workflowName}" from source`, + metadata: sourceAuditMetadata(principal, input, result), + } as const) + : [], + afterSuccess: async ({ result }) => { + if (!result.applied) return + await Promise.all([ + notifyWorkflowUpdated(result.workflowId), + notifyWorkspaceWorkflowsChanged(result.workspaceId), + ]) + }, +}) - /** Refuses a commit; a dry run reports the same findings with a 200 instead (s4 §4). */ - const refuse = async ( - diagnostics: WorkflowSourceDiagnostic[] - ): Promise => { - if (!input.dryRun) throw new WorkflowSourceRejectedError(diagnostics) - return { - ...base, - applied: false, - diff: emptySummary(), - diagnostics, - newFingerprint: currentFingerprint, - files: input.files, - lock: input.lock, - lockBase: lockBaseFor(currentFingerprint), - mintedIds: {}, - warnings: [], - needsRedeployment: await checkNeedsRedeployment(context.workflowId), - } - } +/** + * The source-apply pipeline (build-spec decision 11, s4 D1–D12) for either target. Compile, + * materialize onto the stored graph (empty for a new workflow), every gate, value check and lint, + * then the write: a replace under the row lock for an existing draft, or a create that inserts the + * row and its graph in one transaction. + */ +async function runSourceApply( + principal: Principal, + input: SourceSubmission & { + lock: WorkflowLockV1 + lockBase?: LockBase + baseFingerprint?: string + }, + target: SourceApplyTarget +): Promise { + const context = + target.kind === 'existing' + ? target.context + : { ...target.workspace, workflowId: target.workflowId } + const isNew = target.kind === 'new' + const needsRedeployment = () => + isNew ? Promise.resolve(false) : checkNeedsRedeployment(context.workflowId) - if (currentFingerprint !== input.baseFingerprint) { - if (!input.dryRun) throw new WorkflowSourceStaleError(currentFingerprint) - return refuse([ - { - code: 'E_APPLY_STALE', - severity: 'error', - message: - 'The workflow changed since this source was read. Get the source again, reapply your edit and retry.', - }, - ]) - } + const gate = await resolveCatalogGate(principal, context, { customBlockInputs: true }) + return withCatalogBlockScope(gate, async () => { + const subjectUserId = resolvePrincipalAttribution(principal, { + workspaceBillingOwnerUserId: context.billedAccountUserId, + }).attributedUserId + const isCopilot = principal.kind === 'delegated' && principal.serviceId === 'copilot' - const parsedLock = parseWorkflowLock(input.lock) - if (parsedLock.diagnostics) { - const locateLock = createLocator(input.files, {}, new Map()) - return refuse(parsedLock.diagnostics.map((diagnostic) => locateLock(diagnostic))) - } - const lock = parsedLock.lock + let stored: StoredSource = + target.kind === 'existing' + ? await loadStoredSource(target.context) + : { + state: { blocks: {}, edges: [], loops: {}, parallels: {}, variables: {} }, + meta: { name: target.name ?? '', description: target.description ?? null }, + } + const storedCodeMeta = + target.kind === 'existing' + ? readCodeMetaValue(context.workflowId, target.context.workflow.codeMeta) + : null + const storedTypes = [...new Set(Object.values(stored.state.blocks).map((b) => b.type))] + const { catalog } = buildCodeCatalog({ + gate, + organizationId: context.workspaceOrganizationId, + storedTypes, + }) - const entryText = input.files[ENTRY_FILE] - if (entryText === undefined) { - throw new OrchestrationError('validation', `files must include ${ENTRY_FILE}`) - } - const compiled = compileWorkflow({ - entry: { path: ENTRY_FILE, text: entryText }, - files: new Map(Object.entries(input.files).filter(([path]) => path !== ENTRY_FILE)), - catalog, - sdkMajor: catalog.sdkMajor, - knownKeys: new Set([...Object.keys(lock.blocks), ...Object.keys(storedIdentity.blocks)]), - }) - const compileLocate = createLocator(input.files, compiled.spans, new Map()) - if (!compiled.workflow || hasErrors(compiled.diagnostics)) { - return refuse(compiled.diagnostics.map(compileLocate)) - } - const compiledModel = { ...compiled, workflow: compiled.workflow } - - const compiledKeys: ResourceKeyRef[] = [] - collectResourceKeys(compiled.workflow.blocks, compiledKeys) - const currentResources = resources - if (compiledKeys.some(({ kind, key }) => currentResources.toId(kind, key) === null)) { - resources = await loadResourceKeyResolver( - context.workspaceId, - { ids: recording.references.ids, keys: compiledKeys }, - { createdBy } - ) - } + const recording = createRecordingResolver() + const storedIdentity = canonicalize(stored.state, { + catalog, + meta: stored.meta, + resources: recording.resolver, + }).identity + const createdBy = resolvePrincipalSubjectUserId(principal) ?? null + let resources = await loadResourceKeyResolver(context.workspaceId, recording.references, { + createdBy, + }) + const currentFingerprint = fingerprintOf(stored, catalog, resources) - const hasLockEntries = - Object.keys(lock.blocks).length > 0 || Object.keys(lock.variables).length > 0 - const lockFreshness: 'fresh' | 'stale' | 'none' = !hasLockEntries - ? 'none' - : input.lockBase && - (input.lockBase.workspaceId !== context.workspaceId || - input.lockBase.baseFingerprint !== currentFingerprint) - ? 'stale' - : 'fresh' - const compiledBindings: Record = {} - for (const [key, hint] of Object.entries(compiled.hints.blocks)) { - if (hint.binding !== undefined) compiledBindings[key] = hint.binding + const base = { + workflowId: context.workflowId, + workflowName: stored.meta.name, + workspaceId: context.workspaceId, + dryRun: input.dryRun === true, + sdkMajor: catalog.sdkMajor, + catalogVersion: catalog.hash, + } + const lockBaseFor = (fingerprint: string): LockBase => ({ + workspaceId: context.workspaceId, + baseFingerprint: fingerprint, + catalogHash: catalog.hash, + }) + + /** Refuses a commit; a dry run reports the same findings with a 200 instead (s4 §4). */ + const refuse = async ( + diagnostics: WorkflowSourceDiagnostic[] + ): Promise => { + if (!input.dryRun) throw new WorkflowSourceRejectedError(diagnostics) + return { + ...base, + applied: false, + diff: emptySummary(), + diagnostics, + newFingerprint: currentFingerprint, + files: input.files, + lock: input.lock, + lockBase: lockBaseFor(currentFingerprint), + mintedIds: {}, + warnings: [], + needsRedeployment: await needsRedeployment(), } - const hooks = createMaterializeHooks() - const materializeWith = (withLock: WorkflowLockV1): MaterializeResult => - materialize(compiledModel.workflow, withLock, { - catalog, - hooks, - prev: stored.state, - resources, - layout: input.layout ?? 'preserve', - compiledBindings, - lockFreshness, - }) + } - /** - * A lock id for a new block that another workflow already stores cannot be reused (block - * ids are global keys): drop it from the lock so materialize mints one, and say so. - */ - let materialized = materializeWith(lock) - const claimedDiagnostics: AnyDiagnostic[] = [] - const lockSuppliedIds = materialized.entries.flatMap((entry) => - entry.status === 'created' && entry.idSource === 'lock' ? [entry.id] : [] - ) - const claimed = new Set( - await findBlockIdsClaimedElsewhere(context.workflowId, lockSuppliedIds) - ) - if (claimed.size > 0) { - const blocks: Record = {} - for (const [key, entry] of Object.entries(lock.blocks)) { - if (claimed.has(entry.id)) { - claimedDiagnostics.push({ - code: 'W_MAT_LOCK_ID_CLAIMED', - severity: 'warning', - message: `The lock id for block "${key}" belongs to another workflow; a new id was minted`, - blockKey: key, - }) - } else { - blocks[key] = entry - } - } - materialized = materializeWith({ ...lock, blocks }) + if (!isNew && currentFingerprint !== input.baseFingerprint) { + if (!input.dryRun) throw new WorkflowSourceStaleError(currentFingerprint) + return refuse([ + { + code: 'E_APPLY_STALE', + severity: 'error', + message: + 'The workflow changed since this source was read. Get the source again, reapply your edit and retry.', + }, + ]) + } + + const parsedLock = parseWorkflowLock(input.lock) + if (parsedLock.diagnostics) { + const locateLock = createLocator(input.files, {}, new Map()) + return refuse(parsedLock.diagnostics.map((diagnostic) => locateLock(diagnostic))) + } + const lock = parsedLock.lock + + const entryText = input.files[ENTRY_FILE] + if (entryText === undefined) { + throw new OrchestrationError('validation', `files must include ${ENTRY_FILE}`) + } + const compiled = compileWorkflow({ + entry: { path: ENTRY_FILE, text: entryText }, + files: new Map(Object.entries(input.files).filter(([path]) => path !== ENTRY_FILE)), + catalog, + sdkMajor: catalog.sdkMajor, + knownKeys: new Set([...Object.keys(lock.blocks), ...Object.keys(storedIdentity.blocks)]), + }) + const compileLocate = createLocator(input.files, compiled.spans, new Map()) + if (!compiled.workflow || hasErrors(compiled.diagnostics)) { + return refuse(compiled.diagnostics.map(compileLocate)) + } + const compiledModel = { ...compiled, workflow: compiled.workflow } + if (target.kind === 'new') { + stored = { + ...stored, + meta: { + name: target.name ?? compiled.workflow.meta.name, + description: + target.description !== undefined + ? target.description + : compiled.workflow.meta.description, + }, } + base.workflowName = stored.meta.name + } - const idByKey = new Map( - Object.entries(materialized.identity.blocks).map(([key, block]) => [key, block.id]) + const compiledKeys: ResourceKeyRef[] = [] + collectResourceKeys(compiled.workflow.blocks, compiledKeys) + const currentResources = resources + if (compiledKeys.some(({ kind, key }) => currentResources.toId(kind, key) === null)) { + resources = await loadResourceKeyResolver( + context.workspaceId, + { ids: recording.references.ids, keys: compiledKeys }, + { createdBy } ) - const keyById = new Map([...idByKey].map(([key, id]) => [id, key])) - const locate = createLocator(input.files, compiled.spans, idByKey) - const materializeDiagnostics = [...materialized.diagnostics, ...claimedDiagnostics] - if (hasErrors(materializeDiagnostics)) { - return refuse([...compiled.diagnostics, ...materializeDiagnostics].map(locate)) - } + } - const baseCanonical = canonicalize(stored.state, { + const hasLockEntries = + Object.keys(lock.blocks).length > 0 || Object.keys(lock.variables).length > 0 + const lockFreshness: 'fresh' | 'stale' | 'none' = !hasLockEntries + ? 'none' + : input.lockBase && + (input.lockBase.workspaceId !== context.workspaceId || + input.lockBase.baseFingerprint !== currentFingerprint) + ? 'stale' + : 'fresh' + const compiledBindings: Record = {} + for (const [key, hint] of Object.entries(compiled.hints.blocks)) { + if (hint.binding !== undefined) compiledBindings[key] = hint.binding + } + const hooks = createMaterializeHooks() + const materializeWith = (withLock: WorkflowLockV1): MaterializeResult => + materialize(compiledModel.workflow, withLock, { catalog, - meta: stored.meta, - lock, + hooks, + prev: stored.state, resources, + layout: input.layout ?? 'preserve', + compiledBindings, + lockFreshness, }) - const canonicalDiff = diffCanonical( - baseCanonical.workflow, - compiled.workflow, - renamesBetween(baseCanonical.identity, materialized.identity) - ) - const warnings: string[] = [] - if (canonicalDiff.meta.length > 0) { - warnings.push( - `The workflow ${canonicalDiff.meta.join(' and ')} in the source differs from the stored one and was not changed; rename or describe the workflow through its settings.` - ) + + /** + * A lock id for a new block that another workflow already stores cannot be reused (block + * ids are global keys): drop it from the lock so materialize mints one, and say so. + */ + let materialized = materializeWith(lock) + const claimedDiagnostics: AnyDiagnostic[] = [] + const lockSuppliedIds = materialized.entries.flatMap((entry) => + entry.status === 'created' && entry.idSource === 'lock' ? [entry.id] : [] + ) + const claimed = new Set(await findBlockIdsClaimedElsewhere(context.workflowId, lockSuppliedIds)) + if (claimed.size > 0) { + const blocks: Record = {} + for (const [key, entry] of Object.entries(lock.blocks)) { + if (claimed.has(entry.id)) { + claimedDiagnostics.push({ + code: 'W_MAT_LOCK_ID_CLAIMED', + severity: 'warning', + message: `The lock id for block "${key}" belongs to another workflow; a new id was minted`, + blockKey: key, + }) + } else { + blocks[key] = entry + } } + materialized = materializeWith({ ...lock, blocks }) + } - const storedGraph: SourceGraph = { blocks: stored.state.blocks, edges: stored.state.edges } - let blocks = materialized.state.blocks - const edges = materialized.state.edges - const graphDiff = diffGraphs(storedGraph, { blocks, edges }) - const keyOf = (id: string) => keyById.get(id) ?? '' + const idByKey = new Map( + Object.entries(materialized.identity.blocks).map(([key, block]) => [key, block.id]) + ) + const keyById = new Map([...idByKey].map(([key, id]) => [id, key])) + const locate = createLocator(input.files, compiled.spans, idByKey) + const materializeDiagnostics = [...materialized.diagnostics, ...claimedDiagnostics] + if (hasErrors(materializeDiagnostics)) { + return refuse([...compiled.diagnostics, ...materializeDiagnostics].map(locate)) + } - const permissionConfig = await resolvePermissionGroupConfig( - subjectUserId, - context.workspaceId, - context.workspaceOrganizationId + const baseCanonical = canonicalize(stored.state, { + catalog, + meta: stored.meta, + lock, + resources, + }) + const canonicalDiff = diffCanonical( + baseCanonical.workflow, + compiled.workflow, + renamesBetween(baseCanonical.identity, materialized.identity) + ) + const warnings: string[] = [] + if (!isNew && canonicalDiff.meta.length > 0) { + warnings.push( + `The workflow ${canonicalDiff.meta.join(' and ')} in the source differs from the stored one and was not changed; rename or describe the workflow through its settings.` ) - const gateDiagnostics = await gateSourceDiff({ - base: storedGraph, - target: { blocks, edges }, - diff: graphDiff, - permissionConfig, - subjectUserId, - workspaceId: context.workspaceId, - isCopilot, - }) - const refusals: AnyDiagnostic[] = [ - ...findProtectedBlockRefusals(storedGraph, { blocks, edges }, graphDiff), - ...gateDiagnostics, - ] + } - const typeChanged = new Set( - graphDiff.modified.filter((change) => change.typeChanged).map((change) => change.id) - ) - for (const id of [...graphDiff.added, ...typeChanged]) { - const block = blocks[id] - if (block && catalogBlock(catalog, block.type)?.addable === false) { - refusals.push({ - code: 'E_TYPE_NOT_ADDABLE', - severity: 'error', - message: `Block type "${block.type}" can stay where it is already used but cannot be added`, - blockId: id, - blockKey: keyOf(id), - }) - } - } + const storedGraph: SourceGraph = { blocks: stored.state.blocks, edges: stored.state.edges } + let blocks = materialized.state.blocks + const edges = materialized.state.edges + const graphDiff = diffGraphs(storedGraph, { blocks, edges }) + const keyOf = (id: string) => keyById.get(id) ?? '' - for (const diagnostic of gateDiagnostics) { - if (diagnostic.code !== 'W_APPLY_HOSTED_KEY_DROPPED' || !diagnostic.blockId) continue - const { blockId, param } = diagnostic - if (!param || !blocks[blockId]?.subBlocks?.[param]) continue - blocks = withBlock(blocks, blockId, (block) => ({ - ...block, - subBlocks: { ...block.subBlocks, [param]: { ...block.subBlocks[param], value: null } }, - })) + const permissionConfig = await resolvePermissionGroupConfig( + subjectUserId, + context.workspaceId, + context.workspaceOrganizationId + ) + const gateDiagnostics = await gateSourceDiff({ + base: storedGraph, + target: { blocks, edges }, + diff: graphDiff, + permissionConfig, + subjectUserId, + workspaceId: context.workspaceId, + isCopilot, + }) + const refusals: AnyDiagnostic[] = [ + ...findProtectedBlockRefusals(storedGraph, { blocks, edges }, graphDiff), + ...gateDiagnostics, + ] + + const typeChanged = new Set( + graphDiff.modified.filter((change) => change.typeChanged).map((change) => change.id) + ) + for (const id of [...graphDiff.added, ...typeChanged]) { + const block = blocks[id] + if (block && catalogBlock(catalog, block.type)?.addable === false) { + refusals.push({ + code: 'E_TYPE_NOT_ADDABLE', + severity: 'error', + message: `Block type "${block.type}" can stay where it is already used but cannot be added`, + blockId: id, + blockKey: keyOf(id), + }) } + } - const normalized = normalizeChangedValues(blocks, graphDiff, keyOf) - blocks = normalized.blocks + for (const diagnostic of gateDiagnostics) { + if (diagnostic.code !== 'W_APPLY_HOSTED_KEY_DROPPED' || !diagnostic.blockId) continue + const { blockId, param } = diagnostic + if (!param || !blocks[blockId]?.subBlocks?.[param]) continue + blocks = withBlock(blocks, blockId, (block) => ({ + ...block, + subBlocks: { ...block.subBlocks, [param]: { ...block.subBlocks[param], value: null } }, + })) + } - blocks = await snapshotMcpToolOutputSchemas(blocks, stored.state.blocks, { - principal, - workspaceId: context.workspaceId, - }) - if (materialized.needsLayout.length > 0) { - blocks = layoutChangedBlocks(context.workflowId, storedGraph, { blocks, edges }) - } + const normalized = normalizeChangedValues(blocks, graphDiff, keyOf) + blocks = normalized.blocks - const lint = await buildWorkflowLintReport( - { blocks, edges }, - { workflowId: context.workflowId, workspaceId: context.workspaceId, subjectUserId } + blocks = await snapshotMcpToolOutputSchemas(blocks, stored.state.blocks, { + principal, + workspaceId: context.workspaceId, + }) + if (materialized.needsLayout.length > 0) { + blocks = layoutChangedBlocks(context.workflowId, storedGraph, { blocks, edges }) + } + + const lint = await buildWorkflowLintReport( + { blocks, edges }, + { workflowId: context.workflowId, workspaceId: context.workspaceId, subjectUserId } + ) + const changedIds = new Set([...graphDiff.added, ...graphDiff.modified.map((m) => m.id)]) + const diagnostics = [ + ...compiled.diagnostics, + ...materializeDiagnostics, + ...refusals, + ...normalized.diagnostics, + ...lintDiagnostics(lint, changedIds, (id) => keyById.get(id)), + ].map(locate) + if (hasErrors(diagnostics)) return refuse(diagnostics) + + const layoutChanged = + input.layout === 'lock' && + Object.entries(blocks).some( + ([id, block]) => + stored.state.blocks[id] !== undefined && + !isEqual(block.position, stored.state.blocks[id].position) ) - const changedIds = new Set([...graphDiff.added, ...graphDiff.modified.map((m) => m.id)]) - const diagnostics = [ - ...compiled.diagnostics, - ...materializeDiagnostics, - ...refusals, - ...normalized.diagnostics, - ...lintDiagnostics(lint, changedIds, (id) => keyById.get(id)), - ].map(locate) - if (hasErrors(diagnostics)) return refuse(diagnostics) - - const layoutChanged = - input.layout === 'lock' && - Object.entries(blocks).some( - ([id, block]) => - stored.state.blocks[id] !== undefined && - !isEqual(block.position, stored.state.blocks[id].position) - ) - const noop = - !layoutChanged && - canonicalDiff.blocks.added.length === 0 && - canonicalDiff.blocks.removed.length === 0 && - canonicalDiff.blocks.modified.length === 0 && - canonicalDiff.edges.added.length === 0 && - canonicalDiff.edges.removed.length === 0 && - canonicalDiff.variables.added.length === 0 && - canonicalDiff.variables.removed.length === 0 && - canonicalDiff.variables.modified.length === 0 - const diff = summarizeDiff(canonicalDiff, baseCanonical.identity, materialized.identity, noop) - const mintedIds: Record = {} - for (const entry of materialized.entries) { - if (entry.status === 'created' && entry.idSource === 'minted') { - mintedIds[entry.key] = entry.id - } + const noop = + !isNew && + !layoutChanged && + canonicalDiff.blocks.added.length === 0 && + canonicalDiff.blocks.removed.length === 0 && + canonicalDiff.blocks.modified.length === 0 && + canonicalDiff.edges.added.length === 0 && + canonicalDiff.edges.removed.length === 0 && + canonicalDiff.variables.added.length === 0 && + canonicalDiff.variables.removed.length === 0 && + canonicalDiff.variables.modified.length === 0 + const diff = summarizeDiff(canonicalDiff, baseCanonical.identity, materialized.identity, noop) + const mintedIds: Record = {} + for (const entry of materialized.entries) { + if (entry.status === 'created' && entry.idSource === 'minted') { + mintedIds[entry.key] = entry.id } - const variablesChanged = - canonicalDiff.variables.added.length > 0 || - canonicalDiff.variables.removed.length > 0 || - canonicalDiff.variables.modified.length > 0 - const variables = variablesChanged - ? normalizeWorkflowVariables(materialized.state.variables ?? {}, { coerceValues: true }) - : undefined - /** Variables as the next read will parse them, so the re-printed fingerprint matches it. */ - const storedVariables = - variables === undefined ? stored.state.variables : (parseWorkflowVariables(variables) ?? {}) - - const lockAfter = boundLock(materialized.identity, lock) - const nextCodeMeta = mergeCodeMetaFromLock(storedCodeMeta, lockAfter, compiledModel) - const usesCodeFiles = Object.values(compiled.hints.blocks).some((hint) => hint.codeFile) - const reprintFrom = (state: WorkflowState) => - reprint({ - state, + } + const variablesChanged = + canonicalDiff.variables.added.length > 0 || + canonicalDiff.variables.removed.length > 0 || + canonicalDiff.variables.modified.length > 0 + const variables = variablesChanged + ? normalizeWorkflowVariables(materialized.state.variables ?? {}, { coerceValues: true }) + : undefined + /** Variables as the next read will parse them, so the re-printed fingerprint matches it. */ + const storedVariables = + variables === undefined ? stored.state.variables : (parseWorkflowVariables(variables) ?? {}) + + const lockAfter = boundLock(materialized.identity, lock) + const nextCodeMeta = mergeCodeMetaFromLock(storedCodeMeta, lockAfter, compiledModel) + const usesCodeFiles = Object.values(compiled.hints.blocks).some((hint) => hint.codeFile) + const reprintFrom = (state: WorkflowState) => + reprint({ + state, + meta: stored.meta, + identity: materialized.identity, + codeMeta: nextCodeMeta, + usesCodeFiles, + catalog, + resources, + }) + + if (noop) { + const printed = reprintFrom(stored.state) + if (!input.dryRun) { + const storedPrint = reprint({ + state: stored.state, meta: stored.meta, identity: materialized.identity, - codeMeta: nextCodeMeta, + codeMeta: storedCodeMeta, usesCodeFiles, catalog, resources, }) - - if (noop) { - const printed = reprintFrom(stored.state) - if (!input.dryRun) { - const storedPrint = reprint({ - state: stored.state, - meta: stored.meta, - identity: materialized.identity, - codeMeta: storedCodeMeta, - usesCodeFiles, - catalog, - resources, - }) - if ( - !isEqual(printed.files, storedPrint.files) || - !isEqual(printed.lock, storedPrint.lock) - ) { - await writeWorkflowCodeMeta(db, context.workflowId, nextCodeMeta) - } - } - return { - ...base, - applied: false, - diff, - diagnostics, - newFingerprint: currentFingerprint, - files: printed.files, - lock: printed.lock, - lockBase: lockBaseFor(currentFingerprint), - mintedIds: {}, - warnings, - needsRedeployment: await checkNeedsRedeployment(context.workflowId), + if ( + !isEqual(printed.files, storedPrint.files) || + !isEqual(printed.lock, storedPrint.lock) + ) { + await writeWorkflowCodeMeta(db, context.workflowId, nextCodeMeta) } } - - if (input.dryRun) { - const prepared = prepareWorkflowStateForPersistence({ blocks, edges }) - await assertWorkflowGraphIdsUnclaimed( - db, - context.workflowId, - collectWorkflowGraphIds(prepared.state) - ) - const printed = reprintFrom({ ...prepared.state, variables: storedVariables }) - logger.info('Evaluated workflow source without persisting', { - workflowId: context.workflowId, - workspaceId: context.workspaceId, - principalKind: principal.kind, - }) - return { - ...base, - applied: false, - diff, - diagnostics, - newFingerprint: printed.fingerprint, - files: printed.files, - lock: printed.lock, - lockBase: lockBaseFor(printed.fingerprint), - mintedIds, - warnings: [...warnings, ...prepared.warnings], - needsRedeployment: await checkNeedsRedeployment(context.workflowId), - } + return { + ...base, + applied: false, + diff, + diagnostics, + newFingerprint: currentFingerprint, + files: printed.files, + lock: printed.lock, + lockBase: lockBaseFor(currentFingerprint), + mintedIds: {}, + warnings, + needsRedeployment: await needsRedeployment(), } + } - const lockPositioned = new Set( - input.layout === 'lock' - ? Object.entries(lock.blocks).flatMap(([key, entry]) => { - const id = idByKey.get(key) - return entry.layout && id ? [id] : [] - }) - : [] + if (input.dryRun) { + const prepared = prepareWorkflowStateForPersistence({ blocks, edges }) + await assertWorkflowGraphIdsUnclaimed( + db, + context.workflowId, + collectWorkflowGraphIds(prepared.state) ) - await assertNoWithheldBlockType( - { workspaceId: context.workspaceId, subjectUserId }, - Object.values(blocks) - ) - const persisted = await replaceWorkflowNormalizedState({ + const printed = reprintFrom({ ...prepared.state, variables: storedVariables }) + logger.info('Evaluated workflow source without persisting', { workflowId: context.workflowId, workspaceId: context.workspaceId, - attributedUserId: subjectUserId, - subjectUserId, - state: async (tx) => { - const current = await loadStoredSource(context, tx) - const fingerprint = fingerprintOf(current, catalog, resources) - if (fingerprint !== input.baseFingerprint) { - throw new WorkflowSourceStaleError(fingerprint) - } - const next = { - blocks: mergeCurrentLayout(blocks, current.state.blocks, lockPositioned), - edges, - } - assertProtectedBlocksPreserved( - { blocks: current.state.blocks, edges: current.state.edges }, - next - ) - await writeWorkflowCodeMeta( - tx, - context.workflowId, - mergeCodeMetaFromLock( - await readWorkflowCodeMeta(tx, context.workflowId), - lockAfter, - compiledModel - ) - ) - return variables === undefined ? next : { ...next, variables } - }, + principalKind: principal.kind, }) + return { + ...base, + applied: false, + diff, + diagnostics, + newFingerprint: printed.fingerprint, + files: printed.files, + lock: printed.lock, + lockBase: lockBaseFor(printed.fingerprint), + mintedIds, + warnings: [...warnings, ...prepared.warnings], + needsRedeployment: await needsRedeployment(), + } + } - const printed = reprintFrom({ ...persisted.state, variables: storedVariables }) - logger.info('Applied workflow source', { + const lockPositioned = new Set( + input.layout === 'lock' + ? Object.entries(lock.blocks).flatMap(([key, entry]) => { + const id = idByKey.get(key) + return entry.layout && id ? [id] : [] + }) + : [] + ) + await assertNoWithheldBlockType( + { workspaceId: context.workspaceId, subjectUserId }, + Object.values(blocks) + ) + if (target.kind === 'new') { + const created = await createSourceWorkflow({ + target, + name: stored.meta.name, + description: stored.meta.description, + subjectUserId, + graph: { blocks, edges }, + variables, + codeMeta: nextCodeMeta, + }) + const printed = reprintFrom({ ...created.state, variables: storedVariables }) + logger.info('Created workflow from source', { workflowId: context.workflowId, workspaceId: context.workspaceId, principalKind: principal.kind, }) return { ...base, + workflowName: created.name, applied: true, diff, diagnostics, @@ -1138,42 +1379,62 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ lock: printed.lock, lockBase: lockBaseFor(printed.fingerprint), mintedIds, - warnings: [...warnings, ...persisted.warnings], - needsRedeployment: await checkNeedsRedeployment(context.workflowId), + warnings: [...warnings, ...created.warnings], + needsRedeployment: false, } + } + + const existing = target.context + const persisted = await replaceWorkflowNormalizedState({ + workflowId: context.workflowId, + workspaceId: context.workspaceId, + attributedUserId: subjectUserId, + subjectUserId, + state: async (tx) => { + const current = await loadStoredSource(existing, tx) + const fingerprint = fingerprintOf(current, catalog, resources) + if (fingerprint !== input.baseFingerprint) { + throw new WorkflowSourceStaleError(fingerprint) + } + const next = { + blocks: mergeCurrentLayout(blocks, current.state.blocks, lockPositioned), + edges, + } + assertProtectedBlocksPreserved( + { blocks: current.state.blocks, edges: current.state.edges }, + next + ) + await writeWorkflowCodeMeta( + tx, + context.workflowId, + mergeCodeMetaFromLock( + await readWorkflowCodeMeta(tx, context.workflowId), + lockAfter, + compiledModel + ) + ) + return variables === undefined ? next : { ...next, variables } + }, }) - }, - /** Only a committed, non-empty apply is a change worth auditing. */ - projectAudit: ({ principal, input, context, result }) => - result.applied - ? ({ - action: AuditAction.WORKFLOW_UPDATED, - resourceType: AuditResourceType.WORKFLOW, - resourceId: context.workflowId, - resourceName: result.workflowName, - description: `Applied workflow source to workflow "${result.workflowName}"`, - metadata: { - op: 'apply_source', - blocksAdded: result.diff.blocks.added.length, - blocksRemoved: result.diff.blocks.removed.length, - blocksRenamed: result.diff.blocks.renamed.length, - blocksModified: result.diff.blocks.modified.length, - edgesAdded: result.diff.edges.added, - edgesRemoved: result.diff.edges.removed, - variablesChanged: - result.diff.variables.added.length + - result.diff.variables.removed.length + - result.diff.variables.modified.length, - sdkMajor: result.sdkMajor, - catalogVersion: result.catalogVersion, - ...(input.provenance ? { client: input.provenance.client } : {}), - ...(input.provenance?.gitSha ? { gitSha: input.provenance.gitSha } : {}), - source: principalAuditSource(principal), - }, - } as const) - : [], - afterSuccess: ({ context, result }) => { - if (!result.applied) return - return notifyWorkflowUpdated(context.workflowId) - }, -}) + + const printed = reprintFrom({ ...persisted.state, variables: storedVariables }) + logger.info('Applied workflow source', { + workflowId: context.workflowId, + workspaceId: context.workspaceId, + principalKind: principal.kind, + }) + return { + ...base, + applied: true, + diff, + diagnostics, + newFingerprint: printed.fingerprint, + files: printed.files, + lock: printed.lock, + lockBase: lockBaseFor(printed.fingerprint), + mintedIds, + warnings: [...warnings, ...persisted.warnings], + needsRedeployment: await needsRedeployment(), + } + }) +} diff --git a/apps/sim/lib/workflows/application/operations.ts b/apps/sim/lib/workflows/application/operations.ts index 4d6df9a4e16..df5f2d31595 100644 --- a/apps/sim/lib/workflows/application/operations.ts +++ b/apps/sim/lib/workflows/application/operations.ts @@ -203,6 +203,17 @@ export const workflowOperations = { contentDelivery: 'none', ...HUMAN_WORKFLOW_PRINCIPAL_POLICY, }), + /** Creating a workflow from source runs the apply pipeline with no stored draft: same policy. */ + // permission-group-exempt: creating a workflow from source is governed by workspace role and the same block gates as apply + createFromSource: defineWorkspaceOperation({ + id: 'workflows.source.create', + oauthScope: 'api:write', + minimumRole: 'write', + workspaceApiKey: 'deny', + capability: 'none', + contentDelivery: 'none', + ...HUMAN_WORKFLOW_PRINCIPAL_POLICY, + }), // permission-group-exempt: restoring a soft-deleted workflow is governed by workspace role restore: defineWorkspaceOperation({ id: 'workflows.restore', diff --git a/apps/sim/lib/workflows/code/operations.ts b/apps/sim/lib/workflows/code/operations.ts new file mode 100644 index 00000000000..40a3bada458 --- /dev/null +++ b/apps/sim/lib/workflows/code/operations.ts @@ -0,0 +1,20 @@ +import { defineWorkspaceOperation } from '@/lib/core/application/workspace-operation' + +/** Semantic operations for authoring workflows as code, beyond the block catalog. */ +export const workflowCodeOperations = { + /** + * The workspace resources a workflow file can name, by key. A read: any member may list them, + * as any member may read the source that names them; a workspace API key may too, like + * `workflows.source.read`. Listing allocates keys for resources that have none, which changes + * no resource (see `readResourceManifest`). + */ + // permission-group-exempt: lists resource names and key bindings already visible to every workspace member; no group capability withholds them + readResourceManifest: defineWorkspaceOperation({ + id: 'workflows.code.resource_manifest.read', + oauthScope: 'api:read', + minimumRole: 'read', + workspaceApiKey: 'allow', + capability: 'none', + principalKinds: ['session', 'personal_api_key', 'oauth_access_token', 'workspace_api_key'], + }), +} as const diff --git a/apps/sim/lib/workflows/code/resource-manifest.ts b/apps/sim/lib/workflows/code/resource-manifest.ts new file mode 100644 index 00000000000..76ea16853d3 --- /dev/null +++ b/apps/sim/lib/workflows/code/resource-manifest.ts @@ -0,0 +1,251 @@ +import { resolvePrincipalSubjectUserId } from '@sim/auth/principal' +import { db } from '@sim/db' +import { + credential, + knowledgeBase, + userTableDefinitions, + workflowBlocks, + workflow as workflowTable, +} from '@sim/db/schema' +import { isRecordLike } from '@sim/utils/object' +import { compareStrings } from '@sim/utils/string' +import type { ResourceKind } from '@sim/workflow-code' +import { and, asc, eq, inArray, isNull, notInArray, or } from 'drizzle-orm' +import { defineAuthorizedWorkspaceUseCase } from '@/lib/core/application' +import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' +import { workflowCodeOperations } from '@/lib/workflows/code/operations' +import { extractInputFieldsFromBlocks } from '@/lib/workflows/input-format' +import { INPUT_DEFINITION_TRIGGER_TYPES } from '@/lib/workflows/triggers/input-definition-triggers' +import { resolveActiveWorkspaceApplicationContext } from '@/lib/workspaces/application/context' +import { type ResourceIdRef, resolveKeys } from '@/lib/workspaces/resource-bindings' + +/** + * Most resources of one kind the manifest lists, oldest first. Past it the manifest says + * `truncated`; source can still name a later resource by its key. + */ +const MAX_MANIFEST_RESOURCES_PER_KIND = 1000 + +/** Credential types a `binding(...)` can name: every saved account, never an env secret. */ +const ENV_CREDENTIAL_TYPES = ['env_workspace', 'env_personal'] as const + +interface ManifestColumn { + name: string + type: string + options?: string[] +} + +interface ManifestTable { + key: string + id: string + name: string + columns: ManifestColumn[] +} + +interface ManifestResource { + key: string + id: string + name: string +} + +interface ManifestBinding extends ManifestResource { + /** The provider the credential is for (`slack`, `google-email`, ...). */ + service: string +} + +interface ManifestWorkflow extends ManifestResource { + inputs: Array<{ name: string; type: string }> +} + +export interface WorkspaceResourceManifest { + workspaceId: string + tables: ManifestTable[] + knowledgeBases: ManifestResource[] + bindings: ManifestBinding[] + workflows: ManifestWorkflow[] + /** Environment variable names the workflow can read as `env.NAME`; never values. */ + env: string[] + /** True when some kind had more than {@link MAX_MANIFEST_RESOURCES_PER_KIND} resources. */ + truncated: boolean +} + +interface ReadResourceManifestInput { + workspaceId: string +} + +/** One more row than the cap, so a full page tells a capped list from an exact one. */ +const PAGE = MAX_MANIFEST_RESOURCES_PER_KIND + 1 + +function columnsOf(schema: unknown): ManifestColumn[] { + if (!isRecordLike(schema) || !Array.isArray(schema.columns)) return [] + return schema.columns.flatMap((column): ManifestColumn[] => { + if (!isRecordLike(column) || typeof column.name !== 'string') return [] + const type = typeof column.type === 'string' ? column.type : 'string' + const options = Array.isArray(column.options) + ? column.options.flatMap((option) => + isRecordLike(option) && typeof option.id === 'string' ? [option.id] : [] + ) + : [] + return [{ name: column.name, type, ...(options.length > 0 ? { options } : {}) }] + }) +} + +/** The input fields each workflow's start block declares. */ +async function loadWorkflowInputs( + workflowIds: string[] +): Promise> { + const inputs = new Map() + if (workflowIds.length === 0) return inputs + const rows = await db + .select({ + workflowId: workflowBlocks.workflowId, + id: workflowBlocks.id, + type: workflowBlocks.type, + subBlocks: workflowBlocks.subBlocks, + }) + .from(workflowBlocks) + .where( + and( + inArray(workflowBlocks.workflowId, workflowIds), + inArray(workflowBlocks.type, [...INPUT_DEFINITION_TRIGGER_TYPES]) + ) + ) + .orderBy(asc(workflowBlocks.workflowId), asc(workflowBlocks.id)) + for (const row of rows) { + if (inputs.has(row.workflowId)) continue + const fields = extractInputFieldsFromBlocks({ + [row.id]: { type: row.type, subBlocks: row.subBlocks }, + }) + inputs.set( + row.workflowId, + fields.map((field) => ({ name: field.name, type: field.type })) + ) + } + return inputs +} + +/** Env names the caller's runs resolve: the workspace's, plus the caller's personal ones. */ +async function loadEnvNames(workspaceId: string, userId: string | undefined): Promise { + const scope = userId + ? or( + and(eq(credential.workspaceId, workspaceId), eq(credential.type, 'env_workspace')), + and(eq(credential.type, 'env_personal'), eq(credential.envOwnerUserId, userId)) + ) + : and(eq(credential.workspaceId, workspaceId), eq(credential.type, 'env_workspace')) + const rows = await db.select({ envKey: credential.envKey }).from(credential).where(scope) + const names = new Set(rows.flatMap((row) => (row.envKey ? [row.envKey] : []))) + return [...names].sort(compareStrings) +} + +function capped(rows: T[]): { rows: T[]; truncated: boolean } { + return rows.length > MAX_MANIFEST_RESOURCES_PER_KIND + ? { rows: rows.slice(0, MAX_MANIFEST_RESOURCES_PER_KIND), truncated: true } + : { rows, truncated: false } +} + +/** + * The workspace resources a workflow file can name, by the keys source uses for them: tables + * with their columns, knowledge bases, credential bindings with their provider, workflows with + * the inputs their start block declares, and env variable names (never values). The CLI writes it + * as `workspace.d.ts`, so `table('tickets')`, `binding('support-slack')` and `env.X` type-check. + * + * Every listed resource gets its key here (`resolveKeys` allocates one for a resource no source + * has named yet), so a key an agent reads from the manifest resolves on apply. That allocation is + * idempotent identity bookkeeping, not a change to any resource, which is why a read-role caller + * may cause it. Not audited, like the other catalog reads. + */ +export const readResourceManifest = defineAuthorizedWorkspaceUseCase({ + operation: workflowCodeOperations.readResourceManifest, + resolveContext: ({ input }: { input: ReadResourceManifestInput }) => + resolveActiveWorkspaceApplicationContext(input.workspaceId), + execute: async ({ principal, context }): Promise => { + await requireWorkflowCodeEnabled() + const workspaceId = context.workspaceId + const userId = resolvePrincipalSubjectUserId(principal) + + const [tableRows, kbRows, credentialRows, workflowRows, env] = await Promise.all([ + db + .select({ + id: userTableDefinitions.id, + name: userTableDefinitions.name, + schema: userTableDefinitions.schema, + }) + .from(userTableDefinitions) + .where( + and( + eq(userTableDefinitions.workspaceId, workspaceId), + isNull(userTableDefinitions.archivedAt) + ) + ) + .orderBy(asc(userTableDefinitions.createdAt), asc(userTableDefinitions.id)) + .limit(PAGE), + db + .select({ id: knowledgeBase.id, name: knowledgeBase.name }) + .from(knowledgeBase) + .where(and(eq(knowledgeBase.workspaceId, workspaceId), isNull(knowledgeBase.deletedAt))) + .orderBy(asc(knowledgeBase.createdAt), asc(knowledgeBase.id)) + .limit(PAGE), + db + .select({ + id: credential.id, + name: credential.displayName, + type: credential.type, + providerId: credential.providerId, + }) + .from(credential) + .where( + and( + eq(credential.workspaceId, workspaceId), + notInArray(credential.type, [...ENV_CREDENTIAL_TYPES]) + ) + ) + .orderBy(asc(credential.createdAt), asc(credential.id)) + .limit(PAGE), + db + .select({ id: workflowTable.id, name: workflowTable.name }) + .from(workflowTable) + .where(and(eq(workflowTable.workspaceId, workspaceId), isNull(workflowTable.archivedAt))) + .orderBy(asc(workflowTable.createdAt), asc(workflowTable.id)) + .limit(PAGE), + loadEnvNames(workspaceId, userId), + ]) + + const tables = capped(tableRows) + const kbs = capped(kbRows) + const credentials = capped(credentialRows) + const workflows = capped(workflowRows) + + const refs: ResourceIdRef[] = [ + ...tables.rows.map((row) => ({ kind: 'table' as const, id: row.id })), + ...kbs.rows.map((row) => ({ kind: 'knowledge-base' as const, id: row.id })), + ...credentials.rows.map((row) => ({ kind: 'credential' as const, id: row.id })), + ...workflows.rows.map((row) => ({ kind: 'workflow' as const, id: row.id })), + ] + const [keys, inputs] = await Promise.all([ + resolveKeys(workspaceId, refs, { createdBy: userId ?? null }), + loadWorkflowInputs(workflows.rows.map((row) => row.id)), + ]) + const keyOf = (kind: ResourceKind, id: string) => keys.get(kind)?.get(id) + + return { + workspaceId, + tables: tables.rows.flatMap((row) => { + const key = keyOf('table', row.id) + return key ? [{ key, id: row.id, name: row.name, columns: columnsOf(row.schema) }] : [] + }), + knowledgeBases: kbs.rows.flatMap((row) => { + const key = keyOf('knowledge-base', row.id) + return key ? [{ key, id: row.id, name: row.name }] : [] + }), + bindings: credentials.rows.flatMap((row) => { + const key = keyOf('credential', row.id) + return key ? [{ key, id: row.id, name: row.name, service: row.providerId ?? row.type }] : [] + }), + workflows: workflows.rows.flatMap((row) => { + const key = keyOf('workflow', row.id) + return key ? [{ key, id: row.id, name: row.name, inputs: inputs.get(row.id) ?? [] }] : [] + }), + env, + truncated: tables.truncated || kbs.truncated || credentials.truncated || workflows.truncated, + } + }, +}) diff --git a/apps/sim/lib/workflows/orchestration/workflow-lifecycle.ts b/apps/sim/lib/workflows/orchestration/workflow-lifecycle.ts index f5da5ffc98c..03f10a0fb70 100644 --- a/apps/sim/lib/workflows/orchestration/workflow-lifecycle.ts +++ b/apps/sim/lib/workflows/orchestration/workflow-lifecycle.ts @@ -45,6 +45,11 @@ export interface PerformCreateWorkflowParams { sortOrder?: number deduplicate?: boolean requestId?: string + /** + * Writes the new workflow's graph in the create transaction, after the row is inserted, in + * place of the starter graph. A throw rolls the whole create back. + */ + writeGraph?: (tx: DbTransaction, workflowId: string) => Promise } export interface PerformCreateWorkflowResult { @@ -334,6 +339,10 @@ export async function performCreateWorkflowTransition( }) await tx.insert(workflow).values(row) + if (params.writeGraph) { + await params.writeGraph(tx, workflowId) + return + } await saveWorkflowToNormalizedTables( workflowId, workflowState, @@ -400,8 +409,7 @@ export async function performCreateWorkflowTransition( sortOrder, createdAt: now, updatedAt: now, - startBlockId, - subBlockValues, + ...(params.writeGraph ? { subBlockValues: {} } : { startBlockId, subBlockValues }), }, } } From 152232a1ba1f5c54b2a7cc5c7fef81af461e080b Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:33:20 -0800 Subject: [PATCH 119/428] feat(cli): full sdk types, workspace types and create from source for workflows source source get --out writes declarations for every block in the workspace catalog (cached by ETag once per workspace in the config directory, no longer busted per workflow), workspace.d.ts from the resource manifest and a short AGENTS.md. source apply gains --new (with --name and --folder) to create a workflow from a directory, asks for confirmation on a terminal after a dry-run preview, and exits 2 without --yes anywhere else; --dry-run never asks. --- .../protocol/workflow-source-apply.test.ts | 216 ++++++++++++ .../protocol/workflow-source-apply.ts | 273 +++++++++++---- .../protocol/workflow-source-get.test.ts | 118 +++++-- .../commands/protocol/workflow-source-get.ts | 325 +++++++++++++----- .../protocol/workflow-source-layout.ts | 4 +- .../workflow-source-roundtrip.test.ts | 64 +++- packages/sim-cli/src/contract/commands.ts | 8 + packages/sim-cli/src/generated/v2-api.ts | 296 ++++++++++++++++ .../src/compile/validate-catalog.ts | 8 +- .../workflow-sdk/src/codegen/workspace.ts | 5 +- 10 files changed, 1137 insertions(+), 180 deletions(-) create mode 100644 packages/sim-cli/src/commands/protocol/workflow-source-apply.test.ts diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-apply.test.ts b/packages/sim-cli/src/commands/protocol/workflow-source-apply.test.ts new file mode 100644 index 00000000000..051760cb303 --- /dev/null +++ b/packages/sim-cli/src/commands/protocol/workflow-source-apply.test.ts @@ -0,0 +1,216 @@ +import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from 'node:fs' +import { tmpdir } from 'node:os' +import { join } from 'node:path' +import { Command } from 'commander' +import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' +import { SimApiError } from '../../http/client' +import { buildGeneratedCommands } from '../../runtime/build' +import { contextMockFns, contextMockState } from '../../test/context-mock' +import { attachWorkflowSourceApply } from './workflow-source-apply' + +const prompt = vi.hoisted(() => ({ question: vi.fn() })) + +vi.mock('../../context', async () => (await import('../../test/context-mock')).contextMock) +vi.mock('node:readline/promises', () => ({ + createInterface: () => ({ question: prompt.question, close: () => {} }), +})) + +const { mockRequest: request } = contextMockFns + +const WORKFLOW_ID = '00000000-0000-4000-8000-00000000000a' +const WORKSPACE_ID = 'ws_local' +const APPLY_PATH = `/api/v2/workflows/${WORKFLOW_ID}/source` +const CREATE_PATH = `/api/v2/workspaces/${WORKSPACE_ID}/workflows/source` +const BASE = { workspaceId: WORKSPACE_ID, baseFingerprint: 'sf1:a', catalogHash: 'h' } +const LOCK = { lockVersion: 1, blocks: {}, variables: {} } +const ENTRY = "// @sim-sdk 1\nexport default workflow('W', () => {})\n" + +function outcome(overrides: { dryRun?: boolean; diagnostics?: unknown[] } = {}) { + const dryRun = overrides.dryRun ?? false + return { + data: { + workflowId: WORKFLOW_ID, + workspaceId: WORKSPACE_ID, + dryRun, + applied: !dryRun, + diff: { + noop: false, + blocks: { added: [{ id: 'b-1', key: 'start' }], removed: [], renamed: [], modified: [] }, + edges: { added: 1, removed: 0 }, + variables: { added: [], removed: [], modified: [] }, + }, + diagnostics: overrides.diagnostics ?? [], + newFingerprint: 'sf1:b', + files: { 'workflow.ts': `${ENTRY}// stored\n` }, + lock: LOCK, + lockBase: { ...BASE, baseFingerprint: 'sf1:b' }, + mintedIds: {}, + warnings: [], + needsRedeployment: true, + }, + } +} + +function program(): Command { + const root = new Command('sim') + for (const command of buildGeneratedCommands()) root.addCommand(command) + const workflows = root.commands.find((command) => command.name() === 'workflows') + const sourceGroup = workflows?.commands.find((command) => command.name() === 'source') + if (!sourceGroup) throw new Error('workflows source group missing') + attachWorkflowSourceApply(sourceGroup) + const override = (command: Command) => { + command.exitOverride() + command.commands.forEach(override) + } + override(root) + return root +} + +async function apply(...argv: string[]): Promise { + await program().parseAsync(['node', 'sim', 'workflows', 'source', 'apply', ...argv]) +} + +/** Runs with a person at the terminal (stdin and stderr both TTYs) or without one. */ +function setTerminal(interactive: boolean) { + Object.defineProperty(process.stdin, 'isTTY', { value: interactive, configurable: true }) + Object.defineProperty(process.stderr, 'isTTY', { value: interactive, configurable: true }) +} + +let dir: string +let stdinTty: boolean | undefined +let stderrTty: boolean | undefined + +beforeEach(() => { + contextMockState.output = 'json' + request.mockReset() + prompt.question.mockReset() + stdinTty = process.stdin.isTTY + stderrTty = process.stderr.isTTY + dir = mkdtempSync(join(tmpdir(), 'sim-source-apply-')) + mkdirSync(join(dir, '.sim')) + writeFileSync(join(dir, 'workflow.ts'), ENTRY) + writeFileSync(join(dir, '.sim/lock.json'), JSON.stringify(LOCK)) + writeFileSync(join(dir, '.sim/base.json'), JSON.stringify(BASE)) + vi.spyOn(console, 'log').mockImplementation(() => {}) + vi.spyOn(console, 'error').mockImplementation(() => {}) + vi.spyOn(process.stderr, 'write').mockImplementation(() => true) +}) + +afterEach(() => { + Object.defineProperty(process.stdin, 'isTTY', { value: stdinTty, configurable: true }) + Object.defineProperty(process.stderr, 'isTTY', { value: stderrTty, configurable: true }) + process.exitCode = undefined + rmSync(dir, { recursive: true, force: true }) +}) + +function dryRunFlags() { + return request.mock.calls.map((call) => call[1].query?.dryRun === true) +} + +describe('sim workflows source apply', () => { + it('exits 2 without --yes when nobody is at a terminal, sending nothing', async () => { + setTerminal(false) + + const error = await apply(WORKFLOW_ID, '--from', dir).catch((caught: unknown) => caught) + + expect(error).toBeInstanceOf(SimApiError) + expect((error as SimApiError).exitCode).toBe(2) + expect((error as SimApiError).message).toContain('--yes') + expect(request).not.toHaveBeenCalled() + }) + + it('applies at once with --yes and saves what the server stored', async () => { + setTerminal(false) + request.mockResolvedValue(outcome()) + + await apply(WORKFLOW_ID, '--from', dir, '--yes') + + expect(dryRunFlags()).toEqual([false]) + expect(request.mock.calls[0][0]).toBe(APPLY_PATH) + expect(readFileSync(join(dir, 'workflow.ts'), 'utf8')).toBe(`${ENTRY}// stored\n`) + expect(prompt.question).not.toHaveBeenCalled() + }) + + it('never asks on a dry run, even at a terminal, and writes nothing', async () => { + setTerminal(true) + request.mockResolvedValue(outcome({ dryRun: true })) + + await apply(WORKFLOW_ID, '--from', dir, '--dry-run') + + expect(dryRunFlags()).toEqual([true]) + expect(prompt.question).not.toHaveBeenCalled() + expect(readFileSync(join(dir, 'workflow.ts'), 'utf8')).toBe(ENTRY) + }) + + it('at a terminal, shows the dry run and applies once the person confirms', async () => { + setTerminal(true) + request.mockImplementation(async (_path: string, options: { query?: { dryRun?: boolean } }) => + outcome({ dryRun: options.query?.dryRun === true }) + ) + prompt.question.mockResolvedValue('y') + + await apply(WORKFLOW_ID, '--from', dir) + + expect(dryRunFlags()).toEqual([true, false]) + expect(prompt.question).toHaveBeenCalledTimes(1) + expect(readFileSync(join(dir, 'workflow.ts'), 'utf8')).toBe(`${ENTRY}// stored\n`) + }) + + it('at a terminal, applies nothing when the person declines', async () => { + setTerminal(true) + request.mockResolvedValue(outcome({ dryRun: true })) + prompt.question.mockResolvedValue('n') + + await expect(apply(WORKFLOW_ID, '--from', dir)).rejects.toThrow('Nothing was applied') + + expect(dryRunFlags()).toEqual([true]) + expect(readFileSync(join(dir, 'workflow.ts'), 'utf8')).toBe(ENTRY) + }) + + it('at a terminal, does not ask when the dry run already found errors', async () => { + setTerminal(true) + request.mockResolvedValue( + outcome({ + dryRun: true, + diagnostics: [ + { code: 'E_UNKNOWN_PARAM', severity: 'error', message: 'Slack has no param x.' }, + ], + }) + ) + + await apply(WORKFLOW_ID, '--from', dir) + + expect(prompt.question).not.toHaveBeenCalled() + expect(dryRunFlags()).toEqual([true]) + expect(process.exitCode).toBe(1) + }) + + it('creates a workflow with --new from the directory alone, then writes its lock files', async () => { + setTerminal(false) + rmSync(join(dir, '.sim'), { recursive: true }) + request.mockResolvedValue(outcome()) + + await apply('--new', '--from', dir, '--folder', '/Ops', '--yes') + + expect(request.mock.calls[0][0]).toBe(CREATE_PATH) + expect(request.mock.calls[0][1].body).toEqual({ + files: { 'workflow.ts': ENTRY }, + folderPath: '/Ops', + provenance: { client: 'cli' }, + }) + expect(JSON.parse(readFileSync(join(dir, '.sim/base.json'), 'utf8')).baseFingerprint).toBe( + 'sf1:b' + ) + }) + + it.each([ + ['a workflow id with --new', [WORKFLOW_ID, '--new'], 'drop the workflow id'], + ['neither a workflow id nor --new', [], '--new'], + ['--name without --new', [WORKFLOW_ID, '--name', 'X'], 'only with --new'], + ])('refuses %s before sending anything', async (_label, argv, message) => { + setTerminal(false) + + await expect(apply(...argv, '--from', dir, '--yes')).rejects.toThrow(message) + expect(request).not.toHaveBeenCalled() + }) +}) diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts b/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts index 8f4b7ef230a..c1dc287f889 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts @@ -1,9 +1,14 @@ import { mkdir, readFile } from 'node:fs/promises' import { dirname, posix, resolve } from 'node:path' +import { createInterface } from 'node:readline/promises' import type { Command } from 'commander' import { printError } from '#sim-cli/output/io' import { embedStore, setSoftExitCode } from '../../embed-context' -import type { ApplyWorkflowSourceBody, ApplyWorkflowSourceResponse } from '../../generated/v2-api' +import type { + ApplyWorkflowSourceBody, + ApplyWorkflowSourceResponse, + CreateWorkflowFromSourceBody, +} from '../../generated/v2-api' import { SimApiError } from '../../http/client' import { apiCommand } from '../../runtime/called-operations' import { embeddedFileContent } from '../../transfer/local-file' @@ -18,11 +23,20 @@ import { /** `code: file('./functions/x.js')` in the entry file (the SDK's only code-file form). */ const CODE_FILE_REFERENCE = /\bfile\(\s*(['"])([^'"\n]+)\1\s*\)/g -type Diagnostic = ApplyWorkflowSourceResponse['data']['diagnostics'][number] +/** The exit status of an apply that needs `--yes` and had no terminal to ask on. */ +const CONFIRMATION_REQUIRED_EXIT_CODE = 2 + +type SourceApplyData = ApplyWorkflowSourceResponse['data'] +type Diagnostic = SourceApplyData['diagnostics'][number] +type SourceLock = ApplyWorkflowSourceBody['lock'] interface SourceApplyOptions { from: string dryRun?: boolean + new?: boolean + name?: string + folder?: string + yes?: boolean } /** A path inside the source directory, refusing absolute paths and `..` escapes. */ @@ -72,13 +86,13 @@ async function writeText(directory: string, path: string, text: string): Promise * every `codeFile` the lock records. Only those are sent; the server reports a referenced file * that is missing. */ -function codeFilePaths(entry: string, lock: ApplyWorkflowSourceBody['lock']): string[] { +function codeFilePaths(entry: string, lock: SourceLock | null): string[] { const paths = new Set() for (const match of entry.matchAll(CODE_FILE_REFERENCE)) { const path = sourceRelativePath(match[2]) if (path) paths.add(path) } - for (const block of Object.values(lock.blocks)) { + for (const block of Object.values(lock?.blocks ?? {})) { const path = block.codeFile ? sourceRelativePath(block.codeFile) : null if (path) paths.add(path) } @@ -106,77 +120,201 @@ function isDiagnosticList(value: unknown): value is Diagnostic[] { ) } +/** One line naming what the apply changes, shown before asking to confirm it. */ +function diffSummary(data: SourceApplyData): string { + const { blocks, edges, variables } = data.diff + if (data.diff.noop) return 'No graph changes (names, order or comments may still be saved).' + const parts = [ + `${blocks.added.length} added`, + `${blocks.removed.length} removed`, + `${blocks.renamed.length} renamed`, + `${blocks.modified.length} modified`, + ] + const variableCount = + variables.added.length + variables.removed.length + variables.modified.length + return `Blocks: ${parts.join(', ')}. Connections: +${edges.added} -${edges.removed}.${ + variableCount > 0 ? ` Variables changed: ${variableCount}.` : '' + }` +} + +/** Whether a person is at a terminal to answer a prompt: never for an embedded run. */ +function canPrompt(): boolean { + return !embedStore.getStore() && process.stdin.isTTY === true && process.stderr.isTTY === true +} + +async function confirm(question: string): Promise { + const prompt = createInterface({ input: process.stdin, output: process.stderr }) + try { + const answer = (await prompt.question(`${question} (y/N) `)).trim().toLowerCase() + return answer === 'y' || answer === 'yes' + } finally { + prompt.close() + } +} + +interface SourceSubmission { + files: Record + lock: SourceLock | null + lockBase: NonNullable | null +} + +/** Reads the directory: the entry file, its code files and, unless creating, the lock files. */ +async function readSubmission(directory: string, creating: boolean): Promise { + const hint = 'Write the directory with `sim workflows source get` first.' + const entry = await readText(directory, ENTRY_FILE) + let lock: SourceLock | null = null + let lockBase: SourceSubmission['lockBase'] = null + if (!creating) { + lock = (await readJson(directory, LOCK_FILE, hint)) as SourceLock + lockBase = (await readJson(directory, BASE_FILE, hint)) as NonNullable< + ApplyWorkflowSourceBody['lockBase'] + > + if (typeof lockBase?.baseFingerprint !== 'string') { + throw new SimApiError(`${locate(directory, BASE_FILE)} has no baseFingerprint. ${hint}`, 0) + } + } + const files: Record = { [ENTRY_FILE]: entry } + for (const path of codeFilePaths(entry, lock)) { + try { + files[path] = await readText(directory, path) + } catch { + // A referenced file that is missing is reported by the server with its source line. + } + } + return { files, lock, lockBase } +} + /** * `sim workflows source apply --from `: sends a source directory written by * `workflows source get` (`workflow.ts`, its function-code files, `.sim/lock.json` and * `.sim/base.json`) and, after a successful write, saves the re-printed files, the new lock and - * the new base back into it, so the next apply starts from what was stored. + * the new base back into it, so the next apply starts from what was stored. With `--new` (and no + * workflow id) it creates a workflow from the directory's `workflow.ts` instead, then writes the + * lock files of the new workflow into the directory. + * + * Writing needs consent: on a terminal it shows the dry-run outcome and asks; anywhere else it + * needs `--yes` and exits 2 without it. `--dry-run` writes nothing, so it never asks. */ export function attachWorkflowSourceApply(source: Command): void { - const [command, connectApply] = apiCommand(source, 'apply', ['applyWorkflowSource'], { - runs: 'applyWorkflowSource', - }) + const [command, connectApply] = apiCommand( + source, + 'apply', + ['applyWorkflowSource', 'createWorkflowFromSource'], + { runs: 'applyWorkflowSource' } + ) command - .argument('', 'Workflow whose draft the source replaces') + .argument('[workflowId]', 'Workflow whose draft the source replaces (omit with --new)') .requiredOption( '--from ', 'Source directory: workflow.ts, functions/*, .sim/lock.json and .sim/base.json' ) .option('--dry-run', 'Check the source and show the outcome without saving or writing files') + .option('--new', 'Create a new workflow from the directory instead of updating one') + .option('--name ', "With --new: the workflow name (default: the source's)") + .option('--folder ', 'With --new: the folder to create it in (default: the root)') + .option('-y, --yes', 'Apply without asking for confirmation') .allowExcessArguments(false) - .description('Apply a workflow source directory to the workflow draft') - .action(async (workflowId: string, options: SourceApplyOptions) => { + .description('Apply a workflow source directory to a workflow draft, or create one with --new') + .action(async (workflowId: string | undefined, options: SourceApplyOptions) => { + const creating = options.new === true + if (creating && workflowId !== undefined) { + throw new SimApiError('--new creates a workflow; drop the workflow id.', 0) + } + if (!creating && workflowId === undefined) { + throw new SimApiError( + 'Name the workflow to apply to, or pass --new to create one from the directory.', + 0 + ) + } + if (!creating && (options.name !== undefined || options.folder !== undefined)) { + throw new SimApiError('--name and --folder apply only with --new.', 0) + } + if (!options.dryRun && !options.yes && !canPrompt()) { + throw new SimApiError( + `This ${creating ? 'creates a workflow' : 'writes the workflow draft'}. Re-run with --yes to apply it, or with --dry-run to check it without writing.`, + 0, + 'CONFIRMATION_REQUIRED', + undefined, + CONFIRMATION_REQUIRED_EXIT_CODE + ) + } + const { client, profile } = connectApply() + const workspaceId = creating ? client.requireWorkspace() : null const directory = options.from - const hint = 'Write the directory with `sim workflows source get` first.' - const entry = await readText(directory, ENTRY_FILE) - const lock = (await readJson(directory, LOCK_FILE, hint)) as ApplyWorkflowSourceBody['lock'] - const lockBase = (await readJson(directory, BASE_FILE, hint)) as NonNullable< - ApplyWorkflowSourceBody['lockBase'] - > - if (typeof lockBase?.baseFingerprint !== 'string') { - throw new SimApiError(`${locate(directory, BASE_FILE)} has no baseFingerprint. ${hint}`, 0) - } + const submission = await readSubmission(directory, creating) - const files: Record = { [ENTRY_FILE]: entry } - for (const path of codeFilePaths(entry, lock)) { + const send = async (dryRun: boolean): Promise => { try { - files[path] = await readText(directory, path) - } catch { - // A referenced file that is missing is reported by the server with its source line. + if (workspaceId !== null) { + const response = await client.request( + 'createWorkflowFromSource', + { + params: { workspaceId }, + ...(dryRun ? { query: { dryRun: true } } : {}), + body: { + files: submission.files, + ...(options.name !== undefined ? { name: options.name } : {}), + ...(options.folder !== undefined ? { folderPath: options.folder } : {}), + provenance: { client: 'cli' }, + } satisfies CreateWorkflowFromSourceBody, + } + ) + return response.data + } + if (!submission.lock || !submission.lockBase || workflowId === undefined) { + throw new SimApiError('The source directory has no lock to apply with.', 0) + } + const response = await client.request( + 'applyWorkflowSource', + { + params: { workflowId }, + ...(dryRun ? { query: { dryRun: true } } : {}), + body: { + files: submission.files, + lock: submission.lock, + lockBase: submission.lockBase, + baseFingerprint: submission.lockBase.baseFingerprint, + provenance: { client: 'cli' }, + } satisfies ApplyWorkflowSourceBody, + } + ) + return response.data + } catch (error) { + if (error instanceof SimApiError && error.details && typeof error.details === 'object') { + const diagnostics = (error.details as { diagnostics?: unknown }).diagnostics + if (isDiagnosticList(diagnostics)) { + for (const diagnostic of diagnostics) printError(formatDiagnostic(diagnostic)) + throw new SimApiError(error.message, error.status, error.code, undefined) + } + } + throw error } } - let response: ApplyWorkflowSourceResponse - try { - response = await client.request('applyWorkflowSource', { - params: { workflowId }, - ...(options.dryRun ? { query: { dryRun: true } } : {}), - body: { - files, - lock, - lockBase, - baseFingerprint: lockBase.baseFingerprint, - provenance: { client: 'cli' }, - } satisfies ApplyWorkflowSourceBody, - }) - } catch (error) { - if (error instanceof SimApiError && error.details && typeof error.details === 'object') { - const diagnostics = (error.details as { diagnostics?: unknown }).diagnostics - if (isDiagnosticList(diagnostics)) { - for (const diagnostic of diagnostics) printError(formatDiagnostic(diagnostic)) - throw new SimApiError(error.message, error.status, error.code, undefined) - } + if (!options.dryRun && !options.yes) { + const preview = await send(true) + for (const diagnostic of preview.diagnostics) printError(formatDiagnostic(diagnostic)) + if (preview.diagnostics.some((diagnostic) => diagnostic.severity === 'error')) { + setSoftExitCode(1) + printProtocolResult(profile.output, summarize(preview)) + return + } + printError(diffSummary(preview)) + const question = creating + ? 'Create this workflow?' + : `Apply these changes to workflow ${workflowId}?` + if (!(await confirm(question))) { + throw new SimApiError('Nothing was applied.', 0, 'CANCELLED') } - throw error } - const { data } = response + const data = await send(options.dryRun === true) for (const diagnostic of data.diagnostics) printError(formatDiagnostic(diagnostic)) const refused = data.diagnostics.some((diagnostic) => diagnostic.severity === 'error') if (refused) setSoftExitCode(1) - if (!data.dryRun && !refused) { + if (!data.dryRun && !refused && (data.applied || !creating)) { for (const [path, text] of Object.entries(data.files)) { const relative = sourceRelativePath(path) if (!relative) throw new SimApiError(`Refusing to write ${path} outside ${directory}`, 0) @@ -186,22 +324,27 @@ export function attachWorkflowSourceApply(source: Command): void { await writeText(directory, BASE_FILE, `${JSON.stringify(data.lockBase, null, 2)}\n`) } - printProtocolResult(profile.output, { - workflowId: data.workflowId, - applied: data.applied, - dryRun: data.dryRun, - noop: data.diff.noop, - blocksAdded: data.diff.blocks.added.length, - blocksRemoved: data.diff.blocks.removed.length, - blocksModified: data.diff.blocks.modified.length, - edgesAdded: data.diff.edges.added, - edgesRemoved: data.diff.edges.removed, - errors: data.diagnostics.filter((diagnostic) => diagnostic.severity === 'error').length, - warnings: - data.diagnostics.filter((diagnostic) => diagnostic.severity === 'warning').length + - data.warnings.length, - newFingerprint: data.newFingerprint, - needsRedeployment: data.needsRedeployment, - }) + printProtocolResult(profile.output, summarize(data, creating)) }) } + +function summarize(data: SourceApplyData, created = false) { + return { + workflowId: data.workflowId, + ...(created ? { created: data.applied } : {}), + applied: data.applied, + dryRun: data.dryRun, + noop: data.diff.noop, + blocksAdded: data.diff.blocks.added.length, + blocksRemoved: data.diff.blocks.removed.length, + blocksModified: data.diff.blocks.modified.length, + edgesAdded: data.diff.edges.added, + edgesRemoved: data.diff.edges.removed, + errors: data.diagnostics.filter((diagnostic) => diagnostic.severity === 'error').length, + warnings: + data.diagnostics.filter((diagnostic) => diagnostic.severity === 'warning').length + + data.warnings.length, + newFingerprint: data.newFingerprint, + needsRedeployment: data.needsRedeployment, + } +} diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts b/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts index dbe73912cbe..c702303c524 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts @@ -16,13 +16,17 @@ const WORKFLOW_ID = '00000000-0000-4000-8000-00000000000a' const WORKSPACE_ID = '00000000-0000-4000-8000-00000000000b' const SOURCE_PATH = `/api/v2/workflows/${WORKFLOW_ID}/source` const CATALOG_PATH = `/api/v2/workspaces/${WORKSPACE_ID}/block-catalog` +const MANIFEST_PATH = `/api/v2/workspaces/${WORKSPACE_ID}/resource-manifest` /** A real catalog projected from registry blocks, shared with the SDK's own type checks. */ const CATALOG = JSON.parse( readFileSync(join(__dirname, '../../../../workflow-sdk/test/fixtures/catalog.json'), 'utf8') ) -function source(files: Record = { 'workflow.ts': '// @sim-sdk 1\n' }) { +function source( + files: Record = { 'workflow.ts': '// @sim-sdk 1\n' }, + blockTypes: string[] = ['agent'] +) { return { data: { workflowId: WORKFLOW_ID, @@ -34,7 +38,7 @@ function source(files: Record = { 'workflow.ts': '// @sim-sdk 1\ canonicalHash: 'h', catalogVersion: CATALOG.hash, sdkMajor: 1, - blockTypes: ['agent'], + blockTypes, warnings: [], }, } @@ -62,11 +66,40 @@ async function get(...argv: string[]): Promise { let rootDir: string let outDir: string +const MANIFEST = { + data: { + workspaceId: WORKSPACE_ID, + tables: [], + knowledgeBases: [{ key: 'docs', id: 'kb-1', name: 'Docs' }], + bindings: [], + workflows: [], + env: [], + truncated: false, + }, +} + +/** Serves the source, the catalog and the manifest by path; `overrides` replaces any of them. */ +function serve(overrides: Partial unknown>> = {}) { + request.mockImplementation(async (path: string) => { + const override = overrides[path] + if (override) return override() + if (path === SOURCE_PATH) return source() + if (path === CATALOG_PATH) return { data: CATALOG } + if (path === MANIFEST_PATH) return MANIFEST + throw new Error(`unexpected request ${path}`) + }) +} + +function callsTo(path: string) { + return request.mock.calls.filter((call) => call[0] === path) +} + beforeEach(() => { contextMockState.output = 'json' request.mockReset() rootDir = mkdtempSync(join(tmpdir(), 'sim-source-')) outDir = join(rootDir, 'out') + vi.stubEnv('SIM_CONFIG_DIR', join(rootDir, 'config')) vi.spyOn(console, 'log').mockImplementation(() => {}) }) @@ -75,12 +108,11 @@ afterEach(() => { }) describe('sim workflows source get --out', () => { - it('writes the source, lock, base and declarations for only the block types the workflow uses', async () => { - request.mockImplementation(async (path: string) => - path === SOURCE_PATH - ? source({ 'workflow.ts': '// @sim-sdk 1\n', 'functions/score.js': 'return 1\n' }) - : { data: CATALOG } - ) + it('writes the source, lock, base, an agent guide and declarations for every block in the workspace catalog', async () => { + serve({ + [SOURCE_PATH]: () => + source({ 'workflow.ts': '// @sim-sdk 1\n', 'functions/score.js': 'return 1\n' }), + }) await get('--out', outDir) @@ -91,33 +123,67 @@ describe('sim workflows source get --out', () => { ) expect(existsSync(join(outDir, '.sim/sdk/core.d.ts'))).toBe(true) expect(existsSync(join(outDir, '.sim/sdk/blocks/agent.d.ts'))).toBe(true) - expect(existsSync(join(outDir, '.sim/sdk/blocks/slack_v2.d.ts'))).toBe(false) - expect(request.mock.calls[1][0]).toBe(CATALOG_PATH) - expect(request.mock.calls[1][1].query).toEqual({ workflowId: WORKFLOW_ID }) + expect(existsSync(join(outDir, '.sim/sdk/blocks/slack_v2.d.ts'))).toBe(true) + expect(readFileSync(join(outDir, '.sim/sdk/workspace.d.ts'), 'utf8')).toContain("'docs': true") + expect(readFileSync(join(outDir, 'AGENTS.md'), 'utf8')).toContain('apply') + expect(callsTo(CATALOG_PATH)).toHaveLength(1) + expect(callsTo(CATALOG_PATH)[0][1].query).toBeUndefined() }) - it('revalidates the cached catalog by hash and reuses it on 304', async () => { - request.mockImplementation(async (path: string) => - path === SOURCE_PATH ? source() : { data: CATALOG } - ) + it('revalidates one cached catalog per workspace, whatever the output directory, and reuses it on 304', async () => { + serve() await get('--out', outDir) request.mockReset() - request.mockImplementation(async (path: string) => { - if (path === SOURCE_PATH) return source() - throw new SimApiError('Not modified', 304) + serve({ + [CATALOG_PATH]: () => { + throw new SimApiError('Not modified', 304) + }, + }) + const otherDir = join(rootDir, 'other') + + await get('--out', otherDir) + + expect(callsTo(CATALOG_PATH)[0][1].headers).toEqual({ 'if-none-match': `"${CATALOG.hash}"` }) + expect(existsSync(join(otherDir, '.sim/sdk/blocks/agent.d.ts'))).toBe(true) + }) + + it('fetches the workflow compile catalog when the workflow holds a type the workspace no longer offers', async () => { + const compileCatalog = { + ...CATALOG, + blocks: { ...CATALOG.blocks, legacy_block: { ...CATALOG.blocks.note, type: 'legacy_block' } }, + } + serve({ + [SOURCE_PATH]: () => source(undefined, ['agent', 'legacy_block']), + [CATALOG_PATH]: () => + callsTo(CATALOG_PATH).length === 1 ? { data: CATALOG } : { data: compileCatalog }, }) - rmSync(join(outDir, '.sim/sdk'), { recursive: true }) await get('--out', outDir) - expect(request.mock.calls[1][1].headers).toEqual({ 'if-none-match': `"${CATALOG.hash}"` }) - expect(existsSync(join(outDir, '.sim/sdk/blocks/agent.d.ts'))).toBe(true) + expect(callsTo(CATALOG_PATH).map((call) => call[1].query)).toEqual([ + undefined, + { workflowId: WORKFLOW_ID }, + ]) + }) + + it('writes the source without workspace types when the manifest is refused', async () => { + serve({ + [MANIFEST_PATH]: () => { + throw new SimApiError('Forbidden', 403) + }, + }) + + await get('--out', outDir) + + expect(existsSync(join(outDir, 'workflow.ts'))).toBe(true) + expect(existsSync(join(outDir, '.sim/sdk/workspace.d.ts'))).toBe(false) }) it('surfaces a 304 when no cached catalog exists rather than writing without types', async () => { - request.mockImplementation(async (path: string) => { - if (path === SOURCE_PATH) return source() - throw new SimApiError('Not modified', 304) + serve({ + [CATALOG_PATH]: () => { + throw new SimApiError('Not modified', 304) + }, }) await expect(get('--out', outDir)).rejects.toThrow('Not modified') @@ -125,9 +191,7 @@ describe('sim workflows source get --out', () => { }) it('refuses a file path that would escape the output directory, writing nothing', async () => { - request.mockImplementation(async (path: string) => - path === SOURCE_PATH ? source({ '../escape.js': 'x' }) : { data: CATALOG } - ) + serve({ [SOURCE_PATH]: () => source({ '../escape.js': 'x' }) }) await expect(get('--out', outDir)).rejects.toThrow('unsafe file path') expect(existsSync(join(rootDir, 'escape.js'))).toBe(false) diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-get.ts b/packages/sim-cli/src/commands/protocol/workflow-source-get.ts index 6c5e2f04759..ac87ed1b7e4 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-get.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-get.ts @@ -1,15 +1,16 @@ -import { mkdir, readFile, writeFile } from 'node:fs/promises' +import { mkdir, readFile, rm, writeFile } from 'node:fs/promises' import { dirname, join, posix } from 'node:path' import { isRecordLike } from '@sim/utils/object' -import type { BlockCatalog, CatalogBlock, CatalogBuilder, CatalogTrigger } from '@sim/workflow-code' +import type { BlockCatalog } from '@sim/workflow-code' +import { catalogBlock } from '@sim/workflow-code/catalog/view' import { - catalogBlock, - catalogBuilder, - catalogBuilderPaths, - catalogTrigger, -} from '@sim/workflow-code/catalog/view' -import { CORE_DTS, generateSdkTypes } from '@sim/workflow-sdk/codegen' + CORE_DTS, + generateSdkTypes, + generateWorkspaceTypes, + type WorkspaceManifest, +} from '@sim/workflow-sdk/codegen' import type { Command } from 'commander' +import { configDir } from '../../config/paths' import { embedStore } from '../../embed-context' import { SimApiError } from '../../http/client' import { callsOperations, type OperationClient } from '../../runtime/called-operations' @@ -18,13 +19,18 @@ import { saveToFile } from './files-get' import { printProtocolResult } from './result' import { SOURCE_SDK_DIR as SDK_DIR, + SOURCE_AGENTS_FILE, SOURCE_BASE_FILE, SOURCE_ENTRY_FILE, SOURCE_LOCK_FILE, } from './workflow-source-layout' const OUT_FLAG = 'out' -const CATALOG_CACHE = '.sim/cache/block-catalog.json' +/** The SDK file that names the catalog hash; unchanged text means unchanged declarations. */ +const SDK_INDEX_FILE = `${SDK_DIR}/index.d.ts` +const WORKSPACE_TYPES_FILE = `${SDK_DIR}/workspace.d.ts` +/** Files written at once on a local disk; the declarations run to thousands of small files. */ +const WRITE_CONCURRENCY = 32 /** The part of the source response the writer reads; the contract owns the full shape. */ interface WorkflowSource { @@ -42,7 +48,7 @@ interface CachedCatalog { catalog: BlockCatalog } -/** Enough of a block catalog to narrow and generate from; the server owns the full shape. */ +/** Enough of a block catalog to generate from; the server owns the full shape. */ function isBlockCatalog(value: unknown): value is BlockCatalog { return ( isRecordLike(value) && @@ -91,35 +97,19 @@ function readSource(raw: unknown): WorkflowSource { } /** - * The catalog narrowed to the block types the workflow uses: their blocks, the builders that - * create them, and the triggers they can run, read through the catalog view (an expanded entry is - * a valid core-shard entry). Core declarations come from `core.d.ts`, so this is - * all an editor or agent needs to type-check the file. + * Where the workspace's catalog is cached: one file per workspace in the CLI's config directory, + * so every `source get` in the workspace (whatever the workflow or output directory) revalidates + * the same copy. Workspace ids are uuids, so the name is safe as given. */ -function narrowCatalog(catalog: BlockCatalog, types: readonly string[]): BlockCatalog { - const blocks: Record = {} - for (const type of types) { - const block = catalogBlock(catalog, type) - if (block) blocks[type] = block - } - const triggers: Record = {} - for (const id of Object.values(blocks).flatMap((block) => block.triggers?.available ?? [])) { - const trigger = catalogTrigger(catalog, id) - if (trigger) triggers[id] = trigger - } - const builders: Record = {} - for (const path of catalogBuilderPaths(catalog)) { - const builder = catalogBuilder(catalog, path) - if (builder && Object.hasOwn(blocks, builder.type)) builders[path] = builder - } - return { ...catalog, blocks, triggers, builders } +function catalogCachePath(workspaceId: string): string { + return join(configDir(), 'cache', 'block-catalog', `${workspaceId}.json`) } /** Standalone runs only: an embedded run has no local disk of its own to cache on. */ -async function readCachedCatalog(outDir: string): Promise { - if (embedStore.getStore()) return null +async function readCachedCatalog(workspaceId: string): Promise { + if (embedStore.getStore() || !isSafeRelativePath(workspaceId)) return null try { - const parsed: unknown = JSON.parse(await readFile(join(outDir, CATALOG_CACHE), 'utf8')) + const parsed: unknown = JSON.parse(await readFile(catalogCachePath(workspaceId), 'utf8')) if (isRecordLike(parsed) && typeof parsed.hash === 'string' && isBlockCatalog(parsed.catalog)) { return { hash: parsed.hash, catalog: parsed.catalog } } @@ -127,42 +117,177 @@ async function readCachedCatalog(outDir: string): Promise return null } +async function writeCachedCatalog(workspaceId: string, catalog: BlockCatalog): Promise { + if (embedStore.getStore() || !isSafeRelativePath(workspaceId)) return + const path = catalogCachePath(workspaceId) + const cache: CachedCatalog = { hash: catalog.hash, catalog } + await mkdir(dirname(path), { recursive: true }) + await writeFile(path, JSON.stringify(cache)) +} + +function catalogFrom(raw: unknown): BlockCatalog { + const catalog = isRecordLike(raw) ? raw.data : null + if (!isBlockCatalog(catalog)) { + throw new SimApiError('The block catalog response was not in the expected shape.', 0) + } + return catalog +} + /** - * The workflow's compile catalog, revalidated by ETag against the cached copy: a `304` reuses - * it, anything else replaces it. + * The workspace's block catalog, revalidated by ETag against the per-workspace cache: a `304` + * reuses it, anything else replaces it. A workflow can hold a type the workspace no longer offers + * (a legacy version, a block an allowlist now withholds); only then is that workflow's compile + * catalog fetched instead, uncached, so its types still resolve. */ async function loadCatalog( client: OperationClient<'getBlockCatalog'>, - source: WorkflowSource, - outDir: string -): Promise<{ catalog: BlockCatalog; fresh: boolean }> { - const cached = await readCachedCatalog(outDir) + source: WorkflowSource +): Promise { + const cached = await readCachedCatalog(source.workspaceId) + let catalog: BlockCatalog try { - const raw = await client.request('getBlockCatalog', { + catalog = catalogFrom( + await client.request('getBlockCatalog', { + params: { workspaceId: source.workspaceId }, + ...(cached ? { headers: { 'if-none-match': `"${cached.hash}"` } } : {}), + }) + ) + await writeCachedCatalog(source.workspaceId, catalog) + } catch (error) { + if (!cached || !(error instanceof SimApiError) || error.status !== 304) throw error + catalog = cached.catalog + } + if (source.blockTypes.every((type) => catalogBlock(catalog, type) !== undefined)) return catalog + return catalogFrom( + await client.request('getBlockCatalog', { params: { workspaceId: source.workspaceId }, query: { workflowId: source.workflowId }, - ...(cached ? { headers: { 'if-none-match': `"${cached.hash}"` } } : {}), }) - const catalog = isRecordLike(raw) ? raw.data : null - if (!isBlockCatalog(catalog)) { - throw new SimApiError('The block catalog response was not in the expected shape.', 0) - } - return { catalog, fresh: true } + ) +} + +interface ManifestResource { + key: string +} + +/** The resource manifest response, as `generateWorkspaceTypes` reads it. */ +function workspaceManifestFrom(raw: unknown): WorkspaceManifest { + const data = isRecordLike(raw) && isRecordLike(raw.data) ? raw.data : null + if (!data) + throw new SimApiError('The resource manifest response was not in the expected shape.', 0) + const list = (value: unknown): T[] => + Array.isArray(value) + ? value.filter((item): item is T => isRecordLike(item) && typeof item.key === 'string') + : [] + const manifest: WorkspaceManifest = { + tables: Object.fromEntries( + list(data.tables).map((table) => [ + table.key, + { + columns: Object.fromEntries( + (Array.isArray(table.columns) ? table.columns : []).flatMap((column) => + isRecordLike(column) && typeof column.name === 'string' + ? [ + [ + column.name, + { + type: typeof column.type === 'string' ? column.type : 'string', + ...(Array.isArray(column.options) + ? { + options: column.options.filter( + (option): option is string => typeof option === 'string' + ), + } + : {}), + }, + ], + ] + : [] + ) + ), + }, + ]) + ), + knowledgeBases: list(data.knowledgeBases).map((kb) => kb.key), + bindings: Object.fromEntries( + list(data.bindings).map((binding) => [ + binding.key, + { service: typeof binding.service === 'string' ? binding.service : '' }, + ]) + ), + workflows: Object.fromEntries( + list(data.workflows).map((workflow) => [ + workflow.key, + { + inputs: Object.fromEntries( + (Array.isArray(workflow.inputs) ? workflow.inputs : []).flatMap((input) => + isRecordLike(input) && typeof input.name === 'string' + ? [[input.name, typeof input.type === 'string' ? input.type : 'string']] + : [] + ) + ), + }, + ]) + ), + env: Array.isArray(data.env) + ? data.env.filter((name): name is string => typeof name === 'string') + : [], + } + return manifest +} + +/** + * The workspace's resources as `workspace.d.ts`, or `null` when they cannot be listed: a `403` + * for a caller the manifest does not admit (a Copilot delegation), a `404` from a server that + * predates the route. The source still writes and type-checks, with every key a plain string. + */ +async function loadWorkspaceTypes( + client: OperationClient<'getResourceManifest'>, + workspaceId: string +): Promise { + try { + const raw = await client.request('getResourceManifest', { params: { workspaceId } }) + return generateWorkspaceTypes(workspaceManifestFrom(raw)).text } catch (error) { - if (cached && error instanceof SimApiError && error.status === 304) { - return { catalog: cached.catalog, fresh: false } - } + if (error instanceof SimApiError && (error.status === 403 || error.status === 404)) return null throw error } } -/** Writes one file under `outDir`, through the host's writer when embedded. */ -async function writeOutFile(outDir: string, relativePath: string, text: string): Promise { - const target = embedStore.getStore() - ? posix.join(outDir, relativePath) - : join(outDir, ...relativePath.split('/')) - if (!embedStore.getStore()) await mkdir(dirname(target), { recursive: true }) - await saveToFile(new Blob([text]).stream(), target, true) +function localPath(outDir: string, relativePath: string): string { + return join(outDir, ...relativePath.split('/')) +} + +/** Writes files under `outDir`: straight to a local disk, through the host's writer when embedded. */ +async function writeOutFiles( + outDir: string, + files: ReadonlyArray<[string, string]> +): Promise { + if (embedStore.getStore()) { + for (const [path, text] of files) { + await saveToFile(new Blob([text]).stream(), posix.join(outDir, path), true) + } + return + } + for (let start = 0; start < files.length; start += WRITE_CONCURRENCY) { + await Promise.all( + files.slice(start, start + WRITE_CONCURRENCY).map(async ([path, text]) => { + const target = localPath(outDir, path) + await mkdir(dirname(target), { recursive: true }) + await writeFile(target, text) + }) + ) + } +} + +/** The index the directory already holds, so an unchanged catalog is not rewritten. */ +async function writtenSdkIndex(outDir: string): Promise { + if (embedStore.getStore()) return null + try { + return await readFile(localPath(outDir, SDK_INDEX_FILE), 'utf8') + } catch { + return null + } } /** Lets an editor or `tsc -p` resolve `@sim/workflow-sdk` to the written declarations. */ @@ -177,6 +302,7 @@ const TSCONFIG = `${JSON.stringify( types: [], strict: true, noEmit: true, + skipLibCheck: true, paths: { '@sim/workflow-sdk': [`./${SDK_DIR}/core.d.ts`] }, }, include: [SOURCE_ENTRY_FILE, `${SDK_DIR}/**/*.d.ts`], @@ -185,31 +311,65 @@ const TSCONFIG = `${JSON.stringify( 2 )}\n` +/** Points an agent working in the directory at the SDK's own guide. */ +const AGENTS_GUIDE = `# Sim workflow source + +This directory is a Sim workflow written as TypeScript. Edit \`${SOURCE_ENTRY_FILE}\` (and \`functions/*\`), then: + +\`\`\`bash +sim workflows source apply --from . --dry-run # check; prints file:line diagnostics +sim workflows source apply --from . --yes # save the draft +\`\`\` + +- Types: \`${SDK_DIR}/core.d.ts\` (SDK), \`${SDK_DIR}/blocks/*.d.ts\` and \`${SDK_DIR}/operations//.d.ts\` (every block's builders, params and outputs), \`${WORKSPACE_TYPES_FILE}\` (this workspace's tables, knowledge bases, credentials, workflows and env names). \`tsc -p .\` checks the file locally. +- Keep \`${SOURCE_LOCK_FILE}\` and \`${SOURCE_BASE_FILE}\`. A \`409\` (\`SOURCE_STALE\`) means the workflow changed: run \`sim workflows source get --out \`, reapply your edit there and retry. +- The full guide is the \`@sim/workflow-sdk\` README: the edit loop, the diagnostics format and the rebase loop. +` + +interface SourceTree { + written: number + /** Whether `workspace.d.ts` was written. */ + workspaceTypes: boolean +} + async function writeSourceTree( outDir: string, source: WorkflowSource, - catalog: BlockCatalog -): Promise { - const sdkFiles = generateSdkTypes(narrowCatalog(catalog, source.blockTypes)) + catalog: BlockCatalog, + workspaceTypes: string | null +): Promise { const files: Array<[string, string]> = [ ...Object.entries(source.files), [SOURCE_LOCK_FILE, `${JSON.stringify(source.lock, null, 2)}\n`], [SOURCE_BASE_FILE, `${JSON.stringify(source.lockBase, null, 2)}\n`], - [`${SDK_DIR}/core.d.ts`, CORE_DTS], - ...sdkFiles.map((file): [string, string] => [`${SDK_DIR}/${file.path}`, file.text]), ['tsconfig.json', TSCONFIG], + [SOURCE_AGENTS_FILE, AGENTS_GUIDE], + [`${SDK_DIR}/core.d.ts`, CORE_DTS], ] - for (const [path, text] of files) await writeOutFile(outDir, path, text) - return files.length + const sdkFiles = generateSdkTypes(catalog).map((file): [string, string] => [ + `${SDK_DIR}/${file.path}`, + file.text, + ]) + const index = sdkFiles.find(([path]) => path === SDK_INDEX_FILE)?.[1] + if (index === undefined || index !== (await writtenSdkIndex(outDir))) { + if (!embedStore.getStore()) { + await rm(localPath(outDir, SDK_DIR), { recursive: true, force: true }) + } + files.push(...sdkFiles) + } + if (workspaceTypes !== null) files.push([WORKSPACE_TYPES_FILE, workspaceTypes]) + await writeOutFiles(outDir, files) + return { written: files.length, workspaceTypes: workspaceTypes !== null } } /** * Teaches the generated `workflows source get` leaf `--out `: instead of printing the - * response, it writes `workflow.ts`, `functions/*`, `.sim/lock.json`, `.sim/base.json`, the SDK - * declarations for the block types the workflow uses (`.sim/sdk/**`, generated from the block - * catalog, ETag-cached under `.sim/cache`) and a `tsconfig.json` that resolves them. Without - * `--out` the generated handler runs unchanged. Commander offers no way to read the action it - * holds, so it is captured and delegated to, as `runs get` does. + * response, it writes `workflow.ts`, `functions/*`, `.sim/lock.json`, `.sim/base.json`, SDK + * declarations for every block in the workspace's catalog (`.sim/sdk/**`, so a block an agent + * adds resolves too; the catalog is ETag-cached per workspace in the CLI's config directory), + * `.sim/sdk/workspace.d.ts` from the resource manifest, a `tsconfig.json` that resolves them and + * a short `AGENTS.md`. Without `--out` the generated handler runs unchanged. Commander offers no + * way to read the action it holds, so it is captured and delegated to, as `runs get` does. */ export function attachWorkflowSourceGet(source: Command): void { const get = source.commands.find((command) => command.name() === 'get') @@ -218,7 +378,11 @@ export function attachWorkflowSourceGet(source: Command): void { throw new Error('workflows source get must be registered before --out can be attached to it') } const previous = held as (args: unknown[]) => unknown - const connectGet = callsOperations(get, ['getWorkflowSource', 'getBlockCatalog']) + const connectGet = callsOperations(get, [ + 'getWorkflowSource', + 'getBlockCatalog', + 'getResourceManifest', + ]) get.option( `--${OUT_FLAG} `, @@ -238,24 +402,23 @@ export function attachWorkflowSourceGet(source: Command): void { flags, profile.workspaceId ) - const source = readSource( + const workflowSource = readSource( await client.request('getWorkflowSource', { params: request.params, query: request.query, }) ) - const { catalog, fresh } = await loadCatalog(client, source, outDir) - const written = await writeSourceTree(outDir, source, catalog) - if (fresh && !embedStore.getStore()) { - const cache: CachedCatalog = { hash: catalog.hash, catalog } - await mkdir(dirname(join(outDir, CATALOG_CACHE)), { recursive: true }) - await writeFile(join(outDir, CATALOG_CACHE), JSON.stringify(cache)) - } + const [catalog, workspaceTypes] = await Promise.all([ + loadCatalog(client, workflowSource), + loadWorkspaceTypes(client, workflowSource.workspaceId), + ]) + const tree = await writeSourceTree(outDir, workflowSource, catalog, workspaceTypes) printProtocolResult(profile.output, { - workflowId: source.workflowId, + workflowId: workflowSource.workflowId, outDir, - files: written, - fingerprint: source.fingerprint, + files: tree.written, + workspaceTypes: tree.workspaceTypes, + fingerprint: workflowSource.fingerprint, }) }) } diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-layout.ts b/packages/sim-cli/src/commands/protocol/workflow-source-layout.ts index 3b7aaf48651..ea7611febe3 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-layout.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-layout.ts @@ -9,5 +9,7 @@ export const SOURCE_ENTRY_FILE = 'workflow.ts' export const SOURCE_LOCK_FILE = '.sim/lock.json' /** The freshness facts for the lock in this environment (`LockBase`). */ export const SOURCE_BASE_FILE = '.sim/base.json' -/** Generated SDK declarations for the block types the workflow uses. */ +/** Generated SDK declarations: every block in the workspace catalog, plus `workspace.d.ts`. */ export const SOURCE_SDK_DIR = '.sim/sdk' +/** A short guide for an agent working in the directory. */ +export const SOURCE_AGENTS_FILE = 'AGENTS.md' diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-roundtrip.test.ts b/packages/sim-cli/src/commands/protocol/workflow-source-roundtrip.test.ts index 535110a58e7..241a1db15c6 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-roundtrip.test.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-roundtrip.test.ts @@ -1,4 +1,4 @@ -import { mkdtempSync, readFileSync, rmSync } from 'node:fs' +import { existsSync, mkdtempSync, readFileSync, rmSync } from 'node:fs' import { tmpdir } from 'node:os' import { join } from 'node:path' import { Command } from 'commander' @@ -126,12 +126,28 @@ async function sim(...argv: string[]): Promise { await program().parseAsync(['node', 'sim', ...argv]) } +const NEW_WORKFLOW_ID = '00000000-0000-4000-8000-00000000000c' +const MANIFEST = { + workspaceId: WORKSPACE_ID, + tables: [ + { key: 'tickets', id: 't-1', name: 'Tickets', columns: [{ name: 'subject', type: 'string' }] }, + ], + knowledgeBases: [], + bindings: [{ key: 'support-slack', id: 'c-1', name: 'Support Slack', service: 'slack' }], + workflows: [], + env: ['CRM_KEY'], + truncated: false, +} + let dir: string let applyBodies: unknown[] +let createBodies: unknown[] beforeEach(() => { dir = join(mkdtempSync(join(tmpdir(), 'sim-source-roundtrip-')), 'source') + vi.stubEnv('SIM_CONFIG_DIR', join(dir, '..', 'config')) applyBodies = [] + createBodies = [] vi.spyOn(console, 'log').mockImplementation(() => {}) vi.stubGlobal( 'fetch', @@ -144,6 +160,17 @@ beforeEach(() => { if (url.pathname === `/api/v2/workspaces/${WORKSPACE_ID}/block-catalog`) { return json({ data: CATALOG }) } + if (url.pathname === `/api/v2/workspaces/${WORKSPACE_ID}/resource-manifest`) { + return json({ data: MANIFEST }) + } + if (url.pathname === `/api/v2/workspaces/${WORKSPACE_ID}/workflows/source`) { + createBodies.push(JSON.parse(String(init?.body))) + const created = appliedResponse({ + 'workflow.ts': WORKFLOW_TS, + 'functions/score.js': 'return 1\n', + }) + return json({ data: { ...created.data, workflowId: NEW_WORKFLOW_ID } }) + } if (url.pathname === `/api/v2/workflows/${WORKFLOW_ID}/source` && method === 'POST') { applyBodies.push(JSON.parse(String(init?.body))) return json( @@ -162,7 +189,7 @@ afterEach(() => { describe('sim workflows source get --out → apply --from', () => { it('sends back exactly the directory get wrote, then saves what the server stored', async () => { await sim('workflows', 'source', 'get', WORKFLOW_ID, '--out', dir) - await sim('workflows', 'source', 'apply', WORKFLOW_ID, '--from', dir) + await sim('workflows', 'source', 'apply', WORKFLOW_ID, '--from', dir, '--yes') expect(applyBodies).toEqual([ { @@ -179,4 +206,37 @@ describe('sim workflows source get --out → apply --from', () => { ) expect(JSON.parse(readFileSync(join(dir, '.sim/lock.json'), 'utf8'))).toEqual(LOCK) }) + + it('writes workspace types from the manifest, so resource keys are checked locally', async () => { + await sim('workflows', 'source', 'get', WORKFLOW_ID, '--out', dir) + + const types = readFileSync(join(dir, '.sim/sdk/workspace.d.ts'), 'utf8') + expect(types).toContain(`'tickets': { subject: string }`) + expect(types).toContain(`'support-slack': { service: 'slack' }`) + expect(types).toContain('CRM_KEY: true') + expect(readFileSync(join(dir, 'AGENTS.md'), 'utf8')).toContain('@sim/workflow-sdk') + }) + + it('creates a workflow from a bare directory with --new, then applies to it by its new id', async () => { + await sim('workflows', 'source', 'get', WORKFLOW_ID, '--out', dir) + rmSync(join(dir, '.sim/lock.json')) + rmSync(join(dir, '.sim/base.json')) + + await sim('workflows', 'source', 'apply', '--new', '--from', dir, '--name', 'Copy', '--yes') + + expect(createBodies).toEqual([ + { + files: { 'workflow.ts': WORKFLOW_TS, 'functions/score.js': 'return 1\n' }, + name: 'Copy', + provenance: { client: 'cli' }, + }, + ]) + expect(existsSync(join(dir, '.sim/lock.json'))).toBe(true) + expect(JSON.parse(readFileSync(join(dir, '.sim/base.json'), 'utf8')).baseFingerprint).toBe( + SECOND + ) + + await sim('workflows', 'source', 'apply', WORKFLOW_ID, '--from', dir, '--yes') + expect((applyBodies[0] as { baseFingerprint: string }).baseFingerprint).toBe(SECOND) + }) }) diff --git a/packages/sim-cli/src/contract/commands.ts b/packages/sim-cli/src/contract/commands.ts index d1fb6162ca5..4953c894e5f 100644 --- a/packages/sim-cli/src/contract/commands.ts +++ b/packages/sim-cli/src/contract/commands.ts @@ -648,6 +648,14 @@ export const CLI_CONTRACT: CliContract = { // The ETag revalidation header is for a client that caches the catalog, as `workflows source // get --out` does by hand; a one-off read has no cached hash to send. getBlockCatalog: { flags: { 'if-none-match': { omit: true } } }, + /** `workflows source apply --new --from ` reads and writes a source directory by hand. */ + createWorkflowFromSource: { hidden: true }, + /** One document, not a page: `workflows source get --out` writes it as `workspace.d.ts`. */ + getResourceManifest: { + command: 'workspaces resource-manifest get', + describe: + 'List the tables, knowledge bases, credentials, workflows and env names source can name', + }, replaceWorkflowState: { command: 'workflows state replace', confirm: 'This replaces the entire draft graph and cannot be undone.', diff --git a/packages/sim-cli/src/generated/v2-api.ts b/packages/sim-cli/src/generated/v2-api.ts index 6d0dee93d58..94b63fb1d19 100644 --- a/packages/sim-cli/src/generated/v2-api.ts +++ b/packages/sim-cli/src/generated/v2-api.ts @@ -4199,6 +4199,127 @@ export type CreateWorkflowFolderResponse = { data: CreateWorkflowFolderResponseRef0 } +/** `POST /api/v2/workspaces/[workspaceId]/workflows/source` */ +export type CreateWorkflowFromSourceParams = { + workspaceId: string +} + +export type CreateWorkflowFromSourceQuery = { + dryRun?: boolean +} + +type CreateWorkflowFromSourceBodyRef0 = string + +export type CreateWorkflowFromSourceBody = { + files: Record + name?: string + description?: string | null + folderPath?: CreateWorkflowFromSourceBodyRef0 + provenance?: { + client: 'cli' | 'copilot' | 'canvas' | 'api' + gitSha?: string + repo?: string + } +} + +export type CreateWorkflowFromSourceResponse = { + data: { + workflowId: string + workspaceId: string + dryRun: boolean + applied: boolean + diff: { + noop: boolean + blocks: { + added: Array<{ + id: string + key: string + }> + removed: Array<{ + id: string + key: string + }> + renamed: Array<{ + id: string + from: string + to: string + }> + modified: Array<{ + id: string + key: string + fields: Array + reparented?: boolean + }> + } + edges: { + added: number + removed: number + } + variables: { + added: Array + removed: Array + modified: Array + } + } + diagnostics: Array<{ + code: string + severity: 'error' | 'warning' | 'info' + message: string + hint?: string + file?: string + line?: number + column?: number + endLine?: number + endColumn?: number + frame?: string + blockKey?: string + blockId?: string + param?: string + path?: string + }> + newFingerprint: string + files: Record + lock: { + lockVersion: 1 + blocks: Record< + string, + { + id: string + parent: string | null + branches?: Record + items?: Record< + string, + Array<{ + name: string + id: string + }> + > + binding: string + order: number + layout?: { + x: number + y: number + w?: number + h?: number + height?: number + horizontalHandles?: boolean + } + codeFile?: string + } + > + variables: Record + } + lockBase: { + workspaceId: string + baseFingerprint: string + catalogHash: string + } + mintedIds: Record + warnings: Array + needsRedeployment: boolean + } +} + /** `POST /api/v2/workflow-mcp-servers` */ export type CreateWorkflowMcpServerQuery = Record @@ -6324,6 +6445,34 @@ export type GetBlockCatalogResponse = { opaque: true } visibleFor?: Record + visibleWhen?: Record< + string, + { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + > + visibleForModel?: Record required?: | boolean | { @@ -6517,6 +6666,34 @@ export type GetBlockCatalogResponse = { opaque: true } visibleFor?: Record + visibleWhen?: Record< + string, + { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + > + visibleForModel?: Record required?: | boolean | { @@ -6667,6 +6844,34 @@ export type GetBlockCatalogResponse = { opaque: true } visibleFor?: Record + visibleWhen?: Record< + string, + { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + > + visibleForModel?: Record required?: | boolean | { @@ -7797,6 +8002,51 @@ export type GetProjectFileVersionResponse = { data: GetProjectFileVersionResponseRef0 } +/** `GET /api/v2/workspaces/[workspaceId]/resource-manifest` */ +export type GetResourceManifestParams = { + workspaceId: string +} + +export type GetResourceManifestQuery = Record + +export type GetResourceManifestResponse = { + data: { + workspaceId: string + tables: Array<{ + key: string + id: string + name: string + columns: Array<{ + name: string + type: string + options?: Array + }> + }> + knowledgeBases: Array<{ + key: string + id: string + name: string + }> + bindings: Array<{ + key: string + id: string + name: string + service: string + }> + workflows: Array<{ + key: string + id: string + name: string + inputs: Array<{ + name: string + type: string + }> + }> + env: Array + truncated: boolean + } +} + /** `GET /api/v2/tables/[tableId]/rows/[rowId]/enrichment/[groupId]` */ export type GetRowEnrichmentParams = { tableId: string @@ -18897,6 +19147,44 @@ export const V2_OPERATIONS = { path: { kind: 'string', required: true, describe: 'Path of the folder to create.' }, }, }, + createWorkflowFromSource: { + method: 'POST', + path: '/api/v2/workspaces/[workspaceId]/workflows/source', + pathParams: ['workspaceId'] as const, + pathParamDocs: { workspaceId: 'Workspace in which to create the workflow.' }, + responseMode: 'json', + summary: 'Create workflow from source', + workspaceKeyUnsupported: true, + query: { + dryRun: { + kind: 'boolean', + describe: + 'Run every check without writing, auditing, or notifying collaborators. Always answers `200`: errors are returned in `diagnostics` with `applied: false`, and the files, lock and fingerprint show what a committed apply would store.', + }, + }, + body: { + files: { + kind: 'object', + required: true, + describe: + 'Relative path → file text: `workflow.ts` plus every function-code file it references (for example `functions/score.js`).', + }, + name: { + kind: 'string', + describe: "Workflow name. Defaults to the name in the source's `workflow('…')` call.", + }, + description: { + kind: 'string', + describe: 'Workflow description. Defaults to the description in the source.', + }, + folderPath: { + kind: 'string', + describe: + 'Folder path. A missing leading slash is normalized before validation. Segments are percent-encoded, so a folder shown as "New folder" is `/New%20folder`: everything outside `A-Z a-z 0-9 - _ . ~` is escaped as uppercase hex, and only that exact encoding is accepted. A trailing slash, an empty segment, and a literal `.` or `..` segment are rejected. At most 64 segments and 4096 encoded bytes.', + }, + provenance: { kind: 'object', describe: 'Where the source came from, for the audit log.' }, + }, + }, createWorkflowMcpServer: { method: 'POST', path: '/api/v2/workflow-mcp-servers', @@ -20547,6 +20835,14 @@ export const V2_OPERATIONS = { summary: 'Get Project File Version', workspaceKeyUnsupported: true, }, + getResourceManifest: { + method: 'GET', + path: '/api/v2/workspaces/[workspaceId]/resource-manifest', + pathParams: ['workspaceId'] as const, + pathParamDocs: { workspaceId: 'Workspace whose resources to list.' }, + responseMode: 'json', + summary: 'Get resource manifest', + }, getRowEnrichment: { method: 'GET', path: '/api/v2/tables/[tableId]/rows/[rowId]/enrichment/[groupId]', diff --git a/packages/workflow-code/src/compile/validate-catalog.ts b/packages/workflow-code/src/compile/validate-catalog.ts index ca4f7d4eb40..566ac71929b 100644 --- a/packages/workflow-code/src/compile/validate-catalog.ts +++ b/packages/workflow-code/src/compile/validate-catalog.ts @@ -180,8 +180,12 @@ export function outputSchemasFor( if (!builder?.triggerMode) return [block.outputs] const pinned = builder.fixed?.selectedTriggerId const ids = pinned !== undefined ? [pinned] : (block.triggers?.available ?? []) - const triggers = ids.flatMap((id) => catalogTrigger(catalog, id)?.outputs ?? []) - return [block.outputs, ...triggers] + const schemas = [block.outputs] + for (const id of ids) { + const trigger = catalogTrigger(catalog, id) + if (trigger) schemas.push(trigger.outputs) + } + return schemas } /** A field's catalog default: the editor's `defaultValue`, else a constant `value()` thunk. */ diff --git a/packages/workflow-sdk/src/codegen/workspace.ts b/packages/workflow-sdk/src/codegen/workspace.ts index cadd6cd79d5..00081ab7754 100644 --- a/packages/workflow-sdk/src/codegen/workspace.ts +++ b/packages/workflow-sdk/src/codegen/workspace.ts @@ -2,7 +2,8 @@ * `generateWorkspaceTypes(manifest)`: one `workspace.d.ts` that narrows the SDK to a workspace's * resources (s2 D6). It fills the `Workspace*` interfaces `core.d.ts` declares, so `table('leads')` * types its rows, a misspelled `kb('dosc')` or `env.STRIPE_KYE` is an error, and so on. Written by - * `sim pull`; without it every key is a plain string. + * `sim workflows source get --out` from the workspace resource manifest; without it every key is a + * plain string. */ import { compareStrings } from '@sim/utils/string' @@ -112,7 +113,7 @@ export const generateWorkspaceTypes: GenerateWorkspaceTypesFn = (manifest) => { return { path: 'workspace.d.ts', text: [ - '// @sim-sdk workspace · generated by `sim pull`; do not edit', + '// @sim-sdk workspace · generated from the workspace resource manifest; do not edit', used.length > 0 ? `import type { ${used.join(', ')} } from '@sim/workflow-sdk'` : 'export {}', '', `declare module '@sim/workflow-sdk' {`, From 186253e120a0270de29c05d7c4f0ac114b0d29ee Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:33:21 -0800 Subject: [PATCH 120/428] test(workflows): e2e covers the resource manifest and create from source, then apply --- .../scripts/test-workflow-source-apply-e2e.ts | 110 +++++++++++++++++- 1 file changed, 106 insertions(+), 4 deletions(-) diff --git a/apps/sim/scripts/test-workflow-source-apply-e2e.ts b/apps/sim/scripts/test-workflow-source-apply-e2e.ts index 2b8d799e378..ca6800508cf 100644 --- a/apps/sim/scripts/test-workflow-source-apply-e2e.ts +++ b/apps/sim/scripts/test-workflow-source-apply-e2e.ts @@ -10,7 +10,10 @@ import { isRecordLike } from '@sim/utils/object' * Workflow source apply over the real HTTP boundary of a running local app: create a workflow, * read it as TypeScript (`GET /api/v2/workflows/{id}/source`), edit the text, apply it * (`POST .../source`), and check the stored graph through `GET .../state`. Also drives the dry - * run, the stale-fingerprint 409 and the line-pinned 400. The app must have the `workflow-code` + * run, the stale-fingerprint 409 and the line-pinned 400. Then reads the resource manifest + * (`GET /api/v2/workspaces/{id}/resource-manifest`), creates a workflow from source + * (`POST /api/v2/workspaces/{id}/workflows/source`: dry run, create, name conflict, refusal) and + * applies to the new workflow with the lock the create returned. The app must have the `workflow-code` * flag on, and the key must be a personal API key (workspace keys are refused). * * Env: WORKFLOW_SOURCE_E2E_BASE_URL (loopback origin), WORKFLOW_SOURCE_E2E_API_KEY, @@ -133,6 +136,8 @@ async function main() { const startId = String(record((created.blocks as unknown[])[0]).id) const scoreId = generateId() const seededBlocks = await storedBlocks(workflowId) + /** Workflows the create checks made, removed with the seeded one. */ + const createdIds: string[] = [] try { await request('PUT', `/api/v2/workflows/${workflowId}/state`, { @@ -225,10 +230,107 @@ async function main() { assert.equal(first.file, 'workflow.ts') assert.equal(typeof first.line, 'number') }) - } finally { - await request('DELETE', `/api/v2/workflows/${workflowId}`).catch((error: unknown) => { - logger.warn('Cleanup failed', { workflowId, error: getErrorMessage(error) }) + + await check('the resource manifest lists this workflow by a key that stays put', async () => { + const first = record( + (await request('GET', `/api/v2/workspaces/${workspaceId}/resource-manifest`)).data + ) + const entry = (first.workflows as unknown[]).map(record).find((w) => w.id === workflowId) + assert(entry, 'the manifest lists the workflow') + assert.match(String(entry.key), /^[a-z][a-z0-9_-]{0,63}$/) + for (const kind of ['tables', 'knowledgeBases', 'bindings', 'env']) { + assert(Array.isArray(first[kind]), `${kind} is a list`) + } + const second = record( + (await request('GET', `/api/v2/workspaces/${workspaceId}/resource-manifest`)).data + ) + const again = (second.workflows as unknown[]).map(record).find((w) => w.id === workflowId) + assert.equal(again?.key, entry.key) + }) + + const createPath = `/api/v2/workspaces/${workspaceId}/workflows/source` + const copyName = `Source create e2e ${generateId().slice(0, 8)}` + let copy: { + workflowId: string + lock: Json + lockBase: Json + files: Record + } | null = null + + await check('a dry-run create checks the source and creates nothing', async () => { + const source = await readSource(workflowId) + const { data } = await request('POST', `${createPath}?dryRun=true`, { + files: source.files, + name: copyName, + }) + const result = record(data) + assert.equal(result.applied, false) + assert.equal(result.dryRun, true) + await request('GET', `/api/v2/workflows/${String(result.workflowId)}/source`, undefined, 404) + }) + + await check('creating from source writes a new workflow with fresh ids', async () => { + const source = await readSource(workflowId) + const { data } = await request('POST', createPath, { + files: source.files, + name: copyName, + provenance: { client: 'api' }, + }) + const result = record(data) + assert.equal(result.applied, true) + const newId = String(result.workflowId) + createdIds.push(newId) + assert.notEqual(newId, workflowId) + copy = { + workflowId: newId, + lock: record(result.lock), + lockBase: record(result.lockBase), + files: record(result.files) as Record, + } + const blocks = await storedBlocks(newId) + assert.equal(Object.keys(blocks).length, Object.keys(await storedBlocks(workflowId)).length) + assert(!(scoreId in blocks), 'the new workflow mints its own block ids') + const reread = await readSource(newId) + assert.equal(reread.fingerprint, result.newFingerprint) + }) + + await check( + 'the created workflow takes an apply with the lock the create returned', + async () => { + assert(copy, 'the create check must run first') + const { data } = await request('POST', `/api/v2/workflows/${copy.workflowId}/source`, { + files: edit(copy.files, 'return 7', 'return 8'), + lock: copy.lock, + lockBase: copy.lockBase, + baseFingerprint: String(copy.lockBase.baseFingerprint), + }) + assert.equal(record(data).applied, true) + const blocks = Object.values(await storedBlocks(copy.workflowId)) + const score = blocks.find((block) => block.name === 'Score') + assert.equal(record(record(score?.subBlocks).code).value, 'return 8') + } + ) + + await check('creating under a name the folder already holds answers 409', async () => { + const source = await readSource(workflowId) + await request('POST', createPath, { files: source.files, name: copyName }, 409) }) + + await check('broken source creates nothing and answers a line-pinned 400', async () => { + const body = await request( + 'POST', + createPath, + { files: { 'workflow.ts': '// @sim-sdk 1\nconst = \n' }, name: `${copyName} broken` }, + 400 + ) + assert.equal(record(record(body.error).details).code, 'SOURCE_REJECTED') + }) + } finally { + for (const id of [workflowId, ...createdIds]) { + await request('DELETE', `/api/v2/workflows/${id}`).catch((error: unknown) => { + logger.warn('Cleanup failed', { workflowId: id, error: getErrorMessage(error) }) + }) + } } } From cb75373a564952e41a5ac18e3fba5d3a3b83ee56 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:47:28 -0800 Subject: [PATCH 121/428] feat(workflow-code): carry a computed value thunk's creation value in the catalog Canvas creation (createBlockFromParams) calls every value() thunk with no values. A thunk that reads params still returns one stable value then (sailpoint queryType, snowflake semanticSource, the google_forms setup script), which the defaults rule needs. The projection now records it as valueDefault.initial; a thunk that mints a fresh value per call has none. The v2 block-catalog contract and its generated OpenAPI/CLI types carry the new optional field. --- apps/docs/openapi-v2-resources.json | 9 +++++++++ apps/sim/lib/api/contracts/v2/block-catalog.ts | 10 +++++++++- apps/sim/lib/workflows/code/catalog/project.ts | 12 +++++++++++- packages/sim-cli/src/generated/v2-api.ts | 3 +++ packages/workflow-code/src/catalog/types.ts | 9 +++++++-- 5 files changed, 39 insertions(+), 4 deletions(-) diff --git a/apps/docs/openapi-v2-resources.json b/apps/docs/openapi-v2-resources.json index fc827f84ac8..a3fd2ff1bf0 100644 --- a/apps/docs/openapi-v2-resources.json +++ b/apps/docs/openapi-v2-resources.json @@ -30159,6 +30159,9 @@ "type": "boolean", "const": true, "description": "Always true." + }, + "initial": { + "description": "What the thunk returns for a new block with no values (any JSON), when stable." } }, "required": ["computed"], @@ -31028,6 +31031,9 @@ "type": "boolean", "const": true, "description": "Always true." + }, + "initial": { + "description": "What the thunk returns for a new block with no values (any JSON), when stable." } }, "required": ["computed"], @@ -31703,6 +31709,9 @@ "type": "boolean", "const": true, "description": "Always true." + }, + "initial": { + "description": "What the thunk returns for a new block with no values (any JSON), when stable." } }, "required": ["computed"], diff --git a/apps/sim/lib/api/contracts/v2/block-catalog.ts b/apps/sim/lib/api/contracts/v2/block-catalog.ts index bde90f32756..5b882d63199 100644 --- a/apps/sim/lib/api/contracts/v2/block-catalog.ts +++ b/apps/sim/lib/api/contracts/v2/block-catalog.ts @@ -130,7 +130,15 @@ const catalogSubBlockSchema = z valueDefault: z .union([ z - .object({ computed: z.literal(true).describe('Always true.') }) + .object({ + computed: z.literal(true).describe('Always true.'), + initial: z + .unknown() + .optional() + .describe( + 'What the thunk returns for a new block with no values (any JSON), when stable.' + ), + }) .describe('A value thunk derived from other params.'), z .strictObject({ constant: z.unknown().describe('The constant value (any JSON).') }) diff --git a/apps/sim/lib/workflows/code/catalog/project.ts b/apps/sim/lib/workflows/code/catalog/project.ts index 84046c65289..0b1ff22f93b 100644 --- a/apps/sim/lib/workflows/code/catalog/project.ts +++ b/apps/sim/lib/workflows/code/catalog/project.ts @@ -183,12 +183,22 @@ function isJson(value: unknown): value is Json { /** * A `value()` thunk is a constant when it reads no param and returns the same value twice (some * thunks mint ids, which must never be frozen into the catalog); anything else is `computed`. + * A computed thunk that reads params still has one creation value: canvas creation calls it with + * no values (`createBlockFromParams`), so that result is kept as `initial` when it is JSON and + * the same twice. */ function projectValueDefault( thunk: NonNullable ): CatalogSubBlock['valueDefault'] { const first = probeThunk(thunk) - if (!first.ok || first.reads.size > 0) return { computed: true } + if (!first.ok) return { computed: true } + if (first.reads.size > 0) { + const initial = first.result + if (initial === undefined || initial === null || !isJson(initial)) return { computed: true } + const second = probeThunk(thunk) + const stable = second.ok && JSON.stringify(second.result) === JSON.stringify(initial) + return stable ? { computed: true, initial } : { computed: true } + } if (first.result === undefined) return undefined const second = probeThunk(thunk) if (!second.ok || second.result !== first.result || !isJson(first.result)) { diff --git a/packages/sim-cli/src/generated/v2-api.ts b/packages/sim-cli/src/generated/v2-api.ts index 6d0dee93d58..6b39c78c55d 100644 --- a/packages/sim-cli/src/generated/v2-api.ts +++ b/packages/sim-cli/src/generated/v2-api.ts @@ -6361,6 +6361,7 @@ export type GetBlockCatalogResponse = { valueDefault?: | { computed: true + initial?: unknown } | { constant: unknown @@ -6554,6 +6555,7 @@ export type GetBlockCatalogResponse = { valueDefault?: | { computed: true + initial?: unknown } | { constant: unknown @@ -6704,6 +6706,7 @@ export type GetBlockCatalogResponse = { valueDefault?: | { computed: true + initial?: unknown } | { constant: unknown diff --git a/packages/workflow-code/src/catalog/types.ts b/packages/workflow-code/src/catalog/types.ts index b0048ee880a..60ecd5d9cf5 100644 --- a/packages/workflow-code/src/catalog/types.ts +++ b/packages/workflow-code/src/catalog/types.ts @@ -111,8 +111,13 @@ export interface CatalogSubBlock { /** UI clearing and fetch ordering only; never part of types or visibility (s2 §2). */ dependsOn?: { all: SubBlockId[]; any: SubBlockId[] } defaultValue?: Json - /** The registry `value()` thunk: a constant when it ignores its params, else `computed`. */ - valueDefault?: { constant: Json } | { computed: true } + /** + * The registry `value()` thunk: a constant when it ignores its params, else `computed`. A + * computed thunk carries `initial`, what it returns for a new block with no values (the value + * canvas creation seeds), when that is the same every time; a thunk that mints a fresh value per + * call has none. + */ + valueDefault?: { constant: Json } | { computed: true; initial?: Json } /** * Static options; `dynamic` when fetched through `selectorKey`/`fetchOptions`; `opaque` for a * function the projection could not evaluate (build-spec decision 14). From cbc7b5b3e9a5ab4ce86b27fb65f9404a88fefbb6 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:48:24 -0800 Subject: [PATCH 122/428] feat(workflow-code): source holds what executes; UI state is restored from the stored workflow Governing principle and defaults rule (wave 4, 4B1). - printer: a lean print (the default) leaves out inactive values, the pair member a selector picked (picked()), modes unless the other member would store the value differently, off-type loop/parallel fields and unknown data residue; verbose: true prints them for debugging. A value equal to the editor default is omitted, and an active field with no stored value prints null where a default exists. - compile: an omitted param is the editor default canvas creation writes (catalog/defaults.ts); null and todo() stay stored-absent; a plain string is fine where a selector is expected; loop.doWhile takes count. - materialize: restorePreserved takes the pair member and mode (when the executable value is unchanged, and a changed plain id keeps prev's selector member), inactive values, off-type subflow fields, prev's spelling of a config that runs the same, and unknown residue from prev. - activity reads an opaque condition the catalog expanded per operation from visibleFor, so fields of other operations are not treated as live. - corpus: P0/P1 compare the executable view; new P6 asserts a no-op apply of the lean print is byte-identical to the stored workflow; a registry-wide test checks a code-created block equals a canvas-created one. - printer goldens and the printer->compiler golden test run against a checked-in slice of the real catalog (real-catalog.json), rebuilt and drift-checked by apps/sim golden-catalog.test.ts; cases use current block types and canvas-seeded defaults; five verbose goldens. --- .../code/corpus/roundtrip.corpus.test.ts | 33 ++- .../lib/workflows/code/default-parity.test.ts | 135 ++++++++++ .../lib/workflows/code/golden-catalog.test.ts | 106 ++++++++ biome.json | 1 + packages/workflow-code/src/api.ts | 7 + .../src/canonicalize/activity.ts | 27 +- .../src/canonicalize/index.test.ts | 17 ++ .../workflow-code/src/catalog/defaults.ts | 50 ++++ packages/workflow-code/src/compile/blocks.ts | 33 ++- .../workflow-code/src/compile/grammar.test.ts | 26 ++ .../src/compile/printer-goldens.test.ts | 57 ++--- .../workflow-code/src/compile/test-catalog.ts | 1 + .../src/equivalence/executable.ts | 10 +- .../src/materialize/index.test.ts | 98 +++++++- .../workflow-code/src/materialize/index.ts | 31 ++- .../workflow-code/src/materialize/preserve.ts | 230 ++++++++++++++++++ .../src/print/__fixtures__/cases.ts | 89 ++++--- .../src/print/__fixtures__/real-catalog.json | 1 + .../src/print/__fixtures__/real-catalog.ts | 19 ++ .../src/print/__golden__/agent-tools.txt | 4 +- .../src/print/__golden__/block-meta.txt | 5 +- .../print/__golden__/branches-null-rows.txt | 2 +- .../src/print/__golden__/fan-out-wrapping.txt | 18 +- .../src/print/__golden__/function-files.txt | 6 +- .../print/__golden__/function-languages.txt | 5 +- .../generic-block-legacy-operation.txt | 11 +- .../__golden__/generic-block-unknown-type.txt | 2 +- .../__golden__/identifier-collisions.txt | 22 +- .../src/print/__golden__/inactive-values.txt | 6 +- .../__golden__/inactive-values.verbose.txt | 13 + .../src/print/__golden__/json-code-fields.txt | 15 +- .../src/print/__golden__/layout-widths.txt | 2 +- .../__golden__/legacy-dropdown-and-todo.txt | 4 +- .../src/print/__golden__/lock-order.txt | 8 +- .../src/print/__golden__/loop-foreach.txt | 28 +-- .../print/__golden__/loop-foreach.verbose.txt | 28 +++ .../src/print/__golden__/nested-subflows.txt | 26 +- .../__golden__/nested-subflows.verbose.txt | 39 +++ .../src/print/__golden__/pair-modes.txt | 25 +- .../print/__golden__/pair-modes.verbose.txt | 39 +++ .../src/print/__golden__/parallel-untyped.txt | 4 +- .../print/__golden__/raw-and-odd-edges.txt | 6 +- .../__golden__/ref-cycle-literalized.txt | 15 +- .../src/print/__golden__/resource-nodes.txt | 28 +-- .../src/print/__golden__/string-escapes.txt | 17 +- .../src/print/__golden__/support-triage.txt | 13 +- .../__golden__/support-triage.verbose.txt | 73 ++++++ .../print/__golden__/templates-and-paths.txt | 28 ++- .../__golden__/trigger-mode-builders.txt | 16 +- .../print/__golden__/unresolved-tokens.txt | 13 +- .../src/print/__golden__/vars-by-field.txt | 10 +- .../src/print/determinism.test.ts | 15 +- .../workflow-code/src/print/golden.test.ts | 24 +- packages/workflow-code/src/print/printer.ts | 162 ++++++++++-- packages/workflow-code/src/print/values.ts | 10 +- packages/workflow-code/src/proof/oracles.ts | 6 +- packages/workflow-code/src/proof/report.ts | 13 +- 57 files changed, 1453 insertions(+), 279 deletions(-) create mode 100644 apps/sim/lib/workflows/code/default-parity.test.ts create mode 100644 apps/sim/lib/workflows/code/golden-catalog.test.ts create mode 100644 packages/workflow-code/src/catalog/defaults.ts create mode 100644 packages/workflow-code/src/materialize/preserve.ts create mode 100644 packages/workflow-code/src/print/__fixtures__/real-catalog.json create mode 100644 packages/workflow-code/src/print/__fixtures__/real-catalog.ts create mode 100644 packages/workflow-code/src/print/__golden__/inactive-values.verbose.txt create mode 100644 packages/workflow-code/src/print/__golden__/loop-foreach.verbose.txt create mode 100644 packages/workflow-code/src/print/__golden__/nested-subflows.verbose.txt create mode 100644 packages/workflow-code/src/print/__golden__/pair-modes.verbose.txt create mode 100644 packages/workflow-code/src/print/__golden__/support-triage.verbose.txt diff --git a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts index 1c16e42322a..08b15dbb09a 100644 --- a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts +++ b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts @@ -27,6 +27,7 @@ import { canonicalEquals, canonicalize, compileWorkflow, + executableView, materialize, type PrintWorkflowFn, printWorkflow, @@ -189,21 +190,22 @@ const properties: Record P0: (e, s) => idempotence({ oracle: 'P0', - value: canonical(e, s), - step: () => compiledOrThrow(sourceRun(e, s).compiled), - equals: canonicalEquals, + value: executableView(canonical(e, s), e.catalog), + step: () => executableView(compiledOrThrow(sourceRun(e, s).compiled), e.catalog), }), P1: (e, s) => { const original = canonical(e, s) return idempotence({ oracle: 'P1', - value: original, - step: (c) => - canonicalize(materialized(e, compiledWorkflow(e, c), s.state), { - catalog: e.catalog, - meta: c.meta, - }).workflow, - equals: canonicalEquals, + value: executableView(original, e.catalog), + step: () => + executableView( + canonicalize(materialized(e, compiledWorkflow(e, original), s.state), { + catalog: e.catalog, + meta: original.meta, + }).workflow, + e.catalog + ), }) }, P2: (e, s) => @@ -233,6 +235,12 @@ const properties: Record equals: canonicalEquals, }) }, + P6: (e, s) => + assertNoopIdentity({ + oracle: 'P6', + original: s.state, + materialized: materialized(e, compiledOrThrow(sourceRun(e, s).compiled), s.state), + }), O1: (e, s) => assertNoopIdentity({ original: s.state, @@ -281,12 +289,13 @@ function expectedFailures(property: ProofProperty): string[] { } const PROPERTY_TITLES: Record = { - P0: 'P0 source fidelity: compile(print(c)) equals c', - P1: 'P1 fidelity: canonicalize(materialize(compile(print(c)))) equals c', + P0: 'P0 source fidelity: compile(print(c)) runs as c (executable view)', + P1: 'P1 fidelity: canonicalize(materialize(compile(print(c)), prev)) runs as c', P2: 'P2 serializer parity after a full source round trip', P3: 'P3 print idempotence: print(compile(print(c))) is byte-identical', P4: 'P4 printed code compiles with zero errors', P5: 'P5 files mode compiles to the same workflow as inline mode', + P6: 'P6 no-op apply: materialize(compile(print(c)), prev x) deep-equals x', O1: 'O1 no-op identity: materialize(canonicalize(x), prev x) deep-equals x', O2: 'O2 lockless execution parity', O3: 'O3 idempotence: canonicalize(materialize(c)) equals c', diff --git a/apps/sim/lib/workflows/code/default-parity.test.ts b/apps/sim/lib/workflows/code/default-parity.test.ts new file mode 100644 index 00000000000..ef4d5aa1b7d --- /dev/null +++ b/apps/sim/lib/workflows/code/default-parity.test.ts @@ -0,0 +1,135 @@ +/** + * Defaults rule (wave 4): a param omitted in source means the editor default, so a block written + * from code with no params is stored exactly as canvas creation stores it, and the two execute the + * same. For every registry block type, in action mode and (where it can host one) trigger mode, + * this compares the block `MaterializeHooks.initBlock` creates with the block materialize writes + * for `block(type, name, {})`. + * + * Two values differ by design and are left out: + * - a field whose `value()` thunk mints a fresh value per call (a webhook token): two canvas + * creations differ too, and source cannot name the value it will get; + * - condition and router rows: canvas creation mints placeholder rows with fresh ids, while source + * `{}` is the never-persisted `rows: null` form (contract amendment 7), which canvas reads the + * same way until the first edit. + */ +import { catalogBlock, catalogBlockTypes, compileWorkflow, materialize } from '@sim/workflow-code' +import { describe, expect, it, vi } from 'vitest' + +vi.unmock('@/blocks/registry') +vi.unmock('@/tools/registry') + +import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' +import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' +import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' +import { getBlockRegistry } from '@/blocks/registry' +import { SDK_NAMES } from '@/blocks/sdk-names.generated' +import type { BlockState } from '@/stores/workflows/workflow/types' + +const hooks = createMaterializeHooks() +const registry = getBlockRegistry() +const { catalog } = buildBlockCatalog({ + blocks: Object.values(registry), + trigger: registryTrigger, + sdkNames: SDK_NAMES, +}) + +const NAME = 'Parity' + +function sourceFor(type: string, triggerMode: boolean): string { + const meta = triggerMode ? ', { triggerMode: true }' : '' + return [ + `// @sim-sdk ${catalog.sdkMajor}`, + "import { block, workflow } from '@sim/workflow-sdk'", + '', + "export default workflow('Parity', {}, () => {", + ` block(${JSON.stringify(type)}, '${NAME}', {}${meta})`, + '})', + '', + ].join('\n') +} + +/** + * Ids whose creation value is minted per call (two canvas creations disagree on it), and the + * branch list of a condition or router. + */ +function excludedIds(type: string, created: BlockState, again: BlockState): Set { + const excluded = new Set() + for (const [id, subBlock] of Object.entries(created.subBlocks)) { + if (JSON.stringify(subBlock?.value) !== JSON.stringify(again.subBlocks[id]?.value)) { + excluded.add(id) + } + } + const branches = catalogBlock(catalog, type)?.graph.branches?.subBlockId + if (branches) excluded.add(branches) + return excluded +} + +/** The stored state that decides what a block runs, with absent and `null` read alike. */ +function stored(block: BlockState, excluded: Set) { + const values: Record = {} + for (const [id, subBlock] of Object.entries(block.subBlocks)) { + if (excluded.has(id)) continue + if (subBlock?.value !== null && subBlock?.value !== undefined) values[id] = subBlock.value + } + return { + values, + canonicalModes: block.data?.canonicalModes ?? {}, + triggerMode: block.triggerMode === true, + advancedMode: block.advancedMode === true, + enabled: block.enabled !== false, + } +} + +function canHostTrigger(type: string): boolean { + const config = registry[type] + return config?.category !== 'triggers' && config?.triggers?.enabled === true +} + +const cases = catalogBlockTypes(catalog) + .filter((type) => Object.hasOwn(registry, type)) + .flatMap((type) => [ + { type, triggerMode: false }, + ...(canHostTrigger(type) ? [{ type, triggerMode: true }] : []), + ]) + +describe(`a code-created block matches a canvas-created one (${cases.length} cases)`, () => { + it('stores the same values, modes and flags for every block type with no params', () => { + const mismatches: string[] = [] + for (const { type, triggerMode } of cases) { + const label = `${type}${triggerMode ? ' (trigger mode)' : ''}` + const compiled = compileWorkflow({ + entry: { path: 'workflow.ts', text: sourceFor(type, triggerMode) }, + files: new Map(), + catalog, + sdkMajor: catalog.sdkMajor, + }) + const errors = compiled.diagnostics.filter((d) => d.severity === 'error') + if (!compiled.workflow || errors.length > 0) { + mismatches.push(`${label}: compile ${errors.map((d) => d.code).join(', ')}`) + continue + } + const written = Object.values( + materialize(compiled.workflow, null, { catalog, hooks, lockFreshness: 'none' }).state.blocks + )[0] + const created = hooks.initBlock({ id: written.id, type, name: NAME, triggerMode }) + const again = hooks.initBlock({ id: written.id, type, name: NAME, triggerMode }) + const excluded = excludedIds(type, created, again) + const fromCode = stored(written, excluded) + const fromCanvas = stored(created, excluded) + if (JSON.stringify(fromCode) !== JSON.stringify(fromCanvas)) { + const ids = [ + ...new Set([...Object.keys(fromCode.values), ...Object.keys(fromCanvas.values)]), + ].filter( + (id) => JSON.stringify(fromCode.values[id]) !== JSON.stringify(fromCanvas.values[id]) + ) + const modes = + JSON.stringify(fromCode.canonicalModes) === JSON.stringify(fromCanvas.canonicalModes) + ? '' + : ` modes ${JSON.stringify(fromCode.canonicalModes)} vs ${JSON.stringify(fromCanvas.canonicalModes)}` + mismatches.push(`${label}: ${ids.join(', ')}${modes}`) + } + } + expect(cases.length).toBeGreaterThan(400) + expect(mismatches).toEqual([]) + }, 120_000) +}) diff --git a/apps/sim/lib/workflows/code/golden-catalog.test.ts b/apps/sim/lib/workflows/code/golden-catalog.test.ts new file mode 100644 index 00000000000..92f17db9249 --- /dev/null +++ b/apps/sim/lib/workflows/code/golden-catalog.test.ts @@ -0,0 +1,106 @@ +/** + * The real-catalog snapshot `@sim/workflow-code`'s printer goldens run against + * (`packages/workflow-code/src/print/__fixtures__/real-catalog.json`). The package cannot import + * the registry, so the slice of `buildBlockCatalog` its golden cases use is checked in, and this + * drift check rebuilds it from the live registry: a registry change that alters what the goldens + * print fails here first. Regenerate with `WORKFLOW_CODE_GOLDEN_CATALOG_UPDATE=1`, then refresh the + * goldens (`bun run --cwd packages/workflow-code test src/print src/compile -u`). + */ +import { readFileSync, writeFileSync } from 'node:fs' +import path from 'node:path' +import { + type BlockCatalog, + type CatalogBlock, + type CatalogBuilder, + type CatalogTrigger, + catalogBlock, + catalogBuilder, + catalogBuilderPaths, + catalogTrigger, + compactBlockCatalog, + sha256Hex, + stableStringify, +} from '@sim/workflow-code' +import { describe, expect, it, vi } from 'vitest' + +vi.unmock('@/blocks/registry') +vi.unmock('@/tools/registry') + +import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' +import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' +import { getBlockRegistry } from '@/blocks/registry' +import { SDK_NAMES } from '@/blocks/sdk-names.generated' + +const SNAPSHOT = path.resolve( + process.cwd(), + '../../packages/workflow-code/src/print/__fixtures__/real-catalog.json' +) + +/** Every registry block type a printer golden case uses. */ +const GOLDEN_CATALOG_TYPES = [ + 'agent', + 'api', + 'condition', + 'function', + 'generic_webhook', + 'gmail_v2', + 'note', + 'response', + 'router_v2', + 'slack_v2', + 'start_trigger', + 'table_v2', + 'variables', +] + +/** + * The catalog narrowed to the golden types: their blocks, the builders that create them, and the + * triggers they deploy as (a trigger block is its own trigger), compacted like the served core + * shard and hashed the same way. + */ +function goldenCatalog(catalog: BlockCatalog): BlockCatalog { + const blocks: Record = {} + for (const type of GOLDEN_CATALOG_TYPES) { + const block = catalogBlock(catalog, type) + if (!block) throw new Error(`${type} is not in the registry catalog`) + blocks[type] = block + } + const triggers: Record = {} + const triggerIds = Object.values(blocks).flatMap((block) => [ + block.type, + ...(block.triggers?.available ?? []), + ]) + for (const id of triggerIds) { + const trigger = catalogTrigger(catalog, id) + if (trigger) triggers[id] = trigger + } + const builders: Record = {} + for (const builderPath of catalogBuilderPaths(catalog)) { + const builder = catalogBuilder(catalog, builderPath) + if (builder && Object.hasOwn(blocks, builder.type)) builders[builderPath] = builder + } + const { core } = compactBlockCatalog({ + catalogVersion: catalog.catalogVersion, + sdkMajor: catalog.sdkMajor, + blocks, + triggers, + builders, + }) + return { ...core, hash: sha256Hex(stableStringify(core)) } +} + +describe('the printer goldens real-catalog snapshot', () => { + it('matches the live registry', () => { + const { catalog } = buildBlockCatalog({ + blocks: Object.values(getBlockRegistry()), + trigger: registryTrigger, + sdkNames: SDK_NAMES, + }) + const text = `${JSON.stringify(goldenCatalog(catalog))}\n` + if (process.env.WORKFLOW_CODE_GOLDEN_CATALOG_UPDATE === '1') writeFileSync(SNAPSHOT, text) + expect( + readFileSync(SNAPSHOT, 'utf8') === text, + 'real-catalog.json is stale: rerun with WORKFLOW_CODE_GOLDEN_CATALOG_UPDATE=1' + ).toBe(true) + }) +}) diff --git a/biome.json b/biome.json index c8243b0e571..0fe9252ab42 100644 --- a/biome.json +++ b/biome.json @@ -34,6 +34,7 @@ "!**/apps/sim/lib/mothership/generated/**", "!**/packages/desktop-bridge/src/computer-use.generated.ts", "!**/packages/workflow-sdk/src/codegen/core-text.generated.ts", + "!**/packages/workflow-code/src/print/__fixtures__/real-catalog.json", "!**/apps/docs/.content", "!**/apps/desktop/release", "!**/venv", diff --git a/packages/workflow-code/src/api.ts b/packages/workflow-code/src/api.ts index 00f281c9423..f820d042429 100644 --- a/packages/workflow-code/src/api.ts +++ b/packages/workflow-code/src/api.ts @@ -282,6 +282,13 @@ export interface PrintOptions { codeDir?: string /** Defaults to 100 (biome.json). */ lineWidth?: number + /** + * Also print the state source never needs (`sim workflows source get --verbose`): inactive + * values, the pair member a selector picked (`picked()`), `meta.modes`, off-type loop and + * parallel fields and unknown `block.data`. Default `false`: source holds only what executes, + * and apply restores the rest from the stored workflow. + */ + verbose?: boolean } export interface PrintInput { diff --git a/packages/workflow-code/src/canonicalize/activity.ts b/packages/workflow-code/src/canonicalize/activity.ts index 71b22a237e3..295fc3137d9 100644 --- a/packages/workflow-code/src/canonicalize/activity.ts +++ b/packages/workflow-code/src/canonicalize/activity.ts @@ -97,6 +97,27 @@ export function deployReadIds( return ids } +/** + * A declaration's visibility condition over the block's values. A function condition the catalog + * could not evaluate to data is `{ opaque: true }` and counts as satisfied (s1 canonicalize step + * 9), except where the projection pre-expanded it per operation (`visibleFor`, computed only for a + * function that reads nothing but `operation`): there it is exactly what the function returns. + */ +function conditionHolds(subBlock: CatalogSubBlock, values: Record): boolean { + const { condition, visibleFor } = subBlock + const operation = values.operation + if ( + condition && + 'opaque' in condition && + visibleFor && + typeof operation === 'string' && + Object.hasOwn(visibleFor, operation) + ) { + return visibleFor[operation] === true + } + return evaluateSubBlockCondition(condition, values) +} + /** * `shouldSerializeSubBlock` (serializer/index.ts:55-108) over one catalog declaration. * Env-gated hiding (`hideWhenHosted` / `hideWhenEnvSet`) is deployment state the catalog does not @@ -125,14 +146,14 @@ function serializes(subBlock: CatalogSubBlock, inputs: ActivityInputs): boolean mode === 'advanced' ? group.advancedIds.includes(subBlock.id) : group.basicId === subBlock.id - return matchesMode && evaluateSubBlockCondition(subBlock.condition, values) + return matchesMode && conditionHolds(subBlock, values) } - return evaluateSubBlockCondition(subBlock.condition, values) + return conditionHolds(subBlock, values) } if (subBlock.mode === 'advanced' && !advancedMode) return isNonEmptyValue(values[subBlock.id]) if (subBlock.mode === 'basic' && advancedMode) return false - return evaluateSubBlockCondition(subBlock.condition, values) + return conditionHolds(subBlock, values) } /** diff --git a/packages/workflow-code/src/canonicalize/index.test.ts b/packages/workflow-code/src/canonicalize/index.test.ts index cd8a2b1e7d8..cd21a4f9c14 100644 --- a/packages/workflow-code/src/canonicalize/index.test.ts +++ b/packages/workflow-code/src/canonicalize/index.test.ts @@ -90,6 +90,12 @@ const CATALOG: BlockCatalog = { condition: { field: 'operation', value: SEND_OPERATIONS }, }), sb({ id: 'threadTs', type: 'short-input', mode: 'advanced' }), + sb({ + id: 'pageLimit', + type: 'short-input', + condition: { opaque: true }, + visibleFor: { read: true, send: false }, + }), sb({ id: 'botToken', type: 'short-input', mode: 'trigger', surface: 'trigger' }), sb({ id: 'signingSecret', type: 'short-input', mode: 'trigger', surface: 'trigger' }), sb({ @@ -675,6 +681,17 @@ describe('canonicalize: inactive annotation (step 9, quirks 1, 10, 14)', () => { expect(result.workflow.annotations.inactive.slack).toEqual(['channel']) }) + it('reads an opaque condition the catalog expanded per operation from visibleFor', () => { + const send = run( + workflow([blockState('b1', 'slack', 'Slack', { operation: 'send', pageLimit: '5' })]) + ) + expect(send.workflow.annotations.inactive.slack).toEqual(['pageLimit']) + const read = run( + workflow([blockState('b1', 'slack', 'Slack', { operation: 'read', pageLimit: '5' })]) + ) + expect(read.workflow.annotations.inactive.slack).toBeUndefined() + }) + it('marks trigger fields inactive outside trigger mode and active inside it (quirk 10)', () => { const action = run( workflow([blockState('b1', 'slack', 'Slack', { operation: 'send', botToken: 't' })]) diff --git a/packages/workflow-code/src/catalog/defaults.ts b/packages/workflow-code/src/catalog/defaults.ts new file mode 100644 index 00000000000..d6193f2baa3 --- /dev/null +++ b/packages/workflow-code/src/catalog/defaults.ts @@ -0,0 +1,50 @@ +/** + * The editor defaults of a block: the value canvas creation writes into each subBlock of a new + * block (`createBlockFromParams` with no inputs, which `MaterializeHooks.initBlock` wraps). A + * param omitted in source means this value (wave 4 defaults rule), and the printer omits a stored + * value equal to it. + * + * Creation seeds each subBlock id once, from its first declaration: a visible, editable field + * gets its `value()` thunk's result for a block with no values (`valueDefault.constant`, or a + * computed thunk's `initial`); a hidden field gets its `defaultValue`; a read-only field gets + * nothing. A thunk that mints a fresh value per call (a webhook token) has no static default, so + * creation from source leaves it unset. Every registry default is a string, number or boolean; + * anything else is not treated as a default, so it always prints. + */ + +import type { Json, SubBlockId } from '../model' +import type { CatalogBlock, CatalogSubBlock } from './types' + +export type EditorDefault = string | number | boolean + +const defaultsByBlock = new WeakMap>() + +function scalar(value: Json | undefined): EditorDefault | undefined { + return typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean' + ? value + : undefined +} + +function seededValue(subBlock: CatalogSubBlock): EditorDefault | undefined { + if (subBlock.hidden) return scalar(subBlock.defaultValue) + if (subBlock.readOnly) return undefined + const thunk = subBlock.valueDefault + if (!thunk) return undefined + return scalar('constant' in thunk ? thunk.constant : thunk.initial) +} + +/** Every subBlock id of `block` that creation seeds, with the value it seeds. */ +export function editorDefaults(block: CatalogBlock): ReadonlyMap { + const cached = defaultsByBlock.get(block) + if (cached) return cached + const defaults = new Map() + const seen = new Set() + for (const subBlock of block.subBlocks) { + if (seen.has(subBlock.id)) continue + seen.add(subBlock.id) + const value = seededValue(subBlock) + if (value !== undefined) defaults.set(subBlock.id, value) + } + defaultsByBlock.set(block, defaults) + return defaults +} diff --git a/packages/workflow-code/src/compile/blocks.ts b/packages/workflow-code/src/compile/blocks.ts index 4fbf89df0a2..545273fbed1 100644 --- a/packages/workflow-code/src/compile/blocks.ts +++ b/packages/workflow-code/src/compile/blocks.ts @@ -2,6 +2,7 @@ import type { Node, ObjectExpression, ObjectProperty } from '@babel/types' import { isRecordLike } from '@sim/utils/object' import type { BlockRetryConfig } from '@sim/workflow-types/workflow' import { encodeAnchor } from '../anchors' +import { editorDefaults } from '../catalog/defaults' import type { CatalogBlock, CatalogSubBlock } from '../catalog/types' import { type CodeFileLanguage, codeFileLanguage, fromCodeFile } from '../code-files' import type { @@ -564,6 +565,11 @@ interface BlockState { modes: Record written: WrittenParam[] todos: Map + /** + * Subblock ids written as `null` or `todo()`: stored-absent on purpose, so the editor default + * never fills them. + */ + unset: Set pendingFile: { compiled: Extract; target: SubBlockId } | null } @@ -591,9 +597,12 @@ function compileField( return } const compiled = compileValue(ctx, property.value, site) - if (!compiled || compiled.kind === 'absent') return - if (compiled.kind === 'todo') { - state.todos.set(field.param, property) + if (!compiled) return + if (compiled.kind === 'absent' || compiled.kind === 'todo') { + const member = + field.kind === 'pair' ? memberFor(field, meta.modes.get(field.param) ?? 'basic') : field.sub + if (member) state.unset.add(member.id) + if (compiled.kind === 'todo') state.todos.set(field.param, property) return } if (compiled.kind === 'file') { @@ -658,6 +667,7 @@ function compileRegularBlock(ctx: CompileContext, decl: BlockDecl): CompiledBloc modes: {}, written: [], todos: new Map(), + unset: new Set(), pendingFile: null, } const { params, modes } = state @@ -805,10 +815,16 @@ function compileRegularBlock(ctx: CompileContext, decl: BlockDecl): CompiledBloc let codeFile: string | undefined if (state.pendingFile) { const languageParam = params.language + const omittedLanguage = + catalogBlock && !state.unset.has('language') + ? editorDefaults(catalogBlock).get('language') + : undefined const language = languageParam?.kind === 'value' && typeof languageParam.value === 'string' ? languageParam.value - : 'javascript' + : typeof omittedLanguage === 'string' + ? omittedLanguage + : 'javascript' const read = readCodeFile(ctx, state.pendingFile.compiled, language, decl) if (read) { setOwn(params, state.pendingFile.target, { kind: 'value', value: read.code }) @@ -825,6 +841,13 @@ function compileRegularBlock(ctx: CompileContext, decl: BlockDecl): CompiledBloc } const inactive = compileInactive(ctx, meta.inactive, params, site) + if (catalogBlock) { + for (const [id, value] of editorDefaults(catalogBlock)) { + if (Object.hasOwn(params, id) || state.unset.has(id) || pinned.has(id)) continue + if (id === branchField?.subBlockId) continue + setOwn(params, id, { kind: 'value', value }) + } + } if (index) checkFields(ctx, index, state, inactive.properties) const block: CanonicalBlock = { @@ -965,7 +988,7 @@ const CONTAINER_CONFIG: Record> = { 'loop.for': { count: 'iterations' }, 'loop.forEach': { collection: 'forEachItems' }, 'loop.while': { condition: 'whileCondition' }, - 'loop.doWhile': { condition: 'doWhileCondition' }, + 'loop.doWhile': { condition: 'doWhileCondition', count: 'iterations' }, 'parallel.count': { count: 'count', batchSize: 'batchSize' }, 'parallel.collection': { collection: 'distribution', batchSize: 'batchSize' }, parallel: { count: 'count', collection: 'distribution', batchSize: 'batchSize' }, diff --git a/packages/workflow-code/src/compile/grammar.test.ts b/packages/workflow-code/src/compile/grammar.test.ts index 4bc82b4f79f..a55354bc334 100644 --- a/packages/workflow-code/src/compile/grammar.test.ts +++ b/packages/workflow-code/src/compile/grammar.test.ts @@ -966,3 +966,29 @@ describe('meta.key: legacy keys the display name cannot carry', () => { expect(errorsOf(withKeys(computed, ['loop'])).map((d) => d.code)).toContain('E_KEY_OVERRIDE') }) }) + +describe('defaults rule: an omitted param is the editor default', () => { + it('fills an omitted param with the editor default canvas creation writes', () => { + const wf = ok(source("const call = api('Call', { url: 'https://x' })")) + expect(paramValue(wf, 'call', 'method')).toBe('GET') + }) + + it('keeps a param written as null stored-absent', () => { + const wf = ok(source("const call = api('Call', { url: 'https://x', method: null })")) + expect(blockOf(wf, 'call').params).not.toHaveProperty('method') + }) + + it('keeps a param written as todo() stored-absent', () => { + const wf = ok(source("const call = api('Call', { url: 'https://x', method: todo() })")) + expect(blockOf(wf, 'call').params).not.toHaveProperty('method') + }) + + it("compiles a doWhile loop's count, which runs when it has no condition", () => { + const wf = ok(source("const again = loop.doWhile('Again', { count: 3 }, (p) => {})")) + expect(blockOf(wf, 'again').subflow).toEqual({ + kind: 'loop', + loopType: 'doWhile', + iterations: 3, + }) + }) +}) diff --git a/packages/workflow-code/src/compile/printer-goldens.test.ts b/packages/workflow-code/src/compile/printer-goldens.test.ts index 332a15ee3f0..05020928a7c 100644 --- a/packages/workflow-code/src/compile/printer-goldens.test.ts +++ b/packages/workflow-code/src/compile/printer-goldens.test.ts @@ -1,19 +1,22 @@ import { compareStrings } from '@sim/utils/string' import { describe, expect, it } from 'vitest' -import { portKey } from '../anchors' -import type { CompileResult } from '../api' +import type { CompileResult, PrintOptions } from '../api' +import { executableView } from '../equivalence/executable' import type { CanonicalWorkflow } from '../model' import { printWorkflow } from '../print' import { cases } from '../print/__fixtures__/cases' -import { catalog } from '../print/__fixtures__/catalog' +import { realCatalog as catalog } from '../print/__fixtures__/real-catalog' import { compileWorkflow } from './index' /** - * P3/P4 against the printer (Wave 2C): every printer case prints to source that compiles with zero - * errors (s3 D12) and back to the canonical workflow it was printed from. The printer's golden - * test pins these prints byte for byte. Annotations are not semantic, so only the comment texts - * are compared: the printer hoists a comment whose anchor it does not print and drops one whose - * block is gone. + * P0/P3/P4 against the printer, over the real catalog (`real-catalog.json`): every printer case + * prints to source that compiles with zero errors (s3 D12), runs as the canonical workflow it was + * printed from (its executable view: wave 4 source holds what executes, and apply restores the + * preserved UI state), and a lean print reprints to the same bytes. A verbose print compiles and + * runs the same too; it is a debugging view, so its reprint is not pinned. The + * printer's golden test pins the prints byte for byte. Annotations are not semantic, so only the + * comment texts are compared: the printer hoists a comment whose anchor it does not print and + * drops one whose block is gone. */ function compile(text: string, files: Record = {}): CompileResult { @@ -25,20 +28,6 @@ function compile(text: string, files: Record = {}): CompileResul }) } -function semantic(workflow: CanonicalWorkflow) { - return { - meta: workflow.meta, - variables: workflow.variables, - blocks: workflow.blocks, - edges: [...workflow.edges].sort( - (a, b) => - compareStrings(a.from, b.from) || - compareStrings(portKey(a.port), portKey(b.port)) || - compareStrings(a.to, b.to) - ), - } -} - function commentTexts(workflow: CanonicalWorkflow): string[] { return Object.values(workflow.annotations.comments) .flatMap((comments) => comments?.map((comment) => comment.text) ?? []) @@ -52,24 +41,28 @@ function expectRoundTrip(result: CompileResult, original: CanonicalWorkflow, gol .map((d) => `${d.code} ${d.span.line}:${d.span.column} ${d.message}`) ).toEqual([]) if (!result.workflow) throw new Error('expected a workflow') - expect(semantic(result.workflow)).toEqual(semantic(original)) + expect(executableView(result.workflow, catalog)).toEqual(executableView(original, catalog)) expect(commentTexts(result.workflow)).toEqual( commentTexts(original).filter((text) => golden.includes(text)) ) } describe('printer cases compile back to their canonical workflow', () => { + const modes: Array<[string, PrintOptions]> = [ + ['lean', { functionCode: 'inline' }], + ['verbose', { functionCode: 'inline', verbose: true }], + ] for (const testCase of cases) { - it(testCase.name, () => { - const printed = printWorkflow({ - workflow: testCase.workflow, - catalog, - hints: testCase.hints, - options: { functionCode: 'inline' }, + for (const [mode, options] of modes) { + it(`${testCase.name} (${mode})`, () => { + const print = (workflow: CanonicalWorkflow) => + printWorkflow({ workflow, catalog, hints: testCase.hints, options }).files[0].text + const golden = print(testCase.workflow) + const result = compile(golden) + expectRoundTrip(result, testCase.workflow, golden) + if (mode === 'lean' && result.workflow) expect(print(result.workflow)).toBe(golden) }) - const golden = printed.files[0].text - expectRoundTrip(compile(golden), testCase.workflow, golden) - }) + } } it('function-languages in files mode, with code files written by the code-file codec', () => { diff --git a/packages/workflow-code/src/compile/test-catalog.ts b/packages/workflow-code/src/compile/test-catalog.ts index abef25c0954..98c5fc86436 100644 --- a/packages/workflow-code/src/compile/test-catalog.ts +++ b/packages/workflow-code/src/compile/test-catalog.ts @@ -106,6 +106,7 @@ export const TEST_CATALOG: BlockCatalog = { { id: 'GET', label: 'GET' }, { id: 'POST', label: 'POST' }, ], + valueDefault: { constant: 'GET' }, }), sub('headers', 'table', 'object'), sub('body', 'code', 'json', { language: 'json' }), diff --git a/packages/workflow-code/src/equivalence/executable.ts b/packages/workflow-code/src/equivalence/executable.ts index 8301bec689b..ab60cf6ea2c 100644 --- a/packages/workflow-code/src/equivalence/executable.ts +++ b/packages/workflow-code/src/equivalence/executable.ts @@ -148,6 +148,11 @@ function executableParallel(spec: ParallelSpec): ExecutableSubflow { : { kind: 'parallel', parallelType, distribution: spec.distribution || '', batchSize } } +/** A loop or parallel config as the executor reads it for the type in effect. */ +export function executableSubflow(spec: LoopSpec | ParallelSpec): ExecutableSubflow { + return spec.kind === 'loop' ? executableLoop(spec) : executableParallel(spec) +} + /** The executable form of one block's params: inactive values dropped, pairs keyed by id. */ function executableParams( block: CanonicalBlock, @@ -192,10 +197,7 @@ function executableBlock(block: CanonicalBlock, catalog: BlockCatalog): Executab } if (block.branches) view.branches = block.branches if (block.subflow) { - view.subflow = - block.subflow.kind === 'loop' - ? executableLoop(block.subflow) - : executableParallel(block.subflow) + view.subflow = executableSubflow(block.subflow) const residue: Record = {} for (const [key, value] of Object.entries(block.opaque?.data ?? {})) { if (SUBFLOW_DATA_KEYS.has(key)) setOwn(residue, key, value) diff --git a/packages/workflow-code/src/materialize/index.test.ts b/packages/workflow-code/src/materialize/index.test.ts index 96d125f60b6..7df9a85e4dc 100644 --- a/packages/workflow-code/src/materialize/index.test.ts +++ b/packages/workflow-code/src/materialize/index.test.ts @@ -253,7 +253,7 @@ describe('materialize: params keep prev bytes unless they changed', () => { blockState('s2', 'slack', 'Bare', { operation: 'send', channel: 'C1' }), ]) const target = edit(canonical(state).workflow, (draft) => { - draft.blocks.explicit.params.manualChannel = { kind: 'value', value: 'C2' } + draft.blocks.explicit.params.manualChannel = { kind: 'value', value: '' } draft.blocks.explicit.modes.channel = 'advanced' draft.blocks.bare.params.manualChannel = { kind: 'value', value: 'C2' } draft.blocks.bare.params.threadTs = { kind: 'value', value: '1' } @@ -263,7 +263,7 @@ describe('materialize: params keep prev bytes unless they changed', () => { expect(result.state.blocks.s2.data?.canonicalModes).toBeUndefined() }) - it('pins a mode explicitly when the written values would infer the other one', () => { + it('pins a mode on a new block when the written values would infer the other one', () => { const state = workflowState([ blockState('s2', 'slack', 'Bare', { operation: 'send', channel: 'C1' }), ]) @@ -272,8 +272,10 @@ describe('materialize: params keep prev bytes unless they changed', () => { draft.blocks.bare.params.manualChannel = { kind: 'value', value: 'C2' } draft.blocks.bare.modes.channel = 'basic' }) - const result = run(target, null, { prev: state }) - expect(result.state.blocks.s2.data?.canonicalModes).toEqual({ channel: 'basic' }) + const result = run(target, null) + const written = Object.values(result.state.blocks)[0] + expect(written.subBlocks.manualChannel?.value).toBe('C2') + expect(written.data?.canonicalModes).toEqual({ channel: 'basic' }) }) it('re-indexes tool modes by position and drops the legacy type key when a tool list changes', () => { @@ -739,3 +741,91 @@ describe('materialize: positions and server-owned fields', () => { expect(run(target, null, { prev }).state.blocks.f1.errorEnabled).toBe(true) }) }) + +describe('materialize: preserved UI state comes from prev (wave 4 governing principle)', () => { + /** What compile makes of a lean print: a plain id lands in the advanced member. */ + function leanPair(draft: CanonicalWorkflow, key: string, id: string) { + const block = draft.blocks[key] + block.params = omit(block.params, ['channel', 'manualChannel']) + block.params.manualChannel = { kind: 'value', value: id } + block.modes.channel = 'advanced' + } + + it('keeps the selector member when source changes a plain id', () => { + const state = workflowState([ + blockState('s1', 'slack', 'Post', { operation: 'send', channel: 'C1', manualChannel: 'M' }), + ]) + const target = edit(canonical(state).workflow, (draft) => leanPair(draft, 'post', 'C2')) + const result = run(target, null, { prev: state }) + expect(subBlockValue(result.state, 's1', 'channel')).toBe('C2') + expect(subBlockValue(result.state, 's1', 'manualChannel')).toBe('M') + expect(result.state.blocks.s1.data?.canonicalModes).toBeUndefined() + }) + + it('writes prev back untouched when lean source runs the same as it', () => { + const state = workflowState([ + blockState('s1', 'slack', 'Post', { + operation: 'read', + channel: 'C1', + manualChannel: 'M', + text: 'stale message', + }), + ]) + const target = edit(canonical(state).workflow, (draft) => { + leanPair(draft, 'post', 'C1') + draft.blocks.post.params = omit(draft.blocks.post.params, ['text']) + }) + expect(run(target, null, { prev: state }).state.blocks.s1).toBe(state.blocks.s1) + }) + + it('keeps an inactive value through an edit to an active one', () => { + const state = workflowState([ + blockState('s1', 'slack', 'Post', { + operation: 'read', + channel: 'C1', + text: 'stale message', + notify: true, + }), + ]) + const target = edit(canonical(state).workflow, (draft) => { + draft.blocks.post.params = omit(draft.blocks.post.params, ['text']) + draft.blocks.post.params.notify = { kind: 'value', value: false } + }) + const result = run(target, null, { prev: state }) + expect(subBlockValue(result.state, 's1', 'notify')).toBe(false) + expect(subBlockValue(result.state, 's1', 'text')).toBe('stale message') + }) + + it("keeps a forEach loop's stored count through a collection edit", () => { + const state = workflowState([ + blockState( + 'l1', + 'loop', + 'Each', + {}, + { data: { loopType: 'forEach', count: 7, collection: '' } } + ), + ]) + const target = edit(canonical(state).workflow, (draft) => { + draft.blocks.each.subflow = { + kind: 'loop', + loopType: 'forEach', + iterations: 5, + forEachItems: '', + } + }) + const data = run(target, null, { prev: state }).state.blocks.l1.data + expect(data?.count).toBe(7) + expect(data?.collection).toBe('') + }) + + it('keeps the stored spelling of a loop count that runs the same', () => { + const state = workflowState([ + blockState('l1', 'loop', 'Count', {}, { data: { loopType: 'for', count: 0 } }), + ]) + const target = edit(canonical(state).workflow, (draft) => { + draft.blocks.count.subflow = { kind: 'loop', loopType: 'for', iterations: 5 } + }) + expect(run(target, null, { prev: state }).state.blocks.l1).toBe(state.blocks.l1) + }) +}) diff --git a/packages/workflow-code/src/materialize/index.ts b/packages/workflow-code/src/materialize/index.ts index 248559bd8fd..d7f9ee3fb4d 100644 --- a/packages/workflow-code/src/materialize/index.ts +++ b/packages/workflow-code/src/materialize/index.ts @@ -9,14 +9,17 @@ import { } from '@sim/workflow-types/workflow' import type { CanonicalizeResult, MaterializeFn, MaterializeHooks } from '../api' import { canonicalize } from '../canonicalize' +import type { BlockCatalog } from '../catalog/types' import type { MaterializeDiagnosticCode } from '../diagnostics/codes' import type { Diagnostic } from '../diagnostics/frame' import type { LockIdentity, WorkflowLockBlock, WorkflowLockV1 } from '../lock' -import type { BlockKey, CanonicalWorkflow, VarKey } from '../model' +import type { BlockKey, CanonicalBlock, CanonicalWorkflow, VarKey } from '../model' +import { setOwn } from '../records' import { type BuiltBlock, buildBlock } from './block' import { catalogBlock, type MaterializeContext, report } from './context' import { type BranchHandles, writeEdges } from './edges' import { resolveIdentity } from './identity' +import { restorePreserved } from './preserve' import { subflowEntry } from './subflows' import { deepEqual, rewriteRenamedReferences } from './values' @@ -75,6 +78,23 @@ function writeVariables( return { variables, idByKey } } +/** + * Each matched block with the preserved UI state of the stored block it continues + * (`restorePreserved`): source holds what executes, and the rest comes from prev. + */ +function withPreservedState( + workflow: CanonicalWorkflow, + prevBlock: (key: BlockKey) => CanonicalBlock | undefined, + catalog: BlockCatalog +): CanonicalWorkflow { + const blocks: Record = {} + for (const [key, block] of Object.entries(workflow.blocks)) { + const prev = prevBlock(key) + setOwn(blocks, key, prev ? restorePreserved(block, prev, catalog) : block) + } + return { ...workflow, blocks } +} + function childIds(blocks: Record, containerId: string): string[] { return Object.entries(blocks) .filter(([, block]) => block.data?.parentId === containerId) @@ -105,7 +125,14 @@ export const materialize: MaterializeFn = (input, lock, options) => { inferRenames: options.inferRenames !== false, diagnostics, }) - const workflow = rewriteRenamedReferences(input, resolution.renames) + const workflow = withPreservedState( + rewriteRenamedReferences(input, resolution.renames), + (key) => { + const prevKey = resolution.blocks.get(key)?.prevKey ?? null + return prevKey !== null ? prevCanonical?.workflow.blocks[prevKey] : undefined + }, + catalog + ) const idByKey = new Map([...resolution.blocks].map(([key, block]) => [key, block.id])) const { variables, idByKey: variableIdByKey } = writeVariables( diff --git a/packages/workflow-code/src/materialize/preserve.ts b/packages/workflow-code/src/materialize/preserve.ts new file mode 100644 index 00000000000..54bb1b26832 --- /dev/null +++ b/packages/workflow-code/src/materialize/preserve.ts @@ -0,0 +1,230 @@ +/** + * Preserved UI state (wave 4 governing principle): source holds what executes, and everything + * else a stored block carries is taken from the block it continues. For a target block compiled + * from lean source and the prev block it matched, this restores: + * - the pair member and mode, when the pair's executable value is unchanged; a changed plain id + * keeps prev's selector member when prev showed it, since whether a selector or a hand-typed + * value produced the id is UI state; + * - every value that is inactive under the target's values, including stored-absent ones and the + * editor defaults compile filled into fields that never run; + * - the config fields of the loop or parallel types not in effect, and prev's spelling of a config + * that runs the same (`count: 0` and `count: 5`); + * - unknown `block.data` residue a lean print does not carry. + * + * A full CWM (canonicalize's output, or a verbose print) already holds all of this, so restoring + * onto one changes nothing and the no-op round trip stays byte-identical. + */ + +import { canonicalActivityInputs, isInactive } from '../canonicalize/activity' +import { buildCanonicalIndexForSurface } from '../canonicalize/modes' +import { SUBFLOW_DATA_KEYS } from '../canonicalize/subflows' +import { type CanonicalGroup, isCanonicalPair } from '../catalog/canonical-index' +import type { BlockCatalog, CatalogBlock } from '../catalog/types' +import { catalogBlock } from '../catalog/view' +import { executableSubflow } from '../equivalence/executable' +import type { + CanonicalBlock, + CanonicalParam, + Json, + LoopSpec, + ParallelSpec, + ParamMode, + SubBlockId, +} from '../model' +import { getOwn, setOwn } from '../records' +import { deepEqual } from './values' + +/** Inactive restoration can flip another field's visibility; it settles within a few passes. */ +const MAX_RESTORE_PASSES = 4 + +function inactiveSet(block: CanonicalBlock, declared: CatalogBlock, catalog: BlockCatalog) { + const inputs = canonicalActivityInputs(block, declared, catalog) + return (id: SubBlockId) => isInactive(id, inputs) +} + +function setParam( + params: Record, + id: SubBlockId, + param: CanonicalParam | undefined +) { + if (param === undefined) delete params[id] + else setOwn(params, id, param) +} + +function members(group: CanonicalGroup): SubBlockId[] { + return [group.basicId, ...group.advancedIds].filter((id): id is string => id !== undefined) +} + +/** The value a pair sends: its one active member's, or none. */ +function pairValue( + block: CanonicalBlock, + group: CanonicalGroup, + inactive: (id: SubBlockId) => boolean +): CanonicalParam | undefined { + for (const id of members(group)) { + const param = getOwn(block.params, id) + if (param && !inactive(id)) return param + } + return undefined +} + +/** A plain id string: what a selector stores, with no reference or env token in it. */ +function isPlainId(param: CanonicalParam | undefined): param is { kind: 'value'; value: string } { + return ( + param?.kind === 'value' && + typeof param.value === 'string' && + param.value.length > 0 && + !/[<>{}]/.test(param.value) + ) +} + +function restorePairs( + next: CanonicalBlock, + prev: CanonicalBlock, + declared: CatalogBlock, + catalog: BlockCatalog +): void { + const index = buildCanonicalIndexForSurface(declared, next.triggerMode) + const nextInactive = inactiveSet(next, declared, catalog) + const prevInactive = inactiveSet(prev, declared, catalog) + for (const group of Object.values(index.groupsById)) { + if (!isCanonicalPair(group)) continue + const cid = group.canonicalId + const value = pairValue(next, group, nextInactive) + const prevMode: ParamMode | undefined = getOwn(prev.modes, cid) + if (deepEqual(value, pairValue(prev, group, prevInactive))) { + for (const id of members(group)) setParam(next.params, id, getOwn(prev.params, id)) + if (prevMode === undefined) delete next.modes[cid] + else setOwn(next.modes, cid, prevMode) + continue + } + const basicId = group.basicId + const basic = declared.subBlocks.find((subBlock) => subBlock.id === basicId) + if ( + basicId !== undefined && + prevMode === 'basic' && + getOwn(next.modes, cid) === 'advanced' && + basic?.valueKind === 'picked' && + isPlainId(value) + ) { + for (const id of group.advancedIds) setParam(next.params, id, getOwn(prev.params, id)) + setOwn(next.params, basicId, value) + setOwn(next.modes, cid, 'basic') + } + } +} + +function sameParams( + left: Record, + right: Record +): boolean { + return deepEqual(left, right) +} + +function restoreInactive( + next: CanonicalBlock, + prev: CanonicalBlock, + declared: CatalogBlock, + catalog: BlockCatalog +): void { + for (let pass = 0; pass < MAX_RESTORE_PASSES; pass += 1) { + const before = { ...next.params } + const inactive = inactiveSet(next, declared, catalog) + const ids = new Set([...Object.keys(next.params), ...Object.keys(prev.params)]) + for (const id of ids) { + if (inactive(id)) setParam(next.params, id, getOwn(prev.params, id)) + } + if (sameParams(before, next.params)) return + } +} + +function setOrDelete(target: T, key: K, value: T[K]): void { + if (value === undefined) delete target[key] + else target[key] = value +} + +/** Fields of a loop or parallel config that the executor reads for its type. */ +function liveFields(spec: LoopSpec | ParallelSpec): Set { + return new Set(Object.keys(executableSubflow(spec))) +} + +function restoreLoop(target: LoopSpec, prev: LoopSpec, live: Set): LoopSpec { + const merged: LoopSpec = { ...target } + if (!live.has('iterations')) merged.iterations = prev.iterations + if (!live.has('forEachItems')) { + setOrDelete(merged, 'forEachItems', prev.forEachItems) + } + if (!live.has('whileCondition')) { + setOrDelete(merged, 'whileCondition', prev.whileCondition) + } + if (!live.has('doWhileCondition')) { + setOrDelete(merged, 'doWhileCondition', prev.doWhileCondition) + } + return merged +} + +function restoreParallel( + target: ParallelSpec, + prev: ParallelSpec, + live: Set +): ParallelSpec { + const merged: ParallelSpec = { ...target } + if (!live.has('count')) { + setOrDelete(merged, 'count', prev.count) + } + if (!live.has('distribution')) { + setOrDelete(merged, 'distribution', prev.distribution) + } + return merged +} + +function restoreSubflow( + target: LoopSpec | ParallelSpec, + prev: LoopSpec | ParallelSpec | undefined +): LoopSpec | ParallelSpec { + if (!prev) return target + if (deepEqual(executableSubflow(target), executableSubflow(prev))) return prev + const live = liveFields(target) + if (target.kind === 'loop' && prev.kind === 'loop') return restoreLoop(target, prev, live) + if (target.kind === 'parallel' && prev.kind === 'parallel') { + return restoreParallel(target, prev, live) + } + return target +} + +/** Unknown `block.data` a lean print leaves out comes from prev; a printed key keeps the target's. */ +function restoreOpaque(target: CanonicalBlock, prev: CanonicalBlock): CanonicalBlock['opaque'] { + const data: Record = {} + for (const [key, value] of Object.entries(prev.opaque?.data ?? {})) { + const printed = target.subflow !== undefined && SUBFLOW_DATA_KEYS.has(key) + if (!printed) setOwn(data, key, value) + } + for (const [key, value] of Object.entries(target.opaque?.data ?? {})) setOwn(data, key, value) + return Object.keys(data).length > 0 ? { data } : undefined +} + +/** + * `target` with the preserved UI state of `prev`, the stored block it continues (see the module + * comment). Blocks of different types share nothing to restore. + */ +export function restorePreserved( + target: CanonicalBlock, + prev: CanonicalBlock, + catalog: BlockCatalog +): CanonicalBlock { + if (target.type !== prev.type) return target + const next: CanonicalBlock = { + ...target, + params: { ...target.params }, + modes: { ...target.modes }, + } + const declared = target.subflow ? undefined : catalogBlock(catalog, target.type) + if (declared) { + restorePairs(next, prev, declared, catalog) + restoreInactive(next, prev, declared, catalog) + } + if (target.subflow) next.subflow = restoreSubflow(target.subflow, prev.subflow) + const opaque = restoreOpaque(target, prev) + setOrDelete(next, 'opaque', opaque) + return next +} diff --git a/packages/workflow-code/src/print/__fixtures__/cases.ts b/packages/workflow-code/src/print/__fixtures__/cases.ts index 31b5dee92f4..e089a1f1bee 100644 --- a/packages/workflow-code/src/print/__fixtures__/cases.ts +++ b/packages/workflow-code/src/print/__fixtures__/cases.ts @@ -6,6 +6,8 @@ import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' import { encodeAnchor } from '../../anchors' import type { LockHints } from '../../api' +import { editorDefaults } from '../../catalog/defaults' +import { catalogBlock } from '../../catalog/view' import type { AnchorKey, CanonicalBlock, @@ -18,6 +20,7 @@ import type { Port, Value, } from '../../model' +import { realCatalog } from './real-catalog' export interface PrintCase { name: string @@ -30,10 +33,22 @@ type BlockInit = Partial } +/** + * A block as canvas creation leaves it, then edited: every editor default of its real catalog type + * (`editorDefaults`) is seeded first, as `createBlockFromParams` seeds them, and `params` override. + * A case that needs a field stored-absent writes it as `null`. + */ function blk(name: string, type: string, init: BlockInit = {}): CanonicalBlock { const { params = {}, tools = {}, ...rest } = init const canonicalParams: Record = {} - for (const [id, value] of Object.entries(params)) canonicalParams[id] = { kind: 'value', value } + const declared = catalogBlock(realCatalog, type) + for (const [id, value] of declared ? editorDefaults(declared) : []) { + canonicalParams[id] = { kind: 'value', value } + } + for (const [id, value] of Object.entries(params)) { + if (value === null) delete canonicalParams[id] + else canonicalParams[id] = { kind: 'value', value } + } for (const [id, list] of Object.entries(tools)) canonicalParams[id] = { kind: 'tools', tools: list } return { @@ -104,7 +119,7 @@ export const cases: PrintCase[] = [ description: 'Classifies inbound tickets and routes them.', variables: [{ key: 'escalations', name: 'escalations', type: 'number', value: 0 }], blocks: [ - blk('Ticket in', 'webhook', { + blk('Ticket in', 'generic_webhook', { params: { requireAuth: true, token: '{{TICKETS_WEBHOOK_TOKEN}}', @@ -137,7 +152,7 @@ export const cases: PrintCase[] = [ ], }, }), - blk('Log ticket', 'table', { + blk('Log ticket', 'table_v2', { params: { operation: 'insert_row', tableSelector: { $sim: 'resource', kind: 'table', key: 'tickets' }, @@ -147,15 +162,14 @@ export const cases: PrintCase[] = [ errorPort: true, }), - blk('Notify', 'slack', { + blk('Notify', 'slack_v2', { params: { operation: 'send', - authMethod: 'oauth', credential: { $sim: 'resource', kind: 'credential', key: 'support-slack' }, channel: 'C0SUPPORT', text: 'New ticket: ', }, - modes: { channel: 'basic' }, + modes: { channel: 'basic', oauthCredential: 'basic' }, errorPort: true, }), blk('Reply', 'response', { @@ -234,9 +248,15 @@ export const cases: PrintCase[] = [ workflow: wf({ blocks: [ start(), - blk('Alpha', 'agent', { params: { model: 'm', systemPrompt: 'See ' } }), - blk('Beta', 'agent', { params: { model: 'm', systemPrompt: 'See ' } }), - blk('Self', 'agent', { params: { model: 'm', systemPrompt: 'Me: ' } }), + blk('Alpha', 'agent', { + params: { model: 'm', messages: [{ role: 'system', content: 'See ' }] }, + }), + blk('Beta', 'agent', { + params: { model: 'm', messages: [{ role: 'system', content: 'See ' }] }, + }), + blk('Self', 'agent', { + params: { model: 'm', messages: [{ role: 'system', content: 'Me: ' }] }, + }), ], edges: [edge('start', 'alpha'), edge('alpha', 'beta')], }), @@ -266,7 +286,12 @@ export const cases: PrintCase[] = [ params: { language: 'javascript', code: 'return .score * 2' }, }), blk('Summary', 'agent', { - params: { model: 'm', systemPrompt: 'Results: and ' }, + params: { + model: 'm', + messages: [ + { role: 'system', content: 'Results: and ' }, + ], + }, }), ], edges: [ @@ -298,8 +323,13 @@ export const cases: PrintCase[] = [ parent: 'fan', params: { model: 'm', - systemPrompt: - 'loop parallel named fan ', + messages: [ + { + role: 'system', + content: + 'loop parallel named fan ', + }, + ], }, }), blk('Sibling', 'loop', { @@ -313,7 +343,10 @@ export const cases: PrintCase[] = [ }), blk('Inside sibling', 'agent', { parent: 'sibling', - params: { model: 'm', systemPrompt: 'cannot see ' }, + params: { + model: 'm', + messages: [{ role: 'system', content: 'cannot see ' }], + }, }), ], edges: [ @@ -342,7 +375,7 @@ export const cases: PrintCase[] = [ blocks: [ start(), blk('Gate', 'condition', { branches: { kind: 'condition', rows: null } }), - blk('Pick', 'router', { + blk('Pick', 'router_v2', { params: { context: 'ctx', model: 'm' }, branches: { kind: 'router', rows: null }, }), @@ -388,7 +421,7 @@ export const cases: PrintCase[] = [ { name: 'amount', type: 'number', value: '' }, { name: 'reason', type: 'string', value: '' }, ]), - blk('Triage', 'router', { + blk('Triage', 'router_v2', { params: { context: ' for ', model: 'claude-sonnet-5-5' }, branches: { kind: 'router', @@ -413,23 +446,23 @@ export const cases: PrintCase[] = [ workflow: wf({ blocks: [ start(), - blk('Picked basic', 'slack', { + blk('Picked basic', 'slack_v2', { params: { operation: 'send', channel: 'C0ONE', text: 'a' }, modes: { channel: 'basic' }, }), - blk('Manual advanced', 'slack', { + blk('Manual advanced', 'slack_v2', { params: { operation: 'send', manualChannel: '', text: 'b' }, modes: { channel: 'advanced' }, }), - blk('Basic holding text', 'slack', { + blk('Basic holding text', 'slack_v2', { params: { operation: 'send', channel: '', text: 'c' }, modes: { channel: 'basic' }, }), - blk('Advanced empty', 'slack', { + blk('Advanced empty', 'slack_v2', { params: { operation: 'send', text: 'd' }, modes: { channel: 'advanced' }, }), - blk('Both members', 'slack', { + blk('Both members', 'slack_v2', { params: { operation: 'send', channel: 'C0OLD', manualChannel: 'C0NEW', text: 'e' }, modes: { channel: 'advanced' }, }), @@ -445,7 +478,7 @@ export const cases: PrintCase[] = [ ], blocks: [ start(), - blk('Query', 'table', { + blk('Query', 'table_v2', { params: { operation: 'query_rows', tableSelector: { $sim: 'unresolved', kind: 'table', id: 'tbl_deleted' }, @@ -540,7 +573,7 @@ export const cases: PrintCase[] = [ workflow: wf({ blocks: [ start(), - blk('Old table op', 'table', { + blk('Old table op', 'table_v2', { params: { operation: 'delete_everything', limit: '10' }, modes: { tableId: 'basic' }, }), @@ -584,7 +617,7 @@ export const cases: PrintCase[] = [ tools: { tools: [ { - type: 'slack', + type: 'slack_v2', operation: 'send', params: { channel: 'C0OPS', text: 'Approve: ' }, modes: { channel: 'basic' }, @@ -615,7 +648,7 @@ export const cases: PrintCase[] = [ { name: 'limit', type: 'number', value: 10, description: 'Max results', required: true }, { name: 'tags', type: 'array' }, ]), - blk('Hook', 'webhook', { + blk('Hook', 'generic_webhook', { params: { inputFormat: [ { name: '1', type: 'string', value: '' }, @@ -816,7 +849,7 @@ export const cases: PrintCase[] = [ ], }, }), - blk('Short key', 'slack', { + blk('Short key', 'slack_v2', { params: { operation: 'send', text: 'a very long message body that will never fit on the same line as its very short key', @@ -830,7 +863,7 @@ export const cases: PrintCase[] = [ name: 'trigger-mode-builders', workflow: wf({ blocks: [ - blk('Invoice email', 'gmail', { + blk('Invoice email', 'gmail_v2', { triggerMode: true, params: { selectedTriggerId: 'gmail_poller', @@ -839,7 +872,7 @@ export const cases: PrintCase[] = [ markAsRead: true, }, }), - blk('Send summary', 'gmail', { + blk('Send summary', 'gmail_v2', { params: { operation: 'send_gmail', credential: { $sim: 'resource', kind: 'credential', key: 'finance-gmail' }, @@ -848,7 +881,7 @@ export const cases: PrintCase[] = [ body: '', }, }), - blk('Odd trigger', 'gmail', { + blk('Odd trigger', 'gmail_v2', { triggerMode: true, params: { selectedTriggerId: 'gmail_other', markAsRead: false }, }), diff --git a/packages/workflow-code/src/print/__fixtures__/real-catalog.json b/packages/workflow-code/src/print/__fixtures__/real-catalog.json new file mode 100644 index 00000000000..e5cc8e41a1a --- /dev/null +++ b/packages/workflow-code/src/print/__fixtures__/real-catalog.json @@ -0,0 +1 @@ +{"catalogVersion":1,"sdkMajor":1,"builders":{"agent":{"type":"agent"},"api":{"type":"api"},"condition":{"type":"condition"},"fn":{"type":"function"},"gmail.addLabel":{"type":"gmail_v2","operation":"add_label_gmail"},"gmail.archiveEmail":{"type":"gmail_v2","operation":"archive_gmail"},"gmail.createLabel":{"type":"gmail_v2","operation":"create_label_gmail"},"gmail.deleteDraft":{"type":"gmail_v2","operation":"delete_draft_gmail"},"gmail.deleteEmail":{"type":"gmail_v2","operation":"delete_gmail"},"gmail.deleteLabel":{"type":"gmail_v2","operation":"delete_label_gmail"},"gmail.draftEmail":{"type":"gmail_v2","operation":"draft_gmail"},"gmail.editDraft":{"type":"gmail_v2","operation":"edit_draft_gmail"},"gmail.getDraft":{"type":"gmail_v2","operation":"get_draft_gmail"},"gmail.getThread":{"type":"gmail_v2","operation":"get_thread_gmail"},"gmail.listDrafts":{"type":"gmail_v2","operation":"list_drafts_gmail"},"gmail.listLabels":{"type":"gmail_v2","operation":"list_labels_gmail"},"gmail.listThreads":{"type":"gmail_v2","operation":"list_threads_gmail"},"gmail.markAsRead":{"type":"gmail_v2","operation":"mark_read_gmail"},"gmail.markAsUnread":{"type":"gmail_v2","operation":"mark_unread_gmail"},"gmail.moveEmail":{"type":"gmail_v2","operation":"move_gmail"},"gmail.readEmail":{"type":"gmail_v2","operation":"read_gmail"},"gmail.removeLabel":{"type":"gmail_v2","operation":"remove_label_gmail"},"gmail.searchEmail":{"type":"gmail_v2","operation":"search_gmail"},"gmail.sendEmail":{"type":"gmail_v2","operation":"send_gmail"},"gmail.trashThread":{"type":"gmail_v2","operation":"trash_thread_gmail"},"gmail.unarchiveEmail":{"type":"gmail_v2","operation":"unarchive_gmail"},"gmail.untrashThread":{"type":"gmail_v2","operation":"untrash_thread_gmail"},"gmail.updateLabel":{"type":"gmail_v2","operation":"update_label_gmail"},"note":{"type":"note"},"response":{"type":"response"},"router":{"type":"router_v2"},"setVariables":{"type":"variables"},"slack.addBookmark":{"type":"slack_v2","operation":"add_bookmark"},"slack.addReaction":{"type":"slack_v2","operation":"react"},"slack.archiveConversation":{"type":"slack_v2","operation":"archive_conversation"},"slack.closeConversation":{"type":"slack_v2","operation":"close_conversation"},"slack.createCanvas":{"type":"slack_v2","operation":"canvas"},"slack.createChannelCanvas":{"type":"slack_v2","operation":"create_channel_canvas"},"slack.createConversation":{"type":"slack_v2","operation":"create_conversation"},"slack.createList":{"type":"slack_v2","operation":"create_list"},"slack.createListItem":{"type":"slack_v2","operation":"create_list_item"},"slack.createUserGroup":{"type":"slack_v2","operation":"create_user_group"},"slack.deleteCanvas":{"type":"slack_v2","operation":"delete_canvas"},"slack.deleteFile":{"type":"slack_v2","operation":"delete_file"},"slack.deleteListItem":{"type":"slack_v2","operation":"delete_list_item"},"slack.deleteListItems":{"type":"slack_v2","operation":"delete_list_items"},"slack.deleteMessage":{"type":"slack_v2","operation":"delete"},"slack.deleteScheduledMessage":{"type":"slack_v2","operation":"delete_scheduled_message"},"slack.disableUserGroup":{"type":"slack_v2","operation":"disable_user_group"},"slack.downloadFile":{"type":"slack_v2","operation":"download"},"slack.editBookmark":{"type":"slack_v2","operation":"edit_bookmark"},"slack.editCanvas":{"type":"slack_v2","operation":"edit_canvas"},"slack.enableUserGroup":{"type":"slack_v2","operation":"enable_user_group"},"slack.findUserByEmail":{"type":"slack_v2","operation":"lookup_user_by_email"},"slack.getCanvasInfo":{"type":"slack_v2","operation":"get_canvas"},"slack.getChannelHistory":{"type":"slack_v2","operation":"get_channel_history"},"slack.getChannelInfo":{"type":"slack_v2","operation":"get_channel_info"},"slack.getDoNotDisturbInfo":{"type":"slack_v2","operation":"get_dnd_info"},"slack.getFileInfo":{"type":"slack_v2","operation":"get_file_info"},"slack.getListExport":{"type":"slack_v2","operation":"get_list_export"},"slack.getListItem":{"type":"slack_v2","operation":"get_list_item"},"slack.getMessage":{"type":"slack_v2","operation":"get_message"},"slack.getMessagePermalink":{"type":"slack_v2","operation":"get_permalink"},"slack.getReactions":{"type":"slack_v2","operation":"get_reactions"},"slack.getTeamDoNotDisturbInfo":{"type":"slack_v2","operation":"get_team_dnd_info"},"slack.getThread":{"type":"slack_v2","operation":"get_thread"},"slack.getThreadReplies":{"type":"slack_v2","operation":"get_thread_replies"},"slack.getUserInfo":{"type":"slack_v2","operation":"get_user"},"slack.getUserPresence":{"type":"slack_v2","operation":"get_user_presence"},"slack.getUserProfile":{"type":"slack_v2","operation":"get_user_profile"},"slack.getWorkspaceInfo":{"type":"slack_v2","operation":"get_team_info"},"slack.getWorkspaceProfileFields":{"type":"slack_v2","operation":"get_team_profile"},"slack.inviteToConversation":{"type":"slack_v2","operation":"invite_to_conversation"},"slack.joinConversation":{"type":"slack_v2","operation":"join_conversation"},"slack.leaveConversation":{"type":"slack_v2","operation":"leave_conversation"},"slack.listBookmarks":{"type":"slack_v2","operation":"list_bookmarks"},"slack.listCanvases":{"type":"slack_v2","operation":"list_canvases"},"slack.listChannelMembers":{"type":"slack_v2","operation":"list_members"},"slack.listChannels":{"type":"slack_v2","operation":"list_channels"},"slack.listCustomEmoji":{"type":"slack_v2","operation":"list_emoji"},"slack.listFiles":{"type":"slack_v2","operation":"list_files"},"slack.listPins":{"type":"slack_v2","operation":"list_pins"},"slack.listReactions":{"type":"slack_v2","operation":"list_reactions"},"slack.listScheduledMessages":{"type":"slack_v2","operation":"list_scheduled_messages"},"slack.listUserConversations":{"type":"slack_v2","operation":"list_user_conversations"},"slack.listUserGroupMembers":{"type":"slack_v2","operation":"list_user_group_members"},"slack.listUserGroups":{"type":"slack_v2","operation":"list_user_groups"},"slack.listUsers":{"type":"slack_v2","operation":"list_users"},"slack.lookupCanvasSections":{"type":"slack_v2","operation":"lookup_canvas_sections"},"slack.markConversationRead":{"type":"slack_v2","operation":"mark_conversation_read"},"slack.openConversation":{"type":"slack_v2","operation":"open_conversation"},"slack.openView":{"type":"slack_v2","operation":"open_view"},"slack.pinMessage":{"type":"slack_v2","operation":"pin_message"},"slack.publishView":{"type":"slack_v2","operation":"publish_view"},"slack.pushView":{"type":"slack_v2","operation":"push_view"},"slack.readListItems":{"type":"slack_v2","operation":"list_items"},"slack.readMessages":{"type":"slack_v2","operation":"read"},"slack.removeBookmark":{"type":"slack_v2","operation":"remove_bookmark"},"slack.removeReaction":{"type":"slack_v2","operation":"unreact"},"slack.removeUserFromConversation":{"type":"slack_v2","operation":"kick_conversation"},"slack.renameAgentSession":{"type":"slack_v2","operation":"rename_agent_session"},"slack.renameConversation":{"type":"slack_v2","operation":"rename_conversation"},"slack.revokeCanvasAccess":{"type":"slack_v2","operation":"revoke_canvas_access"},"slack.revokeListAccess":{"type":"slack_v2","operation":"revoke_list_access"},"slack.scheduleMessage":{"type":"slack_v2","operation":"schedule_message"},"slack.sendEphemeralMessage":{"type":"slack_v2","operation":"ephemeral"},"slack.sendMessage":{"type":"slack_v2","operation":"send"},"slack.setAgentSessionStatus":{"type":"slack_v2","operation":"set_agent_session_status"},"slack.setAgentSuggestedPrompts":{"type":"slack_v2","operation":"set_agent_suggested_prompts"},"slack.setAssistantStatus":{"type":"slack_v2","operation":"set_status"},"slack.setAssistantSuggestedPrompts":{"type":"slack_v2","operation":"set_suggested_prompts"},"slack.setAssistantTitle":{"type":"slack_v2","operation":"set_title"},"slack.setBotPresence":{"type":"slack_v2","operation":"set_user_presence"},"slack.setConversationPurpose":{"type":"slack_v2","operation":"set_conversation_purpose"},"slack.setConversationTopic":{"type":"slack_v2","operation":"set_conversation_topic"},"slack.shareCanvas":{"type":"slack_v2","operation":"share_canvas"},"slack.shareList":{"type":"slack_v2","operation":"share_list"},"slack.startListExport":{"type":"slack_v2","operation":"start_list_export"},"slack.unarchiveConversation":{"type":"slack_v2","operation":"unarchive_conversation"},"slack.unfurlLinks":{"type":"slack_v2","operation":"unfurl_links"},"slack.unpinMessage":{"type":"slack_v2","operation":"unpin_message"},"slack.updateList":{"type":"slack_v2","operation":"rename_list"},"slack.updateListItems":{"type":"slack_v2","operation":"update_list_items"},"slack.updateMessage":{"type":"slack_v2","operation":"update"},"slack.updateUserGroup":{"type":"slack_v2","operation":"update_user_group"},"slack.updateUserGroupMembers":{"type":"slack_v2","operation":"update_user_group_members"},"slack.updateView":{"type":"slack_v2","operation":"update_view"},"table.batchInsertRows":{"type":"table_v2","operation":"batch_insert_rows"},"table.deleteRowById":{"type":"table_v2","operation":"delete_row"},"table.deleteRowsByFilter":{"type":"table_v2","operation":"delete_rows_by_filter"},"table.getRowById":{"type":"table_v2","operation":"get_row"},"table.getSchema":{"type":"table_v2","operation":"get_schema"},"table.insertRow":{"type":"table_v2","operation":"insert_row"},"table.queryRows":{"type":"table_v2","operation":"query_rows"},"table.updateRowById":{"type":"table_v2","operation":"update_row"},"table.updateRowsByFilter":{"type":"table_v2","operation":"update_rows_by_filter"},"table.upsertRow":{"type":"table_v2","operation":"upsert_row"},"trigger.gmail.poller":{"type":"gmail_v2","triggerMode":true},"trigger.slack.oauth":{"type":"slack_v2","triggerMode":true},"trigger.start":{"type":"start_trigger"},"trigger.table.newRow":{"type":"table_v2","triggerMode":true},"trigger.webhook":{"type":"generic_webhook"}},"blocks":{"agent":{"type":"agent","name":"Agent","category":"blocks","tools":{"access":["openai_chat","anthropic_chat","google_chat","xai_chat","deepseek_chat","deepseek_reasoner"],"selector":"opaque"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"dynamicOutputs":{"source":"responseFormat","param":"responseFormat"},"subBlocks":[{"id":"messages","type":"messages-input","valueKind":"array","storage":"native","title":"Messages","condition":{"field":"model","value":{"list":0},"not":true}},{"id":"model","type":"combobox","valueKind":"string","storage":"native","title":"Model","defaultValue":"claude-sonnet-5-5","required":true,"options":[{"id":"jev-latest"},{"id":"jev-1.13.0"},{"id":"jev-preview"},{"id":"nebius/deepseek-ai/DeepSeek-V4-Pro-0813"},{"id":"nebius/google/gemma-3-27b-it"},{"id":"nebius/MiniMaxAI/MiniMax-M3"},{"id":"nebius/moonshotai/Kimi-K3"},{"id":"nebius/NousResearch/Hermes-4-405B"},{"id":"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B"},{"id":"nebius/nvidia/nemotron-3-super-120b-a12b"},{"id":"nebius/nvidia/Nemotron-3-Ultra-550b-a55b"},{"id":"nebius/nvidia/Nemotron-3_5-Lightning"},{"id":"nebius/openai/gpt-oss-120b"},{"id":"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3.8-27B"},{"id":"nebius/zai-org/GLM-5.2"},{"id":"nebius/zai-org/GLM-5.3"},{"id":"nebius/zai-org/GLM-5.3-Flash"},{"id":"thinkingmachines/inkling-small"},{"id":"thinkingmachines/inkling"},{"id":"thinkingmachines/inkling-2-small"},{"id":"gpt-6.1-terra"},{"id":"gpt-6.1-sol"},{"id":"gpt-6-sol"},{"id":"gpt-6-luna"},{"id":"gpt-6-astra"},{"id":"gpt-5.6-sol"},{"id":"gpt-5.6-terra"},{"id":"gpt-5.6-luna"},{"id":"chat-latest"},{"id":"gpt-5.5-pro"},{"id":"gpt-5.5"},{"id":"gpt-5.4-mini"},{"id":"gpt-5.4-nano"},{"id":"gpt-5.4-pro"},{"id":"gpt-5.4"},{"id":"gpt-5.3-codex"},{"id":"gpt-5.2-pro"},{"id":"gpt-5.2"},{"id":"gpt-5.1"},{"id":"gpt-5-pro"},{"id":"gpt-5"},{"id":"gpt-5-mini"},{"id":"gpt-5-nano"},{"id":"o3-pro"},{"id":"o4-mini"},{"id":"o3"},{"id":"gpt-4.1"},{"id":"gpt-4.1-mini"},{"id":"o3-mini"},{"id":"o1"},{"id":"gpt-4o"},{"id":"claude-fable-5-2"},{"id":"claude-haiku-5-5"},{"id":"claude-sonnet-5-5"},{"id":"claude-opus-5-5"},{"id":"claude-fable-5-1"},{"id":"claude-opus-5"},{"id":"claude-sonnet-5"},{"id":"claude-fable-5"},{"id":"claude-opus-4-8"},{"id":"claude-opus-4-7"},{"id":"claude-sonnet-4-6"},{"id":"claude-opus-4-6"},{"id":"claude-opus-4-5"},{"id":"claude-haiku-4-5"},{"id":"claude-sonnet-4-5"},{"id":"azure/gpt-6.1-sol"},{"id":"azure/gpt-6-sol"},{"id":"azure/gpt-6-luna"},{"id":"azure/gpt-6-astra"},{"id":"azure/gpt-5.6-sol"},{"id":"azure/gpt-5.6-terra"},{"id":"azure/gpt-5.6-luna"},{"id":"azure/gpt-5.5"},{"id":"azure/gpt-5.4-mini"},{"id":"azure/gpt-5.4-nano"},{"id":"azure/gpt-5.4-pro"},{"id":"azure/gpt-5.4"},{"id":"azure/gpt-5.2"},{"id":"azure/gpt-5.1"},{"id":"azure/gpt-5.1-codex"},{"id":"azure/gpt-5"},{"id":"azure/gpt-5-mini"},{"id":"azure/gpt-5-nano"},{"id":"azure/gpt-5-chat"},{"id":"azure/model-router"},{"id":"azure/o3"},{"id":"azure/o4-mini"},{"id":"azure/gpt-4.1"},{"id":"azure/gpt-4.1-mini"},{"id":"azure/gpt-4.1-nano"},{"id":"azure/gpt-4o"},{"id":"azure-anthropic/claude-haiku-5-5"},{"id":"azure-anthropic/claude-sonnet-5-5"},{"id":"azure-anthropic/claude-opus-5-5"},{"id":"azure-anthropic/claude-fable-5-1"},{"id":"azure-anthropic/claude-opus-5"},{"id":"azure-anthropic/claude-sonnet-5"},{"id":"azure-anthropic/claude-opus-4-8"},{"id":"azure-anthropic/claude-opus-4-7"},{"id":"azure-anthropic/claude-sonnet-4-6"},{"id":"azure-anthropic/claude-opus-4-6"},{"id":"azure-anthropic/claude-opus-4-5"},{"id":"azure-anthropic/claude-haiku-4-5"},{"id":"azure-anthropic/claude-sonnet-4-5"},{"id":"azure-anthropic/claude-opus-4-1"},{"id":"gemini-4-argon"},{"id":"gemini-3.8-flash"},{"id":"gemini-3.7-flash"},{"id":"gemini-3.6-flash"},{"id":"gemini-3.5-flash-lite"},{"id":"gemini-3.5-flash"},{"id":"gemini-3.1-flash-lite"},{"id":"gemini-3.1-pro-preview"},{"id":"gemini-3-flash-preview"},{"id":"deep-research-pro-preview-12-2025"},{"id":"gemini-2.5-flash-lite"},{"id":"gemini-2.5-flash"},{"id":"gemini-2.5-pro"},{"id":"vertex/gemini-3.8-flash"},{"id":"vertex/gemini-3.7-flash"},{"id":"vertex/gemini-3.6-flash"},{"id":"vertex/gemini-3.5-flash-lite"},{"id":"vertex/gemini-3.5-flash"},{"id":"vertex/gemini-3.1-flash-lite"},{"id":"vertex/gemini-3.1-pro-preview"},{"id":"vertex/gemini-3-flash-preview"},{"id":"vertex/deep-research-pro-preview-12-2025"},{"id":"vertex/gemini-2.5-flash-lite"},{"id":"vertex/gemini-2.5-flash"},{"id":"vertex/gemini-2.5-pro"},{"id":"deepseek-flash"},{"id":"deepseek-v4-pro"},{"id":"deepseek-v4-flash"},{"id":"deepseek-reasoner"},{"id":"deepseek-chat"},{"id":"grok-4.7"},{"id":"grok-4.6"},{"id":"grok-4.5"},{"id":"grok-4.3"},{"id":"grok-4.20-0309-reasoning"},{"id":"grok-4.20-0309-non-reasoning"},{"id":"grok-4.20-multi-agent-0309"},{"id":"cerebras/qwen-3.8-27b"},{"id":"cerebras/gemma-4-31b"},{"id":"cerebras/zai-glm-4.7"},{"id":"cerebras/gpt-oss-120b"},{"id":"groq/qwen/qwen3.8-27b"},{"id":"groq/qwen/qwen3.6-27b"},{"id":"groq/openai/gpt-oss-safeguard-20b"},{"id":"groq/openai/gpt-oss-120b"},{"id":"groq/openai/gpt-oss-20b"},{"id":"groq/llama-3.3-70b-versatile"},{"id":"groq/llama-3.1-8b-instant"},{"id":"fugu-ultra-v2.0"},{"id":"fugu-max"},{"id":"fugu-max-v1.0"},{"id":"fugu"},{"id":"fugu-ultra"},{"id":"sakana-namazu"},{"id":"sakana-namazu-v1.0"},{"id":"nvidia/nemotron-3.5-lightning-30b-a3b"},{"id":"nvidia/nemotron-3-ultra-550b-a55b"},{"id":"nvidia/nemotron-3-nano-30b-a3b"},{"id":"nvidia/llama-3.3-nemotron-super-49b-v1.5"},{"id":"nvidia/llama-3.1-nemotron-ultra-253b-v1"},{"id":"nvidia/llama-3.1-nemotron-70b-instruct"},{"id":"muse-spark-1.3"},{"id":"muse-spark-1.1"},{"id":"kimi-k3"},{"id":"kimi-k2.7-code"},{"id":"kimi-k2.7-code-highspeed"},{"id":"kimi-k2.6"},{"id":"kie/gpt-6-1-sol"},{"id":"kie/claude-sonnet-5-5"},{"id":"kie/claude-opus-5-5"},{"id":"kie/gpt-6-sol"},{"id":"kie/gpt-6-luna"},{"id":"kie/gpt-6-astra"},{"id":"kie/grok-4-6"},{"id":"kie/claude-opus-5"},{"id":"kie/kimi-k3"},{"id":"kie/gpt-5-6-sol"},{"id":"kie/gpt-5-6-terra"},{"id":"kie/gpt-5-6-luna"},{"id":"kie/grok-4-5"},{"id":"kie/claude-sonnet-5"},{"id":"kie/claude-fable-5"},{"id":"kie/claude-opus-4-8"},{"id":"kie/grok-4-3"},{"id":"kie/gpt-5-5"},{"id":"kie/claude-opus-4-7"},{"id":"kie/claude-sonnet-4-6"},{"id":"kie/claude-opus-4-6"},{"id":"kie/claude-opus-4-5"},{"id":"kie/claude-haiku-4-5"},{"id":"kie/claude-sonnet-4-5"},{"id":"glm-5.3-flash"},{"id":"glm-5.3"},{"id":"glm-5.2"},{"id":"glm-5.1"},{"id":"glm-5-turbo"},{"id":"glm-5"},{"id":"glm-4.7"},{"id":"glm-4.7-flashx"},{"id":"glm-4.6"},{"id":"glm-4.5"},{"id":"glm-4.5-air"},{"id":"glm-4.5-x"},{"id":"glm-4.5-airx"},{"id":"glm-4-32b-0414-128k"},{"id":"glm-5.3-flashx"},{"id":"mistral-large-4"},{"id":"zai-glm-5-3"},{"id":"zai-glm-5-2"},{"id":"labs-leanstral-1-5"},{"id":"mistral-medium-2604"},{"id":"mistral-medium-3-5"},{"id":"mistral-medium-3"},{"id":"mistral-medium-latest"},{"id":"mistral-small-2603"},{"id":"mistral-small-latest"},{"id":"devstral-2512"},{"id":"devstral-latest"},{"id":"devstral-small-latest"},{"id":"mistral-large-latest"},{"id":"mistral-large-2512"},{"id":"ministral-14b-latest"},{"id":"ministral-14b-2512"},{"id":"ministral-8b-latest"},{"id":"ministral-8b-2512"},{"id":"ministral-3b-latest"},{"id":"ministral-3b-2512"},{"id":"magistral-medium-latest"},{"id":"magistral-medium-2509"},{"id":"magistral-small-latest"},{"id":"magistral-small-2509"},{"id":"mistral-medium-2508"},{"id":"codestral-latest"},{"id":"codestral-2508"},{"id":"mistral-small-2506"},{"id":"mistral-medium-2505"},{"id":"open-mistral-nemo"},{"id":"bedrock/openai.gpt-6.1-sol"},{"id":"bedrock/openai.gpt-6-astra"},{"id":"bedrock/anthropic.claude-opus-5"},{"id":"bedrock/openai.gpt-5.6-sol"},{"id":"bedrock/openai.gpt-5.6-terra"},{"id":"bedrock/openai.gpt-5.6-luna"},{"id":"bedrock/anthropic.claude-sonnet-5"},{"id":"bedrock/anthropic.claude-fable-5"},{"id":"bedrock/anthropic.claude-opus-4-8"},{"id":"bedrock/anthropic.claude-opus-4-7"},{"id":"bedrock/anthropic.claude-sonnet-4-6"},{"id":"bedrock/minimax.minimax-m2.5"},{"id":"bedrock/zai.glm-5"},{"id":"bedrock/anthropic.claude-opus-4-6-v1"},{"id":"bedrock/moonshotai.kimi-k2.5"},{"id":"bedrock/amazon.nova-2-lite-v1:0"},{"id":"bedrock/mistral.mistral-large-3-675b-instruct"},{"id":"bedrock/mistral.ministral-3-14b-instruct"},{"id":"bedrock/mistral.ministral-3-8b-instruct"},{"id":"bedrock/mistral.ministral-3-3b-instruct"},{"id":"bedrock/deepseek.v3.2"},{"id":"bedrock/anthropic.claude-opus-4-5-20251101-v1:0"},{"id":"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0"},{"id":"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0"},{"id":"bedrock/anthropic.claude-opus-4-1-20250805-v1:0"},{"id":"bedrock/openai.gpt-oss-120b-1:0"},{"id":"bedrock/openai.gpt-oss-20b-1:0"},{"id":"bedrock/amazon.nova-premier-v1:0"},{"id":"bedrock/meta.llama4-maverick-17b-instruct-v1:0"},{"id":"bedrock/meta.llama4-scout-17b-instruct-v1:0"},{"id":"bedrock/meta.llama3-3-70b-instruct-v1:0"},{"id":"bedrock/amazon.nova-pro-v1:0"},{"id":"bedrock/amazon.nova-lite-v1:0"},{"id":"bedrock/amazon.nova-micro-v1:0"},{"id":"bedrock/meta.llama3-1-70b-instruct-v1:0"},{"id":"bedrock/meta.llama3-1-8b-instruct-v1:0"},{"id":"bedrock/mistral.mistral-large-2407-v1:0"},{"id":"bedrock/mistral.pixtral-large-2502-v1:0"},{"id":"bedrock/mistral.magistral-small-2509"},{"id":"bedrock/mistral.mixtral-8x7b-instruct-v0:1"},{"id":"bedrock/cohere.command-r-plus-v1:0"},{"id":"bedrock/cohere.command-r-v1:0"}]},{"shared":0},{"shared":1},{"shared":2},{"shared":3},{"shared":4},{"shared":5},{"shared":6},{"shared":7},{"shared":8},{"shared":9},{"shared":10},{"shared":11},{"shared":12},{"id":"evaluationState","type":"long-input","valueKind":"string","storage":"native","title":"State","condition":{"opaque":true},"required":true},{"id":"evaluationQuestions","type":"code","valueKind":"json","storage":"native","title":"Questions","language":"json","condition":{"opaque":true},"required":true},{"id":"attachmentFiles","type":"file-upload","valueKind":"upload","storage":"native","title":"Files","mode":"basic","canonicalParamId":"files","multiple":true,"condition":{"field":"model","value":{"list":0},"not":true},"required":false},{"id":"files","type":"short-input","valueKind":"string","storage":"native","title":"Files","mode":"advanced","canonicalParamId":"files","condition":{"field":"model","value":{"list":0},"not":true},"required":false},{"id":"reasoningEffort","type":"combobox","valueKind":"string","storage":"native","title":"Reasoning Effort","mode":"advanced","dependsOn":{"all":["model"],"any":[]},"condition":{"opaque":true},"options":{"opaque":true}},{"id":"verbosity","type":"combobox","valueKind":"string","storage":"native","title":"Verbosity","mode":"advanced","dependsOn":{"all":["model"],"any":[]},"condition":{"opaque":true},"options":{"opaque":true}},{"id":"thinkingLevel","type":"combobox","valueKind":"string","storage":"native","title":"Thinking Level","mode":"advanced","dependsOn":{"all":["model"],"any":[]},"condition":{"opaque":true},"options":{"opaque":true}},{"id":"promptCaching","type":"switch","valueKind":"boolean","storage":"native","title":"Prompt Caching","mode":"advanced","defaultValue":false,"condition":{"field":"model","value":["claude-fable-5-2","claude-fable-5-1","claude-fable-5","claude-sonnet-5-5","claude-sonnet-5","claude-opus-5-5","claude-opus-5","claude-opus-4-8","claude-opus-4-7","claude-opus-4-6","claude-sonnet-4-6","claude-opus-4-5","claude-opus-4-1","claude-opus-4-0","claude-sonnet-4-5","claude-sonnet-4-0","claude-haiku-5-5","claude-haiku-4-5","claude-3-haiku-20240307","azure-anthropic/claude-fable-5-1","azure-anthropic/claude-opus-5-5","azure-anthropic/claude-sonnet-5-5","azure-anthropic/claude-haiku-5-5","azure-anthropic/claude-opus-5","azure-anthropic/claude-opus-4-8","azure-anthropic/claude-opus-4-7","azure-anthropic/claude-opus-4-6","azure-anthropic/claude-opus-4-5","azure-anthropic/claude-sonnet-5","azure-anthropic/claude-sonnet-4-6","azure-anthropic/claude-sonnet-4-5","azure-anthropic/claude-opus-4-1","azure-anthropic/claude-haiku-4-5"]}},{"id":"tools","type":"tool-input","valueKind":"tools","storage":"native","structured":"tools","title":"Tools","defaultValue":[],"condition":{"field":"model","value":{"list":1},"not":true}},{"id":"skills","type":"skill-input","valueKind":"array","storage":"native","title":"Skills","defaultValue":[],"condition":{"field":"model","value":{"list":1},"not":true}},{"id":"memoryType","type":"dropdown","valueKind":"string","storage":"native","title":"Memory","defaultValue":"none","condition":{"field":"model","value":{"list":2},"not":true},"options":[{"id":"none"},{"id":"conversation"},{"id":"sliding_window"},{"id":"sliding_window_tokens"}]},{"id":"conversationId","type":"short-input","valueKind":"string","storage":"native","title":"Conversation ID","dependsOn":{"all":["memoryType"],"any":[]},"condition":{"field":"memoryType","value":{"list":3},"and":{"field":"model","value":{"list":2},"not":true}},"required":{"field":"memoryType","value":{"list":3}}},{"id":"slidingWindowSize","type":"short-input","valueKind":"string","storage":"native","title":"Sliding Window Size","dependsOn":{"all":["memoryType"],"any":[]},"condition":{"field":"memoryType","value":["sliding_window"],"and":{"field":"model","value":{"list":2},"not":true}}},{"id":"slidingWindowTokens","type":"short-input","valueKind":"string","storage":"native","title":"Max Tokens","dependsOn":{"all":["memoryType"],"any":[]},"condition":{"field":"memoryType","value":["sliding_window_tokens"],"and":{"field":"model","value":{"list":2},"not":true}}},{"id":"temperature","type":"slider","valueKind":"number","storage":"native","title":"Temperature","mode":"advanced","defaultValue":0.3,"min":0,"max":1,"condition":{"field":"model","value":["thinkingmachines/inkling","thinkingmachines/inkling-2-small","thinkingmachines/inkling-small","claude-opus-4-6","claude-sonnet-4-6","claude-opus-4-5","claude-opus-4-1","claude-opus-4-0","claude-sonnet-4-5","claude-sonnet-4-0","claude-haiku-4-5","claude-3-haiku-20240307","azure-anthropic/claude-opus-4-6","azure-anthropic/claude-opus-4-5","azure-anthropic/claude-sonnet-4-6","azure-anthropic/claude-sonnet-4-5","azure-anthropic/claude-opus-4-1","azure-anthropic/claude-haiku-4-5","kie/claude-opus-4-6","kie/claude-sonnet-4-6","kie/claude-opus-4-5","kie/claude-sonnet-4-5","kie/claude-haiku-4-5","glm-5.3","glm-5.3-flashx","glm-5.3-flash","glm-5.2","glm-5.1","glm-5","glm-5-turbo","glm-4.7","glm-4.7-flashx","glm-4.6","glm-4.5","glm-4.5-air","glm-4.5-x","glm-4.5-airx","glm-4-32b-0414-128k","bedrock/anthropic.claude-sonnet-4-6","bedrock/anthropic.claude-opus-4-6-v1","bedrock/anthropic.claude-opus-4-5-20251101-v1:0","bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0","bedrock/anthropic.claude-haiku-4-5-20251001-v1:0","bedrock/anthropic.claude-opus-4-1-20250805-v1:0","bedrock/amazon.nova-2-lite-v1:0","bedrock/amazon.nova-premier-v1:0","bedrock/amazon.nova-pro-v1:0","bedrock/amazon.nova-lite-v1:0","bedrock/amazon.nova-micro-v1:0","bedrock/meta.llama4-maverick-17b-instruct-v1:0","bedrock/meta.llama4-scout-17b-instruct-v1:0","bedrock/meta.llama3-3-70b-instruct-v1:0","bedrock/meta.llama3-2-90b-instruct-v1:0","bedrock/meta.llama3-2-11b-instruct-v1:0","bedrock/meta.llama3-2-3b-instruct-v1:0","bedrock/meta.llama3-2-1b-instruct-v1:0","bedrock/meta.llama3-1-405b-instruct-v1:0","bedrock/meta.llama3-1-70b-instruct-v1:0","bedrock/meta.llama3-1-8b-instruct-v1:0","bedrock/mistral.mistral-large-3-675b-instruct","bedrock/mistral.mistral-large-2407-v1:0","bedrock/mistral.pixtral-large-2502-v1:0","bedrock/mistral.magistral-small-2509","bedrock/mistral.ministral-3-14b-instruct","bedrock/mistral.ministral-3-8b-instruct","bedrock/mistral.ministral-3-3b-instruct","bedrock/mistral.mixtral-8x7b-instruct-v0:1","bedrock/amazon.titan-text-premier-v1:0","bedrock/cohere.command-r-plus-v1:0","bedrock/cohere.command-r-v1:0"]}},{"id":"temperature","type":"slider","valueKind":"number","storage":"native","title":"Temperature","mode":"advanced","defaultValue":0.3,"min":0,"max":1.5,"condition":{"field":"model","value":["mistral-large-4","mistral-medium-3-5","mistral-medium-3","zai-glm-5-3","zai-glm-5-2","labs-leanstral-1-5","mistral-large-latest","mistral-large-2512","mistral-small-2603","devstral-2512","mistral-large-2411","magistral-medium-latest","magistral-medium-2509","magistral-small-latest","magistral-small-2509","mistral-medium-latest","mistral-medium-2604","mistral-medium-2508","mistral-medium-2505","mistral-small-latest","mistral-small-2506","open-mistral-nemo","codestral-latest","codestral-2508","devstral-latest","devstral-small-latest","devstral-small-2507","devstral-medium-2507","ministral-14b-latest","ministral-14b-2512","ministral-8b-latest","ministral-8b-2512","ministral-3b-latest","ministral-3b-2512"]}},{"id":"temperature","type":"slider","valueKind":"number","storage":"native","title":"Temperature","mode":"advanced","defaultValue":0.3,"min":0,"max":2,"condition":{"field":"model","value":["nebius/deepseek-ai/deepseek-v4.1-flash","nebius/deepseek-ai/deepseek-v4-flash-0731","nebius/deepseek-ai/deepseek-v4-pro","nebius/deepseek-ai/deepseek-v4-pro-0813","nebius/google/gemma-3-27b-it","nebius/minimaxai/minimax-m3","nebius/moonshotai/kimi-k2.6","nebius/moonshotai/kimi-k2.7-code","nebius/moonshotai/kimi-k3","nebius/nousresearch/hermes-4-405b","nebius/nvidia/nvidia-nemotron-3-nano-30b-a3b","nebius/nvidia/nemotron-3-super-120b-a12b","nebius/nvidia/nemotron-3-ultra-550b-a55b","nebius/nvidia/nemotron-3_5-lightning","nebius/openai/gpt-oss-120b","nebius/openbmb/minicpm-v-4_5","nebius/qwen/qwen3-235b-a22b-instruct-2507","nebius/qwen/qwen3-30b-a3b-instruct-2507","nebius/qwen/qwen3.5-397b-a17b","nebius/qwen/qwen3.8-27b","nebius/zai-org/glm-5.1","nebius/zai-org/glm-5.2","nebius/zai-org/glm-5.3","nebius/zai-org/glm-5.3-flash","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-5-chat-latest","gpt-4o","azure/gpt-4o","azure/gpt-5-chat","azure/gpt-4.1","azure/gpt-4.1-mini","azure/gpt-4.1-nano","gemini-3.8-flash","gemini-3.7-flash","gemini-3.6-flash","gemini-3.5-flash-lite","gemini-3.5-flash","gemini-3.1-pro-preview","gemini-3.1-flash-lite","gemini-3-flash-preview","gemini-2.5-pro","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.0-flash","gemini-2.0-flash-lite","vertex/gemini-3.5-flash","vertex/gemini-3.1-pro-preview","vertex/gemini-3.1-flash-lite","vertex/gemini-3-pro-preview","vertex/gemini-3-flash-preview","vertex/gemini-2.5-pro","vertex/gemini-2.5-flash","vertex/gemini-2.5-flash-lite","vertex/gemini-2.0-flash","vertex/gemini-2.0-flash-lite","deepseek-flash","deepseek-v4-flash","deepseek-chat","deepseek-v3","grok-4.7","grok-4.6","grok-4.5","grok-4.3","grok-4-latest","grok-4-0709","grok-4-1-fast-reasoning","grok-4-1-fast-non-reasoning","grok-4-fast-reasoning","grok-4-fast-non-reasoning","grok-code-fast-1","grok-4.20-0309-reasoning","grok-4.20-0309-non-reasoning","grok-4.20-multi-agent-0309","grok-3-latest","grok-3-fast-latest","cerebras/qwen-3.8-27b","cerebras/gpt-oss-120b","cerebras/zai-glm-4.7","cerebras/gemma-4-31b","groq/openai/gpt-oss-120b","groq/openai/gpt-oss-20b","groq/openai/gpt-oss-safeguard-20b","groq/qwen/qwen3-32b","groq/qwen/qwen3.8-27b","groq/qwen/qwen3.6-27b","groq/llama-3.1-8b-instant","groq/llama-3.3-70b-versatile","groq/meta-llama/llama-4-scout-17b-16e-instruct","groq/moonshotai/kimi-k2-instruct-0905","nvidia/llama-3.1-nemotron-70b-instruct","nvidia/llama-3.1-nemotron-ultra-253b-v1","nvidia/llama-3.3-nemotron-super-49b-v1.5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3-ultra-550b-a55b","muse-spark-1.3","muse-spark-1.1"]}},{"id":"maxTokens","type":"short-input","valueKind":"string","storage":"native","title":"Max Output Tokens","mode":"advanced","condition":{"field":"model","value":{"list":1},"not":true}},{"id":"responseFormat","type":"code","valueKind":"json","storage":"native","title":"Response Format","language":"json","condition":{"field":"model","value":{"list":1},"not":true}},{"id":"previousInteractionId","type":"short-input","valueKind":"string","storage":"native","title":"Previous Interaction ID","condition":{"field":"model","value":["deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025"]}},{"id":"fallbackModels","type":"model-fallback-list","valueKind":"array","storage":"native","title":"Fallback models","mode":"advanced","condition":{"field":"model","value":{"list":0},"not":true}}],"outputs":{"answers":{"type":"json","description":"Evaluation answers keyed by question ID: choice, score, or noul, with probabilities and confidence where applicable","condition":{"field":"model","value":["jev-latest","jev-1.13.0","jev-preview"],"allowReference":true}},"content":{"type":"string","description":"Generated response content"},"model":{"type":"string","description":"Model used for generation"},"tokens":{"type":"json","description":"Token usage statistics"},"toolCalls":{"type":"json","description":"Tool calls made"},"providerTiming":{"type":"json","description":"Provider timing information"},"cost":{"type":"json","description":"Cost of the API call"},"interactionId":{"type":"string","description":"Interaction ID for multi-turn deep research follow-ups","condition":{"field":"model","value":["deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025"]}}}},"api":{"type":"api","name":"API","category":"blocks","tools":{"access":["http_request"],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"url","type":"short-input","valueKind":"string","storage":"native","title":"URL","required":true},{"id":"method","type":"dropdown","valueKind":"string","storage":"native","title":"Method","required":true,"options":[{"id":"GET"},{"id":"POST"},{"id":"PUT"},{"id":"DELETE"},{"id":"PATCH"}]},{"id":"params","type":"table","valueKind":"array","storage":"native","structured":"tableRows","title":"Query Params","columns":["Key","Value"]},{"id":"headers","type":"table","valueKind":"array","storage":"native","structured":"tableRows","title":"Headers","columns":["Key","Value"]},{"id":"body","type":"code","valueKind":"json","storage":"native","title":"Body","language":"json"},{"id":"timeout","type":"short-input","valueKind":"string","storage":"native","title":"Timeout (ms)","mode":"advanced"},{"id":"retries","type":"short-input","valueKind":"string","storage":"native","title":"Retries","mode":"advanced"},{"id":"retryDelayMs","type":"short-input","valueKind":"string","storage":"native","title":"Retry delay (ms)","mode":"advanced"},{"id":"retryMaxDelayMs","type":"short-input","valueKind":"string","storage":"native","title":"Max retry delay (ms)","mode":"advanced"},{"id":"retryNonIdempotent","type":"switch","valueKind":"boolean","storage":"native","title":"Retry non-idempotent methods","mode":"advanced"},{"id":"redirectPolicyVersion","type":"short-input","valueKind":"string","storage":"native","title":"Redirect policy version","defaultValue":"standard-v1","hidden":true},{"id":"sendCredentialsOnCrossOriginRedirect","type":"switch","valueKind":"boolean","storage":"native","title":"Send credentials on cross-origin redirects","mode":"advanced","defaultValue":true},{"id":"proxyUrl","type":"short-input","valueKind":"string","storage":"native","title":"Proxy URL","mode":"advanced"}],"outputs":{"data":{"type":"json","description":"API response data (JSON, text, or other formats)"},"status":{"type":"number","description":"HTTP status code (200, 404, 500, etc.)"},"headers":{"type":"json","description":"HTTP response headers as key-value pairs"}}},"condition":{"type":"condition","name":"Condition","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false,"branches":{"subBlockId":"conditions","kind":"condition"}},"subBlocks":[{"id":"conditions","type":"condition-input","valueKind":"branches","storage":"json-string","structured":"branches"}],"outputs":{"conditionResult":{"type":"boolean","description":"Whether the selected branch's own test passed: true when an if/else-if condition matched, false when the else branch or no branch fired"},"selectedPath":{"type":"json","description":"Selected execution path"},"selectedOption":{"type":"string","description":"Selected condition option ID"},"selectedTitle":{"type":"string","description":"Title of the selected branch (e.g. \"if\", \"else if\", \"else\"); null when no branch fired"}}},"function":{"type":"function","name":"Function","category":"blocks","tools":{"access":["function_execute"],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"language","type":"dropdown","valueKind":"string","storage":"native","valueDefault":{"constant":"javascript"},"options":[{"id":"javascript"},{"id":"python"}]},{"id":"code","type":"code","valueKind":"code","storage":"native","title":"Code"},{"id":"sandboxId","type":"combobox","valueKind":"string","storage":"native","title":"Sandbox","mode":"advanced","dependsOn":{"all":["language"],"any":[]},"emptyIsValid":true,"selectorKey":"workspace.sandboxes","options":{"dynamic":true}},{"id":"secretScope","type":"dropdown","valueKind":"string","storage":"native","title":"Secret access","valueDefault":{"constant":"all"},"context":"tool-input","paramVisibility":"user-only","options":[{"id":"all"},{"id":"selected"}]},{"id":"mountedSecrets","type":"dropdown","valueKind":"array","storage":"native","title":"Secrets","context":"tool-input","paramVisibility":"user-only","multiple":true,"selectorKey":"workspace.secretNames","condition":{"field":"secretScope","value":"selected"},"options":{"dynamic":true}}],"outputs":{"result":{"type":"json","description":"Structured result emitted by the executed code"},"stdout":{"type":"string","description":"Console log output and debug messages from function execution"},"files":{"type":"file[]","description":"Files the code wrote to /tmp/sim/outputs, ready to attach or upload downstream"}}},"generic_webhook":{"type":"generic_webhook","name":"Webhook Trigger","category":"triggers","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":false,"errorPort":false,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["generic_webhook"]},"dynamicOutputs":{"source":"inputFormat","param":"inputFormat"},"subBlocks":[{"trigger":"generic_webhook","start":0,"count":14}],"outputs":{}},"gmail_v2":{"type":"gmail_v2","name":"Gmail","category":"tools","tools":{"access":["gmail_send_v2","gmail_draft_v2","gmail_edit_draft_v2","gmail_read_v2","gmail_search_v2","gmail_move_v2","gmail_mark_read_v2","gmail_mark_unread_v2","gmail_archive_v2","gmail_unarchive_v2","gmail_delete_v2","gmail_add_label_v2","gmail_remove_label_v2","gmail_list_labels_v2","gmail_create_label_v2","gmail_update_label_v2","gmail_delete_label_v2","gmail_list_drafts_v2","gmail_get_draft_v2","gmail_delete_draft_v2","gmail_list_threads_v2","gmail_get_thread_v2","gmail_trash_thread_v2","gmail_untrash_thread_v2"],"selector":"operation"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["gmail_poller"]},"subBlocks":[{"id":"operation","type":"dropdown","valueKind":"string","storage":"native","title":"Operation","surface":"action","valueDefault":{"constant":"send_gmail"},"options":[{"id":"send_gmail","label":"Send Email"},{"id":"read_gmail","label":"Read Email"},{"id":"draft_gmail","label":"Draft Email"},{"id":"edit_draft_gmail","label":"Edit Draft"},{"id":"search_gmail","label":"Search Email"},{"id":"move_gmail","label":"Move Email"},{"id":"mark_read_gmail","label":"Mark as Read"},{"id":"mark_unread_gmail","label":"Mark as Unread"},{"id":"archive_gmail","label":"Archive Email"},{"id":"unarchive_gmail","label":"Unarchive Email"},{"id":"delete_gmail","label":"Delete Email"},{"id":"add_label_gmail","label":"Add Label"},{"id":"remove_label_gmail","label":"Remove Label"},{"id":"list_labels_gmail","label":"List Labels"},{"id":"create_label_gmail","label":"Create Label"},{"id":"update_label_gmail","label":"Update Label"},{"id":"delete_label_gmail","label":"Delete Label"},{"id":"list_drafts_gmail","label":"List Drafts"},{"id":"get_draft_gmail","label":"Get Draft"},{"id":"delete_draft_gmail","label":"Delete Draft"},{"id":"list_threads_gmail","label":"List Threads"},{"id":"get_thread_gmail","label":"Get Thread"},{"id":"trash_thread_gmail","label":"Trash Thread"},{"id":"untrash_thread_gmail","label":"Untrash Thread"}]},{"id":"credential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Gmail Account","mode":"basic","canonicalParamId":"oauthCredential","surface":"action","serviceId":"gmail","required":true},{"id":"manualCredential","type":"short-input","valueKind":"string","storage":"native","title":"Gmail Account","mode":"advanced","canonicalParamId":"oauthCredential","surface":"action","required":true},{"id":"impersonateUserEmail","type":"short-input","valueKind":"string","storage":"native","title":"Impersonated Account","mode":"both","surface":"action","paramVisibility":"user-only"},{"id":"draftId","type":"short-input","valueKind":"string","storage":"native","title":"Draft ID","surface":"action","condition":{"field":"operation","value":["edit_draft_gmail","get_draft_gmail","delete_draft_gmail"]},"required":true},{"id":"to","type":"short-input","valueKind":"string","storage":"native","title":"To","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":true},{"id":"subject","type":"short-input","valueKind":"string","storage":"native","title":"Subject","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"body","type":"long-input","valueKind":"string","storage":"native","title":"Body","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":true},{"id":"contentType","type":"dropdown","valueKind":"string","storage":"native","title":"Content Type","surface":"action","valueDefault":{"constant":"text"},"condition":{"field":"operation","value":{"list":4}},"required":false,"options":[{"id":"text"},{"id":"html"}]},{"id":"attachmentFiles","type":"file-upload","valueKind":"upload","storage":"native","title":"Attachments","mode":"basic","canonicalParamId":"attachments","surface":"action","multiple":true,"condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"attachments","type":"short-input","valueKind":"string","storage":"native","title":"Attachments","mode":"advanced","canonicalParamId":"attachments","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"threadId","type":"short-input","valueKind":"string","storage":"native","title":"Thread ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"replyToMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Reply to Message ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"cc","type":"short-input","valueKind":"string","storage":"native","title":"CC","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"bcc","type":"short-input","valueKind":"string","storage":"native","title":"BCC","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"replyTo","type":"short-input","valueKind":"string","storage":"native","title":"Reply-To","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"folder","type":"folder-selector","valueKind":"picked","storage":"native","title":"Label","mode":"basic","canonicalParamId":"folder","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":"read_gmail"},"options":{"dynamic":true}},{"id":"manualFolder","type":"short-input","valueKind":"string","storage":"native","title":"Label/Folder","mode":"advanced","canonicalParamId":"folder","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":"read_gmail"}},{"id":"unreadOnly","type":"switch","valueKind":"boolean","storage":"native","title":"Unread Only","surface":"action","condition":{"field":"operation","value":"read_gmail"}},{"id":"includeAttachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","surface":"action","condition":{"field":"operation","value":"read_gmail"}},{"id":"messageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"read_gmail"}},{"id":"query","type":"short-input","valueKind":"string","storage":"native","title":"Search Query","surface":"action","condition":{"field":"operation","value":"search_gmail"},"required":true},{"id":"maxResults","type":"short-input","valueKind":"string","storage":"native","title":"Max Results","surface":"action","condition":{"field":"operation","value":["read_gmail","search_gmail","list_drafts_gmail","list_threads_gmail"]}},{"id":"pageToken","type":"short-input","valueKind":"string","storage":"native","title":"Page Token","mode":"advanced","surface":"action","condition":{"field":"operation","value":["search_gmail","list_drafts_gmail","list_threads_gmail"]},"required":false},{"id":"moveMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","surface":"action","condition":{"field":"operation","value":"move_gmail"},"required":true},{"id":"destinationLabel","type":"folder-selector","valueKind":"picked","storage":"native","title":"Move To Label","mode":"basic","canonicalParamId":"addLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":"move_gmail"},"required":true,"options":{"dynamic":true}},{"id":"manualDestinationLabel","type":"short-input","valueKind":"string","storage":"native","title":"Move To Label","mode":"advanced","canonicalParamId":"addLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":"move_gmail"},"required":true},{"id":"sourceLabel","type":"folder-selector","valueKind":"picked","storage":"native","title":"Remove From Label","mode":"basic","canonicalParamId":"removeLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":"move_gmail"},"required":false,"options":{"dynamic":true}},{"id":"manualSourceLabel","type":"short-input","valueKind":"string","storage":"native","title":"Remove From Label","mode":"advanced","canonicalParamId":"removeLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":"move_gmail"},"required":false},{"id":"actionMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","surface":"action","condition":{"field":"operation","value":["mark_read_gmail","mark_unread_gmail","archive_gmail","unarchive_gmail","delete_gmail"]},"required":true},{"id":"labelActionMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","surface":"action","condition":{"field":"operation","value":{"list":5}},"required":true},{"id":"labelSelector","type":"folder-selector","valueKind":"picked","storage":"native","title":"Label","mode":"basic","canonicalParamId":"manageLabelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":{"list":5}},"required":true,"options":{"dynamic":true}},{"id":"manualLabelId","type":"short-input","valueKind":"string","storage":"native","title":"Label","mode":"advanced","canonicalParamId":"manageLabelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":{"list":5}},"required":true},{"id":"labelTarget","type":"folder-selector","valueKind":"picked","storage":"native","title":"Label","mode":"basic","canonicalParamId":"labelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":{"list":6}},"required":true,"options":{"dynamic":true}},{"id":"manualLabelTarget","type":"short-input","valueKind":"string","storage":"native","title":"Label ID","mode":"advanced","canonicalParamId":"labelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":{"list":6}},"required":true},{"id":"labelName","type":"short-input","valueKind":"string","storage":"native","title":"Label Name","surface":"action","condition":{"field":"operation","value":{"list":7}},"required":{"field":"operation","value":"create_label_gmail"}},{"id":"messageListVisibility","type":"dropdown","valueKind":"string","storage":"native","title":"Message List Visibility","mode":"advanced","surface":"action","valueDefault":{"constant":""},"condition":{"field":"operation","value":{"list":7}},"required":false,"options":[{"id":""},{"id":"show"},{"id":"hide"}]},{"id":"labelListVisibility","type":"dropdown","valueKind":"string","storage":"native","title":"Label List Visibility","mode":"advanced","surface":"action","valueDefault":{"constant":""},"condition":{"field":"operation","value":{"list":7}},"required":false,"options":[{"id":""},{"id":"labelShow"},{"id":"labelShowIfUnread"},{"id":"labelHide"}]},{"id":"targetThreadId","type":"short-input","valueKind":"string","storage":"native","title":"Thread ID","surface":"action","condition":{"field":"operation","value":["get_thread_gmail","trash_thread_gmail","untrash_thread_gmail"]},"required":true},{"id":"threadFormat","type":"dropdown","valueKind":"string","storage":"native","title":"Format","mode":"advanced","surface":"action","valueDefault":{"constant":"full"},"condition":{"field":"operation","value":"get_thread_gmail"},"required":false,"options":[{"id":"full"},{"id":"metadata"},{"id":"minimal"}]},{"id":"listQuery","type":"short-input","valueKind":"string","storage":"native","title":"Search Query","surface":"action","condition":{"field":"operation","value":["list_drafts_gmail","list_threads_gmail"]},"required":false},{"id":"threadLabelIds","type":"short-input","valueKind":"string","storage":"native","title":"Label IDs","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_threads_gmail"},"required":false},{"trigger":"gmail_poller","start":0,"count":8}],"outputs":{"id":{"type":"string","description":"Gmail message ID (thread ID for thread operations, label ID for label operations, draft ID for Get Draft)"},"threadId":{"type":"string","description":"Gmail thread ID"},"labelIds":{"type":"array","description":"Email label IDs"},"from":{"type":"string","description":"Sender"},"to":{"type":"string","description":"To"},"bcc":{"type":"string","description":"Bcc recipients (only on messages you sent or drafted)"},"replyTo":{"type":"string","description":"Reply-To header"},"subject":{"type":"string","description":"Subject"},"date":{"type":"string","description":"Date"},"rfcMessageId":{"type":"string","description":"RFC Message-ID header (not the Gmail message id)"},"inReplyTo":{"type":"string","description":"In-Reply-To header"},"references":{"type":"string","description":"References header"},"snippet":{"type":"string","description":"Short excerpt of the message text"},"internalDate":{"type":"string","description":"Gmail internal creation timestamp in epoch milliseconds"},"body":{"type":"string","description":"Email body text (best-effort)"},"results":{"type":"json","description":"Search/read summary results [{id, threadId, subject, from, to, cc, bcc, replyTo, date, snippet, rfcMessageId, inReplyTo, references, internalDate}]"},"nextPageToken":{"type":"string","description":"Token for the next page of results","condition":{"field":"operation","value":["search_gmail","list_drafts_gmail","list_threads_gmail"]}},"resultSizeEstimate":{"type":"number","description":"Estimated total number of results","condition":{"field":"operation","value":["search_gmail","list_drafts_gmail","list_threads_gmail"]}},"name":{"type":"string","description":"Label display name","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"type":{"type":"string","description":"Label type (system or user)","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"messageListVisibility":{"type":"string","description":"Message list visibility of the label","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"labelListVisibility":{"type":"string","description":"Label list visibility of the label","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"labelId":{"type":"string","description":"ID of the deleted label","condition":{"field":"operation","value":"delete_label_gmail"}},"deleted":{"type":"boolean","description":"Whether the label or draft was deleted","condition":{"field":"operation","value":["delete_label_gmail","delete_draft_gmail"]}},"drafts":{"type":"json","description":"Drafts [{id, messageId, threadId}]","condition":{"field":"operation","value":"list_drafts_gmail"}},"threads":{"type":"json","description":"Threads [{id, snippet, historyId}]","condition":{"field":"operation","value":"list_threads_gmail"}},"messages":{"type":"json","description":"Thread messages [{id, threadId, labelIds, snippet, from, to, cc, bcc, replyTo, subject, date, rfcMessageId, inReplyTo, references, internalDate, body}]","condition":{"field":"operation","value":"get_thread_gmail"}},"historyId":{"type":"string","description":"ID of the last history record that modified the thread","condition":{"field":"operation","value":"get_thread_gmail"}},"trashed":{"type":"boolean","description":"Whether the thread was moved to trash","condition":{"field":"operation","value":"trash_thread_gmail"}},"untrashed":{"type":"boolean","description":"Whether the thread was restored from trash","condition":{"field":"operation","value":"untrash_thread_gmail"}},"attachments":{"type":"file[]","description":"Downloaded attachments (if enabled)"},"draftId":{"type":"string","description":"Draft ID","condition":{"field":"operation","value":["draft_gmail","edit_draft_gmail","delete_draft_gmail"]}},"messageId":{"type":"string","description":"Gmail message ID for the draft","condition":{"field":"operation","value":["draft_gmail","edit_draft_gmail","get_draft_gmail"]}},"email_id":{"type":"string","description":"Gmail message ID"},"thread_id":{"type":"string","description":"Gmail thread ID"},"cc":{"type":"string","description":"Cc recipients (raw Cc header, comma-separated)"},"body_text":{"type":"string","description":"Plain text email body"},"body_html":{"type":"string","description":"HTML email body"},"labels":{"type":"json","description":"Email labels (trigger, comma-separated); for List Labels, the label array [{id, name, type, messageListVisibility, labelListVisibility}]"},"has_attachments":{"type":"boolean","description":"Whether email has attachments"},"raw_email":{"type":"json","description":"Complete raw email data from Gmail API (if enabled)"},"timestamp":{"type":"string","description":"Event timestamp"}}},"note":{"type":"note","name":"Note","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":false,"errorPort":false,"container":null,"annotationOnly":true},"subBlocks":[{"id":"content","type":"long-input","valueKind":"string","storage":"native"},{"id":"color","type":"short-input","valueKind":"string","storage":"native","defaultValue":"carbon","hidden":true}],"outputs":{}},"response":{"type":"response","name":"Response","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"dataMode","type":"dropdown","valueKind":"string","storage":"native","title":"Response Data Mode","valueDefault":{"constant":"structured"},"options":[{"id":"structured"},{"id":"json"}]},{"id":"builderData","type":"response-format","valueKind":"json","storage":"native","title":"Response Structure","condition":{"field":"dataMode","value":"structured"}},{"id":"data","type":"code","valueKind":"json","storage":"native","title":"Response Data","language":"json","condition":{"field":"dataMode","value":"json"}},{"id":"status","type":"short-input","valueKind":"string","storage":"native","title":"Status Code"},{"id":"headers","type":"table","valueKind":"array","storage":"native","structured":"tableRows","title":"Response Headers","columns":["Key","Value"]}],"outputs":{"data":{"type":"json","description":"Response data"},"status":{"type":"number","description":"HTTP status code"},"headers":{"type":"json","description":"Response headers"}}},"router_v2":{"type":"router_v2","name":"Router","category":"blocks","tools":{"access":["openai_chat","anthropic_chat","google_chat","xai_chat","deepseek_chat","deepseek_reasoner"],"selector":"opaque"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false,"branches":{"subBlockId":"routes","kind":"router"}},"subBlocks":[{"id":"context","type":"long-input","valueKind":"string","storage":"native","title":"Context","required":true},{"id":"routes","type":"router-input","valueKind":"branches","storage":"json-string","structured":"branches"},{"id":"model","type":"combobox","valueKind":"string","storage":"native","title":"Model","defaultValue":"claude-sonnet-5-5","required":true,"options":[{"id":"nebius/deepseek-ai/DeepSeek-V4-Pro-0813"},{"id":"nebius/google/gemma-3-27b-it"},{"id":"nebius/MiniMaxAI/MiniMax-M3"},{"id":"nebius/moonshotai/Kimi-K3"},{"id":"nebius/NousResearch/Hermes-4-405B"},{"id":"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B"},{"id":"nebius/nvidia/nemotron-3-super-120b-a12b"},{"id":"nebius/nvidia/Nemotron-3-Ultra-550b-a55b"},{"id":"nebius/nvidia/Nemotron-3_5-Lightning"},{"id":"nebius/openai/gpt-oss-120b"},{"id":"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3.8-27B"},{"id":"nebius/zai-org/GLM-5.2"},{"id":"nebius/zai-org/GLM-5.3"},{"id":"nebius/zai-org/GLM-5.3-Flash"},{"id":"thinkingmachines/inkling-small"},{"id":"thinkingmachines/inkling"},{"id":"thinkingmachines/inkling-2-small"},{"id":"gpt-6.1-terra"},{"id":"gpt-6.1-sol"},{"id":"gpt-6-sol"},{"id":"gpt-6-luna"},{"id":"gpt-6-astra"},{"id":"gpt-5.6-sol"},{"id":"gpt-5.6-terra"},{"id":"gpt-5.6-luna"},{"id":"chat-latest"},{"id":"gpt-5.5-pro"},{"id":"gpt-5.5"},{"id":"gpt-5.4-mini"},{"id":"gpt-5.4-nano"},{"id":"gpt-5.4-pro"},{"id":"gpt-5.4"},{"id":"gpt-5.3-codex"},{"id":"gpt-5.2-pro"},{"id":"gpt-5.2"},{"id":"gpt-5.1"},{"id":"gpt-5-pro"},{"id":"gpt-5"},{"id":"gpt-5-mini"},{"id":"gpt-5-nano"},{"id":"o3-pro"},{"id":"o4-mini"},{"id":"o3"},{"id":"gpt-4.1"},{"id":"gpt-4.1-mini"},{"id":"o3-mini"},{"id":"o1"},{"id":"gpt-4o"},{"id":"claude-fable-5-2"},{"id":"claude-haiku-5-5"},{"id":"claude-sonnet-5-5"},{"id":"claude-opus-5-5"},{"id":"claude-fable-5-1"},{"id":"claude-opus-5"},{"id":"claude-sonnet-5"},{"id":"claude-fable-5"},{"id":"claude-opus-4-8"},{"id":"claude-opus-4-7"},{"id":"claude-sonnet-4-6"},{"id":"claude-opus-4-6"},{"id":"claude-opus-4-5"},{"id":"claude-haiku-4-5"},{"id":"claude-sonnet-4-5"},{"id":"azure/gpt-6.1-sol"},{"id":"azure/gpt-6-sol"},{"id":"azure/gpt-6-luna"},{"id":"azure/gpt-6-astra"},{"id":"azure/gpt-5.6-sol"},{"id":"azure/gpt-5.6-terra"},{"id":"azure/gpt-5.6-luna"},{"id":"azure/gpt-5.5"},{"id":"azure/gpt-5.4-mini"},{"id":"azure/gpt-5.4-nano"},{"id":"azure/gpt-5.4-pro"},{"id":"azure/gpt-5.4"},{"id":"azure/gpt-5.2"},{"id":"azure/gpt-5.1"},{"id":"azure/gpt-5.1-codex"},{"id":"azure/gpt-5"},{"id":"azure/gpt-5-mini"},{"id":"azure/gpt-5-nano"},{"id":"azure/gpt-5-chat"},{"id":"azure/model-router"},{"id":"azure/o3"},{"id":"azure/o4-mini"},{"id":"azure/gpt-4.1"},{"id":"azure/gpt-4.1-mini"},{"id":"azure/gpt-4.1-nano"},{"id":"azure/gpt-4o"},{"id":"azure-anthropic/claude-haiku-5-5"},{"id":"azure-anthropic/claude-sonnet-5-5"},{"id":"azure-anthropic/claude-opus-5-5"},{"id":"azure-anthropic/claude-fable-5-1"},{"id":"azure-anthropic/claude-opus-5"},{"id":"azure-anthropic/claude-sonnet-5"},{"id":"azure-anthropic/claude-opus-4-8"},{"id":"azure-anthropic/claude-opus-4-7"},{"id":"azure-anthropic/claude-sonnet-4-6"},{"id":"azure-anthropic/claude-opus-4-6"},{"id":"azure-anthropic/claude-opus-4-5"},{"id":"azure-anthropic/claude-haiku-4-5"},{"id":"azure-anthropic/claude-sonnet-4-5"},{"id":"azure-anthropic/claude-opus-4-1"},{"id":"gemini-4-argon"},{"id":"gemini-3.8-flash"},{"id":"gemini-3.7-flash"},{"id":"gemini-3.6-flash"},{"id":"gemini-3.5-flash-lite"},{"id":"gemini-3.5-flash"},{"id":"gemini-3.1-flash-lite"},{"id":"gemini-3.1-pro-preview"},{"id":"gemini-3-flash-preview"},{"id":"deep-research-pro-preview-12-2025"},{"id":"gemini-2.5-flash-lite"},{"id":"gemini-2.5-flash"},{"id":"gemini-2.5-pro"},{"id":"vertex/gemini-3.8-flash"},{"id":"vertex/gemini-3.7-flash"},{"id":"vertex/gemini-3.6-flash"},{"id":"vertex/gemini-3.5-flash-lite"},{"id":"vertex/gemini-3.5-flash"},{"id":"vertex/gemini-3.1-flash-lite"},{"id":"vertex/gemini-3.1-pro-preview"},{"id":"vertex/gemini-3-flash-preview"},{"id":"vertex/deep-research-pro-preview-12-2025"},{"id":"vertex/gemini-2.5-flash-lite"},{"id":"vertex/gemini-2.5-flash"},{"id":"vertex/gemini-2.5-pro"},{"id":"deepseek-flash"},{"id":"deepseek-v4-pro"},{"id":"deepseek-v4-flash"},{"id":"deepseek-reasoner"},{"id":"deepseek-chat"},{"id":"grok-4.7"},{"id":"grok-4.6"},{"id":"grok-4.5"},{"id":"grok-4.3"},{"id":"grok-4.20-0309-reasoning"},{"id":"grok-4.20-0309-non-reasoning"},{"id":"grok-4.20-multi-agent-0309"},{"id":"cerebras/qwen-3.8-27b"},{"id":"cerebras/gemma-4-31b"},{"id":"cerebras/zai-glm-4.7"},{"id":"cerebras/gpt-oss-120b"},{"id":"groq/qwen/qwen3.8-27b"},{"id":"groq/qwen/qwen3.6-27b"},{"id":"groq/openai/gpt-oss-safeguard-20b"},{"id":"groq/openai/gpt-oss-120b"},{"id":"groq/openai/gpt-oss-20b"},{"id":"groq/llama-3.3-70b-versatile"},{"id":"groq/llama-3.1-8b-instant"},{"id":"fugu-ultra-v2.0"},{"id":"fugu-max"},{"id":"fugu-max-v1.0"},{"id":"fugu"},{"id":"fugu-ultra"},{"id":"sakana-namazu"},{"id":"sakana-namazu-v1.0"},{"id":"nvidia/nemotron-3.5-lightning-30b-a3b"},{"id":"nvidia/nemotron-3-ultra-550b-a55b"},{"id":"nvidia/nemotron-3-nano-30b-a3b"},{"id":"nvidia/llama-3.3-nemotron-super-49b-v1.5"},{"id":"nvidia/llama-3.1-nemotron-ultra-253b-v1"},{"id":"nvidia/llama-3.1-nemotron-70b-instruct"},{"id":"muse-spark-1.3"},{"id":"muse-spark-1.1"},{"id":"kimi-k3"},{"id":"kimi-k2.7-code"},{"id":"kimi-k2.7-code-highspeed"},{"id":"kimi-k2.6"},{"id":"kie/gpt-6-1-sol"},{"id":"kie/claude-sonnet-5-5"},{"id":"kie/claude-opus-5-5"},{"id":"kie/gpt-6-sol"},{"id":"kie/gpt-6-luna"},{"id":"kie/gpt-6-astra"},{"id":"kie/grok-4-6"},{"id":"kie/claude-opus-5"},{"id":"kie/kimi-k3"},{"id":"kie/gpt-5-6-sol"},{"id":"kie/gpt-5-6-terra"},{"id":"kie/gpt-5-6-luna"},{"id":"kie/grok-4-5"},{"id":"kie/claude-sonnet-5"},{"id":"kie/claude-fable-5"},{"id":"kie/claude-opus-4-8"},{"id":"kie/grok-4-3"},{"id":"kie/gpt-5-5"},{"id":"kie/claude-opus-4-7"},{"id":"kie/claude-sonnet-4-6"},{"id":"kie/claude-opus-4-6"},{"id":"kie/claude-opus-4-5"},{"id":"kie/claude-haiku-4-5"},{"id":"kie/claude-sonnet-4-5"},{"id":"glm-5.3-flash"},{"id":"glm-5.3"},{"id":"glm-5.2"},{"id":"glm-5.1"},{"id":"glm-5-turbo"},{"id":"glm-5"},{"id":"glm-4.7"},{"id":"glm-4.7-flashx"},{"id":"glm-4.6"},{"id":"glm-4.5"},{"id":"glm-4.5-air"},{"id":"glm-4.5-x"},{"id":"glm-4.5-airx"},{"id":"glm-4-32b-0414-128k"},{"id":"glm-5.3-flashx"},{"id":"mistral-large-4"},{"id":"zai-glm-5-3"},{"id":"zai-glm-5-2"},{"id":"labs-leanstral-1-5"},{"id":"mistral-medium-2604"},{"id":"mistral-medium-3-5"},{"id":"mistral-medium-3"},{"id":"mistral-medium-latest"},{"id":"mistral-small-2603"},{"id":"mistral-small-latest"},{"id":"devstral-2512"},{"id":"devstral-latest"},{"id":"devstral-small-latest"},{"id":"mistral-large-latest"},{"id":"mistral-large-2512"},{"id":"ministral-14b-latest"},{"id":"ministral-14b-2512"},{"id":"ministral-8b-latest"},{"id":"ministral-8b-2512"},{"id":"ministral-3b-latest"},{"id":"ministral-3b-2512"},{"id":"magistral-medium-latest"},{"id":"magistral-medium-2509"},{"id":"magistral-small-latest"},{"id":"magistral-small-2509"},{"id":"mistral-medium-2508"},{"id":"codestral-latest"},{"id":"codestral-2508"},{"id":"mistral-small-2506"},{"id":"mistral-medium-2505"},{"id":"open-mistral-nemo"},{"id":"bedrock/openai.gpt-6.1-sol"},{"id":"bedrock/openai.gpt-6-astra"},{"id":"bedrock/anthropic.claude-opus-5"},{"id":"bedrock/openai.gpt-5.6-sol"},{"id":"bedrock/openai.gpt-5.6-terra"},{"id":"bedrock/openai.gpt-5.6-luna"},{"id":"bedrock/anthropic.claude-sonnet-5"},{"id":"bedrock/anthropic.claude-fable-5"},{"id":"bedrock/anthropic.claude-opus-4-8"},{"id":"bedrock/anthropic.claude-opus-4-7"},{"id":"bedrock/anthropic.claude-sonnet-4-6"},{"id":"bedrock/minimax.minimax-m2.5"},{"id":"bedrock/zai.glm-5"},{"id":"bedrock/anthropic.claude-opus-4-6-v1"},{"id":"bedrock/moonshotai.kimi-k2.5"},{"id":"bedrock/amazon.nova-2-lite-v1:0"},{"id":"bedrock/mistral.mistral-large-3-675b-instruct"},{"id":"bedrock/mistral.ministral-3-14b-instruct"},{"id":"bedrock/mistral.ministral-3-8b-instruct"},{"id":"bedrock/mistral.ministral-3-3b-instruct"},{"id":"bedrock/deepseek.v3.2"},{"id":"bedrock/anthropic.claude-opus-4-5-20251101-v1:0"},{"id":"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0"},{"id":"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0"},{"id":"bedrock/anthropic.claude-opus-4-1-20250805-v1:0"},{"id":"bedrock/openai.gpt-oss-120b-1:0"},{"id":"bedrock/openai.gpt-oss-20b-1:0"},{"id":"bedrock/amazon.nova-premier-v1:0"},{"id":"bedrock/meta.llama4-maverick-17b-instruct-v1:0"},{"id":"bedrock/meta.llama4-scout-17b-instruct-v1:0"},{"id":"bedrock/meta.llama3-3-70b-instruct-v1:0"},{"id":"bedrock/amazon.nova-pro-v1:0"},{"id":"bedrock/amazon.nova-lite-v1:0"},{"id":"bedrock/amazon.nova-micro-v1:0"},{"id":"bedrock/meta.llama3-1-70b-instruct-v1:0"},{"id":"bedrock/meta.llama3-1-8b-instruct-v1:0"},{"id":"bedrock/mistral.mistral-large-2407-v1:0"},{"id":"bedrock/mistral.pixtral-large-2502-v1:0"},{"id":"bedrock/mistral.magistral-small-2509"},{"id":"bedrock/mistral.mixtral-8x7b-instruct-v0:1"},{"id":"bedrock/cohere.command-r-plus-v1:0"},{"id":"bedrock/cohere.command-r-v1:0"}]},{"shared":0},{"shared":1},{"shared":2},{"shared":3},{"shared":4},{"shared":5},{"shared":6},{"shared":7},{"shared":8},{"shared":9},{"shared":10},{"shared":11},{"shared":12},{"id":"fallbackModels","type":"model-fallback-list","valueKind":"array","storage":"native","title":"Fallback models","mode":"advanced"}],"outputs":{"context":{"type":"string","description":"Context used for routing"},"model":{"type":"string","description":"Model used"},"tokens":{"type":"json","description":"Token usage"},"cost":{"type":"json","description":"Cost information"},"selectedRoute":{"type":"string","description":"Selected route ID"},"reasoning":{"type":"string","description":"Explanation of why this route was chosen"},"selectedPath":{"type":"json","description":"Selected routing path"}}},"slack_v2":{"type":"slack_v2","name":"Slack","category":"tools","tools":{"access":["slack_message","slack_ephemeral_message","slack_canvas","slack_message_reader","slack_get_message","slack_get_thread","slack_get_thread_replies","slack_get_channel_history","slack_get_permalink","slack_set_status","slack_set_title","slack_set_suggested_prompts","slack_set_suggested_prompts_v2","slack_set_agent_session_status_v2","slack_rename_agent_session_v2","slack_list_channels","slack_list_members","slack_list_users","slack_get_user","slack_download","slack_update_message","slack_delete_message","slack_add_reaction","slack_remove_reaction","slack_get_channel_info","slack_get_user_presence","slack_edit_canvas","slack_create_channel_canvas","slack_get_canvas","slack_list_canvases","slack_lookup_canvas_sections","slack_delete_canvas","slack_lists_create","slack_lists_update","slack_lists_access_set","slack_lists_items_list","slack_lists_items_info","slack_lists_items_create","slack_lists_items_update","slack_lists_items_delete","slack_create_conversation","slack_invite_to_conversation","slack_open_view","slack_update_view","slack_push_view","slack_publish_view","slack_schedule_message","slack_list_scheduled_messages","slack_delete_scheduled_message","slack_archive_conversation","slack_rename_conversation","slack_set_conversation_topic","slack_set_conversation_purpose","slack_lists_access_delete","slack_lists_download_start","slack_lists_download_get","slack_lists_items_delete_multiple","slack_share_canvas","slack_revoke_canvas_access","slack_join_conversation","slack_leave_conversation","slack_kick_conversation","slack_unarchive_conversation","slack_close_conversation","slack_mark_conversation_read","slack_open_conversation","slack_lookup_user_by_email","slack_list_user_conversations","slack_get_user_profile","slack_set_user_presence","slack_get_file_info","slack_list_files","slack_delete_file","slack_get_reactions","slack_list_reactions","slack_pin_message","slack_unpin_message","slack_list_pins","slack_add_bookmark","slack_edit_bookmark","slack_list_bookmarks","slack_remove_bookmark","slack_create_user_group","slack_update_user_group","slack_enable_user_group","slack_disable_user_group","slack_list_user_groups","slack_list_user_group_members","slack_update_user_group_members","slack_get_dnd_info","slack_get_team_dnd_info","slack_list_emoji","slack_get_team_info","slack_get_team_profile","slack_unfurl_links"],"selector":"operation"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["slack_oauth"]},"legacyIds":[{"from":"channelMaxPages","to":null}],"subBlocks":[{"id":"operation","type":"dropdown","valueKind":"string","storage":"native","title":"Operation","surface":"action","valueDefault":{"constant":"send"},"options":[{"id":"send","label":"Send Message"},{"id":"ephemeral","label":"Send Ephemeral Message"},{"id":"canvas","label":"Create Canvas"},{"id":"read","label":"Read Messages"},{"id":"get_message","label":"Get Message"},{"id":"get_thread","label":"Get Thread"},{"id":"get_thread_replies","label":"Get Thread Replies"},{"id":"get_channel_history","label":"Get Channel History"},{"id":"get_permalink","label":"Get Message Permalink"},{"id":"set_status","label":"Set Assistant Status"},{"id":"set_title","label":"Set Assistant Title"},{"id":"set_suggested_prompts","label":"Set Assistant Suggested Prompts"},{"id":"set_agent_suggested_prompts","label":"Set Agent Suggested Prompts"},{"id":"set_agent_session_status","label":"Set Agent Session Status"},{"id":"rename_agent_session","label":"Rename Agent Session"},{"id":"list_channels","label":"List Channels"},{"id":"list_members","label":"List Channel Members"},{"id":"list_users","label":"List Users"},{"id":"get_user","label":"Get User Info"},{"id":"download","label":"Download File"},{"id":"update","label":"Update Message"},{"id":"delete","label":"Delete Message"},{"id":"react","label":"Add Reaction"},{"id":"unreact","label":"Remove Reaction"},{"id":"get_channel_info","label":"Get Channel Info"},{"id":"get_user_presence","label":"Get User Presence"},{"id":"edit_canvas","label":"Edit Canvas"},{"id":"create_channel_canvas","label":"Create Channel Canvas"},{"id":"get_canvas","label":"Get Canvas Info"},{"id":"list_canvases","label":"List Canvases"},{"id":"lookup_canvas_sections","label":"Lookup Canvas Sections"},{"id":"delete_canvas","label":"Delete Canvas"},{"id":"create_list","label":"Create List"},{"id":"rename_list","label":"Update List"},{"id":"share_list","label":"Share List"},{"id":"list_items","label":"Read List Items"},{"id":"get_list_item","label":"Get List Item"},{"id":"create_list_item","label":"Create List Item"},{"id":"update_list_items","label":"Update List Items"},{"id":"delete_list_item","label":"Delete List Item"},{"id":"create_conversation","label":"Create Conversation"},{"id":"invite_to_conversation","label":"Invite to Conversation"},{"id":"open_view","label":"Open View"},{"id":"update_view","label":"Update View"},{"id":"push_view","label":"Push View"},{"id":"publish_view","label":"Publish View"},{"id":"schedule_message","label":"Schedule Message"},{"id":"list_scheduled_messages","label":"List Scheduled Messages"},{"id":"delete_scheduled_message","label":"Delete Scheduled Message"},{"id":"archive_conversation","label":"Archive Conversation"},{"id":"rename_conversation","label":"Rename Conversation"},{"id":"set_conversation_topic","label":"Set Conversation Topic"},{"id":"set_conversation_purpose","label":"Set Conversation Purpose"},{"id":"revoke_list_access","label":"Revoke List Access"},{"id":"start_list_export","label":"Start List Export"},{"id":"get_list_export","label":"Get List Export"},{"id":"delete_list_items","label":"Delete List Items"},{"id":"share_canvas","label":"Share Canvas"},{"id":"revoke_canvas_access","label":"Revoke Canvas Access"},{"id":"join_conversation","label":"Join Conversation"},{"id":"leave_conversation","label":"Leave Conversation"},{"id":"kick_conversation","label":"Remove User from Conversation"},{"id":"unarchive_conversation","label":"Unarchive Conversation"},{"id":"close_conversation","label":"Close Conversation"},{"id":"mark_conversation_read","label":"Mark Conversation Read"},{"id":"open_conversation","label":"Open Conversation"},{"id":"lookup_user_by_email","label":"Find User by Email"},{"id":"list_user_conversations","label":"List User Conversations"},{"id":"get_user_profile","label":"Get User Profile"},{"id":"set_user_presence","label":"Set Bot Presence"},{"id":"get_file_info","label":"Get File Info"},{"id":"list_files","label":"List Files"},{"id":"delete_file","label":"Delete File"},{"id":"get_reactions","label":"Get Reactions"},{"id":"list_reactions","label":"List Reactions"},{"id":"pin_message","label":"Pin Message"},{"id":"unpin_message","label":"Unpin Message"},{"id":"list_pins","label":"List Pins"},{"id":"add_bookmark","label":"Add Bookmark"},{"id":"edit_bookmark","label":"Edit Bookmark"},{"id":"list_bookmarks","label":"List Bookmarks"},{"id":"remove_bookmark","label":"Remove Bookmark"},{"id":"create_user_group","label":"Create User Group"},{"id":"update_user_group","label":"Update User Group"},{"id":"enable_user_group","label":"Enable User Group"},{"id":"disable_user_group","label":"Disable User Group"},{"id":"list_user_groups","label":"List User Groups"},{"id":"list_user_group_members","label":"List User Group Members"},{"id":"update_user_group_members","label":"Update User Group Members"},{"id":"get_dnd_info","label":"Get Do Not Disturb Info"},{"id":"get_team_dnd_info","label":"Get Team Do Not Disturb Info"},{"id":"list_emoji","label":"List Custom Emoji"},{"id":"get_team_info","label":"Get Workspace Info"},{"id":"get_team_profile","label":"Get Workspace Profile Fields"},{"id":"unfurl_links","label":"Unfurl Links"}]},{"id":"destinationType","type":"dropdown","valueKind":"string","storage":"native","title":"Destination","surface":"action","visibleFor":{"send":true,"ephemeral":false,"canvas":false,"read":true,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"channel"},"condition":{"opaque":true},"options":[{"id":"channel"},{"id":"dm"}]},{"id":"credential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Slack Account","mode":"basic","canonicalParamId":"oauthCredential","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"serviceId":"slack","condition":{"opaque":true},"required":true},{"id":"manualCredential","type":"short-input","valueKind":"string","storage":"native","title":"Slack Account","mode":"advanced","canonicalParamId":"oauthCredential","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"channel","type":"channel-selector","valueKind":"picked","storage":"native","title":"Channel","mode":"basic","canonicalParamId":"channel","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":true,"list_users":false,"get_user":false,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.channels","serviceId":"slack","condition":{"opaque":true},"required":{"field":"operation","value":{"list":8},"not":true},"options":{"dynamic":true}},{"id":"manualChannel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","mode":"advanced","canonicalParamId":"channel","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":true,"list_users":false,"get_user":false,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":{"field":"operation","value":{"list":8},"not":true}},{"id":"dmUserId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"dmUserId","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":true,"rename_agent_session":true,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":true,"rename_list":true,"share_list":true,"list_items":true,"get_list_item":true,"create_list_item":true,"update_list_items":true,"delete_list_item":true,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualDmUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"dmUserId","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":true,"rename_agent_session":true,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":true,"rename_list":true,"share_list":true,"list_items":true,"get_list_item":true,"create_list_item":true,"update_list_items":true,"delete_list_item":true,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"ephemeralUser","type":"user-selector","valueKind":"picked","storage":"native","title":"Target User","mode":"basic","canonicalParamId":"ephemeralUser","surface":"action","visibleFor":{"send":false,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualEphemeralUser","type":"short-input","valueKind":"string","storage":"native","title":"Target User ID","mode":"advanced","canonicalParamId":"ephemeralUser","surface":"action","visibleFor":{"send":false,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"messageFormat","type":"dropdown","valueKind":"string","storage":"native","title":"Message Format","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"text"},"condition":{"opaque":true},"options":[{"id":"text"},{"id":"blocks"}]},{"id":"text","type":"long-input","valueKind":"string","storage":"native","title":"Message","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":{"field":"operation","value":["send","ephemeral","schedule_message"],"and":{"field":"messageFormat","value":"blocks","not":true}}},{"id":"blocks","type":"code","valueKind":"json","storage":"native","title":"Block Kit Blocks","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"language":"json","condition":{"opaque":true},"required":{"field":"operation","value":["send","ephemeral","update","schedule_message"],"and":{"field":"messageFormat","value":"blocks"}}},{"id":"threadTs","type":"short-input","valueKind":"string","storage":"native","title":"Thread Timestamp","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"attachmentFiles","type":"file-upload","valueKind":"upload","storage":"native","title":"Attachments","mode":"basic","canonicalParamId":"files","surface":"action","visibleFor":{"send":true,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"multiple":true,"condition":{"opaque":true},"required":false},{"id":"files","type":"short-input","valueKind":"string","storage":"native","title":"File Attachments","mode":"advanced","canonicalParamId":"files","surface":"action","visibleFor":{"send":true,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"title","type":"short-input","valueKind":"string","storage":"native","title":"Canvas Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":true,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"content","type":"long-input","valueKind":"string","storage":"native","title":"Canvas Content","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":true,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"limit","type":"short-input","valueKind":"string","storage":"native","title":"Message Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":true,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"includePrivate","type":"dropdown","valueKind":"string","storage":"native","title":"Include Private Channels","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"true"},"condition":{"opaque":true},"options":[{"id":"true"},{"id":"false"}]},{"id":"channelLimit","type":"short-input","valueKind":"string","storage":"native","title":"Conversations Per Page","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"memberLimit","type":"short-input","valueKind":"string","storage":"native","title":"Member Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":true,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"includeDeleted","type":"dropdown","valueKind":"string","storage":"native","title":"Include Deactivated Users","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":true,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"options":[{"id":"false"},{"id":"true"}]},{"id":"userLimit","type":"short-input","valueKind":"string","storage":"native","title":"User Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":true,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"paginationCursor","type":"short-input","valueKind":"string","storage":"native","title":"Pagination Cursor","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":true,"list_users":true,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"userId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"userId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":true,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"userId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":true,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"getMessageTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":true,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":true,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"getThreadTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Thread Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":true,"get_thread_replies":true,"get_channel_history":false,"get_permalink":false,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"threadLimit","type":"short-input","valueKind":"string","storage":"native","title":"Message Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":true,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"status","type":"short-input","valueKind":"string","storage":"native","title":"Status Text","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":true,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"loadingMessages","type":"long-input","valueKind":"string","storage":"native","title":"Loading Messages","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":true,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"assistantTitle","type":"short-input","valueKind":"string","storage":"native","title":"Thread Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":true,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"suggestedPrompts","type":"long-input","valueKind":"string","storage":"native","title":"Suggested Prompts","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"promptsTitle","type":"short-input","valueKind":"string","storage":"native","title":"Prompts Heading","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyOldest","type":"short-input","valueKind":"string","storage":"native","title":"Oldest Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyLatest","type":"short-input","valueKind":"string","storage":"native","title":"Latest Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyLimit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyMaxPages","type":"short-input","valueKind":"string","storage":"native","title":"Max Pages","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyCursor","type":"short-input","valueKind":"string","storage":"native","title":"Start Cursor","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyInclusive","type":"dropdown","valueKind":"string","storage":"native","title":"Inclusive","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"required":false,"options":[{"id":"false"},{"id":"true"}]},{"id":"oldest","type":"short-input","valueKind":"string","storage":"native","title":"Oldest Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":true,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"fileId","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":true,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"downloadFileName","type":"short-input","valueKind":"string","storage":"native","title":"File Name Override","canonicalParamId":"fileName","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":true,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"updateTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"updateText","type":"long-input","valueKind":"string","storage":"native","title":"New Message Text","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":{"field":"operation","value":"update","and":{"field":"messageFormat","value":"blocks","not":true}}},{"id":"deleteTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":true,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"reactionTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":true,"unreact":true,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"emojiName","type":"short-input","valueKind":"string","storage":"native","title":"Emoji Name","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":true,"unreact":true,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"includeNumMembers","type":"dropdown","valueKind":"string","storage":"native","title":"Include Member Count","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":true,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"true"},"condition":{"opaque":true},"options":[{"id":"true"},{"id":"false"}]},{"id":"presenceUserId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"presenceUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":true,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualPresenceUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"presenceUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":true,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"editCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"canvasOperation","type":"dropdown","valueKind":"string","storage":"native","title":"Edit Operation","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"insert_at_end"},"condition":{"opaque":true},"required":true,"options":[{"id":"insert_at_start"},{"id":"insert_at_end"},{"id":"insert_after"},{"id":"insert_before"},{"id":"replace"},{"id":"delete"},{"id":"rename"}]},{"id":"canvasContent","type":"long-input","valueKind":"string","storage":"native","title":"Content","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"sectionId","type":"short-input","valueKind":"string","storage":"native","title":"Section ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":{"field":"canvasOperation","value":["insert_after","insert_before","delete"]}},{"id":"canvasTitle","type":"short-input","valueKind":"string","storage":"native","title":"New Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"channelCanvasTitle","type":"short-input","valueKind":"string","storage":"native","title":"Canvas Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"channelCanvasContent","type":"long-input","valueKind":"string","storage":"native","title":"Canvas Content","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"getCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":true,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"canvasListCount","type":"short-input","valueKind":"string","storage":"native","title":"Canvas Limit","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListPage","type":"short-input","valueKind":"string","storage":"native","title":"Page","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListUser","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListTsFrom","type":"short-input","valueKind":"string","storage":"native","title":"Created After","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListTsTo","type":"short-input","valueKind":"string","storage":"native","title":"Created Before","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListTeamId","type":"short-input","valueKind":"string","storage":"native","title":"Team ID","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"lookupCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":true,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"sectionCriteria","type":"code","valueKind":"json","storage":"native","title":"Section Criteria","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":true,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"language":"json","condition":{"opaque":true},"required":true},{"id":"deleteCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":true,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"conversationName","type":"short-input","valueKind":"string","storage":"native","title":"Channel Name","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"isPrivate","type":"dropdown","valueKind":"string","storage":"native","title":"Private Channel","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"options":[{"id":"false"},{"id":"true"}]},{"id":"teamId","type":"short-input","valueKind":"string","storage":"native","title":"Team ID","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"inviteUsers","type":"short-input","valueKind":"string","storage":"native","title":"User IDs","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"inviteForce","type":"dropdown","valueKind":"string","storage":"native","title":"Skip Invalid Users","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"options":[{"id":"false"},{"id":"true"}]},{"id":"viewTriggerId","type":"short-input","valueKind":"string","storage":"native","title":"Trigger ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":true,"update_view":false,"push_view":true,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"viewInteractivityPointer","type":"short-input","valueKind":"string","storage":"native","title":"Interactivity Pointer","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":true,"update_view":false,"push_view":true,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"viewId","type":"short-input","valueKind":"string","storage":"native","title":"View ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":true,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"viewExternalId","type":"short-input","valueKind":"string","storage":"native","title":"External ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":true,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"viewHash","type":"short-input","valueKind":"string","storage":"native","title":"View Hash","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":true,"push_view":false,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"publishUserId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"publishUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualPublishUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"publishUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"viewPayload","type":"code","valueKind":"json","storage":"native","title":"View Payload","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"language":"json","condition":{"opaque":true},"required":true},{"id":"scheduleAt","type":"short-input","valueKind":"string","storage":"native","title":"Send At","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"scheduledLimit","type":"short-input","valueKind":"string","storage":"native","title":"Message Limit","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":true,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"scheduledCursor","type":"short-input","valueKind":"string","storage":"native","title":"Pagination Cursor","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":true,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"scheduledMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Scheduled Message ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":true,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"renameChannelName","type":"short-input","valueKind":"string","storage":"native","title":"New Channel Name","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":true,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"conversationTopic","type":"long-input","valueKind":"string","storage":"native","title":"Topic","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":true,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"conversationPurpose","type":"long-input","valueKind":"string","storage":"native","title":"Purpose","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"agentBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Slack Bot","mode":"basic","canonicalParamId":"agentCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":9}},"required":true},{"id":"manualAgentBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Custom Slack Bot Credential ID","mode":"advanced","canonicalParamId":"agentCredentialId","surface":"action","condition":{"field":"operation","value":{"list":9}},"required":true},{"id":"agentChannel","type":"channel-selector","valueKind":"picked","storage":"native","title":"Channel","mode":"basic","canonicalParamId":"agentChannelId","surface":"action","dependsOn":{"all":["agentBotCredential"],"any":[]},"selectorKey":"slack.channels","serviceId":"slack","condition":{"field":"operation","value":{"list":9}},"required":true,"options":{"dynamic":true}},{"id":"manualAgentChannel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","mode":"advanced","canonicalParamId":"agentChannelId","surface":"action","condition":{"field":"operation","value":{"list":9}},"required":true},{"id":"agentThreadTs","type":"short-input","valueKind":"string","storage":"native","title":"Thread Timestamp","surface":"action","condition":{"field":"operation","value":{"list":9}},"required":{"field":"operation","value":{"list":10}}},{"id":"agentSessionStatus","type":"dropdown","valueKind":"string","storage":"native","title":"Session Status","surface":"action","valueDefault":{"constant":"processing"},"condition":{"field":"operation","value":"set_agent_session_status"},"required":true,"options":[{"id":"active"},{"id":"processing"},{"id":"suspended"},{"id":"closed"}]},{"id":"agentSessionTitle","type":"short-input","valueKind":"string","storage":"native","title":"Session Title","surface":"action","condition":{"field":"operation","value":{"list":10}},"required":{"field":"operation","value":"rename_agent_session"}},{"id":"agentInitiatorUser","type":"user-selector","valueKind":"picked","storage":"native","title":"Initiator","mode":"basic","canonicalParamId":"agentInitiatorUserId","surface":"action","dependsOn":{"all":["agentBotCredential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"field":"operation","value":"set_agent_session_status"},"required":false,"options":{"dynamic":true}},{"id":"manualAgentInitiatorUser","type":"short-input","valueKind":"string","storage":"native","title":"Initiator User ID","mode":"advanced","canonicalParamId":"agentInitiatorUserId","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"agentIconEmoji","type":"short-input","valueKind":"string","storage":"native","title":"Agent Icon Emoji","mode":"advanced","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"agentIconUrl","type":"short-input","valueKind":"string","storage":"native","title":"Agent Icon URL","mode":"advanced","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"agentUsername","type":"short-input","valueKind":"string","storage":"native","title":"Agent Username","mode":"advanced","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"listBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Slack Bot","mode":"basic","canonicalParamId":"listCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":11}},"required":true},{"id":"manualListBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Custom Slack Bot Credential ID","mode":"advanced","canonicalParamId":"listCredentialId","surface":"action","condition":{"field":"operation","value":{"list":11}},"required":true},{"id":"listId","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":["rename_list","share_list","list_items","get_list_item","create_list_item","update_list_items","delete_list_item"]},"required":true},{"id":"listShareTarget","type":"dropdown","valueKind":"string","storage":"native","title":"Share With","surface":"action","valueDefault":{"constant":"users"},"condition":{"field":"operation","value":"share_list"},"required":true,"options":[{"id":"users"},{"id":"channels"}]},{"id":"listShareUserIds","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_list","and":{"field":"listShareTarget","value":"users"}},"required":true},{"id":"listShareChannelIds","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_list","and":{"field":"listShareTarget","value":"channels"}},"required":true},{"id":"listAccessLevel","type":"dropdown","valueKind":"string","storage":"native","title":"Access Level","surface":"action","dependsOn":{"all":["listShareTarget"],"any":[]},"valueDefault":{"constant":"read"},"condition":{"field":"operation","value":"share_list"},"required":true,"options":{"opaque":true}},{"id":"listName","type":"short-input","valueKind":"string","storage":"native","title":"Name","surface":"action","condition":{"field":"operation","value":{"list":12}},"required":{"field":"operation","value":"create_list"}},{"id":"listItemId","type":"short-input","valueKind":"string","storage":"native","title":"Row ID","surface":"action","condition":{"field":"operation","value":["get_list_item","delete_list_item"]},"required":true},{"id":"listInitialFields","type":"code","valueKind":"json","storage":"native","title":"Initial Fields","surface":"action","language":"json","condition":{"field":"operation","value":"create_list_item"}},{"id":"listCells","type":"code","valueKind":"json","storage":"native","title":"Cells","surface":"action","language":"json","condition":{"field":"operation","value":"update_list_items"},"required":true},{"id":"listSchema","type":"code","valueKind":"json","storage":"native","title":"Column Schema","surface":"action","language":"json","condition":{"field":"operation","value":"create_list"}},{"id":"listDescription","type":"long-input","valueKind":"string","storage":"native","title":"Description","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":12}}},{"id":"listUpdateTodoMode","type":"dropdown","valueKind":"string","storage":"native","title":"Task Tracking Fields","mode":"advanced","surface":"action","valueDefault":{"constant":"unchanged"},"condition":{"field":"operation","value":"rename_list"},"options":[{"id":"unchanged"},{"id":"true"},{"id":"false"}]},{"id":"listTodoMode","type":"switch","valueKind":"boolean","storage":"native","title":"Task Tracking Fields","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_list"}},{"id":"listParentItemId","type":"short-input","valueKind":"string","storage":"native","title":"Parent Row ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_list_item"}},{"id":"listDuplicatedItemId","type":"short-input","valueKind":"string","storage":"native","title":"Duplicate Row ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_list_item"}},{"id":"listLimit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_items"}},{"id":"listCursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_items"}},{"id":"listArchived","type":"switch","valueKind":"boolean","storage":"native","title":"Archived Rows","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_items"}},{"id":"listIncludeSchema","type":"switch","valueKind":"boolean","storage":"native","title":"Include List Schema","mode":"advanced","surface":"action","defaultValue":true,"condition":{"field":"operation","value":"list_items"}},{"id":"apiBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Slack Bot","mode":"basic","canonicalParamId":"apiBotCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":13}},"required":true},{"id":"manualApiBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Slack Credential ID","mode":"advanced","canonicalParamId":"apiBotCredentialId","surface":"action","condition":{"field":"operation","value":{"list":13}},"required":true},{"id":"apiOAuthCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Slack Account or Bot","mode":"basic","canonicalParamId":"apiOAuthCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":14}},"required":true},{"id":"manualApiOAuthCredential","type":"short-input","valueKind":"string","storage":"native","title":"Slack Credential ID","mode":"advanced","canonicalParamId":"apiOAuthCredentialId","surface":"action","condition":{"field":"operation","value":{"list":14}},"required":true},{"id":"slack_revoke_list_access_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"revoke_list_access"},"required":true},{"id":"slack_revoke_list_access_user_ids","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_list_access"},"required":false},{"id":"slack_revoke_list_access_channel_ids","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_list_access"},"required":false},{"id":"slack_start_list_export_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":true},{"id":"slack_start_list_export_format","type":"dropdown","valueKind":"string","storage":"native","title":"Export Format","surface":"action","valueDefault":{"constant":"csv"},"condition":{"field":"operation","value":"start_list_export"},"required":false,"options":[{"id":"csv"},{"id":"json"}]},{"id":"slack_start_list_export_include_threads","type":"switch","valueKind":"boolean","storage":"native","title":"Include Threads","mode":"advanced","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":false},{"id":"slack_start_list_export_include_attachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","mode":"advanced","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":false},{"id":"slack_start_list_export_include_archived","type":"switch","valueKind":"boolean","storage":"native","title":"Include Archived Rows","mode":"advanced","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":false},{"id":"slack_get_list_export_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":true},{"id":"slack_get_list_export_job_id","type":"short-input","valueKind":"string","storage":"native","title":"Export Job ID","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":true},{"id":"slack_get_list_export_format","type":"dropdown","valueKind":"string","storage":"native","title":"Export Format","surface":"action","valueDefault":{"constant":"csv"},"condition":{"field":"operation","value":"get_list_export"},"required":false,"options":[{"id":"csv"},{"id":"json"}]},{"id":"slack_get_list_export_include_threads","type":"switch","valueKind":"boolean","storage":"native","title":"Include Threads","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":false},{"id":"slack_get_list_export_include_attachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":false},{"id":"slack_delete_list_items_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"delete_list_items"},"required":true},{"id":"slack_delete_list_items_ids","type":"code","valueKind":"json","storage":"native","title":"Row IDs","surface":"action","language":"json","condition":{"field":"operation","value":"delete_list_items"},"required":true},{"id":"slack_share_canvas_canvas_id","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","condition":{"field":"operation","value":"share_canvas"},"required":true},{"id":"slack_share_canvas_access_level","type":"dropdown","valueKind":"string","storage":"native","title":"Access Level","surface":"action","dependsOn":{"all":["slack_share_canvas_channel_ids"],"any":[]},"valueDefault":{"constant":"read"},"condition":{"field":"operation","value":"share_canvas"},"required":true,"options":{"opaque":true}},{"id":"slack_share_canvas_user_ids","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_canvas"},"required":false},{"id":"slack_share_canvas_channel_ids","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_canvas"},"required":false},{"id":"slack_revoke_canvas_access_canvas_id","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","condition":{"field":"operation","value":"revoke_canvas_access"},"required":true},{"id":"slack_revoke_canvas_access_user_ids","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_canvas_access"},"required":false},{"id":"slack_revoke_canvas_access_channel_ids","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_canvas_access"},"required":false},{"id":"slack_join_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"join_conversation"},"required":true},{"id":"slack_leave_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"leave_conversation"},"required":true},{"id":"slack_kick_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"kick_conversation"},"required":true},{"id":"slack_kick_conversation_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","surface":"action","condition":{"field":"operation","value":"kick_conversation"},"required":true},{"id":"slack_unarchive_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"unarchive_conversation"},"required":true},{"id":"slack_close_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"close_conversation"},"required":true},{"id":"slack_mark_conversation_read_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"mark_conversation_read"},"required":true},{"id":"slack_mark_conversation_read_ts","type":"short-input","valueKind":"string","storage":"native","title":"Read Through Timestamp","surface":"action","condition":{"field":"operation","value":"mark_conversation_read"},"required":true},{"id":"slack_open_conversation_users","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_open_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Conversation ID","surface":"action","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_open_conversation_prevent_creation","type":"switch","valueKind":"boolean","storage":"native","title":"Only Resume Existing Conversation","mode":"advanced","surface":"action","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_open_conversation_return_im","type":"switch","valueKind":"boolean","storage":"native","title":"Include Conversation Details","mode":"advanced","surface":"action","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_lookup_user_by_email_email","type":"short-input","valueKind":"string","storage":"native","title":"Email","surface":"action","condition":{"field":"operation","value":"lookup_user_by_email"},"required":true},{"id":"slack_list_user_conversations_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_types","type":"short-input","valueKind":"string","storage":"native","title":"Conversation Types","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_exclude_archived","type":"switch","valueKind":"boolean","storage":"native","title":"Exclude Archived","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_exclude_muted","type":"switch","valueKind":"boolean","storage":"native","title":"Exclude Muted","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_limit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_get_user_profile_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_user_profile"},"required":false},{"id":"slack_get_user_profile_include_labels","type":"switch","valueKind":"boolean","storage":"native","title":"Include Custom Field Labels","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_user_profile"},"required":false},{"id":"slack_set_user_presence_presence","type":"dropdown","valueKind":"string","storage":"native","title":"Presence","surface":"action","valueDefault":{"constant":"auto"},"condition":{"field":"operation","value":"set_user_presence"},"required":true,"options":[{"id":"auto"},{"id":"away"}]},{"id":"slack_get_file_info_file","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","condition":{"field":"operation","value":"get_file_info"},"required":true},{"id":"slack_get_file_info_cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_file_info"},"required":false},{"id":"slack_get_file_info_limit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_file_info"},"required":false},{"id":"slack_list_files_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_types","type":"short-input","valueKind":"string","storage":"native","title":"File Types","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_ts_from","type":"short-input","valueKind":"string","storage":"native","title":"From Timestamp","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_ts_to","type":"short-input","valueKind":"string","storage":"native","title":"To Timestamp","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_page","type":"short-input","valueKind":"string","storage":"native","title":"Page","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_count","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_show_files_hidden_by_limit","type":"switch","valueKind":"boolean","storage":"native","title":"Include Files Hidden by Plan Limit","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_delete_file_file","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","condition":{"field":"operation","value":"delete_file"},"required":true},{"id":"slack_get_reactions_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_timestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_file","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_file_comment","type":"short-input","valueKind":"string","storage":"native","title":"File Comment ID","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_full","type":"switch","valueKind":"boolean","storage":"native","title":"Include All Reacting Users","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_list_reactions_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_full","type":"switch","valueKind":"boolean","storage":"native","title":"Include All Reacting Users","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_limit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_pin_message_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"pin_message"},"required":true},{"id":"slack_pin_message_timestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"pin_message"},"required":true},{"id":"slack_unpin_message_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"unpin_message"},"required":true},{"id":"slack_unpin_message_timestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"unpin_message"},"required":true},{"id":"slack_list_pins_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"list_pins"},"required":true},{"id":"slack_add_bookmark_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":true},{"id":"slack_add_bookmark_title","type":"short-input","valueKind":"string","storage":"native","title":"Title","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":true},{"id":"slack_add_bookmark_link","type":"short-input","valueKind":"string","storage":"native","title":"Link URL","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":true},{"id":"slack_add_bookmark_emoji","type":"short-input","valueKind":"string","storage":"native","title":"Emoji","mode":"advanced","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":false},{"id":"slack_add_bookmark_parent_id","type":"short-input","valueKind":"string","storage":"native","title":"Parent Bookmark ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":false},{"id":"slack_edit_bookmark_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":true},{"id":"slack_edit_bookmark_bookmark_id","type":"short-input","valueKind":"string","storage":"native","title":"Bookmark ID","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":true},{"id":"slack_edit_bookmark_title","type":"short-input","valueKind":"string","storage":"native","title":"Title","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":false},{"id":"slack_edit_bookmark_link","type":"short-input","valueKind":"string","storage":"native","title":"Link URL","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":false},{"id":"slack_edit_bookmark_emoji","type":"short-input","valueKind":"string","storage":"native","title":"Emoji","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":false},{"id":"slack_list_bookmarks_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"list_bookmarks"},"required":true},{"id":"slack_remove_bookmark_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"remove_bookmark"},"required":true},{"id":"slack_remove_bookmark_bookmark_id","type":"short-input","valueKind":"string","storage":"native","title":"Bookmark ID","surface":"action","condition":{"field":"operation","value":"remove_bookmark"},"required":true},{"id":"slack_create_user_group_name","type":"short-input","valueKind":"string","storage":"native","title":"Name","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":true},{"id":"slack_create_user_group_handle","type":"short-input","valueKind":"string","storage":"native","title":"Mention Handle","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_description","type":"short-input","valueKind":"string","storage":"native","title":"Description","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_channels","type":"code","valueKind":"json","storage":"native","title":"Default Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_additional_channels","type":"code","valueKind":"json","storage":"native","title":"Additional Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_enable_section","type":"switch","valueKind":"boolean","storage":"native","title":"Show as Sidebar Section","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_update_user_group_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":true},{"id":"slack_update_user_group_name","type":"short-input","valueKind":"string","storage":"native","title":"Name","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_handle","type":"short-input","valueKind":"string","storage":"native","title":"Mention Handle","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_description","type":"short-input","valueKind":"string","storage":"native","title":"Description","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_channels","type":"code","valueKind":"json","storage":"native","title":"Default Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_additional_channels","type":"code","valueKind":"json","storage":"native","title":"Additional Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_enable_section","type":"switch","valueKind":"boolean","storage":"native","title":"Show as Sidebar Section","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_enable_user_group_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"enable_user_group"},"required":true},{"id":"slack_enable_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"enable_user_group"},"required":false},{"id":"slack_enable_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"enable_user_group"},"required":false},{"id":"slack_disable_user_group_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"disable_user_group"},"required":true},{"id":"slack_disable_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"disable_user_group"},"required":false},{"id":"slack_disable_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"disable_user_group"},"required":false},{"id":"slack_list_user_groups_include_disabled","type":"switch","valueKind":"boolean","storage":"native","title":"Include Disabled Groups","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_groups_include_users","type":"switch","valueKind":"boolean","storage":"native","title":"Include Members","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_groups_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_groups_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_group_members_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"list_user_group_members"},"required":true},{"id":"slack_list_user_group_members_include_disabled","type":"switch","valueKind":"boolean","storage":"native","title":"Include Disabled Users","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_group_members"},"required":false},{"id":"slack_list_user_group_members_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_group_members"},"required":false},{"id":"slack_update_user_group_members_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":true},{"id":"slack_update_user_group_members_users","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group_members"},"required":true},{"id":"slack_update_user_group_members_additional_channels","type":"code","valueKind":"json","storage":"native","title":"Additional Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_update_user_group_members_is_shared","type":"switch","valueKind":"boolean","storage":"native","title":"Shared Section","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_update_user_group_members_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_update_user_group_members_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_get_dnd_info_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_dnd_info"},"required":false},{"id":"slack_get_dnd_info_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_dnd_info"},"required":false},{"id":"slack_get_team_dnd_info_users","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"get_team_dnd_info"},"required":true},{"id":"slack_get_team_dnd_info_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_team_dnd_info"},"required":false},{"id":"slack_get_team_info_team","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_team_info"},"required":false},{"id":"slack_get_team_info_domain","type":"short-input","valueKind":"string","storage":"native","title":"Workspace Domain","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_team_info"},"required":false},{"id":"slack_get_team_profile_visibility","type":"dropdown","valueKind":"string","storage":"native","title":"Visibility","surface":"action","valueDefault":{"constant":"all"},"condition":{"field":"operation","value":"get_team_profile"},"required":false,"options":[{"id":"all"},{"id":"visible"},{"id":"hidden"}]},{"id":"slack_unfurl_links_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"unfurl_links"},"required":true},{"id":"slack_unfurl_links_ts","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"unfurl_links"},"required":true},{"id":"slack_unfurl_links_unfurls","type":"code","valueKind":"json","storage":"native","title":"Link Previews","surface":"action","language":"json","condition":{"field":"operation","value":"unfurl_links"},"required":true},{"trigger":"slack_oauth","start":0,"count":21}],"outputs":{"message":{"type":"json","description":"Complete message object with all properties: ts, text, user, channel, reactions, threads, files, attachments, blocks, stars, pins, and edit history"},"ts":{"type":"string","description":"Message timestamp returned by Slack API"},"channel":{"type":"string","description":"Channel identifier where message was sent"},"fileCount":{"type":"number","description":"Number of files uploaded (when files are attached)"},"files":{"type":"file[]","description":"Files attached to the message"},"messageTs":{"type":"string","description":"Timestamp of the ephemeral message (cannot be used to update or delete)"},"canvas_id":{"type":"string","description":"Canvas identifier for created canvases"},"title":{"type":"string","description":"Canvas title"},"canvas":{"type":"json","description":"Canvas file metadata returned by Slack"},"canvases":{"type":"json","description":"Array of canvas file objects returned by Slack"},"paging":{"type":"json","description":"Pagination information for listed canvases"},"sections":{"type":"json","description":"Canvas section IDs returned by Slack section lookup"},"ok":{"type":"boolean","description":"Whether Slack completed the operation"},"status":{"type":"string","description":"List export job status"},"agentStatus":{"type":"string","description":"Agent session status recorded by Slack"},"messages":{"type":"json","description":"Conversation messages"},"parentMessage":{"type":"json","description":"The thread parent message with all properties"},"replies":{"type":"json","description":"Array of reply messages in the thread (excluding the parent)"},"replyCount":{"type":"number","description":"Number of replies returned in this response"},"hasMore":{"type":"boolean","description":"Whether more thread messages or provider pages remain beyond the fetched window"},"pages":{"type":"number","description":"Number of provider pages fetched during a paginated read"},"threadTs":{"type":"string","description":"Thread timestamp an assistant status/title/prompts op was set on"},"permalink":{"type":"string","description":"Permalink URL to the message"},"channels":{"type":"json","description":"One page of accessible public and private channel objects, including conversation type and membership fields."},"count":{"type":"number","description":"Total number of items returned (channels, members, or users)"},"nextCursor":{"type":"string","description":"Continuation cursor; empty or null when finished"},"members":{"type":"json","description":"Array of user IDs who are members of the channel"},"users":{"type":"json","description":"User IDs or a map of user IDs to Do Not Disturb state"},"user":{"type":"json","description":"Detailed user object with properties: id, name, real_name, display_name, first_name, last_name, title, is_bot, is_admin, deleted, timezone, avatars, status"},"file":{"type":"file","description":"Downloaded file stored in execution files"},"content":{"type":"string","description":"Success message for update operation"},"metadata":{"type":"json","description":"Updated message metadata (legacy, use message object instead)"},"channelInfo":{"type":"json","description":"Detailed channel object with properties: id, name, is_private, is_archived, is_member, num_members, topic, purpose, created, creator"},"presence":{"type":"string","description":"User presence status: \"active\" or \"away\""},"online":{"type":"boolean","description":"Whether user has an active client connection (only available when checking own presence)"},"autoAway":{"type":"boolean","description":"Whether user was automatically set to away (only available when checking own presence)"},"manualAway":{"type":"boolean","description":"Whether user manually set themselves as away (only available when checking own presence)"},"connectionCount":{"type":"number","description":"Total number of active connections (only available when checking own presence)"},"lastActivity":{"type":"number","description":"Unix timestamp of last detected activity (only available when checking own presence)"},"view":{"type":"json","description":"View object with properties: id, team_id, type, title, submit, close, blocks, private_metadata, callback_id, external_id, state, hash, clear_on_close, notify_on_close, root_view_id, previous_view_id, app_id, bot_id"},"errors":{"type":"json","description":"Array of per-user error objects when force is true and some invitations failed (user, ok, error)"},"scheduledMessageId":{"type":"string","description":"Identifier of the scheduled message (used to delete it before it posts)"},"postAt":{"type":"number","description":"Unix timestamp when a scheduled message will post"},"scheduledMessages":{"type":"json","description":"Array of pending scheduled message objects with properties: id, channel_id, post_at, date_created, text"},"purpose":{"type":"string","description":"The purpose/description that was set on the channel"},"event_type":{"type":"string","description":"Type of Slack event that triggered the workflow"},"subtype":{"type":"string","description":"Message subtype (e.g., channel_join, channel_leave, bot_message). Null for regular user messages"},"channel_name":{"type":"string","description":"Human-readable channel name"},"channel_type":{"type":"string","description":"Type of channel (e.g., channel, group, im, mpim)"},"user_name":{"type":"string","description":"Username who triggered the event"},"bot_id":{"type":"string","description":"Bot ID if the message was sent by a bot. Null for human users"},"timestamp":{"type":"string","description":"Message timestamp from the triggering event"},"thread_ts":{"type":"string","description":"Parent thread timestamp (if message is in a thread)"},"team_id":{"type":"string","description":"Slack workspace/team ID"},"event_id":{"type":"string","description":"Unique event identifier for the trigger"},"profile":{"type":"json","description":"User profile or workspace custom profile fields"},"usergroups":{"type":"json","description":"User groups"},"usergroup":{"type":"json","description":"Created or updated user group"},"bookmarks":{"type":"json","description":"Channel bookmarks"},"bookmark":{"type":"json","description":"Created or edited bookmark"},"emoji":{"type":"json","description":"Custom emoji names mapped to image URLs or aliases"},"team":{"type":"json","description":"Workspace details"},"job_id":{"type":"string","description":"List export job ID"},"download_url":{"type":"string","description":"List export download URL when ready"},"response_metadata":{"type":"json","description":"Pagination metadata including next_cursor"},"dnd_enabled":{"type":"boolean","description":"Whether Do Not Disturb is enabled"},"next_dnd_start_ts":{"type":"number","description":"Next Do Not Disturb start timestamp"},"next_dnd_end_ts":{"type":"number","description":"Next Do Not Disturb end timestamp"},"snooze_enabled":{"type":"boolean","description":"Whether notification snooze is enabled"},"snooze_endtime":{"type":"number","description":"Snooze end timestamp"},"snooze_remaining":{"type":"number","description":"Seconds remaining in snooze"},"snooze_is_indefinite":{"type":"boolean","description":"Whether snooze is indefinite"},"type":{"type":"string","description":"Type of reacted-to item"},"comment":{"type":"json","description":"File comment with reactions"},"comments":{"type":"json","description":"File comments (id, comment, user, created, timestamp)"},"fileMetadata":{"type":"json","description":"Slack file metadata (id, name, title, mimetype, permalink)"},"conversation":{"type":"json","description":"Opened or joined conversation details (id, name, is_im, is_mpim)"},"listId":{"type":"string","description":"Created List ID"},"schema":{"type":"json","description":"Created column schema (id, key, name, type, options); null when Slack omits it"},"list":{"type":"json","description":"List metadata (id, title, schema); null when not included"},"items":{"type":"json","description":"List rows, pinned items, or reacted-to items, depending on the operation"},"item":{"type":"json","description":"One row (id, list_id, fields, timestamps, parent_record_id)"}}},"start_trigger":{"type":"start_trigger","name":"Start","category":"triggers","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":false,"errorPort":false,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["chat","manual","api"]},"dynamicOutputs":{"source":"inputFormat","param":"inputFormat"},"subBlocks":[{"id":"inputFormat","type":"input-format","valueKind":"array","storage":"native","structured":"inputFormat","title":"Inputs"},{"id":"runMetadata","type":"switch","valueKind":"boolean","storage":"native","title":"Add run metadata","mode":"advanced","defaultValue":false}],"outputs":{}},"table_v2":{"type":"table_v2","name":"Table","category":"blocks","tools":{"access":["table_insert_row","table_batch_insert_rows","table_upsert_row","table_update_row","table_update_rows_by_filter","table_delete_row","table_delete_rows_by_filter","table_query_rows_v2","table_get_row","table_get_schema"],"selector":"operation"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"triggers":{"enabled":true,"available":["table_new_row"]},"subBlocks":[{"id":"operation","type":"dropdown","valueKind":"string","storage":"native","title":"Operation","surface":"action","valueDefault":{"constant":"query_rows"},"options":[{"id":"query_rows","label":"Query Rows"},{"id":"insert_row","label":"Insert Row"},{"id":"upsert_row","label":"Upsert Row"},{"id":"batch_insert_rows","label":"Batch Insert Rows"},{"id":"update_rows_by_filter","label":"Update Rows by Filter"},{"id":"delete_rows_by_filter","label":"Delete Rows by Filter"},{"id":"update_row","label":"Update Row by ID"},{"id":"delete_row","label":"Delete Row by ID"},{"id":"get_row","label":"Get Row by ID"},{"id":"get_schema","label":"Get Schema"}]},{"id":"tableSelector","type":"table-selector","valueKind":"resource","storage":"native","resourceKind":"table","title":"Table","mode":"basic","canonicalParamId":"tableId","surface":"action","required":true},{"id":"manualTableId","type":"short-input","valueKind":"string","storage":"native","title":"Table ID","mode":"advanced","canonicalParamId":"tableId","surface":"action","required":true},{"id":"outputColumns","type":"dropdown","valueKind":"array","storage":"native","title":"Columns to Return","surface":"action","dependsOn":{"all":[],"any":["tableSelector","manualTableId"]},"multiple":true,"selectorKey":"table.outputColumns","condition":{"field":"operation","value":"query_rows"},"options":{"dynamic":true}},{"id":"rowId","type":"short-input","valueKind":"string","storage":"native","title":"Row ID","surface":"action","dependsOn":{"all":["tableId"],"any":[]},"condition":{"field":"operation","value":["get_row","update_row","delete_row"]},"required":true},{"id":"data","type":"code","valueKind":"json","storage":"native","title":"Row Data (JSON)","surface":"action","language":"json","condition":{"field":"operation","value":["insert_row","upsert_row","update_row","update_rows_by_filter"]},"required":true},{"id":"conflictColumnSelector","type":"column-selector","valueKind":"picked","storage":"native","title":"Conflict Column","mode":"basic","canonicalParamId":"conflictColumn","surface":"action","dependsOn":{"all":["tableSelector"],"any":[]},"selectorKey":"table.columns","condition":{"field":"operation","value":"upsert_row"},"options":{"dynamic":true}},{"id":"manualConflictColumn","type":"short-input","valueKind":"string","storage":"native","title":"Conflict Column","mode":"advanced","canonicalParamId":"conflictColumn","surface":"action","dependsOn":{"all":["tableId"],"any":[]},"condition":{"field":"operation","value":"upsert_row"}},{"id":"rows","type":"code","valueKind":"json","storage":"native","title":"Rows Data (Array of JSON)","surface":"action","language":"json","condition":{"field":"operation","value":"batch_insert_rows"},"required":true},{"id":"filterBuilder","type":"filter-builder","valueKind":"json","storage":"native","title":"Filter","mode":"basic","canonicalParamId":"filterInput","surface":"action","paramVisibility":"user-only","condition":{"field":"operation","value":{"list":15}}},{"id":"filter","type":"code","valueKind":"json","storage":"native","title":"Filter","mode":"advanced","canonicalParamId":"filterInput","surface":"action","language":"json","condition":{"field":"operation","value":{"list":15}}},{"id":"sortBuilder","type":"sort-builder","valueKind":"json","storage":"native","title":"Order","mode":"basic","canonicalParamId":"sortInput","surface":"action","paramVisibility":"user-only","condition":{"field":"operation","value":"query_rows"}},{"id":"order","type":"short-input","valueKind":"string","storage":"native","title":"Order","mode":"advanced","canonicalParamId":"sortInput","surface":"action","condition":{"field":"operation","value":"query_rows"}},{"id":"limit","type":"short-input","valueKind":"string","storage":"native","title":"Limit","surface":"action","condition":{"field":"operation","value":{"list":15}}},{"id":"cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","surface":"action","condition":{"field":"operation","value":"query_rows"}},{"trigger":"table_new_row","start":0,"count":6}],"outputs":{"success":{"type":"boolean","description":"Operation success status"},"row":{"type":"json","description":"Single row data","condition":{"field":"operation","value":["get_row","insert_row","upsert_row","update_row"]}},"operation":{"type":"string","description":"Operation performed (insert or update)","condition":{"field":"operation","value":"upsert_row"}},"rows":{"type":"array","description":"Array of rows","condition":{"field":"operation","value":["query_rows","batch_insert_rows"]}},"rowCount":{"type":"number","description":"Rows returned (query) or total rows in the table (get schema)","condition":{"field":"operation","value":["query_rows","get_schema"]}},"totalCount":{"type":"number","description":"Total rows matching the predicate (first page only)","condition":{"field":"operation","value":"query_rows"}},"nextCursor":{"type":"string","description":"Cursor to fetch the next page, or null on the last page","condition":{"field":"operation","value":"query_rows"}},"insertedCount":{"type":"number","description":"Number of rows inserted","condition":{"field":"operation","value":"batch_insert_rows"}},"updatedCount":{"type":"number","description":"Number of rows updated","condition":{"field":"operation","value":"update_rows_by_filter"}},"updatedRowIds":{"type":"array","description":"IDs of updated rows","condition":{"field":"operation","value":"update_rows_by_filter"}},"deletedCount":{"type":"number","description":"Number of rows deleted","condition":{"field":"operation","value":["delete_row","delete_rows_by_filter"]}},"deletedRowIds":{"type":"array","description":"IDs of deleted rows","condition":{"field":"operation","value":"delete_rows_by_filter"}},"name":{"type":"string","description":"Table name","condition":{"field":"operation","value":"get_schema"}},"columns":{"type":"array","description":"Column definitions (each includes its stable id)","condition":{"field":"operation","value":"get_schema"}},"columnCount":{"type":"number","description":"Number of columns","condition":{"field":"operation","value":"get_schema"}},"maxRows":{"type":"number","description":"Max rows per table for the workspace's plan","condition":{"field":"operation","value":"get_schema"}},"message":{"type":"string","description":"Operation status message"}}},"variables":{"type":"variables","name":"Variables","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"variables","type":"variables-input","valueKind":"array","storage":"native","structured":"variables","title":"Variable Assignments","required":false}],"outputs":{}}},"triggers":{"generic_webhook":{"id":"generic_webhook","provider":"generic","name":"Webhook Trigger","webhook":true,"subBlocks":[{"id":"webhookUrlDisplay","type":"short-input","valueKind":"none","storage":"native","title":"Webhook URL","mode":"trigger","readOnly":true},{"id":"requireAuth","type":"switch","valueKind":"boolean","storage":"native","title":"Require Authentication","mode":"trigger","defaultValue":true},{"id":"token","type":"short-input","valueKind":"string","storage":"native","title":"Authentication Token","mode":"trigger","valueDefault":{"computed":true},"password":true,"required":false},{"id":"secretHeaderName","type":"short-input","valueKind":"string","storage":"native","title":"Secret Header Name (Optional)","mode":"trigger","required":false},{"id":"acceptOtherMethods","type":"switch","valueKind":"boolean","storage":"native","title":"Accept Other HTTP Methods","mode":"trigger","defaultValue":false},{"id":"exposeRequestHeaders","type":"switch","valueKind":"boolean","storage":"native","title":"Expose Request Headers","mode":"trigger","defaultValue":false},{"id":"idempotencyField","type":"short-input","valueKind":"string","storage":"native","title":"Deduplication Field (Optional)","mode":"trigger","required":false},{"id":"responseMode","type":"dropdown","valueKind":"string","storage":"native","title":"Acknowledgement","mode":"trigger","defaultValue":"default","options":[{"id":"default","label":"Default"},{"id":"custom","label":"Custom"}]},{"id":"verifyTestEvents","type":"switch","valueKind":"boolean","storage":"native","title":"Verify Test Events","mode":"trigger","defaultValue":false},{"id":"responseStatusCode","type":"short-input","valueKind":"string","storage":"native","title":"Response Status Code","mode":"trigger","condition":{"field":"responseMode","value":"custom"},"required":false},{"id":"responseBody","type":"code","valueKind":"json","storage":"native","title":"Response Body","mode":"trigger","language":"json","condition":{"field":"responseMode","value":"custom"},"required":false},{"id":"inputFormat","type":"input-format","valueKind":"array","storage":"native","structured":"inputFormat","title":"Input Format","mode":"trigger"},{"shared":13},{"id":"samplePayload_generic_webhook","type":"code","valueKind":"none","storage":"native","title":"Event Payload Example","mode":"trigger","readOnly":true,"language":"json","condition":{"field":"selectedTriggerId","value":"generic_webhook"}}],"outputs":{}},"gmail_poller":{"id":"gmail_poller","provider":"gmail","name":"Gmail Email Trigger","polling":true,"subBlocks":[{"id":"triggerCredentials","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Credentials","mode":"trigger","canonicalParamId":"oauthCredential","serviceId":"gmail","required":true},{"id":"labelIds","type":"dropdown","valueKind":"array","storage":"native","title":"Gmail Labels to Monitor","mode":"trigger","dependsOn":{"all":["triggerCredentials"],"any":[]},"multiple":true,"selectorKey":"gmail.labels","required":false,"options":{"dynamic":true}},{"id":"labelFilterBehavior","type":"dropdown","valueKind":"string","storage":"native","title":"Label Filter Behavior","mode":"trigger","defaultValue":"INCLUDE","required":true,"options":[{"id":"INCLUDE"},{"id":"EXCLUDE"}]},{"id":"searchQuery","type":"short-input","valueKind":"string","storage":"native","title":"Gmail Search Query","mode":"trigger","required":false},{"id":"markAsRead","type":"switch","valueKind":"boolean","storage":"native","title":"Mark as Read","mode":"trigger","defaultValue":false,"required":false},{"id":"includeAttachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","mode":"trigger","defaultValue":false,"required":false},{"shared":13},{"id":"samplePayload_gmail_poller","type":"code","valueKind":"none","storage":"native","title":"Event Payload Example","mode":"trigger","readOnly":true,"language":"json","condition":{"field":"selectedTriggerId","value":"gmail_poller"}}],"outputs":{"email":{"type":"json","properties":{"id":{"type":"string","description":"Gmail message ID"},"threadId":{"type":"string","description":"Gmail thread ID"},"subject":{"type":"string","description":"Email subject line"},"from":{"type":"string","description":"Sender email address"},"to":{"type":"string","description":"Recipient email address"},"cc":{"type":"string","description":"CC recipients"},"bcc":{"type":"string","description":"BCC recipients (only present on messages you sent)"},"replyTo":{"type":"string","description":"Reply-To header"},"rfcMessageId":{"type":"string","description":"RFC Message-ID header (not the Gmail message ID)"},"inReplyTo":{"type":"string","description":"In-Reply-To header (RFC Message-ID of the parent message)"},"references":{"type":"string","description":"References header (RFC Message-IDs in the thread)"},"snippet":{"type":"string","description":"Short excerpt of the message text"},"date":{"type":"string","description":"Email date in ISO format"},"bodyText":{"type":"string","description":"Plain text email body"},"bodyHtml":{"type":"string","description":"HTML email body"},"labels":{"type":"array","description":"Email labels array"},"hasAttachments":{"type":"boolean","description":"Whether email has attachments"},"attachments":{"type":"file[]","description":"Array of email attachments as files (if includeAttachments is enabled)"}}},"timestamp":{"type":"string","description":"Event timestamp"}}},"slack_oauth":{"id":"slack_oauth","provider":"slack_app","name":"Slack","webhook":true,"subBlocks":[{"id":"eventType","type":"dropdown","valueKind":"string","storage":"native","title":"Event","mode":"trigger","required":true,"options":[{"id":"message","label":"Message"},{"id":"app_mention","label":"App mentioned"},{"id":"reaction_added","label":"Reaction added"},{"id":"reaction_removed","label":"Reaction removed"},{"id":"message_edited","label":"Message edited"},{"id":"message_deleted","label":"Message deleted"},{"id":"file_shared","label":"File shared"},{"id":"member_joined_channel","label":"Member joined channel"},{"id":"member_left_channel","label":"Member left channel"},{"id":"channel_created","label":"Channel created"},{"id":"channel_archive","label":"Channel archived"},{"id":"channel_rename","label":"Channel renamed"},{"id":"pin_added","label":"Pin added"},{"id":"pin_removed","label":"Pin removed"},{"id":"team_join","label":"Member joined workspace"},{"id":"app_home_opened","label":"App home opened"},{"id":"agent_session_stopped","label":"Agent session stopped"},{"id":"agent_session_title_changed","label":"Agent session title changed"},{"id":"app_context_changed","label":"Agent context changed"},{"id":"assistant_thread_started","label":"Assistant opened"},{"id":"assistant_thread_context_changed","label":"Assistant context changed"},{"id":"block_actions","label":"Button / select clicked"},{"id":"view_submission","label":"Modal submitted"},{"id":"slash_command","label":"Slash command"}]},{"id":"customBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Bot","mode":"trigger","canonicalParamId":"botCredential","serviceId":"slack","required":true},{"id":"manualBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Bot Credential ID","mode":"trigger-advanced","canonicalParamId":"botCredential","required":true},{"id":"source","type":"dropdown","valueKind":"array","storage":"native","title":"Source","mode":"trigger","multiple":true,"condition":{"field":"eventType","value":["message","message_edited","message_deleted"]},"required":false,"options":[{"id":"im","label":"Direct message"},{"id":"channel","label":"Public channel"},{"id":"group","label":"Private channel"}]},{"id":"channelFilter","type":"channel-selector","valueKind":"picked","storage":"native","title":"Channels","mode":"trigger","canonicalParamId":"channelFilter","dependsOn":{"all":["customBotCredential"],"any":[]},"multiple":true,"selectorKey":"slack.channels","serviceId":"slack","condition":{"field":"eventType","value":{"list":16}},"required":false,"options":{"dynamic":true}},{"id":"manualChannelFilter","type":"short-input","valueKind":"string","storage":"native","title":"Channel IDs","mode":"trigger-advanced","canonicalParamId":"channelFilter","condition":{"field":"eventType","value":{"list":16}},"required":false},{"id":"threads","type":"dropdown","valueKind":"string","storage":"native","title":"Threads","mode":"trigger","valueDefault":{"constant":"include"},"condition":{"field":"eventType","value":{"list":17}},"required":false,"options":[{"id":"include","label":"Messages and replies"},{"id":"exclude","label":"Messages only (no replies)"},{"id":"only","label":"Replies only"}]},{"id":"streamResponse","type":"switch","valueKind":"boolean","storage":"native","title":"Enable agent session","mode":"trigger","defaultValue":false,"condition":{"field":"eventType","value":{"list":17}},"required":false},{"id":"streamOutputs","type":"workflow-output-selector","valueKind":"none","storage":"native","title":"Outputs to stream","mode":"trigger","condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}}},{"id":"streamTaskTitle","type":"short-input","valueKind":"string","storage":"native","title":"Response status label","mode":"trigger","condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false},{"id":"streamTaskDisplayMode","type":"dropdown","valueKind":"string","storage":"native","title":"Task display","mode":"trigger","valueDefault":{"constant":"timeline"},"condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false,"options":[{"id":"timeline","label":"Timeline"},{"id":"plan","label":"Plan"}]},{"id":"streamIncludeThinking","type":"switch","valueKind":"boolean","storage":"native","title":"Include thinking updates","mode":"trigger","defaultValue":false,"condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false},{"id":"streamIncludeToolCalls","type":"switch","valueKind":"boolean","storage":"native","title":"Include tool calls","mode":"trigger","defaultValue":true,"condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false},{"id":"emoji","type":"short-input","valueKind":"string","storage":"native","title":"Emoji","mode":"trigger","condition":{"field":"eventType","value":["reaction_added","reaction_removed"]},"required":false},{"id":"nameContains","type":"short-input","valueKind":"string","storage":"native","title":"Name contains","mode":"trigger","condition":{"field":"eventType","value":["channel_created"]},"required":false},{"id":"interactionFilter","type":"short-input","valueKind":"string","storage":"native","title":"Action / Callback ID","mode":"trigger","condition":{"field":"eventType","value":["block_actions","view_submission"]},"required":false},{"id":"commandFilter","type":"short-input","valueKind":"string","storage":"native","title":"Command","mode":"trigger","condition":{"field":"eventType","value":["slash_command"]},"required":false},{"id":"filterBotMessages","type":"switch","valueKind":"boolean","storage":"native","title":"Ignore bot messages","mode":"trigger","defaultValue":true,"condition":{"field":"eventType","value":{"list":17}},"required":false},{"id":"includeOwnMessages","type":"switch","valueKind":"boolean","storage":"native","title":"Include own bot messages","mode":"trigger-advanced","defaultValue":false,"condition":{"field":"eventType","value":["message","app_mention","reaction_added","reaction_removed"]},"required":false},{"id":"includeFiles","type":"switch","valueKind":"boolean","storage":"native","title":"Include file attachments","mode":"trigger","defaultValue":false,"condition":{"field":"eventType","value":"message"},"required":false},{"id":"samplePayload_slack_oauth","type":"code","valueKind":"none","storage":"native","title":"Event Payload Example","mode":"trigger","readOnly":true,"language":"json","condition":{"field":"selectedTriggerId","value":"slack_oauth"}}],"outputs":{"event":{"type":"json","description":"Slack event data","properties":{"event_type":{"type":"string","description":"Type of Slack payload: an Events API event (e.g., app_mention, message), an interactivity type (e.g., block_actions), or \"slash_command\" for slash commands"},"subtype":{"type":"string","description":"Message subtype (e.g., channel_join, channel_leave, bot_message, file_share). Null for regular user messages"},"channel":{"type":"string","description":"Slack channel ID where the event occurred"},"channel_name":{"type":"string","description":"Human-readable channel name"},"channel_type":{"type":"string","description":"Type of channel (e.g., channel, group, im, mpim). Useful for distinguishing DMs from public channels"},"user":{"type":"string","description":"User ID who triggered the event"},"user_name":{"type":"string","description":"Username who triggered the event"},"bot_id":{"type":"string","description":"Bot ID if the message was sent by a bot. Null for human users"},"text":{"type":"string","description":"Message text content. For slash commands, the text after the command. For interactivity, the source message text (falls back to the triggering action value)"},"timestamp":{"type":"string","description":"Message timestamp from the triggering event"},"thread_ts":{"type":"string","description":"Parent thread timestamp (if message is in a thread)"},"streaming_message_ts":{"type":"array","description":"Message timestamps streamed during a stopped agent session","items":{"type":"string","description":"Streaming message timestamp"}},"title":{"type":"string","description":"Current agent session title"},"previous_title":{"type":"string","description":"Previous agent session title"},"tab":{"type":"string","description":"App Home tab that was opened, including messages for Agent View"},"context":{"type":"json","description":"Current Agent View context. Normalized from context on app_context_changed/app_home_opened or app_context on message.im"},"team_id":{"type":"string","description":"Slack workspace/team ID"},"user_team_id":{"type":"string","description":"Slack workspace/team ID of the user who triggered the event. Used for Slack Connect response streaming."},"enterprise_id":{"type":"string","description":"Slack Enterprise Grid organization ID"},"event_id":{"type":"string","description":"Unique event identifier"},"reaction":{"type":"string","description":"Emoji reaction name (e.g., thumbsup). Present for reaction_added/reaction_removed events"},"item_user":{"type":"string","description":"User ID of the original message author. Present for reaction_added/reaction_removed events"},"command":{"type":"string","description":"Slash command name including the leading slash (e.g., /deploy). Present for slash commands"},"action_id":{"type":"string","description":"action_id of the first interactive element triggered. Present for block_actions (button/select clicks)"},"action_value":{"type":"string","description":"Value carried by the first interactive element (button value, selected option, date, etc.). Present for block_actions"},"actions":{"type":"json","description":"Full array of interactive actions from the payload, preserving every element and its value. Present for block_actions"},"response_url":{"type":"string","description":"Temporary URL to post a response back to the originating message or command. Present for interactivity and slash commands"},"trigger_id":{"type":"string","description":"Short-lived trigger ID used to open a modal in response. Present for interactivity and slash commands"},"callback_id":{"type":"string","description":"Callback ID of the shortcut or view. Present for shortcuts and modal submissions"},"api_app_id":{"type":"string","description":"Slack app ID. Present for interactivity and slash commands"},"app_id":{"type":"string","description":"App ID of the app that produced the event (e.g. the bot that posted a message). Used to identify the app's own output"},"message_ts":{"type":"string","description":"Timestamp of the message the interaction originated from. Present for block_actions"},"view":{"type":"json","description":"Full Slack view object for modal interactions: state.values (submitted input values), private_metadata, id, callback_id, and hash. Present for view_submission/view_closed; null otherwise"},"message":{"type":"json","description":"Full source message object the interaction came from, including its blocks and text. Present for block_actions on a message; null otherwise"},"state":{"type":"json","description":"Current values of all stateful elements in the surface (state.values) at the time of a block action — e.g. inputs read on a button click. Present for block_actions; null otherwise"},"hasFiles":{"type":"boolean","description":"Whether the message has file attachments"},"files":{"type":"file[]","description":"File attachments downloaded from the message (if includeFiles is enabled and bot token is provided)"}}}}},"table_new_row":{"id":"table_new_row","provider":"table","name":"Table Trigger","subBlocks":[{"id":"tableSelector","type":"table-selector","valueKind":"resource","storage":"native","resourceKind":"table","title":"Table","mode":"trigger","canonicalParamId":"tableId","required":true},{"id":"manualTableId","type":"short-input","valueKind":"string","storage":"native","title":"Table ID","mode":"trigger-advanced","canonicalParamId":"tableId","required":true},{"id":"eventType","type":"dropdown","valueKind":"string","storage":"native","title":"Event","mode":"trigger","defaultValue":"insert","required":true,"options":[{"id":"insert","label":"Row Inserted"},{"id":"update","label":"Row Updated"},{"id":"delete","label":"Row Deleted"}]},{"id":"watchColumns","type":"dropdown","valueKind":"array","storage":"native","title":"Watch Columns","mode":"trigger","dependsOn":{"all":[],"any":["tableSelector","manualTableId"]},"multiple":true,"selectorKey":"table.columns","condition":{"field":"eventType","value":"update"},"required":false,"options":{"dynamic":true}},{"id":"includeHeaders","type":"switch","valueKind":"boolean","storage":"native","title":"Map Row Values to Headers","mode":"trigger","defaultValue":true,"required":false},{"shared":13}],"outputs":{"row":{"type":"json","description":"Row data mapped to column names (when header mapping is enabled)"},"rawRow":{"type":"json","description":"Raw row data object"},"previousRow":{"type":"json","description":"Previous row data before an update or deletion (null for inserts)"},"changedColumns":{"type":"json","description":"List of column names that changed (empty for inserts and deletes)"},"rowId":{"type":"string","description":"The unique row ID"},"headers":{"type":"json","description":"Column names from the table schema"},"tableId":{"type":"string","description":"The table ID"},"tableName":{"type":"string","description":"The table name"},"timestamp":{"type":"string","description":"Event timestamp in ISO format"}}}},"subBlocks":[{"id":"vertexCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Google Cloud Account","mode":"basic","canonicalParamId":"vertexCredential","serviceId":"vertex-ai","condition":{"opaque":true},"required":true},{"id":"vertexManualCredential","type":"short-input","valueKind":"string","storage":"native","title":"Google Cloud Account","mode":"advanced","canonicalParamId":"vertexCredential","condition":{"opaque":true},"required":true},{"id":"apiKey","type":"short-input","valueKind":"string","storage":"native","title":"API Key","password":true,"condition":{"opaque":true},"required":true},{"id":"azureEndpoint","type":"short-input","valueKind":"string","storage":"native","title":"Azure Endpoint","password":true,"condition":{"opaque":true}},{"id":"azureApiVersion","type":"short-input","valueKind":"string","storage":"native","title":"Azure API Version","condition":{"opaque":true}},{"id":"vertexProject","type":"short-input","valueKind":"string","storage":"native","title":"Vertex AI Project","password":true,"condition":{"opaque":true},"required":true},{"id":"vertexLocation","type":"short-input","valueKind":"string","storage":"native","title":"Vertex AI Location","condition":{"opaque":true},"required":true},{"id":"bedrockAuthMode","type":"dropdown","valueKind":"string","storage":"native","title":"AWS Authentication","valueDefault":{"constant":"access_keys"},"condition":{"opaque":true},"options":[{"id":"access_keys"},{"id":"credential"}]},{"id":"bedrockCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"AWS Credential","mode":"basic","canonicalParamId":"bedrockCredential","serviceId":"aws","condition":{"opaque":true},"required":true},{"id":"bedrockManualCredential","type":"short-input","valueKind":"string","storage":"native","title":"AWS Credential","mode":"advanced","canonicalParamId":"bedrockCredential","condition":{"opaque":true},"required":true},{"id":"bedrockAccessKeyId","type":"short-input","valueKind":"string","storage":"native","title":"AWS Access Key ID","password":true,"condition":{"opaque":true},"required":true},{"id":"bedrockSecretKey","type":"short-input","valueKind":"string","storage":"native","title":"AWS Secret Access Key","password":true,"condition":{"opaque":true},"required":true},{"id":"bedrockRegion","type":"short-input","valueKind":"string","storage":"native","title":"AWS Region","condition":{"opaque":true}},{"id":"triggerInstructions","type":"text","valueKind":"none","storage":"native","title":"Setup Instructions","mode":"trigger"}],"lists":[["jev-latest","jev-1.13.0","jev-preview"],["deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025","jev-latest","jev-1.13.0","jev-preview"],["jev-latest","jev-1.13.0","jev-preview","deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025"],["conversation","sliding_window","sliding_window_tokens"],["send_gmail","draft_gmail","edit_draft_gmail"],["add_label_gmail","remove_label_gmail"],["update_label_gmail","delete_label_gmail"],["create_label_gmail","update_label_gmail"],["list_canvases","list_scheduled_messages","set_agent_suggested_prompts","set_agent_session_status","rename_agent_session","create_list","rename_list","share_list","list_items","get_list_item","create_list_item","update_list_items","delete_list_item"],["set_agent_suggested_prompts","set_agent_session_status","rename_agent_session"],["set_agent_session_status","rename_agent_session"],["create_list","rename_list","share_list","list_items","get_list_item","create_list_item","update_list_items","delete_list_item"],["create_list","rename_list"],["revoke_list_access","start_list_export","get_list_export","delete_list_items","join_conversation","lookup_user_by_email","get_user_profile","set_user_presence","pin_message","unpin_message","list_pins","add_bookmark","edit_bookmark","list_bookmarks","remove_bookmark","create_user_group","update_user_group","enable_user_group","disable_user_group","list_user_groups","list_user_group_members","update_user_group_members","get_dnd_info","get_team_dnd_info","list_emoji","get_team_info","get_team_profile","unfurl_links"],["share_canvas","revoke_canvas_access","leave_conversation","kick_conversation","unarchive_conversation","close_conversation","mark_conversation_read","open_conversation","list_user_conversations","get_file_info","list_files","delete_file","get_reactions","list_reactions"],["query_rows","update_rows_by_filter","delete_rows_by_filter"],["message","app_mention","reaction_added","reaction_removed","message_edited","message_deleted","file_shared","member_joined_channel","member_left_channel","channel_archive","channel_rename","pin_added","pin_removed"],["message","app_mention"]],"hash":"7fae8ed186562e120fea4834565fa945b01fd6d7c1db5793f5aea25c3cc89d2c"} diff --git a/packages/workflow-code/src/print/__fixtures__/real-catalog.ts b/packages/workflow-code/src/print/__fixtures__/real-catalog.ts new file mode 100644 index 00000000000..7d12187bef7 --- /dev/null +++ b/packages/workflow-code/src/print/__fixtures__/real-catalog.ts @@ -0,0 +1,19 @@ +/** + * The real block catalog the printer goldens run against: the slice of `buildBlockCatalog` (the + * registry projection) their cases use, checked in as `real-catalog.json` because this package + * cannot import the registry. `apps/sim/lib/workflows/code/golden-catalog.test.ts` rebuilds it from + * the live registry and fails when it drifts. The hand-made `catalog.ts` stays for unit tests. + */ + +import type { BlockCatalog } from '../../catalog/types' +import snapshot from './real-catalog.json' + +/** JSON imports widen literal unions (`storage: string`), so the snapshot is checked, then typed. */ +function asCatalog(value: object): BlockCatalog { + if (!('catalogVersion' in value) || value.catalogVersion !== 1 || !('blocks' in value)) { + throw new Error('real-catalog.json is not a block catalog') + } + return value as BlockCatalog +} + +export const realCatalog: BlockCatalog = asCatalog(snapshot) diff --git a/packages/workflow-code/src/print/__golden__/agent-tools.txt b/packages/workflow-code/src/print/__golden__/agent-tools.txt index 5efd946b10f..ec4e2d17e9e 100644 --- a/packages/workflow-code/src/print/__golden__/agent-tools.txt +++ b/packages/workflow-code/src/print/__golden__/agent-tools.txt @@ -1,5 +1,5 @@ // @sim-sdk 1 -import { agent, picked, raw, slack, t, trigger, workflow } from '@sim/workflow-sdk' +import { agent, raw, slack, t, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) @@ -7,7 +7,7 @@ export default workflow('Fixture', {}, () => { model: 'claude-sonnet-5-5', tools: [ slack.tool.sendMessage( - { channel: picked('C0OPS'), text: t`Approve: ${start.input}` }, + { channel: 'C0OPS', text: t`Approve: ${start.input}` }, { usageControl: 'auto', modes: { channel: 'basic' } } ), raw({ diff --git a/packages/workflow-code/src/print/__golden__/block-meta.txt b/packages/workflow-code/src/print/__golden__/block-meta.txt index 2c89a3d78e2..e463034625c 100644 --- a/packages/workflow-code/src/print/__golden__/block-meta.txt +++ b/packages/workflow-code/src/print/__golden__/block-meta.txt @@ -1,9 +1,9 @@ // @sim-sdk 1 -import { api, response, trigger, workflow } from '@sim/workflow-sdk' +import { api, response, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) - const flaky = api('Flaky', { url: 'https://b.test' }) + const flaky = api('Flaky', { url: 'https://b.test', method: todo() }) const fallback = response('Fallback', {}) const guarded = api( 'Guarded', @@ -14,7 +14,6 @@ export default workflow('Fixture', {}, () => { advancedMode: true, errorPort: true, retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 }, - $unknown: { canvasNote: 'x', width: 300 }, } ) diff --git a/packages/workflow-code/src/print/__golden__/branches-null-rows.txt b/packages/workflow-code/src/print/__golden__/branches-null-rows.txt index 0a22f3a640d..5d4bcb02943 100644 --- a/packages/workflow-code/src/print/__golden__/branches-null-rows.txt +++ b/packages/workflow-code/src/print/__golden__/branches-null-rows.txt @@ -5,7 +5,7 @@ export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) const gate = condition('Gate', {}) const pick = router('Pick', { context: 'ctx', model: 'm', routes: {} }) - const yes = response('Yes', { dataMode: 'structured' }) + const yes = response('Yes', {}) start.to(gate) gate.if.to(pick) diff --git a/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt b/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt index 4d2e5503c1b..280a3a43361 100644 --- a/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt +++ b/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt @@ -1,13 +1,19 @@ // @sim-sdk 1 -import { api, trigger, workflow } from '@sim/workflow-sdk' +import { api, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) - const archiveRawPayload = api('Archive raw payload', { url: 'https://x.test' }) - const enrichCompanyProfile = api('Enrich company profile', { url: 'https://x.test' }) - const enrichContactDetails = api('Enrich contact details', { url: 'https://x.test' }) - const notifySalesChannel = api('Notify sales channel', { url: 'https://x.test' }) - const scoreLeadQuality = api('Score lead quality', { url: 'https://x.test' }) + const archiveRawPayload = api('Archive raw payload', { url: 'https://x.test', method: todo() }) + const enrichCompanyProfile = api('Enrich company profile', { + url: 'https://x.test', + method: todo(), + }) + const enrichContactDetails = api('Enrich contact details', { + url: 'https://x.test', + method: todo(), + }) + const notifySalesChannel = api('Notify sales channel', { url: 'https://x.test', method: todo() }) + const scoreLeadQuality = api('Score lead quality', { url: 'https://x.test', method: todo() }) start.to( archiveRawPayload, diff --git a/packages/workflow-code/src/print/__golden__/function-files.txt b/packages/workflow-code/src/print/__golden__/function-files.txt index 4a9183d2cca..54f90d8a0a8 100644 --- a/packages/workflow-code/src/print/__golden__/function-files.txt +++ b/packages/workflow-code/src/print/__golden__/function-files.txt @@ -1,11 +1,11 @@ // @sim-sdk 1 -import { file, fn, trigger, workflow } from '@sim/workflow-sdk' +import { file, fn, raw, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) - const jsCode = fn('Js code', { language: 'javascript', code: file('./functions/js-code.js') }) + const jsCode = fn('Js code', { code: file('./functions/js-code.js') }) const pyCode = fn('Py code', { language: 'python', code: file('./functions/py-code.py') }) - const shCode = fn('Sh code', { language: 'shell', code: file('./functions/sh-code.sh') }) + const shCode = fn('Sh code', { language: raw('shell'), code: file('./functions/sh-code.sh') }) start.to(jsCode) jsCode.to(pyCode) diff --git a/packages/workflow-code/src/print/__golden__/function-languages.txt b/packages/workflow-code/src/print/__golden__/function-languages.txt index 3b7e2c22a8a..a744b478c54 100644 --- a/packages/workflow-code/src/print/__golden__/function-languages.txt +++ b/packages/workflow-code/src/print/__golden__/function-languages.txt @@ -1,10 +1,9 @@ // @sim-sdk 1 -import { env, fn, js, py, sh, trigger, workflow } from '@sim/workflow-sdk' +import { env, fn, js, py, raw, sh, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) const jsCode = fn('Js code', { - language: 'javascript', code: js`const total = ${start.total} + ${env.TAX_RATE} // keep \`ticks\` and \${braces} return total`, @@ -15,7 +14,7 @@ return total`, return ${start.total} `, }) - const shCode = fn('Sh code', { language: 'shell', code: sh`echo "${env.HOME_DIR}"` }) + const shCode = fn('Sh code', { language: raw('shell'), code: sh`echo "${env.HOME_DIR}"` }) start.to(jsCode) jsCode.to(pyCode) diff --git a/packages/workflow-code/src/print/__golden__/generic-block-legacy-operation.txt b/packages/workflow-code/src/print/__golden__/generic-block-legacy-operation.txt index 02c702828fd..b51b3bb51e1 100644 --- a/packages/workflow-code/src/print/__golden__/generic-block-legacy-operation.txt +++ b/packages/workflow-code/src/print/__golden__/generic-block-legacy-operation.txt @@ -1,10 +1,11 @@ // @sim-sdk 1 -import { block, raw, trigger, workflow } from '@sim/workflow-sdk' +import { raw, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) - const oldTableOp = block('table', 'Old table op', { - operation: raw('delete_everything'), - limit: '10', - }) + const oldTableOp = trigger.table.newRow( + 'Old table op', + { operation: raw('delete_everything') }, + { triggerMode: false } + ) }) diff --git a/packages/workflow-code/src/print/__golden__/generic-block-unknown-type.txt b/packages/workflow-code/src/print/__golden__/generic-block-unknown-type.txt index ed3f5fe508c..7de5ee0ab51 100644 --- a/packages/workflow-code/src/print/__golden__/generic-block-unknown-type.txt +++ b/packages/workflow-code/src/print/__golden__/generic-block-unknown-type.txt @@ -7,6 +7,6 @@ export default workflow('Fixture', {}, () => { 'custom_block_acme', 'Mystery', { alpha: t`a ${start.input}`, zeta: 1 }, - { triggerMode: true, modes: { someCid: 'advanced' } } + { triggerMode: true } ) }) diff --git a/packages/workflow-code/src/print/__golden__/identifier-collisions.txt b/packages/workflow-code/src/print/__golden__/identifier-collisions.txt index 7c8dfb1a9c8..7b3a04774e4 100644 --- a/packages/workflow-code/src/print/__golden__/identifier-collisions.txt +++ b/packages/workflow-code/src/print/__golden__/identifier-collisions.txt @@ -1,16 +1,16 @@ // @sim-sdk 1 -import { api, t, trigger, workflow } from '@sim/workflow-sdk' +import { api, t, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) - const _1stStep = api('1st step', { url: 'https://g.test' }) - const badHint = api('Bad hint', { url: 'https://j.test' }) - const default2 = api('Default', { url: 'https://a.test' }) - const myHinted = api('Hinted', { url: t`https://i.test ${default2.data}` }) - const sendEmail = api('send-email', { url: 'https://f.test' }) - const sendEmail2 = api('Send Email', { url: 'https://e.test' }) - const slack2 = api('Slack', { url: 'https://d.test' }) - const table2 = api('Table', { url: 'https://b.test' }) - const workflow2 = api('Workflow', { url: 'https://c.test' }) - const block2 = api('日本語', { url: 'https://h.test' }) + const _1stStep = api('1st step', { url: 'https://g.test', method: todo() }) + const badHint = api('Bad hint', { url: 'https://j.test', method: todo() }) + const default2 = api('Default', { url: 'https://a.test', method: todo() }) + const myHinted = api('Hinted', { url: t`https://i.test ${default2.data}`, method: todo() }) + const sendEmail = api('send-email', { url: 'https://f.test', method: todo() }) + const sendEmail2 = api('Send Email', { url: 'https://e.test', method: todo() }) + const slack2 = api('Slack', { url: 'https://d.test', method: todo() }) + const table2 = api('Table', { url: 'https://b.test', method: todo() }) + const workflow2 = api('Workflow', { url: 'https://c.test', method: todo() }) + const block2 = api('日本語', { url: 'https://h.test', method: todo() }) }) diff --git a/packages/workflow-code/src/print/__golden__/inactive-values.txt b/packages/workflow-code/src/print/__golden__/inactive-values.txt index 699299f8285..c1949155f02 100644 --- a/packages/workflow-code/src/print/__golden__/inactive-values.txt +++ b/packages/workflow-code/src/print/__golden__/inactive-values.txt @@ -3,11 +3,7 @@ import { agent, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) - const remember = agent( - 'Remember', - { model: 'm', memoryType: 'none' }, - { inactive: { conversationId: 'stale-id', legacyField: 'kept' } } - ) + const remember = agent('Remember', { model: 'm', memoryType: 'none' }) start.to(remember) }) diff --git a/packages/workflow-code/src/print/__golden__/inactive-values.verbose.txt b/packages/workflow-code/src/print/__golden__/inactive-values.verbose.txt new file mode 100644 index 00000000000..699299f8285 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/inactive-values.verbose.txt @@ -0,0 +1,13 @@ +// @sim-sdk 1 +import { agent, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const remember = agent( + 'Remember', + { model: 'm', memoryType: 'none' }, + { inactive: { conversationId: 'stale-id', legacyField: 'kept' } } + ) + + start.to(remember) +}) diff --git a/packages/workflow-code/src/print/__golden__/json-code-fields.txt b/packages/workflow-code/src/print/__golden__/json-code-fields.txt index 05533929a51..8a18392a67d 100644 --- a/packages/workflow-code/src/print/__golden__/json-code-fields.txt +++ b/packages/workflow-code/src/print/__golden__/json-code-fields.txt @@ -1,16 +1,23 @@ // @sim-sdk 1 -import { agent, api, json, trigger, workflow } from '@sim/workflow-sdk' +import { agent, api, t, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) - const compact = agent('Compact', { model: 'm', responseFormat: json`{"name":"ticket"}` }) + const compact = agent('Compact', { model: 'm', responseFormat: '{"name":"ticket"}' }) const refsInJson = api('Refs in json', { url: 'https://x.test', - body: json`{ + method: todo(), + body: t`{ "q": ${start.input} }`, }) - const sugared = agent('Sugared', { model: 'm', responseFormat: { name: 'ticket', strict: true } }) + const sugared = agent('Sugared', { + model: 'm', + responseFormat: `{ + "name": "ticket", + "strict": true +}`, + }) start.to(sugared) }) diff --git a/packages/workflow-code/src/print/__golden__/layout-widths.txt b/packages/workflow-code/src/print/__golden__/layout-widths.txt index 6e0c2d02d92..0c07e8ca0ae 100644 --- a/packages/workflow-code/src/print/__golden__/layout-widths.txt +++ b/packages/workflow-code/src/print/__golden__/layout-widths.txt @@ -4,11 +4,11 @@ import { agent, api, env, slack, t, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) const numbers = agent('Numbers', { - model: 'm', messages: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, -0.5, ], + model: 'm', temperature: 1e21, }) const shortKey = slack.sendMessage('Short key', { diff --git a/packages/workflow-code/src/print/__golden__/legacy-dropdown-and-todo.txt b/packages/workflow-code/src/print/__golden__/legacy-dropdown-and-todo.txt index 37a0374e251..e8f41cd91bd 100644 --- a/packages/workflow-code/src/print/__golden__/legacy-dropdown-and-todo.txt +++ b/packages/workflow-code/src/print/__golden__/legacy-dropdown-and-todo.txt @@ -1,8 +1,8 @@ // @sim-sdk 1 -import { agent, api, raw, todo, trigger, workflow } from '@sim/workflow-sdk' +import { agent, api, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) const drafted = agent('Drafted', { model: todo() }) - const legacyMethod = api('Legacy method', { url: todo(), method: raw('PATCH') }) + const legacyMethod = api('Legacy method', { url: todo(), method: 'PATCH' }) }) diff --git a/packages/workflow-code/src/print/__golden__/lock-order.txt b/packages/workflow-code/src/print/__golden__/lock-order.txt index a3abccbb905..86d34a1688b 100644 --- a/packages/workflow-code/src/print/__golden__/lock-order.txt +++ b/packages/workflow-code/src/print/__golden__/lock-order.txt @@ -1,11 +1,11 @@ // @sim-sdk 1 -import { api, t, trigger, workflow } from '@sim/workflow-sdk' +import { api, t, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) - const zeta = api('Zeta', { url: 'https://z.test' }) - const alpha = api('Alpha', { url: 'https://a.test' }) - const mid = api('Mid', { url: t`https://m.test ${alpha.data}` }) + const zeta = api('Zeta', { url: 'https://z.test', method: todo() }) + const alpha = api('Alpha', { url: 'https://a.test', method: todo() }) + const mid = api('Mid', { url: t`https://m.test ${alpha.data}`, method: todo() }) start.to(zeta) }) diff --git a/packages/workflow-code/src/print/__golden__/loop-foreach.txt b/packages/workflow-code/src/print/__golden__/loop-foreach.txt index 470919d42e1..89e62222f37 100644 --- a/packages/workflow-code/src/print/__golden__/loop-foreach.txt +++ b/packages/workflow-code/src/print/__golden__/loop-foreach.txt @@ -3,27 +3,19 @@ import { agent, api, fn, js, loop, t, trigger, workflow } from '@sim/workflow-sd export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: { leads: 'array' } }) - const eachLead = loop.forEach( - 'Each lead', - { collection: start.leads }, - (p) => { - const lookup = api('Lookup', { - url: t`https://crm.example.com/c/${p.currentItem.email}?i=${p.index}`, - method: 'GET', - }) - const score = fn('Score', { - language: 'javascript', - code: js`return ${lookup.data}.score * 2`, - }) + const eachLead = loop.forEach('Each lead', { collection: start.leads }, (p) => { + const lookup = api('Lookup', { + url: t`https://crm.example.com/c/${p.currentItem.email}?i=${p.index}`, + method: 'GET', + }) + const score = fn('Score', { code: js`return ${lookup.data}.score * 2` }) - p.to(lookup) - lookup.to(score) - }, - { inactive: { iterations: 5 } } - ) + p.to(lookup) + lookup.to(score) + }) const summary = agent('Summary', { + messages: [{ role: 'system', content: t`Results: ${eachLead.results} and ` }], model: 'm', - systemPrompt: t`Results: ${eachLead.results} and `, }) start.to(eachLead) diff --git a/packages/workflow-code/src/print/__golden__/loop-foreach.verbose.txt b/packages/workflow-code/src/print/__golden__/loop-foreach.verbose.txt new file mode 100644 index 00000000000..b10da29c62c --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/loop-foreach.verbose.txt @@ -0,0 +1,28 @@ +// @sim-sdk 1 +import { agent, api, fn, js, loop, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: { leads: 'array' } }) + const eachLead = loop.forEach( + 'Each lead', + { collection: start.leads }, + (p) => { + const lookup = api('Lookup', { + url: t`https://crm.example.com/c/${p.currentItem.email}?i=${p.index}`, + method: 'GET', + }) + const score = fn('Score', { code: js`return ${lookup.data}.score * 2` }) + + p.to(lookup) + lookup.to(score) + }, + { inactive: { iterations: 5 } } + ) + const summary = agent('Summary', { + messages: [{ role: 'system', content: t`Results: ${eachLead.results} and ` }], + model: 'm', + }) + + start.to(eachLead) + eachLead.to(summary) +}) diff --git a/packages/workflow-code/src/print/__golden__/nested-subflows.txt b/packages/workflow-code/src/print/__golden__/nested-subflows.txt index 7e50e4a36be..312f8dbe2d7 100644 --- a/packages/workflow-code/src/print/__golden__/nested-subflows.txt +++ b/packages/workflow-code/src/print/__golden__/nested-subflows.txt @@ -6,8 +6,13 @@ export default workflow('Fixture', {}, () => { const outer = loop.for('Outer', { count: 3 }, (p) => { const fan = parallel.collection('Fan', { collection: start.rows, batchSize: 5 }, (p2) => { const work = agent('Work', { + messages: [ + { + role: 'system', + content: t`loop ${p.index} parallel ${p2.currentItem} named ${outer.index} fan ${fan.index}`, + }, + ], model: 'm', - systemPrompt: t`loop ${p.index} parallel ${p2.currentItem} named ${outer.index} fan ${fan.index}`, }) p2.to(work) @@ -15,19 +20,14 @@ export default workflow('Fixture', {}, () => { p.to(fan) }) - const sibling = loop.while( - 'Sibling', - { condition: js` < 3` }, - (p) => { - const insideSibling = agent('Inside sibling', { - model: 'm', - systemPrompt: 'cannot see ', - }) + const sibling = loop.while('Sibling', { condition: js` < 3` }, (p) => { + const insideSibling = agent('Inside sibling', { + messages: [{ role: 'system', content: 'cannot see ' }], + model: 'm', + }) - p.to(insideSibling) - }, - { inactive: { iterations: 5, doWhileCondition: js`` } } - ) + p.to(insideSibling) + }) start.to(outer) outer.to(sibling) diff --git a/packages/workflow-code/src/print/__golden__/nested-subflows.verbose.txt b/packages/workflow-code/src/print/__golden__/nested-subflows.verbose.txt new file mode 100644 index 00000000000..49ec4ca8109 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/nested-subflows.verbose.txt @@ -0,0 +1,39 @@ +// @sim-sdk 1 +import { agent, js, loop, parallel, t, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const outer = loop.for('Outer', { count: 3 }, (p) => { + const fan = parallel.collection('Fan', { collection: start.rows, batchSize: 5 }, (p2) => { + const work = agent('Work', { + messages: [ + { + role: 'system', + content: t`loop ${p.index} parallel ${p2.currentItem} named ${outer.index} fan ${fan.index}`, + }, + ], + model: 'm', + }) + + p2.to(work) + }) + + p.to(fan) + }) + const sibling = loop.while( + 'Sibling', + { condition: js` < 3` }, + (p) => { + const insideSibling = agent('Inside sibling', { + messages: [{ role: 'system', content: 'cannot see ' }], + model: 'm', + }) + + p.to(insideSibling) + }, + { inactive: { iterations: 5, doWhileCondition: js`` } } + ) + + start.to(outer) + outer.to(sibling) +}) diff --git a/packages/workflow-code/src/print/__golden__/pair-modes.txt b/packages/workflow-code/src/print/__golden__/pair-modes.txt index cc3634cd875..18e5518e88f 100644 --- a/packages/workflow-code/src/print/__golden__/pair-modes.txt +++ b/packages/workflow-code/src/print/__golden__/pair-modes.txt @@ -1,23 +1,14 @@ // @sim-sdk 1 -import { picked, slack, trigger, workflow } from '@sim/workflow-sdk' +import { slack, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) - const advancedEmpty = slack.sendMessage( - 'Advanced empty', - { text: 'd' }, - { modes: { channel: 'advanced' } } - ) - const basicHoldingText = slack.sendMessage( - 'Basic holding text', - { channel: start.channel, text: 'c' }, - { modes: { channel: 'basic' } } - ) - const bothMembers = slack.sendMessage( - 'Both members', - { channel: 'C0NEW', text: 'e' }, - { inactive: { channel: picked('C0OLD') } } - ) + const advancedEmpty = slack.sendMessage('Advanced empty', { text: 'd' }) + const basicHoldingText = slack.sendMessage('Basic holding text', { + channel: start.channel, + text: 'c', + }) + const bothMembers = slack.sendMessage('Both members', { channel: 'C0NEW', text: 'e' }) const manualAdvanced = slack.sendMessage('Manual advanced', { channel: start.channel, text: 'b' }) - const pickedBasic = slack.sendMessage('Picked basic', { channel: picked('C0ONE'), text: 'a' }) + const pickedBasic = slack.sendMessage('Picked basic', { channel: 'C0ONE', text: 'a' }) }) diff --git a/packages/workflow-code/src/print/__golden__/pair-modes.verbose.txt b/packages/workflow-code/src/print/__golden__/pair-modes.verbose.txt new file mode 100644 index 00000000000..15ea53875ec --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/pair-modes.verbose.txt @@ -0,0 +1,39 @@ +// @sim-sdk 1 +import { picked, slack, trigger, workflow } from '@sim/workflow-sdk' + +export default workflow('Fixture', {}, () => { + const start = trigger.start('Start', { inputFormat: [] }) + const advancedEmpty = slack.sendMessage( + 'Advanced empty', + { text: 'd' }, + { + modes: { channel: 'advanced' }, + inactive: { streamTaskDisplayMode: 'timeline', threads: 'include' }, + } + ) + const basicHoldingText = slack.sendMessage( + 'Basic holding text', + { channel: start.channel, text: 'c' }, + { + modes: { channel: 'basic' }, + inactive: { streamTaskDisplayMode: 'timeline', threads: 'include' }, + } + ) + const bothMembers = slack.sendMessage( + 'Both members', + { channel: 'C0NEW', text: 'e' }, + { + inactive: { channel: picked('C0OLD'), streamTaskDisplayMode: 'timeline', threads: 'include' }, + } + ) + const manualAdvanced = slack.sendMessage( + 'Manual advanced', + { channel: start.channel, text: 'b' }, + { inactive: { streamTaskDisplayMode: 'timeline', threads: 'include' } } + ) + const pickedBasic = slack.sendMessage( + 'Picked basic', + { channel: picked('C0ONE'), text: 'a' }, + { inactive: { streamTaskDisplayMode: 'timeline', threads: 'include' } } + ) +}) diff --git a/packages/workflow-code/src/print/__golden__/parallel-untyped.txt b/packages/workflow-code/src/print/__golden__/parallel-untyped.txt index 7169309b471..e6aafee25ea 100644 --- a/packages/workflow-code/src/print/__golden__/parallel-untyped.txt +++ b/packages/workflow-code/src/print/__golden__/parallel-untyped.txt @@ -1,10 +1,10 @@ // @sim-sdk 1 -import { api, parallel, t, trigger, workflow } from '@sim/workflow-sdk' +import { api, parallel, t, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) const batch = parallel('Batch', { count: 4 }, (p) => { - const ping = api('Ping', { url: t`https://x.test/${p.index}` }) + const ping = api('Ping', { url: t`https://x.test/${p.index}`, method: todo() }) p.to(ping) }) diff --git a/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt b/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt index f25afeaff73..49525e70ab5 100644 --- a/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt +++ b/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt @@ -1,11 +1,11 @@ // @sim-sdk 1 -import { api, condition, edge, js, trigger, workflow } from '@sim/workflow-sdk' +import { api, condition, edge, js, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) const gate = condition('Gate', { if: js`true`, else: true }) - const a = api('A', { url: 'https://a.test' }) - const b = api('B', { url: 'https://b.test' }) + const a = api('A', { url: 'https://a.test', method: todo() }) + const b = api('B', { url: 'https://b.test', method: todo() }) start.to(gate) edge(gate, 'source', a) diff --git a/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt b/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt index f5dd7ee64d8..b63ad1fe0c6 100644 --- a/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt +++ b/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt @@ -3,9 +3,18 @@ import { agent, t, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) - const self = agent('Self', { model: 'm', systemPrompt: 'Me: ' }) - const alpha = agent('Alpha', { model: 'm', systemPrompt: 'See ' }) - const beta = agent('Beta', { model: 'm', systemPrompt: t`See ${alpha.content}` }) + const self = agent('Self', { + messages: [{ role: 'system', content: 'Me: ' }], + model: 'm', + }) + const alpha = agent('Alpha', { + messages: [{ role: 'system', content: 'See ' }], + model: 'm', + }) + const beta = agent('Beta', { + messages: [{ role: 'system', content: t`See ${alpha.content}` }], + model: 'm', + }) start.to(alpha) alpha.to(beta) diff --git a/packages/workflow-code/src/print/__golden__/resource-nodes.txt b/packages/workflow-code/src/print/__golden__/resource-nodes.txt index 11b7419ea8d..3743daf3a87 100644 --- a/packages/workflow-code/src/print/__golden__/resource-nodes.txt +++ b/packages/workflow-code/src/print/__golden__/resource-nodes.txt @@ -1,5 +1,5 @@ // @sim-sdk 1 -import { kb, raw, setVariables, t, table, trigger, workflow } from '@sim/workflow-sdk' +import { raw, setVariables, t, table, trigger, workflow } from '@sim/workflow-sdk' export default workflow( 'Fixture', @@ -11,22 +11,16 @@ export default workflow( }, ({ vars }) => { const start = trigger.start('Start', { inputFormat: [] }) - const query = table.queryRows( - 'Query', - { - tableId: raw({ $sim: 'unresolved', kind: 'table', id: 'tbl_deleted' }), - data: raw({ $sim: 'literal', value: { $sim: 'user data', n: 1 } }), - limit: raw({ - $sim: 'csv', - items: [ - { $sim: 'resource', kind: 'knowledge-document', key: 'a' }, - { $sim: 'unresolved', kind: 'knowledge-document', id: 'doc_9' }, - ], - }), - knowledgeBases: [kb('docs'), kb('faq')], - }, - { modes: { tableId: 'basic' } } - ) + const query = table.queryRows('Query', { + tableId: raw({ $sim: 'unresolved', kind: 'table', id: 'tbl_deleted' }), + limit: raw({ + $sim: 'csv', + items: [ + { $sim: 'resource', kind: 'knowledge-document', key: 'a' }, + { $sim: 'unresolved', kind: 'knowledge-document', id: 'doc_9' }, + ], + }), + }) const setVars = setVariables('Set vars', { variables: [ { variable: vars.retries, value: t`${vars.retries}` }, diff --git a/packages/workflow-code/src/print/__golden__/string-escapes.txt b/packages/workflow-code/src/print/__golden__/string-escapes.txt index e53b30a5d05..7ca97ac1861 100644 --- a/packages/workflow-code/src/print/__golden__/string-escapes.txt +++ b/packages/workflow-code/src/print/__golden__/string-escapes.txt @@ -3,10 +3,17 @@ import { agent, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) - const escapes = agent('Escapes', { - model: "it's a \"model\" with 'quotes'", - messages: [{ role: 'user', content: "single 'quote' only" }], - systemPrompt: `back\\slash \`tick\` \${notInterp} tab here\r + const escapes = agent( + 'Escapes', + { + messages: [{ role: 'user', content: "single 'quote' only" }], + model: "it's a \"model\" with 'quotes'", + }, + { + inactive: { + systemPrompt: `back\\slash \`tick\` \${notInterp} tab here\r crlf line\u2028ls\u2029ps \uD800 lone 漢字 🎉`, - }) + }, + } + ) }) diff --git a/packages/workflow-code/src/print/__golden__/support-triage.txt b/packages/workflow-code/src/print/__golden__/support-triage.txt index 32ee86211ea..197c689be36 100644 --- a/packages/workflow-code/src/print/__golden__/support-triage.txt +++ b/packages/workflow-code/src/print/__golden__/support-triage.txt @@ -5,8 +5,6 @@ import { condition, env, js, - json, - picked, response, slack, t, @@ -28,7 +26,6 @@ export default workflow( inputFormat: { subject: 'string', body: 'string' }, }) const classify = agent('Classify', { - model: 'claude-sonnet-5-5', messages: [ { role: 'system', content: 'Classify support tickets.' }, { @@ -38,6 +35,7 @@ export default workflow( ${ticketIn.body}`, }, ], + model: 'claude-sonnet-5-5', temperature: 0.2, }) const byCategory = condition('By category', { @@ -47,21 +45,20 @@ ${ticketIn.body}`, }) const logTicket = table.insertRow('Log ticket', { tableId: table('tickets'), - data: json`{ + data: t`{ "subject": "${ticketIn.subject}" }`, }) const notify = slack.sendMessage( 'Notify', { - authMethod: 'oauth', - credential: binding('support-slack'), - channel: picked('C0SUPPORT'), + oauthCredential: binding('support-slack'), + channel: 'C0SUPPORT', text: t`New ${classify.content} ticket: ${ticketIn.subject}`, }, { errorPort: true } ) - const reply = response('Reply', { dataMode: 'structured', builderData: { ok: true } }) + const reply = response('Reply', { builderData: { ok: true } }) ticketIn.to(classify) classify.to(byCategory) diff --git a/packages/workflow-code/src/print/__golden__/support-triage.verbose.txt b/packages/workflow-code/src/print/__golden__/support-triage.verbose.txt new file mode 100644 index 00000000000..981f466f0c6 --- /dev/null +++ b/packages/workflow-code/src/print/__golden__/support-triage.verbose.txt @@ -0,0 +1,73 @@ +// @sim-sdk 1 +import { + agent, + binding, + condition, + env, + js, + picked, + response, + slack, + t, + table, + trigger, + workflow, +} from '@sim/workflow-sdk' + +export default workflow( + 'Support triage', + { + description: 'Classifies inbound tickets and routes them.', + variables: { escalations: { type: 'number', value: 0 } }, + }, + ({ vars }) => { + const ticketIn = trigger.webhook('Ticket in', { + requireAuth: true, + token: env.TICKETS_WEBHOOK_TOKEN, + inputFormat: { subject: 'string', body: 'string' }, + }) + const classify = agent('Classify', { + messages: [ + { role: 'system', content: 'Classify support tickets.' }, + { + role: 'user', + content: t`${ticketIn.subject} + +${ticketIn.body}`, + }, + ], + model: 'claude-sonnet-5-5', + temperature: 0.2, + }) + const byCategory = condition('By category', { + billing: js`${classify.content} === 'billing'`, + urgent: js`${classify.content}.includes("urgent") && ${vars.escalations} < 3`, + else: true, + }) + const logTicket = table.insertRow('Log ticket', { + tableId: table('tickets'), + data: t`{ + "subject": "${ticketIn.subject}" +}`, + }) + const notify = slack.sendMessage( + 'Notify', + { + oauthCredential: binding('support-slack'), + channel: picked('C0SUPPORT'), + text: t`New ${classify.content} ticket: ${ticketIn.subject}`, + }, + { errorPort: true, inactive: { streamTaskDisplayMode: 'timeline', threads: 'include' } } + ) + const reply = response('Reply', { builderData: { ok: true } }) + + ticketIn.to(classify) + classify.to(byCategory) + byCategory.billing.to(logTicket) + byCategory.urgent.to(notify) + byCategory.else.to(reply) + logTicket.to(notify) + logTicket.onError(notify) + notify.to(reply) + } +) diff --git a/packages/workflow-code/src/print/__golden__/templates-and-paths.txt b/packages/workflow-code/src/print/__golden__/templates-and-paths.txt index 618e0bc5603..0fd7057b97e 100644 --- a/packages/workflow-code/src/print/__golden__/templates-and-paths.txt +++ b/packages/workflow-code/src/print/__golden__/templates-and-paths.txt @@ -3,19 +3,25 @@ import { agent, t, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) - const writer = agent('Writer', { - model: 'gpt-5.5', - messages: [ - { - role: 'user', - content: t`Items: ${start.items[0].id} / ${start.items['0']} / ${start['some-field']} / ${start.a.b} + const writer = agent( + 'Writer', + { + messages: [ + { + role: 'user', + content: t`Items: ${start.items[0].id} / ${start.items['0']} / ${start['some-field']} / ${start.a.b} next`, - }, - ], - systemPrompt: `Line one + }, + ], + model: 'gpt-5.5', + }, + { + inactive: { + systemPrompt: `Line one Line two without refs`, - conversationId: start.conversationId, - }) + }, + } + ) start.to(writer) }) diff --git a/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt b/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt index e3dbc423919..32e36e0bb8c 100644 --- a/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt +++ b/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt @@ -1,20 +1,18 @@ // @sim-sdk 1 -import { binding, block, gmail, trigger, workflow } from '@sim/workflow-sdk' +import { binding, gmail, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const invoiceEmail = trigger.gmail.poller('Invoice email', { - credential: binding('finance-gmail'), labelIds: ['INBOX'], + labelFilterBehavior: todo(), markAsRead: true, }) - const oddTrigger = block( - 'gmail', - 'Odd trigger', - { selectedTriggerId: 'gmail_other', markAsRead: false }, - { triggerMode: true } - ) + const oddTrigger = trigger.gmail.poller('Odd trigger', { + labelFilterBehavior: todo(), + markAsRead: false, + }) const sendSummary = gmail.sendEmail('Send summary', { - credential: binding('finance-gmail'), + oauthCredential: binding('finance-gmail'), to: 'cfo@acme.test', subject: 'Invoices', body: invoiceEmail.email.body_text, diff --git a/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt b/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt index 9eda842749c..d58e632ef94 100644 --- a/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt +++ b/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt @@ -3,10 +3,15 @@ import { agent, env, t, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: [] }) - const html = agent('Html', { - model: '{{ not valid }}', - systemPrompt: t`
hello
${env.lower_ok} `, - }) + const html = agent( + 'Html', + { model: '{{ not valid }}' }, + { + inactive: { + systemPrompt: t`
hello
${env.lower_ok} `, + }, + } + ) start.to(html) }) diff --git a/packages/workflow-code/src/print/__golden__/vars-by-field.txt b/packages/workflow-code/src/print/__golden__/vars-by-field.txt index d6cc56abc13..854feed5da6 100644 --- a/packages/workflow-code/src/print/__golden__/vars-by-field.txt +++ b/packages/workflow-code/src/print/__golden__/vars-by-field.txt @@ -12,11 +12,11 @@ export default workflow( { variableId: vars.count, value: t`count is ${vars.count}` }, ], }) - const echo = agent('Echo', { - model: raw({ $sim: 'var', key: 'count' }), - systemPrompt: vars.count, - temperature: t`count is ${vars.count}`, - }) + const echo = agent( + 'Echo', + { model: raw({ $sim: 'var', key: 'count' }), temperature: t`count is ${vars.count}` }, + { inactive: { systemPrompt: vars.count } } + ) start.to(setCount) setCount.to(echo) diff --git a/packages/workflow-code/src/print/determinism.test.ts b/packages/workflow-code/src/print/determinism.test.ts index e64e5ab95ac..5fb4d32fed5 100644 --- a/packages/workflow-code/src/print/determinism.test.ts +++ b/packages/workflow-code/src/print/determinism.test.ts @@ -7,10 +7,12 @@ import { describe, expect, it } from 'vitest' import type { LockHints } from '../api' +import { editorDefaults } from '../catalog/defaults' import { catalogBlock } from '../catalog/view' +import { executableInactiveParams } from '../equivalence/executable' import type { CanonicalWorkflow } from '../model' import { cases } from './__fixtures__/cases' -import { catalog } from './__fixtures__/catalog' +import { realCatalog as catalog } from './__fixtures__/real-catalog' import { printWorkflow } from './printer' /** A deep copy of plain data: every CWM value is JSON (`model.ts`). */ @@ -44,13 +46,20 @@ function reorder(workflow: CanonicalWorkflow): CanonicalWorkflow { const EDITABLE_TYPES = new Set(['short-input', 'long-input', 'combobox']) -/** Every single-line, token-free text param a user could retype, as (block, param) pairs. */ +/** + * Every single-line, token-free text param a user could retype, as (block, param) pairs. Inactive + * params and values equal to the editor default are not printed, so editing one adds a line. + */ function editableParams(workflow: CanonicalWorkflow): Array<[string, string]> { const pairs: Array<[string, string]> = [] for (const block of Object.values(workflow.blocks)) { - const subBlocks = catalogBlock(catalog, block.type)?.subBlocks ?? [] + const declared = catalogBlock(catalog, block.type) + const subBlocks = declared?.subBlocks ?? [] + const inactive = new Set(executableInactiveParams(block, catalog)) + const defaults = declared ? editorDefaults(declared) : new Map() for (const [id, param] of Object.entries(block.params)) { if (param.kind !== 'value' || typeof param.value !== 'string') continue + if (inactive.has(id) || defaults.get(id) === param.value) continue if (!/^[\w .:/-]+$/.test(param.value)) continue const subBlock = subBlocks.find((candidate) => candidate.id === id) if (subBlock && !EDITABLE_TYPES.has(subBlock.type)) continue diff --git a/packages/workflow-code/src/print/golden.test.ts b/packages/workflow-code/src/print/golden.test.ts index ebced2692c7..2ebbe45bd1b 100644 --- a/packages/workflow-code/src/print/golden.test.ts +++ b/packages/workflow-code/src/print/golden.test.ts @@ -1,7 +1,7 @@ import { describe, expect, it } from 'vitest' import { type CodeFileCodec, type CodeFileLanguage, codeFileCodec } from '../code-files' import { cases } from './__fixtures__/cases' -import { catalog } from './__fixtures__/catalog' +import { realCatalog as catalog } from './__fixtures__/real-catalog' import { createPrintWorkflow, printWorkflow } from './printer' const GOLDEN_DIR = './__golden__' @@ -26,6 +26,28 @@ describe('printWorkflow golden files', () => { }) } + /** `source get --verbose`: the preserved UI state a lean print leaves to apply. */ + const VERBOSE_CASES = [ + 'support-triage', + 'pair-modes', + 'inactive-values', + 'loop-foreach', + 'nested-subflows', + ] + for (const name of VERBOSE_CASES) { + it(`prints ${name} verbosely`, async () => { + const testCase = cases.find((candidate) => candidate.name === name) + if (!testCase) throw new Error(`missing case ${name}`) + const result = printWorkflow({ + workflow: testCase.workflow, + catalog, + hints: testCase.hints, + options: { functionCode: 'inline', verbose: true }, + }) + await expect(result.files[0].text).toMatchFileSnapshot(`${GOLDEN_DIR}/${name}.verbose.txt`) + }) + } + it('reports the diagnostics each golden case produces', async () => { const report = Object.fromEntries( cases.map((testCase) => { diff --git a/packages/workflow-code/src/print/printer.ts b/packages/workflow-code/src/print/printer.ts index a022bf6e1ca..dc567e65d9e 100644 --- a/packages/workflow-code/src/print/printer.ts +++ b/packages/workflow-code/src/print/printer.ts @@ -12,6 +12,9 @@ import { } from '@sim/workflow-types/workflow' import { portKey } from '../anchors' import type { LockHintBlock, LockHints, PrintInput, PrintResult, PrintWorkflowFn } from '../api' +import { canonicalActivityInputs, isInactive } from '../canonicalize/activity' +import { SUBFLOW_DATA_KEYS } from '../canonicalize/subflows' +import { type EditorDefault, editorDefaults } from '../catalog/defaults' import type { BlockCatalog, CatalogBlock, CatalogBuilder, CatalogSubBlock } from '../catalog/types' import { catalogBlock as catalogBlockOf, @@ -21,6 +24,7 @@ import { import { type CodeFileCodec, type CodeFileLanguage, codeFileCodec } from '../code-files' import type { PrintDiagnosticCode } from '../diagnostics/codes' import type { Diagnostic } from '../diagnostics/frame' +import { executableInactiveParams } from '../equivalence/executable' import { isJson } from '../lock' import type { AnchorKey, @@ -76,6 +80,27 @@ function stringParam(block: CanonicalBlock, id: string): string | undefined { return param?.kind === 'value' && typeof param.value === 'string' ? param.value : undefined } +/** + * Whether compiling the effective member's value into `other` would store it differently. A + * value the source writes as a list or object literal is stored as JSON text by a code member and + * reshaped by an input-format member (`compile/blocks.ts` `compileField`); everything else lands + * the same in either member, so which member holds it is UI state and a lean print leaves the mode + * to the stored workflow. + */ +function storesDifferently( + block: CanonicalBlock, + effective: CatalogSubBlock | undefined, + other: CatalogSubBlock | undefined +): boolean { + const param = effective ? getOwn(block.params, effective.id) : undefined + if (param?.kind !== 'value' || !other) return false + const { value } = param + const literal = + Array.isArray(value) || + (value !== null && typeof value === 'object' && !Object.hasOwn(value, '$sim')) + return literal && (other.type === 'code' || other.structured === 'inputFormat') +} + function hasValue(block: CanonicalBlock, id: string): boolean { return getOwn(block.params, id) !== undefined } @@ -192,6 +217,8 @@ class WorkflowPrinter { private readonly hints: LockHints private readonly width: number private readonly options: PrintInput['options'] + /** `PrintOptions.verbose`: also print the preserved UI state source never needs. */ + private readonly verbose: boolean private readonly diagnostics: Diag[] = [] private readonly imports = new Set(['workflow']) private usesVars = false @@ -218,6 +245,7 @@ class WorkflowPrinter { this.hints = input.hints ?? { blocks: {} } this.width = input.options.lineWidth ?? DEFAULT_WIDTH this.options = input.options + this.verbose = input.options.verbose === true this.blocks = new Map(Object.entries(this.workflow.blocks)) for (const [key, block] of this.blocks) { const parent = block.parent === null ? undefined : this.blocks.get(block.parent) @@ -241,7 +269,8 @@ class WorkflowPrinter { (name) => this.imports.add(name), () => { this.usesVars = true - } + }, + input.options.verbose === true ) this.comments = new CommentPlacer(this.workflow.annotations.comments) } @@ -594,9 +623,41 @@ class WorkflowPrinter { } /** - * Params in catalog registry order, one per canonical pair (build-spec decision 7). Values the - * annotation marks inactive, non-effective pair members and ids the catalog does not know go - * under `inactive` so nothing is lost (build-spec decision 2). + * The ids of a block that never reach execution. A lean print uses the executable view's rule + * (`executableInactiveParams`, shared with materialize); a verbose print lists the stored + * annotation, so it shows exactly what canonicalize kept. + */ + private inactiveIds(block: CanonicalBlock, catalogBlock: CatalogBlock | undefined): Set { + if (this.verbose) return new Set(getOwn(this.workflow.annotations.inactive, block.key) ?? []) + return catalogBlock ? new Set(executableInactiveParams(block, this.catalog)) : new Set() + } + + /** + * Whether a field with no stored value would reach execution holding `value`, the editor + * default compile fills in when the field is omitted. An absent field prints `null` only then: + * an inactive one is restored from the stored workflow either way. The value matters for a + * standalone advanced field, which is sent only when it holds one. + */ + private activeIfSet( + block: CanonicalBlock, + catalogBlock: CatalogBlock, + sb: CatalogSubBlock, + value: Value + ): boolean { + const filled: CanonicalBlock = { + ...block, + params: { ...block.params, [sb.id]: { kind: 'value', value } }, + } + return !isInactive(sb.id, canonicalActivityInputs(filled, catalogBlock, this.catalog)) + } + + /** + * Params in catalog registry order, one per canonical pair (build-spec decision 7), under the + * defaults rule: a value equal to the editor default (`editorDefaults`) is omitted, and an + * active field with no stored value prints `null` when a default exists. A lean print leaves out + * what never executes (inactive values, the pair member the mode hides, undeclared ids that do + * not run); a verbose print lists them under `inactive` so nothing is lost (build-spec decision + * 2), with the modes derivation would get wrong. */ private collectParams( block: CanonicalBlock, @@ -609,12 +670,27 @@ class WorkflowPrinter { const handled = new Set(pinned) const branchId = catalogBlock?.graph.branches?.subBlockId if (branchId) handled.add(branchId) - const inactiveIds = new Set(getOwn(this.workflow.annotations.inactive, block.key) ?? []) + const inactiveIds = this.inactiveIds(block, catalogBlock) + const defaults: ReadonlyMap = catalogBlock + ? editorDefaults(catalogBlock) + : new Map() const pushInactive = (id: string, sb: CatalogSubBlock | undefined) => { + if (!this.verbose) return const value = this.printParamValue(block, catalogBlock, id, sb) if (value) inactive.push({ key: printKey(id), anchor: anchors.inactive(block.key, id), value }) } + const pushNull = (key: string) => { + params.push({ + key: printKey(key), + anchor: anchors.param(block.key, key), + value: { doc: 'null', shape: 'literal' }, + }) + } + const isDefault = (id: string) => { + const param = getOwn(block.params, id) + return param?.kind === 'value' && defaults.has(id) && defaults.get(id) === param.value + } if (catalogBlock) { const subBlocks = this.surfaceSubBlocks(block, catalogBlock) @@ -631,11 +707,16 @@ class WorkflowPrinter { const advanced = members.find(isAdvancedMember) const effective = (mode === 'advanced' ? advanced : basic) ?? members[0] let printed: PrintedValue | null = null + let elided = false for (const member of members) { if (handled.has(member.id)) continue handled.add(member.id) if (!hasValue(block, member.id)) continue if (member === effective && !inactiveIds.has(member.id)) { + if (mode === 'basic' && member === basic && isDefault(member.id)) { + elided = true + continue + } printed = this.printParamValue(block, catalogBlock, member.id, member) if (printed) { params.push({ @@ -648,8 +729,26 @@ class WorkflowPrinter { pushInactive(member.id, member) } } + if ( + !printed && + !elided && + effective && + !hasValue(block, effective.id) && + members.some((member) => defaults.has(member.id)) && + this.activeIfSet(block, catalogBlock, effective, defaults.get(effective.id) ?? '') + ) { + pushNull(cid) + } const implied: ParamMode = printed ? (printed.selector ? 'basic' : 'advanced') : 'basic' - if (basic && advanced && implied !== mode) setOwn(modes, cid, mode) + if ( + basic && + advanced && + implied !== mode && + (this.verbose || + storesDifferently(block, effective, implied === 'basic' ? basic : advanced)) + ) { + setOwn(modes, cid, mode) + } continue } handled.add(sb.id) @@ -660,6 +759,11 @@ class WorkflowPrinter { anchor: anchors.param(block.key, sb.id), value: this.values.call('todo', []), }) + } else { + const fallback = defaults.get(sb.id) + if (fallback !== undefined && this.activeIfSet(block, catalogBlock, sb, fallback)) { + pushNull(sb.id) + } } continue } @@ -667,6 +771,7 @@ class WorkflowPrinter { pushInactive(sb.id, sb) continue } + if (isDefault(sb.id)) continue const printed = this.printParamValue(block, catalogBlock, sb.id, sb) if (printed) { params.push({ @@ -682,18 +787,28 @@ class WorkflowPrinter { .filter((id) => !handled.has(id)) .sort(compareStrings) for (const id of rest) { - if (catalogBlock) { - pushInactive(id, undefined) - } else { + if (!catalogBlock) { const printed = this.printParamValue(block, undefined, id, undefined) if (printed) { params.push({ key: printKey(id), anchor: anchors.param(block.key, id), value: printed }) } + continue + } + // `inactive` is the only place source takes an id the catalog does not declare on this + // surface. A lean print keeps only the ones that still run: a schema-agnostic custom + // block's inputs and the agent's legacy prompt fields. + if (!this.verbose && inactiveIds.has(id)) continue + const value = this.printParamValue(block, catalogBlock, id, undefined) + if (value) { + inactive.push({ key: printKey(id), anchor: anchors.inactive(block.key, id), value }) } } - for (const cid of Object.keys(block.modes).sort(compareStrings)) { - const handledCid = catalogBlock?.subBlocks.some((sb) => sb.canonicalParamId === cid) ?? false - if (!handledCid) setOwn(modes, cid, getOwn(block.modes, cid) ?? 'basic') + if (this.verbose) { + for (const cid of Object.keys(block.modes).sort(compareStrings)) { + const handledCid = + catalogBlock?.subBlocks.some((sb) => sb.canonicalParamId === cid) ?? false + if (!handledCid) setOwn(modes, cid, getOwn(block.modes, cid) ?? 'basic') + } } return { params, inactive, modes } } @@ -752,13 +867,29 @@ class WorkflowPrinter { meta.push({ key: 'branches', value: objectExpr(extra.branches) }) } if (extra.inactive.length > 0) meta.push({ key: 'inactive', value: objectExpr(extra.inactive) }) - const opaque = block.opaque?.data + const opaque = this.printedOpaque(block) if (opaque && Object.keys(opaque).length > 0) { meta.push({ key: '$unknown', value: this.values.json(opaque) }) } return meta } + /** + * The unknown `block.data` a print carries as `$unknown`. Nothing executes it, so a lean print + * keeps only a container's subflow keys canonicalize could not read as config, which the + * serializer passes through with the container's data; a verbose print keeps all of it. + */ + private printedOpaque(block: CanonicalBlock): Record | undefined { + const opaque = block.opaque?.data + if (!opaque || this.verbose) return opaque + if (!block.subflow) return undefined + const kept: Record = {} + for (const [key, value] of Object.entries(opaque)) { + if (SUBFLOW_DATA_KEYS.has(key)) setOwn(kept, key, value) + } + return kept + } + /** Branch rows as named keys, plus per-row title overrides and extra keys for the meta. */ private branchEntries(block: CanonicalBlock): { entries: Property[]; meta: Property[] } { const branches = block.branches @@ -871,6 +1002,7 @@ class WorkflowPrinter { tag: Tag ) => { if (value === undefined) return + if (!active && !this.verbose) return const printed = this.values.value(value, { tag, from: block.key }) if (active) { config.push({ key, value: printed }) @@ -882,7 +1014,9 @@ class WorkflowPrinter { let callee: string if (spec.kind === 'loop') { callee = `loop.${spec.loopType}` - field('iterations', 'count', spec.iterations, spec.loopType === 'for', 't') + const countRuns = + spec.loopType === 'for' || (spec.loopType === 'doWhile' && !spec.doWhileCondition) + field('iterations', 'count', spec.iterations, countRuns, 't') field('forEachItems', 'collection', spec.forEachItems, spec.loopType === 'forEach', 't') field('whileCondition', 'condition', spec.whileCondition, spec.loopType === 'while', 'js') field( diff --git a/packages/workflow-code/src/print/values.ts b/packages/workflow-code/src/print/values.ts index 6a40a4d22a2..5a7d4ed8e67 100644 --- a/packages/workflow-code/src/print/values.ts +++ b/packages/workflow-code/src/print/values.ts @@ -67,10 +67,16 @@ function isSimNode(value: object): value is SimNode { /** Prints values, recording SDK imports and reference diagnostics as it goes. */ export class ValuePrinter { + /** + * @param pickedCalls Whether a plain selector id prints as `picked('C1')`. Only verbose prints + * do: the call records that a selector produced the id, which is UI state, so source writes + * the id as a plain string and materialize keeps the stored member. + */ constructor( private readonly refs: RefPrinter, private readonly use: (name: string) => void, - private readonly useVars: () => void + private readonly useVars: () => void, + private readonly pickedCalls: boolean ) {} call(callee: string, args: Expr[]): Expr { @@ -82,7 +88,7 @@ export class ValuePrinter { field(value: Value, context: FieldContext): PrintedValue { const subBlock = context.subBlock const kind = subBlock?.valueKind - if (kind === 'picked' && isPlainSelectorValue(value)) { + if (this.pickedCalls && kind === 'picked' && isPlainSelectorValue(value)) { return { ...this.call('picked', [this.json(value as Json)]), selector: true } } if ( diff --git a/packages/workflow-code/src/proof/oracles.ts b/packages/workflow-code/src/proof/oracles.ts index b72693ce48e..c365abf0f6a 100644 --- a/packages/workflow-code/src/proof/oracles.ts +++ b/packages/workflow-code/src/proof/oracles.ts @@ -17,7 +17,7 @@ import { setOwn } from '../records' import { type Difference, findDifferences, firstTextDifference } from './diff' /** The property or oracle a verdict belongs to (s3 §5 P1–P5, s1 §6 O1–O3). */ -export type OracleName = 'P0' | 'P1' | 'P2' | 'P3' | 'P4' | 'P5' | 'O1' | 'O2' | 'O3' +export type OracleName = 'P0' | 'P1' | 'P2' | 'P3' | 'P4' | 'P5' | 'P6' | 'O1' | 'O2' | 'O3' export type OracleResult = | { ok: true; oracle: OracleName } @@ -34,8 +34,10 @@ function verdict(oracle: OracleName, differences: Difference[]): OracleResult { export function assertNoopIdentity(input: { original: WorkflowState materialized: WorkflowState + /** `P6` when the candidate was compiled from the lean print. Default `O1`. */ + oracle?: 'O1' | 'P6' }): OracleResult { - return verdict('O1', findDifferences(input.original, input.materialized)) + return verdict(input.oracle ?? 'O1', findDifferences(input.original, input.materialized)) } /** diff --git a/packages/workflow-code/src/proof/report.ts b/packages/workflow-code/src/proof/report.ts index ab7830159e2..afcec2a329a 100644 --- a/packages/workflow-code/src/proof/report.ts +++ b/packages/workflow-code/src/proof/report.ts @@ -12,7 +12,18 @@ import type { Difference } from './diff' * The round-trip properties (s3 §5) and oracles (s1 §6) a corpus run checks. `P0` is P1's source * half, `compile(print(c))` equals `c`, which needs no materialize. */ -export const PROOF_PROPERTIES = ['P0', 'P1', 'P2', 'P3', 'P4', 'P5', 'O1', 'O2', 'O3'] as const +export const PROOF_PROPERTIES = [ + 'P0', + 'P1', + 'P2', + 'P3', + 'P4', + 'P5', + 'P6', + 'O1', + 'O2', + 'O3', +] as const export type ProofProperty = (typeof PROOF_PROPERTIES)[number] export type ProofStatus = 'passed' | 'failed' | 'skipped' | 'errored' From b07c7fd8ea45be457455fa80b5fb2a7e4da34f9a Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:57:09 -0800 Subject: [PATCH 123/428] test(workflow-sdk): type-check every printer golden against the shipped SDK types A new workflow-sdk test writes the types generated from the goldens' real catalog slice next to every golden (lean and verbose) and runs the workspace's TypeScript 7 compiler (tsgo) over them with core.d.ts. Fixes for what it found: - core.d.ts (minimal, shared with 4C): BlockMeta gains triggerMode, branches and $unknown, and documents modes/inactive under the lean print; ToolOpts carries the stored tool options a print writes; SubflowScope has to(); SubflowOutput has the named index/currentItem/items; bare parallel() is callable; loop.for/doWhile counts are optional; VariableAssignment uses the stored variableId key the compiler reads. - codegen: a param whose field has an editor default also takes null, and table params accept the stored { cells } rows a print writes. - printer: an empty inputFormat prints {} and a list the record form cannot carry prints raw(...); a builder prints only blocks on its own surface (a trigger builder never prints an action block), else block(). - golden cases use declared start fields, valid output paths and the real stored shapes (variableId, table cells, triggerCredentials). --- packages/workflow-code/package.json | 4 ++ .../workflow-code/src/catalog/defaults.ts | 5 +- .../src/print/__fixtures__/cases.ts | 40 ++++++----- .../src/print/__golden__/agent-tools.txt | 2 +- .../src/print/__golden__/block-meta.txt | 2 +- .../__golden__/branch-titles-and-extra.txt | 2 +- .../print/__golden__/branches-null-rows.txt | 2 +- .../print/__golden__/comments-at-anchors.txt | 2 +- .../src/print/__golden__/fan-out-wrapping.txt | 2 +- .../src/print/__golden__/function-files.txt | 2 +- .../print/__golden__/function-languages.txt | 2 +- .../generic-block-legacy-operation.txt | 10 +-- .../__golden__/generic-block-unknown-type.txt | 2 +- .../__golden__/identifier-collisions.txt | 2 +- .../src/print/__golden__/inactive-values.txt | 2 +- .../__golden__/inactive-values.verbose.txt | 2 +- .../print/__golden__/input-format-sugar.txt | 6 +- .../src/print/__golden__/json-code-fields.txt | 2 +- .../src/print/__golden__/layout-widths.txt | 10 +-- .../__golden__/legacy-dropdown-and-todo.txt | 2 +- .../src/print/__golden__/lock-order.txt | 2 +- .../src/print/__golden__/minimal-trigger.txt | 2 +- .../src/print/__golden__/nested-subflows.txt | 2 +- .../__golden__/nested-subflows.verbose.txt | 2 +- .../src/print/__golden__/note-markdown.txt | 2 +- .../src/print/__golden__/pair-modes.txt | 2 +- .../print/__golden__/pair-modes.verbose.txt | 2 +- .../src/print/__golden__/parallel-untyped.txt | 2 +- .../print/__golden__/raw-and-odd-edges.txt | 2 +- .../__golden__/ref-cycle-literalized.txt | 2 +- .../src/print/__golden__/resource-nodes.txt | 6 +- .../src/print/__golden__/string-escapes.txt | 2 +- .../print/__golden__/templates-and-paths.txt | 4 +- .../__golden__/trigger-mode-builders.txt | 4 +- .../print/__golden__/unresolved-tokens.txt | 2 +- .../src/print/__golden__/vars-by-field.txt | 2 +- packages/workflow-code/src/print/printer.ts | 20 ++++-- .../src/codegen/core-text.generated.ts | 2 +- packages/workflow-sdk/src/codegen/generate.ts | 9 ++- .../workflow-sdk/src/codegen/goldens.test.ts | 69 +++++++++++++++++++ .../workflow-sdk/src/codegen/map-subblock.ts | 9 ++- packages/workflow-sdk/src/core.d.ts | 55 ++++++++++++--- 42 files changed, 223 insertions(+), 84 deletions(-) create mode 100644 packages/workflow-sdk/src/codegen/goldens.test.ts diff --git a/packages/workflow-code/package.json b/packages/workflow-code/package.json index f8ee9467b13..cade20b2962 100644 --- a/packages/workflow-code/package.json +++ b/packages/workflow-code/package.json @@ -22,6 +22,10 @@ "types": "./src/catalog/canonical-index/index.ts", "default": "./src/catalog/canonical-index/index.ts" }, + "./catalog/defaults": { + "types": "./src/catalog/defaults.ts", + "default": "./src/catalog/defaults.ts" + }, "./catalog/view": { "types": "./src/catalog/view.ts", "default": "./src/catalog/view.ts" diff --git a/packages/workflow-code/src/catalog/defaults.ts b/packages/workflow-code/src/catalog/defaults.ts index d6193f2baa3..eef4161513f 100644 --- a/packages/workflow-code/src/catalog/defaults.ts +++ b/packages/workflow-code/src/catalog/defaults.ts @@ -25,7 +25,8 @@ function scalar(value: Json | undefined): EditorDefault | undefined { : undefined } -function seededValue(subBlock: CatalogSubBlock): EditorDefault | undefined { +/** The value creation seeds through this declaration, if any (`editorDefaults` applies first-wins). */ +export function subBlockEditorDefault(subBlock: CatalogSubBlock): EditorDefault | undefined { if (subBlock.hidden) return scalar(subBlock.defaultValue) if (subBlock.readOnly) return undefined const thunk = subBlock.valueDefault @@ -42,7 +43,7 @@ export function editorDefaults(block: CatalogBlock): ReadonlyMap' }, - { variable: { $sim: 'var', key: 'lastrun' }, value: '' }, + { variableId: { $sim: 'var', key: 'retries' }, value: '' }, + { variableId: { $sim: 'var', key: 'lastrun' }, value: '' }, ], }, }), @@ -559,7 +563,7 @@ export const cases: PrintCase[] = [ name: 'generic-block-unknown-type', workflow: wf({ blocks: [ - start(), + start('Start', [{ name: 'input', type: 'string', value: '' }]), blk('Mystery', 'custom_block_acme', { params: { zeta: 1, alpha: 'a ' }, triggerMode: true, @@ -611,7 +615,7 @@ export const cases: PrintCase[] = [ name: 'agent-tools', workflow: wf({ blocks: [ - start(), + start('Start', [{ name: 'input', type: 'string', value: '' }]), blk('Assistant', 'agent', { params: { model: 'claude-sonnet-5-5' }, tools: { @@ -663,7 +667,7 @@ export const cases: PrintCase[] = [ name: 'json-code-fields', workflow: wf({ blocks: [ - start(), + start('Start', [{ name: 'input', type: 'string', value: '' }]), blk('Sugared', 'agent', { params: { model: 'm', responseFormat: '{\n "name": "ticket",\n "strict": true\n}' }, }), @@ -681,7 +685,7 @@ export const cases: PrintCase[] = [ name: 'function-languages', workflow: wf({ blocks: [ - start(), + start('Start', [{ name: 'total', type: 'number', value: '' }]), blk('Js code', 'function', { params: { language: 'javascript', @@ -833,13 +837,13 @@ export const cases: PrintCase[] = [ params: { url: 'https://example.com/a/very/long/path/that/keeps/going/and/going/until/it/overflows/the/line', headers: [ - { key: 'Authorization', value: 'Bearer {{API_TOKEN}}' }, - { key: 'Accept', value: 'application/json' }, + { cells: { Key: 'Authorization', Value: 'Bearer {{API_TOKEN}}' } }, + { cells: { Key: 'Accept', Value: 'application/json' } }, ], method: 'GET', }, }), - blk('Numbers', 'agent', { + blk('Numbers', 'custom_block_metrics', { params: { model: 'm', temperature: 1e21, @@ -867,7 +871,7 @@ export const cases: PrintCase[] = [ triggerMode: true, params: { selectedTriggerId: 'gmail_poller', - credential: { $sim: 'resource', kind: 'credential', key: 'finance-gmail' }, + triggerCredentials: { $sim: 'resource', kind: 'credential', key: 'finance-gmail' }, labelIds: ['INBOX'], markAsRead: true, }, @@ -878,12 +882,16 @@ export const cases: PrintCase[] = [ credential: { $sim: 'resource', kind: 'credential', key: 'finance-gmail' }, to: 'cfo@acme.test', subject: 'Invoices', - body: '', + body: '', }, }), blk('Odd trigger', 'gmail_v2', { triggerMode: true, - params: { selectedTriggerId: 'gmail_other', markAsRead: false }, + params: { + selectedTriggerId: 'gmail_other', + triggerCredentials: { $sim: 'resource', kind: 'credential', key: 'finance-gmail' }, + markAsRead: false, + }, }), ], edges: [edge('invoiceemail', 'sendsummary')], diff --git a/packages/workflow-code/src/print/__golden__/agent-tools.txt b/packages/workflow-code/src/print/__golden__/agent-tools.txt index ec4e2d17e9e..4e162d46080 100644 --- a/packages/workflow-code/src/print/__golden__/agent-tools.txt +++ b/packages/workflow-code/src/print/__golden__/agent-tools.txt @@ -2,7 +2,7 @@ import { agent, raw, slack, t, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: { input: 'string' } }) const assistant = agent('Assistant', { model: 'claude-sonnet-5-5', tools: [ diff --git a/packages/workflow-code/src/print/__golden__/block-meta.txt b/packages/workflow-code/src/print/__golden__/block-meta.txt index e463034625c..49de809c641 100644 --- a/packages/workflow-code/src/print/__golden__/block-meta.txt +++ b/packages/workflow-code/src/print/__golden__/block-meta.txt @@ -2,7 +2,7 @@ import { api, response, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const flaky = api('Flaky', { url: 'https://b.test', method: todo() }) const fallback = response('Fallback', {}) const guarded = api( diff --git a/packages/workflow-code/src/print/__golden__/branch-titles-and-extra.txt b/packages/workflow-code/src/print/__golden__/branch-titles-and-extra.txt index 4c398c26a97..5faf04dd8f2 100644 --- a/packages/workflow-code/src/print/__golden__/branch-titles-and-extra.txt +++ b/packages/workflow-code/src/print/__golden__/branch-titles-and-extra.txt @@ -2,7 +2,7 @@ import { condition, js, response, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: { amount: 'number' } }) const check = condition( 'Check', { big: js`${start.amount} > 100`, elseIf0: js``, else: js`true` }, diff --git a/packages/workflow-code/src/print/__golden__/branches-null-rows.txt b/packages/workflow-code/src/print/__golden__/branches-null-rows.txt index 5d4bcb02943..c34da9dd8d5 100644 --- a/packages/workflow-code/src/print/__golden__/branches-null-rows.txt +++ b/packages/workflow-code/src/print/__golden__/branches-null-rows.txt @@ -2,7 +2,7 @@ import { condition, response, router, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const gate = condition('Gate', {}) const pick = router('Pick', { context: 'ctx', model: 'm', routes: {} }) const yes = response('Yes', {}) diff --git a/packages/workflow-code/src/print/__golden__/comments-at-anchors.txt b/packages/workflow-code/src/print/__golden__/comments-at-anchors.txt index 83624c1a615..5111a801abc 100644 --- a/packages/workflow-code/src/print/__golden__/comments-at-anchors.txt +++ b/packages/workflow-code/src/print/__golden__/comments-at-anchors.txt @@ -11,7 +11,7 @@ export default workflow( }, }, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) // Cheap model first. // param not printed const classify = agent('Classify', { diff --git a/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt b/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt index 280a3a43361..829a1cb1b0b 100644 --- a/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt +++ b/packages/workflow-code/src/print/__golden__/fan-out-wrapping.txt @@ -2,7 +2,7 @@ import { api, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const archiveRawPayload = api('Archive raw payload', { url: 'https://x.test', method: todo() }) const enrichCompanyProfile = api('Enrich company profile', { url: 'https://x.test', diff --git a/packages/workflow-code/src/print/__golden__/function-files.txt b/packages/workflow-code/src/print/__golden__/function-files.txt index 54f90d8a0a8..101fb438e81 100644 --- a/packages/workflow-code/src/print/__golden__/function-files.txt +++ b/packages/workflow-code/src/print/__golden__/function-files.txt @@ -2,7 +2,7 @@ import { file, fn, raw, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: { total: 'number' } }) const jsCode = fn('Js code', { code: file('./functions/js-code.js') }) const pyCode = fn('Py code', { language: 'python', code: file('./functions/py-code.py') }) const shCode = fn('Sh code', { language: raw('shell'), code: file('./functions/sh-code.sh') }) diff --git a/packages/workflow-code/src/print/__golden__/function-languages.txt b/packages/workflow-code/src/print/__golden__/function-languages.txt index a744b478c54..014386df735 100644 --- a/packages/workflow-code/src/print/__golden__/function-languages.txt +++ b/packages/workflow-code/src/print/__golden__/function-languages.txt @@ -2,7 +2,7 @@ import { env, fn, js, py, raw, sh, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: { total: 'number' } }) const jsCode = fn('Js code', { code: js`const total = ${start.total} + ${env.TAX_RATE} // keep \`ticks\` and \${braces} diff --git a/packages/workflow-code/src/print/__golden__/generic-block-legacy-operation.txt b/packages/workflow-code/src/print/__golden__/generic-block-legacy-operation.txt index b51b3bb51e1..3bb4514cf59 100644 --- a/packages/workflow-code/src/print/__golden__/generic-block-legacy-operation.txt +++ b/packages/workflow-code/src/print/__golden__/generic-block-legacy-operation.txt @@ -1,11 +1,7 @@ // @sim-sdk 1 -import { raw, trigger, workflow } from '@sim/workflow-sdk' +import { block, raw, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) - const oldTableOp = trigger.table.newRow( - 'Old table op', - { operation: raw('delete_everything') }, - { triggerMode: false } - ) + const start = trigger.start('Start', { inputFormat: {} }) + const oldTableOp = block('table_v2', 'Old table op', { operation: raw('delete_everything') }) }) diff --git a/packages/workflow-code/src/print/__golden__/generic-block-unknown-type.txt b/packages/workflow-code/src/print/__golden__/generic-block-unknown-type.txt index 7de5ee0ab51..5966c41d5ad 100644 --- a/packages/workflow-code/src/print/__golden__/generic-block-unknown-type.txt +++ b/packages/workflow-code/src/print/__golden__/generic-block-unknown-type.txt @@ -2,7 +2,7 @@ import { block, t, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: { input: 'string' } }) const mystery = block( 'custom_block_acme', 'Mystery', diff --git a/packages/workflow-code/src/print/__golden__/identifier-collisions.txt b/packages/workflow-code/src/print/__golden__/identifier-collisions.txt index 7b3a04774e4..be602e70748 100644 --- a/packages/workflow-code/src/print/__golden__/identifier-collisions.txt +++ b/packages/workflow-code/src/print/__golden__/identifier-collisions.txt @@ -2,7 +2,7 @@ import { api, t, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const _1stStep = api('1st step', { url: 'https://g.test', method: todo() }) const badHint = api('Bad hint', { url: 'https://j.test', method: todo() }) const default2 = api('Default', { url: 'https://a.test', method: todo() }) diff --git a/packages/workflow-code/src/print/__golden__/inactive-values.txt b/packages/workflow-code/src/print/__golden__/inactive-values.txt index c1949155f02..406dd72ab76 100644 --- a/packages/workflow-code/src/print/__golden__/inactive-values.txt +++ b/packages/workflow-code/src/print/__golden__/inactive-values.txt @@ -2,7 +2,7 @@ import { agent, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const remember = agent('Remember', { model: 'm', memoryType: 'none' }) start.to(remember) diff --git a/packages/workflow-code/src/print/__golden__/inactive-values.verbose.txt b/packages/workflow-code/src/print/__golden__/inactive-values.verbose.txt index 699299f8285..a1f56cb06e2 100644 --- a/packages/workflow-code/src/print/__golden__/inactive-values.verbose.txt +++ b/packages/workflow-code/src/print/__golden__/inactive-values.verbose.txt @@ -2,7 +2,7 @@ import { agent, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const remember = agent( 'Remember', { model: 'm', memoryType: 'none' }, diff --git a/packages/workflow-code/src/print/__golden__/input-format-sugar.txt b/packages/workflow-code/src/print/__golden__/input-format-sugar.txt index 7295b9c3505..a8a17f64cbb 100644 --- a/packages/workflow-code/src/print/__golden__/input-format-sugar.txt +++ b/packages/workflow-code/src/print/__golden__/input-format-sugar.txt @@ -1,12 +1,12 @@ // @sim-sdk 1 -import { trigger, workflow } from '@sim/workflow-sdk' +import { raw, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const hook = trigger.webhook('Hook', { - inputFormat: [ + inputFormat: raw([ { name: '1', type: 'string', value: '' }, { name: 'id', type: 'string', value: '', extraKey: true }, - ], + ]), }) const start = trigger.start('Start', { inputFormat: { diff --git a/packages/workflow-code/src/print/__golden__/json-code-fields.txt b/packages/workflow-code/src/print/__golden__/json-code-fields.txt index 8a18392a67d..13dd2940608 100644 --- a/packages/workflow-code/src/print/__golden__/json-code-fields.txt +++ b/packages/workflow-code/src/print/__golden__/json-code-fields.txt @@ -2,7 +2,7 @@ import { agent, api, t, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: { input: 'string' } }) const compact = agent('Compact', { model: 'm', responseFormat: '{"name":"ticket"}' }) const refsInJson = api('Refs in json', { url: 'https://x.test', diff --git a/packages/workflow-code/src/print/__golden__/layout-widths.txt b/packages/workflow-code/src/print/__golden__/layout-widths.txt index 0c07e8ca0ae..02a5cecb52b 100644 --- a/packages/workflow-code/src/print/__golden__/layout-widths.txt +++ b/packages/workflow-code/src/print/__golden__/layout-widths.txt @@ -1,9 +1,9 @@ // @sim-sdk 1 -import { agent, api, env, slack, t, trigger, workflow } from '@sim/workflow-sdk' +import { api, block, env, slack, t, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) - const numbers = agent('Numbers', { + const start = trigger.start('Start', { inputFormat: {} }) + const numbers = block('custom_block_metrics', 'Numbers', { messages: [ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, -0.5, @@ -18,8 +18,8 @@ export default workflow('Fixture', {}, () => { url: 'https://example.com/a/very/long/path/that/keeps/going/and/going/until/it/overflows/the/line', method: 'GET', headers: [ - { key: 'Authorization', value: t`Bearer ${env.API_TOKEN}` }, - { key: 'Accept', value: 'application/json' }, + { cells: { Key: 'Authorization', Value: t`Bearer ${env.API_TOKEN}` } }, + { cells: { Key: 'Accept', Value: 'application/json' } }, ], }) }) diff --git a/packages/workflow-code/src/print/__golden__/legacy-dropdown-and-todo.txt b/packages/workflow-code/src/print/__golden__/legacy-dropdown-and-todo.txt index e8f41cd91bd..a80ff99b2cd 100644 --- a/packages/workflow-code/src/print/__golden__/legacy-dropdown-and-todo.txt +++ b/packages/workflow-code/src/print/__golden__/legacy-dropdown-and-todo.txt @@ -2,7 +2,7 @@ import { agent, api, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const drafted = agent('Drafted', { model: todo() }) const legacyMethod = api('Legacy method', { url: todo(), method: 'PATCH' }) }) diff --git a/packages/workflow-code/src/print/__golden__/lock-order.txt b/packages/workflow-code/src/print/__golden__/lock-order.txt index 86d34a1688b..1aa233330d1 100644 --- a/packages/workflow-code/src/print/__golden__/lock-order.txt +++ b/packages/workflow-code/src/print/__golden__/lock-order.txt @@ -2,7 +2,7 @@ import { api, t, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const zeta = api('Zeta', { url: 'https://z.test', method: todo() }) const alpha = api('Alpha', { url: 'https://a.test', method: todo() }) const mid = api('Mid', { url: t`https://m.test ${alpha.data}`, method: todo() }) diff --git a/packages/workflow-code/src/print/__golden__/minimal-trigger.txt b/packages/workflow-code/src/print/__golden__/minimal-trigger.txt index 5b68c66cf7e..1d9dd11f8e4 100644 --- a/packages/workflow-code/src/print/__golden__/minimal-trigger.txt +++ b/packages/workflow-code/src/print/__golden__/minimal-trigger.txt @@ -2,5 +2,5 @@ import { trigger, workflow } from '@sim/workflow-sdk' export default workflow('Hello', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) }) diff --git a/packages/workflow-code/src/print/__golden__/nested-subflows.txt b/packages/workflow-code/src/print/__golden__/nested-subflows.txt index 312f8dbe2d7..11560dd73d5 100644 --- a/packages/workflow-code/src/print/__golden__/nested-subflows.txt +++ b/packages/workflow-code/src/print/__golden__/nested-subflows.txt @@ -2,7 +2,7 @@ import { agent, js, loop, parallel, t, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: { rows: 'array' } }) const outer = loop.for('Outer', { count: 3 }, (p) => { const fan = parallel.collection('Fan', { collection: start.rows, batchSize: 5 }, (p2) => { const work = agent('Work', { diff --git a/packages/workflow-code/src/print/__golden__/nested-subflows.verbose.txt b/packages/workflow-code/src/print/__golden__/nested-subflows.verbose.txt index 49ec4ca8109..7ef2c1b6d03 100644 --- a/packages/workflow-code/src/print/__golden__/nested-subflows.verbose.txt +++ b/packages/workflow-code/src/print/__golden__/nested-subflows.verbose.txt @@ -2,7 +2,7 @@ import { agent, js, loop, parallel, t, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: { rows: 'array' } }) const outer = loop.for('Outer', { count: 3 }, (p) => { const fan = parallel.collection('Fan', { collection: start.rows, batchSize: 5 }, (p2) => { const work = agent('Work', { diff --git a/packages/workflow-code/src/print/__golden__/note-markdown.txt b/packages/workflow-code/src/print/__golden__/note-markdown.txt index eaf1f22a7ae..a0be5842ae5 100644 --- a/packages/workflow-code/src/print/__golden__/note-markdown.txt +++ b/packages/workflow-code/src/print/__golden__/note-markdown.txt @@ -2,7 +2,7 @@ import { md, note, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const howThisWorks = note('How this works', { content: md`Polls **INBOX**; appends to the \`finance\` sheet.`, diff --git a/packages/workflow-code/src/print/__golden__/pair-modes.txt b/packages/workflow-code/src/print/__golden__/pair-modes.txt index 18e5518e88f..7a3174ba602 100644 --- a/packages/workflow-code/src/print/__golden__/pair-modes.txt +++ b/packages/workflow-code/src/print/__golden__/pair-modes.txt @@ -2,7 +2,7 @@ import { slack, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: { channel: 'string' } }) const advancedEmpty = slack.sendMessage('Advanced empty', { text: 'd' }) const basicHoldingText = slack.sendMessage('Basic holding text', { channel: start.channel, diff --git a/packages/workflow-code/src/print/__golden__/pair-modes.verbose.txt b/packages/workflow-code/src/print/__golden__/pair-modes.verbose.txt index 15ea53875ec..79953b67f5c 100644 --- a/packages/workflow-code/src/print/__golden__/pair-modes.verbose.txt +++ b/packages/workflow-code/src/print/__golden__/pair-modes.verbose.txt @@ -2,7 +2,7 @@ import { picked, slack, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: { channel: 'string' } }) const advancedEmpty = slack.sendMessage( 'Advanced empty', { text: 'd' }, diff --git a/packages/workflow-code/src/print/__golden__/parallel-untyped.txt b/packages/workflow-code/src/print/__golden__/parallel-untyped.txt index e6aafee25ea..fa47e23a866 100644 --- a/packages/workflow-code/src/print/__golden__/parallel-untyped.txt +++ b/packages/workflow-code/src/print/__golden__/parallel-untyped.txt @@ -2,7 +2,7 @@ import { api, parallel, t, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const batch = parallel('Batch', { count: 4 }, (p) => { const ping = api('Ping', { url: t`https://x.test/${p.index}`, method: todo() }) diff --git a/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt b/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt index 49525e70ab5..cee9ace047e 100644 --- a/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt +++ b/packages/workflow-code/src/print/__golden__/raw-and-odd-edges.txt @@ -2,7 +2,7 @@ import { api, condition, edge, js, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const gate = condition('Gate', { if: js`true`, else: true }) const a = api('A', { url: 'https://a.test', method: todo() }) const b = api('B', { url: 'https://b.test', method: todo() }) diff --git a/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt b/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt index b63ad1fe0c6..7f987872a01 100644 --- a/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt +++ b/packages/workflow-code/src/print/__golden__/ref-cycle-literalized.txt @@ -2,7 +2,7 @@ import { agent, t, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const self = agent('Self', { messages: [{ role: 'system', content: 'Me: ' }], model: 'm', diff --git a/packages/workflow-code/src/print/__golden__/resource-nodes.txt b/packages/workflow-code/src/print/__golden__/resource-nodes.txt index 3743daf3a87..19ef523e6ab 100644 --- a/packages/workflow-code/src/print/__golden__/resource-nodes.txt +++ b/packages/workflow-code/src/print/__golden__/resource-nodes.txt @@ -10,7 +10,7 @@ export default workflow( }, }, ({ vars }) => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const query = table.queryRows('Query', { tableId: raw({ $sim: 'unresolved', kind: 'table', id: 'tbl_deleted' }), limit: raw({ @@ -23,8 +23,8 @@ export default workflow( }) const setVars = setVariables('Set vars', { variables: [ - { variable: vars.retries, value: t`${vars.retries}` }, - { variable: vars.lastrun, value: t`${query.rows}` }, + { variableId: vars.retries, value: t`${vars.retries}` }, + { variableId: vars.lastrun, value: t`${query.rows}` }, ], }) diff --git a/packages/workflow-code/src/print/__golden__/string-escapes.txt b/packages/workflow-code/src/print/__golden__/string-escapes.txt index 7ca97ac1861..8169a326339 100644 --- a/packages/workflow-code/src/print/__golden__/string-escapes.txt +++ b/packages/workflow-code/src/print/__golden__/string-escapes.txt @@ -2,7 +2,7 @@ import { agent, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const escapes = agent( 'Escapes', { diff --git a/packages/workflow-code/src/print/__golden__/templates-and-paths.txt b/packages/workflow-code/src/print/__golden__/templates-and-paths.txt index 0fd7057b97e..09a951e76f2 100644 --- a/packages/workflow-code/src/print/__golden__/templates-and-paths.txt +++ b/packages/workflow-code/src/print/__golden__/templates-and-paths.txt @@ -2,7 +2,9 @@ import { agent, t, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { + inputFormat: { items: 'array', 'some-field': 'string', a: 'object' }, + }) const writer = agent( 'Writer', { diff --git a/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt b/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt index 32e36e0bb8c..b5e2686fe9d 100644 --- a/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt +++ b/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt @@ -3,11 +3,13 @@ import { binding, gmail, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const invoiceEmail = trigger.gmail.poller('Invoice email', { + oauthCredential: binding('finance-gmail'), labelIds: ['INBOX'], labelFilterBehavior: todo(), markAsRead: true, }) const oddTrigger = trigger.gmail.poller('Odd trigger', { + oauthCredential: binding('finance-gmail'), labelFilterBehavior: todo(), markAsRead: false, }) @@ -15,7 +17,7 @@ export default workflow('Fixture', {}, () => { oauthCredential: binding('finance-gmail'), to: 'cfo@acme.test', subject: 'Invoices', - body: invoiceEmail.email.body_text, + body: invoiceEmail.email.subject, }) invoiceEmail.to(sendSummary) diff --git a/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt b/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt index d58e632ef94..6f0797b3f9d 100644 --- a/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt +++ b/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt @@ -2,7 +2,7 @@ import { agent, env, t, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const html = agent( 'Html', { model: '{{ not valid }}' }, diff --git a/packages/workflow-code/src/print/__golden__/vars-by-field.txt b/packages/workflow-code/src/print/__golden__/vars-by-field.txt index 854feed5da6..5a9097ce302 100644 --- a/packages/workflow-code/src/print/__golden__/vars-by-field.txt +++ b/packages/workflow-code/src/print/__golden__/vars-by-field.txt @@ -5,7 +5,7 @@ export default workflow( 'Fixture', { variables: { count: { type: 'number', value: 0 } } }, ({ vars }) => { - const start = trigger.start('Start', { inputFormat: [] }) + const start = trigger.start('Start', { inputFormat: {} }) const setCount = setVariables('Set count', { variables: [ { variableId: vars.count, value: t`${vars.count}` }, diff --git a/packages/workflow-code/src/print/printer.ts b/packages/workflow-code/src/print/printer.ts index dc567e65d9e..c2d7bc22289 100644 --- a/packages/workflow-code/src/print/printer.ts +++ b/packages/workflow-code/src/print/printer.ts @@ -105,11 +105,6 @@ function hasValue(block: CanonicalBlock, id: string): boolean { return getOwn(block.params, id) !== undefined } -/** - * The catalog builder for a block, most specific first (operation, then pinned fields). A builder - * whose trigger mode differs is used only when none matches, and the caller then prints - * `triggerMode` in the meta. - */ function catalogBuilderEntries(catalog: BlockCatalog): Array<[string, CatalogBuilder]> { const entries: Array<[string, CatalogBuilder]> = [] for (const path of catalogBuilderPaths(catalog)) { @@ -119,15 +114,24 @@ function catalogBuilderEntries(catalog: BlockCatalog): Array<[string, CatalogBui return entries } +/** + * The catalog builder for a block, most specific first (operation, then pinned fields). A + * builder's params type one surface, so a trigger-mode builder never prints an action block and an + * action builder never prints a block in trigger mode; such a block prints through `block()`. A + * trigger block (`category: 'triggers'`) serializes both surfaces, so its builders fit either + * stored mode. + */ function findBuilder( catalog: BlockCatalog, type: string, triggerMode: boolean, read: (id: string) => string | undefined ): { path: string; builder: CatalogBuilder } | null { + const triggerBlock = catalogBlockOf(catalog, type)?.category === 'triggers' const candidates = catalogBuilderEntries(catalog) .filter(([, builder]) => { if (builder.type !== type) return false + if (!triggerBlock && (builder.triggerMode === true) !== triggerMode) return false if (builder.operation !== undefined && read('operation') !== builder.operation) return false return Object.entries(builder.fixed ?? {}).every(([id, value]) => read(id) === value) }) @@ -462,9 +466,13 @@ class WorkflowPrinter { if (!param) return null if (param.kind === 'tools') return this.printTools(block, param.tools) const context = this.context(block, catalogBlock, sb) - if (sb?.structured === 'inputFormat') { + if (sb?.structured === 'inputFormat' && Array.isArray(param.value)) { const sugar = inputFormatSugar(param.value) if (sugar) return this.printInputFormat(block, sugar) + // The record form is the only one the SDK types: an empty list is `{}`, and a list the + // record cannot carry (an integer-like or repeated name, an unknown key) is kept verbatim. + if (param.value.length === 0) return objectExpr([]) + if (isJson(param.value)) return this.values.call('raw', [this.values.json(param.value)]) } if ( this.options.functionCode === 'files' && diff --git a/packages/workflow-sdk/src/codegen/core-text.generated.ts b/packages/workflow-sdk/src/codegen/core-text.generated.ts index c2e1016ebe5..5dee3c801ce 100644 --- a/packages/workflow-sdk/src/codegen/core-text.generated.ts +++ b/packages/workflow-sdk/src/codegen/core-text.generated.ts @@ -1,4 +1,4 @@ // Generated by scripts/generate-core-text.ts from src/core.d.ts; do not edit. /** The text of `core.d.ts`, the workflow SDK authoring declarations. */ -export const CORE_DTS = "/**\n * The authoring surface for Sim workflows written as TypeScript (s2 §2).\n *\n * Nothing declared here runs. `@sim/workflow-code` compiles a workflow file statically, and every\n * runtime export of this package throws `SimSdkNotExecutable`. These declarations exist so an\n * editor, `tsgo --noEmit` or an agent can check a workflow file before the compiler sees it.\n *\n * Block builders (`slack.sendMessage`, `agent`, `trigger.gmail.poller`, ...) are not declared here:\n * they are generated from the block catalog into `blocks/{type}.d.ts`, which augment this module.\n * The generic `block(type, name, params)` covers any stored type without a builder.\n */\n\n/** Plain JSON. */\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json }\n\ndeclare const REF: unique symbol\ndeclare const TEMPLATE: unique symbol\ndeclare const ENV: unique symbol\ndeclare const RESOURCE: unique symbol\ndeclare const TOOL: unique symbol\ndeclare const NODE: unique symbol\ndeclare const FILE_BODY: unique symbol\ndeclare const RAW: unique symbol\n\n/** Any reference, whatever it points at. */\nexport interface AnyRef {\n readonly [REF]: unknown\n}\n\ntype RefPaths = [Json] extends [T]\n ? { readonly [key: string]: Ref }\n : T extends readonly (infer E)[]\n ? { readonly [index: number]: Ref; readonly length: Ref }\n : T extends object\n ? { readonly [K in keyof T]-?: Ref }\n : unknown\n\n/**\n * A typed reference to a block output, compiled to `` (build-spec decision 8).\n * Paths map exactly: `.seg`, `['seg']` and `[n]`. Untyped JSON allows any path.\n */\nexport type Ref = { readonly [REF]: T } & RefPaths\n\n/** Text with references in it, written with one of the tags below. */\nexport type Template = string & { readonly [TEMPLATE]: true }\n\n/** A workspace environment variable, compiled to `{{NAME}}`. */\nexport interface EnvRef {\n readonly [ENV]: string\n}\n\n/** A param value: a literal, a reference, a template or an environment variable. */\nexport type Value = T | AnyRef | Template | EnvRef\n\n/** JSON whose leaves may be references, templates or environment variables. */\nexport type JsonWithRefs =\n | null\n | boolean\n | number\n | string\n | AnyRef\n | Template\n | EnvRef\n | JsonWithRefs[]\n | { [key: string]: JsonWithRefs }\n\n/** A literal union that still accepts any other string (option ids read from values). */\nexport type LiteralUnion = T | (string & {})\n\n/** A `time-input` value, `HH:MM`. */\nexport type TimeString = `${number}:${number}`\n\ntype Interpolation = AnyRef | EnvRef | VarRef | string | number | boolean\n\n/** Text with interpolated references: `` t`New ${cls.category} ticket` ``. */\nexport declare function t(strings: TemplateStringsArray, ...values: Interpolation[]): Template\n/** JavaScript code (condition expressions, inline function code). */\nexport declare const js: typeof t\n/** Python code. */\nexport declare const py: typeof t\n/** Shell code. */\nexport declare const sh: typeof t\n/** JSON text kept verbatim, for bodies an object literal cannot reproduce byte for byte. */\nexport declare const json: typeof t\n/** Markdown text (note content). */\nexport declare const md: typeof t\n\n/** A reference with a non-canonical spelling, such as `ref('Classify.content')`. */\nexport declare function ref(path: string): Ref\n\n/** A stored value outside the generated type (a legacy option id, say), kept verbatim. */\nexport declare function raw(value: unknown): T & { readonly [RAW]: true }\n\n/** A required value that is still missing; compiles to absent, so canvas drafts type-check. */\nexport declare function todo(): never\n\n/** Function code kept in a file next to the workflow (`.js`, `.py` or `.sh`), stored verbatim. */\nexport interface FileBody {\n readonly [FILE_BODY]: string\n}\nexport declare function file(path: `./${string}`): FileBody\n\n/**\n * Environment variable names known to the workspace. `workspace.d.ts` adds one member per name;\n * until it exists `env` accepts any name.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceEnv {}\n\nexport declare const env: keyof WorkspaceEnv extends never\n ? { readonly [name: string]: EnvRef }\n : { readonly [K in keyof WorkspaceEnv]: EnvRef }\n\n/**\n * Workspace resources by stable key, filled in by the generated `workspace.d.ts`. Each map's\n * values describe the resource: a table's row type, a binding's service, a workflow's inputs.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceTables {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceKnowledgeBases {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceBindings {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceWorkflows {}\n\ntype KeyOf = keyof M extends never ? string : Extract\n\nexport type TableKey = KeyOf\nexport type KnowledgeBaseKey = KeyOf\nexport type BindingKey = KeyOf\nexport type WorkflowKey = KeyOf\n\n/** A workspace resource by stable key, compiled to the resource's internal id. */\nexport interface ResourceRef {\n readonly [RESOURCE]: Kind\n readonly key: Key\n}\n\n/** A credential binding: `binding('support-slack')`. */\nexport type Binding = ResourceRef<'credential', Key>\nexport declare function binding(key: K): Binding\n\n/** The columns of a workspace table, or loose JSON when `workspace.d.ts` does not know it. */\nexport type TableColumns = K extends keyof WorkspaceTables\n ? WorkspaceTables[K]\n : { [column: string]: Json }\n/** One stored row: its columns plus the row id. */\nexport type TableRow = TableColumns & { id: string }\n/** Column values written to a row. */\nexport type TableData = K extends keyof WorkspaceTables\n ? { [C in keyof WorkspaceTables[K]]?: Value | JsonWithRefs }\n : { [column: string]: JsonWithRefs }\n\n/** A workspace table: `table('leads')`. Table block operations live on `table.*`. */\nexport type TableRef = ResourceRef<'table', Key>\nexport declare function table(key: K): TableRef\n\n/** A knowledge base: `kb('docs')`. */\nexport type KnowledgeBaseRef = ResourceRef<'knowledge-base', Key>\nexport declare function kb(key: K): KnowledgeBaseRef\n\n/** A workspace skill: `skill('triage')`. */\nexport type SkillRef = ResourceRef<'skill'>\nexport declare function skill(key: string): SkillRef\n\n/** A sandbox image: `sandbox('node-ml')`. */\nexport type SandboxRef = ResourceRef<'sandbox'>\nexport declare function sandbox(key: string): SandboxRef\n\n/** A workspace folder: `folder('reports')`. */\nexport type FolderRef = ResourceRef<'file-folder'>\nexport declare function folder(key: string): FolderRef\n\n/** A workspace file upload: `upload('contracts/acme.pdf')`. */\nexport type Upload = ResourceRef<'file'>\nexport declare function upload(path: string): Upload\n\n/** An opaque provider id chosen in a remote selector: `picked('C0123')`. */\nexport interface Picked {\n readonly [RESOURCE]: 'picked'\n readonly id: string\n}\nexport declare function picked(id: string): Picked\n\n/** A file produced at run time (`file` / `file[]` outputs). */\nexport interface SimFile {\n id: string\n name: string\n url: string\n size: number\n type: string\n key: string\n}\n\n// Agent tools\n\n/** One entry of an agent's `tools` list. */\nexport interface Tool {\n readonly [TOOL]: true\n}\n\n/** How the model may use a tool. */\nexport interface ToolOpts {\n usageControl?: 'auto' | 'force' | 'none'\n usageControlExpression?: string\n title?: string\n}\n\n/** A custom tool by key: `customTool('lookup-order')`. */\nexport declare function customTool(key: string, options?: ToolOpts): Tool\nexport declare namespace customTool {\n /** A custom tool snapshot that has drifted from the workspace tool. */\n function inline(definition: { schema: Json; code: string | Template; title?: string }): Tool\n}\n\n/** An MCP server by key; `mcp('linear').tool('create_issue')`. */\nexport interface McpServerRef extends ResourceRef<'mcp-server'> {\n tool(name: string, options?: ToolOpts & { args?: Record }): Tool\n}\nexport declare function mcp(key: string): McpServerRef\n\n// Graph\n\n/** Block-level fields (`BlockState`), written as the third builder argument. */\nexport interface BlockMeta {\n /**\n * A legacy key the display name cannot carry (a `name~n` collision key or a reserved name such\n * as `Loop`). Printed only for such a stored block; apply accepts it only for a key the stored\n * workflow already has, so it can never introduce one.\n */\n key?: string\n /** Stored as `enabled: false`. */\n disabled?: true\n /** Protected: apply refuses any change to this block. */\n locked?: true\n /** Exposes the error port without an `onError` edge. */\n errorPort?: boolean\n /** The block-level advanced toggle (`advancedMode`). */\n advancedMode?: boolean\n retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number }\n /** Pair modes that cannot be derived from the value written. */\n modes?: Record\n /** Stale values under hidden conditions, kept verbatim. */\n inactive?: Record\n}\n\n/** Anything an edge can point at. */\nexport type Target = Node | Group\n\n/** A block or container in the graph. */\nexport interface Node {\n readonly [NODE]: true\n /** Wires this node's default port to each target. Returns the target, or a group of them. */\n to(...targets: T): T extends [infer One] ? One : Group\n /** Wires this node's error port to each target. */\n onError(...targets: Target[]): void\n}\n\n/** Several nodes; `.to()` wires every member (fan-in). */\nexport interface Group {\n to(...targets: Target[]): Group\n}\n\n/** A block: a node whose outputs can be referenced. */\nexport type Block = Node & Ref\n\n/** The named ports of a condition or router. */\nexport type Branches = { readonly [P in K]: Node }\n\n/** Trigger builders (`trigger.start`, `trigger.gmail.poller`, ...), generated from the catalog. */\nexport declare namespace trigger {}\n\n/** Builders for hidden legacy block versions (`legacy.slack.send`), generated from the catalog. */\nexport declare namespace legacy {}\n\n/** A raw edge from a handle the SDK has no name for (a legacy or unknown port). */\nexport declare function edge(from: Node, handle: string, to: Target): void\n\n/** Any stored block type without a builder (legacy, unknown or custom), with untyped outputs. */\nexport declare function block(\n type: string,\n name: string,\n params: Record,\n meta?: BlockMeta\n): Block\n\n// Workflow and variables\n\nexport type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'plain'\n\nexport interface VariableDeclaration {\n type: VariableType\n value?: Json\n}\n\nexport type VariableDeclarations = Record\n\ndeclare const VAR: unique symbol\n\n/** A workflow variable, compiled to ``. */\nexport interface VarRef {\n readonly [VAR]: string\n}\n\ntype VariableValue = T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'string' | 'plain'\n ? string\n : Json\n\nexport type VarRefs = {\n readonly [K in keyof V]: VarRef & Ref>\n}\n\n/**\n * Workflow variables by name, untyped. Prefer the `vars` the `workflow()` body receives, which is\n * typed from the declared variables.\n */\nexport declare const vars: { readonly [name: string]: VarRef & Ref }\n\ndeclare const WORKFLOW_DEF: unique symbol\n\n/** The default export of a workflow file. */\nexport interface WorkflowDef {\n readonly [WORKFLOW_DEF]: true\n}\n\n/** A child workflow by key, for `runWorkflow` or as an agent tool. */\nexport interface WorkflowRef extends ResourceRef<'workflow', Key> {\n asTool(options?: ToolOpts): Tool\n}\n\n/** Declares a workflow. The body wires blocks; it never runs. */\nexport declare function workflow>(\n name: string,\n options: { description?: string; variables?: V },\n body: (scope: { vars: VarRefs }) => void\n): WorkflowDef\n/** A child workflow by key: `workflow('enrich-lead')`. */\nexport declare function workflow(key: K): WorkflowRef\n\n// Containers\n\ntype ItemOf = C extends { readonly [REF]: readonly (infer E)[] }\n ? E\n : C extends readonly (infer E)[]\n ? E\n : Json\n\n/** Inside a loop or parallel body. */\nexport interface SubflowScope {\n /** The container's start port, into its first child. */\n readonly start: Node\n readonly index: Ref\n readonly currentItem: Ref\n readonly items: Ref\n}\n\nexport interface SubflowOutput {\n results: Json[]\n}\n\n/** A loop or parallel container. Its `.to()` wires the port taken after it finishes. */\nexport type Container = Block\n\ntype Collection = AnyRef | Template | Json[] | string\n\nexport declare const loop: {\n for(\n name: string,\n params: { count: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n forEach(\n name: string,\n params: { collection: C },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n while(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n doWhile(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n}\n\nexport declare const parallel: {\n count(\n name: string,\n params: { count: number; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n collection(\n name: string,\n params: { collection: C; batchSize?: number },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n}\n\n// Blocks with a source form of their own\n\n/**\n * Params and outputs of the blocks below, generated from the catalog. Each entry is\n * `{ params; output }`; without generated types the params are loose.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface SpecialBuilderTypes {}\n\ntype SpecialParams = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { params: infer P }\n ? P\n : never\n : Record\n\ntype SpecialOutput = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { output: infer O }\n ? O\n : never\n : Json\n\n/** A condition expression, or `true` for the `else` branch. */\nexport type BranchExpression = Template | string | true\n\n/**\n * Keys of a condition written with no rows (`condition('Name', {})`, the source form of rows\n * that were never persisted): the implicit `if` and `else` ports stay addressable.\n */\ntype ConditionKeys = keyof B extends never ? 'if' | 'else' : Extract\ntype RouterKeys = keyof R extends never ? 'route0' : Extract\n\n/** A condition: named branches, the last one `else` when there are two or more. */\nexport declare function condition>(\n name: string,\n branches: B,\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A router: named routes described for the model. */\nexport declare function router>(\n name: string,\n params: SpecialParams<'router'> & { routes: R },\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A function block. `code` is inline (`` js`...` ``) or a file (`file('./functions/x.js')`). */\nexport declare function fn(\n name: string,\n params: SpecialParams<'fn'> & { code: Template | FileBody | string },\n meta?: BlockMeta\n): Block>\n\n/** Runs a child workflow. */\nexport declare function runWorkflow(\n name: string,\n params: SpecialParams<'runWorkflow'>,\n meta?: BlockMeta\n): Block>\n\n/** Pauses for a person; the form in `inputFormat` types `submission`. */\nexport declare function human>(\n name: string,\n params: SpecialParams<'human'> & { inputFormat?: F },\n meta?: BlockMeta\n): Block, 'submission'> & { submission: InputFieldsOutput }>\n\n/** Ends the workflow with an API response. */\nexport declare function response(\n name: string,\n params: SpecialParams<'response'>,\n meta?: BlockMeta\n): Block>\n\n/** Assigns workflow variables. */\nexport declare function setVariables(\n name: string,\n params: SpecialParams<'setVariables'>,\n meta?: BlockMeta\n): Block>\n\ndeclare const ANNOTATION: unique symbol\n\n/** A canvas note: no edges, no outputs. */\nexport interface Annotation {\n readonly [ANNOTATION]: true\n}\nexport declare function note(\n name: string,\n params: SpecialParams<'note'>,\n meta?: BlockMeta\n): Annotation\n\n// Structured param shapes\n\n/** Type names an input-format field may declare. */\nexport type InputFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'file[]'\n\n/** A structured input field: its type plus a default value, description or required flag. */\nexport interface InputFieldSpec {\n type: InputFieldType\n value?: JsonWithRefs\n description?: string\n required?: boolean\n}\n\n/** `input-format` fields by name: `{ subject: 'string', amount: { type: 'number', value: 0 } }`. */\nexport type InputFields = Record\n\ntype InputFieldValue = T extends 'string'\n ? string\n : T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'array'\n ? Json[]\n : T extends 'file[]'\n ? SimFile[]\n : Json\n\n/** The outputs an `input-format` declares. */\nexport type InputFieldsOutput = {\n [K in keyof F]: F[K] extends { type: infer T } ? InputFieldValue : InputFieldValue\n}\n\n/** `response-format` fields: `{ ok: true, id: { type: 'string', value: row.id } }`. */\nexport type ResponseFields = Record\n\n/** An agent message. */\nexport interface Message {\n role: 'system' | 'user' | 'assistant'\n content: Value\n}\n\n/** One `variables-input` assignment. */\nexport interface VariableAssignment {\n variable: VarRef\n value: JsonWithRefs\n}\n\n/** Child workflow inputs by name (`input-mapping`, `workflow-input-mapper`). */\nexport type InputMapping = Record\n\n/** A table filter by column: `{ status: { $eq: 'new' } }`. */\nexport type Filter = Record\n\n/** A table sort by column: `{ createdAt: 'desc' }`. */\nexport type Sort =\n | Record\n | Array<{ column: string; direction: 'asc' | 'desc' }>\n\n/** One knowledge tag filter. */\nexport interface TagFilter {\n tagName: string\n tagValue: Value\n [key: string]: JsonWithRefs\n}\n\n/** One document tag. */\nexport interface DocumentTag {\n tagName: string\n value: Value\n [key: string]: JsonWithRefs\n}\n\n/** One `eval-input` metric. */\nexport interface EvalMetric {\n name: string\n description?: string\n range?: { min: number; max: number }\n [key: string]: JsonWithRefs | undefined\n}\n\n/** One `model-fallback-list` entry. */\nexport interface ModelFallback {\n model: LiteralUnion\n [key: string]: JsonWithRefs\n}\n\n/**\n * Model ids, generated into `models.d.ts` (which adds one member per model). Kept apart from the\n * block files so a model-list change touches one file.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface ModelIds {}\nexport type Model = Extract\n\n/** A JSON Schema `responseFormat`, or `{ name, strict, schema }` around one. */\nexport type ResponseFormat = JsonWithRefs\n\ntype Depth = [never, 0, 1, 2, 3, 4]\n\ntype FromSchema = [D] extends [never]\n ? Json\n : S extends { enum: readonly (infer E)[] }\n ? E\n : S extends { type: 'object'; properties: infer P }\n ? { [K in keyof P]: FromSchema }\n : S extends { type: 'array'; items: infer I }\n ? FromSchema[]\n : S extends { type: 'string' }\n ? string\n : S extends { type: 'number' | 'integer' }\n ? number\n : S extends { type: 'boolean' }\n ? boolean\n : Json\n\n/**\n * The outputs a literal `responseFormat` adds, read from its JSON Schema with recursion capped at\n * depth 4. A template or reference adds untyped JSON.\n */\nexport type ResponseFormatOutput = [RF] extends [undefined]\n ? unknown\n : RF extends { schema: infer S }\n ? FromSchema\n : RF extends { type: 'object'; properties: object }\n ? FromSchema\n : { [key: string]: Json }\n" +export const CORE_DTS = "/**\n * The authoring surface for Sim workflows written as TypeScript (s2 §2).\n *\n * Nothing declared here runs. `@sim/workflow-code` compiles a workflow file statically, and every\n * runtime export of this package throws `SimSdkNotExecutable`. These declarations exist so an\n * editor, `tsgo --noEmit` or an agent can check a workflow file before the compiler sees it.\n *\n * Block builders (`slack.sendMessage`, `agent`, `trigger.gmail.poller`, ...) are not declared here:\n * they are generated from the block catalog into `blocks/{type}.d.ts`, which augment this module.\n * The generic `block(type, name, params)` covers any stored type without a builder.\n */\n\n/** Plain JSON. */\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json }\n\ndeclare const REF: unique symbol\ndeclare const TEMPLATE: unique symbol\ndeclare const ENV: unique symbol\ndeclare const RESOURCE: unique symbol\ndeclare const TOOL: unique symbol\ndeclare const NODE: unique symbol\ndeclare const FILE_BODY: unique symbol\ndeclare const RAW: unique symbol\n\n/** Any reference, whatever it points at. */\nexport interface AnyRef {\n readonly [REF]: unknown\n}\n\ntype RefPaths = [Json] extends [T]\n ? { readonly [key: string]: Ref }\n : T extends readonly (infer E)[]\n ? { readonly [index: number]: Ref; readonly length: Ref }\n : T extends object\n ? { readonly [K in keyof T]-?: Ref }\n : unknown\n\n/**\n * A typed reference to a block output, compiled to `` (build-spec decision 8).\n * Paths map exactly: `.seg`, `['seg']` and `[n]`. Untyped JSON allows any path.\n */\nexport type Ref = { readonly [REF]: T } & RefPaths\n\n/** Text with references in it, written with one of the tags below. */\nexport type Template = string & { readonly [TEMPLATE]: true }\n\n/** A workspace environment variable, compiled to `{{NAME}}`. */\nexport interface EnvRef {\n readonly [ENV]: string\n}\n\n/** A param value: a literal, a reference, a template or an environment variable. */\nexport type Value = T | AnyRef | Template | EnvRef\n\n/** JSON whose leaves may be references, templates or environment variables. */\nexport type JsonWithRefs =\n | null\n | boolean\n | number\n | string\n | AnyRef\n | Template\n | EnvRef\n | JsonWithRefs[]\n | { [key: string]: JsonWithRefs }\n\n/** A literal union that still accepts any other string (option ids read from values). */\nexport type LiteralUnion = T | (string & {})\n\n/** A `time-input` value, `HH:MM`. */\nexport type TimeString = `${number}:${number}`\n\ntype Interpolation = AnyRef | EnvRef | VarRef | string | number | boolean\n\n/** Text with interpolated references: `` t`New ${cls.category} ticket` ``. */\nexport declare function t(strings: TemplateStringsArray, ...values: Interpolation[]): Template\n/** JavaScript code (condition expressions, inline function code). */\nexport declare const js: typeof t\n/** Python code. */\nexport declare const py: typeof t\n/** Shell code. */\nexport declare const sh: typeof t\n/** JSON text kept verbatim, for bodies an object literal cannot reproduce byte for byte. */\nexport declare const json: typeof t\n/** Markdown text (note content). */\nexport declare const md: typeof t\n\n/** A reference with a non-canonical spelling, such as `ref('Classify.content')`. */\nexport declare function ref(path: string): Ref\n\n/** A stored value outside the generated type (a legacy option id, say), kept verbatim. */\nexport declare function raw(value: unknown): T & { readonly [RAW]: true }\n\n/** A required value that is still missing; compiles to absent, so canvas drafts type-check. */\nexport declare function todo(): never\n\n/** Function code kept in a file next to the workflow (`.js`, `.py` or `.sh`), stored verbatim. */\nexport interface FileBody {\n readonly [FILE_BODY]: string\n}\nexport declare function file(path: `./${string}`): FileBody\n\n/**\n * Environment variable names known to the workspace. `workspace.d.ts` adds one member per name;\n * until it exists `env` accepts any name.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceEnv {}\n\nexport declare const env: keyof WorkspaceEnv extends never\n ? { readonly [name: string]: EnvRef }\n : { readonly [K in keyof WorkspaceEnv]: EnvRef }\n\n/**\n * Workspace resources by stable key, filled in by the generated `workspace.d.ts`. Each map's\n * values describe the resource: a table's row type, a binding's service, a workflow's inputs.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceTables {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceKnowledgeBases {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceBindings {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceWorkflows {}\n\ntype KeyOf = keyof M extends never ? string : Extract\n\nexport type TableKey = KeyOf\nexport type KnowledgeBaseKey = KeyOf\nexport type BindingKey = KeyOf\nexport type WorkflowKey = KeyOf\n\n/** A workspace resource by stable key, compiled to the resource's internal id. */\nexport interface ResourceRef {\n readonly [RESOURCE]: Kind\n readonly key: Key\n}\n\n/** A credential binding: `binding('support-slack')`. */\nexport type Binding = ResourceRef<'credential', Key>\nexport declare function binding(key: K): Binding\n\n/** The columns of a workspace table, or loose JSON when `workspace.d.ts` does not know it. */\nexport type TableColumns = K extends keyof WorkspaceTables\n ? WorkspaceTables[K]\n : { [column: string]: Json }\n/** One stored row: its columns plus the row id. */\nexport type TableRow = TableColumns & { id: string }\n/** Column values written to a row. */\nexport type TableData = K extends keyof WorkspaceTables\n ? { [C in keyof WorkspaceTables[K]]?: Value | JsonWithRefs }\n : { [column: string]: JsonWithRefs }\n\n/** A workspace table: `table('leads')`. Table block operations live on `table.*`. */\nexport type TableRef = ResourceRef<'table', Key>\nexport declare function table(key: K): TableRef\n\n/** A knowledge base: `kb('docs')`. */\nexport type KnowledgeBaseRef = ResourceRef<'knowledge-base', Key>\nexport declare function kb(key: K): KnowledgeBaseRef\n\n/** A workspace skill: `skill('triage')`. */\nexport type SkillRef = ResourceRef<'skill'>\nexport declare function skill(key: string): SkillRef\n\n/** A sandbox image: `sandbox('node-ml')`. */\nexport type SandboxRef = ResourceRef<'sandbox'>\nexport declare function sandbox(key: string): SandboxRef\n\n/** A workspace folder: `folder('reports')`. */\nexport type FolderRef = ResourceRef<'file-folder'>\nexport declare function folder(key: string): FolderRef\n\n/** A workspace file upload: `upload('contracts/acme.pdf')`. */\nexport type Upload = ResourceRef<'file'>\nexport declare function upload(path: string): Upload\n\n/** An opaque provider id chosen in a remote selector: `picked('C0123')`. */\nexport interface Picked {\n readonly [RESOURCE]: 'picked'\n readonly id: string\n}\nexport declare function picked(id: string): Picked\n\n/** A file produced at run time (`file` / `file[]` outputs). */\nexport interface SimFile {\n id: string\n name: string\n url: string\n size: number\n type: string\n key: string\n}\n\n// Agent tools\n\n/** One entry of an agent's `tools` list. */\nexport interface Tool {\n readonly [TOOL]: true\n}\n\n/** How the model may use a tool, and the stored tool fields a print carries. */\nexport interface ToolOpts {\n usageControl?: 'auto' | 'force' | 'none'\n usageControlExpression?: string\n title?: string\n /** The stored operation, when the method does not pin it. */\n operation?: string\n toolId?: string\n /** Pair modes of the tool's params, which pick the member the agent reads. */\n modes?: Record\n customTool?: JsonWithRefs\n operationPolicy?: Json\n /** Unknown stored tool keys, kept verbatim. */\n extra?: Json\n}\n\n/** A custom tool by key: `customTool('lookup-order')`. */\nexport declare function customTool(key: string, options?: ToolOpts): Tool\nexport declare namespace customTool {\n /** A custom tool snapshot that has drifted from the workspace tool. */\n function inline(definition: { schema: Json; code: string | Template; title?: string }): Tool\n}\n\n/** An MCP server by key; `mcp('linear').tool('create_issue')`. */\nexport interface McpServerRef extends ResourceRef<'mcp-server'> {\n tool(name: string, options?: ToolOpts & { args?: Record }): Tool\n}\nexport declare function mcp(key: string): McpServerRef\n\n// Graph\n\n/** Block-level fields (`BlockState`), written as the third builder argument. */\nexport interface BlockMeta {\n /**\n * A legacy key the display name cannot carry (a `name~n` collision key or a reserved name such\n * as `Loop`). Printed only for such a stored block; apply accepts it only for a key the stored\n * workflow already has, so it can never introduce one.\n */\n key?: string\n /** Stored as `enabled: false`. */\n disabled?: true\n /** Protected: apply refuses any change to this block. */\n locked?: true\n /** Exposes the error port without an `onError` edge. */\n errorPort?: boolean\n /** The block-level advanced toggle (`advancedMode`). */\n advancedMode?: boolean\n retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number }\n /** Runs the block as a trigger, when the builder's own mode differs. */\n triggerMode?: boolean\n /**\n * Pair modes, printed only when the other member would store the value differently. Which\n * member holds a value is otherwise canvas state that apply keeps from the stored workflow.\n */\n modes?: Record\n /** Condition or router rows' stored titles and unknown keys, by branch key. */\n branches?: Record\n /**\n * Values the block keeps but never runs. Source never needs them (apply restores them from the\n * stored workflow); `source get --verbose` prints them. Also the place for a stored field the\n * catalog does not declare that still runs, such as a schema-agnostic custom block's input.\n */\n inactive?: Record\n /** Unknown stored block data, kept verbatim. */\n $unknown?: Json\n}\n\n/** Anything an edge can point at. */\nexport type Target = Node | Group\n\n/** A block or container in the graph. */\nexport interface Node {\n readonly [NODE]: true\n /** Wires this node's default port to each target. Returns the target, or a group of them. */\n to(...targets: T): T extends [infer One] ? One : Group\n /** Wires this node's error port to each target. */\n onError(...targets: Target[]): void\n}\n\n/** Several nodes; `.to()` wires every member (fan-in). */\nexport interface Group {\n to(...targets: Target[]): Group\n}\n\n/** A block: a node whose outputs can be referenced. */\nexport type Block = Node & Ref\n\n/** The named ports of a condition or router. */\nexport type Branches = { readonly [P in K]: Node }\n\n/** Trigger builders (`trigger.start`, `trigger.gmail.poller`, ...), generated from the catalog. */\nexport declare namespace trigger {}\n\n/** Builders for hidden legacy block versions (`legacy.slack.send`), generated from the catalog. */\nexport declare namespace legacy {}\n\n/** A raw edge from a handle the SDK has no name for (a legacy or unknown port). */\nexport declare function edge(from: Node, handle: string, to: Target): void\n\n/** Any stored block type without a builder (legacy, unknown or custom), with untyped outputs. */\nexport declare function block(\n type: string,\n name: string,\n params: Record,\n meta?: BlockMeta\n): Block\n\n// Workflow and variables\n\nexport type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'plain'\n\nexport interface VariableDeclaration {\n type: VariableType\n value?: Json\n}\n\nexport type VariableDeclarations = Record\n\ndeclare const VAR: unique symbol\n\n/** A workflow variable, compiled to ``. */\nexport interface VarRef {\n readonly [VAR]: string\n}\n\ntype VariableValue = T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'string' | 'plain'\n ? string\n : Json\n\nexport type VarRefs = {\n readonly [K in keyof V]: VarRef & Ref>\n}\n\n/**\n * Workflow variables by name, untyped. Prefer the `vars` the `workflow()` body receives, which is\n * typed from the declared variables.\n */\nexport declare const vars: { readonly [name: string]: VarRef & Ref }\n\ndeclare const WORKFLOW_DEF: unique symbol\n\n/** The default export of a workflow file. */\nexport interface WorkflowDef {\n readonly [WORKFLOW_DEF]: true\n}\n\n/** A child workflow by key, for `runWorkflow` or as an agent tool. */\nexport interface WorkflowRef extends ResourceRef<'workflow', Key> {\n asTool(options?: ToolOpts): Tool\n}\n\n/** Declares a workflow. The body wires blocks; it never runs. */\nexport declare function workflow>(\n name: string,\n options: { description?: string; variables?: V },\n body: (scope: { vars: VarRefs }) => void\n): WorkflowDef\n/** A child workflow by key: `workflow('enrich-lead')`. */\nexport declare function workflow(key: K): WorkflowRef\n\n// Containers\n\ntype ItemOf = C extends { readonly [REF]: readonly (infer E)[] }\n ? E\n : C extends readonly (infer E)[]\n ? E\n : Json\n\n/** Inside a loop or parallel body. */\nexport interface SubflowScope {\n /** The container's start port, into its first child. */\n readonly start: Node\n /** Wires the start port to each target (same as `start.to`). */\n to(...targets: T): T extends [infer One] ? One : Group\n readonly index: Ref\n readonly currentItem: Ref\n readonly items: Ref\n}\n\n/**\n * A container's outputs, plus its iteration fields by name (`outer.index`), which is how a block\n * in a nested container reads an outer loop's index or item.\n */\nexport interface SubflowOutput {\n results: Json[]\n index: number\n currentItem: Json\n items: Json[]\n}\n\n/** A loop or parallel container. Its `.to()` wires the port taken after it finishes. */\nexport type Container = Block\n\ntype Collection = AnyRef | Template | Json[] | string\n\nexport declare const loop: {\n for(\n name: string,\n params: { count?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n forEach(\n name: string,\n params: { collection: C },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n while(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n doWhile(\n name: string,\n params: { condition?: Template | string; count?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n}\n\nexport declare const parallel: {\n /** A parallel with no stored type, which the loader runs as `count`. */\n (\n name: string,\n params: { count?: number; collection?: Collection; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n count(\n name: string,\n params: { count: number; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n collection(\n name: string,\n params: { collection: C; batchSize?: number },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n}\n\n// Blocks with a source form of their own\n\n/**\n * Params and outputs of the blocks below, generated from the catalog. Each entry is\n * `{ params; output }`; without generated types the params are loose.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface SpecialBuilderTypes {}\n\ntype SpecialParams = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { params: infer P }\n ? P\n : never\n : Record\n\ntype SpecialOutput = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { output: infer O }\n ? O\n : never\n : Json\n\n/** A condition expression, or `true` for the `else` branch. */\nexport type BranchExpression = Template | string | true\n\n/**\n * Keys of a condition written with no rows (`condition('Name', {})`, the source form of rows\n * that were never persisted): the implicit `if` and `else` ports stay addressable.\n */\ntype ConditionKeys = keyof B extends never ? 'if' | 'else' : Extract\ntype RouterKeys = keyof R extends never ? 'route0' : Extract\n\n/** A condition: named branches, the last one `else` when there are two or more. */\nexport declare function condition>(\n name: string,\n branches: B,\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A router: named routes described for the model. */\nexport declare function router>(\n name: string,\n params: SpecialParams<'router'> & { routes: R },\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A function block. `code` is inline (`` js`...` ``) or a file (`file('./functions/x.js')`). */\nexport declare function fn(\n name: string,\n params: SpecialParams<'fn'> & { code: Template | FileBody | string },\n meta?: BlockMeta\n): Block>\n\n/** Runs a child workflow. */\nexport declare function runWorkflow(\n name: string,\n params: SpecialParams<'runWorkflow'>,\n meta?: BlockMeta\n): Block>\n\n/** Pauses for a person; the form in `inputFormat` types `submission`. */\nexport declare function human>(\n name: string,\n params: SpecialParams<'human'> & { inputFormat?: F },\n meta?: BlockMeta\n): Block, 'submission'> & { submission: InputFieldsOutput }>\n\n/** Ends the workflow with an API response. */\nexport declare function response(\n name: string,\n params: SpecialParams<'response'>,\n meta?: BlockMeta\n): Block>\n\n/** Assigns workflow variables. */\nexport declare function setVariables(\n name: string,\n params: SpecialParams<'setVariables'>,\n meta?: BlockMeta\n): Block>\n\ndeclare const ANNOTATION: unique symbol\n\n/** A canvas note: no edges, no outputs. */\nexport interface Annotation {\n readonly [ANNOTATION]: true\n}\nexport declare function note(\n name: string,\n params: SpecialParams<'note'>,\n meta?: BlockMeta\n): Annotation\n\n// Structured param shapes\n\n/** Type names an input-format field may declare. */\nexport type InputFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'file[]'\n\n/** A structured input field: its type plus a default value, description or required flag. */\nexport interface InputFieldSpec {\n type: InputFieldType\n value?: JsonWithRefs\n description?: string\n required?: boolean\n}\n\n/** `input-format` fields by name: `{ subject: 'string', amount: { type: 'number', value: 0 } }`. */\nexport type InputFields = Record\n\ntype InputFieldValue = T extends 'string'\n ? string\n : T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'array'\n ? Json[]\n : T extends 'file[]'\n ? SimFile[]\n : Json\n\n/** The outputs an `input-format` declares. */\nexport type InputFieldsOutput = {\n [K in keyof F]: F[K] extends { type: infer T } ? InputFieldValue : InputFieldValue\n}\n\n/** `response-format` fields: `{ ok: true, id: { type: 'string', value: row.id } }`. */\nexport type ResponseFields = Record\n\n/** An agent message. */\nexport interface Message {\n role: 'system' | 'user' | 'assistant'\n content: Value\n}\n\n/** One `variables-input` assignment, with any other stored keys kept. */\nexport interface VariableAssignment {\n variableId: VarRef\n value?: JsonWithRefs\n [key: string]: JsonWithRefs | VarRef | undefined\n}\n\n/** Child workflow inputs by name (`input-mapping`, `workflow-input-mapper`). */\nexport type InputMapping = Record\n\n/** A table filter by column: `{ status: { $eq: 'new' } }`. */\nexport type Filter = Record\n\n/** A table sort by column: `{ createdAt: 'desc' }`. */\nexport type Sort =\n | Record\n | Array<{ column: string; direction: 'asc' | 'desc' }>\n\n/** One knowledge tag filter. */\nexport interface TagFilter {\n tagName: string\n tagValue: Value\n [key: string]: JsonWithRefs\n}\n\n/** One document tag. */\nexport interface DocumentTag {\n tagName: string\n value: Value\n [key: string]: JsonWithRefs\n}\n\n/** One `eval-input` metric. */\nexport interface EvalMetric {\n name: string\n description?: string\n range?: { min: number; max: number }\n [key: string]: JsonWithRefs | undefined\n}\n\n/** One `model-fallback-list` entry. */\nexport interface ModelFallback {\n model: LiteralUnion\n [key: string]: JsonWithRefs\n}\n\n/**\n * Model ids, generated into `models.d.ts` (which adds one member per model). Kept apart from the\n * block files so a model-list change touches one file.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface ModelIds {}\nexport type Model = Extract\n\n/** A JSON Schema `responseFormat`, or `{ name, strict, schema }` around one. */\nexport type ResponseFormat = JsonWithRefs\n\ntype Depth = [never, 0, 1, 2, 3, 4]\n\ntype FromSchema = [D] extends [never]\n ? Json\n : S extends { enum: readonly (infer E)[] }\n ? E\n : S extends { type: 'object'; properties: infer P }\n ? { [K in keyof P]: FromSchema }\n : S extends { type: 'array'; items: infer I }\n ? FromSchema[]\n : S extends { type: 'string' }\n ? string\n : S extends { type: 'number' | 'integer' }\n ? number\n : S extends { type: 'boolean' }\n ? boolean\n : Json\n\n/**\n * The outputs a literal `responseFormat` adds, read from its JSON Schema with recursion capped at\n * depth 4. A template or reference adds untyped JSON.\n */\nexport type ResponseFormatOutput = [RF] extends [undefined]\n ? unknown\n : RF extends { schema: infer S }\n ? FromSchema\n : RF extends { type: 'object'; properties: object }\n ? FromSchema\n : { [key: string]: Json }\n" diff --git a/packages/workflow-sdk/src/codegen/generate.ts b/packages/workflow-sdk/src/codegen/generate.ts index e6e6462bef1..d2d290977cc 100644 --- a/packages/workflow-sdk/src/codegen/generate.ts +++ b/packages/workflow-sdk/src/codegen/generate.ts @@ -13,6 +13,7 @@ import { compareStrings } from '@sim/utils/string' import type { BlockCatalog, CatalogBlock, CatalogOutput, CatalogSubBlock } from '@sim/workflow-code' +import { subBlockEditorDefault } from '@sim/workflow-code/catalog/defaults' import { catalogBlock, catalogBlockTypes, catalogTrigger } from '@sim/workflow-code/catalog/view' import { indentLines, jsdoc, literal, pascal, propertyKey, quote, union } from './emit' import { mapSubBlock } from './map-subblock' @@ -142,6 +143,7 @@ function hasDefault(members: readonly CatalogSubBlock[]): boolean { (member) => member.defaultValue !== undefined || (member.valueDefault !== undefined && 'constant' in member.valueDefault) || + subBlockEditorDefault(member) !== undefined || ALWAYS_VALUED_TYPES.has(member.type) ) } @@ -241,10 +243,15 @@ function defaultGateValue( return Array.isArray(subBlock.options) ? subBlock.options[0]?.id : undefined } +/** + * A param whose field canvas creation seeds with an editor default also takes `null`: source + * omits a value equal to the default, and writes `null` for a field stored with no value. + */ function renderProperty(param: Param, required: boolean, indent: string): string[] { + const nullable = param.members.some((member) => subBlockEditorDefault(member) !== undefined) return [ ...jsdoc(param.doc, indent), - `${indent}${propertyKey(param.name)}${required ? '' : '?'}: ${param.type}`, + `${indent}${propertyKey(param.name)}${required ? '' : '?'}: ${param.type}${nullable ? ' | null' : ''}`, ] } diff --git a/packages/workflow-sdk/src/codegen/goldens.test.ts b/packages/workflow-sdk/src/codegen/goldens.test.ts new file mode 100644 index 00000000000..7a8f3aadffb --- /dev/null +++ b/packages/workflow-sdk/src/codegen/goldens.test.ts @@ -0,0 +1,69 @@ +/** + * Every printer golden of `@sim/workflow-code` (lean and verbose) type-checks against what an + * author gets: the shipped `core.d.ts` plus the types generated from the same real-catalog slice + * the goldens are printed with (`print/__fixtures__/real-catalog.json`, drift-checked against the + * registry in apps/sim). A field the printer emits that `core.d.ts` or the generated builders do + * not declare fails here, run by the workspace's TypeScript 7 compiler. + */ +import { mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs' +import { tmpdir } from 'node:os' +import path from 'node:path' +import type { BlockCatalog } from '@sim/workflow-code' +import { describe, expect, it } from 'vitest' +import { typecheck } from '../../test/typecheck-project' +import { generateSdkTypes } from './generate' + +const SDK_ROOT = path.resolve(import.meta.dirname, '../..') +const PRINT_ROOT = path.resolve(SDK_ROOT, '../workflow-code/src/print') +const GOLDEN_DIR = path.join(PRINT_ROOT, '__golden__') + +function loadRealCatalog(): BlockCatalog { + return JSON.parse( + readFileSync(path.join(PRINT_ROOT, '__fixtures__', 'real-catalog.json'), 'utf8') + ) +} + +describe('printer goldens against the shipped SDK types', () => { + it('type-check with core.d.ts and the types generated from the real catalog', () => { + const outDir = mkdtempSync(path.join(tmpdir(), 'sim-sdk-goldens-')) + try { + for (const file of generateSdkTypes(loadRealCatalog())) { + const target = path.join(outDir, 'types', file.path) + mkdirSync(path.dirname(target), { recursive: true }) + writeFileSync(target, file.text) + } + const goldens = readdirSync(GOLDEN_DIR).filter((name) => name.endsWith('.txt')) + mkdirSync(path.join(outDir, 'goldens')) + for (const name of goldens) { + const text = readFileSync(path.join(GOLDEN_DIR, name), 'utf8') + writeFileSync(path.join(outDir, 'goldens', name.replace(/\.txt$/, '.ts')), text) + } + const tsconfig = path.join(outDir, 'tsconfig.json') + writeFileSync( + tsconfig, + JSON.stringify({ + compilerOptions: { + target: 'ES2022', + lib: ['ES2022'], + module: 'ESNext', + moduleResolution: 'bundler', + moduleDetection: 'force', + types: [], + strict: true, + noEmit: true, + skipLibCheck: false, + paths: { '@sim/workflow-sdk': [path.join(SDK_ROOT, 'src', 'core.d.ts')] }, + }, + include: [ + path.join(outDir, 'types', '**', '*.d.ts'), + path.join(outDir, 'goldens', '*.ts'), + ], + }) + ) + expect(goldens.length).toBeGreaterThan(30) + expect(typecheck(tsconfig)).toBe('') + } finally { + rmSync(outDir, { recursive: true, force: true }) + } + }, 120_000) +}) diff --git a/packages/workflow-sdk/src/codegen/map-subblock.ts b/packages/workflow-sdk/src/codegen/map-subblock.ts index d2959042c6b..bd8451682e0 100644 --- a/packages/workflow-sdk/src/codegen/map-subblock.ts +++ b/packages/workflow-sdk/src/codegen/map-subblock.ts @@ -55,14 +55,17 @@ function isKeyValueTable(columns: readonly string[] | undefined): boolean { ) } +/** Table rows as stored (`{ cells }` per row), which is how a print writes them. */ +const STORED_TABLE_ROWS = 'Array<{ cells: Record> }>' + function tableType(subBlock: CatalogSubBlock): string { const { columns } = subBlock - if (isKeyValueTable(columns)) return 'Record>' + if (isKeyValueTable(columns)) return `Record> | ${STORED_TABLE_ROWS}` if (columns && columns.length > 0) { const row = columns.map((column) => `${quote(column)}?: Value`).join('; ') - return `Array<{ ${row} }>` + return `Array<{ ${row} }> | ${STORED_TABLE_ROWS}` } - return 'Record> | Array>>' + return `Record> | Array>> | ${STORED_TABLE_ROWS}` } function codeType(subBlock: CatalogSubBlock): string { diff --git a/packages/workflow-sdk/src/core.d.ts b/packages/workflow-sdk/src/core.d.ts index b0d73f15d31..efde0ad1c59 100644 --- a/packages/workflow-sdk/src/core.d.ts +++ b/packages/workflow-sdk/src/core.d.ts @@ -200,11 +200,20 @@ export interface Tool { readonly [TOOL]: true } -/** How the model may use a tool. */ +/** How the model may use a tool, and the stored tool fields a print carries. */ export interface ToolOpts { usageControl?: 'auto' | 'force' | 'none' usageControlExpression?: string title?: string + /** The stored operation, when the method does not pin it. */ + operation?: string + toolId?: string + /** Pair modes of the tool's params, which pick the member the agent reads. */ + modes?: Record + customTool?: JsonWithRefs + operationPolicy?: Json + /** Unknown stored tool keys, kept verbatim. */ + extra?: Json } /** A custom tool by key: `customTool('lookup-order')`. */ @@ -239,10 +248,23 @@ export interface BlockMeta { /** The block-level advanced toggle (`advancedMode`). */ advancedMode?: boolean retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number } - /** Pair modes that cannot be derived from the value written. */ + /** Runs the block as a trigger, when the builder's own mode differs. */ + triggerMode?: boolean + /** + * Pair modes, printed only when the other member would store the value differently. Which + * member holds a value is otherwise canvas state that apply keeps from the stored workflow. + */ modes?: Record - /** Stale values under hidden conditions, kept verbatim. */ + /** Condition or router rows' stored titles and unknown keys, by branch key. */ + branches?: Record + /** + * Values the block keeps but never runs. Source never needs them (apply restores them from the + * stored workflow); `source get --verbose` prints them. Also the place for a stored field the + * catalog does not declare that still runs, such as a schema-agnostic custom block's input. + */ inactive?: Record + /** Unknown stored block data, kept verbatim. */ + $unknown?: Json } /** Anything an edge can point at. */ @@ -354,13 +376,22 @@ type ItemOf = C extends { readonly [REF]: readonly (infer E)[] } export interface SubflowScope { /** The container's start port, into its first child. */ readonly start: Node + /** Wires the start port to each target (same as `start.to`). */ + to(...targets: T): T extends [infer One] ? One : Group readonly index: Ref readonly currentItem: Ref readonly items: Ref } +/** + * A container's outputs, plus its iteration fields by name (`outer.index`), which is how a block + * in a nested container reads an outer loop's index or item. + */ export interface SubflowOutput { results: Json[] + index: number + currentItem: Json + items: Json[] } /** A loop or parallel container. Its `.to()` wires the port taken after it finishes. */ @@ -371,7 +402,7 @@ type Collection = AnyRef | Template | Json[] | string export declare const loop: { for( name: string, - params: { count: number }, + params: { count?: number }, body: (scope: SubflowScope) => void, meta?: BlockMeta ): Container @@ -389,13 +420,20 @@ export declare const loop: { ): Container doWhile( name: string, - params: { condition: Template | string }, + params: { condition?: Template | string; count?: number }, body: (scope: SubflowScope) => void, meta?: BlockMeta ): Container } export declare const parallel: { + /** A parallel with no stored type, which the loader runs as `count`. */ + ( + name: string, + params: { count?: number; collection?: Collection; batchSize?: number }, + body: (scope: SubflowScope) => void, + meta?: BlockMeta + ): Container count( name: string, params: { count: number; batchSize?: number }, @@ -544,10 +582,11 @@ export interface Message { content: Value } -/** One `variables-input` assignment. */ +/** One `variables-input` assignment, with any other stored keys kept. */ export interface VariableAssignment { - variable: VarRef - value: JsonWithRefs + variableId: VarRef + value?: JsonWithRefs + [key: string]: JsonWithRefs | VarRef | undefined } /** Child workflow inputs by name (`input-mapping`, `workflow-input-mapper`). */ From 99932a3ac8b642de4789e9f3e3ee266f8216a7b3 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 22:59:07 -0800 Subject: [PATCH 124/428] docs(workflow-code): record executable source as amendment A18 and in SYNTAX.md --- packages/workflow-code/DESIGN.md | 63 +++++++++++++++++++ packages/workflow-code/src/compile/SYNTAX.md | 65 +++++++++++++++----- packages/workflow-code/src/model.ts | 11 +++- 3 files changed, 120 insertions(+), 19 deletions(-) diff --git a/packages/workflow-code/DESIGN.md b/packages/workflow-code/DESIGN.md index 0afd85b56f6..29cfb3100ba 100644 --- a/packages/workflow-code/DESIGN.md +++ b/packages/workflow-code/DESIGN.md @@ -264,3 +264,66 @@ instead of failing at run time. - `CompileInput.knownKeys` (the lock's block keys) gates the new `meta.key` override, which is how source carries a legacy `name~n` collision key or a reserved name (`Loop`, `Parallel`) without being able to introduce one. A violation is `E_KEY_OVERRIDE`. +- **A18. Source holds what executes; UI-only state is preserved, never required (Wave 4B1).** + This supersedes build-spec decision 2's printing rule, decision 7's mode and `picked()` rules, + and item 3's "every equality ignores `inactive`" where it says how source carries it. + - **Active** means the serializer sends the value (`extractBlockParams`, after the load-time + migrations) **or**, for a block acting as a trigger, deploy reads it into the webhook provider + config (`buildProviderConfig`, which copies every trigger-mode field of the deployed trigger + except the display-only system ids, visible or not). `canonicalize/activity.ts` mirrors both: + `isInactive` checks `deployReadIds` first, then the `shouldSerializeSubBlock` rule. An opaque + condition counts as satisfied except where the catalog expanded it per operation + (`visibleFor`), which is exact. `inactive.corpus.test.ts` proves, for every corpus workflow, + that no param canonicalize or the executable view treats as inactive reaches the serializer + or deploy (sentinel substitution). + - **`executableView(cwm, catalog)`** (`equivalence/executable.ts`) is the CWM minus preserved UI + state: inactive params (`executableInactiveParams`, over the CWM with its effective modes as + overrides), the pair member and mode (a pair is one param under its `canonicalParamId`), + off-type loop/parallel fields and spellings the runtime reads alike (`count || 5`, + `collection || ''`, clamped `batchSize`), and unknown `block.data` (a container keeps the + subflow keys canonicalize could not read, which the serializer passes through). It takes the + catalog, which the pair and activity rules need. P0 and P1 compare it (`executableEquals`); + O1 still compares stored bytes, and the new **P6** asserts that materializing the compiled lean + print over prev is byte-identical to the stored workflow (a no-op apply changes nothing). + - **The printer is lean by default.** It leaves out inactive values, `picked()` (a plain id is + written as a string), `meta.modes` (except where the other member would store the value + differently: a list or object literal into a JSON code or input-format member), off-type + subflow fields (a `doWhile` with no condition prints its `count`, which then runs), and + unknown residue. An undeclared stored id that still runs (a schema-agnostic custom block's + input, the agent's legacy prompt fields) keeps printing under `meta.inactive`, the only place + source takes an undeclared id. `PrintOptions.verbose` prints the rest, for + `source get --verbose`. + - **Defaults rule.** The editor default of a field is what canvas creation seeds + (`createBlockFromParams` with no inputs, wrapped by `hooks.initBlock`): per subBlock id, first + declaration wins; a visible editable field gets its `value()` thunk's result for a block with + no values (`valueDefault.constant`, or the new `valueDefault.initial` the projection records + for a computed thunk whose creation value is stable); a hidden field gets its `defaultValue`; + a thunk that mints a fresh value per call has none. Every registry default is a scalar, and + only scalars count (`catalog/defaults.ts`). The printer omits a value equal to the default and + prints `null` for an active field with a default and no stored value. Compile fills an omitted + param with its default; `null` and `todo()` stay stored-absent. Materialize already writes a + new block from `initBlock` and nulls only what the CWM leaves absent, so a code-created block + with no params is stored exactly as a canvas-created one (`default-parity.test.ts`, every + registry type and trigger mode; minted values and condition/router placeholder rows aside). + - **Materialize restores preserved state** (`materialize/preserve.ts`) for each matched block of + the same type, before writing: when a pair's executable value is unchanged, prev's members and + mode; when a plain id changed and prev showed the basic selector member of a `picked` pair, + prev's member; then every param inactive under the target's values, from prev (absent + included, so defaults compile filled into fields that never run are dropped); off-type subflow + fields and prev's whole config when it runs the same; unknown residue a lean print does not + carry. A full CWM restores onto itself unchanged, so O1 holds. Source cannot pick a pair + member for a plain id: that is canvas state. + - **The loop count is the one that runs.** `loopSpec` reads `block.data.count`, and an absent + count is the 5 that runs (`convertLoopBlockToLoop`); the loops map's count is read only when the + loader would repair a non-numeric `data.count` from it. The O2 execution view compares + containers through the `loops`/`parallels` maps the executor runs, not the container's echoed + `data`. Corpus subjects take the stored shape: every write path rebuilds the loops map from + the container blocks, so an orphan map entry is never stored. + - **Stored outputs** are rewritten only when `computeOutputs` differs between prev and the edited + block, so a block with stale or empty stored outputs keeps them through an unrelated edit. + - **Goldens run against the real catalog.** `print/__fixtures__/real-catalog.json` is the slice of + `buildBlockCatalog` the golden cases use (compacted and hashed like the core shard), rebuilt + and drift-checked by `apps/sim/lib/workflows/code/golden-catalog.test.ts`. Cases are canvas + blocks of current types (editor defaults seeded). `workflow-sdk`'s `goldens.test.ts` + type-checks every golden, lean and verbose, with `core.d.ts` plus the types generated from + that slice. `print/__fixtures__/catalog.ts` stays for unit tests. diff --git a/packages/workflow-code/src/compile/SYNTAX.md b/packages/workflow-code/src/compile/SYNTAX.md index 462d933c868..cdb522bd472 100644 --- a/packages/workflow-code/src/compile/SYNTAX.md +++ b/packages/workflow-code/src/compile/SYNTAX.md @@ -1,9 +1,23 @@ # Workflow source syntax the compiler accepts -The compiler (`compileWorkflow`) accepts exactly what the Wave 2C printer emits, plus a few -hand-written conveniences listed under "Also accepted". `printer-goldens.test.ts` compiles every -printer golden with zero errors back to its canonical workflow. Where s2 and s3 disagreed, the -printer's choice (build-spec first, then s2) was taken. +The compiler (`compileWorkflow`) accepts exactly what the printer emits, lean or verbose, plus a +few hand-written conveniences listed under "Also accepted". `printer-goldens.test.ts` compiles +every printer golden, over the real catalog, with zero errors to a workflow that runs as the one it +was printed from. Where s2 and s3 disagreed, the printer's choice (build-spec first, then s2) was +taken. + +**Source holds what executes** (DESIGN.md A18). A file states every value the serializer sends or +deploy reads, wiring, branches and the config of the loop or parallel type in effect. What only +the canvas cares about is never required: which member of a basic/advanced pair shows a value, +whether a selector or a typed value produced an id, inactive values, the other loop or parallel +types' fields, layout and unknown residue. Apply keeps it from the stored workflow. The default +print leaves it out; `sim workflows source get --verbose` prints it, and the compiler still +accepts it. + +**Defaults rule.** An omitted param is the editor default canvas creation writes (the catalog's +`valueDefault` for a visible field, `defaultValue` for a hidden one), so a block written with no +params is stored as a canvas-created one. `null` is stored-absent. The printer omits a value equal +to the default and writes `null` for an active field that has a default but no stored value. ## File @@ -28,12 +42,21 @@ printer's choice (build-spec first, then s2) was taken. id (`operation`, a builder's `fixed`) is `E_FIXED_PARAM`; the compiler adds pinned values. - Pair mode: a selector call (`binding`, `table`, `kb`, `workflow`, `skill`, `customTool`, `mcp`, `sandbox`, `folder`, `upload`, `picked`) or a non-empty array of them is basic, anything else - advanced. `meta.modes` always wins (it is printed exactly when derivation would be wrong), so - the compiler never emits `E_MODE_CONFLICT`. Every group on the block gets a mode; an unwritten - group without `meta.modes` is `basic`. + advanced. `meta.modes` always wins, so the compiler never emits `E_MODE_CONFLICT`. Every group + on the block gets a mode; an unwritten group without `meta.modes` is `basic`. On apply the mode + is canvas state: when the pair's value is unchanged the stored member and mode stay, and a plain + id written where the stored block shows the selector member stays in that member. The lean + printer writes `meta.modes` only where the value kind would pick a member that stores the value + differently (a list or object literal into a JSON code or input-format member); the verbose + printer writes it wherever derivation would be wrong. - `meta`: `key`, `disabled`, `locked`, `advancedMode`, `triggerMode` (any builder), `errorPort`, `retry: { enabled, maxTries, waitBetweenTriesMs }`, `modes`, `branches`, `inactive`, - `$unknown` (opaque `block.data`, plain JSON). + `$unknown` (opaque `block.data`, plain JSON). The lean printer writes `$unknown` only for a + container's unreadable subflow keys, which the serializer passes through; apply keeps the rest + from the stored workflow. +- A builder prints only blocks on its own surface: a trigger-mode builder never prints an action + block, nor an action builder a block in trigger mode (a trigger block's builders fit either); + such a block prints through `block()`. - `meta.key: ''` (a string literal) keeps a legacy key that the display name cannot carry. The printer writes it only for such a block, and the compiler accepts it only when the key is in `CompileInput.knownKeys` (the stored workflow's keys, from the lock or `code_meta`) and is one of @@ -49,15 +72,22 @@ printer's choice (build-spec first, then s2) was taken. - `errorPort` in the CWM is `meta.errorPort || the block has an error edge`. - `inactive: { : value }` accepts any id (annotated stale values, the non-effective pair member, ids the catalog does not know). Each id becomes a param and is listed in - `annotations.inactive`. + `annotations.inactive`. Source never needs it: apply restores every value that does not run + from the stored workflow, whatever `inactive` says. The lean printer writes it only for a stored + id the catalog does not declare that still runs (a schema-agnostic custom block's input, the + agent's legacy prompt fields); the verbose printer lists every inactive value. ## Values -- Literals, objects, arrays, `-number`. `null` as a whole param means absent; nested `null` is - kept. A plain object with a `$sim` key is data and compiles to `{ $sim: 'literal', value }`. +- Literals, objects, arrays, `-number`. `null` as a whole param means absent (no editor default + fills it); nested `null` is kept. An omitted param is its editor default. A plain object with a + `$sim` key is data and compiles to `{ $sim: 'literal', value }`. - `raw(v)`: the CWM value verbatim (literals only). `$sim` objects inside are canonical nodes, shape-checked; a `literal` node's `value` is not inspected. -- `todo()`: absent, with `W_REQUIRED_MISSING` when the field is required. +- `todo()`: absent (no editor default fills it), with `W_REQUIRED_MISSING` when the field is + required. +- A plain string is fine where a selector is expected (`channel: 'C0123'`); `picked('C0123')` is + only what the verbose printer writes for a selector-picked id. - Strings: `'...'`, untagged templates without `${}`, and `t`/`js`/`py`/`sh`/`json`/`md` tagged templates (cooked text). Interpolations: refs, `env.X`, `vars.x`, loop params, `ref('raw')`, string and number literals. @@ -73,8 +103,9 @@ printer's choice (build-spec first, then s2) was taken. - A JSON code field (subBlock type `code`) written as an object or array literal compiles to `JSON.stringify(value, null, 2)`. - inputFormat (`structured: 'inputFormat'`) as a record: `name: 'string'` → - `{ name, type: 'string', value: '' }`; `name: { type, ... }` → `{ name, type, ... }`. Arrays - pass through. + `{ name, type: 'string', value: '' }`; `name: { type, ... }` → `{ name, type, ... }`; `{}` is the + empty list. Arrays pass through; the printer writes a list the record cannot carry (an + integer-like or repeated name, an unknown key) as `raw([...])`. - Function code: `code: file('./functions/x.js')`, relative to the entry file, extension matching `language` (default `javascript`). JavaScript files have `$ref`/`$env` chains rewritten back (`src/code-files`); Python and shell are verbatim. @@ -96,13 +127,15 @@ printer's choice (build-spec first, then s2) was taken. ## Containers - `loop.for('N', { count })`, `loop.forEach('N', { collection })`, - `loop.while('N', { condition })`, `loop.doWhile('N', { condition })`, + `loop.while('N', { condition })`, `loop.doWhile('N', { condition, count })` (a `doWhile` with no + condition runs `count` iterations), `parallel.count('N', { count, batchSize })`, `parallel.collection('N', { collection, batchSize })`, and bare `parallel('N', { count, collection, batchSize })` (no `parallelType`). - Third argument: `(p) => { ... }`, or `(p) => block(...)` which implies `p.to(block)`. - The type's other stored fields go under `meta.inactive` by CWM name (`iterations`, `forEachItems`, `whileCondition`, `doWhileCondition`, `count`, `distribution`); other inactive - keys are container params. A loop with no `iterations` anywhere gets 5. + keys are container params. Only the verbose printer writes them, and apply keeps them from the + stored workflow either way. A loop with no `iterations` anywhere gets 5, the count that runs. - `p.x` is `` / `` when `p`'s container is the innermost of its kind around the block, else the named ``. `container.results` / `container.index` are named refs. diff --git a/packages/workflow-code/src/model.ts b/packages/workflow-code/src/model.ts index 4a0eeee6ee6..f70a4270105 100644 --- a/packages/workflow-code/src/model.ts +++ b/packages/workflow-code/src/model.ts @@ -196,7 +196,10 @@ export interface CanonicalBranchRow { export interface LoopSpec { kind: 'loop' loopType: 'for' | 'forEach' | 'while' | 'doWhile' - /** Raw stored count, `0` kept with `W_CANON_SUBFLOW_REPAIRED` (s1 quirk 19, load.ts:186-245). */ + /** + * The count that runs: `block.data.count` raw (`0` kept with `W_CANON_SUBFLOW_REPAIRED`; the + * runtime reads `count || 5`), or 5 when `data` has none (s1 quirk 19, load.ts:186-245). + */ iterations: number forEachItems?: Json whileCondition?: string @@ -351,8 +354,10 @@ export interface CodeComment { export interface WorkflowAnnotations { /** * Per block, the param ids whose value is stored but not serialized under the current values - * (mirrors `shouldSerializeSubBlock`; opaque catalog conditions count as active). The printer - * emits them under the block's `inactive: {...}` meta (build-spec decision 2). + * and not read by deploy (`canonicalize/activity.ts`; opaque catalog conditions count as + * active unless expanded per operation). Source leaves them out and apply restores them from the + * stored workflow; a verbose print lists them under the block's `inactive: {...}` meta + * (DESIGN.md A18). */ inactive: Record /** From da285947f9229f3f2e0b6e12ecd4234d47ec2a12 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 23:01:24 -0800 Subject: [PATCH 125/428] refactor(workflow-code): drop the unused executableEquals helper --- packages/workflow-code/DESIGN.md | 2 +- packages/workflow-code/src/equivalence/index.ts | 14 -------------- packages/workflow-code/src/index.ts | 7 +------ 3 files changed, 2 insertions(+), 21 deletions(-) diff --git a/packages/workflow-code/DESIGN.md b/packages/workflow-code/DESIGN.md index 29cfb3100ba..3b1b7121229 100644 --- a/packages/workflow-code/DESIGN.md +++ b/packages/workflow-code/DESIGN.md @@ -282,7 +282,7 @@ instead of failing at run time. off-type loop/parallel fields and spellings the runtime reads alike (`count || 5`, `collection || ''`, clamped `batchSize`), and unknown `block.data` (a container keeps the subflow keys canonicalize could not read, which the serializer passes through). It takes the - catalog, which the pair and activity rules need. P0 and P1 compare it (`executableEquals`); + catalog, which the pair and activity rules need. P0 and P1 compare it; O1 still compares stored bytes, and the new **P6** asserts that materializing the compiled lean print over prev is byte-identical to the stored workflow (a no-op apply changes nothing). - **The printer is lean by default.** It leaves out inactive values, `picked()` (a plain id is diff --git a/packages/workflow-code/src/equivalence/index.ts b/packages/workflow-code/src/equivalence/index.ts index 52993765145..711ac2cdefa 100644 --- a/packages/workflow-code/src/equivalence/index.ts +++ b/packages/workflow-code/src/equivalence/index.ts @@ -5,10 +5,8 @@ import type { CanonicalEqualsFn, CanonicalHashFn, SourceFingerprintFn } from '../api' import { compareEdges } from '../canonicalize/edges' -import type { BlockCatalog } from '../catalog/types' import { sha256Hex, stableStringify } from '../hash' import type { CanonicalWorkflow } from '../model' -import { executableView } from './executable' /** The semantic part of a CWM: everything but annotations, with edges in canonical order. */ function semantic(workflow: CanonicalWorkflow) { @@ -57,15 +55,3 @@ export const canonicalHash: CanonicalHashFn = (workflow) => */ export const sourceFingerprint: SourceFingerprintFn = (workflow, identity) => `sf1:${sha256Hex(stableStringify({ workflow: semantic(workflow), identity }))}` - -/** - * Whether two workflows run the same: their executable views (`executable.ts`) are equal. P0 and - * P1 hold under this; O1 still compares stored bytes. - */ -export function executableEquals( - a: CanonicalWorkflow, - b: CanonicalWorkflow, - catalog: BlockCatalog -): boolean { - return deepEqual(executableView(a, catalog), executableView(b, catalog)) -} diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index 530f5698536..453bd92558f 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -127,12 +127,7 @@ export { type SourceSpan, } from './diagnostics/frame' export { diffCanonical, renamesBetween } from './diff' -export { - canonicalEquals, - canonicalHash, - executableEquals, - sourceFingerprint, -} from './equivalence' +export { canonicalEquals, canonicalHash, sourceFingerprint } from './equivalence' export { type ExecutableBlock, type ExecutableSubflow, From db51562f62ab274cf88204a257a0216515f1979f Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 23:14:50 -0800 Subject: [PATCH 126/428] test(workflow-code): rebuild the real-catalog golden slice with per-operation visibility data 4C's contract added visibleWhen/visibleForModel to catalog subblocks, so 4B1's real-catalog snapshot drifted on merge. --- packages/workflow-code/src/print/__fixtures__/real-catalog.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/workflow-code/src/print/__fixtures__/real-catalog.json b/packages/workflow-code/src/print/__fixtures__/real-catalog.json index e5cc8e41a1a..c976f2c51b5 100644 --- a/packages/workflow-code/src/print/__fixtures__/real-catalog.json +++ b/packages/workflow-code/src/print/__fixtures__/real-catalog.json @@ -1 +1 @@ -{"catalogVersion":1,"sdkMajor":1,"builders":{"agent":{"type":"agent"},"api":{"type":"api"},"condition":{"type":"condition"},"fn":{"type":"function"},"gmail.addLabel":{"type":"gmail_v2","operation":"add_label_gmail"},"gmail.archiveEmail":{"type":"gmail_v2","operation":"archive_gmail"},"gmail.createLabel":{"type":"gmail_v2","operation":"create_label_gmail"},"gmail.deleteDraft":{"type":"gmail_v2","operation":"delete_draft_gmail"},"gmail.deleteEmail":{"type":"gmail_v2","operation":"delete_gmail"},"gmail.deleteLabel":{"type":"gmail_v2","operation":"delete_label_gmail"},"gmail.draftEmail":{"type":"gmail_v2","operation":"draft_gmail"},"gmail.editDraft":{"type":"gmail_v2","operation":"edit_draft_gmail"},"gmail.getDraft":{"type":"gmail_v2","operation":"get_draft_gmail"},"gmail.getThread":{"type":"gmail_v2","operation":"get_thread_gmail"},"gmail.listDrafts":{"type":"gmail_v2","operation":"list_drafts_gmail"},"gmail.listLabels":{"type":"gmail_v2","operation":"list_labels_gmail"},"gmail.listThreads":{"type":"gmail_v2","operation":"list_threads_gmail"},"gmail.markAsRead":{"type":"gmail_v2","operation":"mark_read_gmail"},"gmail.markAsUnread":{"type":"gmail_v2","operation":"mark_unread_gmail"},"gmail.moveEmail":{"type":"gmail_v2","operation":"move_gmail"},"gmail.readEmail":{"type":"gmail_v2","operation":"read_gmail"},"gmail.removeLabel":{"type":"gmail_v2","operation":"remove_label_gmail"},"gmail.searchEmail":{"type":"gmail_v2","operation":"search_gmail"},"gmail.sendEmail":{"type":"gmail_v2","operation":"send_gmail"},"gmail.trashThread":{"type":"gmail_v2","operation":"trash_thread_gmail"},"gmail.unarchiveEmail":{"type":"gmail_v2","operation":"unarchive_gmail"},"gmail.untrashThread":{"type":"gmail_v2","operation":"untrash_thread_gmail"},"gmail.updateLabel":{"type":"gmail_v2","operation":"update_label_gmail"},"note":{"type":"note"},"response":{"type":"response"},"router":{"type":"router_v2"},"setVariables":{"type":"variables"},"slack.addBookmark":{"type":"slack_v2","operation":"add_bookmark"},"slack.addReaction":{"type":"slack_v2","operation":"react"},"slack.archiveConversation":{"type":"slack_v2","operation":"archive_conversation"},"slack.closeConversation":{"type":"slack_v2","operation":"close_conversation"},"slack.createCanvas":{"type":"slack_v2","operation":"canvas"},"slack.createChannelCanvas":{"type":"slack_v2","operation":"create_channel_canvas"},"slack.createConversation":{"type":"slack_v2","operation":"create_conversation"},"slack.createList":{"type":"slack_v2","operation":"create_list"},"slack.createListItem":{"type":"slack_v2","operation":"create_list_item"},"slack.createUserGroup":{"type":"slack_v2","operation":"create_user_group"},"slack.deleteCanvas":{"type":"slack_v2","operation":"delete_canvas"},"slack.deleteFile":{"type":"slack_v2","operation":"delete_file"},"slack.deleteListItem":{"type":"slack_v2","operation":"delete_list_item"},"slack.deleteListItems":{"type":"slack_v2","operation":"delete_list_items"},"slack.deleteMessage":{"type":"slack_v2","operation":"delete"},"slack.deleteScheduledMessage":{"type":"slack_v2","operation":"delete_scheduled_message"},"slack.disableUserGroup":{"type":"slack_v2","operation":"disable_user_group"},"slack.downloadFile":{"type":"slack_v2","operation":"download"},"slack.editBookmark":{"type":"slack_v2","operation":"edit_bookmark"},"slack.editCanvas":{"type":"slack_v2","operation":"edit_canvas"},"slack.enableUserGroup":{"type":"slack_v2","operation":"enable_user_group"},"slack.findUserByEmail":{"type":"slack_v2","operation":"lookup_user_by_email"},"slack.getCanvasInfo":{"type":"slack_v2","operation":"get_canvas"},"slack.getChannelHistory":{"type":"slack_v2","operation":"get_channel_history"},"slack.getChannelInfo":{"type":"slack_v2","operation":"get_channel_info"},"slack.getDoNotDisturbInfo":{"type":"slack_v2","operation":"get_dnd_info"},"slack.getFileInfo":{"type":"slack_v2","operation":"get_file_info"},"slack.getListExport":{"type":"slack_v2","operation":"get_list_export"},"slack.getListItem":{"type":"slack_v2","operation":"get_list_item"},"slack.getMessage":{"type":"slack_v2","operation":"get_message"},"slack.getMessagePermalink":{"type":"slack_v2","operation":"get_permalink"},"slack.getReactions":{"type":"slack_v2","operation":"get_reactions"},"slack.getTeamDoNotDisturbInfo":{"type":"slack_v2","operation":"get_team_dnd_info"},"slack.getThread":{"type":"slack_v2","operation":"get_thread"},"slack.getThreadReplies":{"type":"slack_v2","operation":"get_thread_replies"},"slack.getUserInfo":{"type":"slack_v2","operation":"get_user"},"slack.getUserPresence":{"type":"slack_v2","operation":"get_user_presence"},"slack.getUserProfile":{"type":"slack_v2","operation":"get_user_profile"},"slack.getWorkspaceInfo":{"type":"slack_v2","operation":"get_team_info"},"slack.getWorkspaceProfileFields":{"type":"slack_v2","operation":"get_team_profile"},"slack.inviteToConversation":{"type":"slack_v2","operation":"invite_to_conversation"},"slack.joinConversation":{"type":"slack_v2","operation":"join_conversation"},"slack.leaveConversation":{"type":"slack_v2","operation":"leave_conversation"},"slack.listBookmarks":{"type":"slack_v2","operation":"list_bookmarks"},"slack.listCanvases":{"type":"slack_v2","operation":"list_canvases"},"slack.listChannelMembers":{"type":"slack_v2","operation":"list_members"},"slack.listChannels":{"type":"slack_v2","operation":"list_channels"},"slack.listCustomEmoji":{"type":"slack_v2","operation":"list_emoji"},"slack.listFiles":{"type":"slack_v2","operation":"list_files"},"slack.listPins":{"type":"slack_v2","operation":"list_pins"},"slack.listReactions":{"type":"slack_v2","operation":"list_reactions"},"slack.listScheduledMessages":{"type":"slack_v2","operation":"list_scheduled_messages"},"slack.listUserConversations":{"type":"slack_v2","operation":"list_user_conversations"},"slack.listUserGroupMembers":{"type":"slack_v2","operation":"list_user_group_members"},"slack.listUserGroups":{"type":"slack_v2","operation":"list_user_groups"},"slack.listUsers":{"type":"slack_v2","operation":"list_users"},"slack.lookupCanvasSections":{"type":"slack_v2","operation":"lookup_canvas_sections"},"slack.markConversationRead":{"type":"slack_v2","operation":"mark_conversation_read"},"slack.openConversation":{"type":"slack_v2","operation":"open_conversation"},"slack.openView":{"type":"slack_v2","operation":"open_view"},"slack.pinMessage":{"type":"slack_v2","operation":"pin_message"},"slack.publishView":{"type":"slack_v2","operation":"publish_view"},"slack.pushView":{"type":"slack_v2","operation":"push_view"},"slack.readListItems":{"type":"slack_v2","operation":"list_items"},"slack.readMessages":{"type":"slack_v2","operation":"read"},"slack.removeBookmark":{"type":"slack_v2","operation":"remove_bookmark"},"slack.removeReaction":{"type":"slack_v2","operation":"unreact"},"slack.removeUserFromConversation":{"type":"slack_v2","operation":"kick_conversation"},"slack.renameAgentSession":{"type":"slack_v2","operation":"rename_agent_session"},"slack.renameConversation":{"type":"slack_v2","operation":"rename_conversation"},"slack.revokeCanvasAccess":{"type":"slack_v2","operation":"revoke_canvas_access"},"slack.revokeListAccess":{"type":"slack_v2","operation":"revoke_list_access"},"slack.scheduleMessage":{"type":"slack_v2","operation":"schedule_message"},"slack.sendEphemeralMessage":{"type":"slack_v2","operation":"ephemeral"},"slack.sendMessage":{"type":"slack_v2","operation":"send"},"slack.setAgentSessionStatus":{"type":"slack_v2","operation":"set_agent_session_status"},"slack.setAgentSuggestedPrompts":{"type":"slack_v2","operation":"set_agent_suggested_prompts"},"slack.setAssistantStatus":{"type":"slack_v2","operation":"set_status"},"slack.setAssistantSuggestedPrompts":{"type":"slack_v2","operation":"set_suggested_prompts"},"slack.setAssistantTitle":{"type":"slack_v2","operation":"set_title"},"slack.setBotPresence":{"type":"slack_v2","operation":"set_user_presence"},"slack.setConversationPurpose":{"type":"slack_v2","operation":"set_conversation_purpose"},"slack.setConversationTopic":{"type":"slack_v2","operation":"set_conversation_topic"},"slack.shareCanvas":{"type":"slack_v2","operation":"share_canvas"},"slack.shareList":{"type":"slack_v2","operation":"share_list"},"slack.startListExport":{"type":"slack_v2","operation":"start_list_export"},"slack.unarchiveConversation":{"type":"slack_v2","operation":"unarchive_conversation"},"slack.unfurlLinks":{"type":"slack_v2","operation":"unfurl_links"},"slack.unpinMessage":{"type":"slack_v2","operation":"unpin_message"},"slack.updateList":{"type":"slack_v2","operation":"rename_list"},"slack.updateListItems":{"type":"slack_v2","operation":"update_list_items"},"slack.updateMessage":{"type":"slack_v2","operation":"update"},"slack.updateUserGroup":{"type":"slack_v2","operation":"update_user_group"},"slack.updateUserGroupMembers":{"type":"slack_v2","operation":"update_user_group_members"},"slack.updateView":{"type":"slack_v2","operation":"update_view"},"table.batchInsertRows":{"type":"table_v2","operation":"batch_insert_rows"},"table.deleteRowById":{"type":"table_v2","operation":"delete_row"},"table.deleteRowsByFilter":{"type":"table_v2","operation":"delete_rows_by_filter"},"table.getRowById":{"type":"table_v2","operation":"get_row"},"table.getSchema":{"type":"table_v2","operation":"get_schema"},"table.insertRow":{"type":"table_v2","operation":"insert_row"},"table.queryRows":{"type":"table_v2","operation":"query_rows"},"table.updateRowById":{"type":"table_v2","operation":"update_row"},"table.updateRowsByFilter":{"type":"table_v2","operation":"update_rows_by_filter"},"table.upsertRow":{"type":"table_v2","operation":"upsert_row"},"trigger.gmail.poller":{"type":"gmail_v2","triggerMode":true},"trigger.slack.oauth":{"type":"slack_v2","triggerMode":true},"trigger.start":{"type":"start_trigger"},"trigger.table.newRow":{"type":"table_v2","triggerMode":true},"trigger.webhook":{"type":"generic_webhook"}},"blocks":{"agent":{"type":"agent","name":"Agent","category":"blocks","tools":{"access":["openai_chat","anthropic_chat","google_chat","xai_chat","deepseek_chat","deepseek_reasoner"],"selector":"opaque"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"dynamicOutputs":{"source":"responseFormat","param":"responseFormat"},"subBlocks":[{"id":"messages","type":"messages-input","valueKind":"array","storage":"native","title":"Messages","condition":{"field":"model","value":{"list":0},"not":true}},{"id":"model","type":"combobox","valueKind":"string","storage":"native","title":"Model","defaultValue":"claude-sonnet-5-5","required":true,"options":[{"id":"jev-latest"},{"id":"jev-1.13.0"},{"id":"jev-preview"},{"id":"nebius/deepseek-ai/DeepSeek-V4-Pro-0813"},{"id":"nebius/google/gemma-3-27b-it"},{"id":"nebius/MiniMaxAI/MiniMax-M3"},{"id":"nebius/moonshotai/Kimi-K3"},{"id":"nebius/NousResearch/Hermes-4-405B"},{"id":"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B"},{"id":"nebius/nvidia/nemotron-3-super-120b-a12b"},{"id":"nebius/nvidia/Nemotron-3-Ultra-550b-a55b"},{"id":"nebius/nvidia/Nemotron-3_5-Lightning"},{"id":"nebius/openai/gpt-oss-120b"},{"id":"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3.8-27B"},{"id":"nebius/zai-org/GLM-5.2"},{"id":"nebius/zai-org/GLM-5.3"},{"id":"nebius/zai-org/GLM-5.3-Flash"},{"id":"thinkingmachines/inkling-small"},{"id":"thinkingmachines/inkling"},{"id":"thinkingmachines/inkling-2-small"},{"id":"gpt-6.1-terra"},{"id":"gpt-6.1-sol"},{"id":"gpt-6-sol"},{"id":"gpt-6-luna"},{"id":"gpt-6-astra"},{"id":"gpt-5.6-sol"},{"id":"gpt-5.6-terra"},{"id":"gpt-5.6-luna"},{"id":"chat-latest"},{"id":"gpt-5.5-pro"},{"id":"gpt-5.5"},{"id":"gpt-5.4-mini"},{"id":"gpt-5.4-nano"},{"id":"gpt-5.4-pro"},{"id":"gpt-5.4"},{"id":"gpt-5.3-codex"},{"id":"gpt-5.2-pro"},{"id":"gpt-5.2"},{"id":"gpt-5.1"},{"id":"gpt-5-pro"},{"id":"gpt-5"},{"id":"gpt-5-mini"},{"id":"gpt-5-nano"},{"id":"o3-pro"},{"id":"o4-mini"},{"id":"o3"},{"id":"gpt-4.1"},{"id":"gpt-4.1-mini"},{"id":"o3-mini"},{"id":"o1"},{"id":"gpt-4o"},{"id":"claude-fable-5-2"},{"id":"claude-haiku-5-5"},{"id":"claude-sonnet-5-5"},{"id":"claude-opus-5-5"},{"id":"claude-fable-5-1"},{"id":"claude-opus-5"},{"id":"claude-sonnet-5"},{"id":"claude-fable-5"},{"id":"claude-opus-4-8"},{"id":"claude-opus-4-7"},{"id":"claude-sonnet-4-6"},{"id":"claude-opus-4-6"},{"id":"claude-opus-4-5"},{"id":"claude-haiku-4-5"},{"id":"claude-sonnet-4-5"},{"id":"azure/gpt-6.1-sol"},{"id":"azure/gpt-6-sol"},{"id":"azure/gpt-6-luna"},{"id":"azure/gpt-6-astra"},{"id":"azure/gpt-5.6-sol"},{"id":"azure/gpt-5.6-terra"},{"id":"azure/gpt-5.6-luna"},{"id":"azure/gpt-5.5"},{"id":"azure/gpt-5.4-mini"},{"id":"azure/gpt-5.4-nano"},{"id":"azure/gpt-5.4-pro"},{"id":"azure/gpt-5.4"},{"id":"azure/gpt-5.2"},{"id":"azure/gpt-5.1"},{"id":"azure/gpt-5.1-codex"},{"id":"azure/gpt-5"},{"id":"azure/gpt-5-mini"},{"id":"azure/gpt-5-nano"},{"id":"azure/gpt-5-chat"},{"id":"azure/model-router"},{"id":"azure/o3"},{"id":"azure/o4-mini"},{"id":"azure/gpt-4.1"},{"id":"azure/gpt-4.1-mini"},{"id":"azure/gpt-4.1-nano"},{"id":"azure/gpt-4o"},{"id":"azure-anthropic/claude-haiku-5-5"},{"id":"azure-anthropic/claude-sonnet-5-5"},{"id":"azure-anthropic/claude-opus-5-5"},{"id":"azure-anthropic/claude-fable-5-1"},{"id":"azure-anthropic/claude-opus-5"},{"id":"azure-anthropic/claude-sonnet-5"},{"id":"azure-anthropic/claude-opus-4-8"},{"id":"azure-anthropic/claude-opus-4-7"},{"id":"azure-anthropic/claude-sonnet-4-6"},{"id":"azure-anthropic/claude-opus-4-6"},{"id":"azure-anthropic/claude-opus-4-5"},{"id":"azure-anthropic/claude-haiku-4-5"},{"id":"azure-anthropic/claude-sonnet-4-5"},{"id":"azure-anthropic/claude-opus-4-1"},{"id":"gemini-4-argon"},{"id":"gemini-3.8-flash"},{"id":"gemini-3.7-flash"},{"id":"gemini-3.6-flash"},{"id":"gemini-3.5-flash-lite"},{"id":"gemini-3.5-flash"},{"id":"gemini-3.1-flash-lite"},{"id":"gemini-3.1-pro-preview"},{"id":"gemini-3-flash-preview"},{"id":"deep-research-pro-preview-12-2025"},{"id":"gemini-2.5-flash-lite"},{"id":"gemini-2.5-flash"},{"id":"gemini-2.5-pro"},{"id":"vertex/gemini-3.8-flash"},{"id":"vertex/gemini-3.7-flash"},{"id":"vertex/gemini-3.6-flash"},{"id":"vertex/gemini-3.5-flash-lite"},{"id":"vertex/gemini-3.5-flash"},{"id":"vertex/gemini-3.1-flash-lite"},{"id":"vertex/gemini-3.1-pro-preview"},{"id":"vertex/gemini-3-flash-preview"},{"id":"vertex/deep-research-pro-preview-12-2025"},{"id":"vertex/gemini-2.5-flash-lite"},{"id":"vertex/gemini-2.5-flash"},{"id":"vertex/gemini-2.5-pro"},{"id":"deepseek-flash"},{"id":"deepseek-v4-pro"},{"id":"deepseek-v4-flash"},{"id":"deepseek-reasoner"},{"id":"deepseek-chat"},{"id":"grok-4.7"},{"id":"grok-4.6"},{"id":"grok-4.5"},{"id":"grok-4.3"},{"id":"grok-4.20-0309-reasoning"},{"id":"grok-4.20-0309-non-reasoning"},{"id":"grok-4.20-multi-agent-0309"},{"id":"cerebras/qwen-3.8-27b"},{"id":"cerebras/gemma-4-31b"},{"id":"cerebras/zai-glm-4.7"},{"id":"cerebras/gpt-oss-120b"},{"id":"groq/qwen/qwen3.8-27b"},{"id":"groq/qwen/qwen3.6-27b"},{"id":"groq/openai/gpt-oss-safeguard-20b"},{"id":"groq/openai/gpt-oss-120b"},{"id":"groq/openai/gpt-oss-20b"},{"id":"groq/llama-3.3-70b-versatile"},{"id":"groq/llama-3.1-8b-instant"},{"id":"fugu-ultra-v2.0"},{"id":"fugu-max"},{"id":"fugu-max-v1.0"},{"id":"fugu"},{"id":"fugu-ultra"},{"id":"sakana-namazu"},{"id":"sakana-namazu-v1.0"},{"id":"nvidia/nemotron-3.5-lightning-30b-a3b"},{"id":"nvidia/nemotron-3-ultra-550b-a55b"},{"id":"nvidia/nemotron-3-nano-30b-a3b"},{"id":"nvidia/llama-3.3-nemotron-super-49b-v1.5"},{"id":"nvidia/llama-3.1-nemotron-ultra-253b-v1"},{"id":"nvidia/llama-3.1-nemotron-70b-instruct"},{"id":"muse-spark-1.3"},{"id":"muse-spark-1.1"},{"id":"kimi-k3"},{"id":"kimi-k2.7-code"},{"id":"kimi-k2.7-code-highspeed"},{"id":"kimi-k2.6"},{"id":"kie/gpt-6-1-sol"},{"id":"kie/claude-sonnet-5-5"},{"id":"kie/claude-opus-5-5"},{"id":"kie/gpt-6-sol"},{"id":"kie/gpt-6-luna"},{"id":"kie/gpt-6-astra"},{"id":"kie/grok-4-6"},{"id":"kie/claude-opus-5"},{"id":"kie/kimi-k3"},{"id":"kie/gpt-5-6-sol"},{"id":"kie/gpt-5-6-terra"},{"id":"kie/gpt-5-6-luna"},{"id":"kie/grok-4-5"},{"id":"kie/claude-sonnet-5"},{"id":"kie/claude-fable-5"},{"id":"kie/claude-opus-4-8"},{"id":"kie/grok-4-3"},{"id":"kie/gpt-5-5"},{"id":"kie/claude-opus-4-7"},{"id":"kie/claude-sonnet-4-6"},{"id":"kie/claude-opus-4-6"},{"id":"kie/claude-opus-4-5"},{"id":"kie/claude-haiku-4-5"},{"id":"kie/claude-sonnet-4-5"},{"id":"glm-5.3-flash"},{"id":"glm-5.3"},{"id":"glm-5.2"},{"id":"glm-5.1"},{"id":"glm-5-turbo"},{"id":"glm-5"},{"id":"glm-4.7"},{"id":"glm-4.7-flashx"},{"id":"glm-4.6"},{"id":"glm-4.5"},{"id":"glm-4.5-air"},{"id":"glm-4.5-x"},{"id":"glm-4.5-airx"},{"id":"glm-4-32b-0414-128k"},{"id":"glm-5.3-flashx"},{"id":"mistral-large-4"},{"id":"zai-glm-5-3"},{"id":"zai-glm-5-2"},{"id":"labs-leanstral-1-5"},{"id":"mistral-medium-2604"},{"id":"mistral-medium-3-5"},{"id":"mistral-medium-3"},{"id":"mistral-medium-latest"},{"id":"mistral-small-2603"},{"id":"mistral-small-latest"},{"id":"devstral-2512"},{"id":"devstral-latest"},{"id":"devstral-small-latest"},{"id":"mistral-large-latest"},{"id":"mistral-large-2512"},{"id":"ministral-14b-latest"},{"id":"ministral-14b-2512"},{"id":"ministral-8b-latest"},{"id":"ministral-8b-2512"},{"id":"ministral-3b-latest"},{"id":"ministral-3b-2512"},{"id":"magistral-medium-latest"},{"id":"magistral-medium-2509"},{"id":"magistral-small-latest"},{"id":"magistral-small-2509"},{"id":"mistral-medium-2508"},{"id":"codestral-latest"},{"id":"codestral-2508"},{"id":"mistral-small-2506"},{"id":"mistral-medium-2505"},{"id":"open-mistral-nemo"},{"id":"bedrock/openai.gpt-6.1-sol"},{"id":"bedrock/openai.gpt-6-astra"},{"id":"bedrock/anthropic.claude-opus-5"},{"id":"bedrock/openai.gpt-5.6-sol"},{"id":"bedrock/openai.gpt-5.6-terra"},{"id":"bedrock/openai.gpt-5.6-luna"},{"id":"bedrock/anthropic.claude-sonnet-5"},{"id":"bedrock/anthropic.claude-fable-5"},{"id":"bedrock/anthropic.claude-opus-4-8"},{"id":"bedrock/anthropic.claude-opus-4-7"},{"id":"bedrock/anthropic.claude-sonnet-4-6"},{"id":"bedrock/minimax.minimax-m2.5"},{"id":"bedrock/zai.glm-5"},{"id":"bedrock/anthropic.claude-opus-4-6-v1"},{"id":"bedrock/moonshotai.kimi-k2.5"},{"id":"bedrock/amazon.nova-2-lite-v1:0"},{"id":"bedrock/mistral.mistral-large-3-675b-instruct"},{"id":"bedrock/mistral.ministral-3-14b-instruct"},{"id":"bedrock/mistral.ministral-3-8b-instruct"},{"id":"bedrock/mistral.ministral-3-3b-instruct"},{"id":"bedrock/deepseek.v3.2"},{"id":"bedrock/anthropic.claude-opus-4-5-20251101-v1:0"},{"id":"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0"},{"id":"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0"},{"id":"bedrock/anthropic.claude-opus-4-1-20250805-v1:0"},{"id":"bedrock/openai.gpt-oss-120b-1:0"},{"id":"bedrock/openai.gpt-oss-20b-1:0"},{"id":"bedrock/amazon.nova-premier-v1:0"},{"id":"bedrock/meta.llama4-maverick-17b-instruct-v1:0"},{"id":"bedrock/meta.llama4-scout-17b-instruct-v1:0"},{"id":"bedrock/meta.llama3-3-70b-instruct-v1:0"},{"id":"bedrock/amazon.nova-pro-v1:0"},{"id":"bedrock/amazon.nova-lite-v1:0"},{"id":"bedrock/amazon.nova-micro-v1:0"},{"id":"bedrock/meta.llama3-1-70b-instruct-v1:0"},{"id":"bedrock/meta.llama3-1-8b-instruct-v1:0"},{"id":"bedrock/mistral.mistral-large-2407-v1:0"},{"id":"bedrock/mistral.pixtral-large-2502-v1:0"},{"id":"bedrock/mistral.magistral-small-2509"},{"id":"bedrock/mistral.mixtral-8x7b-instruct-v0:1"},{"id":"bedrock/cohere.command-r-plus-v1:0"},{"id":"bedrock/cohere.command-r-v1:0"}]},{"shared":0},{"shared":1},{"shared":2},{"shared":3},{"shared":4},{"shared":5},{"shared":6},{"shared":7},{"shared":8},{"shared":9},{"shared":10},{"shared":11},{"shared":12},{"id":"evaluationState","type":"long-input","valueKind":"string","storage":"native","title":"State","condition":{"opaque":true},"required":true},{"id":"evaluationQuestions","type":"code","valueKind":"json","storage":"native","title":"Questions","language":"json","condition":{"opaque":true},"required":true},{"id":"attachmentFiles","type":"file-upload","valueKind":"upload","storage":"native","title":"Files","mode":"basic","canonicalParamId":"files","multiple":true,"condition":{"field":"model","value":{"list":0},"not":true},"required":false},{"id":"files","type":"short-input","valueKind":"string","storage":"native","title":"Files","mode":"advanced","canonicalParamId":"files","condition":{"field":"model","value":{"list":0},"not":true},"required":false},{"id":"reasoningEffort","type":"combobox","valueKind":"string","storage":"native","title":"Reasoning Effort","mode":"advanced","dependsOn":{"all":["model"],"any":[]},"condition":{"opaque":true},"options":{"opaque":true}},{"id":"verbosity","type":"combobox","valueKind":"string","storage":"native","title":"Verbosity","mode":"advanced","dependsOn":{"all":["model"],"any":[]},"condition":{"opaque":true},"options":{"opaque":true}},{"id":"thinkingLevel","type":"combobox","valueKind":"string","storage":"native","title":"Thinking Level","mode":"advanced","dependsOn":{"all":["model"],"any":[]},"condition":{"opaque":true},"options":{"opaque":true}},{"id":"promptCaching","type":"switch","valueKind":"boolean","storage":"native","title":"Prompt Caching","mode":"advanced","defaultValue":false,"condition":{"field":"model","value":["claude-fable-5-2","claude-fable-5-1","claude-fable-5","claude-sonnet-5-5","claude-sonnet-5","claude-opus-5-5","claude-opus-5","claude-opus-4-8","claude-opus-4-7","claude-opus-4-6","claude-sonnet-4-6","claude-opus-4-5","claude-opus-4-1","claude-opus-4-0","claude-sonnet-4-5","claude-sonnet-4-0","claude-haiku-5-5","claude-haiku-4-5","claude-3-haiku-20240307","azure-anthropic/claude-fable-5-1","azure-anthropic/claude-opus-5-5","azure-anthropic/claude-sonnet-5-5","azure-anthropic/claude-haiku-5-5","azure-anthropic/claude-opus-5","azure-anthropic/claude-opus-4-8","azure-anthropic/claude-opus-4-7","azure-anthropic/claude-opus-4-6","azure-anthropic/claude-opus-4-5","azure-anthropic/claude-sonnet-5","azure-anthropic/claude-sonnet-4-6","azure-anthropic/claude-sonnet-4-5","azure-anthropic/claude-opus-4-1","azure-anthropic/claude-haiku-4-5"]}},{"id":"tools","type":"tool-input","valueKind":"tools","storage":"native","structured":"tools","title":"Tools","defaultValue":[],"condition":{"field":"model","value":{"list":1},"not":true}},{"id":"skills","type":"skill-input","valueKind":"array","storage":"native","title":"Skills","defaultValue":[],"condition":{"field":"model","value":{"list":1},"not":true}},{"id":"memoryType","type":"dropdown","valueKind":"string","storage":"native","title":"Memory","defaultValue":"none","condition":{"field":"model","value":{"list":2},"not":true},"options":[{"id":"none"},{"id":"conversation"},{"id":"sliding_window"},{"id":"sliding_window_tokens"}]},{"id":"conversationId","type":"short-input","valueKind":"string","storage":"native","title":"Conversation ID","dependsOn":{"all":["memoryType"],"any":[]},"condition":{"field":"memoryType","value":{"list":3},"and":{"field":"model","value":{"list":2},"not":true}},"required":{"field":"memoryType","value":{"list":3}}},{"id":"slidingWindowSize","type":"short-input","valueKind":"string","storage":"native","title":"Sliding Window Size","dependsOn":{"all":["memoryType"],"any":[]},"condition":{"field":"memoryType","value":["sliding_window"],"and":{"field":"model","value":{"list":2},"not":true}}},{"id":"slidingWindowTokens","type":"short-input","valueKind":"string","storage":"native","title":"Max Tokens","dependsOn":{"all":["memoryType"],"any":[]},"condition":{"field":"memoryType","value":["sliding_window_tokens"],"and":{"field":"model","value":{"list":2},"not":true}}},{"id":"temperature","type":"slider","valueKind":"number","storage":"native","title":"Temperature","mode":"advanced","defaultValue":0.3,"min":0,"max":1,"condition":{"field":"model","value":["thinkingmachines/inkling","thinkingmachines/inkling-2-small","thinkingmachines/inkling-small","claude-opus-4-6","claude-sonnet-4-6","claude-opus-4-5","claude-opus-4-1","claude-opus-4-0","claude-sonnet-4-5","claude-sonnet-4-0","claude-haiku-4-5","claude-3-haiku-20240307","azure-anthropic/claude-opus-4-6","azure-anthropic/claude-opus-4-5","azure-anthropic/claude-sonnet-4-6","azure-anthropic/claude-sonnet-4-5","azure-anthropic/claude-opus-4-1","azure-anthropic/claude-haiku-4-5","kie/claude-opus-4-6","kie/claude-sonnet-4-6","kie/claude-opus-4-5","kie/claude-sonnet-4-5","kie/claude-haiku-4-5","glm-5.3","glm-5.3-flashx","glm-5.3-flash","glm-5.2","glm-5.1","glm-5","glm-5-turbo","glm-4.7","glm-4.7-flashx","glm-4.6","glm-4.5","glm-4.5-air","glm-4.5-x","glm-4.5-airx","glm-4-32b-0414-128k","bedrock/anthropic.claude-sonnet-4-6","bedrock/anthropic.claude-opus-4-6-v1","bedrock/anthropic.claude-opus-4-5-20251101-v1:0","bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0","bedrock/anthropic.claude-haiku-4-5-20251001-v1:0","bedrock/anthropic.claude-opus-4-1-20250805-v1:0","bedrock/amazon.nova-2-lite-v1:0","bedrock/amazon.nova-premier-v1:0","bedrock/amazon.nova-pro-v1:0","bedrock/amazon.nova-lite-v1:0","bedrock/amazon.nova-micro-v1:0","bedrock/meta.llama4-maverick-17b-instruct-v1:0","bedrock/meta.llama4-scout-17b-instruct-v1:0","bedrock/meta.llama3-3-70b-instruct-v1:0","bedrock/meta.llama3-2-90b-instruct-v1:0","bedrock/meta.llama3-2-11b-instruct-v1:0","bedrock/meta.llama3-2-3b-instruct-v1:0","bedrock/meta.llama3-2-1b-instruct-v1:0","bedrock/meta.llama3-1-405b-instruct-v1:0","bedrock/meta.llama3-1-70b-instruct-v1:0","bedrock/meta.llama3-1-8b-instruct-v1:0","bedrock/mistral.mistral-large-3-675b-instruct","bedrock/mistral.mistral-large-2407-v1:0","bedrock/mistral.pixtral-large-2502-v1:0","bedrock/mistral.magistral-small-2509","bedrock/mistral.ministral-3-14b-instruct","bedrock/mistral.ministral-3-8b-instruct","bedrock/mistral.ministral-3-3b-instruct","bedrock/mistral.mixtral-8x7b-instruct-v0:1","bedrock/amazon.titan-text-premier-v1:0","bedrock/cohere.command-r-plus-v1:0","bedrock/cohere.command-r-v1:0"]}},{"id":"temperature","type":"slider","valueKind":"number","storage":"native","title":"Temperature","mode":"advanced","defaultValue":0.3,"min":0,"max":1.5,"condition":{"field":"model","value":["mistral-large-4","mistral-medium-3-5","mistral-medium-3","zai-glm-5-3","zai-glm-5-2","labs-leanstral-1-5","mistral-large-latest","mistral-large-2512","mistral-small-2603","devstral-2512","mistral-large-2411","magistral-medium-latest","magistral-medium-2509","magistral-small-latest","magistral-small-2509","mistral-medium-latest","mistral-medium-2604","mistral-medium-2508","mistral-medium-2505","mistral-small-latest","mistral-small-2506","open-mistral-nemo","codestral-latest","codestral-2508","devstral-latest","devstral-small-latest","devstral-small-2507","devstral-medium-2507","ministral-14b-latest","ministral-14b-2512","ministral-8b-latest","ministral-8b-2512","ministral-3b-latest","ministral-3b-2512"]}},{"id":"temperature","type":"slider","valueKind":"number","storage":"native","title":"Temperature","mode":"advanced","defaultValue":0.3,"min":0,"max":2,"condition":{"field":"model","value":["nebius/deepseek-ai/deepseek-v4.1-flash","nebius/deepseek-ai/deepseek-v4-flash-0731","nebius/deepseek-ai/deepseek-v4-pro","nebius/deepseek-ai/deepseek-v4-pro-0813","nebius/google/gemma-3-27b-it","nebius/minimaxai/minimax-m3","nebius/moonshotai/kimi-k2.6","nebius/moonshotai/kimi-k2.7-code","nebius/moonshotai/kimi-k3","nebius/nousresearch/hermes-4-405b","nebius/nvidia/nvidia-nemotron-3-nano-30b-a3b","nebius/nvidia/nemotron-3-super-120b-a12b","nebius/nvidia/nemotron-3-ultra-550b-a55b","nebius/nvidia/nemotron-3_5-lightning","nebius/openai/gpt-oss-120b","nebius/openbmb/minicpm-v-4_5","nebius/qwen/qwen3-235b-a22b-instruct-2507","nebius/qwen/qwen3-30b-a3b-instruct-2507","nebius/qwen/qwen3.5-397b-a17b","nebius/qwen/qwen3.8-27b","nebius/zai-org/glm-5.1","nebius/zai-org/glm-5.2","nebius/zai-org/glm-5.3","nebius/zai-org/glm-5.3-flash","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-5-chat-latest","gpt-4o","azure/gpt-4o","azure/gpt-5-chat","azure/gpt-4.1","azure/gpt-4.1-mini","azure/gpt-4.1-nano","gemini-3.8-flash","gemini-3.7-flash","gemini-3.6-flash","gemini-3.5-flash-lite","gemini-3.5-flash","gemini-3.1-pro-preview","gemini-3.1-flash-lite","gemini-3-flash-preview","gemini-2.5-pro","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.0-flash","gemini-2.0-flash-lite","vertex/gemini-3.5-flash","vertex/gemini-3.1-pro-preview","vertex/gemini-3.1-flash-lite","vertex/gemini-3-pro-preview","vertex/gemini-3-flash-preview","vertex/gemini-2.5-pro","vertex/gemini-2.5-flash","vertex/gemini-2.5-flash-lite","vertex/gemini-2.0-flash","vertex/gemini-2.0-flash-lite","deepseek-flash","deepseek-v4-flash","deepseek-chat","deepseek-v3","grok-4.7","grok-4.6","grok-4.5","grok-4.3","grok-4-latest","grok-4-0709","grok-4-1-fast-reasoning","grok-4-1-fast-non-reasoning","grok-4-fast-reasoning","grok-4-fast-non-reasoning","grok-code-fast-1","grok-4.20-0309-reasoning","grok-4.20-0309-non-reasoning","grok-4.20-multi-agent-0309","grok-3-latest","grok-3-fast-latest","cerebras/qwen-3.8-27b","cerebras/gpt-oss-120b","cerebras/zai-glm-4.7","cerebras/gemma-4-31b","groq/openai/gpt-oss-120b","groq/openai/gpt-oss-20b","groq/openai/gpt-oss-safeguard-20b","groq/qwen/qwen3-32b","groq/qwen/qwen3.8-27b","groq/qwen/qwen3.6-27b","groq/llama-3.1-8b-instant","groq/llama-3.3-70b-versatile","groq/meta-llama/llama-4-scout-17b-16e-instruct","groq/moonshotai/kimi-k2-instruct-0905","nvidia/llama-3.1-nemotron-70b-instruct","nvidia/llama-3.1-nemotron-ultra-253b-v1","nvidia/llama-3.3-nemotron-super-49b-v1.5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3-ultra-550b-a55b","muse-spark-1.3","muse-spark-1.1"]}},{"id":"maxTokens","type":"short-input","valueKind":"string","storage":"native","title":"Max Output Tokens","mode":"advanced","condition":{"field":"model","value":{"list":1},"not":true}},{"id":"responseFormat","type":"code","valueKind":"json","storage":"native","title":"Response Format","language":"json","condition":{"field":"model","value":{"list":1},"not":true}},{"id":"previousInteractionId","type":"short-input","valueKind":"string","storage":"native","title":"Previous Interaction ID","condition":{"field":"model","value":["deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025"]}},{"id":"fallbackModels","type":"model-fallback-list","valueKind":"array","storage":"native","title":"Fallback models","mode":"advanced","condition":{"field":"model","value":{"list":0},"not":true}}],"outputs":{"answers":{"type":"json","description":"Evaluation answers keyed by question ID: choice, score, or noul, with probabilities and confidence where applicable","condition":{"field":"model","value":["jev-latest","jev-1.13.0","jev-preview"],"allowReference":true}},"content":{"type":"string","description":"Generated response content"},"model":{"type":"string","description":"Model used for generation"},"tokens":{"type":"json","description":"Token usage statistics"},"toolCalls":{"type":"json","description":"Tool calls made"},"providerTiming":{"type":"json","description":"Provider timing information"},"cost":{"type":"json","description":"Cost of the API call"},"interactionId":{"type":"string","description":"Interaction ID for multi-turn deep research follow-ups","condition":{"field":"model","value":["deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025"]}}}},"api":{"type":"api","name":"API","category":"blocks","tools":{"access":["http_request"],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"url","type":"short-input","valueKind":"string","storage":"native","title":"URL","required":true},{"id":"method","type":"dropdown","valueKind":"string","storage":"native","title":"Method","required":true,"options":[{"id":"GET"},{"id":"POST"},{"id":"PUT"},{"id":"DELETE"},{"id":"PATCH"}]},{"id":"params","type":"table","valueKind":"array","storage":"native","structured":"tableRows","title":"Query Params","columns":["Key","Value"]},{"id":"headers","type":"table","valueKind":"array","storage":"native","structured":"tableRows","title":"Headers","columns":["Key","Value"]},{"id":"body","type":"code","valueKind":"json","storage":"native","title":"Body","language":"json"},{"id":"timeout","type":"short-input","valueKind":"string","storage":"native","title":"Timeout (ms)","mode":"advanced"},{"id":"retries","type":"short-input","valueKind":"string","storage":"native","title":"Retries","mode":"advanced"},{"id":"retryDelayMs","type":"short-input","valueKind":"string","storage":"native","title":"Retry delay (ms)","mode":"advanced"},{"id":"retryMaxDelayMs","type":"short-input","valueKind":"string","storage":"native","title":"Max retry delay (ms)","mode":"advanced"},{"id":"retryNonIdempotent","type":"switch","valueKind":"boolean","storage":"native","title":"Retry non-idempotent methods","mode":"advanced"},{"id":"redirectPolicyVersion","type":"short-input","valueKind":"string","storage":"native","title":"Redirect policy version","defaultValue":"standard-v1","hidden":true},{"id":"sendCredentialsOnCrossOriginRedirect","type":"switch","valueKind":"boolean","storage":"native","title":"Send credentials on cross-origin redirects","mode":"advanced","defaultValue":true},{"id":"proxyUrl","type":"short-input","valueKind":"string","storage":"native","title":"Proxy URL","mode":"advanced"}],"outputs":{"data":{"type":"json","description":"API response data (JSON, text, or other formats)"},"status":{"type":"number","description":"HTTP status code (200, 404, 500, etc.)"},"headers":{"type":"json","description":"HTTP response headers as key-value pairs"}}},"condition":{"type":"condition","name":"Condition","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false,"branches":{"subBlockId":"conditions","kind":"condition"}},"subBlocks":[{"id":"conditions","type":"condition-input","valueKind":"branches","storage":"json-string","structured":"branches"}],"outputs":{"conditionResult":{"type":"boolean","description":"Whether the selected branch's own test passed: true when an if/else-if condition matched, false when the else branch or no branch fired"},"selectedPath":{"type":"json","description":"Selected execution path"},"selectedOption":{"type":"string","description":"Selected condition option ID"},"selectedTitle":{"type":"string","description":"Title of the selected branch (e.g. \"if\", \"else if\", \"else\"); null when no branch fired"}}},"function":{"type":"function","name":"Function","category":"blocks","tools":{"access":["function_execute"],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"language","type":"dropdown","valueKind":"string","storage":"native","valueDefault":{"constant":"javascript"},"options":[{"id":"javascript"},{"id":"python"}]},{"id":"code","type":"code","valueKind":"code","storage":"native","title":"Code"},{"id":"sandboxId","type":"combobox","valueKind":"string","storage":"native","title":"Sandbox","mode":"advanced","dependsOn":{"all":["language"],"any":[]},"emptyIsValid":true,"selectorKey":"workspace.sandboxes","options":{"dynamic":true}},{"id":"secretScope","type":"dropdown","valueKind":"string","storage":"native","title":"Secret access","valueDefault":{"constant":"all"},"context":"tool-input","paramVisibility":"user-only","options":[{"id":"all"},{"id":"selected"}]},{"id":"mountedSecrets","type":"dropdown","valueKind":"array","storage":"native","title":"Secrets","context":"tool-input","paramVisibility":"user-only","multiple":true,"selectorKey":"workspace.secretNames","condition":{"field":"secretScope","value":"selected"},"options":{"dynamic":true}}],"outputs":{"result":{"type":"json","description":"Structured result emitted by the executed code"},"stdout":{"type":"string","description":"Console log output and debug messages from function execution"},"files":{"type":"file[]","description":"Files the code wrote to /tmp/sim/outputs, ready to attach or upload downstream"}}},"generic_webhook":{"type":"generic_webhook","name":"Webhook Trigger","category":"triggers","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":false,"errorPort":false,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["generic_webhook"]},"dynamicOutputs":{"source":"inputFormat","param":"inputFormat"},"subBlocks":[{"trigger":"generic_webhook","start":0,"count":14}],"outputs":{}},"gmail_v2":{"type":"gmail_v2","name":"Gmail","category":"tools","tools":{"access":["gmail_send_v2","gmail_draft_v2","gmail_edit_draft_v2","gmail_read_v2","gmail_search_v2","gmail_move_v2","gmail_mark_read_v2","gmail_mark_unread_v2","gmail_archive_v2","gmail_unarchive_v2","gmail_delete_v2","gmail_add_label_v2","gmail_remove_label_v2","gmail_list_labels_v2","gmail_create_label_v2","gmail_update_label_v2","gmail_delete_label_v2","gmail_list_drafts_v2","gmail_get_draft_v2","gmail_delete_draft_v2","gmail_list_threads_v2","gmail_get_thread_v2","gmail_trash_thread_v2","gmail_untrash_thread_v2"],"selector":"operation"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["gmail_poller"]},"subBlocks":[{"id":"operation","type":"dropdown","valueKind":"string","storage":"native","title":"Operation","surface":"action","valueDefault":{"constant":"send_gmail"},"options":[{"id":"send_gmail","label":"Send Email"},{"id":"read_gmail","label":"Read Email"},{"id":"draft_gmail","label":"Draft Email"},{"id":"edit_draft_gmail","label":"Edit Draft"},{"id":"search_gmail","label":"Search Email"},{"id":"move_gmail","label":"Move Email"},{"id":"mark_read_gmail","label":"Mark as Read"},{"id":"mark_unread_gmail","label":"Mark as Unread"},{"id":"archive_gmail","label":"Archive Email"},{"id":"unarchive_gmail","label":"Unarchive Email"},{"id":"delete_gmail","label":"Delete Email"},{"id":"add_label_gmail","label":"Add Label"},{"id":"remove_label_gmail","label":"Remove Label"},{"id":"list_labels_gmail","label":"List Labels"},{"id":"create_label_gmail","label":"Create Label"},{"id":"update_label_gmail","label":"Update Label"},{"id":"delete_label_gmail","label":"Delete Label"},{"id":"list_drafts_gmail","label":"List Drafts"},{"id":"get_draft_gmail","label":"Get Draft"},{"id":"delete_draft_gmail","label":"Delete Draft"},{"id":"list_threads_gmail","label":"List Threads"},{"id":"get_thread_gmail","label":"Get Thread"},{"id":"trash_thread_gmail","label":"Trash Thread"},{"id":"untrash_thread_gmail","label":"Untrash Thread"}]},{"id":"credential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Gmail Account","mode":"basic","canonicalParamId":"oauthCredential","surface":"action","serviceId":"gmail","required":true},{"id":"manualCredential","type":"short-input","valueKind":"string","storage":"native","title":"Gmail Account","mode":"advanced","canonicalParamId":"oauthCredential","surface":"action","required":true},{"id":"impersonateUserEmail","type":"short-input","valueKind":"string","storage":"native","title":"Impersonated Account","mode":"both","surface":"action","paramVisibility":"user-only"},{"id":"draftId","type":"short-input","valueKind":"string","storage":"native","title":"Draft ID","surface":"action","condition":{"field":"operation","value":["edit_draft_gmail","get_draft_gmail","delete_draft_gmail"]},"required":true},{"id":"to","type":"short-input","valueKind":"string","storage":"native","title":"To","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":true},{"id":"subject","type":"short-input","valueKind":"string","storage":"native","title":"Subject","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"body","type":"long-input","valueKind":"string","storage":"native","title":"Body","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":true},{"id":"contentType","type":"dropdown","valueKind":"string","storage":"native","title":"Content Type","surface":"action","valueDefault":{"constant":"text"},"condition":{"field":"operation","value":{"list":4}},"required":false,"options":[{"id":"text"},{"id":"html"}]},{"id":"attachmentFiles","type":"file-upload","valueKind":"upload","storage":"native","title":"Attachments","mode":"basic","canonicalParamId":"attachments","surface":"action","multiple":true,"condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"attachments","type":"short-input","valueKind":"string","storage":"native","title":"Attachments","mode":"advanced","canonicalParamId":"attachments","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"threadId","type":"short-input","valueKind":"string","storage":"native","title":"Thread ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"replyToMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Reply to Message ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"cc","type":"short-input","valueKind":"string","storage":"native","title":"CC","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"bcc","type":"short-input","valueKind":"string","storage":"native","title":"BCC","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"replyTo","type":"short-input","valueKind":"string","storage":"native","title":"Reply-To","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"folder","type":"folder-selector","valueKind":"picked","storage":"native","title":"Label","mode":"basic","canonicalParamId":"folder","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":"read_gmail"},"options":{"dynamic":true}},{"id":"manualFolder","type":"short-input","valueKind":"string","storage":"native","title":"Label/Folder","mode":"advanced","canonicalParamId":"folder","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":"read_gmail"}},{"id":"unreadOnly","type":"switch","valueKind":"boolean","storage":"native","title":"Unread Only","surface":"action","condition":{"field":"operation","value":"read_gmail"}},{"id":"includeAttachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","surface":"action","condition":{"field":"operation","value":"read_gmail"}},{"id":"messageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"read_gmail"}},{"id":"query","type":"short-input","valueKind":"string","storage":"native","title":"Search Query","surface":"action","condition":{"field":"operation","value":"search_gmail"},"required":true},{"id":"maxResults","type":"short-input","valueKind":"string","storage":"native","title":"Max Results","surface":"action","condition":{"field":"operation","value":["read_gmail","search_gmail","list_drafts_gmail","list_threads_gmail"]}},{"id":"pageToken","type":"short-input","valueKind":"string","storage":"native","title":"Page Token","mode":"advanced","surface":"action","condition":{"field":"operation","value":["search_gmail","list_drafts_gmail","list_threads_gmail"]},"required":false},{"id":"moveMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","surface":"action","condition":{"field":"operation","value":"move_gmail"},"required":true},{"id":"destinationLabel","type":"folder-selector","valueKind":"picked","storage":"native","title":"Move To Label","mode":"basic","canonicalParamId":"addLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":"move_gmail"},"required":true,"options":{"dynamic":true}},{"id":"manualDestinationLabel","type":"short-input","valueKind":"string","storage":"native","title":"Move To Label","mode":"advanced","canonicalParamId":"addLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":"move_gmail"},"required":true},{"id":"sourceLabel","type":"folder-selector","valueKind":"picked","storage":"native","title":"Remove From Label","mode":"basic","canonicalParamId":"removeLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":"move_gmail"},"required":false,"options":{"dynamic":true}},{"id":"manualSourceLabel","type":"short-input","valueKind":"string","storage":"native","title":"Remove From Label","mode":"advanced","canonicalParamId":"removeLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":"move_gmail"},"required":false},{"id":"actionMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","surface":"action","condition":{"field":"operation","value":["mark_read_gmail","mark_unread_gmail","archive_gmail","unarchive_gmail","delete_gmail"]},"required":true},{"id":"labelActionMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","surface":"action","condition":{"field":"operation","value":{"list":5}},"required":true},{"id":"labelSelector","type":"folder-selector","valueKind":"picked","storage":"native","title":"Label","mode":"basic","canonicalParamId":"manageLabelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":{"list":5}},"required":true,"options":{"dynamic":true}},{"id":"manualLabelId","type":"short-input","valueKind":"string","storage":"native","title":"Label","mode":"advanced","canonicalParamId":"manageLabelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":{"list":5}},"required":true},{"id":"labelTarget","type":"folder-selector","valueKind":"picked","storage":"native","title":"Label","mode":"basic","canonicalParamId":"labelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":{"list":6}},"required":true,"options":{"dynamic":true}},{"id":"manualLabelTarget","type":"short-input","valueKind":"string","storage":"native","title":"Label ID","mode":"advanced","canonicalParamId":"labelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":{"list":6}},"required":true},{"id":"labelName","type":"short-input","valueKind":"string","storage":"native","title":"Label Name","surface":"action","condition":{"field":"operation","value":{"list":7}},"required":{"field":"operation","value":"create_label_gmail"}},{"id":"messageListVisibility","type":"dropdown","valueKind":"string","storage":"native","title":"Message List Visibility","mode":"advanced","surface":"action","valueDefault":{"constant":""},"condition":{"field":"operation","value":{"list":7}},"required":false,"options":[{"id":""},{"id":"show"},{"id":"hide"}]},{"id":"labelListVisibility","type":"dropdown","valueKind":"string","storage":"native","title":"Label List Visibility","mode":"advanced","surface":"action","valueDefault":{"constant":""},"condition":{"field":"operation","value":{"list":7}},"required":false,"options":[{"id":""},{"id":"labelShow"},{"id":"labelShowIfUnread"},{"id":"labelHide"}]},{"id":"targetThreadId","type":"short-input","valueKind":"string","storage":"native","title":"Thread ID","surface":"action","condition":{"field":"operation","value":["get_thread_gmail","trash_thread_gmail","untrash_thread_gmail"]},"required":true},{"id":"threadFormat","type":"dropdown","valueKind":"string","storage":"native","title":"Format","mode":"advanced","surface":"action","valueDefault":{"constant":"full"},"condition":{"field":"operation","value":"get_thread_gmail"},"required":false,"options":[{"id":"full"},{"id":"metadata"},{"id":"minimal"}]},{"id":"listQuery","type":"short-input","valueKind":"string","storage":"native","title":"Search Query","surface":"action","condition":{"field":"operation","value":["list_drafts_gmail","list_threads_gmail"]},"required":false},{"id":"threadLabelIds","type":"short-input","valueKind":"string","storage":"native","title":"Label IDs","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_threads_gmail"},"required":false},{"trigger":"gmail_poller","start":0,"count":8}],"outputs":{"id":{"type":"string","description":"Gmail message ID (thread ID for thread operations, label ID for label operations, draft ID for Get Draft)"},"threadId":{"type":"string","description":"Gmail thread ID"},"labelIds":{"type":"array","description":"Email label IDs"},"from":{"type":"string","description":"Sender"},"to":{"type":"string","description":"To"},"bcc":{"type":"string","description":"Bcc recipients (only on messages you sent or drafted)"},"replyTo":{"type":"string","description":"Reply-To header"},"subject":{"type":"string","description":"Subject"},"date":{"type":"string","description":"Date"},"rfcMessageId":{"type":"string","description":"RFC Message-ID header (not the Gmail message id)"},"inReplyTo":{"type":"string","description":"In-Reply-To header"},"references":{"type":"string","description":"References header"},"snippet":{"type":"string","description":"Short excerpt of the message text"},"internalDate":{"type":"string","description":"Gmail internal creation timestamp in epoch milliseconds"},"body":{"type":"string","description":"Email body text (best-effort)"},"results":{"type":"json","description":"Search/read summary results [{id, threadId, subject, from, to, cc, bcc, replyTo, date, snippet, rfcMessageId, inReplyTo, references, internalDate}]"},"nextPageToken":{"type":"string","description":"Token for the next page of results","condition":{"field":"operation","value":["search_gmail","list_drafts_gmail","list_threads_gmail"]}},"resultSizeEstimate":{"type":"number","description":"Estimated total number of results","condition":{"field":"operation","value":["search_gmail","list_drafts_gmail","list_threads_gmail"]}},"name":{"type":"string","description":"Label display name","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"type":{"type":"string","description":"Label type (system or user)","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"messageListVisibility":{"type":"string","description":"Message list visibility of the label","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"labelListVisibility":{"type":"string","description":"Label list visibility of the label","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"labelId":{"type":"string","description":"ID of the deleted label","condition":{"field":"operation","value":"delete_label_gmail"}},"deleted":{"type":"boolean","description":"Whether the label or draft was deleted","condition":{"field":"operation","value":["delete_label_gmail","delete_draft_gmail"]}},"drafts":{"type":"json","description":"Drafts [{id, messageId, threadId}]","condition":{"field":"operation","value":"list_drafts_gmail"}},"threads":{"type":"json","description":"Threads [{id, snippet, historyId}]","condition":{"field":"operation","value":"list_threads_gmail"}},"messages":{"type":"json","description":"Thread messages [{id, threadId, labelIds, snippet, from, to, cc, bcc, replyTo, subject, date, rfcMessageId, inReplyTo, references, internalDate, body}]","condition":{"field":"operation","value":"get_thread_gmail"}},"historyId":{"type":"string","description":"ID of the last history record that modified the thread","condition":{"field":"operation","value":"get_thread_gmail"}},"trashed":{"type":"boolean","description":"Whether the thread was moved to trash","condition":{"field":"operation","value":"trash_thread_gmail"}},"untrashed":{"type":"boolean","description":"Whether the thread was restored from trash","condition":{"field":"operation","value":"untrash_thread_gmail"}},"attachments":{"type":"file[]","description":"Downloaded attachments (if enabled)"},"draftId":{"type":"string","description":"Draft ID","condition":{"field":"operation","value":["draft_gmail","edit_draft_gmail","delete_draft_gmail"]}},"messageId":{"type":"string","description":"Gmail message ID for the draft","condition":{"field":"operation","value":["draft_gmail","edit_draft_gmail","get_draft_gmail"]}},"email_id":{"type":"string","description":"Gmail message ID"},"thread_id":{"type":"string","description":"Gmail thread ID"},"cc":{"type":"string","description":"Cc recipients (raw Cc header, comma-separated)"},"body_text":{"type":"string","description":"Plain text email body"},"body_html":{"type":"string","description":"HTML email body"},"labels":{"type":"json","description":"Email labels (trigger, comma-separated); for List Labels, the label array [{id, name, type, messageListVisibility, labelListVisibility}]"},"has_attachments":{"type":"boolean","description":"Whether email has attachments"},"raw_email":{"type":"json","description":"Complete raw email data from Gmail API (if enabled)"},"timestamp":{"type":"string","description":"Event timestamp"}}},"note":{"type":"note","name":"Note","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":false,"errorPort":false,"container":null,"annotationOnly":true},"subBlocks":[{"id":"content","type":"long-input","valueKind":"string","storage":"native"},{"id":"color","type":"short-input","valueKind":"string","storage":"native","defaultValue":"carbon","hidden":true}],"outputs":{}},"response":{"type":"response","name":"Response","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"dataMode","type":"dropdown","valueKind":"string","storage":"native","title":"Response Data Mode","valueDefault":{"constant":"structured"},"options":[{"id":"structured"},{"id":"json"}]},{"id":"builderData","type":"response-format","valueKind":"json","storage":"native","title":"Response Structure","condition":{"field":"dataMode","value":"structured"}},{"id":"data","type":"code","valueKind":"json","storage":"native","title":"Response Data","language":"json","condition":{"field":"dataMode","value":"json"}},{"id":"status","type":"short-input","valueKind":"string","storage":"native","title":"Status Code"},{"id":"headers","type":"table","valueKind":"array","storage":"native","structured":"tableRows","title":"Response Headers","columns":["Key","Value"]}],"outputs":{"data":{"type":"json","description":"Response data"},"status":{"type":"number","description":"HTTP status code"},"headers":{"type":"json","description":"Response headers"}}},"router_v2":{"type":"router_v2","name":"Router","category":"blocks","tools":{"access":["openai_chat","anthropic_chat","google_chat","xai_chat","deepseek_chat","deepseek_reasoner"],"selector":"opaque"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false,"branches":{"subBlockId":"routes","kind":"router"}},"subBlocks":[{"id":"context","type":"long-input","valueKind":"string","storage":"native","title":"Context","required":true},{"id":"routes","type":"router-input","valueKind":"branches","storage":"json-string","structured":"branches"},{"id":"model","type":"combobox","valueKind":"string","storage":"native","title":"Model","defaultValue":"claude-sonnet-5-5","required":true,"options":[{"id":"nebius/deepseek-ai/DeepSeek-V4-Pro-0813"},{"id":"nebius/google/gemma-3-27b-it"},{"id":"nebius/MiniMaxAI/MiniMax-M3"},{"id":"nebius/moonshotai/Kimi-K3"},{"id":"nebius/NousResearch/Hermes-4-405B"},{"id":"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B"},{"id":"nebius/nvidia/nemotron-3-super-120b-a12b"},{"id":"nebius/nvidia/Nemotron-3-Ultra-550b-a55b"},{"id":"nebius/nvidia/Nemotron-3_5-Lightning"},{"id":"nebius/openai/gpt-oss-120b"},{"id":"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3.8-27B"},{"id":"nebius/zai-org/GLM-5.2"},{"id":"nebius/zai-org/GLM-5.3"},{"id":"nebius/zai-org/GLM-5.3-Flash"},{"id":"thinkingmachines/inkling-small"},{"id":"thinkingmachines/inkling"},{"id":"thinkingmachines/inkling-2-small"},{"id":"gpt-6.1-terra"},{"id":"gpt-6.1-sol"},{"id":"gpt-6-sol"},{"id":"gpt-6-luna"},{"id":"gpt-6-astra"},{"id":"gpt-5.6-sol"},{"id":"gpt-5.6-terra"},{"id":"gpt-5.6-luna"},{"id":"chat-latest"},{"id":"gpt-5.5-pro"},{"id":"gpt-5.5"},{"id":"gpt-5.4-mini"},{"id":"gpt-5.4-nano"},{"id":"gpt-5.4-pro"},{"id":"gpt-5.4"},{"id":"gpt-5.3-codex"},{"id":"gpt-5.2-pro"},{"id":"gpt-5.2"},{"id":"gpt-5.1"},{"id":"gpt-5-pro"},{"id":"gpt-5"},{"id":"gpt-5-mini"},{"id":"gpt-5-nano"},{"id":"o3-pro"},{"id":"o4-mini"},{"id":"o3"},{"id":"gpt-4.1"},{"id":"gpt-4.1-mini"},{"id":"o3-mini"},{"id":"o1"},{"id":"gpt-4o"},{"id":"claude-fable-5-2"},{"id":"claude-haiku-5-5"},{"id":"claude-sonnet-5-5"},{"id":"claude-opus-5-5"},{"id":"claude-fable-5-1"},{"id":"claude-opus-5"},{"id":"claude-sonnet-5"},{"id":"claude-fable-5"},{"id":"claude-opus-4-8"},{"id":"claude-opus-4-7"},{"id":"claude-sonnet-4-6"},{"id":"claude-opus-4-6"},{"id":"claude-opus-4-5"},{"id":"claude-haiku-4-5"},{"id":"claude-sonnet-4-5"},{"id":"azure/gpt-6.1-sol"},{"id":"azure/gpt-6-sol"},{"id":"azure/gpt-6-luna"},{"id":"azure/gpt-6-astra"},{"id":"azure/gpt-5.6-sol"},{"id":"azure/gpt-5.6-terra"},{"id":"azure/gpt-5.6-luna"},{"id":"azure/gpt-5.5"},{"id":"azure/gpt-5.4-mini"},{"id":"azure/gpt-5.4-nano"},{"id":"azure/gpt-5.4-pro"},{"id":"azure/gpt-5.4"},{"id":"azure/gpt-5.2"},{"id":"azure/gpt-5.1"},{"id":"azure/gpt-5.1-codex"},{"id":"azure/gpt-5"},{"id":"azure/gpt-5-mini"},{"id":"azure/gpt-5-nano"},{"id":"azure/gpt-5-chat"},{"id":"azure/model-router"},{"id":"azure/o3"},{"id":"azure/o4-mini"},{"id":"azure/gpt-4.1"},{"id":"azure/gpt-4.1-mini"},{"id":"azure/gpt-4.1-nano"},{"id":"azure/gpt-4o"},{"id":"azure-anthropic/claude-haiku-5-5"},{"id":"azure-anthropic/claude-sonnet-5-5"},{"id":"azure-anthropic/claude-opus-5-5"},{"id":"azure-anthropic/claude-fable-5-1"},{"id":"azure-anthropic/claude-opus-5"},{"id":"azure-anthropic/claude-sonnet-5"},{"id":"azure-anthropic/claude-opus-4-8"},{"id":"azure-anthropic/claude-opus-4-7"},{"id":"azure-anthropic/claude-sonnet-4-6"},{"id":"azure-anthropic/claude-opus-4-6"},{"id":"azure-anthropic/claude-opus-4-5"},{"id":"azure-anthropic/claude-haiku-4-5"},{"id":"azure-anthropic/claude-sonnet-4-5"},{"id":"azure-anthropic/claude-opus-4-1"},{"id":"gemini-4-argon"},{"id":"gemini-3.8-flash"},{"id":"gemini-3.7-flash"},{"id":"gemini-3.6-flash"},{"id":"gemini-3.5-flash-lite"},{"id":"gemini-3.5-flash"},{"id":"gemini-3.1-flash-lite"},{"id":"gemini-3.1-pro-preview"},{"id":"gemini-3-flash-preview"},{"id":"deep-research-pro-preview-12-2025"},{"id":"gemini-2.5-flash-lite"},{"id":"gemini-2.5-flash"},{"id":"gemini-2.5-pro"},{"id":"vertex/gemini-3.8-flash"},{"id":"vertex/gemini-3.7-flash"},{"id":"vertex/gemini-3.6-flash"},{"id":"vertex/gemini-3.5-flash-lite"},{"id":"vertex/gemini-3.5-flash"},{"id":"vertex/gemini-3.1-flash-lite"},{"id":"vertex/gemini-3.1-pro-preview"},{"id":"vertex/gemini-3-flash-preview"},{"id":"vertex/deep-research-pro-preview-12-2025"},{"id":"vertex/gemini-2.5-flash-lite"},{"id":"vertex/gemini-2.5-flash"},{"id":"vertex/gemini-2.5-pro"},{"id":"deepseek-flash"},{"id":"deepseek-v4-pro"},{"id":"deepseek-v4-flash"},{"id":"deepseek-reasoner"},{"id":"deepseek-chat"},{"id":"grok-4.7"},{"id":"grok-4.6"},{"id":"grok-4.5"},{"id":"grok-4.3"},{"id":"grok-4.20-0309-reasoning"},{"id":"grok-4.20-0309-non-reasoning"},{"id":"grok-4.20-multi-agent-0309"},{"id":"cerebras/qwen-3.8-27b"},{"id":"cerebras/gemma-4-31b"},{"id":"cerebras/zai-glm-4.7"},{"id":"cerebras/gpt-oss-120b"},{"id":"groq/qwen/qwen3.8-27b"},{"id":"groq/qwen/qwen3.6-27b"},{"id":"groq/openai/gpt-oss-safeguard-20b"},{"id":"groq/openai/gpt-oss-120b"},{"id":"groq/openai/gpt-oss-20b"},{"id":"groq/llama-3.3-70b-versatile"},{"id":"groq/llama-3.1-8b-instant"},{"id":"fugu-ultra-v2.0"},{"id":"fugu-max"},{"id":"fugu-max-v1.0"},{"id":"fugu"},{"id":"fugu-ultra"},{"id":"sakana-namazu"},{"id":"sakana-namazu-v1.0"},{"id":"nvidia/nemotron-3.5-lightning-30b-a3b"},{"id":"nvidia/nemotron-3-ultra-550b-a55b"},{"id":"nvidia/nemotron-3-nano-30b-a3b"},{"id":"nvidia/llama-3.3-nemotron-super-49b-v1.5"},{"id":"nvidia/llama-3.1-nemotron-ultra-253b-v1"},{"id":"nvidia/llama-3.1-nemotron-70b-instruct"},{"id":"muse-spark-1.3"},{"id":"muse-spark-1.1"},{"id":"kimi-k3"},{"id":"kimi-k2.7-code"},{"id":"kimi-k2.7-code-highspeed"},{"id":"kimi-k2.6"},{"id":"kie/gpt-6-1-sol"},{"id":"kie/claude-sonnet-5-5"},{"id":"kie/claude-opus-5-5"},{"id":"kie/gpt-6-sol"},{"id":"kie/gpt-6-luna"},{"id":"kie/gpt-6-astra"},{"id":"kie/grok-4-6"},{"id":"kie/claude-opus-5"},{"id":"kie/kimi-k3"},{"id":"kie/gpt-5-6-sol"},{"id":"kie/gpt-5-6-terra"},{"id":"kie/gpt-5-6-luna"},{"id":"kie/grok-4-5"},{"id":"kie/claude-sonnet-5"},{"id":"kie/claude-fable-5"},{"id":"kie/claude-opus-4-8"},{"id":"kie/grok-4-3"},{"id":"kie/gpt-5-5"},{"id":"kie/claude-opus-4-7"},{"id":"kie/claude-sonnet-4-6"},{"id":"kie/claude-opus-4-6"},{"id":"kie/claude-opus-4-5"},{"id":"kie/claude-haiku-4-5"},{"id":"kie/claude-sonnet-4-5"},{"id":"glm-5.3-flash"},{"id":"glm-5.3"},{"id":"glm-5.2"},{"id":"glm-5.1"},{"id":"glm-5-turbo"},{"id":"glm-5"},{"id":"glm-4.7"},{"id":"glm-4.7-flashx"},{"id":"glm-4.6"},{"id":"glm-4.5"},{"id":"glm-4.5-air"},{"id":"glm-4.5-x"},{"id":"glm-4.5-airx"},{"id":"glm-4-32b-0414-128k"},{"id":"glm-5.3-flashx"},{"id":"mistral-large-4"},{"id":"zai-glm-5-3"},{"id":"zai-glm-5-2"},{"id":"labs-leanstral-1-5"},{"id":"mistral-medium-2604"},{"id":"mistral-medium-3-5"},{"id":"mistral-medium-3"},{"id":"mistral-medium-latest"},{"id":"mistral-small-2603"},{"id":"mistral-small-latest"},{"id":"devstral-2512"},{"id":"devstral-latest"},{"id":"devstral-small-latest"},{"id":"mistral-large-latest"},{"id":"mistral-large-2512"},{"id":"ministral-14b-latest"},{"id":"ministral-14b-2512"},{"id":"ministral-8b-latest"},{"id":"ministral-8b-2512"},{"id":"ministral-3b-latest"},{"id":"ministral-3b-2512"},{"id":"magistral-medium-latest"},{"id":"magistral-medium-2509"},{"id":"magistral-small-latest"},{"id":"magistral-small-2509"},{"id":"mistral-medium-2508"},{"id":"codestral-latest"},{"id":"codestral-2508"},{"id":"mistral-small-2506"},{"id":"mistral-medium-2505"},{"id":"open-mistral-nemo"},{"id":"bedrock/openai.gpt-6.1-sol"},{"id":"bedrock/openai.gpt-6-astra"},{"id":"bedrock/anthropic.claude-opus-5"},{"id":"bedrock/openai.gpt-5.6-sol"},{"id":"bedrock/openai.gpt-5.6-terra"},{"id":"bedrock/openai.gpt-5.6-luna"},{"id":"bedrock/anthropic.claude-sonnet-5"},{"id":"bedrock/anthropic.claude-fable-5"},{"id":"bedrock/anthropic.claude-opus-4-8"},{"id":"bedrock/anthropic.claude-opus-4-7"},{"id":"bedrock/anthropic.claude-sonnet-4-6"},{"id":"bedrock/minimax.minimax-m2.5"},{"id":"bedrock/zai.glm-5"},{"id":"bedrock/anthropic.claude-opus-4-6-v1"},{"id":"bedrock/moonshotai.kimi-k2.5"},{"id":"bedrock/amazon.nova-2-lite-v1:0"},{"id":"bedrock/mistral.mistral-large-3-675b-instruct"},{"id":"bedrock/mistral.ministral-3-14b-instruct"},{"id":"bedrock/mistral.ministral-3-8b-instruct"},{"id":"bedrock/mistral.ministral-3-3b-instruct"},{"id":"bedrock/deepseek.v3.2"},{"id":"bedrock/anthropic.claude-opus-4-5-20251101-v1:0"},{"id":"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0"},{"id":"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0"},{"id":"bedrock/anthropic.claude-opus-4-1-20250805-v1:0"},{"id":"bedrock/openai.gpt-oss-120b-1:0"},{"id":"bedrock/openai.gpt-oss-20b-1:0"},{"id":"bedrock/amazon.nova-premier-v1:0"},{"id":"bedrock/meta.llama4-maverick-17b-instruct-v1:0"},{"id":"bedrock/meta.llama4-scout-17b-instruct-v1:0"},{"id":"bedrock/meta.llama3-3-70b-instruct-v1:0"},{"id":"bedrock/amazon.nova-pro-v1:0"},{"id":"bedrock/amazon.nova-lite-v1:0"},{"id":"bedrock/amazon.nova-micro-v1:0"},{"id":"bedrock/meta.llama3-1-70b-instruct-v1:0"},{"id":"bedrock/meta.llama3-1-8b-instruct-v1:0"},{"id":"bedrock/mistral.mistral-large-2407-v1:0"},{"id":"bedrock/mistral.pixtral-large-2502-v1:0"},{"id":"bedrock/mistral.magistral-small-2509"},{"id":"bedrock/mistral.mixtral-8x7b-instruct-v0:1"},{"id":"bedrock/cohere.command-r-plus-v1:0"},{"id":"bedrock/cohere.command-r-v1:0"}]},{"shared":0},{"shared":1},{"shared":2},{"shared":3},{"shared":4},{"shared":5},{"shared":6},{"shared":7},{"shared":8},{"shared":9},{"shared":10},{"shared":11},{"shared":12},{"id":"fallbackModels","type":"model-fallback-list","valueKind":"array","storage":"native","title":"Fallback models","mode":"advanced"}],"outputs":{"context":{"type":"string","description":"Context used for routing"},"model":{"type":"string","description":"Model used"},"tokens":{"type":"json","description":"Token usage"},"cost":{"type":"json","description":"Cost information"},"selectedRoute":{"type":"string","description":"Selected route ID"},"reasoning":{"type":"string","description":"Explanation of why this route was chosen"},"selectedPath":{"type":"json","description":"Selected routing path"}}},"slack_v2":{"type":"slack_v2","name":"Slack","category":"tools","tools":{"access":["slack_message","slack_ephemeral_message","slack_canvas","slack_message_reader","slack_get_message","slack_get_thread","slack_get_thread_replies","slack_get_channel_history","slack_get_permalink","slack_set_status","slack_set_title","slack_set_suggested_prompts","slack_set_suggested_prompts_v2","slack_set_agent_session_status_v2","slack_rename_agent_session_v2","slack_list_channels","slack_list_members","slack_list_users","slack_get_user","slack_download","slack_update_message","slack_delete_message","slack_add_reaction","slack_remove_reaction","slack_get_channel_info","slack_get_user_presence","slack_edit_canvas","slack_create_channel_canvas","slack_get_canvas","slack_list_canvases","slack_lookup_canvas_sections","slack_delete_canvas","slack_lists_create","slack_lists_update","slack_lists_access_set","slack_lists_items_list","slack_lists_items_info","slack_lists_items_create","slack_lists_items_update","slack_lists_items_delete","slack_create_conversation","slack_invite_to_conversation","slack_open_view","slack_update_view","slack_push_view","slack_publish_view","slack_schedule_message","slack_list_scheduled_messages","slack_delete_scheduled_message","slack_archive_conversation","slack_rename_conversation","slack_set_conversation_topic","slack_set_conversation_purpose","slack_lists_access_delete","slack_lists_download_start","slack_lists_download_get","slack_lists_items_delete_multiple","slack_share_canvas","slack_revoke_canvas_access","slack_join_conversation","slack_leave_conversation","slack_kick_conversation","slack_unarchive_conversation","slack_close_conversation","slack_mark_conversation_read","slack_open_conversation","slack_lookup_user_by_email","slack_list_user_conversations","slack_get_user_profile","slack_set_user_presence","slack_get_file_info","slack_list_files","slack_delete_file","slack_get_reactions","slack_list_reactions","slack_pin_message","slack_unpin_message","slack_list_pins","slack_add_bookmark","slack_edit_bookmark","slack_list_bookmarks","slack_remove_bookmark","slack_create_user_group","slack_update_user_group","slack_enable_user_group","slack_disable_user_group","slack_list_user_groups","slack_list_user_group_members","slack_update_user_group_members","slack_get_dnd_info","slack_get_team_dnd_info","slack_list_emoji","slack_get_team_info","slack_get_team_profile","slack_unfurl_links"],"selector":"operation"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["slack_oauth"]},"legacyIds":[{"from":"channelMaxPages","to":null}],"subBlocks":[{"id":"operation","type":"dropdown","valueKind":"string","storage":"native","title":"Operation","surface":"action","valueDefault":{"constant":"send"},"options":[{"id":"send","label":"Send Message"},{"id":"ephemeral","label":"Send Ephemeral Message"},{"id":"canvas","label":"Create Canvas"},{"id":"read","label":"Read Messages"},{"id":"get_message","label":"Get Message"},{"id":"get_thread","label":"Get Thread"},{"id":"get_thread_replies","label":"Get Thread Replies"},{"id":"get_channel_history","label":"Get Channel History"},{"id":"get_permalink","label":"Get Message Permalink"},{"id":"set_status","label":"Set Assistant Status"},{"id":"set_title","label":"Set Assistant Title"},{"id":"set_suggested_prompts","label":"Set Assistant Suggested Prompts"},{"id":"set_agent_suggested_prompts","label":"Set Agent Suggested Prompts"},{"id":"set_agent_session_status","label":"Set Agent Session Status"},{"id":"rename_agent_session","label":"Rename Agent Session"},{"id":"list_channels","label":"List Channels"},{"id":"list_members","label":"List Channel Members"},{"id":"list_users","label":"List Users"},{"id":"get_user","label":"Get User Info"},{"id":"download","label":"Download File"},{"id":"update","label":"Update Message"},{"id":"delete","label":"Delete Message"},{"id":"react","label":"Add Reaction"},{"id":"unreact","label":"Remove Reaction"},{"id":"get_channel_info","label":"Get Channel Info"},{"id":"get_user_presence","label":"Get User Presence"},{"id":"edit_canvas","label":"Edit Canvas"},{"id":"create_channel_canvas","label":"Create Channel Canvas"},{"id":"get_canvas","label":"Get Canvas Info"},{"id":"list_canvases","label":"List Canvases"},{"id":"lookup_canvas_sections","label":"Lookup Canvas Sections"},{"id":"delete_canvas","label":"Delete Canvas"},{"id":"create_list","label":"Create List"},{"id":"rename_list","label":"Update List"},{"id":"share_list","label":"Share List"},{"id":"list_items","label":"Read List Items"},{"id":"get_list_item","label":"Get List Item"},{"id":"create_list_item","label":"Create List Item"},{"id":"update_list_items","label":"Update List Items"},{"id":"delete_list_item","label":"Delete List Item"},{"id":"create_conversation","label":"Create Conversation"},{"id":"invite_to_conversation","label":"Invite to Conversation"},{"id":"open_view","label":"Open View"},{"id":"update_view","label":"Update View"},{"id":"push_view","label":"Push View"},{"id":"publish_view","label":"Publish View"},{"id":"schedule_message","label":"Schedule Message"},{"id":"list_scheduled_messages","label":"List Scheduled Messages"},{"id":"delete_scheduled_message","label":"Delete Scheduled Message"},{"id":"archive_conversation","label":"Archive Conversation"},{"id":"rename_conversation","label":"Rename Conversation"},{"id":"set_conversation_topic","label":"Set Conversation Topic"},{"id":"set_conversation_purpose","label":"Set Conversation Purpose"},{"id":"revoke_list_access","label":"Revoke List Access"},{"id":"start_list_export","label":"Start List Export"},{"id":"get_list_export","label":"Get List Export"},{"id":"delete_list_items","label":"Delete List Items"},{"id":"share_canvas","label":"Share Canvas"},{"id":"revoke_canvas_access","label":"Revoke Canvas Access"},{"id":"join_conversation","label":"Join Conversation"},{"id":"leave_conversation","label":"Leave Conversation"},{"id":"kick_conversation","label":"Remove User from Conversation"},{"id":"unarchive_conversation","label":"Unarchive Conversation"},{"id":"close_conversation","label":"Close Conversation"},{"id":"mark_conversation_read","label":"Mark Conversation Read"},{"id":"open_conversation","label":"Open Conversation"},{"id":"lookup_user_by_email","label":"Find User by Email"},{"id":"list_user_conversations","label":"List User Conversations"},{"id":"get_user_profile","label":"Get User Profile"},{"id":"set_user_presence","label":"Set Bot Presence"},{"id":"get_file_info","label":"Get File Info"},{"id":"list_files","label":"List Files"},{"id":"delete_file","label":"Delete File"},{"id":"get_reactions","label":"Get Reactions"},{"id":"list_reactions","label":"List Reactions"},{"id":"pin_message","label":"Pin Message"},{"id":"unpin_message","label":"Unpin Message"},{"id":"list_pins","label":"List Pins"},{"id":"add_bookmark","label":"Add Bookmark"},{"id":"edit_bookmark","label":"Edit Bookmark"},{"id":"list_bookmarks","label":"List Bookmarks"},{"id":"remove_bookmark","label":"Remove Bookmark"},{"id":"create_user_group","label":"Create User Group"},{"id":"update_user_group","label":"Update User Group"},{"id":"enable_user_group","label":"Enable User Group"},{"id":"disable_user_group","label":"Disable User Group"},{"id":"list_user_groups","label":"List User Groups"},{"id":"list_user_group_members","label":"List User Group Members"},{"id":"update_user_group_members","label":"Update User Group Members"},{"id":"get_dnd_info","label":"Get Do Not Disturb Info"},{"id":"get_team_dnd_info","label":"Get Team Do Not Disturb Info"},{"id":"list_emoji","label":"List Custom Emoji"},{"id":"get_team_info","label":"Get Workspace Info"},{"id":"get_team_profile","label":"Get Workspace Profile Fields"},{"id":"unfurl_links","label":"Unfurl Links"}]},{"id":"destinationType","type":"dropdown","valueKind":"string","storage":"native","title":"Destination","surface":"action","visibleFor":{"send":true,"ephemeral":false,"canvas":false,"read":true,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"channel"},"condition":{"opaque":true},"options":[{"id":"channel"},{"id":"dm"}]},{"id":"credential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Slack Account","mode":"basic","canonicalParamId":"oauthCredential","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"serviceId":"slack","condition":{"opaque":true},"required":true},{"id":"manualCredential","type":"short-input","valueKind":"string","storage":"native","title":"Slack Account","mode":"advanced","canonicalParamId":"oauthCredential","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"channel","type":"channel-selector","valueKind":"picked","storage":"native","title":"Channel","mode":"basic","canonicalParamId":"channel","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":true,"list_users":false,"get_user":false,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.channels","serviceId":"slack","condition":{"opaque":true},"required":{"field":"operation","value":{"list":8},"not":true},"options":{"dynamic":true}},{"id":"manualChannel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","mode":"advanced","canonicalParamId":"channel","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":true,"list_users":false,"get_user":false,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":{"field":"operation","value":{"list":8},"not":true}},{"id":"dmUserId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"dmUserId","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":true,"rename_agent_session":true,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":true,"rename_list":true,"share_list":true,"list_items":true,"get_list_item":true,"create_list_item":true,"update_list_items":true,"delete_list_item":true,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualDmUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"dmUserId","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":true,"rename_agent_session":true,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":true,"rename_list":true,"share_list":true,"list_items":true,"get_list_item":true,"create_list_item":true,"update_list_items":true,"delete_list_item":true,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"ephemeralUser","type":"user-selector","valueKind":"picked","storage":"native","title":"Target User","mode":"basic","canonicalParamId":"ephemeralUser","surface":"action","visibleFor":{"send":false,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualEphemeralUser","type":"short-input","valueKind":"string","storage":"native","title":"Target User ID","mode":"advanced","canonicalParamId":"ephemeralUser","surface":"action","visibleFor":{"send":false,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"messageFormat","type":"dropdown","valueKind":"string","storage":"native","title":"Message Format","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"text"},"condition":{"opaque":true},"options":[{"id":"text"},{"id":"blocks"}]},{"id":"text","type":"long-input","valueKind":"string","storage":"native","title":"Message","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":{"field":"operation","value":["send","ephemeral","schedule_message"],"and":{"field":"messageFormat","value":"blocks","not":true}}},{"id":"blocks","type":"code","valueKind":"json","storage":"native","title":"Block Kit Blocks","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"language":"json","condition":{"opaque":true},"required":{"field":"operation","value":["send","ephemeral","update","schedule_message"],"and":{"field":"messageFormat","value":"blocks"}}},{"id":"threadTs","type":"short-input","valueKind":"string","storage":"native","title":"Thread Timestamp","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"attachmentFiles","type":"file-upload","valueKind":"upload","storage":"native","title":"Attachments","mode":"basic","canonicalParamId":"files","surface":"action","visibleFor":{"send":true,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"multiple":true,"condition":{"opaque":true},"required":false},{"id":"files","type":"short-input","valueKind":"string","storage":"native","title":"File Attachments","mode":"advanced","canonicalParamId":"files","surface":"action","visibleFor":{"send":true,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"title","type":"short-input","valueKind":"string","storage":"native","title":"Canvas Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":true,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"content","type":"long-input","valueKind":"string","storage":"native","title":"Canvas Content","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":true,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"limit","type":"short-input","valueKind":"string","storage":"native","title":"Message Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":true,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"includePrivate","type":"dropdown","valueKind":"string","storage":"native","title":"Include Private Channels","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"true"},"condition":{"opaque":true},"options":[{"id":"true"},{"id":"false"}]},{"id":"channelLimit","type":"short-input","valueKind":"string","storage":"native","title":"Conversations Per Page","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"memberLimit","type":"short-input","valueKind":"string","storage":"native","title":"Member Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":true,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"includeDeleted","type":"dropdown","valueKind":"string","storage":"native","title":"Include Deactivated Users","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":true,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"options":[{"id":"false"},{"id":"true"}]},{"id":"userLimit","type":"short-input","valueKind":"string","storage":"native","title":"User Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":true,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"paginationCursor","type":"short-input","valueKind":"string","storage":"native","title":"Pagination Cursor","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":true,"list_users":true,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"userId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"userId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":true,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"userId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":true,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"getMessageTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":true,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":true,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"getThreadTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Thread Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":true,"get_thread_replies":true,"get_channel_history":false,"get_permalink":false,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"threadLimit","type":"short-input","valueKind":"string","storage":"native","title":"Message Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":true,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"status","type":"short-input","valueKind":"string","storage":"native","title":"Status Text","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":true,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"loadingMessages","type":"long-input","valueKind":"string","storage":"native","title":"Loading Messages","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":true,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"assistantTitle","type":"short-input","valueKind":"string","storage":"native","title":"Thread Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":true,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"suggestedPrompts","type":"long-input","valueKind":"string","storage":"native","title":"Suggested Prompts","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"promptsTitle","type":"short-input","valueKind":"string","storage":"native","title":"Prompts Heading","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyOldest","type":"short-input","valueKind":"string","storage":"native","title":"Oldest Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyLatest","type":"short-input","valueKind":"string","storage":"native","title":"Latest Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyLimit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyMaxPages","type":"short-input","valueKind":"string","storage":"native","title":"Max Pages","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyCursor","type":"short-input","valueKind":"string","storage":"native","title":"Start Cursor","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyInclusive","type":"dropdown","valueKind":"string","storage":"native","title":"Inclusive","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"required":false,"options":[{"id":"false"},{"id":"true"}]},{"id":"oldest","type":"short-input","valueKind":"string","storage":"native","title":"Oldest Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":true,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"fileId","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":true,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"downloadFileName","type":"short-input","valueKind":"string","storage":"native","title":"File Name Override","canonicalParamId":"fileName","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":true,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"updateTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"updateText","type":"long-input","valueKind":"string","storage":"native","title":"New Message Text","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":{"field":"operation","value":"update","and":{"field":"messageFormat","value":"blocks","not":true}}},{"id":"deleteTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":true,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"reactionTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":true,"unreact":true,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"emojiName","type":"short-input","valueKind":"string","storage":"native","title":"Emoji Name","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":true,"unreact":true,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"includeNumMembers","type":"dropdown","valueKind":"string","storage":"native","title":"Include Member Count","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":true,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"true"},"condition":{"opaque":true},"options":[{"id":"true"},{"id":"false"}]},{"id":"presenceUserId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"presenceUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":true,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualPresenceUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"presenceUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":true,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"editCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"canvasOperation","type":"dropdown","valueKind":"string","storage":"native","title":"Edit Operation","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"insert_at_end"},"condition":{"opaque":true},"required":true,"options":[{"id":"insert_at_start"},{"id":"insert_at_end"},{"id":"insert_after"},{"id":"insert_before"},{"id":"replace"},{"id":"delete"},{"id":"rename"}]},{"id":"canvasContent","type":"long-input","valueKind":"string","storage":"native","title":"Content","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"sectionId","type":"short-input","valueKind":"string","storage":"native","title":"Section ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":{"field":"canvasOperation","value":["insert_after","insert_before","delete"]}},{"id":"canvasTitle","type":"short-input","valueKind":"string","storage":"native","title":"New Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"channelCanvasTitle","type":"short-input","valueKind":"string","storage":"native","title":"Canvas Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"channelCanvasContent","type":"long-input","valueKind":"string","storage":"native","title":"Canvas Content","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"getCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":true,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"canvasListCount","type":"short-input","valueKind":"string","storage":"native","title":"Canvas Limit","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListPage","type":"short-input","valueKind":"string","storage":"native","title":"Page","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListUser","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListTsFrom","type":"short-input","valueKind":"string","storage":"native","title":"Created After","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListTsTo","type":"short-input","valueKind":"string","storage":"native","title":"Created Before","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListTeamId","type":"short-input","valueKind":"string","storage":"native","title":"Team ID","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"lookupCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":true,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"sectionCriteria","type":"code","valueKind":"json","storage":"native","title":"Section Criteria","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":true,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"language":"json","condition":{"opaque":true},"required":true},{"id":"deleteCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":true,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"conversationName","type":"short-input","valueKind":"string","storage":"native","title":"Channel Name","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"isPrivate","type":"dropdown","valueKind":"string","storage":"native","title":"Private Channel","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"options":[{"id":"false"},{"id":"true"}]},{"id":"teamId","type":"short-input","valueKind":"string","storage":"native","title":"Team ID","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"inviteUsers","type":"short-input","valueKind":"string","storage":"native","title":"User IDs","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"inviteForce","type":"dropdown","valueKind":"string","storage":"native","title":"Skip Invalid Users","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"options":[{"id":"false"},{"id":"true"}]},{"id":"viewTriggerId","type":"short-input","valueKind":"string","storage":"native","title":"Trigger ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":true,"update_view":false,"push_view":true,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"viewInteractivityPointer","type":"short-input","valueKind":"string","storage":"native","title":"Interactivity Pointer","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":true,"update_view":false,"push_view":true,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"viewId","type":"short-input","valueKind":"string","storage":"native","title":"View ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":true,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"viewExternalId","type":"short-input","valueKind":"string","storage":"native","title":"External ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":true,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"viewHash","type":"short-input","valueKind":"string","storage":"native","title":"View Hash","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":true,"push_view":false,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"publishUserId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"publishUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualPublishUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"publishUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"viewPayload","type":"code","valueKind":"json","storage":"native","title":"View Payload","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"language":"json","condition":{"opaque":true},"required":true},{"id":"scheduleAt","type":"short-input","valueKind":"string","storage":"native","title":"Send At","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"scheduledLimit","type":"short-input","valueKind":"string","storage":"native","title":"Message Limit","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":true,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"scheduledCursor","type":"short-input","valueKind":"string","storage":"native","title":"Pagination Cursor","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":true,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"scheduledMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Scheduled Message ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":true,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"renameChannelName","type":"short-input","valueKind":"string","storage":"native","title":"New Channel Name","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":true,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"conversationTopic","type":"long-input","valueKind":"string","storage":"native","title":"Topic","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":true,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"conversationPurpose","type":"long-input","valueKind":"string","storage":"native","title":"Purpose","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"agentBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Slack Bot","mode":"basic","canonicalParamId":"agentCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":9}},"required":true},{"id":"manualAgentBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Custom Slack Bot Credential ID","mode":"advanced","canonicalParamId":"agentCredentialId","surface":"action","condition":{"field":"operation","value":{"list":9}},"required":true},{"id":"agentChannel","type":"channel-selector","valueKind":"picked","storage":"native","title":"Channel","mode":"basic","canonicalParamId":"agentChannelId","surface":"action","dependsOn":{"all":["agentBotCredential"],"any":[]},"selectorKey":"slack.channels","serviceId":"slack","condition":{"field":"operation","value":{"list":9}},"required":true,"options":{"dynamic":true}},{"id":"manualAgentChannel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","mode":"advanced","canonicalParamId":"agentChannelId","surface":"action","condition":{"field":"operation","value":{"list":9}},"required":true},{"id":"agentThreadTs","type":"short-input","valueKind":"string","storage":"native","title":"Thread Timestamp","surface":"action","condition":{"field":"operation","value":{"list":9}},"required":{"field":"operation","value":{"list":10}}},{"id":"agentSessionStatus","type":"dropdown","valueKind":"string","storage":"native","title":"Session Status","surface":"action","valueDefault":{"constant":"processing"},"condition":{"field":"operation","value":"set_agent_session_status"},"required":true,"options":[{"id":"active"},{"id":"processing"},{"id":"suspended"},{"id":"closed"}]},{"id":"agentSessionTitle","type":"short-input","valueKind":"string","storage":"native","title":"Session Title","surface":"action","condition":{"field":"operation","value":{"list":10}},"required":{"field":"operation","value":"rename_agent_session"}},{"id":"agentInitiatorUser","type":"user-selector","valueKind":"picked","storage":"native","title":"Initiator","mode":"basic","canonicalParamId":"agentInitiatorUserId","surface":"action","dependsOn":{"all":["agentBotCredential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"field":"operation","value":"set_agent_session_status"},"required":false,"options":{"dynamic":true}},{"id":"manualAgentInitiatorUser","type":"short-input","valueKind":"string","storage":"native","title":"Initiator User ID","mode":"advanced","canonicalParamId":"agentInitiatorUserId","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"agentIconEmoji","type":"short-input","valueKind":"string","storage":"native","title":"Agent Icon Emoji","mode":"advanced","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"agentIconUrl","type":"short-input","valueKind":"string","storage":"native","title":"Agent Icon URL","mode":"advanced","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"agentUsername","type":"short-input","valueKind":"string","storage":"native","title":"Agent Username","mode":"advanced","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"listBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Slack Bot","mode":"basic","canonicalParamId":"listCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":11}},"required":true},{"id":"manualListBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Custom Slack Bot Credential ID","mode":"advanced","canonicalParamId":"listCredentialId","surface":"action","condition":{"field":"operation","value":{"list":11}},"required":true},{"id":"listId","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":["rename_list","share_list","list_items","get_list_item","create_list_item","update_list_items","delete_list_item"]},"required":true},{"id":"listShareTarget","type":"dropdown","valueKind":"string","storage":"native","title":"Share With","surface":"action","valueDefault":{"constant":"users"},"condition":{"field":"operation","value":"share_list"},"required":true,"options":[{"id":"users"},{"id":"channels"}]},{"id":"listShareUserIds","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_list","and":{"field":"listShareTarget","value":"users"}},"required":true},{"id":"listShareChannelIds","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_list","and":{"field":"listShareTarget","value":"channels"}},"required":true},{"id":"listAccessLevel","type":"dropdown","valueKind":"string","storage":"native","title":"Access Level","surface":"action","dependsOn":{"all":["listShareTarget"],"any":[]},"valueDefault":{"constant":"read"},"condition":{"field":"operation","value":"share_list"},"required":true,"options":{"opaque":true}},{"id":"listName","type":"short-input","valueKind":"string","storage":"native","title":"Name","surface":"action","condition":{"field":"operation","value":{"list":12}},"required":{"field":"operation","value":"create_list"}},{"id":"listItemId","type":"short-input","valueKind":"string","storage":"native","title":"Row ID","surface":"action","condition":{"field":"operation","value":["get_list_item","delete_list_item"]},"required":true},{"id":"listInitialFields","type":"code","valueKind":"json","storage":"native","title":"Initial Fields","surface":"action","language":"json","condition":{"field":"operation","value":"create_list_item"}},{"id":"listCells","type":"code","valueKind":"json","storage":"native","title":"Cells","surface":"action","language":"json","condition":{"field":"operation","value":"update_list_items"},"required":true},{"id":"listSchema","type":"code","valueKind":"json","storage":"native","title":"Column Schema","surface":"action","language":"json","condition":{"field":"operation","value":"create_list"}},{"id":"listDescription","type":"long-input","valueKind":"string","storage":"native","title":"Description","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":12}}},{"id":"listUpdateTodoMode","type":"dropdown","valueKind":"string","storage":"native","title":"Task Tracking Fields","mode":"advanced","surface":"action","valueDefault":{"constant":"unchanged"},"condition":{"field":"operation","value":"rename_list"},"options":[{"id":"unchanged"},{"id":"true"},{"id":"false"}]},{"id":"listTodoMode","type":"switch","valueKind":"boolean","storage":"native","title":"Task Tracking Fields","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_list"}},{"id":"listParentItemId","type":"short-input","valueKind":"string","storage":"native","title":"Parent Row ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_list_item"}},{"id":"listDuplicatedItemId","type":"short-input","valueKind":"string","storage":"native","title":"Duplicate Row ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_list_item"}},{"id":"listLimit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_items"}},{"id":"listCursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_items"}},{"id":"listArchived","type":"switch","valueKind":"boolean","storage":"native","title":"Archived Rows","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_items"}},{"id":"listIncludeSchema","type":"switch","valueKind":"boolean","storage":"native","title":"Include List Schema","mode":"advanced","surface":"action","defaultValue":true,"condition":{"field":"operation","value":"list_items"}},{"id":"apiBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Slack Bot","mode":"basic","canonicalParamId":"apiBotCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":13}},"required":true},{"id":"manualApiBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Slack Credential ID","mode":"advanced","canonicalParamId":"apiBotCredentialId","surface":"action","condition":{"field":"operation","value":{"list":13}},"required":true},{"id":"apiOAuthCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Slack Account or Bot","mode":"basic","canonicalParamId":"apiOAuthCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":14}},"required":true},{"id":"manualApiOAuthCredential","type":"short-input","valueKind":"string","storage":"native","title":"Slack Credential ID","mode":"advanced","canonicalParamId":"apiOAuthCredentialId","surface":"action","condition":{"field":"operation","value":{"list":14}},"required":true},{"id":"slack_revoke_list_access_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"revoke_list_access"},"required":true},{"id":"slack_revoke_list_access_user_ids","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_list_access"},"required":false},{"id":"slack_revoke_list_access_channel_ids","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_list_access"},"required":false},{"id":"slack_start_list_export_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":true},{"id":"slack_start_list_export_format","type":"dropdown","valueKind":"string","storage":"native","title":"Export Format","surface":"action","valueDefault":{"constant":"csv"},"condition":{"field":"operation","value":"start_list_export"},"required":false,"options":[{"id":"csv"},{"id":"json"}]},{"id":"slack_start_list_export_include_threads","type":"switch","valueKind":"boolean","storage":"native","title":"Include Threads","mode":"advanced","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":false},{"id":"slack_start_list_export_include_attachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","mode":"advanced","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":false},{"id":"slack_start_list_export_include_archived","type":"switch","valueKind":"boolean","storage":"native","title":"Include Archived Rows","mode":"advanced","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":false},{"id":"slack_get_list_export_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":true},{"id":"slack_get_list_export_job_id","type":"short-input","valueKind":"string","storage":"native","title":"Export Job ID","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":true},{"id":"slack_get_list_export_format","type":"dropdown","valueKind":"string","storage":"native","title":"Export Format","surface":"action","valueDefault":{"constant":"csv"},"condition":{"field":"operation","value":"get_list_export"},"required":false,"options":[{"id":"csv"},{"id":"json"}]},{"id":"slack_get_list_export_include_threads","type":"switch","valueKind":"boolean","storage":"native","title":"Include Threads","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":false},{"id":"slack_get_list_export_include_attachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":false},{"id":"slack_delete_list_items_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"delete_list_items"},"required":true},{"id":"slack_delete_list_items_ids","type":"code","valueKind":"json","storage":"native","title":"Row IDs","surface":"action","language":"json","condition":{"field":"operation","value":"delete_list_items"},"required":true},{"id":"slack_share_canvas_canvas_id","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","condition":{"field":"operation","value":"share_canvas"},"required":true},{"id":"slack_share_canvas_access_level","type":"dropdown","valueKind":"string","storage":"native","title":"Access Level","surface":"action","dependsOn":{"all":["slack_share_canvas_channel_ids"],"any":[]},"valueDefault":{"constant":"read"},"condition":{"field":"operation","value":"share_canvas"},"required":true,"options":{"opaque":true}},{"id":"slack_share_canvas_user_ids","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_canvas"},"required":false},{"id":"slack_share_canvas_channel_ids","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_canvas"},"required":false},{"id":"slack_revoke_canvas_access_canvas_id","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","condition":{"field":"operation","value":"revoke_canvas_access"},"required":true},{"id":"slack_revoke_canvas_access_user_ids","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_canvas_access"},"required":false},{"id":"slack_revoke_canvas_access_channel_ids","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_canvas_access"},"required":false},{"id":"slack_join_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"join_conversation"},"required":true},{"id":"slack_leave_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"leave_conversation"},"required":true},{"id":"slack_kick_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"kick_conversation"},"required":true},{"id":"slack_kick_conversation_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","surface":"action","condition":{"field":"operation","value":"kick_conversation"},"required":true},{"id":"slack_unarchive_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"unarchive_conversation"},"required":true},{"id":"slack_close_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"close_conversation"},"required":true},{"id":"slack_mark_conversation_read_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"mark_conversation_read"},"required":true},{"id":"slack_mark_conversation_read_ts","type":"short-input","valueKind":"string","storage":"native","title":"Read Through Timestamp","surface":"action","condition":{"field":"operation","value":"mark_conversation_read"},"required":true},{"id":"slack_open_conversation_users","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_open_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Conversation ID","surface":"action","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_open_conversation_prevent_creation","type":"switch","valueKind":"boolean","storage":"native","title":"Only Resume Existing Conversation","mode":"advanced","surface":"action","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_open_conversation_return_im","type":"switch","valueKind":"boolean","storage":"native","title":"Include Conversation Details","mode":"advanced","surface":"action","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_lookup_user_by_email_email","type":"short-input","valueKind":"string","storage":"native","title":"Email","surface":"action","condition":{"field":"operation","value":"lookup_user_by_email"},"required":true},{"id":"slack_list_user_conversations_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_types","type":"short-input","valueKind":"string","storage":"native","title":"Conversation Types","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_exclude_archived","type":"switch","valueKind":"boolean","storage":"native","title":"Exclude Archived","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_exclude_muted","type":"switch","valueKind":"boolean","storage":"native","title":"Exclude Muted","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_limit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_get_user_profile_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_user_profile"},"required":false},{"id":"slack_get_user_profile_include_labels","type":"switch","valueKind":"boolean","storage":"native","title":"Include Custom Field Labels","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_user_profile"},"required":false},{"id":"slack_set_user_presence_presence","type":"dropdown","valueKind":"string","storage":"native","title":"Presence","surface":"action","valueDefault":{"constant":"auto"},"condition":{"field":"operation","value":"set_user_presence"},"required":true,"options":[{"id":"auto"},{"id":"away"}]},{"id":"slack_get_file_info_file","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","condition":{"field":"operation","value":"get_file_info"},"required":true},{"id":"slack_get_file_info_cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_file_info"},"required":false},{"id":"slack_get_file_info_limit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_file_info"},"required":false},{"id":"slack_list_files_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_types","type":"short-input","valueKind":"string","storage":"native","title":"File Types","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_ts_from","type":"short-input","valueKind":"string","storage":"native","title":"From Timestamp","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_ts_to","type":"short-input","valueKind":"string","storage":"native","title":"To Timestamp","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_page","type":"short-input","valueKind":"string","storage":"native","title":"Page","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_count","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_show_files_hidden_by_limit","type":"switch","valueKind":"boolean","storage":"native","title":"Include Files Hidden by Plan Limit","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_delete_file_file","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","condition":{"field":"operation","value":"delete_file"},"required":true},{"id":"slack_get_reactions_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_timestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_file","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_file_comment","type":"short-input","valueKind":"string","storage":"native","title":"File Comment ID","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_full","type":"switch","valueKind":"boolean","storage":"native","title":"Include All Reacting Users","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_list_reactions_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_full","type":"switch","valueKind":"boolean","storage":"native","title":"Include All Reacting Users","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_limit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_pin_message_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"pin_message"},"required":true},{"id":"slack_pin_message_timestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"pin_message"},"required":true},{"id":"slack_unpin_message_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"unpin_message"},"required":true},{"id":"slack_unpin_message_timestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"unpin_message"},"required":true},{"id":"slack_list_pins_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"list_pins"},"required":true},{"id":"slack_add_bookmark_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":true},{"id":"slack_add_bookmark_title","type":"short-input","valueKind":"string","storage":"native","title":"Title","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":true},{"id":"slack_add_bookmark_link","type":"short-input","valueKind":"string","storage":"native","title":"Link URL","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":true},{"id":"slack_add_bookmark_emoji","type":"short-input","valueKind":"string","storage":"native","title":"Emoji","mode":"advanced","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":false},{"id":"slack_add_bookmark_parent_id","type":"short-input","valueKind":"string","storage":"native","title":"Parent Bookmark ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":false},{"id":"slack_edit_bookmark_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":true},{"id":"slack_edit_bookmark_bookmark_id","type":"short-input","valueKind":"string","storage":"native","title":"Bookmark ID","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":true},{"id":"slack_edit_bookmark_title","type":"short-input","valueKind":"string","storage":"native","title":"Title","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":false},{"id":"slack_edit_bookmark_link","type":"short-input","valueKind":"string","storage":"native","title":"Link URL","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":false},{"id":"slack_edit_bookmark_emoji","type":"short-input","valueKind":"string","storage":"native","title":"Emoji","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":false},{"id":"slack_list_bookmarks_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"list_bookmarks"},"required":true},{"id":"slack_remove_bookmark_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"remove_bookmark"},"required":true},{"id":"slack_remove_bookmark_bookmark_id","type":"short-input","valueKind":"string","storage":"native","title":"Bookmark ID","surface":"action","condition":{"field":"operation","value":"remove_bookmark"},"required":true},{"id":"slack_create_user_group_name","type":"short-input","valueKind":"string","storage":"native","title":"Name","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":true},{"id":"slack_create_user_group_handle","type":"short-input","valueKind":"string","storage":"native","title":"Mention Handle","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_description","type":"short-input","valueKind":"string","storage":"native","title":"Description","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_channels","type":"code","valueKind":"json","storage":"native","title":"Default Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_additional_channels","type":"code","valueKind":"json","storage":"native","title":"Additional Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_enable_section","type":"switch","valueKind":"boolean","storage":"native","title":"Show as Sidebar Section","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_update_user_group_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":true},{"id":"slack_update_user_group_name","type":"short-input","valueKind":"string","storage":"native","title":"Name","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_handle","type":"short-input","valueKind":"string","storage":"native","title":"Mention Handle","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_description","type":"short-input","valueKind":"string","storage":"native","title":"Description","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_channels","type":"code","valueKind":"json","storage":"native","title":"Default Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_additional_channels","type":"code","valueKind":"json","storage":"native","title":"Additional Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_enable_section","type":"switch","valueKind":"boolean","storage":"native","title":"Show as Sidebar Section","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_enable_user_group_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"enable_user_group"},"required":true},{"id":"slack_enable_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"enable_user_group"},"required":false},{"id":"slack_enable_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"enable_user_group"},"required":false},{"id":"slack_disable_user_group_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"disable_user_group"},"required":true},{"id":"slack_disable_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"disable_user_group"},"required":false},{"id":"slack_disable_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"disable_user_group"},"required":false},{"id":"slack_list_user_groups_include_disabled","type":"switch","valueKind":"boolean","storage":"native","title":"Include Disabled Groups","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_groups_include_users","type":"switch","valueKind":"boolean","storage":"native","title":"Include Members","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_groups_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_groups_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_group_members_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"list_user_group_members"},"required":true},{"id":"slack_list_user_group_members_include_disabled","type":"switch","valueKind":"boolean","storage":"native","title":"Include Disabled Users","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_group_members"},"required":false},{"id":"slack_list_user_group_members_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_group_members"},"required":false},{"id":"slack_update_user_group_members_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":true},{"id":"slack_update_user_group_members_users","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group_members"},"required":true},{"id":"slack_update_user_group_members_additional_channels","type":"code","valueKind":"json","storage":"native","title":"Additional Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_update_user_group_members_is_shared","type":"switch","valueKind":"boolean","storage":"native","title":"Shared Section","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_update_user_group_members_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_update_user_group_members_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_get_dnd_info_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_dnd_info"},"required":false},{"id":"slack_get_dnd_info_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_dnd_info"},"required":false},{"id":"slack_get_team_dnd_info_users","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"get_team_dnd_info"},"required":true},{"id":"slack_get_team_dnd_info_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_team_dnd_info"},"required":false},{"id":"slack_get_team_info_team","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_team_info"},"required":false},{"id":"slack_get_team_info_domain","type":"short-input","valueKind":"string","storage":"native","title":"Workspace Domain","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_team_info"},"required":false},{"id":"slack_get_team_profile_visibility","type":"dropdown","valueKind":"string","storage":"native","title":"Visibility","surface":"action","valueDefault":{"constant":"all"},"condition":{"field":"operation","value":"get_team_profile"},"required":false,"options":[{"id":"all"},{"id":"visible"},{"id":"hidden"}]},{"id":"slack_unfurl_links_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"unfurl_links"},"required":true},{"id":"slack_unfurl_links_ts","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"unfurl_links"},"required":true},{"id":"slack_unfurl_links_unfurls","type":"code","valueKind":"json","storage":"native","title":"Link Previews","surface":"action","language":"json","condition":{"field":"operation","value":"unfurl_links"},"required":true},{"trigger":"slack_oauth","start":0,"count":21}],"outputs":{"message":{"type":"json","description":"Complete message object with all properties: ts, text, user, channel, reactions, threads, files, attachments, blocks, stars, pins, and edit history"},"ts":{"type":"string","description":"Message timestamp returned by Slack API"},"channel":{"type":"string","description":"Channel identifier where message was sent"},"fileCount":{"type":"number","description":"Number of files uploaded (when files are attached)"},"files":{"type":"file[]","description":"Files attached to the message"},"messageTs":{"type":"string","description":"Timestamp of the ephemeral message (cannot be used to update or delete)"},"canvas_id":{"type":"string","description":"Canvas identifier for created canvases"},"title":{"type":"string","description":"Canvas title"},"canvas":{"type":"json","description":"Canvas file metadata returned by Slack"},"canvases":{"type":"json","description":"Array of canvas file objects returned by Slack"},"paging":{"type":"json","description":"Pagination information for listed canvases"},"sections":{"type":"json","description":"Canvas section IDs returned by Slack section lookup"},"ok":{"type":"boolean","description":"Whether Slack completed the operation"},"status":{"type":"string","description":"List export job status"},"agentStatus":{"type":"string","description":"Agent session status recorded by Slack"},"messages":{"type":"json","description":"Conversation messages"},"parentMessage":{"type":"json","description":"The thread parent message with all properties"},"replies":{"type":"json","description":"Array of reply messages in the thread (excluding the parent)"},"replyCount":{"type":"number","description":"Number of replies returned in this response"},"hasMore":{"type":"boolean","description":"Whether more thread messages or provider pages remain beyond the fetched window"},"pages":{"type":"number","description":"Number of provider pages fetched during a paginated read"},"threadTs":{"type":"string","description":"Thread timestamp an assistant status/title/prompts op was set on"},"permalink":{"type":"string","description":"Permalink URL to the message"},"channels":{"type":"json","description":"One page of accessible public and private channel objects, including conversation type and membership fields."},"count":{"type":"number","description":"Total number of items returned (channels, members, or users)"},"nextCursor":{"type":"string","description":"Continuation cursor; empty or null when finished"},"members":{"type":"json","description":"Array of user IDs who are members of the channel"},"users":{"type":"json","description":"User IDs or a map of user IDs to Do Not Disturb state"},"user":{"type":"json","description":"Detailed user object with properties: id, name, real_name, display_name, first_name, last_name, title, is_bot, is_admin, deleted, timezone, avatars, status"},"file":{"type":"file","description":"Downloaded file stored in execution files"},"content":{"type":"string","description":"Success message for update operation"},"metadata":{"type":"json","description":"Updated message metadata (legacy, use message object instead)"},"channelInfo":{"type":"json","description":"Detailed channel object with properties: id, name, is_private, is_archived, is_member, num_members, topic, purpose, created, creator"},"presence":{"type":"string","description":"User presence status: \"active\" or \"away\""},"online":{"type":"boolean","description":"Whether user has an active client connection (only available when checking own presence)"},"autoAway":{"type":"boolean","description":"Whether user was automatically set to away (only available when checking own presence)"},"manualAway":{"type":"boolean","description":"Whether user manually set themselves as away (only available when checking own presence)"},"connectionCount":{"type":"number","description":"Total number of active connections (only available when checking own presence)"},"lastActivity":{"type":"number","description":"Unix timestamp of last detected activity (only available when checking own presence)"},"view":{"type":"json","description":"View object with properties: id, team_id, type, title, submit, close, blocks, private_metadata, callback_id, external_id, state, hash, clear_on_close, notify_on_close, root_view_id, previous_view_id, app_id, bot_id"},"errors":{"type":"json","description":"Array of per-user error objects when force is true and some invitations failed (user, ok, error)"},"scheduledMessageId":{"type":"string","description":"Identifier of the scheduled message (used to delete it before it posts)"},"postAt":{"type":"number","description":"Unix timestamp when a scheduled message will post"},"scheduledMessages":{"type":"json","description":"Array of pending scheduled message objects with properties: id, channel_id, post_at, date_created, text"},"purpose":{"type":"string","description":"The purpose/description that was set on the channel"},"event_type":{"type":"string","description":"Type of Slack event that triggered the workflow"},"subtype":{"type":"string","description":"Message subtype (e.g., channel_join, channel_leave, bot_message). Null for regular user messages"},"channel_name":{"type":"string","description":"Human-readable channel name"},"channel_type":{"type":"string","description":"Type of channel (e.g., channel, group, im, mpim)"},"user_name":{"type":"string","description":"Username who triggered the event"},"bot_id":{"type":"string","description":"Bot ID if the message was sent by a bot. Null for human users"},"timestamp":{"type":"string","description":"Message timestamp from the triggering event"},"thread_ts":{"type":"string","description":"Parent thread timestamp (if message is in a thread)"},"team_id":{"type":"string","description":"Slack workspace/team ID"},"event_id":{"type":"string","description":"Unique event identifier for the trigger"},"profile":{"type":"json","description":"User profile or workspace custom profile fields"},"usergroups":{"type":"json","description":"User groups"},"usergroup":{"type":"json","description":"Created or updated user group"},"bookmarks":{"type":"json","description":"Channel bookmarks"},"bookmark":{"type":"json","description":"Created or edited bookmark"},"emoji":{"type":"json","description":"Custom emoji names mapped to image URLs or aliases"},"team":{"type":"json","description":"Workspace details"},"job_id":{"type":"string","description":"List export job ID"},"download_url":{"type":"string","description":"List export download URL when ready"},"response_metadata":{"type":"json","description":"Pagination metadata including next_cursor"},"dnd_enabled":{"type":"boolean","description":"Whether Do Not Disturb is enabled"},"next_dnd_start_ts":{"type":"number","description":"Next Do Not Disturb start timestamp"},"next_dnd_end_ts":{"type":"number","description":"Next Do Not Disturb end timestamp"},"snooze_enabled":{"type":"boolean","description":"Whether notification snooze is enabled"},"snooze_endtime":{"type":"number","description":"Snooze end timestamp"},"snooze_remaining":{"type":"number","description":"Seconds remaining in snooze"},"snooze_is_indefinite":{"type":"boolean","description":"Whether snooze is indefinite"},"type":{"type":"string","description":"Type of reacted-to item"},"comment":{"type":"json","description":"File comment with reactions"},"comments":{"type":"json","description":"File comments (id, comment, user, created, timestamp)"},"fileMetadata":{"type":"json","description":"Slack file metadata (id, name, title, mimetype, permalink)"},"conversation":{"type":"json","description":"Opened or joined conversation details (id, name, is_im, is_mpim)"},"listId":{"type":"string","description":"Created List ID"},"schema":{"type":"json","description":"Created column schema (id, key, name, type, options); null when Slack omits it"},"list":{"type":"json","description":"List metadata (id, title, schema); null when not included"},"items":{"type":"json","description":"List rows, pinned items, or reacted-to items, depending on the operation"},"item":{"type":"json","description":"One row (id, list_id, fields, timestamps, parent_record_id)"}}},"start_trigger":{"type":"start_trigger","name":"Start","category":"triggers","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":false,"errorPort":false,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["chat","manual","api"]},"dynamicOutputs":{"source":"inputFormat","param":"inputFormat"},"subBlocks":[{"id":"inputFormat","type":"input-format","valueKind":"array","storage":"native","structured":"inputFormat","title":"Inputs"},{"id":"runMetadata","type":"switch","valueKind":"boolean","storage":"native","title":"Add run metadata","mode":"advanced","defaultValue":false}],"outputs":{}},"table_v2":{"type":"table_v2","name":"Table","category":"blocks","tools":{"access":["table_insert_row","table_batch_insert_rows","table_upsert_row","table_update_row","table_update_rows_by_filter","table_delete_row","table_delete_rows_by_filter","table_query_rows_v2","table_get_row","table_get_schema"],"selector":"operation"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"triggers":{"enabled":true,"available":["table_new_row"]},"subBlocks":[{"id":"operation","type":"dropdown","valueKind":"string","storage":"native","title":"Operation","surface":"action","valueDefault":{"constant":"query_rows"},"options":[{"id":"query_rows","label":"Query Rows"},{"id":"insert_row","label":"Insert Row"},{"id":"upsert_row","label":"Upsert Row"},{"id":"batch_insert_rows","label":"Batch Insert Rows"},{"id":"update_rows_by_filter","label":"Update Rows by Filter"},{"id":"delete_rows_by_filter","label":"Delete Rows by Filter"},{"id":"update_row","label":"Update Row by ID"},{"id":"delete_row","label":"Delete Row by ID"},{"id":"get_row","label":"Get Row by ID"},{"id":"get_schema","label":"Get Schema"}]},{"id":"tableSelector","type":"table-selector","valueKind":"resource","storage":"native","resourceKind":"table","title":"Table","mode":"basic","canonicalParamId":"tableId","surface":"action","required":true},{"id":"manualTableId","type":"short-input","valueKind":"string","storage":"native","title":"Table ID","mode":"advanced","canonicalParamId":"tableId","surface":"action","required":true},{"id":"outputColumns","type":"dropdown","valueKind":"array","storage":"native","title":"Columns to Return","surface":"action","dependsOn":{"all":[],"any":["tableSelector","manualTableId"]},"multiple":true,"selectorKey":"table.outputColumns","condition":{"field":"operation","value":"query_rows"},"options":{"dynamic":true}},{"id":"rowId","type":"short-input","valueKind":"string","storage":"native","title":"Row ID","surface":"action","dependsOn":{"all":["tableId"],"any":[]},"condition":{"field":"operation","value":["get_row","update_row","delete_row"]},"required":true},{"id":"data","type":"code","valueKind":"json","storage":"native","title":"Row Data (JSON)","surface":"action","language":"json","condition":{"field":"operation","value":["insert_row","upsert_row","update_row","update_rows_by_filter"]},"required":true},{"id":"conflictColumnSelector","type":"column-selector","valueKind":"picked","storage":"native","title":"Conflict Column","mode":"basic","canonicalParamId":"conflictColumn","surface":"action","dependsOn":{"all":["tableSelector"],"any":[]},"selectorKey":"table.columns","condition":{"field":"operation","value":"upsert_row"},"options":{"dynamic":true}},{"id":"manualConflictColumn","type":"short-input","valueKind":"string","storage":"native","title":"Conflict Column","mode":"advanced","canonicalParamId":"conflictColumn","surface":"action","dependsOn":{"all":["tableId"],"any":[]},"condition":{"field":"operation","value":"upsert_row"}},{"id":"rows","type":"code","valueKind":"json","storage":"native","title":"Rows Data (Array of JSON)","surface":"action","language":"json","condition":{"field":"operation","value":"batch_insert_rows"},"required":true},{"id":"filterBuilder","type":"filter-builder","valueKind":"json","storage":"native","title":"Filter","mode":"basic","canonicalParamId":"filterInput","surface":"action","paramVisibility":"user-only","condition":{"field":"operation","value":{"list":15}}},{"id":"filter","type":"code","valueKind":"json","storage":"native","title":"Filter","mode":"advanced","canonicalParamId":"filterInput","surface":"action","language":"json","condition":{"field":"operation","value":{"list":15}}},{"id":"sortBuilder","type":"sort-builder","valueKind":"json","storage":"native","title":"Order","mode":"basic","canonicalParamId":"sortInput","surface":"action","paramVisibility":"user-only","condition":{"field":"operation","value":"query_rows"}},{"id":"order","type":"short-input","valueKind":"string","storage":"native","title":"Order","mode":"advanced","canonicalParamId":"sortInput","surface":"action","condition":{"field":"operation","value":"query_rows"}},{"id":"limit","type":"short-input","valueKind":"string","storage":"native","title":"Limit","surface":"action","condition":{"field":"operation","value":{"list":15}}},{"id":"cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","surface":"action","condition":{"field":"operation","value":"query_rows"}},{"trigger":"table_new_row","start":0,"count":6}],"outputs":{"success":{"type":"boolean","description":"Operation success status"},"row":{"type":"json","description":"Single row data","condition":{"field":"operation","value":["get_row","insert_row","upsert_row","update_row"]}},"operation":{"type":"string","description":"Operation performed (insert or update)","condition":{"field":"operation","value":"upsert_row"}},"rows":{"type":"array","description":"Array of rows","condition":{"field":"operation","value":["query_rows","batch_insert_rows"]}},"rowCount":{"type":"number","description":"Rows returned (query) or total rows in the table (get schema)","condition":{"field":"operation","value":["query_rows","get_schema"]}},"totalCount":{"type":"number","description":"Total rows matching the predicate (first page only)","condition":{"field":"operation","value":"query_rows"}},"nextCursor":{"type":"string","description":"Cursor to fetch the next page, or null on the last page","condition":{"field":"operation","value":"query_rows"}},"insertedCount":{"type":"number","description":"Number of rows inserted","condition":{"field":"operation","value":"batch_insert_rows"}},"updatedCount":{"type":"number","description":"Number of rows updated","condition":{"field":"operation","value":"update_rows_by_filter"}},"updatedRowIds":{"type":"array","description":"IDs of updated rows","condition":{"field":"operation","value":"update_rows_by_filter"}},"deletedCount":{"type":"number","description":"Number of rows deleted","condition":{"field":"operation","value":["delete_row","delete_rows_by_filter"]}},"deletedRowIds":{"type":"array","description":"IDs of deleted rows","condition":{"field":"operation","value":"delete_rows_by_filter"}},"name":{"type":"string","description":"Table name","condition":{"field":"operation","value":"get_schema"}},"columns":{"type":"array","description":"Column definitions (each includes its stable id)","condition":{"field":"operation","value":"get_schema"}},"columnCount":{"type":"number","description":"Number of columns","condition":{"field":"operation","value":"get_schema"}},"maxRows":{"type":"number","description":"Max rows per table for the workspace's plan","condition":{"field":"operation","value":"get_schema"}},"message":{"type":"string","description":"Operation status message"}}},"variables":{"type":"variables","name":"Variables","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"variables","type":"variables-input","valueKind":"array","storage":"native","structured":"variables","title":"Variable Assignments","required":false}],"outputs":{}}},"triggers":{"generic_webhook":{"id":"generic_webhook","provider":"generic","name":"Webhook Trigger","webhook":true,"subBlocks":[{"id":"webhookUrlDisplay","type":"short-input","valueKind":"none","storage":"native","title":"Webhook URL","mode":"trigger","readOnly":true},{"id":"requireAuth","type":"switch","valueKind":"boolean","storage":"native","title":"Require Authentication","mode":"trigger","defaultValue":true},{"id":"token","type":"short-input","valueKind":"string","storage":"native","title":"Authentication Token","mode":"trigger","valueDefault":{"computed":true},"password":true,"required":false},{"id":"secretHeaderName","type":"short-input","valueKind":"string","storage":"native","title":"Secret Header Name (Optional)","mode":"trigger","required":false},{"id":"acceptOtherMethods","type":"switch","valueKind":"boolean","storage":"native","title":"Accept Other HTTP Methods","mode":"trigger","defaultValue":false},{"id":"exposeRequestHeaders","type":"switch","valueKind":"boolean","storage":"native","title":"Expose Request Headers","mode":"trigger","defaultValue":false},{"id":"idempotencyField","type":"short-input","valueKind":"string","storage":"native","title":"Deduplication Field (Optional)","mode":"trigger","required":false},{"id":"responseMode","type":"dropdown","valueKind":"string","storage":"native","title":"Acknowledgement","mode":"trigger","defaultValue":"default","options":[{"id":"default","label":"Default"},{"id":"custom","label":"Custom"}]},{"id":"verifyTestEvents","type":"switch","valueKind":"boolean","storage":"native","title":"Verify Test Events","mode":"trigger","defaultValue":false},{"id":"responseStatusCode","type":"short-input","valueKind":"string","storage":"native","title":"Response Status Code","mode":"trigger","condition":{"field":"responseMode","value":"custom"},"required":false},{"id":"responseBody","type":"code","valueKind":"json","storage":"native","title":"Response Body","mode":"trigger","language":"json","condition":{"field":"responseMode","value":"custom"},"required":false},{"id":"inputFormat","type":"input-format","valueKind":"array","storage":"native","structured":"inputFormat","title":"Input Format","mode":"trigger"},{"shared":13},{"id":"samplePayload_generic_webhook","type":"code","valueKind":"none","storage":"native","title":"Event Payload Example","mode":"trigger","readOnly":true,"language":"json","condition":{"field":"selectedTriggerId","value":"generic_webhook"}}],"outputs":{}},"gmail_poller":{"id":"gmail_poller","provider":"gmail","name":"Gmail Email Trigger","polling":true,"subBlocks":[{"id":"triggerCredentials","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Credentials","mode":"trigger","canonicalParamId":"oauthCredential","serviceId":"gmail","required":true},{"id":"labelIds","type":"dropdown","valueKind":"array","storage":"native","title":"Gmail Labels to Monitor","mode":"trigger","dependsOn":{"all":["triggerCredentials"],"any":[]},"multiple":true,"selectorKey":"gmail.labels","required":false,"options":{"dynamic":true}},{"id":"labelFilterBehavior","type":"dropdown","valueKind":"string","storage":"native","title":"Label Filter Behavior","mode":"trigger","defaultValue":"INCLUDE","required":true,"options":[{"id":"INCLUDE"},{"id":"EXCLUDE"}]},{"id":"searchQuery","type":"short-input","valueKind":"string","storage":"native","title":"Gmail Search Query","mode":"trigger","required":false},{"id":"markAsRead","type":"switch","valueKind":"boolean","storage":"native","title":"Mark as Read","mode":"trigger","defaultValue":false,"required":false},{"id":"includeAttachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","mode":"trigger","defaultValue":false,"required":false},{"shared":13},{"id":"samplePayload_gmail_poller","type":"code","valueKind":"none","storage":"native","title":"Event Payload Example","mode":"trigger","readOnly":true,"language":"json","condition":{"field":"selectedTriggerId","value":"gmail_poller"}}],"outputs":{"email":{"type":"json","properties":{"id":{"type":"string","description":"Gmail message ID"},"threadId":{"type":"string","description":"Gmail thread ID"},"subject":{"type":"string","description":"Email subject line"},"from":{"type":"string","description":"Sender email address"},"to":{"type":"string","description":"Recipient email address"},"cc":{"type":"string","description":"CC recipients"},"bcc":{"type":"string","description":"BCC recipients (only present on messages you sent)"},"replyTo":{"type":"string","description":"Reply-To header"},"rfcMessageId":{"type":"string","description":"RFC Message-ID header (not the Gmail message ID)"},"inReplyTo":{"type":"string","description":"In-Reply-To header (RFC Message-ID of the parent message)"},"references":{"type":"string","description":"References header (RFC Message-IDs in the thread)"},"snippet":{"type":"string","description":"Short excerpt of the message text"},"date":{"type":"string","description":"Email date in ISO format"},"bodyText":{"type":"string","description":"Plain text email body"},"bodyHtml":{"type":"string","description":"HTML email body"},"labels":{"type":"array","description":"Email labels array"},"hasAttachments":{"type":"boolean","description":"Whether email has attachments"},"attachments":{"type":"file[]","description":"Array of email attachments as files (if includeAttachments is enabled)"}}},"timestamp":{"type":"string","description":"Event timestamp"}}},"slack_oauth":{"id":"slack_oauth","provider":"slack_app","name":"Slack","webhook":true,"subBlocks":[{"id":"eventType","type":"dropdown","valueKind":"string","storage":"native","title":"Event","mode":"trigger","required":true,"options":[{"id":"message","label":"Message"},{"id":"app_mention","label":"App mentioned"},{"id":"reaction_added","label":"Reaction added"},{"id":"reaction_removed","label":"Reaction removed"},{"id":"message_edited","label":"Message edited"},{"id":"message_deleted","label":"Message deleted"},{"id":"file_shared","label":"File shared"},{"id":"member_joined_channel","label":"Member joined channel"},{"id":"member_left_channel","label":"Member left channel"},{"id":"channel_created","label":"Channel created"},{"id":"channel_archive","label":"Channel archived"},{"id":"channel_rename","label":"Channel renamed"},{"id":"pin_added","label":"Pin added"},{"id":"pin_removed","label":"Pin removed"},{"id":"team_join","label":"Member joined workspace"},{"id":"app_home_opened","label":"App home opened"},{"id":"agent_session_stopped","label":"Agent session stopped"},{"id":"agent_session_title_changed","label":"Agent session title changed"},{"id":"app_context_changed","label":"Agent context changed"},{"id":"assistant_thread_started","label":"Assistant opened"},{"id":"assistant_thread_context_changed","label":"Assistant context changed"},{"id":"block_actions","label":"Button / select clicked"},{"id":"view_submission","label":"Modal submitted"},{"id":"slash_command","label":"Slash command"}]},{"id":"customBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Bot","mode":"trigger","canonicalParamId":"botCredential","serviceId":"slack","required":true},{"id":"manualBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Bot Credential ID","mode":"trigger-advanced","canonicalParamId":"botCredential","required":true},{"id":"source","type":"dropdown","valueKind":"array","storage":"native","title":"Source","mode":"trigger","multiple":true,"condition":{"field":"eventType","value":["message","message_edited","message_deleted"]},"required":false,"options":[{"id":"im","label":"Direct message"},{"id":"channel","label":"Public channel"},{"id":"group","label":"Private channel"}]},{"id":"channelFilter","type":"channel-selector","valueKind":"picked","storage":"native","title":"Channels","mode":"trigger","canonicalParamId":"channelFilter","dependsOn":{"all":["customBotCredential"],"any":[]},"multiple":true,"selectorKey":"slack.channels","serviceId":"slack","condition":{"field":"eventType","value":{"list":16}},"required":false,"options":{"dynamic":true}},{"id":"manualChannelFilter","type":"short-input","valueKind":"string","storage":"native","title":"Channel IDs","mode":"trigger-advanced","canonicalParamId":"channelFilter","condition":{"field":"eventType","value":{"list":16}},"required":false},{"id":"threads","type":"dropdown","valueKind":"string","storage":"native","title":"Threads","mode":"trigger","valueDefault":{"constant":"include"},"condition":{"field":"eventType","value":{"list":17}},"required":false,"options":[{"id":"include","label":"Messages and replies"},{"id":"exclude","label":"Messages only (no replies)"},{"id":"only","label":"Replies only"}]},{"id":"streamResponse","type":"switch","valueKind":"boolean","storage":"native","title":"Enable agent session","mode":"trigger","defaultValue":false,"condition":{"field":"eventType","value":{"list":17}},"required":false},{"id":"streamOutputs","type":"workflow-output-selector","valueKind":"none","storage":"native","title":"Outputs to stream","mode":"trigger","condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}}},{"id":"streamTaskTitle","type":"short-input","valueKind":"string","storage":"native","title":"Response status label","mode":"trigger","condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false},{"id":"streamTaskDisplayMode","type":"dropdown","valueKind":"string","storage":"native","title":"Task display","mode":"trigger","valueDefault":{"constant":"timeline"},"condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false,"options":[{"id":"timeline","label":"Timeline"},{"id":"plan","label":"Plan"}]},{"id":"streamIncludeThinking","type":"switch","valueKind":"boolean","storage":"native","title":"Include thinking updates","mode":"trigger","defaultValue":false,"condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false},{"id":"streamIncludeToolCalls","type":"switch","valueKind":"boolean","storage":"native","title":"Include tool calls","mode":"trigger","defaultValue":true,"condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false},{"id":"emoji","type":"short-input","valueKind":"string","storage":"native","title":"Emoji","mode":"trigger","condition":{"field":"eventType","value":["reaction_added","reaction_removed"]},"required":false},{"id":"nameContains","type":"short-input","valueKind":"string","storage":"native","title":"Name contains","mode":"trigger","condition":{"field":"eventType","value":["channel_created"]},"required":false},{"id":"interactionFilter","type":"short-input","valueKind":"string","storage":"native","title":"Action / Callback ID","mode":"trigger","condition":{"field":"eventType","value":["block_actions","view_submission"]},"required":false},{"id":"commandFilter","type":"short-input","valueKind":"string","storage":"native","title":"Command","mode":"trigger","condition":{"field":"eventType","value":["slash_command"]},"required":false},{"id":"filterBotMessages","type":"switch","valueKind":"boolean","storage":"native","title":"Ignore bot messages","mode":"trigger","defaultValue":true,"condition":{"field":"eventType","value":{"list":17}},"required":false},{"id":"includeOwnMessages","type":"switch","valueKind":"boolean","storage":"native","title":"Include own bot messages","mode":"trigger-advanced","defaultValue":false,"condition":{"field":"eventType","value":["message","app_mention","reaction_added","reaction_removed"]},"required":false},{"id":"includeFiles","type":"switch","valueKind":"boolean","storage":"native","title":"Include file attachments","mode":"trigger","defaultValue":false,"condition":{"field":"eventType","value":"message"},"required":false},{"id":"samplePayload_slack_oauth","type":"code","valueKind":"none","storage":"native","title":"Event Payload Example","mode":"trigger","readOnly":true,"language":"json","condition":{"field":"selectedTriggerId","value":"slack_oauth"}}],"outputs":{"event":{"type":"json","description":"Slack event data","properties":{"event_type":{"type":"string","description":"Type of Slack payload: an Events API event (e.g., app_mention, message), an interactivity type (e.g., block_actions), or \"slash_command\" for slash commands"},"subtype":{"type":"string","description":"Message subtype (e.g., channel_join, channel_leave, bot_message, file_share). Null for regular user messages"},"channel":{"type":"string","description":"Slack channel ID where the event occurred"},"channel_name":{"type":"string","description":"Human-readable channel name"},"channel_type":{"type":"string","description":"Type of channel (e.g., channel, group, im, mpim). Useful for distinguishing DMs from public channels"},"user":{"type":"string","description":"User ID who triggered the event"},"user_name":{"type":"string","description":"Username who triggered the event"},"bot_id":{"type":"string","description":"Bot ID if the message was sent by a bot. Null for human users"},"text":{"type":"string","description":"Message text content. For slash commands, the text after the command. For interactivity, the source message text (falls back to the triggering action value)"},"timestamp":{"type":"string","description":"Message timestamp from the triggering event"},"thread_ts":{"type":"string","description":"Parent thread timestamp (if message is in a thread)"},"streaming_message_ts":{"type":"array","description":"Message timestamps streamed during a stopped agent session","items":{"type":"string","description":"Streaming message timestamp"}},"title":{"type":"string","description":"Current agent session title"},"previous_title":{"type":"string","description":"Previous agent session title"},"tab":{"type":"string","description":"App Home tab that was opened, including messages for Agent View"},"context":{"type":"json","description":"Current Agent View context. Normalized from context on app_context_changed/app_home_opened or app_context on message.im"},"team_id":{"type":"string","description":"Slack workspace/team ID"},"user_team_id":{"type":"string","description":"Slack workspace/team ID of the user who triggered the event. Used for Slack Connect response streaming."},"enterprise_id":{"type":"string","description":"Slack Enterprise Grid organization ID"},"event_id":{"type":"string","description":"Unique event identifier"},"reaction":{"type":"string","description":"Emoji reaction name (e.g., thumbsup). Present for reaction_added/reaction_removed events"},"item_user":{"type":"string","description":"User ID of the original message author. Present for reaction_added/reaction_removed events"},"command":{"type":"string","description":"Slash command name including the leading slash (e.g., /deploy). Present for slash commands"},"action_id":{"type":"string","description":"action_id of the first interactive element triggered. Present for block_actions (button/select clicks)"},"action_value":{"type":"string","description":"Value carried by the first interactive element (button value, selected option, date, etc.). Present for block_actions"},"actions":{"type":"json","description":"Full array of interactive actions from the payload, preserving every element and its value. Present for block_actions"},"response_url":{"type":"string","description":"Temporary URL to post a response back to the originating message or command. Present for interactivity and slash commands"},"trigger_id":{"type":"string","description":"Short-lived trigger ID used to open a modal in response. Present for interactivity and slash commands"},"callback_id":{"type":"string","description":"Callback ID of the shortcut or view. Present for shortcuts and modal submissions"},"api_app_id":{"type":"string","description":"Slack app ID. Present for interactivity and slash commands"},"app_id":{"type":"string","description":"App ID of the app that produced the event (e.g. the bot that posted a message). Used to identify the app's own output"},"message_ts":{"type":"string","description":"Timestamp of the message the interaction originated from. Present for block_actions"},"view":{"type":"json","description":"Full Slack view object for modal interactions: state.values (submitted input values), private_metadata, id, callback_id, and hash. Present for view_submission/view_closed; null otherwise"},"message":{"type":"json","description":"Full source message object the interaction came from, including its blocks and text. Present for block_actions on a message; null otherwise"},"state":{"type":"json","description":"Current values of all stateful elements in the surface (state.values) at the time of a block action — e.g. inputs read on a button click. Present for block_actions; null otherwise"},"hasFiles":{"type":"boolean","description":"Whether the message has file attachments"},"files":{"type":"file[]","description":"File attachments downloaded from the message (if includeFiles is enabled and bot token is provided)"}}}}},"table_new_row":{"id":"table_new_row","provider":"table","name":"Table Trigger","subBlocks":[{"id":"tableSelector","type":"table-selector","valueKind":"resource","storage":"native","resourceKind":"table","title":"Table","mode":"trigger","canonicalParamId":"tableId","required":true},{"id":"manualTableId","type":"short-input","valueKind":"string","storage":"native","title":"Table ID","mode":"trigger-advanced","canonicalParamId":"tableId","required":true},{"id":"eventType","type":"dropdown","valueKind":"string","storage":"native","title":"Event","mode":"trigger","defaultValue":"insert","required":true,"options":[{"id":"insert","label":"Row Inserted"},{"id":"update","label":"Row Updated"},{"id":"delete","label":"Row Deleted"}]},{"id":"watchColumns","type":"dropdown","valueKind":"array","storage":"native","title":"Watch Columns","mode":"trigger","dependsOn":{"all":[],"any":["tableSelector","manualTableId"]},"multiple":true,"selectorKey":"table.columns","condition":{"field":"eventType","value":"update"},"required":false,"options":{"dynamic":true}},{"id":"includeHeaders","type":"switch","valueKind":"boolean","storage":"native","title":"Map Row Values to Headers","mode":"trigger","defaultValue":true,"required":false},{"shared":13}],"outputs":{"row":{"type":"json","description":"Row data mapped to column names (when header mapping is enabled)"},"rawRow":{"type":"json","description":"Raw row data object"},"previousRow":{"type":"json","description":"Previous row data before an update or deletion (null for inserts)"},"changedColumns":{"type":"json","description":"List of column names that changed (empty for inserts and deletes)"},"rowId":{"type":"string","description":"The unique row ID"},"headers":{"type":"json","description":"Column names from the table schema"},"tableId":{"type":"string","description":"The table ID"},"tableName":{"type":"string","description":"The table name"},"timestamp":{"type":"string","description":"Event timestamp in ISO format"}}}},"subBlocks":[{"id":"vertexCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Google Cloud Account","mode":"basic","canonicalParamId":"vertexCredential","serviceId":"vertex-ai","condition":{"opaque":true},"required":true},{"id":"vertexManualCredential","type":"short-input","valueKind":"string","storage":"native","title":"Google Cloud Account","mode":"advanced","canonicalParamId":"vertexCredential","condition":{"opaque":true},"required":true},{"id":"apiKey","type":"short-input","valueKind":"string","storage":"native","title":"API Key","password":true,"condition":{"opaque":true},"required":true},{"id":"azureEndpoint","type":"short-input","valueKind":"string","storage":"native","title":"Azure Endpoint","password":true,"condition":{"opaque":true}},{"id":"azureApiVersion","type":"short-input","valueKind":"string","storage":"native","title":"Azure API Version","condition":{"opaque":true}},{"id":"vertexProject","type":"short-input","valueKind":"string","storage":"native","title":"Vertex AI Project","password":true,"condition":{"opaque":true},"required":true},{"id":"vertexLocation","type":"short-input","valueKind":"string","storage":"native","title":"Vertex AI Location","condition":{"opaque":true},"required":true},{"id":"bedrockAuthMode","type":"dropdown","valueKind":"string","storage":"native","title":"AWS Authentication","valueDefault":{"constant":"access_keys"},"condition":{"opaque":true},"options":[{"id":"access_keys"},{"id":"credential"}]},{"id":"bedrockCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"AWS Credential","mode":"basic","canonicalParamId":"bedrockCredential","serviceId":"aws","condition":{"opaque":true},"required":true},{"id":"bedrockManualCredential","type":"short-input","valueKind":"string","storage":"native","title":"AWS Credential","mode":"advanced","canonicalParamId":"bedrockCredential","condition":{"opaque":true},"required":true},{"id":"bedrockAccessKeyId","type":"short-input","valueKind":"string","storage":"native","title":"AWS Access Key ID","password":true,"condition":{"opaque":true},"required":true},{"id":"bedrockSecretKey","type":"short-input","valueKind":"string","storage":"native","title":"AWS Secret Access Key","password":true,"condition":{"opaque":true},"required":true},{"id":"bedrockRegion","type":"short-input","valueKind":"string","storage":"native","title":"AWS Region","condition":{"opaque":true}},{"id":"triggerInstructions","type":"text","valueKind":"none","storage":"native","title":"Setup Instructions","mode":"trigger"}],"lists":[["jev-latest","jev-1.13.0","jev-preview"],["deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025","jev-latest","jev-1.13.0","jev-preview"],["jev-latest","jev-1.13.0","jev-preview","deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025"],["conversation","sliding_window","sliding_window_tokens"],["send_gmail","draft_gmail","edit_draft_gmail"],["add_label_gmail","remove_label_gmail"],["update_label_gmail","delete_label_gmail"],["create_label_gmail","update_label_gmail"],["list_canvases","list_scheduled_messages","set_agent_suggested_prompts","set_agent_session_status","rename_agent_session","create_list","rename_list","share_list","list_items","get_list_item","create_list_item","update_list_items","delete_list_item"],["set_agent_suggested_prompts","set_agent_session_status","rename_agent_session"],["set_agent_session_status","rename_agent_session"],["create_list","rename_list","share_list","list_items","get_list_item","create_list_item","update_list_items","delete_list_item"],["create_list","rename_list"],["revoke_list_access","start_list_export","get_list_export","delete_list_items","join_conversation","lookup_user_by_email","get_user_profile","set_user_presence","pin_message","unpin_message","list_pins","add_bookmark","edit_bookmark","list_bookmarks","remove_bookmark","create_user_group","update_user_group","enable_user_group","disable_user_group","list_user_groups","list_user_group_members","update_user_group_members","get_dnd_info","get_team_dnd_info","list_emoji","get_team_info","get_team_profile","unfurl_links"],["share_canvas","revoke_canvas_access","leave_conversation","kick_conversation","unarchive_conversation","close_conversation","mark_conversation_read","open_conversation","list_user_conversations","get_file_info","list_files","delete_file","get_reactions","list_reactions"],["query_rows","update_rows_by_filter","delete_rows_by_filter"],["message","app_mention","reaction_added","reaction_removed","message_edited","message_deleted","file_shared","member_joined_channel","member_left_channel","channel_archive","channel_rename","pin_added","pin_removed"],["message","app_mention"]],"hash":"7fae8ed186562e120fea4834565fa945b01fd6d7c1db5793f5aea25c3cc89d2c"} +{"catalogVersion":1,"sdkMajor":1,"builders":{"agent":{"type":"agent"},"api":{"type":"api"},"condition":{"type":"condition"},"fn":{"type":"function"},"gmail.addLabel":{"type":"gmail_v2","operation":"add_label_gmail"},"gmail.archiveEmail":{"type":"gmail_v2","operation":"archive_gmail"},"gmail.createLabel":{"type":"gmail_v2","operation":"create_label_gmail"},"gmail.deleteDraft":{"type":"gmail_v2","operation":"delete_draft_gmail"},"gmail.deleteEmail":{"type":"gmail_v2","operation":"delete_gmail"},"gmail.deleteLabel":{"type":"gmail_v2","operation":"delete_label_gmail"},"gmail.draftEmail":{"type":"gmail_v2","operation":"draft_gmail"},"gmail.editDraft":{"type":"gmail_v2","operation":"edit_draft_gmail"},"gmail.getDraft":{"type":"gmail_v2","operation":"get_draft_gmail"},"gmail.getThread":{"type":"gmail_v2","operation":"get_thread_gmail"},"gmail.listDrafts":{"type":"gmail_v2","operation":"list_drafts_gmail"},"gmail.listLabels":{"type":"gmail_v2","operation":"list_labels_gmail"},"gmail.listThreads":{"type":"gmail_v2","operation":"list_threads_gmail"},"gmail.markAsRead":{"type":"gmail_v2","operation":"mark_read_gmail"},"gmail.markAsUnread":{"type":"gmail_v2","operation":"mark_unread_gmail"},"gmail.moveEmail":{"type":"gmail_v2","operation":"move_gmail"},"gmail.readEmail":{"type":"gmail_v2","operation":"read_gmail"},"gmail.removeLabel":{"type":"gmail_v2","operation":"remove_label_gmail"},"gmail.searchEmail":{"type":"gmail_v2","operation":"search_gmail"},"gmail.sendEmail":{"type":"gmail_v2","operation":"send_gmail"},"gmail.trashThread":{"type":"gmail_v2","operation":"trash_thread_gmail"},"gmail.unarchiveEmail":{"type":"gmail_v2","operation":"unarchive_gmail"},"gmail.untrashThread":{"type":"gmail_v2","operation":"untrash_thread_gmail"},"gmail.updateLabel":{"type":"gmail_v2","operation":"update_label_gmail"},"note":{"type":"note"},"response":{"type":"response"},"router":{"type":"router_v2"},"setVariables":{"type":"variables"},"slack.addBookmark":{"type":"slack_v2","operation":"add_bookmark"},"slack.addReaction":{"type":"slack_v2","operation":"react"},"slack.archiveConversation":{"type":"slack_v2","operation":"archive_conversation"},"slack.closeConversation":{"type":"slack_v2","operation":"close_conversation"},"slack.createCanvas":{"type":"slack_v2","operation":"canvas"},"slack.createChannelCanvas":{"type":"slack_v2","operation":"create_channel_canvas"},"slack.createConversation":{"type":"slack_v2","operation":"create_conversation"},"slack.createList":{"type":"slack_v2","operation":"create_list"},"slack.createListItem":{"type":"slack_v2","operation":"create_list_item"},"slack.createUserGroup":{"type":"slack_v2","operation":"create_user_group"},"slack.deleteCanvas":{"type":"slack_v2","operation":"delete_canvas"},"slack.deleteFile":{"type":"slack_v2","operation":"delete_file"},"slack.deleteListItem":{"type":"slack_v2","operation":"delete_list_item"},"slack.deleteListItems":{"type":"slack_v2","operation":"delete_list_items"},"slack.deleteMessage":{"type":"slack_v2","operation":"delete"},"slack.deleteScheduledMessage":{"type":"slack_v2","operation":"delete_scheduled_message"},"slack.disableUserGroup":{"type":"slack_v2","operation":"disable_user_group"},"slack.downloadFile":{"type":"slack_v2","operation":"download"},"slack.editBookmark":{"type":"slack_v2","operation":"edit_bookmark"},"slack.editCanvas":{"type":"slack_v2","operation":"edit_canvas"},"slack.enableUserGroup":{"type":"slack_v2","operation":"enable_user_group"},"slack.findUserByEmail":{"type":"slack_v2","operation":"lookup_user_by_email"},"slack.getCanvasInfo":{"type":"slack_v2","operation":"get_canvas"},"slack.getChannelHistory":{"type":"slack_v2","operation":"get_channel_history"},"slack.getChannelInfo":{"type":"slack_v2","operation":"get_channel_info"},"slack.getDoNotDisturbInfo":{"type":"slack_v2","operation":"get_dnd_info"},"slack.getFileInfo":{"type":"slack_v2","operation":"get_file_info"},"slack.getListExport":{"type":"slack_v2","operation":"get_list_export"},"slack.getListItem":{"type":"slack_v2","operation":"get_list_item"},"slack.getMessage":{"type":"slack_v2","operation":"get_message"},"slack.getMessagePermalink":{"type":"slack_v2","operation":"get_permalink"},"slack.getReactions":{"type":"slack_v2","operation":"get_reactions"},"slack.getTeamDoNotDisturbInfo":{"type":"slack_v2","operation":"get_team_dnd_info"},"slack.getThread":{"type":"slack_v2","operation":"get_thread"},"slack.getThreadReplies":{"type":"slack_v2","operation":"get_thread_replies"},"slack.getUserInfo":{"type":"slack_v2","operation":"get_user"},"slack.getUserPresence":{"type":"slack_v2","operation":"get_user_presence"},"slack.getUserProfile":{"type":"slack_v2","operation":"get_user_profile"},"slack.getWorkspaceInfo":{"type":"slack_v2","operation":"get_team_info"},"slack.getWorkspaceProfileFields":{"type":"slack_v2","operation":"get_team_profile"},"slack.inviteToConversation":{"type":"slack_v2","operation":"invite_to_conversation"},"slack.joinConversation":{"type":"slack_v2","operation":"join_conversation"},"slack.leaveConversation":{"type":"slack_v2","operation":"leave_conversation"},"slack.listBookmarks":{"type":"slack_v2","operation":"list_bookmarks"},"slack.listCanvases":{"type":"slack_v2","operation":"list_canvases"},"slack.listChannelMembers":{"type":"slack_v2","operation":"list_members"},"slack.listChannels":{"type":"slack_v2","operation":"list_channels"},"slack.listCustomEmoji":{"type":"slack_v2","operation":"list_emoji"},"slack.listFiles":{"type":"slack_v2","operation":"list_files"},"slack.listPins":{"type":"slack_v2","operation":"list_pins"},"slack.listReactions":{"type":"slack_v2","operation":"list_reactions"},"slack.listScheduledMessages":{"type":"slack_v2","operation":"list_scheduled_messages"},"slack.listUserConversations":{"type":"slack_v2","operation":"list_user_conversations"},"slack.listUserGroupMembers":{"type":"slack_v2","operation":"list_user_group_members"},"slack.listUserGroups":{"type":"slack_v2","operation":"list_user_groups"},"slack.listUsers":{"type":"slack_v2","operation":"list_users"},"slack.lookupCanvasSections":{"type":"slack_v2","operation":"lookup_canvas_sections"},"slack.markConversationRead":{"type":"slack_v2","operation":"mark_conversation_read"},"slack.openConversation":{"type":"slack_v2","operation":"open_conversation"},"slack.openView":{"type":"slack_v2","operation":"open_view"},"slack.pinMessage":{"type":"slack_v2","operation":"pin_message"},"slack.publishView":{"type":"slack_v2","operation":"publish_view"},"slack.pushView":{"type":"slack_v2","operation":"push_view"},"slack.readListItems":{"type":"slack_v2","operation":"list_items"},"slack.readMessages":{"type":"slack_v2","operation":"read"},"slack.removeBookmark":{"type":"slack_v2","operation":"remove_bookmark"},"slack.removeReaction":{"type":"slack_v2","operation":"unreact"},"slack.removeUserFromConversation":{"type":"slack_v2","operation":"kick_conversation"},"slack.renameAgentSession":{"type":"slack_v2","operation":"rename_agent_session"},"slack.renameConversation":{"type":"slack_v2","operation":"rename_conversation"},"slack.revokeCanvasAccess":{"type":"slack_v2","operation":"revoke_canvas_access"},"slack.revokeListAccess":{"type":"slack_v2","operation":"revoke_list_access"},"slack.scheduleMessage":{"type":"slack_v2","operation":"schedule_message"},"slack.sendEphemeralMessage":{"type":"slack_v2","operation":"ephemeral"},"slack.sendMessage":{"type":"slack_v2","operation":"send"},"slack.setAgentSessionStatus":{"type":"slack_v2","operation":"set_agent_session_status"},"slack.setAgentSuggestedPrompts":{"type":"slack_v2","operation":"set_agent_suggested_prompts"},"slack.setAssistantStatus":{"type":"slack_v2","operation":"set_status"},"slack.setAssistantSuggestedPrompts":{"type":"slack_v2","operation":"set_suggested_prompts"},"slack.setAssistantTitle":{"type":"slack_v2","operation":"set_title"},"slack.setBotPresence":{"type":"slack_v2","operation":"set_user_presence"},"slack.setConversationPurpose":{"type":"slack_v2","operation":"set_conversation_purpose"},"slack.setConversationTopic":{"type":"slack_v2","operation":"set_conversation_topic"},"slack.shareCanvas":{"type":"slack_v2","operation":"share_canvas"},"slack.shareList":{"type":"slack_v2","operation":"share_list"},"slack.startListExport":{"type":"slack_v2","operation":"start_list_export"},"slack.unarchiveConversation":{"type":"slack_v2","operation":"unarchive_conversation"},"slack.unfurlLinks":{"type":"slack_v2","operation":"unfurl_links"},"slack.unpinMessage":{"type":"slack_v2","operation":"unpin_message"},"slack.updateList":{"type":"slack_v2","operation":"rename_list"},"slack.updateListItems":{"type":"slack_v2","operation":"update_list_items"},"slack.updateMessage":{"type":"slack_v2","operation":"update"},"slack.updateUserGroup":{"type":"slack_v2","operation":"update_user_group"},"slack.updateUserGroupMembers":{"type":"slack_v2","operation":"update_user_group_members"},"slack.updateView":{"type":"slack_v2","operation":"update_view"},"table.batchInsertRows":{"type":"table_v2","operation":"batch_insert_rows"},"table.deleteRowById":{"type":"table_v2","operation":"delete_row"},"table.deleteRowsByFilter":{"type":"table_v2","operation":"delete_rows_by_filter"},"table.getRowById":{"type":"table_v2","operation":"get_row"},"table.getSchema":{"type":"table_v2","operation":"get_schema"},"table.insertRow":{"type":"table_v2","operation":"insert_row"},"table.queryRows":{"type":"table_v2","operation":"query_rows"},"table.updateRowById":{"type":"table_v2","operation":"update_row"},"table.updateRowsByFilter":{"type":"table_v2","operation":"update_rows_by_filter"},"table.upsertRow":{"type":"table_v2","operation":"upsert_row"},"trigger.gmail.poller":{"type":"gmail_v2","triggerMode":true},"trigger.slack.oauth":{"type":"slack_v2","triggerMode":true},"trigger.start":{"type":"start_trigger"},"trigger.table.newRow":{"type":"table_v2","triggerMode":true},"trigger.webhook":{"type":"generic_webhook"}},"blocks":{"agent":{"type":"agent","name":"Agent","category":"blocks","tools":{"access":["openai_chat","anthropic_chat","google_chat","xai_chat","deepseek_chat","deepseek_reasoner"],"selector":"opaque"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"dynamicOutputs":{"source":"responseFormat","param":"responseFormat"},"subBlocks":[{"id":"messages","type":"messages-input","valueKind":"array","storage":"native","title":"Messages","condition":{"field":"model","value":{"list":0},"not":true}},{"id":"model","type":"combobox","valueKind":"string","storage":"native","title":"Model","defaultValue":"claude-sonnet-5-5","required":true,"options":[{"id":"jev-latest"},{"id":"jev-1.13.0"},{"id":"jev-preview"},{"id":"nebius/deepseek-ai/DeepSeek-V4-Pro-0813"},{"id":"nebius/google/gemma-3-27b-it"},{"id":"nebius/MiniMaxAI/MiniMax-M3"},{"id":"nebius/moonshotai/Kimi-K3"},{"id":"nebius/NousResearch/Hermes-4-405B"},{"id":"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B"},{"id":"nebius/nvidia/nemotron-3-super-120b-a12b"},{"id":"nebius/nvidia/Nemotron-3-Ultra-550b-a55b"},{"id":"nebius/nvidia/Nemotron-3_5-Lightning"},{"id":"nebius/openai/gpt-oss-120b"},{"id":"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3.8-27B"},{"id":"nebius/zai-org/GLM-5.2"},{"id":"nebius/zai-org/GLM-5.3"},{"id":"nebius/zai-org/GLM-5.3-Flash"},{"id":"thinkingmachines/inkling-small"},{"id":"thinkingmachines/inkling"},{"id":"thinkingmachines/inkling-2-small"},{"id":"gpt-6.1-terra"},{"id":"gpt-6.1-sol"},{"id":"gpt-6-sol"},{"id":"gpt-6-luna"},{"id":"gpt-6-astra"},{"id":"gpt-5.6-sol"},{"id":"gpt-5.6-terra"},{"id":"gpt-5.6-luna"},{"id":"chat-latest"},{"id":"gpt-5.5-pro"},{"id":"gpt-5.5"},{"id":"gpt-5.4-mini"},{"id":"gpt-5.4-nano"},{"id":"gpt-5.4-pro"},{"id":"gpt-5.4"},{"id":"gpt-5.3-codex"},{"id":"gpt-5.2-pro"},{"id":"gpt-5.2"},{"id":"gpt-5.1"},{"id":"gpt-5-pro"},{"id":"gpt-5"},{"id":"gpt-5-mini"},{"id":"gpt-5-nano"},{"id":"o3-pro"},{"id":"o4-mini"},{"id":"o3"},{"id":"gpt-4.1"},{"id":"gpt-4.1-mini"},{"id":"o3-mini"},{"id":"o1"},{"id":"gpt-4o"},{"id":"claude-fable-5-2"},{"id":"claude-haiku-5-5"},{"id":"claude-sonnet-5-5"},{"id":"claude-opus-5-5"},{"id":"claude-fable-5-1"},{"id":"claude-opus-5"},{"id":"claude-sonnet-5"},{"id":"claude-fable-5"},{"id":"claude-opus-4-8"},{"id":"claude-opus-4-7"},{"id":"claude-sonnet-4-6"},{"id":"claude-opus-4-6"},{"id":"claude-opus-4-5"},{"id":"claude-haiku-4-5"},{"id":"claude-sonnet-4-5"},{"id":"azure/gpt-6.1-sol"},{"id":"azure/gpt-6-sol"},{"id":"azure/gpt-6-luna"},{"id":"azure/gpt-6-astra"},{"id":"azure/gpt-5.6-sol"},{"id":"azure/gpt-5.6-terra"},{"id":"azure/gpt-5.6-luna"},{"id":"azure/gpt-5.5"},{"id":"azure/gpt-5.4-mini"},{"id":"azure/gpt-5.4-nano"},{"id":"azure/gpt-5.4-pro"},{"id":"azure/gpt-5.4"},{"id":"azure/gpt-5.2"},{"id":"azure/gpt-5.1"},{"id":"azure/gpt-5.1-codex"},{"id":"azure/gpt-5"},{"id":"azure/gpt-5-mini"},{"id":"azure/gpt-5-nano"},{"id":"azure/gpt-5-chat"},{"id":"azure/model-router"},{"id":"azure/o3"},{"id":"azure/o4-mini"},{"id":"azure/gpt-4.1"},{"id":"azure/gpt-4.1-mini"},{"id":"azure/gpt-4.1-nano"},{"id":"azure/gpt-4o"},{"id":"azure-anthropic/claude-haiku-5-5"},{"id":"azure-anthropic/claude-sonnet-5-5"},{"id":"azure-anthropic/claude-opus-5-5"},{"id":"azure-anthropic/claude-fable-5-1"},{"id":"azure-anthropic/claude-opus-5"},{"id":"azure-anthropic/claude-sonnet-5"},{"id":"azure-anthropic/claude-opus-4-8"},{"id":"azure-anthropic/claude-opus-4-7"},{"id":"azure-anthropic/claude-sonnet-4-6"},{"id":"azure-anthropic/claude-opus-4-6"},{"id":"azure-anthropic/claude-opus-4-5"},{"id":"azure-anthropic/claude-haiku-4-5"},{"id":"azure-anthropic/claude-sonnet-4-5"},{"id":"azure-anthropic/claude-opus-4-1"},{"id":"gemini-4-argon"},{"id":"gemini-3.8-flash"},{"id":"gemini-3.7-flash"},{"id":"gemini-3.6-flash"},{"id":"gemini-3.5-flash-lite"},{"id":"gemini-3.5-flash"},{"id":"gemini-3.1-flash-lite"},{"id":"gemini-3.1-pro-preview"},{"id":"gemini-3-flash-preview"},{"id":"deep-research-pro-preview-12-2025"},{"id":"gemini-2.5-flash-lite"},{"id":"gemini-2.5-flash"},{"id":"gemini-2.5-pro"},{"id":"vertex/gemini-3.8-flash"},{"id":"vertex/gemini-3.7-flash"},{"id":"vertex/gemini-3.6-flash"},{"id":"vertex/gemini-3.5-flash-lite"},{"id":"vertex/gemini-3.5-flash"},{"id":"vertex/gemini-3.1-flash-lite"},{"id":"vertex/gemini-3.1-pro-preview"},{"id":"vertex/gemini-3-flash-preview"},{"id":"vertex/deep-research-pro-preview-12-2025"},{"id":"vertex/gemini-2.5-flash-lite"},{"id":"vertex/gemini-2.5-flash"},{"id":"vertex/gemini-2.5-pro"},{"id":"deepseek-flash"},{"id":"deepseek-v4-pro"},{"id":"deepseek-v4-flash"},{"id":"deepseek-reasoner"},{"id":"deepseek-chat"},{"id":"grok-4.7"},{"id":"grok-4.6"},{"id":"grok-4.5"},{"id":"grok-4.3"},{"id":"grok-4.20-0309-reasoning"},{"id":"grok-4.20-0309-non-reasoning"},{"id":"grok-4.20-multi-agent-0309"},{"id":"cerebras/qwen-3.8-27b"},{"id":"cerebras/gemma-4-31b"},{"id":"cerebras/zai-glm-4.7"},{"id":"cerebras/gpt-oss-120b"},{"id":"groq/qwen/qwen3.8-27b"},{"id":"groq/qwen/qwen3.6-27b"},{"id":"groq/openai/gpt-oss-safeguard-20b"},{"id":"groq/openai/gpt-oss-120b"},{"id":"groq/openai/gpt-oss-20b"},{"id":"groq/llama-3.3-70b-versatile"},{"id":"groq/llama-3.1-8b-instant"},{"id":"fugu-ultra-v2.0"},{"id":"fugu-max"},{"id":"fugu-max-v1.0"},{"id":"fugu"},{"id":"fugu-ultra"},{"id":"sakana-namazu"},{"id":"sakana-namazu-v1.0"},{"id":"nvidia/nemotron-3.5-lightning-30b-a3b"},{"id":"nvidia/nemotron-3-ultra-550b-a55b"},{"id":"nvidia/nemotron-3-nano-30b-a3b"},{"id":"nvidia/llama-3.3-nemotron-super-49b-v1.5"},{"id":"nvidia/llama-3.1-nemotron-ultra-253b-v1"},{"id":"nvidia/llama-3.1-nemotron-70b-instruct"},{"id":"muse-spark-1.3"},{"id":"muse-spark-1.1"},{"id":"kimi-k3"},{"id":"kimi-k2.7-code"},{"id":"kimi-k2.7-code-highspeed"},{"id":"kimi-k2.6"},{"id":"kie/gpt-6-1-sol"},{"id":"kie/claude-sonnet-5-5"},{"id":"kie/claude-opus-5-5"},{"id":"kie/gpt-6-sol"},{"id":"kie/gpt-6-luna"},{"id":"kie/gpt-6-astra"},{"id":"kie/grok-4-6"},{"id":"kie/claude-opus-5"},{"id":"kie/kimi-k3"},{"id":"kie/gpt-5-6-sol"},{"id":"kie/gpt-5-6-terra"},{"id":"kie/gpt-5-6-luna"},{"id":"kie/grok-4-5"},{"id":"kie/claude-sonnet-5"},{"id":"kie/claude-fable-5"},{"id":"kie/claude-opus-4-8"},{"id":"kie/grok-4-3"},{"id":"kie/gpt-5-5"},{"id":"kie/claude-opus-4-7"},{"id":"kie/claude-sonnet-4-6"},{"id":"kie/claude-opus-4-6"},{"id":"kie/claude-opus-4-5"},{"id":"kie/claude-haiku-4-5"},{"id":"kie/claude-sonnet-4-5"},{"id":"glm-5.3-flash"},{"id":"glm-5.3"},{"id":"glm-5.2"},{"id":"glm-5.1"},{"id":"glm-5-turbo"},{"id":"glm-5"},{"id":"glm-4.7"},{"id":"glm-4.7-flashx"},{"id":"glm-4.6"},{"id":"glm-4.5"},{"id":"glm-4.5-air"},{"id":"glm-4.5-x"},{"id":"glm-4.5-airx"},{"id":"glm-4-32b-0414-128k"},{"id":"glm-5.3-flashx"},{"id":"mistral-large-4"},{"id":"zai-glm-5-3"},{"id":"zai-glm-5-2"},{"id":"labs-leanstral-1-5"},{"id":"mistral-medium-2604"},{"id":"mistral-medium-3-5"},{"id":"mistral-medium-3"},{"id":"mistral-medium-latest"},{"id":"mistral-small-2603"},{"id":"mistral-small-latest"},{"id":"devstral-2512"},{"id":"devstral-latest"},{"id":"devstral-small-latest"},{"id":"mistral-large-latest"},{"id":"mistral-large-2512"},{"id":"ministral-14b-latest"},{"id":"ministral-14b-2512"},{"id":"ministral-8b-latest"},{"id":"ministral-8b-2512"},{"id":"ministral-3b-latest"},{"id":"ministral-3b-2512"},{"id":"magistral-medium-latest"},{"id":"magistral-medium-2509"},{"id":"magistral-small-latest"},{"id":"magistral-small-2509"},{"id":"mistral-medium-2508"},{"id":"codestral-latest"},{"id":"codestral-2508"},{"id":"mistral-small-2506"},{"id":"mistral-medium-2505"},{"id":"open-mistral-nemo"},{"id":"bedrock/openai.gpt-6.1-sol"},{"id":"bedrock/openai.gpt-6-astra"},{"id":"bedrock/anthropic.claude-opus-5"},{"id":"bedrock/openai.gpt-5.6-sol"},{"id":"bedrock/openai.gpt-5.6-terra"},{"id":"bedrock/openai.gpt-5.6-luna"},{"id":"bedrock/anthropic.claude-sonnet-5"},{"id":"bedrock/anthropic.claude-fable-5"},{"id":"bedrock/anthropic.claude-opus-4-8"},{"id":"bedrock/anthropic.claude-opus-4-7"},{"id":"bedrock/anthropic.claude-sonnet-4-6"},{"id":"bedrock/minimax.minimax-m2.5"},{"id":"bedrock/zai.glm-5"},{"id":"bedrock/anthropic.claude-opus-4-6-v1"},{"id":"bedrock/moonshotai.kimi-k2.5"},{"id":"bedrock/amazon.nova-2-lite-v1:0"},{"id":"bedrock/mistral.mistral-large-3-675b-instruct"},{"id":"bedrock/mistral.ministral-3-14b-instruct"},{"id":"bedrock/mistral.ministral-3-8b-instruct"},{"id":"bedrock/mistral.ministral-3-3b-instruct"},{"id":"bedrock/deepseek.v3.2"},{"id":"bedrock/anthropic.claude-opus-4-5-20251101-v1:0"},{"id":"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0"},{"id":"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0"},{"id":"bedrock/anthropic.claude-opus-4-1-20250805-v1:0"},{"id":"bedrock/openai.gpt-oss-120b-1:0"},{"id":"bedrock/openai.gpt-oss-20b-1:0"},{"id":"bedrock/amazon.nova-premier-v1:0"},{"id":"bedrock/meta.llama4-maverick-17b-instruct-v1:0"},{"id":"bedrock/meta.llama4-scout-17b-instruct-v1:0"},{"id":"bedrock/meta.llama3-3-70b-instruct-v1:0"},{"id":"bedrock/amazon.nova-pro-v1:0"},{"id":"bedrock/amazon.nova-lite-v1:0"},{"id":"bedrock/amazon.nova-micro-v1:0"},{"id":"bedrock/meta.llama3-1-70b-instruct-v1:0"},{"id":"bedrock/meta.llama3-1-8b-instruct-v1:0"},{"id":"bedrock/mistral.mistral-large-2407-v1:0"},{"id":"bedrock/mistral.pixtral-large-2502-v1:0"},{"id":"bedrock/mistral.magistral-small-2509"},{"id":"bedrock/mistral.mixtral-8x7b-instruct-v0:1"},{"id":"bedrock/cohere.command-r-plus-v1:0"},{"id":"bedrock/cohere.command-r-v1:0"}]},{"id":"vertexCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Google Cloud Account","mode":"basic","canonicalParamId":"vertexCredential","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"serviceId":"vertex-ai","condition":{"opaque":true},"required":true},{"id":"vertexManualCredential","type":"short-input","valueKind":"string","storage":"native","title":"Google Cloud Account","mode":"advanced","canonicalParamId":"vertexCredential","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"condition":{"opaque":true},"required":true},{"id":"apiKey","type":"short-input","valueKind":"string","storage":"native","title":"API Key","visibleForModel":{"jev-latest":true,"jev-1.13.0":true,"jev-preview":true,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":true,"nebius/google/gemma-3-27b-it":true,"nebius/MiniMaxAI/MiniMax-M3":true,"nebius/moonshotai/Kimi-K3":true,"nebius/NousResearch/Hermes-4-405B":true,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":true,"nebius/nvidia/nemotron-3-super-120b-a12b":true,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":true,"nebius/nvidia/Nemotron-3_5-Lightning":true,"nebius/openai/gpt-oss-120b":true,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":true,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":true,"nebius/Qwen/Qwen3.8-27B":true,"nebius/zai-org/GLM-5.2":true,"nebius/zai-org/GLM-5.3":true,"nebius/zai-org/GLM-5.3-Flash":true,"thinkingmachines/inkling-small":true,"thinkingmachines/inkling":true,"thinkingmachines/inkling-2-small":true,"gpt-6.1-terra":true,"gpt-6.1-sol":true,"gpt-6-sol":true,"gpt-6-luna":true,"gpt-6-astra":true,"gpt-5.6-sol":true,"gpt-5.6-terra":true,"gpt-5.6-luna":true,"chat-latest":true,"gpt-5.5-pro":true,"gpt-5.5":true,"gpt-5.4-mini":true,"gpt-5.4-nano":true,"gpt-5.4-pro":true,"gpt-5.4":true,"gpt-5.3-codex":true,"gpt-5.2-pro":true,"gpt-5.2":true,"gpt-5.1":true,"gpt-5-pro":true,"gpt-5":true,"gpt-5-mini":true,"gpt-5-nano":true,"o3-pro":true,"o4-mini":true,"o3":true,"gpt-4.1":true,"gpt-4.1-mini":true,"o3-mini":true,"o1":true,"gpt-4o":true,"claude-fable-5-2":true,"claude-haiku-5-5":true,"claude-sonnet-5-5":true,"claude-opus-5-5":true,"claude-fable-5-1":true,"claude-opus-5":true,"claude-sonnet-5":true,"claude-fable-5":true,"claude-opus-4-8":true,"claude-opus-4-7":true,"claude-sonnet-4-6":true,"claude-opus-4-6":true,"claude-opus-4-5":true,"claude-haiku-4-5":true,"claude-sonnet-4-5":true,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":true,"azure/model-router":true,"azure/o3":true,"azure/o4-mini":true,"azure/gpt-4.1":true,"azure/gpt-4.1-mini":true,"azure/gpt-4.1-nano":true,"azure/gpt-4o":true,"azure-anthropic/claude-haiku-5-5":true,"azure-anthropic/claude-sonnet-5-5":true,"azure-anthropic/claude-opus-5-5":true,"azure-anthropic/claude-fable-5-1":true,"azure-anthropic/claude-opus-5":true,"azure-anthropic/claude-sonnet-5":true,"azure-anthropic/claude-opus-4-8":true,"azure-anthropic/claude-opus-4-7":true,"azure-anthropic/claude-sonnet-4-6":true,"azure-anthropic/claude-opus-4-6":true,"azure-anthropic/claude-opus-4-5":true,"azure-anthropic/claude-haiku-4-5":true,"azure-anthropic/claude-sonnet-4-5":true,"azure-anthropic/claude-opus-4-1":true,"gemini-4-argon":true,"gemini-3.8-flash":true,"gemini-3.7-flash":true,"gemini-3.6-flash":true,"gemini-3.5-flash-lite":true,"gemini-3.5-flash":true,"gemini-3.1-flash-lite":true,"gemini-3.1-pro-preview":true,"gemini-3-flash-preview":true,"deep-research-pro-preview-12-2025":true,"gemini-2.5-flash-lite":true,"gemini-2.5-flash":true,"gemini-2.5-pro":true,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":true,"deepseek-v4-pro":true,"deepseek-v4-flash":true,"deepseek-reasoner":true,"deepseek-chat":true,"grok-4.7":true,"grok-4.6":true,"grok-4.5":true,"grok-4.3":true,"grok-4.20-0309-reasoning":true,"grok-4.20-0309-non-reasoning":true,"grok-4.20-multi-agent-0309":true,"cerebras/qwen-3.8-27b":true,"cerebras/gemma-4-31b":true,"cerebras/zai-glm-4.7":true,"cerebras/gpt-oss-120b":true,"groq/qwen/qwen3.8-27b":true,"groq/qwen/qwen3.6-27b":true,"groq/openai/gpt-oss-safeguard-20b":true,"groq/openai/gpt-oss-120b":true,"groq/openai/gpt-oss-20b":true,"groq/llama-3.3-70b-versatile":true,"groq/llama-3.1-8b-instant":true,"fugu-ultra-v2.0":true,"fugu-max":true,"fugu-max-v1.0":true,"fugu":true,"fugu-ultra":true,"sakana-namazu":true,"sakana-namazu-v1.0":true,"nvidia/nemotron-3.5-lightning-30b-a3b":true,"nvidia/nemotron-3-ultra-550b-a55b":true,"nvidia/nemotron-3-nano-30b-a3b":true,"nvidia/llama-3.3-nemotron-super-49b-v1.5":true,"nvidia/llama-3.1-nemotron-ultra-253b-v1":true,"nvidia/llama-3.1-nemotron-70b-instruct":true,"muse-spark-1.3":true,"muse-spark-1.1":true,"kimi-k3":true,"kimi-k2.7-code":true,"kimi-k2.7-code-highspeed":true,"kimi-k2.6":true,"kie/gpt-6-1-sol":true,"kie/claude-sonnet-5-5":true,"kie/claude-opus-5-5":true,"kie/gpt-6-sol":true,"kie/gpt-6-luna":true,"kie/gpt-6-astra":true,"kie/grok-4-6":true,"kie/claude-opus-5":true,"kie/kimi-k3":true,"kie/gpt-5-6-sol":true,"kie/gpt-5-6-terra":true,"kie/gpt-5-6-luna":true,"kie/grok-4-5":true,"kie/claude-sonnet-5":true,"kie/claude-fable-5":true,"kie/claude-opus-4-8":true,"kie/grok-4-3":true,"kie/gpt-5-5":true,"kie/claude-opus-4-7":true,"kie/claude-sonnet-4-6":true,"kie/claude-opus-4-6":true,"kie/claude-opus-4-5":true,"kie/claude-haiku-4-5":true,"kie/claude-sonnet-4-5":true,"glm-5.3-flash":true,"glm-5.3":true,"glm-5.2":true,"glm-5.1":true,"glm-5-turbo":true,"glm-5":true,"glm-4.7":true,"glm-4.7-flashx":true,"glm-4.6":true,"glm-4.5":true,"glm-4.5-air":true,"glm-4.5-x":true,"glm-4.5-airx":true,"glm-4-32b-0414-128k":true,"glm-5.3-flashx":true,"mistral-large-4":true,"zai-glm-5-3":true,"zai-glm-5-2":true,"labs-leanstral-1-5":true,"mistral-medium-2604":true,"mistral-medium-3-5":true,"mistral-medium-3":true,"mistral-medium-latest":true,"mistral-small-2603":true,"mistral-small-latest":true,"devstral-2512":true,"devstral-latest":true,"devstral-small-latest":true,"mistral-large-latest":true,"mistral-large-2512":true,"ministral-14b-latest":true,"ministral-14b-2512":true,"ministral-8b-latest":true,"ministral-8b-2512":true,"ministral-3b-latest":true,"ministral-3b-2512":true,"magistral-medium-latest":true,"magistral-medium-2509":true,"magistral-small-latest":true,"magistral-small-2509":true,"mistral-medium-2508":true,"codestral-latest":true,"codestral-2508":true,"mistral-small-2506":true,"mistral-medium-2505":true,"open-mistral-nemo":true,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"azureEndpoint","type":"short-input","valueKind":"string","storage":"native","title":"Azure Endpoint","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":true,"azure/model-router":true,"azure/o3":true,"azure/o4-mini":true,"azure/gpt-4.1":true,"azure/gpt-4.1-mini":true,"azure/gpt-4.1-nano":true,"azure/gpt-4o":true,"azure-anthropic/claude-haiku-5-5":true,"azure-anthropic/claude-sonnet-5-5":true,"azure-anthropic/claude-opus-5-5":true,"azure-anthropic/claude-fable-5-1":true,"azure-anthropic/claude-opus-5":true,"azure-anthropic/claude-sonnet-5":true,"azure-anthropic/claude-opus-4-8":true,"azure-anthropic/claude-opus-4-7":true,"azure-anthropic/claude-sonnet-4-6":true,"azure-anthropic/claude-opus-4-6":true,"azure-anthropic/claude-opus-4-5":true,"azure-anthropic/claude-haiku-4-5":true,"azure-anthropic/claude-sonnet-4-5":true,"azure-anthropic/claude-opus-4-1":true,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"password":true,"condition":{"opaque":true}},{"id":"azureApiVersion","type":"short-input","valueKind":"string","storage":"native","title":"Azure API Version","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":true,"azure/model-router":true,"azure/o3":true,"azure/o4-mini":true,"azure/gpt-4.1":true,"azure/gpt-4.1-mini":true,"azure/gpt-4.1-nano":true,"azure/gpt-4o":true,"azure-anthropic/claude-haiku-5-5":true,"azure-anthropic/claude-sonnet-5-5":true,"azure-anthropic/claude-opus-5-5":true,"azure-anthropic/claude-fable-5-1":true,"azure-anthropic/claude-opus-5":true,"azure-anthropic/claude-sonnet-5":true,"azure-anthropic/claude-opus-4-8":true,"azure-anthropic/claude-opus-4-7":true,"azure-anthropic/claude-sonnet-4-6":true,"azure-anthropic/claude-opus-4-6":true,"azure-anthropic/claude-opus-4-5":true,"azure-anthropic/claude-haiku-4-5":true,"azure-anthropic/claude-sonnet-4-5":true,"azure-anthropic/claude-opus-4-1":true,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"condition":{"opaque":true}},{"id":"vertexProject","type":"short-input","valueKind":"string","storage":"native","title":"Vertex AI Project","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"vertexLocation","type":"short-input","valueKind":"string","storage":"native","title":"Vertex AI Location","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"condition":{"opaque":true},"required":true},{"id":"bedrockAuthMode","type":"dropdown","valueKind":"string","storage":"native","title":"AWS Authentication","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":true,"bedrock/openai.gpt-6-astra":true,"bedrock/anthropic.claude-opus-5":true,"bedrock/openai.gpt-5.6-sol":true,"bedrock/openai.gpt-5.6-terra":true,"bedrock/openai.gpt-5.6-luna":true,"bedrock/anthropic.claude-sonnet-5":true,"bedrock/anthropic.claude-fable-5":true,"bedrock/anthropic.claude-opus-4-8":true,"bedrock/anthropic.claude-opus-4-7":true,"bedrock/anthropic.claude-sonnet-4-6":true,"bedrock/minimax.minimax-m2.5":true,"bedrock/zai.glm-5":true,"bedrock/anthropic.claude-opus-4-6-v1":true,"bedrock/moonshotai.kimi-k2.5":true,"bedrock/amazon.nova-2-lite-v1:0":true,"bedrock/mistral.mistral-large-3-675b-instruct":true,"bedrock/mistral.ministral-3-14b-instruct":true,"bedrock/mistral.ministral-3-8b-instruct":true,"bedrock/mistral.ministral-3-3b-instruct":true,"bedrock/deepseek.v3.2":true,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":true,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":true,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":true,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":true,"bedrock/openai.gpt-oss-120b-1:0":true,"bedrock/openai.gpt-oss-20b-1:0":true,"bedrock/amazon.nova-premier-v1:0":true,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":true,"bedrock/meta.llama4-scout-17b-instruct-v1:0":true,"bedrock/meta.llama3-3-70b-instruct-v1:0":true,"bedrock/amazon.nova-pro-v1:0":true,"bedrock/amazon.nova-lite-v1:0":true,"bedrock/amazon.nova-micro-v1:0":true,"bedrock/meta.llama3-1-70b-instruct-v1:0":true,"bedrock/meta.llama3-1-8b-instruct-v1:0":true,"bedrock/mistral.mistral-large-2407-v1:0":true,"bedrock/mistral.pixtral-large-2502-v1:0":true,"bedrock/mistral.magistral-small-2509":true,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":true,"bedrock/cohere.command-r-plus-v1:0":true,"bedrock/cohere.command-r-v1:0":true},"valueDefault":{"constant":"access_keys"},"condition":{"opaque":true},"options":[{"id":"access_keys"},{"id":"credential"}]},{"id":"bedrockCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"AWS Credential","mode":"basic","canonicalParamId":"bedrockCredential","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"serviceId":"aws","condition":{"opaque":true},"required":true},{"id":"bedrockManualCredential","type":"short-input","valueKind":"string","storage":"native","title":"AWS Credential","mode":"advanced","canonicalParamId":"bedrockCredential","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"condition":{"opaque":true},"required":true},{"id":"bedrockAccessKeyId","type":"short-input","valueKind":"string","storage":"native","title":"AWS Access Key ID","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"bedrockSecretKey","type":"short-input","valueKind":"string","storage":"native","title":"AWS Secret Access Key","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"bedrockRegion","type":"short-input","valueKind":"string","storage":"native","title":"AWS Region","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":true,"bedrock/openai.gpt-6-astra":true,"bedrock/anthropic.claude-opus-5":true,"bedrock/openai.gpt-5.6-sol":true,"bedrock/openai.gpt-5.6-terra":true,"bedrock/openai.gpt-5.6-luna":true,"bedrock/anthropic.claude-sonnet-5":true,"bedrock/anthropic.claude-fable-5":true,"bedrock/anthropic.claude-opus-4-8":true,"bedrock/anthropic.claude-opus-4-7":true,"bedrock/anthropic.claude-sonnet-4-6":true,"bedrock/minimax.minimax-m2.5":true,"bedrock/zai.glm-5":true,"bedrock/anthropic.claude-opus-4-6-v1":true,"bedrock/moonshotai.kimi-k2.5":true,"bedrock/amazon.nova-2-lite-v1:0":true,"bedrock/mistral.mistral-large-3-675b-instruct":true,"bedrock/mistral.ministral-3-14b-instruct":true,"bedrock/mistral.ministral-3-8b-instruct":true,"bedrock/mistral.ministral-3-3b-instruct":true,"bedrock/deepseek.v3.2":true,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":true,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":true,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":true,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":true,"bedrock/openai.gpt-oss-120b-1:0":true,"bedrock/openai.gpt-oss-20b-1:0":true,"bedrock/amazon.nova-premier-v1:0":true,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":true,"bedrock/meta.llama4-scout-17b-instruct-v1:0":true,"bedrock/meta.llama3-3-70b-instruct-v1:0":true,"bedrock/amazon.nova-pro-v1:0":true,"bedrock/amazon.nova-lite-v1:0":true,"bedrock/amazon.nova-micro-v1:0":true,"bedrock/meta.llama3-1-70b-instruct-v1:0":true,"bedrock/meta.llama3-1-8b-instruct-v1:0":true,"bedrock/mistral.mistral-large-2407-v1:0":true,"bedrock/mistral.pixtral-large-2502-v1:0":true,"bedrock/mistral.magistral-small-2509":true,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":true,"bedrock/cohere.command-r-plus-v1:0":true,"bedrock/cohere.command-r-v1:0":true},"condition":{"opaque":true}},{"id":"evaluationState","type":"long-input","valueKind":"string","storage":"native","title":"State","visibleForModel":{"jev-latest":true,"jev-1.13.0":true,"jev-preview":true,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"condition":{"opaque":true},"required":true},{"id":"evaluationQuestions","type":"code","valueKind":"json","storage":"native","title":"Questions","visibleForModel":{"jev-latest":true,"jev-1.13.0":true,"jev-preview":true,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"language":"json","condition":{"opaque":true},"required":true},{"id":"attachmentFiles","type":"file-upload","valueKind":"upload","storage":"native","title":"Files","mode":"basic","canonicalParamId":"files","multiple":true,"condition":{"field":"model","value":{"list":0},"not":true},"required":false},{"id":"files","type":"short-input","valueKind":"string","storage":"native","title":"Files","mode":"advanced","canonicalParamId":"files","condition":{"field":"model","value":{"list":0},"not":true},"required":false},{"id":"reasoningEffort","type":"combobox","valueKind":"string","storage":"native","title":"Reasoning Effort","mode":"advanced","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":true,"gpt-6.1-sol":true,"gpt-6-sol":true,"gpt-6-luna":true,"gpt-6-astra":true,"gpt-5.6-sol":true,"gpt-5.6-terra":true,"gpt-5.6-luna":true,"chat-latest":false,"gpt-5.5-pro":true,"gpt-5.5":true,"gpt-5.4-mini":true,"gpt-5.4-nano":true,"gpt-5.4-pro":true,"gpt-5.4":true,"gpt-5.3-codex":true,"gpt-5.2-pro":true,"gpt-5.2":true,"gpt-5.1":true,"gpt-5-pro":true,"gpt-5":true,"gpt-5-mini":true,"gpt-5-nano":true,"o3-pro":false,"o4-mini":true,"o3":true,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":true,"o1":true,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":true,"azure/o4-mini":true,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":true,"deepseek-v4-pro":true,"deepseek-v4-flash":true,"deepseek-reasoner":true,"deepseek-chat":false,"grok-4.7":true,"grok-4.6":true,"grok-4.5":true,"grok-4.3":true,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":true,"cerebras/qwen-3.8-27b":true,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":true,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":true,"groq/openai/gpt-oss-120b":true,"groq/openai/gpt-oss-20b":true,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":true,"muse-spark-1.1":true,"kimi-k3":true,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":true,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":true,"kie/gpt-6-luna":true,"kie/gpt-6-astra":true,"kie/grok-4-6":true,"kie/claude-opus-5":false,"kie/kimi-k3":true,"kie/gpt-5-6-sol":true,"kie/gpt-5-6-terra":true,"kie/gpt-5-6-luna":true,"kie/grok-4-5":true,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":true,"kie/gpt-5-5":true,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":true,"glm-5.3":true,"glm-5.2":true,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":true,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"dependsOn":{"all":["model"],"any":[]},"condition":{"opaque":true},"options":{"opaque":true}},{"id":"verbosity","type":"combobox","valueKind":"string","storage":"native","title":"Verbosity","mode":"advanced","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":true,"gpt-6.1-sol":true,"gpt-6-sol":true,"gpt-6-luna":true,"gpt-6-astra":false,"gpt-5.6-sol":true,"gpt-5.6-terra":true,"gpt-5.6-luna":true,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":true,"gpt-5.4-mini":true,"gpt-5.4-nano":true,"gpt-5.4-pro":false,"gpt-5.4":true,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":true,"gpt-5.1":true,"gpt-5-pro":false,"gpt-5":true,"gpt-5-mini":true,"gpt-5-nano":true,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"dependsOn":{"all":["model"],"any":[]},"condition":{"opaque":true},"options":{"opaque":true}},{"id":"thinkingLevel","type":"combobox","valueKind":"string","storage":"native","title":"Thinking Level","mode":"advanced","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":true,"claude-haiku-5-5":true,"claude-sonnet-5-5":true,"claude-opus-5-5":true,"claude-fable-5-1":true,"claude-opus-5":true,"claude-sonnet-5":true,"claude-fable-5":true,"claude-opus-4-8":true,"claude-opus-4-7":true,"claude-sonnet-4-6":true,"claude-opus-4-6":true,"claude-opus-4-5":true,"claude-haiku-4-5":true,"claude-sonnet-4-5":true,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":true,"azure-anthropic/claude-sonnet-5-5":true,"azure-anthropic/claude-opus-5-5":true,"azure-anthropic/claude-fable-5-1":true,"azure-anthropic/claude-opus-5":true,"azure-anthropic/claude-sonnet-5":true,"azure-anthropic/claude-opus-4-8":true,"azure-anthropic/claude-opus-4-7":true,"azure-anthropic/claude-sonnet-4-6":true,"azure-anthropic/claude-opus-4-6":true,"azure-anthropic/claude-opus-4-5":true,"azure-anthropic/claude-haiku-4-5":true,"azure-anthropic/claude-sonnet-4-5":true,"azure-anthropic/claude-opus-4-1":true,"gemini-4-argon":true,"gemini-3.8-flash":true,"gemini-3.7-flash":true,"gemini-3.6-flash":true,"gemini-3.5-flash-lite":true,"gemini-3.5-flash":true,"gemini-3.1-flash-lite":true,"gemini-3.1-pro-preview":true,"gemini-3-flash-preview":true,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":true,"gemini-2.5-flash":true,"gemini-2.5-pro":true,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":true,"deepseek-v4-pro":true,"deepseek-v4-flash":true,"deepseek-reasoner":true,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":true,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":true,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":true,"kie/claude-opus-5-5":true,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":true,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":true,"kie/claude-fable-5":true,"kie/claude-opus-4-8":true,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":true,"kie/claude-sonnet-4-6":true,"kie/claude-opus-4-6":true,"kie/claude-opus-4-5":true,"kie/claude-haiku-4-5":true,"kie/claude-sonnet-4-5":true,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":true,"glm-5-turbo":true,"glm-5":true,"glm-4.7":true,"glm-4.7-flashx":false,"glm-4.6":true,"glm-4.5":true,"glm-4.5-air":true,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"dependsOn":{"all":["model"],"any":[]},"condition":{"opaque":true},"options":{"opaque":true}},{"id":"promptCaching","type":"switch","valueKind":"boolean","storage":"native","title":"Prompt Caching","mode":"advanced","defaultValue":false,"condition":{"field":"model","value":["claude-fable-5-2","claude-fable-5-1","claude-fable-5","claude-sonnet-5-5","claude-sonnet-5","claude-opus-5-5","claude-opus-5","claude-opus-4-8","claude-opus-4-7","claude-opus-4-6","claude-sonnet-4-6","claude-opus-4-5","claude-opus-4-1","claude-opus-4-0","claude-sonnet-4-5","claude-sonnet-4-0","claude-haiku-5-5","claude-haiku-4-5","claude-3-haiku-20240307","azure-anthropic/claude-fable-5-1","azure-anthropic/claude-opus-5-5","azure-anthropic/claude-sonnet-5-5","azure-anthropic/claude-haiku-5-5","azure-anthropic/claude-opus-5","azure-anthropic/claude-opus-4-8","azure-anthropic/claude-opus-4-7","azure-anthropic/claude-opus-4-6","azure-anthropic/claude-opus-4-5","azure-anthropic/claude-sonnet-5","azure-anthropic/claude-sonnet-4-6","azure-anthropic/claude-sonnet-4-5","azure-anthropic/claude-opus-4-1","azure-anthropic/claude-haiku-4-5"]}},{"id":"tools","type":"tool-input","valueKind":"tools","storage":"native","structured":"tools","title":"Tools","defaultValue":[],"condition":{"field":"model","value":{"list":1},"not":true}},{"id":"skills","type":"skill-input","valueKind":"array","storage":"native","title":"Skills","defaultValue":[],"condition":{"field":"model","value":{"list":1},"not":true}},{"id":"memoryType","type":"dropdown","valueKind":"string","storage":"native","title":"Memory","defaultValue":"none","condition":{"field":"model","value":{"list":2},"not":true},"options":[{"id":"none"},{"id":"conversation"},{"id":"sliding_window"},{"id":"sliding_window_tokens"}]},{"id":"conversationId","type":"short-input","valueKind":"string","storage":"native","title":"Conversation ID","dependsOn":{"all":["memoryType"],"any":[]},"condition":{"field":"memoryType","value":{"list":3},"and":{"field":"model","value":{"list":2},"not":true}},"required":{"field":"memoryType","value":{"list":3}}},{"id":"slidingWindowSize","type":"short-input","valueKind":"string","storage":"native","title":"Sliding Window Size","dependsOn":{"all":["memoryType"],"any":[]},"condition":{"field":"memoryType","value":["sliding_window"],"and":{"field":"model","value":{"list":2},"not":true}}},{"id":"slidingWindowTokens","type":"short-input","valueKind":"string","storage":"native","title":"Max Tokens","dependsOn":{"all":["memoryType"],"any":[]},"condition":{"field":"memoryType","value":["sliding_window_tokens"],"and":{"field":"model","value":{"list":2},"not":true}}},{"id":"temperature","type":"slider","valueKind":"number","storage":"native","title":"Temperature","mode":"advanced","defaultValue":0.3,"min":0,"max":1,"condition":{"field":"model","value":["thinkingmachines/inkling","thinkingmachines/inkling-2-small","thinkingmachines/inkling-small","claude-opus-4-6","claude-sonnet-4-6","claude-opus-4-5","claude-opus-4-1","claude-opus-4-0","claude-sonnet-4-5","claude-sonnet-4-0","claude-haiku-4-5","claude-3-haiku-20240307","azure-anthropic/claude-opus-4-6","azure-anthropic/claude-opus-4-5","azure-anthropic/claude-sonnet-4-6","azure-anthropic/claude-sonnet-4-5","azure-anthropic/claude-opus-4-1","azure-anthropic/claude-haiku-4-5","kie/claude-opus-4-6","kie/claude-sonnet-4-6","kie/claude-opus-4-5","kie/claude-sonnet-4-5","kie/claude-haiku-4-5","glm-5.3","glm-5.3-flashx","glm-5.3-flash","glm-5.2","glm-5.1","glm-5","glm-5-turbo","glm-4.7","glm-4.7-flashx","glm-4.6","glm-4.5","glm-4.5-air","glm-4.5-x","glm-4.5-airx","glm-4-32b-0414-128k","bedrock/anthropic.claude-sonnet-4-6","bedrock/anthropic.claude-opus-4-6-v1","bedrock/anthropic.claude-opus-4-5-20251101-v1:0","bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0","bedrock/anthropic.claude-haiku-4-5-20251001-v1:0","bedrock/anthropic.claude-opus-4-1-20250805-v1:0","bedrock/amazon.nova-2-lite-v1:0","bedrock/amazon.nova-premier-v1:0","bedrock/amazon.nova-pro-v1:0","bedrock/amazon.nova-lite-v1:0","bedrock/amazon.nova-micro-v1:0","bedrock/meta.llama4-maverick-17b-instruct-v1:0","bedrock/meta.llama4-scout-17b-instruct-v1:0","bedrock/meta.llama3-3-70b-instruct-v1:0","bedrock/meta.llama3-2-90b-instruct-v1:0","bedrock/meta.llama3-2-11b-instruct-v1:0","bedrock/meta.llama3-2-3b-instruct-v1:0","bedrock/meta.llama3-2-1b-instruct-v1:0","bedrock/meta.llama3-1-405b-instruct-v1:0","bedrock/meta.llama3-1-70b-instruct-v1:0","bedrock/meta.llama3-1-8b-instruct-v1:0","bedrock/mistral.mistral-large-3-675b-instruct","bedrock/mistral.mistral-large-2407-v1:0","bedrock/mistral.pixtral-large-2502-v1:0","bedrock/mistral.magistral-small-2509","bedrock/mistral.ministral-3-14b-instruct","bedrock/mistral.ministral-3-8b-instruct","bedrock/mistral.ministral-3-3b-instruct","bedrock/mistral.mixtral-8x7b-instruct-v0:1","bedrock/amazon.titan-text-premier-v1:0","bedrock/cohere.command-r-plus-v1:0","bedrock/cohere.command-r-v1:0"]}},{"id":"temperature","type":"slider","valueKind":"number","storage":"native","title":"Temperature","mode":"advanced","defaultValue":0.3,"min":0,"max":1.5,"condition":{"field":"model","value":["mistral-large-4","mistral-medium-3-5","mistral-medium-3","zai-glm-5-3","zai-glm-5-2","labs-leanstral-1-5","mistral-large-latest","mistral-large-2512","mistral-small-2603","devstral-2512","mistral-large-2411","magistral-medium-latest","magistral-medium-2509","magistral-small-latest","magistral-small-2509","mistral-medium-latest","mistral-medium-2604","mistral-medium-2508","mistral-medium-2505","mistral-small-latest","mistral-small-2506","open-mistral-nemo","codestral-latest","codestral-2508","devstral-latest","devstral-small-latest","devstral-small-2507","devstral-medium-2507","ministral-14b-latest","ministral-14b-2512","ministral-8b-latest","ministral-8b-2512","ministral-3b-latest","ministral-3b-2512"]}},{"id":"temperature","type":"slider","valueKind":"number","storage":"native","title":"Temperature","mode":"advanced","defaultValue":0.3,"min":0,"max":2,"condition":{"field":"model","value":["nebius/deepseek-ai/deepseek-v4.1-flash","nebius/deepseek-ai/deepseek-v4-flash-0731","nebius/deepseek-ai/deepseek-v4-pro","nebius/deepseek-ai/deepseek-v4-pro-0813","nebius/google/gemma-3-27b-it","nebius/minimaxai/minimax-m3","nebius/moonshotai/kimi-k2.6","nebius/moonshotai/kimi-k2.7-code","nebius/moonshotai/kimi-k3","nebius/nousresearch/hermes-4-405b","nebius/nvidia/nvidia-nemotron-3-nano-30b-a3b","nebius/nvidia/nemotron-3-super-120b-a12b","nebius/nvidia/nemotron-3-ultra-550b-a55b","nebius/nvidia/nemotron-3_5-lightning","nebius/openai/gpt-oss-120b","nebius/openbmb/minicpm-v-4_5","nebius/qwen/qwen3-235b-a22b-instruct-2507","nebius/qwen/qwen3-30b-a3b-instruct-2507","nebius/qwen/qwen3.5-397b-a17b","nebius/qwen/qwen3.8-27b","nebius/zai-org/glm-5.1","nebius/zai-org/glm-5.2","nebius/zai-org/glm-5.3","nebius/zai-org/glm-5.3-flash","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-5-chat-latest","gpt-4o","azure/gpt-4o","azure/gpt-5-chat","azure/gpt-4.1","azure/gpt-4.1-mini","azure/gpt-4.1-nano","gemini-3.8-flash","gemini-3.7-flash","gemini-3.6-flash","gemini-3.5-flash-lite","gemini-3.5-flash","gemini-3.1-pro-preview","gemini-3.1-flash-lite","gemini-3-flash-preview","gemini-2.5-pro","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.0-flash","gemini-2.0-flash-lite","vertex/gemini-3.5-flash","vertex/gemini-3.1-pro-preview","vertex/gemini-3.1-flash-lite","vertex/gemini-3-pro-preview","vertex/gemini-3-flash-preview","vertex/gemini-2.5-pro","vertex/gemini-2.5-flash","vertex/gemini-2.5-flash-lite","vertex/gemini-2.0-flash","vertex/gemini-2.0-flash-lite","deepseek-flash","deepseek-v4-flash","deepseek-chat","deepseek-v3","grok-4.7","grok-4.6","grok-4.5","grok-4.3","grok-4-latest","grok-4-0709","grok-4-1-fast-reasoning","grok-4-1-fast-non-reasoning","grok-4-fast-reasoning","grok-4-fast-non-reasoning","grok-code-fast-1","grok-4.20-0309-reasoning","grok-4.20-0309-non-reasoning","grok-4.20-multi-agent-0309","grok-3-latest","grok-3-fast-latest","cerebras/qwen-3.8-27b","cerebras/gpt-oss-120b","cerebras/zai-glm-4.7","cerebras/gemma-4-31b","groq/openai/gpt-oss-120b","groq/openai/gpt-oss-20b","groq/openai/gpt-oss-safeguard-20b","groq/qwen/qwen3-32b","groq/qwen/qwen3.8-27b","groq/qwen/qwen3.6-27b","groq/llama-3.1-8b-instant","groq/llama-3.3-70b-versatile","groq/meta-llama/llama-4-scout-17b-16e-instruct","groq/moonshotai/kimi-k2-instruct-0905","nvidia/llama-3.1-nemotron-70b-instruct","nvidia/llama-3.1-nemotron-ultra-253b-v1","nvidia/llama-3.3-nemotron-super-49b-v1.5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3-ultra-550b-a55b","muse-spark-1.3","muse-spark-1.1"]}},{"id":"maxTokens","type":"short-input","valueKind":"string","storage":"native","title":"Max Output Tokens","mode":"advanced","condition":{"field":"model","value":{"list":1},"not":true}},{"id":"responseFormat","type":"code","valueKind":"json","storage":"native","title":"Response Format","language":"json","condition":{"field":"model","value":{"list":1},"not":true}},{"id":"previousInteractionId","type":"short-input","valueKind":"string","storage":"native","title":"Previous Interaction ID","condition":{"field":"model","value":["deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025"]}},{"id":"fallbackModels","type":"model-fallback-list","valueKind":"array","storage":"native","title":"Fallback models","mode":"advanced","condition":{"field":"model","value":{"list":0},"not":true}}],"outputs":{"answers":{"type":"json","description":"Evaluation answers keyed by question ID: choice, score, or noul, with probabilities and confidence where applicable","condition":{"field":"model","value":["jev-latest","jev-1.13.0","jev-preview"],"allowReference":true}},"content":{"type":"string","description":"Generated response content"},"model":{"type":"string","description":"Model used for generation"},"tokens":{"type":"json","description":"Token usage statistics"},"toolCalls":{"type":"json","description":"Tool calls made"},"providerTiming":{"type":"json","description":"Provider timing information"},"cost":{"type":"json","description":"Cost of the API call"},"interactionId":{"type":"string","description":"Interaction ID for multi-turn deep research follow-ups","condition":{"field":"model","value":["deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025"]}}}},"api":{"type":"api","name":"API","category":"blocks","tools":{"access":["http_request"],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"url","type":"short-input","valueKind":"string","storage":"native","title":"URL","required":true},{"id":"method","type":"dropdown","valueKind":"string","storage":"native","title":"Method","required":true,"options":[{"id":"GET"},{"id":"POST"},{"id":"PUT"},{"id":"DELETE"},{"id":"PATCH"}]},{"id":"params","type":"table","valueKind":"array","storage":"native","structured":"tableRows","title":"Query Params","columns":["Key","Value"]},{"id":"headers","type":"table","valueKind":"array","storage":"native","structured":"tableRows","title":"Headers","columns":["Key","Value"]},{"id":"body","type":"code","valueKind":"json","storage":"native","title":"Body","language":"json"},{"id":"timeout","type":"short-input","valueKind":"string","storage":"native","title":"Timeout (ms)","mode":"advanced"},{"id":"retries","type":"short-input","valueKind":"string","storage":"native","title":"Retries","mode":"advanced"},{"id":"retryDelayMs","type":"short-input","valueKind":"string","storage":"native","title":"Retry delay (ms)","mode":"advanced"},{"id":"retryMaxDelayMs","type":"short-input","valueKind":"string","storage":"native","title":"Max retry delay (ms)","mode":"advanced"},{"id":"retryNonIdempotent","type":"switch","valueKind":"boolean","storage":"native","title":"Retry non-idempotent methods","mode":"advanced"},{"id":"redirectPolicyVersion","type":"short-input","valueKind":"string","storage":"native","title":"Redirect policy version","defaultValue":"standard-v1","hidden":true},{"id":"sendCredentialsOnCrossOriginRedirect","type":"switch","valueKind":"boolean","storage":"native","title":"Send credentials on cross-origin redirects","mode":"advanced","defaultValue":true},{"id":"proxyUrl","type":"short-input","valueKind":"string","storage":"native","title":"Proxy URL","mode":"advanced"}],"outputs":{"data":{"type":"json","description":"API response data (JSON, text, or other formats)"},"status":{"type":"number","description":"HTTP status code (200, 404, 500, etc.)"},"headers":{"type":"json","description":"HTTP response headers as key-value pairs"}}},"condition":{"type":"condition","name":"Condition","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false,"branches":{"subBlockId":"conditions","kind":"condition"}},"subBlocks":[{"id":"conditions","type":"condition-input","valueKind":"branches","storage":"json-string","structured":"branches"}],"outputs":{"conditionResult":{"type":"boolean","description":"Whether the selected branch's own test passed: true when an if/else-if condition matched, false when the else branch or no branch fired"},"selectedPath":{"type":"json","description":"Selected execution path"},"selectedOption":{"type":"string","description":"Selected condition option ID"},"selectedTitle":{"type":"string","description":"Title of the selected branch (e.g. \"if\", \"else if\", \"else\"); null when no branch fired"}}},"function":{"type":"function","name":"Function","category":"blocks","tools":{"access":["function_execute"],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"language","type":"dropdown","valueKind":"string","storage":"native","valueDefault":{"constant":"javascript"},"options":[{"id":"javascript"},{"id":"python"}]},{"id":"code","type":"code","valueKind":"code","storage":"native","title":"Code"},{"id":"sandboxId","type":"combobox","valueKind":"string","storage":"native","title":"Sandbox","mode":"advanced","dependsOn":{"all":["language"],"any":[]},"emptyIsValid":true,"selectorKey":"workspace.sandboxes","options":{"dynamic":true}},{"id":"secretScope","type":"dropdown","valueKind":"string","storage":"native","title":"Secret access","valueDefault":{"constant":"all"},"context":"tool-input","paramVisibility":"user-only","options":[{"id":"all"},{"id":"selected"}]},{"id":"mountedSecrets","type":"dropdown","valueKind":"array","storage":"native","title":"Secrets","context":"tool-input","paramVisibility":"user-only","multiple":true,"selectorKey":"workspace.secretNames","condition":{"field":"secretScope","value":"selected"},"options":{"dynamic":true}}],"outputs":{"result":{"type":"json","description":"Structured result emitted by the executed code"},"stdout":{"type":"string","description":"Console log output and debug messages from function execution"},"files":{"type":"file[]","description":"Files the code wrote to /tmp/sim/outputs, ready to attach or upload downstream"}}},"generic_webhook":{"type":"generic_webhook","name":"Webhook Trigger","category":"triggers","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":false,"errorPort":false,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["generic_webhook"]},"dynamicOutputs":{"source":"inputFormat","param":"inputFormat"},"subBlocks":[{"trigger":"generic_webhook","start":0,"count":14}],"outputs":{}},"gmail_v2":{"type":"gmail_v2","name":"Gmail","category":"tools","tools":{"access":["gmail_send_v2","gmail_draft_v2","gmail_edit_draft_v2","gmail_read_v2","gmail_search_v2","gmail_move_v2","gmail_mark_read_v2","gmail_mark_unread_v2","gmail_archive_v2","gmail_unarchive_v2","gmail_delete_v2","gmail_add_label_v2","gmail_remove_label_v2","gmail_list_labels_v2","gmail_create_label_v2","gmail_update_label_v2","gmail_delete_label_v2","gmail_list_drafts_v2","gmail_get_draft_v2","gmail_delete_draft_v2","gmail_list_threads_v2","gmail_get_thread_v2","gmail_trash_thread_v2","gmail_untrash_thread_v2"],"selector":"operation"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["gmail_poller"]},"subBlocks":[{"id":"operation","type":"dropdown","valueKind":"string","storage":"native","title":"Operation","surface":"action","valueDefault":{"constant":"send_gmail"},"options":[{"id":"send_gmail","label":"Send Email"},{"id":"read_gmail","label":"Read Email"},{"id":"draft_gmail","label":"Draft Email"},{"id":"edit_draft_gmail","label":"Edit Draft"},{"id":"search_gmail","label":"Search Email"},{"id":"move_gmail","label":"Move Email"},{"id":"mark_read_gmail","label":"Mark as Read"},{"id":"mark_unread_gmail","label":"Mark as Unread"},{"id":"archive_gmail","label":"Archive Email"},{"id":"unarchive_gmail","label":"Unarchive Email"},{"id":"delete_gmail","label":"Delete Email"},{"id":"add_label_gmail","label":"Add Label"},{"id":"remove_label_gmail","label":"Remove Label"},{"id":"list_labels_gmail","label":"List Labels"},{"id":"create_label_gmail","label":"Create Label"},{"id":"update_label_gmail","label":"Update Label"},{"id":"delete_label_gmail","label":"Delete Label"},{"id":"list_drafts_gmail","label":"List Drafts"},{"id":"get_draft_gmail","label":"Get Draft"},{"id":"delete_draft_gmail","label":"Delete Draft"},{"id":"list_threads_gmail","label":"List Threads"},{"id":"get_thread_gmail","label":"Get Thread"},{"id":"trash_thread_gmail","label":"Trash Thread"},{"id":"untrash_thread_gmail","label":"Untrash Thread"}]},{"id":"credential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Gmail Account","mode":"basic","canonicalParamId":"oauthCredential","surface":"action","serviceId":"gmail","required":true},{"id":"manualCredential","type":"short-input","valueKind":"string","storage":"native","title":"Gmail Account","mode":"advanced","canonicalParamId":"oauthCredential","surface":"action","required":true},{"id":"impersonateUserEmail","type":"short-input","valueKind":"string","storage":"native","title":"Impersonated Account","mode":"both","surface":"action","paramVisibility":"user-only"},{"id":"draftId","type":"short-input","valueKind":"string","storage":"native","title":"Draft ID","surface":"action","condition":{"field":"operation","value":["edit_draft_gmail","get_draft_gmail","delete_draft_gmail"]},"required":true},{"id":"to","type":"short-input","valueKind":"string","storage":"native","title":"To","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":true},{"id":"subject","type":"short-input","valueKind":"string","storage":"native","title":"Subject","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"body","type":"long-input","valueKind":"string","storage":"native","title":"Body","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":true},{"id":"contentType","type":"dropdown","valueKind":"string","storage":"native","title":"Content Type","surface":"action","valueDefault":{"constant":"text"},"condition":{"field":"operation","value":{"list":4}},"required":false,"options":[{"id":"text"},{"id":"html"}]},{"id":"attachmentFiles","type":"file-upload","valueKind":"upload","storage":"native","title":"Attachments","mode":"basic","canonicalParamId":"attachments","surface":"action","multiple":true,"condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"attachments","type":"short-input","valueKind":"string","storage":"native","title":"Attachments","mode":"advanced","canonicalParamId":"attachments","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"threadId","type":"short-input","valueKind":"string","storage":"native","title":"Thread ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"replyToMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Reply to Message ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"cc","type":"short-input","valueKind":"string","storage":"native","title":"CC","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"bcc","type":"short-input","valueKind":"string","storage":"native","title":"BCC","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"replyTo","type":"short-input","valueKind":"string","storage":"native","title":"Reply-To","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"folder","type":"folder-selector","valueKind":"picked","storage":"native","title":"Label","mode":"basic","canonicalParamId":"folder","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":"read_gmail"},"options":{"dynamic":true}},{"id":"manualFolder","type":"short-input","valueKind":"string","storage":"native","title":"Label/Folder","mode":"advanced","canonicalParamId":"folder","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":"read_gmail"}},{"id":"unreadOnly","type":"switch","valueKind":"boolean","storage":"native","title":"Unread Only","surface":"action","condition":{"field":"operation","value":"read_gmail"}},{"id":"includeAttachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","surface":"action","condition":{"field":"operation","value":"read_gmail"}},{"id":"messageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"read_gmail"}},{"id":"query","type":"short-input","valueKind":"string","storage":"native","title":"Search Query","surface":"action","condition":{"field":"operation","value":"search_gmail"},"required":true},{"id":"maxResults","type":"short-input","valueKind":"string","storage":"native","title":"Max Results","surface":"action","condition":{"field":"operation","value":["read_gmail","search_gmail","list_drafts_gmail","list_threads_gmail"]}},{"id":"pageToken","type":"short-input","valueKind":"string","storage":"native","title":"Page Token","mode":"advanced","surface":"action","condition":{"field":"operation","value":["search_gmail","list_drafts_gmail","list_threads_gmail"]},"required":false},{"id":"moveMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","surface":"action","condition":{"field":"operation","value":"move_gmail"},"required":true},{"id":"destinationLabel","type":"folder-selector","valueKind":"picked","storage":"native","title":"Move To Label","mode":"basic","canonicalParamId":"addLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":"move_gmail"},"required":true,"options":{"dynamic":true}},{"id":"manualDestinationLabel","type":"short-input","valueKind":"string","storage":"native","title":"Move To Label","mode":"advanced","canonicalParamId":"addLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":"move_gmail"},"required":true},{"id":"sourceLabel","type":"folder-selector","valueKind":"picked","storage":"native","title":"Remove From Label","mode":"basic","canonicalParamId":"removeLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":"move_gmail"},"required":false,"options":{"dynamic":true}},{"id":"manualSourceLabel","type":"short-input","valueKind":"string","storage":"native","title":"Remove From Label","mode":"advanced","canonicalParamId":"removeLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":"move_gmail"},"required":false},{"id":"actionMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","surface":"action","condition":{"field":"operation","value":["mark_read_gmail","mark_unread_gmail","archive_gmail","unarchive_gmail","delete_gmail"]},"required":true},{"id":"labelActionMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","surface":"action","condition":{"field":"operation","value":{"list":5}},"required":true},{"id":"labelSelector","type":"folder-selector","valueKind":"picked","storage":"native","title":"Label","mode":"basic","canonicalParamId":"manageLabelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":{"list":5}},"required":true,"options":{"dynamic":true}},{"id":"manualLabelId","type":"short-input","valueKind":"string","storage":"native","title":"Label","mode":"advanced","canonicalParamId":"manageLabelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":{"list":5}},"required":true},{"id":"labelTarget","type":"folder-selector","valueKind":"picked","storage":"native","title":"Label","mode":"basic","canonicalParamId":"labelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":{"list":6}},"required":true,"options":{"dynamic":true}},{"id":"manualLabelTarget","type":"short-input","valueKind":"string","storage":"native","title":"Label ID","mode":"advanced","canonicalParamId":"labelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":{"list":6}},"required":true},{"id":"labelName","type":"short-input","valueKind":"string","storage":"native","title":"Label Name","surface":"action","condition":{"field":"operation","value":{"list":7}},"required":{"field":"operation","value":"create_label_gmail"}},{"id":"messageListVisibility","type":"dropdown","valueKind":"string","storage":"native","title":"Message List Visibility","mode":"advanced","surface":"action","valueDefault":{"constant":""},"condition":{"field":"operation","value":{"list":7}},"required":false,"options":[{"id":""},{"id":"show"},{"id":"hide"}]},{"id":"labelListVisibility","type":"dropdown","valueKind":"string","storage":"native","title":"Label List Visibility","mode":"advanced","surface":"action","valueDefault":{"constant":""},"condition":{"field":"operation","value":{"list":7}},"required":false,"options":[{"id":""},{"id":"labelShow"},{"id":"labelShowIfUnread"},{"id":"labelHide"}]},{"id":"targetThreadId","type":"short-input","valueKind":"string","storage":"native","title":"Thread ID","surface":"action","condition":{"field":"operation","value":["get_thread_gmail","trash_thread_gmail","untrash_thread_gmail"]},"required":true},{"id":"threadFormat","type":"dropdown","valueKind":"string","storage":"native","title":"Format","mode":"advanced","surface":"action","valueDefault":{"constant":"full"},"condition":{"field":"operation","value":"get_thread_gmail"},"required":false,"options":[{"id":"full"},{"id":"metadata"},{"id":"minimal"}]},{"id":"listQuery","type":"short-input","valueKind":"string","storage":"native","title":"Search Query","surface":"action","condition":{"field":"operation","value":["list_drafts_gmail","list_threads_gmail"]},"required":false},{"id":"threadLabelIds","type":"short-input","valueKind":"string","storage":"native","title":"Label IDs","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_threads_gmail"},"required":false},{"trigger":"gmail_poller","start":0,"count":8}],"outputs":{"id":{"type":"string","description":"Gmail message ID (thread ID for thread operations, label ID for label operations, draft ID for Get Draft)"},"threadId":{"type":"string","description":"Gmail thread ID"},"labelIds":{"type":"array","description":"Email label IDs"},"from":{"type":"string","description":"Sender"},"to":{"type":"string","description":"To"},"bcc":{"type":"string","description":"Bcc recipients (only on messages you sent or drafted)"},"replyTo":{"type":"string","description":"Reply-To header"},"subject":{"type":"string","description":"Subject"},"date":{"type":"string","description":"Date"},"rfcMessageId":{"type":"string","description":"RFC Message-ID header (not the Gmail message id)"},"inReplyTo":{"type":"string","description":"In-Reply-To header"},"references":{"type":"string","description":"References header"},"snippet":{"type":"string","description":"Short excerpt of the message text"},"internalDate":{"type":"string","description":"Gmail internal creation timestamp in epoch milliseconds"},"body":{"type":"string","description":"Email body text (best-effort)"},"results":{"type":"json","description":"Search/read summary results [{id, threadId, subject, from, to, cc, bcc, replyTo, date, snippet, rfcMessageId, inReplyTo, references, internalDate}]"},"nextPageToken":{"type":"string","description":"Token for the next page of results","condition":{"field":"operation","value":["search_gmail","list_drafts_gmail","list_threads_gmail"]}},"resultSizeEstimate":{"type":"number","description":"Estimated total number of results","condition":{"field":"operation","value":["search_gmail","list_drafts_gmail","list_threads_gmail"]}},"name":{"type":"string","description":"Label display name","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"type":{"type":"string","description":"Label type (system or user)","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"messageListVisibility":{"type":"string","description":"Message list visibility of the label","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"labelListVisibility":{"type":"string","description":"Label list visibility of the label","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"labelId":{"type":"string","description":"ID of the deleted label","condition":{"field":"operation","value":"delete_label_gmail"}},"deleted":{"type":"boolean","description":"Whether the label or draft was deleted","condition":{"field":"operation","value":["delete_label_gmail","delete_draft_gmail"]}},"drafts":{"type":"json","description":"Drafts [{id, messageId, threadId}]","condition":{"field":"operation","value":"list_drafts_gmail"}},"threads":{"type":"json","description":"Threads [{id, snippet, historyId}]","condition":{"field":"operation","value":"list_threads_gmail"}},"messages":{"type":"json","description":"Thread messages [{id, threadId, labelIds, snippet, from, to, cc, bcc, replyTo, subject, date, rfcMessageId, inReplyTo, references, internalDate, body}]","condition":{"field":"operation","value":"get_thread_gmail"}},"historyId":{"type":"string","description":"ID of the last history record that modified the thread","condition":{"field":"operation","value":"get_thread_gmail"}},"trashed":{"type":"boolean","description":"Whether the thread was moved to trash","condition":{"field":"operation","value":"trash_thread_gmail"}},"untrashed":{"type":"boolean","description":"Whether the thread was restored from trash","condition":{"field":"operation","value":"untrash_thread_gmail"}},"attachments":{"type":"file[]","description":"Downloaded attachments (if enabled)"},"draftId":{"type":"string","description":"Draft ID","condition":{"field":"operation","value":["draft_gmail","edit_draft_gmail","delete_draft_gmail"]}},"messageId":{"type":"string","description":"Gmail message ID for the draft","condition":{"field":"operation","value":["draft_gmail","edit_draft_gmail","get_draft_gmail"]}},"email_id":{"type":"string","description":"Gmail message ID"},"thread_id":{"type":"string","description":"Gmail thread ID"},"cc":{"type":"string","description":"Cc recipients (raw Cc header, comma-separated)"},"body_text":{"type":"string","description":"Plain text email body"},"body_html":{"type":"string","description":"HTML email body"},"labels":{"type":"json","description":"Email labels (trigger, comma-separated); for List Labels, the label array [{id, name, type, messageListVisibility, labelListVisibility}]"},"has_attachments":{"type":"boolean","description":"Whether email has attachments"},"raw_email":{"type":"json","description":"Complete raw email data from Gmail API (if enabled)"},"timestamp":{"type":"string","description":"Event timestamp"}}},"note":{"type":"note","name":"Note","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":false,"errorPort":false,"container":null,"annotationOnly":true},"subBlocks":[{"id":"content","type":"long-input","valueKind":"string","storage":"native"},{"id":"color","type":"short-input","valueKind":"string","storage":"native","defaultValue":"carbon","hidden":true}],"outputs":{}},"response":{"type":"response","name":"Response","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"dataMode","type":"dropdown","valueKind":"string","storage":"native","title":"Response Data Mode","valueDefault":{"constant":"structured"},"options":[{"id":"structured"},{"id":"json"}]},{"id":"builderData","type":"response-format","valueKind":"json","storage":"native","title":"Response Structure","condition":{"field":"dataMode","value":"structured"}},{"id":"data","type":"code","valueKind":"json","storage":"native","title":"Response Data","language":"json","condition":{"field":"dataMode","value":"json"}},{"id":"status","type":"short-input","valueKind":"string","storage":"native","title":"Status Code"},{"id":"headers","type":"table","valueKind":"array","storage":"native","structured":"tableRows","title":"Response Headers","columns":["Key","Value"]}],"outputs":{"data":{"type":"json","description":"Response data"},"status":{"type":"number","description":"HTTP status code"},"headers":{"type":"json","description":"Response headers"}}},"router_v2":{"type":"router_v2","name":"Router","category":"blocks","tools":{"access":["openai_chat","anthropic_chat","google_chat","xai_chat","deepseek_chat","deepseek_reasoner"],"selector":"opaque"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false,"branches":{"subBlockId":"routes","kind":"router"}},"subBlocks":[{"id":"context","type":"long-input","valueKind":"string","storage":"native","title":"Context","required":true},{"id":"routes","type":"router-input","valueKind":"branches","storage":"json-string","structured":"branches"},{"id":"model","type":"combobox","valueKind":"string","storage":"native","title":"Model","defaultValue":"claude-sonnet-5-5","required":true,"options":[{"id":"nebius/deepseek-ai/DeepSeek-V4-Pro-0813"},{"id":"nebius/google/gemma-3-27b-it"},{"id":"nebius/MiniMaxAI/MiniMax-M3"},{"id":"nebius/moonshotai/Kimi-K3"},{"id":"nebius/NousResearch/Hermes-4-405B"},{"id":"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B"},{"id":"nebius/nvidia/nemotron-3-super-120b-a12b"},{"id":"nebius/nvidia/Nemotron-3-Ultra-550b-a55b"},{"id":"nebius/nvidia/Nemotron-3_5-Lightning"},{"id":"nebius/openai/gpt-oss-120b"},{"id":"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3.8-27B"},{"id":"nebius/zai-org/GLM-5.2"},{"id":"nebius/zai-org/GLM-5.3"},{"id":"nebius/zai-org/GLM-5.3-Flash"},{"id":"thinkingmachines/inkling-small"},{"id":"thinkingmachines/inkling"},{"id":"thinkingmachines/inkling-2-small"},{"id":"gpt-6.1-terra"},{"id":"gpt-6.1-sol"},{"id":"gpt-6-sol"},{"id":"gpt-6-luna"},{"id":"gpt-6-astra"},{"id":"gpt-5.6-sol"},{"id":"gpt-5.6-terra"},{"id":"gpt-5.6-luna"},{"id":"chat-latest"},{"id":"gpt-5.5-pro"},{"id":"gpt-5.5"},{"id":"gpt-5.4-mini"},{"id":"gpt-5.4-nano"},{"id":"gpt-5.4-pro"},{"id":"gpt-5.4"},{"id":"gpt-5.3-codex"},{"id":"gpt-5.2-pro"},{"id":"gpt-5.2"},{"id":"gpt-5.1"},{"id":"gpt-5-pro"},{"id":"gpt-5"},{"id":"gpt-5-mini"},{"id":"gpt-5-nano"},{"id":"o3-pro"},{"id":"o4-mini"},{"id":"o3"},{"id":"gpt-4.1"},{"id":"gpt-4.1-mini"},{"id":"o3-mini"},{"id":"o1"},{"id":"gpt-4o"},{"id":"claude-fable-5-2"},{"id":"claude-haiku-5-5"},{"id":"claude-sonnet-5-5"},{"id":"claude-opus-5-5"},{"id":"claude-fable-5-1"},{"id":"claude-opus-5"},{"id":"claude-sonnet-5"},{"id":"claude-fable-5"},{"id":"claude-opus-4-8"},{"id":"claude-opus-4-7"},{"id":"claude-sonnet-4-6"},{"id":"claude-opus-4-6"},{"id":"claude-opus-4-5"},{"id":"claude-haiku-4-5"},{"id":"claude-sonnet-4-5"},{"id":"azure/gpt-6.1-sol"},{"id":"azure/gpt-6-sol"},{"id":"azure/gpt-6-luna"},{"id":"azure/gpt-6-astra"},{"id":"azure/gpt-5.6-sol"},{"id":"azure/gpt-5.6-terra"},{"id":"azure/gpt-5.6-luna"},{"id":"azure/gpt-5.5"},{"id":"azure/gpt-5.4-mini"},{"id":"azure/gpt-5.4-nano"},{"id":"azure/gpt-5.4-pro"},{"id":"azure/gpt-5.4"},{"id":"azure/gpt-5.2"},{"id":"azure/gpt-5.1"},{"id":"azure/gpt-5.1-codex"},{"id":"azure/gpt-5"},{"id":"azure/gpt-5-mini"},{"id":"azure/gpt-5-nano"},{"id":"azure/gpt-5-chat"},{"id":"azure/model-router"},{"id":"azure/o3"},{"id":"azure/o4-mini"},{"id":"azure/gpt-4.1"},{"id":"azure/gpt-4.1-mini"},{"id":"azure/gpt-4.1-nano"},{"id":"azure/gpt-4o"},{"id":"azure-anthropic/claude-haiku-5-5"},{"id":"azure-anthropic/claude-sonnet-5-5"},{"id":"azure-anthropic/claude-opus-5-5"},{"id":"azure-anthropic/claude-fable-5-1"},{"id":"azure-anthropic/claude-opus-5"},{"id":"azure-anthropic/claude-sonnet-5"},{"id":"azure-anthropic/claude-opus-4-8"},{"id":"azure-anthropic/claude-opus-4-7"},{"id":"azure-anthropic/claude-sonnet-4-6"},{"id":"azure-anthropic/claude-opus-4-6"},{"id":"azure-anthropic/claude-opus-4-5"},{"id":"azure-anthropic/claude-haiku-4-5"},{"id":"azure-anthropic/claude-sonnet-4-5"},{"id":"azure-anthropic/claude-opus-4-1"},{"id":"gemini-4-argon"},{"id":"gemini-3.8-flash"},{"id":"gemini-3.7-flash"},{"id":"gemini-3.6-flash"},{"id":"gemini-3.5-flash-lite"},{"id":"gemini-3.5-flash"},{"id":"gemini-3.1-flash-lite"},{"id":"gemini-3.1-pro-preview"},{"id":"gemini-3-flash-preview"},{"id":"deep-research-pro-preview-12-2025"},{"id":"gemini-2.5-flash-lite"},{"id":"gemini-2.5-flash"},{"id":"gemini-2.5-pro"},{"id":"vertex/gemini-3.8-flash"},{"id":"vertex/gemini-3.7-flash"},{"id":"vertex/gemini-3.6-flash"},{"id":"vertex/gemini-3.5-flash-lite"},{"id":"vertex/gemini-3.5-flash"},{"id":"vertex/gemini-3.1-flash-lite"},{"id":"vertex/gemini-3.1-pro-preview"},{"id":"vertex/gemini-3-flash-preview"},{"id":"vertex/deep-research-pro-preview-12-2025"},{"id":"vertex/gemini-2.5-flash-lite"},{"id":"vertex/gemini-2.5-flash"},{"id":"vertex/gemini-2.5-pro"},{"id":"deepseek-flash"},{"id":"deepseek-v4-pro"},{"id":"deepseek-v4-flash"},{"id":"deepseek-reasoner"},{"id":"deepseek-chat"},{"id":"grok-4.7"},{"id":"grok-4.6"},{"id":"grok-4.5"},{"id":"grok-4.3"},{"id":"grok-4.20-0309-reasoning"},{"id":"grok-4.20-0309-non-reasoning"},{"id":"grok-4.20-multi-agent-0309"},{"id":"cerebras/qwen-3.8-27b"},{"id":"cerebras/gemma-4-31b"},{"id":"cerebras/zai-glm-4.7"},{"id":"cerebras/gpt-oss-120b"},{"id":"groq/qwen/qwen3.8-27b"},{"id":"groq/qwen/qwen3.6-27b"},{"id":"groq/openai/gpt-oss-safeguard-20b"},{"id":"groq/openai/gpt-oss-120b"},{"id":"groq/openai/gpt-oss-20b"},{"id":"groq/llama-3.3-70b-versatile"},{"id":"groq/llama-3.1-8b-instant"},{"id":"fugu-ultra-v2.0"},{"id":"fugu-max"},{"id":"fugu-max-v1.0"},{"id":"fugu"},{"id":"fugu-ultra"},{"id":"sakana-namazu"},{"id":"sakana-namazu-v1.0"},{"id":"nvidia/nemotron-3.5-lightning-30b-a3b"},{"id":"nvidia/nemotron-3-ultra-550b-a55b"},{"id":"nvidia/nemotron-3-nano-30b-a3b"},{"id":"nvidia/llama-3.3-nemotron-super-49b-v1.5"},{"id":"nvidia/llama-3.1-nemotron-ultra-253b-v1"},{"id":"nvidia/llama-3.1-nemotron-70b-instruct"},{"id":"muse-spark-1.3"},{"id":"muse-spark-1.1"},{"id":"kimi-k3"},{"id":"kimi-k2.7-code"},{"id":"kimi-k2.7-code-highspeed"},{"id":"kimi-k2.6"},{"id":"kie/gpt-6-1-sol"},{"id":"kie/claude-sonnet-5-5"},{"id":"kie/claude-opus-5-5"},{"id":"kie/gpt-6-sol"},{"id":"kie/gpt-6-luna"},{"id":"kie/gpt-6-astra"},{"id":"kie/grok-4-6"},{"id":"kie/claude-opus-5"},{"id":"kie/kimi-k3"},{"id":"kie/gpt-5-6-sol"},{"id":"kie/gpt-5-6-terra"},{"id":"kie/gpt-5-6-luna"},{"id":"kie/grok-4-5"},{"id":"kie/claude-sonnet-5"},{"id":"kie/claude-fable-5"},{"id":"kie/claude-opus-4-8"},{"id":"kie/grok-4-3"},{"id":"kie/gpt-5-5"},{"id":"kie/claude-opus-4-7"},{"id":"kie/claude-sonnet-4-6"},{"id":"kie/claude-opus-4-6"},{"id":"kie/claude-opus-4-5"},{"id":"kie/claude-haiku-4-5"},{"id":"kie/claude-sonnet-4-5"},{"id":"glm-5.3-flash"},{"id":"glm-5.3"},{"id":"glm-5.2"},{"id":"glm-5.1"},{"id":"glm-5-turbo"},{"id":"glm-5"},{"id":"glm-4.7"},{"id":"glm-4.7-flashx"},{"id":"glm-4.6"},{"id":"glm-4.5"},{"id":"glm-4.5-air"},{"id":"glm-4.5-x"},{"id":"glm-4.5-airx"},{"id":"glm-4-32b-0414-128k"},{"id":"glm-5.3-flashx"},{"id":"mistral-large-4"},{"id":"zai-glm-5-3"},{"id":"zai-glm-5-2"},{"id":"labs-leanstral-1-5"},{"id":"mistral-medium-2604"},{"id":"mistral-medium-3-5"},{"id":"mistral-medium-3"},{"id":"mistral-medium-latest"},{"id":"mistral-small-2603"},{"id":"mistral-small-latest"},{"id":"devstral-2512"},{"id":"devstral-latest"},{"id":"devstral-small-latest"},{"id":"mistral-large-latest"},{"id":"mistral-large-2512"},{"id":"ministral-14b-latest"},{"id":"ministral-14b-2512"},{"id":"ministral-8b-latest"},{"id":"ministral-8b-2512"},{"id":"ministral-3b-latest"},{"id":"ministral-3b-2512"},{"id":"magistral-medium-latest"},{"id":"magistral-medium-2509"},{"id":"magistral-small-latest"},{"id":"magistral-small-2509"},{"id":"mistral-medium-2508"},{"id":"codestral-latest"},{"id":"codestral-2508"},{"id":"mistral-small-2506"},{"id":"mistral-medium-2505"},{"id":"open-mistral-nemo"},{"id":"bedrock/openai.gpt-6.1-sol"},{"id":"bedrock/openai.gpt-6-astra"},{"id":"bedrock/anthropic.claude-opus-5"},{"id":"bedrock/openai.gpt-5.6-sol"},{"id":"bedrock/openai.gpt-5.6-terra"},{"id":"bedrock/openai.gpt-5.6-luna"},{"id":"bedrock/anthropic.claude-sonnet-5"},{"id":"bedrock/anthropic.claude-fable-5"},{"id":"bedrock/anthropic.claude-opus-4-8"},{"id":"bedrock/anthropic.claude-opus-4-7"},{"id":"bedrock/anthropic.claude-sonnet-4-6"},{"id":"bedrock/minimax.minimax-m2.5"},{"id":"bedrock/zai.glm-5"},{"id":"bedrock/anthropic.claude-opus-4-6-v1"},{"id":"bedrock/moonshotai.kimi-k2.5"},{"id":"bedrock/amazon.nova-2-lite-v1:0"},{"id":"bedrock/mistral.mistral-large-3-675b-instruct"},{"id":"bedrock/mistral.ministral-3-14b-instruct"},{"id":"bedrock/mistral.ministral-3-8b-instruct"},{"id":"bedrock/mistral.ministral-3-3b-instruct"},{"id":"bedrock/deepseek.v3.2"},{"id":"bedrock/anthropic.claude-opus-4-5-20251101-v1:0"},{"id":"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0"},{"id":"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0"},{"id":"bedrock/anthropic.claude-opus-4-1-20250805-v1:0"},{"id":"bedrock/openai.gpt-oss-120b-1:0"},{"id":"bedrock/openai.gpt-oss-20b-1:0"},{"id":"bedrock/amazon.nova-premier-v1:0"},{"id":"bedrock/meta.llama4-maverick-17b-instruct-v1:0"},{"id":"bedrock/meta.llama4-scout-17b-instruct-v1:0"},{"id":"bedrock/meta.llama3-3-70b-instruct-v1:0"},{"id":"bedrock/amazon.nova-pro-v1:0"},{"id":"bedrock/amazon.nova-lite-v1:0"},{"id":"bedrock/amazon.nova-micro-v1:0"},{"id":"bedrock/meta.llama3-1-70b-instruct-v1:0"},{"id":"bedrock/meta.llama3-1-8b-instruct-v1:0"},{"id":"bedrock/mistral.mistral-large-2407-v1:0"},{"id":"bedrock/mistral.pixtral-large-2502-v1:0"},{"id":"bedrock/mistral.magistral-small-2509"},{"id":"bedrock/mistral.mixtral-8x7b-instruct-v0:1"},{"id":"bedrock/cohere.command-r-plus-v1:0"},{"id":"bedrock/cohere.command-r-v1:0"}]},{"id":"vertexCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Google Cloud Account","mode":"basic","canonicalParamId":"vertexCredential","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"serviceId":"vertex-ai","condition":{"opaque":true},"required":true},{"id":"vertexManualCredential","type":"short-input","valueKind":"string","storage":"native","title":"Google Cloud Account","mode":"advanced","canonicalParamId":"vertexCredential","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"condition":{"opaque":true},"required":true},{"id":"apiKey","type":"short-input","valueKind":"string","storage":"native","title":"API Key","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":true,"nebius/google/gemma-3-27b-it":true,"nebius/MiniMaxAI/MiniMax-M3":true,"nebius/moonshotai/Kimi-K3":true,"nebius/NousResearch/Hermes-4-405B":true,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":true,"nebius/nvidia/nemotron-3-super-120b-a12b":true,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":true,"nebius/nvidia/Nemotron-3_5-Lightning":true,"nebius/openai/gpt-oss-120b":true,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":true,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":true,"nebius/Qwen/Qwen3.8-27B":true,"nebius/zai-org/GLM-5.2":true,"nebius/zai-org/GLM-5.3":true,"nebius/zai-org/GLM-5.3-Flash":true,"thinkingmachines/inkling-small":true,"thinkingmachines/inkling":true,"thinkingmachines/inkling-2-small":true,"gpt-6.1-terra":true,"gpt-6.1-sol":true,"gpt-6-sol":true,"gpt-6-luna":true,"gpt-6-astra":true,"gpt-5.6-sol":true,"gpt-5.6-terra":true,"gpt-5.6-luna":true,"chat-latest":true,"gpt-5.5-pro":true,"gpt-5.5":true,"gpt-5.4-mini":true,"gpt-5.4-nano":true,"gpt-5.4-pro":true,"gpt-5.4":true,"gpt-5.3-codex":true,"gpt-5.2-pro":true,"gpt-5.2":true,"gpt-5.1":true,"gpt-5-pro":true,"gpt-5":true,"gpt-5-mini":true,"gpt-5-nano":true,"o3-pro":true,"o4-mini":true,"o3":true,"gpt-4.1":true,"gpt-4.1-mini":true,"o3-mini":true,"o1":true,"gpt-4o":true,"claude-fable-5-2":true,"claude-haiku-5-5":true,"claude-sonnet-5-5":true,"claude-opus-5-5":true,"claude-fable-5-1":true,"claude-opus-5":true,"claude-sonnet-5":true,"claude-fable-5":true,"claude-opus-4-8":true,"claude-opus-4-7":true,"claude-sonnet-4-6":true,"claude-opus-4-6":true,"claude-opus-4-5":true,"claude-haiku-4-5":true,"claude-sonnet-4-5":true,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":true,"azure/model-router":true,"azure/o3":true,"azure/o4-mini":true,"azure/gpt-4.1":true,"azure/gpt-4.1-mini":true,"azure/gpt-4.1-nano":true,"azure/gpt-4o":true,"azure-anthropic/claude-haiku-5-5":true,"azure-anthropic/claude-sonnet-5-5":true,"azure-anthropic/claude-opus-5-5":true,"azure-anthropic/claude-fable-5-1":true,"azure-anthropic/claude-opus-5":true,"azure-anthropic/claude-sonnet-5":true,"azure-anthropic/claude-opus-4-8":true,"azure-anthropic/claude-opus-4-7":true,"azure-anthropic/claude-sonnet-4-6":true,"azure-anthropic/claude-opus-4-6":true,"azure-anthropic/claude-opus-4-5":true,"azure-anthropic/claude-haiku-4-5":true,"azure-anthropic/claude-sonnet-4-5":true,"azure-anthropic/claude-opus-4-1":true,"gemini-4-argon":true,"gemini-3.8-flash":true,"gemini-3.7-flash":true,"gemini-3.6-flash":true,"gemini-3.5-flash-lite":true,"gemini-3.5-flash":true,"gemini-3.1-flash-lite":true,"gemini-3.1-pro-preview":true,"gemini-3-flash-preview":true,"deep-research-pro-preview-12-2025":true,"gemini-2.5-flash-lite":true,"gemini-2.5-flash":true,"gemini-2.5-pro":true,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":true,"deepseek-v4-pro":true,"deepseek-v4-flash":true,"deepseek-reasoner":true,"deepseek-chat":true,"grok-4.7":true,"grok-4.6":true,"grok-4.5":true,"grok-4.3":true,"grok-4.20-0309-reasoning":true,"grok-4.20-0309-non-reasoning":true,"grok-4.20-multi-agent-0309":true,"cerebras/qwen-3.8-27b":true,"cerebras/gemma-4-31b":true,"cerebras/zai-glm-4.7":true,"cerebras/gpt-oss-120b":true,"groq/qwen/qwen3.8-27b":true,"groq/qwen/qwen3.6-27b":true,"groq/openai/gpt-oss-safeguard-20b":true,"groq/openai/gpt-oss-120b":true,"groq/openai/gpt-oss-20b":true,"groq/llama-3.3-70b-versatile":true,"groq/llama-3.1-8b-instant":true,"fugu-ultra-v2.0":true,"fugu-max":true,"fugu-max-v1.0":true,"fugu":true,"fugu-ultra":true,"sakana-namazu":true,"sakana-namazu-v1.0":true,"nvidia/nemotron-3.5-lightning-30b-a3b":true,"nvidia/nemotron-3-ultra-550b-a55b":true,"nvidia/nemotron-3-nano-30b-a3b":true,"nvidia/llama-3.3-nemotron-super-49b-v1.5":true,"nvidia/llama-3.1-nemotron-ultra-253b-v1":true,"nvidia/llama-3.1-nemotron-70b-instruct":true,"muse-spark-1.3":true,"muse-spark-1.1":true,"kimi-k3":true,"kimi-k2.7-code":true,"kimi-k2.7-code-highspeed":true,"kimi-k2.6":true,"kie/gpt-6-1-sol":true,"kie/claude-sonnet-5-5":true,"kie/claude-opus-5-5":true,"kie/gpt-6-sol":true,"kie/gpt-6-luna":true,"kie/gpt-6-astra":true,"kie/grok-4-6":true,"kie/claude-opus-5":true,"kie/kimi-k3":true,"kie/gpt-5-6-sol":true,"kie/gpt-5-6-terra":true,"kie/gpt-5-6-luna":true,"kie/grok-4-5":true,"kie/claude-sonnet-5":true,"kie/claude-fable-5":true,"kie/claude-opus-4-8":true,"kie/grok-4-3":true,"kie/gpt-5-5":true,"kie/claude-opus-4-7":true,"kie/claude-sonnet-4-6":true,"kie/claude-opus-4-6":true,"kie/claude-opus-4-5":true,"kie/claude-haiku-4-5":true,"kie/claude-sonnet-4-5":true,"glm-5.3-flash":true,"glm-5.3":true,"glm-5.2":true,"glm-5.1":true,"glm-5-turbo":true,"glm-5":true,"glm-4.7":true,"glm-4.7-flashx":true,"glm-4.6":true,"glm-4.5":true,"glm-4.5-air":true,"glm-4.5-x":true,"glm-4.5-airx":true,"glm-4-32b-0414-128k":true,"glm-5.3-flashx":true,"mistral-large-4":true,"zai-glm-5-3":true,"zai-glm-5-2":true,"labs-leanstral-1-5":true,"mistral-medium-2604":true,"mistral-medium-3-5":true,"mistral-medium-3":true,"mistral-medium-latest":true,"mistral-small-2603":true,"mistral-small-latest":true,"devstral-2512":true,"devstral-latest":true,"devstral-small-latest":true,"mistral-large-latest":true,"mistral-large-2512":true,"ministral-14b-latest":true,"ministral-14b-2512":true,"ministral-8b-latest":true,"ministral-8b-2512":true,"ministral-3b-latest":true,"ministral-3b-2512":true,"magistral-medium-latest":true,"magistral-medium-2509":true,"magistral-small-latest":true,"magistral-small-2509":true,"mistral-medium-2508":true,"codestral-latest":true,"codestral-2508":true,"mistral-small-2506":true,"mistral-medium-2505":true,"open-mistral-nemo":true,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"azureEndpoint","type":"short-input","valueKind":"string","storage":"native","title":"Azure Endpoint","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":true,"azure/model-router":true,"azure/o3":true,"azure/o4-mini":true,"azure/gpt-4.1":true,"azure/gpt-4.1-mini":true,"azure/gpt-4.1-nano":true,"azure/gpt-4o":true,"azure-anthropic/claude-haiku-5-5":true,"azure-anthropic/claude-sonnet-5-5":true,"azure-anthropic/claude-opus-5-5":true,"azure-anthropic/claude-fable-5-1":true,"azure-anthropic/claude-opus-5":true,"azure-anthropic/claude-sonnet-5":true,"azure-anthropic/claude-opus-4-8":true,"azure-anthropic/claude-opus-4-7":true,"azure-anthropic/claude-sonnet-4-6":true,"azure-anthropic/claude-opus-4-6":true,"azure-anthropic/claude-opus-4-5":true,"azure-anthropic/claude-haiku-4-5":true,"azure-anthropic/claude-sonnet-4-5":true,"azure-anthropic/claude-opus-4-1":true,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"password":true,"condition":{"opaque":true}},{"id":"azureApiVersion","type":"short-input","valueKind":"string","storage":"native","title":"Azure API Version","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":true,"azure/model-router":true,"azure/o3":true,"azure/o4-mini":true,"azure/gpt-4.1":true,"azure/gpt-4.1-mini":true,"azure/gpt-4.1-nano":true,"azure/gpt-4o":true,"azure-anthropic/claude-haiku-5-5":true,"azure-anthropic/claude-sonnet-5-5":true,"azure-anthropic/claude-opus-5-5":true,"azure-anthropic/claude-fable-5-1":true,"azure-anthropic/claude-opus-5":true,"azure-anthropic/claude-sonnet-5":true,"azure-anthropic/claude-opus-4-8":true,"azure-anthropic/claude-opus-4-7":true,"azure-anthropic/claude-sonnet-4-6":true,"azure-anthropic/claude-opus-4-6":true,"azure-anthropic/claude-opus-4-5":true,"azure-anthropic/claude-haiku-4-5":true,"azure-anthropic/claude-sonnet-4-5":true,"azure-anthropic/claude-opus-4-1":true,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"condition":{"opaque":true}},{"id":"vertexProject","type":"short-input","valueKind":"string","storage":"native","title":"Vertex AI Project","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"vertexLocation","type":"short-input","valueKind":"string","storage":"native","title":"Vertex AI Location","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"condition":{"opaque":true},"required":true},{"id":"bedrockAuthMode","type":"dropdown","valueKind":"string","storage":"native","title":"AWS Authentication","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":true,"bedrock/openai.gpt-6-astra":true,"bedrock/anthropic.claude-opus-5":true,"bedrock/openai.gpt-5.6-sol":true,"bedrock/openai.gpt-5.6-terra":true,"bedrock/openai.gpt-5.6-luna":true,"bedrock/anthropic.claude-sonnet-5":true,"bedrock/anthropic.claude-fable-5":true,"bedrock/anthropic.claude-opus-4-8":true,"bedrock/anthropic.claude-opus-4-7":true,"bedrock/anthropic.claude-sonnet-4-6":true,"bedrock/minimax.minimax-m2.5":true,"bedrock/zai.glm-5":true,"bedrock/anthropic.claude-opus-4-6-v1":true,"bedrock/moonshotai.kimi-k2.5":true,"bedrock/amazon.nova-2-lite-v1:0":true,"bedrock/mistral.mistral-large-3-675b-instruct":true,"bedrock/mistral.ministral-3-14b-instruct":true,"bedrock/mistral.ministral-3-8b-instruct":true,"bedrock/mistral.ministral-3-3b-instruct":true,"bedrock/deepseek.v3.2":true,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":true,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":true,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":true,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":true,"bedrock/openai.gpt-oss-120b-1:0":true,"bedrock/openai.gpt-oss-20b-1:0":true,"bedrock/amazon.nova-premier-v1:0":true,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":true,"bedrock/meta.llama4-scout-17b-instruct-v1:0":true,"bedrock/meta.llama3-3-70b-instruct-v1:0":true,"bedrock/amazon.nova-pro-v1:0":true,"bedrock/amazon.nova-lite-v1:0":true,"bedrock/amazon.nova-micro-v1:0":true,"bedrock/meta.llama3-1-70b-instruct-v1:0":true,"bedrock/meta.llama3-1-8b-instruct-v1:0":true,"bedrock/mistral.mistral-large-2407-v1:0":true,"bedrock/mistral.pixtral-large-2502-v1:0":true,"bedrock/mistral.magistral-small-2509":true,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":true,"bedrock/cohere.command-r-plus-v1:0":true,"bedrock/cohere.command-r-v1:0":true},"valueDefault":{"constant":"access_keys"},"condition":{"opaque":true},"options":[{"id":"access_keys"},{"id":"credential"}]},{"id":"bedrockCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"AWS Credential","mode":"basic","canonicalParamId":"bedrockCredential","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"serviceId":"aws","condition":{"opaque":true},"required":true},{"id":"bedrockManualCredential","type":"short-input","valueKind":"string","storage":"native","title":"AWS Credential","mode":"advanced","canonicalParamId":"bedrockCredential","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"condition":{"opaque":true},"required":true},{"id":"bedrockAccessKeyId","type":"short-input","valueKind":"string","storage":"native","title":"AWS Access Key ID","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"bedrockSecretKey","type":"short-input","valueKind":"string","storage":"native","title":"AWS Secret Access Key","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"bedrockRegion","type":"short-input","valueKind":"string","storage":"native","title":"AWS Region","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":true,"bedrock/openai.gpt-6-astra":true,"bedrock/anthropic.claude-opus-5":true,"bedrock/openai.gpt-5.6-sol":true,"bedrock/openai.gpt-5.6-terra":true,"bedrock/openai.gpt-5.6-luna":true,"bedrock/anthropic.claude-sonnet-5":true,"bedrock/anthropic.claude-fable-5":true,"bedrock/anthropic.claude-opus-4-8":true,"bedrock/anthropic.claude-opus-4-7":true,"bedrock/anthropic.claude-sonnet-4-6":true,"bedrock/minimax.minimax-m2.5":true,"bedrock/zai.glm-5":true,"bedrock/anthropic.claude-opus-4-6-v1":true,"bedrock/moonshotai.kimi-k2.5":true,"bedrock/amazon.nova-2-lite-v1:0":true,"bedrock/mistral.mistral-large-3-675b-instruct":true,"bedrock/mistral.ministral-3-14b-instruct":true,"bedrock/mistral.ministral-3-8b-instruct":true,"bedrock/mistral.ministral-3-3b-instruct":true,"bedrock/deepseek.v3.2":true,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":true,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":true,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":true,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":true,"bedrock/openai.gpt-oss-120b-1:0":true,"bedrock/openai.gpt-oss-20b-1:0":true,"bedrock/amazon.nova-premier-v1:0":true,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":true,"bedrock/meta.llama4-scout-17b-instruct-v1:0":true,"bedrock/meta.llama3-3-70b-instruct-v1:0":true,"bedrock/amazon.nova-pro-v1:0":true,"bedrock/amazon.nova-lite-v1:0":true,"bedrock/amazon.nova-micro-v1:0":true,"bedrock/meta.llama3-1-70b-instruct-v1:0":true,"bedrock/meta.llama3-1-8b-instruct-v1:0":true,"bedrock/mistral.mistral-large-2407-v1:0":true,"bedrock/mistral.pixtral-large-2502-v1:0":true,"bedrock/mistral.magistral-small-2509":true,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":true,"bedrock/cohere.command-r-plus-v1:0":true,"bedrock/cohere.command-r-v1:0":true},"condition":{"opaque":true}},{"id":"fallbackModels","type":"model-fallback-list","valueKind":"array","storage":"native","title":"Fallback models","mode":"advanced"}],"outputs":{"context":{"type":"string","description":"Context used for routing"},"model":{"type":"string","description":"Model used"},"tokens":{"type":"json","description":"Token usage"},"cost":{"type":"json","description":"Cost information"},"selectedRoute":{"type":"string","description":"Selected route ID"},"reasoning":{"type":"string","description":"Explanation of why this route was chosen"},"selectedPath":{"type":"json","description":"Selected routing path"}}},"slack_v2":{"type":"slack_v2","name":"Slack","category":"tools","tools":{"access":["slack_message","slack_ephemeral_message","slack_canvas","slack_message_reader","slack_get_message","slack_get_thread","slack_get_thread_replies","slack_get_channel_history","slack_get_permalink","slack_set_status","slack_set_title","slack_set_suggested_prompts","slack_set_suggested_prompts_v2","slack_set_agent_session_status_v2","slack_rename_agent_session_v2","slack_list_channels","slack_list_members","slack_list_users","slack_get_user","slack_download","slack_update_message","slack_delete_message","slack_add_reaction","slack_remove_reaction","slack_get_channel_info","slack_get_user_presence","slack_edit_canvas","slack_create_channel_canvas","slack_get_canvas","slack_list_canvases","slack_lookup_canvas_sections","slack_delete_canvas","slack_lists_create","slack_lists_update","slack_lists_access_set","slack_lists_items_list","slack_lists_items_info","slack_lists_items_create","slack_lists_items_update","slack_lists_items_delete","slack_create_conversation","slack_invite_to_conversation","slack_open_view","slack_update_view","slack_push_view","slack_publish_view","slack_schedule_message","slack_list_scheduled_messages","slack_delete_scheduled_message","slack_archive_conversation","slack_rename_conversation","slack_set_conversation_topic","slack_set_conversation_purpose","slack_lists_access_delete","slack_lists_download_start","slack_lists_download_get","slack_lists_items_delete_multiple","slack_share_canvas","slack_revoke_canvas_access","slack_join_conversation","slack_leave_conversation","slack_kick_conversation","slack_unarchive_conversation","slack_close_conversation","slack_mark_conversation_read","slack_open_conversation","slack_lookup_user_by_email","slack_list_user_conversations","slack_get_user_profile","slack_set_user_presence","slack_get_file_info","slack_list_files","slack_delete_file","slack_get_reactions","slack_list_reactions","slack_pin_message","slack_unpin_message","slack_list_pins","slack_add_bookmark","slack_edit_bookmark","slack_list_bookmarks","slack_remove_bookmark","slack_create_user_group","slack_update_user_group","slack_enable_user_group","slack_disable_user_group","slack_list_user_groups","slack_list_user_group_members","slack_update_user_group_members","slack_get_dnd_info","slack_get_team_dnd_info","slack_list_emoji","slack_get_team_info","slack_get_team_profile","slack_unfurl_links"],"selector":"operation"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["slack_oauth"]},"legacyIds":[{"from":"channelMaxPages","to":null}],"subBlocks":[{"id":"operation","type":"dropdown","valueKind":"string","storage":"native","title":"Operation","surface":"action","valueDefault":{"constant":"send"},"options":[{"id":"send","label":"Send Message"},{"id":"ephemeral","label":"Send Ephemeral Message"},{"id":"canvas","label":"Create Canvas"},{"id":"read","label":"Read Messages"},{"id":"get_message","label":"Get Message"},{"id":"get_thread","label":"Get Thread"},{"id":"get_thread_replies","label":"Get Thread Replies"},{"id":"get_channel_history","label":"Get Channel History"},{"id":"get_permalink","label":"Get Message Permalink"},{"id":"set_status","label":"Set Assistant Status"},{"id":"set_title","label":"Set Assistant Title"},{"id":"set_suggested_prompts","label":"Set Assistant Suggested Prompts"},{"id":"set_agent_suggested_prompts","label":"Set Agent Suggested Prompts"},{"id":"set_agent_session_status","label":"Set Agent Session Status"},{"id":"rename_agent_session","label":"Rename Agent Session"},{"id":"list_channels","label":"List Channels"},{"id":"list_members","label":"List Channel Members"},{"id":"list_users","label":"List Users"},{"id":"get_user","label":"Get User Info"},{"id":"download","label":"Download File"},{"id":"update","label":"Update Message"},{"id":"delete","label":"Delete Message"},{"id":"react","label":"Add Reaction"},{"id":"unreact","label":"Remove Reaction"},{"id":"get_channel_info","label":"Get Channel Info"},{"id":"get_user_presence","label":"Get User Presence"},{"id":"edit_canvas","label":"Edit Canvas"},{"id":"create_channel_canvas","label":"Create Channel Canvas"},{"id":"get_canvas","label":"Get Canvas Info"},{"id":"list_canvases","label":"List Canvases"},{"id":"lookup_canvas_sections","label":"Lookup Canvas Sections"},{"id":"delete_canvas","label":"Delete Canvas"},{"id":"create_list","label":"Create List"},{"id":"rename_list","label":"Update List"},{"id":"share_list","label":"Share List"},{"id":"list_items","label":"Read List Items"},{"id":"get_list_item","label":"Get List Item"},{"id":"create_list_item","label":"Create List Item"},{"id":"update_list_items","label":"Update List Items"},{"id":"delete_list_item","label":"Delete List Item"},{"id":"create_conversation","label":"Create Conversation"},{"id":"invite_to_conversation","label":"Invite to Conversation"},{"id":"open_view","label":"Open View"},{"id":"update_view","label":"Update View"},{"id":"push_view","label":"Push View"},{"id":"publish_view","label":"Publish View"},{"id":"schedule_message","label":"Schedule Message"},{"id":"list_scheduled_messages","label":"List Scheduled Messages"},{"id":"delete_scheduled_message","label":"Delete Scheduled Message"},{"id":"archive_conversation","label":"Archive Conversation"},{"id":"rename_conversation","label":"Rename Conversation"},{"id":"set_conversation_topic","label":"Set Conversation Topic"},{"id":"set_conversation_purpose","label":"Set Conversation Purpose"},{"id":"revoke_list_access","label":"Revoke List Access"},{"id":"start_list_export","label":"Start List Export"},{"id":"get_list_export","label":"Get List Export"},{"id":"delete_list_items","label":"Delete List Items"},{"id":"share_canvas","label":"Share Canvas"},{"id":"revoke_canvas_access","label":"Revoke Canvas Access"},{"id":"join_conversation","label":"Join Conversation"},{"id":"leave_conversation","label":"Leave Conversation"},{"id":"kick_conversation","label":"Remove User from Conversation"},{"id":"unarchive_conversation","label":"Unarchive Conversation"},{"id":"close_conversation","label":"Close Conversation"},{"id":"mark_conversation_read","label":"Mark Conversation Read"},{"id":"open_conversation","label":"Open Conversation"},{"id":"lookup_user_by_email","label":"Find User by Email"},{"id":"list_user_conversations","label":"List User Conversations"},{"id":"get_user_profile","label":"Get User Profile"},{"id":"set_user_presence","label":"Set Bot Presence"},{"id":"get_file_info","label":"Get File Info"},{"id":"list_files","label":"List Files"},{"id":"delete_file","label":"Delete File"},{"id":"get_reactions","label":"Get Reactions"},{"id":"list_reactions","label":"List Reactions"},{"id":"pin_message","label":"Pin Message"},{"id":"unpin_message","label":"Unpin Message"},{"id":"list_pins","label":"List Pins"},{"id":"add_bookmark","label":"Add Bookmark"},{"id":"edit_bookmark","label":"Edit Bookmark"},{"id":"list_bookmarks","label":"List Bookmarks"},{"id":"remove_bookmark","label":"Remove Bookmark"},{"id":"create_user_group","label":"Create User Group"},{"id":"update_user_group","label":"Update User Group"},{"id":"enable_user_group","label":"Enable User Group"},{"id":"disable_user_group","label":"Disable User Group"},{"id":"list_user_groups","label":"List User Groups"},{"id":"list_user_group_members","label":"List User Group Members"},{"id":"update_user_group_members","label":"Update User Group Members"},{"id":"get_dnd_info","label":"Get Do Not Disturb Info"},{"id":"get_team_dnd_info","label":"Get Team Do Not Disturb Info"},{"id":"list_emoji","label":"List Custom Emoji"},{"id":"get_team_info","label":"Get Workspace Info"},{"id":"get_team_profile","label":"Get Workspace Profile Fields"},{"id":"unfurl_links","label":"Unfurl Links"}]},{"id":"destinationType","type":"dropdown","valueKind":"string","storage":"native","title":"Destination","surface":"action","visibleFor":{"send":true,"ephemeral":false,"canvas":false,"read":true,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"channel"},"condition":{"opaque":true},"options":[{"id":"channel"},{"id":"dm"}]},{"id":"credential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Slack Account","mode":"basic","canonicalParamId":"oauthCredential","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"serviceId":"slack","condition":{"opaque":true},"required":true},{"id":"manualCredential","type":"short-input","valueKind":"string","storage":"native","title":"Slack Account","mode":"advanced","canonicalParamId":"oauthCredential","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"channel","type":"channel-selector","valueKind":"picked","storage":"native","title":"Channel","mode":"basic","canonicalParamId":"channel","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":true,"list_users":false,"get_user":false,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"send":{"field":"destinationType","value":"dm","not":true},"read":{"field":"destinationType","value":"dm","not":true},"schedule_message":{"field":"destinationType","value":"dm","not":true}},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.channels","serviceId":"slack","condition":{"opaque":true},"required":{"field":"operation","value":{"list":8},"not":true},"options":{"dynamic":true}},{"id":"manualChannel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","mode":"advanced","canonicalParamId":"channel","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":true,"list_users":false,"get_user":false,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"send":{"field":"destinationType","value":"dm","not":true},"canvas":{"field":"destinationType","value":"dm","not":true},"read":{"field":"destinationType","value":"dm","not":true},"get_message":{"field":"destinationType","value":"dm","not":true},"get_thread":{"field":"destinationType","value":"dm","not":true},"get_thread_replies":{"field":"destinationType","value":"dm","not":true},"get_channel_history":{"field":"destinationType","value":"dm","not":true},"get_permalink":{"field":"destinationType","value":"dm","not":true},"set_status":{"field":"destinationType","value":"dm","not":true},"set_title":{"field":"destinationType","value":"dm","not":true},"set_suggested_prompts":{"field":"destinationType","value":"dm","not":true},"list_members":{"field":"destinationType","value":"dm","not":true},"download":{"field":"destinationType","value":"dm","not":true},"update":{"field":"destinationType","value":"dm","not":true},"delete":{"field":"destinationType","value":"dm","not":true},"react":{"field":"destinationType","value":"dm","not":true},"unreact":{"field":"destinationType","value":"dm","not":true},"get_channel_info":{"field":"destinationType","value":"dm","not":true},"create_channel_canvas":{"field":"destinationType","value":"dm","not":true},"list_canvases":{"field":"destinationType","value":"dm","not":true},"invite_to_conversation":{"field":"destinationType","value":"dm","not":true},"schedule_message":{"field":"destinationType","value":"dm","not":true},"list_scheduled_messages":{"field":"destinationType","value":"dm","not":true},"delete_scheduled_message":{"field":"destinationType","value":"dm","not":true},"archive_conversation":{"field":"destinationType","value":"dm","not":true},"rename_conversation":{"field":"destinationType","value":"dm","not":true},"set_conversation_topic":{"field":"destinationType","value":"dm","not":true},"set_conversation_purpose":{"field":"destinationType","value":"dm","not":true}},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":{"field":"operation","value":{"list":8},"not":true}},{"id":"dmUserId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"dmUserId","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":true,"rename_agent_session":true,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":true,"rename_list":true,"share_list":true,"list_items":true,"get_list_item":true,"create_list_item":true,"update_list_items":true,"delete_list_item":true,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"send":{"field":"destinationType","value":"dm"},"ephemeral":{"field":"destinationType","value":"dm"},"canvas":{"field":"destinationType","value":"dm"},"read":{"field":"destinationType","value":"dm"},"get_message":{"field":"destinationType","value":"dm"},"get_thread":{"field":"destinationType","value":"dm"},"get_thread_replies":{"field":"destinationType","value":"dm"},"get_channel_history":{"field":"destinationType","value":"dm"},"get_permalink":{"field":"destinationType","value":"dm"},"set_status":{"field":"destinationType","value":"dm"},"set_title":{"field":"destinationType","value":"dm"},"set_suggested_prompts":{"field":"destinationType","value":"dm"},"set_agent_suggested_prompts":{"field":"destinationType","value":"dm"},"set_agent_session_status":{"field":"destinationType","value":"dm"},"rename_agent_session":{"field":"destinationType","value":"dm"},"list_channels":{"field":"destinationType","value":"dm"},"list_members":{"field":"destinationType","value":"dm"},"list_users":{"field":"destinationType","value":"dm"},"get_user":{"field":"destinationType","value":"dm"},"download":{"field":"destinationType","value":"dm"},"update":{"field":"destinationType","value":"dm"},"delete":{"field":"destinationType","value":"dm"},"react":{"field":"destinationType","value":"dm"},"unreact":{"field":"destinationType","value":"dm"},"get_channel_info":{"field":"destinationType","value":"dm"},"get_user_presence":{"field":"destinationType","value":"dm"},"edit_canvas":{"field":"destinationType","value":"dm"},"create_channel_canvas":{"field":"destinationType","value":"dm"},"get_canvas":{"field":"destinationType","value":"dm"},"list_canvases":{"field":"destinationType","value":"dm"},"lookup_canvas_sections":{"field":"destinationType","value":"dm"},"delete_canvas":{"field":"destinationType","value":"dm"},"create_list":{"field":"destinationType","value":"dm"},"rename_list":{"field":"destinationType","value":"dm"},"share_list":{"field":"destinationType","value":"dm"},"list_items":{"field":"destinationType","value":"dm"},"get_list_item":{"field":"destinationType","value":"dm"},"create_list_item":{"field":"destinationType","value":"dm"},"update_list_items":{"field":"destinationType","value":"dm"},"delete_list_item":{"field":"destinationType","value":"dm"},"create_conversation":{"field":"destinationType","value":"dm"},"invite_to_conversation":{"field":"destinationType","value":"dm"},"open_view":{"field":"destinationType","value":"dm"},"update_view":{"field":"destinationType","value":"dm"},"push_view":{"field":"destinationType","value":"dm"},"publish_view":{"field":"destinationType","value":"dm"},"schedule_message":{"field":"destinationType","value":"dm"},"list_scheduled_messages":{"field":"destinationType","value":"dm"},"delete_scheduled_message":{"field":"destinationType","value":"dm"},"archive_conversation":{"field":"destinationType","value":"dm"},"rename_conversation":{"field":"destinationType","value":"dm"},"set_conversation_topic":{"field":"destinationType","value":"dm"},"set_conversation_purpose":{"field":"destinationType","value":"dm"}},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualDmUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"dmUserId","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":true,"rename_agent_session":true,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":true,"rename_list":true,"share_list":true,"list_items":true,"get_list_item":true,"create_list_item":true,"update_list_items":true,"delete_list_item":true,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"send":{"field":"destinationType","value":"dm"},"ephemeral":{"field":"destinationType","value":"dm"},"canvas":{"field":"destinationType","value":"dm"},"read":{"field":"destinationType","value":"dm"},"get_message":{"field":"destinationType","value":"dm"},"get_thread":{"field":"destinationType","value":"dm"},"get_thread_replies":{"field":"destinationType","value":"dm"},"get_channel_history":{"field":"destinationType","value":"dm"},"get_permalink":{"field":"destinationType","value":"dm"},"set_status":{"field":"destinationType","value":"dm"},"set_title":{"field":"destinationType","value":"dm"},"set_suggested_prompts":{"field":"destinationType","value":"dm"},"set_agent_suggested_prompts":{"field":"destinationType","value":"dm"},"set_agent_session_status":{"field":"destinationType","value":"dm"},"rename_agent_session":{"field":"destinationType","value":"dm"},"list_channels":{"field":"destinationType","value":"dm"},"list_members":{"field":"destinationType","value":"dm"},"list_users":{"field":"destinationType","value":"dm"},"get_user":{"field":"destinationType","value":"dm"},"download":{"field":"destinationType","value":"dm"},"update":{"field":"destinationType","value":"dm"},"delete":{"field":"destinationType","value":"dm"},"react":{"field":"destinationType","value":"dm"},"unreact":{"field":"destinationType","value":"dm"},"get_channel_info":{"field":"destinationType","value":"dm"},"get_user_presence":{"field":"destinationType","value":"dm"},"edit_canvas":{"field":"destinationType","value":"dm"},"create_channel_canvas":{"field":"destinationType","value":"dm"},"get_canvas":{"field":"destinationType","value":"dm"},"list_canvases":{"field":"destinationType","value":"dm"},"lookup_canvas_sections":{"field":"destinationType","value":"dm"},"delete_canvas":{"field":"destinationType","value":"dm"},"create_list":{"field":"destinationType","value":"dm"},"rename_list":{"field":"destinationType","value":"dm"},"share_list":{"field":"destinationType","value":"dm"},"list_items":{"field":"destinationType","value":"dm"},"get_list_item":{"field":"destinationType","value":"dm"},"create_list_item":{"field":"destinationType","value":"dm"},"update_list_items":{"field":"destinationType","value":"dm"},"delete_list_item":{"field":"destinationType","value":"dm"},"create_conversation":{"field":"destinationType","value":"dm"},"invite_to_conversation":{"field":"destinationType","value":"dm"},"open_view":{"field":"destinationType","value":"dm"},"update_view":{"field":"destinationType","value":"dm"},"push_view":{"field":"destinationType","value":"dm"},"publish_view":{"field":"destinationType","value":"dm"},"schedule_message":{"field":"destinationType","value":"dm"},"list_scheduled_messages":{"field":"destinationType","value":"dm"},"delete_scheduled_message":{"field":"destinationType","value":"dm"},"archive_conversation":{"field":"destinationType","value":"dm"},"rename_conversation":{"field":"destinationType","value":"dm"},"set_conversation_topic":{"field":"destinationType","value":"dm"},"set_conversation_purpose":{"field":"destinationType","value":"dm"}},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"ephemeralUser","type":"user-selector","valueKind":"picked","storage":"native","title":"Target User","mode":"basic","canonicalParamId":"ephemeralUser","surface":"action","visibleFor":{"send":false,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualEphemeralUser","type":"short-input","valueKind":"string","storage":"native","title":"Target User ID","mode":"advanced","canonicalParamId":"ephemeralUser","surface":"action","visibleFor":{"send":false,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"messageFormat","type":"dropdown","valueKind":"string","storage":"native","title":"Message Format","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"text"},"condition":{"opaque":true},"options":[{"id":"text"},{"id":"blocks"}]},{"id":"text","type":"long-input","valueKind":"string","storage":"native","title":"Message","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":{"field":"operation","value":["send","ephemeral","schedule_message"],"and":{"field":"messageFormat","value":"blocks","not":true}}},{"id":"blocks","type":"code","valueKind":"json","storage":"native","title":"Block Kit Blocks","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"send":{"field":"messageFormat","value":"blocks"},"ephemeral":{"field":"messageFormat","value":"blocks"},"update":{"field":"messageFormat","value":"blocks"},"schedule_message":{"field":"messageFormat","value":"blocks"}},"language":"json","condition":{"opaque":true},"required":{"field":"operation","value":["send","ephemeral","update","schedule_message"],"and":{"field":"messageFormat","value":"blocks"}}},{"id":"threadTs","type":"short-input","valueKind":"string","storage":"native","title":"Thread Timestamp","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"attachmentFiles","type":"file-upload","valueKind":"upload","storage":"native","title":"Attachments","mode":"basic","canonicalParamId":"files","surface":"action","visibleFor":{"send":true,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"multiple":true,"condition":{"opaque":true},"required":false},{"id":"files","type":"short-input","valueKind":"string","storage":"native","title":"File Attachments","mode":"advanced","canonicalParamId":"files","surface":"action","visibleFor":{"send":true,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"title","type":"short-input","valueKind":"string","storage":"native","title":"Canvas Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":true,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"content","type":"long-input","valueKind":"string","storage":"native","title":"Canvas Content","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":true,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"limit","type":"short-input","valueKind":"string","storage":"native","title":"Message Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":true,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"includePrivate","type":"dropdown","valueKind":"string","storage":"native","title":"Include Private Channels","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"true"},"condition":{"opaque":true},"options":[{"id":"true"},{"id":"false"}]},{"id":"channelLimit","type":"short-input","valueKind":"string","storage":"native","title":"Conversations Per Page","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"memberLimit","type":"short-input","valueKind":"string","storage":"native","title":"Member Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":true,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"includeDeleted","type":"dropdown","valueKind":"string","storage":"native","title":"Include Deactivated Users","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":true,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"options":[{"id":"false"},{"id":"true"}]},{"id":"userLimit","type":"short-input","valueKind":"string","storage":"native","title":"User Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":true,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"paginationCursor","type":"short-input","valueKind":"string","storage":"native","title":"Pagination Cursor","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":true,"list_users":true,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"userId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"userId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":true,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"userId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":true,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"getMessageTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":true,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":true,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"getThreadTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Thread Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":true,"get_thread_replies":true,"get_channel_history":false,"get_permalink":false,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"threadLimit","type":"short-input","valueKind":"string","storage":"native","title":"Message Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":true,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"status","type":"short-input","valueKind":"string","storage":"native","title":"Status Text","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":true,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"loadingMessages","type":"long-input","valueKind":"string","storage":"native","title":"Loading Messages","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":true,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"assistantTitle","type":"short-input","valueKind":"string","storage":"native","title":"Thread Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":true,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"suggestedPrompts","type":"long-input","valueKind":"string","storage":"native","title":"Suggested Prompts","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"promptsTitle","type":"short-input","valueKind":"string","storage":"native","title":"Prompts Heading","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyOldest","type":"short-input","valueKind":"string","storage":"native","title":"Oldest Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyLatest","type":"short-input","valueKind":"string","storage":"native","title":"Latest Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyLimit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyMaxPages","type":"short-input","valueKind":"string","storage":"native","title":"Max Pages","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyCursor","type":"short-input","valueKind":"string","storage":"native","title":"Start Cursor","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyInclusive","type":"dropdown","valueKind":"string","storage":"native","title":"Inclusive","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"required":false,"options":[{"id":"false"},{"id":"true"}]},{"id":"oldest","type":"short-input","valueKind":"string","storage":"native","title":"Oldest Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":true,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"fileId","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":true,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"downloadFileName","type":"short-input","valueKind":"string","storage":"native","title":"File Name Override","canonicalParamId":"fileName","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":true,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"updateTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"updateText","type":"long-input","valueKind":"string","storage":"native","title":"New Message Text","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":{"field":"operation","value":"update","and":{"field":"messageFormat","value":"blocks","not":true}}},{"id":"deleteTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":true,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"reactionTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":true,"unreact":true,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"emojiName","type":"short-input","valueKind":"string","storage":"native","title":"Emoji Name","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":true,"unreact":true,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"includeNumMembers","type":"dropdown","valueKind":"string","storage":"native","title":"Include Member Count","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":true,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"true"},"condition":{"opaque":true},"options":[{"id":"true"},{"id":"false"}]},{"id":"presenceUserId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"presenceUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":true,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualPresenceUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"presenceUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":true,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"editCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"canvasOperation","type":"dropdown","valueKind":"string","storage":"native","title":"Edit Operation","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"insert_at_end"},"condition":{"opaque":true},"required":true,"options":[{"id":"insert_at_start"},{"id":"insert_at_end"},{"id":"insert_after"},{"id":"insert_before"},{"id":"replace"},{"id":"delete"},{"id":"rename"}]},{"id":"canvasContent","type":"long-input","valueKind":"string","storage":"native","title":"Content","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"edit_canvas":{"field":"canvasOperation","value":["delete","rename"],"not":true}},"condition":{"opaque":true}},{"id":"sectionId","type":"short-input","valueKind":"string","storage":"native","title":"Section ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"edit_canvas":{"field":"canvasOperation","value":["insert_after","insert_before","replace","delete"]}},"condition":{"opaque":true},"required":{"field":"canvasOperation","value":["insert_after","insert_before","delete"]}},{"id":"canvasTitle","type":"short-input","valueKind":"string","storage":"native","title":"New Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"edit_canvas":{"field":"canvasOperation","value":"rename"}},"condition":{"opaque":true},"required":true},{"id":"channelCanvasTitle","type":"short-input","valueKind":"string","storage":"native","title":"Canvas Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"channelCanvasContent","type":"long-input","valueKind":"string","storage":"native","title":"Canvas Content","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"getCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":true,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"canvasListCount","type":"short-input","valueKind":"string","storage":"native","title":"Canvas Limit","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListPage","type":"short-input","valueKind":"string","storage":"native","title":"Page","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListUser","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListTsFrom","type":"short-input","valueKind":"string","storage":"native","title":"Created After","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListTsTo","type":"short-input","valueKind":"string","storage":"native","title":"Created Before","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListTeamId","type":"short-input","valueKind":"string","storage":"native","title":"Team ID","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"lookupCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":true,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"sectionCriteria","type":"code","valueKind":"json","storage":"native","title":"Section Criteria","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":true,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"language":"json","condition":{"opaque":true},"required":true},{"id":"deleteCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":true,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"conversationName","type":"short-input","valueKind":"string","storage":"native","title":"Channel Name","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"isPrivate","type":"dropdown","valueKind":"string","storage":"native","title":"Private Channel","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"options":[{"id":"false"},{"id":"true"}]},{"id":"teamId","type":"short-input","valueKind":"string","storage":"native","title":"Team ID","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"inviteUsers","type":"short-input","valueKind":"string","storage":"native","title":"User IDs","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"inviteForce","type":"dropdown","valueKind":"string","storage":"native","title":"Skip Invalid Users","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"options":[{"id":"false"},{"id":"true"}]},{"id":"viewTriggerId","type":"short-input","valueKind":"string","storage":"native","title":"Trigger ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":true,"update_view":false,"push_view":true,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"viewInteractivityPointer","type":"short-input","valueKind":"string","storage":"native","title":"Interactivity Pointer","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":true,"update_view":false,"push_view":true,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"viewId","type":"short-input","valueKind":"string","storage":"native","title":"View ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":true,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"viewExternalId","type":"short-input","valueKind":"string","storage":"native","title":"External ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":true,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"viewHash","type":"short-input","valueKind":"string","storage":"native","title":"View Hash","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":true,"push_view":false,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"publishUserId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"publishUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualPublishUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"publishUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"viewPayload","type":"code","valueKind":"json","storage":"native","title":"View Payload","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"language":"json","condition":{"opaque":true},"required":true},{"id":"scheduleAt","type":"short-input","valueKind":"string","storage":"native","title":"Send At","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"scheduledLimit","type":"short-input","valueKind":"string","storage":"native","title":"Message Limit","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":true,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"scheduledCursor","type":"short-input","valueKind":"string","storage":"native","title":"Pagination Cursor","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":true,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"scheduledMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Scheduled Message ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":true,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"renameChannelName","type":"short-input","valueKind":"string","storage":"native","title":"New Channel Name","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":true,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"conversationTopic","type":"long-input","valueKind":"string","storage":"native","title":"Topic","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":true,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"conversationPurpose","type":"long-input","valueKind":"string","storage":"native","title":"Purpose","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"agentBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Slack Bot","mode":"basic","canonicalParamId":"agentCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":9}},"required":true},{"id":"manualAgentBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Custom Slack Bot Credential ID","mode":"advanced","canonicalParamId":"agentCredentialId","surface":"action","condition":{"field":"operation","value":{"list":9}},"required":true},{"id":"agentChannel","type":"channel-selector","valueKind":"picked","storage":"native","title":"Channel","mode":"basic","canonicalParamId":"agentChannelId","surface":"action","dependsOn":{"all":["agentBotCredential"],"any":[]},"selectorKey":"slack.channels","serviceId":"slack","condition":{"field":"operation","value":{"list":9}},"required":true,"options":{"dynamic":true}},{"id":"manualAgentChannel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","mode":"advanced","canonicalParamId":"agentChannelId","surface":"action","condition":{"field":"operation","value":{"list":9}},"required":true},{"id":"agentThreadTs","type":"short-input","valueKind":"string","storage":"native","title":"Thread Timestamp","surface":"action","condition":{"field":"operation","value":{"list":9}},"required":{"field":"operation","value":{"list":10}}},{"id":"agentSessionStatus","type":"dropdown","valueKind":"string","storage":"native","title":"Session Status","surface":"action","valueDefault":{"constant":"processing"},"condition":{"field":"operation","value":"set_agent_session_status"},"required":true,"options":[{"id":"active"},{"id":"processing"},{"id":"suspended"},{"id":"closed"}]},{"id":"agentSessionTitle","type":"short-input","valueKind":"string","storage":"native","title":"Session Title","surface":"action","condition":{"field":"operation","value":{"list":10}},"required":{"field":"operation","value":"rename_agent_session"}},{"id":"agentInitiatorUser","type":"user-selector","valueKind":"picked","storage":"native","title":"Initiator","mode":"basic","canonicalParamId":"agentInitiatorUserId","surface":"action","dependsOn":{"all":["agentBotCredential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"field":"operation","value":"set_agent_session_status"},"required":false,"options":{"dynamic":true}},{"id":"manualAgentInitiatorUser","type":"short-input","valueKind":"string","storage":"native","title":"Initiator User ID","mode":"advanced","canonicalParamId":"agentInitiatorUserId","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"agentIconEmoji","type":"short-input","valueKind":"string","storage":"native","title":"Agent Icon Emoji","mode":"advanced","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"agentIconUrl","type":"short-input","valueKind":"string","storage":"native","title":"Agent Icon URL","mode":"advanced","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"agentUsername","type":"short-input","valueKind":"string","storage":"native","title":"Agent Username","mode":"advanced","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"listBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Slack Bot","mode":"basic","canonicalParamId":"listCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":11}},"required":true},{"id":"manualListBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Custom Slack Bot Credential ID","mode":"advanced","canonicalParamId":"listCredentialId","surface":"action","condition":{"field":"operation","value":{"list":11}},"required":true},{"id":"listId","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":["rename_list","share_list","list_items","get_list_item","create_list_item","update_list_items","delete_list_item"]},"required":true},{"id":"listShareTarget","type":"dropdown","valueKind":"string","storage":"native","title":"Share With","surface":"action","valueDefault":{"constant":"users"},"condition":{"field":"operation","value":"share_list"},"required":true,"options":[{"id":"users"},{"id":"channels"}]},{"id":"listShareUserIds","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_list","and":{"field":"listShareTarget","value":"users"}},"required":true},{"id":"listShareChannelIds","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_list","and":{"field":"listShareTarget","value":"channels"}},"required":true},{"id":"listAccessLevel","type":"dropdown","valueKind":"string","storage":"native","title":"Access Level","surface":"action","dependsOn":{"all":["listShareTarget"],"any":[]},"valueDefault":{"constant":"read"},"condition":{"field":"operation","value":"share_list"},"required":true,"options":{"opaque":true}},{"id":"listName","type":"short-input","valueKind":"string","storage":"native","title":"Name","surface":"action","condition":{"field":"operation","value":{"list":12}},"required":{"field":"operation","value":"create_list"}},{"id":"listItemId","type":"short-input","valueKind":"string","storage":"native","title":"Row ID","surface":"action","condition":{"field":"operation","value":["get_list_item","delete_list_item"]},"required":true},{"id":"listInitialFields","type":"code","valueKind":"json","storage":"native","title":"Initial Fields","surface":"action","language":"json","condition":{"field":"operation","value":"create_list_item"}},{"id":"listCells","type":"code","valueKind":"json","storage":"native","title":"Cells","surface":"action","language":"json","condition":{"field":"operation","value":"update_list_items"},"required":true},{"id":"listSchema","type":"code","valueKind":"json","storage":"native","title":"Column Schema","surface":"action","language":"json","condition":{"field":"operation","value":"create_list"}},{"id":"listDescription","type":"long-input","valueKind":"string","storage":"native","title":"Description","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":12}}},{"id":"listUpdateTodoMode","type":"dropdown","valueKind":"string","storage":"native","title":"Task Tracking Fields","mode":"advanced","surface":"action","valueDefault":{"constant":"unchanged"},"condition":{"field":"operation","value":"rename_list"},"options":[{"id":"unchanged"},{"id":"true"},{"id":"false"}]},{"id":"listTodoMode","type":"switch","valueKind":"boolean","storage":"native","title":"Task Tracking Fields","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_list"}},{"id":"listParentItemId","type":"short-input","valueKind":"string","storage":"native","title":"Parent Row ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_list_item"}},{"id":"listDuplicatedItemId","type":"short-input","valueKind":"string","storage":"native","title":"Duplicate Row ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_list_item"}},{"id":"listLimit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_items"}},{"id":"listCursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_items"}},{"id":"listArchived","type":"switch","valueKind":"boolean","storage":"native","title":"Archived Rows","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_items"}},{"id":"listIncludeSchema","type":"switch","valueKind":"boolean","storage":"native","title":"Include List Schema","mode":"advanced","surface":"action","defaultValue":true,"condition":{"field":"operation","value":"list_items"}},{"id":"apiBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Slack Bot","mode":"basic","canonicalParamId":"apiBotCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":13}},"required":true},{"id":"manualApiBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Slack Credential ID","mode":"advanced","canonicalParamId":"apiBotCredentialId","surface":"action","condition":{"field":"operation","value":{"list":13}},"required":true},{"id":"apiOAuthCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Slack Account or Bot","mode":"basic","canonicalParamId":"apiOAuthCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":14}},"required":true},{"id":"manualApiOAuthCredential","type":"short-input","valueKind":"string","storage":"native","title":"Slack Credential ID","mode":"advanced","canonicalParamId":"apiOAuthCredentialId","surface":"action","condition":{"field":"operation","value":{"list":14}},"required":true},{"id":"slack_revoke_list_access_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"revoke_list_access"},"required":true},{"id":"slack_revoke_list_access_user_ids","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_list_access"},"required":false},{"id":"slack_revoke_list_access_channel_ids","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_list_access"},"required":false},{"id":"slack_start_list_export_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":true},{"id":"slack_start_list_export_format","type":"dropdown","valueKind":"string","storage":"native","title":"Export Format","surface":"action","valueDefault":{"constant":"csv"},"condition":{"field":"operation","value":"start_list_export"},"required":false,"options":[{"id":"csv"},{"id":"json"}]},{"id":"slack_start_list_export_include_threads","type":"switch","valueKind":"boolean","storage":"native","title":"Include Threads","mode":"advanced","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":false},{"id":"slack_start_list_export_include_attachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","mode":"advanced","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":false},{"id":"slack_start_list_export_include_archived","type":"switch","valueKind":"boolean","storage":"native","title":"Include Archived Rows","mode":"advanced","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":false},{"id":"slack_get_list_export_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":true},{"id":"slack_get_list_export_job_id","type":"short-input","valueKind":"string","storage":"native","title":"Export Job ID","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":true},{"id":"slack_get_list_export_format","type":"dropdown","valueKind":"string","storage":"native","title":"Export Format","surface":"action","valueDefault":{"constant":"csv"},"condition":{"field":"operation","value":"get_list_export"},"required":false,"options":[{"id":"csv"},{"id":"json"}]},{"id":"slack_get_list_export_include_threads","type":"switch","valueKind":"boolean","storage":"native","title":"Include Threads","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":false},{"id":"slack_get_list_export_include_attachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":false},{"id":"slack_delete_list_items_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"delete_list_items"},"required":true},{"id":"slack_delete_list_items_ids","type":"code","valueKind":"json","storage":"native","title":"Row IDs","surface":"action","language":"json","condition":{"field":"operation","value":"delete_list_items"},"required":true},{"id":"slack_share_canvas_canvas_id","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","condition":{"field":"operation","value":"share_canvas"},"required":true},{"id":"slack_share_canvas_access_level","type":"dropdown","valueKind":"string","storage":"native","title":"Access Level","surface":"action","dependsOn":{"all":["slack_share_canvas_channel_ids"],"any":[]},"valueDefault":{"constant":"read"},"condition":{"field":"operation","value":"share_canvas"},"required":true,"options":{"opaque":true}},{"id":"slack_share_canvas_user_ids","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_canvas"},"required":false},{"id":"slack_share_canvas_channel_ids","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_canvas"},"required":false},{"id":"slack_revoke_canvas_access_canvas_id","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","condition":{"field":"operation","value":"revoke_canvas_access"},"required":true},{"id":"slack_revoke_canvas_access_user_ids","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_canvas_access"},"required":false},{"id":"slack_revoke_canvas_access_channel_ids","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_canvas_access"},"required":false},{"id":"slack_join_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"join_conversation"},"required":true},{"id":"slack_leave_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"leave_conversation"},"required":true},{"id":"slack_kick_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"kick_conversation"},"required":true},{"id":"slack_kick_conversation_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","surface":"action","condition":{"field":"operation","value":"kick_conversation"},"required":true},{"id":"slack_unarchive_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"unarchive_conversation"},"required":true},{"id":"slack_close_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"close_conversation"},"required":true},{"id":"slack_mark_conversation_read_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"mark_conversation_read"},"required":true},{"id":"slack_mark_conversation_read_ts","type":"short-input","valueKind":"string","storage":"native","title":"Read Through Timestamp","surface":"action","condition":{"field":"operation","value":"mark_conversation_read"},"required":true},{"id":"slack_open_conversation_users","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_open_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Conversation ID","surface":"action","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_open_conversation_prevent_creation","type":"switch","valueKind":"boolean","storage":"native","title":"Only Resume Existing Conversation","mode":"advanced","surface":"action","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_open_conversation_return_im","type":"switch","valueKind":"boolean","storage":"native","title":"Include Conversation Details","mode":"advanced","surface":"action","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_lookup_user_by_email_email","type":"short-input","valueKind":"string","storage":"native","title":"Email","surface":"action","condition":{"field":"operation","value":"lookup_user_by_email"},"required":true},{"id":"slack_list_user_conversations_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_types","type":"short-input","valueKind":"string","storage":"native","title":"Conversation Types","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_exclude_archived","type":"switch","valueKind":"boolean","storage":"native","title":"Exclude Archived","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_exclude_muted","type":"switch","valueKind":"boolean","storage":"native","title":"Exclude Muted","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_limit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_get_user_profile_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_user_profile"},"required":false},{"id":"slack_get_user_profile_include_labels","type":"switch","valueKind":"boolean","storage":"native","title":"Include Custom Field Labels","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_user_profile"},"required":false},{"id":"slack_set_user_presence_presence","type":"dropdown","valueKind":"string","storage":"native","title":"Presence","surface":"action","valueDefault":{"constant":"auto"},"condition":{"field":"operation","value":"set_user_presence"},"required":true,"options":[{"id":"auto"},{"id":"away"}]},{"id":"slack_get_file_info_file","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","condition":{"field":"operation","value":"get_file_info"},"required":true},{"id":"slack_get_file_info_cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_file_info"},"required":false},{"id":"slack_get_file_info_limit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_file_info"},"required":false},{"id":"slack_list_files_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_types","type":"short-input","valueKind":"string","storage":"native","title":"File Types","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_ts_from","type":"short-input","valueKind":"string","storage":"native","title":"From Timestamp","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_ts_to","type":"short-input","valueKind":"string","storage":"native","title":"To Timestamp","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_page","type":"short-input","valueKind":"string","storage":"native","title":"Page","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_count","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_show_files_hidden_by_limit","type":"switch","valueKind":"boolean","storage":"native","title":"Include Files Hidden by Plan Limit","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_delete_file_file","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","condition":{"field":"operation","value":"delete_file"},"required":true},{"id":"slack_get_reactions_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_timestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_file","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_file_comment","type":"short-input","valueKind":"string","storage":"native","title":"File Comment ID","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_full","type":"switch","valueKind":"boolean","storage":"native","title":"Include All Reacting Users","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_list_reactions_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_full","type":"switch","valueKind":"boolean","storage":"native","title":"Include All Reacting Users","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_limit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_pin_message_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"pin_message"},"required":true},{"id":"slack_pin_message_timestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"pin_message"},"required":true},{"id":"slack_unpin_message_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"unpin_message"},"required":true},{"id":"slack_unpin_message_timestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"unpin_message"},"required":true},{"id":"slack_list_pins_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"list_pins"},"required":true},{"id":"slack_add_bookmark_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":true},{"id":"slack_add_bookmark_title","type":"short-input","valueKind":"string","storage":"native","title":"Title","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":true},{"id":"slack_add_bookmark_link","type":"short-input","valueKind":"string","storage":"native","title":"Link URL","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":true},{"id":"slack_add_bookmark_emoji","type":"short-input","valueKind":"string","storage":"native","title":"Emoji","mode":"advanced","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":false},{"id":"slack_add_bookmark_parent_id","type":"short-input","valueKind":"string","storage":"native","title":"Parent Bookmark ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":false},{"id":"slack_edit_bookmark_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":true},{"id":"slack_edit_bookmark_bookmark_id","type":"short-input","valueKind":"string","storage":"native","title":"Bookmark ID","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":true},{"id":"slack_edit_bookmark_title","type":"short-input","valueKind":"string","storage":"native","title":"Title","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":false},{"id":"slack_edit_bookmark_link","type":"short-input","valueKind":"string","storage":"native","title":"Link URL","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":false},{"id":"slack_edit_bookmark_emoji","type":"short-input","valueKind":"string","storage":"native","title":"Emoji","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":false},{"id":"slack_list_bookmarks_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"list_bookmarks"},"required":true},{"id":"slack_remove_bookmark_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"remove_bookmark"},"required":true},{"id":"slack_remove_bookmark_bookmark_id","type":"short-input","valueKind":"string","storage":"native","title":"Bookmark ID","surface":"action","condition":{"field":"operation","value":"remove_bookmark"},"required":true},{"id":"slack_create_user_group_name","type":"short-input","valueKind":"string","storage":"native","title":"Name","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":true},{"id":"slack_create_user_group_handle","type":"short-input","valueKind":"string","storage":"native","title":"Mention Handle","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_description","type":"short-input","valueKind":"string","storage":"native","title":"Description","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_channels","type":"code","valueKind":"json","storage":"native","title":"Default Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_additional_channels","type":"code","valueKind":"json","storage":"native","title":"Additional Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_enable_section","type":"switch","valueKind":"boolean","storage":"native","title":"Show as Sidebar Section","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_update_user_group_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":true},{"id":"slack_update_user_group_name","type":"short-input","valueKind":"string","storage":"native","title":"Name","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_handle","type":"short-input","valueKind":"string","storage":"native","title":"Mention Handle","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_description","type":"short-input","valueKind":"string","storage":"native","title":"Description","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_channels","type":"code","valueKind":"json","storage":"native","title":"Default Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_additional_channels","type":"code","valueKind":"json","storage":"native","title":"Additional Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_enable_section","type":"switch","valueKind":"boolean","storage":"native","title":"Show as Sidebar Section","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_enable_user_group_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"enable_user_group"},"required":true},{"id":"slack_enable_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"enable_user_group"},"required":false},{"id":"slack_enable_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"enable_user_group"},"required":false},{"id":"slack_disable_user_group_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"disable_user_group"},"required":true},{"id":"slack_disable_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"disable_user_group"},"required":false},{"id":"slack_disable_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"disable_user_group"},"required":false},{"id":"slack_list_user_groups_include_disabled","type":"switch","valueKind":"boolean","storage":"native","title":"Include Disabled Groups","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_groups_include_users","type":"switch","valueKind":"boolean","storage":"native","title":"Include Members","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_groups_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_groups_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_group_members_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"list_user_group_members"},"required":true},{"id":"slack_list_user_group_members_include_disabled","type":"switch","valueKind":"boolean","storage":"native","title":"Include Disabled Users","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_group_members"},"required":false},{"id":"slack_list_user_group_members_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_group_members"},"required":false},{"id":"slack_update_user_group_members_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":true},{"id":"slack_update_user_group_members_users","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group_members"},"required":true},{"id":"slack_update_user_group_members_additional_channels","type":"code","valueKind":"json","storage":"native","title":"Additional Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_update_user_group_members_is_shared","type":"switch","valueKind":"boolean","storage":"native","title":"Shared Section","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_update_user_group_members_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_update_user_group_members_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_get_dnd_info_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_dnd_info"},"required":false},{"id":"slack_get_dnd_info_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_dnd_info"},"required":false},{"id":"slack_get_team_dnd_info_users","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"get_team_dnd_info"},"required":true},{"id":"slack_get_team_dnd_info_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_team_dnd_info"},"required":false},{"id":"slack_get_team_info_team","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_team_info"},"required":false},{"id":"slack_get_team_info_domain","type":"short-input","valueKind":"string","storage":"native","title":"Workspace Domain","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_team_info"},"required":false},{"id":"slack_get_team_profile_visibility","type":"dropdown","valueKind":"string","storage":"native","title":"Visibility","surface":"action","valueDefault":{"constant":"all"},"condition":{"field":"operation","value":"get_team_profile"},"required":false,"options":[{"id":"all"},{"id":"visible"},{"id":"hidden"}]},{"id":"slack_unfurl_links_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"unfurl_links"},"required":true},{"id":"slack_unfurl_links_ts","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"unfurl_links"},"required":true},{"id":"slack_unfurl_links_unfurls","type":"code","valueKind":"json","storage":"native","title":"Link Previews","surface":"action","language":"json","condition":{"field":"operation","value":"unfurl_links"},"required":true},{"trigger":"slack_oauth","start":0,"count":21}],"outputs":{"message":{"type":"json","description":"Complete message object with all properties: ts, text, user, channel, reactions, threads, files, attachments, blocks, stars, pins, and edit history"},"ts":{"type":"string","description":"Message timestamp returned by Slack API"},"channel":{"type":"string","description":"Channel identifier where message was sent"},"fileCount":{"type":"number","description":"Number of files uploaded (when files are attached)"},"files":{"type":"file[]","description":"Files attached to the message"},"messageTs":{"type":"string","description":"Timestamp of the ephemeral message (cannot be used to update or delete)"},"canvas_id":{"type":"string","description":"Canvas identifier for created canvases"},"title":{"type":"string","description":"Canvas title"},"canvas":{"type":"json","description":"Canvas file metadata returned by Slack"},"canvases":{"type":"json","description":"Array of canvas file objects returned by Slack"},"paging":{"type":"json","description":"Pagination information for listed canvases"},"sections":{"type":"json","description":"Canvas section IDs returned by Slack section lookup"},"ok":{"type":"boolean","description":"Whether Slack completed the operation"},"status":{"type":"string","description":"List export job status"},"agentStatus":{"type":"string","description":"Agent session status recorded by Slack"},"messages":{"type":"json","description":"Conversation messages"},"parentMessage":{"type":"json","description":"The thread parent message with all properties"},"replies":{"type":"json","description":"Array of reply messages in the thread (excluding the parent)"},"replyCount":{"type":"number","description":"Number of replies returned in this response"},"hasMore":{"type":"boolean","description":"Whether more thread messages or provider pages remain beyond the fetched window"},"pages":{"type":"number","description":"Number of provider pages fetched during a paginated read"},"threadTs":{"type":"string","description":"Thread timestamp an assistant status/title/prompts op was set on"},"permalink":{"type":"string","description":"Permalink URL to the message"},"channels":{"type":"json","description":"One page of accessible public and private channel objects, including conversation type and membership fields."},"count":{"type":"number","description":"Total number of items returned (channels, members, or users)"},"nextCursor":{"type":"string","description":"Continuation cursor; empty or null when finished"},"members":{"type":"json","description":"Array of user IDs who are members of the channel"},"users":{"type":"json","description":"User IDs or a map of user IDs to Do Not Disturb state"},"user":{"type":"json","description":"Detailed user object with properties: id, name, real_name, display_name, first_name, last_name, title, is_bot, is_admin, deleted, timezone, avatars, status"},"file":{"type":"file","description":"Downloaded file stored in execution files"},"content":{"type":"string","description":"Success message for update operation"},"metadata":{"type":"json","description":"Updated message metadata (legacy, use message object instead)"},"channelInfo":{"type":"json","description":"Detailed channel object with properties: id, name, is_private, is_archived, is_member, num_members, topic, purpose, created, creator"},"presence":{"type":"string","description":"User presence status: \"active\" or \"away\""},"online":{"type":"boolean","description":"Whether user has an active client connection (only available when checking own presence)"},"autoAway":{"type":"boolean","description":"Whether user was automatically set to away (only available when checking own presence)"},"manualAway":{"type":"boolean","description":"Whether user manually set themselves as away (only available when checking own presence)"},"connectionCount":{"type":"number","description":"Total number of active connections (only available when checking own presence)"},"lastActivity":{"type":"number","description":"Unix timestamp of last detected activity (only available when checking own presence)"},"view":{"type":"json","description":"View object with properties: id, team_id, type, title, submit, close, blocks, private_metadata, callback_id, external_id, state, hash, clear_on_close, notify_on_close, root_view_id, previous_view_id, app_id, bot_id"},"errors":{"type":"json","description":"Array of per-user error objects when force is true and some invitations failed (user, ok, error)"},"scheduledMessageId":{"type":"string","description":"Identifier of the scheduled message (used to delete it before it posts)"},"postAt":{"type":"number","description":"Unix timestamp when a scheduled message will post"},"scheduledMessages":{"type":"json","description":"Array of pending scheduled message objects with properties: id, channel_id, post_at, date_created, text"},"purpose":{"type":"string","description":"The purpose/description that was set on the channel"},"event_type":{"type":"string","description":"Type of Slack event that triggered the workflow"},"subtype":{"type":"string","description":"Message subtype (e.g., channel_join, channel_leave, bot_message). Null for regular user messages"},"channel_name":{"type":"string","description":"Human-readable channel name"},"channel_type":{"type":"string","description":"Type of channel (e.g., channel, group, im, mpim)"},"user_name":{"type":"string","description":"Username who triggered the event"},"bot_id":{"type":"string","description":"Bot ID if the message was sent by a bot. Null for human users"},"timestamp":{"type":"string","description":"Message timestamp from the triggering event"},"thread_ts":{"type":"string","description":"Parent thread timestamp (if message is in a thread)"},"team_id":{"type":"string","description":"Slack workspace/team ID"},"event_id":{"type":"string","description":"Unique event identifier for the trigger"},"profile":{"type":"json","description":"User profile or workspace custom profile fields"},"usergroups":{"type":"json","description":"User groups"},"usergroup":{"type":"json","description":"Created or updated user group"},"bookmarks":{"type":"json","description":"Channel bookmarks"},"bookmark":{"type":"json","description":"Created or edited bookmark"},"emoji":{"type":"json","description":"Custom emoji names mapped to image URLs or aliases"},"team":{"type":"json","description":"Workspace details"},"job_id":{"type":"string","description":"List export job ID"},"download_url":{"type":"string","description":"List export download URL when ready"},"response_metadata":{"type":"json","description":"Pagination metadata including next_cursor"},"dnd_enabled":{"type":"boolean","description":"Whether Do Not Disturb is enabled"},"next_dnd_start_ts":{"type":"number","description":"Next Do Not Disturb start timestamp"},"next_dnd_end_ts":{"type":"number","description":"Next Do Not Disturb end timestamp"},"snooze_enabled":{"type":"boolean","description":"Whether notification snooze is enabled"},"snooze_endtime":{"type":"number","description":"Snooze end timestamp"},"snooze_remaining":{"type":"number","description":"Seconds remaining in snooze"},"snooze_is_indefinite":{"type":"boolean","description":"Whether snooze is indefinite"},"type":{"type":"string","description":"Type of reacted-to item"},"comment":{"type":"json","description":"File comment with reactions"},"comments":{"type":"json","description":"File comments (id, comment, user, created, timestamp)"},"fileMetadata":{"type":"json","description":"Slack file metadata (id, name, title, mimetype, permalink)"},"conversation":{"type":"json","description":"Opened or joined conversation details (id, name, is_im, is_mpim)"},"listId":{"type":"string","description":"Created List ID"},"schema":{"type":"json","description":"Created column schema (id, key, name, type, options); null when Slack omits it"},"list":{"type":"json","description":"List metadata (id, title, schema); null when not included"},"items":{"type":"json","description":"List rows, pinned items, or reacted-to items, depending on the operation"},"item":{"type":"json","description":"One row (id, list_id, fields, timestamps, parent_record_id)"}}},"start_trigger":{"type":"start_trigger","name":"Start","category":"triggers","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":false,"errorPort":false,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["chat","manual","api"]},"dynamicOutputs":{"source":"inputFormat","param":"inputFormat"},"subBlocks":[{"id":"inputFormat","type":"input-format","valueKind":"array","storage":"native","structured":"inputFormat","title":"Inputs"},{"id":"runMetadata","type":"switch","valueKind":"boolean","storage":"native","title":"Add run metadata","mode":"advanced","defaultValue":false}],"outputs":{}},"table_v2":{"type":"table_v2","name":"Table","category":"blocks","tools":{"access":["table_insert_row","table_batch_insert_rows","table_upsert_row","table_update_row","table_update_rows_by_filter","table_delete_row","table_delete_rows_by_filter","table_query_rows_v2","table_get_row","table_get_schema"],"selector":"operation"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"triggers":{"enabled":true,"available":["table_new_row"]},"subBlocks":[{"id":"operation","type":"dropdown","valueKind":"string","storage":"native","title":"Operation","surface":"action","valueDefault":{"constant":"query_rows"},"options":[{"id":"query_rows","label":"Query Rows"},{"id":"insert_row","label":"Insert Row"},{"id":"upsert_row","label":"Upsert Row"},{"id":"batch_insert_rows","label":"Batch Insert Rows"},{"id":"update_rows_by_filter","label":"Update Rows by Filter"},{"id":"delete_rows_by_filter","label":"Delete Rows by Filter"},{"id":"update_row","label":"Update Row by ID"},{"id":"delete_row","label":"Delete Row by ID"},{"id":"get_row","label":"Get Row by ID"},{"id":"get_schema","label":"Get Schema"}]},{"id":"tableSelector","type":"table-selector","valueKind":"resource","storage":"native","resourceKind":"table","title":"Table","mode":"basic","canonicalParamId":"tableId","surface":"action","required":true},{"id":"manualTableId","type":"short-input","valueKind":"string","storage":"native","title":"Table ID","mode":"advanced","canonicalParamId":"tableId","surface":"action","required":true},{"id":"outputColumns","type":"dropdown","valueKind":"array","storage":"native","title":"Columns to Return","surface":"action","dependsOn":{"all":[],"any":["tableSelector","manualTableId"]},"multiple":true,"selectorKey":"table.outputColumns","condition":{"field":"operation","value":"query_rows"},"options":{"dynamic":true}},{"id":"rowId","type":"short-input","valueKind":"string","storage":"native","title":"Row ID","surface":"action","dependsOn":{"all":["tableId"],"any":[]},"condition":{"field":"operation","value":["get_row","update_row","delete_row"]},"required":true},{"id":"data","type":"code","valueKind":"json","storage":"native","title":"Row Data (JSON)","surface":"action","language":"json","condition":{"field":"operation","value":["insert_row","upsert_row","update_row","update_rows_by_filter"]},"required":true},{"id":"conflictColumnSelector","type":"column-selector","valueKind":"picked","storage":"native","title":"Conflict Column","mode":"basic","canonicalParamId":"conflictColumn","surface":"action","dependsOn":{"all":["tableSelector"],"any":[]},"selectorKey":"table.columns","condition":{"field":"operation","value":"upsert_row"},"options":{"dynamic":true}},{"id":"manualConflictColumn","type":"short-input","valueKind":"string","storage":"native","title":"Conflict Column","mode":"advanced","canonicalParamId":"conflictColumn","surface":"action","dependsOn":{"all":["tableId"],"any":[]},"condition":{"field":"operation","value":"upsert_row"}},{"id":"rows","type":"code","valueKind":"json","storage":"native","title":"Rows Data (Array of JSON)","surface":"action","language":"json","condition":{"field":"operation","value":"batch_insert_rows"},"required":true},{"id":"filterBuilder","type":"filter-builder","valueKind":"json","storage":"native","title":"Filter","mode":"basic","canonicalParamId":"filterInput","surface":"action","paramVisibility":"user-only","condition":{"field":"operation","value":{"list":15}}},{"id":"filter","type":"code","valueKind":"json","storage":"native","title":"Filter","mode":"advanced","canonicalParamId":"filterInput","surface":"action","language":"json","condition":{"field":"operation","value":{"list":15}}},{"id":"sortBuilder","type":"sort-builder","valueKind":"json","storage":"native","title":"Order","mode":"basic","canonicalParamId":"sortInput","surface":"action","paramVisibility":"user-only","condition":{"field":"operation","value":"query_rows"}},{"id":"order","type":"short-input","valueKind":"string","storage":"native","title":"Order","mode":"advanced","canonicalParamId":"sortInput","surface":"action","condition":{"field":"operation","value":"query_rows"}},{"id":"limit","type":"short-input","valueKind":"string","storage":"native","title":"Limit","surface":"action","condition":{"field":"operation","value":{"list":15}}},{"id":"cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","surface":"action","condition":{"field":"operation","value":"query_rows"}},{"trigger":"table_new_row","start":0,"count":6}],"outputs":{"success":{"type":"boolean","description":"Operation success status"},"row":{"type":"json","description":"Single row data","condition":{"field":"operation","value":["get_row","insert_row","upsert_row","update_row"]}},"operation":{"type":"string","description":"Operation performed (insert or update)","condition":{"field":"operation","value":"upsert_row"}},"rows":{"type":"array","description":"Array of rows","condition":{"field":"operation","value":["query_rows","batch_insert_rows"]}},"rowCount":{"type":"number","description":"Rows returned (query) or total rows in the table (get schema)","condition":{"field":"operation","value":["query_rows","get_schema"]}},"totalCount":{"type":"number","description":"Total rows matching the predicate (first page only)","condition":{"field":"operation","value":"query_rows"}},"nextCursor":{"type":"string","description":"Cursor to fetch the next page, or null on the last page","condition":{"field":"operation","value":"query_rows"}},"insertedCount":{"type":"number","description":"Number of rows inserted","condition":{"field":"operation","value":"batch_insert_rows"}},"updatedCount":{"type":"number","description":"Number of rows updated","condition":{"field":"operation","value":"update_rows_by_filter"}},"updatedRowIds":{"type":"array","description":"IDs of updated rows","condition":{"field":"operation","value":"update_rows_by_filter"}},"deletedCount":{"type":"number","description":"Number of rows deleted","condition":{"field":"operation","value":["delete_row","delete_rows_by_filter"]}},"deletedRowIds":{"type":"array","description":"IDs of deleted rows","condition":{"field":"operation","value":"delete_rows_by_filter"}},"name":{"type":"string","description":"Table name","condition":{"field":"operation","value":"get_schema"}},"columns":{"type":"array","description":"Column definitions (each includes its stable id)","condition":{"field":"operation","value":"get_schema"}},"columnCount":{"type":"number","description":"Number of columns","condition":{"field":"operation","value":"get_schema"}},"maxRows":{"type":"number","description":"Max rows per table for the workspace's plan","condition":{"field":"operation","value":"get_schema"}},"message":{"type":"string","description":"Operation status message"}}},"variables":{"type":"variables","name":"Variables","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"variables","type":"variables-input","valueKind":"array","storage":"native","structured":"variables","title":"Variable Assignments","required":false}],"outputs":{}}},"triggers":{"generic_webhook":{"id":"generic_webhook","provider":"generic","name":"Webhook Trigger","webhook":true,"subBlocks":[{"id":"webhookUrlDisplay","type":"short-input","valueKind":"none","storage":"native","title":"Webhook URL","mode":"trigger","readOnly":true},{"id":"requireAuth","type":"switch","valueKind":"boolean","storage":"native","title":"Require Authentication","mode":"trigger","defaultValue":true},{"id":"token","type":"short-input","valueKind":"string","storage":"native","title":"Authentication Token","mode":"trigger","valueDefault":{"computed":true},"password":true,"required":false},{"id":"secretHeaderName","type":"short-input","valueKind":"string","storage":"native","title":"Secret Header Name (Optional)","mode":"trigger","required":false},{"id":"acceptOtherMethods","type":"switch","valueKind":"boolean","storage":"native","title":"Accept Other HTTP Methods","mode":"trigger","defaultValue":false},{"id":"exposeRequestHeaders","type":"switch","valueKind":"boolean","storage":"native","title":"Expose Request Headers","mode":"trigger","defaultValue":false},{"id":"idempotencyField","type":"short-input","valueKind":"string","storage":"native","title":"Deduplication Field (Optional)","mode":"trigger","required":false},{"id":"responseMode","type":"dropdown","valueKind":"string","storage":"native","title":"Acknowledgement","mode":"trigger","defaultValue":"default","options":[{"id":"default","label":"Default"},{"id":"custom","label":"Custom"}]},{"id":"verifyTestEvents","type":"switch","valueKind":"boolean","storage":"native","title":"Verify Test Events","mode":"trigger","defaultValue":false},{"id":"responseStatusCode","type":"short-input","valueKind":"string","storage":"native","title":"Response Status Code","mode":"trigger","condition":{"field":"responseMode","value":"custom"},"required":false},{"id":"responseBody","type":"code","valueKind":"json","storage":"native","title":"Response Body","mode":"trigger","language":"json","condition":{"field":"responseMode","value":"custom"},"required":false},{"id":"inputFormat","type":"input-format","valueKind":"array","storage":"native","structured":"inputFormat","title":"Input Format","mode":"trigger"},{"shared":0},{"id":"samplePayload_generic_webhook","type":"code","valueKind":"none","storage":"native","title":"Event Payload Example","mode":"trigger","readOnly":true,"language":"json","condition":{"field":"selectedTriggerId","value":"generic_webhook"}}],"outputs":{}},"gmail_poller":{"id":"gmail_poller","provider":"gmail","name":"Gmail Email Trigger","polling":true,"subBlocks":[{"id":"triggerCredentials","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Credentials","mode":"trigger","canonicalParamId":"oauthCredential","serviceId":"gmail","required":true},{"id":"labelIds","type":"dropdown","valueKind":"array","storage":"native","title":"Gmail Labels to Monitor","mode":"trigger","dependsOn":{"all":["triggerCredentials"],"any":[]},"multiple":true,"selectorKey":"gmail.labels","required":false,"options":{"dynamic":true}},{"id":"labelFilterBehavior","type":"dropdown","valueKind":"string","storage":"native","title":"Label Filter Behavior","mode":"trigger","defaultValue":"INCLUDE","required":true,"options":[{"id":"INCLUDE"},{"id":"EXCLUDE"}]},{"id":"searchQuery","type":"short-input","valueKind":"string","storage":"native","title":"Gmail Search Query","mode":"trigger","required":false},{"id":"markAsRead","type":"switch","valueKind":"boolean","storage":"native","title":"Mark as Read","mode":"trigger","defaultValue":false,"required":false},{"id":"includeAttachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","mode":"trigger","defaultValue":false,"required":false},{"shared":0},{"id":"samplePayload_gmail_poller","type":"code","valueKind":"none","storage":"native","title":"Event Payload Example","mode":"trigger","readOnly":true,"language":"json","condition":{"field":"selectedTriggerId","value":"gmail_poller"}}],"outputs":{"email":{"type":"json","properties":{"id":{"type":"string","description":"Gmail message ID"},"threadId":{"type":"string","description":"Gmail thread ID"},"subject":{"type":"string","description":"Email subject line"},"from":{"type":"string","description":"Sender email address"},"to":{"type":"string","description":"Recipient email address"},"cc":{"type":"string","description":"CC recipients"},"bcc":{"type":"string","description":"BCC recipients (only present on messages you sent)"},"replyTo":{"type":"string","description":"Reply-To header"},"rfcMessageId":{"type":"string","description":"RFC Message-ID header (not the Gmail message ID)"},"inReplyTo":{"type":"string","description":"In-Reply-To header (RFC Message-ID of the parent message)"},"references":{"type":"string","description":"References header (RFC Message-IDs in the thread)"},"snippet":{"type":"string","description":"Short excerpt of the message text"},"date":{"type":"string","description":"Email date in ISO format"},"bodyText":{"type":"string","description":"Plain text email body"},"bodyHtml":{"type":"string","description":"HTML email body"},"labels":{"type":"array","description":"Email labels array"},"hasAttachments":{"type":"boolean","description":"Whether email has attachments"},"attachments":{"type":"file[]","description":"Array of email attachments as files (if includeAttachments is enabled)"}}},"timestamp":{"type":"string","description":"Event timestamp"}}},"slack_oauth":{"id":"slack_oauth","provider":"slack_app","name":"Slack","webhook":true,"subBlocks":[{"id":"eventType","type":"dropdown","valueKind":"string","storage":"native","title":"Event","mode":"trigger","required":true,"options":[{"id":"message","label":"Message"},{"id":"app_mention","label":"App mentioned"},{"id":"reaction_added","label":"Reaction added"},{"id":"reaction_removed","label":"Reaction removed"},{"id":"message_edited","label":"Message edited"},{"id":"message_deleted","label":"Message deleted"},{"id":"file_shared","label":"File shared"},{"id":"member_joined_channel","label":"Member joined channel"},{"id":"member_left_channel","label":"Member left channel"},{"id":"channel_created","label":"Channel created"},{"id":"channel_archive","label":"Channel archived"},{"id":"channel_rename","label":"Channel renamed"},{"id":"pin_added","label":"Pin added"},{"id":"pin_removed","label":"Pin removed"},{"id":"team_join","label":"Member joined workspace"},{"id":"app_home_opened","label":"App home opened"},{"id":"agent_session_stopped","label":"Agent session stopped"},{"id":"agent_session_title_changed","label":"Agent session title changed"},{"id":"app_context_changed","label":"Agent context changed"},{"id":"assistant_thread_started","label":"Assistant opened"},{"id":"assistant_thread_context_changed","label":"Assistant context changed"},{"id":"block_actions","label":"Button / select clicked"},{"id":"view_submission","label":"Modal submitted"},{"id":"slash_command","label":"Slash command"}]},{"id":"customBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Bot","mode":"trigger","canonicalParamId":"botCredential","serviceId":"slack","required":true},{"id":"manualBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Bot Credential ID","mode":"trigger-advanced","canonicalParamId":"botCredential","required":true},{"id":"source","type":"dropdown","valueKind":"array","storage":"native","title":"Source","mode":"trigger","multiple":true,"condition":{"field":"eventType","value":["message","message_edited","message_deleted"]},"required":false,"options":[{"id":"im","label":"Direct message"},{"id":"channel","label":"Public channel"},{"id":"group","label":"Private channel"}]},{"id":"channelFilter","type":"channel-selector","valueKind":"picked","storage":"native","title":"Channels","mode":"trigger","canonicalParamId":"channelFilter","dependsOn":{"all":["customBotCredential"],"any":[]},"multiple":true,"selectorKey":"slack.channels","serviceId":"slack","condition":{"field":"eventType","value":{"list":16}},"required":false,"options":{"dynamic":true}},{"id":"manualChannelFilter","type":"short-input","valueKind":"string","storage":"native","title":"Channel IDs","mode":"trigger-advanced","canonicalParamId":"channelFilter","condition":{"field":"eventType","value":{"list":16}},"required":false},{"id":"threads","type":"dropdown","valueKind":"string","storage":"native","title":"Threads","mode":"trigger","valueDefault":{"constant":"include"},"condition":{"field":"eventType","value":{"list":17}},"required":false,"options":[{"id":"include","label":"Messages and replies"},{"id":"exclude","label":"Messages only (no replies)"},{"id":"only","label":"Replies only"}]},{"id":"streamResponse","type":"switch","valueKind":"boolean","storage":"native","title":"Enable agent session","mode":"trigger","defaultValue":false,"condition":{"field":"eventType","value":{"list":17}},"required":false},{"id":"streamOutputs","type":"workflow-output-selector","valueKind":"none","storage":"native","title":"Outputs to stream","mode":"trigger","condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}}},{"id":"streamTaskTitle","type":"short-input","valueKind":"string","storage":"native","title":"Response status label","mode":"trigger","condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false},{"id":"streamTaskDisplayMode","type":"dropdown","valueKind":"string","storage":"native","title":"Task display","mode":"trigger","valueDefault":{"constant":"timeline"},"condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false,"options":[{"id":"timeline","label":"Timeline"},{"id":"plan","label":"Plan"}]},{"id":"streamIncludeThinking","type":"switch","valueKind":"boolean","storage":"native","title":"Include thinking updates","mode":"trigger","defaultValue":false,"condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false},{"id":"streamIncludeToolCalls","type":"switch","valueKind":"boolean","storage":"native","title":"Include tool calls","mode":"trigger","defaultValue":true,"condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false},{"id":"emoji","type":"short-input","valueKind":"string","storage":"native","title":"Emoji","mode":"trigger","condition":{"field":"eventType","value":["reaction_added","reaction_removed"]},"required":false},{"id":"nameContains","type":"short-input","valueKind":"string","storage":"native","title":"Name contains","mode":"trigger","condition":{"field":"eventType","value":["channel_created"]},"required":false},{"id":"interactionFilter","type":"short-input","valueKind":"string","storage":"native","title":"Action / Callback ID","mode":"trigger","condition":{"field":"eventType","value":["block_actions","view_submission"]},"required":false},{"id":"commandFilter","type":"short-input","valueKind":"string","storage":"native","title":"Command","mode":"trigger","condition":{"field":"eventType","value":["slash_command"]},"required":false},{"id":"filterBotMessages","type":"switch","valueKind":"boolean","storage":"native","title":"Ignore bot messages","mode":"trigger","defaultValue":true,"condition":{"field":"eventType","value":{"list":17}},"required":false},{"id":"includeOwnMessages","type":"switch","valueKind":"boolean","storage":"native","title":"Include own bot messages","mode":"trigger-advanced","defaultValue":false,"condition":{"field":"eventType","value":["message","app_mention","reaction_added","reaction_removed"]},"required":false},{"id":"includeFiles","type":"switch","valueKind":"boolean","storage":"native","title":"Include file attachments","mode":"trigger","defaultValue":false,"condition":{"field":"eventType","value":"message"},"required":false},{"id":"samplePayload_slack_oauth","type":"code","valueKind":"none","storage":"native","title":"Event Payload Example","mode":"trigger","readOnly":true,"language":"json","condition":{"field":"selectedTriggerId","value":"slack_oauth"}}],"outputs":{"event":{"type":"json","description":"Slack event data","properties":{"event_type":{"type":"string","description":"Type of Slack payload: an Events API event (e.g., app_mention, message), an interactivity type (e.g., block_actions), or \"slash_command\" for slash commands"},"subtype":{"type":"string","description":"Message subtype (e.g., channel_join, channel_leave, bot_message, file_share). Null for regular user messages"},"channel":{"type":"string","description":"Slack channel ID where the event occurred"},"channel_name":{"type":"string","description":"Human-readable channel name"},"channel_type":{"type":"string","description":"Type of channel (e.g., channel, group, im, mpim). Useful for distinguishing DMs from public channels"},"user":{"type":"string","description":"User ID who triggered the event"},"user_name":{"type":"string","description":"Username who triggered the event"},"bot_id":{"type":"string","description":"Bot ID if the message was sent by a bot. Null for human users"},"text":{"type":"string","description":"Message text content. For slash commands, the text after the command. For interactivity, the source message text (falls back to the triggering action value)"},"timestamp":{"type":"string","description":"Message timestamp from the triggering event"},"thread_ts":{"type":"string","description":"Parent thread timestamp (if message is in a thread)"},"streaming_message_ts":{"type":"array","description":"Message timestamps streamed during a stopped agent session","items":{"type":"string","description":"Streaming message timestamp"}},"title":{"type":"string","description":"Current agent session title"},"previous_title":{"type":"string","description":"Previous agent session title"},"tab":{"type":"string","description":"App Home tab that was opened, including messages for Agent View"},"context":{"type":"json","description":"Current Agent View context. Normalized from context on app_context_changed/app_home_opened or app_context on message.im"},"team_id":{"type":"string","description":"Slack workspace/team ID"},"user_team_id":{"type":"string","description":"Slack workspace/team ID of the user who triggered the event. Used for Slack Connect response streaming."},"enterprise_id":{"type":"string","description":"Slack Enterprise Grid organization ID"},"event_id":{"type":"string","description":"Unique event identifier"},"reaction":{"type":"string","description":"Emoji reaction name (e.g., thumbsup). Present for reaction_added/reaction_removed events"},"item_user":{"type":"string","description":"User ID of the original message author. Present for reaction_added/reaction_removed events"},"command":{"type":"string","description":"Slash command name including the leading slash (e.g., /deploy). Present for slash commands"},"action_id":{"type":"string","description":"action_id of the first interactive element triggered. Present for block_actions (button/select clicks)"},"action_value":{"type":"string","description":"Value carried by the first interactive element (button value, selected option, date, etc.). Present for block_actions"},"actions":{"type":"json","description":"Full array of interactive actions from the payload, preserving every element and its value. Present for block_actions"},"response_url":{"type":"string","description":"Temporary URL to post a response back to the originating message or command. Present for interactivity and slash commands"},"trigger_id":{"type":"string","description":"Short-lived trigger ID used to open a modal in response. Present for interactivity and slash commands"},"callback_id":{"type":"string","description":"Callback ID of the shortcut or view. Present for shortcuts and modal submissions"},"api_app_id":{"type":"string","description":"Slack app ID. Present for interactivity and slash commands"},"app_id":{"type":"string","description":"App ID of the app that produced the event (e.g. the bot that posted a message). Used to identify the app's own output"},"message_ts":{"type":"string","description":"Timestamp of the message the interaction originated from. Present for block_actions"},"view":{"type":"json","description":"Full Slack view object for modal interactions: state.values (submitted input values), private_metadata, id, callback_id, and hash. Present for view_submission/view_closed; null otherwise"},"message":{"type":"json","description":"Full source message object the interaction came from, including its blocks and text. Present for block_actions on a message; null otherwise"},"state":{"type":"json","description":"Current values of all stateful elements in the surface (state.values) at the time of a block action — e.g. inputs read on a button click. Present for block_actions; null otherwise"},"hasFiles":{"type":"boolean","description":"Whether the message has file attachments"},"files":{"type":"file[]","description":"File attachments downloaded from the message (if includeFiles is enabled and bot token is provided)"}}}}},"table_new_row":{"id":"table_new_row","provider":"table","name":"Table Trigger","subBlocks":[{"id":"tableSelector","type":"table-selector","valueKind":"resource","storage":"native","resourceKind":"table","title":"Table","mode":"trigger","canonicalParamId":"tableId","required":true},{"id":"manualTableId","type":"short-input","valueKind":"string","storage":"native","title":"Table ID","mode":"trigger-advanced","canonicalParamId":"tableId","required":true},{"id":"eventType","type":"dropdown","valueKind":"string","storage":"native","title":"Event","mode":"trigger","defaultValue":"insert","required":true,"options":[{"id":"insert","label":"Row Inserted"},{"id":"update","label":"Row Updated"},{"id":"delete","label":"Row Deleted"}]},{"id":"watchColumns","type":"dropdown","valueKind":"array","storage":"native","title":"Watch Columns","mode":"trigger","dependsOn":{"all":[],"any":["tableSelector","manualTableId"]},"multiple":true,"selectorKey":"table.columns","condition":{"field":"eventType","value":"update"},"required":false,"options":{"dynamic":true}},{"id":"includeHeaders","type":"switch","valueKind":"boolean","storage":"native","title":"Map Row Values to Headers","mode":"trigger","defaultValue":true,"required":false},{"shared":0}],"outputs":{"row":{"type":"json","description":"Row data mapped to column names (when header mapping is enabled)"},"rawRow":{"type":"json","description":"Raw row data object"},"previousRow":{"type":"json","description":"Previous row data before an update or deletion (null for inserts)"},"changedColumns":{"type":"json","description":"List of column names that changed (empty for inserts and deletes)"},"rowId":{"type":"string","description":"The unique row ID"},"headers":{"type":"json","description":"Column names from the table schema"},"tableId":{"type":"string","description":"The table ID"},"tableName":{"type":"string","description":"The table name"},"timestamp":{"type":"string","description":"Event timestamp in ISO format"}}}},"subBlocks":[{"id":"triggerInstructions","type":"text","valueKind":"none","storage":"native","title":"Setup Instructions","mode":"trigger"}],"lists":[["jev-latest","jev-1.13.0","jev-preview"],["deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025","jev-latest","jev-1.13.0","jev-preview"],["jev-latest","jev-1.13.0","jev-preview","deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025"],["conversation","sliding_window","sliding_window_tokens"],["send_gmail","draft_gmail","edit_draft_gmail"],["add_label_gmail","remove_label_gmail"],["update_label_gmail","delete_label_gmail"],["create_label_gmail","update_label_gmail"],["list_canvases","list_scheduled_messages","set_agent_suggested_prompts","set_agent_session_status","rename_agent_session","create_list","rename_list","share_list","list_items","get_list_item","create_list_item","update_list_items","delete_list_item"],["set_agent_suggested_prompts","set_agent_session_status","rename_agent_session"],["set_agent_session_status","rename_agent_session"],["create_list","rename_list","share_list","list_items","get_list_item","create_list_item","update_list_items","delete_list_item"],["create_list","rename_list"],["revoke_list_access","start_list_export","get_list_export","delete_list_items","join_conversation","lookup_user_by_email","get_user_profile","set_user_presence","pin_message","unpin_message","list_pins","add_bookmark","edit_bookmark","list_bookmarks","remove_bookmark","create_user_group","update_user_group","enable_user_group","disable_user_group","list_user_groups","list_user_group_members","update_user_group_members","get_dnd_info","get_team_dnd_info","list_emoji","get_team_info","get_team_profile","unfurl_links"],["share_canvas","revoke_canvas_access","leave_conversation","kick_conversation","unarchive_conversation","close_conversation","mark_conversation_read","open_conversation","list_user_conversations","get_file_info","list_files","delete_file","get_reactions","list_reactions"],["query_rows","update_rows_by_filter","delete_rows_by_filter"],["message","app_mention","reaction_added","reaction_removed","message_edited","message_deleted","file_shared","member_joined_channel","member_left_channel","channel_archive","channel_rename","pin_added","pin_removed"],["message","app_mention"]],"hash":"bb727c21e985e65d9db2621b30e34e8a734e2662cc6085f5c70b2cc2370cee40"} From de6ca733bbd959d6071ff0094d6c7d319f1300ea Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 23:17:17 -0800 Subject: [PATCH 127/428] fix(workflows): make source get and the resource manifest unsafe for HEAD Both reads allocate resource keys on first reference, so a HEAD probe is authorized and answered without running them. --- .../[workflowId]/source/route.test.ts | 18 +++++++++++++++++- .../v2/workflows/[workflowId]/source/route.ts | 8 ++++++-- .../resource-manifest/route.test.ts | 18 +++++++++++++++++- .../[workspaceId]/resource-manifest/route.ts | 4 ++++ 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts index 2503a7b9742..fe01dd89c88 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts @@ -10,13 +10,14 @@ import { posthogServerMock, posthogServerMockFns } from '@sim/testing/mocks/post import { NextRequest } from 'next/server' import { beforeEach, describe, expect, it, vi } from 'vitest' -const mocks = vi.hoisted(() => ({ read: vi.fn(), apply: vi.fn() })) +const mocks = vi.hoisted(() => ({ read: vi.fn(), authorizeRead: vi.fn(), apply: vi.fn() })) vi.mock('@/lib/api/server/routes/v2-api-key-auth', () => v2ApiKeyAuthModuleMock) vi.mock('@/lib/core/rate-limiter', () => v2RateLimiterModuleMock) vi.mock('@/lib/workflows/application/get-workflow-source', () => ({ getWorkflowSource: { operation: { id: 'workflows.source.read' }, + authorize: mocks.authorizeRead, execute: mocks.read, }, })) @@ -84,6 +85,21 @@ describe('GET /api/v2/workflows/{workflowId}/source', () => { v2RouteMocks.preauthRate.mockResolvedValue(V2_PREAUTH_RATE_LIMIT_ALLOWED) v2RouteMocks.operationRate.mockResolvedValue(V2_OPERATION_RATE_LIMIT_ALLOWED) mocks.read.mockResolvedValue(source) + mocks.authorizeRead.mockResolvedValue(undefined) + }) + + it('answers HEAD after authorizing without reading, so a probe never allocates resource keys', async () => { + const response = await GET( + new NextRequest(`http://localhost:3000/api/v2/workflows/${WORKFLOW_ID}/source`, { + method: 'HEAD', + headers: { 'x-api-key': 'key' }, + }), + context + ) + + expect(response.status).toBe(200) + expect(mocks.authorizeRead).toHaveBeenCalledTimes(1) + expect(mocks.read).not.toHaveBeenCalled() }) it('passes annotateIds as a boolean and functionCode through, omitting absent flags', async () => { diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts index 4959b5e851a..110c5f220e8 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts @@ -15,12 +15,16 @@ export const revalidate = 0 /** * GET /api/v2/workflows/[workflowId]/source — the draft as TypeScript source with its identity - * lock and freshness fingerprint. Head-safe and unaudited, like `GET .../state`, which it - * projects. Answers 403 while the `workflow-code` flag is off. + * lock and freshness fingerprint. Unaudited, like `GET .../state`, which it projects. Answers 403 + * while the `workflow-code` flag is off. + * + * `headSafe: false` because the first read that references a resource with no key allocates one + * (`workspace_resource_binding`), so a `HEAD` probe must not run it. */ export const GET = defineV2JsonRoute({ contract: v2GetWorkflowSourceContract, auth: v2ApiKeyAuth, + headSafe: false, operation: workflowOperations.readSource, rateLimit: v2RateLimits.publicApi, errorPolicy: v2WorkflowErrorPolicies.concealWorkflowAuthorization, diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.test.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.test.ts index 6ee70c74d17..015b6258ab5 100644 --- a/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.test.ts +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.test.ts @@ -9,13 +9,14 @@ import { NextRequest } from 'next/server' import { beforeEach, describe, expect, it, vi } from 'vitest' import { OrchestrationError } from '@/lib/core/orchestration/types' -const mocks = vi.hoisted(() => ({ read: vi.fn() })) +const mocks = vi.hoisted(() => ({ read: vi.fn(), authorize: vi.fn() })) vi.mock('@/lib/api/server/routes/v2-api-key-auth', () => v2ApiKeyAuthModuleMock) vi.mock('@/lib/core/rate-limiter', () => v2RateLimiterModuleMock) vi.mock('@/lib/workflows/code/resource-manifest', () => ({ readResourceManifest: { operation: { id: 'workflows.code.resource_manifest.read' }, + authorize: mocks.authorize, execute: mocks.read, }, })) @@ -78,6 +79,21 @@ describe('GET /api/v2/workspaces/{workspaceId}/resource-manifest', () => { v2RouteMocks.preauthRate.mockResolvedValue(V2_PREAUTH_RATE_LIMIT_ALLOWED) v2RouteMocks.operationRate.mockResolvedValue(V2_OPERATION_RATE_LIMIT_ALLOWED) mocks.read.mockResolvedValue(manifest) + mocks.authorize.mockResolvedValue(undefined) + }) + + it('answers HEAD after authorizing without reading, so a probe never allocates resource keys', async () => { + const response = await GET( + new NextRequest(`http://localhost:3000/api/v2/workspaces/${WORKSPACE_ID}/resource-manifest`, { + method: 'HEAD', + headers: { 'x-api-key': 'key' }, + }), + context + ) + + expect(response.status).toBe(200) + expect(mocks.authorize).toHaveBeenCalledTimes(1) + expect(mocks.read).not.toHaveBeenCalled() }) it('returns the manifest the use case read, for the workspace in the path', async () => { diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.ts index 0a5179ba48e..b8f31e5d12f 100644 --- a/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.ts +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.ts @@ -11,10 +11,14 @@ export const revalidate = 0 * GET /api/v2/workspaces/{workspaceId}/resource-manifest — the tables, knowledge bases, credential * bindings, workflows and env names workflow source can name, by key. Answers 403 while the * `workflow-code` flag is off. + * + * `headSafe: false` because listing a resource that has no key yet allocates one + * (`workspace_resource_binding`), so a `HEAD` probe must not run it. */ export const GET = defineV2JsonRoute({ contract: v2GetResourceManifestContract, auth: v2ApiKeyAuth, + headSafe: false, operation: workflowCodeOperations.readResourceManifest, rateLimit: v2RateLimits.publicApi, errorPolicy: catalogErrorPolicy, From a46cbe04cad58ff8d3c3c3449def945f79a7efbd Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 23:19:54 -0800 Subject: [PATCH 128/428] fix(workflow-code): a block created from source keeps the values creation mints Materialize nulled every initBlock value the source did not state, so a generic webhook written from code had no auth token. A field whose value() thunk mints per creation now keeps what initBlock computed, as on the canvas; default-parity asserts the minted value is present for every type. --- .../lib/workflows/code/default-parity.test.ts | 17 +++++++++++++++-- packages/workflow-code/DESIGN.md | 3 +++ packages/workflow-code/src/catalog/defaults.ts | 16 ++++++++++++++-- packages/workflow-code/src/materialize/block.ts | 3 +++ 4 files changed, 35 insertions(+), 4 deletions(-) diff --git a/apps/sim/lib/workflows/code/default-parity.test.ts b/apps/sim/lib/workflows/code/default-parity.test.ts index ef4d5aa1b7d..b879888c50f 100644 --- a/apps/sim/lib/workflows/code/default-parity.test.ts +++ b/apps/sim/lib/workflows/code/default-parity.test.ts @@ -5,9 +5,11 @@ * this compares the block `MaterializeHooks.initBlock` creates with the block materialize writes * for `block(type, name, {})`. * - * Two values differ by design and are left out: + * Two values differ by design and are left out of the equality: * - a field whose `value()` thunk mints a fresh value per call (a webhook token): two canvas - * creations differ too, and source cannot name the value it will get; + * creations differ too, and source cannot name the value it will get. The block written from + * code must still get a minted value wherever canvas creation mints one (a code-created generic + * webhook needs its auth token), of the same type; * - condition and router rows: canvas creation mints placeholder rows with fresh ids, while source * `{}` is the never-persisted `rows: null` form (contract amendment 7), which canvas reads the * same way until the first edit. @@ -114,6 +116,17 @@ describe(`a code-created block matches a canvas-created one (${cases.length} cas const created = hooks.initBlock({ id: written.id, type, name: NAME, triggerMode }) const again = hooks.initBlock({ id: written.id, type, name: NAME, triggerMode }) const excluded = excludedIds(type, created, again) + for (const id of excluded) { + if (id === catalogBlock(catalog, type)?.graph.branches?.subBlockId) continue + const minted = created.subBlocks[id]?.value + const fromSource = written.subBlocks[id]?.value + const present = (value: unknown) => value !== null && value !== undefined + if (present(minted) !== present(fromSource) || typeof minted !== typeof fromSource) { + mismatches.push( + `${label}: ${id} minted ${typeof minted}, from source ${typeof fromSource}` + ) + } + } const fromCode = stored(written, excluded) const fromCanvas = stored(created, excluded) if (JSON.stringify(fromCode) !== JSON.stringify(fromCanvas)) { diff --git a/packages/workflow-code/DESIGN.md b/packages/workflow-code/DESIGN.md index 822cc4ef37b..eb0568c3725 100644 --- a/packages/workflow-code/DESIGN.md +++ b/packages/workflow-code/DESIGN.md @@ -309,6 +309,9 @@ instead of failing at run time. new block from `initBlock` and nulls only what the CWM leaves absent, so a code-created block with no params is stored exactly as a canvas-created one (`default-parity.test.ts`, every registry type and trigger mode; minted values and condition/router placeholder rows aside). + A field whose thunk mints a fresh value per creation (`mintsFreshValue`, such as the generic + webhook's auth token) keeps the value `initBlock` minted on a new block, as canvas creation + does; the parity test asserts such a value is present wherever canvas creation mints one. - **Materialize restores preserved state** (`materialize/preserve.ts`) for each matched block of the same type, before writing: when a pair's executable value is unchanged, prev's members and mode; when a plain id changed and prev showed the basic selector member of a `picked` pair, diff --git a/packages/workflow-code/src/catalog/defaults.ts b/packages/workflow-code/src/catalog/defaults.ts index eef4161513f..277edd47ae6 100644 --- a/packages/workflow-code/src/catalog/defaults.ts +++ b/packages/workflow-code/src/catalog/defaults.ts @@ -7,8 +7,8 @@ * Creation seeds each subBlock id once, from its first declaration: a visible, editable field * gets its `value()` thunk's result for a block with no values (`valueDefault.constant`, or a * computed thunk's `initial`); a hidden field gets its `defaultValue`; a read-only field gets - * nothing. A thunk that mints a fresh value per call (a webhook token) has no static default, so - * creation from source leaves it unset. Every registry default is a string, number or boolean; + * nothing. A thunk that mints a fresh value per call (a webhook token) has no static default; + * a block created from source keeps the value `initBlock` minted (`mintsFreshValue`). Every registry default is a string, number or boolean; * anything else is not treated as a default, so it always prints. */ @@ -34,6 +34,18 @@ export function subBlockEditorDefault(subBlock: CatalogSubBlock): EditorDefault return scalar('constant' in thunk ? thunk.constant : thunk.initial) } +/** + * Whether creation seeds this declaration with a value computed per creation (a `value()` thunk + * with no stable `initial`, such as a webhook token): it has no editor default, so source cannot + * state it, and a block created from source keeps the value `MaterializeHooks.initBlock` computed, + * exactly as a canvas-created block does. + */ +export function mintsFreshValue(subBlock: CatalogSubBlock): boolean { + if (subBlock.hidden || subBlock.readOnly) return false + const thunk = subBlock.valueDefault + return thunk !== undefined && 'computed' in thunk && thunk.initial === undefined +} + /** Every subBlock id of `block` that creation seeds, with the value it seeds. */ export function editorDefaults(block: CatalogBlock): ReadonlyMap { const cached = defaultsByBlock.get(block) diff --git a/packages/workflow-code/src/materialize/block.ts b/packages/workflow-code/src/materialize/block.ts index 16a81f11545..3338928fddd 100644 --- a/packages/workflow-code/src/materialize/block.ts +++ b/packages/workflow-code/src/materialize/block.ts @@ -3,6 +3,7 @@ import type { BlockData, BlockState, SubBlockState } from '@sim/workflow-types/w import { implicitIds } from '../canonicalize/branches' import { declarationFor, isExcludedSubBlockId } from '../canonicalize/params' import { SUBFLOW_DATA_KEYS } from '../canonicalize/subflows' +import { mintsFreshValue } from '../catalog/defaults' import type { LockItem, LockLayout, WorkflowLockBlock } from '../lock' import type { BlockKey, BranchKey, CanonicalBlock, SubBlockId } from '../model' import { writeBranches } from './branches' @@ -212,6 +213,8 @@ export function buildBlock(inputs: BlockInputs, context: MaterializeContext): Bu ) { continue } + const declaration = declarationFor(catalog, subBlockId, target.triggerMode) + if (declaration && mintsFreshValue(declaration)) continue subBlocks[subBlockId] = { ...subBlock, value: null } } } From a97c6c4c870b39c9b7de50821d570018b7f05012 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 23:21:07 -0800 Subject: [PATCH 129/428] fix(db): chain 0461 after the 0460 side table in the snapshot and journal 0461 was generated on 4A's base, before 4D replaced 0460 with the workflow_code_meta side table: its snapshot still carried workflow.code_meta and pointed at the old 0460 id, and its journal timestamp sorted before 0460, so the migrator would skip it after 0460 ran. The snapshot is now 0460's plus workspace_resource_binding, and drizzle-kit generate finds no schema drift. --- .../db/migrations/meta/0461_snapshot.json | 50 ++++++++++++++++--- packages/db/migrations/meta/_journal.json | 2 +- 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/packages/db/migrations/meta/0461_snapshot.json b/packages/db/migrations/meta/0461_snapshot.json index 583ed565d98..cc44615dbdd 100644 --- a/packages/db/migrations/meta/0461_snapshot.json +++ b/packages/db/migrations/meta/0461_snapshot.json @@ -1,6 +1,6 @@ { "id": "e907c2fa-d260-48f8-844f-d6fe9aa27563", - "prevId": "be3b8806-8ecc-46ba-829d-ec1f22c33724", + "prevId": "67861d7e-3340-4164-a979-5b43c92ddedd", "version": "7", "dialect": "postgresql", "tables": { @@ -26026,12 +26026,6 @@ "type": "timestamp", "primaryKey": false, "notNull": false - }, - "code_meta": { - "name": "code_meta", - "type": "jsonb", - "primaryKey": false, - "notNull": false } }, "indexes": { @@ -26615,6 +26609,48 @@ "checkConstraints": {}, "isRLSEnabled": false }, + "public.workflow_code_meta": { + "name": "workflow_code_meta", + "schema": "", + "columns": { + "workflow_id": { + "name": "workflow_id", + "type": "text", + "primaryKey": true, + "notNull": true + }, + "meta": { + "name": "meta", + "type": "jsonb", + "primaryKey": false, + "notNull": true + }, + "updated_at": { + "name": "updated_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "workflow_code_meta_workflow_id_workflow_id_fk": { + "name": "workflow_code_meta_workflow_id_workflow_id_fk", + "tableFrom": "workflow_code_meta", + "tableTo": "workflow", + "columnsFrom": ["workflow_id"], + "columnsTo": ["id"], + "onDelete": "cascade", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {}, + "policies": {}, + "checkConstraints": {}, + "isRLSEnabled": false + }, "public.workflow_deployment_operation": { "name": "workflow_deployment_operation", "schema": "", diff --git a/packages/db/migrations/meta/_journal.json b/packages/db/migrations/meta/_journal.json index f961c9d7873..a82cabb94ba 100644 --- a/packages/db/migrations/meta/_journal.json +++ b/packages/db/migrations/meta/_journal.json @@ -3225,7 +3225,7 @@ { "idx": 461, "version": "7", - "when": 1794808065145, + "when": 1794808265145, "tag": "0461_workspace_resource_binding", "breakpoints": true } From 2b5ba1d26b16203d58593426edcf76019dbba763 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 23:21:55 -0800 Subject: [PATCH 130/428] test(cli): classify create from source as a non-destructive operation 4C added createWorkflowFromSource without a destructiveness decision, so the CLI sweep that forces one on every mutating operation failed. It only creates a workflow, like createWorkflow. --- packages/sim-cli/src/http/client.test.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/sim-cli/src/http/client.test.ts b/packages/sim-cli/src/http/client.test.ts index 06e087a8ac8..2bd5af7fc6c 100644 --- a/packages/sim-cli/src/http/client.test.ts +++ b/packages/sim-cli/src/http/client.test.ts @@ -554,6 +554,7 @@ describe('destructive operations are gated', () => { 'createTableView', 'createWorkflow', 'createWorkflowFolder', + 'createWorkflowFromSource', 'createWorkflowMcpServer', 'deployWorkflow', 'deployWorkflowMcpTool', From 2dcb8340179a762e9775648f8ba172e3686dcade Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 23:31:20 -0800 Subject: [PATCH 131/428] fix(workflows): approved example ids in the resource manifest spec and toRecordOrNull in the cli Clears the check:spec-example-ids and check:utils findings 4C brought in. --- apps/docs/openapi-v2-workflows.json | 8 ++++---- .../sim/lib/api/contracts/v2/openapi/resource-manifest.ts | 4 ++-- .../sim-cli/src/commands/protocol/workflow-source-get.ts | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/apps/docs/openapi-v2-workflows.json b/apps/docs/openapi-v2-workflows.json index e5a8f8b1026..9d0273c610a 100644 --- a/apps/docs/openapi-v2-workflows.json +++ b/apps/docs/openapi-v2-workflows.json @@ -6460,7 +6460,7 @@ "summary": "Response example 1", "value": { "data": { - "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", "tables": [ { "key": "tickets", @@ -6497,7 +6497,7 @@ "workflows": [ { "key": "assign-owner", - "id": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", + "id": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36", "name": "Assign owner", "inputs": [ { @@ -19792,7 +19792,7 @@ "examples": [ { "data": { - "workspaceId": "7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28", + "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", "tables": [ { "key": "tickets", @@ -19829,7 +19829,7 @@ "workflows": [ { "key": "assign-owner", - "id": "3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8", + "id": "3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36", "name": "Assign owner", "inputs": [ { diff --git a/apps/sim/lib/api/contracts/v2/openapi/resource-manifest.ts b/apps/sim/lib/api/contracts/v2/openapi/resource-manifest.ts index 175030e281b..b54efdfceeb 100644 --- a/apps/sim/lib/api/contracts/v2/openapi/resource-manifest.ts +++ b/apps/sim/lib/api/contracts/v2/openapi/resource-manifest.ts @@ -8,7 +8,7 @@ import { defineOpenApiRoute } from '@/lib/api/openapi/types' import { workflowCodeOperations } from '@/lib/workflows/code/operations' const RESOURCE_MANIFEST_EXAMPLE = { - workspaceId: '7e2d9c14-6b83-4a55-8f01-c4d3e9a76b28', + workspaceId: 'a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64', tables: [ { key: 'tickets', @@ -27,7 +27,7 @@ const RESOURCE_MANIFEST_EXAMPLE = { workflows: [ { key: 'assign-owner', - id: '3a9e21d8-5f47-4c0b-b2ea-91d7c6034ef8', + id: '3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36', name: 'Assign owner', inputs: [{ name: 'leads', type: 'array' }], }, diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-get.ts b/packages/sim-cli/src/commands/protocol/workflow-source-get.ts index ac87ed1b7e4..df1dbca70c2 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-get.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-get.ts @@ -1,6 +1,6 @@ import { mkdir, readFile, rm, writeFile } from 'node:fs/promises' import { dirname, join, posix } from 'node:path' -import { isRecordLike } from '@sim/utils/object' +import { isRecordLike, toRecordOrNull } from '@sim/utils/object' import type { BlockCatalog } from '@sim/workflow-code' import { catalogBlock } from '@sim/workflow-code/catalog/view' import { @@ -172,7 +172,7 @@ interface ManifestResource { /** The resource manifest response, as `generateWorkspaceTypes` reads it. */ function workspaceManifestFrom(raw: unknown): WorkspaceManifest { - const data = isRecordLike(raw) && isRecordLike(raw.data) ? raw.data : null + const data = isRecordLike(raw) ? toRecordOrNull(raw.data) : null if (!data) throw new SimApiError('The resource manifest response was not in the expected shape.', 0) const list = (value: unknown): T[] => From c9b542ef30dd34c284af8beb4ce7bc446f75d91e Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 23:46:04 -0800 Subject: [PATCH 132/428] test(workflows): move the round-trip proof tooling into the apps corpus and drop restating tests The proof oracles, report and fast-check arbitraries are corpus test infrastructure, so they leave @sim/workflow-code (and its ./proof and ./proof/random exports) for apps/sim/lib/workflows/code/corpus/proof, with the seeded PRNG next to the generator. Exports only their own tests used are unexported or deleted. Drops the proof self-tests, the FIPS vectors that restate @noble/hashes, the hash and fingerprint format-only cases, and the materialize-hooks O1/O2 samples the corpus harness already runs over the whole corpus. --- apps/sim/lib/workflows/code/corpus/blocks.ts | 2 +- .../code/corpus/fixtures.test-helpers.ts | 2 +- .../sim/lib/workflows/code/corpus/generate.ts | 2 +- .../code/corpus}/proof/arbitraries.ts | 33 +-- .../lib/workflows/code/corpus}/proof/diff.ts | 0 .../lib/workflows/code/corpus/proof/index.ts | 16 ++ .../workflows/code/corpus}/proof/oracles.ts | 36 +-- .../workflows/code/corpus}/proof/report.ts | 25 +- .../sim/lib/workflows/code/corpus}/random.ts | 0 .../code/corpus/roundtrip.corpus.test.ts | 18 +- apps/sim/lib/workflows/code/corpus/values.ts | 2 +- .../workflows/code/materialize-hooks.test.ts | 67 +---- packages/workflow-code/package.json | 8 - .../src/equivalence/index.test.ts | 11 +- packages/workflow-code/src/hash.test.ts | 13 +- packages/workflow-code/src/index.ts | 1 + .../src/proof/arbitraries.test.ts | 97 -------- packages/workflow-code/src/proof/index.ts | 43 ---- .../workflow-code/src/proof/oracles.test.ts | 228 ------------------ .../workflow-code/src/proof/report.test.ts | 51 ---- 20 files changed, 63 insertions(+), 592 deletions(-) rename {packages/workflow-code/src => apps/sim/lib/workflows/code/corpus}/proof/arbitraries.ts (91%) rename {packages/workflow-code/src => apps/sim/lib/workflows/code/corpus}/proof/diff.ts (100%) create mode 100644 apps/sim/lib/workflows/code/corpus/proof/index.ts rename {packages/workflow-code/src => apps/sim/lib/workflows/code/corpus}/proof/oracles.ts (91%) rename {packages/workflow-code/src => apps/sim/lib/workflows/code/corpus}/proof/report.ts (91%) rename {packages/workflow-code/src/proof => apps/sim/lib/workflows/code/corpus}/random.ts (100%) delete mode 100644 packages/workflow-code/src/proof/arbitraries.test.ts delete mode 100644 packages/workflow-code/src/proof/index.ts delete mode 100644 packages/workflow-code/src/proof/oracles.test.ts delete mode 100644 packages/workflow-code/src/proof/report.test.ts diff --git a/apps/sim/lib/workflows/code/corpus/blocks.ts b/apps/sim/lib/workflows/code/corpus/blocks.ts index 5cd521f5110..714d14d8952 100644 --- a/apps/sim/lib/workflows/code/corpus/blocks.ts +++ b/apps/sim/lib/workflows/code/corpus/blocks.ts @@ -9,7 +9,7 @@ import { evaluateSubBlockCondition, isCanonicalPair, } from '@sim/workflow-code/catalog/canonical-index' -import type { SeededRandom } from '@sim/workflow-code/proof/random' +import type { SeededRandom } from '@/lib/workflows/code/corpus/random' import { type FillContext, fillSubBlockValue, diff --git a/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts b/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts index 5dbf4b37b0f..14967e1784d 100644 --- a/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts +++ b/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts @@ -20,10 +20,10 @@ import { import { isRecordLike, omit } from '@sim/utils/object' import { compareStrings } from '@sim/utils/string' import { type BlockCatalog, canonicalize, catalogBlock } from '@sim/workflow-code' -import { workflowStateArbitrary } from '@sim/workflow-code/proof' import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' import fc from 'fast-check' import { type CorpusCase, generateRegistryCorpus } from '@/lib/workflows/code/corpus' +import { workflowStateArbitrary } from '@/lib/workflows/code/corpus/proof' import type { WorkflowState } from '@/stores/workflows/workflow/types' export interface FixtureState { diff --git a/apps/sim/lib/workflows/code/corpus/generate.ts b/apps/sim/lib/workflows/code/corpus/generate.ts index 6df671d25c8..ff23cd6f3c0 100644 --- a/apps/sim/lib/workflows/code/corpus/generate.ts +++ b/apps/sim/lib/workflows/code/corpus/generate.ts @@ -19,7 +19,6 @@ * same on every machine and adding a block does not reshuffle the others. */ -import { createSeededRandom, type SeededRandom } from '@sim/workflow-code/proof/random' import { type BlockFixture, buildBlockFixture, @@ -28,6 +27,7 @@ import { isVisible, type PairMode, } from '@/lib/workflows/code/corpus/blocks' +import { createSeededRandom, type SeededRandom } from '@/lib/workflows/code/corpus/random' import { CORPUS_START_NAME, CORPUS_TEXT, diff --git a/packages/workflow-code/src/proof/arbitraries.ts b/apps/sim/lib/workflows/code/corpus/proof/arbitraries.ts similarity index 91% rename from packages/workflow-code/src/proof/arbitraries.ts rename to apps/sim/lib/workflows/code/corpus/proof/arbitraries.ts index 3324d5dc831..db6edde37d7 100644 --- a/packages/workflow-code/src/proof/arbitraries.ts +++ b/apps/sim/lib/workflows/code/corpus/proof/arbitraries.ts @@ -6,6 +6,7 @@ * points at the engine and not at the generator. */ +import { setOwn } from '@sim/workflow-code' import { type BlockState, type Loop, @@ -15,7 +16,6 @@ import { type WorkflowState, } from '@sim/workflow-types/workflow' import fc from 'fast-check' -import { setOwn } from '../records' /** Names that collide with `Object.prototype` members when used as a plain-object key. */ const PROTOTYPE_KEY_NAMES = ['__proto__', 'constructor', 'prototype'] as const @@ -25,7 +25,7 @@ const PROTOTYPE_KEY_NAMES = ['__proto__', 'constructor', 'prototype'] as const * nested env braces, CRLF, the JS line separators U+2028/U+2029, lone surrogates, backticks, * template openers, quotes, and `Object.prototype` member names. */ -export const ADVERSARIAL_STRING_FRAGMENTS = [ +const ADVERSARIAL_STRING_FRAGMENTS = [ '<3 ', '{{ {{X}} }}', '{{API_KEY}}', @@ -56,7 +56,7 @@ const isUsableName = (name: string): boolean => { } /** Text mixing adversarial fragments with arbitrary unicode (including astral characters). */ -export function adversarialStringArbitrary(): fc.Arbitrary { +function adversarialStringArbitrary(): fc.Arbitrary { return fc .array( fc.oneof( @@ -74,7 +74,7 @@ export function adversarialStringArbitrary(): fc.Arbitrary { * `Object.prototype` member names, always with a usable normalized key. Two draws can still * collide after normalization; use {@link uniqueBlockNamesArbitrary} when they must not. */ -export function blockNameArbitrary(): fc.Arbitrary { +function blockNameArbitrary(): fc.Arbitrary { const wordNames = fc .tuple( fc.constantFrom( @@ -101,7 +101,7 @@ export function blockNameArbitrary(): fc.Arbitrary { } /** `count` names whose normalized keys are distinct. */ -export function uniqueBlockNamesArbitrary(count: number): fc.Arbitrary { +function uniqueBlockNamesArbitrary(count: number): fc.Arbitrary { return fc.uniqueArray(blockNameArbitrary(), { minLength: count, maxLength: count, @@ -109,27 +109,6 @@ export function uniqueBlockNamesArbitrary(count: number): fc.Arbitrary }) } -/** - * A pair of distinct display names with the same normalized key (`Agent 1` / `agent1`, - * `my.block` / `MyBlock`): the legacy collision canonicalize projects as `key~2`. - */ -export function collidingNamesArbitrary(): fc.Arbitrary<[string, string]> { - return blockNameArbitrary() - .chain((name) => - fc - .constantFrom( - name.toUpperCase(), - name.toLowerCase(), - name.replace(/\s+/g, ''), - name.replace(/\./g, ''), - ` ${name} `, - name.replace(/(\w)/, '$1.') - ) - .map((other): [string, string] => [name, other]) - ) - .filter(([a, b]) => a !== b && normalizeWorkflowBlockName(a) === normalizeWorkflowBlockName(b)) -} - const REF_PATHS = ['input', 'result', 'data.items', 'response.body', 'rows[0]'] as const /** @@ -137,7 +116,7 @@ const REF_PATHS = ['input', 'result', 'data.items', 'response.body', 'rows[0]'] * quotes, template text, template interpolation, line and block comments, and a `<` comparison * next to a reference. `refs` are normalized block names (`agent1`); each draws a path. */ -export function jsCodeBodyArbitrary(refs: readonly string[]): fc.Arbitrary { +function jsCodeBodyArbitrary(refs: readonly string[]): fc.Arbitrary { const names = refs.length > 0 ? refs : ['start'] const reference = fc .tuple(fc.constantFrom(...names), fc.constantFrom(...REF_PATHS)) diff --git a/packages/workflow-code/src/proof/diff.ts b/apps/sim/lib/workflows/code/corpus/proof/diff.ts similarity index 100% rename from packages/workflow-code/src/proof/diff.ts rename to apps/sim/lib/workflows/code/corpus/proof/diff.ts diff --git a/apps/sim/lib/workflows/code/corpus/proof/index.ts b/apps/sim/lib/workflows/code/corpus/proof/index.ts new file mode 100644 index 00000000000..77beffa6d01 --- /dev/null +++ b/apps/sim/lib/workflows/code/corpus/proof/index.ts @@ -0,0 +1,16 @@ +/** + * Round-trip proof tooling for the corpus tests: the fast-check workflow generator, the oracles + * each property runs, and the per-block-type report. Test infrastructure only; nothing at runtime + * imports it. + */ + +export { workflowStateArbitrary } from './arbitraries' +export { findDifferences } from './diff' +export { + assertNoErrors, + assertNoopIdentity, + executionParity, + idempotence, + type OracleResult, +} from './oracles' +export { createProofReport, type ProofProperty, reportPathVariable } from './report' diff --git a/packages/workflow-code/src/proof/oracles.ts b/apps/sim/lib/workflows/code/corpus/proof/oracles.ts similarity index 91% rename from packages/workflow-code/src/proof/oracles.ts rename to apps/sim/lib/workflows/code/corpus/proof/oracles.ts index c365abf0f6a..db4d2e4266f 100644 --- a/packages/workflow-code/src/proof/oracles.ts +++ b/apps/sim/lib/workflows/code/corpus/proof/oracles.ts @@ -2,22 +2,25 @@ * The round-trip oracles (s1 §6, s3 §5), as pure functions over values the caller produces. Each * returns its verdict instead of throwing, so a corpus run reports every failing case rather than * stopping at the first. Server-side collaborators (the serializer, change detection) are - * injected, which keeps this package free of the app. + * injected, so each oracle is a pure comparison. * * Per the Wave 1 audit the CWM carries no encodings, so no oracle compares one: O1 compares raw * stored states, O2 compares what execution sees, and O3 compares CWMs through the caller's * equality. */ -import { isRecordLike, omit } from '@sim/utils/object' +import { isRecordLike } from '@sim/utils/object' import { compareStrings, escapeRegExp } from '@sim/utils/string' +import { setOwn } from '@sim/workflow-code' import { normalizeWorkflowBlockName, type WorkflowState } from '@sim/workflow-types/workflow' -import type { CanonicalWorkflow } from '../model' -import { setOwn } from '../records' -import { type Difference, findDifferences, firstTextDifference } from './diff' +import { + type Difference, + findDifferences, + firstTextDifference, +} from '@/lib/workflows/code/corpus/proof/diff' /** The property or oracle a verdict belongs to (s3 §5 P1–P5, s1 §6 O1–O3). */ -export type OracleName = 'P0' | 'P1' | 'P2' | 'P3' | 'P4' | 'P5' | 'P6' | 'O1' | 'O2' | 'O3' +type OracleName = 'P0' | 'P1' | 'P2' | 'P3' | 'P4' | 'P5' | 'P6' | 'O1' | 'O2' | 'O3' export type OracleResult = | { ok: true; oracle: OracleName } @@ -72,18 +75,8 @@ export function idempotence(input: { return verdict(oracle, findDifferences(value, stepped)) } -/** - * A CWM without its non-semantic `annotations`, for comparing CWMs exactly when no - * `canonicalEquals` is available. Annotations never take part in equality (DESIGN.md decision 3). - */ -export function withoutAnnotations( - workflow: CanonicalWorkflow -): Omit { - return omit(workflow, ['annotations']) -} - /** The structural slice of `SerializedWorkflow` (apps/sim/serializer/types.ts) parity reads. */ -export interface SerializedWorkflowLike { +interface SerializedWorkflowLike { blocks: Array<{ id: string enabled?: boolean @@ -102,7 +95,7 @@ export interface SerializedWorkflowLike { parallels?: Record } -export interface ExecutionParityInput { +interface ExecutionParityInput { original: WorkflowState /** Materialized lockless (no prev, no lock): ids are fresh and aligned here by key. */ candidate: WorkflowState @@ -199,7 +192,7 @@ function sortSubflowNodes(subflows: Record): Record( * a mapped id (object keys and inside strings, such as `condition-` handles) is replaced. * Unpaired ids stay as they are, so a real difference still shows up downstream. */ -export function alignWorkflowIds( - reference: WorkflowState, - candidate: WorkflowState -): WorkflowState { +function alignWorkflowIds(reference: WorkflowState, candidate: WorkflowState): WorkflowState { const map = pairByKey(reference.blocks, candidate.blocks, (block) => normalizeWorkflowBlockName(block.name) ) diff --git a/packages/workflow-code/src/proof/report.ts b/apps/sim/lib/workflows/code/corpus/proof/report.ts similarity index 91% rename from packages/workflow-code/src/proof/report.ts rename to apps/sim/lib/workflows/code/corpus/proof/report.ts index afcec2a329a..75118a74efd 100644 --- a/packages/workflow-code/src/proof/report.ts +++ b/apps/sim/lib/workflows/code/corpus/proof/report.ts @@ -6,29 +6,18 @@ */ import { compareStrings } from '@sim/utils/string' -import type { Difference } from './diff' +import type { Difference } from '@/lib/workflows/code/corpus/proof/diff' /** * The round-trip properties (s3 §5) and oracles (s1 §6) a corpus run checks. `P0` is P1's source * half, `compile(print(c))` equals `c`, which needs no materialize. */ -export const PROOF_PROPERTIES = [ - 'P0', - 'P1', - 'P2', - 'P3', - 'P4', - 'P5', - 'P6', - 'O1', - 'O2', - 'O3', -] as const +const PROOF_PROPERTIES = ['P0', 'P1', 'P2', 'P3', 'P4', 'P5', 'P6', 'O1', 'O2', 'O3'] as const export type ProofProperty = (typeof PROOF_PROPERTIES)[number] -export type ProofStatus = 'passed' | 'failed' | 'skipped' | 'errored' +type ProofStatus = 'passed' | 'failed' | 'skipped' | 'errored' -export interface ProofOutcome { +interface ProofOutcome { caseId: string /** Every block type in the case's workflow; each one's parity counts this outcome. */ blockTypes: string[] @@ -47,12 +36,12 @@ interface Tally { errored: number } -export interface BlockTypeParity extends Tally { +interface BlockTypeParity extends Tally { /** `passed / (passed + failed + errored)`; `null` when every outcome was skipped. */ rate: number | null } -export interface ProofReport { +interface ProofReport { suite: string /** `incomplete` when nothing failed but some property was skipped wholesale. */ status: 'passed' | 'failed' | 'incomplete' @@ -68,7 +57,7 @@ export interface ProofReport { truncatedFailures: number } -export interface ProofReportCollector { +interface ProofReportCollector { record(outcome: ProofOutcome): void skipProperty(property: ProofProperty, reason: string): void build(options: { generatedAt: string }): ProofReport diff --git a/packages/workflow-code/src/proof/random.ts b/apps/sim/lib/workflows/code/corpus/random.ts similarity index 100% rename from packages/workflow-code/src/proof/random.ts rename to apps/sim/lib/workflows/code/corpus/random.ts diff --git a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts index 08b15dbb09a..77d5a657eed 100644 --- a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts +++ b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts @@ -32,6 +32,14 @@ import { type PrintWorkflowFn, printWorkflow, } from '@sim/workflow-code' +import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' +import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' +import { + corpusBudgetMs, + type ProofSubject, + roundTripSubjects, + withoutLockHeldState, +} from '@/lib/workflows/code/corpus/fixtures.test-helpers' import { assertNoErrors, assertNoopIdentity, @@ -41,15 +49,7 @@ import { type OracleResult, type ProofProperty, reportPathVariable, -} from '@sim/workflow-code/proof' -import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' -import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' -import { - corpusBudgetMs, - type ProofSubject, - roundTripSubjects, - withoutLockHeldState, -} from '@/lib/workflows/code/corpus/fixtures.test-helpers' +} from '@/lib/workflows/code/corpus/proof' import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' import { hasWorkflowChanged } from '@/lib/workflows/comparison/compare' import { getBlockRegistry } from '@/blocks/registry' diff --git a/apps/sim/lib/workflows/code/corpus/values.ts b/apps/sim/lib/workflows/code/corpus/values.ts index 9e080b27573..b0c9d99be86 100644 --- a/apps/sim/lib/workflows/code/corpus/values.ts +++ b/apps/sim/lib/workflows/code/corpus/values.ts @@ -8,7 +8,7 @@ * advanced member of a selector pair is free text and carries the payload. */ -import type { SeededRandom } from '@sim/workflow-code/proof/random' +import type { SeededRandom } from '@/lib/workflows/code/corpus/random' import type { SubBlockConfig } from '@/blocks/types' /** The upstream start block every case has; its key is `start`. */ diff --git a/apps/sim/lib/workflows/code/materialize-hooks.test.ts b/apps/sim/lib/workflows/code/materialize-hooks.test.ts index a8a9052c34a..bf98c25ca82 100644 --- a/apps/sim/lib/workflows/code/materialize-hooks.test.ts +++ b/apps/sim/lib/workflows/code/materialize-hooks.test.ts @@ -1,19 +1,13 @@ /** - * Materialize against the real registry, catalog and serializer (s1 §6): - * - O1: `materialize(canonicalize(x), null, { prev: x })` deep-equals `x` for a sample of the - * registry corpus covering every corpus kind (all s1 §5 quirk classes the generator emits); - * - O3: `canonicalize(materialize(c))` equals `c`, with prev and with every block new; - * - O2: materialized lockless with no prev, then aligned to the original by key, the serializer - * sees the same params, tools, connections and subflows, and `hasWorkflowChanged` is false. - * Cases whose types the registry does not know are skipped: the serializer rejects the original. - * - * The whole corpus runs in `corpus/roundtrip.corpus.test.ts`; this file keeps a fast sample so a - * hook or materialize regression fails here first. + * Materialize against the real registry and catalog, over a sample of the registry corpus: O3 + * (`canonicalize(materialize(c))` equals `c`) with every block new, which the corpus harness + * (`corpus/roundtrip.corpus.test.ts`, with prev only) does not run, and a new block created + * through the editing engine. O1 and O2 run over the whole corpus there. */ import { canonicalEquals, canonicalize, catalogBlock, materialize } from '@sim/workflow-code' -import { executionParity, findDifferences } from '@sim/workflow-code/proof' import { describe, expect, it, vi } from 'vitest' +import { findDifferences } from '@/lib/workflows/code/corpus/proof' vi.unmock('@/blocks/registry') vi.unmock('@/tools/registry') @@ -21,12 +15,9 @@ vi.unmock('@/tools/registry') import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' import { type CorpusCase, generateRegistryCorpus } from '@/lib/workflows/code/corpus' -import { withoutLockHeldState } from '@/lib/workflows/code/corpus/fixtures.test-helpers' import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' -import { hasWorkflowChanged } from '@/lib/workflows/comparison/compare' import { getBlockRegistry } from '@/blocks/registry' import { SDK_NAMES } from '@/blocks/sdk-names.generated' -import { Serializer } from '@/serializer' import type { WorkflowState } from '@/stores/workflows/workflow/types' const { catalog } = buildBlockCatalog({ @@ -35,7 +26,6 @@ const { catalog } = buildBlockCatalog({ sdkNames: SDK_NAMES, }) const hooks = createMaterializeHooks() -const serializer = new Serializer() /** Every structural case, plus the first case of each per-block kind for every block type. */ function sample(corpus: CorpusCase[]): CorpusCase[] { @@ -73,33 +63,6 @@ function failures( } describe(`materialize over the real registry (${cases.length} corpus cases)`, () => { - it('covers every corpus kind', () => { - expect(new Set(cases.map((c) => c.kind))).toEqual( - new Set([ - 'operation', - 'trigger', - 'standalone-advanced', - 'error-edge', - 'branches', - 'name-collision', - 'subflow', - 'input-format', - 'variables', - 'unknown-type', - ]) - ) - }) - - it('O1: a no-op round trip writes the stored state back exactly', () => { - expect( - failures((corpusCase) => { - const result = write(canonical(corpusCase.state, corpusCase.id), corpusCase.state) - const differences = findDifferences(corpusCase.state, result.state, 3) - return differences.length === 0 ? null : JSON.stringify(differences) - }) - ).toEqual([]) - }) - it('O3: canonicalize(materialize(c)) equals c, with prev and with every block new', () => { expect( failures((corpusCase) => { @@ -115,26 +78,6 @@ describe(`materialize over the real registry (${cases.length} corpus cases)`, () ).toEqual([]) }) - it('O2: a lockless write with no prev executes like the original', () => { - const executable = cases.filter((corpusCase) => !corpusCase.unknownTypes) - expect(executable.length).toBeGreaterThan(cases.length / 2) - expect( - failures((corpusCase) => { - const result = executionParity({ - original: withoutLockHeldState(corpusCase.state, catalog), - candidate: withoutLockHeldState( - write(canonical(corpusCase.state, corpusCase.id)).state, - catalog - ), - serialize: (state) => - serializer.serializeWorkflow(state.blocks, state.edges, state.loops, state.parallels), - hasWorkflowChanged, - }) - return result.ok ? null : JSON.stringify(result.differences.slice(0, 5)) - }, executable) - ).toEqual([]) - }) - it('creates a new block through the editing engine, with editor subBlock entries', () => { const c = canonical(cases[0].state, cases[0].id) const result = write(c) diff --git a/packages/workflow-code/package.json b/packages/workflow-code/package.json index cade20b2962..5179610ae4e 100644 --- a/packages/workflow-code/package.json +++ b/packages/workflow-code/package.json @@ -33,14 +33,6 @@ "./sdk": { "types": "./src/sdk.ts", "default": "./src/sdk.ts" - }, - "./proof": { - "types": "./src/proof/index.ts", - "default": "./src/proof/index.ts" - }, - "./proof/random": { - "types": "./src/proof/random.ts", - "default": "./src/proof/random.ts" } }, "scripts": { diff --git a/packages/workflow-code/src/equivalence/index.test.ts b/packages/workflow-code/src/equivalence/index.test.ts index 708d428b028..3f8a2dcdc14 100644 --- a/packages/workflow-code/src/equivalence/index.test.ts +++ b/packages/workflow-code/src/equivalence/index.test.ts @@ -123,16 +123,11 @@ describe('canonicalEquals and canonicalHash', () => { expect(canonicalHash(changed)).not.toBe(canonicalHash(base())) } }) - - it('hash as lowercase hex SHA-256', () => { - expect(canonicalHash(base())).toMatch(/^[0-9a-f]{64}$/) - }) }) describe('sourceFingerprint', () => { - it('is sf1: plus 64 hex characters and stable under key and edge order', () => { + it('is stable under key and edge order', () => { const fingerprint = sourceFingerprint(base(), IDENTITY) - expect(fingerprint).toMatch(/^sf1:[0-9a-f]{64}$/) const reordered = reverseKeys(base()) reordered.edges.reverse() expect(sourceFingerprint(reordered, reverseKeys(IDENTITY))).toBe(fingerprint) @@ -156,8 +151,4 @@ describe('sourceFingerprint', () => { locked.blocks.b.locked = true expect(sourceFingerprint(locked, IDENTITY)).not.toBe(fingerprint) }) - - it('differs from the plain canonical hash, so the two cannot be confused', () => { - expect(sourceFingerprint(base(), IDENTITY).slice(4)).not.toBe(canonicalHash(base())) - }) }) diff --git a/packages/workflow-code/src/hash.test.ts b/packages/workflow-code/src/hash.test.ts index 7547764fd6f..6d89478c7ab 100644 --- a/packages/workflow-code/src/hash.test.ts +++ b/packages/workflow-code/src/hash.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import { sha256Hex, stableStringify } from './hash' +import { stableStringify } from './hash' describe('stableStringify', () => { it('serializes objects the same whatever their key order, at every depth', () => { @@ -39,14 +39,3 @@ describe('stableStringify', () => { expect(() => stableStringify(cyclic)).toThrow(TypeError) }) }) - -describe('sha256Hex', () => { - it('matches the FIPS 180-2 test vectors as lowercase hex over UTF-8', () => { - expect(sha256Hex('')).toBe('e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855') - expect(sha256Hex('abc')).toBe( - 'ba7816bf8f01cfea414140de5dae2223b00361a396177a9cb410ff61f20015ad' - ) - expect(sha256Hex('é')).toBe(sha256Hex('é')) - expect(sha256Hex('é')).not.toBe(sha256Hex('é')) - }) -}) diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index 453bd92558f..a3838695bb1 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -186,4 +186,5 @@ export type { WorkflowAnnotations, } from './model' export { assignIdentifiers, createPrintWorkflow, printWorkflow } from './print' +export { setOwn } from './records' export { GENERIC_BUILDER, SDK_CORE_EXPORTS, SDK_RESERVED_IDENTIFIERS } from './sdk' diff --git a/packages/workflow-code/src/proof/arbitraries.test.ts b/packages/workflow-code/src/proof/arbitraries.test.ts deleted file mode 100644 index 8f08bdb3c9f..00000000000 --- a/packages/workflow-code/src/proof/arbitraries.test.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { - normalizeWorkflowBlockName, - RESERVED_WORKFLOW_BLOCK_NAMES, - type WorkflowState, - wouldCreateCycle, -} from '@sim/workflow-types/workflow' -import fc from 'fast-check' -import { describe, expect, it } from 'vitest' -import { collidingNamesArbitrary, jsCodeBodyArbitrary, workflowStateArbitrary } from './arbitraries' - -/** Every structural invariant a stored graph holds; returns the first violation or null. */ -function structuralViolation(state: WorkflowState): string | null { - const keys = new Set() - for (const block of Object.values(state.blocks)) { - const key = normalizeWorkflowBlockName(block.name) - if (!key) return `empty key for ${block.name}` - if ((RESERVED_WORKFLOW_BLOCK_NAMES as readonly string[]).includes(key)) return `reserved ${key}` - if (keys.has(key)) return `duplicate key ${key}` - keys.add(key) - const parentId = block.data?.parentId - if (parentId) { - const parent = state.blocks[parentId] - if (!parent || (parent.type !== 'loop' && parent.type !== 'parallel')) { - return `bad parent for ${block.name}` - } - const container = state.loops[parentId] ?? state.parallels[parentId] - if (!container?.nodes.includes(block.id)) return `${block.name} missing from container nodes` - } - } - const accepted: Array<{ source: string; target: string }> = [] - for (const edge of state.edges) { - const source = state.blocks[edge.source] - const target = state.blocks[edge.target] - if (!source || !target) return `dangling edge ${edge.id}` - const startEdge = edge.sourceHandle?.endsWith('-start-source') === true - if (startEdge) { - if (target.data?.parentId !== source.id) return `start edge leaves its container ${edge.id}` - } else if ((source.data?.parentId ?? null) !== (target.data?.parentId ?? null)) { - return `cross-scope edge ${edge.id}` - } - if (target.type === 'start_trigger') return `edge into the trigger ${edge.id}` - if (wouldCreateCycle(accepted, edge.source, edge.target)) return `cycle at ${edge.id}` - accepted.push({ source: edge.source, target: edge.target }) - } - return null -} - -describe('workflowStateArbitrary', () => { - it('only generates structurally valid graphs', () => { - fc.assert( - fc.property(workflowStateArbitrary({ maxBlocks: 10, maxDepth: 3 }), (state) => { - expect(structuralViolation(state)).toBeNull() - }), - { numRuns: 300, seed: 20261115 } - ) - }) - - it('reaches nested containers', () => { - const samples = fc.sample(workflowStateArbitrary({ maxBlocks: 10, maxDepth: 3 }), { - numRuns: 300, - seed: 7, - }) - const nested = samples.some((state) => - Object.values(state.blocks).some((block) => { - const parent = block.data?.parentId ? state.blocks[block.data.parentId] : undefined - return ( - (block.type === 'loop' || block.type === 'parallel') && Boolean(parent?.data?.parentId) - ) - }) - ) - expect(nested).toBe(true) - }) -}) - -describe('collidingNamesArbitrary', () => { - it('yields distinct names with one normalized key', () => { - fc.assert( - fc.property(collidingNamesArbitrary(), ([a, b]) => { - expect(a).not.toBe(b) - expect(normalizeWorkflowBlockName(a)).toBe(normalizeWorkflowBlockName(b)) - }), - { numRuns: 200, seed: 1 } - ) - }) -}) - -describe('jsCodeBodyArbitrary', () => { - it('puts references in code, quote, template and comment positions', () => { - const bodies = fc.sample(jsCodeBodyArbitrary(['agent1']), { numRuns: 400, seed: 3 }).join('\n') - expect(bodies).toMatch(/= ]*> <3/) - }) -}) diff --git a/packages/workflow-code/src/proof/index.ts b/packages/workflow-code/src/proof/index.ts deleted file mode 100644 index 671566c7268..00000000000 --- a/packages/workflow-code/src/proof/index.ts +++ /dev/null @@ -1,43 +0,0 @@ -/** - * Round-trip proof tooling, served from `@sim/workflow-code/proof` rather than the main entry so - * runtime consumers (the Code tab, the CLI) never load fast-check. The seeded PRNG corpus - * generation runs on is its own subpath, `@sim/workflow-code/proof/random`, for the same reason. - * Pure, like the rest of the package: the app supplies registry-derived corpora, the serializer - * and the report file write. - */ - -export { - ADVERSARIAL_STRING_FRAGMENTS, - adversarialStringArbitrary, - blockNameArbitrary, - collidingNamesArbitrary, - jsCodeBodyArbitrary, - uniqueBlockNamesArbitrary, - type WorkflowArbitraryOptions, - workflowStateArbitrary, -} from './arbitraries' -export { type Difference, findDifferences, firstTextDifference } from './diff' -export { - alignWorkflowIds, - assertNoErrors, - assertNoopIdentity, - decodeStructured, - type ExecutionParityInput, - executionParity, - idempotence, - type OracleName, - type OracleResult, - type SerializedWorkflowLike, - withoutAnnotations, -} from './oracles' -export { - type BlockTypeParity, - createProofReport, - PROOF_PROPERTIES, - type ProofOutcome, - type ProofProperty, - type ProofReport, - type ProofReportCollector, - type ProofStatus, - reportPathVariable, -} from './report' diff --git a/packages/workflow-code/src/proof/oracles.test.ts b/packages/workflow-code/src/proof/oracles.test.ts deleted file mode 100644 index 4e9ee870c80..00000000000 --- a/packages/workflow-code/src/proof/oracles.test.ts +++ /dev/null @@ -1,228 +0,0 @@ -import type { WorkflowState } from '@sim/workflow-types/workflow' -import { describe, expect, it } from 'vitest' -import { findDifferences } from './diff' -import { - assertNoopIdentity, - executionParity, - idempotence, - type SerializedWorkflowLike, -} from './oracles' - -function conditionWorkflow( - ids: { - start: string - cond: string - target: string - rowIf: string - rowElse: string - edge: string - }, - conditions: unknown -): WorkflowState { - return { - blocks: { - [ids.start]: { - id: ids.start, - type: 'start_trigger', - name: 'Start', - position: { x: 0, y: 0 }, - subBlocks: {}, - outputs: {}, - enabled: true, - }, - [ids.cond]: { - id: ids.cond, - type: 'condition', - name: 'Route It', - position: { x: 1, y: 0 }, - subBlocks: { - conditions: { - id: 'conditions', - type: 'condition-input', - value: conditions as WorkflowState['blocks'][string]['subBlocks'][string]['value'], - }, - }, - outputs: {}, - enabled: true, - }, - [ids.target]: { - id: ids.target, - type: 'function', - name: 'After', - position: { x: 2, y: 0 }, - subBlocks: { code: { id: 'code', type: 'code', value: 'return ' } }, - outputs: {}, - enabled: true, - data: { parentId: undefined }, - }, - }, - edges: [ - { id: `${ids.edge}-a`, source: ids.start, target: ids.cond, sourceHandle: 'source' }, - { - id: `${ids.edge}-b`, - source: ids.cond, - target: ids.target, - sourceHandle: `condition-${ids.rowIf}`, - }, - ], - loops: {}, - parallels: {}, - } -} - -const originalIds = { - start: 'aaaaaaaa-0000-4000-8000-000000000001', - cond: 'aaaaaaaa-0000-4000-8000-000000000002', - target: 'aaaaaaaa-0000-4000-8000-000000000003', - rowIf: 'aaaaaaaa-0000-4000-8000-0000000000a1', - rowElse: 'aaaaaaaa-0000-4000-8000-0000000000a2', - edge: 'aaaaaaaa-0000-4000-8000-0000000000e0', -} -const freshIds = { - start: 'bbbbbbbb-0000-4000-8000-000000000001', - cond: 'bbbbbbbb-0000-4000-8000-000000000002', - target: 'bbbbbbbb-0000-4000-8000-000000000003', - rowIf: 'bbbbbbbb-0000-4000-8000-0000000000a1', - rowElse: 'bbbbbbbb-0000-4000-8000-0000000000a2', - edge: 'bbbbbbbb-0000-4000-8000-0000000000e0', -} - -const rows = (ids: typeof originalIds, expression: string) => [ - { id: ids.rowIf, title: 'if', value: expression }, - { id: ids.rowElse, title: 'else', value: '' }, -] - -/** A serializer stand-in that exposes exactly what the real one forwards: ids, params, handles. */ -function serialize(state: WorkflowState): SerializedWorkflowLike { - return { - blocks: Object.values(state.blocks).map((block) => ({ - id: block.id, - enabled: block.enabled, - config: { - tool: block.type, - params: Object.fromEntries( - Object.entries(block.subBlocks).map(([id, subBlock]) => [id, subBlock.value]) - ), - }, - })), - connections: state.edges.map((edge) => ({ - source: edge.source, - target: edge.target, - sourceHandle: edge.sourceHandle, - targetHandle: edge.targetHandle, - })), - } -} - -const unchanged = () => false - -describe('findDifferences', () => { - it('treats an own key holding undefined as different from an absent key', () => { - expect(findDifferences({ a: 1 }, { a: 1, b: undefined })).toEqual([ - { path: '/b', kind: 'unexpected', actual: 'undefined' }, - ]) - }) - - it('ignores object key order but not array order', () => { - expect(findDifferences({ a: 1, b: 2 }, { b: 2, a: 1 })).toEqual([]) - expect(findDifferences([1, 2], [2, 1]).map((d) => d.path)).toEqual(['/0', '/1']) - }) - - it('escapes pointer segments', () => { - expect(findDifferences({ 'a/b~c': 1 }, { 'a/b~c': 2 })[0]?.path).toBe('/a~1b~0c') - }) -}) - -describe('assertNoopIdentity (O1)', () => { - it('fails a materialize that re-encodes a JSON-string value as an array', () => { - const original = conditionWorkflow(originalIds, JSON.stringify(rows(originalIds, 'x > 1'))) - const reencoded = conditionWorkflow(originalIds, rows(originalIds, 'x > 1')) - const result = assertNoopIdentity({ original, materialized: reencoded }) - expect(result.ok).toBe(false) - expect(result.ok ? [] : result.differences.map((d) => d.path)).toEqual([ - `/blocks/${originalIds.cond}/subBlocks/conditions/value`, - ]) - }) -}) - -describe('executionParity (O2)', () => { - it('passes a lockless round trip with fresh block, row and edge ids and a new encoding', () => { - const original = conditionWorkflow(originalIds, JSON.stringify(rows(originalIds, 'x > 1'))) - const candidate = conditionWorkflow(freshIds, rows(freshIds, 'x > 1')) - expect( - executionParity({ original, candidate, serialize, hasWorkflowChanged: unchanged }) - ).toEqual({ - ok: true, - oracle: 'O2', - }) - }) - - it('fails when a branch expression changed', () => { - const original = conditionWorkflow(originalIds, JSON.stringify(rows(originalIds, 'x > 1'))) - const candidate = conditionWorkflow(freshIds, rows(freshIds, 'x > 2')) - const result = executionParity({ - original, - candidate, - serialize, - hasWorkflowChanged: unchanged, - }) - expect(result.ok).toBe(false) - }) - - it('fails when an edge moved to another branch', () => { - const original = conditionWorkflow(originalIds, JSON.stringify(rows(originalIds, 'x > 1'))) - const candidate = conditionWorkflow(freshIds, rows(freshIds, 'x > 1')) - const moved = { - ...candidate, - edges: candidate.edges.map((edge) => - edge.sourceHandle === `condition-${freshIds.rowIf}` - ? { ...edge, sourceHandle: `condition-${freshIds.rowElse}` } - : edge - ), - } - const result = executionParity({ - original, - candidate: moved, - serialize, - hasWorkflowChanged: unchanged, - }) - expect(result.ok ? [] : result.differences.map((d) => d.path)).toEqual(['/connections/1']) - }) - - it('fails when change detection reports a change', () => { - const original = conditionWorkflow(originalIds, JSON.stringify(rows(originalIds, 'x > 1'))) - const result = executionParity({ - original, - candidate: original, - serialize, - hasWorkflowChanged: () => true, - }) - expect(result.ok ? [] : result.differences.map((d) => d.path)).toEqual(['/hasWorkflowChanged']) - }) -}) - -describe('idempotence (O3, P3)', () => { - it('reports the first differing line of a printed file', () => { - const result = idempotence({ - oracle: 'P3', - value: 'a\nb\nc', - step: (text) => text.replace('b', 'B'), - }) - expect(result).toEqual({ - ok: false, - oracle: 'P3', - differences: [{ path: 'line:2', kind: 'text', expected: '"b"', actual: '"B"' }], - }) - }) - - it('defers to the supplied equality for structured values', () => { - const value = { blocks: {}, annotations: { comments: { header: [] } } } - const result = idempotence({ - oracle: 'O3', - value, - step: () => ({ blocks: {}, annotations: { comments: {} } }), - equals: (a, b) => JSON.stringify(a.blocks) === JSON.stringify(b.blocks), - }) - expect(result.ok).toBe(true) - }) -}) diff --git a/packages/workflow-code/src/proof/report.test.ts b/packages/workflow-code/src/proof/report.test.ts deleted file mode 100644 index 1dbad841a30..00000000000 --- a/packages/workflow-code/src/proof/report.test.ts +++ /dev/null @@ -1,51 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { createProofReport } from './report' - -describe('createProofReport', () => { - it('computes parity per block type from decided outcomes only', () => { - const report = createProofReport('roundtrip-corpus') - report.record({ - caseId: 'a', - blockTypes: ['slack', 'start_trigger'], - property: 'P1', - status: 'passed', - }) - report.record({ caseId: 'b', blockTypes: ['slack'], property: 'P1', status: 'failed' }) - report.record({ caseId: 'c', blockTypes: ['slack'], property: 'P1', status: 'skipped' }) - report.record({ - caseId: 'd', - blockTypes: ['slack', 'slack'], - property: 'P1', - status: 'errored', - }) - const built = report.build({ generatedAt: 'now' }) - expect(built.parity.slack?.P1).toEqual({ - passed: 1, - failed: 1, - skipped: 1, - errored: 1, - rate: 1 / 3, - }) - expect(built.parity.start_trigger?.P1?.rate).toBe(1) - expect(built.status).toBe('failed') - expect(built.caseCount).toBe(4) - expect(built.failures.map((f) => f.caseId)).toEqual(['b', 'd']) - }) - - it('reports a run with a skipped property as incomplete, never passed', () => { - const report = createProofReport('roundtrip-corpus') - report.record({ caseId: 'a', blockTypes: ['agent'], property: 'O1', status: 'passed' }) - report.skipProperty('P1', 'missing @sim/workflow-code#printWorkflow') - expect(report.build({ generatedAt: 'now' }).status).toBe('incomplete') - }) - - it('caps the failure list and counts the overflow', () => { - const report = createProofReport('s', { failureLimit: 2 }) - for (const id of ['a', 'b', 'c']) { - report.record({ caseId: id, blockTypes: [], property: 'O2', status: 'failed' }) - } - const built = report.build({ generatedAt: 'now' }) - expect(built.failures).toHaveLength(2) - expect(built.truncatedFailures).toBe(1) - }) -}) From 5baf1841d3f854852d33c707538e03d753e37afc Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 23:48:37 -0800 Subject: [PATCH 133/428] refactor(workflows): decompose source apply and drop the dead layout and annotateIds options Removes `layout: 'lock'` (v2 apply contract, route, materialize option, apply's layoutChanged/lockPositioned merge) and `annotateIds` (both source routes, the query contract, get, the CLI flag), then regenerates OpenAPI, CLI types and docs. Positions follow one rule: prev position for an existing block, else the lock layout, else targeted autolayout. Splits apply-workflow-source.ts into lib/workflows/code/apply/: - evaluate.ts: compile, lock parse, materialize (with the claimed-id rematerialize), diffs, gates, hosted-key drop, normalize, lint -> plan or refusals - commit.ts: the replace under the row lock, the create transaction, the dry-run preview - print.ts: printStoredSource (shared with get), fingerprintOf, boundLock - locate.ts: locator, lint diagnostics, value normalization, diff summary and moves source/{gates,protected,graph-diff}.ts beside them. The use cases build every response through one result builder, and the graph no-op is CanonicalDiff.noop with the source's (never applied) meta excluded. --- apps/docs/content/docs/cli/reference.mdx | 2 - apps/docs/content/docs/cli/workflows.mdx | 2 - apps/docs/openapi-v2-workflows.json | 15 - .../[workflowId]/source/route.test.ts | 7 +- .../v2/workflows/[workflowId]/source/route.ts | 2 - .../app/api/workflows/[id]/source/route.ts | 1 - .../lib/api/contracts/v2/workflow-source.ts | 8 - apps/sim/lib/api/contracts/workflow-source.ts | 4 - ...pply-workflow-source.parity.integration.ts | 6 +- .../application/apply-workflow-source.ts | 1402 +++-------------- .../application/get-workflow-source.ts | 104 +- apps/sim/lib/workflows/code/apply/commit.ts | 236 +++ apps/sim/lib/workflows/code/apply/evaluate.ts | 405 +++++ .../{source => code/apply}/gates.test.ts | 6 +- .../workflows/{source => code/apply}/gates.ts | 2 +- .../{source => code/apply}/graph-diff.ts | 0 apps/sim/lib/workflows/code/apply/locate.ts | 341 ++++ apps/sim/lib/workflows/code/apply/print.ts | 135 ++ .../{source => code/apply}/protected.test.ts | 4 +- .../{source => code/apply}/protected.ts | 2 +- .../lib/workflows/code/stored-canonical.ts | 2 +- apps/sim/scripts/test-workflow-source-e2e.ts | 5 +- .../protocol/workflow-source-get.test.ts | 4 +- packages/sim-cli/src/generated/v2-api.ts | 12 - packages/workflow-code/src/api.ts | 5 - packages/workflow-code/src/lock.ts | 2 +- .../workflow-code/src/materialize/block.ts | 8 +- .../src/materialize/index.test.ts | 7 - .../workflow-code/src/materialize/index.ts | 1 - 29 files changed, 1355 insertions(+), 1375 deletions(-) create mode 100644 apps/sim/lib/workflows/code/apply/commit.ts create mode 100644 apps/sim/lib/workflows/code/apply/evaluate.ts rename apps/sim/lib/workflows/{source => code/apply}/gates.test.ts (99%) rename apps/sim/lib/workflows/{source => code/apply}/gates.ts (99%) rename apps/sim/lib/workflows/{source => code/apply}/graph-diff.ts (100%) create mode 100644 apps/sim/lib/workflows/code/apply/locate.ts create mode 100644 apps/sim/lib/workflows/code/apply/print.ts rename apps/sim/lib/workflows/{source => code/apply}/protected.test.ts (98%) rename apps/sim/lib/workflows/{source => code/apply}/protected.ts (99%) diff --git a/apps/docs/content/docs/cli/reference.mdx b/apps/docs/content/docs/cli/reference.mdx index 8562844fbd6..216d0bc460d 100644 --- a/apps/docs/content/docs/cli/reference.mdx +++ b/apps/docs/content/docs/cli/reference.mdx @@ -8285,8 +8285,6 @@ sim workflows source get [options] | Option | Required | Description | | --- | --- | --- | -| `--annotate-ids` | No | Print each block's id as a trailing `// id:` comment on its declaration. | -| `--no-annotate-ids` | No | Send --annotate-ids as false. | | `--function-code ` | No | Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates. Accepted values: `inline`, `files`. | | `--out ` | No | Write the source, its lock and SDK type declarations into this directory instead of printing them. | diff --git a/apps/docs/content/docs/cli/workflows.mdx b/apps/docs/content/docs/cli/workflows.mdx index 8cd4b978a1e..3f3732b81ff 100644 --- a/apps/docs/content/docs/cli/workflows.mdx +++ b/apps/docs/content/docs/cli/workflows.mdx @@ -1309,8 +1309,6 @@ sim workflows source get [options] | Option | Required | Description | | --- | --- | --- | -| `--annotate-ids` | No | Print each block's id as a trailing `// id:` comment on its declaration. | -| `--no-annotate-ids` | No | Send --annotate-ids as false. | | `--function-code ` | No | Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates. Accepted values: `inline`, `files`. | | `--out ` | No | Write the source, its lock and SDK type declarations into this directory instead of printing them. | diff --git a/apps/docs/openapi-v2-workflows.json b/apps/docs/openapi-v2-workflows.json index 9d0273c610a..dc330d8859a 100644 --- a/apps/docs/openapi-v2-workflows.json +++ b/apps/docs/openapi-v2-workflows.json @@ -5936,16 +5936,6 @@ "examples": ["3b1f7c92-8d4e-4a6b-9c0d-5e2f8a714b36"] } }, - { - "name": "annotateIds", - "in": "query", - "required": false, - "description": "Print each block's id as a trailing `// id:` comment on its declaration.", - "schema": { - "description": "Print each block's id as a trailing `// id:` comment on its declaration.", - "type": "boolean" - } - }, { "name": "functionCode", "in": "query", @@ -18935,11 +18925,6 @@ "maxLength": 256, "description": "The `fingerprint` the source was read at. The apply answers `409` when the saved draft no longer matches it." }, - "layout": { - "description": "`preserve` (default): existing blocks keep their canvas positions and lock positions apply only to new blocks. `lock`: every block the lock positions moves there.", - "type": "string", - "enum": ["preserve", "lock"] - }, "provenance": { "description": "Where the source came from, for the audit log.", "type": "object", diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts index fe01dd89c88..667db75afb8 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts @@ -102,19 +102,18 @@ describe('GET /api/v2/workflows/{workflowId}/source', () => { expect(mocks.read).not.toHaveBeenCalled() }) - it('passes annotateIds as a boolean and functionCode through, omitting absent flags', async () => { - await GET(request('?annotateIds=1&functionCode=inline'), context) + it('passes functionCode through, omitting it when absent', async () => { + await GET(request('?functionCode=inline'), context) await GET(request(), context) expect(mocks.read.mock.calls[0][0].input).toEqual({ workflowId: WORKFLOW_ID, - annotateIds: true, functionCode: 'inline', }) expect(mocks.read.mock.calls[1][0].input).toEqual({ workflowId: WORKFLOW_ID }) }) - it.each(['?functionCode=ts', '?annotate=true'])( + it.each(['?functionCode=ts', '?annotateIds=true'])( 'rejects %s with 400 before reading the workflow', async (query) => { const response = await GET(request(query), context) diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts index 110c5f220e8..879846801fc 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts @@ -30,7 +30,6 @@ export const GET = defineV2JsonRoute({ errorPolicy: v2WorkflowErrorPolicies.concealWorkflowAuthorization, mapInput: ({ params, query }) => ({ workflowId: params.workflowId, - ...(query.annotateIds !== undefined ? { annotateIds: query.annotateIds } : {}), ...(query.functionCode ? { functionCode: query.functionCode } : {}), }), useCase: getWorkflowSource, @@ -56,7 +55,6 @@ export const POST = defineV2JsonRoute({ lock: body.lock, baseFingerprint: body.baseFingerprint, ...(body.lockBase ? { lockBase: body.lockBase } : {}), - ...(body.layout ? { layout: body.layout } : {}), ...(body.provenance ? { provenance: body.provenance } : {}), ...(query.dryRun !== undefined ? { dryRun: query.dryRun } : {}), }), diff --git a/apps/sim/app/api/workflows/[id]/source/route.ts b/apps/sim/app/api/workflows/[id]/source/route.ts index 49d895a1cd2..2818418a12e 100644 --- a/apps/sim/app/api/workflows/[id]/source/route.ts +++ b/apps/sim/app/api/workflows/[id]/source/route.ts @@ -24,7 +24,6 @@ export const GET = defineInternalJsonRoute({ errorPolicy: internalWorkflowErrorPolicies.concealWorkflowAuthorization, mapInput: ({ params, query }) => ({ workflowId: params.id, - ...(query.annotateIds !== undefined ? { annotateIds: query.annotateIds } : {}), ...(query.functionCode ? { functionCode: query.functionCode } : {}), }), useCase: getWorkflowSource, diff --git a/apps/sim/lib/api/contracts/v2/workflow-source.ts b/apps/sim/lib/api/contracts/v2/workflow-source.ts index 79447b65499..b9520a0c64b 100644 --- a/apps/sim/lib/api/contracts/v2/workflow-source.ts +++ b/apps/sim/lib/api/contracts/v2/workflow-source.ts @@ -87,14 +87,6 @@ const applyWorkflowSourceBodySchema = z .describe( 'The `fingerprint` the source was read at. The apply answers `409` when the saved draft no longer matches it.' ), - layout: z - .enum(['preserve', 'lock'], { - error: 'layout: expected one of "preserve" | "lock"', - }) - .optional() - .describe( - '`preserve` (default): existing blocks keep their canvas positions and lock positions apply only to new blocks. `lock`: every block the lock positions moves there.' - ), provenance: provenanceSchema, }) .strict() diff --git a/apps/sim/lib/api/contracts/workflow-source.ts b/apps/sim/lib/api/contracts/workflow-source.ts index 1732c88792b..64beac5472f 100644 --- a/apps/sim/lib/api/contracts/workflow-source.ts +++ b/apps/sim/lib/api/contracts/workflow-source.ts @@ -1,5 +1,4 @@ import { z } from 'zod' -import { booleanQueryFlagSchema } from '@/lib/api/contracts/primitives' import { defineRouteContract } from '@/lib/api/contracts/types' import { workflowIdParamsSchema } from '@/lib/api/contracts/workflows' @@ -12,9 +11,6 @@ import { workflowIdParamsSchema } from '@/lib/api/contracts/workflows' export const workflowSourceQuerySchema = z .object({ - annotateIds: booleanQueryFlagSchema - .optional() - .describe("Print each block's id as a trailing `// id:` comment on its declaration."), functionCode: z .enum(['inline', 'files'], { error: 'functionCode: expected one of "inline" | "files"', diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts b/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts index d91b6b84967..3d8aca22b7e 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts @@ -29,14 +29,14 @@ import { withPermissionGroupScope } from '@/lib/permission-groups/request-scope. import { applyWorkflowSource } from '@/lib/workflows/application/apply-workflow-source' import { getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' import { WorkflowSourceRejectedError } from '@/lib/workflows/application/source-error' +import { gateSourceDiff, SKIP_TYPE_APPLY_CODES } from '@/lib/workflows/code/apply/gates' +import type { SourceGraph } from '@/lib/workflows/code/apply/graph-diff' +import { findProtectedBlockRefusals } from '@/lib/workflows/code/apply/protected' import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' import { buildLockFromState } from '@/lib/workflows/code/source-lock' import { loadWorkflowFromNormalizedTables } from '@/lib/workflows/persistence/utils' -import { gateSourceDiff, SKIP_TYPE_APPLY_CODES } from '@/lib/workflows/source/gates' -import type { SourceGraph } from '@/lib/workflows/source/graph-diff' -import { findProtectedBlockRefusals } from '@/lib/workflows/source/protected' import { getBlockRegistry } from '@/blocks/registry' import { SDK_NAMES } from '@/blocks/sdk-names.generated' import { getToolMetadata } from '@/tools/metadata' diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.ts b/apps/sim/lib/workflows/application/apply-workflow-source.ts index b10da870f1f..accd61398ad 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.ts @@ -5,57 +5,26 @@ import { resolvePrincipalSubjectUserId, } from '@sim/auth/principal' import { db } from '@sim/db' -import { workflowBlocks, workflow as workflowTable } from '@sim/db/schema' import { createLogger } from '@sim/logger' import { assertFolderMutable, FolderLockedError } from '@sim/platform-authz/workflow' import { generateId } from '@sim/utils/id' -import { omit } from '@sim/utils/object' import { - type AnchorKey, - type BlockCatalog, - type CanonicalDiff, type CanonicalizeResult, - type CanonicalWorkflowMeta, - type CompileResult, - canonicalize, - codeFrame, - compileWorkflow, - type Diagnostic, - diffCanonical, - encodeAnchor, type LockBase, - type LockIdentity, - type MaterializeResult, - materialize, - parseWorkflowLock, - printWorkflow, - type ResourceKeyResolver, - type ResourceKind, - renamesBetween, - type SourceFingerprint, - type SourceSpan, sourceFingerprint, type WorkflowCodeMetaV1, - type WorkflowLockBlock, type WorkflowLockV1, } from '@sim/workflow-code' -import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' -import { catalogBlock } from '@sim/workflow-code/catalog/view' import { readWorkflowCodeMeta, writeWorkflowCodeMeta } from '@sim/workflow-persistence/code-meta' -import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' -import { and, eq, inArray, isNull, ne } from 'drizzle-orm' +import type { WorkflowState } from '@sim/workflow-types/workflow' import { isEqual } from 'es-toolkit' import { resolveCatalogGate, withCatalogBlockScope } from '@/lib/catalog/application/context' import { principalAuditSource } from '@/lib/core/application' import { OrchestrationError } from '@/lib/core/orchestration/types' -import type { DbOrTx } from '@/lib/db/types' -import { resolvePermissionGroupConfig } from '@/lib/permission-groups/config-scope.server' import { notifyWorkflowUpdated, notifyWorkspaceWorkflowsChanged } from '@/lib/realtime/notify' import { defineAuthorizedWorkflowUseCase } from '@/lib/workflows/application/authorized-workflow-use-case' import type { ActiveWorkflowApplicationContext } from '@/lib/workflows/application/context' import { resolveWorkflowFolderPath } from '@/lib/workflows/application/folders' -import { layoutChangedBlocks } from '@/lib/workflows/application/graph-write' -import { snapshotMcpToolOutputSchemas } from '@/lib/workflows/application/mcp-output-schemas' import { requireMutableWorkflow } from '@/lib/workflows/application/mutability' import { workflowOperations } from '@/lib/workflows/application/operations' import { resolvePrincipalWorkflowContext } from '@/lib/workflows/application/principal-scope' @@ -65,71 +34,35 @@ import { WorkflowSourceRejectedError, WorkflowSourceStaleError, } from '@/lib/workflows/application/source-error' -import { requireWorkflowTransition } from '@/lib/workflows/application/transition-result' -import { normalizeWorkflowVariables } from '@/lib/workflows/application/workflow-variables' +import { + commitSourceCreate, + commitSourceReplace, + previewSourceCommit, +} from '@/lib/workflows/code/apply/commit' +import { evaluateSource } from '@/lib/workflows/code/apply/evaluate' +import { emptyDiffSummary, type SourceDiffSummary } from '@/lib/workflows/code/apply/locate' +import { + type PrintedSource, + printStoredSource, + type StoredSource, +} from '@/lib/workflows/code/apply/print' import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog' import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' -import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' -import { loadResourceKeyResolver } from '@/lib/workflows/code/resources' -import { - buildLockFromState, - codeMetaPrintInputs, - mergeCodeMetaFromLock, -} from '@/lib/workflows/code/source-lock' -import { canonicalizeStored, canonicalizeUnderLock } from '@/lib/workflows/code/stored-canonical' +import { canonicalizeStored } from '@/lib/workflows/code/stored-canonical' import { checkNeedsRedeployment } from '@/lib/workflows/deployment-status' -import type { WorkflowLintReport } from '@/lib/workflows/editing/lint' -import { buildWorkflowLintReport } from '@/lib/workflows/editing/lint-report' -import { validateValueForSubBlockType } from '@/lib/workflows/editing/validation' -import { performCreateWorkflowTransition } from '@/lib/workflows/orchestration' -import { assertNoWithheldBlockType } from '@/lib/workflows/persistence/block-access-guard' -import { extractAndPersistCustomTools } from '@/lib/workflows/persistence/custom-tools-persistence' -import { - type PreparedWorkflowState, - prepareWorkflowStateForPersistence, -} from '@/lib/workflows/persistence/prepare-state' -import { - assertWorkflowGraphIdsUnclaimed, - collectWorkflowGraphIds, - replaceWorkflowNormalizedState, - WorkflowStatePersistenceError, -} from '@/lib/workflows/persistence/replace-normalized-state' -import { - loadWorkflowFromNormalizedTables, - saveWorkflowToNormalizedTables, -} from '@/lib/workflows/persistence/utils' -import { validateWorkflowState } from '@/lib/workflows/sanitization/validation' -import { gateSourceDiff } from '@/lib/workflows/source/gates' -import { diffGraphs, type GraphDiff, type SourceGraph } from '@/lib/workflows/source/graph-diff' -import { - assertProtectedBlocksPreserved, - findProtectedBlockRefusals, -} from '@/lib/workflows/source/protected' -import { buildSubBlockValues } from '@/lib/workflows/subblocks/visibility' -import { parseWorkflowVariables } from '@/lib/workflows/variables/parse' import { type ActiveWorkspaceApplicationContext, resolveActiveWorkspaceApplicationContext, } from '@/lib/workspaces/application/context' -import type { ResourceKeyRef } from '@/lib/workspaces/resource-bindings' -import { getBlock } from '@/blocks/registry' const logger = createLogger('ApplyWorkflowSource') -/** The entry file every submission carries; function code lives beside it. */ -const ENTRY_FILE = 'workflow.ts' -/** Where function code is re-printed when the submission used code files (as `source get` does). */ -const FUNCTION_CODE_DIR = 'functions' -const CONTAINER_TYPES: ReadonlySet = new Set(['loop', 'parallel']) - /** What every source submission carries, whether it updates a draft or creates a workflow. */ interface SourceSubmission { /** Repo-relative path → text: `workflow.ts` plus any function-code files it references. */ files: Record /** Run the whole pipeline and stop before the write. Never audits or notifies. */ dryRun?: boolean - /** `preserve` (default): existing blocks keep stored positions. `lock`: lock layout wins. */ - layout?: 'preserve' | 'lock' provenance?: { client: 'cli' | 'copilot' | 'canvas' | 'api'; gitSha?: string; repo?: string } } @@ -154,42 +87,6 @@ export interface CreateWorkflowFromSourceInput extends SourceSubmission { folderPath?: string } -/** - * Where a source apply writes: the stored draft of an existing workflow, or a new workflow the - * apply creates, with an empty graph standing in for the stored one (no prev). - */ -type SourceApplyTarget = - | { kind: 'existing'; context: ActiveWorkflowApplicationContext } - | { - kind: 'new' - workspace: ActiveWorkspaceApplicationContext - workflowId: string - name?: string - description?: string | null - folderId: string | null - } - -/** The lock a new workflow starts from: nothing bound yet. */ -const EMPTY_LOCK: WorkflowLockV1 = { lockVersion: 1, blocks: {}, variables: {} } - -interface SourceBlockRef { - id: string - key: string -} - -/** What the apply changed (or, on a dry run, would change), by stored id and source key. */ -interface SourceDiffSummary { - noop: boolean - blocks: { - added: SourceBlockRef[] - removed: SourceBlockRef[] - renamed: Array<{ id: string; from: string; to: string }> - modified: Array - } - edges: { added: number; removed: number } - variables: { added: string[]; removed: string[]; modified: string[] } -} - interface ApplyWorkflowSourceResult { workflowId: string workflowName: string @@ -214,626 +111,27 @@ interface ApplyWorkflowSourceResult { catalogVersion: string } -type AnyDiagnostic = Diagnostic - -/** The stored draft as canonicalize reads it, plus the row fields the CWM `meta` carries. */ -interface StoredSource { - state: WorkflowState - meta: CanonicalWorkflowMeta -} - -/** - * The stored draft through the same loader `source get` reads, so the two compute the same - * fingerprint. With `tx` (under the row lock) the blocks and the row are re-read in it. - */ -async function loadStoredSource( - context: ActiveWorkflowApplicationContext, - tx?: DbOrTx -): Promise { - if (!tx) { - const graph = await loadWorkflowGraph(context) - return { - state: { - blocks: graph.blocks, - edges: graph.edges, - loops: graph.loops, - parallels: graph.parallels, - variables: graph.variables, - }, - meta: { name: context.workflow.name, description: context.workflow.description ?? null }, - } - } - const [normalized, [row]] = await Promise.all([ - loadWorkflowFromNormalizedTables(context.workflowId, tx), - tx - .select({ - name: workflowTable.name, - description: workflowTable.description, - variables: workflowTable.variables, - }) - .from(workflowTable) - .where(and(eq(workflowTable.id, context.workflowId), isNull(workflowTable.archivedAt))) - .limit(1), - ]) - if (!row) throw new OrchestrationError('not_found', 'Workflow not found') - return { - state: { - blocks: (normalized?.blocks ?? {}) as Record, - edges: (normalized?.edges ?? []) as WorkflowState['edges'], - loops: normalized?.loops ?? {}, - parallels: normalized?.parallels ?? {}, - variables: parseWorkflowVariables(row.variables) ?? {}, - }, - meta: { name: row.name, description: row.description ?? null }, - } -} - -/** The `sf1:` fingerprint exactly as `source get` computes it (no lock). */ -function fingerprintOf( - stored: StoredSource, - catalog: BlockCatalog, - resources: ResourceKeyResolver -): SourceFingerprint { - const { workflow, identity } = canonicalize(stored.state, { - catalog, - meta: stored.meta, - resources, - }) - return sourceFingerprint(workflow, identity) -} - -/** Every `(kind, key)` resource reference in a compiled model, for binding lookup. */ -function collectResourceKeys(value: unknown, refs: ResourceKeyRef[]): void { - if (Array.isArray(value)) { - for (const item of value) collectResourceKeys(item, refs) - return - } - if (value === null || typeof value !== 'object') return - const record = value as Record - if ( - record.$sim === 'resource' && - typeof record.kind === 'string' && - typeof record.key === 'string' - ) { - refs.push({ kind: record.kind as ResourceKind, key: record.key }) - } - for (const nested of Object.values(record)) collectResourceKeys(nested, refs) -} - -/** - * A lock carrying only identity. `canonicalize` reads a lock's ids and branch keys and nothing - * else, so the printer-owned fields are placeholders here; the real ones come from the print. - */ -function identityLock(identity: LockIdentity): WorkflowLockV1 { - const blocks: Record = {} - for (const [key, block] of Object.entries(identity.blocks)) { - blocks[key] = { ...block, binding: key, order: 0 } - } - return { lockVersion: 1, blocks, variables: identity.variables } -} - -function spanAnchors(diagnostic: AnyDiagnostic): AnchorKey[] { - if (!diagnostic.blockKey) return [] - const anchors: AnchorKey[] = [] - if (diagnostic.param) { - anchors.push( - encodeAnchor({ kind: 'param', block: diagnostic.blockKey, param: diagnostic.param }) - ) - } - anchors.push(encodeAnchor({ kind: 'block', block: diagnostic.blockKey })) - return anchors -} - -/** - * Pins findings to the submitted text. A compile finding already has its span; a server finding - * (gate, value, lint) is placed on its param, else its block declaration, through the compile - * span map (s4 step 9). - */ -function createLocator( - files: Record, - spans: CompileResult['spans'], - idByKey: ReadonlyMap -) { - return (diagnostic: AnyDiagnostic): WorkflowSourceDiagnostic => { - let span: SourceSpan | undefined = diagnostic.span - if (!span) { - for (const anchor of spanAnchors(diagnostic)) { - const found = spans[anchor] - if (found) { - span = found - break - } - } - } - const text = span ? files[span.file] : undefined - const blockId = - diagnostic.blockId ?? (diagnostic.blockKey ? idByKey.get(diagnostic.blockKey) : undefined) - return { - code: diagnostic.code, - severity: diagnostic.severity, - message: diagnostic.message, - ...(diagnostic.hint !== undefined ? { hint: diagnostic.hint } : {}), - ...(span - ? { - file: span.file, - line: span.line, - column: span.column, - endLine: span.endLine, - endColumn: span.endColumn, - } - : {}), - ...(diagnostic.frame !== undefined - ? { frame: diagnostic.frame } - : span && text !== undefined - ? { - frame: codeFrame(text, { - line: span.line, - column: span.column, - endLine: span.endLine, - endColumn: span.endColumn, - }), - } - : {}), - ...(diagnostic.blockKey !== undefined ? { blockKey: diagnostic.blockKey } : {}), - ...(blockId !== undefined ? { blockId } : {}), - ...(diagnostic.param !== undefined ? { param: diagnostic.param } : {}), - ...(diagnostic.path !== undefined ? { path: diagnostic.path } : {}), - } - } -} - -function hasErrors(diagnostics: readonly { severity: string }[]): boolean { - return diagnostics.some((diagnostic) => diagnostic.severity === 'error') -} - -/** Block ids another workflow already stores, among `ids`. */ -async function findBlockIdsClaimedElsewhere(workflowId: string, ids: string[]): Promise { - if (ids.length === 0) return [] - const rows = await db - .select({ id: workflowBlocks.id }) - .from(workflowBlocks) - .where(and(inArray(workflowBlocks.id, ids), ne(workflowBlocks.workflowId, workflowId))) - return rows.map((row) => row.id) -} - -function withBlock( - blocks: Record, - id: string, - update: (block: BlockState) => BlockState -): Record { - return { ...blocks, [id]: update(blocks[id]) } -} - -/** Subblock ids a diff sets on a block: every one for an added block. */ -function changedFieldsOf(block: BlockState, diff: GraphDiff): string[] { - const modified = diff.modified.find((change) => change.id === block.id) - return modified ? modified.subBlocks : Object.keys(block.subBlocks ?? {}) -} - -interface NormalizedBlocks { - blocks: Record - diagnostics: AnyDiagnostic[] -} - -/** - * The replace path's value checks, on the blocks this apply adds or changes (s4 step 7): - * `validateWorkflowState` with sanitization, then `validateValueForSubBlockType` on each changed, - * currently visible field. An invalid value refuses the apply; a value either step rewrites is - * kept rewritten and reported as `W_APPLY_VALUE_NORMALIZED`. Untouched blocks keep their bytes. - */ -function normalizeChangedValues( - input: Record, - diff: GraphDiff, - keyOf: (id: string) => string -): NormalizedBlocks { - let blocks = input - const diagnostics: AnyDiagnostic[] = [] - const changedIds = [...diff.added, ...diff.modified.map((change) => change.id)] - for (const id of changedIds) { - const original = blocks[id] - if (!original || CONTAINER_TYPES.has(original.type)) continue - const blockKey = keyOf(id) - - const validation = validateWorkflowState( - { blocks: { [id]: original }, edges: [], loops: {}, parallels: {} }, - { sanitize: true } - ) - for (const error of validation.errors) { - diagnostics.push({ - code: 'E_APPLY_INVALID_STATE', - severity: 'error', - message: error, - blockId: id, - blockKey, - }) - } - const sanitized = validation.sanitizedState?.blocks[id] - if (sanitized && !isEqual(sanitized, original)) { - blocks = { ...blocks, [id]: sanitized } - diagnostics.push({ - code: 'W_APPLY_VALUE_NORMALIZED', - severity: 'warning', - message: `Block "${original.name}": ${validation.warnings.join('; ') || 'values were sanitized'}`, - blockId: id, - blockKey, - }) - } - - const block = blocks[id] - const config = getBlock(block.type) - if (!config) continue - const values = buildSubBlockValues(block.subBlocks) - const visible = new Map( - config.subBlocks - .filter((field) => evaluateSubBlockCondition(field.condition, values)) - .map((field) => [field.id, field]) - ) - let subBlocks = block.subBlocks - for (const fieldId of changedFieldsOf(original, diff)) { - const field = visible.get(fieldId) - const stored = subBlocks?.[fieldId] - if (!field || !stored) continue - const result = validateValueForSubBlockType(field, stored.value, field.id, block.type, id) - if (!result.valid) { - diagnostics.push({ - code: 'E_APPLY_INVALID_SUBBLOCK_FIELD', - severity: 'error', - message: result.error?.error ?? `Invalid value for ${field.id}`, - blockId: id, - blockKey, - param: fieldId, - }) - continue - } - if (!isEqual(result.value, stored.value) || stored.type !== field.type) { - if (!isEqual(result.value, stored.value)) { - diagnostics.push({ - code: 'W_APPLY_VALUE_NORMALIZED', - severity: 'warning', - message: `Block "${block.name}": ${field.id} was normalized to the field's stored form`, - blockId: id, - blockKey, - param: fieldId, - }) - } - subBlocks = { - ...subBlocks, - [fieldId]: { ...stored, value: result.value, type: field.type }, - } - } - } - if (subBlocks !== block.subBlocks) { - blocks = withBlock(blocks, id, (current) => ({ ...current, subBlocks })) - } - } - return { blocks, diagnostics } -} - /** - * Lint findings as source diagnostics. A structural finding (a connection to an invalid target, - * an invalid branch port, a reference to an output no block provides) on a block this apply adds - * or changes is blocking (`E_APPLY_LINT`); every other finding, and any finding on a block the - * apply left alone, is a warning. A canvas can save all of these, so only what the apply itself - * introduces is refused. - */ -function lintDiagnostics( - lint: WorkflowLintReport, - changedIds: ReadonlySet, - keyOf: (id: string) => string | undefined -): AnyDiagnostic[] { - const diagnostics: AnyDiagnostic[] = [] - const push = (blocking: boolean, blockId: string, message: string, param?: string) => { - const blockKey = keyOf(blockId) - const located = { - message, - blockId, - ...(blockKey !== undefined ? { blockKey } : {}), - ...(param !== undefined ? { param } : {}), - } - diagnostics.push( - blocking && changedIds.has(blockId) - ? { code: 'E_APPLY_LINT', severity: 'error', ...located } - : { code: 'W_APPLY_LINT', severity: 'warning', ...located } - ) - } - for (const target of lint.invalidConnectionTargets) { - push(true, target.sourceBlockId, `Connection to ${target.targetBlockId}: ${target.reason}`) - } - for (const port of lint.invalidBranchPorts) { - push(true, port.blockId, `Branch port ${port.sourceHandle}: ${port.reason}`) - } - for (const reference of lint.unresolvedReferences) { - push( - reference.kind === 'block-output', - reference.blockId, - `${reference.field}: ${reference.reason}`, - reference.field - ) - } - for (const issue of lint.fieldIssues) { - for (const field of issue.missingRequiredFields) { - push(false, issue.blockId, `Required field ${field} is empty`, field) - } - } - for (const issue of lint.tableFieldIssues) { - push( - false, - issue.blockId, - `${issue.field} is not a column of table "${issue.tableName}"`, - issue.field - ) - } - for (const orphan of lint.orphanBlocks) { - push(false, orphan.blockId, 'Block has no incoming connection') - } - for (const port of lint.emptyOutgoingPorts) { - push(false, port.blockId, `Port ${port.label} has no connection`) - } - if (lint.manualRunIssue) { - const blockId = lint.manualRunIssue.blockId - if (blockId) push(false, blockId, lint.manualRunIssue.message) - else { - diagnostics.push({ - code: 'W_APPLY_LINT', - severity: 'warning', - message: lint.manualRunIssue.message, - }) - } - } - return diagnostics -} - -function summarizeDiff( - diff: CanonicalDiff, - baseIdentity: LockIdentity, - targetIdentity: LockIdentity, - noop: boolean -): SourceDiffSummary { - const targetId = (key: string) => targetIdentity.blocks[key]?.id ?? '' - const baseId = (key: string) => baseIdentity.blocks[key]?.id ?? '' - return { - noop, - blocks: { - added: diff.blocks.added.map((key) => ({ id: targetId(key), key })), - removed: diff.blocks.removed.map((key) => ({ id: baseId(key), key })), - renamed: diff.blocks.renamed.map(({ from, to }) => ({ id: targetId(to), from, to })), - modified: diff.blocks.modified.map((change) => { - const fields = change.changes.map((item) => - item.kind === 'param' - ? item.param - : item.kind === 'mode' - ? `modes.${item.canonicalParamId}` - : item.attribute - ) - const reparented = change.changes.some( - (item) => item.kind === 'attribute' && item.attribute === 'parent' - ) - return { - id: targetId(change.key), - key: change.key, - fields, - ...(reparented ? { reparented } : {}), - } - }), - }, - edges: { added: diff.edges.added.length, removed: diff.edges.removed.length }, - variables: { - added: diff.variables.added, - removed: diff.variables.removed, - modified: diff.variables.modified, - }, - } -} - -/** - * Existing blocks keep the positions stored at write time, so a canvas drag that landed during - * the apply survives it (s4 D3). With `layout: 'lock'`, a block the lock positions keeps that. + * Where a source apply writes: the stored draft of an existing workflow, or a new workflow the + * apply creates, with an empty graph standing in for the stored one. */ -function mergeCurrentLayout( - target: Record, - current: Record, - lockPositioned: ReadonlySet -): Record { - const merged: Record = {} - for (const [id, block] of Object.entries(target)) { - const stored = current[id] - if (!stored || lockPositioned.has(id)) { - merged[id] = block - continue - } - const next: BlockState = { - ...omit(block, ['height', 'layout']), - position: stored.position, - ...(stored.height !== undefined ? { height: stored.height } : {}), - ...(stored.layout !== undefined ? { layout: stored.layout } : {}), - } - if (block.data) { - next.data = { - ...omit(block.data, ['width', 'height']), - ...(stored.data?.width !== undefined ? { width: stored.data.width } : {}), - ...(stored.data?.height !== undefined ? { height: stored.data.height } : {}), - } +type SourceApplyTarget = + | { kind: 'existing'; context: ActiveWorkflowApplicationContext; baseFingerprint: string } + | { + kind: 'new' + workspace: ActiveWorkspaceApplicationContext + workflowId: string + create: { name?: string; description?: string | null } + folderId: string | null } - merged[id] = isEqual(next, block) ? block : next - } - return merged -} - -interface Reprinted { - files: Record - lock: WorkflowLockV1 - fingerprint: SourceFingerprint -} - -/** What a re-print of one state reads, computed once however many prints share it. */ -interface PrintBase { - /** The state canonicalized under the bound identity, so branch keys follow the lock. */ - canonical: CanonicalizeResult - /** The `sf1:` fingerprint exactly as `source get` computes it (no lock). */ - fingerprint: SourceFingerprint -} - -/** - * The canonical model and fingerprint of `state` for a re-print. `lockless` is the state's - * lockless canonical model when the caller already holds it; it is reused for the fingerprint and, - * when the identity lock changes nothing, for the print. - */ -function printBase(args: { - state: WorkflowState - meta: CanonicalWorkflowMeta - identity: LockIdentity - catalog: BlockCatalog - resources: ResourceKeyResolver - lockless?: CanonicalizeResult -}): PrintBase { - const { state, meta, identity, catalog, resources } = args - const lockless = args.lockless ?? canonicalize(state, { catalog, meta, resources }) - return { - canonical: canonicalizeUnderLock( - state, - { catalog, meta, resources }, - lockless, - identityLock(identity) - ), - fingerprint: sourceFingerprint(lockless.workflow, lockless.identity), - } -} - -/** - * Prints a state back as source with the bindings, order and comments of `codeMeta` (the - * submission's, merged onto the ids it now binds), so the response shows exactly what is (or - * would be) stored and what the next `source get` prints. The lock is assembled the way `source - * get` assembles it, and the fingerprint is computed the way it computes it, so it is the next - * apply's base. - */ -function reprint(args: { - base: PrintBase - codeMeta: WorkflowCodeMetaV1 | null - usesCodeFiles: boolean - catalog: BlockCatalog -}): Reprinted { - const { base, codeMeta, usesCodeFiles, catalog } = args - const { canonical } = base - const metaInputs = codeMetaPrintInputs(codeMeta, canonical) - const printed = printWorkflow({ - workflow: { - ...canonical.workflow, - annotations: { ...canonical.workflow.annotations, comments: metaInputs.comments }, - }, - catalog, - hints: metaInputs.hints, - options: usesCodeFiles - ? { functionCode: 'files', codeDir: FUNCTION_CODE_DIR } - : { functionCode: 'inline' }, - }) - return { - files: Object.fromEntries(printed.files.map((file) => [file.path, file.text])), - lock: buildLockFromState(codeMeta, canonical, printed.hints), - fingerprint: base.fingerprint, - } -} - -/** - * The post-materialize lock `mergeCodeMetaFromLock` re-keys onto: every bound key with its id, - * and the submitted lock's binding and order for a block the file does not state them for. - */ -function boundLock(identity: LockIdentity, submitted: WorkflowLockV1): WorkflowLockV1 { - const blocks: Record = {} - for (const [key, block] of Object.entries(identity.blocks)) { - const previous = Object.hasOwn(submitted.blocks, key) ? submitted.blocks[key] : undefined - blocks[key] = { ...block, binding: previous?.binding ?? key, order: previous?.order ?? 0 } - } - return { lockVersion: 1, blocks, variables: identity.variables } -} - -function emptySummary(): SourceDiffSummary { - return { - noop: true, - blocks: { added: [], removed: [], renamed: [], modified: [] }, - edges: { added: 0, removed: 0 }, - variables: { added: [], removed: [], modified: [] }, - } -} /** - * Inserts a workflow created from source and its graph in one transaction: the row (with the - * create path's folder, name-conflict and sort rules), the prepared graph under the caller's block - * access, its variables and its `code_meta`. A name taken in the folder is a 409; any failure rolls - * the whole create back. - */ -async function createSourceWorkflow(args: { - target: Extract - name: string - description: string | null - subjectUserId: string - graph: Pick - variables: ReturnType | undefined - codeMeta: WorkflowCodeMetaV1 | null -}): Promise<{ name: string; state: PreparedWorkflowState; warnings: string[] }> { - const { target, subjectUserId } = args - const workspaceId = target.workspace.workspaceId - await assertNoWithheldBlockType({ workspaceId, subjectUserId }, Object.values(args.graph.blocks)) - const prepared = prepareWorkflowStateForPersistence(args.graph) - const transition = await performCreateWorkflowTransition({ - id: target.workflowId, - userId: subjectUserId, - workspaceId, - name: args.name, - description: args.description, - folderId: target.folderId, - writeGraph: async (tx, workflowId) => { - await assertWorkflowGraphIdsUnclaimed(tx, workflowId, collectWorkflowGraphIds(prepared.state)) - const saved = await saveWorkflowToNormalizedTables( - workflowId, - { ...prepared.state, lastSaved: Date.now() } as WorkflowState, - { workspaceId, subjectUserId }, - tx - ) - if (!saved.success) { - throw new WorkflowStatePersistenceError(saved.error ?? 'Unknown persistence failure') - } - if (args.variables !== undefined) { - await tx - .update(workflowTable) - .set({ variables: args.variables }) - .where(eq(workflowTable.id, workflowId)) - } - await writeWorkflowCodeMeta(tx, workflowId, args.codeMeta) - }, - }) - requireWorkflowTransition(transition, 'Failed to create workflow') - if (!transition.workflow) throw new Error('Successful workflow create returned no workflow') - - try { - const { errors } = await extractAndPersistCustomTools( - prepared.state, - workspaceId, - subjectUserId - ) - if (errors.length > 0) { - logger.warn('Some custom tools failed to persist', { workflowId: target.workflowId, errors }) - } - } catch (error) { - logger.error('Failed to persist custom tools', { workflowId: target.workflowId, error }) - } - return { name: transition.workflow.name, state: prepared.state, warnings: prepared.warnings } -} - -/** - * Applies workflow source (TypeScript) to the stored draft (build-spec decision 11, s4 D1–D12). - * - * The server compiles the submitted files against its live per-workflow catalog, materializes - * the model onto the stored graph (keeping every unchanged value's stored bytes and every id the - * lock binds), and refuses the whole write on any error: a compile error, a protected block, an - * engine gate (allowlists, credentials, trigger uniqueness, sandbox plan), an invalid value, a - * type that may stay but not be added, or a blocking lint finding. Errors carry source lines. - * - * The write is one `replaceWorkflowNormalizedState` under the workflow row lock, which re-checks - * the fingerprint (409 when the draft moved), keeps current canvas positions for existing blocks - * and asserts the protected-block merge is the identity, then stores the submission's bindings, - * order and comments in `workflow.code_meta` in the same transaction. A source that changes only - * those (a renamed const, a moved declaration, a comment) is a graph no-op that stores just - * `code_meta`, so the next `source get` prints it. Draft only: it never deploys. + * Applies workflow source (TypeScript) to the stored draft. The server compiles the files + * against its live per-workflow catalog and evaluates them onto the stored graph + * (`evaluateSource`); any error refuses the whole write, with source lines. The write is one + * replace under the workflow row lock that re-checks the fingerprint (409 when the draft moved) + * and stores the submission's bindings, order and comments in `code_meta`. A source that changes + * only those is a graph no-op that stores just `code_meta`. Draft only: it never deploys. */ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ operation: workflowOperations.applySource, @@ -841,7 +139,11 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ async execute({ principal, input, context }): Promise { await requireWorkflowCodeEnabled() await requireMutableWorkflow(context.workflowId) - return runSourceApply(principal, input, { kind: 'existing', context }) + return runSourceApply(principal, input, { + kind: 'existing', + context, + baseFingerprint: input.baseFingerprint, + }) }, /** Only a committed, non-empty apply is a change worth auditing. */ projectAudit: ({ principal, input, context, result }) => @@ -861,38 +163,11 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ }, }) -/** The audit metadata a committed source write records, for update and create alike. */ -function sourceAuditMetadata( - principal: Principal, - input: SourceSubmission, - result: ApplyWorkflowSourceResult -) { - return { - op: 'apply_source', - blocksAdded: result.diff.blocks.added.length, - blocksRemoved: result.diff.blocks.removed.length, - blocksRenamed: result.diff.blocks.renamed.length, - blocksModified: result.diff.blocks.modified.length, - edgesAdded: result.diff.edges.added, - edgesRemoved: result.diff.edges.removed, - variablesChanged: - result.diff.variables.added.length + - result.diff.variables.removed.length + - result.diff.variables.modified.length, - sdkMajor: result.sdkMajor, - catalogVersion: result.catalogVersion, - ...(input.provenance ? { client: input.provenance.client } : {}), - ...(input.provenance?.gitSha ? { gitSha: input.provenance.gitSha } : {}), - source: principalAuditSource(principal), - } -} - /** - * Creates a workflow from source (`POST /api/v2/workspaces/{id}/workflows/source`): the same - * pipeline as {@link applyWorkflowSource} with an empty graph as the stored draft, so every - * block is new, every id is minted and no fingerprint is checked. The workflow row, its graph, - * variables and `code_meta` are written in one transaction, so a refused or failed create leaves - * nothing behind. A dry run runs every check and creates nothing. + * Creates a workflow from source: the same pipeline as {@link applyWorkflowSource} with an empty + * graph as the stored draft, so every block is new, every id is minted and no fingerprint is + * checked. The row, its graph, variables and `code_meta` are written in one transaction, so a + * refused or failed create leaves nothing behind. A dry run runs every check and creates nothing. */ export const createWorkflowFromSource = defineAuthorizedWorkflowUseCase({ operation: workflowOperations.createFromSource, @@ -912,13 +187,15 @@ export const createWorkflowFromSource = defineAuthorizedWorkflowUseCase({ } return runSourceApply( principal, - { ...input, lock: EMPTY_LOCK }, + { ...input, lock: { lockVersion: 1, blocks: {}, variables: {} } }, { kind: 'new', workspace: context, workflowId: generateId(), - ...(input.name !== undefined ? { name: input.name } : {}), - ...(input.description !== undefined ? { description: input.description } : {}), + create: { + ...(input.name !== undefined ? { name: input.name } : {}), + ...(input.description !== undefined ? { description: input.description } : {}), + }, folderId, } ) @@ -943,19 +220,48 @@ export const createWorkflowFromSource = defineAuthorizedWorkflowUseCase({ }, }) +/** The audit metadata a committed source write records, for update and create alike. */ +function sourceAuditMetadata( + principal: Principal, + input: SourceSubmission, + result: ApplyWorkflowSourceResult +) { + const { blocks, edges, variables } = result.diff + return { + op: 'apply_source', + blocksAdded: blocks.added.length, + blocksRemoved: blocks.removed.length, + blocksRenamed: blocks.renamed.length, + blocksModified: blocks.modified.length, + edgesAdded: edges.added, + edgesRemoved: edges.removed, + variablesChanged: variables.added.length + variables.removed.length + variables.modified.length, + sdkMajor: result.sdkMajor, + catalogVersion: result.catalogVersion, + ...(input.provenance ? { client: input.provenance.client } : {}), + ...(input.provenance?.gitSha ? { gitSha: input.provenance.gitSha } : {}), + source: principalAuditSource(principal), + } +} + +/** The stored draft through the loader `source get` reads, so the two fingerprint alike. */ +async function loadStoredSource(context: ActiveWorkflowApplicationContext): Promise { + const { blocks, edges, loops, parallels, variables } = await loadWorkflowGraph(context) + return { + state: { blocks, edges, loops, parallels, variables }, + meta: { name: context.workflow.name, description: context.workflow.description ?? null }, + } +} + /** - * The source-apply pipeline (build-spec decision 11, s4 D1–D12) for either target. Compile, - * materialize onto the stored graph (empty for a new workflow), every gate, value check and lint, - * then the write: a replace under the row lock for an existing draft, or a create that inserts the - * row and its graph in one transaction. + * The source-apply pipeline for either target: evaluate the submission onto the stored graph + * (empty for a new workflow), then write it: `code_meta` alone for a graph no-op, a replace under + * the row lock for an existing draft, or a create that inserts the row and its graph in one + * transaction. A dry run stops before the write; a refusal throws, or on a dry run answers 200. */ async function runSourceApply( principal: Principal, - input: SourceSubmission & { - lock: WorkflowLockV1 - lockBase?: LockBase - baseFingerprint?: string - }, + input: SourceSubmission & { lock: WorkflowLockV1; lockBase?: LockBase }, target: SourceApplyTarget ): Promise { const context = @@ -963,17 +269,14 @@ async function runSourceApply( ? target.context : { ...target.workspace, workflowId: target.workflowId } const isNew = target.kind === 'new' - const needsRedeployment = () => - isNew ? Promise.resolve(false) : checkNeedsRedeployment(context.workflowId) + const dryRun = input.dryRun === true const gate = await resolveCatalogGate(principal, context, { customBlockInputs: true }) return withCatalogBlockScope(gate, async () => { const subjectUserId = resolvePrincipalAttribution(principal, { workspaceBillingOwnerUserId: context.billedAccountUserId, }).attributedUserId - const isCopilot = principal.kind === 'delegated' && principal.serviceId === 'copilot' - - const [loadedStored, storedCodeMeta]: [StoredSource, WorkflowCodeMetaV1 | null] = + const [stored, storedCodeMeta]: [StoredSource, WorkflowCodeMetaV1 | null] = target.kind === 'existing' ? await Promise.all([ loadStoredSource(target.context), @@ -982,20 +285,17 @@ async function runSourceApply( : [ { state: { blocks: {}, edges: [], loops: {}, parallels: {}, variables: {} }, - meta: { name: target.name ?? '', description: target.description ?? null }, + meta: { name: '', description: null }, }, null, ] - let stored: StoredSource = loadedStored - const storedTypes = [...new Set(Object.values(stored.state.blocks).map((b) => b.type))] const { catalog } = buildCodeCatalog({ gate, organizationId: context.workspaceOrganizationId, - storedTypes, + storedTypes: [...new Set(Object.values(stored.state.blocks).map((block) => block.type))], }) - const createdBy = resolvePrincipalSubjectUserId(principal) ?? null - const storedSource = await canonicalizeStored({ + const storedCanonical = await canonicalizeStored({ workflowId: context.workflowId, workspaceId: context.workspaceId, state: stored.state, @@ -1003,47 +303,47 @@ async function runSourceApply( catalog, createdBy, }) - let storedCanonical = storedSource.canonical - const storedIdentity = storedCanonical.identity - let resources = storedSource.resources - const currentFingerprint = sourceFingerprint(storedCanonical.workflow, storedIdentity) + const storedFingerprint = sourceFingerprint( + storedCanonical.canonical.workflow, + storedCanonical.canonical.identity + ) - const base = { + /** The one response shape: what is (or would be) stored, printed, and the outcome. */ + const result = async ( + printed: Pick, + outcome: Pick & + Partial> + ): Promise => ({ workflowId: context.workflowId, workflowName: stored.meta.name, workspaceId: context.workspaceId, - dryRun: input.dryRun === true, + dryRun, + mintedIds: {}, + warnings: [], + ...outcome, + newFingerprint: printed.fingerprint, + files: printed.files, + lock: printed.lock, + lockBase: { + workspaceId: context.workspaceId, + baseFingerprint: printed.fingerprint, + catalogHash: catalog.hash, + }, + needsRedeployment: !isNew && (await checkNeedsRedeployment(context.workflowId)), sdkMajor: catalog.sdkMajor, catalogVersion: catalog.hash, - } - const lockBaseFor = (fingerprint: SourceFingerprint): LockBase => ({ - workspaceId: context.workspaceId, - baseFingerprint: fingerprint, - catalogHash: catalog.hash, }) - - /** Refuses a commit; a dry run reports the same findings with a 200 instead (s4 §4). */ - const refuse = async ( - diagnostics: WorkflowSourceDiagnostic[] - ): Promise => { - if (!input.dryRun) throw new WorkflowSourceRejectedError(diagnostics) - return { - ...base, - applied: false, - diff: emptySummary(), - diagnostics, - newFingerprint: currentFingerprint, - files: input.files, - lock: input.lock, - lockBase: lockBaseFor(currentFingerprint), - mintedIds: {}, - warnings: [], - needsRedeployment: await needsRedeployment(), - } + /** Refuses a commit; a dry run reports the same findings with a 200 instead. */ + const refuse = (diagnostics: WorkflowSourceDiagnostic[]) => { + if (!dryRun) throw new WorkflowSourceRejectedError(diagnostics) + return result( + { files: input.files, lock: input.lock, fingerprint: storedFingerprint }, + { applied: false, diff: emptyDiffSummary(), diagnostics } + ) } - if (!isNew && currentFingerprint !== input.baseFingerprint) { - if (!input.dryRun) throw new WorkflowSourceStaleError(currentFingerprint) + if (target.kind === 'existing' && storedFingerprint !== target.baseFingerprint) { + if (!dryRun) throw new WorkflowSourceStaleError(storedFingerprint) return refuse([ { code: 'E_APPLY_STALE', @@ -1054,419 +354,99 @@ async function runSourceApply( ]) } - const parsedLock = parseWorkflowLock(input.lock) - if (parsedLock.diagnostics) { - const locateLock = createLocator(input.files, {}, new Map()) - return refuse(parsedLock.diagnostics.map((diagnostic) => locateLock(diagnostic))) - } - const lock = parsedLock.lock - - const entryText = input.files[ENTRY_FILE] - if (entryText === undefined) { - throw new OrchestrationError('validation', `files must include ${ENTRY_FILE}`) - } - const compiled = compileWorkflow({ - entry: { path: ENTRY_FILE, text: entryText }, - files: new Map(Object.entries(input.files).filter(([path]) => path !== ENTRY_FILE)), - catalog, - sdkMajor: catalog.sdkMajor, - knownKeys: new Set([...Object.keys(lock.blocks), ...Object.keys(storedIdentity.blocks)]), - }) - const compileLocate = createLocator(input.files, compiled.spans, new Map()) - if (!compiled.workflow || hasErrors(compiled.diagnostics)) { - return refuse(compiled.diagnostics.map(compileLocate)) - } - const compiledModel = { ...compiled, workflow: compiled.workflow } - if (target.kind === 'new') { - stored = { - ...stored, - meta: { - name: target.name ?? compiled.workflow.meta.name, - description: - target.description !== undefined - ? target.description - : compiled.workflow.meta.description, - }, - } - base.workflowName = stored.meta.name - storedCanonical = canonicalize(stored.state, { catalog, meta: stored.meta, resources }) - } - - const compiledKeys: ResourceKeyRef[] = [] - collectResourceKeys(compiled.workflow.blocks, compiledKeys) - const currentResources = resources - if (compiledKeys.some(({ kind, key }) => currentResources.toId(kind, key) === null)) { - resources = await loadResourceKeyResolver( - context.workspaceId, - { ids: storedSource.loaded.ids, keys: [...storedSource.loaded.keys, ...compiledKeys] }, - { createdBy } - ) - } - - const hasLockEntries = - Object.keys(lock.blocks).length > 0 || Object.keys(lock.variables).length > 0 - const lockFreshness: 'fresh' | 'stale' | 'none' = !hasLockEntries - ? 'none' - : input.lockBase && - (input.lockBase.workspaceId !== context.workspaceId || - input.lockBase.baseFingerprint !== currentFingerprint) - ? 'stale' - : 'fresh' - const compiledBindings: Record = {} - for (const [key, hint] of Object.entries(compiled.hints.blocks)) { - if (hint.binding !== undefined) compiledBindings[key] = hint.binding - } - const hooks = createMaterializeHooks() - const materializeWith = (withLock: WorkflowLockV1): MaterializeResult => - materialize(compiledModel.workflow, withLock, { - catalog, - hooks, - prev: stored.state, - resources, - layout: input.layout ?? 'preserve', - compiledBindings, - lockFreshness, - }) - - /** - * A lock id for a new block that another workflow already stores cannot be reused (block - * ids are global keys): drop it from the lock so materialize mints one, and say so. - */ - let materialized = materializeWith(lock) - const claimedDiagnostics: AnyDiagnostic[] = [] - const lockSuppliedIds = materialized.entries.flatMap((entry) => - entry.status === 'created' && entry.idSource === 'lock' ? [entry.id] : [] - ) - const claimed = new Set(await findBlockIdsClaimedElsewhere(context.workflowId, lockSuppliedIds)) - if (claimed.size > 0) { - const blocks: Record = {} - for (const [key, entry] of Object.entries(lock.blocks)) { - if (claimed.has(entry.id)) { - claimedDiagnostics.push({ - code: 'W_MAT_LOCK_ID_CLAIMED', - severity: 'warning', - message: `The lock id for block "${key}" belongs to another workflow; a new id was minted`, - blockKey: key, - }) - } else { - blocks[key] = entry - } - } - materialized = materializeWith({ ...lock, blocks }) - } - - const idByKey = new Map( - Object.entries(materialized.identity.blocks).map(([key, block]) => [key, block.id]) - ) - const keyById = new Map([...idByKey].map(([key, id]) => [id, key])) - const locate = createLocator(input.files, compiled.spans, idByKey) - const materializeDiagnostics = [...materialized.diagnostics, ...claimedDiagnostics] - if (hasErrors(materializeDiagnostics)) { - return refuse([...compiled.diagnostics, ...materializeDiagnostics].map(locate)) - } - - const baseCanonical = canonicalizeUnderLock( - stored.state, - { catalog, meta: stored.meta, resources }, - storedCanonical, - lock - ) - const canonicalDiff = diffCanonical( - baseCanonical.workflow, - compiled.workflow, - renamesBetween(baseCanonical.identity, materialized.identity) - ) - const warnings: string[] = [] - if (!isNew && canonicalDiff.meta.length > 0) { - warnings.push( - `The workflow ${canonicalDiff.meta.join(' and ')} in the source differs from the stored one and was not changed; rename or describe the workflow through its settings.` - ) - } - - const storedGraph: SourceGraph = { blocks: stored.state.blocks, edges: stored.state.edges } - let blocks = materialized.state.blocks - const edges = materialized.state.edges - const graphDiff = diffGraphs(storedGraph, { blocks, edges }) - const keyOf = (id: string) => keyById.get(id) ?? '' - - const permissionConfig = await resolvePermissionGroupConfig( - subjectUserId, - context.workspaceId, - context.workspaceOrganizationId - ) - const gateDiagnostics = await gateSourceDiff({ - base: storedGraph, - target: { blocks, edges }, - diff: graphDiff, - permissionConfig, - subjectUserId, - workspaceId: context.workspaceId, - isCopilot, - }) - const refusals: AnyDiagnostic[] = [ - ...findProtectedBlockRefusals(storedGraph, { blocks, edges }, graphDiff), - ...gateDiagnostics, - ] - - const typeChanged = new Set( - graphDiff.modified.filter((change) => change.typeChanged).map((change) => change.id) - ) - for (const id of [...graphDiff.added, ...typeChanged]) { - const block = blocks[id] - if (block && catalogBlock(catalog, block.type)?.addable === false) { - refusals.push({ - code: 'E_TYPE_NOT_ADDABLE', - severity: 'error', - message: `Block type "${block.type}" can stay where it is already used but cannot be added`, - blockId: id, - blockKey: keyOf(id), - }) - } - } - - for (const diagnostic of gateDiagnostics) { - if (diagnostic.code !== 'W_APPLY_HOSTED_KEY_DROPPED' || !diagnostic.blockId) continue - const { blockId, param } = diagnostic - if (!param || !blocks[blockId]?.subBlocks?.[param]) continue - blocks = withBlock(blocks, blockId, (block) => ({ - ...block, - subBlocks: { ...block.subBlocks, [param]: { ...block.subBlocks[param], value: null } }, - })) - } - - const normalized = normalizeChangedValues(blocks, graphDiff, keyOf) - blocks = normalized.blocks - - blocks = await snapshotMcpToolOutputSchemas(blocks, stored.state.blocks, { + const evaluation = await evaluateSource({ principal, - workspaceId: context.workspaceId, + scope: { + workflowId: context.workflowId, + workspaceId: context.workspaceId, + workspaceOrganizationId: context.workspaceOrganizationId, + subjectUserId, + }, + stored, + storedCanonical, + storedFingerprint, + storedCodeMeta, + catalog, + createdBy, + files: input.files, + lock: input.lock, + ...(input.lockBase ? { lockBase: input.lockBase } : {}), + ...(target.kind === 'new' ? { create: target.create } : {}), }) - if (materialized.needsLayout.length > 0) { - blocks = layoutChangedBlocks(context.workflowId, storedGraph, { blocks, edges }) - } - - const lint = await buildWorkflowLintReport( - { blocks, edges }, - { workflowId: context.workflowId, workspaceId: context.workspaceId, subjectUserId } - ) - const changedIds = new Set([...graphDiff.added, ...graphDiff.modified.map((m) => m.id)]) - const diagnostics = [ - ...compiled.diagnostics, - ...materializeDiagnostics, - ...refusals, - ...normalized.diagnostics, - ...lintDiagnostics(lint, changedIds, (id) => keyById.get(id)), - ].map(locate) - if (hasErrors(diagnostics)) return refuse(diagnostics) - - const layoutChanged = - input.layout === 'lock' && - Object.entries(blocks).some( - ([id, block]) => - stored.state.blocks[id] !== undefined && - !isEqual(block.position, stored.state.blocks[id].position) - ) - const noop = - !isNew && - !layoutChanged && - canonicalDiff.blocks.added.length === 0 && - canonicalDiff.blocks.removed.length === 0 && - canonicalDiff.blocks.modified.length === 0 && - canonicalDiff.edges.added.length === 0 && - canonicalDiff.edges.removed.length === 0 && - canonicalDiff.variables.added.length === 0 && - canonicalDiff.variables.removed.length === 0 && - canonicalDiff.variables.modified.length === 0 - const diff = summarizeDiff(canonicalDiff, baseCanonical.identity, materialized.identity, noop) - const mintedIds: Record = {} - for (const entry of materialized.entries) { - if (entry.status === 'created' && entry.idSource === 'minted') { - mintedIds[entry.key] = entry.id - } - } - const variablesChanged = - canonicalDiff.variables.added.length > 0 || - canonicalDiff.variables.removed.length > 0 || - canonicalDiff.variables.modified.length > 0 - const variables = variablesChanged - ? normalizeWorkflowVariables(materialized.state.variables ?? {}, { coerceValues: true }) - : undefined - /** Variables as the next read will parse them, so the re-printed fingerprint matches it. */ - const storedVariables = - variables === undefined ? stored.state.variables : (parseWorkflowVariables(variables) ?? {}) - - const lockAfter = boundLock(materialized.identity, lock) - const nextCodeMeta = mergeCodeMetaFromLock(storedCodeMeta, lockAfter, compiledModel) - const usesCodeFiles = Object.values(compiled.hints.blocks).some((hint) => hint.codeFile) - const printBaseOf = (state: WorkflowState, lockless?: CanonicalizeResult) => - printBase({ + if ('refused' in evaluation) return refuse(evaluation.refused) + const { plan } = evaluation + const { diff, diagnostics, mintedIds } = plan + /** Prints a state under the keys the submission bound, as the next `source get` will. */ + const print = ( + state: WorkflowState, + codeMeta: WorkflowCodeMetaV1 | null, + lockless?: CanonicalizeResult + ) => + printStoredSource({ state, - meta: stored.meta, - identity: materialized.identity, + meta: plan.meta, catalog, - resources, + resources: plan.resources, + codeMeta, + functionCode: plan.functionCode, + identity: plan.identity, ...(lockless ? { lockless } : {}), }) - const reprintFrom = (base: PrintBase) => - reprint({ base, codeMeta: nextCodeMeta, usesCodeFiles, catalog }) + const printWritten = (written: Omit) => + print({ ...written, variables: plan.storedVariables }, plan.codeMeta) + const logContext = { + workflowId: context.workflowId, + workspaceId: context.workspaceId, + principalKind: principal.kind, + } - if (noop) { - const storedBase = printBaseOf(stored.state, storedCanonical) - const printed = reprintFrom(storedBase) - if (!input.dryRun) { - const storedPrint = reprint({ - base: storedBase, - codeMeta: storedCodeMeta, - usesCodeFiles, - catalog, - }) - if ( - !isEqual(printed.files, storedPrint.files) || - !isEqual(printed.lock, storedPrint.lock) - ) { - await writeWorkflowCodeMeta(db, context.workflowId, nextCodeMeta) + if (plan.noop) { + const printed = print(stored.state, plan.codeMeta, storedCanonical.canonical) + if (!dryRun) { + const before = print(stored.state, storedCodeMeta, storedCanonical.canonical) + if (!isEqual(printed.files, before.files) || !isEqual(printed.lock, before.lock)) { + await writeWorkflowCodeMeta(db, context.workflowId, plan.codeMeta) } } - return { - ...base, - applied: false, - diff, - diagnostics, - newFingerprint: currentFingerprint, - files: printed.files, - lock: printed.lock, - lockBase: lockBaseFor(currentFingerprint), - mintedIds: {}, - warnings, - needsRedeployment: await needsRedeployment(), - } + return result(printed, { applied: false, diff, diagnostics, warnings: plan.warnings }) } - if (input.dryRun) { - const prepared = prepareWorkflowStateForPersistence({ blocks, edges }) - await assertWorkflowGraphIdsUnclaimed( - db, - context.workflowId, - collectWorkflowGraphIds(prepared.state) - ) - const printed = reprintFrom(printBaseOf({ ...prepared.state, variables: storedVariables })) - logger.info('Evaluated workflow source without persisting', { - workflowId: context.workflowId, - workspaceId: context.workspaceId, - principalKind: principal.kind, - }) - return { - ...base, + const scope = { + workflowId: context.workflowId, + workspaceId: context.workspaceId, + subjectUserId, + } + if (dryRun) { + const preview = await previewSourceCommit(context.workflowId, plan) + logger.info('Evaluated workflow source without persisting', logContext) + return result(printWritten(preview.state), { applied: false, diff, diagnostics, - newFingerprint: printed.fingerprint, - files: printed.files, - lock: printed.lock, - lockBase: lockBaseFor(printed.fingerprint), mintedIds, - warnings: [...warnings, ...prepared.warnings], - needsRedeployment: await needsRedeployment(), - } - } - - const lockPositioned = new Set( - input.layout === 'lock' - ? Object.entries(lock.blocks).flatMap(([key, entry]) => { - const id = idByKey.get(key) - return entry.layout && id ? [id] : [] - }) - : [] - ) - await assertNoWithheldBlockType( - { workspaceId: context.workspaceId, subjectUserId }, - Object.values(blocks) - ) - if (target.kind === 'new') { - const created = await createSourceWorkflow({ - target, - name: stored.meta.name, - description: stored.meta.description, - subjectUserId, - graph: { blocks, edges }, - variables, - codeMeta: nextCodeMeta, + warnings: [...plan.warnings, ...preview.warnings], }) - const printed = reprintFrom(printBaseOf({ ...created.state, variables: storedVariables })) - logger.info('Created workflow from source', { - workflowId: context.workflowId, - workspaceId: context.workspaceId, - principalKind: principal.kind, - }) - return { - ...base, - workflowName: created.name, - applied: true, - diff, - diagnostics, - newFingerprint: printed.fingerprint, - files: printed.files, - lock: printed.lock, - lockBase: lockBaseFor(printed.fingerprint), - mintedIds, - warnings: [...warnings, ...created.warnings], - needsRedeployment: false, - } } - const existing = target.context - const persisted = await replaceWorkflowNormalizedState({ - workflowId: context.workflowId, - workspaceId: context.workspaceId, - attributedUserId: subjectUserId, - subjectUserId, - state: async (tx) => { - const current = await loadStoredSource(existing, tx) - const fingerprint = isEqual(current, stored) - ? currentFingerprint - : fingerprintOf(current, catalog, resources) - if (fingerprint !== input.baseFingerprint) { - throw new WorkflowSourceStaleError(fingerprint) - } - const next = { - blocks: mergeCurrentLayout(blocks, current.state.blocks, lockPositioned), - edges, - } - assertProtectedBlocksPreserved( - { blocks: current.state.blocks, edges: current.state.edges }, - next - ) - await writeWorkflowCodeMeta( - tx, - context.workflowId, - mergeCodeMetaFromLock( - await readWorkflowCodeMeta(tx, context.workflowId), - lockAfter, - compiledModel - ) - ) - return variables === undefined ? next : { ...next, variables } - }, - }) - - const printed = reprintFrom(printBaseOf({ ...persisted.state, variables: storedVariables })) - logger.info('Applied workflow source', { - workflowId: context.workflowId, - workspaceId: context.workspaceId, - principalKind: principal.kind, - }) - return { - ...base, + const committed = + target.kind === 'new' + ? await commitSourceCreate({ scope, plan, folderId: target.folderId }) + : await commitSourceReplace({ + scope, + plan, + stored, + storedFingerprint, + baseFingerprint: target.baseFingerprint, + catalog, + }) + logger.info(isNew ? 'Created workflow from source' : 'Applied workflow source', logContext) + return result(printWritten(committed.state), { applied: true, diff, diagnostics, - newFingerprint: printed.fingerprint, - files: printed.files, - lock: printed.lock, - lockBase: lockBaseFor(printed.fingerprint), mintedIds, - warnings: [...warnings, ...persisted.warnings], - needsRedeployment: await needsRedeployment(), - } + ...('name' in committed ? { workflowName: committed.name } : {}), + warnings: [...plan.warnings, ...committed.warnings], + }) }) } diff --git a/apps/sim/lib/workflows/application/get-workflow-source.ts b/apps/sim/lib/workflows/application/get-workflow-source.ts index 4fdf2556449..60b0c89c9e7 100644 --- a/apps/sim/lib/workflows/application/get-workflow-source.ts +++ b/apps/sim/lib/workflows/application/get-workflow-source.ts @@ -3,37 +3,26 @@ import { db } from '@sim/db' import { compareStrings } from '@sim/utils/string' import { type CanonicalWorkflow, - type CodeComment, canonicalHash, type Diagnostic, - encodeAnchor, type LockBase, - type LockIdentity, - printWorkflow, type SourceFingerprint, - sourceFingerprint, type WorkflowLockV1, } from '@sim/workflow-code' import { readWorkflowCodeMeta } from '@sim/workflow-persistence/code-meta' -import type { WorkflowState } from '@sim/workflow-types/workflow' import { resolveCatalogGate, withCatalogBlockScope } from '@/lib/catalog/application/context' import { defineAuthorizedWorkflowUseCase } from '@/lib/workflows/application/authorized-workflow-use-case' import { workflowOperations } from '@/lib/workflows/application/operations' import { resolvePrincipalWorkflowContext } from '@/lib/workflows/application/principal-scope' import { loadWorkflowGraph } from '@/lib/workflows/application/read-workflow-graph' +import { printStoredSource } from '@/lib/workflows/code/apply/print' import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog' import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' -import { buildLockFromState, codeMetaPrintInputs } from '@/lib/workflows/code/source-lock' import { canonicalizeStored } from '@/lib/workflows/code/stored-canonical' -/** Directory function-code files are printed into when `functionCode` is `files`. */ -const FUNCTION_CODE_DIR = 'functions' - interface GetWorkflowSourceInput { workflowId: string assertedWorkspaceId?: string - /** Prints each block's id as a trailing comment on its declaration (agent read path). */ - annotateIds?: boolean /** `files` (default): function code in `functions/*` files; `inline`: tagged templates. */ functionCode?: 'inline' | 'files' } @@ -78,20 +67,6 @@ function toWarning(diagnostic: Diagnostic): WorkflowSourceWarning { } } -/** - * Adds `// id: ` after every block declaration. Comments are annotations, so the - * canonical hash and fingerprint are unchanged. - */ -function withIdComments(workflow: CanonicalWorkflow, identity: LockIdentity): CanonicalWorkflow { - const comments = { ...workflow.annotations.comments } - for (const [key, block] of Object.entries(identity.blocks)) { - const anchor = encodeAnchor({ kind: 'block', block: key }) - const idComment: CodeComment = { text: ` id: ${block.id}`, kind: 'line', placement: 'trailing' } - comments[anchor] = [...(comments[anchor] ?? []), idComment] - } - return { ...workflow, annotations: { ...workflow.annotations, comments } } -} - function usedBlockTypes(workflow: CanonicalWorkflow): string[] { const types = new Set() for (const block of Object.values(workflow.blocks)) { @@ -104,16 +79,12 @@ function usedBlockTypes(workflow: CanonicalWorkflow): string[] { } /** - * Reads a workflow's stored draft as TypeScript source (build-spec decisions 11–13, s4 §2). - * - * Loads the stored, migrated graph; builds the per-workflow compile catalog (the blocks this - * caller may place plus every type already in the workflow); projects the graph to the canonical - * model with resource ids lifted to their persisted keys; and prints it with the bindings, order - * and comments the workflow's code metadata keeps, so the lock comes from the same place. The - * catalog comes from the process cache and the stored graph is canonicalized once. No audit. The - * one write is resource-key allocation: the first get that references a resource with no key binds - * one (`resolveKeys`). That is idempotent identity metadata, not a change to any resource, so read - * access may cause it; later gets only read the binding. + * Reads a workflow's stored draft as TypeScript source. Builds the per-workflow compile catalog + * (the blocks this caller may place plus every type already in the workflow), canonicalizes the + * stored graph once with resource ids lifted to their persisted keys, and prints it with the + * bindings, order and comments of its `code_meta` through the same printer every apply response + * uses. No audit. The one write is resource-key allocation: the first get that references a + * resource with no key binds one. That is idempotent identity metadata, so read access may cause it. */ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ operation: workflowOperations.readSource, @@ -125,29 +96,17 @@ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ resolveCatalogGate(principal, context, { customBlockInputs: true }), readWorkflowCodeMeta(db, context.workflowId), ]) - const state: WorkflowState = { - blocks: graph.blocks, - edges: graph.edges, - loops: graph.loops, - parallels: graph.parallels, - variables: graph.variables, - } - const storedTypes = [...new Set(Object.values(graph.blocks).map((block) => block.type))] - const meta = { - name: context.workflow.name, - description: context.workflow.description ?? null, - } - - const catalog = await withCatalogBlockScope(gate, async () => { - const { catalog } = buildCodeCatalog({ + const { blocks, edges, loops, parallels, variables } = graph + const state = { blocks, edges, loops, parallels, variables } + const meta = { name: context.workflow.name, description: context.workflow.description ?? null } + const { catalog } = await withCatalogBlockScope(gate, async () => + buildCodeCatalog({ gate, organizationId: context.workspaceOrganizationId, - storedTypes, + storedTypes: [...new Set(Object.values(blocks).map((block) => block.type))], }) - return catalog - }) - - const { canonical } = await canonicalizeStored({ + ) + const { canonical, resources } = await canonicalizeStored({ workflowId: context.workflowId, workspaceId: context.workspaceId, state, @@ -155,37 +114,26 @@ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ catalog, createdBy: resolvePrincipalSubjectUserId(principal) ?? null, }) - - const metaInputs = codeMetaPrintInputs(codeMeta, canonical) - const withComments: CanonicalWorkflow = { - ...canonical.workflow, - annotations: { - ...canonical.workflow.annotations, - comments: { ...canonical.workflow.annotations.comments, ...metaInputs.comments }, - }, - } - const printed = printWorkflow({ - workflow: input.annotateIds ? withIdComments(withComments, canonical.identity) : withComments, + const printed = printStoredSource({ + state, + meta, catalog, - hints: metaInputs.hints, - options: - (input.functionCode ?? 'files') === 'files' - ? { functionCode: 'files', codeDir: FUNCTION_CODE_DIR } - : { functionCode: 'inline' }, + resources, + codeMeta, + functionCode: input.functionCode ?? 'files', + lockless: canonical, }) - - const fingerprint = sourceFingerprint(canonical.workflow, canonical.identity) return { workflowId: context.workflowId, workspaceId: context.workspaceId, - files: Object.fromEntries(printed.files.map((file) => [file.path, file.text])), - lock: buildLockFromState(codeMeta, canonical, printed.hints), + files: printed.files, + lock: printed.lock, lockBase: { workspaceId: context.workspaceId, - baseFingerprint: fingerprint, + baseFingerprint: printed.fingerprint, catalogHash: catalog.hash, }, - fingerprint, + fingerprint: printed.fingerprint, canonicalHash: canonicalHash(canonical.workflow), catalogVersion: catalog.hash, sdkMajor: catalog.sdkMajor, diff --git a/apps/sim/lib/workflows/code/apply/commit.ts b/apps/sim/lib/workflows/code/apply/commit.ts new file mode 100644 index 00000000000..8579f758c1a --- /dev/null +++ b/apps/sim/lib/workflows/code/apply/commit.ts @@ -0,0 +1,236 @@ +import { db } from '@sim/db' +import { workflow as workflowTable } from '@sim/db/schema' +import { createLogger } from '@sim/logger' +import { omit } from '@sim/utils/object' +import type { BlockCatalog, SourceFingerprint } from '@sim/workflow-code' +import { readWorkflowCodeMeta, writeWorkflowCodeMeta } from '@sim/workflow-persistence/code-meta' +import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' +import { and, eq, isNull } from 'drizzle-orm' +import { isEqual } from 'es-toolkit' +import { OrchestrationError } from '@/lib/core/orchestration/types' +import type { DbOrTx } from '@/lib/db/types' +import { WorkflowSourceStaleError } from '@/lib/workflows/application/source-error' +import { requireWorkflowTransition } from '@/lib/workflows/application/transition-result' +import type { SourcePlan } from '@/lib/workflows/code/apply/evaluate' +import { fingerprintOf, type StoredSource } from '@/lib/workflows/code/apply/print' +import { assertProtectedBlocksPreserved } from '@/lib/workflows/code/apply/protected' +import { mergeCodeMetaFromLock } from '@/lib/workflows/code/source-lock' +import { performCreateWorkflowTransition } from '@/lib/workflows/orchestration' +import { assertNoWithheldBlockType } from '@/lib/workflows/persistence/block-access-guard' +import { extractAndPersistCustomTools } from '@/lib/workflows/persistence/custom-tools-persistence' +import { + type PreparedWorkflowState, + prepareWorkflowStateForPersistence, +} from '@/lib/workflows/persistence/prepare-state' +import { + assertWorkflowGraphIdsUnclaimed, + collectWorkflowGraphIds, + replaceWorkflowNormalizedState, + WorkflowStatePersistenceError, +} from '@/lib/workflows/persistence/replace-normalized-state' +import { + loadWorkflowFromNormalizedTables, + saveWorkflowToNormalizedTables, +} from '@/lib/workflows/persistence/utils' +import { parseWorkflowVariables } from '@/lib/workflows/variables/parse' + +const logger = createLogger('WorkflowSourceCommit') + +/** What a commit (or a dry run's preview of one) stores, after persistence preparation. */ +interface CommittedGraph { + state: PreparedWorkflowState + warnings: string[] +} + +interface CommitScope { + workflowId: string + workspaceId: string + subjectUserId: string +} + +/** + * What a dry run would store: the plan's graph prepared for persistence, refused when another + * workflow already stores one of its ids, exactly as the write would refuse it. + */ +export async function previewSourceCommit( + workflowId: string, + plan: SourcePlan +): Promise { + const prepared = prepareWorkflowStateForPersistence({ blocks: plan.blocks, edges: plan.edges }) + await assertWorkflowGraphIdsUnclaimed(db, workflowId, collectWorkflowGraphIds(prepared.state)) + return prepared +} + +/** The stored draft re-read under the row lock: blocks, edges and the row's variables and meta. */ +async function loadStoredSourceIn(tx: DbOrTx, workflowId: string): Promise { + const [normalized, [row]] = await Promise.all([ + loadWorkflowFromNormalizedTables(workflowId, tx), + tx + .select({ + name: workflowTable.name, + description: workflowTable.description, + variables: workflowTable.variables, + }) + .from(workflowTable) + .where(and(eq(workflowTable.id, workflowId), isNull(workflowTable.archivedAt))) + .limit(1), + ]) + if (!row) throw new OrchestrationError('not_found', 'Workflow not found') + return { + state: { + blocks: (normalized?.blocks ?? {}) as Record, + edges: (normalized?.edges ?? []) as WorkflowState['edges'], + loops: normalized?.loops ?? {}, + parallels: normalized?.parallels ?? {}, + variables: parseWorkflowVariables(row.variables) ?? {}, + }, + meta: { name: row.name, description: row.description ?? null }, + } +} + +/** + * Existing blocks keep the positions stored at write time, so a canvas drag that landed during + * the apply survives it. + */ +function mergeCurrentLayout( + target: Record, + current: Record +): Record { + const merged: Record = {} + for (const [id, block] of Object.entries(target)) { + const stored = current[id] + if (!stored) { + merged[id] = block + continue + } + const next: BlockState = { + ...omit(block, ['height', 'layout']), + position: stored.position, + ...(stored.height !== undefined ? { height: stored.height } : {}), + ...(stored.layout !== undefined ? { layout: stored.layout } : {}), + } + if (block.data) { + next.data = { + ...omit(block.data, ['width', 'height']), + ...(stored.data?.width !== undefined ? { width: stored.data.width } : {}), + ...(stored.data?.height !== undefined ? { height: stored.data.height } : {}), + } + } + merged[id] = isEqual(next, block) ? block : next + } + return merged +} + +/** + * Writes the plan over an existing draft in one `replaceWorkflowNormalizedState` under the + * workflow row lock. Inside the lock it re-reads the draft and answers 409 when its fingerprint + * moved off `baseFingerprint`, keeps current canvas positions for existing blocks, asserts the + * protected-block merge is the identity, and stores the submission's `code_meta` in the same + * transaction. + */ +export async function commitSourceReplace(args: { + scope: CommitScope + plan: SourcePlan + /** The draft the plan was evaluated against, and its fingerprint. */ + stored: StoredSource + storedFingerprint: SourceFingerprint + baseFingerprint: string + catalog: BlockCatalog +}): Promise { + const { scope, plan, stored, catalog } = args + await assertNoWithheldBlockType( + { workspaceId: scope.workspaceId, subjectUserId: scope.subjectUserId }, + Object.values(plan.blocks) + ) + return replaceWorkflowNormalizedState({ + workflowId: scope.workflowId, + workspaceId: scope.workspaceId, + attributedUserId: scope.subjectUserId, + subjectUserId: scope.subjectUserId, + state: async (tx) => { + const current = await loadStoredSourceIn(tx, scope.workflowId) + const fingerprint = isEqual(current, stored) + ? args.storedFingerprint + : fingerprintOf(current, catalog, plan.resources) + if (fingerprint !== args.baseFingerprint) throw new WorkflowSourceStaleError(fingerprint) + const next = { + blocks: mergeCurrentLayout(plan.blocks, current.state.blocks), + edges: plan.edges, + } + assertProtectedBlocksPreserved( + { blocks: current.state.blocks, edges: current.state.edges }, + next + ) + await writeWorkflowCodeMeta( + tx, + scope.workflowId, + mergeCodeMetaFromLock( + await readWorkflowCodeMeta(tx, scope.workflowId), + plan.lock, + plan.compiled + ) + ) + return plan.variables === undefined ? next : { ...next, variables: plan.variables } + }, + }) +} + +/** + * Inserts a workflow created from source and its graph in one transaction: the row (with the + * create path's folder, name-conflict and sort rules), the prepared graph under the caller's block + * access, its variables and its `code_meta`. A name taken in the folder is a 409; any failure rolls + * the whole create back. + */ +export async function commitSourceCreate(args: { + scope: CommitScope + plan: SourcePlan + folderId: string | null +}): Promise { + const { scope, plan } = args + const { workspaceId, subjectUserId } = scope + await assertNoWithheldBlockType({ workspaceId, subjectUserId }, Object.values(plan.blocks)) + const prepared = prepareWorkflowStateForPersistence({ blocks: plan.blocks, edges: plan.edges }) + const transition = await performCreateWorkflowTransition({ + id: scope.workflowId, + userId: subjectUserId, + workspaceId, + name: plan.meta.name, + description: plan.meta.description, + folderId: args.folderId, + writeGraph: async (tx, workflowId) => { + await assertWorkflowGraphIdsUnclaimed(tx, workflowId, collectWorkflowGraphIds(prepared.state)) + const saved = await saveWorkflowToNormalizedTables( + workflowId, + { ...prepared.state, lastSaved: Date.now() } as WorkflowState, + { workspaceId, subjectUserId }, + tx + ) + if (!saved.success) { + throw new WorkflowStatePersistenceError(saved.error ?? 'Unknown persistence failure') + } + if (plan.variables !== undefined) { + await tx + .update(workflowTable) + .set({ variables: plan.variables }) + .where(eq(workflowTable.id, workflowId)) + } + await writeWorkflowCodeMeta(tx, workflowId, plan.codeMeta) + }, + }) + requireWorkflowTransition(transition, 'Failed to create workflow') + if (!transition.workflow) throw new Error('Successful workflow create returned no workflow') + + try { + const { errors } = await extractAndPersistCustomTools( + prepared.state, + workspaceId, + subjectUserId + ) + if (errors.length > 0) { + logger.warn('Some custom tools failed to persist', { workflowId: scope.workflowId, errors }) + } + } catch (error) { + logger.error('Failed to persist custom tools', { workflowId: scope.workflowId, error }) + } + return { name: transition.workflow.name, state: prepared.state, warnings: prepared.warnings } +} diff --git a/apps/sim/lib/workflows/code/apply/evaluate.ts b/apps/sim/lib/workflows/code/apply/evaluate.ts new file mode 100644 index 00000000000..9b6502d23de --- /dev/null +++ b/apps/sim/lib/workflows/code/apply/evaluate.ts @@ -0,0 +1,405 @@ +import type { Principal } from '@sim/auth/principal' +import { db } from '@sim/db' +import { workflowBlocks } from '@sim/db/schema' +import { + type BlockCatalog, + type CanonicalWorkflow, + type CanonicalWorkflowMeta, + canonicalize, + compileWorkflow, + type Diagnostic, + diffCanonical, + type LockBase, + type LockHints, + type LockIdentity, + type MaterializeResult, + materialize, + parseWorkflowLock, + type ResourceKeyResolver, + type ResourceKind, + renamesBetween, + type WorkflowCodeMetaV1, + type WorkflowLockBlock, + type WorkflowLockV1, +} from '@sim/workflow-code' +import { catalogBlock } from '@sim/workflow-code/catalog/view' +import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' +import { and, inArray, ne } from 'drizzle-orm' +import { OrchestrationError } from '@/lib/core/orchestration/types' +import { resolvePermissionGroupConfig } from '@/lib/permission-groups/config-scope.server' +import { layoutChangedBlocks } from '@/lib/workflows/application/graph-write' +import { snapshotMcpToolOutputSchemas } from '@/lib/workflows/application/mcp-output-schemas' +import type { WorkflowSourceDiagnostic } from '@/lib/workflows/application/source-error' +import { normalizeWorkflowVariables } from '@/lib/workflows/application/workflow-variables' +import { gateSourceDiff } from '@/lib/workflows/code/apply/gates' +import { diffGraphs, type SourceGraph } from '@/lib/workflows/code/apply/graph-diff' +import { + createLocator, + hasErrors, + lintDiagnostics, + normalizeChangedValues, + type SourceDiffSummary, + summarizeDiff, +} from '@/lib/workflows/code/apply/locate' +import { boundLock, type StoredSource } from '@/lib/workflows/code/apply/print' +import { findProtectedBlockRefusals } from '@/lib/workflows/code/apply/protected' +import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' +import { loadResourceKeyResolver } from '@/lib/workflows/code/resources' +import { mergeCodeMetaFromLock } from '@/lib/workflows/code/source-lock' +import { canonicalizeUnderLock, type StoredCanonical } from '@/lib/workflows/code/stored-canonical' +import { buildWorkflowLintReport } from '@/lib/workflows/editing/lint-report' +import { parseWorkflowVariables } from '@/lib/workflows/variables/parse' +import type { ResourceKeyRef } from '@/lib/workspaces/resource-bindings' + +/** The entry file every submission carries; function code lives beside it. */ +const ENTRY_FILE = 'workflow.ts' +const META_FIELDS: Array = ['name', 'description'] + +export interface SourceEvaluationInput { + principal: Principal + scope: { + workflowId: string + workspaceId: string + workspaceOrganizationId: string | null + /** The human the write is performed as, for gates, permission groups and lint. */ + subjectUserId: string + } + /** The draft the source applies to; an empty graph for a workflow the apply creates. */ + stored: StoredSource + /** `stored` canonicalized with its resource keys. */ + storedCanonical: StoredCanonical + storedFingerprint: string + storedCodeMeta: WorkflowCodeMetaV1 | null + catalog: BlockCatalog + /** Attribution for resource keys a submitted reference allocates. */ + createdBy: string | null + files: Record + lock: WorkflowLockV1 + lockBase?: LockBase + /** Set when the apply creates the workflow: the caller's name and description overrides. */ + create?: { name?: string; description?: string | null } +} + +/** Everything a commit (or a dry run) writes and reports, once every check passed. */ +export interface SourcePlan { + /** The workflow's name and description: the stored ones, or a created workflow's. */ + meta: CanonicalWorkflowMeta + /** The graph is unchanged; only `code_meta` may differ. Never true for a create. */ + noop: boolean + blocks: Record + edges: WorkflowState['edges'] + /** The variables to write, or `undefined` when the source leaves them unchanged. */ + variables: ReturnType | undefined + /** Variables as the next read parses them, for re-printing what is stored. */ + storedVariables: WorkflowState['variables'] + /** Warnings (on a dry run, every finding), pinned to the submitted files. */ + diagnostics: WorkflowSourceDiagnostic[] + warnings: string[] + diff: SourceDiffSummary + /** Source key → id for every new block whose id was minted rather than taken from the lock. */ + mintedIds: Record + /** Every key the write binds, with its id: what the next print is keyed by. */ + identity: LockIdentity + /** The post-materialize lock the compiled bindings and comments are re-keyed onto. */ + lock: WorkflowLockV1 + /** The compiled file's bindings, order and comments. */ + compiled: { hints: LockHints; workflow: Pick } + /** `code_meta` after the write, merged onto the stored one. */ + codeMeta: WorkflowCodeMetaV1 + /** How the response prints function code: as the submission did. */ + functionCode: 'inline' | 'files' + /** Answers every resource reference of both the stored and the submitted source. */ + resources: ResourceKeyResolver +} + +export type SourceEvaluation = { refused: WorkflowSourceDiagnostic[] } | { plan: SourcePlan } + +/** Every `(kind, key)` resource reference in a compiled model, for binding lookup. */ +function collectResourceKeys(value: unknown, refs: ResourceKeyRef[]): void { + if (Array.isArray(value)) { + for (const item of value) collectResourceKeys(item, refs) + return + } + if (value === null || typeof value !== 'object') return + const record = value as Record + if ( + record.$sim === 'resource' && + typeof record.kind === 'string' && + typeof record.key === 'string' + ) { + refs.push({ kind: record.kind as ResourceKind, key: record.key }) + } + for (const nested of Object.values(record)) collectResourceKeys(nested, refs) +} + +/** Block ids another workflow already stores, among `ids`. */ +async function findBlockIdsClaimedElsewhere(workflowId: string, ids: string[]): Promise { + if (ids.length === 0) return [] + const rows = await db + .select({ id: workflowBlocks.id }) + .from(workflowBlocks) + .where(and(inArray(workflowBlocks.id, ids), ne(workflowBlocks.workflowId, workflowId))) + return rows.map((row) => row.id) +} + +/** + * Evaluates submitted source against a stored draft without writing it: compile against the live + * catalog, parse the lock, materialize onto the stored graph (keeping every unchanged value's + * stored bytes and every id the lock binds), then every gate (protected blocks, engine gates, + * types that may stay but not be added), the value checks and lint. Returns the refusals, located + * in the submitted text, or the plan the write stores. + */ +export async function evaluateSource(input: SourceEvaluationInput): Promise { + const { principal, scope, catalog, files } = input + const isNew = input.create !== undefined + + const parsedLock = parseWorkflowLock(input.lock) + if (parsedLock.diagnostics) { + return { refused: parsedLock.diagnostics.map(createLocator(files, {}, new Map())) } + } + const lock = parsedLock.lock + + const entryText = files[ENTRY_FILE] + if (entryText === undefined) { + throw new OrchestrationError('validation', `files must include ${ENTRY_FILE}`) + } + const storedIdentity = input.storedCanonical.canonical.identity + const compiled = compileWorkflow({ + entry: { path: ENTRY_FILE, text: entryText }, + files: new Map(Object.entries(files).filter(([path]) => path !== ENTRY_FILE)), + catalog, + sdkMajor: catalog.sdkMajor, + knownKeys: new Set([...Object.keys(lock.blocks), ...Object.keys(storedIdentity.blocks)]), + }) + const compiledWorkflow = compiled.workflow + if (!compiledWorkflow || hasErrors(compiled.diagnostics)) { + return { refused: compiled.diagnostics.map(createLocator(files, compiled.spans, new Map())) } + } + + const { state } = input.stored + let resources = input.storedCanonical.resources + let storedCanonical = input.storedCanonical.canonical + let meta = input.stored.meta + if (input.create) { + meta = { + name: input.create.name ?? compiledWorkflow.meta.name, + description: + input.create.description !== undefined + ? input.create.description + : compiledWorkflow.meta.description, + } + storedCanonical = canonicalize(state, { catalog, meta, resources }) + } + + const compiledKeys: ResourceKeyRef[] = [] + collectResourceKeys(compiledWorkflow.blocks, compiledKeys) + const storedResources = resources + if (compiledKeys.some(({ kind, key }) => storedResources.toId(kind, key) === null)) { + const { loaded } = input.storedCanonical + resources = await loadResourceKeyResolver( + scope.workspaceId, + { ids: loaded.ids, keys: [...loaded.keys, ...compiledKeys] }, + { createdBy: input.createdBy } + ) + } + + const hasLockEntries = + Object.keys(lock.blocks).length > 0 || Object.keys(lock.variables).length > 0 + const lockFreshness: 'fresh' | 'stale' | 'none' = !hasLockEntries + ? 'none' + : input.lockBase && + (input.lockBase.workspaceId !== scope.workspaceId || + input.lockBase.baseFingerprint !== input.storedFingerprint) + ? 'stale' + : 'fresh' + const compiledBindings: Record = {} + for (const [key, hint] of Object.entries(compiled.hints.blocks)) { + if (hint.binding !== undefined) compiledBindings[key] = hint.binding + } + const hooks = createMaterializeHooks() + const materializeWith = (withLock: WorkflowLockV1): MaterializeResult => + materialize(compiledWorkflow, withLock, { + catalog, + hooks, + prev: state, + resources, + compiledBindings, + lockFreshness, + }) + + /** + * A lock id for a new block that another workflow already stores cannot be reused (block ids + * are global keys): drop it from the lock so materialize mints one, and say so. + */ + let materialized = materializeWith(lock) + const claimedDiagnostics: Diagnostic[] = [] + const lockSuppliedIds = materialized.entries.flatMap((entry) => + entry.status === 'created' && entry.idSource === 'lock' ? [entry.id] : [] + ) + const claimed = new Set(await findBlockIdsClaimedElsewhere(scope.workflowId, lockSuppliedIds)) + if (claimed.size > 0) { + const blocks: Record = {} + for (const [key, entry] of Object.entries(lock.blocks)) { + if (claimed.has(entry.id)) { + claimedDiagnostics.push({ + code: 'W_MAT_LOCK_ID_CLAIMED', + severity: 'warning', + message: `The lock id for block "${key}" belongs to another workflow; a new id was minted`, + blockKey: key, + }) + } else { + blocks[key] = entry + } + } + materialized = materializeWith({ ...lock, blocks }) + } + + const idByKey = new Map( + Object.entries(materialized.identity.blocks).map(([key, block]) => [key, block.id]) + ) + const keyById = new Map([...idByKey].map(([key, id]) => [id, key])) + const keyOf = (id: string) => keyById.get(id) ?? '' + const locate = createLocator(files, compiled.spans, idByKey) + const materializeDiagnostics = [...materialized.diagnostics, ...claimedDiagnostics] + if (hasErrors(materializeDiagnostics)) { + return { refused: [...compiled.diagnostics, ...materializeDiagnostics].map(locate) } + } + + const baseCanonical = canonicalizeUnderLock( + state, + { catalog, meta, resources }, + storedCanonical, + lock + ) + /** The source's name and description never change a stored workflow, so they are not diffed. */ + const ignoredMeta = isNew + ? [] + : META_FIELDS.filter((field) => compiledWorkflow.meta[field] !== meta[field]) + const canonicalDiff = diffCanonical( + baseCanonical.workflow, + { ...compiledWorkflow, meta: baseCanonical.workflow.meta }, + renamesBetween(baseCanonical.identity, materialized.identity) + ) + const warnings: string[] = [] + if (ignoredMeta.length > 0) { + warnings.push( + `The workflow ${ignoredMeta.join(' and ')} in the source differs from the stored one and was not changed; rename or describe the workflow through its settings.` + ) + } + + const storedGraph: SourceGraph = { blocks: state.blocks, edges: state.edges } + let blocks = materialized.state.blocks + const edges = materialized.state.edges + const graphDiff = diffGraphs(storedGraph, { blocks, edges }) + + const permissionConfig = await resolvePermissionGroupConfig( + scope.subjectUserId, + scope.workspaceId, + scope.workspaceOrganizationId + ) + const gateDiagnostics = await gateSourceDiff({ + base: storedGraph, + target: { blocks, edges }, + diff: graphDiff, + permissionConfig, + subjectUserId: scope.subjectUserId, + workspaceId: scope.workspaceId, + isCopilot: principal.kind === 'delegated' && principal.serviceId === 'copilot', + }) + const refusals: Diagnostic[] = [ + ...findProtectedBlockRefusals(storedGraph, { blocks, edges }, graphDiff), + ...gateDiagnostics, + ] + + const typeChanged = graphDiff.modified.filter((change) => change.typeChanged).map((c) => c.id) + for (const id of [...graphDiff.added, ...typeChanged]) { + const block = blocks[id] + if (block && catalogBlock(catalog, block.type)?.addable === false) { + refusals.push({ + code: 'E_TYPE_NOT_ADDABLE', + severity: 'error', + message: `Block type "${block.type}" can stay where it is already used but cannot be added`, + blockId: id, + blockKey: keyOf(id), + }) + } + } + + for (const diagnostic of gateDiagnostics) { + if (diagnostic.code !== 'W_APPLY_HOSTED_KEY_DROPPED' || !diagnostic.blockId) continue + const { blockId, param } = diagnostic + const block = blocks[blockId] + if (!param || !block?.subBlocks?.[param]) continue + blocks = { + ...blocks, + [blockId]: { + ...block, + subBlocks: { ...block.subBlocks, [param]: { ...block.subBlocks[param], value: null } }, + }, + } + } + + const normalized = normalizeChangedValues(blocks, graphDiff, keyOf) + blocks = await snapshotMcpToolOutputSchemas(normalized.blocks, state.blocks, { + principal, + workspaceId: scope.workspaceId, + }) + if (materialized.needsLayout.length > 0) { + blocks = layoutChangedBlocks(scope.workflowId, storedGraph, { blocks, edges }) + } + + const lint = await buildWorkflowLintReport( + { blocks, edges }, + { + workflowId: scope.workflowId, + workspaceId: scope.workspaceId, + subjectUserId: scope.subjectUserId, + } + ) + const changedIds = new Set([...graphDiff.added, ...graphDiff.modified.map((m) => m.id)]) + const diagnostics = [ + ...compiled.diagnostics, + ...materializeDiagnostics, + ...refusals, + ...normalized.diagnostics, + ...lintDiagnostics(lint, changedIds, (id) => keyById.get(id)), + ].map(locate) + if (hasErrors(diagnostics)) return { refused: diagnostics } + + const noop = !isNew && canonicalDiff.noop + const mintedIds: Record = {} + for (const entry of materialized.entries) { + if (entry.status === 'created' && entry.idSource === 'minted') mintedIds[entry.key] = entry.id + } + const { added, removed, modified } = canonicalDiff.variables + const variables = + added.length > 0 || removed.length > 0 || modified.length > 0 + ? normalizeWorkflowVariables(materialized.state.variables ?? {}, { coerceValues: true }) + : undefined + const compiledSource = { hints: compiled.hints, workflow: compiledWorkflow } + const lockAfter = boundLock(materialized.identity, lock) + + return { + plan: { + meta, + noop, + blocks, + edges, + variables, + storedVariables: + variables === undefined ? state.variables : (parseWorkflowVariables(variables) ?? {}), + diagnostics, + warnings, + diff: summarizeDiff(canonicalDiff, baseCanonical.identity, materialized.identity, noop), + mintedIds, + identity: materialized.identity, + lock: lockAfter, + compiled: compiledSource, + codeMeta: mergeCodeMetaFromLock(input.storedCodeMeta, lockAfter, compiledSource), + functionCode: Object.values(compiled.hints.blocks).some((hint) => hint.codeFile) + ? 'files' + : 'inline', + resources, + }, + } +} diff --git a/apps/sim/lib/workflows/source/gates.test.ts b/apps/sim/lib/workflows/code/apply/gates.test.ts similarity index 99% rename from apps/sim/lib/workflows/source/gates.test.ts rename to apps/sim/lib/workflows/code/apply/gates.test.ts index 7012e045415..5ef7e8715a7 100644 --- a/apps/sim/lib/workflows/source/gates.test.ts +++ b/apps/sim/lib/workflows/code/apply/gates.test.ts @@ -22,15 +22,15 @@ import { DEFAULT_PERMISSION_GROUP_CONFIG, type PermissionGroupConfig, } from '@/lib/permission-groups/fields' +import { gateSourceDiff, SKIP_TYPE_APPLY_CODES } from '@/lib/workflows/code/apply/gates' +import type { SourceGraph } from '@/lib/workflows/code/apply/graph-diff' +import { findProtectedBlockRefusals } from '@/lib/workflows/code/apply/protected' import { decideBlockEnablement } from '@/lib/workflows/editing/block-enablement' import { applyOperationsToWorkflowState } from '@/lib/workflows/editing/engine' import { operationsReferenceSimSandbox } from '@/lib/workflows/editing/sandbox-projection' import type { EditWorkflowOperation } from '@/lib/workflows/editing/types' import { isDeferredSkippedItem } from '@/lib/workflows/editing/types' import { preValidateCredentialInputs } from '@/lib/workflows/editing/validation' -import { gateSourceDiff, SKIP_TYPE_APPLY_CODES } from '@/lib/workflows/source/gates' -import type { SourceGraph } from '@/lib/workflows/source/graph-diff' -import { findProtectedBlockRefusals } from '@/lib/workflows/source/protected' import { getAllBlocks, getBlock } from '@/blocks/registry' import * as providerModels from '@/providers/models' diff --git a/apps/sim/lib/workflows/source/gates.ts b/apps/sim/lib/workflows/code/apply/gates.ts similarity index 99% rename from apps/sim/lib/workflows/source/gates.ts rename to apps/sim/lib/workflows/code/apply/gates.ts index a5c48d1c68a..2b0dc3c5c95 100644 --- a/apps/sim/lib/workflows/source/gates.ts +++ b/apps/sim/lib/workflows/code/apply/gates.ts @@ -6,6 +6,7 @@ import { isEqual } from 'es-toolkit' import { hasWorkspaceSandboxAccess } from '@/lib/billing/core/subscription' import { MAX_PLAN_REQUIRED } from '@/lib/execution/remote-sandbox/entitlement' import type { PermissionGroupConfig } from '@/lib/permission-groups/fields' +import { diffGraphs, type GraphDiff, type SourceGraph } from '@/lib/workflows/code/apply/graph-diff' import { hasDisabledAncestor } from '@/lib/workflows/editing/block-enablement' import { createSubBlockInputGate, @@ -20,7 +21,6 @@ import type { ValidationError, } from '@/lib/workflows/editing/types' import { isBlockTypeAllowed, preValidateCredentialInputs } from '@/lib/workflows/editing/validation' -import { diffGraphs, type GraphDiff, type SourceGraph } from '@/lib/workflows/source/graph-diff' import { validateToolBindingAuthoring } from '@/lib/workflows/tool-input/authoring' import { TriggerUtils } from '@/lib/workflows/triggers/triggers' import { getBlock } from '@/blocks/registry' diff --git a/apps/sim/lib/workflows/source/graph-diff.ts b/apps/sim/lib/workflows/code/apply/graph-diff.ts similarity index 100% rename from apps/sim/lib/workflows/source/graph-diff.ts rename to apps/sim/lib/workflows/code/apply/graph-diff.ts diff --git a/apps/sim/lib/workflows/code/apply/locate.ts b/apps/sim/lib/workflows/code/apply/locate.ts new file mode 100644 index 00000000000..881113b3000 --- /dev/null +++ b/apps/sim/lib/workflows/code/apply/locate.ts @@ -0,0 +1,341 @@ +import { + type AnchorKey, + type CanonicalDiff, + type CompileResult, + codeFrame, + type Diagnostic, + encodeAnchor, + type LockIdentity, + type SourceSpan, +} from '@sim/workflow-code' +import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' +import type { BlockState } from '@sim/workflow-types/workflow' +import { isEqual } from 'es-toolkit' +import type { WorkflowSourceDiagnostic } from '@/lib/workflows/application/source-error' +import type { GraphDiff } from '@/lib/workflows/code/apply/graph-diff' +import type { WorkflowLintReport } from '@/lib/workflows/editing/lint' +import { validateValueForSubBlockType } from '@/lib/workflows/editing/validation' +import { validateWorkflowState } from '@/lib/workflows/sanitization/validation' +import { buildSubBlockValues } from '@/lib/workflows/subblocks/visibility' +import { getBlock } from '@/blocks/registry' + +const CONTAINER_TYPES: ReadonlySet = new Set(['loop', 'parallel']) + +interface SourceBlockRef { + id: string + key: string +} + +/** What the apply changed (or, on a dry run, would change), by stored id and source key. */ +export interface SourceDiffSummary { + noop: boolean + blocks: { + added: SourceBlockRef[] + removed: SourceBlockRef[] + renamed: Array<{ id: string; from: string; to: string }> + modified: Array + } + edges: { added: number; removed: number } + variables: { added: string[]; removed: string[]; modified: string[] } +} + +export function hasErrors(diagnostics: readonly { severity: string }[]): boolean { + return diagnostics.some((diagnostic) => diagnostic.severity === 'error') +} + +function spanAnchors(diagnostic: Diagnostic): AnchorKey[] { + if (!diagnostic.blockKey) return [] + const anchors: AnchorKey[] = [] + if (diagnostic.param) { + anchors.push( + encodeAnchor({ kind: 'param', block: diagnostic.blockKey, param: diagnostic.param }) + ) + } + anchors.push(encodeAnchor({ kind: 'block', block: diagnostic.blockKey })) + return anchors +} + +/** + * Pins findings to the submitted text. A compile finding already has its span; a server finding + * (gate, value, lint) is placed on its param, else its block declaration, through the compile + * span map. + */ +export function createLocator( + files: Record, + spans: CompileResult['spans'], + idByKey: ReadonlyMap +) { + return (diagnostic: Diagnostic): WorkflowSourceDiagnostic => { + let span: SourceSpan | undefined = diagnostic.span + if (!span) { + for (const anchor of spanAnchors(diagnostic)) { + const found = spans[anchor] + if (found) { + span = found + break + } + } + } + const text = span ? files[span.file] : undefined + const blockId = + diagnostic.blockId ?? (diagnostic.blockKey ? idByKey.get(diagnostic.blockKey) : undefined) + return { + code: diagnostic.code, + severity: diagnostic.severity, + message: diagnostic.message, + ...(diagnostic.hint !== undefined ? { hint: diagnostic.hint } : {}), + ...(span + ? { + file: span.file, + line: span.line, + column: span.column, + endLine: span.endLine, + endColumn: span.endColumn, + } + : {}), + ...(diagnostic.frame !== undefined + ? { frame: diagnostic.frame } + : span && text !== undefined + ? { + frame: codeFrame(text, { + line: span.line, + column: span.column, + endLine: span.endLine, + endColumn: span.endColumn, + }), + } + : {}), + ...(diagnostic.blockKey !== undefined ? { blockKey: diagnostic.blockKey } : {}), + ...(blockId !== undefined ? { blockId } : {}), + ...(diagnostic.param !== undefined ? { param: diagnostic.param } : {}), + ...(diagnostic.path !== undefined ? { path: diagnostic.path } : {}), + } + } +} + +/** Subblock ids a diff sets on a block: every one for an added block. */ +function changedFieldsOf(block: BlockState, diff: GraphDiff): string[] { + const modified = diff.modified.find((change) => change.id === block.id) + return modified ? modified.subBlocks : Object.keys(block.subBlocks ?? {}) +} + +/** + * The replace path's value checks, on the blocks this apply adds or changes: + * `validateWorkflowState` with sanitization, then `validateValueForSubBlockType` on each changed, + * currently visible field. An invalid value refuses the apply; a value either step rewrites is + * kept rewritten and reported as `W_APPLY_VALUE_NORMALIZED`. Untouched blocks keep their bytes. + */ +export function normalizeChangedValues( + input: Record, + diff: GraphDiff, + keyOf: (id: string) => string +): { blocks: Record; diagnostics: Diagnostic[] } { + let blocks = input + const diagnostics: Diagnostic[] = [] + const changedIds = [...diff.added, ...diff.modified.map((change) => change.id)] + for (const id of changedIds) { + const original = blocks[id] + if (!original || CONTAINER_TYPES.has(original.type)) continue + const blockKey = keyOf(id) + + const validation = validateWorkflowState( + { blocks: { [id]: original }, edges: [], loops: {}, parallels: {} }, + { sanitize: true } + ) + for (const error of validation.errors) { + diagnostics.push({ + code: 'E_APPLY_INVALID_STATE', + severity: 'error', + message: error, + blockId: id, + blockKey, + }) + } + const sanitized = validation.sanitizedState?.blocks[id] + if (sanitized && !isEqual(sanitized, original)) { + blocks = { ...blocks, [id]: sanitized } + diagnostics.push({ + code: 'W_APPLY_VALUE_NORMALIZED', + severity: 'warning', + message: `Block "${original.name}": ${validation.warnings.join('; ') || 'values were sanitized'}`, + blockId: id, + blockKey, + }) + } + + const block = blocks[id] + const config = getBlock(block.type) + if (!config) continue + const values = buildSubBlockValues(block.subBlocks) + const visible = new Map( + config.subBlocks + .filter((field) => evaluateSubBlockCondition(field.condition, values)) + .map((field) => [field.id, field]) + ) + let subBlocks = block.subBlocks + for (const fieldId of changedFieldsOf(original, diff)) { + const field = visible.get(fieldId) + const stored = subBlocks?.[fieldId] + if (!field || !stored) continue + const result = validateValueForSubBlockType(field, stored.value, field.id, block.type, id) + if (!result.valid) { + diagnostics.push({ + code: 'E_APPLY_INVALID_SUBBLOCK_FIELD', + severity: 'error', + message: result.error?.error ?? `Invalid value for ${field.id}`, + blockId: id, + blockKey, + param: fieldId, + }) + continue + } + if (!isEqual(result.value, stored.value) || stored.type !== field.type) { + if (!isEqual(result.value, stored.value)) { + diagnostics.push({ + code: 'W_APPLY_VALUE_NORMALIZED', + severity: 'warning', + message: `Block "${block.name}": ${field.id} was normalized to the field's stored form`, + blockId: id, + blockKey, + param: fieldId, + }) + } + subBlocks = { + ...subBlocks, + [fieldId]: { ...stored, value: result.value, type: field.type }, + } + } + } + if (subBlocks !== block.subBlocks) { + blocks = { ...blocks, [id]: { ...block, subBlocks } } + } + } + return { blocks, diagnostics } +} + +/** + * Lint findings as source diagnostics. A structural finding (a connection to an invalid target, + * an invalid branch port, a reference to an output no block provides) on a block this apply adds + * or changes is blocking (`E_APPLY_LINT`); every other finding, and any finding on a block the + * apply left alone, is a warning. A canvas can save all of these, so only what the apply itself + * introduces is refused. + */ +export function lintDiagnostics( + lint: WorkflowLintReport, + changedIds: ReadonlySet, + keyOf: (id: string) => string | undefined +): Diagnostic[] { + const diagnostics: Diagnostic[] = [] + const push = (blocking: boolean, blockId: string, message: string, param?: string) => { + const blockKey = keyOf(blockId) + const located = { + message, + blockId, + ...(blockKey !== undefined ? { blockKey } : {}), + ...(param !== undefined ? { param } : {}), + } + diagnostics.push( + blocking && changedIds.has(blockId) + ? { code: 'E_APPLY_LINT', severity: 'error', ...located } + : { code: 'W_APPLY_LINT', severity: 'warning', ...located } + ) + } + for (const target of lint.invalidConnectionTargets) { + push(true, target.sourceBlockId, `Connection to ${target.targetBlockId}: ${target.reason}`) + } + for (const port of lint.invalidBranchPorts) { + push(true, port.blockId, `Branch port ${port.sourceHandle}: ${port.reason}`) + } + for (const reference of lint.unresolvedReferences) { + push( + reference.kind === 'block-output', + reference.blockId, + `${reference.field}: ${reference.reason}`, + reference.field + ) + } + for (const issue of lint.fieldIssues) { + for (const field of issue.missingRequiredFields) { + push(false, issue.blockId, `Required field ${field} is empty`, field) + } + } + for (const issue of lint.tableFieldIssues) { + push( + false, + issue.blockId, + `${issue.field} is not a column of table "${issue.tableName}"`, + issue.field + ) + } + for (const orphan of lint.orphanBlocks) { + push(false, orphan.blockId, 'Block has no incoming connection') + } + for (const port of lint.emptyOutgoingPorts) { + push(false, port.blockId, `Port ${port.label} has no connection`) + } + if (lint.manualRunIssue) { + const blockId = lint.manualRunIssue.blockId + if (blockId) push(false, blockId, lint.manualRunIssue.message) + else { + diagnostics.push({ + code: 'W_APPLY_LINT', + severity: 'warning', + message: lint.manualRunIssue.message, + }) + } + } + return diagnostics +} + +/** The canonical diff by stored id and source key; `noop` is whether the graph is unchanged. */ +export function summarizeDiff( + diff: CanonicalDiff, + baseIdentity: LockIdentity, + targetIdentity: LockIdentity, + noop: boolean +): SourceDiffSummary { + const targetId = (key: string) => targetIdentity.blocks[key]?.id ?? '' + const baseId = (key: string) => baseIdentity.blocks[key]?.id ?? '' + return { + noop, + blocks: { + added: diff.blocks.added.map((key) => ({ id: targetId(key), key })), + removed: diff.blocks.removed.map((key) => ({ id: baseId(key), key })), + renamed: diff.blocks.renamed.map(({ from, to }) => ({ id: targetId(to), from, to })), + modified: diff.blocks.modified.map((change) => { + const fields = change.changes.map((item) => + item.kind === 'param' + ? item.param + : item.kind === 'mode' + ? `modes.${item.canonicalParamId}` + : item.attribute + ) + const reparented = change.changes.some( + (item) => item.kind === 'attribute' && item.attribute === 'parent' + ) + return { + id: targetId(change.key), + key: change.key, + fields, + ...(reparented ? { reparented } : {}), + } + }), + }, + edges: { added: diff.edges.added.length, removed: diff.edges.removed.length }, + variables: { + added: diff.variables.added, + removed: diff.variables.removed, + modified: diff.variables.modified, + }, + } +} + +/** The summary of an apply that refused before diffing. */ +export function emptyDiffSummary(): SourceDiffSummary { + return { + noop: true, + blocks: { added: [], removed: [], renamed: [], modified: [] }, + edges: { added: 0, removed: 0 }, + variables: { added: [], removed: [], modified: [] }, + } +} diff --git a/apps/sim/lib/workflows/code/apply/print.ts b/apps/sim/lib/workflows/code/apply/print.ts new file mode 100644 index 00000000000..cdb72732857 --- /dev/null +++ b/apps/sim/lib/workflows/code/apply/print.ts @@ -0,0 +1,135 @@ +import { + type BlockCatalog, + type CanonicalizeResult, + type CanonicalWorkflowMeta, + canonicalize, + type Diagnostic, + type LockIdentity, + printWorkflow, + type ResourceKeyResolver, + type SourceFingerprint, + sourceFingerprint, + type WorkflowCodeMetaV1, + type WorkflowLockBlock, + type WorkflowLockV1, +} from '@sim/workflow-code' +import type { WorkflowState } from '@sim/workflow-types/workflow' +import { buildLockFromState, codeMetaPrintInputs } from '@/lib/workflows/code/source-lock' +import { canonicalizeUnderLock } from '@/lib/workflows/code/stored-canonical' + +/** Directory function-code files are printed into when `functionCode` is `files`. */ +const FUNCTION_CODE_DIR = 'functions' + +/** A stored draft as canonicalize reads it, plus the row fields the canonical `meta` carries. */ +export interface StoredSource { + state: WorkflowState + meta: CanonicalWorkflowMeta +} + +interface PrintStoredSourceInput extends StoredSource { + catalog: BlockCatalog + resources: ResourceKeyResolver + /** The bindings, order and comments to print with. */ + codeMeta: WorkflowCodeMetaV1 | null + functionCode: 'inline' | 'files' + /** `state`'s lockless canonical model, when the caller already holds it. */ + lockless?: CanonicalizeResult + /** + * Keys to print under: an apply prints the keys its submission bound, so branch keys follow + * the submitted lock. Omitted, the stored state's own keys print. + */ + identity?: LockIdentity +} + +export interface PrintedSource { + /** Relative path → text: `workflow.ts` first, then any function-code files. */ + files: Record + lock: WorkflowLockV1 + /** The `sf1:` freshness token of the state, which ignores the lock and canvas positions. */ + fingerprint: SourceFingerprint + /** The canonical model the files print. */ + canonical: CanonicalizeResult + /** Print findings. */ + diagnostics: Diagnostic[] +} + +/** + * Prints a stored (or about-to-be-stored) state as source with the bindings, order and comments + * of `codeMeta`, assembles its lock from the same print, and computes its fingerprint. `source get` + * and every apply response go through here, so an apply answers with exactly what the next get + * prints and its fingerprint is the next apply's base. + */ +export function printStoredSource(input: PrintStoredSourceInput): PrintedSource { + const { state, meta, catalog, resources, codeMeta } = input + const lockless = input.lockless ?? canonicalize(state, { catalog, meta, resources }) + const canonical = input.identity + ? canonicalizeUnderLock( + state, + { catalog, meta, resources }, + lockless, + identityLock(input.identity) + ) + : lockless + const metaInputs = codeMetaPrintInputs(codeMeta, canonical) + const printed = printWorkflow({ + workflow: { + ...canonical.workflow, + annotations: { + ...canonical.workflow.annotations, + comments: { ...canonical.workflow.annotations.comments, ...metaInputs.comments }, + }, + }, + catalog, + hints: metaInputs.hints, + options: + input.functionCode === 'files' + ? { functionCode: 'files', codeDir: FUNCTION_CODE_DIR } + : { functionCode: 'inline' }, + }) + return { + files: Object.fromEntries(printed.files.map((file) => [file.path, file.text])), + lock: buildLockFromState(codeMeta, canonical, printed.hints), + fingerprint: sourceFingerprint(lockless.workflow, lockless.identity), + canonical, + diagnostics: printed.diagnostics, + } +} + +/** The fingerprint of a stored draft exactly as {@link printStoredSource} computes it. */ +export function fingerprintOf( + stored: StoredSource, + catalog: BlockCatalog, + resources: ResourceKeyResolver +): SourceFingerprint { + const { workflow, identity } = canonicalize(stored.state, { + catalog, + meta: stored.meta, + resources, + }) + return sourceFingerprint(workflow, identity) +} + +/** + * A lock carrying only identity. `canonicalize` reads a lock's ids and branch keys and nothing + * else, so the printer-owned fields are placeholders here; the real ones come from the print. + */ +function identityLock(identity: LockIdentity): WorkflowLockV1 { + const blocks: Record = {} + for (const [key, block] of Object.entries(identity.blocks)) { + blocks[key] = { ...block, binding: key, order: 0 } + } + return { lockVersion: 1, blocks, variables: identity.variables } +} + +/** + * The post-materialize lock `mergeCodeMetaFromLock` re-keys onto: every bound key with its id, + * and the submitted lock's binding and order for a block the file does not state them for. + */ +export function boundLock(identity: LockIdentity, submitted: WorkflowLockV1): WorkflowLockV1 { + const blocks: Record = {} + for (const [key, block] of Object.entries(identity.blocks)) { + const previous = Object.hasOwn(submitted.blocks, key) ? submitted.blocks[key] : undefined + blocks[key] = { ...block, binding: previous?.binding ?? key, order: previous?.order ?? 0 } + } + return { lockVersion: 1, blocks, variables: identity.variables } +} diff --git a/apps/sim/lib/workflows/source/protected.test.ts b/apps/sim/lib/workflows/code/apply/protected.test.ts similarity index 98% rename from apps/sim/lib/workflows/source/protected.test.ts rename to apps/sim/lib/workflows/code/apply/protected.test.ts index 3831d2a5a44..546b232c3c1 100644 --- a/apps/sim/lib/workflows/source/protected.test.ts +++ b/apps/sim/lib/workflows/code/apply/protected.test.ts @@ -6,11 +6,11 @@ import { omit } from '@sim/utils/object' import { type BlockState, preserveProtectedWorkflowBlocks } from '@sim/workflow-types/workflow' import { describe, expect, it } from 'vitest' -import type { SourceGraph } from '@/lib/workflows/source/graph-diff' +import type { SourceGraph } from '@/lib/workflows/code/apply/graph-diff' import { assertProtectedBlocksPreserved, findProtectedBlockRefusals, -} from '@/lib/workflows/source/protected' +} from '@/lib/workflows/code/apply/protected' type GraphEdge = SourceGraph['edges'][number] diff --git a/apps/sim/lib/workflows/source/protected.ts b/apps/sim/lib/workflows/code/apply/protected.ts similarity index 99% rename from apps/sim/lib/workflows/source/protected.ts rename to apps/sim/lib/workflows/code/apply/protected.ts index 3cfd3885453..6b11b04ad0c 100644 --- a/apps/sim/lib/workflows/source/protected.ts +++ b/apps/sim/lib/workflows/code/apply/protected.ts @@ -13,7 +13,7 @@ import { isLocked, parentIdOf, type SourceGraph, -} from '@/lib/workflows/source/graph-diff' +} from '@/lib/workflows/code/apply/graph-diff' /** * The source apply path refuses, and never silently preserves, any change to a protected block: diff --git a/apps/sim/lib/workflows/code/stored-canonical.ts b/apps/sim/lib/workflows/code/stored-canonical.ts index 3b2c45815cc..5a3d6a68b24 100644 --- a/apps/sim/lib/workflows/code/stored-canonical.ts +++ b/apps/sim/lib/workflows/code/stored-canonical.ts @@ -46,7 +46,7 @@ interface StoredCanonicalInput { createdBy: string | null } -interface StoredCanonical { +export interface StoredCanonical { /** The lockless canonical model of the stored graph, resource ids lifted to keys. */ canonical: CanonicalizeResult /** Answers every reference in `loaded` from this workspace's bindings. */ diff --git a/apps/sim/scripts/test-workflow-source-e2e.ts b/apps/sim/scripts/test-workflow-source-e2e.ts index 36ec6637ec4..d462fd099bd 100644 --- a/apps/sim/scripts/test-workflow-source-e2e.ts +++ b/apps/sim/scripts/test-workflow-source-e2e.ts @@ -300,11 +300,10 @@ try { assert.equal(canonicalHash(canonical.workflow), baseline.canonicalHash) }) - await check('annotateIds and inline function code keep the canonical hash', async () => { + await check('inline function code keeps the canonical hash', async () => { assert(baseline, 'baseline source must be read first') - const source = await readSource('?annotateIds=true&functionCode=inline') + const source = await readSource('?functionCode=inline') assert.deepEqual(Object.keys(source.files), ['workflow.ts']) - assert(source.files['workflow.ts']?.includes(`// id: ${scoreBlockId}`), 'Ids are annotated') assert.equal(source.canonicalHash, baseline.canonicalHash) assert.equal(source.fingerprint, baseline.fingerprint) assert.equal(canonicalHash(compileSource(source, await readCatalog())), source.canonicalHash) diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts b/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts index c702303c524..4cdd9b11ad9 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts @@ -201,10 +201,10 @@ describe('sim workflows source get --out', () => { it('prints the response unchanged without --out', async () => { request.mockResolvedValue(source()) - await get('--annotate-ids') + await get('--function-code', 'inline') expect(request).toHaveBeenCalledTimes(1) - expect(request.mock.calls[0][1].query).toMatchObject({ annotateIds: true }) + expect(request.mock.calls[0][1].query).toMatchObject({ functionCode: 'inline' }) expect(existsSync(join(outDir, 'workflow.ts'))).toBe(false) }) }) diff --git a/packages/sim-cli/src/generated/v2-api.ts b/packages/sim-cli/src/generated/v2-api.ts index af0d46e3139..bbdcd2c1c79 100644 --- a/packages/sim-cli/src/generated/v2-api.ts +++ b/packages/sim-cli/src/generated/v2-api.ts @@ -738,7 +738,6 @@ export type ApplyWorkflowSourceBody = { catalogHash: string } baseFingerprint: string - layout?: 'preserve' | 'lock' provenance?: { client: 'cli' | 'copilot' | 'canvas' | 'api' gitSha?: string @@ -9009,7 +9008,6 @@ export type GetWorkflowSourceParams = { } export type GetWorkflowSourceQuery = { - annotateIds?: boolean functionCode?: 'inline' | 'files' } @@ -17644,12 +17642,6 @@ export const V2_OPERATIONS = { describe: 'The `fingerprint` the source was read at. The apply answers `409` when the saved draft no longer matches it.', }, - layout: { - kind: 'enum', - values: ['preserve', 'lock'] as const, - describe: - '`preserve` (default): existing blocks keep their canvas positions and lock positions apply only to new blocks. `lock`: every block the lock positions moves there.', - }, provenance: { kind: 'object', describe: 'Where the source came from, for the audit log.' }, }, }, @@ -21282,10 +21274,6 @@ export const V2_OPERATIONS = { responseMode: 'json', summary: 'Get workflow source', query: { - annotateIds: { - kind: 'boolean', - describe: "Print each block's id as a trailing `// id:` comment on its declaration.", - }, functionCode: { kind: 'enum', values: ['inline', 'files'] as const, diff --git a/packages/workflow-code/src/api.ts b/packages/workflow-code/src/api.ts index f820d042429..f564befe9ec 100644 --- a/packages/workflow-code/src/api.ts +++ b/packages/workflow-code/src/api.ts @@ -112,11 +112,6 @@ export interface MaterializeOptions { /** The stored graph being replaced. Absent for a new workflow. */ prev?: WorkflowState resources?: ResourceKeyResolver - /** - * `preserve` (default): existing blocks keep prev positions; lock layout applies only to new - * blocks. `lock`: lock layout applies to every block that has one (s4 D3). - */ - layout?: 'preserve' | 'lock' /** Disables identity rule 4 (`--no-infer-renames`). */ inferRenames?: boolean /** diff --git a/packages/workflow-code/src/lock.ts b/packages/workflow-code/src/lock.ts index f1d54e7a93f..b43013a855f 100644 --- a/packages/workflow-code/src/lock.ts +++ b/packages/workflow-code/src/lock.ts @@ -27,7 +27,7 @@ export type SourceFingerprint = `sf1:${string}` /** An extension field: tolerated and preserved by every validator, never interpreted. */ export type LockExtensionKey = `x-${string}` -/** Canvas geometry, used only for new blocks or `layout: 'lock'` applies (s4 D3). */ +/** Canvas geometry; materialize applies it only to a block the stored graph does not hold. */ export interface LockLayout { [extension: LockExtensionKey]: Json x: number diff --git a/packages/workflow-code/src/materialize/block.ts b/packages/workflow-code/src/materialize/block.ts index 3338928fddd..8dc4d02e515 100644 --- a/packages/workflow-code/src/materialize/block.ts +++ b/packages/workflow-code/src/materialize/block.ts @@ -32,9 +32,8 @@ export interface BlockInputs { } /** The lock entry whose id this block carries (branch and item ids). */ lockBlock: WorkflowLockBlock | undefined - /** The lock layout recorded under this key. */ + /** The lock layout recorded under this key; it positions only a new block. */ layout: LockLayout | undefined - layoutMode: 'preserve' | 'lock' } export interface BuiltBlock { @@ -113,7 +112,6 @@ function rawValues(subBlocks: Record): Record = {} diff --git a/packages/workflow-code/src/materialize/index.test.ts b/packages/workflow-code/src/materialize/index.test.ts index 7df9a85e4dc..ee78864345a 100644 --- a/packages/workflow-code/src/materialize/index.test.ts +++ b/packages/workflow-code/src/materialize/index.test.ts @@ -714,13 +714,6 @@ describe('materialize: positions and server-owned fields', () => { expect(two.height).toBe(80) expect(two.data?.width).toBe(300) expect(result.needsLayout).toEqual(['three']) - const withLockLayout = run(target, lock, { - prev, - lockFreshness: 'stale', - inferRenames: false, - layout: 'lock', - }) - expect(withLockLayout.state.blocks.f1.position).toEqual({ x: 99, y: 99 }) }) it('writes a new block from initBlock and nulls editor seeds the model does not hold', () => { diff --git a/packages/workflow-code/src/materialize/index.ts b/packages/workflow-code/src/materialize/index.ts index d7f9ee3fb4d..1aa9258e7d6 100644 --- a/packages/workflow-code/src/materialize/index.ts +++ b/packages/workflow-code/src/materialize/index.ts @@ -183,7 +183,6 @@ export const materialize: MaterializeFn = (input, lock, options) => { : undefined, lockBlock: lockById.get(resolved.id), layout: lock?.blocks[key]?.layout, - layoutMode: options.layout ?? 'preserve', }, context ) From f03c67db8282f032bebdb6ce53d5ccfc026885c8 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 23:56:02 -0800 Subject: [PATCH 134/428] test(workflows): one real-catalog golden harness in apps/sim apps/sim/lib/workflows/code/goldens.test.ts replaces the package golden, printer-goldens and determinism tests, the real-catalog drift check and the SDK goldens type-check. It builds the live registry catalog narrowed to the golden types, so the checked-in real-catalog.json goes, and for every case prints byte-equal to its golden, compiles back to the same executable view, reprints byte-identical from the compiled workflow and the print's hints, is order-independent and changes one line per one-param edit; every golden type-checks against core.d.ts plus the generated types. Verbose goldens are discovered from the golden directory, and a golden without a case fails. The hand-built print fixture catalog goes too: TEST_CATALOG covers its unit uses. --- .../code/golden-cases.test-helpers.ts | 118 +++++-- .../lib/workflows/code/golden-catalog.test.ts | 106 ------ apps/sim/lib/workflows/code/goldens.test.ts | 303 ++++++++++++++++++ biome.json | 1 - packages/workflow-code/DESIGN.md | 15 +- .../src/canonicalize/hostile.test.ts | 2 +- .../workflow-code/src/catalog/compact.test.ts | 3 +- .../src/compile/printer-goldens.test.ts | 87 ----- .../src/print/__fixtures__/catalog.ts | 299 ----------------- .../src/print/__fixtures__/real-catalog.json | 1 - .../src/print/__fixtures__/real-catalog.ts | 19 -- .../src/print/determinism.test.ts | 112 ------- .../workflow-code/src/print/golden.test.ts | 123 ------- .../workflow-sdk/src/codegen/goldens.test.ts | 69 ---- scripts/check-workflow-code-golden.ts | 2 +- 15 files changed, 411 insertions(+), 849 deletions(-) rename packages/workflow-code/src/print/__fixtures__/cases.ts => apps/sim/lib/workflows/code/golden-cases.test-helpers.ts (89%) delete mode 100644 apps/sim/lib/workflows/code/golden-catalog.test.ts create mode 100644 apps/sim/lib/workflows/code/goldens.test.ts delete mode 100644 packages/workflow-code/src/compile/printer-goldens.test.ts delete mode 100644 packages/workflow-code/src/print/__fixtures__/catalog.ts delete mode 100644 packages/workflow-code/src/print/__fixtures__/real-catalog.json delete mode 100644 packages/workflow-code/src/print/__fixtures__/real-catalog.ts delete mode 100644 packages/workflow-code/src/print/determinism.test.ts delete mode 100644 packages/workflow-code/src/print/golden.test.ts delete mode 100644 packages/workflow-sdk/src/codegen/goldens.test.ts diff --git a/packages/workflow-code/src/print/__fixtures__/cases.ts b/apps/sim/lib/workflows/code/golden-cases.test-helpers.ts similarity index 89% rename from packages/workflow-code/src/print/__fixtures__/cases.ts rename to apps/sim/lib/workflows/code/golden-cases.test-helpers.ts index 8de29f753f7..275e54b709e 100644 --- a/packages/workflow-code/src/print/__fixtures__/cases.ts +++ b/apps/sim/lib/workflows/code/golden-cases.test-helpers.ts @@ -1,28 +1,104 @@ /** - * Hand-built canonical workflows, one per printer construct (golden snapshots in `__golden__/`). - * Each case names the behavior it pins so a golden diff points at the construct that changed. + * The printer golden cases: hand-built canonical workflows, one per printer construct, over the + * real catalog narrowed to the block types they use. The goldens they print live in + * `packages/workflow-code/src/print/__golden__/`, next to the printer. Each case names the behavior + * it pins so a golden diff points at the construct that changed. */ +import { + type AnchorKey, + type BlockCatalog, + type CanonicalBlock, + type CanonicalEdge, + type CanonicalParam, + type CanonicalTool, + type CanonicalVariable, + type CanonicalWorkflow, + type CatalogBlock, + type CatalogBuilder, + type CatalogTrigger, + type CodeComment, + catalogBlock, + catalogBuilder, + catalogBuilderPaths, + catalogTrigger, + compactBlockCatalog, + encodeAnchor, + type LockHints, + type Port, + sha256Hex, + stableStringify, + type Value, +} from '@sim/workflow-code' +import { editorDefaults } from '@sim/workflow-code/catalog/defaults' import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' -import { encodeAnchor } from '../../anchors' -import type { LockHints } from '../../api' -import { editorDefaults } from '../../catalog/defaults' -import { catalogBlock } from '../../catalog/view' -import type { - AnchorKey, - CanonicalBlock, - CanonicalEdge, - CanonicalParam, - CanonicalTool, - CanonicalVariable, - CanonicalWorkflow, - CodeComment, - Port, - Value, -} from '../../model' -import { realCatalog } from './real-catalog' +import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' +import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' +import { getBlockRegistry } from '@/blocks/registry' +import { SDK_NAMES } from '@/blocks/sdk-names.generated' -export interface PrintCase { +/** Every registry block type a golden case uses. */ +const GOLDEN_CATALOG_TYPES = [ + 'agent', + 'api', + 'condition', + 'function', + 'generic_webhook', + 'gmail_v2', + 'note', + 'response', + 'router_v2', + 'slack_v2', + 'start_trigger', + 'table_v2', + 'variables', +] + +/** + * The live registry catalog narrowed to the golden types: their blocks, the builders that create + * them, and the triggers they deploy as (a trigger block is its own trigger), compacted like the + * served core shard and hashed the same way. Narrowing keeps a registry change to an unrelated + * block from churning the goldens. + */ +function narrowedCatalog(): BlockCatalog { + const { catalog } = buildBlockCatalog({ + blocks: Object.values(getBlockRegistry()), + trigger: registryTrigger, + sdkNames: SDK_NAMES, + }) + const blocks: Record = {} + for (const type of GOLDEN_CATALOG_TYPES) { + const block = catalogBlock(catalog, type) + if (!block) throw new Error(`${type} is not in the registry catalog`) + blocks[type] = block + } + const triggers: Record = {} + const triggerIds = Object.values(blocks).flatMap((block) => [ + block.type, + ...(block.triggers?.available ?? []), + ]) + for (const id of triggerIds) { + const trigger = catalogTrigger(catalog, id) + if (trigger) triggers[id] = trigger + } + const builders: Record = {} + for (const builderPath of catalogBuilderPaths(catalog)) { + const builder = catalogBuilder(catalog, builderPath) + if (builder && Object.hasOwn(blocks, builder.type)) builders[builderPath] = builder + } + const { core } = compactBlockCatalog({ + catalogVersion: catalog.catalogVersion, + sdkMajor: catalog.sdkMajor, + blocks, + triggers, + builders, + }) + return { ...core, hash: sha256Hex(stableStringify(core)) } +} + +export const goldenCatalog: BlockCatalog = narrowedCatalog() + +interface PrintCase { name: string workflow: CanonicalWorkflow hints?: LockHints @@ -41,7 +117,7 @@ type BlockInit = Partial = {} - const declared = catalogBlock(realCatalog, type) + const declared = catalogBlock(goldenCatalog, type) for (const [id, value] of declared ? editorDefaults(declared) : []) { canonicalParams[id] = { kind: 'value', value } } diff --git a/apps/sim/lib/workflows/code/golden-catalog.test.ts b/apps/sim/lib/workflows/code/golden-catalog.test.ts deleted file mode 100644 index 92f17db9249..00000000000 --- a/apps/sim/lib/workflows/code/golden-catalog.test.ts +++ /dev/null @@ -1,106 +0,0 @@ -/** - * The real-catalog snapshot `@sim/workflow-code`'s printer goldens run against - * (`packages/workflow-code/src/print/__fixtures__/real-catalog.json`). The package cannot import - * the registry, so the slice of `buildBlockCatalog` its golden cases use is checked in, and this - * drift check rebuilds it from the live registry: a registry change that alters what the goldens - * print fails here first. Regenerate with `WORKFLOW_CODE_GOLDEN_CATALOG_UPDATE=1`, then refresh the - * goldens (`bun run --cwd packages/workflow-code test src/print src/compile -u`). - */ -import { readFileSync, writeFileSync } from 'node:fs' -import path from 'node:path' -import { - type BlockCatalog, - type CatalogBlock, - type CatalogBuilder, - type CatalogTrigger, - catalogBlock, - catalogBuilder, - catalogBuilderPaths, - catalogTrigger, - compactBlockCatalog, - sha256Hex, - stableStringify, -} from '@sim/workflow-code' -import { describe, expect, it, vi } from 'vitest' - -vi.unmock('@/blocks/registry') -vi.unmock('@/tools/registry') - -import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' -import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' -import { getBlockRegistry } from '@/blocks/registry' -import { SDK_NAMES } from '@/blocks/sdk-names.generated' - -const SNAPSHOT = path.resolve( - process.cwd(), - '../../packages/workflow-code/src/print/__fixtures__/real-catalog.json' -) - -/** Every registry block type a printer golden case uses. */ -const GOLDEN_CATALOG_TYPES = [ - 'agent', - 'api', - 'condition', - 'function', - 'generic_webhook', - 'gmail_v2', - 'note', - 'response', - 'router_v2', - 'slack_v2', - 'start_trigger', - 'table_v2', - 'variables', -] - -/** - * The catalog narrowed to the golden types: their blocks, the builders that create them, and the - * triggers they deploy as (a trigger block is its own trigger), compacted like the served core - * shard and hashed the same way. - */ -function goldenCatalog(catalog: BlockCatalog): BlockCatalog { - const blocks: Record = {} - for (const type of GOLDEN_CATALOG_TYPES) { - const block = catalogBlock(catalog, type) - if (!block) throw new Error(`${type} is not in the registry catalog`) - blocks[type] = block - } - const triggers: Record = {} - const triggerIds = Object.values(blocks).flatMap((block) => [ - block.type, - ...(block.triggers?.available ?? []), - ]) - for (const id of triggerIds) { - const trigger = catalogTrigger(catalog, id) - if (trigger) triggers[id] = trigger - } - const builders: Record = {} - for (const builderPath of catalogBuilderPaths(catalog)) { - const builder = catalogBuilder(catalog, builderPath) - if (builder && Object.hasOwn(blocks, builder.type)) builders[builderPath] = builder - } - const { core } = compactBlockCatalog({ - catalogVersion: catalog.catalogVersion, - sdkMajor: catalog.sdkMajor, - blocks, - triggers, - builders, - }) - return { ...core, hash: sha256Hex(stableStringify(core)) } -} - -describe('the printer goldens real-catalog snapshot', () => { - it('matches the live registry', () => { - const { catalog } = buildBlockCatalog({ - blocks: Object.values(getBlockRegistry()), - trigger: registryTrigger, - sdkNames: SDK_NAMES, - }) - const text = `${JSON.stringify(goldenCatalog(catalog))}\n` - if (process.env.WORKFLOW_CODE_GOLDEN_CATALOG_UPDATE === '1') writeFileSync(SNAPSHOT, text) - expect( - readFileSync(SNAPSHOT, 'utf8') === text, - 'real-catalog.json is stale: rerun with WORKFLOW_CODE_GOLDEN_CATALOG_UPDATE=1' - ).toBe(true) - }) -}) diff --git a/apps/sim/lib/workflows/code/goldens.test.ts b/apps/sim/lib/workflows/code/goldens.test.ts new file mode 100644 index 00000000000..0e5abf1b964 --- /dev/null +++ b/apps/sim/lib/workflows/code/goldens.test.ts @@ -0,0 +1,303 @@ +/** + * The printer goldens over the real catalog. Every golden case prints byte for byte to its golden + * (`packages/workflow-code/src/print/__golden__/`), compiles back with zero errors to a workflow + * that runs as the one it was printed from (its executable view), and reprints to the same bytes + * from the compiled workflow and the hints the print returned. A print does not depend on record + * order, and a one-param edit changes one line. Every golden then type-checks against the shipped + * `core.d.ts` plus the SDK types generated from the same catalog, with the workspace's TypeScript 7 + * compiler. + * + * A `.verbose.txt` golden pins that case's verbose print; the set is read from the golden + * directory, so adding or removing one needs no change here. Refresh the goldens with + * `bun run --cwd apps/sim test lib/workflows/code/goldens.test.ts -u`; never edit one by hand. + */ +import { execFileSync } from 'node:child_process' +import { mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs' +import { tmpdir } from 'node:os' +import path from 'node:path' +import { compareStrings } from '@sim/utils/string' +import { describe, expect, it, vi } from 'vitest' + +vi.unmock('@/blocks/registry') +vi.unmock('@/tools/registry') + +import { + type CanonicalWorkflow, + type CompileResult, + catalogBlock, + compileWorkflow, + createPrintWorkflow, + executableInactiveParams, + executableView, + type LockHints, + printWorkflow, +} from '@sim/workflow-code' +import { editorDefaults } from '@sim/workflow-code/catalog/defaults' +import { generateSdkTypes } from '@sim/workflow-sdk/codegen' +import { cases, goldenCatalog as catalog } from '@/lib/workflows/code/golden-cases.test-helpers' + +const REPO_ROOT = path.resolve(process.cwd(), '../..') +const GOLDEN_DIR = path.join(REPO_ROOT, 'packages/workflow-code/src/print/__golden__') +const SDK_ROOT = path.join(REPO_ROOT, 'packages/workflow-sdk') +const VERBOSE_SUFFIX = '.verbose.txt' +const FILES_GOLDEN = 'function-files.txt' + +const INLINE = { functionCode: 'inline' } as const +const VERBOSE = { functionCode: 'inline', verbose: true } as const + +const goldenFiles = readdirSync(GOLDEN_DIR) + .filter((name) => name.endsWith('.txt')) + .sort(compareStrings) +const verboseCases = goldenFiles + .filter((name) => name.endsWith(VERBOSE_SUFFIX)) + .map((name) => name.slice(0, -VERBOSE_SUFFIX.length)) + +function goldenPath(name: string): string { + return path.join(GOLDEN_DIR, name) +} + +function findCase(name: string) { + const testCase = cases.find((candidate) => candidate.name === name) + if (!testCase) throw new Error(`no golden case named ${name}`) + return testCase +} + +function print(workflow: CanonicalWorkflow, hints: LockHints | undefined) { + return printWorkflow({ workflow, catalog, hints, options: INLINE }) +} + +function compile(text: string, files: ReadonlyArray<[string, string]> = []): CompileResult { + return compileWorkflow({ + entry: { path: 'workflow.ts', text }, + files: new Map(files), + catalog, + sdkMajor: catalog.sdkMajor, + }) +} + +function commentTexts(workflow: CanonicalWorkflow): string[] { + return Object.values(workflow.annotations.comments) + .flatMap((comments) => comments?.map((comment) => comment.text) ?? []) + .sort(compareStrings) +} + +/** + * The compiled workflow, after checking it compiled with zero errors and runs as `original`. + * Annotations are not semantic, so only comment texts are compared: the printer hoists a comment + * whose anchor it does not print and drops one whose block is gone. + */ +function expectCompilesBack( + result: CompileResult, + original: CanonicalWorkflow, + printed: string +): CanonicalWorkflow { + expect( + result.diagnostics + .filter((d) => d.severity === 'error') + .map((d) => `${d.code} ${d.span.line}:${d.span.column} ${d.message}`) + ).toEqual([]) + if (!result.workflow) throw new Error('expected a workflow') + expect(executableView(result.workflow, catalog)).toEqual(executableView(original, catalog)) + expect(commentTexts(result.workflow)).toEqual( + commentTexts(original).filter((text) => printed.includes(text)) + ) + return result.workflow +} + +/** The same workflow with every record and list that has no semantic order reversed. */ +function reorder(workflow: CanonicalWorkflow): CanonicalWorkflow { + const copy = structuredClone(workflow) + const reverseRecord = (record: Record) => + Object.fromEntries(Object.entries(record).reverse()) + copy.blocks = reverseRecord(copy.blocks) + for (const block of Object.values(copy.blocks)) { + block.params = reverseRecord(block.params) + block.modes = reverseRecord(block.modes) + } + copy.variables = reverseRecord(copy.variables) + copy.edges = [...copy.edges].reverse() + copy.annotations.inactive = reverseRecord(copy.annotations.inactive) + return copy +} + +const EDITABLE_TYPES = new Set(['short-input', 'long-input', 'combobox']) + +/** + * Every single-line, token-free text param a user could retype, as (block, param) pairs. Inactive + * params and values equal to the editor default are not printed, so editing one adds a line. + */ +function editableParams(workflow: CanonicalWorkflow): Array<[string, string]> { + const pairs: Array<[string, string]> = [] + for (const block of Object.values(workflow.blocks)) { + const declared = catalogBlock(catalog, block.type) + const subBlocks = declared?.subBlocks ?? [] + const inactive = new Set(executableInactiveParams(block, catalog)) + const defaults = declared ? editorDefaults(declared) : new Map() + for (const [id, param] of Object.entries(block.params)) { + if (param.kind !== 'value' || typeof param.value !== 'string') continue + if (inactive.has(id) || defaults.get(id) === param.value) continue + if (!/^[\w .:/-]+$/.test(param.value)) continue + const subBlock = subBlocks.find((candidate) => candidate.id === id) + if (subBlock && !EDITABLE_TYPES.has(subBlock.type)) continue + pairs.push([block.key, id]) + } + } + return pairs +} + +describe('printer goldens over the real catalog', () => { + for (const testCase of cases) { + it(`${testCase.name} prints its golden, compiles back and reprints identically`, async () => { + const printed = print(testCase.workflow, testCase.hints) + expect(printed.files).toHaveLength(1) + const text = printed.files[0].text + await expect(text).toMatchFileSnapshot(goldenPath(`${testCase.name}.txt`)) + + const compiled = expectCompilesBack(compile(text), testCase.workflow, text) + expect(print(compiled, printed.hints).files[0].text).toBe(text) + expect(print(reorder(testCase.workflow), testCase.hints).files[0].text).toBe(text) + + for (const [blockKey, paramId] of editableParams(testCase.workflow)) { + const edited = structuredClone(testCase.workflow) + const param = edited.blocks[blockKey]?.params[paramId] + if (param?.kind !== 'value' || typeof param.value !== 'string') continue + const last = param.value.at(-1) + param.value = `${param.value.slice(0, -1)}${last === 'q' ? 'z' : 'q'}` + const before = text.split('\n') + const after = print(edited, printed.hints).files[0].text.split('\n') + expect(after.length, `${blockKey}.${paramId}`).toBe(before.length) + const changed = after.filter((lineText, index) => lineText !== before[index]) + expect(changed, `${blockKey}.${paramId}`).toHaveLength(1) + } + }) + } + + for (const name of verboseCases) { + it(`${name} prints its verbose golden and compiles back`, async () => { + const testCase = findCase(name) + const text = printWorkflow({ + workflow: testCase.workflow, + catalog, + hints: testCase.hints, + options: VERBOSE, + }).files[0].text + await expect(text).toMatchFileSnapshot(goldenPath(`${name}${VERBOSE_SUFFIX}`)) + expectCompilesBack(compile(text), testCase.workflow, text) + }) + } + + it('reports the diagnostics each golden case produces', async () => { + const report = Object.fromEntries( + cases.map((testCase) => [ + testCase.name, + print(testCase.workflow, testCase.hints).diagnostics.map( + (d) => `${d.code} ${d.blockKey ?? '-'}: ${d.message}` + ), + ]) + ) + await expect(`${JSON.stringify(report, null, 2)}\n`).toMatchFileSnapshot( + goldenPath('diagnostics.json') + ) + }) + + it('writes function code to language files and compiles them back', async () => { + const testCase = findCase('function-languages') + const printed = printWorkflow({ + workflow: testCase.workflow, + catalog, + options: { functionCode: 'files', codeDir: 'functions' }, + }) + const [entry, ...codeFiles] = printed.files + expect(codeFiles.map((file) => file.path)).toEqual([ + 'functions/js-code.js', + 'functions/py-code.py', + 'functions/sh-code.sh', + ]) + expect(printed.diagnostics.filter((d) => d.code === 'W_CODE_FILE_INLINED')).toEqual([]) + await expect(entry.text).toMatchFileSnapshot(goldenPath(FILES_GOLDEN)) + const result = compile( + entry.text, + codeFiles.map((file) => [file.path, file.text]) + ) + expectCompilesBack(result, testCase.workflow, entry.text) + expect(result.hints.blocks.jscode?.codeFile).toBe('functions/js-code.js') + }) + + it('falls back to inline code with a warning when the codec round trip is lossy or absent', () => { + const testCase = findCase('function-languages') + const inline = print(testCase.workflow, undefined).files[0].text + const lossyCodec: Parameters[0] = { + toFile: (code) => code, + fromFile: (text) => `${text}\n`, + } + for (const printWith of [createPrintWorkflow(lossyCodec), createPrintWorkflow()]) { + const result = printWith({ + workflow: testCase.workflow, + catalog, + options: { functionCode: 'files', codeDir: 'functions' }, + }) + expect(result.files.map((file) => file.text)).toEqual([inline]) + const inlined = result.diagnostics.filter((d) => d.code === 'W_CODE_FILE_INLINED') + expect(inlined.map((d) => d.blockKey)).toEqual(['jscode', 'pycode', 'shcode']) + } + }) + + it('has a case for every golden file', () => { + const expected = [ + ...cases.map((testCase) => `${testCase.name}.txt`), + ...verboseCases.map((name) => `${name}${VERBOSE_SUFFIX}`), + FILES_GOLDEN, + ].sort(compareStrings) + expect(goldenFiles).toEqual(expected) + }) + + it('type-checks every golden against core.d.ts and the types generated from the catalog', () => { + const outDir = mkdtempSync(path.join(tmpdir(), 'workflow-code-goldens-')) + try { + for (const file of generateSdkTypes(catalog)) { + const target = path.join(outDir, 'types', file.path) + mkdirSync(path.dirname(target), { recursive: true }) + writeFileSync(target, file.text) + } + mkdirSync(path.join(outDir, 'goldens')) + for (const name of goldenFiles) { + writeFileSync( + path.join(outDir, 'goldens', name.replace(/\.txt$/, '.ts')), + readFileSync(goldenPath(name), 'utf8') + ) + } + const tsconfig = path.join(outDir, 'tsconfig.json') + writeFileSync( + tsconfig, + JSON.stringify({ + compilerOptions: { + target: 'ES2022', + lib: ['ES2022'], + module: 'ESNext', + moduleResolution: 'bundler', + moduleDetection: 'force', + types: [], + strict: true, + noEmit: true, + skipLibCheck: false, + paths: { '@sim/workflow-sdk': [path.join(SDK_ROOT, 'src/core.d.ts')] }, + }, + include: [path.join(outDir, 'types/**/*.d.ts'), path.join(outDir, 'goldens/*.ts')], + }) + ) + let diagnostics = '' + try { + execFileSync(path.join(REPO_ROOT, 'node_modules/.bin/tsc'), ['--noEmit', '-p', tsconfig], { + encoding: 'utf8', + stdio: 'pipe', + }) + } catch (error) { + const failure = error as { stdout?: string; stderr?: string } + diagnostics = `${failure.stdout ?? ''}${failure.stderr ?? ''}` + } + expect(diagnostics).toBe('') + } finally { + rmSync(outDir, { recursive: true, force: true }) + } + }, 120_000) +}) diff --git a/biome.json b/biome.json index 0fe9252ab42..c8243b0e571 100644 --- a/biome.json +++ b/biome.json @@ -34,7 +34,6 @@ "!**/apps/sim/lib/mothership/generated/**", "!**/packages/desktop-bridge/src/computer-use.generated.ts", "!**/packages/workflow-sdk/src/codegen/core-text.generated.ts", - "!**/packages/workflow-code/src/print/__fixtures__/real-catalog.json", "!**/apps/docs/.content", "!**/apps/desktop/release", "!**/venv", diff --git a/packages/workflow-code/DESIGN.md b/packages/workflow-code/DESIGN.md index eb0568c3725..897ce78453b 100644 --- a/packages/workflow-code/DESIGN.md +++ b/packages/workflow-code/DESIGN.md @@ -22,7 +22,6 @@ agreement of every lane that consumes it. | `src/catalog/canonical-index.ts`, `src/canonicalize/*` | 2B | | | `src/print/*` | 2C | | | `src/compile/*`, `src/code-files/*` | 2D | | -| `src/proof/*` | 2G | | | `src/materialize/*`, `src/equivalence.ts` | Wave 3 | | Each engine implements its `api.ts` type, e.g. @@ -328,9 +327,11 @@ instead of failing at run time. the container blocks, so an orphan map entry is never stored. - **Stored outputs** are rewritten only when `computeOutputs` differs between prev and the edited block, so a block with stale or empty stored outputs keeps them through an unrelated edit. - - **Goldens run against the real catalog.** `print/__fixtures__/real-catalog.json` is the slice of - `buildBlockCatalog` the golden cases use (compacted and hashed like the core shard), rebuilt - and drift-checked by `apps/sim/lib/workflows/code/golden-catalog.test.ts`. Cases are canvas - blocks of current types (editor defaults seeded). `workflow-sdk`'s `goldens.test.ts` - type-checks every golden, lean and verbose, with `core.d.ts` plus the types generated from - that slice. `print/__fixtures__/catalog.ts` stays for unit tests. + - **Goldens run against the real catalog.** One harness, + `apps/sim/lib/workflows/code/goldens.test.ts`, builds the live registry catalog narrowed to the + types the golden cases use (compacted and hashed like the core shard). Each case prints to its + golden in `print/__golden__/`, compiles back to the same executable view, reprints + byte-identical, and every golden type-checks with `core.d.ts` plus the types generated from + that catalog. Cases are canvas blocks of current types (editor defaults seeded). The round-trip + proof tooling (oracles, report, fast-check arbitraries) lives with the corpus in + `apps/sim/lib/workflows/code/corpus/proof/`. diff --git a/packages/workflow-code/src/canonicalize/hostile.test.ts b/packages/workflow-code/src/canonicalize/hostile.test.ts index bad92d095a1..566daaf744e 100644 --- a/packages/workflow-code/src/canonicalize/hostile.test.ts +++ b/packages/workflow-code/src/canonicalize/hostile.test.ts @@ -5,8 +5,8 @@ import { scopeCanonicalModesForTool, } from '../catalog/canonical-index' import { compileWorkflow } from '../compile' +import { TEST_CATALOG as catalog } from '../compile/test-catalog' import { canonicalEquals } from '../equivalence' -import { catalog } from '../print/__fixtures__/catalog' import { printWorkflow } from '../print/printer' import { canonicalize } from '.' diff --git a/packages/workflow-code/src/catalog/compact.test.ts b/packages/workflow-code/src/catalog/compact.test.ts index a35f8f4a521..ec4d47bb025 100644 --- a/packages/workflow-code/src/catalog/compact.test.ts +++ b/packages/workflow-code/src/catalog/compact.test.ts @@ -7,7 +7,6 @@ import { describe, expect, it } from 'vitest' import { TEST_CATALOG } from '../compile/test-catalog' import { stableStringify } from '../hash' -import { catalog as PRINT_CATALOG } from '../print/__fixtures__/catalog' import { compactBlockCatalog } from './compact' import type { BlockCatalog, CatalogSubBlock, ExpandedBlockCatalog } from './types' import { catalogBlock, expandBlockCatalog } from './view' @@ -84,7 +83,7 @@ function roundTrip(expanded: ExpandedBlockCatalog): ExpandedBlockCatalog { describe('compactBlockCatalog', () => { it('round-trips every fixture catalog through the core shard and its docs', () => { - for (const catalog of [TEST_CATALOG, PRINT_CATALOG, sharingCatalog()]) { + for (const catalog of [TEST_CATALOG, sharingCatalog()]) { const expanded = expandBlockCatalog(catalog) expect(roundTrip(expanded)).toEqual(expanded) } diff --git a/packages/workflow-code/src/compile/printer-goldens.test.ts b/packages/workflow-code/src/compile/printer-goldens.test.ts deleted file mode 100644 index 05020928a7c..00000000000 --- a/packages/workflow-code/src/compile/printer-goldens.test.ts +++ /dev/null @@ -1,87 +0,0 @@ -import { compareStrings } from '@sim/utils/string' -import { describe, expect, it } from 'vitest' -import type { CompileResult, PrintOptions } from '../api' -import { executableView } from '../equivalence/executable' -import type { CanonicalWorkflow } from '../model' -import { printWorkflow } from '../print' -import { cases } from '../print/__fixtures__/cases' -import { realCatalog as catalog } from '../print/__fixtures__/real-catalog' -import { compileWorkflow } from './index' - -/** - * P0/P3/P4 against the printer, over the real catalog (`real-catalog.json`): every printer case - * prints to source that compiles with zero errors (s3 D12), runs as the canonical workflow it was - * printed from (its executable view: wave 4 source holds what executes, and apply restores the - * preserved UI state), and a lean print reprints to the same bytes. A verbose print compiles and - * runs the same too; it is a debugging view, so its reprint is not pinned. The - * printer's golden test pins the prints byte for byte. Annotations are not semantic, so only the - * comment texts are compared: the printer hoists a comment whose anchor it does not print and - * drops one whose block is gone. - */ - -function compile(text: string, files: Record = {}): CompileResult { - return compileWorkflow({ - entry: { path: 'workflow.ts', text }, - files: new Map(Object.entries(files)), - catalog, - sdkMajor: catalog.sdkMajor, - }) -} - -function commentTexts(workflow: CanonicalWorkflow): string[] { - return Object.values(workflow.annotations.comments) - .flatMap((comments) => comments?.map((comment) => comment.text) ?? []) - .sort(compareStrings) -} - -function expectRoundTrip(result: CompileResult, original: CanonicalWorkflow, golden: string) { - expect( - result.diagnostics - .filter((d) => d.severity === 'error') - .map((d) => `${d.code} ${d.span.line}:${d.span.column} ${d.message}`) - ).toEqual([]) - if (!result.workflow) throw new Error('expected a workflow') - expect(executableView(result.workflow, catalog)).toEqual(executableView(original, catalog)) - expect(commentTexts(result.workflow)).toEqual( - commentTexts(original).filter((text) => golden.includes(text)) - ) -} - -describe('printer cases compile back to their canonical workflow', () => { - const modes: Array<[string, PrintOptions]> = [ - ['lean', { functionCode: 'inline' }], - ['verbose', { functionCode: 'inline', verbose: true }], - ] - for (const testCase of cases) { - for (const [mode, options] of modes) { - it(`${testCase.name} (${mode})`, () => { - const print = (workflow: CanonicalWorkflow) => - printWorkflow({ workflow, catalog, hints: testCase.hints, options }).files[0].text - const golden = print(testCase.workflow) - const result = compile(golden) - expectRoundTrip(result, testCase.workflow, golden) - if (mode === 'lean' && result.workflow) expect(print(result.workflow)).toBe(golden) - }) - } - } - - it('function-languages in files mode, with code files written by the code-file codec', () => { - const testCase = cases.find((candidate) => candidate.name === 'function-languages') - if (!testCase) throw new Error('missing case') - const printed = printWorkflow({ - workflow: testCase.workflow, - catalog, - options: { functionCode: 'files', codeDir: 'functions' }, - }) - const [entry, ...codeFiles] = printed.files - expect(codeFiles.map((file) => file.path)).toEqual([ - 'functions/js-code.js', - 'functions/py-code.py', - 'functions/sh-code.sh', - ]) - const files = Object.fromEntries(codeFiles.map((file) => [file.path, file.text])) - const result = compile(entry.text, files) - expectRoundTrip(result, testCase.workflow, entry.text) - expect(result.hints.blocks.jscode?.codeFile).toBe('functions/js-code.js') - }) -}) diff --git a/packages/workflow-code/src/print/__fixtures__/catalog.ts b/packages/workflow-code/src/print/__fixtures__/catalog.ts deleted file mode 100644 index d17d4507eba..00000000000 --- a/packages/workflow-code/src/print/__fixtures__/catalog.ts +++ /dev/null @@ -1,299 +0,0 @@ -/** - * A small hand-built catalog covering every construct the printer handles: triggers, an operation - * namespace, basic/advanced pairs, selectors, code fields, branches, tools, containers, a note and - * a trigger-mode builder. Shapes follow `catalog/types.ts`; values are illustrative only. - */ - -import type { - BlockCatalog, - CatalogBlock, - CatalogSubBlock, - CatalogValueKind, -} from '../../catalog/types' - -type SubBlockInit = Partial & Pick - -function sb(init: SubBlockInit & { valueKind?: CatalogValueKind }): CatalogSubBlock { - return { valueKind: 'string', storage: 'native', ...init } -} - -function block( - type: string, - subBlocks: CatalogSubBlock[], - extra: Partial = {} -): CatalogBlock { - return { - type, - name: type, - category: 'blocks', - subBlocks, - tools: { access: [], selector: 'single' }, - inputs: {}, - outputs: {}, - graph: { canBeTarget: true, errorPort: true, container: null, annotationOnly: false }, - ...extra, - } -} - -const trigger = (type: string, subBlocks: CatalogSubBlock[]) => - block(type, subBlocks, { - category: 'triggers', - graph: { canBeTarget: false, errorPort: false, container: null, annotationOnly: false }, - }) - -export const catalog: BlockCatalog = { - catalogVersion: 1, - hash: 'fixture', - sdkMajor: 1, - blocks: { - start_trigger: trigger('start_trigger', [ - sb({ - id: 'inputFormat', - type: 'input-format', - valueKind: 'array', - structured: 'inputFormat', - }), - ]), - webhook: trigger('webhook', [ - sb({ id: 'requireAuth', type: 'switch', valueKind: 'boolean' }), - sb({ id: 'token', type: 'short-input', password: true }), - sb({ - id: 'inputFormat', - type: 'input-format', - valueKind: 'array', - structured: 'inputFormat', - }), - ]), - agent: block('agent', [ - sb({ id: 'model', type: 'combobox', required: true }), - sb({ id: 'messages', type: 'messages-input', valueKind: 'array' }), - sb({ id: 'systemPrompt', type: 'long-input' }), - sb({ id: 'responseFormat', type: 'code', valueKind: 'code', language: 'json' }), - sb({ id: 'tools', type: 'tool-input', valueKind: 'tools', structured: 'tools' }), - sb({ id: 'temperature', type: 'slider', valueKind: 'number', min: 0, max: 2 }), - sb({ - id: 'memoryType', - type: 'dropdown', - options: [ - { id: 'none', label: 'None' }, - { id: 'conversation', label: 'Conversation' }, - ], - }), - sb({ - id: 'conversationId', - type: 'short-input', - condition: { field: 'memoryType', value: 'conversation' }, - }), - ]), - slack: block('slack', [ - sb({ - id: 'operation', - type: 'dropdown', - options: [ - { id: 'send', label: 'Send Message' }, - { id: 'read', label: 'Read Messages' }, - ], - }), - sb({ - id: 'authMethod', - type: 'dropdown', - options: [ - { id: 'oauth', label: 'OAuth' }, - { id: 'bot_token', label: 'Bot token' }, - ], - }), - sb({ - id: 'credential', - type: 'oauth-input', - valueKind: 'resource', - resourceKind: 'credential', - }), - sb({ id: 'botToken', type: 'short-input', password: true }), - sb({ - id: 'channel', - type: 'channel-selector', - valueKind: 'picked', - mode: 'basic', - canonicalParamId: 'channel', - }), - sb({ - id: 'manualChannel', - type: 'short-input', - mode: 'advanced', - canonicalParamId: 'channel', - }), - sb({ id: 'text', type: 'long-input', required: true }), - sb({ id: 'limit', type: 'short-input', condition: { field: 'operation', value: 'read' } }), - ]), - function: block('function', [ - sb({ - id: 'language', - type: 'dropdown', - options: [ - { id: 'javascript', label: 'JavaScript' }, - { id: 'python', label: 'Python' }, - { id: 'shell', label: 'Shell' }, - ], - }), - sb({ id: 'code', type: 'code', valueKind: 'code', language: 'javascript' }), - ]), - condition: block( - 'condition', - [ - sb({ - id: 'conditions', - type: 'condition-input', - valueKind: 'branches', - structured: 'branches', - }), - ], - { - graph: { - canBeTarget: true, - errorPort: false, - container: null, - annotationOnly: false, - branches: { subBlockId: 'conditions', kind: 'condition' }, - }, - } - ), - router: block( - 'router', - [ - sb({ id: 'context', type: 'long-input' }), - sb({ id: 'model', type: 'combobox' }), - sb({ id: 'routes', type: 'router-input', valueKind: 'branches', structured: 'branches' }), - ], - { - graph: { - canBeTarget: true, - errorPort: false, - container: null, - annotationOnly: false, - branches: { subBlockId: 'routes', kind: 'router' }, - }, - } - ), - table: block('table', [ - sb({ - id: 'operation', - type: 'dropdown', - options: [ - { id: 'insert_row', label: 'Insert Row' }, - { id: 'query_rows', label: 'Query Rows' }, - ], - }), - sb({ - id: 'tableSelector', - type: 'table-selector', - valueKind: 'resource', - resourceKind: 'table', - mode: 'basic', - canonicalParamId: 'tableId', - }), - sb({ - id: 'manualTableId', - type: 'short-input', - mode: 'advanced', - canonicalParamId: 'tableId', - }), - sb({ id: 'data', type: 'code', valueKind: 'code', language: 'json' }), - sb({ id: 'limit', type: 'short-input' }), - sb({ - id: 'knowledgeBases', - type: 'knowledge-base-selector', - valueKind: 'resource', - resourceKind: 'knowledge-base', - multiple: true, - }), - ]), - note: block('note', [sb({ id: 'content', type: 'long-input' })], { - graph: { canBeTarget: false, errorPort: false, container: null, annotationOnly: true }, - }), - variables: block('variables', [ - sb({ id: 'variables', type: 'variables-input', valueKind: 'array', structured: 'variables' }), - ]), - api: block('api', [ - sb({ id: 'url', type: 'short-input', required: true }), - sb({ - id: 'method', - type: 'dropdown', - options: [ - { id: 'GET', label: 'GET' }, - { id: 'POST', label: 'POST' }, - ], - }), - sb({ id: 'headers', type: 'table', valueKind: 'array' }), - sb({ id: 'body', type: 'code', valueKind: 'code', language: 'json' }), - ]), - gmail: block( - 'gmail', - [ - sb({ - id: 'operation', - type: 'dropdown', - surface: 'action', - options: [{ id: 'send_gmail', label: 'Send Email' }], - }), - sb({ - id: 'credential', - type: 'oauth-input', - valueKind: 'resource', - resourceKind: 'credential', - }), - sb({ id: 'to', type: 'short-input', surface: 'action' }), - sb({ id: 'subject', type: 'short-input', surface: 'action' }), - sb({ id: 'body', type: 'long-input', surface: 'action' }), - sb({ id: 'selectedTriggerId', type: 'dropdown', surface: 'trigger', mode: 'trigger' }), - sb({ - id: 'labelIds', - type: 'dropdown', - surface: 'trigger', - mode: 'trigger', - multiple: true, - }), - sb({ - id: 'markAsRead', - type: 'switch', - valueKind: 'boolean', - surface: 'trigger', - mode: 'trigger', - }), - ], - { triggerAllowed: true } - ), - response: block('response', [ - sb({ id: 'dataMode', type: 'dropdown', options: [{ id: 'structured', label: 'Builder' }] }), - sb({ id: 'builderData', type: 'response-format', valueKind: 'object' }), - ]), - loop: block('loop', [], { - graph: { canBeTarget: true, errorPort: false, container: 'loop', annotationOnly: false }, - }), - parallel: block('parallel', [], { - graph: { canBeTarget: true, errorPort: false, container: 'parallel', annotationOnly: false }, - }), - }, - triggers: {}, - builders: { - 'trigger.start': { type: 'start_trigger' }, - 'trigger.webhook': { type: 'webhook' }, - agent: { type: 'agent' }, - 'slack.sendMessage': { type: 'slack', operation: 'send' }, - 'slack.readMessages': { type: 'slack', operation: 'read' }, - fn: { type: 'function' }, - condition: { type: 'condition' }, - router: { type: 'router' }, - 'table.insertRow': { type: 'table', operation: 'insert_row' }, - 'table.queryRows': { type: 'table', operation: 'query_rows' }, - note: { type: 'note' }, - setVariables: { type: 'variables' }, - api: { type: 'api' }, - 'gmail.sendEmail': { type: 'gmail', operation: 'send_gmail' }, - 'trigger.gmail.poller': { - type: 'gmail', - triggerMode: true, - fixed: { selectedTriggerId: 'gmail_poller' }, - }, - response: { type: 'response' }, - }, -} diff --git a/packages/workflow-code/src/print/__fixtures__/real-catalog.json b/packages/workflow-code/src/print/__fixtures__/real-catalog.json deleted file mode 100644 index c976f2c51b5..00000000000 --- a/packages/workflow-code/src/print/__fixtures__/real-catalog.json +++ /dev/null @@ -1 +0,0 @@ -{"catalogVersion":1,"sdkMajor":1,"builders":{"agent":{"type":"agent"},"api":{"type":"api"},"condition":{"type":"condition"},"fn":{"type":"function"},"gmail.addLabel":{"type":"gmail_v2","operation":"add_label_gmail"},"gmail.archiveEmail":{"type":"gmail_v2","operation":"archive_gmail"},"gmail.createLabel":{"type":"gmail_v2","operation":"create_label_gmail"},"gmail.deleteDraft":{"type":"gmail_v2","operation":"delete_draft_gmail"},"gmail.deleteEmail":{"type":"gmail_v2","operation":"delete_gmail"},"gmail.deleteLabel":{"type":"gmail_v2","operation":"delete_label_gmail"},"gmail.draftEmail":{"type":"gmail_v2","operation":"draft_gmail"},"gmail.editDraft":{"type":"gmail_v2","operation":"edit_draft_gmail"},"gmail.getDraft":{"type":"gmail_v2","operation":"get_draft_gmail"},"gmail.getThread":{"type":"gmail_v2","operation":"get_thread_gmail"},"gmail.listDrafts":{"type":"gmail_v2","operation":"list_drafts_gmail"},"gmail.listLabels":{"type":"gmail_v2","operation":"list_labels_gmail"},"gmail.listThreads":{"type":"gmail_v2","operation":"list_threads_gmail"},"gmail.markAsRead":{"type":"gmail_v2","operation":"mark_read_gmail"},"gmail.markAsUnread":{"type":"gmail_v2","operation":"mark_unread_gmail"},"gmail.moveEmail":{"type":"gmail_v2","operation":"move_gmail"},"gmail.readEmail":{"type":"gmail_v2","operation":"read_gmail"},"gmail.removeLabel":{"type":"gmail_v2","operation":"remove_label_gmail"},"gmail.searchEmail":{"type":"gmail_v2","operation":"search_gmail"},"gmail.sendEmail":{"type":"gmail_v2","operation":"send_gmail"},"gmail.trashThread":{"type":"gmail_v2","operation":"trash_thread_gmail"},"gmail.unarchiveEmail":{"type":"gmail_v2","operation":"unarchive_gmail"},"gmail.untrashThread":{"type":"gmail_v2","operation":"untrash_thread_gmail"},"gmail.updateLabel":{"type":"gmail_v2","operation":"update_label_gmail"},"note":{"type":"note"},"response":{"type":"response"},"router":{"type":"router_v2"},"setVariables":{"type":"variables"},"slack.addBookmark":{"type":"slack_v2","operation":"add_bookmark"},"slack.addReaction":{"type":"slack_v2","operation":"react"},"slack.archiveConversation":{"type":"slack_v2","operation":"archive_conversation"},"slack.closeConversation":{"type":"slack_v2","operation":"close_conversation"},"slack.createCanvas":{"type":"slack_v2","operation":"canvas"},"slack.createChannelCanvas":{"type":"slack_v2","operation":"create_channel_canvas"},"slack.createConversation":{"type":"slack_v2","operation":"create_conversation"},"slack.createList":{"type":"slack_v2","operation":"create_list"},"slack.createListItem":{"type":"slack_v2","operation":"create_list_item"},"slack.createUserGroup":{"type":"slack_v2","operation":"create_user_group"},"slack.deleteCanvas":{"type":"slack_v2","operation":"delete_canvas"},"slack.deleteFile":{"type":"slack_v2","operation":"delete_file"},"slack.deleteListItem":{"type":"slack_v2","operation":"delete_list_item"},"slack.deleteListItems":{"type":"slack_v2","operation":"delete_list_items"},"slack.deleteMessage":{"type":"slack_v2","operation":"delete"},"slack.deleteScheduledMessage":{"type":"slack_v2","operation":"delete_scheduled_message"},"slack.disableUserGroup":{"type":"slack_v2","operation":"disable_user_group"},"slack.downloadFile":{"type":"slack_v2","operation":"download"},"slack.editBookmark":{"type":"slack_v2","operation":"edit_bookmark"},"slack.editCanvas":{"type":"slack_v2","operation":"edit_canvas"},"slack.enableUserGroup":{"type":"slack_v2","operation":"enable_user_group"},"slack.findUserByEmail":{"type":"slack_v2","operation":"lookup_user_by_email"},"slack.getCanvasInfo":{"type":"slack_v2","operation":"get_canvas"},"slack.getChannelHistory":{"type":"slack_v2","operation":"get_channel_history"},"slack.getChannelInfo":{"type":"slack_v2","operation":"get_channel_info"},"slack.getDoNotDisturbInfo":{"type":"slack_v2","operation":"get_dnd_info"},"slack.getFileInfo":{"type":"slack_v2","operation":"get_file_info"},"slack.getListExport":{"type":"slack_v2","operation":"get_list_export"},"slack.getListItem":{"type":"slack_v2","operation":"get_list_item"},"slack.getMessage":{"type":"slack_v2","operation":"get_message"},"slack.getMessagePermalink":{"type":"slack_v2","operation":"get_permalink"},"slack.getReactions":{"type":"slack_v2","operation":"get_reactions"},"slack.getTeamDoNotDisturbInfo":{"type":"slack_v2","operation":"get_team_dnd_info"},"slack.getThread":{"type":"slack_v2","operation":"get_thread"},"slack.getThreadReplies":{"type":"slack_v2","operation":"get_thread_replies"},"slack.getUserInfo":{"type":"slack_v2","operation":"get_user"},"slack.getUserPresence":{"type":"slack_v2","operation":"get_user_presence"},"slack.getUserProfile":{"type":"slack_v2","operation":"get_user_profile"},"slack.getWorkspaceInfo":{"type":"slack_v2","operation":"get_team_info"},"slack.getWorkspaceProfileFields":{"type":"slack_v2","operation":"get_team_profile"},"slack.inviteToConversation":{"type":"slack_v2","operation":"invite_to_conversation"},"slack.joinConversation":{"type":"slack_v2","operation":"join_conversation"},"slack.leaveConversation":{"type":"slack_v2","operation":"leave_conversation"},"slack.listBookmarks":{"type":"slack_v2","operation":"list_bookmarks"},"slack.listCanvases":{"type":"slack_v2","operation":"list_canvases"},"slack.listChannelMembers":{"type":"slack_v2","operation":"list_members"},"slack.listChannels":{"type":"slack_v2","operation":"list_channels"},"slack.listCustomEmoji":{"type":"slack_v2","operation":"list_emoji"},"slack.listFiles":{"type":"slack_v2","operation":"list_files"},"slack.listPins":{"type":"slack_v2","operation":"list_pins"},"slack.listReactions":{"type":"slack_v2","operation":"list_reactions"},"slack.listScheduledMessages":{"type":"slack_v2","operation":"list_scheduled_messages"},"slack.listUserConversations":{"type":"slack_v2","operation":"list_user_conversations"},"slack.listUserGroupMembers":{"type":"slack_v2","operation":"list_user_group_members"},"slack.listUserGroups":{"type":"slack_v2","operation":"list_user_groups"},"slack.listUsers":{"type":"slack_v2","operation":"list_users"},"slack.lookupCanvasSections":{"type":"slack_v2","operation":"lookup_canvas_sections"},"slack.markConversationRead":{"type":"slack_v2","operation":"mark_conversation_read"},"slack.openConversation":{"type":"slack_v2","operation":"open_conversation"},"slack.openView":{"type":"slack_v2","operation":"open_view"},"slack.pinMessage":{"type":"slack_v2","operation":"pin_message"},"slack.publishView":{"type":"slack_v2","operation":"publish_view"},"slack.pushView":{"type":"slack_v2","operation":"push_view"},"slack.readListItems":{"type":"slack_v2","operation":"list_items"},"slack.readMessages":{"type":"slack_v2","operation":"read"},"slack.removeBookmark":{"type":"slack_v2","operation":"remove_bookmark"},"slack.removeReaction":{"type":"slack_v2","operation":"unreact"},"slack.removeUserFromConversation":{"type":"slack_v2","operation":"kick_conversation"},"slack.renameAgentSession":{"type":"slack_v2","operation":"rename_agent_session"},"slack.renameConversation":{"type":"slack_v2","operation":"rename_conversation"},"slack.revokeCanvasAccess":{"type":"slack_v2","operation":"revoke_canvas_access"},"slack.revokeListAccess":{"type":"slack_v2","operation":"revoke_list_access"},"slack.scheduleMessage":{"type":"slack_v2","operation":"schedule_message"},"slack.sendEphemeralMessage":{"type":"slack_v2","operation":"ephemeral"},"slack.sendMessage":{"type":"slack_v2","operation":"send"},"slack.setAgentSessionStatus":{"type":"slack_v2","operation":"set_agent_session_status"},"slack.setAgentSuggestedPrompts":{"type":"slack_v2","operation":"set_agent_suggested_prompts"},"slack.setAssistantStatus":{"type":"slack_v2","operation":"set_status"},"slack.setAssistantSuggestedPrompts":{"type":"slack_v2","operation":"set_suggested_prompts"},"slack.setAssistantTitle":{"type":"slack_v2","operation":"set_title"},"slack.setBotPresence":{"type":"slack_v2","operation":"set_user_presence"},"slack.setConversationPurpose":{"type":"slack_v2","operation":"set_conversation_purpose"},"slack.setConversationTopic":{"type":"slack_v2","operation":"set_conversation_topic"},"slack.shareCanvas":{"type":"slack_v2","operation":"share_canvas"},"slack.shareList":{"type":"slack_v2","operation":"share_list"},"slack.startListExport":{"type":"slack_v2","operation":"start_list_export"},"slack.unarchiveConversation":{"type":"slack_v2","operation":"unarchive_conversation"},"slack.unfurlLinks":{"type":"slack_v2","operation":"unfurl_links"},"slack.unpinMessage":{"type":"slack_v2","operation":"unpin_message"},"slack.updateList":{"type":"slack_v2","operation":"rename_list"},"slack.updateListItems":{"type":"slack_v2","operation":"update_list_items"},"slack.updateMessage":{"type":"slack_v2","operation":"update"},"slack.updateUserGroup":{"type":"slack_v2","operation":"update_user_group"},"slack.updateUserGroupMembers":{"type":"slack_v2","operation":"update_user_group_members"},"slack.updateView":{"type":"slack_v2","operation":"update_view"},"table.batchInsertRows":{"type":"table_v2","operation":"batch_insert_rows"},"table.deleteRowById":{"type":"table_v2","operation":"delete_row"},"table.deleteRowsByFilter":{"type":"table_v2","operation":"delete_rows_by_filter"},"table.getRowById":{"type":"table_v2","operation":"get_row"},"table.getSchema":{"type":"table_v2","operation":"get_schema"},"table.insertRow":{"type":"table_v2","operation":"insert_row"},"table.queryRows":{"type":"table_v2","operation":"query_rows"},"table.updateRowById":{"type":"table_v2","operation":"update_row"},"table.updateRowsByFilter":{"type":"table_v2","operation":"update_rows_by_filter"},"table.upsertRow":{"type":"table_v2","operation":"upsert_row"},"trigger.gmail.poller":{"type":"gmail_v2","triggerMode":true},"trigger.slack.oauth":{"type":"slack_v2","triggerMode":true},"trigger.start":{"type":"start_trigger"},"trigger.table.newRow":{"type":"table_v2","triggerMode":true},"trigger.webhook":{"type":"generic_webhook"}},"blocks":{"agent":{"type":"agent","name":"Agent","category":"blocks","tools":{"access":["openai_chat","anthropic_chat","google_chat","xai_chat","deepseek_chat","deepseek_reasoner"],"selector":"opaque"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"dynamicOutputs":{"source":"responseFormat","param":"responseFormat"},"subBlocks":[{"id":"messages","type":"messages-input","valueKind":"array","storage":"native","title":"Messages","condition":{"field":"model","value":{"list":0},"not":true}},{"id":"model","type":"combobox","valueKind":"string","storage":"native","title":"Model","defaultValue":"claude-sonnet-5-5","required":true,"options":[{"id":"jev-latest"},{"id":"jev-1.13.0"},{"id":"jev-preview"},{"id":"nebius/deepseek-ai/DeepSeek-V4-Pro-0813"},{"id":"nebius/google/gemma-3-27b-it"},{"id":"nebius/MiniMaxAI/MiniMax-M3"},{"id":"nebius/moonshotai/Kimi-K3"},{"id":"nebius/NousResearch/Hermes-4-405B"},{"id":"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B"},{"id":"nebius/nvidia/nemotron-3-super-120b-a12b"},{"id":"nebius/nvidia/Nemotron-3-Ultra-550b-a55b"},{"id":"nebius/nvidia/Nemotron-3_5-Lightning"},{"id":"nebius/openai/gpt-oss-120b"},{"id":"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3.8-27B"},{"id":"nebius/zai-org/GLM-5.2"},{"id":"nebius/zai-org/GLM-5.3"},{"id":"nebius/zai-org/GLM-5.3-Flash"},{"id":"thinkingmachines/inkling-small"},{"id":"thinkingmachines/inkling"},{"id":"thinkingmachines/inkling-2-small"},{"id":"gpt-6.1-terra"},{"id":"gpt-6.1-sol"},{"id":"gpt-6-sol"},{"id":"gpt-6-luna"},{"id":"gpt-6-astra"},{"id":"gpt-5.6-sol"},{"id":"gpt-5.6-terra"},{"id":"gpt-5.6-luna"},{"id":"chat-latest"},{"id":"gpt-5.5-pro"},{"id":"gpt-5.5"},{"id":"gpt-5.4-mini"},{"id":"gpt-5.4-nano"},{"id":"gpt-5.4-pro"},{"id":"gpt-5.4"},{"id":"gpt-5.3-codex"},{"id":"gpt-5.2-pro"},{"id":"gpt-5.2"},{"id":"gpt-5.1"},{"id":"gpt-5-pro"},{"id":"gpt-5"},{"id":"gpt-5-mini"},{"id":"gpt-5-nano"},{"id":"o3-pro"},{"id":"o4-mini"},{"id":"o3"},{"id":"gpt-4.1"},{"id":"gpt-4.1-mini"},{"id":"o3-mini"},{"id":"o1"},{"id":"gpt-4o"},{"id":"claude-fable-5-2"},{"id":"claude-haiku-5-5"},{"id":"claude-sonnet-5-5"},{"id":"claude-opus-5-5"},{"id":"claude-fable-5-1"},{"id":"claude-opus-5"},{"id":"claude-sonnet-5"},{"id":"claude-fable-5"},{"id":"claude-opus-4-8"},{"id":"claude-opus-4-7"},{"id":"claude-sonnet-4-6"},{"id":"claude-opus-4-6"},{"id":"claude-opus-4-5"},{"id":"claude-haiku-4-5"},{"id":"claude-sonnet-4-5"},{"id":"azure/gpt-6.1-sol"},{"id":"azure/gpt-6-sol"},{"id":"azure/gpt-6-luna"},{"id":"azure/gpt-6-astra"},{"id":"azure/gpt-5.6-sol"},{"id":"azure/gpt-5.6-terra"},{"id":"azure/gpt-5.6-luna"},{"id":"azure/gpt-5.5"},{"id":"azure/gpt-5.4-mini"},{"id":"azure/gpt-5.4-nano"},{"id":"azure/gpt-5.4-pro"},{"id":"azure/gpt-5.4"},{"id":"azure/gpt-5.2"},{"id":"azure/gpt-5.1"},{"id":"azure/gpt-5.1-codex"},{"id":"azure/gpt-5"},{"id":"azure/gpt-5-mini"},{"id":"azure/gpt-5-nano"},{"id":"azure/gpt-5-chat"},{"id":"azure/model-router"},{"id":"azure/o3"},{"id":"azure/o4-mini"},{"id":"azure/gpt-4.1"},{"id":"azure/gpt-4.1-mini"},{"id":"azure/gpt-4.1-nano"},{"id":"azure/gpt-4o"},{"id":"azure-anthropic/claude-haiku-5-5"},{"id":"azure-anthropic/claude-sonnet-5-5"},{"id":"azure-anthropic/claude-opus-5-5"},{"id":"azure-anthropic/claude-fable-5-1"},{"id":"azure-anthropic/claude-opus-5"},{"id":"azure-anthropic/claude-sonnet-5"},{"id":"azure-anthropic/claude-opus-4-8"},{"id":"azure-anthropic/claude-opus-4-7"},{"id":"azure-anthropic/claude-sonnet-4-6"},{"id":"azure-anthropic/claude-opus-4-6"},{"id":"azure-anthropic/claude-opus-4-5"},{"id":"azure-anthropic/claude-haiku-4-5"},{"id":"azure-anthropic/claude-sonnet-4-5"},{"id":"azure-anthropic/claude-opus-4-1"},{"id":"gemini-4-argon"},{"id":"gemini-3.8-flash"},{"id":"gemini-3.7-flash"},{"id":"gemini-3.6-flash"},{"id":"gemini-3.5-flash-lite"},{"id":"gemini-3.5-flash"},{"id":"gemini-3.1-flash-lite"},{"id":"gemini-3.1-pro-preview"},{"id":"gemini-3-flash-preview"},{"id":"deep-research-pro-preview-12-2025"},{"id":"gemini-2.5-flash-lite"},{"id":"gemini-2.5-flash"},{"id":"gemini-2.5-pro"},{"id":"vertex/gemini-3.8-flash"},{"id":"vertex/gemini-3.7-flash"},{"id":"vertex/gemini-3.6-flash"},{"id":"vertex/gemini-3.5-flash-lite"},{"id":"vertex/gemini-3.5-flash"},{"id":"vertex/gemini-3.1-flash-lite"},{"id":"vertex/gemini-3.1-pro-preview"},{"id":"vertex/gemini-3-flash-preview"},{"id":"vertex/deep-research-pro-preview-12-2025"},{"id":"vertex/gemini-2.5-flash-lite"},{"id":"vertex/gemini-2.5-flash"},{"id":"vertex/gemini-2.5-pro"},{"id":"deepseek-flash"},{"id":"deepseek-v4-pro"},{"id":"deepseek-v4-flash"},{"id":"deepseek-reasoner"},{"id":"deepseek-chat"},{"id":"grok-4.7"},{"id":"grok-4.6"},{"id":"grok-4.5"},{"id":"grok-4.3"},{"id":"grok-4.20-0309-reasoning"},{"id":"grok-4.20-0309-non-reasoning"},{"id":"grok-4.20-multi-agent-0309"},{"id":"cerebras/qwen-3.8-27b"},{"id":"cerebras/gemma-4-31b"},{"id":"cerebras/zai-glm-4.7"},{"id":"cerebras/gpt-oss-120b"},{"id":"groq/qwen/qwen3.8-27b"},{"id":"groq/qwen/qwen3.6-27b"},{"id":"groq/openai/gpt-oss-safeguard-20b"},{"id":"groq/openai/gpt-oss-120b"},{"id":"groq/openai/gpt-oss-20b"},{"id":"groq/llama-3.3-70b-versatile"},{"id":"groq/llama-3.1-8b-instant"},{"id":"fugu-ultra-v2.0"},{"id":"fugu-max"},{"id":"fugu-max-v1.0"},{"id":"fugu"},{"id":"fugu-ultra"},{"id":"sakana-namazu"},{"id":"sakana-namazu-v1.0"},{"id":"nvidia/nemotron-3.5-lightning-30b-a3b"},{"id":"nvidia/nemotron-3-ultra-550b-a55b"},{"id":"nvidia/nemotron-3-nano-30b-a3b"},{"id":"nvidia/llama-3.3-nemotron-super-49b-v1.5"},{"id":"nvidia/llama-3.1-nemotron-ultra-253b-v1"},{"id":"nvidia/llama-3.1-nemotron-70b-instruct"},{"id":"muse-spark-1.3"},{"id":"muse-spark-1.1"},{"id":"kimi-k3"},{"id":"kimi-k2.7-code"},{"id":"kimi-k2.7-code-highspeed"},{"id":"kimi-k2.6"},{"id":"kie/gpt-6-1-sol"},{"id":"kie/claude-sonnet-5-5"},{"id":"kie/claude-opus-5-5"},{"id":"kie/gpt-6-sol"},{"id":"kie/gpt-6-luna"},{"id":"kie/gpt-6-astra"},{"id":"kie/grok-4-6"},{"id":"kie/claude-opus-5"},{"id":"kie/kimi-k3"},{"id":"kie/gpt-5-6-sol"},{"id":"kie/gpt-5-6-terra"},{"id":"kie/gpt-5-6-luna"},{"id":"kie/grok-4-5"},{"id":"kie/claude-sonnet-5"},{"id":"kie/claude-fable-5"},{"id":"kie/claude-opus-4-8"},{"id":"kie/grok-4-3"},{"id":"kie/gpt-5-5"},{"id":"kie/claude-opus-4-7"},{"id":"kie/claude-sonnet-4-6"},{"id":"kie/claude-opus-4-6"},{"id":"kie/claude-opus-4-5"},{"id":"kie/claude-haiku-4-5"},{"id":"kie/claude-sonnet-4-5"},{"id":"glm-5.3-flash"},{"id":"glm-5.3"},{"id":"glm-5.2"},{"id":"glm-5.1"},{"id":"glm-5-turbo"},{"id":"glm-5"},{"id":"glm-4.7"},{"id":"glm-4.7-flashx"},{"id":"glm-4.6"},{"id":"glm-4.5"},{"id":"glm-4.5-air"},{"id":"glm-4.5-x"},{"id":"glm-4.5-airx"},{"id":"glm-4-32b-0414-128k"},{"id":"glm-5.3-flashx"},{"id":"mistral-large-4"},{"id":"zai-glm-5-3"},{"id":"zai-glm-5-2"},{"id":"labs-leanstral-1-5"},{"id":"mistral-medium-2604"},{"id":"mistral-medium-3-5"},{"id":"mistral-medium-3"},{"id":"mistral-medium-latest"},{"id":"mistral-small-2603"},{"id":"mistral-small-latest"},{"id":"devstral-2512"},{"id":"devstral-latest"},{"id":"devstral-small-latest"},{"id":"mistral-large-latest"},{"id":"mistral-large-2512"},{"id":"ministral-14b-latest"},{"id":"ministral-14b-2512"},{"id":"ministral-8b-latest"},{"id":"ministral-8b-2512"},{"id":"ministral-3b-latest"},{"id":"ministral-3b-2512"},{"id":"magistral-medium-latest"},{"id":"magistral-medium-2509"},{"id":"magistral-small-latest"},{"id":"magistral-small-2509"},{"id":"mistral-medium-2508"},{"id":"codestral-latest"},{"id":"codestral-2508"},{"id":"mistral-small-2506"},{"id":"mistral-medium-2505"},{"id":"open-mistral-nemo"},{"id":"bedrock/openai.gpt-6.1-sol"},{"id":"bedrock/openai.gpt-6-astra"},{"id":"bedrock/anthropic.claude-opus-5"},{"id":"bedrock/openai.gpt-5.6-sol"},{"id":"bedrock/openai.gpt-5.6-terra"},{"id":"bedrock/openai.gpt-5.6-luna"},{"id":"bedrock/anthropic.claude-sonnet-5"},{"id":"bedrock/anthropic.claude-fable-5"},{"id":"bedrock/anthropic.claude-opus-4-8"},{"id":"bedrock/anthropic.claude-opus-4-7"},{"id":"bedrock/anthropic.claude-sonnet-4-6"},{"id":"bedrock/minimax.minimax-m2.5"},{"id":"bedrock/zai.glm-5"},{"id":"bedrock/anthropic.claude-opus-4-6-v1"},{"id":"bedrock/moonshotai.kimi-k2.5"},{"id":"bedrock/amazon.nova-2-lite-v1:0"},{"id":"bedrock/mistral.mistral-large-3-675b-instruct"},{"id":"bedrock/mistral.ministral-3-14b-instruct"},{"id":"bedrock/mistral.ministral-3-8b-instruct"},{"id":"bedrock/mistral.ministral-3-3b-instruct"},{"id":"bedrock/deepseek.v3.2"},{"id":"bedrock/anthropic.claude-opus-4-5-20251101-v1:0"},{"id":"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0"},{"id":"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0"},{"id":"bedrock/anthropic.claude-opus-4-1-20250805-v1:0"},{"id":"bedrock/openai.gpt-oss-120b-1:0"},{"id":"bedrock/openai.gpt-oss-20b-1:0"},{"id":"bedrock/amazon.nova-premier-v1:0"},{"id":"bedrock/meta.llama4-maverick-17b-instruct-v1:0"},{"id":"bedrock/meta.llama4-scout-17b-instruct-v1:0"},{"id":"bedrock/meta.llama3-3-70b-instruct-v1:0"},{"id":"bedrock/amazon.nova-pro-v1:0"},{"id":"bedrock/amazon.nova-lite-v1:0"},{"id":"bedrock/amazon.nova-micro-v1:0"},{"id":"bedrock/meta.llama3-1-70b-instruct-v1:0"},{"id":"bedrock/meta.llama3-1-8b-instruct-v1:0"},{"id":"bedrock/mistral.mistral-large-2407-v1:0"},{"id":"bedrock/mistral.pixtral-large-2502-v1:0"},{"id":"bedrock/mistral.magistral-small-2509"},{"id":"bedrock/mistral.mixtral-8x7b-instruct-v0:1"},{"id":"bedrock/cohere.command-r-plus-v1:0"},{"id":"bedrock/cohere.command-r-v1:0"}]},{"id":"vertexCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Google Cloud Account","mode":"basic","canonicalParamId":"vertexCredential","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"serviceId":"vertex-ai","condition":{"opaque":true},"required":true},{"id":"vertexManualCredential","type":"short-input","valueKind":"string","storage":"native","title":"Google Cloud Account","mode":"advanced","canonicalParamId":"vertexCredential","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"condition":{"opaque":true},"required":true},{"id":"apiKey","type":"short-input","valueKind":"string","storage":"native","title":"API Key","visibleForModel":{"jev-latest":true,"jev-1.13.0":true,"jev-preview":true,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":true,"nebius/google/gemma-3-27b-it":true,"nebius/MiniMaxAI/MiniMax-M3":true,"nebius/moonshotai/Kimi-K3":true,"nebius/NousResearch/Hermes-4-405B":true,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":true,"nebius/nvidia/nemotron-3-super-120b-a12b":true,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":true,"nebius/nvidia/Nemotron-3_5-Lightning":true,"nebius/openai/gpt-oss-120b":true,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":true,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":true,"nebius/Qwen/Qwen3.8-27B":true,"nebius/zai-org/GLM-5.2":true,"nebius/zai-org/GLM-5.3":true,"nebius/zai-org/GLM-5.3-Flash":true,"thinkingmachines/inkling-small":true,"thinkingmachines/inkling":true,"thinkingmachines/inkling-2-small":true,"gpt-6.1-terra":true,"gpt-6.1-sol":true,"gpt-6-sol":true,"gpt-6-luna":true,"gpt-6-astra":true,"gpt-5.6-sol":true,"gpt-5.6-terra":true,"gpt-5.6-luna":true,"chat-latest":true,"gpt-5.5-pro":true,"gpt-5.5":true,"gpt-5.4-mini":true,"gpt-5.4-nano":true,"gpt-5.4-pro":true,"gpt-5.4":true,"gpt-5.3-codex":true,"gpt-5.2-pro":true,"gpt-5.2":true,"gpt-5.1":true,"gpt-5-pro":true,"gpt-5":true,"gpt-5-mini":true,"gpt-5-nano":true,"o3-pro":true,"o4-mini":true,"o3":true,"gpt-4.1":true,"gpt-4.1-mini":true,"o3-mini":true,"o1":true,"gpt-4o":true,"claude-fable-5-2":true,"claude-haiku-5-5":true,"claude-sonnet-5-5":true,"claude-opus-5-5":true,"claude-fable-5-1":true,"claude-opus-5":true,"claude-sonnet-5":true,"claude-fable-5":true,"claude-opus-4-8":true,"claude-opus-4-7":true,"claude-sonnet-4-6":true,"claude-opus-4-6":true,"claude-opus-4-5":true,"claude-haiku-4-5":true,"claude-sonnet-4-5":true,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":true,"azure/model-router":true,"azure/o3":true,"azure/o4-mini":true,"azure/gpt-4.1":true,"azure/gpt-4.1-mini":true,"azure/gpt-4.1-nano":true,"azure/gpt-4o":true,"azure-anthropic/claude-haiku-5-5":true,"azure-anthropic/claude-sonnet-5-5":true,"azure-anthropic/claude-opus-5-5":true,"azure-anthropic/claude-fable-5-1":true,"azure-anthropic/claude-opus-5":true,"azure-anthropic/claude-sonnet-5":true,"azure-anthropic/claude-opus-4-8":true,"azure-anthropic/claude-opus-4-7":true,"azure-anthropic/claude-sonnet-4-6":true,"azure-anthropic/claude-opus-4-6":true,"azure-anthropic/claude-opus-4-5":true,"azure-anthropic/claude-haiku-4-5":true,"azure-anthropic/claude-sonnet-4-5":true,"azure-anthropic/claude-opus-4-1":true,"gemini-4-argon":true,"gemini-3.8-flash":true,"gemini-3.7-flash":true,"gemini-3.6-flash":true,"gemini-3.5-flash-lite":true,"gemini-3.5-flash":true,"gemini-3.1-flash-lite":true,"gemini-3.1-pro-preview":true,"gemini-3-flash-preview":true,"deep-research-pro-preview-12-2025":true,"gemini-2.5-flash-lite":true,"gemini-2.5-flash":true,"gemini-2.5-pro":true,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":true,"deepseek-v4-pro":true,"deepseek-v4-flash":true,"deepseek-reasoner":true,"deepseek-chat":true,"grok-4.7":true,"grok-4.6":true,"grok-4.5":true,"grok-4.3":true,"grok-4.20-0309-reasoning":true,"grok-4.20-0309-non-reasoning":true,"grok-4.20-multi-agent-0309":true,"cerebras/qwen-3.8-27b":true,"cerebras/gemma-4-31b":true,"cerebras/zai-glm-4.7":true,"cerebras/gpt-oss-120b":true,"groq/qwen/qwen3.8-27b":true,"groq/qwen/qwen3.6-27b":true,"groq/openai/gpt-oss-safeguard-20b":true,"groq/openai/gpt-oss-120b":true,"groq/openai/gpt-oss-20b":true,"groq/llama-3.3-70b-versatile":true,"groq/llama-3.1-8b-instant":true,"fugu-ultra-v2.0":true,"fugu-max":true,"fugu-max-v1.0":true,"fugu":true,"fugu-ultra":true,"sakana-namazu":true,"sakana-namazu-v1.0":true,"nvidia/nemotron-3.5-lightning-30b-a3b":true,"nvidia/nemotron-3-ultra-550b-a55b":true,"nvidia/nemotron-3-nano-30b-a3b":true,"nvidia/llama-3.3-nemotron-super-49b-v1.5":true,"nvidia/llama-3.1-nemotron-ultra-253b-v1":true,"nvidia/llama-3.1-nemotron-70b-instruct":true,"muse-spark-1.3":true,"muse-spark-1.1":true,"kimi-k3":true,"kimi-k2.7-code":true,"kimi-k2.7-code-highspeed":true,"kimi-k2.6":true,"kie/gpt-6-1-sol":true,"kie/claude-sonnet-5-5":true,"kie/claude-opus-5-5":true,"kie/gpt-6-sol":true,"kie/gpt-6-luna":true,"kie/gpt-6-astra":true,"kie/grok-4-6":true,"kie/claude-opus-5":true,"kie/kimi-k3":true,"kie/gpt-5-6-sol":true,"kie/gpt-5-6-terra":true,"kie/gpt-5-6-luna":true,"kie/grok-4-5":true,"kie/claude-sonnet-5":true,"kie/claude-fable-5":true,"kie/claude-opus-4-8":true,"kie/grok-4-3":true,"kie/gpt-5-5":true,"kie/claude-opus-4-7":true,"kie/claude-sonnet-4-6":true,"kie/claude-opus-4-6":true,"kie/claude-opus-4-5":true,"kie/claude-haiku-4-5":true,"kie/claude-sonnet-4-5":true,"glm-5.3-flash":true,"glm-5.3":true,"glm-5.2":true,"glm-5.1":true,"glm-5-turbo":true,"glm-5":true,"glm-4.7":true,"glm-4.7-flashx":true,"glm-4.6":true,"glm-4.5":true,"glm-4.5-air":true,"glm-4.5-x":true,"glm-4.5-airx":true,"glm-4-32b-0414-128k":true,"glm-5.3-flashx":true,"mistral-large-4":true,"zai-glm-5-3":true,"zai-glm-5-2":true,"labs-leanstral-1-5":true,"mistral-medium-2604":true,"mistral-medium-3-5":true,"mistral-medium-3":true,"mistral-medium-latest":true,"mistral-small-2603":true,"mistral-small-latest":true,"devstral-2512":true,"devstral-latest":true,"devstral-small-latest":true,"mistral-large-latest":true,"mistral-large-2512":true,"ministral-14b-latest":true,"ministral-14b-2512":true,"ministral-8b-latest":true,"ministral-8b-2512":true,"ministral-3b-latest":true,"ministral-3b-2512":true,"magistral-medium-latest":true,"magistral-medium-2509":true,"magistral-small-latest":true,"magistral-small-2509":true,"mistral-medium-2508":true,"codestral-latest":true,"codestral-2508":true,"mistral-small-2506":true,"mistral-medium-2505":true,"open-mistral-nemo":true,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"azureEndpoint","type":"short-input","valueKind":"string","storage":"native","title":"Azure Endpoint","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":true,"azure/model-router":true,"azure/o3":true,"azure/o4-mini":true,"azure/gpt-4.1":true,"azure/gpt-4.1-mini":true,"azure/gpt-4.1-nano":true,"azure/gpt-4o":true,"azure-anthropic/claude-haiku-5-5":true,"azure-anthropic/claude-sonnet-5-5":true,"azure-anthropic/claude-opus-5-5":true,"azure-anthropic/claude-fable-5-1":true,"azure-anthropic/claude-opus-5":true,"azure-anthropic/claude-sonnet-5":true,"azure-anthropic/claude-opus-4-8":true,"azure-anthropic/claude-opus-4-7":true,"azure-anthropic/claude-sonnet-4-6":true,"azure-anthropic/claude-opus-4-6":true,"azure-anthropic/claude-opus-4-5":true,"azure-anthropic/claude-haiku-4-5":true,"azure-anthropic/claude-sonnet-4-5":true,"azure-anthropic/claude-opus-4-1":true,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"password":true,"condition":{"opaque":true}},{"id":"azureApiVersion","type":"short-input","valueKind":"string","storage":"native","title":"Azure API Version","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":true,"azure/model-router":true,"azure/o3":true,"azure/o4-mini":true,"azure/gpt-4.1":true,"azure/gpt-4.1-mini":true,"azure/gpt-4.1-nano":true,"azure/gpt-4o":true,"azure-anthropic/claude-haiku-5-5":true,"azure-anthropic/claude-sonnet-5-5":true,"azure-anthropic/claude-opus-5-5":true,"azure-anthropic/claude-fable-5-1":true,"azure-anthropic/claude-opus-5":true,"azure-anthropic/claude-sonnet-5":true,"azure-anthropic/claude-opus-4-8":true,"azure-anthropic/claude-opus-4-7":true,"azure-anthropic/claude-sonnet-4-6":true,"azure-anthropic/claude-opus-4-6":true,"azure-anthropic/claude-opus-4-5":true,"azure-anthropic/claude-haiku-4-5":true,"azure-anthropic/claude-sonnet-4-5":true,"azure-anthropic/claude-opus-4-1":true,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"condition":{"opaque":true}},{"id":"vertexProject","type":"short-input","valueKind":"string","storage":"native","title":"Vertex AI Project","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"vertexLocation","type":"short-input","valueKind":"string","storage":"native","title":"Vertex AI Location","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"condition":{"opaque":true},"required":true},{"id":"bedrockAuthMode","type":"dropdown","valueKind":"string","storage":"native","title":"AWS Authentication","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":true,"bedrock/openai.gpt-6-astra":true,"bedrock/anthropic.claude-opus-5":true,"bedrock/openai.gpt-5.6-sol":true,"bedrock/openai.gpt-5.6-terra":true,"bedrock/openai.gpt-5.6-luna":true,"bedrock/anthropic.claude-sonnet-5":true,"bedrock/anthropic.claude-fable-5":true,"bedrock/anthropic.claude-opus-4-8":true,"bedrock/anthropic.claude-opus-4-7":true,"bedrock/anthropic.claude-sonnet-4-6":true,"bedrock/minimax.minimax-m2.5":true,"bedrock/zai.glm-5":true,"bedrock/anthropic.claude-opus-4-6-v1":true,"bedrock/moonshotai.kimi-k2.5":true,"bedrock/amazon.nova-2-lite-v1:0":true,"bedrock/mistral.mistral-large-3-675b-instruct":true,"bedrock/mistral.ministral-3-14b-instruct":true,"bedrock/mistral.ministral-3-8b-instruct":true,"bedrock/mistral.ministral-3-3b-instruct":true,"bedrock/deepseek.v3.2":true,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":true,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":true,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":true,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":true,"bedrock/openai.gpt-oss-120b-1:0":true,"bedrock/openai.gpt-oss-20b-1:0":true,"bedrock/amazon.nova-premier-v1:0":true,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":true,"bedrock/meta.llama4-scout-17b-instruct-v1:0":true,"bedrock/meta.llama3-3-70b-instruct-v1:0":true,"bedrock/amazon.nova-pro-v1:0":true,"bedrock/amazon.nova-lite-v1:0":true,"bedrock/amazon.nova-micro-v1:0":true,"bedrock/meta.llama3-1-70b-instruct-v1:0":true,"bedrock/meta.llama3-1-8b-instruct-v1:0":true,"bedrock/mistral.mistral-large-2407-v1:0":true,"bedrock/mistral.pixtral-large-2502-v1:0":true,"bedrock/mistral.magistral-small-2509":true,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":true,"bedrock/cohere.command-r-plus-v1:0":true,"bedrock/cohere.command-r-v1:0":true},"valueDefault":{"constant":"access_keys"},"condition":{"opaque":true},"options":[{"id":"access_keys"},{"id":"credential"}]},{"id":"bedrockCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"AWS Credential","mode":"basic","canonicalParamId":"bedrockCredential","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"serviceId":"aws","condition":{"opaque":true},"required":true},{"id":"bedrockManualCredential","type":"short-input","valueKind":"string","storage":"native","title":"AWS Credential","mode":"advanced","canonicalParamId":"bedrockCredential","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"condition":{"opaque":true},"required":true},{"id":"bedrockAccessKeyId","type":"short-input","valueKind":"string","storage":"native","title":"AWS Access Key ID","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"bedrockSecretKey","type":"short-input","valueKind":"string","storage":"native","title":"AWS Secret Access Key","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"bedrockRegion","type":"short-input","valueKind":"string","storage":"native","title":"AWS Region","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":true,"bedrock/openai.gpt-6-astra":true,"bedrock/anthropic.claude-opus-5":true,"bedrock/openai.gpt-5.6-sol":true,"bedrock/openai.gpt-5.6-terra":true,"bedrock/openai.gpt-5.6-luna":true,"bedrock/anthropic.claude-sonnet-5":true,"bedrock/anthropic.claude-fable-5":true,"bedrock/anthropic.claude-opus-4-8":true,"bedrock/anthropic.claude-opus-4-7":true,"bedrock/anthropic.claude-sonnet-4-6":true,"bedrock/minimax.minimax-m2.5":true,"bedrock/zai.glm-5":true,"bedrock/anthropic.claude-opus-4-6-v1":true,"bedrock/moonshotai.kimi-k2.5":true,"bedrock/amazon.nova-2-lite-v1:0":true,"bedrock/mistral.mistral-large-3-675b-instruct":true,"bedrock/mistral.ministral-3-14b-instruct":true,"bedrock/mistral.ministral-3-8b-instruct":true,"bedrock/mistral.ministral-3-3b-instruct":true,"bedrock/deepseek.v3.2":true,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":true,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":true,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":true,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":true,"bedrock/openai.gpt-oss-120b-1:0":true,"bedrock/openai.gpt-oss-20b-1:0":true,"bedrock/amazon.nova-premier-v1:0":true,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":true,"bedrock/meta.llama4-scout-17b-instruct-v1:0":true,"bedrock/meta.llama3-3-70b-instruct-v1:0":true,"bedrock/amazon.nova-pro-v1:0":true,"bedrock/amazon.nova-lite-v1:0":true,"bedrock/amazon.nova-micro-v1:0":true,"bedrock/meta.llama3-1-70b-instruct-v1:0":true,"bedrock/meta.llama3-1-8b-instruct-v1:0":true,"bedrock/mistral.mistral-large-2407-v1:0":true,"bedrock/mistral.pixtral-large-2502-v1:0":true,"bedrock/mistral.magistral-small-2509":true,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":true,"bedrock/cohere.command-r-plus-v1:0":true,"bedrock/cohere.command-r-v1:0":true},"condition":{"opaque":true}},{"id":"evaluationState","type":"long-input","valueKind":"string","storage":"native","title":"State","visibleForModel":{"jev-latest":true,"jev-1.13.0":true,"jev-preview":true,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"condition":{"opaque":true},"required":true},{"id":"evaluationQuestions","type":"code","valueKind":"json","storage":"native","title":"Questions","visibleForModel":{"jev-latest":true,"jev-1.13.0":true,"jev-preview":true,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"language":"json","condition":{"opaque":true},"required":true},{"id":"attachmentFiles","type":"file-upload","valueKind":"upload","storage":"native","title":"Files","mode":"basic","canonicalParamId":"files","multiple":true,"condition":{"field":"model","value":{"list":0},"not":true},"required":false},{"id":"files","type":"short-input","valueKind":"string","storage":"native","title":"Files","mode":"advanced","canonicalParamId":"files","condition":{"field":"model","value":{"list":0},"not":true},"required":false},{"id":"reasoningEffort","type":"combobox","valueKind":"string","storage":"native","title":"Reasoning Effort","mode":"advanced","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":true,"gpt-6.1-sol":true,"gpt-6-sol":true,"gpt-6-luna":true,"gpt-6-astra":true,"gpt-5.6-sol":true,"gpt-5.6-terra":true,"gpt-5.6-luna":true,"chat-latest":false,"gpt-5.5-pro":true,"gpt-5.5":true,"gpt-5.4-mini":true,"gpt-5.4-nano":true,"gpt-5.4-pro":true,"gpt-5.4":true,"gpt-5.3-codex":true,"gpt-5.2-pro":true,"gpt-5.2":true,"gpt-5.1":true,"gpt-5-pro":true,"gpt-5":true,"gpt-5-mini":true,"gpt-5-nano":true,"o3-pro":false,"o4-mini":true,"o3":true,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":true,"o1":true,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":true,"azure/o4-mini":true,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":true,"deepseek-v4-pro":true,"deepseek-v4-flash":true,"deepseek-reasoner":true,"deepseek-chat":false,"grok-4.7":true,"grok-4.6":true,"grok-4.5":true,"grok-4.3":true,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":true,"cerebras/qwen-3.8-27b":true,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":true,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":true,"groq/openai/gpt-oss-120b":true,"groq/openai/gpt-oss-20b":true,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":true,"muse-spark-1.1":true,"kimi-k3":true,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":true,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":true,"kie/gpt-6-luna":true,"kie/gpt-6-astra":true,"kie/grok-4-6":true,"kie/claude-opus-5":false,"kie/kimi-k3":true,"kie/gpt-5-6-sol":true,"kie/gpt-5-6-terra":true,"kie/gpt-5-6-luna":true,"kie/grok-4-5":true,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":true,"kie/gpt-5-5":true,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":true,"glm-5.3":true,"glm-5.2":true,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":true,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"dependsOn":{"all":["model"],"any":[]},"condition":{"opaque":true},"options":{"opaque":true}},{"id":"verbosity","type":"combobox","valueKind":"string","storage":"native","title":"Verbosity","mode":"advanced","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":true,"gpt-6.1-sol":true,"gpt-6-sol":true,"gpt-6-luna":true,"gpt-6-astra":false,"gpt-5.6-sol":true,"gpt-5.6-terra":true,"gpt-5.6-luna":true,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":true,"gpt-5.4-mini":true,"gpt-5.4-nano":true,"gpt-5.4-pro":false,"gpt-5.4":true,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":true,"gpt-5.1":true,"gpt-5-pro":false,"gpt-5":true,"gpt-5-mini":true,"gpt-5-nano":true,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"dependsOn":{"all":["model"],"any":[]},"condition":{"opaque":true},"options":{"opaque":true}},{"id":"thinkingLevel","type":"combobox","valueKind":"string","storage":"native","title":"Thinking Level","mode":"advanced","visibleForModel":{"jev-latest":false,"jev-1.13.0":false,"jev-preview":false,"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":true,"claude-haiku-5-5":true,"claude-sonnet-5-5":true,"claude-opus-5-5":true,"claude-fable-5-1":true,"claude-opus-5":true,"claude-sonnet-5":true,"claude-fable-5":true,"claude-opus-4-8":true,"claude-opus-4-7":true,"claude-sonnet-4-6":true,"claude-opus-4-6":true,"claude-opus-4-5":true,"claude-haiku-4-5":true,"claude-sonnet-4-5":true,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":true,"azure-anthropic/claude-sonnet-5-5":true,"azure-anthropic/claude-opus-5-5":true,"azure-anthropic/claude-fable-5-1":true,"azure-anthropic/claude-opus-5":true,"azure-anthropic/claude-sonnet-5":true,"azure-anthropic/claude-opus-4-8":true,"azure-anthropic/claude-opus-4-7":true,"azure-anthropic/claude-sonnet-4-6":true,"azure-anthropic/claude-opus-4-6":true,"azure-anthropic/claude-opus-4-5":true,"azure-anthropic/claude-haiku-4-5":true,"azure-anthropic/claude-sonnet-4-5":true,"azure-anthropic/claude-opus-4-1":true,"gemini-4-argon":true,"gemini-3.8-flash":true,"gemini-3.7-flash":true,"gemini-3.6-flash":true,"gemini-3.5-flash-lite":true,"gemini-3.5-flash":true,"gemini-3.1-flash-lite":true,"gemini-3.1-pro-preview":true,"gemini-3-flash-preview":true,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":true,"gemini-2.5-flash":true,"gemini-2.5-pro":true,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":true,"deepseek-v4-pro":true,"deepseek-v4-flash":true,"deepseek-reasoner":true,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":true,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":true,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":true,"kie/claude-opus-5-5":true,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":true,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":true,"kie/claude-fable-5":true,"kie/claude-opus-4-8":true,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":true,"kie/claude-sonnet-4-6":true,"kie/claude-opus-4-6":true,"kie/claude-opus-4-5":true,"kie/claude-haiku-4-5":true,"kie/claude-sonnet-4-5":true,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":true,"glm-5-turbo":true,"glm-5":true,"glm-4.7":true,"glm-4.7-flashx":false,"glm-4.6":true,"glm-4.5":true,"glm-4.5-air":true,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"dependsOn":{"all":["model"],"any":[]},"condition":{"opaque":true},"options":{"opaque":true}},{"id":"promptCaching","type":"switch","valueKind":"boolean","storage":"native","title":"Prompt Caching","mode":"advanced","defaultValue":false,"condition":{"field":"model","value":["claude-fable-5-2","claude-fable-5-1","claude-fable-5","claude-sonnet-5-5","claude-sonnet-5","claude-opus-5-5","claude-opus-5","claude-opus-4-8","claude-opus-4-7","claude-opus-4-6","claude-sonnet-4-6","claude-opus-4-5","claude-opus-4-1","claude-opus-4-0","claude-sonnet-4-5","claude-sonnet-4-0","claude-haiku-5-5","claude-haiku-4-5","claude-3-haiku-20240307","azure-anthropic/claude-fable-5-1","azure-anthropic/claude-opus-5-5","azure-anthropic/claude-sonnet-5-5","azure-anthropic/claude-haiku-5-5","azure-anthropic/claude-opus-5","azure-anthropic/claude-opus-4-8","azure-anthropic/claude-opus-4-7","azure-anthropic/claude-opus-4-6","azure-anthropic/claude-opus-4-5","azure-anthropic/claude-sonnet-5","azure-anthropic/claude-sonnet-4-6","azure-anthropic/claude-sonnet-4-5","azure-anthropic/claude-opus-4-1","azure-anthropic/claude-haiku-4-5"]}},{"id":"tools","type":"tool-input","valueKind":"tools","storage":"native","structured":"tools","title":"Tools","defaultValue":[],"condition":{"field":"model","value":{"list":1},"not":true}},{"id":"skills","type":"skill-input","valueKind":"array","storage":"native","title":"Skills","defaultValue":[],"condition":{"field":"model","value":{"list":1},"not":true}},{"id":"memoryType","type":"dropdown","valueKind":"string","storage":"native","title":"Memory","defaultValue":"none","condition":{"field":"model","value":{"list":2},"not":true},"options":[{"id":"none"},{"id":"conversation"},{"id":"sliding_window"},{"id":"sliding_window_tokens"}]},{"id":"conversationId","type":"short-input","valueKind":"string","storage":"native","title":"Conversation ID","dependsOn":{"all":["memoryType"],"any":[]},"condition":{"field":"memoryType","value":{"list":3},"and":{"field":"model","value":{"list":2},"not":true}},"required":{"field":"memoryType","value":{"list":3}}},{"id":"slidingWindowSize","type":"short-input","valueKind":"string","storage":"native","title":"Sliding Window Size","dependsOn":{"all":["memoryType"],"any":[]},"condition":{"field":"memoryType","value":["sliding_window"],"and":{"field":"model","value":{"list":2},"not":true}}},{"id":"slidingWindowTokens","type":"short-input","valueKind":"string","storage":"native","title":"Max Tokens","dependsOn":{"all":["memoryType"],"any":[]},"condition":{"field":"memoryType","value":["sliding_window_tokens"],"and":{"field":"model","value":{"list":2},"not":true}}},{"id":"temperature","type":"slider","valueKind":"number","storage":"native","title":"Temperature","mode":"advanced","defaultValue":0.3,"min":0,"max":1,"condition":{"field":"model","value":["thinkingmachines/inkling","thinkingmachines/inkling-2-small","thinkingmachines/inkling-small","claude-opus-4-6","claude-sonnet-4-6","claude-opus-4-5","claude-opus-4-1","claude-opus-4-0","claude-sonnet-4-5","claude-sonnet-4-0","claude-haiku-4-5","claude-3-haiku-20240307","azure-anthropic/claude-opus-4-6","azure-anthropic/claude-opus-4-5","azure-anthropic/claude-sonnet-4-6","azure-anthropic/claude-sonnet-4-5","azure-anthropic/claude-opus-4-1","azure-anthropic/claude-haiku-4-5","kie/claude-opus-4-6","kie/claude-sonnet-4-6","kie/claude-opus-4-5","kie/claude-sonnet-4-5","kie/claude-haiku-4-5","glm-5.3","glm-5.3-flashx","glm-5.3-flash","glm-5.2","glm-5.1","glm-5","glm-5-turbo","glm-4.7","glm-4.7-flashx","glm-4.6","glm-4.5","glm-4.5-air","glm-4.5-x","glm-4.5-airx","glm-4-32b-0414-128k","bedrock/anthropic.claude-sonnet-4-6","bedrock/anthropic.claude-opus-4-6-v1","bedrock/anthropic.claude-opus-4-5-20251101-v1:0","bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0","bedrock/anthropic.claude-haiku-4-5-20251001-v1:0","bedrock/anthropic.claude-opus-4-1-20250805-v1:0","bedrock/amazon.nova-2-lite-v1:0","bedrock/amazon.nova-premier-v1:0","bedrock/amazon.nova-pro-v1:0","bedrock/amazon.nova-lite-v1:0","bedrock/amazon.nova-micro-v1:0","bedrock/meta.llama4-maverick-17b-instruct-v1:0","bedrock/meta.llama4-scout-17b-instruct-v1:0","bedrock/meta.llama3-3-70b-instruct-v1:0","bedrock/meta.llama3-2-90b-instruct-v1:0","bedrock/meta.llama3-2-11b-instruct-v1:0","bedrock/meta.llama3-2-3b-instruct-v1:0","bedrock/meta.llama3-2-1b-instruct-v1:0","bedrock/meta.llama3-1-405b-instruct-v1:0","bedrock/meta.llama3-1-70b-instruct-v1:0","bedrock/meta.llama3-1-8b-instruct-v1:0","bedrock/mistral.mistral-large-3-675b-instruct","bedrock/mistral.mistral-large-2407-v1:0","bedrock/mistral.pixtral-large-2502-v1:0","bedrock/mistral.magistral-small-2509","bedrock/mistral.ministral-3-14b-instruct","bedrock/mistral.ministral-3-8b-instruct","bedrock/mistral.ministral-3-3b-instruct","bedrock/mistral.mixtral-8x7b-instruct-v0:1","bedrock/amazon.titan-text-premier-v1:0","bedrock/cohere.command-r-plus-v1:0","bedrock/cohere.command-r-v1:0"]}},{"id":"temperature","type":"slider","valueKind":"number","storage":"native","title":"Temperature","mode":"advanced","defaultValue":0.3,"min":0,"max":1.5,"condition":{"field":"model","value":["mistral-large-4","mistral-medium-3-5","mistral-medium-3","zai-glm-5-3","zai-glm-5-2","labs-leanstral-1-5","mistral-large-latest","mistral-large-2512","mistral-small-2603","devstral-2512","mistral-large-2411","magistral-medium-latest","magistral-medium-2509","magistral-small-latest","magistral-small-2509","mistral-medium-latest","mistral-medium-2604","mistral-medium-2508","mistral-medium-2505","mistral-small-latest","mistral-small-2506","open-mistral-nemo","codestral-latest","codestral-2508","devstral-latest","devstral-small-latest","devstral-small-2507","devstral-medium-2507","ministral-14b-latest","ministral-14b-2512","ministral-8b-latest","ministral-8b-2512","ministral-3b-latest","ministral-3b-2512"]}},{"id":"temperature","type":"slider","valueKind":"number","storage":"native","title":"Temperature","mode":"advanced","defaultValue":0.3,"min":0,"max":2,"condition":{"field":"model","value":["nebius/deepseek-ai/deepseek-v4.1-flash","nebius/deepseek-ai/deepseek-v4-flash-0731","nebius/deepseek-ai/deepseek-v4-pro","nebius/deepseek-ai/deepseek-v4-pro-0813","nebius/google/gemma-3-27b-it","nebius/minimaxai/minimax-m3","nebius/moonshotai/kimi-k2.6","nebius/moonshotai/kimi-k2.7-code","nebius/moonshotai/kimi-k3","nebius/nousresearch/hermes-4-405b","nebius/nvidia/nvidia-nemotron-3-nano-30b-a3b","nebius/nvidia/nemotron-3-super-120b-a12b","nebius/nvidia/nemotron-3-ultra-550b-a55b","nebius/nvidia/nemotron-3_5-lightning","nebius/openai/gpt-oss-120b","nebius/openbmb/minicpm-v-4_5","nebius/qwen/qwen3-235b-a22b-instruct-2507","nebius/qwen/qwen3-30b-a3b-instruct-2507","nebius/qwen/qwen3.5-397b-a17b","nebius/qwen/qwen3.8-27b","nebius/zai-org/glm-5.1","nebius/zai-org/glm-5.2","nebius/zai-org/glm-5.3","nebius/zai-org/glm-5.3-flash","gpt-4.1","gpt-4.1-mini","gpt-4.1-nano","gpt-5-chat-latest","gpt-4o","azure/gpt-4o","azure/gpt-5-chat","azure/gpt-4.1","azure/gpt-4.1-mini","azure/gpt-4.1-nano","gemini-3.8-flash","gemini-3.7-flash","gemini-3.6-flash","gemini-3.5-flash-lite","gemini-3.5-flash","gemini-3.1-pro-preview","gemini-3.1-flash-lite","gemini-3-flash-preview","gemini-2.5-pro","gemini-2.5-flash","gemini-2.5-flash-lite","gemini-2.0-flash","gemini-2.0-flash-lite","vertex/gemini-3.5-flash","vertex/gemini-3.1-pro-preview","vertex/gemini-3.1-flash-lite","vertex/gemini-3-pro-preview","vertex/gemini-3-flash-preview","vertex/gemini-2.5-pro","vertex/gemini-2.5-flash","vertex/gemini-2.5-flash-lite","vertex/gemini-2.0-flash","vertex/gemini-2.0-flash-lite","deepseek-flash","deepseek-v4-flash","deepseek-chat","deepseek-v3","grok-4.7","grok-4.6","grok-4.5","grok-4.3","grok-4-latest","grok-4-0709","grok-4-1-fast-reasoning","grok-4-1-fast-non-reasoning","grok-4-fast-reasoning","grok-4-fast-non-reasoning","grok-code-fast-1","grok-4.20-0309-reasoning","grok-4.20-0309-non-reasoning","grok-4.20-multi-agent-0309","grok-3-latest","grok-3-fast-latest","cerebras/qwen-3.8-27b","cerebras/gpt-oss-120b","cerebras/zai-glm-4.7","cerebras/gemma-4-31b","groq/openai/gpt-oss-120b","groq/openai/gpt-oss-20b","groq/openai/gpt-oss-safeguard-20b","groq/qwen/qwen3-32b","groq/qwen/qwen3.8-27b","groq/qwen/qwen3.6-27b","groq/llama-3.1-8b-instant","groq/llama-3.3-70b-versatile","groq/meta-llama/llama-4-scout-17b-16e-instruct","groq/moonshotai/kimi-k2-instruct-0905","nvidia/llama-3.1-nemotron-70b-instruct","nvidia/llama-3.1-nemotron-ultra-253b-v1","nvidia/llama-3.3-nemotron-super-49b-v1.5","nvidia/nemotron-3-nano-30b-a3b","nvidia/nemotron-3-super-120b-a12b","nvidia/nemotron-3-ultra-550b-a55b","muse-spark-1.3","muse-spark-1.1"]}},{"id":"maxTokens","type":"short-input","valueKind":"string","storage":"native","title":"Max Output Tokens","mode":"advanced","condition":{"field":"model","value":{"list":1},"not":true}},{"id":"responseFormat","type":"code","valueKind":"json","storage":"native","title":"Response Format","language":"json","condition":{"field":"model","value":{"list":1},"not":true}},{"id":"previousInteractionId","type":"short-input","valueKind":"string","storage":"native","title":"Previous Interaction ID","condition":{"field":"model","value":["deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025"]}},{"id":"fallbackModels","type":"model-fallback-list","valueKind":"array","storage":"native","title":"Fallback models","mode":"advanced","condition":{"field":"model","value":{"list":0},"not":true}}],"outputs":{"answers":{"type":"json","description":"Evaluation answers keyed by question ID: choice, score, or noul, with probabilities and confidence where applicable","condition":{"field":"model","value":["jev-latest","jev-1.13.0","jev-preview"],"allowReference":true}},"content":{"type":"string","description":"Generated response content"},"model":{"type":"string","description":"Model used for generation"},"tokens":{"type":"json","description":"Token usage statistics"},"toolCalls":{"type":"json","description":"Tool calls made"},"providerTiming":{"type":"json","description":"Provider timing information"},"cost":{"type":"json","description":"Cost of the API call"},"interactionId":{"type":"string","description":"Interaction ID for multi-turn deep research follow-ups","condition":{"field":"model","value":["deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025"]}}}},"api":{"type":"api","name":"API","category":"blocks","tools":{"access":["http_request"],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"url","type":"short-input","valueKind":"string","storage":"native","title":"URL","required":true},{"id":"method","type":"dropdown","valueKind":"string","storage":"native","title":"Method","required":true,"options":[{"id":"GET"},{"id":"POST"},{"id":"PUT"},{"id":"DELETE"},{"id":"PATCH"}]},{"id":"params","type":"table","valueKind":"array","storage":"native","structured":"tableRows","title":"Query Params","columns":["Key","Value"]},{"id":"headers","type":"table","valueKind":"array","storage":"native","structured":"tableRows","title":"Headers","columns":["Key","Value"]},{"id":"body","type":"code","valueKind":"json","storage":"native","title":"Body","language":"json"},{"id":"timeout","type":"short-input","valueKind":"string","storage":"native","title":"Timeout (ms)","mode":"advanced"},{"id":"retries","type":"short-input","valueKind":"string","storage":"native","title":"Retries","mode":"advanced"},{"id":"retryDelayMs","type":"short-input","valueKind":"string","storage":"native","title":"Retry delay (ms)","mode":"advanced"},{"id":"retryMaxDelayMs","type":"short-input","valueKind":"string","storage":"native","title":"Max retry delay (ms)","mode":"advanced"},{"id":"retryNonIdempotent","type":"switch","valueKind":"boolean","storage":"native","title":"Retry non-idempotent methods","mode":"advanced"},{"id":"redirectPolicyVersion","type":"short-input","valueKind":"string","storage":"native","title":"Redirect policy version","defaultValue":"standard-v1","hidden":true},{"id":"sendCredentialsOnCrossOriginRedirect","type":"switch","valueKind":"boolean","storage":"native","title":"Send credentials on cross-origin redirects","mode":"advanced","defaultValue":true},{"id":"proxyUrl","type":"short-input","valueKind":"string","storage":"native","title":"Proxy URL","mode":"advanced"}],"outputs":{"data":{"type":"json","description":"API response data (JSON, text, or other formats)"},"status":{"type":"number","description":"HTTP status code (200, 404, 500, etc.)"},"headers":{"type":"json","description":"HTTP response headers as key-value pairs"}}},"condition":{"type":"condition","name":"Condition","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false,"branches":{"subBlockId":"conditions","kind":"condition"}},"subBlocks":[{"id":"conditions","type":"condition-input","valueKind":"branches","storage":"json-string","structured":"branches"}],"outputs":{"conditionResult":{"type":"boolean","description":"Whether the selected branch's own test passed: true when an if/else-if condition matched, false when the else branch or no branch fired"},"selectedPath":{"type":"json","description":"Selected execution path"},"selectedOption":{"type":"string","description":"Selected condition option ID"},"selectedTitle":{"type":"string","description":"Title of the selected branch (e.g. \"if\", \"else if\", \"else\"); null when no branch fired"}}},"function":{"type":"function","name":"Function","category":"blocks","tools":{"access":["function_execute"],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"language","type":"dropdown","valueKind":"string","storage":"native","valueDefault":{"constant":"javascript"},"options":[{"id":"javascript"},{"id":"python"}]},{"id":"code","type":"code","valueKind":"code","storage":"native","title":"Code"},{"id":"sandboxId","type":"combobox","valueKind":"string","storage":"native","title":"Sandbox","mode":"advanced","dependsOn":{"all":["language"],"any":[]},"emptyIsValid":true,"selectorKey":"workspace.sandboxes","options":{"dynamic":true}},{"id":"secretScope","type":"dropdown","valueKind":"string","storage":"native","title":"Secret access","valueDefault":{"constant":"all"},"context":"tool-input","paramVisibility":"user-only","options":[{"id":"all"},{"id":"selected"}]},{"id":"mountedSecrets","type":"dropdown","valueKind":"array","storage":"native","title":"Secrets","context":"tool-input","paramVisibility":"user-only","multiple":true,"selectorKey":"workspace.secretNames","condition":{"field":"secretScope","value":"selected"},"options":{"dynamic":true}}],"outputs":{"result":{"type":"json","description":"Structured result emitted by the executed code"},"stdout":{"type":"string","description":"Console log output and debug messages from function execution"},"files":{"type":"file[]","description":"Files the code wrote to /tmp/sim/outputs, ready to attach or upload downstream"}}},"generic_webhook":{"type":"generic_webhook","name":"Webhook Trigger","category":"triggers","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":false,"errorPort":false,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["generic_webhook"]},"dynamicOutputs":{"source":"inputFormat","param":"inputFormat"},"subBlocks":[{"trigger":"generic_webhook","start":0,"count":14}],"outputs":{}},"gmail_v2":{"type":"gmail_v2","name":"Gmail","category":"tools","tools":{"access":["gmail_send_v2","gmail_draft_v2","gmail_edit_draft_v2","gmail_read_v2","gmail_search_v2","gmail_move_v2","gmail_mark_read_v2","gmail_mark_unread_v2","gmail_archive_v2","gmail_unarchive_v2","gmail_delete_v2","gmail_add_label_v2","gmail_remove_label_v2","gmail_list_labels_v2","gmail_create_label_v2","gmail_update_label_v2","gmail_delete_label_v2","gmail_list_drafts_v2","gmail_get_draft_v2","gmail_delete_draft_v2","gmail_list_threads_v2","gmail_get_thread_v2","gmail_trash_thread_v2","gmail_untrash_thread_v2"],"selector":"operation"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["gmail_poller"]},"subBlocks":[{"id":"operation","type":"dropdown","valueKind":"string","storage":"native","title":"Operation","surface":"action","valueDefault":{"constant":"send_gmail"},"options":[{"id":"send_gmail","label":"Send Email"},{"id":"read_gmail","label":"Read Email"},{"id":"draft_gmail","label":"Draft Email"},{"id":"edit_draft_gmail","label":"Edit Draft"},{"id":"search_gmail","label":"Search Email"},{"id":"move_gmail","label":"Move Email"},{"id":"mark_read_gmail","label":"Mark as Read"},{"id":"mark_unread_gmail","label":"Mark as Unread"},{"id":"archive_gmail","label":"Archive Email"},{"id":"unarchive_gmail","label":"Unarchive Email"},{"id":"delete_gmail","label":"Delete Email"},{"id":"add_label_gmail","label":"Add Label"},{"id":"remove_label_gmail","label":"Remove Label"},{"id":"list_labels_gmail","label":"List Labels"},{"id":"create_label_gmail","label":"Create Label"},{"id":"update_label_gmail","label":"Update Label"},{"id":"delete_label_gmail","label":"Delete Label"},{"id":"list_drafts_gmail","label":"List Drafts"},{"id":"get_draft_gmail","label":"Get Draft"},{"id":"delete_draft_gmail","label":"Delete Draft"},{"id":"list_threads_gmail","label":"List Threads"},{"id":"get_thread_gmail","label":"Get Thread"},{"id":"trash_thread_gmail","label":"Trash Thread"},{"id":"untrash_thread_gmail","label":"Untrash Thread"}]},{"id":"credential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Gmail Account","mode":"basic","canonicalParamId":"oauthCredential","surface":"action","serviceId":"gmail","required":true},{"id":"manualCredential","type":"short-input","valueKind":"string","storage":"native","title":"Gmail Account","mode":"advanced","canonicalParamId":"oauthCredential","surface":"action","required":true},{"id":"impersonateUserEmail","type":"short-input","valueKind":"string","storage":"native","title":"Impersonated Account","mode":"both","surface":"action","paramVisibility":"user-only"},{"id":"draftId","type":"short-input","valueKind":"string","storage":"native","title":"Draft ID","surface":"action","condition":{"field":"operation","value":["edit_draft_gmail","get_draft_gmail","delete_draft_gmail"]},"required":true},{"id":"to","type":"short-input","valueKind":"string","storage":"native","title":"To","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":true},{"id":"subject","type":"short-input","valueKind":"string","storage":"native","title":"Subject","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"body","type":"long-input","valueKind":"string","storage":"native","title":"Body","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":true},{"id":"contentType","type":"dropdown","valueKind":"string","storage":"native","title":"Content Type","surface":"action","valueDefault":{"constant":"text"},"condition":{"field":"operation","value":{"list":4}},"required":false,"options":[{"id":"text"},{"id":"html"}]},{"id":"attachmentFiles","type":"file-upload","valueKind":"upload","storage":"native","title":"Attachments","mode":"basic","canonicalParamId":"attachments","surface":"action","multiple":true,"condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"attachments","type":"short-input","valueKind":"string","storage":"native","title":"Attachments","mode":"advanced","canonicalParamId":"attachments","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"threadId","type":"short-input","valueKind":"string","storage":"native","title":"Thread ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"replyToMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Reply to Message ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"cc","type":"short-input","valueKind":"string","storage":"native","title":"CC","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"bcc","type":"short-input","valueKind":"string","storage":"native","title":"BCC","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"replyTo","type":"short-input","valueKind":"string","storage":"native","title":"Reply-To","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":4}},"required":false},{"id":"folder","type":"folder-selector","valueKind":"picked","storage":"native","title":"Label","mode":"basic","canonicalParamId":"folder","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":"read_gmail"},"options":{"dynamic":true}},{"id":"manualFolder","type":"short-input","valueKind":"string","storage":"native","title":"Label/Folder","mode":"advanced","canonicalParamId":"folder","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":"read_gmail"}},{"id":"unreadOnly","type":"switch","valueKind":"boolean","storage":"native","title":"Unread Only","surface":"action","condition":{"field":"operation","value":"read_gmail"}},{"id":"includeAttachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","surface":"action","condition":{"field":"operation","value":"read_gmail"}},{"id":"messageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"read_gmail"}},{"id":"query","type":"short-input","valueKind":"string","storage":"native","title":"Search Query","surface":"action","condition":{"field":"operation","value":"search_gmail"},"required":true},{"id":"maxResults","type":"short-input","valueKind":"string","storage":"native","title":"Max Results","surface":"action","condition":{"field":"operation","value":["read_gmail","search_gmail","list_drafts_gmail","list_threads_gmail"]}},{"id":"pageToken","type":"short-input","valueKind":"string","storage":"native","title":"Page Token","mode":"advanced","surface":"action","condition":{"field":"operation","value":["search_gmail","list_drafts_gmail","list_threads_gmail"]},"required":false},{"id":"moveMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","surface":"action","condition":{"field":"operation","value":"move_gmail"},"required":true},{"id":"destinationLabel","type":"folder-selector","valueKind":"picked","storage":"native","title":"Move To Label","mode":"basic","canonicalParamId":"addLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":"move_gmail"},"required":true,"options":{"dynamic":true}},{"id":"manualDestinationLabel","type":"short-input","valueKind":"string","storage":"native","title":"Move To Label","mode":"advanced","canonicalParamId":"addLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":"move_gmail"},"required":true},{"id":"sourceLabel","type":"folder-selector","valueKind":"picked","storage":"native","title":"Remove From Label","mode":"basic","canonicalParamId":"removeLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":"move_gmail"},"required":false,"options":{"dynamic":true}},{"id":"manualSourceLabel","type":"short-input","valueKind":"string","storage":"native","title":"Remove From Label","mode":"advanced","canonicalParamId":"removeLabelIds","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":"move_gmail"},"required":false},{"id":"actionMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","surface":"action","condition":{"field":"operation","value":["mark_read_gmail","mark_unread_gmail","archive_gmail","unarchive_gmail","delete_gmail"]},"required":true},{"id":"labelActionMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Message ID","surface":"action","condition":{"field":"operation","value":{"list":5}},"required":true},{"id":"labelSelector","type":"folder-selector","valueKind":"picked","storage":"native","title":"Label","mode":"basic","canonicalParamId":"manageLabelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":{"list":5}},"required":true,"options":{"dynamic":true}},{"id":"manualLabelId","type":"short-input","valueKind":"string","storage":"native","title":"Label","mode":"advanced","canonicalParamId":"manageLabelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":{"list":5}},"required":true},{"id":"labelTarget","type":"folder-selector","valueKind":"picked","storage":"native","title":"Label","mode":"basic","canonicalParamId":"labelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"selectorKey":"gmail.labels","serviceId":"gmail","condition":{"field":"operation","value":{"list":6}},"required":true,"options":{"dynamic":true}},{"id":"manualLabelTarget","type":"short-input","valueKind":"string","storage":"native","title":"Label ID","mode":"advanced","canonicalParamId":"labelId","surface":"action","dependsOn":{"all":["credential"],"any":[]},"condition":{"field":"operation","value":{"list":6}},"required":true},{"id":"labelName","type":"short-input","valueKind":"string","storage":"native","title":"Label Name","surface":"action","condition":{"field":"operation","value":{"list":7}},"required":{"field":"operation","value":"create_label_gmail"}},{"id":"messageListVisibility","type":"dropdown","valueKind":"string","storage":"native","title":"Message List Visibility","mode":"advanced","surface":"action","valueDefault":{"constant":""},"condition":{"field":"operation","value":{"list":7}},"required":false,"options":[{"id":""},{"id":"show"},{"id":"hide"}]},{"id":"labelListVisibility","type":"dropdown","valueKind":"string","storage":"native","title":"Label List Visibility","mode":"advanced","surface":"action","valueDefault":{"constant":""},"condition":{"field":"operation","value":{"list":7}},"required":false,"options":[{"id":""},{"id":"labelShow"},{"id":"labelShowIfUnread"},{"id":"labelHide"}]},{"id":"targetThreadId","type":"short-input","valueKind":"string","storage":"native","title":"Thread ID","surface":"action","condition":{"field":"operation","value":["get_thread_gmail","trash_thread_gmail","untrash_thread_gmail"]},"required":true},{"id":"threadFormat","type":"dropdown","valueKind":"string","storage":"native","title":"Format","mode":"advanced","surface":"action","valueDefault":{"constant":"full"},"condition":{"field":"operation","value":"get_thread_gmail"},"required":false,"options":[{"id":"full"},{"id":"metadata"},{"id":"minimal"}]},{"id":"listQuery","type":"short-input","valueKind":"string","storage":"native","title":"Search Query","surface":"action","condition":{"field":"operation","value":["list_drafts_gmail","list_threads_gmail"]},"required":false},{"id":"threadLabelIds","type":"short-input","valueKind":"string","storage":"native","title":"Label IDs","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_threads_gmail"},"required":false},{"trigger":"gmail_poller","start":0,"count":8}],"outputs":{"id":{"type":"string","description":"Gmail message ID (thread ID for thread operations, label ID for label operations, draft ID for Get Draft)"},"threadId":{"type":"string","description":"Gmail thread ID"},"labelIds":{"type":"array","description":"Email label IDs"},"from":{"type":"string","description":"Sender"},"to":{"type":"string","description":"To"},"bcc":{"type":"string","description":"Bcc recipients (only on messages you sent or drafted)"},"replyTo":{"type":"string","description":"Reply-To header"},"subject":{"type":"string","description":"Subject"},"date":{"type":"string","description":"Date"},"rfcMessageId":{"type":"string","description":"RFC Message-ID header (not the Gmail message id)"},"inReplyTo":{"type":"string","description":"In-Reply-To header"},"references":{"type":"string","description":"References header"},"snippet":{"type":"string","description":"Short excerpt of the message text"},"internalDate":{"type":"string","description":"Gmail internal creation timestamp in epoch milliseconds"},"body":{"type":"string","description":"Email body text (best-effort)"},"results":{"type":"json","description":"Search/read summary results [{id, threadId, subject, from, to, cc, bcc, replyTo, date, snippet, rfcMessageId, inReplyTo, references, internalDate}]"},"nextPageToken":{"type":"string","description":"Token for the next page of results","condition":{"field":"operation","value":["search_gmail","list_drafts_gmail","list_threads_gmail"]}},"resultSizeEstimate":{"type":"number","description":"Estimated total number of results","condition":{"field":"operation","value":["search_gmail","list_drafts_gmail","list_threads_gmail"]}},"name":{"type":"string","description":"Label display name","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"type":{"type":"string","description":"Label type (system or user)","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"messageListVisibility":{"type":"string","description":"Message list visibility of the label","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"labelListVisibility":{"type":"string","description":"Label list visibility of the label","condition":{"field":"operation","value":["create_label_gmail","update_label_gmail"]}},"labelId":{"type":"string","description":"ID of the deleted label","condition":{"field":"operation","value":"delete_label_gmail"}},"deleted":{"type":"boolean","description":"Whether the label or draft was deleted","condition":{"field":"operation","value":["delete_label_gmail","delete_draft_gmail"]}},"drafts":{"type":"json","description":"Drafts [{id, messageId, threadId}]","condition":{"field":"operation","value":"list_drafts_gmail"}},"threads":{"type":"json","description":"Threads [{id, snippet, historyId}]","condition":{"field":"operation","value":"list_threads_gmail"}},"messages":{"type":"json","description":"Thread messages [{id, threadId, labelIds, snippet, from, to, cc, bcc, replyTo, subject, date, rfcMessageId, inReplyTo, references, internalDate, body}]","condition":{"field":"operation","value":"get_thread_gmail"}},"historyId":{"type":"string","description":"ID of the last history record that modified the thread","condition":{"field":"operation","value":"get_thread_gmail"}},"trashed":{"type":"boolean","description":"Whether the thread was moved to trash","condition":{"field":"operation","value":"trash_thread_gmail"}},"untrashed":{"type":"boolean","description":"Whether the thread was restored from trash","condition":{"field":"operation","value":"untrash_thread_gmail"}},"attachments":{"type":"file[]","description":"Downloaded attachments (if enabled)"},"draftId":{"type":"string","description":"Draft ID","condition":{"field":"operation","value":["draft_gmail","edit_draft_gmail","delete_draft_gmail"]}},"messageId":{"type":"string","description":"Gmail message ID for the draft","condition":{"field":"operation","value":["draft_gmail","edit_draft_gmail","get_draft_gmail"]}},"email_id":{"type":"string","description":"Gmail message ID"},"thread_id":{"type":"string","description":"Gmail thread ID"},"cc":{"type":"string","description":"Cc recipients (raw Cc header, comma-separated)"},"body_text":{"type":"string","description":"Plain text email body"},"body_html":{"type":"string","description":"HTML email body"},"labels":{"type":"json","description":"Email labels (trigger, comma-separated); for List Labels, the label array [{id, name, type, messageListVisibility, labelListVisibility}]"},"has_attachments":{"type":"boolean","description":"Whether email has attachments"},"raw_email":{"type":"json","description":"Complete raw email data from Gmail API (if enabled)"},"timestamp":{"type":"string","description":"Event timestamp"}}},"note":{"type":"note","name":"Note","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":false,"errorPort":false,"container":null,"annotationOnly":true},"subBlocks":[{"id":"content","type":"long-input","valueKind":"string","storage":"native"},{"id":"color","type":"short-input","valueKind":"string","storage":"native","defaultValue":"carbon","hidden":true}],"outputs":{}},"response":{"type":"response","name":"Response","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"dataMode","type":"dropdown","valueKind":"string","storage":"native","title":"Response Data Mode","valueDefault":{"constant":"structured"},"options":[{"id":"structured"},{"id":"json"}]},{"id":"builderData","type":"response-format","valueKind":"json","storage":"native","title":"Response Structure","condition":{"field":"dataMode","value":"structured"}},{"id":"data","type":"code","valueKind":"json","storage":"native","title":"Response Data","language":"json","condition":{"field":"dataMode","value":"json"}},{"id":"status","type":"short-input","valueKind":"string","storage":"native","title":"Status Code"},{"id":"headers","type":"table","valueKind":"array","storage":"native","structured":"tableRows","title":"Response Headers","columns":["Key","Value"]}],"outputs":{"data":{"type":"json","description":"Response data"},"status":{"type":"number","description":"HTTP status code"},"headers":{"type":"json","description":"Response headers"}}},"router_v2":{"type":"router_v2","name":"Router","category":"blocks","tools":{"access":["openai_chat","anthropic_chat","google_chat","xai_chat","deepseek_chat","deepseek_reasoner"],"selector":"opaque"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false,"branches":{"subBlockId":"routes","kind":"router"}},"subBlocks":[{"id":"context","type":"long-input","valueKind":"string","storage":"native","title":"Context","required":true},{"id":"routes","type":"router-input","valueKind":"branches","storage":"json-string","structured":"branches"},{"id":"model","type":"combobox","valueKind":"string","storage":"native","title":"Model","defaultValue":"claude-sonnet-5-5","required":true,"options":[{"id":"nebius/deepseek-ai/DeepSeek-V4-Pro-0813"},{"id":"nebius/google/gemma-3-27b-it"},{"id":"nebius/MiniMaxAI/MiniMax-M3"},{"id":"nebius/moonshotai/Kimi-K3"},{"id":"nebius/NousResearch/Hermes-4-405B"},{"id":"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B"},{"id":"nebius/nvidia/nemotron-3-super-120b-a12b"},{"id":"nebius/nvidia/Nemotron-3-Ultra-550b-a55b"},{"id":"nebius/nvidia/Nemotron-3_5-Lightning"},{"id":"nebius/openai/gpt-oss-120b"},{"id":"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507"},{"id":"nebius/Qwen/Qwen3.8-27B"},{"id":"nebius/zai-org/GLM-5.2"},{"id":"nebius/zai-org/GLM-5.3"},{"id":"nebius/zai-org/GLM-5.3-Flash"},{"id":"thinkingmachines/inkling-small"},{"id":"thinkingmachines/inkling"},{"id":"thinkingmachines/inkling-2-small"},{"id":"gpt-6.1-terra"},{"id":"gpt-6.1-sol"},{"id":"gpt-6-sol"},{"id":"gpt-6-luna"},{"id":"gpt-6-astra"},{"id":"gpt-5.6-sol"},{"id":"gpt-5.6-terra"},{"id":"gpt-5.6-luna"},{"id":"chat-latest"},{"id":"gpt-5.5-pro"},{"id":"gpt-5.5"},{"id":"gpt-5.4-mini"},{"id":"gpt-5.4-nano"},{"id":"gpt-5.4-pro"},{"id":"gpt-5.4"},{"id":"gpt-5.3-codex"},{"id":"gpt-5.2-pro"},{"id":"gpt-5.2"},{"id":"gpt-5.1"},{"id":"gpt-5-pro"},{"id":"gpt-5"},{"id":"gpt-5-mini"},{"id":"gpt-5-nano"},{"id":"o3-pro"},{"id":"o4-mini"},{"id":"o3"},{"id":"gpt-4.1"},{"id":"gpt-4.1-mini"},{"id":"o3-mini"},{"id":"o1"},{"id":"gpt-4o"},{"id":"claude-fable-5-2"},{"id":"claude-haiku-5-5"},{"id":"claude-sonnet-5-5"},{"id":"claude-opus-5-5"},{"id":"claude-fable-5-1"},{"id":"claude-opus-5"},{"id":"claude-sonnet-5"},{"id":"claude-fable-5"},{"id":"claude-opus-4-8"},{"id":"claude-opus-4-7"},{"id":"claude-sonnet-4-6"},{"id":"claude-opus-4-6"},{"id":"claude-opus-4-5"},{"id":"claude-haiku-4-5"},{"id":"claude-sonnet-4-5"},{"id":"azure/gpt-6.1-sol"},{"id":"azure/gpt-6-sol"},{"id":"azure/gpt-6-luna"},{"id":"azure/gpt-6-astra"},{"id":"azure/gpt-5.6-sol"},{"id":"azure/gpt-5.6-terra"},{"id":"azure/gpt-5.6-luna"},{"id":"azure/gpt-5.5"},{"id":"azure/gpt-5.4-mini"},{"id":"azure/gpt-5.4-nano"},{"id":"azure/gpt-5.4-pro"},{"id":"azure/gpt-5.4"},{"id":"azure/gpt-5.2"},{"id":"azure/gpt-5.1"},{"id":"azure/gpt-5.1-codex"},{"id":"azure/gpt-5"},{"id":"azure/gpt-5-mini"},{"id":"azure/gpt-5-nano"},{"id":"azure/gpt-5-chat"},{"id":"azure/model-router"},{"id":"azure/o3"},{"id":"azure/o4-mini"},{"id":"azure/gpt-4.1"},{"id":"azure/gpt-4.1-mini"},{"id":"azure/gpt-4.1-nano"},{"id":"azure/gpt-4o"},{"id":"azure-anthropic/claude-haiku-5-5"},{"id":"azure-anthropic/claude-sonnet-5-5"},{"id":"azure-anthropic/claude-opus-5-5"},{"id":"azure-anthropic/claude-fable-5-1"},{"id":"azure-anthropic/claude-opus-5"},{"id":"azure-anthropic/claude-sonnet-5"},{"id":"azure-anthropic/claude-opus-4-8"},{"id":"azure-anthropic/claude-opus-4-7"},{"id":"azure-anthropic/claude-sonnet-4-6"},{"id":"azure-anthropic/claude-opus-4-6"},{"id":"azure-anthropic/claude-opus-4-5"},{"id":"azure-anthropic/claude-haiku-4-5"},{"id":"azure-anthropic/claude-sonnet-4-5"},{"id":"azure-anthropic/claude-opus-4-1"},{"id":"gemini-4-argon"},{"id":"gemini-3.8-flash"},{"id":"gemini-3.7-flash"},{"id":"gemini-3.6-flash"},{"id":"gemini-3.5-flash-lite"},{"id":"gemini-3.5-flash"},{"id":"gemini-3.1-flash-lite"},{"id":"gemini-3.1-pro-preview"},{"id":"gemini-3-flash-preview"},{"id":"deep-research-pro-preview-12-2025"},{"id":"gemini-2.5-flash-lite"},{"id":"gemini-2.5-flash"},{"id":"gemini-2.5-pro"},{"id":"vertex/gemini-3.8-flash"},{"id":"vertex/gemini-3.7-flash"},{"id":"vertex/gemini-3.6-flash"},{"id":"vertex/gemini-3.5-flash-lite"},{"id":"vertex/gemini-3.5-flash"},{"id":"vertex/gemini-3.1-flash-lite"},{"id":"vertex/gemini-3.1-pro-preview"},{"id":"vertex/gemini-3-flash-preview"},{"id":"vertex/deep-research-pro-preview-12-2025"},{"id":"vertex/gemini-2.5-flash-lite"},{"id":"vertex/gemini-2.5-flash"},{"id":"vertex/gemini-2.5-pro"},{"id":"deepseek-flash"},{"id":"deepseek-v4-pro"},{"id":"deepseek-v4-flash"},{"id":"deepseek-reasoner"},{"id":"deepseek-chat"},{"id":"grok-4.7"},{"id":"grok-4.6"},{"id":"grok-4.5"},{"id":"grok-4.3"},{"id":"grok-4.20-0309-reasoning"},{"id":"grok-4.20-0309-non-reasoning"},{"id":"grok-4.20-multi-agent-0309"},{"id":"cerebras/qwen-3.8-27b"},{"id":"cerebras/gemma-4-31b"},{"id":"cerebras/zai-glm-4.7"},{"id":"cerebras/gpt-oss-120b"},{"id":"groq/qwen/qwen3.8-27b"},{"id":"groq/qwen/qwen3.6-27b"},{"id":"groq/openai/gpt-oss-safeguard-20b"},{"id":"groq/openai/gpt-oss-120b"},{"id":"groq/openai/gpt-oss-20b"},{"id":"groq/llama-3.3-70b-versatile"},{"id":"groq/llama-3.1-8b-instant"},{"id":"fugu-ultra-v2.0"},{"id":"fugu-max"},{"id":"fugu-max-v1.0"},{"id":"fugu"},{"id":"fugu-ultra"},{"id":"sakana-namazu"},{"id":"sakana-namazu-v1.0"},{"id":"nvidia/nemotron-3.5-lightning-30b-a3b"},{"id":"nvidia/nemotron-3-ultra-550b-a55b"},{"id":"nvidia/nemotron-3-nano-30b-a3b"},{"id":"nvidia/llama-3.3-nemotron-super-49b-v1.5"},{"id":"nvidia/llama-3.1-nemotron-ultra-253b-v1"},{"id":"nvidia/llama-3.1-nemotron-70b-instruct"},{"id":"muse-spark-1.3"},{"id":"muse-spark-1.1"},{"id":"kimi-k3"},{"id":"kimi-k2.7-code"},{"id":"kimi-k2.7-code-highspeed"},{"id":"kimi-k2.6"},{"id":"kie/gpt-6-1-sol"},{"id":"kie/claude-sonnet-5-5"},{"id":"kie/claude-opus-5-5"},{"id":"kie/gpt-6-sol"},{"id":"kie/gpt-6-luna"},{"id":"kie/gpt-6-astra"},{"id":"kie/grok-4-6"},{"id":"kie/claude-opus-5"},{"id":"kie/kimi-k3"},{"id":"kie/gpt-5-6-sol"},{"id":"kie/gpt-5-6-terra"},{"id":"kie/gpt-5-6-luna"},{"id":"kie/grok-4-5"},{"id":"kie/claude-sonnet-5"},{"id":"kie/claude-fable-5"},{"id":"kie/claude-opus-4-8"},{"id":"kie/grok-4-3"},{"id":"kie/gpt-5-5"},{"id":"kie/claude-opus-4-7"},{"id":"kie/claude-sonnet-4-6"},{"id":"kie/claude-opus-4-6"},{"id":"kie/claude-opus-4-5"},{"id":"kie/claude-haiku-4-5"},{"id":"kie/claude-sonnet-4-5"},{"id":"glm-5.3-flash"},{"id":"glm-5.3"},{"id":"glm-5.2"},{"id":"glm-5.1"},{"id":"glm-5-turbo"},{"id":"glm-5"},{"id":"glm-4.7"},{"id":"glm-4.7-flashx"},{"id":"glm-4.6"},{"id":"glm-4.5"},{"id":"glm-4.5-air"},{"id":"glm-4.5-x"},{"id":"glm-4.5-airx"},{"id":"glm-4-32b-0414-128k"},{"id":"glm-5.3-flashx"},{"id":"mistral-large-4"},{"id":"zai-glm-5-3"},{"id":"zai-glm-5-2"},{"id":"labs-leanstral-1-5"},{"id":"mistral-medium-2604"},{"id":"mistral-medium-3-5"},{"id":"mistral-medium-3"},{"id":"mistral-medium-latest"},{"id":"mistral-small-2603"},{"id":"mistral-small-latest"},{"id":"devstral-2512"},{"id":"devstral-latest"},{"id":"devstral-small-latest"},{"id":"mistral-large-latest"},{"id":"mistral-large-2512"},{"id":"ministral-14b-latest"},{"id":"ministral-14b-2512"},{"id":"ministral-8b-latest"},{"id":"ministral-8b-2512"},{"id":"ministral-3b-latest"},{"id":"ministral-3b-2512"},{"id":"magistral-medium-latest"},{"id":"magistral-medium-2509"},{"id":"magistral-small-latest"},{"id":"magistral-small-2509"},{"id":"mistral-medium-2508"},{"id":"codestral-latest"},{"id":"codestral-2508"},{"id":"mistral-small-2506"},{"id":"mistral-medium-2505"},{"id":"open-mistral-nemo"},{"id":"bedrock/openai.gpt-6.1-sol"},{"id":"bedrock/openai.gpt-6-astra"},{"id":"bedrock/anthropic.claude-opus-5"},{"id":"bedrock/openai.gpt-5.6-sol"},{"id":"bedrock/openai.gpt-5.6-terra"},{"id":"bedrock/openai.gpt-5.6-luna"},{"id":"bedrock/anthropic.claude-sonnet-5"},{"id":"bedrock/anthropic.claude-fable-5"},{"id":"bedrock/anthropic.claude-opus-4-8"},{"id":"bedrock/anthropic.claude-opus-4-7"},{"id":"bedrock/anthropic.claude-sonnet-4-6"},{"id":"bedrock/minimax.minimax-m2.5"},{"id":"bedrock/zai.glm-5"},{"id":"bedrock/anthropic.claude-opus-4-6-v1"},{"id":"bedrock/moonshotai.kimi-k2.5"},{"id":"bedrock/amazon.nova-2-lite-v1:0"},{"id":"bedrock/mistral.mistral-large-3-675b-instruct"},{"id":"bedrock/mistral.ministral-3-14b-instruct"},{"id":"bedrock/mistral.ministral-3-8b-instruct"},{"id":"bedrock/mistral.ministral-3-3b-instruct"},{"id":"bedrock/deepseek.v3.2"},{"id":"bedrock/anthropic.claude-opus-4-5-20251101-v1:0"},{"id":"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0"},{"id":"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0"},{"id":"bedrock/anthropic.claude-opus-4-1-20250805-v1:0"},{"id":"bedrock/openai.gpt-oss-120b-1:0"},{"id":"bedrock/openai.gpt-oss-20b-1:0"},{"id":"bedrock/amazon.nova-premier-v1:0"},{"id":"bedrock/meta.llama4-maverick-17b-instruct-v1:0"},{"id":"bedrock/meta.llama4-scout-17b-instruct-v1:0"},{"id":"bedrock/meta.llama3-3-70b-instruct-v1:0"},{"id":"bedrock/amazon.nova-pro-v1:0"},{"id":"bedrock/amazon.nova-lite-v1:0"},{"id":"bedrock/amazon.nova-micro-v1:0"},{"id":"bedrock/meta.llama3-1-70b-instruct-v1:0"},{"id":"bedrock/meta.llama3-1-8b-instruct-v1:0"},{"id":"bedrock/mistral.mistral-large-2407-v1:0"},{"id":"bedrock/mistral.pixtral-large-2502-v1:0"},{"id":"bedrock/mistral.magistral-small-2509"},{"id":"bedrock/mistral.mixtral-8x7b-instruct-v0:1"},{"id":"bedrock/cohere.command-r-plus-v1:0"},{"id":"bedrock/cohere.command-r-v1:0"}]},{"id":"vertexCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Google Cloud Account","mode":"basic","canonicalParamId":"vertexCredential","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"serviceId":"vertex-ai","condition":{"opaque":true},"required":true},{"id":"vertexManualCredential","type":"short-input","valueKind":"string","storage":"native","title":"Google Cloud Account","mode":"advanced","canonicalParamId":"vertexCredential","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"condition":{"opaque":true},"required":true},{"id":"apiKey","type":"short-input","valueKind":"string","storage":"native","title":"API Key","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":true,"nebius/google/gemma-3-27b-it":true,"nebius/MiniMaxAI/MiniMax-M3":true,"nebius/moonshotai/Kimi-K3":true,"nebius/NousResearch/Hermes-4-405B":true,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":true,"nebius/nvidia/nemotron-3-super-120b-a12b":true,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":true,"nebius/nvidia/Nemotron-3_5-Lightning":true,"nebius/openai/gpt-oss-120b":true,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":true,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":true,"nebius/Qwen/Qwen3.8-27B":true,"nebius/zai-org/GLM-5.2":true,"nebius/zai-org/GLM-5.3":true,"nebius/zai-org/GLM-5.3-Flash":true,"thinkingmachines/inkling-small":true,"thinkingmachines/inkling":true,"thinkingmachines/inkling-2-small":true,"gpt-6.1-terra":true,"gpt-6.1-sol":true,"gpt-6-sol":true,"gpt-6-luna":true,"gpt-6-astra":true,"gpt-5.6-sol":true,"gpt-5.6-terra":true,"gpt-5.6-luna":true,"chat-latest":true,"gpt-5.5-pro":true,"gpt-5.5":true,"gpt-5.4-mini":true,"gpt-5.4-nano":true,"gpt-5.4-pro":true,"gpt-5.4":true,"gpt-5.3-codex":true,"gpt-5.2-pro":true,"gpt-5.2":true,"gpt-5.1":true,"gpt-5-pro":true,"gpt-5":true,"gpt-5-mini":true,"gpt-5-nano":true,"o3-pro":true,"o4-mini":true,"o3":true,"gpt-4.1":true,"gpt-4.1-mini":true,"o3-mini":true,"o1":true,"gpt-4o":true,"claude-fable-5-2":true,"claude-haiku-5-5":true,"claude-sonnet-5-5":true,"claude-opus-5-5":true,"claude-fable-5-1":true,"claude-opus-5":true,"claude-sonnet-5":true,"claude-fable-5":true,"claude-opus-4-8":true,"claude-opus-4-7":true,"claude-sonnet-4-6":true,"claude-opus-4-6":true,"claude-opus-4-5":true,"claude-haiku-4-5":true,"claude-sonnet-4-5":true,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":true,"azure/model-router":true,"azure/o3":true,"azure/o4-mini":true,"azure/gpt-4.1":true,"azure/gpt-4.1-mini":true,"azure/gpt-4.1-nano":true,"azure/gpt-4o":true,"azure-anthropic/claude-haiku-5-5":true,"azure-anthropic/claude-sonnet-5-5":true,"azure-anthropic/claude-opus-5-5":true,"azure-anthropic/claude-fable-5-1":true,"azure-anthropic/claude-opus-5":true,"azure-anthropic/claude-sonnet-5":true,"azure-anthropic/claude-opus-4-8":true,"azure-anthropic/claude-opus-4-7":true,"azure-anthropic/claude-sonnet-4-6":true,"azure-anthropic/claude-opus-4-6":true,"azure-anthropic/claude-opus-4-5":true,"azure-anthropic/claude-haiku-4-5":true,"azure-anthropic/claude-sonnet-4-5":true,"azure-anthropic/claude-opus-4-1":true,"gemini-4-argon":true,"gemini-3.8-flash":true,"gemini-3.7-flash":true,"gemini-3.6-flash":true,"gemini-3.5-flash-lite":true,"gemini-3.5-flash":true,"gemini-3.1-flash-lite":true,"gemini-3.1-pro-preview":true,"gemini-3-flash-preview":true,"deep-research-pro-preview-12-2025":true,"gemini-2.5-flash-lite":true,"gemini-2.5-flash":true,"gemini-2.5-pro":true,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":true,"deepseek-v4-pro":true,"deepseek-v4-flash":true,"deepseek-reasoner":true,"deepseek-chat":true,"grok-4.7":true,"grok-4.6":true,"grok-4.5":true,"grok-4.3":true,"grok-4.20-0309-reasoning":true,"grok-4.20-0309-non-reasoning":true,"grok-4.20-multi-agent-0309":true,"cerebras/qwen-3.8-27b":true,"cerebras/gemma-4-31b":true,"cerebras/zai-glm-4.7":true,"cerebras/gpt-oss-120b":true,"groq/qwen/qwen3.8-27b":true,"groq/qwen/qwen3.6-27b":true,"groq/openai/gpt-oss-safeguard-20b":true,"groq/openai/gpt-oss-120b":true,"groq/openai/gpt-oss-20b":true,"groq/llama-3.3-70b-versatile":true,"groq/llama-3.1-8b-instant":true,"fugu-ultra-v2.0":true,"fugu-max":true,"fugu-max-v1.0":true,"fugu":true,"fugu-ultra":true,"sakana-namazu":true,"sakana-namazu-v1.0":true,"nvidia/nemotron-3.5-lightning-30b-a3b":true,"nvidia/nemotron-3-ultra-550b-a55b":true,"nvidia/nemotron-3-nano-30b-a3b":true,"nvidia/llama-3.3-nemotron-super-49b-v1.5":true,"nvidia/llama-3.1-nemotron-ultra-253b-v1":true,"nvidia/llama-3.1-nemotron-70b-instruct":true,"muse-spark-1.3":true,"muse-spark-1.1":true,"kimi-k3":true,"kimi-k2.7-code":true,"kimi-k2.7-code-highspeed":true,"kimi-k2.6":true,"kie/gpt-6-1-sol":true,"kie/claude-sonnet-5-5":true,"kie/claude-opus-5-5":true,"kie/gpt-6-sol":true,"kie/gpt-6-luna":true,"kie/gpt-6-astra":true,"kie/grok-4-6":true,"kie/claude-opus-5":true,"kie/kimi-k3":true,"kie/gpt-5-6-sol":true,"kie/gpt-5-6-terra":true,"kie/gpt-5-6-luna":true,"kie/grok-4-5":true,"kie/claude-sonnet-5":true,"kie/claude-fable-5":true,"kie/claude-opus-4-8":true,"kie/grok-4-3":true,"kie/gpt-5-5":true,"kie/claude-opus-4-7":true,"kie/claude-sonnet-4-6":true,"kie/claude-opus-4-6":true,"kie/claude-opus-4-5":true,"kie/claude-haiku-4-5":true,"kie/claude-sonnet-4-5":true,"glm-5.3-flash":true,"glm-5.3":true,"glm-5.2":true,"glm-5.1":true,"glm-5-turbo":true,"glm-5":true,"glm-4.7":true,"glm-4.7-flashx":true,"glm-4.6":true,"glm-4.5":true,"glm-4.5-air":true,"glm-4.5-x":true,"glm-4.5-airx":true,"glm-4-32b-0414-128k":true,"glm-5.3-flashx":true,"mistral-large-4":true,"zai-glm-5-3":true,"zai-glm-5-2":true,"labs-leanstral-1-5":true,"mistral-medium-2604":true,"mistral-medium-3-5":true,"mistral-medium-3":true,"mistral-medium-latest":true,"mistral-small-2603":true,"mistral-small-latest":true,"devstral-2512":true,"devstral-latest":true,"devstral-small-latest":true,"mistral-large-latest":true,"mistral-large-2512":true,"ministral-14b-latest":true,"ministral-14b-2512":true,"ministral-8b-latest":true,"ministral-8b-2512":true,"ministral-3b-latest":true,"ministral-3b-2512":true,"magistral-medium-latest":true,"magistral-medium-2509":true,"magistral-small-latest":true,"magistral-small-2509":true,"mistral-medium-2508":true,"codestral-latest":true,"codestral-2508":true,"mistral-small-2506":true,"mistral-medium-2505":true,"open-mistral-nemo":true,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"azureEndpoint","type":"short-input","valueKind":"string","storage":"native","title":"Azure Endpoint","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":true,"azure/model-router":true,"azure/o3":true,"azure/o4-mini":true,"azure/gpt-4.1":true,"azure/gpt-4.1-mini":true,"azure/gpt-4.1-nano":true,"azure/gpt-4o":true,"azure-anthropic/claude-haiku-5-5":true,"azure-anthropic/claude-sonnet-5-5":true,"azure-anthropic/claude-opus-5-5":true,"azure-anthropic/claude-fable-5-1":true,"azure-anthropic/claude-opus-5":true,"azure-anthropic/claude-sonnet-5":true,"azure-anthropic/claude-opus-4-8":true,"azure-anthropic/claude-opus-4-7":true,"azure-anthropic/claude-sonnet-4-6":true,"azure-anthropic/claude-opus-4-6":true,"azure-anthropic/claude-opus-4-5":true,"azure-anthropic/claude-haiku-4-5":true,"azure-anthropic/claude-sonnet-4-5":true,"azure-anthropic/claude-opus-4-1":true,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"password":true,"condition":{"opaque":true}},{"id":"azureApiVersion","type":"short-input","valueKind":"string","storage":"native","title":"Azure API Version","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":true,"azure/gpt-6-sol":true,"azure/gpt-6-luna":true,"azure/gpt-6-astra":true,"azure/gpt-5.6-sol":true,"azure/gpt-5.6-terra":true,"azure/gpt-5.6-luna":true,"azure/gpt-5.5":true,"azure/gpt-5.4-mini":true,"azure/gpt-5.4-nano":true,"azure/gpt-5.4-pro":true,"azure/gpt-5.4":true,"azure/gpt-5.2":true,"azure/gpt-5.1":true,"azure/gpt-5.1-codex":true,"azure/gpt-5":true,"azure/gpt-5-mini":true,"azure/gpt-5-nano":true,"azure/gpt-5-chat":true,"azure/model-router":true,"azure/o3":true,"azure/o4-mini":true,"azure/gpt-4.1":true,"azure/gpt-4.1-mini":true,"azure/gpt-4.1-nano":true,"azure/gpt-4o":true,"azure-anthropic/claude-haiku-5-5":true,"azure-anthropic/claude-sonnet-5-5":true,"azure-anthropic/claude-opus-5-5":true,"azure-anthropic/claude-fable-5-1":true,"azure-anthropic/claude-opus-5":true,"azure-anthropic/claude-sonnet-5":true,"azure-anthropic/claude-opus-4-8":true,"azure-anthropic/claude-opus-4-7":true,"azure-anthropic/claude-sonnet-4-6":true,"azure-anthropic/claude-opus-4-6":true,"azure-anthropic/claude-opus-4-5":true,"azure-anthropic/claude-haiku-4-5":true,"azure-anthropic/claude-sonnet-4-5":true,"azure-anthropic/claude-opus-4-1":true,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"condition":{"opaque":true}},{"id":"vertexProject","type":"short-input","valueKind":"string","storage":"native","title":"Vertex AI Project","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"vertexLocation","type":"short-input","valueKind":"string","storage":"native","title":"Vertex AI Location","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":true,"vertex/gemini-3.7-flash":true,"vertex/gemini-3.6-flash":true,"vertex/gemini-3.5-flash-lite":true,"vertex/gemini-3.5-flash":true,"vertex/gemini-3.1-flash-lite":true,"vertex/gemini-3.1-pro-preview":true,"vertex/gemini-3-flash-preview":true,"vertex/deep-research-pro-preview-12-2025":true,"vertex/gemini-2.5-flash-lite":true,"vertex/gemini-2.5-flash":true,"vertex/gemini-2.5-pro":true,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":false,"bedrock/openai.gpt-6-astra":false,"bedrock/anthropic.claude-opus-5":false,"bedrock/openai.gpt-5.6-sol":false,"bedrock/openai.gpt-5.6-terra":false,"bedrock/openai.gpt-5.6-luna":false,"bedrock/anthropic.claude-sonnet-5":false,"bedrock/anthropic.claude-fable-5":false,"bedrock/anthropic.claude-opus-4-8":false,"bedrock/anthropic.claude-opus-4-7":false,"bedrock/anthropic.claude-sonnet-4-6":false,"bedrock/minimax.minimax-m2.5":false,"bedrock/zai.glm-5":false,"bedrock/anthropic.claude-opus-4-6-v1":false,"bedrock/moonshotai.kimi-k2.5":false,"bedrock/amazon.nova-2-lite-v1:0":false,"bedrock/mistral.mistral-large-3-675b-instruct":false,"bedrock/mistral.ministral-3-14b-instruct":false,"bedrock/mistral.ministral-3-8b-instruct":false,"bedrock/mistral.ministral-3-3b-instruct":false,"bedrock/deepseek.v3.2":false,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":false,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":false,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":false,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":false,"bedrock/openai.gpt-oss-120b-1:0":false,"bedrock/openai.gpt-oss-20b-1:0":false,"bedrock/amazon.nova-premier-v1:0":false,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":false,"bedrock/meta.llama4-scout-17b-instruct-v1:0":false,"bedrock/meta.llama3-3-70b-instruct-v1:0":false,"bedrock/amazon.nova-pro-v1:0":false,"bedrock/amazon.nova-lite-v1:0":false,"bedrock/amazon.nova-micro-v1:0":false,"bedrock/meta.llama3-1-70b-instruct-v1:0":false,"bedrock/meta.llama3-1-8b-instruct-v1:0":false,"bedrock/mistral.mistral-large-2407-v1:0":false,"bedrock/mistral.pixtral-large-2502-v1:0":false,"bedrock/mistral.magistral-small-2509":false,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":false,"bedrock/cohere.command-r-plus-v1:0":false,"bedrock/cohere.command-r-v1:0":false},"condition":{"opaque":true},"required":true},{"id":"bedrockAuthMode","type":"dropdown","valueKind":"string","storage":"native","title":"AWS Authentication","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":true,"bedrock/openai.gpt-6-astra":true,"bedrock/anthropic.claude-opus-5":true,"bedrock/openai.gpt-5.6-sol":true,"bedrock/openai.gpt-5.6-terra":true,"bedrock/openai.gpt-5.6-luna":true,"bedrock/anthropic.claude-sonnet-5":true,"bedrock/anthropic.claude-fable-5":true,"bedrock/anthropic.claude-opus-4-8":true,"bedrock/anthropic.claude-opus-4-7":true,"bedrock/anthropic.claude-sonnet-4-6":true,"bedrock/minimax.minimax-m2.5":true,"bedrock/zai.glm-5":true,"bedrock/anthropic.claude-opus-4-6-v1":true,"bedrock/moonshotai.kimi-k2.5":true,"bedrock/amazon.nova-2-lite-v1:0":true,"bedrock/mistral.mistral-large-3-675b-instruct":true,"bedrock/mistral.ministral-3-14b-instruct":true,"bedrock/mistral.ministral-3-8b-instruct":true,"bedrock/mistral.ministral-3-3b-instruct":true,"bedrock/deepseek.v3.2":true,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":true,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":true,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":true,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":true,"bedrock/openai.gpt-oss-120b-1:0":true,"bedrock/openai.gpt-oss-20b-1:0":true,"bedrock/amazon.nova-premier-v1:0":true,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":true,"bedrock/meta.llama4-scout-17b-instruct-v1:0":true,"bedrock/meta.llama3-3-70b-instruct-v1:0":true,"bedrock/amazon.nova-pro-v1:0":true,"bedrock/amazon.nova-lite-v1:0":true,"bedrock/amazon.nova-micro-v1:0":true,"bedrock/meta.llama3-1-70b-instruct-v1:0":true,"bedrock/meta.llama3-1-8b-instruct-v1:0":true,"bedrock/mistral.mistral-large-2407-v1:0":true,"bedrock/mistral.pixtral-large-2502-v1:0":true,"bedrock/mistral.magistral-small-2509":true,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":true,"bedrock/cohere.command-r-plus-v1:0":true,"bedrock/cohere.command-r-v1:0":true},"valueDefault":{"constant":"access_keys"},"condition":{"opaque":true},"options":[{"id":"access_keys"},{"id":"credential"}]},{"id":"bedrockCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"AWS Credential","mode":"basic","canonicalParamId":"bedrockCredential","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"serviceId":"aws","condition":{"opaque":true},"required":true},{"id":"bedrockManualCredential","type":"short-input","valueKind":"string","storage":"native","title":"AWS Credential","mode":"advanced","canonicalParamId":"bedrockCredential","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"condition":{"opaque":true},"required":true},{"id":"bedrockAccessKeyId","type":"short-input","valueKind":"string","storage":"native","title":"AWS Access Key ID","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"bedrockSecretKey","type":"short-input","valueKind":"string","storage":"native","title":"AWS Secret Access Key","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false},"password":true,"condition":{"opaque":true},"required":true},{"id":"bedrockRegion","type":"short-input","valueKind":"string","storage":"native","title":"AWS Region","visibleForModel":{"nebius/deepseek-ai/DeepSeek-V4-Pro-0813":false,"nebius/google/gemma-3-27b-it":false,"nebius/MiniMaxAI/MiniMax-M3":false,"nebius/moonshotai/Kimi-K3":false,"nebius/NousResearch/Hermes-4-405B":false,"nebius/nvidia/NVIDIA-Nemotron-3-Nano-30B-A3B":false,"nebius/nvidia/nemotron-3-super-120b-a12b":false,"nebius/nvidia/Nemotron-3-Ultra-550b-a55b":false,"nebius/nvidia/Nemotron-3_5-Lightning":false,"nebius/openai/gpt-oss-120b":false,"nebius/Qwen/Qwen3-235B-A22B-Instruct-2507":false,"nebius/Qwen/Qwen3-30B-A3B-Instruct-2507":false,"nebius/Qwen/Qwen3.8-27B":false,"nebius/zai-org/GLM-5.2":false,"nebius/zai-org/GLM-5.3":false,"nebius/zai-org/GLM-5.3-Flash":false,"thinkingmachines/inkling-small":false,"thinkingmachines/inkling":false,"thinkingmachines/inkling-2-small":false,"gpt-6.1-terra":false,"gpt-6.1-sol":false,"gpt-6-sol":false,"gpt-6-luna":false,"gpt-6-astra":false,"gpt-5.6-sol":false,"gpt-5.6-terra":false,"gpt-5.6-luna":false,"chat-latest":false,"gpt-5.5-pro":false,"gpt-5.5":false,"gpt-5.4-mini":false,"gpt-5.4-nano":false,"gpt-5.4-pro":false,"gpt-5.4":false,"gpt-5.3-codex":false,"gpt-5.2-pro":false,"gpt-5.2":false,"gpt-5.1":false,"gpt-5-pro":false,"gpt-5":false,"gpt-5-mini":false,"gpt-5-nano":false,"o3-pro":false,"o4-mini":false,"o3":false,"gpt-4.1":false,"gpt-4.1-mini":false,"o3-mini":false,"o1":false,"gpt-4o":false,"claude-fable-5-2":false,"claude-haiku-5-5":false,"claude-sonnet-5-5":false,"claude-opus-5-5":false,"claude-fable-5-1":false,"claude-opus-5":false,"claude-sonnet-5":false,"claude-fable-5":false,"claude-opus-4-8":false,"claude-opus-4-7":false,"claude-sonnet-4-6":false,"claude-opus-4-6":false,"claude-opus-4-5":false,"claude-haiku-4-5":false,"claude-sonnet-4-5":false,"azure/gpt-6.1-sol":false,"azure/gpt-6-sol":false,"azure/gpt-6-luna":false,"azure/gpt-6-astra":false,"azure/gpt-5.6-sol":false,"azure/gpt-5.6-terra":false,"azure/gpt-5.6-luna":false,"azure/gpt-5.5":false,"azure/gpt-5.4-mini":false,"azure/gpt-5.4-nano":false,"azure/gpt-5.4-pro":false,"azure/gpt-5.4":false,"azure/gpt-5.2":false,"azure/gpt-5.1":false,"azure/gpt-5.1-codex":false,"azure/gpt-5":false,"azure/gpt-5-mini":false,"azure/gpt-5-nano":false,"azure/gpt-5-chat":false,"azure/model-router":false,"azure/o3":false,"azure/o4-mini":false,"azure/gpt-4.1":false,"azure/gpt-4.1-mini":false,"azure/gpt-4.1-nano":false,"azure/gpt-4o":false,"azure-anthropic/claude-haiku-5-5":false,"azure-anthropic/claude-sonnet-5-5":false,"azure-anthropic/claude-opus-5-5":false,"azure-anthropic/claude-fable-5-1":false,"azure-anthropic/claude-opus-5":false,"azure-anthropic/claude-sonnet-5":false,"azure-anthropic/claude-opus-4-8":false,"azure-anthropic/claude-opus-4-7":false,"azure-anthropic/claude-sonnet-4-6":false,"azure-anthropic/claude-opus-4-6":false,"azure-anthropic/claude-opus-4-5":false,"azure-anthropic/claude-haiku-4-5":false,"azure-anthropic/claude-sonnet-4-5":false,"azure-anthropic/claude-opus-4-1":false,"gemini-4-argon":false,"gemini-3.8-flash":false,"gemini-3.7-flash":false,"gemini-3.6-flash":false,"gemini-3.5-flash-lite":false,"gemini-3.5-flash":false,"gemini-3.1-flash-lite":false,"gemini-3.1-pro-preview":false,"gemini-3-flash-preview":false,"deep-research-pro-preview-12-2025":false,"gemini-2.5-flash-lite":false,"gemini-2.5-flash":false,"gemini-2.5-pro":false,"vertex/gemini-3.8-flash":false,"vertex/gemini-3.7-flash":false,"vertex/gemini-3.6-flash":false,"vertex/gemini-3.5-flash-lite":false,"vertex/gemini-3.5-flash":false,"vertex/gemini-3.1-flash-lite":false,"vertex/gemini-3.1-pro-preview":false,"vertex/gemini-3-flash-preview":false,"vertex/deep-research-pro-preview-12-2025":false,"vertex/gemini-2.5-flash-lite":false,"vertex/gemini-2.5-flash":false,"vertex/gemini-2.5-pro":false,"deepseek-flash":false,"deepseek-v4-pro":false,"deepseek-v4-flash":false,"deepseek-reasoner":false,"deepseek-chat":false,"grok-4.7":false,"grok-4.6":false,"grok-4.5":false,"grok-4.3":false,"grok-4.20-0309-reasoning":false,"grok-4.20-0309-non-reasoning":false,"grok-4.20-multi-agent-0309":false,"cerebras/qwen-3.8-27b":false,"cerebras/gemma-4-31b":false,"cerebras/zai-glm-4.7":false,"cerebras/gpt-oss-120b":false,"groq/qwen/qwen3.8-27b":false,"groq/qwen/qwen3.6-27b":false,"groq/openai/gpt-oss-safeguard-20b":false,"groq/openai/gpt-oss-120b":false,"groq/openai/gpt-oss-20b":false,"groq/llama-3.3-70b-versatile":false,"groq/llama-3.1-8b-instant":false,"fugu-ultra-v2.0":false,"fugu-max":false,"fugu-max-v1.0":false,"fugu":false,"fugu-ultra":false,"sakana-namazu":false,"sakana-namazu-v1.0":false,"nvidia/nemotron-3.5-lightning-30b-a3b":false,"nvidia/nemotron-3-ultra-550b-a55b":false,"nvidia/nemotron-3-nano-30b-a3b":false,"nvidia/llama-3.3-nemotron-super-49b-v1.5":false,"nvidia/llama-3.1-nemotron-ultra-253b-v1":false,"nvidia/llama-3.1-nemotron-70b-instruct":false,"muse-spark-1.3":false,"muse-spark-1.1":false,"kimi-k3":false,"kimi-k2.7-code":false,"kimi-k2.7-code-highspeed":false,"kimi-k2.6":false,"kie/gpt-6-1-sol":false,"kie/claude-sonnet-5-5":false,"kie/claude-opus-5-5":false,"kie/gpt-6-sol":false,"kie/gpt-6-luna":false,"kie/gpt-6-astra":false,"kie/grok-4-6":false,"kie/claude-opus-5":false,"kie/kimi-k3":false,"kie/gpt-5-6-sol":false,"kie/gpt-5-6-terra":false,"kie/gpt-5-6-luna":false,"kie/grok-4-5":false,"kie/claude-sonnet-5":false,"kie/claude-fable-5":false,"kie/claude-opus-4-8":false,"kie/grok-4-3":false,"kie/gpt-5-5":false,"kie/claude-opus-4-7":false,"kie/claude-sonnet-4-6":false,"kie/claude-opus-4-6":false,"kie/claude-opus-4-5":false,"kie/claude-haiku-4-5":false,"kie/claude-sonnet-4-5":false,"glm-5.3-flash":false,"glm-5.3":false,"glm-5.2":false,"glm-5.1":false,"glm-5-turbo":false,"glm-5":false,"glm-4.7":false,"glm-4.7-flashx":false,"glm-4.6":false,"glm-4.5":false,"glm-4.5-air":false,"glm-4.5-x":false,"glm-4.5-airx":false,"glm-4-32b-0414-128k":false,"glm-5.3-flashx":false,"mistral-large-4":false,"zai-glm-5-3":false,"zai-glm-5-2":false,"labs-leanstral-1-5":false,"mistral-medium-2604":false,"mistral-medium-3-5":false,"mistral-medium-3":false,"mistral-medium-latest":false,"mistral-small-2603":false,"mistral-small-latest":false,"devstral-2512":false,"devstral-latest":false,"devstral-small-latest":false,"mistral-large-latest":false,"mistral-large-2512":false,"ministral-14b-latest":false,"ministral-14b-2512":false,"ministral-8b-latest":false,"ministral-8b-2512":false,"ministral-3b-latest":false,"ministral-3b-2512":false,"magistral-medium-latest":false,"magistral-medium-2509":false,"magistral-small-latest":false,"magistral-small-2509":false,"mistral-medium-2508":false,"codestral-latest":false,"codestral-2508":false,"mistral-small-2506":false,"mistral-medium-2505":false,"open-mistral-nemo":false,"bedrock/openai.gpt-6.1-sol":true,"bedrock/openai.gpt-6-astra":true,"bedrock/anthropic.claude-opus-5":true,"bedrock/openai.gpt-5.6-sol":true,"bedrock/openai.gpt-5.6-terra":true,"bedrock/openai.gpt-5.6-luna":true,"bedrock/anthropic.claude-sonnet-5":true,"bedrock/anthropic.claude-fable-5":true,"bedrock/anthropic.claude-opus-4-8":true,"bedrock/anthropic.claude-opus-4-7":true,"bedrock/anthropic.claude-sonnet-4-6":true,"bedrock/minimax.minimax-m2.5":true,"bedrock/zai.glm-5":true,"bedrock/anthropic.claude-opus-4-6-v1":true,"bedrock/moonshotai.kimi-k2.5":true,"bedrock/amazon.nova-2-lite-v1:0":true,"bedrock/mistral.mistral-large-3-675b-instruct":true,"bedrock/mistral.ministral-3-14b-instruct":true,"bedrock/mistral.ministral-3-8b-instruct":true,"bedrock/mistral.ministral-3-3b-instruct":true,"bedrock/deepseek.v3.2":true,"bedrock/anthropic.claude-opus-4-5-20251101-v1:0":true,"bedrock/anthropic.claude-haiku-4-5-20251001-v1:0":true,"bedrock/anthropic.claude-sonnet-4-5-20250929-v1:0":true,"bedrock/anthropic.claude-opus-4-1-20250805-v1:0":true,"bedrock/openai.gpt-oss-120b-1:0":true,"bedrock/openai.gpt-oss-20b-1:0":true,"bedrock/amazon.nova-premier-v1:0":true,"bedrock/meta.llama4-maverick-17b-instruct-v1:0":true,"bedrock/meta.llama4-scout-17b-instruct-v1:0":true,"bedrock/meta.llama3-3-70b-instruct-v1:0":true,"bedrock/amazon.nova-pro-v1:0":true,"bedrock/amazon.nova-lite-v1:0":true,"bedrock/amazon.nova-micro-v1:0":true,"bedrock/meta.llama3-1-70b-instruct-v1:0":true,"bedrock/meta.llama3-1-8b-instruct-v1:0":true,"bedrock/mistral.mistral-large-2407-v1:0":true,"bedrock/mistral.pixtral-large-2502-v1:0":true,"bedrock/mistral.magistral-small-2509":true,"bedrock/mistral.mixtral-8x7b-instruct-v0:1":true,"bedrock/cohere.command-r-plus-v1:0":true,"bedrock/cohere.command-r-v1:0":true},"condition":{"opaque":true}},{"id":"fallbackModels","type":"model-fallback-list","valueKind":"array","storage":"native","title":"Fallback models","mode":"advanced"}],"outputs":{"context":{"type":"string","description":"Context used for routing"},"model":{"type":"string","description":"Model used"},"tokens":{"type":"json","description":"Token usage"},"cost":{"type":"json","description":"Cost information"},"selectedRoute":{"type":"string","description":"Selected route ID"},"reasoning":{"type":"string","description":"Explanation of why this route was chosen"},"selectedPath":{"type":"json","description":"Selected routing path"}}},"slack_v2":{"type":"slack_v2","name":"Slack","category":"tools","tools":{"access":["slack_message","slack_ephemeral_message","slack_canvas","slack_message_reader","slack_get_message","slack_get_thread","slack_get_thread_replies","slack_get_channel_history","slack_get_permalink","slack_set_status","slack_set_title","slack_set_suggested_prompts","slack_set_suggested_prompts_v2","slack_set_agent_session_status_v2","slack_rename_agent_session_v2","slack_list_channels","slack_list_members","slack_list_users","slack_get_user","slack_download","slack_update_message","slack_delete_message","slack_add_reaction","slack_remove_reaction","slack_get_channel_info","slack_get_user_presence","slack_edit_canvas","slack_create_channel_canvas","slack_get_canvas","slack_list_canvases","slack_lookup_canvas_sections","slack_delete_canvas","slack_lists_create","slack_lists_update","slack_lists_access_set","slack_lists_items_list","slack_lists_items_info","slack_lists_items_create","slack_lists_items_update","slack_lists_items_delete","slack_create_conversation","slack_invite_to_conversation","slack_open_view","slack_update_view","slack_push_view","slack_publish_view","slack_schedule_message","slack_list_scheduled_messages","slack_delete_scheduled_message","slack_archive_conversation","slack_rename_conversation","slack_set_conversation_topic","slack_set_conversation_purpose","slack_lists_access_delete","slack_lists_download_start","slack_lists_download_get","slack_lists_items_delete_multiple","slack_share_canvas","slack_revoke_canvas_access","slack_join_conversation","slack_leave_conversation","slack_kick_conversation","slack_unarchive_conversation","slack_close_conversation","slack_mark_conversation_read","slack_open_conversation","slack_lookup_user_by_email","slack_list_user_conversations","slack_get_user_profile","slack_set_user_presence","slack_get_file_info","slack_list_files","slack_delete_file","slack_get_reactions","slack_list_reactions","slack_pin_message","slack_unpin_message","slack_list_pins","slack_add_bookmark","slack_edit_bookmark","slack_list_bookmarks","slack_remove_bookmark","slack_create_user_group","slack_update_user_group","slack_enable_user_group","slack_disable_user_group","slack_list_user_groups","slack_list_user_group_members","slack_update_user_group_members","slack_get_dnd_info","slack_get_team_dnd_info","slack_list_emoji","slack_get_team_info","slack_get_team_profile","slack_unfurl_links"],"selector":"operation"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["slack_oauth"]},"legacyIds":[{"from":"channelMaxPages","to":null}],"subBlocks":[{"id":"operation","type":"dropdown","valueKind":"string","storage":"native","title":"Operation","surface":"action","valueDefault":{"constant":"send"},"options":[{"id":"send","label":"Send Message"},{"id":"ephemeral","label":"Send Ephemeral Message"},{"id":"canvas","label":"Create Canvas"},{"id":"read","label":"Read Messages"},{"id":"get_message","label":"Get Message"},{"id":"get_thread","label":"Get Thread"},{"id":"get_thread_replies","label":"Get Thread Replies"},{"id":"get_channel_history","label":"Get Channel History"},{"id":"get_permalink","label":"Get Message Permalink"},{"id":"set_status","label":"Set Assistant Status"},{"id":"set_title","label":"Set Assistant Title"},{"id":"set_suggested_prompts","label":"Set Assistant Suggested Prompts"},{"id":"set_agent_suggested_prompts","label":"Set Agent Suggested Prompts"},{"id":"set_agent_session_status","label":"Set Agent Session Status"},{"id":"rename_agent_session","label":"Rename Agent Session"},{"id":"list_channels","label":"List Channels"},{"id":"list_members","label":"List Channel Members"},{"id":"list_users","label":"List Users"},{"id":"get_user","label":"Get User Info"},{"id":"download","label":"Download File"},{"id":"update","label":"Update Message"},{"id":"delete","label":"Delete Message"},{"id":"react","label":"Add Reaction"},{"id":"unreact","label":"Remove Reaction"},{"id":"get_channel_info","label":"Get Channel Info"},{"id":"get_user_presence","label":"Get User Presence"},{"id":"edit_canvas","label":"Edit Canvas"},{"id":"create_channel_canvas","label":"Create Channel Canvas"},{"id":"get_canvas","label":"Get Canvas Info"},{"id":"list_canvases","label":"List Canvases"},{"id":"lookup_canvas_sections","label":"Lookup Canvas Sections"},{"id":"delete_canvas","label":"Delete Canvas"},{"id":"create_list","label":"Create List"},{"id":"rename_list","label":"Update List"},{"id":"share_list","label":"Share List"},{"id":"list_items","label":"Read List Items"},{"id":"get_list_item","label":"Get List Item"},{"id":"create_list_item","label":"Create List Item"},{"id":"update_list_items","label":"Update List Items"},{"id":"delete_list_item","label":"Delete List Item"},{"id":"create_conversation","label":"Create Conversation"},{"id":"invite_to_conversation","label":"Invite to Conversation"},{"id":"open_view","label":"Open View"},{"id":"update_view","label":"Update View"},{"id":"push_view","label":"Push View"},{"id":"publish_view","label":"Publish View"},{"id":"schedule_message","label":"Schedule Message"},{"id":"list_scheduled_messages","label":"List Scheduled Messages"},{"id":"delete_scheduled_message","label":"Delete Scheduled Message"},{"id":"archive_conversation","label":"Archive Conversation"},{"id":"rename_conversation","label":"Rename Conversation"},{"id":"set_conversation_topic","label":"Set Conversation Topic"},{"id":"set_conversation_purpose","label":"Set Conversation Purpose"},{"id":"revoke_list_access","label":"Revoke List Access"},{"id":"start_list_export","label":"Start List Export"},{"id":"get_list_export","label":"Get List Export"},{"id":"delete_list_items","label":"Delete List Items"},{"id":"share_canvas","label":"Share Canvas"},{"id":"revoke_canvas_access","label":"Revoke Canvas Access"},{"id":"join_conversation","label":"Join Conversation"},{"id":"leave_conversation","label":"Leave Conversation"},{"id":"kick_conversation","label":"Remove User from Conversation"},{"id":"unarchive_conversation","label":"Unarchive Conversation"},{"id":"close_conversation","label":"Close Conversation"},{"id":"mark_conversation_read","label":"Mark Conversation Read"},{"id":"open_conversation","label":"Open Conversation"},{"id":"lookup_user_by_email","label":"Find User by Email"},{"id":"list_user_conversations","label":"List User Conversations"},{"id":"get_user_profile","label":"Get User Profile"},{"id":"set_user_presence","label":"Set Bot Presence"},{"id":"get_file_info","label":"Get File Info"},{"id":"list_files","label":"List Files"},{"id":"delete_file","label":"Delete File"},{"id":"get_reactions","label":"Get Reactions"},{"id":"list_reactions","label":"List Reactions"},{"id":"pin_message","label":"Pin Message"},{"id":"unpin_message","label":"Unpin Message"},{"id":"list_pins","label":"List Pins"},{"id":"add_bookmark","label":"Add Bookmark"},{"id":"edit_bookmark","label":"Edit Bookmark"},{"id":"list_bookmarks","label":"List Bookmarks"},{"id":"remove_bookmark","label":"Remove Bookmark"},{"id":"create_user_group","label":"Create User Group"},{"id":"update_user_group","label":"Update User Group"},{"id":"enable_user_group","label":"Enable User Group"},{"id":"disable_user_group","label":"Disable User Group"},{"id":"list_user_groups","label":"List User Groups"},{"id":"list_user_group_members","label":"List User Group Members"},{"id":"update_user_group_members","label":"Update User Group Members"},{"id":"get_dnd_info","label":"Get Do Not Disturb Info"},{"id":"get_team_dnd_info","label":"Get Team Do Not Disturb Info"},{"id":"list_emoji","label":"List Custom Emoji"},{"id":"get_team_info","label":"Get Workspace Info"},{"id":"get_team_profile","label":"Get Workspace Profile Fields"},{"id":"unfurl_links","label":"Unfurl Links"}]},{"id":"destinationType","type":"dropdown","valueKind":"string","storage":"native","title":"Destination","surface":"action","visibleFor":{"send":true,"ephemeral":false,"canvas":false,"read":true,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"channel"},"condition":{"opaque":true},"options":[{"id":"channel"},{"id":"dm"}]},{"id":"credential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Slack Account","mode":"basic","canonicalParamId":"oauthCredential","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"serviceId":"slack","condition":{"opaque":true},"required":true},{"id":"manualCredential","type":"short-input","valueKind":"string","storage":"native","title":"Slack Account","mode":"advanced","canonicalParamId":"oauthCredential","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"channel","type":"channel-selector","valueKind":"picked","storage":"native","title":"Channel","mode":"basic","canonicalParamId":"channel","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":true,"list_users":false,"get_user":false,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"send":{"field":"destinationType","value":"dm","not":true},"read":{"field":"destinationType","value":"dm","not":true},"schedule_message":{"field":"destinationType","value":"dm","not":true}},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.channels","serviceId":"slack","condition":{"opaque":true},"required":{"field":"operation","value":{"list":8},"not":true},"options":{"dynamic":true}},{"id":"manualChannel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","mode":"advanced","canonicalParamId":"channel","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":true,"list_users":false,"get_user":false,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"send":{"field":"destinationType","value":"dm","not":true},"canvas":{"field":"destinationType","value":"dm","not":true},"read":{"field":"destinationType","value":"dm","not":true},"get_message":{"field":"destinationType","value":"dm","not":true},"get_thread":{"field":"destinationType","value":"dm","not":true},"get_thread_replies":{"field":"destinationType","value":"dm","not":true},"get_channel_history":{"field":"destinationType","value":"dm","not":true},"get_permalink":{"field":"destinationType","value":"dm","not":true},"set_status":{"field":"destinationType","value":"dm","not":true},"set_title":{"field":"destinationType","value":"dm","not":true},"set_suggested_prompts":{"field":"destinationType","value":"dm","not":true},"list_members":{"field":"destinationType","value":"dm","not":true},"download":{"field":"destinationType","value":"dm","not":true},"update":{"field":"destinationType","value":"dm","not":true},"delete":{"field":"destinationType","value":"dm","not":true},"react":{"field":"destinationType","value":"dm","not":true},"unreact":{"field":"destinationType","value":"dm","not":true},"get_channel_info":{"field":"destinationType","value":"dm","not":true},"create_channel_canvas":{"field":"destinationType","value":"dm","not":true},"list_canvases":{"field":"destinationType","value":"dm","not":true},"invite_to_conversation":{"field":"destinationType","value":"dm","not":true},"schedule_message":{"field":"destinationType","value":"dm","not":true},"list_scheduled_messages":{"field":"destinationType","value":"dm","not":true},"delete_scheduled_message":{"field":"destinationType","value":"dm","not":true},"archive_conversation":{"field":"destinationType","value":"dm","not":true},"rename_conversation":{"field":"destinationType","value":"dm","not":true},"set_conversation_topic":{"field":"destinationType","value":"dm","not":true},"set_conversation_purpose":{"field":"destinationType","value":"dm","not":true}},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":{"field":"operation","value":{"list":8},"not":true}},{"id":"dmUserId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"dmUserId","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":true,"rename_agent_session":true,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":true,"rename_list":true,"share_list":true,"list_items":true,"get_list_item":true,"create_list_item":true,"update_list_items":true,"delete_list_item":true,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"send":{"field":"destinationType","value":"dm"},"ephemeral":{"field":"destinationType","value":"dm"},"canvas":{"field":"destinationType","value":"dm"},"read":{"field":"destinationType","value":"dm"},"get_message":{"field":"destinationType","value":"dm"},"get_thread":{"field":"destinationType","value":"dm"},"get_thread_replies":{"field":"destinationType","value":"dm"},"get_channel_history":{"field":"destinationType","value":"dm"},"get_permalink":{"field":"destinationType","value":"dm"},"set_status":{"field":"destinationType","value":"dm"},"set_title":{"field":"destinationType","value":"dm"},"set_suggested_prompts":{"field":"destinationType","value":"dm"},"set_agent_suggested_prompts":{"field":"destinationType","value":"dm"},"set_agent_session_status":{"field":"destinationType","value":"dm"},"rename_agent_session":{"field":"destinationType","value":"dm"},"list_channels":{"field":"destinationType","value":"dm"},"list_members":{"field":"destinationType","value":"dm"},"list_users":{"field":"destinationType","value":"dm"},"get_user":{"field":"destinationType","value":"dm"},"download":{"field":"destinationType","value":"dm"},"update":{"field":"destinationType","value":"dm"},"delete":{"field":"destinationType","value":"dm"},"react":{"field":"destinationType","value":"dm"},"unreact":{"field":"destinationType","value":"dm"},"get_channel_info":{"field":"destinationType","value":"dm"},"get_user_presence":{"field":"destinationType","value":"dm"},"edit_canvas":{"field":"destinationType","value":"dm"},"create_channel_canvas":{"field":"destinationType","value":"dm"},"get_canvas":{"field":"destinationType","value":"dm"},"list_canvases":{"field":"destinationType","value":"dm"},"lookup_canvas_sections":{"field":"destinationType","value":"dm"},"delete_canvas":{"field":"destinationType","value":"dm"},"create_list":{"field":"destinationType","value":"dm"},"rename_list":{"field":"destinationType","value":"dm"},"share_list":{"field":"destinationType","value":"dm"},"list_items":{"field":"destinationType","value":"dm"},"get_list_item":{"field":"destinationType","value":"dm"},"create_list_item":{"field":"destinationType","value":"dm"},"update_list_items":{"field":"destinationType","value":"dm"},"delete_list_item":{"field":"destinationType","value":"dm"},"create_conversation":{"field":"destinationType","value":"dm"},"invite_to_conversation":{"field":"destinationType","value":"dm"},"open_view":{"field":"destinationType","value":"dm"},"update_view":{"field":"destinationType","value":"dm"},"push_view":{"field":"destinationType","value":"dm"},"publish_view":{"field":"destinationType","value":"dm"},"schedule_message":{"field":"destinationType","value":"dm"},"list_scheduled_messages":{"field":"destinationType","value":"dm"},"delete_scheduled_message":{"field":"destinationType","value":"dm"},"archive_conversation":{"field":"destinationType","value":"dm"},"rename_conversation":{"field":"destinationType","value":"dm"},"set_conversation_topic":{"field":"destinationType","value":"dm"},"set_conversation_purpose":{"field":"destinationType","value":"dm"}},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualDmUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"dmUserId","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":true,"read":true,"get_message":true,"get_thread":true,"get_thread_replies":true,"get_channel_history":true,"get_permalink":true,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":true,"rename_agent_session":true,"list_channels":true,"list_members":true,"list_users":true,"get_user":true,"download":true,"update":true,"delete":true,"react":true,"unreact":true,"get_channel_info":true,"get_user_presence":true,"edit_canvas":true,"create_channel_canvas":true,"get_canvas":true,"list_canvases":true,"lookup_canvas_sections":true,"delete_canvas":true,"create_list":true,"rename_list":true,"share_list":true,"list_items":true,"get_list_item":true,"create_list_item":true,"update_list_items":true,"delete_list_item":true,"create_conversation":true,"invite_to_conversation":true,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":true,"list_scheduled_messages":true,"delete_scheduled_message":true,"archive_conversation":true,"rename_conversation":true,"set_conversation_topic":true,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"send":{"field":"destinationType","value":"dm"},"ephemeral":{"field":"destinationType","value":"dm"},"canvas":{"field":"destinationType","value":"dm"},"read":{"field":"destinationType","value":"dm"},"get_message":{"field":"destinationType","value":"dm"},"get_thread":{"field":"destinationType","value":"dm"},"get_thread_replies":{"field":"destinationType","value":"dm"},"get_channel_history":{"field":"destinationType","value":"dm"},"get_permalink":{"field":"destinationType","value":"dm"},"set_status":{"field":"destinationType","value":"dm"},"set_title":{"field":"destinationType","value":"dm"},"set_suggested_prompts":{"field":"destinationType","value":"dm"},"set_agent_suggested_prompts":{"field":"destinationType","value":"dm"},"set_agent_session_status":{"field":"destinationType","value":"dm"},"rename_agent_session":{"field":"destinationType","value":"dm"},"list_channels":{"field":"destinationType","value":"dm"},"list_members":{"field":"destinationType","value":"dm"},"list_users":{"field":"destinationType","value":"dm"},"get_user":{"field":"destinationType","value":"dm"},"download":{"field":"destinationType","value":"dm"},"update":{"field":"destinationType","value":"dm"},"delete":{"field":"destinationType","value":"dm"},"react":{"field":"destinationType","value":"dm"},"unreact":{"field":"destinationType","value":"dm"},"get_channel_info":{"field":"destinationType","value":"dm"},"get_user_presence":{"field":"destinationType","value":"dm"},"edit_canvas":{"field":"destinationType","value":"dm"},"create_channel_canvas":{"field":"destinationType","value":"dm"},"get_canvas":{"field":"destinationType","value":"dm"},"list_canvases":{"field":"destinationType","value":"dm"},"lookup_canvas_sections":{"field":"destinationType","value":"dm"},"delete_canvas":{"field":"destinationType","value":"dm"},"create_list":{"field":"destinationType","value":"dm"},"rename_list":{"field":"destinationType","value":"dm"},"share_list":{"field":"destinationType","value":"dm"},"list_items":{"field":"destinationType","value":"dm"},"get_list_item":{"field":"destinationType","value":"dm"},"create_list_item":{"field":"destinationType","value":"dm"},"update_list_items":{"field":"destinationType","value":"dm"},"delete_list_item":{"field":"destinationType","value":"dm"},"create_conversation":{"field":"destinationType","value":"dm"},"invite_to_conversation":{"field":"destinationType","value":"dm"},"open_view":{"field":"destinationType","value":"dm"},"update_view":{"field":"destinationType","value":"dm"},"push_view":{"field":"destinationType","value":"dm"},"publish_view":{"field":"destinationType","value":"dm"},"schedule_message":{"field":"destinationType","value":"dm"},"list_scheduled_messages":{"field":"destinationType","value":"dm"},"delete_scheduled_message":{"field":"destinationType","value":"dm"},"archive_conversation":{"field":"destinationType","value":"dm"},"rename_conversation":{"field":"destinationType","value":"dm"},"set_conversation_topic":{"field":"destinationType","value":"dm"},"set_conversation_purpose":{"field":"destinationType","value":"dm"}},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"ephemeralUser","type":"user-selector","valueKind":"picked","storage":"native","title":"Target User","mode":"basic","canonicalParamId":"ephemeralUser","surface":"action","visibleFor":{"send":false,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualEphemeralUser","type":"short-input","valueKind":"string","storage":"native","title":"Target User ID","mode":"advanced","canonicalParamId":"ephemeralUser","surface":"action","visibleFor":{"send":false,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"messageFormat","type":"dropdown","valueKind":"string","storage":"native","title":"Message Format","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"text"},"condition":{"opaque":true},"options":[{"id":"text"},{"id":"blocks"}]},{"id":"text","type":"long-input","valueKind":"string","storage":"native","title":"Message","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":{"field":"operation","value":["send","ephemeral","schedule_message"],"and":{"field":"messageFormat","value":"blocks","not":true}}},{"id":"blocks","type":"code","valueKind":"json","storage":"native","title":"Block Kit Blocks","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"send":{"field":"messageFormat","value":"blocks"},"ephemeral":{"field":"messageFormat","value":"blocks"},"update":{"field":"messageFormat","value":"blocks"},"schedule_message":{"field":"messageFormat","value":"blocks"}},"language":"json","condition":{"opaque":true},"required":{"field":"operation","value":["send","ephemeral","update","schedule_message"],"and":{"field":"messageFormat","value":"blocks"}}},{"id":"threadTs","type":"short-input","valueKind":"string","storage":"native","title":"Thread Timestamp","surface":"action","visibleFor":{"send":true,"ephemeral":true,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"attachmentFiles","type":"file-upload","valueKind":"upload","storage":"native","title":"Attachments","mode":"basic","canonicalParamId":"files","surface":"action","visibleFor":{"send":true,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"multiple":true,"condition":{"opaque":true},"required":false},{"id":"files","type":"short-input","valueKind":"string","storage":"native","title":"File Attachments","mode":"advanced","canonicalParamId":"files","surface":"action","visibleFor":{"send":true,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"title","type":"short-input","valueKind":"string","storage":"native","title":"Canvas Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":true,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"content","type":"long-input","valueKind":"string","storage":"native","title":"Canvas Content","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":true,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"limit","type":"short-input","valueKind":"string","storage":"native","title":"Message Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":true,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"includePrivate","type":"dropdown","valueKind":"string","storage":"native","title":"Include Private Channels","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"true"},"condition":{"opaque":true},"options":[{"id":"true"},{"id":"false"}]},{"id":"channelLimit","type":"short-input","valueKind":"string","storage":"native","title":"Conversations Per Page","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"memberLimit","type":"short-input","valueKind":"string","storage":"native","title":"Member Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":true,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"includeDeleted","type":"dropdown","valueKind":"string","storage":"native","title":"Include Deactivated Users","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":true,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"options":[{"id":"false"},{"id":"true"}]},{"id":"userLimit","type":"short-input","valueKind":"string","storage":"native","title":"User Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":true,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"paginationCursor","type":"short-input","valueKind":"string","storage":"native","title":"Pagination Cursor","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":true,"list_members":true,"list_users":true,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"userId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"userId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":true,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"userId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":true,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"getMessageTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":true,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":true,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"getThreadTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Thread Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":true,"get_thread_replies":true,"get_channel_history":false,"get_permalink":false,"set_status":true,"set_title":true,"set_suggested_prompts":true,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"threadLimit","type":"short-input","valueKind":"string","storage":"native","title":"Message Limit","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":true,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"status","type":"short-input","valueKind":"string","storage":"native","title":"Status Text","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":true,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"loadingMessages","type":"long-input","valueKind":"string","storage":"native","title":"Loading Messages","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":true,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"assistantTitle","type":"short-input","valueKind":"string","storage":"native","title":"Thread Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":true,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"suggestedPrompts","type":"long-input","valueKind":"string","storage":"native","title":"Suggested Prompts","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"promptsTitle","type":"short-input","valueKind":"string","storage":"native","title":"Prompts Heading","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":true,"set_agent_suggested_prompts":true,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyOldest","type":"short-input","valueKind":"string","storage":"native","title":"Oldest Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyLatest","type":"short-input","valueKind":"string","storage":"native","title":"Latest Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyLimit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyMaxPages","type":"short-input","valueKind":"string","storage":"native","title":"Max Pages","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyCursor","type":"short-input","valueKind":"string","storage":"native","title":"Start Cursor","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"historyInclusive","type":"dropdown","valueKind":"string","storage":"native","title":"Inclusive","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":true,"get_channel_history":true,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"required":false,"options":[{"id":"false"},{"id":"true"}]},{"id":"oldest","type":"short-input","valueKind":"string","storage":"native","title":"Oldest Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":true,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"fileId","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":true,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"downloadFileName","type":"short-input","valueKind":"string","storage":"native","title":"File Name Override","canonicalParamId":"fileName","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":true,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"updateTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"updateText","type":"long-input","valueKind":"string","storage":"native","title":"New Message Text","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":true,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":{"field":"operation","value":"update","and":{"field":"messageFormat","value":"blocks","not":true}}},{"id":"deleteTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":true,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"reactionTimestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":true,"unreact":true,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"emojiName","type":"short-input","valueKind":"string","storage":"native","title":"Emoji Name","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":true,"unreact":true,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"includeNumMembers","type":"dropdown","valueKind":"string","storage":"native","title":"Include Member Count","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":true,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"true"},"condition":{"opaque":true},"options":[{"id":"true"},{"id":"false"}]},{"id":"presenceUserId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"presenceUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":true,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualPresenceUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"presenceUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":true,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"editCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"canvasOperation","type":"dropdown","valueKind":"string","storage":"native","title":"Edit Operation","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"insert_at_end"},"condition":{"opaque":true},"required":true,"options":[{"id":"insert_at_start"},{"id":"insert_at_end"},{"id":"insert_after"},{"id":"insert_before"},{"id":"replace"},{"id":"delete"},{"id":"rename"}]},{"id":"canvasContent","type":"long-input","valueKind":"string","storage":"native","title":"Content","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"edit_canvas":{"field":"canvasOperation","value":["delete","rename"],"not":true}},"condition":{"opaque":true}},{"id":"sectionId","type":"short-input","valueKind":"string","storage":"native","title":"Section ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"edit_canvas":{"field":"canvasOperation","value":["insert_after","insert_before","replace","delete"]}},"condition":{"opaque":true},"required":{"field":"canvasOperation","value":["insert_after","insert_before","delete"]}},{"id":"canvasTitle","type":"short-input","valueKind":"string","storage":"native","title":"New Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":true,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"visibleWhen":{"edit_canvas":{"field":"canvasOperation","value":"rename"}},"condition":{"opaque":true},"required":true},{"id":"channelCanvasTitle","type":"short-input","valueKind":"string","storage":"native","title":"Canvas Title","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"channelCanvasContent","type":"long-input","valueKind":"string","storage":"native","title":"Canvas Content","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":true,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"getCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":true,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"canvasListCount","type":"short-input","valueKind":"string","storage":"native","title":"Canvas Limit","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListPage","type":"short-input","valueKind":"string","storage":"native","title":"Page","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListUser","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListTsFrom","type":"short-input","valueKind":"string","storage":"native","title":"Created After","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListTsTo","type":"short-input","valueKind":"string","storage":"native","title":"Created Before","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"canvasListTeamId","type":"short-input","valueKind":"string","storage":"native","title":"Team ID","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":true,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"lookupCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":true,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"sectionCriteria","type":"code","valueKind":"json","storage":"native","title":"Section Criteria","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":true,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"language":"json","condition":{"opaque":true},"required":true},{"id":"deleteCanvasId","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":true,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"conversationName","type":"short-input","valueKind":"string","storage":"native","title":"Channel Name","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"isPrivate","type":"dropdown","valueKind":"string","storage":"native","title":"Private Channel","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"options":[{"id":"false"},{"id":"true"}]},{"id":"teamId","type":"short-input","valueKind":"string","storage":"native","title":"Team ID","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":true,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"inviteUsers","type":"short-input","valueKind":"string","storage":"native","title":"User IDs","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"inviteForce","type":"dropdown","valueKind":"string","storage":"native","title":"Skip Invalid Users","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":true,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"valueDefault":{"constant":"false"},"condition":{"opaque":true},"options":[{"id":"false"},{"id":"true"}]},{"id":"viewTriggerId","type":"short-input","valueKind":"string","storage":"native","title":"Trigger ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":true,"update_view":false,"push_view":true,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"viewInteractivityPointer","type":"short-input","valueKind":"string","storage":"native","title":"Interactivity Pointer","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":true,"update_view":false,"push_view":true,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"viewId","type":"short-input","valueKind":"string","storage":"native","title":"View ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":true,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"viewExternalId","type":"short-input","valueKind":"string","storage":"native","title":"External ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":true,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"viewHash","type":"short-input","valueKind":"string","storage":"native","title":"View Hash","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":true,"push_view":false,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true}},{"id":"publishUserId","type":"user-selector","valueKind":"picked","storage":"native","title":"User","mode":"basic","canonicalParamId":"publishUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"opaque":true},"required":true,"options":{"dynamic":true}},{"id":"manualPublishUserId","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","canonicalParamId":"publishUserId","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"dependsOn":{"all":["credential"],"any":[]},"condition":{"opaque":true},"required":true},{"id":"viewPayload","type":"code","valueKind":"json","storage":"native","title":"View Payload","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":true,"update_view":true,"push_view":true,"publish_view":true,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"language":"json","condition":{"opaque":true},"required":true},{"id":"scheduleAt","type":"short-input","valueKind":"string","storage":"native","title":"Send At","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":true,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"scheduledLimit","type":"short-input","valueKind":"string","storage":"native","title":"Message Limit","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":true,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"scheduledCursor","type":"short-input","valueKind":"string","storage":"native","title":"Pagination Cursor","mode":"advanced","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":true,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":false},{"id":"scheduledMessageId","type":"short-input","valueKind":"string","storage":"native","title":"Scheduled Message ID","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":true,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"renameChannelName","type":"short-input","valueKind":"string","storage":"native","title":"New Channel Name","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":true,"set_conversation_topic":false,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"conversationTopic","type":"long-input","valueKind":"string","storage":"native","title":"Topic","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":true,"set_conversation_purpose":false,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"conversationPurpose","type":"long-input","valueKind":"string","storage":"native","title":"Purpose","surface":"action","visibleFor":{"send":false,"ephemeral":false,"canvas":false,"read":false,"get_message":false,"get_thread":false,"get_thread_replies":false,"get_channel_history":false,"get_permalink":false,"set_status":false,"set_title":false,"set_suggested_prompts":false,"set_agent_suggested_prompts":false,"set_agent_session_status":false,"rename_agent_session":false,"list_channels":false,"list_members":false,"list_users":false,"get_user":false,"download":false,"update":false,"delete":false,"react":false,"unreact":false,"get_channel_info":false,"get_user_presence":false,"edit_canvas":false,"create_channel_canvas":false,"get_canvas":false,"list_canvases":false,"lookup_canvas_sections":false,"delete_canvas":false,"create_list":false,"rename_list":false,"share_list":false,"list_items":false,"get_list_item":false,"create_list_item":false,"update_list_items":false,"delete_list_item":false,"create_conversation":false,"invite_to_conversation":false,"open_view":false,"update_view":false,"push_view":false,"publish_view":false,"schedule_message":false,"list_scheduled_messages":false,"delete_scheduled_message":false,"archive_conversation":false,"rename_conversation":false,"set_conversation_topic":false,"set_conversation_purpose":true,"revoke_list_access":false,"start_list_export":false,"get_list_export":false,"delete_list_items":false,"share_canvas":false,"revoke_canvas_access":false,"join_conversation":false,"leave_conversation":false,"kick_conversation":false,"unarchive_conversation":false,"close_conversation":false,"mark_conversation_read":false,"open_conversation":false,"lookup_user_by_email":false,"list_user_conversations":false,"get_user_profile":false,"set_user_presence":false,"get_file_info":false,"list_files":false,"delete_file":false,"get_reactions":false,"list_reactions":false,"pin_message":false,"unpin_message":false,"list_pins":false,"add_bookmark":false,"edit_bookmark":false,"list_bookmarks":false,"remove_bookmark":false,"create_user_group":false,"update_user_group":false,"enable_user_group":false,"disable_user_group":false,"list_user_groups":false,"list_user_group_members":false,"update_user_group_members":false,"get_dnd_info":false,"get_team_dnd_info":false,"list_emoji":false,"get_team_info":false,"get_team_profile":false,"unfurl_links":false},"condition":{"opaque":true},"required":true},{"id":"agentBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Slack Bot","mode":"basic","canonicalParamId":"agentCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":9}},"required":true},{"id":"manualAgentBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Custom Slack Bot Credential ID","mode":"advanced","canonicalParamId":"agentCredentialId","surface":"action","condition":{"field":"operation","value":{"list":9}},"required":true},{"id":"agentChannel","type":"channel-selector","valueKind":"picked","storage":"native","title":"Channel","mode":"basic","canonicalParamId":"agentChannelId","surface":"action","dependsOn":{"all":["agentBotCredential"],"any":[]},"selectorKey":"slack.channels","serviceId":"slack","condition":{"field":"operation","value":{"list":9}},"required":true,"options":{"dynamic":true}},{"id":"manualAgentChannel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","mode":"advanced","canonicalParamId":"agentChannelId","surface":"action","condition":{"field":"operation","value":{"list":9}},"required":true},{"id":"agentThreadTs","type":"short-input","valueKind":"string","storage":"native","title":"Thread Timestamp","surface":"action","condition":{"field":"operation","value":{"list":9}},"required":{"field":"operation","value":{"list":10}}},{"id":"agentSessionStatus","type":"dropdown","valueKind":"string","storage":"native","title":"Session Status","surface":"action","valueDefault":{"constant":"processing"},"condition":{"field":"operation","value":"set_agent_session_status"},"required":true,"options":[{"id":"active"},{"id":"processing"},{"id":"suspended"},{"id":"closed"}]},{"id":"agentSessionTitle","type":"short-input","valueKind":"string","storage":"native","title":"Session Title","surface":"action","condition":{"field":"operation","value":{"list":10}},"required":{"field":"operation","value":"rename_agent_session"}},{"id":"agentInitiatorUser","type":"user-selector","valueKind":"picked","storage":"native","title":"Initiator","mode":"basic","canonicalParamId":"agentInitiatorUserId","surface":"action","dependsOn":{"all":["agentBotCredential"],"any":[]},"selectorKey":"slack.users","serviceId":"slack","condition":{"field":"operation","value":"set_agent_session_status"},"required":false,"options":{"dynamic":true}},{"id":"manualAgentInitiatorUser","type":"short-input","valueKind":"string","storage":"native","title":"Initiator User ID","mode":"advanced","canonicalParamId":"agentInitiatorUserId","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"agentIconEmoji","type":"short-input","valueKind":"string","storage":"native","title":"Agent Icon Emoji","mode":"advanced","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"agentIconUrl","type":"short-input","valueKind":"string","storage":"native","title":"Agent Icon URL","mode":"advanced","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"agentUsername","type":"short-input","valueKind":"string","storage":"native","title":"Agent Username","mode":"advanced","surface":"action","condition":{"field":"operation","value":"set_agent_session_status"},"required":false},{"id":"listBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Slack Bot","mode":"basic","canonicalParamId":"listCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":11}},"required":true},{"id":"manualListBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Custom Slack Bot Credential ID","mode":"advanced","canonicalParamId":"listCredentialId","surface":"action","condition":{"field":"operation","value":{"list":11}},"required":true},{"id":"listId","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":["rename_list","share_list","list_items","get_list_item","create_list_item","update_list_items","delete_list_item"]},"required":true},{"id":"listShareTarget","type":"dropdown","valueKind":"string","storage":"native","title":"Share With","surface":"action","valueDefault":{"constant":"users"},"condition":{"field":"operation","value":"share_list"},"required":true,"options":[{"id":"users"},{"id":"channels"}]},{"id":"listShareUserIds","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_list","and":{"field":"listShareTarget","value":"users"}},"required":true},{"id":"listShareChannelIds","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_list","and":{"field":"listShareTarget","value":"channels"}},"required":true},{"id":"listAccessLevel","type":"dropdown","valueKind":"string","storage":"native","title":"Access Level","surface":"action","dependsOn":{"all":["listShareTarget"],"any":[]},"valueDefault":{"constant":"read"},"condition":{"field":"operation","value":"share_list"},"required":true,"options":{"opaque":true}},{"id":"listName","type":"short-input","valueKind":"string","storage":"native","title":"Name","surface":"action","condition":{"field":"operation","value":{"list":12}},"required":{"field":"operation","value":"create_list"}},{"id":"listItemId","type":"short-input","valueKind":"string","storage":"native","title":"Row ID","surface":"action","condition":{"field":"operation","value":["get_list_item","delete_list_item"]},"required":true},{"id":"listInitialFields","type":"code","valueKind":"json","storage":"native","title":"Initial Fields","surface":"action","language":"json","condition":{"field":"operation","value":"create_list_item"}},{"id":"listCells","type":"code","valueKind":"json","storage":"native","title":"Cells","surface":"action","language":"json","condition":{"field":"operation","value":"update_list_items"},"required":true},{"id":"listSchema","type":"code","valueKind":"json","storage":"native","title":"Column Schema","surface":"action","language":"json","condition":{"field":"operation","value":"create_list"}},{"id":"listDescription","type":"long-input","valueKind":"string","storage":"native","title":"Description","mode":"advanced","surface":"action","condition":{"field":"operation","value":{"list":12}}},{"id":"listUpdateTodoMode","type":"dropdown","valueKind":"string","storage":"native","title":"Task Tracking Fields","mode":"advanced","surface":"action","valueDefault":{"constant":"unchanged"},"condition":{"field":"operation","value":"rename_list"},"options":[{"id":"unchanged"},{"id":"true"},{"id":"false"}]},{"id":"listTodoMode","type":"switch","valueKind":"boolean","storage":"native","title":"Task Tracking Fields","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_list"}},{"id":"listParentItemId","type":"short-input","valueKind":"string","storage":"native","title":"Parent Row ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_list_item"}},{"id":"listDuplicatedItemId","type":"short-input","valueKind":"string","storage":"native","title":"Duplicate Row ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_list_item"}},{"id":"listLimit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_items"}},{"id":"listCursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_items"}},{"id":"listArchived","type":"switch","valueKind":"boolean","storage":"native","title":"Archived Rows","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_items"}},{"id":"listIncludeSchema","type":"switch","valueKind":"boolean","storage":"native","title":"Include List Schema","mode":"advanced","surface":"action","defaultValue":true,"condition":{"field":"operation","value":"list_items"}},{"id":"apiBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Slack Bot","mode":"basic","canonicalParamId":"apiBotCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":13}},"required":true},{"id":"manualApiBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Slack Credential ID","mode":"advanced","canonicalParamId":"apiBotCredentialId","surface":"action","condition":{"field":"operation","value":{"list":13}},"required":true},{"id":"apiOAuthCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Slack Account or Bot","mode":"basic","canonicalParamId":"apiOAuthCredentialId","surface":"action","serviceId":"slack","condition":{"field":"operation","value":{"list":14}},"required":true},{"id":"manualApiOAuthCredential","type":"short-input","valueKind":"string","storage":"native","title":"Slack Credential ID","mode":"advanced","canonicalParamId":"apiOAuthCredentialId","surface":"action","condition":{"field":"operation","value":{"list":14}},"required":true},{"id":"slack_revoke_list_access_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"revoke_list_access"},"required":true},{"id":"slack_revoke_list_access_user_ids","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_list_access"},"required":false},{"id":"slack_revoke_list_access_channel_ids","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_list_access"},"required":false},{"id":"slack_start_list_export_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":true},{"id":"slack_start_list_export_format","type":"dropdown","valueKind":"string","storage":"native","title":"Export Format","surface":"action","valueDefault":{"constant":"csv"},"condition":{"field":"operation","value":"start_list_export"},"required":false,"options":[{"id":"csv"},{"id":"json"}]},{"id":"slack_start_list_export_include_threads","type":"switch","valueKind":"boolean","storage":"native","title":"Include Threads","mode":"advanced","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":false},{"id":"slack_start_list_export_include_attachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","mode":"advanced","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":false},{"id":"slack_start_list_export_include_archived","type":"switch","valueKind":"boolean","storage":"native","title":"Include Archived Rows","mode":"advanced","surface":"action","condition":{"field":"operation","value":"start_list_export"},"required":false},{"id":"slack_get_list_export_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":true},{"id":"slack_get_list_export_job_id","type":"short-input","valueKind":"string","storage":"native","title":"Export Job ID","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":true},{"id":"slack_get_list_export_format","type":"dropdown","valueKind":"string","storage":"native","title":"Export Format","surface":"action","valueDefault":{"constant":"csv"},"condition":{"field":"operation","value":"get_list_export"},"required":false,"options":[{"id":"csv"},{"id":"json"}]},{"id":"slack_get_list_export_include_threads","type":"switch","valueKind":"boolean","storage":"native","title":"Include Threads","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":false},{"id":"slack_get_list_export_include_attachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_list_export"},"required":false},{"id":"slack_delete_list_items_list_id","type":"short-input","valueKind":"string","storage":"native","title":"List ID","surface":"action","condition":{"field":"operation","value":"delete_list_items"},"required":true},{"id":"slack_delete_list_items_ids","type":"code","valueKind":"json","storage":"native","title":"Row IDs","surface":"action","language":"json","condition":{"field":"operation","value":"delete_list_items"},"required":true},{"id":"slack_share_canvas_canvas_id","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","condition":{"field":"operation","value":"share_canvas"},"required":true},{"id":"slack_share_canvas_access_level","type":"dropdown","valueKind":"string","storage":"native","title":"Access Level","surface":"action","dependsOn":{"all":["slack_share_canvas_channel_ids"],"any":[]},"valueDefault":{"constant":"read"},"condition":{"field":"operation","value":"share_canvas"},"required":true,"options":{"opaque":true}},{"id":"slack_share_canvas_user_ids","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_canvas"},"required":false},{"id":"slack_share_canvas_channel_ids","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"share_canvas"},"required":false},{"id":"slack_revoke_canvas_access_canvas_id","type":"short-input","valueKind":"string","storage":"native","title":"Canvas ID","surface":"action","condition":{"field":"operation","value":"revoke_canvas_access"},"required":true},{"id":"slack_revoke_canvas_access_user_ids","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_canvas_access"},"required":false},{"id":"slack_revoke_canvas_access_channel_ids","type":"code","valueKind":"json","storage":"native","title":"Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"revoke_canvas_access"},"required":false},{"id":"slack_join_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"join_conversation"},"required":true},{"id":"slack_leave_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"leave_conversation"},"required":true},{"id":"slack_kick_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"kick_conversation"},"required":true},{"id":"slack_kick_conversation_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","surface":"action","condition":{"field":"operation","value":"kick_conversation"},"required":true},{"id":"slack_unarchive_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"unarchive_conversation"},"required":true},{"id":"slack_close_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"close_conversation"},"required":true},{"id":"slack_mark_conversation_read_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"mark_conversation_read"},"required":true},{"id":"slack_mark_conversation_read_ts","type":"short-input","valueKind":"string","storage":"native","title":"Read Through Timestamp","surface":"action","condition":{"field":"operation","value":"mark_conversation_read"},"required":true},{"id":"slack_open_conversation_users","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_open_conversation_channel","type":"short-input","valueKind":"string","storage":"native","title":"Conversation ID","surface":"action","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_open_conversation_prevent_creation","type":"switch","valueKind":"boolean","storage":"native","title":"Only Resume Existing Conversation","mode":"advanced","surface":"action","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_open_conversation_return_im","type":"switch","valueKind":"boolean","storage":"native","title":"Include Conversation Details","mode":"advanced","surface":"action","condition":{"field":"operation","value":"open_conversation"},"required":false},{"id":"slack_lookup_user_by_email_email","type":"short-input","valueKind":"string","storage":"native","title":"Email","surface":"action","condition":{"field":"operation","value":"lookup_user_by_email"},"required":true},{"id":"slack_list_user_conversations_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_types","type":"short-input","valueKind":"string","storage":"native","title":"Conversation Types","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_exclude_archived","type":"switch","valueKind":"boolean","storage":"native","title":"Exclude Archived","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_exclude_muted","type":"switch","valueKind":"boolean","storage":"native","title":"Exclude Muted","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_limit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_list_user_conversations_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_conversations"},"required":false},{"id":"slack_get_user_profile_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_user_profile"},"required":false},{"id":"slack_get_user_profile_include_labels","type":"switch","valueKind":"boolean","storage":"native","title":"Include Custom Field Labels","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_user_profile"},"required":false},{"id":"slack_set_user_presence_presence","type":"dropdown","valueKind":"string","storage":"native","title":"Presence","surface":"action","valueDefault":{"constant":"auto"},"condition":{"field":"operation","value":"set_user_presence"},"required":true,"options":[{"id":"auto"},{"id":"away"}]},{"id":"slack_get_file_info_file","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","condition":{"field":"operation","value":"get_file_info"},"required":true},{"id":"slack_get_file_info_cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_file_info"},"required":false},{"id":"slack_get_file_info_limit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_file_info"},"required":false},{"id":"slack_list_files_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_types","type":"short-input","valueKind":"string","storage":"native","title":"File Types","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_ts_from","type":"short-input","valueKind":"string","storage":"native","title":"From Timestamp","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_ts_to","type":"short-input","valueKind":"string","storage":"native","title":"To Timestamp","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_page","type":"short-input","valueKind":"string","storage":"native","title":"Page","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_count","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_show_files_hidden_by_limit","type":"switch","valueKind":"boolean","storage":"native","title":"Include Files Hidden by Plan Limit","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_list_files_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_files"},"required":false},{"id":"slack_delete_file_file","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","condition":{"field":"operation","value":"delete_file"},"required":true},{"id":"slack_get_reactions_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_timestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_file","type":"short-input","valueKind":"string","storage":"native","title":"File ID","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_file_comment","type":"short-input","valueKind":"string","storage":"native","title":"File Comment ID","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_get_reactions_full","type":"switch","valueKind":"boolean","storage":"native","title":"Include All Reacting Users","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_reactions"},"required":false},{"id":"slack_list_reactions_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_full","type":"switch","valueKind":"boolean","storage":"native","title":"Include All Reacting Users","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_limit","type":"short-input","valueKind":"string","storage":"native","title":"Page Size","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_list_reactions_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_reactions"},"required":false},{"id":"slack_pin_message_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"pin_message"},"required":true},{"id":"slack_pin_message_timestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"pin_message"},"required":true},{"id":"slack_unpin_message_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"unpin_message"},"required":true},{"id":"slack_unpin_message_timestamp","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"unpin_message"},"required":true},{"id":"slack_list_pins_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"list_pins"},"required":true},{"id":"slack_add_bookmark_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":true},{"id":"slack_add_bookmark_title","type":"short-input","valueKind":"string","storage":"native","title":"Title","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":true},{"id":"slack_add_bookmark_link","type":"short-input","valueKind":"string","storage":"native","title":"Link URL","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":true},{"id":"slack_add_bookmark_emoji","type":"short-input","valueKind":"string","storage":"native","title":"Emoji","mode":"advanced","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":false},{"id":"slack_add_bookmark_parent_id","type":"short-input","valueKind":"string","storage":"native","title":"Parent Bookmark ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"add_bookmark"},"required":false},{"id":"slack_edit_bookmark_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":true},{"id":"slack_edit_bookmark_bookmark_id","type":"short-input","valueKind":"string","storage":"native","title":"Bookmark ID","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":true},{"id":"slack_edit_bookmark_title","type":"short-input","valueKind":"string","storage":"native","title":"Title","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":false},{"id":"slack_edit_bookmark_link","type":"short-input","valueKind":"string","storage":"native","title":"Link URL","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":false},{"id":"slack_edit_bookmark_emoji","type":"short-input","valueKind":"string","storage":"native","title":"Emoji","surface":"action","condition":{"field":"operation","value":"edit_bookmark"},"required":false},{"id":"slack_list_bookmarks_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"list_bookmarks"},"required":true},{"id":"slack_remove_bookmark_channel_id","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"remove_bookmark"},"required":true},{"id":"slack_remove_bookmark_bookmark_id","type":"short-input","valueKind":"string","storage":"native","title":"Bookmark ID","surface":"action","condition":{"field":"operation","value":"remove_bookmark"},"required":true},{"id":"slack_create_user_group_name","type":"short-input","valueKind":"string","storage":"native","title":"Name","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":true},{"id":"slack_create_user_group_handle","type":"short-input","valueKind":"string","storage":"native","title":"Mention Handle","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_description","type":"short-input","valueKind":"string","storage":"native","title":"Description","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_channels","type":"code","valueKind":"json","storage":"native","title":"Default Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_additional_channels","type":"code","valueKind":"json","storage":"native","title":"Additional Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_enable_section","type":"switch","valueKind":"boolean","storage":"native","title":"Show as Sidebar Section","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_create_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"create_user_group"},"required":false},{"id":"slack_update_user_group_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":true},{"id":"slack_update_user_group_name","type":"short-input","valueKind":"string","storage":"native","title":"Name","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_handle","type":"short-input","valueKind":"string","storage":"native","title":"Mention Handle","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_description","type":"short-input","valueKind":"string","storage":"native","title":"Description","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_channels","type":"code","valueKind":"json","storage":"native","title":"Default Channel IDs","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_additional_channels","type":"code","valueKind":"json","storage":"native","title":"Additional Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_enable_section","type":"switch","valueKind":"boolean","storage":"native","title":"Show as Sidebar Section","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_update_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group"},"required":false},{"id":"slack_enable_user_group_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"enable_user_group"},"required":true},{"id":"slack_enable_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"enable_user_group"},"required":false},{"id":"slack_enable_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"enable_user_group"},"required":false},{"id":"slack_disable_user_group_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"disable_user_group"},"required":true},{"id":"slack_disable_user_group_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"disable_user_group"},"required":false},{"id":"slack_disable_user_group_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"disable_user_group"},"required":false},{"id":"slack_list_user_groups_include_disabled","type":"switch","valueKind":"boolean","storage":"native","title":"Include Disabled Groups","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_groups_include_users","type":"switch","valueKind":"boolean","storage":"native","title":"Include Members","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_groups_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_groups_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_groups"},"required":false},{"id":"slack_list_user_group_members_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"list_user_group_members"},"required":true},{"id":"slack_list_user_group_members_include_disabled","type":"switch","valueKind":"boolean","storage":"native","title":"Include Disabled Users","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_group_members"},"required":false},{"id":"slack_list_user_group_members_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"list_user_group_members"},"required":false},{"id":"slack_update_user_group_members_usergroup","type":"short-input","valueKind":"string","storage":"native","title":"User Group ID","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":true},{"id":"slack_update_user_group_members_users","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group_members"},"required":true},{"id":"slack_update_user_group_members_additional_channels","type":"code","valueKind":"json","storage":"native","title":"Additional Channel IDs","mode":"advanced","surface":"action","language":"json","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_update_user_group_members_is_shared","type":"switch","valueKind":"boolean","storage":"native","title":"Shared Section","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_update_user_group_members_include_count","type":"switch","valueKind":"boolean","storage":"native","title":"Include Member Count","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_update_user_group_members_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"update_user_group_members"},"required":false},{"id":"slack_get_dnd_info_user","type":"short-input","valueKind":"string","storage":"native","title":"User ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_dnd_info"},"required":false},{"id":"slack_get_dnd_info_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_dnd_info"},"required":false},{"id":"slack_get_team_dnd_info_users","type":"code","valueKind":"json","storage":"native","title":"User IDs","surface":"action","language":"json","condition":{"field":"operation","value":"get_team_dnd_info"},"required":true},{"id":"slack_get_team_dnd_info_team_id","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_team_dnd_info"},"required":false},{"id":"slack_get_team_info_team","type":"short-input","valueKind":"string","storage":"native","title":"Workspace ID","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_team_info"},"required":false},{"id":"slack_get_team_info_domain","type":"short-input","valueKind":"string","storage":"native","title":"Workspace Domain","mode":"advanced","surface":"action","condition":{"field":"operation","value":"get_team_info"},"required":false},{"id":"slack_get_team_profile_visibility","type":"dropdown","valueKind":"string","storage":"native","title":"Visibility","surface":"action","valueDefault":{"constant":"all"},"condition":{"field":"operation","value":"get_team_profile"},"required":false,"options":[{"id":"all"},{"id":"visible"},{"id":"hidden"}]},{"id":"slack_unfurl_links_channel","type":"short-input","valueKind":"string","storage":"native","title":"Channel ID","surface":"action","condition":{"field":"operation","value":"unfurl_links"},"required":true},{"id":"slack_unfurl_links_ts","type":"short-input","valueKind":"string","storage":"native","title":"Message Timestamp","surface":"action","condition":{"field":"operation","value":"unfurl_links"},"required":true},{"id":"slack_unfurl_links_unfurls","type":"code","valueKind":"json","storage":"native","title":"Link Previews","surface":"action","language":"json","condition":{"field":"operation","value":"unfurl_links"},"required":true},{"trigger":"slack_oauth","start":0,"count":21}],"outputs":{"message":{"type":"json","description":"Complete message object with all properties: ts, text, user, channel, reactions, threads, files, attachments, blocks, stars, pins, and edit history"},"ts":{"type":"string","description":"Message timestamp returned by Slack API"},"channel":{"type":"string","description":"Channel identifier where message was sent"},"fileCount":{"type":"number","description":"Number of files uploaded (when files are attached)"},"files":{"type":"file[]","description":"Files attached to the message"},"messageTs":{"type":"string","description":"Timestamp of the ephemeral message (cannot be used to update or delete)"},"canvas_id":{"type":"string","description":"Canvas identifier for created canvases"},"title":{"type":"string","description":"Canvas title"},"canvas":{"type":"json","description":"Canvas file metadata returned by Slack"},"canvases":{"type":"json","description":"Array of canvas file objects returned by Slack"},"paging":{"type":"json","description":"Pagination information for listed canvases"},"sections":{"type":"json","description":"Canvas section IDs returned by Slack section lookup"},"ok":{"type":"boolean","description":"Whether Slack completed the operation"},"status":{"type":"string","description":"List export job status"},"agentStatus":{"type":"string","description":"Agent session status recorded by Slack"},"messages":{"type":"json","description":"Conversation messages"},"parentMessage":{"type":"json","description":"The thread parent message with all properties"},"replies":{"type":"json","description":"Array of reply messages in the thread (excluding the parent)"},"replyCount":{"type":"number","description":"Number of replies returned in this response"},"hasMore":{"type":"boolean","description":"Whether more thread messages or provider pages remain beyond the fetched window"},"pages":{"type":"number","description":"Number of provider pages fetched during a paginated read"},"threadTs":{"type":"string","description":"Thread timestamp an assistant status/title/prompts op was set on"},"permalink":{"type":"string","description":"Permalink URL to the message"},"channels":{"type":"json","description":"One page of accessible public and private channel objects, including conversation type and membership fields."},"count":{"type":"number","description":"Total number of items returned (channels, members, or users)"},"nextCursor":{"type":"string","description":"Continuation cursor; empty or null when finished"},"members":{"type":"json","description":"Array of user IDs who are members of the channel"},"users":{"type":"json","description":"User IDs or a map of user IDs to Do Not Disturb state"},"user":{"type":"json","description":"Detailed user object with properties: id, name, real_name, display_name, first_name, last_name, title, is_bot, is_admin, deleted, timezone, avatars, status"},"file":{"type":"file","description":"Downloaded file stored in execution files"},"content":{"type":"string","description":"Success message for update operation"},"metadata":{"type":"json","description":"Updated message metadata (legacy, use message object instead)"},"channelInfo":{"type":"json","description":"Detailed channel object with properties: id, name, is_private, is_archived, is_member, num_members, topic, purpose, created, creator"},"presence":{"type":"string","description":"User presence status: \"active\" or \"away\""},"online":{"type":"boolean","description":"Whether user has an active client connection (only available when checking own presence)"},"autoAway":{"type":"boolean","description":"Whether user was automatically set to away (only available when checking own presence)"},"manualAway":{"type":"boolean","description":"Whether user manually set themselves as away (only available when checking own presence)"},"connectionCount":{"type":"number","description":"Total number of active connections (only available when checking own presence)"},"lastActivity":{"type":"number","description":"Unix timestamp of last detected activity (only available when checking own presence)"},"view":{"type":"json","description":"View object with properties: id, team_id, type, title, submit, close, blocks, private_metadata, callback_id, external_id, state, hash, clear_on_close, notify_on_close, root_view_id, previous_view_id, app_id, bot_id"},"errors":{"type":"json","description":"Array of per-user error objects when force is true and some invitations failed (user, ok, error)"},"scheduledMessageId":{"type":"string","description":"Identifier of the scheduled message (used to delete it before it posts)"},"postAt":{"type":"number","description":"Unix timestamp when a scheduled message will post"},"scheduledMessages":{"type":"json","description":"Array of pending scheduled message objects with properties: id, channel_id, post_at, date_created, text"},"purpose":{"type":"string","description":"The purpose/description that was set on the channel"},"event_type":{"type":"string","description":"Type of Slack event that triggered the workflow"},"subtype":{"type":"string","description":"Message subtype (e.g., channel_join, channel_leave, bot_message). Null for regular user messages"},"channel_name":{"type":"string","description":"Human-readable channel name"},"channel_type":{"type":"string","description":"Type of channel (e.g., channel, group, im, mpim)"},"user_name":{"type":"string","description":"Username who triggered the event"},"bot_id":{"type":"string","description":"Bot ID if the message was sent by a bot. Null for human users"},"timestamp":{"type":"string","description":"Message timestamp from the triggering event"},"thread_ts":{"type":"string","description":"Parent thread timestamp (if message is in a thread)"},"team_id":{"type":"string","description":"Slack workspace/team ID"},"event_id":{"type":"string","description":"Unique event identifier for the trigger"},"profile":{"type":"json","description":"User profile or workspace custom profile fields"},"usergroups":{"type":"json","description":"User groups"},"usergroup":{"type":"json","description":"Created or updated user group"},"bookmarks":{"type":"json","description":"Channel bookmarks"},"bookmark":{"type":"json","description":"Created or edited bookmark"},"emoji":{"type":"json","description":"Custom emoji names mapped to image URLs or aliases"},"team":{"type":"json","description":"Workspace details"},"job_id":{"type":"string","description":"List export job ID"},"download_url":{"type":"string","description":"List export download URL when ready"},"response_metadata":{"type":"json","description":"Pagination metadata including next_cursor"},"dnd_enabled":{"type":"boolean","description":"Whether Do Not Disturb is enabled"},"next_dnd_start_ts":{"type":"number","description":"Next Do Not Disturb start timestamp"},"next_dnd_end_ts":{"type":"number","description":"Next Do Not Disturb end timestamp"},"snooze_enabled":{"type":"boolean","description":"Whether notification snooze is enabled"},"snooze_endtime":{"type":"number","description":"Snooze end timestamp"},"snooze_remaining":{"type":"number","description":"Seconds remaining in snooze"},"snooze_is_indefinite":{"type":"boolean","description":"Whether snooze is indefinite"},"type":{"type":"string","description":"Type of reacted-to item"},"comment":{"type":"json","description":"File comment with reactions"},"comments":{"type":"json","description":"File comments (id, comment, user, created, timestamp)"},"fileMetadata":{"type":"json","description":"Slack file metadata (id, name, title, mimetype, permalink)"},"conversation":{"type":"json","description":"Opened or joined conversation details (id, name, is_im, is_mpim)"},"listId":{"type":"string","description":"Created List ID"},"schema":{"type":"json","description":"Created column schema (id, key, name, type, options); null when Slack omits it"},"list":{"type":"json","description":"List metadata (id, title, schema); null when not included"},"items":{"type":"json","description":"List rows, pinned items, or reacted-to items, depending on the operation"},"item":{"type":"json","description":"One row (id, list_id, fields, timestamps, parent_record_id)"}}},"start_trigger":{"type":"start_trigger","name":"Start","category":"triggers","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":false,"errorPort":false,"container":null,"annotationOnly":false},"triggerAllowed":true,"triggers":{"enabled":true,"available":["chat","manual","api"]},"dynamicOutputs":{"source":"inputFormat","param":"inputFormat"},"subBlocks":[{"id":"inputFormat","type":"input-format","valueKind":"array","storage":"native","structured":"inputFormat","title":"Inputs"},{"id":"runMetadata","type":"switch","valueKind":"boolean","storage":"native","title":"Add run metadata","mode":"advanced","defaultValue":false}],"outputs":{}},"table_v2":{"type":"table_v2","name":"Table","category":"blocks","tools":{"access":["table_insert_row","table_batch_insert_rows","table_upsert_row","table_update_row","table_update_rows_by_filter","table_delete_row","table_delete_rows_by_filter","table_query_rows_v2","table_get_row","table_get_schema"],"selector":"operation"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"triggers":{"enabled":true,"available":["table_new_row"]},"subBlocks":[{"id":"operation","type":"dropdown","valueKind":"string","storage":"native","title":"Operation","surface":"action","valueDefault":{"constant":"query_rows"},"options":[{"id":"query_rows","label":"Query Rows"},{"id":"insert_row","label":"Insert Row"},{"id":"upsert_row","label":"Upsert Row"},{"id":"batch_insert_rows","label":"Batch Insert Rows"},{"id":"update_rows_by_filter","label":"Update Rows by Filter"},{"id":"delete_rows_by_filter","label":"Delete Rows by Filter"},{"id":"update_row","label":"Update Row by ID"},{"id":"delete_row","label":"Delete Row by ID"},{"id":"get_row","label":"Get Row by ID"},{"id":"get_schema","label":"Get Schema"}]},{"id":"tableSelector","type":"table-selector","valueKind":"resource","storage":"native","resourceKind":"table","title":"Table","mode":"basic","canonicalParamId":"tableId","surface":"action","required":true},{"id":"manualTableId","type":"short-input","valueKind":"string","storage":"native","title":"Table ID","mode":"advanced","canonicalParamId":"tableId","surface":"action","required":true},{"id":"outputColumns","type":"dropdown","valueKind":"array","storage":"native","title":"Columns to Return","surface":"action","dependsOn":{"all":[],"any":["tableSelector","manualTableId"]},"multiple":true,"selectorKey":"table.outputColumns","condition":{"field":"operation","value":"query_rows"},"options":{"dynamic":true}},{"id":"rowId","type":"short-input","valueKind":"string","storage":"native","title":"Row ID","surface":"action","dependsOn":{"all":["tableId"],"any":[]},"condition":{"field":"operation","value":["get_row","update_row","delete_row"]},"required":true},{"id":"data","type":"code","valueKind":"json","storage":"native","title":"Row Data (JSON)","surface":"action","language":"json","condition":{"field":"operation","value":["insert_row","upsert_row","update_row","update_rows_by_filter"]},"required":true},{"id":"conflictColumnSelector","type":"column-selector","valueKind":"picked","storage":"native","title":"Conflict Column","mode":"basic","canonicalParamId":"conflictColumn","surface":"action","dependsOn":{"all":["tableSelector"],"any":[]},"selectorKey":"table.columns","condition":{"field":"operation","value":"upsert_row"},"options":{"dynamic":true}},{"id":"manualConflictColumn","type":"short-input","valueKind":"string","storage":"native","title":"Conflict Column","mode":"advanced","canonicalParamId":"conflictColumn","surface":"action","dependsOn":{"all":["tableId"],"any":[]},"condition":{"field":"operation","value":"upsert_row"}},{"id":"rows","type":"code","valueKind":"json","storage":"native","title":"Rows Data (Array of JSON)","surface":"action","language":"json","condition":{"field":"operation","value":"batch_insert_rows"},"required":true},{"id":"filterBuilder","type":"filter-builder","valueKind":"json","storage":"native","title":"Filter","mode":"basic","canonicalParamId":"filterInput","surface":"action","paramVisibility":"user-only","condition":{"field":"operation","value":{"list":15}}},{"id":"filter","type":"code","valueKind":"json","storage":"native","title":"Filter","mode":"advanced","canonicalParamId":"filterInput","surface":"action","language":"json","condition":{"field":"operation","value":{"list":15}}},{"id":"sortBuilder","type":"sort-builder","valueKind":"json","storage":"native","title":"Order","mode":"basic","canonicalParamId":"sortInput","surface":"action","paramVisibility":"user-only","condition":{"field":"operation","value":"query_rows"}},{"id":"order","type":"short-input","valueKind":"string","storage":"native","title":"Order","mode":"advanced","canonicalParamId":"sortInput","surface":"action","condition":{"field":"operation","value":"query_rows"}},{"id":"limit","type":"short-input","valueKind":"string","storage":"native","title":"Limit","surface":"action","condition":{"field":"operation","value":{"list":15}}},{"id":"cursor","type":"short-input","valueKind":"string","storage":"native","title":"Cursor","surface":"action","condition":{"field":"operation","value":"query_rows"}},{"trigger":"table_new_row","start":0,"count":6}],"outputs":{"success":{"type":"boolean","description":"Operation success status"},"row":{"type":"json","description":"Single row data","condition":{"field":"operation","value":["get_row","insert_row","upsert_row","update_row"]}},"operation":{"type":"string","description":"Operation performed (insert or update)","condition":{"field":"operation","value":"upsert_row"}},"rows":{"type":"array","description":"Array of rows","condition":{"field":"operation","value":["query_rows","batch_insert_rows"]}},"rowCount":{"type":"number","description":"Rows returned (query) or total rows in the table (get schema)","condition":{"field":"operation","value":["query_rows","get_schema"]}},"totalCount":{"type":"number","description":"Total rows matching the predicate (first page only)","condition":{"field":"operation","value":"query_rows"}},"nextCursor":{"type":"string","description":"Cursor to fetch the next page, or null on the last page","condition":{"field":"operation","value":"query_rows"}},"insertedCount":{"type":"number","description":"Number of rows inserted","condition":{"field":"operation","value":"batch_insert_rows"}},"updatedCount":{"type":"number","description":"Number of rows updated","condition":{"field":"operation","value":"update_rows_by_filter"}},"updatedRowIds":{"type":"array","description":"IDs of updated rows","condition":{"field":"operation","value":"update_rows_by_filter"}},"deletedCount":{"type":"number","description":"Number of rows deleted","condition":{"field":"operation","value":["delete_row","delete_rows_by_filter"]}},"deletedRowIds":{"type":"array","description":"IDs of deleted rows","condition":{"field":"operation","value":"delete_rows_by_filter"}},"name":{"type":"string","description":"Table name","condition":{"field":"operation","value":"get_schema"}},"columns":{"type":"array","description":"Column definitions (each includes its stable id)","condition":{"field":"operation","value":"get_schema"}},"columnCount":{"type":"number","description":"Number of columns","condition":{"field":"operation","value":"get_schema"}},"maxRows":{"type":"number","description":"Max rows per table for the workspace's plan","condition":{"field":"operation","value":"get_schema"}},"message":{"type":"string","description":"Operation status message"}}},"variables":{"type":"variables","name":"Variables","category":"blocks","tools":{"access":[],"selector":"single"},"graph":{"canBeTarget":true,"errorPort":true,"container":null,"annotationOnly":false},"subBlocks":[{"id":"variables","type":"variables-input","valueKind":"array","storage":"native","structured":"variables","title":"Variable Assignments","required":false}],"outputs":{}}},"triggers":{"generic_webhook":{"id":"generic_webhook","provider":"generic","name":"Webhook Trigger","webhook":true,"subBlocks":[{"id":"webhookUrlDisplay","type":"short-input","valueKind":"none","storage":"native","title":"Webhook URL","mode":"trigger","readOnly":true},{"id":"requireAuth","type":"switch","valueKind":"boolean","storage":"native","title":"Require Authentication","mode":"trigger","defaultValue":true},{"id":"token","type":"short-input","valueKind":"string","storage":"native","title":"Authentication Token","mode":"trigger","valueDefault":{"computed":true},"password":true,"required":false},{"id":"secretHeaderName","type":"short-input","valueKind":"string","storage":"native","title":"Secret Header Name (Optional)","mode":"trigger","required":false},{"id":"acceptOtherMethods","type":"switch","valueKind":"boolean","storage":"native","title":"Accept Other HTTP Methods","mode":"trigger","defaultValue":false},{"id":"exposeRequestHeaders","type":"switch","valueKind":"boolean","storage":"native","title":"Expose Request Headers","mode":"trigger","defaultValue":false},{"id":"idempotencyField","type":"short-input","valueKind":"string","storage":"native","title":"Deduplication Field (Optional)","mode":"trigger","required":false},{"id":"responseMode","type":"dropdown","valueKind":"string","storage":"native","title":"Acknowledgement","mode":"trigger","defaultValue":"default","options":[{"id":"default","label":"Default"},{"id":"custom","label":"Custom"}]},{"id":"verifyTestEvents","type":"switch","valueKind":"boolean","storage":"native","title":"Verify Test Events","mode":"trigger","defaultValue":false},{"id":"responseStatusCode","type":"short-input","valueKind":"string","storage":"native","title":"Response Status Code","mode":"trigger","condition":{"field":"responseMode","value":"custom"},"required":false},{"id":"responseBody","type":"code","valueKind":"json","storage":"native","title":"Response Body","mode":"trigger","language":"json","condition":{"field":"responseMode","value":"custom"},"required":false},{"id":"inputFormat","type":"input-format","valueKind":"array","storage":"native","structured":"inputFormat","title":"Input Format","mode":"trigger"},{"shared":0},{"id":"samplePayload_generic_webhook","type":"code","valueKind":"none","storage":"native","title":"Event Payload Example","mode":"trigger","readOnly":true,"language":"json","condition":{"field":"selectedTriggerId","value":"generic_webhook"}}],"outputs":{}},"gmail_poller":{"id":"gmail_poller","provider":"gmail","name":"Gmail Email Trigger","polling":true,"subBlocks":[{"id":"triggerCredentials","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Credentials","mode":"trigger","canonicalParamId":"oauthCredential","serviceId":"gmail","required":true},{"id":"labelIds","type":"dropdown","valueKind":"array","storage":"native","title":"Gmail Labels to Monitor","mode":"trigger","dependsOn":{"all":["triggerCredentials"],"any":[]},"multiple":true,"selectorKey":"gmail.labels","required":false,"options":{"dynamic":true}},{"id":"labelFilterBehavior","type":"dropdown","valueKind":"string","storage":"native","title":"Label Filter Behavior","mode":"trigger","defaultValue":"INCLUDE","required":true,"options":[{"id":"INCLUDE"},{"id":"EXCLUDE"}]},{"id":"searchQuery","type":"short-input","valueKind":"string","storage":"native","title":"Gmail Search Query","mode":"trigger","required":false},{"id":"markAsRead","type":"switch","valueKind":"boolean","storage":"native","title":"Mark as Read","mode":"trigger","defaultValue":false,"required":false},{"id":"includeAttachments","type":"switch","valueKind":"boolean","storage":"native","title":"Include Attachments","mode":"trigger","defaultValue":false,"required":false},{"shared":0},{"id":"samplePayload_gmail_poller","type":"code","valueKind":"none","storage":"native","title":"Event Payload Example","mode":"trigger","readOnly":true,"language":"json","condition":{"field":"selectedTriggerId","value":"gmail_poller"}}],"outputs":{"email":{"type":"json","properties":{"id":{"type":"string","description":"Gmail message ID"},"threadId":{"type":"string","description":"Gmail thread ID"},"subject":{"type":"string","description":"Email subject line"},"from":{"type":"string","description":"Sender email address"},"to":{"type":"string","description":"Recipient email address"},"cc":{"type":"string","description":"CC recipients"},"bcc":{"type":"string","description":"BCC recipients (only present on messages you sent)"},"replyTo":{"type":"string","description":"Reply-To header"},"rfcMessageId":{"type":"string","description":"RFC Message-ID header (not the Gmail message ID)"},"inReplyTo":{"type":"string","description":"In-Reply-To header (RFC Message-ID of the parent message)"},"references":{"type":"string","description":"References header (RFC Message-IDs in the thread)"},"snippet":{"type":"string","description":"Short excerpt of the message text"},"date":{"type":"string","description":"Email date in ISO format"},"bodyText":{"type":"string","description":"Plain text email body"},"bodyHtml":{"type":"string","description":"HTML email body"},"labels":{"type":"array","description":"Email labels array"},"hasAttachments":{"type":"boolean","description":"Whether email has attachments"},"attachments":{"type":"file[]","description":"Array of email attachments as files (if includeAttachments is enabled)"}}},"timestamp":{"type":"string","description":"Event timestamp"}}},"slack_oauth":{"id":"slack_oauth","provider":"slack_app","name":"Slack","webhook":true,"subBlocks":[{"id":"eventType","type":"dropdown","valueKind":"string","storage":"native","title":"Event","mode":"trigger","required":true,"options":[{"id":"message","label":"Message"},{"id":"app_mention","label":"App mentioned"},{"id":"reaction_added","label":"Reaction added"},{"id":"reaction_removed","label":"Reaction removed"},{"id":"message_edited","label":"Message edited"},{"id":"message_deleted","label":"Message deleted"},{"id":"file_shared","label":"File shared"},{"id":"member_joined_channel","label":"Member joined channel"},{"id":"member_left_channel","label":"Member left channel"},{"id":"channel_created","label":"Channel created"},{"id":"channel_archive","label":"Channel archived"},{"id":"channel_rename","label":"Channel renamed"},{"id":"pin_added","label":"Pin added"},{"id":"pin_removed","label":"Pin removed"},{"id":"team_join","label":"Member joined workspace"},{"id":"app_home_opened","label":"App home opened"},{"id":"agent_session_stopped","label":"Agent session stopped"},{"id":"agent_session_title_changed","label":"Agent session title changed"},{"id":"app_context_changed","label":"Agent context changed"},{"id":"assistant_thread_started","label":"Assistant opened"},{"id":"assistant_thread_context_changed","label":"Assistant context changed"},{"id":"block_actions","label":"Button / select clicked"},{"id":"view_submission","label":"Modal submitted"},{"id":"slash_command","label":"Slash command"}]},{"id":"customBotCredential","type":"oauth-input","valueKind":"resource","storage":"native","resourceKind":"credential","title":"Custom Bot","mode":"trigger","canonicalParamId":"botCredential","serviceId":"slack","required":true},{"id":"manualBotCredential","type":"short-input","valueKind":"string","storage":"native","title":"Bot Credential ID","mode":"trigger-advanced","canonicalParamId":"botCredential","required":true},{"id":"source","type":"dropdown","valueKind":"array","storage":"native","title":"Source","mode":"trigger","multiple":true,"condition":{"field":"eventType","value":["message","message_edited","message_deleted"]},"required":false,"options":[{"id":"im","label":"Direct message"},{"id":"channel","label":"Public channel"},{"id":"group","label":"Private channel"}]},{"id":"channelFilter","type":"channel-selector","valueKind":"picked","storage":"native","title":"Channels","mode":"trigger","canonicalParamId":"channelFilter","dependsOn":{"all":["customBotCredential"],"any":[]},"multiple":true,"selectorKey":"slack.channels","serviceId":"slack","condition":{"field":"eventType","value":{"list":16}},"required":false,"options":{"dynamic":true}},{"id":"manualChannelFilter","type":"short-input","valueKind":"string","storage":"native","title":"Channel IDs","mode":"trigger-advanced","canonicalParamId":"channelFilter","condition":{"field":"eventType","value":{"list":16}},"required":false},{"id":"threads","type":"dropdown","valueKind":"string","storage":"native","title":"Threads","mode":"trigger","valueDefault":{"constant":"include"},"condition":{"field":"eventType","value":{"list":17}},"required":false,"options":[{"id":"include","label":"Messages and replies"},{"id":"exclude","label":"Messages only (no replies)"},{"id":"only","label":"Replies only"}]},{"id":"streamResponse","type":"switch","valueKind":"boolean","storage":"native","title":"Enable agent session","mode":"trigger","defaultValue":false,"condition":{"field":"eventType","value":{"list":17}},"required":false},{"id":"streamOutputs","type":"workflow-output-selector","valueKind":"none","storage":"native","title":"Outputs to stream","mode":"trigger","condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}}},{"id":"streamTaskTitle","type":"short-input","valueKind":"string","storage":"native","title":"Response status label","mode":"trigger","condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false},{"id":"streamTaskDisplayMode","type":"dropdown","valueKind":"string","storage":"native","title":"Task display","mode":"trigger","valueDefault":{"constant":"timeline"},"condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false,"options":[{"id":"timeline","label":"Timeline"},{"id":"plan","label":"Plan"}]},{"id":"streamIncludeThinking","type":"switch","valueKind":"boolean","storage":"native","title":"Include thinking updates","mode":"trigger","defaultValue":false,"condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false},{"id":"streamIncludeToolCalls","type":"switch","valueKind":"boolean","storage":"native","title":"Include tool calls","mode":"trigger","defaultValue":true,"condition":{"field":"streamResponse","value":true,"and":{"field":"eventType","value":{"list":17}}},"required":false},{"id":"emoji","type":"short-input","valueKind":"string","storage":"native","title":"Emoji","mode":"trigger","condition":{"field":"eventType","value":["reaction_added","reaction_removed"]},"required":false},{"id":"nameContains","type":"short-input","valueKind":"string","storage":"native","title":"Name contains","mode":"trigger","condition":{"field":"eventType","value":["channel_created"]},"required":false},{"id":"interactionFilter","type":"short-input","valueKind":"string","storage":"native","title":"Action / Callback ID","mode":"trigger","condition":{"field":"eventType","value":["block_actions","view_submission"]},"required":false},{"id":"commandFilter","type":"short-input","valueKind":"string","storage":"native","title":"Command","mode":"trigger","condition":{"field":"eventType","value":["slash_command"]},"required":false},{"id":"filterBotMessages","type":"switch","valueKind":"boolean","storage":"native","title":"Ignore bot messages","mode":"trigger","defaultValue":true,"condition":{"field":"eventType","value":{"list":17}},"required":false},{"id":"includeOwnMessages","type":"switch","valueKind":"boolean","storage":"native","title":"Include own bot messages","mode":"trigger-advanced","defaultValue":false,"condition":{"field":"eventType","value":["message","app_mention","reaction_added","reaction_removed"]},"required":false},{"id":"includeFiles","type":"switch","valueKind":"boolean","storage":"native","title":"Include file attachments","mode":"trigger","defaultValue":false,"condition":{"field":"eventType","value":"message"},"required":false},{"id":"samplePayload_slack_oauth","type":"code","valueKind":"none","storage":"native","title":"Event Payload Example","mode":"trigger","readOnly":true,"language":"json","condition":{"field":"selectedTriggerId","value":"slack_oauth"}}],"outputs":{"event":{"type":"json","description":"Slack event data","properties":{"event_type":{"type":"string","description":"Type of Slack payload: an Events API event (e.g., app_mention, message), an interactivity type (e.g., block_actions), or \"slash_command\" for slash commands"},"subtype":{"type":"string","description":"Message subtype (e.g., channel_join, channel_leave, bot_message, file_share). Null for regular user messages"},"channel":{"type":"string","description":"Slack channel ID where the event occurred"},"channel_name":{"type":"string","description":"Human-readable channel name"},"channel_type":{"type":"string","description":"Type of channel (e.g., channel, group, im, mpim). Useful for distinguishing DMs from public channels"},"user":{"type":"string","description":"User ID who triggered the event"},"user_name":{"type":"string","description":"Username who triggered the event"},"bot_id":{"type":"string","description":"Bot ID if the message was sent by a bot. Null for human users"},"text":{"type":"string","description":"Message text content. For slash commands, the text after the command. For interactivity, the source message text (falls back to the triggering action value)"},"timestamp":{"type":"string","description":"Message timestamp from the triggering event"},"thread_ts":{"type":"string","description":"Parent thread timestamp (if message is in a thread)"},"streaming_message_ts":{"type":"array","description":"Message timestamps streamed during a stopped agent session","items":{"type":"string","description":"Streaming message timestamp"}},"title":{"type":"string","description":"Current agent session title"},"previous_title":{"type":"string","description":"Previous agent session title"},"tab":{"type":"string","description":"App Home tab that was opened, including messages for Agent View"},"context":{"type":"json","description":"Current Agent View context. Normalized from context on app_context_changed/app_home_opened or app_context on message.im"},"team_id":{"type":"string","description":"Slack workspace/team ID"},"user_team_id":{"type":"string","description":"Slack workspace/team ID of the user who triggered the event. Used for Slack Connect response streaming."},"enterprise_id":{"type":"string","description":"Slack Enterprise Grid organization ID"},"event_id":{"type":"string","description":"Unique event identifier"},"reaction":{"type":"string","description":"Emoji reaction name (e.g., thumbsup). Present for reaction_added/reaction_removed events"},"item_user":{"type":"string","description":"User ID of the original message author. Present for reaction_added/reaction_removed events"},"command":{"type":"string","description":"Slash command name including the leading slash (e.g., /deploy). Present for slash commands"},"action_id":{"type":"string","description":"action_id of the first interactive element triggered. Present for block_actions (button/select clicks)"},"action_value":{"type":"string","description":"Value carried by the first interactive element (button value, selected option, date, etc.). Present for block_actions"},"actions":{"type":"json","description":"Full array of interactive actions from the payload, preserving every element and its value. Present for block_actions"},"response_url":{"type":"string","description":"Temporary URL to post a response back to the originating message or command. Present for interactivity and slash commands"},"trigger_id":{"type":"string","description":"Short-lived trigger ID used to open a modal in response. Present for interactivity and slash commands"},"callback_id":{"type":"string","description":"Callback ID of the shortcut or view. Present for shortcuts and modal submissions"},"api_app_id":{"type":"string","description":"Slack app ID. Present for interactivity and slash commands"},"app_id":{"type":"string","description":"App ID of the app that produced the event (e.g. the bot that posted a message). Used to identify the app's own output"},"message_ts":{"type":"string","description":"Timestamp of the message the interaction originated from. Present for block_actions"},"view":{"type":"json","description":"Full Slack view object for modal interactions: state.values (submitted input values), private_metadata, id, callback_id, and hash. Present for view_submission/view_closed; null otherwise"},"message":{"type":"json","description":"Full source message object the interaction came from, including its blocks and text. Present for block_actions on a message; null otherwise"},"state":{"type":"json","description":"Current values of all stateful elements in the surface (state.values) at the time of a block action — e.g. inputs read on a button click. Present for block_actions; null otherwise"},"hasFiles":{"type":"boolean","description":"Whether the message has file attachments"},"files":{"type":"file[]","description":"File attachments downloaded from the message (if includeFiles is enabled and bot token is provided)"}}}}},"table_new_row":{"id":"table_new_row","provider":"table","name":"Table Trigger","subBlocks":[{"id":"tableSelector","type":"table-selector","valueKind":"resource","storage":"native","resourceKind":"table","title":"Table","mode":"trigger","canonicalParamId":"tableId","required":true},{"id":"manualTableId","type":"short-input","valueKind":"string","storage":"native","title":"Table ID","mode":"trigger-advanced","canonicalParamId":"tableId","required":true},{"id":"eventType","type":"dropdown","valueKind":"string","storage":"native","title":"Event","mode":"trigger","defaultValue":"insert","required":true,"options":[{"id":"insert","label":"Row Inserted"},{"id":"update","label":"Row Updated"},{"id":"delete","label":"Row Deleted"}]},{"id":"watchColumns","type":"dropdown","valueKind":"array","storage":"native","title":"Watch Columns","mode":"trigger","dependsOn":{"all":[],"any":["tableSelector","manualTableId"]},"multiple":true,"selectorKey":"table.columns","condition":{"field":"eventType","value":"update"},"required":false,"options":{"dynamic":true}},{"id":"includeHeaders","type":"switch","valueKind":"boolean","storage":"native","title":"Map Row Values to Headers","mode":"trigger","defaultValue":true,"required":false},{"shared":0}],"outputs":{"row":{"type":"json","description":"Row data mapped to column names (when header mapping is enabled)"},"rawRow":{"type":"json","description":"Raw row data object"},"previousRow":{"type":"json","description":"Previous row data before an update or deletion (null for inserts)"},"changedColumns":{"type":"json","description":"List of column names that changed (empty for inserts and deletes)"},"rowId":{"type":"string","description":"The unique row ID"},"headers":{"type":"json","description":"Column names from the table schema"},"tableId":{"type":"string","description":"The table ID"},"tableName":{"type":"string","description":"The table name"},"timestamp":{"type":"string","description":"Event timestamp in ISO format"}}}},"subBlocks":[{"id":"triggerInstructions","type":"text","valueKind":"none","storage":"native","title":"Setup Instructions","mode":"trigger"}],"lists":[["jev-latest","jev-1.13.0","jev-preview"],["deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025","jev-latest","jev-1.13.0","jev-preview"],["jev-latest","jev-1.13.0","jev-preview","deep-research-pro-preview-12-2025","vertex/deep-research-pro-preview-12-2025"],["conversation","sliding_window","sliding_window_tokens"],["send_gmail","draft_gmail","edit_draft_gmail"],["add_label_gmail","remove_label_gmail"],["update_label_gmail","delete_label_gmail"],["create_label_gmail","update_label_gmail"],["list_canvases","list_scheduled_messages","set_agent_suggested_prompts","set_agent_session_status","rename_agent_session","create_list","rename_list","share_list","list_items","get_list_item","create_list_item","update_list_items","delete_list_item"],["set_agent_suggested_prompts","set_agent_session_status","rename_agent_session"],["set_agent_session_status","rename_agent_session"],["create_list","rename_list","share_list","list_items","get_list_item","create_list_item","update_list_items","delete_list_item"],["create_list","rename_list"],["revoke_list_access","start_list_export","get_list_export","delete_list_items","join_conversation","lookup_user_by_email","get_user_profile","set_user_presence","pin_message","unpin_message","list_pins","add_bookmark","edit_bookmark","list_bookmarks","remove_bookmark","create_user_group","update_user_group","enable_user_group","disable_user_group","list_user_groups","list_user_group_members","update_user_group_members","get_dnd_info","get_team_dnd_info","list_emoji","get_team_info","get_team_profile","unfurl_links"],["share_canvas","revoke_canvas_access","leave_conversation","kick_conversation","unarchive_conversation","close_conversation","mark_conversation_read","open_conversation","list_user_conversations","get_file_info","list_files","delete_file","get_reactions","list_reactions"],["query_rows","update_rows_by_filter","delete_rows_by_filter"],["message","app_mention","reaction_added","reaction_removed","message_edited","message_deleted","file_shared","member_joined_channel","member_left_channel","channel_archive","channel_rename","pin_added","pin_removed"],["message","app_mention"]],"hash":"bb727c21e985e65d9db2621b30e34e8a734e2662cc6085f5c70b2cc2370cee40"} diff --git a/packages/workflow-code/src/print/__fixtures__/real-catalog.ts b/packages/workflow-code/src/print/__fixtures__/real-catalog.ts deleted file mode 100644 index 7d12187bef7..00000000000 --- a/packages/workflow-code/src/print/__fixtures__/real-catalog.ts +++ /dev/null @@ -1,19 +0,0 @@ -/** - * The real block catalog the printer goldens run against: the slice of `buildBlockCatalog` (the - * registry projection) their cases use, checked in as `real-catalog.json` because this package - * cannot import the registry. `apps/sim/lib/workflows/code/golden-catalog.test.ts` rebuilds it from - * the live registry and fails when it drifts. The hand-made `catalog.ts` stays for unit tests. - */ - -import type { BlockCatalog } from '../../catalog/types' -import snapshot from './real-catalog.json' - -/** JSON imports widen literal unions (`storage: string`), so the snapshot is checked, then typed. */ -function asCatalog(value: object): BlockCatalog { - if (!('catalogVersion' in value) || value.catalogVersion !== 1 || !('blocks' in value)) { - throw new Error('real-catalog.json is not a block catalog') - } - return value as BlockCatalog -} - -export const realCatalog: BlockCatalog = asCatalog(snapshot) diff --git a/packages/workflow-code/src/print/determinism.test.ts b/packages/workflow-code/src/print/determinism.test.ts deleted file mode 100644 index 5fb4d32fed5..00000000000 --- a/packages/workflow-code/src/print/determinism.test.ts +++ /dev/null @@ -1,112 +0,0 @@ -/** - * Print determinism over every golden case. Until the compiler lands this stands in for P3 - * (`print(compile(print(x))) === print(x)`): the same model prints the same bytes whatever the - * order of its records, the hints a print returns reproduce that print, and a one-param edit - * changes exactly one line. - */ - -import { describe, expect, it } from 'vitest' -import type { LockHints } from '../api' -import { editorDefaults } from '../catalog/defaults' -import { catalogBlock } from '../catalog/view' -import { executableInactiveParams } from '../equivalence/executable' -import type { CanonicalWorkflow } from '../model' -import { cases } from './__fixtures__/cases' -import { realCatalog as catalog } from './__fixtures__/real-catalog' -import { printWorkflow } from './printer' - -/** A deep copy of plain data: every CWM value is JSON (`model.ts`). */ -function clone(value: T): T { - if (Array.isArray(value)) return value.map(clone) as T - if (value !== null && typeof value === 'object') { - return Object.fromEntries(Object.entries(value).map(([key, item]) => [key, clone(item)])) as T - } - return value -} - -function print(workflow: CanonicalWorkflow, hints: LockHints | undefined) { - return printWorkflow({ workflow, catalog, hints, options: { functionCode: 'inline' } }) -} - -/** The same workflow with every record and list that has no semantic order reversed. */ -function reorder(workflow: CanonicalWorkflow): CanonicalWorkflow { - const copy = clone(workflow) - const reverseRecord = (record: Record) => - Object.fromEntries(Object.entries(record).reverse()) - copy.blocks = reverseRecord(copy.blocks) - for (const block of Object.values(copy.blocks)) { - block.params = reverseRecord(block.params) - block.modes = reverseRecord(block.modes) - } - copy.variables = reverseRecord(copy.variables) - copy.edges = [...copy.edges].reverse() - copy.annotations.inactive = reverseRecord(copy.annotations.inactive) - return copy -} - -const EDITABLE_TYPES = new Set(['short-input', 'long-input', 'combobox']) - -/** - * Every single-line, token-free text param a user could retype, as (block, param) pairs. Inactive - * params and values equal to the editor default are not printed, so editing one adds a line. - */ -function editableParams(workflow: CanonicalWorkflow): Array<[string, string]> { - const pairs: Array<[string, string]> = [] - for (const block of Object.values(workflow.blocks)) { - const declared = catalogBlock(catalog, block.type) - const subBlocks = declared?.subBlocks ?? [] - const inactive = new Set(executableInactiveParams(block, catalog)) - const defaults = declared ? editorDefaults(declared) : new Map() - for (const [id, param] of Object.entries(block.params)) { - if (param.kind !== 'value' || typeof param.value !== 'string') continue - if (inactive.has(id) || defaults.get(id) === param.value) continue - if (!/^[\w .:/-]+$/.test(param.value)) continue - const subBlock = subBlocks.find((candidate) => candidate.id === id) - if (subBlock && !EDITABLE_TYPES.has(subBlock.type)) continue - pairs.push([block.key, id]) - } - } - return pairs -} - -describe('print determinism', () => { - it('has enough single-line text params across the cases to exercise one-line edits', () => { - const total = cases.reduce((sum, testCase) => sum + editableParams(testCase.workflow).length, 0) - expect(total).toBeGreaterThan(40) - }) - - for (const testCase of cases) { - describe(testCase.name, () => { - const first = printWorkflow({ - workflow: testCase.workflow, - catalog, - hints: testCase.hints, - options: { functionCode: 'inline' }, - }) - const text = first.files[0].text - - it('prints byte-identical text for a reordered copy of the same model', () => { - expect(print(reorder(testCase.workflow), testCase.hints).files[0].text).toBe(text) - }) - - it('reprints identically from the hints its own print returned', () => { - expect(print(clone(testCase.workflow), first.hints).files[0].text).toBe(text) - }) - - it('changes exactly one line when one text param is edited', () => { - for (const [blockKey, paramId] of editableParams(testCase.workflow)) { - const edited = clone(testCase.workflow) - const param = edited.blocks[blockKey]?.params[paramId] - if (param?.kind !== 'value' || typeof param.value !== 'string') continue - const last = param.value.at(-1) - param.value = `${param.value.slice(0, -1)}${last === 'q' ? 'z' : 'q'}` - const before = text.split('\n') - const after = print(edited, first.hints).files[0].text.split('\n') - expect(after.length, `${blockKey}.${paramId}`).toBe(before.length) - const changed = after.filter((lineText, index) => lineText !== before[index]) - expect(changed, `${blockKey}.${paramId}`).toHaveLength(1) - } - }) - }) - } -}) diff --git a/packages/workflow-code/src/print/golden.test.ts b/packages/workflow-code/src/print/golden.test.ts deleted file mode 100644 index 2ebbe45bd1b..00000000000 --- a/packages/workflow-code/src/print/golden.test.ts +++ /dev/null @@ -1,123 +0,0 @@ -import { describe, expect, it } from 'vitest' -import { type CodeFileCodec, type CodeFileLanguage, codeFileCodec } from '../code-files' -import { cases } from './__fixtures__/cases' -import { realCatalog as catalog } from './__fixtures__/real-catalog' -import { createPrintWorkflow, printWorkflow } from './printer' - -const GOLDEN_DIR = './__golden__' - -/** A codec whose round trip adds a byte: the printer must fall back to inline code. */ -const lossyCodec: CodeFileCodec = { - toFile: (code) => code, - fromFile: (text) => `${text}\n`, -} - -describe('printWorkflow golden files', () => { - for (const testCase of cases) { - it(`prints ${testCase.name}`, async () => { - const result = printWorkflow({ - workflow: testCase.workflow, - catalog, - hints: testCase.hints, - options: { functionCode: 'inline' }, - }) - expect(result.files).toHaveLength(1) - await expect(result.files[0].text).toMatchFileSnapshot(`${GOLDEN_DIR}/${testCase.name}.txt`) - }) - } - - /** `source get --verbose`: the preserved UI state a lean print leaves to apply. */ - const VERBOSE_CASES = [ - 'support-triage', - 'pair-modes', - 'inactive-values', - 'loop-foreach', - 'nested-subflows', - ] - for (const name of VERBOSE_CASES) { - it(`prints ${name} verbosely`, async () => { - const testCase = cases.find((candidate) => candidate.name === name) - if (!testCase) throw new Error(`missing case ${name}`) - const result = printWorkflow({ - workflow: testCase.workflow, - catalog, - hints: testCase.hints, - options: { functionCode: 'inline', verbose: true }, - }) - await expect(result.files[0].text).toMatchFileSnapshot(`${GOLDEN_DIR}/${name}.verbose.txt`) - }) - } - - it('reports the diagnostics each golden case produces', async () => { - const report = Object.fromEntries( - cases.map((testCase) => { - const { diagnostics } = printWorkflow({ - workflow: testCase.workflow, - catalog, - hints: testCase.hints, - options: { functionCode: 'inline' }, - }) - return [ - testCase.name, - diagnostics.map((d) => `${d.code} ${d.blockKey ?? '-'}: ${d.message}`), - ] - }) - ) - await expect(`${JSON.stringify(report, null, 2)}\n`).toMatchFileSnapshot( - `${GOLDEN_DIR}/diagnostics.json` - ) - }) - - it('writes function code to language files through the code-files codec by default', async () => { - const testCase = cases.find((c) => c.name === 'function-languages') - if (!testCase) throw new Error('missing case') - const result = printWorkflow({ - workflow: testCase.workflow, - catalog, - options: { functionCode: 'files', codeDir: 'functions' }, - }) - expect(result.files.map((file) => file.path)).toEqual([ - 'workflow.ts', - 'functions/js-code.js', - 'functions/py-code.py', - 'functions/sh-code.sh', - ]) - const functions: Array<[string, CodeFileLanguage]> = [ - ['jscode', 'javascript'], - ['pycode', 'python'], - ['shcode', 'shell'], - ] - expect(result.files.slice(1).map((file) => file.text)).toEqual( - functions.map(([key, language]) => { - const param = testCase.workflow.blocks[key]?.params.code - if (param?.kind !== 'value' || typeof param.value !== 'string') return null - return codeFileCodec.toFile(param.value, language) - }) - ) - expect(result.files[1]?.text).toContain('$ref.start.total + $env.TAX_RATE') - expect(result.hints.blocks.jscode?.codeFile).toBe('functions/js-code.js') - expect(result.diagnostics.filter((d) => d.code === 'W_CODE_FILE_INLINED')).toEqual([]) - await expect(result.files[0].text).toMatchFileSnapshot(`${GOLDEN_DIR}/function-files.txt`) - }) - - it('falls back to inline code with a warning when the codec round trip is lossy or absent', () => { - const testCase = cases.find((c) => c.name === 'function-languages') - if (!testCase) throw new Error('missing case') - const inline = printWorkflow({ - workflow: testCase.workflow, - catalog, - options: { functionCode: 'inline' }, - }) - for (const print of [createPrintWorkflow(lossyCodec), createPrintWorkflow()]) { - const result = print({ - workflow: testCase.workflow, - catalog, - options: { functionCode: 'files', codeDir: 'functions' }, - }) - expect(result.files).toHaveLength(1) - expect(result.files[0].text).toBe(inline.files[0].text) - const inlined = result.diagnostics.filter((d) => d.code === 'W_CODE_FILE_INLINED') - expect(inlined.map((d) => d.blockKey)).toEqual(['jscode', 'pycode', 'shcode']) - } - }) -}) diff --git a/packages/workflow-sdk/src/codegen/goldens.test.ts b/packages/workflow-sdk/src/codegen/goldens.test.ts deleted file mode 100644 index 7a8f3aadffb..00000000000 --- a/packages/workflow-sdk/src/codegen/goldens.test.ts +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Every printer golden of `@sim/workflow-code` (lean and verbose) type-checks against what an - * author gets: the shipped `core.d.ts` plus the types generated from the same real-catalog slice - * the goldens are printed with (`print/__fixtures__/real-catalog.json`, drift-checked against the - * registry in apps/sim). A field the printer emits that `core.d.ts` or the generated builders do - * not declare fails here, run by the workspace's TypeScript 7 compiler. - */ -import { mkdirSync, mkdtempSync, readdirSync, readFileSync, rmSync, writeFileSync } from 'node:fs' -import { tmpdir } from 'node:os' -import path from 'node:path' -import type { BlockCatalog } from '@sim/workflow-code' -import { describe, expect, it } from 'vitest' -import { typecheck } from '../../test/typecheck-project' -import { generateSdkTypes } from './generate' - -const SDK_ROOT = path.resolve(import.meta.dirname, '../..') -const PRINT_ROOT = path.resolve(SDK_ROOT, '../workflow-code/src/print') -const GOLDEN_DIR = path.join(PRINT_ROOT, '__golden__') - -function loadRealCatalog(): BlockCatalog { - return JSON.parse( - readFileSync(path.join(PRINT_ROOT, '__fixtures__', 'real-catalog.json'), 'utf8') - ) -} - -describe('printer goldens against the shipped SDK types', () => { - it('type-check with core.d.ts and the types generated from the real catalog', () => { - const outDir = mkdtempSync(path.join(tmpdir(), 'sim-sdk-goldens-')) - try { - for (const file of generateSdkTypes(loadRealCatalog())) { - const target = path.join(outDir, 'types', file.path) - mkdirSync(path.dirname(target), { recursive: true }) - writeFileSync(target, file.text) - } - const goldens = readdirSync(GOLDEN_DIR).filter((name) => name.endsWith('.txt')) - mkdirSync(path.join(outDir, 'goldens')) - for (const name of goldens) { - const text = readFileSync(path.join(GOLDEN_DIR, name), 'utf8') - writeFileSync(path.join(outDir, 'goldens', name.replace(/\.txt$/, '.ts')), text) - } - const tsconfig = path.join(outDir, 'tsconfig.json') - writeFileSync( - tsconfig, - JSON.stringify({ - compilerOptions: { - target: 'ES2022', - lib: ['ES2022'], - module: 'ESNext', - moduleResolution: 'bundler', - moduleDetection: 'force', - types: [], - strict: true, - noEmit: true, - skipLibCheck: false, - paths: { '@sim/workflow-sdk': [path.join(SDK_ROOT, 'src', 'core.d.ts')] }, - }, - include: [ - path.join(outDir, 'types', '**', '*.d.ts'), - path.join(outDir, 'goldens', '*.ts'), - ], - }) - ) - expect(goldens.length).toBeGreaterThan(30) - expect(typecheck(tsconfig)).toBe('') - } finally { - rmSync(outDir, { recursive: true, force: true }) - } - }, 120_000) -}) diff --git a/scripts/check-workflow-code-golden.ts b/scripts/check-workflow-code-golden.ts index 5fd4ba4cd3e..d7c129d4cbf 100644 --- a/scripts/check-workflow-code-golden.ts +++ b/scripts/check-workflow-code-golden.ts @@ -10,7 +10,7 @@ * * To fix a failure, change the doc printer (`packages/workflow-code/src/print/`) until the golden * it prints matches Biome's output, then refresh the goldens with - * `bun run --cwd packages/workflow-code test src/print -u`. Never edit a golden by hand. + * `bun run --cwd apps/sim test lib/workflows/code/goldens.test.ts -u`. Never edit a golden by hand. */ import { spawnSync } from 'node:child_process' import { readdirSync, readFileSync } from 'node:fs' From f3968203e85989f843e20fbc4a19d0af44c321d1 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Sun, 15 Nov 2026 23:58:17 -0800 Subject: [PATCH 135/428] test(workflows): keep the corpus fixture loaders private to their helper file --- .../lib/workflows/code/corpus/fixtures.test-helpers.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts b/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts index 14967e1784d..4c850347cef 100644 --- a/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts +++ b/apps/sim/lib/workflows/code/corpus/fixtures.test-helpers.ts @@ -26,7 +26,7 @@ import { type CorpusCase, generateRegistryCorpus } from '@/lib/workflows/code/co import { workflowStateArbitrary } from '@/lib/workflows/code/corpus/proof' import type { WorkflowState } from '@/stores/workflows/workflow/types' -export interface FixtureState { +interface FixtureState { /** `:`, stable across runs. */ id: string state: WorkflowState @@ -35,7 +35,7 @@ export interface FixtureState { const LANDING_TEMPLATES_DIR = path.resolve(process.cwd(), 'public/landing-page-templates') /** Reads exported workflow files (`{ version, exportedAt, state }` or a bare state) from a directory. */ -export function loadWorkflowStatesFromDirectory(directory: string, source: string): FixtureState[] { +function loadWorkflowStatesFromDirectory(directory: string, source: string): FixtureState[] { return readdirSync(directory) .filter((file) => file.endsWith('.json')) .sort(compareStrings) @@ -63,7 +63,7 @@ function toWorkflowState(parsed: unknown, file: string): WorkflowState { } /** The 11 landing-page templates in `public/landing-page-templates`. */ -export function loadLandingTemplateStates(): FixtureState[] { +function loadLandingTemplateStates(): FixtureState[] { return loadWorkflowStatesFromDirectory(LANDING_TEMPLATES_DIR, 'landing-template') } @@ -79,7 +79,7 @@ function stored(state: FactoryOutput): WorkflowState { } /** States from the shared `@sim/testing` factories and builder presets. */ -export function buildTestingFactoryStates(): FixtureState[] { +function buildTestingFactoryStates(): FixtureState[] { const fixtures: Array<[string, FactoryOutput]> = [ ['minimal', createMinimalWorkflowState()], ['conditional', createConditionalWorkflowState()], From 31bbecd647c1a49e04107561d97b3388d290fa61 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 00:02:13 -0800 Subject: [PATCH 136/428] refactor(workflow-code): one catalog semantics layer and shared primitives - catalog/surface.ts: the action-vs-trigger surface rule, isAdvancedMember and the surface-scoped canonical index; replaces the copies in validate-catalog, canonicalize/modes, the printer, sdk codegen, apps sdk-names and project - catalog/conditions.ts: evaluateCondition over object conditions, visibleFor, visibleWhen and visibleForModel, returning true | false | 'undecided'; the editor's evaluateSubBlockCondition, activity, validate-catalog and codegen all evaluate through it with their own policy for undecided - catalog/activity.ts: the "what is active" rule (moved from canonicalize, absorbing executableInactiveParams); activity now honours visibleWhen and visibleForModel like compile's field checks - print/refs.ts parses and formats ref paths with code-files/ref-path, so print and compile share one grammar (property test over hostile segments) - one copy each of ENV_VAR_NAME, loop/parallel properties, isIdentifierName, isExtensionKey, deepEqual and parseJsonContainer; lock and code-meta share their binding, order, extension and JSON-input validators --- .../sim/lib/workflows/code/catalog/project.ts | 3 +- .../lib/workflows/code/catalog/sdk-names.ts | 7 +- apps/sim/lib/workflows/code/source-lock.ts | 7 +- packages/workflow-code/package.json | 8 ++ .../src/canonicalize/branches.ts | 18 ++-- .../src/canonicalize/index.test.ts | 28 ++++++ .../workflow-code/src/canonicalize/index.ts | 5 +- .../workflow-code/src/canonicalize/modes.ts | 33 +------ .../workflow-code/src/canonicalize/params.ts | 8 +- .../workflow-code/src/canonicalize/tools.ts | 12 +-- .../src/{canonicalize => catalog}/activity.ts | 70 ++++++------- .../src/catalog/canonical-index/index.ts | 21 +--- .../workflow-code/src/catalog/conditions.ts | 85 ++++++++++++++++ packages/workflow-code/src/catalog/surface.ts | 52 ++++++++++ .../workflow-code/src/code-files/index.ts | 1 + .../workflow-code/src/code-files/ref-path.ts | 20 +++- packages/workflow-code/src/code-meta.ts | 61 +++++------- .../src/compile/validate-catalog.ts | 82 ++-------------- packages/workflow-code/src/compile/values.ts | 5 +- packages/workflow-code/src/diff/index.ts | 2 +- .../src/equivalence/executable.ts | 29 +----- .../workflow-code/src/equivalence/index.ts | 23 +---- packages/workflow-code/src/index.ts | 3 +- packages/workflow-code/src/lock.ts | 98 ++++++++++++------- .../workflow-code/src/materialize/block.ts | 2 +- .../workflow-code/src/materialize/index.ts | 4 +- .../workflow-code/src/materialize/params.ts | 12 +-- .../workflow-code/src/materialize/preserve.ts | 7 +- .../workflow-code/src/materialize/values.ts | 26 ----- packages/workflow-code/src/model.ts | 2 +- .../src/print/determinism.test.ts | 2 +- packages/workflow-code/src/print/idents.ts | 2 +- packages/workflow-code/src/print/printer.ts | 14 +-- packages/workflow-code/src/print/refs.test.ts | 51 ++++++++++ packages/workflow-code/src/print/refs.ts | 92 ++++++----------- packages/workflow-code/src/print/strings.ts | 7 +- packages/workflow-code/src/records.ts | 42 ++++++++ packages/workflow-sdk/src/codegen/generate.ts | 22 +---- .../src/codegen/visibility.test.ts | 6 +- .../workflow-sdk/src/codegen/visibility.ts | 86 ++++++---------- 40 files changed, 538 insertions(+), 520 deletions(-) rename packages/workflow-code/src/{canonicalize => catalog}/activity.ts (80%) create mode 100644 packages/workflow-code/src/catalog/conditions.ts create mode 100644 packages/workflow-code/src/catalog/surface.ts create mode 100644 packages/workflow-code/src/print/refs.test.ts diff --git a/apps/sim/lib/workflows/code/catalog/project.ts b/apps/sim/lib/workflows/code/catalog/project.ts index a2bf946f84c..334c61bc8d6 100644 --- a/apps/sim/lib/workflows/code/catalog/project.ts +++ b/apps/sim/lib/workflows/code/catalog/project.ts @@ -12,6 +12,7 @@ import type { SubBlockConditionClause, } from '@sim/workflow-code' import { evaluateSubBlockCondition } from '@sim/workflow-code/catalog/canonical-index' +import { isTriggerSurface } from '@sim/workflow-code/catalog/surface' import type { OutputCondition, PrimitiveValueType } from '@sim/workflow-types/blocks' import { isWorkflowAnnotationOnlyBlockType } from '@sim/workflow-types/workflow' import { resolveSubBlockOptions } from '@/lib/catalog/projection/subblock' @@ -319,7 +320,7 @@ function projectValueDefault( } function subBlockSurface(subBlock: SubBlockConfig): 'action' | 'trigger' { - return subBlock.mode === 'trigger' || subBlock.mode === 'trigger-advanced' ? 'trigger' : 'action' + return isTriggerSurface(subBlock) ? 'trigger' : 'action' } interface SubBlockContext extends ConditionInputs { diff --git a/apps/sim/lib/workflows/code/catalog/sdk-names.ts b/apps/sim/lib/workflows/code/catalog/sdk-names.ts index a42de21a454..c8c54c032a0 100644 --- a/apps/sim/lib/workflows/code/catalog/sdk-names.ts +++ b/apps/sim/lib/workflows/code/catalog/sdk-names.ts @@ -1,6 +1,7 @@ import { compareStrings, stripVersionSuffix } from '@sim/utils/string' +import { isTriggerSurface } from '@sim/workflow-code/catalog/surface' import { SDK_CORE_EXPORTS, SDK_RESERVED_IDENTIFIERS } from '@sim/workflow-code/sdk' -import type { BlockConfig, SubBlockConfig } from '@/blocks/types' +import type { BlockConfig } from '@/blocks/types' /** * The frozen SDK names (`apps/sim/blocks/sdk-names.json`, build-spec decision 7, s2 D3/D4). @@ -392,10 +393,6 @@ export function validateSdkNames(names: SdkNamesFile, sources: readonly SdkNameS return issues.sort(compareStrings) } -function isTriggerSurface(subBlock: SubBlockConfig): boolean { - return subBlock.mode === 'trigger' || subBlock.mode === 'trigger-advanced' -} - /** The `operation` dropdown's static options across every declaration, in declared order. */ export function operationOptions(block: BlockConfig): Array<{ id: string; label: string }> { const seen = new Set() diff --git a/apps/sim/lib/workflows/code/source-lock.ts b/apps/sim/lib/workflows/code/source-lock.ts index 969e524b952..2fdc0c525b9 100644 --- a/apps/sim/lib/workflows/code/source-lock.ts +++ b/apps/sim/lib/workflows/code/source-lock.ts @@ -22,6 +22,7 @@ import { codeMetaExtensions, decodeAnchor, encodeAnchor, + isIdentifierName, type LockHints, mapAnchorIds, SDK_RESERVED_IDENTIFIERS, @@ -30,10 +31,10 @@ import { type WorkflowLockV1, } from '@sim/workflow-code' -const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ - function isUsableBinding(binding: string | undefined): binding is string { - return binding !== undefined && IDENTIFIER.test(binding) && !SDK_RESERVED_IDENTIFIERS.has(binding) + return ( + binding !== undefined && isIdentifierName(binding) && !SDK_RESERVED_IDENTIFIERS.has(binding) + ) } /** Re-maps the block and variable segments of comment anchors; an anchor mapped to `null` is dropped. */ diff --git a/packages/workflow-code/package.json b/packages/workflow-code/package.json index cade20b2962..9e1f10ee3d2 100644 --- a/packages/workflow-code/package.json +++ b/packages/workflow-code/package.json @@ -22,10 +22,18 @@ "types": "./src/catalog/canonical-index/index.ts", "default": "./src/catalog/canonical-index/index.ts" }, + "./catalog/conditions": { + "types": "./src/catalog/conditions.ts", + "default": "./src/catalog/conditions.ts" + }, "./catalog/defaults": { "types": "./src/catalog/defaults.ts", "default": "./src/catalog/defaults.ts" }, + "./catalog/surface": { + "types": "./src/catalog/surface.ts", + "default": "./src/catalog/surface.ts" + }, "./catalog/view": { "types": "./src/catalog/view.ts", "default": "./src/catalog/view.ts" diff --git a/packages/workflow-code/src/canonicalize/branches.ts b/packages/workflow-code/src/canonicalize/branches.ts index 4f450de3672..11c16323cf5 100644 --- a/packages/workflow-code/src/canonicalize/branches.ts +++ b/packages/workflow-code/src/canonicalize/branches.ts @@ -1,11 +1,10 @@ import { isRecordLike } from '@sim/utils/object' +import { isIdentifierName } from '../code-files/ref-path' import type { BlockKey, BranchKey, CanonicalBranches, CanonicalBranchRow, Json } from '../model' -import { setOwn } from '../records' +import { parseJsonContainer, setOwn } from '../records' import { type CanonContext, report } from './context' import { toJson, toValue } from './values' -const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ - /** Editor state the condition/router input writes into each row (condition-input.tsx:292-300). */ const UI_ROW_KEYS = new Set([ 'showTags', @@ -39,13 +38,8 @@ function isStoredRow(item: unknown): item is StoredRow { function parseRows(value: unknown): { rows: unknown[] | null; parsed: boolean } { if (Array.isArray(value)) return { rows: value, parsed: true } - if (typeof value !== 'string' || value.trim() === '') return { rows: null, parsed: false } - try { - const decoded: unknown = JSON.parse(value) - return Array.isArray(decoded) ? { rows: decoded, parsed: true } : { rows: null, parsed: false } - } catch { - return { rows: null, parsed: false } - } + const decoded = typeof value === 'string' ? parseJsonContainer(value) : undefined + return Array.isArray(decoded) ? { rows: decoded, parsed: true } : { rows: null, parsed: false } } /** Positional default keys mirror the copilot handles (validation.ts:1091-1130), quirk 8. */ @@ -169,7 +163,7 @@ export function liftBranches( rowIds.forEach((rowId, index) => { const key = lockKeyByRowId.get(rowId) - if (key !== undefined && IDENTIFIER.test(key) && !taken.has(key)) { + if (key !== undefined && isIdentifierName(key) && !taken.has(key)) { keys[index] = key taken.add(key) } @@ -177,7 +171,7 @@ export function liftBranches( storedRows.forEach((row, index) => { if (keys[index] !== undefined) return const key = row.key - if (typeof key === 'string' && IDENTIFIER.test(key) && !taken.has(key)) { + if (typeof key === 'string' && isIdentifierName(key) && !taken.has(key)) { keys[index] = key taken.add(key) } diff --git a/packages/workflow-code/src/canonicalize/index.test.ts b/packages/workflow-code/src/canonicalize/index.test.ts index cd21a4f9c14..57888e42013 100644 --- a/packages/workflow-code/src/canonicalize/index.test.ts +++ b/packages/workflow-code/src/canonicalize/index.test.ts @@ -96,6 +96,14 @@ const CATALOG: BlockCatalog = { condition: { opaque: true }, visibleFor: { read: true, send: false }, }), + sb({ id: 'destinationType', type: 'dropdown' }), + sb({ + id: 'dmUserId', + type: 'short-input', + condition: { opaque: true }, + visibleFor: { read: false, send: true }, + visibleWhen: { send: { field: 'destinationType', value: 'dm' } }, + }), sb({ id: 'botToken', type: 'short-input', mode: 'trigger', surface: 'trigger' }), sb({ id: 'signingSecret', type: 'short-input', mode: 'trigger', surface: 'trigger' }), sb({ @@ -109,6 +117,12 @@ const CATALOG: BlockCatalog = { agent: block('agent', [ sb({ id: 'messages', type: 'messages-input', valueKind: 'json' }), sb({ id: 'model', type: 'combobox' }), + sb({ + id: 'vertexProject', + type: 'short-input', + condition: { opaque: true }, + visibleForModel: { 'gpt-5.5': false, 'vertex/gemini': true }, + }), sb({ id: 'tools', type: 'tool-input', @@ -692,6 +706,20 @@ describe('canonicalize: inactive annotation (step 9, quirks 1, 10, 14)', () => { expect(read.workflow.annotations.inactive.slack).toBeUndefined() }) + it('reads the clause an operation still asks (visibleWhen) and the per-model data', () => { + const inactive = (type: string, values: Record) => + run(workflow([blockState('b1', type, 'B', values)])).workflow.annotations.inactive.b + expect( + inactive('slack', { operation: 'send', destinationType: 'channel', dmUserId: 'U1' }) + ).toEqual(['dmUserId']) + expect( + inactive('slack', { operation: 'send', destinationType: 'dm', dmUserId: 'U1' }) + ).toBeUndefined() + expect(inactive('agent', { model: 'gpt-5.5', vertexProject: 'p' })).toEqual(['vertexProject']) + expect(inactive('agent', { model: 'vertex/gemini', vertexProject: 'p' })).toBeUndefined() + expect(inactive('agent', { model: '', vertexProject: 'p' })).toBeUndefined() + }) + it('marks trigger fields inactive outside trigger mode and active inside it (quirk 10)', () => { const action = run( workflow([blockState('b1', 'slack', 'Slack', { operation: 'send', botToken: 't' })]) diff --git a/packages/workflow-code/src/canonicalize/index.ts b/packages/workflow-code/src/canonicalize/index.ts index 40a08487d04..92192ea45ca 100644 --- a/packages/workflow-code/src/canonicalize/index.ts +++ b/packages/workflow-code/src/canonicalize/index.ts @@ -7,7 +7,9 @@ import { resolveEffectiveErrorEnabled, } from '@sim/workflow-types/workflow' import type { CanonicalizeFn } from '../api' +import { deployReadIds, isInactive } from '../catalog/activity' import type { CanonicalModeOverrides } from '../catalog/canonical-index' +import { buildCanonicalIndexForSurface } from '../catalog/surface' import type { CanonicalizeDiagnosticCode } from '../diagnostics/codes' import type { Diagnostic } from '../diagnostics/frame' import type { LockIdentity, LockIdentityBlock, LockLayout } from '../lock' @@ -22,12 +24,11 @@ import type { VarKey, } from '../model' import { setOwn } from '../records' -import { deployReadIds, isInactive } from './activity' import { type LiftedBranches, liftBranches } from './branches' import { type CanonContext, catalogBlock, report } from './context' import { canonicalEdges } from './edges' import { assignBlockKeys, assignVariableKeys } from './keys' -import { buildCanonicalIndexForSurface, effectiveModes } from './modes' +import { effectiveModes } from './modes' import { canonicalParams } from './params' import { loopSpec, parallelSpec, SUBFLOW_DATA_KEYS } from './subflows' import { toJson, toValue } from './values' diff --git a/packages/workflow-code/src/canonicalize/modes.ts b/packages/workflow-code/src/canonicalize/modes.ts index 9f2b2d583ee..801ad27eaaa 100644 --- a/packages/workflow-code/src/canonicalize/modes.ts +++ b/packages/workflow-code/src/canonicalize/modes.ts @@ -1,11 +1,10 @@ import { - buildCanonicalIndex, - type CanonicalIndex, type CanonicalModeOverrides, isCanonicalPair, resolveCanonicalMode, } from '../catalog/canonical-index' -import type { CatalogBlock, CatalogSubBlock } from '../catalog/types' +import { buildCanonicalIndexForSurface } from '../catalog/surface' +import type { CatalogBlock } from '../catalog/types' import type { CanonicalParamId, ParamMode } from '../model' /** @@ -35,31 +34,3 @@ export function effectiveModes( } return modes } - -/** - * The canonical groups of the surface the block serializes: the trigger surface in trigger mode, - * the action surface otherwise, and both for a trigger block. - * - * A block that is both an action and a trigger declares both surfaces in one `subBlocks` list, and - * they share `canonicalParamId`s under different ids (Gmail's `credential`/`manualCredential` and - * `triggerCredentials` are all `oauthCredential`). Indexed together, the trigger member joins the - * action pair without being either of its members, so it reads as the pair's dormant side. - */ -export function buildCanonicalIndexForSurface( - block: Pick, - triggerMode: boolean -): CanonicalIndex { - const onSurface = block.subBlocks.filter((subBlock) => - onBlockSurface(block, subBlock, triggerMode) - ) - return buildCanonicalIndex(onSurface) -} - -function onBlockSurface( - block: Pick, - subBlock: CatalogSubBlock, - triggerMode: boolean -): boolean { - if (block.category === 'triggers') return true - return triggerMode ? subBlock.surface !== 'action' : subBlock.surface !== 'trigger' -} diff --git a/packages/workflow-code/src/canonicalize/params.ts b/packages/workflow-code/src/canonicalize/params.ts index 59672656d57..732ca63437b 100644 --- a/packages/workflow-code/src/canonicalize/params.ts +++ b/packages/workflow-code/src/canonicalize/params.ts @@ -3,7 +3,7 @@ import type { BlockState } from '@sim/workflow-types/workflow' import type { CanonicalModeOverrides } from '../catalog/canonical-index' import type { CatalogBlock, CatalogSubBlock } from '../catalog/types' import type { BlockKey, CanonicalParam, SubBlockId, Value } from '../model' -import { setOwn } from '../records' +import { parseJsonContainer, setOwn } from '../records' import { type CanonContext, report } from './context' import { liftTools } from './tools' import { liftResourceValue, toValue } from './values' @@ -73,10 +73,8 @@ function decodeStructured( context: CanonContext ): unknown { if (typeof raw !== 'string' || raw.trim() === '') return raw - try { - const parsed: unknown = JSON.parse(raw) - if (typeof parsed === 'object' && parsed !== null) return parsed - } catch {} + const parsed = parseJsonContainer(raw) + if (parsed) return parsed report(context, { code: 'W_CANON_UNDECODABLE_JSON', severity: 'warning', diff --git a/packages/workflow-code/src/canonicalize/tools.ts b/packages/workflow-code/src/canonicalize/tools.ts index d04875561d1..e31aa682d33 100644 --- a/packages/workflow-code/src/canonicalize/tools.ts +++ b/packages/workflow-code/src/canonicalize/tools.ts @@ -3,7 +3,7 @@ import { type CanonicalModeOverrides, scopeCanonicalModesForTool } from '../cata import type { BlockCatalog, CatalogSubBlock } from '../catalog/types' import { catalogBlock as catalogBlockOf, catalogTool } from '../catalog/view' import type { BlockKey, CanonicalTool, Json, Value } from '../model' -import { setOwn } from '../records' +import { parseJsonContainer, setOwn } from '../records' import { type CanonContext, catalogBlock } from './context' import { effectiveModes } from './modes' import { liftResourceId, liftResourceValue, toJson, toValue } from './values' @@ -98,14 +98,8 @@ export function decodeToolParam(raw: unknown, shape: ToolParamShape): unknown { const parsed = Number(raw.trim()) return Number.isFinite(parsed) ? parsed : raw } - case 'json': { - try { - const parsed: unknown = JSON.parse(raw.trim()) - return typeof parsed === 'object' && parsed !== null ? parsed : raw - } catch { - return raw - } - } + case 'json': + return parseJsonContainer(raw) ?? raw default: return raw } diff --git a/packages/workflow-code/src/canonicalize/activity.ts b/packages/workflow-code/src/catalog/activity.ts similarity index 80% rename from packages/workflow-code/src/canonicalize/activity.ts rename to packages/workflow-code/src/catalog/activity.ts index 295fc3137d9..9c30daa58a1 100644 --- a/packages/workflow-code/src/canonicalize/activity.ts +++ b/packages/workflow-code/src/catalog/activity.ts @@ -1,16 +1,23 @@ +/** + * What is active: a stored param the serializer sends to the executor, or one deploy reads into + * the webhook provider config when the block acts as a trigger. Everything else is inactive: + * stored, never executed, left out of source and restored from the stored workflow. Canonicalize, + * print, materialize and the executable view all ask here, so they agree on what is active. + */ + +import type { CanonicalBlock, SubBlockId } from '../model' +import { setOwn } from '../records' import { type CanonicalIndex, type CanonicalModeOverrides, - evaluateSubBlockCondition, isCanonicalPair, isNonEmptyValue, resolveCanonicalMode, -} from '../catalog/canonical-index' -import type { BlockCatalog, CatalogBlock, CatalogSubBlock } from '../catalog/types' -import { catalogTrigger } from '../catalog/view' -import type { CanonicalBlock, SubBlockId } from '../model' -import { setOwn } from '../records' -import { buildCanonicalIndexForSurface } from './modes' +} from './canonical-index' +import { evaluateCondition, recordLookup } from './conditions' +import { buildCanonicalIndexForSurface, isTriggerSurface, onSurface } from './surface' +import type { BlockCatalog, CatalogBlock, CatalogSubBlock } from './types' +import { catalogBlock, catalogTrigger } from './view' /** Agent fields the serializer still forwards with no config, for its legacy migration. */ const LEGACY_AGENT_FIELDS = new Set(['systemPrompt', 'userPrompt', 'memories']) @@ -89,7 +96,7 @@ export function deployReadIds( if (!trigger) return new Set() const ids = new Set() for (const subBlock of trigger.subBlocks) { - if (subBlock.mode !== 'trigger' && subBlock.mode !== 'trigger-advanced') continue + if (!isTriggerSurface(subBlock)) continue if (subBlock.id === 'triggerCredentials' || !DEPLOY_SKIPPED_IDS.has(subBlock.id)) { ids.add(subBlock.id) } @@ -98,41 +105,22 @@ export function deployReadIds( } /** - * A declaration's visibility condition over the block's values. A function condition the catalog - * could not evaluate to data is `{ opaque: true }` and counts as satisfied (s1 canonicalize step - * 9), except where the projection pre-expanded it per operation (`visibleFor`, computed only for a - * function that reads nothing but `operation`): there it is exactly what the function returns. + * A declaration's visibility condition over the block's values (`evaluateCondition`). What the + * catalog's data cannot decide counts as satisfied, so the field is active. */ function conditionHolds(subBlock: CatalogSubBlock, values: Record): boolean { - const { condition, visibleFor } = subBlock - const operation = values.operation - if ( - condition && - 'opaque' in condition && - visibleFor && - typeof operation === 'string' && - Object.hasOwn(visibleFor, operation) - ) { - return visibleFor[operation] === true - } - return evaluateSubBlockCondition(condition, values) + return evaluateCondition(subBlock, recordLookup(values)) !== false } /** - * `shouldSerializeSubBlock` (serializer/index.ts:55-108) over one catalog declaration. - * Env-gated hiding (`hideWhenHosted` / `hideWhenEnvSet`) is deployment state the catalog does not - * carry, so it is not applied. An opaque condition counts as satisfied (s1 canonicalize step 9). + * `shouldSerializeSubBlock` (serializer/index.ts) over one catalog declaration. Env-gated hiding + * (`hideWhenHosted` / `hideWhenEnvSet`) is deployment state the catalog does not carry, so it is + * not applied. */ function serializes(subBlock: CatalogSubBlock, inputs: ActivityInputs): boolean { const { block, triggerMode, advancedMode, values, overrides, index } = inputs if (subBlock.context === 'tool-input') return false - - const isTriggerCategory = block.category === 'triggers' - if (subBlock.mode === 'trigger' || subBlock.mode === 'trigger-advanced') { - if (!triggerMode && !isTriggerCategory) return false - } else if (triggerMode && !isTriggerCategory) { - return false - } + if (!onSurface(block, subBlock, triggerMode)) return false const canonicalId = index.canonicalIdBySubBlockId[subBlock.id] if (canonicalId) { @@ -203,3 +191,17 @@ export function canonicalActivityInputs( deployRead: deployReadIds(catalog, catalogBlock, block.type, block.triggerMode, values), } } + +/** + * The params of a catalog block that never reach execution under its current values: what source + * leaves out and materialize restores from the stored workflow. A subflow container has none. + */ +export function executableInactiveParams( + block: CanonicalBlock, + catalog: BlockCatalog +): SubBlockId[] { + const declared = catalogBlock(catalog, block.type) + if (!declared || block.subflow) return [] + const inputs = canonicalActivityInputs(block, declared, catalog) + return Object.keys(block.params).filter((id) => isInactive(id, inputs)) +} diff --git a/packages/workflow-code/src/catalog/canonical-index/index.ts b/packages/workflow-code/src/catalog/canonical-index/index.ts index 2d88e2d3b7a..78fd7dd01e6 100644 --- a/packages/workflow-code/src/catalog/canonical-index/index.ts +++ b/packages/workflow-code/src/catalog/canonical-index/index.ts @@ -8,6 +8,7 @@ */ import { setOwn } from '../../records' +import { evaluateClause, recordLookup } from '../conditions' import type { OpaqueMarker } from '../types' export type CanonicalMode = 'basic' | 'advanced' @@ -146,22 +147,9 @@ function isOpaqueMarker(condition: object): condition is OpaqueMarker { return 'opaque' in condition && condition.opaque === true } -function matchesClause( - clause: Pick, - values: Record -): boolean { - const fieldValue = values[clause.field] - if (Array.isArray(clause.value)) { - if (fieldValue == null) return false - const included = (clause.value as readonly unknown[]).includes(fieldValue) - return clause.not ? !included : included - } - return clause.not ? fieldValue !== clause.value : fieldValue === clause.value -} - /** - * Evaluate a subblock condition against a map of raw values. Only one level of `and` is read, - * as in the registry. + * Evaluate a subblock condition against a map of raw values (`evaluateClause`, every field + * known). Only one level of `and` is read, as in the registry. */ export function evaluateSubBlockCondition( condition: EvaluableSubBlockCondition, @@ -170,8 +158,7 @@ export function evaluateSubBlockCondition( if (!condition) return true const actual = typeof condition === 'function' ? condition(values) : condition if (isOpaqueMarker(actual)) return true - if (!matchesClause(actual, values)) return false - return actual.and ? matchesClause(actual.and, values) : true + return evaluateClause(actual, recordLookup(values)) === true } /** Extract override entries matching a `${prefix}` key into a bare-`canonicalId`-keyed object. */ diff --git a/packages/workflow-code/src/catalog/conditions.ts b/packages/workflow-code/src/catalog/conditions.ts new file mode 100644 index 00000000000..868b190af0a --- /dev/null +++ b/packages/workflow-code/src/catalog/conditions.ts @@ -0,0 +1,85 @@ +/** + * The one evaluator of subBlock visibility over catalog data: a data condition is evaluated the way + * the editor does (`evaluateSubBlockCondition`), and a function condition the catalog could only + * mark `{ opaque: true }` is decided by the data the projection precomputed for it (`visibleFor`, + * `visibleWhen`, `visibleForModel`). What the data cannot decide is `'undecided'`, and each caller + * maps that to its own policy: activity counts the field as sent, compile's field checks as + * visible (so they never warn on a field they cannot place), SDK codegen keeps it as "sometimes". + * + * Pure and dependency-free, so the editor's canonical index evaluates through it too. + */ + +import type { CatalogSubBlock } from './types' + +export type ConditionResult = boolean | 'undecided' + +/** + * A field's value as the caller knows it: `{ value }` (an unset field is `{ value: undefined }`), + * or `undefined` when the caller cannot know it, which leaves any clause on it undecided. + */ +export type ConditionLookup = (field: string) => { value: unknown } | undefined + +interface ClausePart { + field: string + value: unknown + not?: boolean +} + +/** The object form of a condition: a clause and at most one level of `and`, as in the registry. */ +export interface ConditionClause extends ClausePart { + and?: ClausePart +} + +/** A lookup over a record in which every field is known (absent means unset). */ +export function recordLookup(values: Readonly>): ConditionLookup { + return (field) => ({ value: values[field] }) +} + +function partHolds(clause: ClausePart, lookup: ConditionLookup): ConditionResult { + const known = lookup(clause.field) + if (!known) return 'undecided' + const actual = known.value + if (Array.isArray(clause.value)) { + if (actual === undefined || actual === null) return false + const included = (clause.value as readonly unknown[]).includes(actual) + return clause.not ? !included : included + } + return clause.not ? actual !== clause.value : actual === clause.value +} + +/** Evaluates a condition clause: strict equality, a list means "one of", `not` negates. */ +export function evaluateClause(clause: ConditionClause, lookup: ConditionLookup): ConditionResult { + const head = partHolds(clause, lookup) + if (!clause.and || head === false) return head + const tail = partHolds(clause.and, lookup) + if (tail === false) return false + return head === true && tail === true ? true : 'undecided' +} + +/** + * Whether a declaration is shown under the looked-up values. An opaque condition is decided: + * - per operation by `visibleFor` (hidden when false), then by the clause `visibleWhen` still asks + * for that operation (none: shown); + * - per model by `visibleForModel`, for a model the block offers as a literal option. + * Anything else about an opaque condition is undecided. + */ +export function evaluateCondition( + subBlock: Pick, + lookup: ConditionLookup +): ConditionResult { + const { condition, visibleFor, visibleWhen, visibleForModel } = subBlock + if (!condition) return true + if (!('opaque' in condition)) return evaluateClause(condition, lookup) + const operation = lookup('operation')?.value + if (typeof operation === 'string' && visibleFor && Object.hasOwn(visibleFor, operation)) { + if (!visibleFor[operation]) return false + const asked = + visibleWhen && Object.hasOwn(visibleWhen, operation) ? visibleWhen[operation] : undefined + return asked ? evaluateClause(asked, lookup) : true + } + const model = lookup('model')?.value + if (typeof model === 'string' && visibleForModel && Object.hasOwn(visibleForModel, model)) { + return visibleForModel[model] === true + } + return 'undecided' +} diff --git a/packages/workflow-code/src/catalog/surface.ts b/packages/workflow-code/src/catalog/surface.ts new file mode 100644 index 00000000000..2fea3c41aeb --- /dev/null +++ b/packages/workflow-code/src/catalog/surface.ts @@ -0,0 +1,52 @@ +/** + * Which declarations a block uses: the surface half of `shouldSerializeSubBlock` + * (apps/sim/serializer/index.ts). A block that is both an action and a trigger declares both + * surfaces in one `subBlocks` list, sometimes under the same id; the trigger-mode fields serve a + * block in trigger mode, every other field a block in action mode, and a trigger block + * (`category: 'triggers'`) uses both. Every reader of the catalog (canonicalize, compile, print, + * SDK codegen, the catalog projection) asks here. + */ + +import { buildCanonicalIndex, type CanonicalIndex } from './canonical-index' +import type { CatalogBlock, CatalogSubBlock } from './types' + +/** The fields this rule reads; a registry `SubBlockConfig` fits as well as a `CatalogSubBlock`. */ +type SurfaceFields = Partial> & { mode?: string } + +/** + * Whether a declaration is a trigger-mode field: tagged so by the catalog (`surface`, which also + * marks the trigger subBlocks a block spreads in), else by its `trigger` / `trigger-advanced` mode. + */ +export function isTriggerSurface(subBlock: SurfaceFields): boolean { + if (subBlock.surface !== undefined) return subBlock.surface === 'trigger' + return subBlock.mode === 'trigger' || subBlock.mode === 'trigger-advanced' +} + +/** Whether a block in `triggerMode` uses this declaration. */ +export function onSurface( + block: Pick, + subBlock: SurfaceFields, + triggerMode: boolean +): boolean { + return block.category === 'triggers' || isTriggerSurface(subBlock) === triggerMode +} + +/** The advanced member of a basic/advanced pair, on either surface. */ +export function isAdvancedMember(subBlock: Pick): boolean { + return subBlock.mode === 'advanced' || subBlock.mode === 'trigger-advanced' +} + +/** + * The canonical groups of the declarations a block in `triggerMode` uses. Both surfaces may share + * a `canonicalParamId` under different ids (Gmail's `credential`/`manualCredential` and + * `triggerCredentials` are all `oauthCredential`); indexed together, the other surface's member + * would join the pair without being either of its members. + */ +export function buildCanonicalIndexForSurface( + block: Pick, + triggerMode: boolean +): CanonicalIndex { + return buildCanonicalIndex( + block.subBlocks.filter((subBlock) => onSurface(block, subBlock, triggerMode)) + ) +} diff --git a/packages/workflow-code/src/code-files/index.ts b/packages/workflow-code/src/code-files/index.ts index a6f12fd57dd..3a73fde3a5a 100644 --- a/packages/workflow-code/src/code-files/index.ts +++ b/packages/workflow-code/src/code-files/index.ts @@ -5,6 +5,7 @@ export { codeFileCodec, } from './bijection' export { type CodeFileSyntaxError, type FromCodeFileResult, fromCodeFile } from './from-file' +export { isIdentifierName } from './ref-path' export { type CodeFileLanguage, codeFileLanguage, diff --git a/packages/workflow-code/src/code-files/ref-path.ts b/packages/workflow-code/src/code-files/ref-path.ts index 514e3f22e06..92234cc80c5 100644 --- a/packages/workflow-code/src/code-files/ref-path.ts +++ b/packages/workflow-code/src/code-files/ref-path.ts @@ -20,11 +20,27 @@ export type RefSegment = { kind: 'name'; name: string } | { kind: 'index'; index */ const NAME_SEGMENT = /^[^.[\]<>\s'"`\\+*/=!&|{}]+$/ const CANONICAL_INDEX = /^(0|[1-9][0-9]{0,14})$/ -const JS_IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ +const IDENTIFIER_NAME = /^[A-Za-z_$][A-Za-z0-9_$]*$/ /** `PATTERNS.ENV_VAR_NAME` (apps/sim/executor/constants.ts). */ export const ENV_VAR_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/ +/** The params a loop exposes to its children (executor/variables/resolvers/loop.ts). */ +export const LOOP_PROPERTIES: readonly string[] = [ + 'index', + 'currentItem', + 'items', + 'iteration', + 'item', +] +/** The params a parallel exposes to its children (executor/variables/resolvers/parallel.ts). */ +export const PARALLEL_PROPERTIES: readonly string[] = ['index', 'currentItem', 'items'] + +/** An ASCII identifier name: usable as a bare object key or after `.` (reserved words included). */ +export function isIdentifierName(text: string): boolean { + return IDENTIFIER_NAME.test(text) +} + export function isNameSegment(value: string): boolean { return NAME_SEGMENT.test(value) } @@ -87,7 +103,7 @@ export function formatMemberPath(root: string, segments: readonly RefSegment[]): for (const segment of segments) { if (segment.kind === 'index') { text += `[${segment.index}]` - } else if (JS_IDENTIFIER.test(segment.name)) { + } else if (isIdentifierName(segment.name)) { text += `.${segment.name}` } else { text += `['${segment.name}']` diff --git a/packages/workflow-code/src/code-meta.ts b/packages/workflow-code/src/code-meta.ts index 388ddc9d9a1..c4b88ddf732 100644 --- a/packages/workflow-code/src/code-meta.ts +++ b/packages/workflow-code/src/code-meta.ts @@ -20,9 +20,17 @@ import { decodeAnchor, encodeAnchor } from './anchors' import type { CodeMetaDiagnosticCode } from './diagnostics/codes' import type { Diagnostic } from './diagnostics/frame' import { stableStringify } from './hash' -import { isJson, type LockExtensionKey, pointer } from './lock' +import { + isExtensionKey, + isJson, + isPrintOrder, + jsonInput, + type LockExtensionKey, + pointer, + readBinding, + readExtensions, +} from './lock' import type { Anchor, AnchorKey, CodeComment, Json } from './model' -import { SDK_RESERVED_IDENTIFIERS } from './sdk' export interface WorkflowCodeMetaV1 { [extension: LockExtensionKey]: Json @@ -41,14 +49,9 @@ export type ParseCodeMetaResult = | { meta: WorkflowCodeMetaV1; diagnostics?: undefined } | { meta?: undefined; diagnostics: CodeMetaDiagnostic[] } -const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ const META_FIELDS = ['v', 'bindings', 'order', 'comments'] const COMMENT_FIELDS = ['text', 'kind', 'placement'] -function isExtensionKey(key: string): key is LockExtensionKey { - return key.startsWith('x-') -} - class CodeMetaReader { readonly diagnostics: CodeMetaDiagnostic[] = [] @@ -57,18 +60,11 @@ class CodeMetaReader { } extensions(value: Record): Record { - const extensions: Record = {} - for (const [field, raw] of Object.entries(value)) { - if (META_FIELDS.includes(field)) continue - if (!isExtensionKey(field)) { - this.report('E_CODE_META_UNKNOWN_FIELD', [field], `Unknown code_meta field "${field}".`) - } else if (isJson(raw)) { - extensions[field] = raw - } else { - this.report('E_CODE_META_SHAPE', [field], 'An extension field must hold JSON.') - } - } - return extensions + return readExtensions(value, META_FIELDS, (field, problem) => + problem === 'unknown' + ? this.report('E_CODE_META_UNKNOWN_FIELD', [field], `Unknown code_meta field "${field}".`) + : this.report('E_CODE_META_SHAPE', [field], 'An extension field must hold JSON.') + ) } bindings(raw: unknown): Record { @@ -78,16 +74,14 @@ class CodeMetaReader { } const holders = new Map() const entries: Array<[string, string]> = [] - for (const [blockId, binding] of Object.entries(raw)) { + for (const [blockId, value] of Object.entries(raw)) { const at = ['bindings', blockId] - if (typeof binding !== 'string' || !IDENTIFIER.test(binding)) { - this.report('E_CODE_META_BINDING', at, 'A binding must be a JS identifier.') - continue - } - if (SDK_RESERVED_IDENTIFIERS.has(binding)) { - this.report('E_CODE_META_BINDING', at, `"${binding}" is a reserved word or an SDK export.`) + const read = readBinding(value) + if ('problem' in read) { + this.report('E_CODE_META_BINDING', at, read.problem) continue } + const { binding } = read const holder = holders.get(binding) if (holder !== undefined) { this.report( @@ -110,7 +104,7 @@ class CodeMetaReader { } const entries: Array<[string, number]> = [] for (const [blockId, order] of Object.entries(raw)) { - if (typeof order === 'number' && Number.isSafeInteger(order) && order >= 0) { + if (isPrintOrder(order)) { entries.push([blockId, order]) } else { this.report('E_CODE_META_SHAPE', ['order', blockId], 'An order is a non-negative integer.') @@ -189,15 +183,12 @@ class CodeMetaReader { */ export function parseCodeMeta(input: unknown): ParseCodeMetaResult { const reader = new CodeMetaReader() - let json = input - if (typeof input === 'string') { - try { - json = JSON.parse(input) - } catch { - reader.report('E_CODE_META_JSON', [], 'code_meta is not valid JSON.') - return { diagnostics: reader.diagnostics } - } + const parsed = jsonInput(input) + if (!parsed) { + reader.report('E_CODE_META_JSON', [], 'code_meta is not valid JSON.') + return { diagnostics: reader.diagnostics } } + const { json } = parsed if (!isRecordLike(json)) { reader.report('E_CODE_META_SHAPE', [], 'code_meta must be a JSON object.') return { diagnostics: reader.diagnostics } diff --git a/packages/workflow-code/src/compile/validate-catalog.ts b/packages/workflow-code/src/compile/validate-catalog.ts index eb02781c926..d305c916d75 100644 --- a/packages/workflow-code/src/compile/validate-catalog.ts +++ b/packages/workflow-code/src/compile/validate-catalog.ts @@ -1,4 +1,6 @@ import { isRecordLike } from '@sim/utils/object' +import { type ConditionLookup, evaluateClause, evaluateCondition } from '../catalog/conditions' +import { isAdvancedMember, onSurface } from '../catalog/surface' import type { BlockCatalog, CatalogBlock, @@ -6,7 +8,6 @@ import type { CatalogOutput, CatalogSubBlock, CatalogValueKind, - SubBlockConditionClause, } from '../catalog/types' import { catalogTrigger } from '../catalog/view' import type { CanonicalParamId, SubBlockId, Value } from '../model' @@ -34,16 +35,6 @@ export interface FieldIndex { subBlocks: Map } -/** A trigger block (`category: 'triggers'`) serializes both surfaces (`shouldSerializeSubBlock`). */ -function onSurface(block: CatalogBlock, sub: CatalogSubBlock, triggerMode: boolean): boolean { - if (block.category === 'triggers') return true - return triggerMode ? sub.surface !== 'action' : sub.surface !== 'trigger' -} - -function isAdvancedMember(sub: CatalogSubBlock): boolean { - return sub.mode === 'advanced' || sub.mode === 'trigger-advanced' -} - /** * The params a builder accepts: subBlock ids, with every `canonicalParamId` group written once * under its canonical id. The surface (action or trigger copy of a duplicated id) follows the @@ -101,70 +92,14 @@ export function memberFor( return (mode === 'advanced' ? field.advanced : field.basic) ?? field.members[0] } -function clauseMatches( - clause: { field: string; value: unknown; not?: boolean }, - values: ReadonlyMap -): boolean { - const actual = values.get(clause.field) - if (Array.isArray(clause.value)) { - if (actual === undefined || actual === null) return false - const included = clause.value.some((candidate) => candidate === actual) - return clause.not ? !included : included - } - return clause.not ? actual !== clause.value : actual === clause.value -} - -/** - * Evaluates a data condition the way the editor does (`evaluateSubBlockCondition`, - * lib/workflows/subblocks/visibility.ts). - */ -function conditionHolds( - clause: SubBlockConditionClause, - values: ReadonlyMap -): boolean { - if (!clauseMatches(clause, values)) return false - return clause.and ? clauseMatches(clause.and, values) : true -} - -/** Whether the catalog's data decides a field shown, hidden, or cannot tell. */ -type Visibility = 'visible' | 'hidden' | 'undecided' - -/** - * Visibility under `values`. A data condition is evaluated as the editor does. An opaque one is - * decided only by the data the catalog precomputed for it: - * - per operation, `visibleFor` (hidden when false) and the clause `visibleWhen` still asks then - * (absent: shown); - * - per model, `visibleForModel`, for a model that is one of the block's literal options. A model - * held as a reference or template, or not offered, is undecided. - * Anything else is undecided: field checks never warn on a field they cannot place. - */ -function visibility(sub: CatalogSubBlock, values: ReadonlyMap): Visibility { - const condition = sub.condition - if (!condition) return 'visible' - if (!('opaque' in condition)) { - return conditionHolds(condition, values) ? 'visible' : 'hidden' - } - const operation = values.get('operation') - if (typeof operation === 'string' && sub.visibleFor && Object.hasOwn(sub.visibleFor, operation)) { - if (!sub.visibleFor[operation]) return 'hidden' - const asked = sub.visibleWhen?.[operation] - if (!asked) return 'visible' - return conditionHolds(asked, values) ? 'visible' : 'hidden' - } - const model = values.get('model') - if ( - typeof model === 'string' && - sub.visibleForModel && - Object.hasOwn(sub.visibleForModel, model) - ) { - return sub.visibleForModel[model] ? 'visible' : 'hidden' - } - return 'undecided' +/** A lookup over a block's compiled params, every one of them known. */ +function paramLookup(values: ReadonlyMap): ConditionLookup { + return (field: string) => ({ value: values.get(field) }) } /** Whether a field may be shown: only a field the catalog's data decides hidden is not. */ export function isVisible(sub: CatalogSubBlock, values: ReadonlyMap): boolean { - return visibility(sub, values) !== 'hidden' + return evaluateCondition(sub, paramLookup(values)) !== false } /** @@ -208,7 +143,8 @@ export function missingRequiredFields( for (const field of index.fields.values()) { const members = field.kind === 'single' ? [field.sub] : field.members if (members.some((sub) => isWritten(sub.id))) continue - if (members.some((sub) => visibility(sub, values) === 'visible' && isRequired(sub, values))) { + const lookup = paramLookup(values) + if (members.some((sub) => evaluateCondition(sub, lookup) === true && isRequired(sub, values))) { missing.push(field) } } @@ -222,7 +158,7 @@ function isRequired(sub: CatalogSubBlock, values: ReadonlyMap): b if (sub.required === undefined || sub.required === false) return false if (sub.required === true) return true if ('opaque' in sub.required) return false - return conditionHolds(sub.required, values) + return evaluateClause(sub.required, paramLookup(values)) === true } function isPlainObject(value: Value): boolean { diff --git a/packages/workflow-code/src/compile/values.ts b/packages/workflow-code/src/compile/values.ts index 2475daff9a9..87b4a3d14e9 100644 --- a/packages/workflow-code/src/compile/values.ts +++ b/packages/workflow-code/src/compile/values.ts @@ -16,6 +16,8 @@ import { formatStoredPath, isIndexSegment, isNameSegment, + LOOP_PROPERTIES, + PARALLEL_PROPERTIES, type RefSegment, } from '../code-files/ref-path' import type { Json, ResourceKind, Value, VarNode } from '../model' @@ -103,9 +105,6 @@ const RESOURCE_KINDS: ReadonlySet = new Set([ 'workflow', ]) -/** Loop and parallel params (executor/variables/resolvers/loop.ts:44, parallel.ts:45). */ -const LOOP_PROPERTIES = ['index', 'currentItem', 'items', 'iteration', 'item'] -const PARALLEL_PROPERTIES = ['index', 'currentItem', 'items'] /** Named-form container outputs (loop.ts:43, parallel.ts:44). */ const CONTAINER_OUTPUTS = ['results', 'result'] diff --git a/packages/workflow-code/src/diff/index.ts b/packages/workflow-code/src/diff/index.ts index f6b5e4c00f2..fc40bb70bdb 100644 --- a/packages/workflow-code/src/diff/index.ts +++ b/packages/workflow-code/src/diff/index.ts @@ -13,8 +13,8 @@ import type { DiffCanonicalFn, } from '../api' import type { LockIdentity } from '../lock' -import { deepEqual } from '../materialize/values' import type { BlockKey, CanonicalBlock, CanonicalEdge, CanonicalWorkflowMeta } from '../model' +import { deepEqual } from '../records' const META_FIELDS: Array = ['name', 'description'] diff --git a/packages/workflow-code/src/equivalence/executable.ts b/packages/workflow-code/src/equivalence/executable.ts index ab60cf6ea2c..27b4293b548 100644 --- a/packages/workflow-code/src/equivalence/executable.ts +++ b/packages/workflow-code/src/equivalence/executable.ts @@ -15,11 +15,11 @@ * P0/P1 compare this view; O1 still compares stored bytes. */ -import { canonicalActivityInputs, isInactive } from '../canonicalize/activity' import { compareEdges } from '../canonicalize/edges' -import { buildCanonicalIndexForSurface } from '../canonicalize/modes' import { SUBFLOW_DATA_KEYS } from '../canonicalize/subflows' +import { executableInactiveParams } from '../catalog/activity' import { isCanonicalPair } from '../catalog/canonical-index' +import { buildCanonicalIndexForSurface } from '../catalog/surface' import type { BlockCatalog, CatalogBlock } from '../catalog/types' import { catalogBlock } from '../catalog/view' import type { @@ -34,7 +34,6 @@ import type { Json, LoopSpec, ParallelSpec, - SubBlockId, VarKey, } from '../model' import { setOwn } from '../records' @@ -89,28 +88,6 @@ export interface ExecutableWorkflow { variables: Record } -/** - * The params of a catalog block that never reach execution under its current values: what source - * leaves out and materialize restores from the stored workflow. - */ -export function executableInactiveParams( - block: CanonicalBlock, - catalog: BlockCatalog -): SubBlockId[] { - const declared = catalogBlock(catalog, block.type) - if (!declared || block.subflow) return [] - return inactiveIn(block, declared, catalog) -} - -function inactiveIn( - block: CanonicalBlock, - declared: CatalogBlock, - catalog: BlockCatalog -): SubBlockId[] { - const inputs = canonicalActivityInputs(block, declared, catalog) - return Object.keys(block.params).filter((id) => isInactive(id, inputs)) -} - function executableLoop(spec: LoopSpec): ExecutableSubflow { const iterations = spec.iterations || DEFAULT_LOOP_ITERATIONS switch (spec.loopType) { @@ -160,7 +137,7 @@ function executableParams( catalog: BlockCatalog ): Record { if (!declared) return { ...block.params } - const inactive = new Set(inactiveIn(block, declared, catalog)) + const inactive = new Set(executableInactiveParams(block, catalog)) const params: Record = {} for (const [id, param] of Object.entries(block.params)) { if (!inactive.has(id)) setOwn(params, id, param) diff --git a/packages/workflow-code/src/equivalence/index.ts b/packages/workflow-code/src/equivalence/index.ts index 711ac2cdefa..6465aeb94ab 100644 --- a/packages/workflow-code/src/equivalence/index.ts +++ b/packages/workflow-code/src/equivalence/index.ts @@ -7,6 +7,7 @@ import type { CanonicalEqualsFn, CanonicalHashFn, SourceFingerprintFn } from '.. import { compareEdges } from '../canonicalize/edges' import { sha256Hex, stableStringify } from '../hash' import type { CanonicalWorkflow } from '../model' +import { deepEqual } from '../records' /** The semantic part of a CWM: everything but annotations, with edges in canonical order. */ function semantic(workflow: CanonicalWorkflow) { @@ -19,28 +20,6 @@ function semantic(workflow: CanonicalWorkflow) { } } -/** Defined own entries; an `undefined` field means the same as an absent one. */ -function definedEntries(value: object): Array<[string, unknown]> { - return Object.entries(value).filter(([, field]) => field !== undefined) -} - -function deepEqual(left: unknown, right: unknown): boolean { - if (Object.is(left, right)) return true - if (typeof left !== 'object' || typeof right !== 'object' || left === null || right === null) { - return false - } - if (Array.isArray(left) || Array.isArray(right)) { - if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) return false - return left.every((item, index) => deepEqual(item, right[index])) - } - const leftEntries = definedEntries(left) - const rightRecord = right as Record - if (leftEntries.length !== definedEntries(right).length) return false - return leftEntries.every( - ([key, field]) => Object.hasOwn(rightRecord, key) && deepEqual(field, rightRecord[key]) - ) -} - /** Structural equality, total (never throws). */ export const canonicalEquals: CanonicalEqualsFn = (a, b) => deepEqual(semantic(a), semantic(b)) diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index 453bd92558f..7f5c02f9956 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -31,6 +31,7 @@ export type { SourceFingerprintFn, } from './api' export { canonicalize } from './canonicalize' +export { executableInactiveParams } from './catalog/activity' export { type CompactedBlockCatalog, compactBlockCatalog } from './catalog/compact' export type { BlockCatalog, @@ -84,6 +85,7 @@ export { codeFileLanguage, type FromCodeFileResult, fromCodeFile, + isIdentifierName, toCodeFile, } from './code-files' export { @@ -132,7 +134,6 @@ export { type ExecutableBlock, type ExecutableSubflow, type ExecutableWorkflow, - executableInactiveParams, executableView, } from './equivalence/executable' export { sha256Hex, stableStringify } from './hash' diff --git a/packages/workflow-code/src/lock.ts b/packages/workflow-code/src/lock.ts index f1d54e7a93f..cad8cecb61d 100644 --- a/packages/workflow-code/src/lock.ts +++ b/packages/workflow-code/src/lock.ts @@ -17,6 +17,7 @@ import { isRecordLike } from '@sim/utils/object' import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' +import { isIdentifierName } from './code-files/ref-path' import type { Diagnostic } from './diagnostics/frame' import type { BlockKey, BranchKey, Json, SubBlockId, VarKey } from './model' import { SDK_RESERVED_IDENTIFIERS } from './sdk' @@ -123,7 +124,6 @@ export type ParseWorkflowLockResult = | { lock: WorkflowLockV1; diagnostics?: undefined } | { lock?: undefined; diagnostics: LockDiagnostic[] } -const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ const DRIVE_PATH = /^[A-Za-z]:/ const LOCK_FIELDS = ['lockVersion', 'blocks', 'variables'] @@ -141,10 +141,55 @@ function isFiniteNumber(value: unknown): value is number { return typeof value === 'number' && Number.isFinite(value) } -function isExtensionKey(key: string): key is LockExtensionKey { +/** A print-order tie-break, in the lock and in `code_meta`: a non-negative integer. */ +export function isPrintOrder(value: unknown): value is number { + return typeof value === 'number' && Number.isSafeInteger(value) && value >= 0 +} + +/** A block's `const` binding, in the lock or in `code_meta`, or why `value` cannot be one. */ +export function readBinding(value: unknown): { binding: string } | { problem: string } { + if (typeof value !== 'string' || !isIdentifierName(value)) { + return { problem: 'A binding must be a JS identifier.' } + } + if (SDK_RESERVED_IDENTIFIERS.has(value)) { + return { problem: `"${value}" is a reserved word or an SDK export.` } + } + return { binding: value } +} + +export function isExtensionKey(key: string): key is LockExtensionKey { return key.startsWith('x-') } +/** + * The `x-` extension fields of `value` outside `known` (JSON values only), which every validator + * preserves. `onProblem` hears each other unknown field and each extension that is not JSON. + */ +export function readExtensions( + value: Record, + known: readonly string[], + onProblem: (field: string, problem: 'unknown' | 'not-json') => void +): Record { + const extensions: Record = {} + for (const [field, raw] of Object.entries(value)) { + if (known.includes(field)) continue + if (!isExtensionKey(field)) onProblem(field, 'unknown') + else if (isJson(raw)) extensions[field] = raw + else onProblem(field, 'not-json') + } + return extensions +} + +/** A validator's input as JSON: parsed when given as text, `undefined` when that text is not JSON. */ +export function jsonInput(input: unknown): { json: unknown } | undefined { + if (typeof input !== 'string') return { json: input } + try { + return { json: JSON.parse(input) } + } catch { + return undefined + } +} + /** Whether `value` is plain JSON with finite numbers only. */ export function isJson(value: unknown): value is Json { if (value === null || typeof value === 'string' || typeof value === 'boolean') return true @@ -179,18 +224,11 @@ class LockReader { known: readonly string[], at: readonly string[] ): Record { - const extensions: Record = {} - for (const [field, raw] of Object.entries(value)) { - if (known.includes(field)) continue - if (!isExtensionKey(field)) { - this.report('E_LOCK_UNKNOWN_FIELD', [...at, field], `Unknown lock field "${field}".`) - } else if (isJson(raw)) { - extensions[field] = raw - } else { - this.report('E_LOCK_SHAPE', [...at, field], 'An extension field must hold JSON.') - } - } - return extensions + return readExtensions(value, known, (field, problem) => + problem === 'unknown' + ? this.report('E_LOCK_UNKNOWN_FIELD', [...at, field], `Unknown lock field "${field}".`) + : this.report('E_LOCK_SHAPE', [...at, field], 'An extension field must hold JSON.') + ) } /** A string → non-empty-string record whose values are unique within it. */ @@ -300,21 +338,12 @@ class LockReader { this.report('E_LOCK_SHAPE', [...at, 'parent'], '"parent" must be a block key or null.') } - let binding = '' - if (typeof raw.binding !== 'string' || !IDENTIFIER.test(raw.binding)) { - this.report('E_LOCK_BINDING', [...at, 'binding'], '"binding" must be a JS identifier.') - } else if (SDK_RESERVED_IDENTIFIERS.has(raw.binding)) { - this.report( - 'E_LOCK_BINDING', - [...at, 'binding'], - `"${raw.binding}" is a reserved word or an SDK export.` - ) - } else { - binding = raw.binding - } + const read = readBinding(raw.binding) + if ('problem' in read) this.report('E_LOCK_BINDING', [...at, 'binding'], read.problem) + const binding = 'binding' in read ? read.binding : '' let order = 0 - if (typeof raw.order === 'number' && Number.isSafeInteger(raw.order) && raw.order >= 0) { + if (isPrintOrder(raw.order)) { order = raw.order } else { this.report('E_LOCK_SHAPE', [...at, 'order'], '"order" must be a non-negative integer.') @@ -325,7 +354,7 @@ class LockReader { if (raw.branches !== undefined) { const branches = this.idRecord(raw.branches, [...at, 'branches']) for (const branchKey of Object.keys(branches)) { - if (!IDENTIFIER.test(branchKey)) { + if (!isIdentifierName(branchKey)) { this.report( 'E_LOCK_BRANCH', [...at, 'branches', branchKey], @@ -442,15 +471,12 @@ class LockReader { */ export function parseWorkflowLock(input: unknown): ParseWorkflowLockResult { const reader = new LockReader() - let json = input - if (typeof input === 'string') { - try { - json = JSON.parse(input) - } catch { - reader.report('E_LOCK_JSON', [], 'The lock is not valid JSON.') - return { diagnostics: reader.diagnostics } - } + const parsed = jsonInput(input) + if (!parsed) { + reader.report('E_LOCK_JSON', [], 'The lock is not valid JSON.') + return { diagnostics: reader.diagnostics } } + const { json } = parsed if (!isRecordLike(json)) { reader.report('E_LOCK_SHAPE', [], 'The lock must be a JSON object.') return { diagnostics: reader.diagnostics } diff --git a/packages/workflow-code/src/materialize/block.ts b/packages/workflow-code/src/materialize/block.ts index 3338928fddd..d20d538125d 100644 --- a/packages/workflow-code/src/materialize/block.ts +++ b/packages/workflow-code/src/materialize/block.ts @@ -6,13 +6,13 @@ import { SUBFLOW_DATA_KEYS } from '../canonicalize/subflows' import { mintsFreshValue } from '../catalog/defaults' import type { LockItem, LockLayout, WorkflowLockBlock } from '../lock' import type { BlockKey, BranchKey, CanonicalBlock, SubBlockId } from '../model' +import { deepEqual } from '../records' import { writeBranches } from './branches' import { catalogBlock, type MaterializeContext } from './context' import type { ResolvedBlock } from './identity' import { storedModes, writeBlockModes, writeToolModes } from './modes' import { encodeParam, matchPrevTools, parseStoredList } from './params' import { writeSubflowData } from './subflows' -import { deepEqual } from './values' /** `block.data` keys the model or the layout owns on any block; everything else is `opaque`. */ const MODEL_DATA_KEYS = new Set(['parentId', 'extent', 'width', 'height', 'canonicalModes']) diff --git a/packages/workflow-code/src/materialize/index.ts b/packages/workflow-code/src/materialize/index.ts index d7f9ee3fb4d..d4aff53c0d8 100644 --- a/packages/workflow-code/src/materialize/index.ts +++ b/packages/workflow-code/src/materialize/index.ts @@ -14,14 +14,14 @@ import type { MaterializeDiagnosticCode } from '../diagnostics/codes' import type { Diagnostic } from '../diagnostics/frame' import type { LockIdentity, WorkflowLockBlock, WorkflowLockV1 } from '../lock' import type { BlockKey, CanonicalBlock, CanonicalWorkflow, VarKey } from '../model' -import { setOwn } from '../records' +import { deepEqual, setOwn } from '../records' import { type BuiltBlock, buildBlock } from './block' import { catalogBlock, type MaterializeContext, report } from './context' import { type BranchHandles, writeEdges } from './edges' import { resolveIdentity } from './identity' import { restorePreserved } from './preserve' import { subflowEntry } from './subflows' -import { deepEqual, rewriteRenamedReferences } from './values' +import { rewriteRenamedReferences } from './values' function invert(record: Record): Map { return new Map(Object.entries(record).map(([key, id]) => [id, key])) diff --git a/packages/workflow-code/src/materialize/params.ts b/packages/workflow-code/src/materialize/params.ts index 99c375b799d..99bfe5b462e 100644 --- a/packages/workflow-code/src/materialize/params.ts +++ b/packages/workflow-code/src/materialize/params.ts @@ -4,8 +4,9 @@ import { decodeToolParam, toolParamDeclaration } from '../canonicalize/tools' import type { CatalogSubBlock } from '../catalog/types' import type { LockItem } from '../lock' import type { BlockKey, CanonicalParam, CanonicalTool, SubBlockId } from '../model' +import { deepEqual, parseJsonContainer } from '../records' import type { MaterializeContext } from './context' -import { deepEqual, unliftValue } from './values' +import { unliftValue } from './values' /** What encoding one param needs besides the value itself. */ export interface ParamSite { @@ -25,13 +26,8 @@ export interface ParamSite { /** A stored list, native or as JSON text; anything else is empty. */ export function parseStoredList(raw: unknown): unknown[] { if (Array.isArray(raw)) return raw - if (typeof raw !== 'string' || raw.trim() === '') return [] - try { - const parsed: unknown = JSON.parse(raw) - return Array.isArray(parsed) ? parsed : [] - } catch { - return [] - } + const parsed = typeof raw === 'string' ? parseJsonContainer(raw) : undefined + return Array.isArray(parsed) ? parsed : [] } /** diff --git a/packages/workflow-code/src/materialize/preserve.ts b/packages/workflow-code/src/materialize/preserve.ts index 54bb1b26832..1b2b756335a 100644 --- a/packages/workflow-code/src/materialize/preserve.ts +++ b/packages/workflow-code/src/materialize/preserve.ts @@ -15,10 +15,10 @@ * onto one changes nothing and the no-op round trip stays byte-identical. */ -import { canonicalActivityInputs, isInactive } from '../canonicalize/activity' -import { buildCanonicalIndexForSurface } from '../canonicalize/modes' import { SUBFLOW_DATA_KEYS } from '../canonicalize/subflows' +import { canonicalActivityInputs, isInactive } from '../catalog/activity' import { type CanonicalGroup, isCanonicalPair } from '../catalog/canonical-index' +import { buildCanonicalIndexForSurface } from '../catalog/surface' import type { BlockCatalog, CatalogBlock } from '../catalog/types' import { catalogBlock } from '../catalog/view' import { executableSubflow } from '../equivalence/executable' @@ -31,8 +31,7 @@ import type { ParamMode, SubBlockId, } from '../model' -import { getOwn, setOwn } from '../records' -import { deepEqual } from './values' +import { deepEqual, getOwn, setOwn } from '../records' /** Inactive restoration can flip another field's visibility; it settles within a few passes. */ const MAX_RESTORE_PASSES = 4 diff --git a/packages/workflow-code/src/materialize/values.ts b/packages/workflow-code/src/materialize/values.ts index 0786bbe9a94..5059926d6b9 100644 --- a/packages/workflow-code/src/materialize/values.ts +++ b/packages/workflow-code/src/materialize/values.ts @@ -15,32 +15,6 @@ import { type MaterializeContext, report } from './context' const SIM_NODE_KINDS = new Set(['var', 'resource', 'unresolved', 'csv', 'literal']) -/** Defined own entries; an `undefined` member means the same as an absent one. */ -function definedEntries(value: object): Array<[string, unknown]> { - return Object.entries(value).filter(([, member]) => member !== undefined) -} - -/** - * Structural equality over model values and stored JSON: key order is ignored (jsonb does not - * keep it, s1 quirk 28), an `undefined` member equals an absent one, and arrays compare in order. - */ -export function deepEqual(left: unknown, right: unknown): boolean { - if (Object.is(left, right)) return true - if (typeof left !== 'object' || typeof right !== 'object' || left === null || right === null) { - return false - } - if (Array.isArray(left) || Array.isArray(right)) { - if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) return false - return left.every((item, index) => deepEqual(item, right[index])) - } - const leftEntries = definedEntries(left) - const rightRecord = right as Record - if (leftEntries.length !== definedEntries(right).length) return false - return leftEntries.every( - ([key, member]) => Object.hasOwn(rightRecord, key) && deepEqual(member, rightRecord[key]) - ) -} - function isSimNode(value: unknown): value is SimNode { return isRecordLike(value) && typeof value.$sim === 'string' && SIM_NODE_KINDS.has(value.$sim) } diff --git a/packages/workflow-code/src/model.ts b/packages/workflow-code/src/model.ts index f70a4270105..f2baf00e5bc 100644 --- a/packages/workflow-code/src/model.ts +++ b/packages/workflow-code/src/model.ts @@ -354,7 +354,7 @@ export interface CodeComment { export interface WorkflowAnnotations { /** * Per block, the param ids whose value is stored but not serialized under the current values - * and not read by deploy (`canonicalize/activity.ts`; opaque catalog conditions count as + * and not read by deploy (`catalog/activity.ts`; opaque catalog conditions count as * active unless expanded per operation). Source leaves them out and apply restores them from the * stored workflow; a verbose print lists them under the block's `inactive: {...}` meta * (DESIGN.md A18). diff --git a/packages/workflow-code/src/print/determinism.test.ts b/packages/workflow-code/src/print/determinism.test.ts index 5fb4d32fed5..6139134ecfe 100644 --- a/packages/workflow-code/src/print/determinism.test.ts +++ b/packages/workflow-code/src/print/determinism.test.ts @@ -7,9 +7,9 @@ import { describe, expect, it } from 'vitest' import type { LockHints } from '../api' +import { executableInactiveParams } from '../catalog/activity' import { editorDefaults } from '../catalog/defaults' import { catalogBlock } from '../catalog/view' -import { executableInactiveParams } from '../equivalence/executable' import type { CanonicalWorkflow } from '../model' import { cases } from './__fixtures__/cases' import { realCatalog as catalog } from './__fixtures__/real-catalog' diff --git a/packages/workflow-code/src/print/idents.ts b/packages/workflow-code/src/print/idents.ts index c61d7a660e8..f3c363def35 100644 --- a/packages/workflow-code/src/print/idents.ts +++ b/packages/workflow-code/src/print/idents.ts @@ -1,6 +1,6 @@ +import { isIdentifierName } from '../code-files/ref-path' import type { BlockKey } from '../model' import { SDK_RESERVED_IDENTIFIERS } from '../sdk' -import { isIdentifierName } from './strings' /** `'Classify ticket'` → `classifyTicket`; non-ASCII and punctuation split words. */ function deriveIdentifier(name: string): string { diff --git a/packages/workflow-code/src/print/printer.ts b/packages/workflow-code/src/print/printer.ts index c2d7bc22289..71da311c448 100644 --- a/packages/workflow-code/src/print/printer.ts +++ b/packages/workflow-code/src/print/printer.ts @@ -12,9 +12,10 @@ import { } from '@sim/workflow-types/workflow' import { portKey } from '../anchors' import type { LockHintBlock, LockHints, PrintInput, PrintResult, PrintWorkflowFn } from '../api' -import { canonicalActivityInputs, isInactive } from '../canonicalize/activity' import { SUBFLOW_DATA_KEYS } from '../canonicalize/subflows' +import { canonicalActivityInputs, executableInactiveParams, isInactive } from '../catalog/activity' import { type EditorDefault, editorDefaults } from '../catalog/defaults' +import { isAdvancedMember, onSurface } from '../catalog/surface' import type { BlockCatalog, CatalogBlock, CatalogBuilder, CatalogSubBlock } from '../catalog/types' import { catalogBlock as catalogBlockOf, @@ -24,7 +25,6 @@ import { import { type CodeFileCodec, type CodeFileLanguage, codeFileCodec } from '../code-files' import type { PrintDiagnosticCode } from '../diagnostics/codes' import type { Diagnostic } from '../diagnostics/frame' -import { executableInactiveParams } from '../equivalence/executable' import { isJson } from '../lock' import type { AnchorKey, @@ -70,11 +70,6 @@ function toLanguage(value: unknown): CodeFileLanguage | null { return null } -/** The advanced member of a basic/advanced pair, on either surface. */ -function isAdvancedMember(sb: CatalogSubBlock): boolean { - return sb.mode === 'advanced' || sb.mode === 'trigger-advanced' -} - function stringParam(block: CanonicalBlock, id: string): string | undefined { const param = getOwn(block.params, id) return param?.kind === 'value' && typeof param.value === 'string' ? param.value : undefined @@ -422,11 +417,8 @@ class WorkflowPrinter { return heads } - /** A trigger block (`category: 'triggers'`) serializes both surfaces (`shouldSerializeSubBlock`). */ private surfaceSubBlocks(block: CanonicalBlock, catalogBlock: CatalogBlock): CatalogSubBlock[] { - if (catalogBlock.category === 'triggers') return catalogBlock.subBlocks - const surface = block.triggerMode ? 'trigger' : 'action' - return catalogBlock.subBlocks.filter((sb) => sb.surface === undefined || sb.surface === surface) + return catalogBlock.subBlocks.filter((sb) => onSurface(catalogBlock, sb, block.triggerMode)) } private tagFor( diff --git a/packages/workflow-code/src/print/refs.test.ts b/packages/workflow-code/src/print/refs.test.ts new file mode 100644 index 00000000000..3ea5816ed07 --- /dev/null +++ b/packages/workflow-code/src/print/refs.test.ts @@ -0,0 +1,51 @@ +import fc from 'fast-check' +import { describe, expect, it } from 'vitest' +import { compileWorkflow } from '../compile' +import type { CanonicalWorkflow, Value } from '../model' +import { cases } from './__fixtures__/cases' +import { realCatalog as catalog } from './__fixtures__/real-catalog' +import { printWorkflow } from './index' + +const SEGMENT_CHARS = [...'aZ_$07- \'"+<>é{`'] + +const segment = fc.oneof( + fc + .array(fc.constantFrom(...SEGMENT_CHARS), { minLength: 1, maxLength: 4 }) + .map((chars) => `.${chars.join('')}`), + fc.oneof(fc.nat({ max: 12 }), fc.constantFrom('01', '1e3', '')).map((index) => `[${index}]`) +) + +function withMessage(content: string): CanonicalWorkflow { + const base = cases.find((candidate) => candidate.name === 'templates-and-paths') + if (!base) throw new Error('missing case') + const { workflow } = base + const writer = workflow.blocks.writer + const messages = { kind: 'value' as const, value: [{ role: 'user', content }] } + const next = { ...writer, params: { ...writer.params, messages } } + return { ...workflow, blocks: { ...workflow.blocks, writer: next } } +} + +function compiledMessages(workflow: CanonicalWorkflow): Value | undefined { + const printed = printWorkflow({ workflow, catalog, options: { functionCode: 'inline' } }) + const result = compileWorkflow({ + entry: { path: 'workflow.ts', text: printed.files[0].text }, + files: new Map(), + catalog, + sdkMajor: catalog.sdkMajor, + }) + expect(result.diagnostics.filter((diagnostic) => diagnostic.severity === 'error')).toEqual([]) + const param = result.workflow?.blocks.writer.params.messages + return param?.kind === 'value' ? param.value : undefined +} + +describe('reference paths', () => { + it('compile back to the stored path the printer read, or stay literal text', () => { + fc.assert( + fc.property(fc.array(segment, { maxLength: 4 }), (segments) => { + const content = `x y` + expect(compiledMessages(withMessage(content))).toEqual([{ role: 'user', content }]) + }), + { numRuns: 200 } + ) + }) +}) diff --git a/packages/workflow-code/src/print/refs.ts b/packages/workflow-code/src/print/refs.ts index 7280f2241c0..30370070552 100644 --- a/packages/workflow-code/src/print/refs.ts +++ b/packages/workflow-code/src/print/refs.ts @@ -6,14 +6,16 @@ */ import { findWorkflowReferenceTokens } from '@sim/utils/workflow-references' +import { + ENV_VAR_NAME, + formatMemberPath, + LOOP_PROPERTIES, + PARALLEL_PROPERTIES, + parseStoredPath, +} from '../code-files/ref-path' import type { PrintDiagnosticCode } from '../diagnostics/codes' import type { Diagnostic } from '../diagnostics/frame' import type { BlockKey } from '../model' -import { printMember } from './strings' - -const ENV_VAR_NAME = /^[A-Za-z_][A-Za-z0-9_]*$/ -const LOOP_PROPERTIES = new Set(['iteration', 'index', 'item', 'currentItem', 'items']) -const PARALLEL_PROPERTIES = new Set(['index', 'currentItem', 'items']) export type RefPart = { kind: 'text'; text: string } | { kind: 'ref'; expr: string } @@ -35,44 +37,6 @@ export interface RefScope { useVars(): void } -interface ParsedPath { - head: string - segments: Array<{ kind: 'member'; name: string } | { kind: 'index'; index: string }> -} - -/** Splits `head.a[0].b-c` into a head and exact segments; `null` when the grammar does not fit. */ -function parseRefPath(inner: string): ParsedPath | null { - const headMatch = /^[^.[\]]+/.exec(inner) - if (!headMatch) return null - const head = headMatch[0] - const segments: ParsedPath['segments'] = [] - let rest = inner.slice(head.length) - while (rest.length > 0) { - const member = /^\.([^.[\]]+)/.exec(rest) - if (member?.[1] !== undefined) { - segments.push({ kind: 'member', name: member[1] }) - rest = rest.slice(member[0].length) - continue - } - const index = /^\[(0|[1-9][0-9]*)\]/.exec(rest) - if (index?.[1] !== undefined) { - segments.push({ kind: 'index', index: index[1] }) - rest = rest.slice(index[0].length) - continue - } - return null - } - return { head, segments } -} - -function printSegments(segments: ParsedPath['segments']): string { - return segments - .map((segment) => - segment.kind === 'member' ? printMember(segment.name) : `[${segment.index}]` - ) - .join('') -} - export class RefPrinter { readonly diagnostics: Diagnostic[] = [] @@ -86,33 +50,33 @@ export class RefPrinter { this.scope.use('env') return `env.${name}` } - const parsed = parseRefPath(token.slice(1, -1)) + const parsed = parseStoredPath(token.slice(1, -1)) if (!parsed) return this.unresolved(token, from, 'W_UNRESOLVED_REF') - const { head, segments } = parsed - if (head === 'variable') { - const [first, ...rest] = segments - if (first?.kind !== 'member' || !this.scope.hasVariable(first.name)) { + const [head, ...segments] = parsed + if (head.kind !== 'name') return this.unresolved(token, from, 'W_UNRESOLVED_REF') + const [first] = segments + if (head.name === 'variable') { + if (first?.kind !== 'name' || !this.scope.hasVariable(first.name)) { return this.unresolved(token, from, 'W_UNRESOLVED_REF') } this.scope.useVars() - return `vars${printMember(first.name)}${printSegments(rest)}` + return formatMemberPath('vars', segments) } - if (head === 'loop' || head === 'parallel') { - const [first] = segments - const known = head === 'loop' ? LOOP_PROPERTIES : PARALLEL_PROPERTIES - const param = from === null ? null : this.scope.loopParam(from, head) - if (first?.kind !== 'member' || !known.has(first.name) || param === null) { + if (head.name === 'loop' || head.name === 'parallel') { + const known = head.name === 'loop' ? LOOP_PROPERTIES : PARALLEL_PROPERTIES + const param = from === null ? null : this.scope.loopParam(from, head.name) + if (first?.kind !== 'name' || !known.includes(first.name) || param === null) { return this.unresolved(token, from, 'W_UNRESOLVED_REF') } - return `${param}${printSegments(segments)}` + return formatMemberPath(param, segments) } - if (!this.scope.hasBlock(head) || from === null) { + if (!this.scope.hasBlock(head.name) || from === null) { return this.unresolved(token, from, 'W_UNRESOLVED_REF') } - const visibility = this.scope.visibility(from, head) + const visibility = this.scope.visibility(from, head.name) if (visibility === 'forward') return this.unresolved(token, from, 'W_FORWARD_REF_LITERALIZED') if (visibility === 'scope') return this.unresolved(token, from, 'W_UNRESOLVED_REF') - return `${this.scope.identOf(head)}${printSegments(segments)}` + return formatMemberPath(this.scope.identOf(head.name), segments) } /** Splits text into literal runs and resolved interpolations. */ @@ -159,14 +123,14 @@ export function referencedHeads(text: string): string[] { const heads: string[] = [] for (const token of findWorkflowReferenceTokens(text)) { if (token.kind !== 'workflow') continue - const parsed = parseRefPath(token.value.slice(1, -1)) + const head = parseStoredPath(token.value.slice(1, -1))?.[0] if ( - parsed && - parsed.head !== 'variable' && - parsed.head !== 'loop' && - parsed.head !== 'parallel' + head?.kind === 'name' && + head.name !== 'variable' && + head.name !== 'loop' && + head.name !== 'parallel' ) { - heads.push(parsed.head) + heads.push(head.name) } } return heads diff --git a/packages/workflow-code/src/print/strings.ts b/packages/workflow-code/src/print/strings.ts index 14fd7dd50e2..dd3606d57e5 100644 --- a/packages/workflow-code/src/print/strings.ts +++ b/packages/workflow-code/src/print/strings.ts @@ -5,12 +5,7 @@ * templates so multi-line text reads naturally. Template content is never re-indented. */ -const IDENTIFIER = /^[A-Za-z_$][A-Za-z0-9_$]*$/ - -/** An ASCII identifier name: usable as a bare object key or after `.` (reserved words included). */ -export function isIdentifierName(text: string): boolean { - return IDENTIFIER.test(text) -} +import { isIdentifierName } from '../code-files/ref-path' function hex4(code: number): string { return `\\u${code.toString(16).toUpperCase().padStart(4, '0')}` diff --git a/packages/workflow-code/src/records.ts b/packages/workflow-code/src/records.ts index 3cd8b8ba10c..0446cd8b3cf 100644 --- a/packages/workflow-code/src/records.ts +++ b/packages/workflow-code/src/records.ts @@ -22,3 +22,45 @@ export function setOwn(target: Record, key: string, value: T): voi export function getOwn(record: Readonly>, key: string): T | undefined { return Object.hasOwn(record, key) ? record[key] : undefined } + +/** Defined own entries; an `undefined` member means the same as an absent one. */ +function definedEntries(value: object): Array<[string, unknown]> { + return Object.entries(value).filter(([, member]) => member !== undefined) +} + +/** + * Structural equality over model values and stored JSON: key order is ignored (jsonb does not + * keep it), an `undefined` member equals an absent one, and arrays compare in order. Total. + */ +export function deepEqual(left: unknown, right: unknown): boolean { + if (Object.is(left, right)) return true + if (typeof left !== 'object' || typeof right !== 'object' || left === null || right === null) { + return false + } + if (Array.isArray(left) || Array.isArray(right)) { + if (!Array.isArray(left) || !Array.isArray(right) || left.length !== right.length) return false + return left.every((item, index) => deepEqual(item, right[index])) + } + const leftEntries = definedEntries(left) + const rightRecord = right as Record + if (leftEntries.length !== definedEntries(right).length) return false + return leftEntries.every( + ([key, member]) => Object.hasOwn(rightRecord, key) && deepEqual(member, rightRecord[key]) + ) +} + +/** + * JSON text that holds an object or array, decoded; `undefined` for blank text, text that does not + * parse, and a scalar, which callers keep as the text it is. + */ +export function parseJsonContainer(text: string): Record | unknown[] | undefined { + if (text.trim() === '') return undefined + try { + const parsed: unknown = JSON.parse(text) + return typeof parsed === 'object' && parsed !== null + ? (parsed as Record | unknown[]) + : undefined + } catch { + return undefined + } +} diff --git a/packages/workflow-sdk/src/codegen/generate.ts b/packages/workflow-sdk/src/codegen/generate.ts index d2d290977cc..c6d1ac78da4 100644 --- a/packages/workflow-sdk/src/codegen/generate.ts +++ b/packages/workflow-sdk/src/codegen/generate.ts @@ -14,6 +14,7 @@ import { compareStrings } from '@sim/utils/string' import type { BlockCatalog, CatalogBlock, CatalogOutput, CatalogSubBlock } from '@sim/workflow-code' import { subBlockEditorDefault } from '@sim/workflow-code/catalog/defaults' +import { onSurface } from '@sim/workflow-code/catalog/surface' import { catalogBlock, catalogBlockTypes, catalogTrigger } from '@sim/workflow-code/catalog/view' import { indentLines, jsdoc, literal, pascal, propertyKey, quote, union } from './emit' import { mapSubBlock } from './map-subblock' @@ -102,26 +103,13 @@ function header(sdkMajor: number): string { return `${HEADER_PREFIX} ${sdkMajor} · generated from the block catalog; do not edit` } -function isTriggerModeSubBlock(subBlock: CatalogSubBlock): boolean { - return subBlock.mode === 'trigger' || subBlock.mode === 'trigger-advanced' -} - -/** - * The subBlocks a builder can write, mirroring the serializer's surface rule - * (apps/sim/serializer/index.ts): trigger-mode fields only in a trigger context or on a trigger - * block, action fields never in a trigger context of a non-trigger block. - */ +/** The subBlocks a builder can write: the ones its surface uses (`onSurface`) that source can state. */ function candidateSubBlocks(block: CatalogBlock, entry: BuilderEntry): CatalogSubBlock[] { - const triggerCategory = block.category === 'triggers' - const triggerContext = entry.builder.triggerMode === true + const triggerMode = entry.builder.triggerMode === true const fixed = entry.builder.fixed ?? {} return block.subBlocks.filter((subBlock) => { if (subBlock.hidden || subBlock.context === 'tool-input') return false - if (isTriggerModeSubBlock(subBlock)) { - if (!triggerContext && !triggerCategory) return false - } else if (triggerContext && !triggerCategory) { - return false - } + if (!onSurface(block, subBlock, triggerMode)) return false if (SYSTEM_SUBBLOCK_IDS.has(subBlock.id) || subBlock.id.startsWith('samplePayload')) { return false } @@ -312,7 +300,7 @@ function buildParams( context: VisibilityContext } { const candidates = candidateSubBlocks(block, entry) - const context = buildVisibilityContext(candidates, pinnedValues(entry), entry.builder.operation) + const context = buildVisibilityContext(candidates, pinnedValues(entry)) const coreParams = new Set(entry.special?.coreParams ?? []) const params: Param[] = [] for (const [name, members] of groupParams(candidates)) { diff --git a/packages/workflow-sdk/src/codegen/visibility.test.ts b/packages/workflow-sdk/src/codegen/visibility.test.ts index f691ac0962d..6d63e626693 100644 --- a/packages/workflow-sdk/src/codegen/visibility.test.ts +++ b/packages/workflow-sdk/src/codegen/visibility.test.ts @@ -30,7 +30,7 @@ describe('classifyParam', () => { subBlock({ id: 'cursor', condition: { field: 'operation', value: 'list' } }), subBlock({ id: 'botToken', condition: { field: 'authMethod', value: 'bot_token' } }), ] - const context = buildVisibilityContext(candidates, { operation: 'send' }, 'send') + const context = buildVisibilityContext(candidates, { operation: 'send' }) const [, text, cursor, botToken] = candidates.map((candidate) => classifyParam([candidate], context) ) @@ -61,8 +61,8 @@ describe('classifyParam', () => { condition: { opaque: true }, visibleFor: { send: true, list_users: false }, }) - const sendContext = buildVisibilityContext([channel], { operation: 'send' }, 'send') - const listContext = buildVisibilityContext([channel], { operation: 'list_users' }, 'list_users') + const sendContext = buildVisibilityContext([channel], { operation: 'send' }) + const listContext = buildVisibilityContext([channel], { operation: 'list_users' }) expect(classifyParam([channel], sendContext)).toMatchObject({ kind: 'sometimes', required: false, diff --git a/packages/workflow-sdk/src/codegen/visibility.ts b/packages/workflow-sdk/src/codegen/visibility.ts index 738488a2f42..ba2c3cb198e 100644 --- a/packages/workflow-sdk/src/codegen/visibility.ts +++ b/packages/workflow-sdk/src/codegen/visibility.ts @@ -7,11 +7,18 @@ * are capped at {@link MAX_COMBINATIONS}; the widest siblings stop being enumerated first. A field * nobody enumerates is unknown, so a condition on it is "sometimes". * - * Evaluation mirrors `evaluateSubBlockCondition` (apps/sim/lib/workflows/subblocks/visibility.ts): - * strict equality, array values mean "one of", `not` negates, `and` must also hold. + * Conditions are evaluated by the catalog's one evaluator (`@sim/workflow-code/catalog/conditions`), + * which leaves a condition on a field nobody enumerates undecided: "sometimes" here. */ import type { CatalogSubBlock } from '@sim/workflow-code' +import { + type ConditionClause, + type ConditionLookup, + type ConditionResult, + evaluateClause as evaluateCatalogClause, + evaluateCondition, +} from '@sim/workflow-code/catalog/conditions' import { isConditionClause, isOpaque } from './catalog' export const MAX_COMBINATIONS = 64 @@ -32,8 +39,6 @@ interface SiblingDomain { export interface VisibilityContext { /** Values the builder pins: its `operation` and `fixed` entries. */ pinned: Readonly> - /** The pinned operation, for `visibleFor` on function conditions. */ - operation?: string /** Enumerated siblings, sorted by field. */ siblings: SiblingDomain[] /** Every combination of sibling values (one empty combination when there are none). */ @@ -52,20 +57,7 @@ export interface ParamVisibility { when?: string } -type ClauseValue = Scalar | null | undefined | ReadonlyArray - -interface ClausePart { - field: string - value: ClauseValue - not?: boolean -} - -/** The shape shared by subBlock conditions and output conditions. */ -interface ConditionLike extends ClausePart { - and?: ClausePart -} - -function clauseFields(clause: ConditionLike): string[] { +function clauseFields(clause: ConditionClause): string[] { return clause.and ? [clause.field, clause.and.field] : [clause.field] } @@ -110,8 +102,7 @@ function byField(a: SiblingDomain, b: SiblingDomain): number { */ export function buildVisibilityContext( candidates: readonly CatalogSubBlock[], - pinned: Readonly>, - operation?: string + pinned: Readonly> ): VisibilityContext { const fields = new Set() for (const subBlock of candidates) { @@ -137,64 +128,45 @@ export function buildVisibilityContext( sibling.values.map((value) => ({ ...combo, [sibling.field]: value })) ) } - return { pinned, operation, siblings, combos } -} - -function lookup( - context: VisibilityContext, - combo: Readonly>, - field: string -): { known: true; value: Scalar } | { known: false } { - if (field in context.pinned) return { known: true, value: context.pinned[field] } - if (field in combo) return { known: true, value: combo[field] } - return { known: false } + return { pinned, siblings, combos } } -function evalSingle( - clause: ClausePart, +function comboLookup( context: VisibilityContext, combo: Readonly> -): Tri { - const actual = lookup(context, combo, clause.field) - if (!actual.known) return null - const expected = clause.value - if (Array.isArray(expected)) { - const included = expected.includes(actual.value) - return clause.not ? !included : included +): ConditionLookup { + return (field) => { + if (field in context.pinned) return { value: context.pinned[field] } + if (field in combo) return { value: combo[field] } + return undefined } - return clause.not ? actual.value !== expected : actual.value === expected } -function and(a: Tri, b: Tri): Tri { - if (a === false || b === false) return false - if (a === null || b === null) return null - return true +function toTri(result: ConditionResult): Tri { + return result === 'undecided' ? null : result } /** Evaluates a condition clause; `null` when it reads a field that is not known. */ export function evaluateClause( - clause: ConditionLike, + clause: ConditionClause, context: VisibilityContext, combo: Readonly> ): Tri { - const head = evalSingle(clause, context, combo) - return clause.and ? and(head, evalSingle(clause.and, context, combo)) : head + return toTri(evaluateCatalogClause(clause, comboLookup(context, combo))) } +/** + * Visibility in one combination. A function condition the catalog could only mark opaque is never + * certain here, even where its precomputed data shows the field: the types stay as permissive as + * the registry function, and only a field that data hides is left out. + */ function visibleIn( subBlock: CatalogSubBlock, context: VisibilityContext, combo: Readonly> ): Tri { - const { condition } = subBlock - if (condition === undefined) return true - if (isConditionClause(condition)) return evaluateClause(condition, context, combo) - if (isOpaque(condition) && context.operation !== undefined && subBlock.visibleFor) { - const visible = subBlock.visibleFor[context.operation] - // A function condition visible for the operation may still read other fields. - if (visible === false) return false - } - return null + const visible = toTri(evaluateCondition(subBlock, comboLookup(context, combo))) + return visible === true && isOpaque(subBlock.condition) ? null : visible } function requiredIn( From 65f14b39be8513d02cc05e1b05c0a04ded2447e3 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 00:09:10 -0800 Subject: [PATCH 137/428] refactor(workflow-code): delete verbose source mode and introduce meta.extra Source holds only what executes; preserved state lives in the stored workflow and materialize/preserve.ts restores it. - drop PrintOptions.verbose, picked(), meta.modes, meta.inactive, $unknown, the inactive anchor kind and the verbose goldens - a pair's member follows from the value kind alone: a list or object literal goes to the pair member that takes it as written, never a JSON code member (table_v2 filterInput), so meta.modes is not needed - meta.extra holds stored params that run but have no SDK syntax (custom block inputs, agent legacy prompt fields, container params); meta.extraData holds a container's unreadable subflow block.data, kept apart because canvas containers store params under the same names - rename the CWM's opaque.data to extra, so opaque means only the catalog's could-not-evaluate marker - delete E_MODE_CONFLICT, W_INACTIVE_IS_ACTIVE, W_APPLY_SUNSET_BLOCK and W_APPLY_PENDING_CONNECTIONS_DROPPED (no emitter) - delete the createPrintWorkflow(codec) seam and CodeFileCodec; the printer calls checkCodeFileBijection directly --- packages/workflow-code/DESIGN.md | 37 ++- packages/workflow-code/src/anchors.test.ts | 2 +- packages/workflow-code/src/anchors.ts | 4 +- packages/workflow-code/src/api.ts | 9 +- .../src/canonicalize/hostile.test.ts | 4 +- .../src/canonicalize/index.test.ts | 14 +- .../workflow-code/src/canonicalize/index.ts | 10 +- .../src/canonicalize/subflows.ts | 2 +- .../src/code-files/bijection.test.ts | 22 +- .../workflow-code/src/code-files/bijection.ts | 21 -- .../workflow-code/src/code-files/index.ts | 2 - packages/workflow-code/src/code-meta.ts | 4 +- packages/workflow-code/src/compile/SYNTAX.md | 66 ++-- packages/workflow-code/src/compile/blocks.ts | 212 +++++------- .../workflow-code/src/compile/grammar.test.ts | 70 ++-- packages/workflow-code/src/compile/index.ts | 5 +- .../src/compile/printer-goldens.test.ts | 33 +- .../workflow-code/src/compile/test-catalog.ts | 9 + .../src/compile/throughput.bench.ts | 4 +- packages/workflow-code/src/compile/values.ts | 11 +- .../workflow-code/src/diagnostics/codes.ts | 10 +- packages/workflow-code/src/diff/index.ts | 2 +- .../src/equivalence/executable.ts | 2 +- packages/workflow-code/src/index.ts | 3 +- .../workflow-code/src/materialize/block.ts | 22 +- .../workflow-code/src/materialize/preserve.ts | 24 +- .../src/materialize/quirks.test-helpers.ts | 2 +- .../workflow-code/src/materialize/subflows.ts | 2 +- packages/workflow-code/src/model.ts | 13 +- .../src/print/__fixtures__/cases.ts | 18 +- .../__golden__/inactive-values.verbose.txt | 13 - .../print/__golden__/loop-foreach.verbose.txt | 28 -- .../__golden__/nested-subflows.verbose.txt | 39 --- .../src/print/__golden__/pair-modes.txt | 14 +- .../print/__golden__/pair-modes.verbose.txt | 39 --- .../src/print/__golden__/string-escapes.txt | 2 +- .../__golden__/support-triage.verbose.txt | 73 ----- .../print/__golden__/templates-and-paths.txt | 2 +- .../print/__golden__/unresolved-tokens.txt | 2 +- .../src/print/__golden__/vars-by-field.txt | 2 +- packages/workflow-code/src/print/comments.ts | 1 - .../workflow-code/src/print/golden.test.ts | 79 ++--- packages/workflow-code/src/print/index.ts | 2 +- packages/workflow-code/src/print/printer.ts | 310 +++++------------- packages/workflow-code/src/print/values.ts | 20 +- packages/workflow-code/src/sdk.ts | 1 - .../src/codegen/core-text.generated.ts | 2 +- packages/workflow-sdk/src/codegen/generate.ts | 1 - .../workflow-sdk/src/codegen/goldens.test.ts | 2 +- .../workflow-sdk/src/codegen/map-subblock.ts | 6 +- packages/workflow-sdk/src/codegen/names.ts | 1 - packages/workflow-sdk/src/core.d.ts | 27 +- packages/workflow-sdk/src/runtime.ts | 1 - .../test/examples/scheduled-report.ts | 3 +- 54 files changed, 425 insertions(+), 884 deletions(-) delete mode 100644 packages/workflow-code/src/print/__golden__/inactive-values.verbose.txt delete mode 100644 packages/workflow-code/src/print/__golden__/loop-foreach.verbose.txt delete mode 100644 packages/workflow-code/src/print/__golden__/nested-subflows.verbose.txt delete mode 100644 packages/workflow-code/src/print/__golden__/pair-modes.verbose.txt delete mode 100644 packages/workflow-code/src/print/__golden__/support-triage.verbose.txt diff --git a/packages/workflow-code/DESIGN.md b/packages/workflow-code/DESIGN.md index eb0568c3725..731a90fad0c 100644 --- a/packages/workflow-code/DESIGN.md +++ b/packages/workflow-code/DESIGN.md @@ -36,7 +36,7 @@ instead of failing at run time. returns a `CanonicalWorkflow`; ids bind only in materialize. s3's `CanonicalWorkflowDraft` maps onto it as follows: `meta`, `variables`, `blocks[].params`, `branches`, `edges` and `annotations` all exist. `options.enabled/errorEnabled/retry/locked` map to `enabled`, - `errorPort`, `retry` and `locked`. `unknown` maps to `opaque`. + `errorPort`, `retry` and `locked`. `unknown` maps to `extra`. 2. **`meta` is in the CWM** (`name`, `description`). The workflow row holds them, not `WorkflowState`, so canonicalize takes them as input. `diffCanonical` reports changes. Wave 3 decides whether apply writes them. @@ -88,15 +88,14 @@ instead of failing at run time. values become `E_APPLY_` (`duplicate_trigger` becomes `E_APPLY_DUPLICATE_TRIGGER`). s4's extra codes map as follows: - `credential_unreachable` and `sandbox_plan_required` are errors; - - `hosted_key_dropped`, `value_normalized`, `sunset_block`, `type_changed` and - `pending_connections_dropped` are warnings; + - `hosted_key_dropped`, `value_normalized` and `type_changed` are warnings (`sunset_block` + and `pending_connections_dropped` were dropped: no path emits them); - `lock_id_claimed` became `W_MAT_LOCK_ID_CLAIMED`. 15. **Codes added beyond s3 §4**, because the grammar implies them: - syntax and limits: `E_WORKFLOW_EXPORT`, `E_LIMIT_EXCEEDED`; - scope: `E_UNKNOWN_VARIABLE`, `E_DUPLICATE_VARIABLE`, `E_INVALID_ENV_NAME`, `E_UNKNOWN_LOOP_PROPERTY`, `W_FORWARD_REF`; - branches: `E_UNKNOWN_BRANCH`, `E_DUPLICATE_BRANCH_KEY`, `E_BRANCH_ELSE_LAST`; - - modes: `E_MODE_CONFLICT`, `W_INACTIVE_IS_ACTIVE`; - code files and handles: `E_CODE_FILE_MISSING`, `E_CODE_FILE_PATH`, `W_CODE_FILE_INLINED`, `W_RAW_HANDLE`. @@ -287,16 +286,24 @@ instead of failing at run time. `collection || ''`, clamped `batchSize`), and unknown `block.data` (a container keeps the subflow keys canonicalize could not read, which the serializer passes through). It takes the catalog, which the pair and activity rules need. P0 and P1 compare it; - O1 still compares stored bytes, and the new **P6** asserts that materializing the compiled lean + O1 still compares stored bytes, and the new **P6** asserts that materializing the compiled print over prev is byte-identical to the stored workflow (a no-op apply changes nothing). - - **The printer is lean by default.** It leaves out inactive values, `picked()` (a plain id is - written as a string), `meta.modes` (except where the other member would store the value - differently: a list or object literal into a JSON code or input-format member), off-type - subflow fields (a `doWhile` with no condition prints its `count`, which then runs), and - unknown residue. An undeclared stored id that still runs (a schema-agnostic custom block's - input, the agent's legacy prompt fields) keeps printing under `meta.inactive`, the only place - source takes an undeclared id. `PrintOptions.verbose` prints the rest, for - `source get --verbose`. + - **The printer writes only what executes.** It leaves out inactive values, which member of a + pair holds a value (a plain id is written as a string; there is no `picked()` and no + `meta.modes`), off-type subflow fields (a `doWhile` with no condition prints its `count`, + which then runs), and unknown `block.data`. There is no verbose mode: preserved state lives + only in the stored workflow. A stored field that runs but has no SDK syntax prints under + `meta.extra`, the only place source takes such a field: a schema-agnostic custom block's + input, the agent's legacy prompt fields, or a container's stored params. A container's + subflow keys of `block.data` canonicalize could not read as config print under + `meta.extraData`, kept apart because canvas containers often store params under the same + names. The CWM keeps unknown `block.data` + under `extra` too, so `opaque` means only the catalog's "could not evaluate" marker. + - **A pair's member follows from the value kind alone.** A selector call is basic, anything + else advanced, and a list or object literal never lands in a JSON code member when the other + member takes it as written (`table_v2`'s `filterInput`: the filter builder holds the list). + The printer writes a JSON code member's value as the text it stores, never as the literal it + stringifies, so the rule is unambiguous both ways and `meta.modes` is not needed. - **Defaults rule.** The editor default of a field is what canvas creation seeds (`createBlockFromParams` with no inputs, wrapped by `hooks.initBlock`): per subBlock id, first declaration wins; a visible editable field gets its `value()` thunk's result for a block with @@ -317,7 +324,7 @@ instead of failing at run time. mode; when a plain id changed and prev showed the basic selector member of a `picked` pair, prev's member; then every param inactive under the target's values, from prev (absent included, so defaults compile filled into fields that never run are dropped); off-type subflow - fields and prev's whole config when it runs the same; unknown residue a lean print does not + fields and prev's whole config when it runs the same; unknown residue source does not carry. A full CWM restores onto itself unchanged, so O1 holds. Source cannot pick a pair member for a plain id: that is canvas state. - **The loop count is the one that runs.** `loopSpec` reads `block.data.count`, and an absent @@ -332,5 +339,5 @@ instead of failing at run time. `buildBlockCatalog` the golden cases use (compacted and hashed like the core shard), rebuilt and drift-checked by `apps/sim/lib/workflows/code/golden-catalog.test.ts`. Cases are canvas blocks of current types (editor defaults seeded). `workflow-sdk`'s `goldens.test.ts` - type-checks every golden, lean and verbose, with `core.d.ts` plus the types generated from + type-checks every golden with `core.d.ts` plus the types generated from that slice. `print/__fixtures__/catalog.ts` stays for unit tests. diff --git a/packages/workflow-code/src/anchors.test.ts b/packages/workflow-code/src/anchors.test.ts index be82a127852..0895e7514a3 100644 --- a/packages/workflow-code/src/anchors.test.ts +++ b/packages/workflow-code/src/anchors.test.ts @@ -31,7 +31,7 @@ describe('encodeAnchor / decodeAnchor', () => { { kind: 'footer' }, { kind: 'block', block: 'a:b%3A~2' }, { kind: 'param', block: 'agent', param: 'credential' }, - { kind: 'inactive', block: 'agent', param: 'old:field' }, + { kind: 'param', block: 'agent', param: 'old:field' }, { kind: 'edges', block: 'route', port: 'branch:elseIf0' }, { kind: 'edges', block: 'x', port: 'raw:a:b' }, { kind: 'var', variable: 'retries' }, diff --git a/packages/workflow-code/src/anchors.ts b/packages/workflow-code/src/anchors.ts index 959b72f2d6d..c82fa29a0de 100644 --- a/packages/workflow-code/src/anchors.ts +++ b/packages/workflow-code/src/anchors.ts @@ -64,8 +64,7 @@ export function encodeAnchor(anchor: Anchor): AnchorKey { case 'block': return brand(`block:${escapeSegment(anchor.block)}`) case 'param': - case 'inactive': - return brand(`${anchor.kind}:${escapeSegment(anchor.block)}:${escapeSegment(anchor.param)}`) + return brand(`param:${escapeSegment(anchor.block)}:${escapeSegment(anchor.param)}`) case 'edges': return brand(`edges:${escapeSegment(anchor.block)}:${escapeSegment(anchor.port)}`) case 'var': @@ -92,7 +91,6 @@ export function decodeAnchor(text: string): Anchor | null { case 'var': return segments.length === 1 ? { kind, variable: segments[0] } : null case 'param': - case 'inactive': return segments.length === 2 ? { kind, block: segments[0], param: segments[1] } : null case 'edges': { if (segments.length !== 2) return null diff --git a/packages/workflow-code/src/api.ts b/packages/workflow-code/src/api.ts index f820d042429..cd1e459fb46 100644 --- a/packages/workflow-code/src/api.ts +++ b/packages/workflow-code/src/api.ts @@ -179,7 +179,7 @@ export type BlockAttribute = | 'retry' | 'branches' | 'subflow' - | 'opaque' + | 'extra' export type BlockChange = | { kind: 'param'; param: SubBlockId } @@ -282,13 +282,6 @@ export interface PrintOptions { codeDir?: string /** Defaults to 100 (biome.json). */ lineWidth?: number - /** - * Also print the state source never needs (`sim workflows source get --verbose`): inactive - * values, the pair member a selector picked (`picked()`), `meta.modes`, off-type loop and - * parallel fields and unknown `block.data`. Default `false`: source holds only what executes, - * and apply restores the rest from the stored workflow. - */ - verbose?: boolean } export interface PrintInput { diff --git a/packages/workflow-code/src/canonicalize/hostile.test.ts b/packages/workflow-code/src/canonicalize/hostile.test.ts index bad92d095a1..1f515bc8f96 100644 --- a/packages/workflow-code/src/canonicalize/hostile.test.ts +++ b/packages/workflow-code/src/canonicalize/hostile.test.ts @@ -109,8 +109,8 @@ describe('canonicalize: prototype-named keys', () => { }) const call = canonical.workflow.blocks.call expect(Object.hasOwn(call.params, '__proto__')).toBe(true) - expect(Object.hasOwn(call.opaque?.data ?? {}, '__proto__')).toBe(true) - expect(Object.getOwnPropertyDescriptor(call.opaque?.data ?? {}, '__proto__')?.value).toEqual({ + expect(Object.hasOwn(call.extra ?? {}, '__proto__')).toBe(true) + expect(Object.getOwnPropertyDescriptor(call.extra ?? {}, '__proto__')?.value).toEqual({ kept: true, }) }) diff --git a/packages/workflow-code/src/canonicalize/index.test.ts b/packages/workflow-code/src/canonicalize/index.test.ts index cd21a4f9c14..12804413448 100644 --- a/packages/workflow-code/src/canonicalize/index.test.ts +++ b/packages/workflow-code/src/canonicalize/index.test.ts @@ -1151,7 +1151,7 @@ describe('canonicalize: subflows (step 2, quirk 19)', () => { }) }) - it('keeps an unknown parallel type under opaque data and reports it', () => { + it('keeps an unknown parallel type under extra and reports it', () => { const result = run( workflow([ blockState( @@ -1165,11 +1165,11 @@ describe('canonicalize: subflows (step 2, quirk 19)', () => { ) const fan = onlyBlock(result, 'fan') expect(fan.subflow).toEqual({ kind: 'parallel', count: 3, batchSize: 50 }) - expect(fan.opaque).toEqual({ data: { parallelType: 'weird' } }) + expect(fan.extra).toEqual({ parallelType: 'weird' }) expect(result.diagnostics.filter((d) => d.code === 'W_CANON_SUBFLOW_REPAIRED')).toHaveLength(2) }) - it('takes the parent from data.parentId, and keeps a dangling parent under opaque data', () => { + it('takes the parent from data.parentId, and keeps a dangling parent under extra', () => { const result = run( workflow([ blockState('l1', 'loop', 'Each', {}, { data: { loopType: 'for', count: 2 } }), @@ -1178,15 +1178,15 @@ describe('canonicalize: subflows (step 2, quirk 19)', () => { ]) ) expect(onlyBlock(result, 'in').parent).toBe('each') - expect(onlyBlock(result, 'in').opaque).toBeUndefined() + expect(onlyBlock(result, 'in').extra).toBeUndefined() expect(onlyBlock(result, 'lost').parent).toBeNull() - expect(onlyBlock(result, 'lost').opaque).toEqual({ data: { parentId: 'gone' } }) + expect(onlyBlock(result, 'lost').extra).toEqual({ parentId: 'gone' }) expect(codes(result)).toContain('W_CANON_DANGLING_PARENT') }) }) describe('canonicalize: block fields (quirk 22)', () => { - it('carries locked, triggerMode and advancedMode, raw retry, and unknown data under opaque', () => { + it('carries locked, triggerMode and advancedMode, raw retry, and unknown data under extra', () => { const result = run( workflow([ blockState( @@ -1207,7 +1207,7 @@ describe('canonicalize: block fields (quirk 22)', () => { const code = onlyBlock(result, 'code') expect(code.locked).toBe(true) expect(code.retry).toEqual({ enabled: false, maxTries: 4, waitBetweenTriesMs: 10 }) - expect(code.opaque).toEqual({ data: { someFutureFlag: 'x' } }) + expect(code.extra).toEqual({ someFutureFlag: 'x' }) expect(result.layout.code).toEqual({ x: 5, y: 6, w: 100 }) }) }) diff --git a/packages/workflow-code/src/canonicalize/index.ts b/packages/workflow-code/src/canonicalize/index.ts index 40a08487d04..0cc2a6f6bfb 100644 --- a/packages/workflow-code/src/canonicalize/index.ts +++ b/packages/workflow-code/src/canonicalize/index.ts @@ -32,7 +32,7 @@ import { canonicalParams } from './params' import { loopSpec, parallelSpec, SUBFLOW_DATA_KEYS } from './subflows' import { toJson, toValue } from './values' -/** `block.data` keys the model or the lock layout owns; anything else is kept under `opaque`. */ +/** `block.data` keys the model or the lock layout owns; anything else is kept under `extra`. */ const LAYOUT_DATA_KEYS = new Set(['width', 'height']) const MODES = new Set(['basic', 'advanced']) @@ -176,11 +176,11 @@ export const canonicalize: CanonicalizeFn = (state, options) => { }) } - const opaqueData: Record = {} + const extraData: Record = {} const parentId = typeof data.parentId === 'string' ? data.parentId : undefined const parent = parentId !== undefined ? (keyById.get(parentId) ?? null) : null if (data.parentId != null && (parentId === undefined || parent === null)) { - opaqueData.parentId = toJson(data.parentId) + extraData.parentId = toJson(data.parentId) report(context, { code: 'W_CANON_DANGLING_PARENT', severity: 'warning', @@ -251,9 +251,9 @@ export const canonicalize: CanonicalizeFn = (state, options) => { if (dataKey === 'extent' && value === 'parent' && parent !== null) continue if (dataKey === 'canonicalModes' && isModeMap(value)) continue if (isContainer && SUBFLOW_DATA_KEYS.has(dataKey) && !rejectedDataKeys.has(dataKey)) continue - setOwn(opaqueData, dataKey, toJson(value)) + setOwn(extraData, dataKey, toJson(value)) } - if (Object.keys(opaqueData).length > 0) canonical.opaque = { data: opaqueData } + if (Object.keys(extraData).length > 0) canonical.extra = extraData if (catalog && !isContainer) { const activityValues = overrides ? { ...rawValues, __canonicalModes: overrides } : rawValues diff --git a/packages/workflow-code/src/canonicalize/subflows.ts b/packages/workflow-code/src/canonicalize/subflows.ts index 47a6bd4163a..5171a8e2bdd 100644 --- a/packages/workflow-code/src/canonicalize/subflows.ts +++ b/packages/workflow-code/src/canonicalize/subflows.ts @@ -24,7 +24,7 @@ export const SUBFLOW_DATA_KEYS: ReadonlySet = new Set([ /** A subflow config with the `block.data` keys whose stored value it could not represent. */ export interface SubflowResult { spec: S - /** Kept verbatim under `opaque.data` so nothing is lost. */ + /** Kept verbatim under `extra` so nothing is lost. */ rejectedDataKeys: string[] } diff --git a/packages/workflow-code/src/code-files/bijection.test.ts b/packages/workflow-code/src/code-files/bijection.test.ts index cd4a8dccaaa..d5a819166cc 100644 --- a/packages/workflow-code/src/code-files/bijection.test.ts +++ b/packages/workflow-code/src/code-files/bijection.test.ts @@ -1,12 +1,6 @@ import fc from 'fast-check' import { describe, expect, it } from 'vitest' -import { - checkCodeFileBijection, - codeFileCodec, - codeFileLanguage, - fromCodeFile, - toCodeFile, -} from './index' +import { checkCodeFileBijection, codeFileLanguage, fromCodeFile, toCodeFile } from './index' describe('toCodeFile rewrites only code-position tokens', () => { it.each([ @@ -112,20 +106,6 @@ describe('checkCodeFileBijection', () => { }) }) -describe('codeFileCodec (the printer interface)', () => { - it('returns the file form only when it reads back exactly', () => { - expect(codeFileCodec.toFile('return ', 'javascript')).toBe('return $ref.a.b') - expect(codeFileCodec.toFile('return .length', 'javascript')).toBeNull() - expect(codeFileCodec.toFile('return (', 'javascript')).toBeNull() - }) - - it('reads a file back, or null when it does not parse', () => { - expect(codeFileCodec.fromFile('return $ref.a.b', 'javascript')).toBe('return ') - expect(codeFileCodec.fromFile('return (', 'javascript')).toBeNull() - expect(codeFileCodec.fromFile('return (', 'shell')).toBe('return (') - }) -}) - describe('codeFileLanguage', () => { it.each([ ['fns/a.js', 'javascript'], diff --git a/packages/workflow-code/src/code-files/bijection.ts b/packages/workflow-code/src/code-files/bijection.ts index 08702a60523..7951e197c75 100644 --- a/packages/workflow-code/src/code-files/bijection.ts +++ b/packages/workflow-code/src/code-files/bijection.ts @@ -25,24 +25,3 @@ export function checkCodeFileBijection( if (!back.ok) return { ok: false, reason: 'syntax' } return back.code === code ? { ok: true, file } : { ok: false, reason: 'lossy' } } - -/** - * The code-file codec the printer takes (`createPrintWorkflow(codec)`, src/print/printer.ts): - * `toFile` is `null` unless the file form reads back to the stored code exactly, and `fromFile` - * is `null` for a file that does not parse. - */ -export interface CodeFileCodec { - toFile(code: string, language: CodeFileLanguage): string | null - fromFile(text: string, language: CodeFileLanguage): string | null -} - -export const codeFileCodec: CodeFileCodec = { - toFile(code, language) { - const check = checkCodeFileBijection(code, language) - return check.ok ? check.file : null - }, - fromFile(text, language) { - const back = fromCodeFile(text, language) - return back.ok ? back.code : null - }, -} diff --git a/packages/workflow-code/src/code-files/index.ts b/packages/workflow-code/src/code-files/index.ts index a6f12fd57dd..cd0f412aa3f 100644 --- a/packages/workflow-code/src/code-files/index.ts +++ b/packages/workflow-code/src/code-files/index.ts @@ -1,8 +1,6 @@ export { type CodeFileBijection, - type CodeFileCodec, checkCodeFileBijection, - codeFileCodec, } from './bijection' export { type CodeFileSyntaxError, type FromCodeFileResult, fromCodeFile } from './from-file' export { diff --git a/packages/workflow-code/src/code-meta.ts b/packages/workflow-code/src/code-meta.ts index 388ddc9d9a1..7dc584fa0f9 100644 --- a/packages/workflow-code/src/code-meta.ts +++ b/packages/workflow-code/src/code-meta.ts @@ -220,8 +220,8 @@ export function emptyCodeMeta(): WorkflowCodeMetaV1 { } /** - * Rewrites the ids an anchor carries: the block segment of `block`, `param`, `inactive` and - * `edges` anchors through `block`, the `var` segment through `variable`. A callback returning + * Rewrites the ids an anchor carries: the block segment of `block`, `param` and `edges` + * anchors through `block`, the `var` segment through `variable`. A callback returning * `null` drops the anchor; `header`, `wiring` and `footer` pass unchanged. */ export function mapAnchorIds( diff --git a/packages/workflow-code/src/compile/SYNTAX.md b/packages/workflow-code/src/compile/SYNTAX.md index cdb522bd472..ac591f8d0d8 100644 --- a/packages/workflow-code/src/compile/SYNTAX.md +++ b/packages/workflow-code/src/compile/SYNTAX.md @@ -1,7 +1,7 @@ # Workflow source syntax the compiler accepts -The compiler (`compileWorkflow`) accepts exactly what the printer emits, lean or verbose, plus a -few hand-written conveniences listed under "Also accepted". `printer-goldens.test.ts` compiles +The compiler (`compileWorkflow`) accepts exactly what the printer emits, plus a few hand-written +conveniences listed under "Also accepted". `printer-goldens.test.ts` compiles every printer golden, over the real catalog, with zero errors to a workflow that runs as the one it was printed from. Where s2 and s3 disagreed, the printer's choice (build-spec first, then s2) was taken. @@ -10,9 +10,8 @@ taken. deploy reads, wiring, branches and the config of the loop or parallel type in effect. What only the canvas cares about is never required: which member of a basic/advanced pair shows a value, whether a selector or a typed value produced an id, inactive values, the other loop or parallel -types' fields, layout and unknown residue. Apply keeps it from the stored workflow. The default -print leaves it out; `sim workflows source get --verbose` prints it, and the compiler still -accepts it. +types' fields, layout and unknown residue. Source has no syntax for it: the printer leaves it out +and apply keeps it from the stored workflow (`materialize/preserve.ts`). **Defaults rule.** An omitted param is the editor default canvas creation writes (the catalog's `valueDefault` for a visible field, `defaultValue` for a hidden one), so a block written with no @@ -40,20 +39,19 @@ to the default and writes `null` for an active field that has a default but no s - Params: a subBlock id, or the `canonicalParamId` for every subBlock group sharing one (even a group of one). Writing a group member by its own id is `E_UNKNOWN_PARAM` with a hint. A pinned id (`operation`, a builder's `fixed`) is `E_FIXED_PARAM`; the compiler adds pinned values. -- Pair mode: a selector call (`binding`, `table`, `kb`, `workflow`, `skill`, `customTool`, `mcp`, - `sandbox`, `folder`, `upload`, `picked`) or a non-empty array of them is basic, anything else - advanced. `meta.modes` always wins, so the compiler never emits `E_MODE_CONFLICT`. Every group - on the block gets a mode; an unwritten group without `meta.modes` is `basic`. On apply the mode - is canvas state: when the pair's value is unchanged the stored member and mode stay, and a plain - id written where the stored block shows the selector member stays in that member. The lean - printer writes `meta.modes` only where the value kind would pick a member that stores the value - differently (a list or object literal into a JSON code or input-format member); the verbose - printer writes it wherever derivation would be wrong. +- Pair mode follows from the value kind alone; there is no `meta.modes`. A selector call + (`binding`, `table`, `kb`, `workflow`, `skill`, `customTool`, `mcp`, `sandbox`, `folder`, + `upload`) or a non-empty array of them is basic, anything else advanced, except that a list or + object literal never lands in a JSON code member (subBlock type `code`) when the pair's other + member is not code: it goes to that other member as written (`table_v2`'s `filterInput`: a list + is the filter builder's, JSON text the code editor's). The printer writes a JSON code member's + value as the text it stores (the catalog gives such a member value kind `json`), never as the + literal it stringifies, so both directions are unambiguous. Every group on the block gets a mode; an unwritten group is `basic`. On apply the + mode is canvas state: when the pair's value is unchanged the stored member and mode stay, and a + plain id written where the stored block shows the selector member stays in that member. - `meta`: `key`, `disabled`, `locked`, `advancedMode`, `triggerMode` (any builder), `errorPort`, - `retry: { enabled, maxTries, waitBetweenTriesMs }`, `modes`, `branches`, `inactive`, - `$unknown` (opaque `block.data`, plain JSON). The lean printer writes `$unknown` only for a - container's unreadable subflow keys, which the serializer passes through; apply keeps the rest - from the stored workflow. + `retry: { enabled, maxTries, waitBetweenTriesMs }`, `branches`, `extra`, `extraData` + (containers only). - A builder prints only blocks on its own surface: a trigger-mode builder never prints an action block, nor an action builder a block in trigger mode (a trigger block's builders fit either); such a block prints through `block()`. @@ -70,12 +68,17 @@ to the default and writes `null` for an active field that has a default but no s losslessly but never introduce one; renaming the block on the canvas or in source retires the override. - `errorPort` in the CWM is `meta.errorPort || the block has an error edge`. -- `inactive: { : value }` accepts any id (annotated stale values, the non-effective - pair member, ids the catalog does not know). Each id becomes a param and is listed in - `annotations.inactive`. Source never needs it: apply restores every value that does not run - from the stored workflow, whatever `inactive` says. The lean printer writes it only for a stored - id the catalog does not declare that still runs (a schema-agnostic custom block's input, the - agent's legacy prompt fields); the verbose printer lists every inactive value. +- `extra: { : value }` holds stored params that run but have no SDK syntax, and is + the only place source takes them: a schema-agnostic custom block's input, the agent's legacy + prompt fields, a container's stored params. A key the block's params can name is + `E_UNSUPPORTED_SYNTAX`. Values that never run are not written: apply restores them from the + stored workflow. +- `extraData: { : json }`, on a loop or parallel only, holds the subflow keys of + `block.data` (`count`, `collection`, `loopType`, `whileCondition`, `doWhileCondition`, + `parallelType`, `batchSize`) canonicalize could not read as config, which the serializer passes + on. It is separate from `extra` because containers stored by the canvas often carry params + under those same names. Plain JSON; any other key, or `extraData` on another block, is + `E_UNSUPPORTED_SYNTAX`. ## Values @@ -86,8 +89,8 @@ to the default and writes `null` for an active field that has a default but no s shape-checked; a `literal` node's `value` is not inspected. - `todo()`: absent (no editor default fills it), with `W_REQUIRED_MISSING` when the field is required. -- A plain string is fine where a selector is expected (`channel: 'C0123'`); `picked('C0123')` is - only what the verbose printer writes for a selector-picked id. +- A plain string is fine where a selector is expected (`channel: 'C0123'`): it lands in the + pair's advanced member, and apply keeps the stored selector member when that showed the id. - Strings: `'...'`, untagged templates without `${}`, and `t`/`js`/`py`/`sh`/`json`/`md` tagged templates (cooked text). Interpolations: refs, `env.X`, `vars.x`, loop params, `ref('raw')`, string and number literals. @@ -101,7 +104,7 @@ to the default and writes `null` for an active field that has a default but no s `raw({ $sim: 'var', key })`), and prints whole-string `` text there as `` t`${vars.x}` `` (elsewhere bare). Golden: `print/__golden__/vars-by-field.txt`. - A JSON code field (subBlock type `code`) written as an object or array literal compiles to - `JSON.stringify(value, null, 2)`. + `JSON.stringify(value, null, 2)` (in a pair, see pair mode above). - inputFormat (`structured: 'inputFormat'`) as a record: `name: 'string'` → `{ name, type: 'string', value: '' }`; `name: { type, ... }` → `{ name, type, ... }`; `{}` is the empty list. Arrays pass through; the printer writes a list the record cannot carry (an @@ -132,10 +135,9 @@ to the default and writes `null` for an active field that has a default but no s `parallel.count('N', { count, batchSize })`, `parallel.collection('N', { collection, batchSize })`, and bare `parallel('N', { count, collection, batchSize })` (no `parallelType`). - Third argument: `(p) => { ... }`, or `(p) => block(...)` which implies `p.to(block)`. -- The type's other stored fields go under `meta.inactive` by CWM name (`iterations`, - `forEachItems`, `whileCondition`, `doWhileCondition`, `count`, `distribution`); other inactive - keys are container params. Only the verbose printer writes them, and apply keeps them from the - stored workflow either way. A loop with no `iterations` anywhere gets 5, the count that runs. +- The other types' stored fields have no syntax; apply keeps them from the stored workflow. A + loop with no `count` gets 5, the count that runs. `meta.extra` carries the container's stored + params and `meta.extraData` its unreadable subflow data (see `meta` above). - `p.x` is `` / `` when `p`'s container is the innermost of its kind around the block, else the named ``. `container.results` / `container.index` are named refs. @@ -156,7 +158,7 @@ to the default and writes `null` for an active field that has a default but no s - Same line after an item: trailing on it; otherwise leading on the next item; after the last item: `footer` in a body, trailing on the last param in a params object. - Items: statements (`block` / `edges` anchors), params (`param`, the written name, so the - canonical id for pairs), `inactive` entries, variables (`var`). + canonical id for pairs), `extra` entries (`param`, by key), variables (`var`). - The group above the first top-level wiring statement goes to `wiring` only when a blank line separates it from the statement; otherwise it goes to that statement's `edges` anchor. - Anything inside an expression is hoisted to the enclosing anchor with `W_COMMENT_MOVED`. diff --git a/packages/workflow-code/src/compile/blocks.ts b/packages/workflow-code/src/compile/blocks.ts index fcfe0cb30ce..4e64063f450 100644 --- a/packages/workflow-code/src/compile/blocks.ts +++ b/packages/workflow-code/src/compile/blocks.ts @@ -2,6 +2,7 @@ import type { Node, ObjectExpression, ObjectProperty } from '@babel/types' import { isRecordLike } from '@sim/utils/object' import type { BlockRetryConfig } from '@sim/workflow-types/workflow' import { encodeAnchor } from '../anchors' +import { SUBFLOW_DATA_KEYS } from '../canonicalize/subflows' import { editorDefaults } from '../catalog/defaults' import type { CatalogBlock, CatalogSubBlock } from '../catalog/types' import { type CodeFileLanguage, codeFileLanguage, fromCodeFile } from '../code-files' @@ -39,15 +40,12 @@ import { compileJsonLiteral, compileValue, isSelectorForm, - literalText, objectEntries, type ValueSite, } from './values' interface CompiledBlock { block: CanonicalBlock - /** Param ids written under `meta.inactive`. */ - inactive: SubBlockId[] /** Repo-relative path of the function-code file, when the code came from `file()`. */ codeFile?: string } @@ -60,10 +58,9 @@ const META_KEYS = [ 'triggerMode', 'errorPort', 'retry', - 'modes', 'branches', - 'inactive', - '$unknown', + 'extra', + 'extraData', ] const BRANCH_KEY = /^[A-Za-z_$][A-Za-z0-9_$]*$/ const EDGE_METHOD_NAMES = new Set(['to', 'onError']) @@ -77,11 +74,12 @@ interface CompiledMeta { retry: BlockRetryConfig | null advancedMode: boolean triggerMode: boolean | null - modes: Map /** Per-row `title` and `extra` (the printer's meta `branches`). */ branches: Array<[string, ObjectProperty]> - inactive: Array<[string, ObjectProperty]> - opaque: Record | null + /** Stored fields that run but have no SDK syntax (the printer's meta `extra`). */ + extra: Array<[string, ObjectProperty]> + /** A container's unreadable subflow `block.data` keys (the printer's meta `extraData`). */ + extraData: { node: Node; data: Record } | null } function unsupported( @@ -172,10 +170,9 @@ function compileMeta(ctx: CompileContext, node: Node | undefined, site: ValueSit retry: null, advancedMode: false, triggerMode: null, - modes: new Map(), branches: [], - inactive: [], - opaque: null, + extra: [], + extraData: null, } if (!node) return meta const { decl } = site @@ -205,57 +202,38 @@ function compileMeta(ctx: CompileContext, node: Node | undefined, site: ValueSit case 'retry': meta.retry = compileRetry(ctx, property.value, site) break - case 'modes': { - const modes = objectValue(ctx, property, decl, "modes: { channel: 'basic' }") - if (!modes) break - for (const [param, modeProperty] of objectEntries(ctx, modes)) { - const mode = literalText(modeProperty.value) - if (mode !== 'basic' && mode !== 'advanced') { - unsupported( - ctx, - modeProperty.value, - "A mode is 'basic' or 'advanced'.", - "Write 'basic' or 'advanced'.", - decl - ) - continue - } - meta.modes.set(param, mode) - } - break - } case 'branches': { const branches = objectValue(ctx, property, decl, "branches: { key: { title: '...' } }") if (branches) meta.branches = objectEntries(ctx, branches) break } - case 'inactive': { - const inactive = objectValue(ctx, property, decl, 'inactive: { field: value }') - if (!inactive) break - meta.inactive = objectEntries(ctx, inactive) + case 'extra': { + const extra = objectValue(ctx, property, decl, 'extra: { field: value }') + if (!extra) break + meta.extra = objectEntries(ctx, extra) registerList( ctx, - inactive, - meta.inactive, - (param) => encodeAnchor({ kind: 'inactive', block: decl.key, param }), + extra, + meta.extra, + (param) => encodeAnchor({ kind: 'param', block: decl.key, param }), decl ) break } - case '$unknown': { + case 'extraData': { const json = compileJsonLiteral(ctx, property.value, site) if (json === undefined) break - if (!isRecordLike(json)) { + if (!isRecordLike(json) || Object.keys(json).some((k) => !SUBFLOW_DATA_KEYS.has(k))) { unsupported( ctx, property.value, - '$unknown is an object.', - 'Write $unknown: { key: value }.', + 'extraData holds subflow data keys only.', + `Keys are ${[...SUBFLOW_DATA_KEYS].join(', ')}.`, decl ) break } - meta.opaque = json as Record + meta.extraData = { node: property, data: json as Record } break } default: @@ -578,17 +556,30 @@ function isJsonContainer(value: Value): boolean { } /** - * Compiles one catalog param into its member subBlock (build-spec decision 7): a selector call - * (or a non-empty array of them) is basic, anything else advanced, and an explicit `meta.modes` - * entry wins either way, as the printer writes one exactly when the derived mode would be wrong. + * The member a pair value compiles into (build-spec decision 7): a selector call (or a non-empty + * array of them) is basic, anything else advanced. A list or object literal never lands in a JSON + * code member when the pair's other member takes it as written: the printer writes a JSON code + * member's value as the text it stores, never as the literal it stringifies. */ +function pairMode(field: Extract, value: CompiledValue): ParamMode { + if (value.kind !== 'value') return 'basic' + const derived: ParamMode = isSelectorForm(value.form) ? 'basic' : 'advanced' + if (value.form !== 'literal' || !isJsonContainer(value.value)) return derived + const other: ParamMode = derived === 'basic' ? 'advanced' : 'basic' + const otherMember = other === 'basic' ? field.basic : field.advanced + return memberFor(field, derived)?.type === 'code' && otherMember && otherMember.type !== 'code' + ? other + : derived +} + +/** Compiles one catalog param into its member subBlock (`pairMode` picks a pair's member). */ function compileField( ctx: CompileContext, state: BlockState, field: CatalogField, property: ObjectProperty ): void { - const { decl, meta, params, modes } = state + const { decl, params, modes } = state const firstSub = field.kind === 'single' ? field.sub : field.members[0] const site = fieldSite(state.site, firstSub) if (firstSub?.valueKind === 'tools') { @@ -599,8 +590,7 @@ function compileField( const compiled = compileValue(ctx, property.value, site) if (!compiled) return if (compiled.kind === 'absent' || compiled.kind === 'todo') { - const member = - field.kind === 'pair' ? memberFor(field, meta.modes.get(field.param) ?? 'basic') : field.sub + const member = field.kind === 'pair' ? memberFor(field, 'basic') : field.sub if (member) state.unset.add(member.id) if (compiled.kind === 'todo') state.todos.set(field.param, property) return @@ -622,8 +612,7 @@ function compileField( let target: CatalogSubBlock | undefined if (field.kind === 'pair') { - const mode = - meta.modes.get(field.param) ?? (isSelectorForm(compiled.form) ? 'basic' : 'advanced') + const mode = pairMode(field, compiled) if (isModalPair(field)) setOwn(modes, field.param, mode) target = memberFor(field, mode) } else { @@ -832,15 +821,23 @@ function compileRegularBlock(ctx: CompileContext, decl: BlockDecl): CompiledBloc } } - for (const [param, mode] of meta.modes) { - if (!Object.hasOwn(modes, param)) setOwn(modes, param, mode) - } for (const field of index?.fields.values() ?? []) { if (isModalPair(field) && !Object.hasOwn(modes, field.param)) setOwn(modes, field.param, 'basic') } - const inactive = compileInactive(ctx, meta.inactive, params, site) + compileExtraParams(ctx, meta.extra, params, site, (id) => + Boolean(index?.subBlocks.has(id) || pinned.has(id) || id === branchField?.subBlockId) + ) + if (meta.extraData) { + unsupported( + ctx, + meta.extraData.node, + 'Only a loop or parallel has extraData.', + 'Remove extraData; apply keeps the stored block data.', + decl + ) + } if (catalogBlock) { for (const [id, value] of editorDefaults(catalogBlock)) { if (Object.hasOwn(params, id) || state.unset.has(id) || pinned.has(id)) continue @@ -848,7 +845,7 @@ function compileRegularBlock(ctx: CompileContext, decl: BlockDecl): CompiledBloc setOwn(params, id, { kind: 'value', value }) } } - if (index) checkFields(ctx, index, state, inactive.properties) + if (index) checkFields(ctx, index, state) const block: CanonicalBlock = { key: decl.key, @@ -864,69 +861,43 @@ function compileRegularBlock(ctx: CompileContext, decl: BlockDecl): CompiledBloc params, modes, ...(branches && { branches }), - ...(meta.opaque && { opaque: { data: meta.opaque } }), } - return { block, inactive: inactive.ids, ...(codeFile !== undefined && { codeFile }) } -} - -function catalogSubBlock(decl: BlockDecl, id: SubBlockId): CatalogSubBlock | undefined { - const block = - decl.builder.kind === 'catalog' || decl.builder.kind === 'generic' - ? decl.builder.block - : undefined - return block?.subBlocks.find((candidate) => candidate.id === id) + return { block, ...(codeFile !== undefined && { codeFile }) } } /** - * `meta.inactive`: stored values kept but not effective (build-spec decision 2): annotated stale - * values, the non-effective member of a pair, and ids the catalog does not know. Any id is - * accepted, by subBlock id. + * `meta.extra` entries that become params: stored ids with no SDK syntax that still run (a + * schema-agnostic custom block's input, the agent's legacy prompt fields, a container's stored + * params). An id the block's params can name (`declared`) or already hold is refused. */ -function compileInactive( +function compileExtraParams( ctx: CompileContext, entries: Array<[string, ObjectProperty]>, params: Record, - site: ValueSite -): { ids: SubBlockId[]; properties: Map } { - const ids: SubBlockId[] = [] - const properties = new Map() + site: ValueSite, + declared: (id: SubBlockId) => boolean +): void { const { decl } = site for (const [id, property] of entries) { - if (Object.hasOwn(params, id)) { + if (declared(id) || Object.hasOwn(params, id)) { unsupported( ctx, property, - `${id} is both active and inactive.`, - 'Keep the value in params or in inactive, not both.', + `${id} is a param of this block, not an extra field.`, + 'Write it in params.', decl ) continue } - recordSpan(ctx, { kind: 'inactive', block: decl.key, param: id }, property) - const sub = catalogSubBlock(decl, id) - if (sub?.valueKind === 'tools') { - const tools = compileToolList(ctx, property.value, fieldSite(site, sub)) - if (!tools) continue - setOwn(params, id, { kind: 'tools', tools }) - } else { - const compiled = compileValue(ctx, property.value, fieldSite(site, sub)) - if (!compiled || compiled.kind !== 'value') continue - setOwn(params, id, { kind: 'value', value: compiled.value }) - } - ids.push(id) - properties.set(id, property) + recordSpan(ctx, { kind: 'param', block: decl.key, param: id }, property) + const compiled = compileValue(ctx, property.value, site) + if (compiled?.kind === 'value') setOwn(params, id, { kind: 'value', value: compiled.value }) } - return { ids, properties } } /** Catalog warnings: visibility, required fields, value kinds (s3 §4 "Catalog checks"). */ -function checkFields( - ctx: CompileContext, - index: FieldIndex, - state: BlockState, - inactive: Map -): void { - const { decl, params, modes } = state +function checkFields(ctx: CompileContext, index: FieldIndex, state: BlockState): void { + const { decl, params } = state const values = storedValues(params) for (const entry of state.written) { const sub = index.subBlocks.get(entry.target) @@ -937,7 +908,7 @@ function checkFields( `${entry.param} is hidden under the block's current values; it is kept but not used.`, rangeOf(ctx, entry.property), { - hint: 'Remove it, or move it under meta.inactive.', + hint: 'Remove it; apply keeps the stored value.', blockKey: decl.key, param: entry.param, } @@ -952,19 +923,6 @@ function checkFields( ) } } - for (const [id, property] of inactive) { - const sub = index.subBlocks.get(id) - if (!sub || !isVisible(sub, values)) continue - const group = sub.canonicalParamId ? index.fields.get(sub.canonicalParamId) : undefined - const effective = group?.kind === 'pair' ? memberFor(group, modes[group.param] ?? 'basic') : sub - if (effective !== sub) continue - ctx.reporter.report( - 'W_INACTIVE_IS_ACTIVE', - `${id} is visible, so it is not inactive.`, - rangeOf(ctx, property), - { hint: 'Move it into params.', blockKey: decl.key, param: id } - ) - } for (const field of missingRequiredFields(index, values, (id) => Object.hasOwn(params, id))) { const todo = state.todos.get(field.param) ctx.reporter.report( @@ -990,10 +948,6 @@ const CONTAINER_CONFIG: Record> = { 'parallel.collection': { collection: 'distribution', batchSize: 'batchSize' }, parallel: { count: 'count', collection: 'distribution', batchSize: 'batchSize' }, } -const SUBFLOW_FIELDS: Record<'loop' | 'parallel', readonly string[]> = { - loop: ['iterations', 'forEachItems', 'whileCondition', 'doWhileCondition'], - parallel: ['count', 'distribution', 'batchSize'], -} const NUMBER_FIELDS = new Set(['iterations', 'count', 'batchSize']) const TEXT_FIELDS = new Set(['whileCondition', 'doWhileCondition']) @@ -1011,8 +965,9 @@ function numberLiteral(node: Node): number | null { /** * `loop.(name, config, body, meta?)` / `parallel[.](...)`. Config holds the fields - * the type uses; the subflow's other stored fields, and any params, sit under `meta.inactive` by - * their CWM names (build-spec decision 2, A9). + * the type uses; apply keeps the other types' fields from the stored workflow. `meta.extra` holds + * the container's stored params, and `meta.extraData` the subflow keys of `block.data` + * canonicalize could not read as config. */ function compileContainer(ctx: CompileContext, decl: BlockDecl): CompiledBlock | null { const builder = decl.builder @@ -1063,19 +1018,8 @@ function compileContainer(ctx: CompileContext, decl: BlockDecl): CompiledBlock | } } - const subflowFields = SUBFLOW_FIELDS[builder.container] - const activeFields = new Set(Object.values(configKeys)) - const paramEntries: Array<[string, ObjectProperty]> = [] - for (const [key, property] of meta.inactive) { - if (subflowFields.includes(key) && !activeFields.has(key)) { - recordSpan(ctx, { kind: 'inactive', block: decl.key, param: key }, property) - setField(key, property.value) - } else { - paramEntries.push([key, property]) - } - } const params: Record = {} - const inactive = compileInactive(ctx, paramEntries, params, site) + compileExtraParams(ctx, meta.extra, params, site, () => false) const json = (field: string): Json | undefined => fields.get(field) as Json | undefined const text = (field: string): string | undefined => { @@ -1112,8 +1056,6 @@ function compileContainer(ctx: CompileContext, decl: BlockDecl): CompiledBlock | } } - const modes: Record = {} - for (const [param, mode] of meta.modes) setOwn(modes, param, mode) const block: CanonicalBlock = { key: decl.key, name: decl.name, @@ -1126,11 +1068,11 @@ function compileContainer(ctx: CompileContext, decl: BlockDecl): CompiledBlock | errorPort: meta.errorPort, retry: meta.retry, params, - modes, + modes: {}, subflow, - ...(meta.opaque && { opaque: { data: meta.opaque } }), + ...(meta.extraData && { extra: meta.extraData.data }), } - return { block, inactive: inactive.ids } + return { block } } /** Pass 2 for one declaration. `null` for declarations already reported as invalid. */ diff --git a/packages/workflow-code/src/compile/grammar.test.ts b/packages/workflow-code/src/compile/grammar.test.ts index a55354bc334..2ff7bfacff2 100644 --- a/packages/workflow-code/src/compile/grammar.test.ts +++ b/packages/workflow-code/src/compile/grammar.test.ts @@ -6,7 +6,7 @@ import { compileWorkflow } from './index' import { TEST_CATALOG } from './test-catalog' const IMPORTS = - "import { agent, api, binding, block, condition, edge, env, file, fn, js, json, kb, loop, md, note, parallel, picked, raw, ref, router, slack, t, table, todo, trigger, upload, workflow } from '@sim/workflow-sdk'" + "import { agent, api, binding, block, condition, edge, env, file, fn, js, json, kb, loop, md, note, parallel, raw, ref, router, slack, t, table, todo, trigger, upload, workflow } from '@sim/workflow-sdk'" const DEFAULT_OPTIONS = "{ variables: { retries: { type: 'number', value: 3 } } }" @@ -150,11 +150,11 @@ describe('accepted grammar', () => { }) }) - it('lifts resources, picked ids, raw values and the generic block builder', () => { + it('lifts resources, raw values and the generic block builder', () => { const wf = ok( source( [ - "const send = slack.sendMessage('Send', { authMethod: 'oauth', credential: binding('support-slack'), channel: picked('C1'), text: 'hi' })", + "const send = slack.sendMessage('Send', { authMethod: 'oauth', credential: binding('support-slack'), channel: 'C1', text: 'hi' })", "const row = table.insertRow('Row', { tableId: table('leads'), data: raw('{\"a\":1}') })", "const legacy = block('custom_block_x', 'Legacy', { a: kb('docs'), b: workflow('enrich'), c: upload('files/a.pdf'), d: raw({ $sim: 'unresolved', kind: 'table', id: 't1' }), e: { $sim: 'plain' } }, { triggerMode: true })", ].join('\n') @@ -165,7 +165,7 @@ describe('accepted grammar', () => { kind: 'credential', key: 'support-slack', }) - expect(paramValue(wf, 'send', 'channel')).toBe('C1') + expect(paramValue(wf, 'send', 'manualChannel')).toBe('C1') expect(paramValue(wf, 'send', 'operation')).toBe('send') expect(paramValue(wf, 'row', 'tableId')).toEqual({ $sim: 'resource', @@ -199,27 +199,34 @@ describe('accepted grammar', () => { const wf = ok( source( [ - "const a = slack.sendMessage('A', { authMethod: 'oauth', channel: picked('C1'), text: 'x' })", "const b = slack.sendMessage('B', { authMethod: 'oauth', channel: 'C2', text: 'x' })", - "const c = slack.sendMessage('C', { authMethod: 'oauth', channel: 'C3', text: 'x' }, { modes: { channel: 'basic' } })", "const d = slack.sendMessage('D', { authMethod: 'oauth', text: 'x' })", "const e = slack.sendMessage('E', { authMethod: 'oauth', text: 'x' }, { advancedMode: true })", - "const f = slack.sendMessage('F', { authMethod: 'oauth', channel: picked('C4'), text: 'x' }, { modes: { channel: 'advanced' } })", ].join('\n') ) ) - expect(blockOf(wf, 'a').modes).toEqual({ channel: 'basic' }) - expect(paramValue(wf, 'a', 'channel')).toBe('C1') expect(blockOf(wf, 'b').modes).toEqual({ channel: 'advanced' }) expect(paramValue(wf, 'b', 'manualChannel')).toBe('C2') expect(blockOf(wf, 'b').params).not.toHaveProperty('channel') - expect(blockOf(wf, 'c').modes).toEqual({ channel: 'basic' }) - expect(paramValue(wf, 'c', 'channel')).toBe('C3') expect(blockOf(wf, 'd').modes).toEqual({ channel: 'basic' }) expect(blockOf(wf, 'e').modes).toEqual({ channel: 'basic' }) expect(blockOf(wf, 'e').advancedMode).toBe(true) - expect(blockOf(wf, 'f').modes).toEqual({ channel: 'advanced' }) - expect(paramValue(wf, 'f', 'manualChannel')).toBe('C4') + }) + + it('puts a list or object literal in the pair member that takes it as written, not JSON code', () => { + const wf = ok( + source( + [ + "const list = table.insertRow('List', { filterInput: [{ field: 'a', op: 'eq', value: 1 }] })", + 'const text = table.insertRow(\'Text\', { filterInput: json`{"field":"a"}` })', + ].join('\n') + ) + ) + expect(blockOf(wf, 'list').modes).toEqual({ filterInput: 'basic' }) + expect(paramValue(wf, 'list', 'filterBuilder')).toEqual([{ field: 'a', op: 'eq', value: 1 }]) + expect(blockOf(wf, 'list').params).not.toHaveProperty('filter') + expect(blockOf(wf, 'text').modes).toEqual({ filterInput: 'advanced' }) + expect(paramValue(wf, 'text', 'filter')).toBe('{"field":"a"}') }) it('compiles named condition branches, an empty branch object and router routes', () => { @@ -363,24 +370,26 @@ describe('accepted grammar', () => { expectDiagnostic(result, 'W_RAW_HANDLE', locate(text, 'edge(d')) }) - it('compiles block meta, inactive values and opaque residue', () => { + it('compiles block meta and extra fields', () => { const text = source( - "const s = slack.sendMessage('S', { authMethod: 'oauth', text: 'x' }, { disabled: true, locked: true, errorPort: true, retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 }, inactive: { botToken: 'old' }, $unknown: { width: 300 } })" + [ + "const s = slack.sendMessage('S', { authMethod: 'oauth', text: 'x' }, { disabled: true, locked: true, errorPort: true, retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 }, extra: { legacyField: 'old' } })", + "const l = loop.for('L', { count: 2 }, (p) => {\n const a = api('A', { url: 'u' })\n p.to(a)\n}, { extra: { note: 'kept' }, extraData: { loopType: 'weird' } })", + ].join('\n') ) const result = run(text) expect(errorsOf(result)).toEqual([]) const wf = result.workflow if (!wf) throw new Error('expected a workflow') - const s = blockOf(wf, 's') - expect(s).toMatchObject({ + expect(blockOf(wf, 's')).toMatchObject({ enabled: false, locked: true, errorPort: true, retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 }, - opaque: { data: { width: 300 } }, }) - expect(paramValue(wf, 's', 'botToken')).toBe('old') - expect(wf.annotations.inactive).toEqual({ s: ['botToken'] }) + expect(paramValue(wf, 's', 'legacyField')).toBe('old') + expect(blockOf(wf, 'l').extra).toEqual({ loopType: 'weird' }) + expect(paramValue(wf, 'l', 'note')).toBe('kept') }) it('pins the trigger builder, its fixed values and the operation', () => { @@ -539,12 +548,6 @@ describe('warnings that never block a compile', () => { 'url: todo()', ], ['a required field left out', "const a = api('A', {})", 'W_REQUIRED_MISSING', "api('A'"], - [ - 'an inactive value that is in fact visible', - "const s = slack.sendMessage('S', { authMethod: 'oauth', text: 'x' }, { inactive: { credential: binding('x') } })", - 'W_INACTIVE_IS_ACTIVE', - "credential: binding('x')", - ], ] as const)('warns on %s', (_label, body, code, needle) => { const text = source(body) const result = run(text) @@ -650,11 +653,18 @@ describe('errors, each with its code, location and hint', () => { 'Did you mean p.currentItem?', ], [ - 'a param that is both active and inactive', - "const s = slack.sendMessage('S', { authMethod: 'oauth', text: 'x' }, { inactive: { text: 'stale' } })", + 'subflow data on a block that is not a container', + "const s = slack.sendMessage('S', { authMethod: 'oauth', text: 'x' }, { extraData: { count: 2 } })", + 'E_UNSUPPORTED_SYNTAX', + 'extraData: { count: 2 }', + 'Remove extraData; apply keeps the stored block data.', + ], + [ + 'an extra field the block declares as a param', + "const s = slack.sendMessage('S', { authMethod: 'oauth', text: 'x' }, { extra: { threadTs: '1' } })", 'E_UNSUPPORTED_SYNTAX', - "text: 'stale'", - 'Keep the value in params or in inactive, not both.', + "threadTs: '1'", + 'Write it in params.', ], [ 'two variables whose names normalize alike', diff --git a/packages/workflow-code/src/compile/index.ts b/packages/workflow-code/src/compile/index.ts index e3b9db54c58..9b70538c549 100644 --- a/packages/workflow-code/src/compile/index.ts +++ b/packages/workflow-code/src/compile/index.ts @@ -10,7 +10,6 @@ import type { CanonicalBlock, CanonicalVariable, CanonicalWorkflow, - SubBlockId, VarKey, } from '../model' import { setOwn } from '../records' @@ -425,13 +424,11 @@ export const compileWorkflow: CompileWorkflowFn = (input) => { } const compiled = new Map() - const inactive: Record = {} const hints: LockHints = { blocks: {} } for (const decl of ctx.decls) { const result = compileBlock(ctx, decl) if (!result) continue compiled.set(decl.key, result.block) - if (result.inactive.length > 0) setOwn(inactive, decl.key, result.inactive) setOwn(hints.blocks, decl.key, { ...(decl.binding !== null && { binding: decl.binding }), order: decl.order, @@ -470,7 +467,7 @@ export const compileWorkflow: CompileWorkflowFn = (input) => { blocks: Object.fromEntries(compiled), edges: sortedEdges, variables: Object.fromEntries(ctx.variables), - annotations: { inactive, comments: ctx.comments.comments }, + annotations: { inactive: {}, comments: ctx.comments.comments }, } return { workflow, diagnostics: reporter.diagnostics, spans, hints, sdkMajor: parsed.sdkMajor } } diff --git a/packages/workflow-code/src/compile/printer-goldens.test.ts b/packages/workflow-code/src/compile/printer-goldens.test.ts index 05020928a7c..4f82e25949e 100644 --- a/packages/workflow-code/src/compile/printer-goldens.test.ts +++ b/packages/workflow-code/src/compile/printer-goldens.test.ts @@ -1,6 +1,6 @@ import { compareStrings } from '@sim/utils/string' import { describe, expect, it } from 'vitest' -import type { CompileResult, PrintOptions } from '../api' +import type { CompileResult } from '../api' import { executableView } from '../equivalence/executable' import type { CanonicalWorkflow } from '../model' import { printWorkflow } from '../print' @@ -12,9 +12,7 @@ import { compileWorkflow } from './index' * P0/P3/P4 against the printer, over the real catalog (`real-catalog.json`): every printer case * prints to source that compiles with zero errors (s3 D12), runs as the canonical workflow it was * printed from (its executable view: wave 4 source holds what executes, and apply restores the - * preserved UI state), and a lean print reprints to the same bytes. A verbose print compiles and - * runs the same too; it is a debugging view, so its reprint is not pinned. The - * printer's golden test pins the prints byte for byte. Annotations are not semantic, so only the + * preserved UI state), and reprints to the same bytes. The printer's golden test pins the prints byte for byte. Annotations are not semantic, so only the * comment texts are compared: the printer hoists a comment whose anchor it does not print and * drops one whose block is gone. */ @@ -48,21 +46,20 @@ function expectRoundTrip(result: CompileResult, original: CanonicalWorkflow, gol } describe('printer cases compile back to their canonical workflow', () => { - const modes: Array<[string, PrintOptions]> = [ - ['lean', { functionCode: 'inline' }], - ['verbose', { functionCode: 'inline', verbose: true }], - ] for (const testCase of cases) { - for (const [mode, options] of modes) { - it(`${testCase.name} (${mode})`, () => { - const print = (workflow: CanonicalWorkflow) => - printWorkflow({ workflow, catalog, hints: testCase.hints, options }).files[0].text - const golden = print(testCase.workflow) - const result = compile(golden) - expectRoundTrip(result, testCase.workflow, golden) - if (mode === 'lean' && result.workflow) expect(print(result.workflow)).toBe(golden) - }) - } + it(testCase.name, () => { + const print = (workflow: CanonicalWorkflow) => + printWorkflow({ + workflow, + catalog, + hints: testCase.hints, + options: { functionCode: 'inline' }, + }).files[0].text + const golden = print(testCase.workflow) + const result = compile(golden) + expectRoundTrip(result, testCase.workflow, golden) + if (result.workflow) expect(print(result.workflow)).toBe(golden) + }) } it('function-languages in files mode, with code files written by the code-file codec', () => { diff --git a/packages/workflow-code/src/compile/test-catalog.ts b/packages/workflow-code/src/compile/test-catalog.ts index 98c5fc86436..f3d0d7c891b 100644 --- a/packages/workflow-code/src/compile/test-catalog.ts +++ b/packages/workflow-code/src/compile/test-catalog.ts @@ -207,6 +207,15 @@ export const TEST_CATALOG: BlockCatalog = { }), sub('tableId', 'table-selector', 'resource', { resourceKind: 'table' }), sub('data', 'code', 'json', { language: 'json' }), + sub('filterBuilder', 'filter-builder', 'json', { + mode: 'basic', + canonicalParamId: 'filterInput', + }), + sub('filter', 'code', 'json', { + language: 'json', + mode: 'advanced', + canonicalParamId: 'filterInput', + }), ], { row: ANY } ), diff --git a/packages/workflow-code/src/compile/throughput.bench.ts b/packages/workflow-code/src/compile/throughput.bench.ts index 5b7b3766b67..b241a5a7504 100644 --- a/packages/workflow-code/src/compile/throughput.bench.ts +++ b/packages/workflow-code/src/compile/throughput.bench.ts @@ -36,7 +36,7 @@ function blockSource(index: number): string { ` const step${index} = slack.sendMessage('Step ${index}', {`, " authMethod: 'oauth',", " credential: binding('support-slack'),", - ` channel: picked('C0${index}'),`, + ` channel: 'C0${index}',`, ` text: t\`Update ${index}: ${ref('content')}\`,`, ' })', ].join('\n') @@ -54,7 +54,7 @@ function blockSource(index: number): string { const SOURCE = [ '// @sim-sdk 1', - "import { agent, api, binding, env, fn, js, picked, slack, t, trigger, workflow } from '@sim/workflow-sdk'", + "import { agent, api, binding, env, fn, js, slack, t, trigger, workflow } from '@sim/workflow-sdk'", '', "export default workflow('Bench', { description: 'Two hundred blocks.' }, () => {", " const start = trigger.start('Start', { inputFormat: { query: 'string' } })", diff --git a/packages/workflow-code/src/compile/values.ts b/packages/workflow-code/src/compile/values.ts index 2475daff9a9..04e72b5beb0 100644 --- a/packages/workflow-code/src/compile/values.ts +++ b/packages/workflow-code/src/compile/values.ts @@ -51,7 +51,7 @@ export interface ValueSite { * How a value was written, which picks the member of a basic/advanced pair (build-spec * decision 7) and decides whether `W_VALUE_KIND` applies (only to literals). */ -type ValueForm = 'literal' | 'ref' | 'template' | 'resource' | 'picked' | 'upload' | 'raw' +type ValueForm = 'literal' | 'ref' | 'template' | 'resource' | 'upload' | 'raw' export type CompiledValue = | { kind: 'value'; value: Value; form: ValueForm } @@ -62,7 +62,7 @@ export type CompiledValue = /** `file('./x.js')`: only valid as a function block's code. */ | { kind: 'file'; path: string; pathNode: Node } -const SELECTOR_FORMS: ReadonlySet = new Set(['resource', 'picked', 'upload']) +const SELECTOR_FORMS: ReadonlySet = new Set(['resource', 'upload']) export function isSelectorForm(form: ValueForm): boolean { return SELECTOR_FORMS.has(form) @@ -88,7 +88,6 @@ const TEMPLATE_TAGS = new Set(['t', 'js', 'json', 'md', 'py', 'sh']) export const SDK_VALUE_FUNCTIONS = new Set([ ...Object.keys(RESOURCE_CALLS), ...TEMPLATE_TAGS, - 'picked', 'raw', 'todo', 'ref', @@ -688,10 +687,6 @@ function compileCall( return { kind: 'value', value, form: path === 'upload' ? 'upload' : 'resource' } } switch (path) { - case 'picked': { - const argument = singleStringArgument(ctx, call, 'picked', site) - return argument ? { kind: 'value', value: argument.text, form: 'picked' } : null - } case 'ref': { const argument = singleStringArgument(ctx, call, 'ref', site) return argument ? { kind: 'value', value: `<${argument.text}>`, form: 'ref' } : null @@ -873,7 +868,7 @@ export function compileValue( } /** - * A literal-only JSON value (variables, `$unknown`, retry, tool policy): plain data, so a `$sim` + * A literal-only JSON value (variables, a container's `extra` data, retry, tool policy): plain data, so a `$sim` * key is just a key. No refs, no SDK calls. */ export function compileJsonLiteral( diff --git a/packages/workflow-code/src/diagnostics/codes.ts b/packages/workflow-code/src/diagnostics/codes.ts index f617debf911..843a5e4dffb 100644 --- a/packages/workflow-code/src/diagnostics/codes.ts +++ b/packages/workflow-code/src/diagnostics/codes.ts @@ -82,15 +82,11 @@ export type CompileCatalogCode = | 'E_UNKNOWN_PARAM' /** The builder already pins this param (`operation` or a `fixed` entry). */ | 'E_FIXED_PARAM' - /** `meta.modes` contradicts the mode the value kind implies. */ - | 'E_MODE_CONFLICT' /** * A param not visible under the block's current values. A warning, not an error, because stale * hidden values are preserved (build-spec decision 2); s3 called it `E_FIELD_NOT_APPLICABLE`. */ | 'W_FIELD_NOT_APPLICABLE' - /** A key under `meta.inactive` that is in fact active. */ - | 'W_INACTIVE_IS_ACTIVE' /** Includes `todo()` placeholders. */ | 'W_REQUIRED_MISSING' /** The value's JSON type differs from the field's `valueKind`; never coerced. */ @@ -181,7 +177,7 @@ export type CanonicalizeDiagnosticCode = | 'W_CANON_DANGLING_EDGE' /** * A block whose `data.parentId` names no stored block. It is placed at the root and the raw - * `parentId` is kept under `opaque.data`, so nothing is lost. + * `parentId` is kept under `extra`, so nothing is lost. */ | 'W_CANON_DANGLING_PARENT' /** An unknown edge handle, kept as a `raw` port. */ @@ -257,12 +253,8 @@ export type ApplyDiagnosticCode = | 'W_APPLY_HOSTED_KEY_DROPPED' /** Value validation rewrote a value; the response files are re-printed. */ | 'W_APPLY_VALUE_NORMALIZED' - /** A block whose type is `legacy` or `deprecated`. */ - | 'W_APPLY_SUNSET_BLOCK' /** A block's type changed; its id, webhook URL and schedules are replaced. */ | 'W_APPLY_TYPE_CHANGED' - /** Connections to blocks that did not survive the gates were dropped. */ - | 'W_APPLY_PENDING_CONNECTIONS_DROPPED' /** A blocking workflow lint finding, mapped to a source line. */ | 'E_APPLY_LINT' /** A non-blocking workflow lint finding, mapped to a source line. */ diff --git a/packages/workflow-code/src/diff/index.ts b/packages/workflow-code/src/diff/index.ts index f6b5e4c00f2..4b1ff4c3355 100644 --- a/packages/workflow-code/src/diff/index.ts +++ b/packages/workflow-code/src/diff/index.ts @@ -29,7 +29,7 @@ const ATTRIBUTES: Array> = [ 'retry', 'branches', 'subflow', - 'opaque', + 'extra', ] function unionKeys(left: object | undefined, right: object | undefined): string[] { diff --git a/packages/workflow-code/src/equivalence/executable.ts b/packages/workflow-code/src/equivalence/executable.ts index ab60cf6ea2c..7f22fc154ff 100644 --- a/packages/workflow-code/src/equivalence/executable.ts +++ b/packages/workflow-code/src/equivalence/executable.ts @@ -199,7 +199,7 @@ function executableBlock(block: CanonicalBlock, catalog: BlockCatalog): Executab if (block.subflow) { view.subflow = executableSubflow(block.subflow) const residue: Record = {} - for (const [key, value] of Object.entries(block.opaque?.data ?? {})) { + for (const [key, value] of Object.entries(block.extra ?? {})) { if (SUBFLOW_DATA_KEYS.has(key)) setOwn(residue, key, value) } if (Object.keys(residue).length > 0) view.subflowResidue = residue diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index 453bd92558f..e21fe89322b 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -80,7 +80,6 @@ export { type CodeFileLanguage, type CodeFileSyntaxError, checkCodeFileBijection, - codeFileCodec, codeFileLanguage, type FromCodeFileResult, fromCodeFile, @@ -185,5 +184,5 @@ export type { VarNode, WorkflowAnnotations, } from './model' -export { assignIdentifiers, createPrintWorkflow, printWorkflow } from './print' +export { assignIdentifiers, printWorkflow } from './print' export { GENERIC_BUILDER, SDK_CORE_EXPORTS, SDK_RESERVED_IDENTIFIERS } from './sdk' diff --git a/packages/workflow-code/src/materialize/block.ts b/packages/workflow-code/src/materialize/block.ts index 3338928fddd..0b72dc0705c 100644 --- a/packages/workflow-code/src/materialize/block.ts +++ b/packages/workflow-code/src/materialize/block.ts @@ -14,7 +14,7 @@ import { encodeParam, matchPrevTools, parseStoredList } from './params' import { writeSubflowData } from './subflows' import { deepEqual } from './values' -/** `block.data` keys the model or the layout owns on any block; everything else is `opaque`. */ +/** `block.data` keys the model or the layout owns on any block; everything else is `extra`. */ const MODEL_DATA_KEYS = new Set(['parentId', 'extent', 'width', 'height', 'canonicalModes']) export interface BlockInputs { @@ -250,8 +250,8 @@ export function buildBlock(inputs: BlockInputs, context: MaterializeContext): Bu } } - const nextOpaque = target.opaque?.data ?? {} - if (catalog && !Object.hasOwn(nextOpaque, 'canonicalModes')) { + const nextExtra = target.extra ?? {} + if (catalog && !Object.hasOwn(nextExtra, 'canonicalModes')) { const original = storedModes(data) let modes = writeBlockModes( original ?? {}, @@ -280,15 +280,15 @@ export function buildBlock(inputs: BlockInputs, context: MaterializeContext): Bu } if (target.subflow && (!before || !deepEqual(before.subflow, target.subflow))) { - writeSubflowData(data, target.subflow, new Set(Object.keys(nextOpaque))) + writeSubflowData(data, target.subflow, new Set(Object.keys(nextExtra))) } - const prevOpaque = before?.opaque?.data ?? {} - if (isNew || !deepEqual(prevOpaque, nextOpaque)) { - for (const dataKey of Object.keys(prevOpaque)) { - if (!Object.hasOwn(nextOpaque, dataKey)) delete data[dataKey] + const prevExtra = before?.extra ?? {} + if (isNew || !deepEqual(prevExtra, nextExtra)) { + for (const dataKey of Object.keys(prevExtra)) { + if (!Object.hasOwn(nextExtra, dataKey)) delete data[dataKey] } - for (const [dataKey, value] of Object.entries(nextOpaque)) { + for (const [dataKey, value] of Object.entries(nextExtra)) { if (!deepEqual(data[dataKey], value)) data[dataKey] = value } } @@ -296,7 +296,7 @@ export function buildBlock(inputs: BlockInputs, context: MaterializeContext): Bu const isContainer = target.type === 'loop' || target.type === 'parallel' for (const dataKey of Object.keys(data)) { const owned = MODEL_DATA_KEYS.has(dataKey) || (isContainer && SUBFLOW_DATA_KEYS.has(dataKey)) - if (!owned && !Object.hasOwn(nextOpaque, dataKey)) delete data[dataKey] + if (!owned && !Object.hasOwn(nextExtra, dataKey)) delete data[dataKey] } } @@ -307,7 +307,7 @@ export function buildBlock(inputs: BlockInputs, context: MaterializeContext): Bu } else { const dropped = ['parentId', 'extent'].filter( (dataKey) => - !Object.hasOwn(nextOpaque, dataKey) && + !Object.hasOwn(nextExtra, dataKey) && (dataKey === 'parentId' || data[dataKey] === 'parent') ) for (const dataKey of dropped) delete data[dataKey] diff --git a/packages/workflow-code/src/materialize/preserve.ts b/packages/workflow-code/src/materialize/preserve.ts index 54bb1b26832..dbc489e9bea 100644 --- a/packages/workflow-code/src/materialize/preserve.ts +++ b/packages/workflow-code/src/materialize/preserve.ts @@ -1,7 +1,7 @@ /** * Preserved UI state (wave 4 governing principle): source holds what executes, and everything * else a stored block carries is taken from the block it continues. For a target block compiled - * from lean source and the prev block it matched, this restores: + * from source and the prev block it matched, this restores: * - the pair member and mode, when the pair's executable value is unchanged; a changed plain id * keeps prev's selector member when prev showed it, since whether a selector or a hand-typed * value produced the id is UI state; @@ -9,10 +9,10 @@ * editor defaults compile filled into fields that never run; * - the config fields of the loop or parallel types not in effect, and prev's spelling of a config * that runs the same (`count: 0` and `count: 5`); - * - unknown `block.data` residue a lean print does not carry. + * - unknown `block.data` residue source does not carry. * - * A full CWM (canonicalize's output, or a verbose print) already holds all of this, so restoring - * onto one changes nothing and the no-op round trip stays byte-identical. + * Canonicalize's output already holds all of this, so restoring onto it changes nothing and the + * no-op round trip stays byte-identical. */ import { canonicalActivityInputs, isInactive } from '../canonicalize/activity' @@ -192,15 +192,18 @@ function restoreSubflow( return target } -/** Unknown `block.data` a lean print leaves out comes from prev; a printed key keeps the target's. */ -function restoreOpaque(target: CanonicalBlock, prev: CanonicalBlock): CanonicalBlock['opaque'] { +/** + * Unknown `block.data` source leaves out comes from prev. A container's subflow keys are the + * only ones source carries (`meta.extraData`), so the target's copy of those wins. + */ +function restoreExtra(target: CanonicalBlock, prev: CanonicalBlock): CanonicalBlock['extra'] { const data: Record = {} - for (const [key, value] of Object.entries(prev.opaque?.data ?? {})) { + for (const [key, value] of Object.entries(prev.extra ?? {})) { const printed = target.subflow !== undefined && SUBFLOW_DATA_KEYS.has(key) if (!printed) setOwn(data, key, value) } - for (const [key, value] of Object.entries(target.opaque?.data ?? {})) setOwn(data, key, value) - return Object.keys(data).length > 0 ? { data } : undefined + for (const [key, value] of Object.entries(target.extra ?? {})) setOwn(data, key, value) + return Object.keys(data).length > 0 ? data : undefined } /** @@ -224,7 +227,6 @@ export function restorePreserved( restoreInactive(next, prev, declared, catalog) } if (target.subflow) next.subflow = restoreSubflow(target.subflow, prev.subflow) - const opaque = restoreOpaque(target, prev) - setOrDelete(next, 'opaque', opaque) + setOrDelete(next, 'extra', restoreExtra(target, prev)) return next } diff --git a/packages/workflow-code/src/materialize/quirks.test-helpers.ts b/packages/workflow-code/src/materialize/quirks.test-helpers.ts index b535ac8f3f8..e7ff01fe4bd 100644 --- a/packages/workflow-code/src/materialize/quirks.test-helpers.ts +++ b/packages/workflow-code/src/materialize/quirks.test-helpers.ts @@ -324,7 +324,7 @@ export const QUIRK_STATES: Array<[string, WorkflowState]> = [ ), ], [ - '15, 16, 18: unknown and legacy block types and opaque data', + '15, 16, 18: unknown and legacy block types and extra data', workflowState([ blockState( 'u1', diff --git a/packages/workflow-code/src/materialize/subflows.ts b/packages/workflow-code/src/materialize/subflows.ts index b38f0970fa4..b48ed92e6d4 100644 --- a/packages/workflow-code/src/materialize/subflows.ts +++ b/packages/workflow-code/src/materialize/subflows.ts @@ -23,7 +23,7 @@ function dataFields(spec: LoopSpec | ParallelSpec): Record, diff --git a/packages/workflow-code/src/model.ts b/packages/workflow-code/src/model.ts index f70a4270105..dae0cf4f8de 100644 --- a/packages/workflow-code/src/model.ts +++ b/packages/workflow-code/src/model.ts @@ -258,8 +258,11 @@ export interface CanonicalBlock { branches?: CanonicalBranches /** Present only on loop and parallel containers. */ subflow?: LoopSpec | ParallelSpec - /** Unknown `block.data` keys, verbatim; printed under `$unknown` (s3 §4 printer edge cases). */ - opaque?: { data?: Record } + /** + * Unknown `block.data` keys, verbatim. Source carries only a container's subflow keys, which the + * serializer passes on (`meta.extraData`); apply keeps the rest from the stored workflow. + */ + extra?: Record } /** @@ -320,7 +323,7 @@ export interface CanonicalWorkflowMeta { * - `block`: the block's `const` declaration. * - `param`: one param property in the block call. `param` is the printed param name: the * `canonicalParamId` for a basic/advanced pair, else the subBlock id. - * - `inactive`: one entry under the block's `inactive: {...}` meta (a subBlock id). + * An entry under the block's `meta.extra` takes the `param` anchor of its key. * - `edges`: the wiring statement for that (source, port). * - `var`: one variable declaration in the `workflow(...)` header. */ @@ -330,7 +333,6 @@ export type Anchor = | { kind: 'footer' } | { kind: 'block'; block: BlockKey } | { kind: 'param'; block: BlockKey; param: SubBlockId | CanonicalParamId } - | { kind: 'inactive'; block: BlockKey; param: SubBlockId } | { kind: 'edges'; block: BlockKey; port: PortKey } | { kind: 'var'; variable: VarKey } @@ -356,8 +358,7 @@ export interface WorkflowAnnotations { * Per block, the param ids whose value is stored but not serialized under the current values * and not read by deploy (`canonicalize/activity.ts`; opaque catalog conditions count as * active unless expanded per operation). Source leaves them out and apply restores them from the - * stored workflow; a verbose print lists them under the block's `inactive: {...}` meta - * (DESIGN.md A18). + * stored workflow (DESIGN.md A18), so only canonicalize fills this; a compiled workflow has none. */ inactive: Record /** diff --git a/packages/workflow-code/src/print/__fixtures__/cases.ts b/packages/workflow-code/src/print/__fixtures__/cases.ts index 8de29f753f7..8c45414176f 100644 --- a/packages/workflow-code/src/print/__fixtures__/cases.ts +++ b/packages/workflow-code/src/print/__fixtures__/cases.ts @@ -470,6 +470,22 @@ export const cases: PrintCase[] = [ params: { operation: 'send', channel: 'C0OLD', manualChannel: 'C0NEW', text: 'e' }, modes: { channel: 'advanced' }, }), + blk('Filter builder list', 'table_v2', { + params: { + operation: 'query_rows', + tableSelector: { $sim: 'resource', kind: 'table', key: 'tickets' }, + filterBuilder: [{ field: 'status', op: 'eq', value: 'open' }], + }, + modes: { tableId: 'basic', filterInput: 'basic' }, + }), + blk('Filter code json', 'table_v2', { + params: { + operation: 'query_rows', + tableSelector: { $sim: 'resource', kind: 'table', key: 'tickets' }, + filter: '{\n "field": "status",\n "op": "eq",\n "value": "open"\n}', + }, + modes: { tableId: 'basic', filterInput: 'advanced' }, + }), ], }), }, @@ -596,7 +612,7 @@ export const cases: PrintCase[] = [ advancedMode: true, errorPort: true, retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 }, - opaque: { data: { canvasNote: 'x', width: 300 } }, + extra: { canvasNote: 'x', width: 300 }, }), blk('Flaky', 'api', { params: { url: 'https://b.test' }, diff --git a/packages/workflow-code/src/print/__golden__/inactive-values.verbose.txt b/packages/workflow-code/src/print/__golden__/inactive-values.verbose.txt deleted file mode 100644 index a1f56cb06e2..00000000000 --- a/packages/workflow-code/src/print/__golden__/inactive-values.verbose.txt +++ /dev/null @@ -1,13 +0,0 @@ -// @sim-sdk 1 -import { agent, trigger, workflow } from '@sim/workflow-sdk' - -export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: {} }) - const remember = agent( - 'Remember', - { model: 'm', memoryType: 'none' }, - { inactive: { conversationId: 'stale-id', legacyField: 'kept' } } - ) - - start.to(remember) -}) diff --git a/packages/workflow-code/src/print/__golden__/loop-foreach.verbose.txt b/packages/workflow-code/src/print/__golden__/loop-foreach.verbose.txt deleted file mode 100644 index b10da29c62c..00000000000 --- a/packages/workflow-code/src/print/__golden__/loop-foreach.verbose.txt +++ /dev/null @@ -1,28 +0,0 @@ -// @sim-sdk 1 -import { agent, api, fn, js, loop, t, trigger, workflow } from '@sim/workflow-sdk' - -export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: { leads: 'array' } }) - const eachLead = loop.forEach( - 'Each lead', - { collection: start.leads }, - (p) => { - const lookup = api('Lookup', { - url: t`https://crm.example.com/c/${p.currentItem.email}?i=${p.index}`, - method: 'GET', - }) - const score = fn('Score', { code: js`return ${lookup.data}.score * 2` }) - - p.to(lookup) - lookup.to(score) - }, - { inactive: { iterations: 5 } } - ) - const summary = agent('Summary', { - messages: [{ role: 'system', content: t`Results: ${eachLead.results} and ` }], - model: 'm', - }) - - start.to(eachLead) - eachLead.to(summary) -}) diff --git a/packages/workflow-code/src/print/__golden__/nested-subflows.verbose.txt b/packages/workflow-code/src/print/__golden__/nested-subflows.verbose.txt deleted file mode 100644 index 7ef2c1b6d03..00000000000 --- a/packages/workflow-code/src/print/__golden__/nested-subflows.verbose.txt +++ /dev/null @@ -1,39 +0,0 @@ -// @sim-sdk 1 -import { agent, js, loop, parallel, t, trigger, workflow } from '@sim/workflow-sdk' - -export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: { rows: 'array' } }) - const outer = loop.for('Outer', { count: 3 }, (p) => { - const fan = parallel.collection('Fan', { collection: start.rows, batchSize: 5 }, (p2) => { - const work = agent('Work', { - messages: [ - { - role: 'system', - content: t`loop ${p.index} parallel ${p2.currentItem} named ${outer.index} fan ${fan.index}`, - }, - ], - model: 'm', - }) - - p2.to(work) - }) - - p.to(fan) - }) - const sibling = loop.while( - 'Sibling', - { condition: js` < 3` }, - (p) => { - const insideSibling = agent('Inside sibling', { - messages: [{ role: 'system', content: 'cannot see ' }], - model: 'm', - }) - - p.to(insideSibling) - }, - { inactive: { iterations: 5, doWhileCondition: js`` } } - ) - - start.to(outer) - outer.to(sibling) -}) diff --git a/packages/workflow-code/src/print/__golden__/pair-modes.txt b/packages/workflow-code/src/print/__golden__/pair-modes.txt index 7a3174ba602..e5aa95f6ef5 100644 --- a/packages/workflow-code/src/print/__golden__/pair-modes.txt +++ b/packages/workflow-code/src/print/__golden__/pair-modes.txt @@ -1,5 +1,5 @@ // @sim-sdk 1 -import { slack, trigger, workflow } from '@sim/workflow-sdk' +import { slack, table, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: { channel: 'string' } }) @@ -9,6 +9,18 @@ export default workflow('Fixture', {}, () => { text: 'c', }) const bothMembers = slack.sendMessage('Both members', { channel: 'C0NEW', text: 'e' }) + const filterBuilderList = table.queryRows('Filter builder list', { + tableId: table('tickets'), + filterInput: [{ field: 'status', op: 'eq', value: 'open' }], + }) + const filterCodeJson = table.queryRows('Filter code json', { + tableId: table('tickets'), + filterInput: `{ + "field": "status", + "op": "eq", + "value": "open" +}`, + }) const manualAdvanced = slack.sendMessage('Manual advanced', { channel: start.channel, text: 'b' }) const pickedBasic = slack.sendMessage('Picked basic', { channel: 'C0ONE', text: 'a' }) }) diff --git a/packages/workflow-code/src/print/__golden__/pair-modes.verbose.txt b/packages/workflow-code/src/print/__golden__/pair-modes.verbose.txt deleted file mode 100644 index 79953b67f5c..00000000000 --- a/packages/workflow-code/src/print/__golden__/pair-modes.verbose.txt +++ /dev/null @@ -1,39 +0,0 @@ -// @sim-sdk 1 -import { picked, slack, trigger, workflow } from '@sim/workflow-sdk' - -export default workflow('Fixture', {}, () => { - const start = trigger.start('Start', { inputFormat: { channel: 'string' } }) - const advancedEmpty = slack.sendMessage( - 'Advanced empty', - { text: 'd' }, - { - modes: { channel: 'advanced' }, - inactive: { streamTaskDisplayMode: 'timeline', threads: 'include' }, - } - ) - const basicHoldingText = slack.sendMessage( - 'Basic holding text', - { channel: start.channel, text: 'c' }, - { - modes: { channel: 'basic' }, - inactive: { streamTaskDisplayMode: 'timeline', threads: 'include' }, - } - ) - const bothMembers = slack.sendMessage( - 'Both members', - { channel: 'C0NEW', text: 'e' }, - { - inactive: { channel: picked('C0OLD'), streamTaskDisplayMode: 'timeline', threads: 'include' }, - } - ) - const manualAdvanced = slack.sendMessage( - 'Manual advanced', - { channel: start.channel, text: 'b' }, - { inactive: { streamTaskDisplayMode: 'timeline', threads: 'include' } } - ) - const pickedBasic = slack.sendMessage( - 'Picked basic', - { channel: picked('C0ONE'), text: 'a' }, - { inactive: { streamTaskDisplayMode: 'timeline', threads: 'include' } } - ) -}) diff --git a/packages/workflow-code/src/print/__golden__/string-escapes.txt b/packages/workflow-code/src/print/__golden__/string-escapes.txt index 8169a326339..eda386da9d0 100644 --- a/packages/workflow-code/src/print/__golden__/string-escapes.txt +++ b/packages/workflow-code/src/print/__golden__/string-escapes.txt @@ -10,7 +10,7 @@ export default workflow('Fixture', {}, () => { model: "it's a \"model\" with 'quotes'", }, { - inactive: { + extra: { systemPrompt: `back\\slash \`tick\` \${notInterp} tab here\r crlf line\u2028ls\u2029ps \uD800 lone 漢字 🎉`, }, diff --git a/packages/workflow-code/src/print/__golden__/support-triage.verbose.txt b/packages/workflow-code/src/print/__golden__/support-triage.verbose.txt deleted file mode 100644 index 981f466f0c6..00000000000 --- a/packages/workflow-code/src/print/__golden__/support-triage.verbose.txt +++ /dev/null @@ -1,73 +0,0 @@ -// @sim-sdk 1 -import { - agent, - binding, - condition, - env, - js, - picked, - response, - slack, - t, - table, - trigger, - workflow, -} from '@sim/workflow-sdk' - -export default workflow( - 'Support triage', - { - description: 'Classifies inbound tickets and routes them.', - variables: { escalations: { type: 'number', value: 0 } }, - }, - ({ vars }) => { - const ticketIn = trigger.webhook('Ticket in', { - requireAuth: true, - token: env.TICKETS_WEBHOOK_TOKEN, - inputFormat: { subject: 'string', body: 'string' }, - }) - const classify = agent('Classify', { - messages: [ - { role: 'system', content: 'Classify support tickets.' }, - { - role: 'user', - content: t`${ticketIn.subject} - -${ticketIn.body}`, - }, - ], - model: 'claude-sonnet-5-5', - temperature: 0.2, - }) - const byCategory = condition('By category', { - billing: js`${classify.content} === 'billing'`, - urgent: js`${classify.content}.includes("urgent") && ${vars.escalations} < 3`, - else: true, - }) - const logTicket = table.insertRow('Log ticket', { - tableId: table('tickets'), - data: t`{ - "subject": "${ticketIn.subject}" -}`, - }) - const notify = slack.sendMessage( - 'Notify', - { - oauthCredential: binding('support-slack'), - channel: picked('C0SUPPORT'), - text: t`New ${classify.content} ticket: ${ticketIn.subject}`, - }, - { errorPort: true, inactive: { streamTaskDisplayMode: 'timeline', threads: 'include' } } - ) - const reply = response('Reply', { builderData: { ok: true } }) - - ticketIn.to(classify) - classify.to(byCategory) - byCategory.billing.to(logTicket) - byCategory.urgent.to(notify) - byCategory.else.to(reply) - logTicket.to(notify) - logTicket.onError(notify) - notify.to(reply) - } -) diff --git a/packages/workflow-code/src/print/__golden__/templates-and-paths.txt b/packages/workflow-code/src/print/__golden__/templates-and-paths.txt index 09a951e76f2..11c8adf7ce7 100644 --- a/packages/workflow-code/src/print/__golden__/templates-and-paths.txt +++ b/packages/workflow-code/src/print/__golden__/templates-and-paths.txt @@ -18,7 +18,7 @@ next`, model: 'gpt-5.5', }, { - inactive: { + extra: { systemPrompt: `Line one Line two without refs`, }, diff --git a/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt b/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt index 6f0797b3f9d..efcb863a437 100644 --- a/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt +++ b/packages/workflow-code/src/print/__golden__/unresolved-tokens.txt @@ -7,7 +7,7 @@ export default workflow('Fixture', {}, () => { 'Html', { model: '{{ not valid }}' }, { - inactive: { + extra: { systemPrompt: t`
hello
${env.lower_ok} `, }, } diff --git a/packages/workflow-code/src/print/__golden__/vars-by-field.txt b/packages/workflow-code/src/print/__golden__/vars-by-field.txt index 5a9097ce302..0202882d2f1 100644 --- a/packages/workflow-code/src/print/__golden__/vars-by-field.txt +++ b/packages/workflow-code/src/print/__golden__/vars-by-field.txt @@ -15,7 +15,7 @@ export default workflow( const echo = agent( 'Echo', { model: raw({ $sim: 'var', key: 'count' }), temperature: t`count is ${vars.count}` }, - { inactive: { systemPrompt: vars.count } } + { extra: { systemPrompt: vars.count } } ) start.to(setCount) diff --git a/packages/workflow-code/src/print/comments.ts b/packages/workflow-code/src/print/comments.ts index ec1701961c8..3683e2d2f47 100644 --- a/packages/workflow-code/src/print/comments.ts +++ b/packages/workflow-code/src/print/comments.ts @@ -16,7 +16,6 @@ export const anchors = { footer: encodeAnchor({ kind: 'footer' }), block: (block: BlockKey) => encodeAnchor({ kind: 'block', block }), param: (block: BlockKey, param: string) => encodeAnchor({ kind: 'param', block, param }), - inactive: (block: BlockKey, param: string) => encodeAnchor({ kind: 'inactive', block, param }), edges: (block: BlockKey, port: PortKey) => encodeAnchor({ kind: 'edges', block, port }), variable: (variable: string) => encodeAnchor({ kind: 'var', variable }), } diff --git a/packages/workflow-code/src/print/golden.test.ts b/packages/workflow-code/src/print/golden.test.ts index 2ebbe45bd1b..8b005ac9c87 100644 --- a/packages/workflow-code/src/print/golden.test.ts +++ b/packages/workflow-code/src/print/golden.test.ts @@ -1,17 +1,11 @@ import { describe, expect, it } from 'vitest' -import { type CodeFileCodec, type CodeFileLanguage, codeFileCodec } from '../code-files' +import { type CodeFileLanguage, checkCodeFileBijection } from '../code-files' import { cases } from './__fixtures__/cases' import { realCatalog as catalog } from './__fixtures__/real-catalog' -import { createPrintWorkflow, printWorkflow } from './printer' +import { printWorkflow } from './printer' const GOLDEN_DIR = './__golden__' -/** A codec whose round trip adds a byte: the printer must fall back to inline code. */ -const lossyCodec: CodeFileCodec = { - toFile: (code) => code, - fromFile: (text) => `${text}\n`, -} - describe('printWorkflow golden files', () => { for (const testCase of cases) { it(`prints ${testCase.name}`, async () => { @@ -26,28 +20,6 @@ describe('printWorkflow golden files', () => { }) } - /** `source get --verbose`: the preserved UI state a lean print leaves to apply. */ - const VERBOSE_CASES = [ - 'support-triage', - 'pair-modes', - 'inactive-values', - 'loop-foreach', - 'nested-subflows', - ] - for (const name of VERBOSE_CASES) { - it(`prints ${name} verbosely`, async () => { - const testCase = cases.find((candidate) => candidate.name === name) - if (!testCase) throw new Error(`missing case ${name}`) - const result = printWorkflow({ - workflow: testCase.workflow, - catalog, - hints: testCase.hints, - options: { functionCode: 'inline', verbose: true }, - }) - await expect(result.files[0].text).toMatchFileSnapshot(`${GOLDEN_DIR}/${name}.verbose.txt`) - }) - } - it('reports the diagnostics each golden case produces', async () => { const report = Object.fromEntries( cases.map((testCase) => { @@ -68,7 +40,7 @@ describe('printWorkflow golden files', () => { ) }) - it('writes function code to language files through the code-files codec by default', async () => { + it('writes function code to language files when the code-file round trip is exact', async () => { const testCase = cases.find((c) => c.name === 'function-languages') if (!testCase) throw new Error('missing case') const result = printWorkflow({ @@ -91,7 +63,8 @@ describe('printWorkflow golden files', () => { functions.map(([key, language]) => { const param = testCase.workflow.blocks[key]?.params.code if (param?.kind !== 'value' || typeof param.value !== 'string') return null - return codeFileCodec.toFile(param.value, language) + const check = checkCodeFileBijection(param.value, language) + return check.ok ? check.file : null }) ) expect(result.files[1]?.text).toContain('$ref.start.total + $env.TAX_RATE') @@ -100,24 +73,36 @@ describe('printWorkflow golden files', () => { await expect(result.files[0].text).toMatchFileSnapshot(`${GOLDEN_DIR}/function-files.txt`) }) - it('falls back to inline code with a warning when the codec round trip is lossy or absent', () => { + it('prints function code inline with a warning when its file form would read back differently', () => { const testCase = cases.find((c) => c.name === 'function-languages') if (!testCase) throw new Error('missing case') - const inline = printWorkflow({ - workflow: testCase.workflow, + const jscode = testCase.workflow.blocks.jscode + if (!jscode) throw new Error('missing jscode') + const workflow = { + ...testCase.workflow, + blocks: { + ...testCase.workflow.blocks, + jscode: { + ...jscode, + params: { + ...jscode.params, + code: { kind: 'value' as const, value: 'return .length' }, + }, + }, + }, + } + const result = printWorkflow({ + workflow, catalog, - options: { functionCode: 'inline' }, + options: { functionCode: 'files', codeDir: 'functions' }, }) - for (const print of [createPrintWorkflow(lossyCodec), createPrintWorkflow()]) { - const result = print({ - workflow: testCase.workflow, - catalog, - options: { functionCode: 'files', codeDir: 'functions' }, - }) - expect(result.files).toHaveLength(1) - expect(result.files[0].text).toBe(inline.files[0].text) - const inlined = result.diagnostics.filter((d) => d.code === 'W_CODE_FILE_INLINED') - expect(inlined.map((d) => d.blockKey)).toEqual(['jscode', 'pycode', 'shcode']) - } + expect(result.files.map((file) => file.path)).toEqual([ + 'workflow.ts', + 'functions/py-code.py', + 'functions/sh-code.sh', + ]) + expect(result.files[0].text).toContain('return ${start.total}.length') + const inlined = result.diagnostics.filter((d) => d.code === 'W_CODE_FILE_INLINED') + expect(inlined.map((d) => d.blockKey)).toEqual(['jscode']) }) }) diff --git a/packages/workflow-code/src/print/index.ts b/packages/workflow-code/src/print/index.ts index 82b0de3adba..2477608ea9a 100644 --- a/packages/workflow-code/src/print/index.ts +++ b/packages/workflow-code/src/print/index.ts @@ -1,2 +1,2 @@ export { assignIdentifiers } from './idents' -export { createPrintWorkflow, printWorkflow } from './printer' +export { printWorkflow } from './printer' diff --git a/packages/workflow-code/src/print/printer.ts b/packages/workflow-code/src/print/printer.ts index c2d7bc22289..52c43bea4b2 100644 --- a/packages/workflow-code/src/print/printer.ts +++ b/packages/workflow-code/src/print/printer.ts @@ -21,7 +21,7 @@ import { catalogBuilder, catalogBuilderPaths, } from '../catalog/view' -import { type CodeFileCodec, type CodeFileLanguage, codeFileCodec } from '../code-files' +import { type CodeFileLanguage, checkCodeFileBijection } from '../code-files' import type { PrintDiagnosticCode } from '../diagnostics/codes' import type { Diagnostic } from '../diagnostics/frame' import { executableInactiveParams } from '../equivalence/executable' @@ -80,27 +80,6 @@ function stringParam(block: CanonicalBlock, id: string): string | undefined { return param?.kind === 'value' && typeof param.value === 'string' ? param.value : undefined } -/** - * Whether compiling the effective member's value into `other` would store it differently. A - * value the source writes as a list or object literal is stored as JSON text by a code member and - * reshaped by an input-format member (`compile/blocks.ts` `compileField`); everything else lands - * the same in either member, so which member holds it is UI state and a lean print leaves the mode - * to the stored workflow. - */ -function storesDifferently( - block: CanonicalBlock, - effective: CatalogSubBlock | undefined, - other: CatalogSubBlock | undefined -): boolean { - const param = effective ? getOwn(block.params, effective.id) : undefined - if (param?.kind !== 'value' || !other) return false - const { value } = param - const literal = - Array.isArray(value) || - (value !== null && typeof value === 'object' && !Object.hasOwn(value, '$sim')) - return literal && (other.type === 'code' || other.structured === 'inputFormat') -} - function hasValue(block: CanonicalBlock, id: string): boolean { return getOwn(block.params, id) !== undefined } @@ -164,6 +143,7 @@ function kebab(ident: string): string { .toLowerCase() } +const NULL_EXPR: Expr = { doc: 'null', shape: 'literal' } const INTEGER_LIKE = /^(0|[1-9][0-9]*)$/ const INPUT_FIELD_KEYS = new Set(['name', 'type', 'value', 'description', 'required']) @@ -221,8 +201,6 @@ class WorkflowPrinter { private readonly hints: LockHints private readonly width: number private readonly options: PrintInput['options'] - /** `PrintOptions.verbose`: also print the preserved UI state source never needs. */ - private readonly verbose: boolean private readonly diagnostics: Diag[] = [] private readonly imports = new Set(['workflow']) private usesVars = false @@ -240,16 +218,12 @@ class WorkflowPrinter { private readonly codeFileHints = new Map() private readonly takenCodePaths = new Set() - constructor( - input: PrintInput, - private readonly codec: CodeFileCodec | undefined - ) { + constructor(input: PrintInput) { this.workflow = input.workflow this.catalog = input.catalog this.hints = input.hints ?? { blocks: {} } this.width = input.options.lineWidth ?? DEFAULT_WIDTH this.options = input.options - this.verbose = input.options.verbose === true this.blocks = new Map(Object.entries(this.workflow.blocks)) for (const [key, block] of this.blocks) { const parent = block.parent === null ? undefined : this.blocks.get(block.parent) @@ -273,8 +247,7 @@ class WorkflowPrinter { (name) => this.imports.add(name), () => { this.usesVars = true - }, - input.options.verbose === true + } ) this.comments = new CommentPlacer(this.workflow.annotations.comments) } @@ -529,12 +502,9 @@ class WorkflowPrinter { } const stored = stringParam(block, 'language') ?? 'javascript' if (stored !== language) return inline(`its language ${stored} has no code-file form`) - if (!this.codec) return inline('no code-file codec is available') - const text = this.codec.toFile(code, language) - if (text === null) return inline('its tokens cannot be rewritten for a code file') - if (this.codec.fromFile(text, language) !== code) { - return inline('the code-file round trip did not reproduce the stored code') - } + const check = checkCodeFileBijection(code, language) + if (!check.ok) return inline('its tokens cannot be rewritten for a code file') + const text = check.file const extension = LANGUAGE_EXTENSIONS[language] const hinted = getOwn(this.hints.blocks, block.key)?.codeFile const dir = (this.options.codeDir ?? DEFAULT_CODE_DIR).replace(/\/+$/, '') @@ -630,16 +600,6 @@ class WorkflowPrinter { ) } - /** - * The ids of a block that never reach execution. A lean print uses the executable view's rule - * (`executableInactiveParams`, shared with materialize); a verbose print lists the stored - * annotation, so it shows exactly what canonicalize kept. - */ - private inactiveIds(block: CanonicalBlock, catalogBlock: CatalogBlock | undefined): Set { - if (this.verbose) return new Set(getOwn(this.workflow.annotations.inactive, block.key) ?? []) - return catalogBlock ? new Set(executableInactiveParams(block, this.catalog)) : new Set() - } - /** * Whether a field with no stored value would reach execution holding `value`, the editor * default compile fills in when the field is omitted. An absent field prints `null` only then: @@ -662,38 +622,28 @@ class WorkflowPrinter { /** * Params in catalog registry order, one per canonical pair (build-spec decision 7), under the * defaults rule: a value equal to the editor default (`editorDefaults`) is omitted, and an - * active field with no stored value prints `null` when a default exists. A lean print leaves out - * what never executes (inactive values, the pair member the mode hides, undeclared ids that do - * not run); a verbose print lists them under `inactive` so nothing is lost (build-spec decision - * 2), with the modes derivation would get wrong. + * active field with no stored value prints `null` when a default exists. What never executes + * (`executableInactiveParams`: inactive values, the pair member the mode hides, undeclared ids + * that do not run) is left out; apply restores it from the stored workflow. A stored id the + * catalog does not declare that still runs (a schema-agnostic custom block's input, the agent's + * legacy prompt fields) goes to `extra`, the only place source takes such an id. */ private collectParams( block: CanonicalBlock, catalogBlock: CatalogBlock | undefined, pinned: Set - ): { params: ParamEntry[]; inactive: ParamEntry[]; modes: Record } { + ): { params: ParamEntry[]; extra: ParamEntry[] } { const params: ParamEntry[] = [] - const inactive: ParamEntry[] = [] - const modes: Record = {} + const extra: ParamEntry[] = [] const handled = new Set(pinned) const branchId = catalogBlock?.graph.branches?.subBlockId if (branchId) handled.add(branchId) - const inactiveIds = this.inactiveIds(block, catalogBlock) + const inactiveIds = new Set(executableInactiveParams(block, this.catalog)) const defaults: ReadonlyMap = catalogBlock ? editorDefaults(catalogBlock) : new Map() - const pushInactive = (id: string, sb: CatalogSubBlock | undefined) => { - if (!this.verbose) return - const value = this.printParamValue(block, catalogBlock, id, sb) - if (value) - inactive.push({ key: printKey(id), anchor: anchors.inactive(block.key, id), value }) - } - const pushNull = (key: string) => { - params.push({ - key: printKey(key), - anchor: anchors.param(block.key, key), - value: { doc: 'null', shape: 'literal' }, - }) + const push = (list: ParamEntry[], key: string, value: Expr) => { + list.push({ key: printKey(key), anchor: anchors.param(block.key, key), value }) } const isDefault = (id: string) => { const param = getOwn(block.params, id) @@ -710,115 +660,51 @@ class WorkflowPrinter { if (seenCids.has(cid)) continue seenCids.add(cid) const members = subBlocks.filter((m) => m.canonicalParamId === cid && !pinned.has(m.id)) + for (const member of members) handled.add(member.id) const mode: ParamMode = getOwn(block.modes, cid) ?? 'basic' const basic = members.find((m) => !isAdvancedMember(m)) const advanced = members.find(isAdvancedMember) const effective = (mode === 'advanced' ? advanced : basic) ?? members[0] - let printed: PrintedValue | null = null - let elided = false - for (const member of members) { - if (handled.has(member.id)) continue - handled.add(member.id) - if (!hasValue(block, member.id)) continue - if (member === effective && !inactiveIds.has(member.id)) { - if (mode === 'basic' && member === basic && isDefault(member.id)) { - elided = true - continue - } - printed = this.printParamValue(block, catalogBlock, member.id, member) - if (printed) { - params.push({ - key: printKey(cid), - anchor: anchors.param(block.key, cid), - value: printed, - }) - } - } else { - pushInactive(member.id, member) - } - } - if ( - !printed && - !elided && - effective && - !hasValue(block, effective.id) && + if (!effective) continue + if (hasValue(block, effective.id)) { + if (inactiveIds.has(effective.id)) continue + if (mode === 'basic' && effective === basic && isDefault(effective.id)) continue + const printed = this.printParamValue(block, catalogBlock, effective.id, effective) + if (printed) push(params, cid, printed) + } else if ( members.some((member) => defaults.has(member.id)) && this.activeIfSet(block, catalogBlock, effective, defaults.get(effective.id) ?? '') ) { - pushNull(cid) - } - const implied: ParamMode = printed ? (printed.selector ? 'basic' : 'advanced') : 'basic' - if ( - basic && - advanced && - implied !== mode && - (this.verbose || - storesDifferently(block, effective, implied === 'basic' ? basic : advanced)) - ) { - setOwn(modes, cid, mode) + push(params, cid, NULL_EXPR) } continue } handled.add(sb.id) if (!hasValue(block, sb.id)) { if (this.needsTodo(block, sb)) { - params.push({ - key: printKey(sb.id), - anchor: anchors.param(block.key, sb.id), - value: this.values.call('todo', []), - }) + push(params, sb.id, this.values.call('todo', [])) } else { const fallback = defaults.get(sb.id) if (fallback !== undefined && this.activeIfSet(block, catalogBlock, sb, fallback)) { - pushNull(sb.id) + push(params, sb.id, NULL_EXPR) } } continue } - if (inactiveIds.has(sb.id)) { - pushInactive(sb.id, sb) - continue - } - if (isDefault(sb.id)) continue + if (inactiveIds.has(sb.id) || isDefault(sb.id)) continue const printed = this.printParamValue(block, catalogBlock, sb.id, sb) - if (printed) { - params.push({ - key: printKey(sb.id), - anchor: anchors.param(block.key, sb.id), - value: printed, - }) - } + if (printed) push(params, sb.id, printed) } } const rest = Object.keys(block.params) - .filter((id) => !handled.has(id)) + .filter((id) => !handled.has(id) && !inactiveIds.has(id)) .sort(compareStrings) for (const id of rest) { - if (!catalogBlock) { - const printed = this.printParamValue(block, undefined, id, undefined) - if (printed) { - params.push({ key: printKey(id), anchor: anchors.param(block.key, id), value: printed }) - } - continue - } - // `inactive` is the only place source takes an id the catalog does not declare on this - // surface. A lean print keeps only the ones that still run: a schema-agnostic custom - // block's inputs and the agent's legacy prompt fields. - if (!this.verbose && inactiveIds.has(id)) continue - const value = this.printParamValue(block, catalogBlock, id, undefined) - if (value) { - inactive.push({ key: printKey(id), anchor: anchors.inactive(block.key, id), value }) - } - } - if (this.verbose) { - for (const cid of Object.keys(block.modes).sort(compareStrings)) { - const handledCid = - catalogBlock?.subBlocks.some((sb) => sb.canonicalParamId === cid) ?? false - if (!handledCid) setOwn(modes, cid, getOwn(block.modes, cid) ?? 'basic') - } + const printed = this.printParamValue(block, catalogBlock, id, undefined) + if (printed) push(catalogBlock ? extra : params, id, printed) } - return { params, inactive, modes } + return { params, extra } } /** A required, always-visible field with no stored value prints `todo()` (s2 D7). */ @@ -850,10 +736,10 @@ class WorkflowPrinter { private metaProperties( block: CanonicalBlock, - extra: { + fields: { triggerMode?: boolean | undefined - modes: Record - inactive: Property[] + extra: Property[] + extraData?: Record branches?: Property[] } ): Property[] { @@ -863,41 +749,23 @@ class WorkflowPrinter { if (!block.enabled) meta.push({ key: 'disabled', value: yes }) if (block.locked) meta.push({ key: 'locked', value: yes }) if (block.advancedMode) meta.push({ key: 'advancedMode', value: yes }) - if (extra.triggerMode !== undefined) { - meta.push({ key: 'triggerMode', value: { doc: String(extra.triggerMode), shape: 'literal' } }) + if (fields.triggerMode !== undefined) { + meta.push({ + key: 'triggerMode', + value: { doc: String(fields.triggerMode), shape: 'literal' }, + }) } if (block.errorPort && !this.hasErrorEdge(block.key)) meta.push({ key: 'errorPort', value: yes }) if (block.retry) meta.push({ key: 'retry', value: this.values.json({ ...block.retry }) }) - if (Object.keys(extra.modes).length > 0) - meta.push({ key: 'modes', value: this.modesExpr(extra.modes) }) - if (extra.branches && extra.branches.length > 0) { - meta.push({ key: 'branches', value: objectExpr(extra.branches) }) - } - if (extra.inactive.length > 0) meta.push({ key: 'inactive', value: objectExpr(extra.inactive) }) - const opaque = this.printedOpaque(block) - if (opaque && Object.keys(opaque).length > 0) { - meta.push({ key: '$unknown', value: this.values.json(opaque) }) + if (fields.branches && fields.branches.length > 0) { + meta.push({ key: 'branches', value: objectExpr(fields.branches) }) } + if (fields.extra.length > 0) meta.push({ key: 'extra', value: objectExpr(fields.extra) }) + if (fields.extraData) meta.push({ key: 'extraData', value: this.values.json(fields.extraData) }) return meta } - /** - * The unknown `block.data` a print carries as `$unknown`. Nothing executes it, so a lean print - * keeps only a container's subflow keys canonicalize could not read as config, which the - * serializer passes through with the container's data; a verbose print keeps all of it. - */ - private printedOpaque(block: CanonicalBlock): Record | undefined { - const opaque = block.opaque?.data - if (!opaque || this.verbose) return opaque - if (!block.subflow) return undefined - const kept: Record = {} - for (const [key, value] of Object.entries(opaque)) { - if (SUBFLOW_DATA_KEYS.has(key)) setOwn(kept, key, value) - } - return kept - } - /** Branch rows as named keys, plus per-row title overrides and extra keys for the meta. */ private branchEntries(block: CanonicalBlock): { entries: Property[]; meta: Property[] } { const branches = block.branches @@ -935,9 +803,9 @@ class WorkflowPrinter { stringParam(block, id) ) const pinned = pinnedIds(found?.builder) - const { params, inactive, modes } = this.collectParams(block, catalogBlock, pinned) + const { params, extra } = this.collectParams(block, catalogBlock, pinned) const paramProps = this.paramProperties(params) - const inactiveProps = this.paramProperties(inactive) + const extraProps = this.paramProperties(extra) const branchKind = catalogBlock?.graph.branches?.kind ?? block.branches?.kind const { entries: branchProps, meta: branchMeta } = this.branchEntries(block) const branchSubBlock = @@ -966,8 +834,7 @@ class WorkflowPrinter { triggerMode = block.triggerMode const meta = this.metaProperties(block, { triggerMode, - modes, - inactive: inactiveProps, + extra: extraProps, branches: branchMeta, }) const args: Expr[] = [] @@ -997,58 +864,50 @@ class WorkflowPrinter { return this.values.call(callee, args) } + /** + * `loop.(name, config, body, meta?)` / `parallel[.](...)`. Config holds the fields + * the type runs with; the other types' fields are left to the stored workflow. `meta.extra` + * carries the container's stored params, and `meta.extraData` the subflow keys of `block.data` + * canonicalize could not read as config, which the serializer passes on with the container's + * data. + */ private containerCall(block: CanonicalBlock): Expr { const spec = block.subflow if (!spec) throw new Error('containerCall requires a subflow block') const config: Property[] = [] - const inactive: Property[] = [] - const field = ( - name: string, - key: string, - value: Json | undefined, - active: boolean, - tag: Tag - ) => { - if (value === undefined) return - if (!active && !this.verbose) return - const printed = this.values.value(value, { tag, from: block.key }) - if (active) { - config.push({ key, value: printed }) - } else { - const attached = this.comments.take(anchors.inactive(block.key, name)) - inactive.push({ key: name, value: printed, ...attached }) - } + const field = (key: string, value: Json | undefined, active: boolean, tag: Tag) => { + if (value === undefined || !active) return + config.push({ key, value: this.values.value(value, { tag, from: block.key }) }) } let callee: string if (spec.kind === 'loop') { callee = `loop.${spec.loopType}` const countRuns = spec.loopType === 'for' || (spec.loopType === 'doWhile' && !spec.doWhileCondition) - field('iterations', 'count', spec.iterations, countRuns, 't') - field('forEachItems', 'collection', spec.forEachItems, spec.loopType === 'forEach', 't') - field('whileCondition', 'condition', spec.whileCondition, spec.loopType === 'while', 'js') - field( - 'doWhileCondition', - 'condition', - spec.doWhileCondition, - spec.loopType === 'doWhile', - 'js' - ) + field('count', spec.iterations, countRuns, 't') + field('collection', spec.forEachItems, spec.loopType === 'forEach', 't') + field('condition', spec.whileCondition, spec.loopType === 'while', 'js') + field('condition', spec.doWhileCondition, spec.loopType === 'doWhile', 'js') } else { const type = spec.parallelType callee = type === undefined ? 'parallel' : `parallel.${type}` - field('count', 'count', spec.count, type !== 'collection', 't') - field('distribution', 'collection', spec.distribution, type !== 'count', 't') - field('batchSize', 'batchSize', spec.batchSize, true, 't') + field('count', spec.count, type !== 'collection', 't') + field('collection', spec.distribution, type !== 'count', 't') + field('batchSize', spec.batchSize, true, 't') } - const catalogBlock = catalogBlockOf(this.catalog, block.type) - const { - params, - inactive: inactiveParams, - modes, - } = this.collectParams(block, catalogBlock, new Set()) - const extraInactive = this.paramProperties([...params, ...inactiveParams]) - const meta = this.metaProperties(block, { modes, inactive: [...inactive, ...extraInactive] }) + const { params, extra } = this.collectParams( + block, + catalogBlockOf(this.catalog, block.type), + new Set() + ) + const residue: Record = {} + for (const [key, value] of Object.entries(block.extra ?? {})) { + if (SUBFLOW_DATA_KEYS.has(key)) setOwn(residue, key, value) + } + const meta = this.metaProperties(block, { + extra: this.paramProperties([...params, ...extra]), + ...(Object.keys(residue).length > 0 && { extraData: residue }), + }) const body = this.scopeStatements(block.key) const args: Expr[] = [ this.values.string(block.name), @@ -1316,13 +1175,4 @@ function compareImportNames(a: string, b: string): number { return compareStrings(a, b) } -/** - * Creates a printer that writes function code to files through `codec`. Without a codec, files - * mode prints every function body inline with `W_CODE_FILE_INLINED`. - */ -export function createPrintWorkflow(codec?: CodeFileCodec): PrintWorkflowFn { - return (input) => new WorkflowPrinter(input, codec).print() -} - -/** The printer with the code-files bijection (`codeFileCodec`), so files mode works as is. */ -export const printWorkflow: PrintWorkflowFn = createPrintWorkflow(codeFileCodec) +export const printWorkflow: PrintWorkflowFn = (input) => new WorkflowPrinter(input).print() diff --git a/packages/workflow-code/src/print/values.ts b/packages/workflow-code/src/print/values.ts index 5a7d4ed8e67..9389e3c9da3 100644 --- a/packages/workflow-code/src/print/values.ts +++ b/packages/workflow-code/src/print/values.ts @@ -48,7 +48,7 @@ const RESOURCE_CALLS: Partial> = { export interface PrintedValue extends Expr { /** - * True when the value printed as a selector call (`table('x')`, `picked('C1')`, ...) or a + * True when the value printed as a selector call (`table('x')`, `upload('a.pdf')`, ...) or a * non-empty array of them: the form that stores into the basic member of a pair. */ selector?: boolean @@ -67,16 +67,10 @@ function isSimNode(value: object): value is SimNode { /** Prints values, recording SDK imports and reference diagnostics as it goes. */ export class ValuePrinter { - /** - * @param pickedCalls Whether a plain selector id prints as `picked('C1')`. Only verbose prints - * do: the call records that a selector produced the id, which is UI state, so source writes - * the id as a plain string and materialize keeps the stored member. - */ constructor( private readonly refs: RefPrinter, private readonly use: (name: string) => void, - private readonly useVars: () => void, - private readonly pickedCalls: boolean + private readonly useVars: () => void ) {} call(callee: string, args: Expr[]): Expr { @@ -87,10 +81,6 @@ export class ValuePrinter { /** A param value, honoring the field's value kind (selectors, static options). */ field(value: Value, context: FieldContext): PrintedValue { const subBlock = context.subBlock - const kind = subBlock?.valueKind - if (this.pickedCalls && kind === 'picked' && isPlainSelectorValue(value)) { - return { ...this.call('picked', [this.json(value as Json)]), selector: true } - } if ( typeof value === 'string' && value !== '' && @@ -189,12 +179,6 @@ function nestedTag(context: FieldContext): Tag { return context.tag === 'json' ? 't' : context.tag === 'md' ? 't' : context.tag } -/** A stored selector value with no reference text: a non-empty id string. */ -function isPlainSelectorValue(value: Value): boolean { - if (typeof value === 'string') return value.length > 0 && !/[<>{}]/.test(value) - return false -} - /** * A JSON code body that is exactly `JSON.stringify(parsed, null, 2)` of an object or array prints * as that literal (s2 D7); anything else stays `json```. diff --git a/packages/workflow-code/src/sdk.ts b/packages/workflow-code/src/sdk.ts index cd5447de686..75b4d1a1261 100644 --- a/packages/workflow-code/src/sdk.ts +++ b/packages/workflow-code/src/sdk.ts @@ -32,7 +32,6 @@ export const SDK_CORE_EXPORTS = [ 'md', 'note', 'parallel', - 'picked', 'py', 'raw', 'ref', diff --git a/packages/workflow-sdk/src/codegen/core-text.generated.ts b/packages/workflow-sdk/src/codegen/core-text.generated.ts index 51e8a0a5050..2138dcc1778 100644 --- a/packages/workflow-sdk/src/codegen/core-text.generated.ts +++ b/packages/workflow-sdk/src/codegen/core-text.generated.ts @@ -1,4 +1,4 @@ // Generated by scripts/generate-core-text.ts from src/core.d.ts; do not edit. /** The text of `core.d.ts`, the workflow SDK authoring declarations. */ -export const CORE_DTS = "/**\n * The authoring surface for Sim workflows written as TypeScript (s2 §2).\n *\n * Nothing declared here runs. `@sim/workflow-code` compiles a workflow file statically, and every\n * runtime export of this package throws `SimSdkNotExecutable`. These declarations exist so an\n * editor, `tsgo --noEmit` or an agent can check a workflow file before the compiler sees it.\n *\n * Block builders (`slack.sendMessage`, `agent`, `trigger.gmail.poller`, ...) are not declared here:\n * they are generated from the block catalog into `blocks/{type}.d.ts`, which augment this module.\n * The generic `block(type, name, params)` covers any stored type without a builder.\n *\n * Every workflow file starts with the SDK header line, before any import:\n *\n * ```ts\n * // @sim-sdk 1\n * import { agent, trigger, workflow } from '@sim/workflow-sdk'\n * ```\n *\n * The number is the SDK major version the file is written against. A file without the header is\n * refused with `E_SDK_HEADER`, and one written for a newer major than the server supports with\n * `E_SDK_MAJOR`.\n */\n\n/** Plain JSON. */\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json }\n\ndeclare const REF: unique symbol\ndeclare const TEMPLATE: unique symbol\ndeclare const ENV: unique symbol\ndeclare const RESOURCE: unique symbol\ndeclare const TOOL: unique symbol\ndeclare const NODE: unique symbol\ndeclare const FILE_BODY: unique symbol\ndeclare const RAW: unique symbol\n\n/** Any reference, whatever it points at. */\nexport interface AnyRef {\n readonly [REF]: unknown\n}\n\ntype RefPaths = [Json] extends [T]\n ? { readonly [key: string]: Ref }\n : T extends readonly (infer E)[]\n ? { readonly [index: number]: Ref; readonly length: Ref }\n : T extends object\n ? { readonly [K in keyof T]-?: Ref }\n : unknown\n\n/**\n * A typed reference to a block output, compiled to `` (build-spec decision 8).\n * Paths map exactly: `.seg`, `['seg']` and `[n]`. Untyped JSON allows any path.\n */\nexport type Ref = { readonly [REF]: T } & RefPaths\n\n/** Text with references in it, written with one of the tags below. */\nexport type Template = string & { readonly [TEMPLATE]: true }\n\n/** A workspace environment variable, compiled to `{{NAME}}`. */\nexport interface EnvRef {\n readonly [ENV]: string\n}\n\n/** A param value: a literal, a reference, a template or an environment variable. */\nexport type Value = T | AnyRef | Template | EnvRef\n\n/** JSON whose leaves may be references, templates or environment variables. */\nexport type JsonWithRefs =\n | null\n | boolean\n | number\n | string\n | AnyRef\n | Template\n | EnvRef\n | JsonWithRefs[]\n | { [key: string]: JsonWithRefs }\n\n/** A literal union that still accepts any other string (option ids read from values). */\nexport type LiteralUnion = T | (string & {})\n\n/** A `time-input` value, `HH:MM`. */\nexport type TimeString = `${number}:${number}`\n\ntype Interpolation = AnyRef | EnvRef | VarRef | string | number | boolean\n\n/** Text with interpolated references: `` t`New ${cls.category} ticket` ``. */\nexport declare function t(strings: TemplateStringsArray, ...values: Interpolation[]): Template\n/** JavaScript code (condition expressions, inline function code). */\nexport declare const js: typeof t\n/** Python code. */\nexport declare const py: typeof t\n/** Shell code. */\nexport declare const sh: typeof t\n/** JSON text kept verbatim, for bodies an object literal cannot reproduce byte for byte. */\nexport declare const json: typeof t\n/** Markdown text (note content). */\nexport declare const md: typeof t\n\n/** A reference with a non-canonical spelling, such as `ref('Classify.content')`. */\nexport declare function ref(path: string): Ref\n\n/** A stored value outside the generated type (a legacy option id, say), kept verbatim. */\nexport declare function raw(value: unknown): T & { readonly [RAW]: true }\n\n/** A required value that is still missing; compiles to absent, so canvas drafts type-check. */\nexport declare function todo(): never\n\n/** Function code kept in a file next to the workflow (`.js`, `.py` or `.sh`), stored verbatim. */\nexport interface FileBody {\n readonly [FILE_BODY]: string\n}\nexport declare function file(path: `./${string}`): FileBody\n\n/**\n * Environment variable names known to the workspace. `workspace.d.ts` adds one member per name;\n * until it exists `env` accepts any name.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceEnv {}\n\nexport declare const env: keyof WorkspaceEnv extends never\n ? { readonly [name: string]: EnvRef }\n : { readonly [K in keyof WorkspaceEnv]: EnvRef }\n\n/**\n * Workspace resources by stable key, filled in by the generated `workspace.d.ts`. Each map's\n * values describe the resource: a table's row type, a binding's service, a workflow's inputs.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceTables {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceKnowledgeBases {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceBindings {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceWorkflows {}\n\ntype KeyOf = keyof M extends never ? string : Extract\n\nexport type TableKey = KeyOf\nexport type KnowledgeBaseKey = KeyOf\nexport type BindingKey = KeyOf\nexport type WorkflowKey = KeyOf\n\n/** A workspace resource by stable key, compiled to the resource's internal id. */\nexport interface ResourceRef {\n readonly [RESOURCE]: Kind\n readonly key: Key\n}\n\n/** A credential binding: `binding('support-slack')`. */\nexport type Binding = ResourceRef<'credential', Key>\nexport declare function binding(key: K): Binding\n\n/** The columns of a workspace table, or loose JSON when `workspace.d.ts` does not know it. */\nexport type TableColumns = K extends keyof WorkspaceTables\n ? WorkspaceTables[K]\n : { [column: string]: Json }\n/** One stored row: its columns plus the row id. */\nexport type TableRow = TableColumns & { id: string }\n/** Column values written to a row. */\nexport type TableData = K extends keyof WorkspaceTables\n ? { [C in keyof WorkspaceTables[K]]?: Value | JsonWithRefs }\n : { [column: string]: JsonWithRefs }\n\n/** A workspace table: `table('leads')`. Table block operations live on `table.*`. */\nexport type TableRef = ResourceRef<'table', Key>\nexport declare function table(key: K): TableRef\n\n/** A knowledge base: `kb('docs')`. */\nexport type KnowledgeBaseRef = ResourceRef<'knowledge-base', Key>\nexport declare function kb(key: K): KnowledgeBaseRef\n\n/** A workspace skill: `skill('triage')`. */\nexport type SkillRef = ResourceRef<'skill'>\nexport declare function skill(key: string): SkillRef\n\n/** A sandbox image: `sandbox('node-ml')`. */\nexport type SandboxRef = ResourceRef<'sandbox'>\nexport declare function sandbox(key: string): SandboxRef\n\n/** A workspace folder: `folder('reports')`. */\nexport type FolderRef = ResourceRef<'file-folder'>\nexport declare function folder(key: string): FolderRef\n\n/** A workspace file upload: `upload('contracts/acme.pdf')`. */\nexport type Upload = ResourceRef<'file'>\nexport declare function upload(path: string): Upload\n\n/** An opaque provider id chosen in a remote selector: `picked('C0123')`. */\nexport interface Picked {\n readonly [RESOURCE]: 'picked'\n readonly id: string\n}\nexport declare function picked(id: string): Picked\n\n/** A file produced at run time (`file` / `file[]` outputs). */\nexport interface SimFile {\n id: string\n name: string\n url: string\n size: number\n type: string\n key: string\n}\n\n// Agent tools\n\n/** One entry of an agent's `tools` list. */\nexport interface Tool {\n readonly [TOOL]: true\n}\n\n/** How the model may use a tool, and the stored tool fields a print carries. */\nexport interface ToolOpts {\n usageControl?: 'auto' | 'force' | 'none'\n usageControlExpression?: string\n title?: string\n /** The stored operation, when the method does not pin it. */\n operation?: string\n toolId?: string\n /** Pair modes of the tool's params, which pick the member the agent reads. */\n modes?: Record\n customTool?: JsonWithRefs\n operationPolicy?: Json\n /** Unknown stored tool keys, kept verbatim. */\n extra?: Json\n}\n\n/** A custom tool by key: `customTool('lookup-order')`. */\nexport declare function customTool(key: string, options?: ToolOpts): Tool\nexport declare namespace customTool {\n /** A custom tool snapshot that has drifted from the workspace tool. */\n function inline(definition: { schema: Json; code: string | Template; title?: string }): Tool\n}\n\n/** An MCP server by key; `mcp('linear').tool('create_issue')`. */\nexport interface McpServerRef extends ResourceRef<'mcp-server'> {\n tool(name: string, options?: ToolOpts & { args?: Record }): Tool\n}\nexport declare function mcp(key: string): McpServerRef\n\n// Graph\n\n/** Block-level fields (`BlockState`), written as the third builder argument. */\nexport interface BlockMeta {\n /**\n * A legacy key the display name cannot carry (a `name~n` collision key or a reserved name such\n * as `Loop`). Printed only for such a stored block; apply accepts it only for a key the stored\n * workflow already has, so it can never introduce one.\n */\n key?: string\n /** Stored as `enabled: false`. */\n disabled?: true\n /** Protected: apply refuses any change to this block. */\n locked?: true\n /** Exposes the error port without an `onError` edge. */\n errorPort?: boolean\n /** The block-level advanced toggle (`advancedMode`). */\n advancedMode?: boolean\n /**\n * Runs the block as its trigger (`triggerMode`). Trigger builders (`trigger.gmail.poller`) set\n * it themselves; write it on any other builder only for a block stored in trigger mode.\n */\n triggerMode?: boolean\n retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number }\n /**\n * Pair modes, printed only when the other member would store the value differently. Which\n * member holds a value is otherwise canvas state that apply keeps from the stored workflow.\n */\n modes?: Record\n /**\n * Per branch key of a condition or router, the row's display `title` and any stored fields the\n * SDK has no syntax for (`extra`, plain JSON).\n */\n branches?: Record }>\n /**\n * Values the block keeps but never runs. Source never needs them (apply restores them from the\n * stored workflow); `source get --verbose` prints them. Also the place for a stored field the\n * catalog does not declare that still runs, such as a schema-agnostic custom block's input.\n */\n inactive?: Record\n /** Stored block data the SDK has no syntax for, kept verbatim (plain JSON). */\n $unknown?: Record\n}\n\n/** Anything an edge can point at. */\nexport type Target = Node | Group\n\n/** A block or container in the graph. */\nexport interface Node {\n readonly [NODE]: true\n /** Wires this node's default port to each target. Returns the target, or a group of them. */\n to(...targets: T): T extends [infer One] ? One : Group\n /** Wires this node's error port to each target. */\n onError(...targets: Target[]): void\n}\n\n/** Several nodes; `.to()` wires every member (fan-in). */\nexport interface Group {\n to(...targets: Target[]): Group\n}\n\n/** A block: a node whose outputs can be referenced. */\nexport type Block = Node & Ref\n\n/** The named ports of a condition or router. */\nexport type Branches = { readonly [P in K]: Node }\n\n/** Trigger builders (`trigger.start`, `trigger.gmail.poller`, ...), generated from the catalog. */\nexport declare namespace trigger {}\n\n/** Builders for hidden legacy block versions (`legacy.slack.send`), generated from the catalog. */\nexport declare namespace legacy {}\n\n/** A raw edge from a handle the SDK has no name for (a legacy or unknown port). */\nexport declare function edge(from: Node, handle: string, to: Target): void\n\n/** Any stored block type without a builder (legacy, unknown or custom), with untyped outputs. */\nexport declare function block(\n type: string,\n name: string,\n params: Record,\n meta?: BlockMeta\n): Block\n\n// Workflow and variables\n\nexport type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'plain'\n\nexport interface VariableDeclaration {\n type: VariableType\n value?: Json\n}\n\nexport type VariableDeclarations = Record\n\ndeclare const VAR: unique symbol\n\n/** A workflow variable, compiled to ``. */\nexport interface VarRef {\n readonly [VAR]: string\n}\n\ntype VariableValue = T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'string' | 'plain'\n ? string\n : Json\n\nexport type VarRefs = {\n readonly [K in keyof V]: VarRef & Ref>\n}\n\n/**\n * Workflow variables by name, untyped. Prefer the `vars` the `workflow()` body receives, which is\n * typed from the declared variables.\n */\nexport declare const vars: { readonly [name: string]: VarRef & Ref }\n\ndeclare const WORKFLOW_DEF: unique symbol\n\n/** The default export of a workflow file. */\nexport interface WorkflowDef {\n readonly [WORKFLOW_DEF]: true\n}\n\n/** A child workflow by key, for `runWorkflow` or as an agent tool. */\nexport interface WorkflowRef extends ResourceRef<'workflow', Key> {\n asTool(options?: ToolOpts): Tool\n}\n\n/** Declares a workflow. The body wires blocks; it never runs. */\nexport declare function workflow>(\n name: string,\n options: { description?: string; variables?: V },\n body: (scope: { vars: VarRefs }) => void\n): WorkflowDef\n/** A child workflow by key: `workflow('enrich-lead')`. */\nexport declare function workflow(key: K): WorkflowRef\n\n// Containers\n\ntype ItemOf = C extends { readonly [REF]: readonly (infer E)[] }\n ? E\n : C extends readonly (infer E)[]\n ? E\n : Json\n\n/** Inside a loop or parallel body. */\nexport interface SubflowScope {\n /** The container's start port, into its first child. */\n readonly start: Node\n /** Wires the start port to each target (same as `start.to`). */\n to(...targets: T): T extends [infer One] ? One : Group\n readonly index: Ref\n readonly currentItem: Ref\n readonly items: Ref\n}\n\n/**\n * A container's outputs, plus its iteration fields by name (`outer.index`), which is how a block\n * in a nested container reads an outer loop's index or item.\n */\nexport interface SubflowOutput {\n results: Json[]\n index: number\n currentItem: Json\n items: Json[]\n}\n\n/** A loop or parallel container. Its `.to()` wires the port taken after it finishes. */\nexport type Container = Block\n\ntype Collection = AnyRef | Template | Json[] | string\n\nexport declare const loop: {\n for(\n name: string,\n params: { count?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n forEach(\n name: string,\n params: { collection: C },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n while(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n doWhile(\n name: string,\n params: { condition?: Template | string; count?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n}\n\nexport declare const parallel: {\n /** A parallel with no stored type, which the loader runs as `count`. */\n (\n name: string,\n params: { count?: number; collection?: Collection; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n count(\n name: string,\n params: { count: number; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n collection(\n name: string,\n params: { collection: C; batchSize?: number },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n}\n\n// Blocks with a source form of their own\n\n/**\n * Params and outputs of the blocks below, generated from the catalog. Each entry is\n * `{ params; output }`; without generated types the params are loose.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface SpecialBuilderTypes {}\n\ntype SpecialParams = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { params: infer P }\n ? P\n : never\n : Record\n\ntype SpecialOutput = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { output: infer O }\n ? O\n : never\n : Json\n\n/** A condition expression, or `true` for the `else` branch. */\nexport type BranchExpression = Template | string | true\n\n/**\n * Keys of a condition written with no rows (`condition('Name', {})`, the source form of rows\n * that were never persisted): the implicit `if` and `else` ports stay addressable.\n */\ntype ConditionKeys = keyof B extends never ? 'if' | 'else' : Extract\ntype RouterKeys = keyof R extends never ? 'route0' : Extract\n\n/** A condition: named branches, the last one `else` when there are two or more. */\nexport declare function condition>(\n name: string,\n branches: B,\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A router: named routes described for the model. */\nexport declare function router>(\n name: string,\n params: SpecialParams<'router'> & { routes: R },\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A function block. `code` is inline (`` js`...` ``) or a file (`file('./functions/x.js')`). */\nexport declare function fn(\n name: string,\n params: SpecialParams<'fn'> & { code: Template | FileBody | string },\n meta?: BlockMeta\n): Block>\n\n/** Runs a child workflow. */\nexport declare function runWorkflow(\n name: string,\n params: SpecialParams<'runWorkflow'>,\n meta?: BlockMeta\n): Block>\n\n/** Pauses for a person; the form in `inputFormat` types `submission`. */\nexport declare function human>(\n name: string,\n params: SpecialParams<'human'> & { inputFormat?: F },\n meta?: BlockMeta\n): Block, 'submission'> & { submission: InputFieldsOutput }>\n\n/** Ends the workflow with an API response. */\nexport declare function response(\n name: string,\n params: SpecialParams<'response'>,\n meta?: BlockMeta\n): Block>\n\n/** Assigns workflow variables. */\nexport declare function setVariables(\n name: string,\n params: SpecialParams<'setVariables'>,\n meta?: BlockMeta\n): Block>\n\ndeclare const ANNOTATION: unique symbol\n\n/** A canvas note: no edges, no outputs. */\nexport interface Annotation {\n readonly [ANNOTATION]: true\n}\nexport declare function note(\n name: string,\n params: SpecialParams<'note'>,\n meta?: BlockMeta\n): Annotation\n\n// Structured param shapes\n\n/** Type names an input-format field may declare. */\nexport type InputFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'file[]'\n\n/** A structured input field: its type plus a default value, description or required flag. */\nexport interface InputFieldSpec {\n type: InputFieldType\n value?: JsonWithRefs\n description?: string\n required?: boolean\n}\n\n/** `input-format` fields by name: `{ subject: 'string', amount: { type: 'number', value: 0 } }`. */\nexport type InputFields = Record\n\ntype InputFieldValue = T extends 'string'\n ? string\n : T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'array'\n ? Json[]\n : T extends 'file[]'\n ? SimFile[]\n : Json\n\n/** The outputs an `input-format` declares. */\nexport type InputFieldsOutput = {\n [K in keyof F]: F[K] extends { type: infer T } ? InputFieldValue : InputFieldValue\n}\n\n/** `response-format` fields: `{ ok: true, id: { type: 'string', value: row.id } }`. */\nexport type ResponseFields = Record\n\n/** An agent message. */\nexport interface Message {\n role: 'system' | 'user' | 'assistant'\n content: Value\n}\n\n/** One `variables-input` assignment, with any other stored keys kept. */\nexport interface VariableAssignment {\n variableId: VarRef\n value?: JsonWithRefs\n [key: string]: JsonWithRefs | VarRef | undefined\n}\n\n/** Child workflow inputs by name (`input-mapping`, `workflow-input-mapper`). */\nexport type InputMapping = Record\n\n/** A table filter by column: `{ status: { $eq: 'new' } }`. */\nexport type Filter = Record\n\n/** A table sort by column: `{ createdAt: 'desc' }`. */\nexport type Sort =\n | Record\n | Array<{ column: string; direction: 'asc' | 'desc' }>\n\n/** One knowledge tag filter. */\nexport interface TagFilter {\n tagName: string\n tagValue: Value\n [key: string]: JsonWithRefs\n}\n\n/** One document tag. */\nexport interface DocumentTag {\n tagName: string\n value: Value\n [key: string]: JsonWithRefs\n}\n\n/** One `eval-input` metric. */\nexport interface EvalMetric {\n name: string\n description?: string\n range?: { min: number; max: number }\n [key: string]: JsonWithRefs | undefined\n}\n\n/** One `model-fallback-list` entry. */\nexport interface ModelFallback {\n model: LiteralUnion\n [key: string]: JsonWithRefs\n}\n\n/**\n * Model ids, generated into `models.d.ts` (which adds one member per model). Kept apart from the\n * block files so a model-list change touches one file.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface ModelIds {}\nexport type Model = Extract\n\n/** A JSON Schema `responseFormat`, or `{ name, strict, schema }` around one. */\nexport type ResponseFormat = JsonWithRefs\n\ntype Depth = [never, 0, 1, 2, 3, 4]\n\ntype FromSchema = [D] extends [never]\n ? Json\n : S extends { enum: readonly (infer E)[] }\n ? E\n : S extends { type: 'object'; properties: infer P }\n ? { [K in keyof P]: FromSchema }\n : S extends { type: 'array'; items: infer I }\n ? FromSchema[]\n : S extends { type: 'string' }\n ? string\n : S extends { type: 'number' | 'integer' }\n ? number\n : S extends { type: 'boolean' }\n ? boolean\n : Json\n\n/**\n * The outputs a literal `responseFormat` adds, read from its JSON Schema with recursion capped at\n * depth 4. A template or reference adds untyped JSON.\n */\nexport type ResponseFormatOutput = [RF] extends [undefined]\n ? unknown\n : RF extends { schema: infer S }\n ? FromSchema\n : RF extends { type: 'object'; properties: object }\n ? FromSchema\n : { [key: string]: Json }\n" +export const CORE_DTS = "/**\n * The authoring surface for Sim workflows written as TypeScript (s2 §2).\n *\n * Nothing declared here runs. `@sim/workflow-code` compiles a workflow file statically, and every\n * runtime export of this package throws `SimSdkNotExecutable`. These declarations exist so an\n * editor, `tsgo --noEmit` or an agent can check a workflow file before the compiler sees it.\n *\n * Block builders (`slack.sendMessage`, `agent`, `trigger.gmail.poller`, ...) are not declared here:\n * they are generated from the block catalog into `blocks/{type}.d.ts`, which augment this module.\n * The generic `block(type, name, params)` covers any stored type without a builder.\n *\n * Every workflow file starts with the SDK header line, before any import:\n *\n * ```ts\n * // @sim-sdk 1\n * import { agent, trigger, workflow } from '@sim/workflow-sdk'\n * ```\n *\n * The number is the SDK major version the file is written against. A file without the header is\n * refused with `E_SDK_HEADER`, and one written for a newer major than the server supports with\n * `E_SDK_MAJOR`.\n */\n\n/** Plain JSON. */\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json }\n\ndeclare const REF: unique symbol\ndeclare const TEMPLATE: unique symbol\ndeclare const ENV: unique symbol\ndeclare const RESOURCE: unique symbol\ndeclare const TOOL: unique symbol\ndeclare const NODE: unique symbol\ndeclare const FILE_BODY: unique symbol\ndeclare const RAW: unique symbol\n\n/** Any reference, whatever it points at. */\nexport interface AnyRef {\n readonly [REF]: unknown\n}\n\ntype RefPaths = [Json] extends [T]\n ? { readonly [key: string]: Ref }\n : T extends readonly (infer E)[]\n ? { readonly [index: number]: Ref; readonly length: Ref }\n : T extends object\n ? { readonly [K in keyof T]-?: Ref }\n : unknown\n\n/**\n * A typed reference to a block output, compiled to `` (build-spec decision 8).\n * Paths map exactly: `.seg`, `['seg']` and `[n]`. Untyped JSON allows any path.\n */\nexport type Ref = { readonly [REF]: T } & RefPaths\n\n/** Text with references in it, written with one of the tags below. */\nexport type Template = string & { readonly [TEMPLATE]: true }\n\n/** A workspace environment variable, compiled to `{{NAME}}`. */\nexport interface EnvRef {\n readonly [ENV]: string\n}\n\n/** A param value: a literal, a reference, a template or an environment variable. */\nexport type Value = T | AnyRef | Template | EnvRef\n\n/** JSON whose leaves may be references, templates or environment variables. */\nexport type JsonWithRefs =\n | null\n | boolean\n | number\n | string\n | AnyRef\n | Template\n | EnvRef\n | JsonWithRefs[]\n | { [key: string]: JsonWithRefs }\n\n/** A literal union that still accepts any other string (option ids read from values). */\nexport type LiteralUnion = T | (string & {})\n\n/** A `time-input` value, `HH:MM`. */\nexport type TimeString = `${number}:${number}`\n\ntype Interpolation = AnyRef | EnvRef | VarRef | string | number | boolean\n\n/** Text with interpolated references: `` t`New ${cls.category} ticket` ``. */\nexport declare function t(strings: TemplateStringsArray, ...values: Interpolation[]): Template\n/** JavaScript code (condition expressions, inline function code). */\nexport declare const js: typeof t\n/** Python code. */\nexport declare const py: typeof t\n/** Shell code. */\nexport declare const sh: typeof t\n/** JSON text kept verbatim, for bodies an object literal cannot reproduce byte for byte. */\nexport declare const json: typeof t\n/** Markdown text (note content). */\nexport declare const md: typeof t\n\n/** A reference with a non-canonical spelling, such as `ref('Classify.content')`. */\nexport declare function ref(path: string): Ref\n\n/** A stored value outside the generated type (a legacy option id, say), kept verbatim. */\nexport declare function raw(value: unknown): T & { readonly [RAW]: true }\n\n/** A required value that is still missing; compiles to absent, so canvas drafts type-check. */\nexport declare function todo(): never\n\n/** Function code kept in a file next to the workflow (`.js`, `.py` or `.sh`), stored verbatim. */\nexport interface FileBody {\n readonly [FILE_BODY]: string\n}\nexport declare function file(path: `./${string}`): FileBody\n\n/**\n * Environment variable names known to the workspace. `workspace.d.ts` adds one member per name;\n * until it exists `env` accepts any name.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceEnv {}\n\nexport declare const env: keyof WorkspaceEnv extends never\n ? { readonly [name: string]: EnvRef }\n : { readonly [K in keyof WorkspaceEnv]: EnvRef }\n\n/**\n * Workspace resources by stable key, filled in by the generated `workspace.d.ts`. Each map's\n * values describe the resource: a table's row type, a binding's service, a workflow's inputs.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceTables {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceKnowledgeBases {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceBindings {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceWorkflows {}\n\ntype KeyOf = keyof M extends never ? string : Extract\n\nexport type TableKey = KeyOf\nexport type KnowledgeBaseKey = KeyOf\nexport type BindingKey = KeyOf\nexport type WorkflowKey = KeyOf\n\n/** A workspace resource by stable key, compiled to the resource's internal id. */\nexport interface ResourceRef {\n readonly [RESOURCE]: Kind\n readonly key: Key\n}\n\n/** A credential binding: `binding('support-slack')`. */\nexport type Binding = ResourceRef<'credential', Key>\nexport declare function binding(key: K): Binding\n\n/** The columns of a workspace table, or loose JSON when `workspace.d.ts` does not know it. */\nexport type TableColumns = K extends keyof WorkspaceTables\n ? WorkspaceTables[K]\n : { [column: string]: Json }\n/** One stored row: its columns plus the row id. */\nexport type TableRow = TableColumns & { id: string }\n/** Column values written to a row. */\nexport type TableData = K extends keyof WorkspaceTables\n ? { [C in keyof WorkspaceTables[K]]?: Value | JsonWithRefs }\n : { [column: string]: JsonWithRefs }\n\n/** A workspace table: `table('leads')`. Table block operations live on `table.*`. */\nexport type TableRef = ResourceRef<'table', Key>\nexport declare function table(key: K): TableRef\n\n/** A knowledge base: `kb('docs')`. */\nexport type KnowledgeBaseRef = ResourceRef<'knowledge-base', Key>\nexport declare function kb(key: K): KnowledgeBaseRef\n\n/** A workspace skill: `skill('triage')`. */\nexport type SkillRef = ResourceRef<'skill'>\nexport declare function skill(key: string): SkillRef\n\n/** A sandbox image: `sandbox('node-ml')`. */\nexport type SandboxRef = ResourceRef<'sandbox'>\nexport declare function sandbox(key: string): SandboxRef\n\n/** A workspace folder: `folder('reports')`. */\nexport type FolderRef = ResourceRef<'file-folder'>\nexport declare function folder(key: string): FolderRef\n\n/** A workspace file upload: `upload('contracts/acme.pdf')`. */\nexport type Upload = ResourceRef<'file'>\nexport declare function upload(path: string): Upload\n\n/** A file produced at run time (`file` / `file[]` outputs). */\nexport interface SimFile {\n id: string\n name: string\n url: string\n size: number\n type: string\n key: string\n}\n\n// Agent tools\n\n/** One entry of an agent's `tools` list. */\nexport interface Tool {\n readonly [TOOL]: true\n}\n\n/** How the model may use a tool, and the stored tool fields a print carries. */\nexport interface ToolOpts {\n usageControl?: 'auto' | 'force' | 'none'\n usageControlExpression?: string\n title?: string\n /** The stored operation, when the method does not pin it. */\n operation?: string\n toolId?: string\n /** Pair modes of the tool's params, which pick the member the agent reads. */\n modes?: Record\n customTool?: JsonWithRefs\n operationPolicy?: Json\n /** Unknown stored tool keys, kept verbatim. */\n extra?: Json\n}\n\n/** A custom tool by key: `customTool('lookup-order')`. */\nexport declare function customTool(key: string, options?: ToolOpts): Tool\nexport declare namespace customTool {\n /** A custom tool snapshot that has drifted from the workspace tool. */\n function inline(definition: { schema: Json; code: string | Template; title?: string }): Tool\n}\n\n/** An MCP server by key; `mcp('linear').tool('create_issue')`. */\nexport interface McpServerRef extends ResourceRef<'mcp-server'> {\n tool(name: string, options?: ToolOpts & { args?: Record }): Tool\n}\nexport declare function mcp(key: string): McpServerRef\n\n// Graph\n\n/** Block-level fields (`BlockState`), written as the third builder argument. */\nexport interface BlockMeta {\n /**\n * A legacy key the display name cannot carry (a `name~n` collision key or a reserved name such\n * as `Loop`). Printed only for such a stored block; apply accepts it only for a key the stored\n * workflow already has, so it can never introduce one.\n */\n key?: string\n /** Stored as `enabled: false`. */\n disabled?: true\n /** Protected: apply refuses any change to this block. */\n locked?: true\n /** Exposes the error port without an `onError` edge. */\n errorPort?: boolean\n /** The block-level advanced toggle (`advancedMode`). */\n advancedMode?: boolean\n /**\n * Runs the block as its trigger (`triggerMode`). Trigger builders (`trigger.gmail.poller`) set\n * it themselves; write it on any other builder only for a block stored in trigger mode.\n */\n triggerMode?: boolean\n retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number }\n /**\n * Per branch key of a condition or router, the row's display `title` and any stored fields the\n * SDK has no syntax for (`extra`, plain JSON).\n */\n branches?: Record }>\n /**\n * Stored params that run but have no SDK syntax: a schema-agnostic custom block's inputs, the\n * agent's legacy prompt fields, a container's stored params. Values the block keeps but never\n * runs are not written; apply keeps them from the stored workflow.\n */\n extra?: Record\n /**\n * A loop or parallel's `block.data` subflow keys the loader could not read as config, kept\n * verbatim (plain JSON).\n */\n extraData?: Record\n}\n\n/** Anything an edge can point at. */\nexport type Target = Node | Group\n\n/** A block or container in the graph. */\nexport interface Node {\n readonly [NODE]: true\n /** Wires this node's default port to each target. Returns the target, or a group of them. */\n to(...targets: T): T extends [infer One] ? One : Group\n /** Wires this node's error port to each target. */\n onError(...targets: Target[]): void\n}\n\n/** Several nodes; `.to()` wires every member (fan-in). */\nexport interface Group {\n to(...targets: Target[]): Group\n}\n\n/** A block: a node whose outputs can be referenced. */\nexport type Block = Node & Ref\n\n/** The named ports of a condition or router. */\nexport type Branches = { readonly [P in K]: Node }\n\n/** Trigger builders (`trigger.start`, `trigger.gmail.poller`, ...), generated from the catalog. */\nexport declare namespace trigger {}\n\n/** Builders for hidden legacy block versions (`legacy.slack.send`), generated from the catalog. */\nexport declare namespace legacy {}\n\n/** A raw edge from a handle the SDK has no name for (a legacy or unknown port). */\nexport declare function edge(from: Node, handle: string, to: Target): void\n\n/** Any stored block type without a builder (legacy, unknown or custom), with untyped outputs. */\nexport declare function block(\n type: string,\n name: string,\n params: Record,\n meta?: BlockMeta\n): Block\n\n// Workflow and variables\n\nexport type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'plain'\n\nexport interface VariableDeclaration {\n type: VariableType\n value?: Json\n}\n\nexport type VariableDeclarations = Record\n\ndeclare const VAR: unique symbol\n\n/** A workflow variable, compiled to ``. */\nexport interface VarRef {\n readonly [VAR]: string\n}\n\ntype VariableValue = T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'string' | 'plain'\n ? string\n : Json\n\nexport type VarRefs = {\n readonly [K in keyof V]: VarRef & Ref>\n}\n\n/**\n * Workflow variables by name, untyped. Prefer the `vars` the `workflow()` body receives, which is\n * typed from the declared variables.\n */\nexport declare const vars: { readonly [name: string]: VarRef & Ref }\n\ndeclare const WORKFLOW_DEF: unique symbol\n\n/** The default export of a workflow file. */\nexport interface WorkflowDef {\n readonly [WORKFLOW_DEF]: true\n}\n\n/** A child workflow by key, for `runWorkflow` or as an agent tool. */\nexport interface WorkflowRef extends ResourceRef<'workflow', Key> {\n asTool(options?: ToolOpts): Tool\n}\n\n/** Declares a workflow. The body wires blocks; it never runs. */\nexport declare function workflow>(\n name: string,\n options: { description?: string; variables?: V },\n body: (scope: { vars: VarRefs }) => void\n): WorkflowDef\n/** A child workflow by key: `workflow('enrich-lead')`. */\nexport declare function workflow(key: K): WorkflowRef\n\n// Containers\n\ntype ItemOf = C extends { readonly [REF]: readonly (infer E)[] }\n ? E\n : C extends readonly (infer E)[]\n ? E\n : Json\n\n/** Inside a loop or parallel body. */\nexport interface SubflowScope {\n /** The container's start port, into its first child. */\n readonly start: Node\n /** Wires the start port to each target (same as `start.to`). */\n to(...targets: T): T extends [infer One] ? One : Group\n readonly index: Ref\n readonly currentItem: Ref\n readonly items: Ref\n}\n\n/**\n * A container's outputs, plus its iteration fields by name (`outer.index`), which is how a block\n * in a nested container reads an outer loop's index or item.\n */\nexport interface SubflowOutput {\n results: Json[]\n index: number\n currentItem: Json\n items: Json[]\n}\n\n/** A loop or parallel container. Its `.to()` wires the port taken after it finishes. */\nexport type Container = Block\n\ntype Collection = AnyRef | Template | Json[] | string\n\nexport declare const loop: {\n for(\n name: string,\n params: { count?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n forEach(\n name: string,\n params: { collection: C },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n while(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n doWhile(\n name: string,\n params: { condition?: Template | string; count?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n}\n\nexport declare const parallel: {\n /** A parallel with no stored type, which the loader runs as `count`. */\n (\n name: string,\n params: { count?: number; collection?: Collection; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n count(\n name: string,\n params: { count: number; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n collection(\n name: string,\n params: { collection: C; batchSize?: number },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n}\n\n// Blocks with a source form of their own\n\n/**\n * Params and outputs of the blocks below, generated from the catalog. Each entry is\n * `{ params; output }`; without generated types the params are loose.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface SpecialBuilderTypes {}\n\ntype SpecialParams = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { params: infer P }\n ? P\n : never\n : Record\n\ntype SpecialOutput = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { output: infer O }\n ? O\n : never\n : Json\n\n/** A condition expression, or `true` for the `else` branch. */\nexport type BranchExpression = Template | string | true\n\n/**\n * Keys of a condition written with no rows (`condition('Name', {})`, the source form of rows\n * that were never persisted): the implicit `if` and `else` ports stay addressable.\n */\ntype ConditionKeys = keyof B extends never ? 'if' | 'else' : Extract\ntype RouterKeys = keyof R extends never ? 'route0' : Extract\n\n/** A condition: named branches, the last one `else` when there are two or more. */\nexport declare function condition>(\n name: string,\n branches: B,\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A router: named routes described for the model. */\nexport declare function router>(\n name: string,\n params: SpecialParams<'router'> & { routes: R },\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A function block. `code` is inline (`` js`...` ``) or a file (`file('./functions/x.js')`). */\nexport declare function fn(\n name: string,\n params: SpecialParams<'fn'> & { code: Template | FileBody | string },\n meta?: BlockMeta\n): Block>\n\n/** Runs a child workflow. */\nexport declare function runWorkflow(\n name: string,\n params: SpecialParams<'runWorkflow'>,\n meta?: BlockMeta\n): Block>\n\n/** Pauses for a person; the form in `inputFormat` types `submission`. */\nexport declare function human>(\n name: string,\n params: SpecialParams<'human'> & { inputFormat?: F },\n meta?: BlockMeta\n): Block, 'submission'> & { submission: InputFieldsOutput }>\n\n/** Ends the workflow with an API response. */\nexport declare function response(\n name: string,\n params: SpecialParams<'response'>,\n meta?: BlockMeta\n): Block>\n\n/** Assigns workflow variables. */\nexport declare function setVariables(\n name: string,\n params: SpecialParams<'setVariables'>,\n meta?: BlockMeta\n): Block>\n\ndeclare const ANNOTATION: unique symbol\n\n/** A canvas note: no edges, no outputs. */\nexport interface Annotation {\n readonly [ANNOTATION]: true\n}\nexport declare function note(\n name: string,\n params: SpecialParams<'note'>,\n meta?: BlockMeta\n): Annotation\n\n// Structured param shapes\n\n/** Type names an input-format field may declare. */\nexport type InputFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'file[]'\n\n/** A structured input field: its type plus a default value, description or required flag. */\nexport interface InputFieldSpec {\n type: InputFieldType\n value?: JsonWithRefs\n description?: string\n required?: boolean\n}\n\n/** `input-format` fields by name: `{ subject: 'string', amount: { type: 'number', value: 0 } }`. */\nexport type InputFields = Record\n\ntype InputFieldValue = T extends 'string'\n ? string\n : T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'array'\n ? Json[]\n : T extends 'file[]'\n ? SimFile[]\n : Json\n\n/** The outputs an `input-format` declares. */\nexport type InputFieldsOutput = {\n [K in keyof F]: F[K] extends { type: infer T } ? InputFieldValue : InputFieldValue\n}\n\n/** `response-format` fields: `{ ok: true, id: { type: 'string', value: row.id } }`. */\nexport type ResponseFields = Record\n\n/** An agent message. */\nexport interface Message {\n role: 'system' | 'user' | 'assistant'\n content: Value\n}\n\n/** One `variables-input` assignment, with any other stored keys kept. */\nexport interface VariableAssignment {\n variableId: VarRef\n value?: JsonWithRefs\n [key: string]: JsonWithRefs | VarRef | undefined\n}\n\n/** Child workflow inputs by name (`input-mapping`, `workflow-input-mapper`). */\nexport type InputMapping = Record\n\n/** A table filter by column: `{ status: { $eq: 'new' } }`. */\nexport type Filter = Record\n\n/** A table sort by column: `{ createdAt: 'desc' }`. */\nexport type Sort =\n | Record\n | Array<{ column: string; direction: 'asc' | 'desc' }>\n\n/** One knowledge tag filter. */\nexport interface TagFilter {\n tagName: string\n tagValue: Value\n [key: string]: JsonWithRefs\n}\n\n/** One document tag. */\nexport interface DocumentTag {\n tagName: string\n value: Value\n [key: string]: JsonWithRefs\n}\n\n/** One `eval-input` metric. */\nexport interface EvalMetric {\n name: string\n description?: string\n range?: { min: number; max: number }\n [key: string]: JsonWithRefs | undefined\n}\n\n/** One `model-fallback-list` entry. */\nexport interface ModelFallback {\n model: LiteralUnion\n [key: string]: JsonWithRefs\n}\n\n/**\n * Model ids, generated into `models.d.ts` (which adds one member per model). Kept apart from the\n * block files so a model-list change touches one file.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface ModelIds {}\nexport type Model = Extract\n\n/** A JSON Schema `responseFormat`, or `{ name, strict, schema }` around one. */\nexport type ResponseFormat = JsonWithRefs\n\ntype Depth = [never, 0, 1, 2, 3, 4]\n\ntype FromSchema = [D] extends [never]\n ? Json\n : S extends { enum: readonly (infer E)[] }\n ? E\n : S extends { type: 'object'; properties: infer P }\n ? { [K in keyof P]: FromSchema }\n : S extends { type: 'array'; items: infer I }\n ? FromSchema[]\n : S extends { type: 'string' }\n ? string\n : S extends { type: 'number' | 'integer' }\n ? number\n : S extends { type: 'boolean' }\n ? boolean\n : Json\n\n/**\n * The outputs a literal `responseFormat` adds, read from its JSON Schema with recursion capped at\n * depth 4. A template or reference adds untyped JSON.\n */\nexport type ResponseFormatOutput = [RF] extends [undefined]\n ? unknown\n : RF extends { schema: infer S }\n ? FromSchema\n : RF extends { type: 'object'; properties: object }\n ? FromSchema\n : { [key: string]: Json }\n" diff --git a/packages/workflow-sdk/src/codegen/generate.ts b/packages/workflow-sdk/src/codegen/generate.ts index d2d290977cc..ba1aae639c2 100644 --- a/packages/workflow-sdk/src/codegen/generate.ts +++ b/packages/workflow-sdk/src/codegen/generate.ts @@ -57,7 +57,6 @@ const CORE_TYPE_NAMES = [ 'Message', 'Model', 'ModelFallback', - 'Picked', 'ResponseFields', 'ResponseFormat', 'ResponseFormatOutput', diff --git a/packages/workflow-sdk/src/codegen/goldens.test.ts b/packages/workflow-sdk/src/codegen/goldens.test.ts index 7a8f3aadffb..715f2530e9d 100644 --- a/packages/workflow-sdk/src/codegen/goldens.test.ts +++ b/packages/workflow-sdk/src/codegen/goldens.test.ts @@ -1,5 +1,5 @@ /** - * Every printer golden of `@sim/workflow-code` (lean and verbose) type-checks against what an + * Every printer golden of `@sim/workflow-code` type-checks against what an * author gets: the shipped `core.d.ts` plus the types generated from the same real-catalog slice * the goldens are printed with (`print/__fixtures__/real-catalog.json`, drift-checked against the * registry in apps/sim). A field the printer emits that `core.d.ts` or the generated builders do diff --git a/packages/workflow-sdk/src/codegen/map-subblock.ts b/packages/workflow-sdk/src/codegen/map-subblock.ts index 267e99d20bf..a6315aeca06 100644 --- a/packages/workflow-sdk/src/codegen/map-subblock.ts +++ b/packages/workflow-sdk/src/codegen/map-subblock.ts @@ -2,7 +2,7 @@ * SubBlock type → TS param type (s2 §2 "Mapping each subBlock type"). Every one of the 48 * `SubBlockType`s has an arm; the `never` check makes a new type a compile error here. * - * Types reference names exported by `core.d.ts` (`Value`, `Picked`, `Binding`, ...). A basic/advanced + * Types reference names exported by `core.d.ts` (`Value`, `Binding`, `TableRef`, ...). A basic/advanced * pair is the union of its members' types, so the mode follows from the kind of value written * (build-spec decision 7): a selector-kind constructor is basic, a plain value or reference is * advanced. @@ -119,11 +119,11 @@ export function mapSubBlock(subBlock: CatalogSubBlock): MappedType | null { case 'column-selector': case 'mcp-server-selector': case 'mcp-tool-selector': - return { type: 'Picked', doc: [...doc, ...selectorDoc(subBlock)] } + return { type: 'string', doc: [...doc, ...selectorDoc(subBlock)] } case 'folder-selector': return subBlock.resourceKind === 'file-folder' ? { type: 'FolderRef', doc } - : { type: 'Picked', doc: [...doc, ...selectorDoc(subBlock)] } + : { type: 'string', doc: [...doc, ...selectorDoc(subBlock)] } case 'knowledge-base-selector': return { type: 'KnowledgeBaseRef', doc } case 'table-selector': diff --git a/packages/workflow-sdk/src/codegen/names.ts b/packages/workflow-sdk/src/codegen/names.ts index 1750a2e8b99..6189782309a 100644 --- a/packages/workflow-sdk/src/codegen/names.ts +++ b/packages/workflow-sdk/src/codegen/names.ts @@ -42,7 +42,6 @@ const MERGEABLE_CORE_EXPORTS: ReadonlySet = new Set([ 'kb', 'legacy', 'mcp', - 'picked', 'sandbox', 'skill', 'table', diff --git a/packages/workflow-sdk/src/core.d.ts b/packages/workflow-sdk/src/core.d.ts index b889ec0dc40..c20ec135aed 100644 --- a/packages/workflow-sdk/src/core.d.ts +++ b/packages/workflow-sdk/src/core.d.ts @@ -187,13 +187,6 @@ export declare function folder(key: string): FolderRef export type Upload = ResourceRef<'file'> export declare function upload(path: string): Upload -/** An opaque provider id chosen in a remote selector: `picked('C0123')`. */ -export interface Picked { - readonly [RESOURCE]: 'picked' - readonly id: string -} -export declare function picked(id: string): Picked - /** A file produced at run time (`file` / `file[]` outputs). */ export interface SimFile { id: string @@ -264,24 +257,22 @@ export interface BlockMeta { */ triggerMode?: boolean retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number } - /** - * Pair modes, printed only when the other member would store the value differently. Which - * member holds a value is otherwise canvas state that apply keeps from the stored workflow. - */ - modes?: Record /** * Per branch key of a condition or router, the row's display `title` and any stored fields the * SDK has no syntax for (`extra`, plain JSON). */ branches?: Record }> /** - * Values the block keeps but never runs. Source never needs them (apply restores them from the - * stored workflow); `source get --verbose` prints them. Also the place for a stored field the - * catalog does not declare that still runs, such as a schema-agnostic custom block's input. + * Stored params that run but have no SDK syntax: a schema-agnostic custom block's inputs, the + * agent's legacy prompt fields, a container's stored params. Values the block keeps but never + * runs are not written; apply keeps them from the stored workflow. + */ + extra?: Record + /** + * A loop or parallel's `block.data` subflow keys the loader could not read as config, kept + * verbatim (plain JSON). */ - inactive?: Record - /** Stored block data the SDK has no syntax for, kept verbatim (plain JSON). */ - $unknown?: Record + extraData?: Record } /** Anything an edge can point at. */ diff --git a/packages/workflow-sdk/src/runtime.ts b/packages/workflow-sdk/src/runtime.ts index fc0e727a286..5e081f8d4ac 100644 --- a/packages/workflow-sdk/src/runtime.ts +++ b/packages/workflow-sdk/src/runtime.ts @@ -49,7 +49,6 @@ export const skill = stub('skill') export const sandbox = stub('sandbox') export const folder = stub('folder') export const upload = stub('upload') -export const picked = stub('picked') export const customTool = stub('customTool') export const mcp = stub('mcp') export const edge = stub('edge') diff --git a/packages/workflow-sdk/test/examples/scheduled-report.ts b/packages/workflow-sdk/test/examples/scheduled-report.ts index a835df5276a..4bce692ea88 100644 --- a/packages/workflow-sdk/test/examples/scheduled-report.ts +++ b/packages/workflow-sdk/test/examples/scheduled-report.ts @@ -6,7 +6,6 @@ import { googleSheets, md, note, - picked, t, trigger, workflow, @@ -23,7 +22,7 @@ export default workflow('Invoice report', {}, () => { messages: [{ role: 'user', content: t`Extract totals:\n${mail.email.bodyText}` }], tools: [ googleSheets.tool.appendData( - { oauthCredential: binding('finance-google'), spreadsheetId: picked('1AbC') }, + { oauthCredential: binding('finance-google'), spreadsheetId: '1AbC' }, { usageControl: 'auto' } ), ], From ec043e7a2e6480f2f936500a58ba4802f87d35eb Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 00:14:58 -0800 Subject: [PATCH 138/428] refactor(workflow-code): decode stored JSON text through parseJsonContainer everywhere --- apps/sim/lib/workflows/code/corpus/proof/oracles.ts | 13 +++---------- packages/workflow-code/src/index.ts | 2 +- packages/workflow-code/src/materialize/block.ts | 10 +++------- packages/workflow-code/src/print/values.ts | 10 +++------- 4 files changed, 10 insertions(+), 25 deletions(-) diff --git a/apps/sim/lib/workflows/code/corpus/proof/oracles.ts b/apps/sim/lib/workflows/code/corpus/proof/oracles.ts index db4d2e4266f..af46578aaf5 100644 --- a/apps/sim/lib/workflows/code/corpus/proof/oracles.ts +++ b/apps/sim/lib/workflows/code/corpus/proof/oracles.ts @@ -11,7 +11,7 @@ import { isRecordLike } from '@sim/utils/object' import { compareStrings, escapeRegExp } from '@sim/utils/string' -import { setOwn } from '@sim/workflow-code' +import { parseJsonContainer, setOwn } from '@sim/workflow-code' import { normalizeWorkflowBlockName, type WorkflowState } from '@sim/workflow-types/workflow' import { type Difference, @@ -194,15 +194,8 @@ function sortSubflowNodes(subflows: Record): Record { if (Array.isArray(raw)) return {} - if (typeof raw !== 'string' || raw.trim() === '') return implicitIds(kind, blockId) - try { - return Array.isArray(JSON.parse(raw)) ? {} : implicitIds(kind, blockId) - } catch { - return implicitIds(kind, blockId) - } + if (typeof raw === 'string' && Array.isArray(parseJsonContainer(raw))) return {} + return implicitIds(kind, blockId) } function rawValues(subBlocks: Record): Record { diff --git a/packages/workflow-code/src/print/values.ts b/packages/workflow-code/src/print/values.ts index 9389e3c9da3..670cdca023c 100644 --- a/packages/workflow-code/src/print/values.ts +++ b/packages/workflow-code/src/print/values.ts @@ -7,6 +7,7 @@ import type { CatalogSubBlock } from '../catalog/types' import type { BlockKey, Json, SimNode, Value } from '../model' +import { parseJsonContainer } from '../records' import { type Doc, literalText } from './doc' import type { RefPrinter } from './refs' import { escapeTemplateText, printKey, printNumber, quoteString } from './strings' @@ -184,13 +185,8 @@ function nestedTag(context: FieldContext): Tag { * as that literal (s2 D7); anything else stays `json```. */ function jsonSugar(text: string): Json | undefined { - let parsed: unknown - try { - parsed = JSON.parse(text) - } catch { - return undefined - } - if (parsed === null || typeof parsed !== 'object') return undefined + const parsed = parseJsonContainer(text) + if (parsed === undefined) return undefined if (JSON.stringify(parsed, null, 2) !== text) return undefined if (containsSimKey(parsed)) return undefined return parsed as Json From 7cdb636cf42a9961fdfd195dca4dd89971c61963 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 00:16:09 -0800 Subject: [PATCH 139/428] test(workflow-code): prune property measures block mentions, not a variable sharing the id --- packages/workflow-code/src/code-meta.test.ts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/packages/workflow-code/src/code-meta.test.ts b/packages/workflow-code/src/code-meta.test.ts index 2e5e8288c5d..555a144d66e 100644 --- a/packages/workflow-code/src/code-meta.test.ts +++ b/packages/workflow-code/src/code-meta.test.ts @@ -224,12 +224,15 @@ const metaArb: fc.Arbitrary<{ }) ) -function mentionedIds(meta: WorkflowCodeMetaV1): Set { +/** + * The block ids `meta` mentions. Variable ids are a separate namespace (`var:` anchors), so a + * variable that shares a removed block's id is not a mention of that block. + */ +function mentionedBlockIds(meta: WorkflowCodeMetaV1): Set { const ids = new Set([...Object.keys(meta.bindings), ...Object.keys(meta.order)]) for (const key of Object.keys(meta.comments)) { const anchor = decodeAnchor(key as AnchorKey) if (anchor && 'block' in anchor) ids.add(anchor.block) - if (anchor?.kind === 'var') ids.add(anchor.variable) } return ids } @@ -260,16 +263,21 @@ describe('code_meta properties', () => { ) }) - it('pruning leaves no entry that mentions a removed id and keeps every live one', () => { + it('pruning leaves no entry that mentions a removed block and keeps every live one', () => { fc.assert( fc.property(metaArb, fc.integer({ min: 0, max: 5 }), ({ meta, blockIds }, drop) => { const removed = blockIds[drop % blockIds.length] const pruned = pruneCodeMeta(meta, { blocks: (id) => id !== removed }) - expect(mentionedIds(pruned).has(removed)).toBe(false) + expect(mentionedBlockIds(pruned).has(removed)).toBe(false) expect(codeMetaEquals(pruneCodeMeta(meta, { blocks: () => true }), meta)).toBe(true) for (const id of blockIds) { if (id !== removed) expect(pruned.bindings[id]).toBe(meta.bindings[id]) } + for (const key of Object.keys(meta.comments) as AnchorKey[]) { + if (decodeAnchor(key)?.kind === 'var') { + expect(pruned.comments[key]).toEqual(meta.comments[key]) + } + } }) ) }) From 9b6a3ad8cda81a139c73de67e45e8816c21d6e2e Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 00:16:45 -0800 Subject: [PATCH 140/428] chore(audits): shrink the unused-exports baseline --- scripts/check-unused-exports.baseline.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/scripts/check-unused-exports.baseline.json b/scripts/check-unused-exports.baseline.json index f7ba5d7ca25..8d6669e7945 100644 --- a/scripts/check-unused-exports.baseline.json +++ b/scripts/check-unused-exports.baseline.json @@ -5137,7 +5137,6 @@ "apps/sim/lib/workflows/subblocks/visibility.ts#isTriggerConfigSubBlock", "apps/sim/lib/workflows/tool-input/usage-control.ts#AGENT_TOOL_USAGE_CONTROL_CANONICAL_ID", "apps/sim/lib/workflows/tool-input/usage-control.ts#DEFAULT_AGENT_TOOL_USAGE_CONTROL", - "apps/sim/lib/workflows/triggers/input-definition-triggers.ts#INPUT_DEFINITION_TRIGGER_TYPES", "apps/sim/lib/workflows/triggers/triggers.ts#TRIGGER_REFERENCE_ALIAS_MAP", "apps/sim/lib/workflows/triggers/triggers.ts#TriggerReferenceAlias", "apps/sim/lib/workflows/triggers/triggers.ts#classifyStartBlock", @@ -5874,7 +5873,6 @@ "packages/sim-cli/src/config/index.ts#configDir", "packages/sim-cli/src/config/index.ts#normalizeEndpoint", "packages/sim-cli/src/config/index.ts#telemetryStatePath", - "packages/sim-cli/src/config/paths.ts#configDir", "packages/sim-cli/src/contract/types.ts#PathFlagSpec", "packages/sim-cli/src/http/client.ts#OAuthRefresher", "packages/sim-cli/src/output/terminal-text.ts#artPad", From 3012acdb50f5f4abaae44e78088b0ec876a88808 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 00:19:21 -0800 Subject: [PATCH 141/428] refactor(workflows): keep the source apply evaluate, commit and locate steps in the application layer --- .../workflows/application/apply-workflow-source.ts | 14 +++++++------- .../commit.ts => application/source-commit.ts} | 2 +- .../evaluate.ts => application/source-evaluate.ts} | 8 ++++---- .../locate.ts => application/source-locate.ts} | 0 4 files changed, 12 insertions(+), 12 deletions(-) rename apps/sim/lib/workflows/{code/apply/commit.ts => application/source-commit.ts} (99%) rename apps/sim/lib/workflows/{code/apply/evaluate.ts => application/source-evaluate.ts} (99%) rename apps/sim/lib/workflows/{code/apply/locate.ts => application/source-locate.ts} (100%) diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.ts b/apps/sim/lib/workflows/application/apply-workflow-source.ts index accd61398ad..d81dd26058e 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.ts @@ -29,18 +29,18 @@ import { requireMutableWorkflow } from '@/lib/workflows/application/mutability' import { workflowOperations } from '@/lib/workflows/application/operations' import { resolvePrincipalWorkflowContext } from '@/lib/workflows/application/principal-scope' import { loadWorkflowGraph } from '@/lib/workflows/application/read-workflow-graph' +import { + commitSourceCreate, + commitSourceReplace, + previewSourceCommit, +} from '@/lib/workflows/application/source-commit' import { type WorkflowSourceDiagnostic, WorkflowSourceRejectedError, WorkflowSourceStaleError, } from '@/lib/workflows/application/source-error' -import { - commitSourceCreate, - commitSourceReplace, - previewSourceCommit, -} from '@/lib/workflows/code/apply/commit' -import { evaluateSource } from '@/lib/workflows/code/apply/evaluate' -import { emptyDiffSummary, type SourceDiffSummary } from '@/lib/workflows/code/apply/locate' +import { evaluateSource } from '@/lib/workflows/application/source-evaluate' +import { emptyDiffSummary, type SourceDiffSummary } from '@/lib/workflows/application/source-locate' import { type PrintedSource, printStoredSource, diff --git a/apps/sim/lib/workflows/code/apply/commit.ts b/apps/sim/lib/workflows/application/source-commit.ts similarity index 99% rename from apps/sim/lib/workflows/code/apply/commit.ts rename to apps/sim/lib/workflows/application/source-commit.ts index 8579f758c1a..504bee2b02d 100644 --- a/apps/sim/lib/workflows/code/apply/commit.ts +++ b/apps/sim/lib/workflows/application/source-commit.ts @@ -10,8 +10,8 @@ import { isEqual } from 'es-toolkit' import { OrchestrationError } from '@/lib/core/orchestration/types' import type { DbOrTx } from '@/lib/db/types' import { WorkflowSourceStaleError } from '@/lib/workflows/application/source-error' +import type { SourcePlan } from '@/lib/workflows/application/source-evaluate' import { requireWorkflowTransition } from '@/lib/workflows/application/transition-result' -import type { SourcePlan } from '@/lib/workflows/code/apply/evaluate' import { fingerprintOf, type StoredSource } from '@/lib/workflows/code/apply/print' import { assertProtectedBlocksPreserved } from '@/lib/workflows/code/apply/protected' import { mergeCodeMetaFromLock } from '@/lib/workflows/code/source-lock' diff --git a/apps/sim/lib/workflows/code/apply/evaluate.ts b/apps/sim/lib/workflows/application/source-evaluate.ts similarity index 99% rename from apps/sim/lib/workflows/code/apply/evaluate.ts rename to apps/sim/lib/workflows/application/source-evaluate.ts index 9b6502d23de..642af3fc73f 100644 --- a/apps/sim/lib/workflows/code/apply/evaluate.ts +++ b/apps/sim/lib/workflows/application/source-evaluate.ts @@ -30,9 +30,6 @@ import { resolvePermissionGroupConfig } from '@/lib/permission-groups/config-sco import { layoutChangedBlocks } from '@/lib/workflows/application/graph-write' import { snapshotMcpToolOutputSchemas } from '@/lib/workflows/application/mcp-output-schemas' import type { WorkflowSourceDiagnostic } from '@/lib/workflows/application/source-error' -import { normalizeWorkflowVariables } from '@/lib/workflows/application/workflow-variables' -import { gateSourceDiff } from '@/lib/workflows/code/apply/gates' -import { diffGraphs, type SourceGraph } from '@/lib/workflows/code/apply/graph-diff' import { createLocator, hasErrors, @@ -40,7 +37,10 @@ import { normalizeChangedValues, type SourceDiffSummary, summarizeDiff, -} from '@/lib/workflows/code/apply/locate' +} from '@/lib/workflows/application/source-locate' +import { normalizeWorkflowVariables } from '@/lib/workflows/application/workflow-variables' +import { gateSourceDiff } from '@/lib/workflows/code/apply/gates' +import { diffGraphs, type SourceGraph } from '@/lib/workflows/code/apply/graph-diff' import { boundLock, type StoredSource } from '@/lib/workflows/code/apply/print' import { findProtectedBlockRefusals } from '@/lib/workflows/code/apply/protected' import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' diff --git a/apps/sim/lib/workflows/code/apply/locate.ts b/apps/sim/lib/workflows/application/source-locate.ts similarity index 100% rename from apps/sim/lib/workflows/code/apply/locate.ts rename to apps/sim/lib/workflows/application/source-locate.ts From d81f01ec6d9ee896fc4ce74814f35147f67c887c Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 00:20:57 -0800 Subject: [PATCH 142/428] refactor(workflow-code): name the surface-narrowed subBlocks before indexing them --- packages/workflow-code/src/catalog/surface.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/packages/workflow-code/src/catalog/surface.ts b/packages/workflow-code/src/catalog/surface.ts index 2fea3c41aeb..73185c5b421 100644 --- a/packages/workflow-code/src/catalog/surface.ts +++ b/packages/workflow-code/src/catalog/surface.ts @@ -46,7 +46,6 @@ export function buildCanonicalIndexForSurface( block: Pick, triggerMode: boolean ): CanonicalIndex { - return buildCanonicalIndex( - block.subBlocks.filter((subBlock) => onSurface(block, subBlock, triggerMode)) - ) + const used = block.subBlocks.filter((subBlock) => onSurface(block, subBlock, triggerMode)) + return buildCanonicalIndex(used) } From ed91fb95840450cbdcb407ba8f56a136f1d9dbae Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 01:04:28 -0800 Subject: [PATCH 143/428] refactor(workflow-sdk): name the helpers credential, knowledgeBase, codeFile, file and childWorkflow - credential() replaces binding(), knowledgeBase() replaces kb(), codeFile() replaces the code-file file(), and file() (the workspace file) replaces upload(), merging with the File block's namespace the way table() merges with table.*; credential() merges likewise - the file_v5 block's namespace is file and the mothership block's is simChat; sdk-names params becomes paramAliases - a child workflow is childWorkflow(key); a subflow body wires its start port with p.to() only (SubflowScope extends Node) - BlockMeta.retry is the stored BlockRetryConfig, guarded by a type-level test - container subflow data keys print under meta.subflowData (meta.extra stays the params that run without syntax); the compile scope kind is subflowScope and the code E_UNKNOWN_SUBFLOW_PROPERTY - the runtime error points at sim workflows source apply --dry-run --- apps/sim/blocks/sdk-names.generated.ts | 2 +- apps/sim/blocks/sdk-names.json | 442 +++++++++--------- .../workflows/code/catalog/sdk-names.test.ts | 6 +- .../lib/workflows/code/catalog/sdk-names.ts | 30 +- .../code/golden-cases.test-helpers.ts | 6 +- apps/sim/lib/workflows/code/goldens.test.ts | 4 +- .../src/canonicalize/index.test.ts | 4 +- .../workflow-code/src/canonicalize/index.ts | 8 +- packages/workflow-code/src/catalog/types.ts | 2 +- packages/workflow-code/src/compile/SYNTAX.md | 24 +- packages/workflow-code/src/compile/blocks.ts | 48 +- packages/workflow-code/src/compile/context.ts | 10 +- packages/workflow-code/src/compile/edges.ts | 11 +- .../workflow-code/src/compile/grammar.test.ts | 46 +- packages/workflow-code/src/compile/hints.ts | 4 +- .../workflow-code/src/compile/hostile.test.ts | 9 +- packages/workflow-code/src/compile/index.ts | 8 +- packages/workflow-code/src/compile/scope.ts | 8 +- .../src/compile/throughput.bench.ts | 4 +- packages/workflow-code/src/compile/values.ts | 52 +-- .../src/equivalence/executable.ts | 10 +- .../workflow-code/src/materialize/preserve.ts | 4 +- packages/workflow-code/src/model.ts | 8 +- .../src/print/__golden__/function-files.txt | 8 +- .../src/print/__golden__/support-triage.txt | 4 +- .../__golden__/trigger-mode-builders.txt | 8 +- packages/workflow-code/src/print/idents.ts | 2 +- packages/workflow-code/src/print/order.ts | 2 +- packages/workflow-code/src/print/printer.ts | 30 +- packages/workflow-code/src/print/refs.ts | 4 +- packages/workflow-code/src/print/values.ts | 10 +- packages/workflow-code/src/sdk.ts | 11 +- packages/workflow-sdk/README.md | 24 +- .../src/codegen/core-text.generated.ts | 2 +- .../workflow-sdk/src/codegen/generate.test.ts | 2 +- packages/workflow-sdk/src/codegen/generate.ts | 4 +- .../workflow-sdk/src/codegen/map-subblock.ts | 6 +- packages/workflow-sdk/src/codegen/names.ts | 9 +- .../workflow-sdk/src/codegen/workspace.ts | 12 +- packages/workflow-sdk/src/core.d.ts | 63 +-- packages/workflow-sdk/src/runtime.test.ts | 8 +- packages/workflow-sdk/src/runtime.ts | 11 +- .../test/examples/approval-flow.ts | 4 +- .../test/examples/lead-enrichment.ts | 13 +- .../workflow-sdk/test/examples/rag-doc-qa.ts | 4 +- .../test/examples/scheduled-report.ts | 8 +- .../test/examples/support-triage.ts | 4 +- .../workflow-sdk/test/fixtures/workspace.ts | 12 +- .../workflow-sdk/test/negative/rejected.ts | 12 +- 49 files changed, 521 insertions(+), 506 deletions(-) diff --git a/apps/sim/blocks/sdk-names.generated.ts b/apps/sim/blocks/sdk-names.generated.ts index 6dd830ac589..3e090810fe0 100644 --- a/apps/sim/blocks/sdk-names.generated.ts +++ b/apps/sim/blocks/sdk-names.generated.ts @@ -5,5 +5,5 @@ import type { SdkNamesFile } from '@/lib/workflows/code/catalog/sdk-names' /** The frozen SDK builder names. */ export const SDK_NAMES: SdkNamesFile = JSON.parse( - '{"version":1,"blocks":{"a2a":{"namespace":"a2a","methods":{"a2a_cancel_task":"cancelTask","a2a_get_agent_card":"getAgentCard","a2a_get_task":"getTask","a2a_send_message":"sendMessage"}},"affinity":{"namespace":"legacy.affinity","methods":{"batch_update_entity_fields":"batchUpdateEntityFields","batch_update_list_entry_fields":"batchUpdateListEntryFields","create_list":"createList","create_list_field_dropdown_option":"createListFieldDropdownOption","create_merge":"createMerge","create_note":"createNote","create_reminder":"createReminder","delete_list_field_dropdown_option":"deleteListFieldDropdownOption","delete_note":"deleteNote","get_company":"getCompany","get_current_user":"getCurrentUser","get_entity_field_value":"getEntityFieldValue","get_list":"getList","get_list_entry":"getListEntry","get_list_entry_field":"getListEntryField","get_list_field_dropdown_option":"getListFieldDropdownOption","get_merge":"getMerge","get_merge_task":"getMergeTask","get_note":"getNote","get_opportunity":"getOpportunity","get_person":"getPerson","get_saved_view":"getSavedView","get_transcript":"getTranscript","get_user":"getUser","list_calls":"listCalls","list_chat_messages":"listChatMessages","list_companies":"listCompanies","list_coworker_connections":"listCoworkerConnections","list_emails":"listEmails","list_entity_field_values":"listEntityFieldValues","list_entity_list_entries":"listRowsHoldingEntity","list_entity_lists":"listListsHoldingEntity","list_entity_notes":"listNotesOnEntity","list_entity_relationships":"listEntityRelationships","list_field_dropdown_options":"listFieldDropdownOptions","list_field_metadata":"listFieldMetadata","list_field_value_changes":"listFieldValueChanges","list_investor_executive_connections":"listInvestorExecutiveConnections","list_list_entries":"listListEntries","list_list_entry_field_value_changes":"listListEntryFieldValueChanges","list_list_entry_fields":"listListEntryFields","list_list_field_dropdown_options":"listListFieldDropdownOptions","list_list_fields":"listListFields","list_lists":"listLists","list_meetings":"listMeetings","list_merge_tasks":"listMergeTasks","list_merges":"listMerges","list_note_attached_companies":"listNoteAttachedCompanies","list_note_attached_opportunities":"listNoteAttachedOpportunities","list_note_attached_persons":"listNoteAttachedPeople","list_note_replies":"listNoteReplies","list_notes":"listNotes","list_opportunities":"listOpportunities","list_persons":"listPeople","list_reminders":"listReminders","list_saved_view_entries":"listSavedViewEntries","list_saved_views":"listSavedViews","list_transcript_fragments":"listTranscriptFragments","list_transcripts":"listTranscripts","list_users":"listUsers","search_companies":"searchCompanies","search_files":"searchFiles","search_list_entries":"searchListEntries","search_notes":"searchNotes","search_persons":"searchPeople","semantic_search":"semanticSearch","update_entity_field_value":"updateEntityFieldValue","update_list_entry_field":"updateListEntryField","update_list_field_dropdown_option":"updateListFieldDropdownOption","update_note":"updateNote"}},"affinity_v2":{"namespace":"affinity","methods":{"batch_update_entity_fields":"batchUpdateEntityFields","batch_update_list_entry_fields":"batchUpdateListEntryFields","create_list":"createList","create_list_field_dropdown_option":"createListFieldDropdownOption","create_merge":"createMerge","create_note":"createNote","create_reminder":"createReminder","delete_list_field_dropdown_option":"deleteListFieldDropdownOption","delete_note":"deleteNote","get_company":"getCompany","get_current_user":"getCurrentUser","get_entity_field_value":"getEntityFieldValue","get_list":"getList","get_list_entry":"getListEntry","get_list_entry_field":"getListEntryField","get_list_field_dropdown_option":"getListFieldDropdownOption","get_merge":"getMerge","get_merge_task":"getMergeTask","get_note":"getNote","get_opportunity":"getOpportunity","get_person":"getPerson","get_saved_view":"getSavedView","get_transcript":"getTranscript","get_user":"getUser","list_calls":"listCalls","list_chat_messages":"listChatMessages","list_companies":"listCompanies","list_coworker_connections":"listCoworkerConnections","list_emails":"listEmails","list_entity_field_values":"listEntityFieldValues","list_entity_list_entries":"listRowsHoldingEntity","list_entity_lists":"listListsHoldingEntity","list_entity_notes":"listNotesOnEntity","list_entity_relationships":"listEntityRelationships","list_field_dropdown_options":"listFieldDropdownOptions","list_field_metadata":"listFieldMetadata","list_field_value_changes":"listFieldValueChanges","list_investor_executive_connections":"listInvestorExecutiveConnections","list_list_entries":"listListEntries","list_list_entry_field_value_changes":"listListEntryFieldValueChanges","list_list_entry_fields":"listListEntryFields","list_list_field_dropdown_options":"listListFieldDropdownOptions","list_list_fields":"listListFields","list_lists":"listLists","list_meetings":"listMeetings","list_merge_tasks":"listMergeTasks","list_merges":"listMerges","list_note_attached_companies":"listNoteAttachedCompanies","list_note_attached_opportunities":"listNoteAttachedOpportunities","list_note_attached_persons":"listNoteAttachedPeople","list_note_replies":"listNoteReplies","list_notes":"listNotes","list_opportunities":"listOpportunities","list_persons":"listPeople","list_reminders":"listReminders","list_saved_view_entries":"listSavedViewEntries","list_saved_views":"listSavedViews","list_transcript_fragments":"listTranscriptFragments","list_transcripts":"listTranscripts","list_users":"listUsers","search_companies":"searchCompanies","search_files":"searchFiles","search_list_entries":"searchListEntries","search_notes":"searchNotes","search_persons":"searchPeople","semantic_search":"semanticSearch","update_entity_field_value":"updateEntityFieldValue","update_list_entry_field":"updateListEntryField","update_list_field_dropdown_option":"updateListFieldDropdownOption","update_note":"updateNote"},"params":{"action":{"oauthCredential":"credential"}}},"agent":{"namespace":"agent"},"agentmail":{"namespace":"legacy.agentmail","methods":{"create_draft":"createDraft","create_inbox":"createInbox","delete_draft":"deleteDraft","delete_inbox":"deleteInbox","delete_thread":"deleteThread","forward_message":"forwardMessage","get_draft":"getDraft","get_inbox":"getInbox","get_message":"getMessage","get_thread":"getThread","list_drafts":"listDrafts","list_inboxes":"listInboxes","list_messages":"listMessages","list_threads":"listThreads","reply_message":"replyToMessage","send_draft":"sendDraft","send_message":"sendMessage","update_draft":"updateDraft","update_inbox":"updateInbox","update_message":"updateMessageLabels","update_thread":"updateThreadLabels"}},"agentmail_v2":{"namespace":"agentmail","methods":{"create_draft":"createDraft","create_inbox":"createInbox","delete_draft":"deleteDraft","delete_inbox":"deleteInbox","delete_thread":"deleteThread","forward_message":"forwardMessage","get_draft":"getDraft","get_inbox":"getInbox","get_message":"getMessage","get_thread":"getThread","list_drafts":"listDrafts","list_inboxes":"listInboxes","list_messages":"listMessages","list_threads":"listThreads","reply_message":"replyToMessage","send_draft":"sendDraft","send_message":"sendMessage","update_draft":"updateDraft","update_inbox":"updateInbox","update_message":"updateMessageLabels","update_thread":"updateThreadLabels"},"params":{"action":{"oauthCredential":"credential"}}},"agentphone":{"namespace":"legacy.agentphone","methods":{"create_call":"createCall","create_contact":"createContact","create_number":"createNumber","delete_contact":"deleteContact","get_call":"getCall","get_call_transcript":"getCallTranscript","get_contact":"getContact","get_conversation":"getConversation","get_conversation_messages":"getConversationMessages","get_number_messages":"getNumberMessages","get_usage":"getUsage","get_usage_daily":"getDailyUsage","get_usage_monthly":"getMonthlyUsage","list_calls":"listCalls","list_contacts":"listContacts","list_conversations":"listConversations","list_numbers":"listNumbers","react_to_message":"reactToMessage","release_number":"releaseNumber","send_message":"sendMessage","update_contact":"updateContact","update_conversation":"updateConversation"}},"agentphone_v2":{"namespace":"agentphone","methods":{"create_call":"createCall","create_contact":"createContact","create_number":"createNumber","delete_contact":"deleteContact","get_call":"getCall","get_call_transcript":"getCallTranscript","get_contact":"getContact","get_conversation":"getConversation","get_conversation_messages":"getConversationMessages","get_number_messages":"getNumberMessages","get_usage":"getUsage","get_usage_daily":"getDailyUsage","get_usage_monthly":"getMonthlyUsage","list_calls":"listCalls","list_contacts":"listContacts","list_conversations":"listConversations","list_numbers":"listNumbers","react_to_message":"reactToMessage","release_number":"releaseNumber","send_message":"sendMessage","update_contact":"updateContact","update_conversation":"updateConversation"},"params":{"action":{"oauthCredential":"credential"}}},"agiloft":{"namespace":"agiloft","methods":{"async_status":"asyncStatus","attach_file":"attachFile","attachment_info":"attachmentInfo","create_record":"createRecord","delete_record":"deleteRecord","get_choice_line_id":"getChoiceLineId","list_tables":"listTablesFields","lock_record":"lockRecord","nlp_search":"naturalLanguageSearch","read_record":"readRecord","remove_attachment":"removeAttachment","retrieve_attachment":"retrieveAttachment","run_action_button":"runActionButton","saved_search":"savedSearch","search_records":"searchRecords","select_records":"selectRecords","update_record":"updateRecord","upsert_record":"upsertRecord"}},"ahrefs":{"namespace":"legacy.ahrefs","methods":{"ahrefs_anchors":"anchors","ahrefs_backlinks":"backlinks","ahrefs_backlinks_stats":"backlinksStats","ahrefs_batch_analysis":"batchAnalysis","ahrefs_broken_backlinks":"brokenBacklinks","ahrefs_domain_rating":"domainRating","ahrefs_domain_rating_history":"domainRatingHistory","ahrefs_keyword_overview":"keywordOverview","ahrefs_keywords_history":"keywordsHistory","ahrefs_metrics":"metricsOverview","ahrefs_metrics_history":"metricsHistory","ahrefs_organic_competitors":"organicCompetitors","ahrefs_organic_keywords":"organicKeywords","ahrefs_paid_pages":"paidPages","ahrefs_rank_tracker_competitors_overview":"rankTrackerCompetitorsOverview","ahrefs_rank_tracker_competitors_stats":"rankTrackerCompetitorsStats","ahrefs_rank_tracker_overview":"rankTrackerOverview","ahrefs_rank_tracker_serp_overview":"rankTrackerSerpOverview","ahrefs_refdomains_history":"referringDomainsHistory","ahrefs_referring_domains":"referringDomains","ahrefs_related_terms":"relatedTerms","ahrefs_site_audit_page_explorer":"siteAuditPageExplorer","ahrefs_top_pages":"topPages"}},"ahrefs_v2":{"namespace":"ahrefs","methods":{"ahrefs_anchors":"anchors","ahrefs_backlinks":"backlinks","ahrefs_backlinks_stats":"backlinksStats","ahrefs_batch_analysis":"batchAnalysis","ahrefs_broken_backlinks":"brokenBacklinks","ahrefs_domain_rating":"domainRating","ahrefs_domain_rating_history":"domainRatingHistory","ahrefs_keyword_overview":"keywordOverview","ahrefs_keywords_history":"keywordsHistory","ahrefs_metrics":"metricsOverview","ahrefs_metrics_history":"metricsHistory","ahrefs_organic_competitors":"organicCompetitors","ahrefs_organic_keywords":"organicKeywords","ahrefs_paid_pages":"paidPages","ahrefs_rank_tracker_competitors_overview":"rankTrackerCompetitorsOverview","ahrefs_rank_tracker_competitors_stats":"rankTrackerCompetitorsStats","ahrefs_rank_tracker_overview":"rankTrackerOverview","ahrefs_rank_tracker_serp_overview":"rankTrackerSerpOverview","ahrefs_refdomains_history":"referringDomainsHistory","ahrefs_referring_domains":"referringDomains","ahrefs_related_terms":"relatedTerms","ahrefs_site_audit_page_explorer":"siteAuditPageExplorer","ahrefs_top_pages":"topPages"},"params":{"action":{"oauthCredential":"credential"}}},"airtable":{"namespace":"airtable","methods":{"create":"createRecords","delete":"deleteRecords","get":"getRecord","getSchema":"getBaseSchema","list":"listRecords","listBases":"listBases","listTables":"listTables","update":"updateRecord","updateMultiple":"updateMultipleRecords","upsert":"upsertRecords"},"triggers":{"airtable_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"algolia":{"namespace":"legacy.algolia","methods":{"add_record":"addRecord","batch_operations":"batchOperations","browse_records":"browseRecords","clear_records":"clearRecords","copy_move_index":"copyMoveIndex","delete_by_filter":"deleteByFilter","delete_index":"deleteIndex","delete_record":"deleteRecord","get_record":"getRecord","get_records":"getRecords","get_settings":"getSettings","get_task_status":"getTaskStatus","list_indices":"listIndices","partial_update_record":"partialUpdateRecord","search":"search","update_settings":"updateSettings"}},"algolia_v2":{"namespace":"algolia","methods":{"add_record":"addRecord","batch_operations":"batchOperations","browse_records":"browseRecords","clear_records":"clearRecords","copy_move_index":"copyMoveIndex","delete_by_filter":"deleteByFilter","delete_index":"deleteIndex","delete_record":"deleteRecord","get_record":"getRecord","get_records":"getRecords","get_settings":"getSettings","get_task_status":"getTaskStatus","list_indices":"listIndices","partial_update_record":"partialUpdateRecord","search":"search","update_settings":"updateSettings"},"params":{"action":{"oauthCredential":"credential"}}},"amplitude":{"namespace":"legacy.amplitude","methods":{"event_segmentation":"eventSegmentation","funnels":"funnels","get_active_users":"getActiveUsers","get_revenue":"getRevenue","group_identify":"groupIdentify","identify_user":"identifyUser","list_events":"listEvents","realtime_active_users":"realTimeActiveUsers","retention":"retention","send_event":"sendEvent","user_activity":"userActivity","user_profile":"userProfile","user_search":"userSearch"}},"amplitude_v2":{"namespace":"amplitude","methods":{"event_segmentation":"eventSegmentation","funnels":"funnels","get_active_users":"getActiveUsers","get_revenue":"getRevenue","group_identify":"groupIdentify","identify_user":"identifyUser","list_events":"listEvents","realtime_active_users":"realTimeActiveUsers","retention":"retention","send_event":"sendEvent","user_activity":"userActivity","user_profile":"userProfile","user_search":"userSearch"},"params":{"action":{"oauthCredential":"credential"}}},"api":{"namespace":"api"},"api_trigger":{"namespace":"legacy.apiTrigger"},"apify":{"namespace":"legacy.apify","methods":{"apify_get_dataset_items":"getDatasetItems","apify_get_run":"getRun","apify_run_actor_async":"runActorAsync","apify_run_actor_sync":"runActor","apify_run_task":"runTask"}},"apify_v2":{"namespace":"apify","methods":{"apify_get_dataset_items":"getDatasetItems","apify_get_run":"getRun","apify_run_actor_async":"runActorAsync","apify_run_actor_sync":"runActor","apify_run_task":"runTask"},"params":{"action":{"oauthCredential":"credential"}}},"apollo":{"namespace":"legacy.apollo","methods":{"account_bulk_create":"bulkCreateAccounts","account_bulk_update":"bulkUpdateAccounts","account_create":"createAccount","account_search":"searchAccounts","account_update":"updateAccount","contact_bulk_create":"bulkCreateContacts","contact_bulk_update":"bulkUpdateContacts","contact_create":"createContact","contact_search":"searchContacts","contact_update":"updateContact","email_accounts":"getEmailAccounts","opportunity_create":"createOpportunity","opportunity_get":"getOpportunity","opportunity_search":"searchOpportunities","opportunity_update":"updateOpportunity","organization_bulk_enrich":"bulkEnrichOrganizations","organization_enrich":"enrichOrganization","organization_search":"searchOrganizations","people_bulk_enrich":"bulkEnrichPeople","people_enrich":"enrichPerson","people_search":"searchPeople","sequence_add":"addToSequence","sequence_search":"searchSequences","task_create":"createTask","task_search":"searchTasks"}},"apollo_v2":{"namespace":"apollo","methods":{"account_bulk_create":"bulkCreateAccounts","account_bulk_update":"bulkUpdateAccounts","account_create":"createAccount","account_search":"searchAccounts","account_update":"updateAccount","contact_bulk_create":"bulkCreateContacts","contact_bulk_update":"bulkUpdateContacts","contact_create":"createContact","contact_search":"searchContacts","contact_update":"updateContact","email_accounts":"getEmailAccounts","opportunity_create":"createOpportunity","opportunity_get":"getOpportunity","opportunity_search":"searchOpportunities","opportunity_update":"updateOpportunity","organization_bulk_enrich":"bulkEnrichOrganizations","organization_enrich":"enrichOrganization","organization_search":"searchOrganizations","people_bulk_enrich":"bulkEnrichPeople","people_enrich":"enrichPerson","people_search":"searchPeople","sequence_add":"addToSequence","sequence_search":"searchSequences","task_create":"createTask","task_search":"searchTasks"},"params":{"action":{"oauthCredential":"credential"}}},"appconfig":{"namespace":"legacy.appconfig","methods":{"create_application":"createApplication","create_configuration_profile":"createConfigurationProfile","create_environment":"createEnvironment","create_hosted_configuration_version":"createHostedConfigurationVersion","delete_application":"deleteApplication","delete_configuration_profile":"deleteConfigurationProfile","delete_environment":"deleteEnvironment","delete_hosted_configuration_version":"deleteHostedConfigurationVersion","get_application":"getApplication","get_configuration":"getConfiguration","get_configuration_profile":"getConfigurationProfile","get_deployment":"getDeployment","get_environment":"getEnvironment","get_hosted_configuration_version":"getHostedConfigurationVersion","list_applications":"listApplications","list_configuration_profiles":"listConfigurationProfiles","list_deployment_strategies":"listDeploymentStrategies","list_deployments":"listDeployments","list_environments":"listEnvironments","list_hosted_configuration_versions":"listHostedConfigurationVersions","start_deployment":"startDeployment","stop_deployment":"stopDeployment","update_application":"updateApplication","update_configuration_profile":"updateConfigurationProfile","update_environment":"updateEnvironment"}},"appconfig_v2":{"namespace":"appconfig","methods":{"create_application":"createApplication","create_configuration_profile":"createConfigurationProfile","create_environment":"createEnvironment","create_hosted_configuration_version":"createHostedConfigurationVersion","delete_application":"deleteApplication","delete_configuration_profile":"deleteConfigurationProfile","delete_environment":"deleteEnvironment","delete_hosted_configuration_version":"deleteHostedConfigurationVersion","get_application":"getApplication","get_configuration":"getConfiguration","get_configuration_profile":"getConfigurationProfile","get_deployment":"getDeployment","get_environment":"getEnvironment","get_hosted_configuration_version":"getHostedConfigurationVersion","list_applications":"listApplications","list_configuration_profiles":"listConfigurationProfiles","list_deployment_strategies":"listDeploymentStrategies","list_deployments":"listDeployments","list_environments":"listEnvironments","list_hosted_configuration_versions":"listHostedConfigurationVersions","start_deployment":"startDeployment","stop_deployment":"stopDeployment","update_application":"updateApplication","update_configuration_profile":"updateConfigurationProfile","update_environment":"updateEnvironment"},"params":{"action":{"oauthCredential":"credential"}}},"arxiv":{"namespace":"arxiv","methods":{"arxiv_get_author_papers":"getAuthorPapers","arxiv_get_paper":"getPaperDetails","arxiv_search":"searchPapers"}},"asana":{"namespace":"asana","methods":{"add_comment":"addComment","add_followers":"addFollowers","create_project":"createProject","create_section":"createSection","create_subtask":"createSubtask","create_task":"createTask","delete_task":"deleteTask","get_project":"getProject","get_projects":"getProjects","get_task":"getTask","list_sections":"listSections","list_workspaces":"listWorkspaces","search_tasks":"searchTasks","update_task":"updateTask"},"params":{"action":{"oauthCredential":"credential"}}},"ashby":{"namespace":"legacy.ashby","methods":{"add_candidate_tag":"addCandidateTag","anonymize_candidate":"anonymizeCandidate","change_application_source":"changeApplicationSource","change_application_stage":"changeApplicationStage","create_application":"createApplication","create_candidate":"createCandidate","create_note":"createNote","delete_application":"deleteApplication","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_job_posting":"getJobPosting","get_offer":"getOffer","get_opening":"getOpening","list_application_feedback":"listApplicationFeedback","list_application_history":"listApplicationHistory","list_applications":"listApplications","list_archive_reasons":"listArchiveReasons","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_interview_plans":"listInterviewPlans","list_interview_stages":"listInterviewStages","list_interviews":"listInterviews","list_job_postings":"listJobPostings","list_jobs":"listJobs","list_locations":"listLocations","list_notes":"listNotes","list_offers":"listOffers","list_openings":"listOpenings","list_sources":"listSources","list_users":"listUsers","remove_candidate_tag":"removeCandidateTag","search_candidates":"searchCandidates","search_jobs":"searchJobs","search_openings":"searchOpenings","search_users":"searchUsers","set_custom_field_value":"setCustomFieldValue","set_custom_field_values":"setCustomFieldValues","transfer_application":"transferApplication","update_candidate":"updateCandidate","upload_candidate_file":"uploadCandidateFile","upload_resume":"uploadResume"},"triggers":{"ashby_application_submit":"applicationSubmit","ashby_application_update":"applicationUpdate","ashby_candidate_delete":"candidateDelete","ashby_candidate_hire":"candidateHire","ashby_candidate_merge":"candidateMerge","ashby_candidate_stage_change":"candidateStageChange","ashby_interview_schedule_create":"interviewScheduleCreate","ashby_interview_schedule_update":"interviewScheduleUpdate","ashby_job_create":"jobCreate","ashby_job_posting_delete":"jobPostingDelete","ashby_job_posting_update":"jobPostingUpdate","ashby_job_update":"jobUpdate","ashby_offer_create":"offerCreate","ashby_offer_delete":"offerDelete","ashby_offer_update":"offerUpdate","ashby_opening_create":"openingCreate","ashby_signature_request_update":"signatureRequestUpdate"}},"ashby_v2":{"namespace":"ashby","methods":{"add_candidate_tag":"addCandidateTag","anonymize_candidate":"anonymizeCandidate","change_application_source":"changeApplicationSource","change_application_stage":"changeApplicationStage","create_application":"createApplication","create_candidate":"createCandidate","create_note":"createNote","delete_application":"deleteApplication","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_job_posting":"getJobPosting","get_offer":"getOffer","get_opening":"getOpening","list_application_feedback":"listApplicationFeedback","list_application_history":"listApplicationHistory","list_applications":"listApplications","list_archive_reasons":"listArchiveReasons","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_interview_plans":"listInterviewPlans","list_interview_stages":"listInterviewStages","list_interviews":"listInterviews","list_job_postings":"listJobPostings","list_jobs":"listJobs","list_locations":"listLocations","list_notes":"listNotes","list_offers":"listOffers","list_openings":"listOpenings","list_sources":"listSources","list_users":"listUsers","remove_candidate_tag":"removeCandidateTag","search_candidates":"searchCandidates","search_jobs":"searchJobs","search_openings":"searchOpenings","search_users":"searchUsers","set_custom_field_value":"setCustomFieldValue","set_custom_field_values":"setCustomFieldValues","transfer_application":"transferApplication","update_candidate":"updateCandidate","upload_candidate_file":"uploadCandidateFile","upload_resume":"uploadResume"},"triggers":{"ashby_application_submit":"applicationSubmit","ashby_application_update":"applicationUpdate","ashby_candidate_delete":"candidateDelete","ashby_candidate_hire":"candidateHire","ashby_candidate_merge":"candidateMerge","ashby_candidate_stage_change":"candidateStageChange","ashby_interview_schedule_create":"interviewScheduleCreate","ashby_interview_schedule_update":"interviewScheduleUpdate","ashby_job_create":"jobCreate","ashby_job_posting_delete":"jobPostingDelete","ashby_job_posting_update":"jobPostingUpdate","ashby_job_update":"jobUpdate","ashby_offer_create":"offerCreate","ashby_offer_delete":"offerDelete","ashby_offer_update":"offerUpdate","ashby_opening_create":"openingCreate","ashby_signature_request_update":"signatureRequestUpdate"},"params":{"action":{"oauthCredential":"credential"}}},"athena":{"namespace":"legacy.athena","methods":{"batch_get_named_query":"batchGetNamedQueries","batch_get_prepared_statement":"batchGetPreparedStatements","batch_get_query_execution":"batchGetQueryExecutions","create_named_query":"createNamedQuery","create_prepared_statement":"createPreparedStatement","delete_named_query":"deleteNamedQuery","delete_prepared_statement":"deletePreparedStatement","get_data_catalog":"getDataCatalog","get_database":"getDatabase","get_named_query":"getNamedQuery","get_prepared_statement":"getPreparedStatement","get_query_execution":"getQueryExecution","get_query_results":"getQueryResults","get_query_runtime_statistics":"getQueryRuntimeStatistics","get_table_metadata":"getTableMetadata","get_work_group":"getWorkgroup","list_data_catalogs":"listDataCatalogs","list_databases":"listDatabases","list_named_queries":"listNamedQueries","list_prepared_statements":"listPreparedStatements","list_query_executions":"listQueryExecutions","list_table_metadata":"listTableMetadata","list_work_groups":"listWorkgroups","start_query":"startQuery","stop_query":"stopQuery","update_named_query":"updateNamedQuery","update_prepared_statement":"updatePreparedStatement"}},"athena_v2":{"namespace":"athena","methods":{"batch_get_named_query":"batchGetNamedQueries","batch_get_prepared_statement":"batchGetPreparedStatements","batch_get_query_execution":"batchGetQueryExecutions","create_named_query":"createNamedQuery","create_prepared_statement":"createPreparedStatement","delete_named_query":"deleteNamedQuery","delete_prepared_statement":"deletePreparedStatement","get_data_catalog":"getDataCatalog","get_database":"getDatabase","get_named_query":"getNamedQuery","get_prepared_statement":"getPreparedStatement","get_query_execution":"getQueryExecution","get_query_results":"getQueryResults","get_query_runtime_statistics":"getQueryRuntimeStatistics","get_table_metadata":"getTableMetadata","get_work_group":"getWorkgroup","list_data_catalogs":"listDataCatalogs","list_databases":"listDatabases","list_named_queries":"listNamedQueries","list_prepared_statements":"listPreparedStatements","list_query_executions":"listQueryExecutions","list_table_metadata":"listTableMetadata","list_work_groups":"listWorkgroups","start_query":"startQuery","stop_query":"stopQuery","update_named_query":"updateNamedQuery","update_prepared_statement":"updatePreparedStatement"},"params":{"action":{"oauthCredential":"credential"}}},"attio":{"namespace":"attio","methods":{"assert_record":"assertRecordUpsert","create_attribute":"createAttribute","create_comment":"createComment","create_list":"createList","create_list_entry":"createListEntry","create_note":"createNote","create_object":"createObject","create_record":"createRecord","create_task":"createTask","create_webhook":"createWebhook","delete_comment":"deleteComment","delete_list_entry":"deleteListEntry","delete_note":"deleteNote","delete_record":"deleteRecord","delete_task":"deleteTask","delete_webhook":"deleteWebhook","get_attribute":"getAttribute","get_comment":"getComment","get_list":"getList","get_list_entry":"getListEntry","get_member":"getMember","get_note":"getNote","get_object":"getObject","get_record":"getRecord","get_task":"getTask","get_thread":"getThread","get_webhook":"getWebhook","list_attributes":"listAttributes","list_lists":"listLists","list_members":"listMembers","list_notes":"listNotes","list_objects":"listObjects","list_records":"listRecords","list_tasks":"listTasks","list_threads":"listThreads","list_webhooks":"listWebhooks","query_list_entries":"queryListEntries","search_records":"searchRecords","update_attribute":"updateAttribute","update_list":"updateList","update_list_entry":"updateListEntry","update_object":"updateObject","update_record":"updateRecord","update_task":"updateTask","update_webhook":"updateWebhook"},"triggers":{"attio_comment_created":"commentCreated","attio_comment_deleted":"commentDeleted","attio_comment_resolved":"commentResolved","attio_comment_unresolved":"commentUnresolved","attio_list_created":"listCreated","attio_list_deleted":"listDeleted","attio_list_entry_created":"listEntryCreated","attio_list_entry_deleted":"listEntryDeleted","attio_list_entry_updated":"listEntryUpdated","attio_list_updated":"listUpdated","attio_note_created":"noteCreated","attio_note_deleted":"noteDeleted","attio_note_updated":"noteUpdated","attio_record_created":"recordCreated","attio_record_deleted":"recordDeleted","attio_record_merged":"recordMerged","attio_record_updated":"recordUpdated","attio_task_created":"taskCreated","attio_task_deleted":"taskDeleted","attio_task_updated":"taskUpdated","attio_webhook":"webhook","attio_workspace_member_created":"workspaceMemberCreated"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"azure_data_explorer":{"namespace":"legacy.azureDataExplorer","methods":{"azure_data_explorer_create_table":"createTable","azure_data_explorer_drop_table":"dropTable","azure_data_explorer_ingest_from_query":"ingestFromQuery","azure_data_explorer_ingest_inline":"ingestRowsInline","azure_data_explorer_list_databases":"listDatabases","azure_data_explorer_list_functions":"listFunctions","azure_data_explorer_list_tables":"listTables","azure_data_explorer_management":"managementCommandAdvanced","azure_data_explorer_query":"runQuery","azure_data_explorer_show_database_schema":"showDatabaseSchema","azure_data_explorer_show_ingestion_failures":"showIngestionFailures","azure_data_explorer_show_operations":"showOperations","azure_data_explorer_show_table_details":"showTableDetails","azure_data_explorer_show_table_schema":"showTableSchema"}},"azure_data_explorer_v2":{"namespace":"azureDataExplorer","methods":{"azure_data_explorer_create_table":"createTable","azure_data_explorer_drop_table":"dropTable","azure_data_explorer_ingest_from_query":"ingestFromQuery","azure_data_explorer_ingest_inline":"ingestRowsInline","azure_data_explorer_list_databases":"listDatabases","azure_data_explorer_list_functions":"listFunctions","azure_data_explorer_list_tables":"listTables","azure_data_explorer_management":"managementCommandAdvanced","azure_data_explorer_query":"runQuery","azure_data_explorer_show_database_schema":"showDatabaseSchema","azure_data_explorer_show_ingestion_failures":"showIngestionFailures","azure_data_explorer_show_operations":"showOperations","azure_data_explorer_show_table_details":"showTableDetails","azure_data_explorer_show_table_schema":"showTableSchema"},"params":{"action":{"oauthCredential":"credential"}}},"azure_devops":{"namespace":"legacy.azureDevops","methods":{"azure_devops_add_comment":"addComment","azure_devops_create_work_item":"createWorkItem","azure_devops_get_build_log":"getBuildLog","azure_devops_get_build_timeline":"getBuildTimeline","azure_devops_get_comments":"getComments","azure_devops_get_pipeline":"getPipeline","azure_devops_get_pipeline_run":"getPipelineRun","azure_devops_get_work_item":"getWorkItem","azure_devops_get_work_items_batch":"getWorkItemsBatch","azure_devops_get_work_items_between_builds":"getWorkItemsBetweenBuilds","azure_devops_list_build_logs":"listBuildLogs","azure_devops_list_builds":"listBuilds","azure_devops_list_pipeline_runs":"listPipelineRuns","azure_devops_list_pipelines":"listPipelines","azure_devops_query_work_items":"queryWorkItems","azure_devops_update_work_item":"updateWorkItem"},"triggers":{"azure_devops_build_failed":"buildFailed","azure_devops_webhook":"webhook","azure_devops_work_item_created":"workItemCreated"}},"azure_devops_v2":{"namespace":"azureDevops","methods":{"azure_devops_add_comment":"addComment","azure_devops_create_work_item":"createWorkItem","azure_devops_get_build_log":"getBuildLog","azure_devops_get_build_timeline":"getBuildTimeline","azure_devops_get_comments":"getComments","azure_devops_get_pipeline":"getPipeline","azure_devops_get_pipeline_run":"getPipelineRun","azure_devops_get_work_item":"getWorkItem","azure_devops_get_work_items_batch":"getWorkItemsBatch","azure_devops_get_work_items_between_builds":"getWorkItemsBetweenBuilds","azure_devops_list_build_logs":"listBuildLogs","azure_devops_list_builds":"listBuilds","azure_devops_list_pipeline_runs":"listPipelineRuns","azure_devops_list_pipelines":"listPipelines","azure_devops_query_work_items":"queryWorkItems","azure_devops_update_work_item":"updateWorkItem"},"triggers":{"azure_devops_build_failed":"buildFailed","azure_devops_webhook":"webhook","azure_devops_work_item_created":"workItemCreated"},"params":{"action":{"oauthCredential":"credential"}}},"bitbucket":{"namespace":"bitbucket","methods":{"bitbucket_approve_pull_request":"approvePullRequest","bitbucket_create_branch":"createBranch","bitbucket_create_pull_request":"createPullRequest","bitbucket_create_pull_request_comment":"createPullRequestComment","bitbucket_decline_pull_request":"declinePullRequest","bitbucket_delete_branch":"deleteBranch","bitbucket_get_commit":"getCommit","bitbucket_get_file":"getFile","bitbucket_get_file_metadata":"getFileMetadata","bitbucket_get_pipeline":"getPipeline","bitbucket_get_pipeline_step_log":"getPipelineStepLog","bitbucket_get_pull_request":"getPullRequest","bitbucket_get_pull_request_diff":"getPullRequestDiff","bitbucket_get_pull_request_diffstat":"getPullRequestDiffstat","bitbucket_get_pull_request_merge_task_status":"getPullRequestMergeTaskStatus","bitbucket_get_repository":"getRepository","bitbucket_list_branches":"listBranches","bitbucket_list_commits":"listCommits","bitbucket_list_directory":"listDirectory","bitbucket_list_pipeline_steps":"listPipelineSteps","bitbucket_list_pipelines":"listPipelines","bitbucket_list_pull_request_comments":"listPullRequestComments","bitbucket_list_pull_request_commit_statuses":"listPullRequestCommitStatuses","bitbucket_list_pull_requests":"listPullRequests","bitbucket_list_repositories":"listRepositories","bitbucket_list_workspaces":"listWorkspaces","bitbucket_merge_pull_request":"mergePullRequest","bitbucket_request_pull_request_changes":"requestPullRequestChanges","bitbucket_stop_pipeline":"stopPipeline","bitbucket_trigger_pipeline":"triggerPipeline"},"triggers":{"bitbucket_build_status_created":"buildStatusCreated","bitbucket_build_status_updated":"buildStatusUpdated","bitbucket_commit_comment_created":"commitCommentCreated","bitbucket_pull_request_approval_removed":"pullRequestApprovalRemoved","bitbucket_pull_request_approved":"pullRequestApproved","bitbucket_pull_request_changes_request_removed":"pullRequestChangesRequestRemoved","bitbucket_pull_request_changes_requested":"pullRequestChangesRequested","bitbucket_pull_request_comment_created":"pullRequestCommentCreated","bitbucket_pull_request_comment_deleted":"pullRequestCommentDeleted","bitbucket_pull_request_comment_reopened":"pullRequestCommentReopened","bitbucket_pull_request_comment_resolved":"pullRequestCommentResolved","bitbucket_pull_request_comment_updated":"pullRequestCommentUpdated","bitbucket_pull_request_created":"pullRequestCreated","bitbucket_pull_request_declined":"pullRequestDeclined","bitbucket_pull_request_merged":"pullRequestMerged","bitbucket_pull_request_updated":"pullRequestUpdated","bitbucket_push":"push","bitbucket_repository_forked":"repositoryForked","bitbucket_repository_updated":"repositoryUpdated"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"box":{"namespace":"legacy.box","methods":{"copy_file":"copyFile","create_folder":"createFolder","delete_file":"deleteFile","delete_folder":"deleteFolder","download_file":"downloadFile","get_file_info":"getFileInfo","list_folder_items":"listFolderItems","search":"search","sign_cancel_request":"cancelSignRequest","sign_create_request":"createSignRequest","sign_get_request":"getSignRequest","sign_list_requests":"listSignRequests","sign_resend_request":"resendSignRequest","update_file":"updateFile","upload_file":"uploadFile"}},"box_v2":{"namespace":"box","methods":{"copy_file":"copyFile","create_folder":"createFolder","delete_file":"deleteFile","delete_folder":"deleteFolder","download_file":"downloadFile","get_file_info":"getFileInfo","list_folder_items":"listFolderItems","search":"search","sign_cancel_request":"cancelSignRequest","sign_create_request":"createSignRequest","sign_get_request":"getSignRequest","sign_list_requests":"listSignRequests","sign_resend_request":"resendSignRequest","update_file":"updateFile","upload_file":"uploadFile"}},"brandfetch":{"namespace":"brandfetch","methods":{"get_brand":"getBrand","search":"searchBrands"}},"brex":{"namespace":"legacy.brex","methods":{"archive_budget":"archiveBudget","create_budget":"createBudget","create_spend_limit":"createSpendLimit","create_transfer":"createTransfer","create_vendor":"createVendor","get_budget":"getBudget","get_cash_account":"getCashAccount","get_company":"getCompany","get_current_user":"getCurrentUser","get_expense":"getExpense","get_spend_limit":"getSpendLimit","get_transfer":"getTransfer","get_user":"getUser","get_vendor":"getVendor","list_budgets":"listBudgets","list_card_accounts":"listCardAccounts","list_card_statements":"listCardStatements","list_card_transactions":"listCardTransactions","list_cards":"listCards","list_cash_accounts":"listCashAccounts","list_cash_statements":"listCashStatements","list_cash_transactions":"listCashTransactions","list_departments":"listDepartments","list_expenses":"listExpenses","list_locations":"listLocations","list_spend_limits":"listSpendLimits","list_titles":"listTitles","list_transfers":"listTransfers","list_users":"listUsers","list_vendors":"listVendors","match_receipt":"matchReceipt","update_expense":"updateExpenseMemo","update_vendor":"updateVendor","upload_receipt":"uploadReceipt"}},"brex_v2":{"namespace":"brex","methods":{"archive_budget":"archiveBudget","create_budget":"createBudget","create_spend_limit":"createSpendLimit","create_transfer":"createTransfer","create_vendor":"createVendor","get_budget":"getBudget","get_cash_account":"getCashAccount","get_company":"getCompany","get_current_user":"getCurrentUser","get_expense":"getExpense","get_spend_limit":"getSpendLimit","get_transfer":"getTransfer","get_user":"getUser","get_vendor":"getVendor","list_budgets":"listBudgets","list_card_accounts":"listCardAccounts","list_card_statements":"listCardStatements","list_card_transactions":"listCardTransactions","list_cards":"listCards","list_cash_accounts":"listCashAccounts","list_cash_statements":"listCashStatements","list_cash_transactions":"listCashTransactions","list_departments":"listDepartments","list_expenses":"listExpenses","list_locations":"listLocations","list_spend_limits":"listSpendLimits","list_titles":"listTitles","list_transfers":"listTransfers","list_users":"listUsers","list_vendors":"listVendors","match_receipt":"matchReceipt","update_expense":"updateExpenseMemo","update_vendor":"updateVendor","upload_receipt":"uploadReceipt"},"params":{"action":{"oauthCredential":"credential"}}},"brightdata":{"namespace":"legacy.brightdata","methods":{"cancel_snapshot":"cancelSnapshot","discover":"discover","download_snapshot":"downloadSnapshot","scrape_dataset":"scrapeDataset","scrape_url":"scrapeUrl","serp_search":"serpSearch","snapshot_status":"snapshotStatus","sync_scrape":"syncScrape"}},"brightdata_v2":{"namespace":"brightdata","methods":{"cancel_snapshot":"cancelSnapshot","discover":"discover","download_snapshot":"downloadSnapshot","scrape_dataset":"scrapeDataset","scrape_url":"scrapeUrl","serp_search":"serpSearch","snapshot_status":"snapshotStatus","sync_scrape":"syncScrape"},"params":{"action":{"oauthCredential":"credential"}}},"browser_use":{"namespace":"legacy.browserUse"},"browser_use_v2":{"namespace":"browserUse","params":{"action":{"oauthCredential":"credential"}}},"buffer":{"namespace":"legacy.buffer","methods":{"create_idea":"createIdea","create_post":"createPost","delete_post":"deletePost","edit_post":"editPost","get_account":"getAccount","get_aggregated_post_metrics":"getAggregatedPostMetrics","get_channel":"getChannel","get_channels":"getChannels","get_daily_posting_limits":"getDailyPostingLimits","get_idea_groups":"getIdeaGroups","get_ideas":"getIdeas","get_post":"getPost","get_posts":"getPosts"}},"buffer_v2":{"namespace":"buffer","methods":{"create_idea":"createIdea","create_post":"createPost","delete_post":"deletePost","edit_post":"editPost","get_account":"getAccount","get_aggregated_post_metrics":"getAggregatedPostMetrics","get_channel":"getChannel","get_channels":"getChannels","get_daily_posting_limits":"getDailyPostingLimits","get_idea_groups":"getIdeaGroups","get_ideas":"getIdeas","get_post":"getPost","get_posts":"getPosts"},"params":{"action":{"oauthCredential":"credential"}}},"calcom":{"namespace":"calcom","methods":{"calcom_cancel_booking":"cancelBooking","calcom_confirm_booking":"confirmBooking","calcom_create_booking":"createBooking","calcom_create_event_type":"createEventType","calcom_create_schedule":"createSchedule","calcom_decline_booking":"declineBooking","calcom_delete_event_type":"deleteEventType","calcom_delete_schedule":"deleteSchedule","calcom_get_booking":"getBooking","calcom_get_default_schedule":"getDefaultSchedule","calcom_get_event_type":"getEventType","calcom_get_schedule":"getSchedule","calcom_get_slots":"getAvailableSlots","calcom_list_bookings":"listBookings","calcom_list_event_types":"listEventTypes","calcom_list_schedules":"listSchedules","calcom_reschedule_booking":"rescheduleBooking","calcom_update_event_type":"updateEventType","calcom_update_schedule":"updateSchedule"},"triggers":{"calcom_booking_cancelled":"bookingCancelled","calcom_booking_created":"bookingCreated","calcom_booking_paid":"bookingPaid","calcom_booking_rejected":"bookingRejected","calcom_booking_requested":"bookingRequested","calcom_booking_rescheduled":"bookingRescheduled","calcom_meeting_ended":"meetingEnded","calcom_recording_ready":"recordingReady","calcom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"calendly":{"namespace":"legacy.calendly","methods":{"calendly_cancel_event":"cancelEvent","calendly_create_event_invitee":"bookMeeting","calendly_create_invitee_no_show":"markInviteeNoShow","calendly_create_scheduling_link":"createSchedulingLink","calendly_delete_invitee_no_show":"unmarkInviteeNoShow","calendly_get_current_user":"getCurrentUser","calendly_get_event_invitee":"getEventInvitee","calendly_get_event_type":"getEventType","calendly_get_scheduled_event":"getScheduledEvent","calendly_get_user":"getUser","calendly_list_event_invitees":"listEventInvitees","calendly_list_event_type_available_times":"listEventTypeAvailableTimes","calendly_list_event_types":"listEventTypes","calendly_list_organization_memberships":"listOrganizationMemberships","calendly_list_routing_form_submissions":"listRoutingFormSubmissions","calendly_list_routing_forms":"listRoutingForms","calendly_list_scheduled_events":"listScheduledEvents","calendly_list_user_availability_schedules":"listUserAvailabilitySchedules","calendly_list_user_busy_times":"listUserBusyTimes"},"triggers":{"calendly_invitee_canceled":"inviteeCanceled","calendly_invitee_created":"inviteeCreated","calendly_routing_form_submitted":"routingFormSubmitted","calendly_webhook":"webhook"}},"calendly_v2":{"namespace":"calendly","methods":{"calendly_cancel_event":"cancelEvent","calendly_create_event_invitee":"bookMeeting","calendly_create_invitee_no_show":"markInviteeNoShow","calendly_create_scheduling_link":"createSchedulingLink","calendly_delete_invitee_no_show":"unmarkInviteeNoShow","calendly_get_current_user":"getCurrentUser","calendly_get_event_invitee":"getEventInvitee","calendly_get_event_type":"getEventType","calendly_get_scheduled_event":"getScheduledEvent","calendly_get_user":"getUser","calendly_list_event_invitees":"listEventInvitees","calendly_list_event_type_available_times":"listEventTypeAvailableTimes","calendly_list_event_types":"listEventTypes","calendly_list_organization_memberships":"listOrganizationMemberships","calendly_list_routing_form_submissions":"listRoutingFormSubmissions","calendly_list_routing_forms":"listRoutingForms","calendly_list_scheduled_events":"listScheduledEvents","calendly_list_user_availability_schedules":"listUserAvailabilitySchedules","calendly_list_user_busy_times":"listUserBusyTimes"},"triggers":{"calendly_invitee_canceled":"inviteeCanceled","calendly_invitee_created":"inviteeCreated","calendly_routing_form_submitted":"routingFormSubmitted","calendly_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"cbinsights":{"namespace":"legacy.cbinsights","methods":{"chat":"askChatCbi","get_commercial_maturity_history":"getCommercialMaturityHistory","get_exit_probability_history":"getExitProbabilityHistory","get_mosaic_history":"getMosaicHistory","get_org_business_relationships":"getOrganizationBusinessRelationships","get_org_funding_window":"getOrganizationFundingWindow","get_org_fundings":"getOrganizationFundings","get_org_investments":"getOrganizationInvestments","get_org_management_and_board":"getOrganizationManagementAndBoard","get_org_outlook":"getOrganizationOutlook","get_org_portfolio_exits":"getOrganizationPortfolioExits","get_org_revenue":"getOrganizationRevenue","get_scouting_report":"getScoutingReport","get_strategy_map":"getStrategyMap","list_business_relationships":"listBusinessRelationships","list_funding_window":"listFundingWindows","list_fundings":"listFundings","list_investments":"listInvestments","list_management_and_board":"listManagementAndBoard","list_outlook":"listOutlook","list_portfolio_exits":"listPortfolioExits","list_revenue":"listRevenue","lookup_organizations":"lookUpOrganizations","rag":"retrieveContext","search_firmographics":"searchFirmographics"}},"cbinsights_v2":{"namespace":"cbinsights","methods":{"chat":"askChatCbi","get_commercial_maturity_history":"getCommercialMaturityHistory","get_exit_probability_history":"getExitProbabilityHistory","get_mosaic_history":"getMosaicHistory","get_org_business_relationships":"getOrganizationBusinessRelationships","get_org_funding_window":"getOrganizationFundingWindow","get_org_fundings":"getOrganizationFundings","get_org_investments":"getOrganizationInvestments","get_org_management_and_board":"getOrganizationManagementAndBoard","get_org_outlook":"getOrganizationOutlook","get_org_portfolio_exits":"getOrganizationPortfolioExits","get_org_revenue":"getOrganizationRevenue","get_scouting_report":"getScoutingReport","get_strategy_map":"getStrategyMap","list_business_relationships":"listBusinessRelationships","list_funding_window":"listFundingWindows","list_fundings":"listFundings","list_investments":"listInvestments","list_management_and_board":"listManagementAndBoard","list_outlook":"listOutlook","list_portfolio_exits":"listPortfolioExits","list_revenue":"listRevenue","lookup_organizations":"lookUpOrganizations","rag":"retrieveContext","search_firmographics":"searchFirmographics"},"params":{"action":{"oauthCredential":"credential"}}},"chat_trigger":{"namespace":"legacy.chatTrigger"},"checkr":{"namespace":"legacy.checkr","methods":{"add_report_tag":"addReportTag","apply_report_review_action":"applyReportReviewAction","cancel_adverse_action":"cancelAdverseAction","cancel_continuous_check":"cancelContinuousCheck","cancel_invitation":"cancelInvitation","cancel_subscription":"cancelSubscription","complete_report":"completeReport","create_adverse_action":"createAdverseAction","create_candidate":"createCandidate","create_continuous_check":"createContinuousCheck","create_geo":"createGeo","create_invitation":"inviteCandidate","create_report":"orderReport","create_subscription":"scheduleRecurringCheck","delete_candidate_pii":"deleteCandidatePii","delete_geo":"deleteGeo","get_account":"getAccount","get_adverse_action":"getAdverseAction","get_candidate":"getCandidate","get_continuous_check":"getContinuousCheck","get_document":"getDocument","get_geo":"getGeo","get_invitation":"getInvitation","get_node":"getNode","get_package":"getPackage","get_program":"getProgram","get_report":"getReport","get_report_eta":"getReportEta","get_report_progressive_status":"getReportCheckpoints","get_report_tags":"getReportTags","get_screening":"getScreening","get_subscription":"getSubscription","get_verification":"getVerification","list_adverse_actions":"listAdverseActions","list_adverse_items":"listAdverseItems","list_assessments":"listAssessments","list_candidate_documents":"listCandidateDocuments","list_candidates":"listCandidates","list_continuous_checks":"listContinuousChecks","list_counties":"listCounties","list_geos":"listGeos","list_invitations":"listInvitations","list_nodes":"listNodes","list_packages":"listPackages","list_programs":"listPrograms","list_report_addresses":"listReportAddresses","list_subscriptions":"listSubscriptions","list_users":"listUsers","list_verifications":"listVerifications","remove_report_tag":"removeReportTag","set_report_tags":"setReportTags","update_candidate":"updateCandidate","update_continuous_check":"updateContinuousCheck","update_geo":"updateGeo","update_report":"updateReport","update_subscription":"updateSubscription"},"triggers":{"checkr_adverse_action_canceled":"adverseActionCanceled","checkr_adverse_action_completed":"adverseActionCompleted","checkr_adverse_action_created":"adverseActionCreated","checkr_adverse_action_notice_not_delivered":"adverseActionNoticeNotDelivered","checkr_adverse_action_paused":"adverseActionPaused","checkr_adverse_action_resumed":"adverseActionResumed","checkr_candidate_created":"candidateCreated","checkr_candidate_updated":"candidateUpdated","checkr_continuous_check_confirmation_required":"continuousCheckConfirmationRequired","checkr_continuous_check_subscription_error":"continuousCheckSubscriptionError","checkr_invitation_completed":"invitationCompleted","checkr_invitation_created":"invitationCreated","checkr_invitation_deleted":"invitationDeleted","checkr_invitation_expired":"invitationExpired","checkr_report_canceled":"reportCanceled","checkr_report_completed":"reportCompleted","checkr_report_created":"reportCreated","checkr_report_dispute_completed":"reportDisputeCompleted","checkr_report_disputed":"reportDisputed","checkr_report_engaged":"reportEngaged","checkr_report_paused":"reportPaused","checkr_report_post_adverse_action":"reportPostAdverseAction","checkr_report_pre_adverse_action":"reportPreAdverseAction","checkr_report_resumed":"reportResumed","checkr_report_suspended":"reportSuspended","checkr_report_updated":"reportUpdated","checkr_report_upgraded":"reportUpgraded","checkr_verification_completed":"verificationCompleted","checkr_verification_created":"verificationCreated","checkr_verification_processed":"verificationProcessed","checkr_webhook":"webhook"}},"checkr_v2":{"namespace":"checkr","methods":{"add_report_tag":"addReportTag","apply_report_review_action":"applyReportReviewAction","cancel_adverse_action":"cancelAdverseAction","cancel_continuous_check":"cancelContinuousCheck","cancel_invitation":"cancelInvitation","cancel_subscription":"cancelSubscription","complete_report":"completeReport","create_adverse_action":"createAdverseAction","create_candidate":"createCandidate","create_continuous_check":"createContinuousCheck","create_geo":"createGeo","create_invitation":"inviteCandidate","create_report":"orderReport","create_subscription":"scheduleRecurringCheck","delete_candidate_pii":"deleteCandidatePii","delete_geo":"deleteGeo","get_account":"getAccount","get_adverse_action":"getAdverseAction","get_candidate":"getCandidate","get_continuous_check":"getContinuousCheck","get_document":"getDocument","get_geo":"getGeo","get_invitation":"getInvitation","get_node":"getNode","get_package":"getPackage","get_program":"getProgram","get_report":"getReport","get_report_eta":"getReportEta","get_report_progressive_status":"getReportCheckpoints","get_report_tags":"getReportTags","get_screening":"getScreening","get_subscription":"getSubscription","get_verification":"getVerification","list_adverse_actions":"listAdverseActions","list_adverse_items":"listAdverseItems","list_assessments":"listAssessments","list_candidate_documents":"listCandidateDocuments","list_candidates":"listCandidates","list_continuous_checks":"listContinuousChecks","list_counties":"listCounties","list_geos":"listGeos","list_invitations":"listInvitations","list_nodes":"listNodes","list_packages":"listPackages","list_programs":"listPrograms","list_report_addresses":"listReportAddresses","list_subscriptions":"listSubscriptions","list_users":"listUsers","list_verifications":"listVerifications","remove_report_tag":"removeReportTag","set_report_tags":"setReportTags","update_candidate":"updateCandidate","update_continuous_check":"updateContinuousCheck","update_geo":"updateGeo","update_report":"updateReport","update_subscription":"updateSubscription"},"triggers":{"checkr_adverse_action_canceled":"adverseActionCanceled","checkr_adverse_action_completed":"adverseActionCompleted","checkr_adverse_action_created":"adverseActionCreated","checkr_adverse_action_notice_not_delivered":"adverseActionNoticeNotDelivered","checkr_adverse_action_paused":"adverseActionPaused","checkr_adverse_action_resumed":"adverseActionResumed","checkr_candidate_created":"candidateCreated","checkr_candidate_updated":"candidateUpdated","checkr_continuous_check_confirmation_required":"continuousCheckConfirmationRequired","checkr_continuous_check_subscription_error":"continuousCheckSubscriptionError","checkr_invitation_completed":"invitationCompleted","checkr_invitation_created":"invitationCreated","checkr_invitation_deleted":"invitationDeleted","checkr_invitation_expired":"invitationExpired","checkr_report_canceled":"reportCanceled","checkr_report_completed":"reportCompleted","checkr_report_created":"reportCreated","checkr_report_dispute_completed":"reportDisputeCompleted","checkr_report_disputed":"reportDisputed","checkr_report_engaged":"reportEngaged","checkr_report_paused":"reportPaused","checkr_report_post_adverse_action":"reportPostAdverseAction","checkr_report_pre_adverse_action":"reportPreAdverseAction","checkr_report_resumed":"reportResumed","checkr_report_suspended":"reportSuspended","checkr_report_updated":"reportUpdated","checkr_report_upgraded":"reportUpgraded","checkr_verification_completed":"verificationCompleted","checkr_verification_created":"verificationCreated","checkr_verification_processed":"verificationProcessed","checkr_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"circleback":{"namespace":"legacy.circleback","methods":{"add_tag_to_meetings":"addTagToMeetings","create_tag":"createTag","delete_action_item":"deleteActionItem","delete_meeting":"deleteMeeting","delete_tag":"deleteTag","get_company":"getCompany","get_meeting":"getMeeting","get_person":"getPerson","get_transcript":"getTranscript","list_action_items":"listActionItems","list_calendar_events":"listCalendarEvents","list_companies":"listCompanies","list_meetings":"listMeetings","list_people":"listPeople","list_tags":"listTags","remove_tag_from_meetings":"removeTagFromMeetings","search_meetings":"searchMeetings","update_action_item":"updateActionItem","update_meeting":"updateMeeting","update_tag":"updateTag"},"triggers":{"circleback_meeting_completed":"meetingCompleted","circleback_meeting_notes":"meetingNotes","circleback_webhook":"webhook"}},"circleback_v2":{"namespace":"circleback","methods":{"add_tag_to_meetings":"addTagToMeetings","create_tag":"createTag","delete_action_item":"deleteActionItem","delete_meeting":"deleteMeeting","delete_tag":"deleteTag","get_company":"getCompany","get_meeting":"getMeeting","get_person":"getPerson","get_transcript":"getTranscript","list_action_items":"listActionItems","list_calendar_events":"listCalendarEvents","list_companies":"listCompanies","list_meetings":"listMeetings","list_people":"listPeople","list_tags":"listTags","remove_tag_from_meetings":"removeTagFromMeetings","search_meetings":"searchMeetings","update_action_item":"updateActionItem","update_meeting":"updateMeeting","update_tag":"updateTag"},"triggers":{"circleback_meeting_completed":"meetingCompleted","circleback_meeting_notes":"meetingNotes","circleback_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"clay":{"namespace":"clay"},"clerk":{"namespace":"legacy.clerk","methods":{"clerk_add_organization_member":"addOrganizationMember","clerk_ban_user":"banUser","clerk_create_actor_token":"createActorToken","clerk_create_allowlist_identifier":"createAllowlistIdentifier","clerk_create_blocklist_identifier":"createBlocklistIdentifier","clerk_create_organization":"createOrganization","clerk_create_organization_invitation":"createOrganizationInvitation","clerk_create_user":"createUser","clerk_delete_allowlist_identifier":"deleteAllowlistIdentifier","clerk_delete_blocklist_identifier":"deleteBlocklistIdentifier","clerk_delete_organization":"deleteOrganization","clerk_delete_user":"deleteUser","clerk_get_jwt_template":"getJwtTemplate","clerk_get_organization":"getOrganization","clerk_get_session":"getSession","clerk_get_user":"getUser","clerk_get_user_oauth_token":"getUserOauthToken","clerk_list_allowlist_identifiers":"listAllowlistIdentifiers","clerk_list_blocklist_identifiers":"listBlocklistIdentifiers","clerk_list_jwt_templates":"listJwtTemplates","clerk_list_organization_invitations":"listOrganizationInvitations","clerk_list_organization_memberships":"listOrganizationMemberships","clerk_list_organizations":"listOrganizations","clerk_list_sessions":"listSessions","clerk_list_users":"listUsers","clerk_lock_user":"lockUser","clerk_remove_organization_member":"removeOrganizationMember","clerk_revoke_actor_token":"revokeActorToken","clerk_revoke_session":"revokeSession","clerk_unban_user":"unbanUser","clerk_unlock_user":"unlockUser","clerk_update_organization":"updateOrganization","clerk_update_organization_membership":"updateOrganizationMembership","clerk_update_user":"updateUser"},"triggers":{"clerk_organization_created":"organizationCreated","clerk_organization_deleted":"organizationDeleted","clerk_organization_membership_created":"organizationMembershipCreated","clerk_organization_membership_deleted":"organizationMembershipDeleted","clerk_organization_membership_updated":"organizationMembershipUpdated","clerk_organization_updated":"organizationUpdated","clerk_session_created":"sessionCreated","clerk_session_ended":"sessionEnded","clerk_session_removed":"sessionRemoved","clerk_session_revoked":"sessionRevoked","clerk_user_created":"userCreated","clerk_user_deleted":"userDeleted","clerk_user_updated":"userUpdated","clerk_webhook":"webhook"}},"clerk_v2":{"namespace":"clerk","methods":{"clerk_add_organization_member":"addOrganizationMember","clerk_ban_user":"banUser","clerk_create_actor_token":"createActorToken","clerk_create_allowlist_identifier":"createAllowlistIdentifier","clerk_create_blocklist_identifier":"createBlocklistIdentifier","clerk_create_organization":"createOrganization","clerk_create_organization_invitation":"createOrganizationInvitation","clerk_create_user":"createUser","clerk_delete_allowlist_identifier":"deleteAllowlistIdentifier","clerk_delete_blocklist_identifier":"deleteBlocklistIdentifier","clerk_delete_organization":"deleteOrganization","clerk_delete_user":"deleteUser","clerk_get_jwt_template":"getJwtTemplate","clerk_get_organization":"getOrganization","clerk_get_session":"getSession","clerk_get_user":"getUser","clerk_get_user_oauth_token":"getUserOauthToken","clerk_list_allowlist_identifiers":"listAllowlistIdentifiers","clerk_list_blocklist_identifiers":"listBlocklistIdentifiers","clerk_list_jwt_templates":"listJwtTemplates","clerk_list_organization_invitations":"listOrganizationInvitations","clerk_list_organization_memberships":"listOrganizationMemberships","clerk_list_organizations":"listOrganizations","clerk_list_sessions":"listSessions","clerk_list_users":"listUsers","clerk_lock_user":"lockUser","clerk_remove_organization_member":"removeOrganizationMember","clerk_revoke_actor_token":"revokeActorToken","clerk_revoke_session":"revokeSession","clerk_unban_user":"unbanUser","clerk_unlock_user":"unlockUser","clerk_update_organization":"updateOrganization","clerk_update_organization_membership":"updateOrganizationMembership","clerk_update_user":"updateUser"},"triggers":{"clerk_organization_created":"organizationCreated","clerk_organization_deleted":"organizationDeleted","clerk_organization_membership_created":"organizationMembershipCreated","clerk_organization_membership_deleted":"organizationMembershipDeleted","clerk_organization_membership_updated":"organizationMembershipUpdated","clerk_organization_updated":"organizationUpdated","clerk_session_created":"sessionCreated","clerk_session_ended":"sessionEnded","clerk_session_removed":"sessionRemoved","clerk_session_revoked":"sessionRevoked","clerk_user_created":"userCreated","clerk_user_deleted":"userDeleted","clerk_user_updated":"userUpdated","clerk_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"clickhouse":{"namespace":"clickhouse","methods":{"count_rows":"countRows","create_database":"createDatabase","create_table":"createTable","delete":"deleteData","describe_table":"describeTable","drop_database":"dropDatabase","drop_partition":"dropPartition","drop_table":"dropTable","execute":"executeRawSql","insert":"insertRow","insert_rows":"insertRowsBulk","introspect":"introspectSchema","kill_query":"killQuery","list_clusters":"listClusters","list_databases":"listDatabases","list_mutations":"listMutations","list_partitions":"listPartitions","list_running_queries":"listRunningQueries","list_tables":"listTables","optimize_table":"optimizeTable","query":"querySelect","rename_table":"renameTable","show_create_table":"showCreateTable","table_stats":"tableStats","truncate_table":"truncateTable","update":"updateData"}},"clickup":{"namespace":"clickup","methods":{"add_tag_to_task":"addTagToTask","create_checklist":"createChecklist","create_checklist_item":"createChecklistItem","create_comment":"createComment","create_folder":"createFolder","create_list":"createList","create_task":"createTask","create_time_entry":"createTimeEntry","delete_checklist":"deleteChecklist","delete_checklist_item":"deleteChecklistItem","delete_comment":"deleteComment","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","get_comments":"getComments","get_custom_fields":"getCustomFields","get_folders":"getFolders","get_list_members":"getListMembers","get_lists":"getLists","get_running_timer":"getRunningTimer","get_space_tags":"getSpaceTags","get_spaces":"getSpaces","get_task":"getTask","get_task_members":"getTaskMembers","get_tasks":"getTasks","get_time_entries":"getTimeEntries","get_workspaces":"getWorkspaces","remove_custom_field_value":"removeCustomFieldValue","remove_tag_from_task":"removeTagFromTask","search_tasks":"searchTasks","set_custom_field_value":"setCustomFieldValue","start_timer":"startTimer","stop_timer":"stopTimer","update_checklist":"updateChecklist","update_checklist_item":"updateChecklistItem","update_comment":"updateComment","update_task":"updateTask","update_time_entry":"updateTimeEntry","upload_attachment":"uploadAttachment"},"triggers":{"clickup_folder_created":"folderCreated","clickup_folder_deleted":"folderDeleted","clickup_folder_updated":"folderUpdated","clickup_goal_created":"goalCreated","clickup_goal_deleted":"goalDeleted","clickup_goal_updated":"goalUpdated","clickup_key_result_created":"keyResultCreated","clickup_key_result_deleted":"keyResultDeleted","clickup_key_result_updated":"keyResultUpdated","clickup_list_created":"listCreated","clickup_list_deleted":"listDeleted","clickup_list_updated":"listUpdated","clickup_space_created":"spaceCreated","clickup_space_deleted":"spaceDeleted","clickup_space_updated":"spaceUpdated","clickup_task_assignee_updated":"taskAssigneeUpdated","clickup_task_comment_posted":"taskCommentPosted","clickup_task_comment_updated":"taskCommentUpdated","clickup_task_created":"taskCreated","clickup_task_deleted":"taskDeleted","clickup_task_due_date_updated":"taskDueDateUpdated","clickup_task_moved":"taskMoved","clickup_task_priority_updated":"taskPriorityUpdated","clickup_task_status_updated":"taskStatusUpdated","clickup_task_tag_updated":"taskTagUpdated","clickup_task_time_estimate_updated":"taskTimeEstimateUpdated","clickup_task_time_tracked_updated":"taskTimeTrackedUpdated","clickup_task_updated":"taskUpdated","clickup_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"cloudflare":{"namespace":"legacy.cloudflare","methods":{"create_access_application":"createAccessApplication","create_access_group":"createAccessGroup","create_access_policy":"createAccessPolicy","create_access_service_token":"createAccessServiceToken","create_dns_record":"createDnsRecord","create_r2_bucket":"createR2Bucket","create_rate_limit_rule":"createRateLimitingRule","create_ruleset":"createRuleset","create_ruleset_rule":"createRulesetRule","create_tunnel":"createTunnel","create_worker_route":"createWorkerRoute","create_zone":"createZone","delete_access_application":"deleteAccessApplication","delete_access_group":"deleteAccessGroup","delete_access_policy":"deleteAccessPolicy","delete_dns_record":"deleteDnsRecord","delete_r2_bucket":"deleteR2Bucket","delete_r2_bucket_cors":"deleteR2BucketCors","delete_ruleset":"deleteRuleset","delete_ruleset_rule":"deleteRulesetRule","delete_tunnel":"deleteTunnel","delete_worker_route":"deleteWorkerRoute","delete_worker_script":"deleteWorkerScript","delete_zone":"deleteZone","dns_analytics":"dnsAnalytics","get_access_application":"getAccessApplication","get_access_group":"getAccessGroup","get_access_policy":"getAccessPolicy","get_access_service_token":"getAccessServiceToken","get_dns_record":"getDnsRecord","get_r2_bucket":"getR2Bucket","get_r2_bucket_cors":"getR2BucketCors","get_r2_bucket_lifecycle":"getR2BucketLifecycle","get_ruleset":"getRuleset","get_ruleset_entrypoint":"getPhaseEntryPointRuleset","get_tunnel":"getTunnel","get_tunnel_configuration":"getTunnelConfiguration","get_tunnel_token":"getTunnelToken","get_worker_route":"getWorkerRoute","get_worker_script_settings":"getWorkerScriptSettings","get_zone":"getZoneDetails","get_zone_settings":"getZoneSettings","list_access_applications":"listAccessApplications","list_access_groups":"listAccessGroups","list_access_identity_providers":"listAccessIdentityProviders","list_access_policies":"listAccessPolicies","list_access_service_tokens":"listAccessServiceTokens","list_certificates":"listCertificates","list_dns_records":"listDnsRecords","list_managed_ruleset_overrides":"listManagedRulesetOverrides","list_r2_buckets":"listR2Buckets","list_rate_limit_rules":"listRateLimitingRules","list_rulesets":"listRulesets","list_tunnels":"listTunnels","list_worker_routes":"listWorkerRoutes","list_worker_scripts":"listWorkerScripts","list_zones":"listZones","purge_cache":"purgeCache","refresh_access_service_token":"refreshAccessServiceToken","revoke_access_service_token":"revokeAccessServiceToken","rotate_access_service_token":"rotateAccessServiceToken","update_access_application":"updateAccessApplication","update_access_group":"updateAccessGroup","update_access_policy":"updateAccessPolicy","update_access_service_token":"updateAccessServiceToken","update_dns_record":"updateDnsRecord","update_r2_bucket_cors":"updateR2BucketCors","update_r2_bucket_lifecycle":"updateR2BucketLifecycle","update_rate_limit_rule":"updateRateLimitingRule","update_ruleset":"updateRuleset","update_ruleset_rule":"updateRulesetRule","update_tunnel":"updateTunnel","update_tunnel_configuration":"updateTunnelConfiguration","update_worker_route":"updateWorkerRoute","update_zone":"updateZone","update_zone_setting":"updateZoneSetting"}},"cloudflare_v2":{"namespace":"cloudflare","methods":{"create_access_application":"createAccessApplication","create_access_group":"createAccessGroup","create_access_policy":"createAccessPolicy","create_access_service_token":"createAccessServiceToken","create_dns_record":"createDnsRecord","create_r2_bucket":"createR2Bucket","create_rate_limit_rule":"createRateLimitingRule","create_ruleset":"createRuleset","create_ruleset_rule":"createRulesetRule","create_tunnel":"createTunnel","create_worker_route":"createWorkerRoute","create_zone":"createZone","delete_access_application":"deleteAccessApplication","delete_access_group":"deleteAccessGroup","delete_access_policy":"deleteAccessPolicy","delete_dns_record":"deleteDnsRecord","delete_r2_bucket":"deleteR2Bucket","delete_r2_bucket_cors":"deleteR2BucketCors","delete_ruleset":"deleteRuleset","delete_ruleset_rule":"deleteRulesetRule","delete_tunnel":"deleteTunnel","delete_worker_route":"deleteWorkerRoute","delete_worker_script":"deleteWorkerScript","delete_zone":"deleteZone","dns_analytics":"dnsAnalytics","get_access_application":"getAccessApplication","get_access_group":"getAccessGroup","get_access_policy":"getAccessPolicy","get_access_service_token":"getAccessServiceToken","get_dns_record":"getDnsRecord","get_r2_bucket":"getR2Bucket","get_r2_bucket_cors":"getR2BucketCors","get_r2_bucket_lifecycle":"getR2BucketLifecycle","get_ruleset":"getRuleset","get_ruleset_entrypoint":"getPhaseEntryPointRuleset","get_tunnel":"getTunnel","get_tunnel_configuration":"getTunnelConfiguration","get_tunnel_token":"getTunnelToken","get_worker_route":"getWorkerRoute","get_worker_script_settings":"getWorkerScriptSettings","get_zone":"getZoneDetails","get_zone_settings":"getZoneSettings","list_access_applications":"listAccessApplications","list_access_groups":"listAccessGroups","list_access_identity_providers":"listAccessIdentityProviders","list_access_policies":"listAccessPolicies","list_access_service_tokens":"listAccessServiceTokens","list_certificates":"listCertificates","list_dns_records":"listDnsRecords","list_managed_ruleset_overrides":"listManagedRulesetOverrides","list_r2_buckets":"listR2Buckets","list_rate_limit_rules":"listRateLimitingRules","list_rulesets":"listRulesets","list_tunnels":"listTunnels","list_worker_routes":"listWorkerRoutes","list_worker_scripts":"listWorkerScripts","list_zones":"listZones","purge_cache":"purgeCache","refresh_access_service_token":"refreshAccessServiceToken","revoke_access_service_token":"revokeAccessServiceToken","rotate_access_service_token":"rotateAccessServiceToken","update_access_application":"updateAccessApplication","update_access_group":"updateAccessGroup","update_access_policy":"updateAccessPolicy","update_access_service_token":"updateAccessServiceToken","update_dns_record":"updateDnsRecord","update_r2_bucket_cors":"updateR2BucketCors","update_r2_bucket_lifecycle":"updateR2BucketLifecycle","update_rate_limit_rule":"updateRateLimitingRule","update_ruleset":"updateRuleset","update_ruleset_rule":"updateRulesetRule","update_tunnel":"updateTunnel","update_tunnel_configuration":"updateTunnelConfiguration","update_worker_route":"updateWorkerRoute","update_zone":"updateZone","update_zone_setting":"updateZoneSetting"},"params":{"action":{"oauthCredential":"credential"}}},"cloudformation":{"namespace":"legacy.cloudformation","methods":{"cancel_update_stack":"cancelUpdateStack","create_change_set":"createChangeSet","create_stack":"createStack","delete_stack":"deleteStack","describe_change_set":"describeChangeSet","describe_stack_drift_detection_status":"driftDetectionStatus","describe_stack_events":"describeStackEvents","describe_stacks":"describeStacks","detect_stack_drift":"detectStackDrift","execute_change_set":"executeChangeSet","get_template":"getTemplate","get_template_summary":"getTemplateSummary","list_stack_resources":"listStackResources","update_stack":"updateStack","validate_template":"validateTemplate"}},"cloudformation_v2":{"namespace":"cloudformation","methods":{"cancel_update_stack":"cancelUpdateStack","create_change_set":"createChangeSet","create_stack":"createStack","delete_stack":"deleteStack","describe_change_set":"describeChangeSet","describe_stack_drift_detection_status":"driftDetectionStatus","describe_stack_events":"describeStackEvents","describe_stacks":"describeStacks","detect_stack_drift":"detectStackDrift","execute_change_set":"executeChangeSet","get_template":"getTemplate","get_template_summary":"getTemplateSummary","list_stack_resources":"listStackResources","update_stack":"updateStack","validate_template":"validateTemplate"},"params":{"action":{"oauthCredential":"credential"}}},"cloudtrail":{"namespace":"legacy.cloudtrail","methods":{"cancel_query":"cancelLakeQuery","describe_query":"describeLakeQuery","describe_trails":"describeTrails","get_event_data_store":"getEventDataStore","get_event_selectors":"getEventSelectors","get_insight_selectors":"getInsightSelectors","get_query_results":"getLakeQueryResults","get_trail":"getTrail","get_trail_status":"getTrailStatus","list_event_data_stores":"listEventDataStores","list_tags":"listTags","list_trails":"listTrails","lookup_events":"lookUpEvents","start_query":"startLakeQuery"}},"cloudtrail_v2":{"namespace":"cloudtrail","methods":{"cancel_query":"cancelLakeQuery","describe_query":"describeLakeQuery","describe_trails":"describeTrails","get_event_data_store":"getEventDataStore","get_event_selectors":"getEventSelectors","get_insight_selectors":"getInsightSelectors","get_query_results":"getLakeQueryResults","get_trail":"getTrail","get_trail_status":"getTrailStatus","list_event_data_stores":"listEventDataStores","list_tags":"listTags","list_trails":"listTrails","lookup_events":"lookUpEvents","start_query":"startLakeQuery"},"params":{"action":{"oauthCredential":"credential"}}},"cloudwatch":{"namespace":"legacy.cloudwatch","methods":{"describe_alarm_history":"describeAlarmHistory","describe_alarms":"describeAlarms","describe_log_groups":"describeLogGroups","describe_log_streams":"describeLogStreams","filter_log_events":"filterLogEvents","get_log_events":"getLogEvents","get_metric_statistics":"getMetricStatistics","list_metrics":"listMetrics","mute_alarm":"muteAlarm","put_log_group_retention":"setLogGroupRetention","put_metric_data":"publishMetric","query_logs":"queryLogsInsights","unmute_alarm":"unmuteAlarm"}},"cloudwatch_v2":{"namespace":"cloudwatch","methods":{"describe_alarm_history":"describeAlarmHistory","describe_alarms":"describeAlarms","describe_log_groups":"describeLogGroups","describe_log_streams":"describeLogStreams","filter_log_events":"filterLogEvents","get_log_events":"getLogEvents","get_metric_statistics":"getMetricStatistics","list_metrics":"listMetrics","mute_alarm":"muteAlarm","put_log_group_retention":"setLogGroupRetention","put_metric_data":"publishMetric","query_logs":"queryLogsInsights","unmute_alarm":"unmuteAlarm"},"params":{"action":{"oauthCredential":"credential"}}},"coda":{"namespace":"coda","methods":{"add_custom_domain":"addCustomDomain","add_permission":"shareDoc","change_user_role":"changeUserRole","create_doc":"createDoc","create_folder":"createFolder","create_page":"createPage","delete_custom_domain":"deleteCustomDomain","delete_doc":"deleteDoc","delete_folder":"deleteFolder","delete_page":"deletePage","delete_page_content":"deletePageContent","delete_permission":"removePermission","delete_row":"deleteRow","delete_rows":"deleteRows","export_page":"exportPage","get_acl_settings":"getSharingSettings","get_analytics_last_updated":"getAnalyticsLastUpdated","get_column":"getColumn","get_control":"getControl","get_custom_domain_provider":"getCustomDomainProvider","get_doc":"getDoc","get_doc_analytics_summary":"getDocAnalyticsSummary","get_folder":"getFolder","get_formula":"getFormula","get_mutation_status":"getMutationStatus","get_page":"getPage","get_page_content":"getPageContent","get_page_export_status":"getPageExportStatus","get_row":"getRow","get_sharing_metadata":"getSharingMetadata","get_table":"getTable","list_categories":"listDocCategories","list_columns":"listColumns","list_controls":"listControls","list_custom_domains":"listCustomDomains","list_doc_analytics":"listDocAnalytics","list_docs":"listDocs","list_folder_children":"listSubfolders","list_folders":"listFolders","list_formulas":"listFormulas","list_page_analytics":"listPageAnalytics","list_pages":"listPages","list_permissions":"listPermissions","list_rows":"listRows","list_tables":"listTables","list_workspace_members":"listWorkspaceMembers","list_workspace_roles":"listWorkspaceRoleActivity","publish_doc":"publishDoc","push_button":"pushButton","resolve_browser_link":"resolveBrowserLink","search_principals":"searchUsersAndGroups","trigger_automation":"triggerAutomation","unpublish_doc":"unpublishDoc","update_acl_settings":"updateSharingSettings","update_doc":"updateDoc","update_folder":"updateFolder","update_page":"updatePage","update_row":"updateRow","upsert_rows":"insertOrUpsertRows","whoami":"getCurrentUser"},"params":{"action":{"oauthCredential":"credential"}}},"codepipeline":{"namespace":"legacy.codepipeline","methods":{"disable_stage_transition":"disableStageTransition","enable_stage_transition":"enableStageTransition","get_pipeline":"getPipelineStructure","get_pipeline_execution":"getExecution","get_pipeline_state":"getPipelineState","list_action_executions":"listActionExecutions","list_pipeline_executions":"listExecutions","list_pipelines":"listPipelines","put_approval_result":"approveRejectApproval","retry_stage_execution":"retryStage","start_execution":"startExecution","stop_execution":"stopExecution"}},"codepipeline_v2":{"namespace":"codepipeline","methods":{"disable_stage_transition":"disableStageTransition","enable_stage_transition":"enableStageTransition","get_pipeline":"getPipelineStructure","get_pipeline_execution":"getExecution","get_pipeline_state":"getPipelineState","list_action_executions":"listActionExecutions","list_pipeline_executions":"listExecutions","list_pipelines":"listPipelines","put_approval_result":"approveRejectApproval","retry_stage_execution":"retryStage","start_execution":"startExecution","stop_execution":"stopExecution"},"params":{"action":{"oauthCredential":"credential"}}},"condition":{"namespace":"condition"},"confluence":{"namespace":"legacy.confluence","methods":{"create":"createPage","create_comment":"createComment","delete":"deletePage","delete_attachment":"deleteAttachment","delete_comment":"deleteComment","get_space":"getSpace","list_attachments":"listAttachments","list_comments":"listComments","list_labels":"listLabels","list_spaces":"listSpaces","read":"readPage","search":"searchContent","update":"updatePage","update_comment":"updateComment","upload_attachment":"uploadAttachment"},"params":{"action":{"oauthCredential":"credential"}}},"confluence_v2":{"namespace":"confluence","methods":{"add_label":"addLabel","create":"createPage","create_blogpost":"createBlogPost","create_comment":"createComment","create_page_property":"createPageProperty","create_space":"createSpace","create_space_property":"createSpaceProperty","delete":"deletePage","delete_attachment":"deleteAttachment","delete_blogpost":"deleteBlogPost","delete_comment":"deleteComment","delete_label":"deleteLabel","delete_page_property":"deletePageProperty","delete_space":"deleteSpace","delete_space_property":"deleteSpaceProperty","get_blogpost":"getBlogPost","get_page_ancestors":"getPageAncestors","get_page_children":"getPageChildren","get_page_descendants":"getPageDescendants","get_page_version":"getPageVersion","get_pages_by_label":"getPagesByLabel","get_space":"getSpace","get_task":"getTask","get_user":"getUser","list_attachments":"listAttachments","list_blogposts":"listBlogPosts","list_blogposts_in_space":"listBlogPostsInSpace","list_comments":"listComments","list_labels":"listLabels","list_page_properties":"listPageProperties","list_page_versions":"listPageVersions","list_pages_in_space":"listPagesInSpace","list_space_labels":"listSpaceLabels","list_space_permissions":"listSpacePermissions","list_space_properties":"listSpaceProperties","list_spaces":"listSpaces","list_tasks":"listTasks","read":"readPage","search":"searchContent","search_in_space":"searchInSpace","update":"updatePage","update_blogpost":"updateBlogPost","update_comment":"updateComment","update_space":"updateSpace","update_task":"updateTask","upload_attachment":"uploadAttachment"},"triggers":{"confluence_attachment_created":"attachmentCreated","confluence_attachment_removed":"attachmentRemoved","confluence_attachment_updated":"attachmentUpdated","confluence_blog_created":"blogCreated","confluence_blog_removed":"blogRemoved","confluence_blog_restored":"blogRestored","confluence_blog_updated":"blogUpdated","confluence_comment_created":"commentCreated","confluence_comment_removed":"commentRemoved","confluence_comment_updated":"commentUpdated","confluence_label_added":"labelAdded","confluence_label_removed":"labelRemoved","confluence_page_created":"pageCreated","confluence_page_moved":"pageMoved","confluence_page_permissions_updated":"pagePermissionsUpdated","confluence_page_removed":"pageRemoved","confluence_page_restored":"pageRestored","confluence_page_updated":"pageUpdated","confluence_space_created":"spaceCreated","confluence_space_removed":"spaceRemoved","confluence_space_updated":"spaceUpdated","confluence_user_created":"userCreated","confluence_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"context_dev":{"namespace":"contextDev","methods":{"classify_naics":"classifyNaics","classify_sic":"classifySic","crawl":"crawlWebsite","extract":"extractStructuredData","extract_product":"extractProduct","extract_products":"extractProducts","get_brand":"getBrandByDomain","get_brand_by_email":"getBrandByEmail","get_brand_by_name":"getBrandByName","get_brand_by_ticker":"getBrandByTicker","identify_transaction":"identifyTransaction","map":"mapSitemap","scrape_fonts":"scrapeFonts","scrape_html":"scrapeHtml","scrape_images":"scrapeImages","scrape_markdown":"scrapeMarkdown","scrape_styleguide":"scrapeStyleguide","screenshot":"screenshot","search":"webSearch"}},"convex":{"namespace":"legacy.convex","methods":{"action":"runAction","document_deltas":"documentDeltas","list_documents":"listDocuments","list_tables":"listTables","mutation":"runMutation","query":"runQuery","run_function":"runFunction"}},"convex_v2":{"namespace":"convex","methods":{"action":"runAction","document_deltas":"documentDeltas","list_documents":"listDocuments","list_tables":"listTables","mutation":"runMutation","query":"runQuery","run_function":"runFunction"},"params":{"action":{"oauthCredential":"credential"}}},"credential":{"namespace":"credential","methods":{"find_organization_account":"findOrganizationAccount","find_organization_mcp_connection":"findOrganizationMcpConnection","list":"listCredentials","list_organization_accounts":"listOrganizationAccounts","list_organization_mcp_connections":"listOrganizationMcpConnections","select":"selectCredential"},"triggers":{"credential_group_event":"groupEvent"}},"credential_group":{"namespace":"legacy.credentialGroup","methods":{"get_invite_link":"getInviteLink","list_credentials":"listCredentials","list_mcp_connections":"listMcpConnections","list_people":"listPeople","send_invite":"sendInvite"},"triggers":{"credential_group_event":"event"}},"crowdstrike":{"namespace":"legacy.crowdstrike","methods":{"crowdstrike_create_indicators":"createIndicators","crowdstrike_delete_indicators":"deleteIndicators","crowdstrike_delete_rtr_session":"deleteRtrSession","crowdstrike_execute_rtr_command":"executeRtrCommand","crowdstrike_get_alert_details":"getAlertDetails","crowdstrike_get_case_details":"getCaseDetails","crowdstrike_get_host_group_details":"getHostGroupDetails","crowdstrike_get_indicator_details":"getIndicatorDetails","crowdstrike_get_rtr_command_status":"getRtrCommandStatus","crowdstrike_get_sensor_aggregates":"getSensorAggregates","crowdstrike_get_sensor_details":"getSensorDetails","crowdstrike_get_vulnerability_details":"getVulnerabilityDetails","crowdstrike_init_rtr_session":"initRtrSession","crowdstrike_perform_host_action":"performHostAction","crowdstrike_perform_host_group_action":"performHostGroupAction","crowdstrike_query_alerts":"queryAlerts","crowdstrike_query_cases":"queryCases","crowdstrike_query_host_groups":"queryHostGroups","crowdstrike_query_indicators":"queryIndicators","crowdstrike_query_sensors":"querySensors","crowdstrike_query_vulnerabilities":"queryVulnerabilities","crowdstrike_update_alerts":"updateAlerts","crowdstrike_update_indicators":"updateIndicators"}},"crowdstrike_v2":{"namespace":"crowdstrike","methods":{"crowdstrike_create_indicators":"createIndicators","crowdstrike_delete_indicators":"deleteIndicators","crowdstrike_delete_rtr_session":"deleteRtrSession","crowdstrike_execute_rtr_command":"executeRtrCommand","crowdstrike_get_alert_details":"getAlertDetails","crowdstrike_get_case_details":"getCaseDetails","crowdstrike_get_host_group_details":"getHostGroupDetails","crowdstrike_get_indicator_details":"getIndicatorDetails","crowdstrike_get_rtr_command_status":"getRtrCommandStatus","crowdstrike_get_sensor_aggregates":"getSensorAggregates","crowdstrike_get_sensor_details":"getSensorDetails","crowdstrike_get_vulnerability_details":"getVulnerabilityDetails","crowdstrike_init_rtr_session":"initRtrSession","crowdstrike_perform_host_action":"performHostAction","crowdstrike_perform_host_group_action":"performHostGroupAction","crowdstrike_query_alerts":"queryAlerts","crowdstrike_query_cases":"queryCases","crowdstrike_query_host_groups":"queryHostGroups","crowdstrike_query_indicators":"queryIndicators","crowdstrike_query_sensors":"querySensors","crowdstrike_query_vulnerabilities":"queryVulnerabilities","crowdstrike_update_alerts":"updateAlerts","crowdstrike_update_indicators":"updateIndicators"},"params":{"action":{"oauthCredential":"credential"}}},"crunchbase":{"namespace":"legacy.crunchbase","methods":{"autocomplete":"autocomplete","get_acquisition":"getAcquisition","get_entity":"getAnyEntity","get_entity_card":"getEntityCard","get_fields_metadata":"getFieldsMetadata","get_funding_round":"getFundingRound","get_organization":"getOrganization","get_person":"getPerson","list_deleted_entities":"listDeletedEntities","search_acquisitions":"searchAcquisitions","search_entities":"searchAnyCollection","search_funding_rounds":"searchFundingRounds","search_organizations":"searchOrganizations","search_people":"searchPeople"}},"crunchbase_v2":{"namespace":"crunchbase","methods":{"autocomplete":"autocomplete","get_acquisition":"getAcquisition","get_entity":"getAnyEntity","get_entity_card":"getEntityCard","get_fields_metadata":"getFieldsMetadata","get_funding_round":"getFundingRound","get_organization":"getOrganization","get_person":"getPerson","list_deleted_entities":"listDeletedEntities","search_acquisitions":"searchAcquisitions","search_entities":"searchAnyCollection","search_funding_rounds":"searchFundingRounds","search_organizations":"searchOrganizations","search_people":"searchPeople"},"params":{"action":{"oauthCredential":"credential"}}},"cursor":{"namespace":"legacy.cursor","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"}},"cursor_v2":{"namespace":"legacy.cursorV2","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"}},"cursor_v3":{"namespace":"cursor","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"},"params":{"action":{"oauthCredential":"credential"}}},"dagster":{"namespace":"dagster","methods":{"delete_run":"deleteRun","get_asset":"getAsset","get_run":"getRun","get_run_logs":"getRunLogs","launch_run":"launchRun","list_assets":"listAssets","list_jobs":"listJobs","list_runs":"listRuns","list_schedules":"listSchedules","list_sensors":"listSensors","materialize_assets":"materializeAssets","reexecute_run":"reexecuteRun","report_asset_materialization":"reportAssetMaterialization","start_schedule":"startSchedule","start_sensor":"startSensor","stop_schedule":"stopSchedule","stop_sensor":"stopSensor","terminate_run":"terminateRun","wipe_asset":"wipeAsset"}},"databricks":{"namespace":"legacy.databricks","methods":{"cancel_all_runs":"cancelAllRuns","cancel_run":"cancelRun","cancel_statement":"cancelStatement","create_cluster":"createCluster","create_job":"createJob","create_warehouse":"createWarehouse","delete_cluster":"deleteCluster","delete_job":"deleteJob","delete_run":"deleteRun","delete_warehouse":"deleteWarehouse","edit_cluster":"editCluster","edit_warehouse":"editWarehouse","execute_sql":"executeSql","genie_agent_ask":"askGenieAgent","genie_agent_cancel":"cancelGenieAgentResponse","genie_agent_list_items":"listGenieAgentItems","genie_ask":"askGenie","genie_create_space":"createGenieSpace","genie_delete_conversation":"deleteGenieConversation","genie_delete_message":"deleteGenieMessage","genie_delete_space":"trashGenieSpace","genie_download_visualization":"downloadGenieVisualization","genie_execute_query":"executeGenieQuery","genie_get_message":"getGenieMessage","genie_get_query_result":"getGenieQueryResult","genie_get_space":"getGenieSpace","genie_list_conversations":"listGenieConversations","genie_list_messages":"listGenieMessages","genie_list_spaces":"listGenieSpaces","genie_send_feedback":"sendGenieFeedback","genie_update_space":"updateGenieSpace","get_cluster":"getCluster","get_job":"getJob","get_run":"getRun","get_run_output":"getRunOutput","get_statement":"getStatement","get_statement_chunk":"getStatementChunk","get_warehouse":"getWarehouse","list_clusters":"listClusters","list_jobs":"listJobs","list_runs":"listRuns","list_warehouses":"listWarehouses","repair_run":"repairRun","reset_job":"resetJob","resize_cluster":"resizeCluster","restart_cluster":"restartCluster","run_job":"runJob","start_cluster":"startCluster","start_warehouse":"startWarehouse","stop_warehouse":"stopWarehouse","submit_run":"submitRun","terminate_cluster":"terminateCluster","update_job":"updateJob"}},"databricks_v2":{"namespace":"databricks","methods":{"cancel_all_runs":"cancelAllRuns","cancel_run":"cancelRun","cancel_statement":"cancelStatement","create_cluster":"createCluster","create_job":"createJob","create_warehouse":"createWarehouse","delete_cluster":"deleteCluster","delete_job":"deleteJob","delete_run":"deleteRun","delete_warehouse":"deleteWarehouse","edit_cluster":"editCluster","edit_warehouse":"editWarehouse","execute_sql":"executeSql","genie_agent_ask":"askGenieAgent","genie_agent_cancel":"cancelGenieAgentResponse","genie_agent_list_items":"listGenieAgentItems","genie_ask":"askGenie","genie_create_space":"createGenieSpace","genie_delete_conversation":"deleteGenieConversation","genie_delete_message":"deleteGenieMessage","genie_delete_space":"trashGenieSpace","genie_download_visualization":"downloadGenieVisualization","genie_execute_query":"executeGenieQuery","genie_get_message":"getGenieMessage","genie_get_query_result":"getGenieQueryResult","genie_get_space":"getGenieSpace","genie_list_conversations":"listGenieConversations","genie_list_messages":"listGenieMessages","genie_list_spaces":"listGenieSpaces","genie_send_feedback":"sendGenieFeedback","genie_update_space":"updateGenieSpace","get_cluster":"getCluster","get_job":"getJob","get_run":"getRun","get_run_output":"getRunOutput","get_statement":"getStatement","get_statement_chunk":"getStatementChunk","get_warehouse":"getWarehouse","list_clusters":"listClusters","list_jobs":"listJobs","list_runs":"listRuns","list_warehouses":"listWarehouses","repair_run":"repairRun","reset_job":"resetJob","resize_cluster":"resizeCluster","restart_cluster":"restartCluster","run_job":"runJob","start_cluster":"startCluster","start_warehouse":"startWarehouse","stop_warehouse":"stopWarehouse","submit_run":"submitRun","terminate_cluster":"terminateCluster","update_job":"updateJob"},"params":{"action":{"oauthCredential":"credential"}}},"datadog":{"namespace":"legacy.datadog","methods":{"datadog_add_incident_todo":"addIncidentTodo","datadog_cancel_downtime":"cancelDowntime","datadog_create_dashboard":"createDashboard","datadog_create_downtime":"createDowntime","datadog_create_event":"createEvent","datadog_create_incident":"createIncident","datadog_create_monitor":"createMonitor","datadog_create_slo":"createSlo","datadog_delete_dashboard":"deleteDashboard","datadog_delete_slo":"deleteSlo","datadog_get_browser_synthetics_results":"getBrowserSyntheticTestResults","datadog_get_dashboard":"getDashboard","datadog_get_incident":"getIncident","datadog_get_monitor":"getMonitor","datadog_get_security_signal":"getSecuritySignal","datadog_get_slo":"getSlo","datadog_get_slo_history":"getSloHistory","datadog_get_synthetics_results":"getSyntheticTestResults","datadog_get_synthetics_test":"getSyntheticTest","datadog_list_dashboards":"listDashboards","datadog_list_downtimes":"listDowntimes","datadog_list_incidents":"listIncidents","datadog_list_monitors":"listMonitors","datadog_list_security_rules":"listSecurityRules","datadog_list_security_signals":"listSecuritySignals","datadog_list_services":"listServices","datadog_list_slos":"listSlos","datadog_list_synthetics_tests":"listSyntheticTests","datadog_mute_monitor":"muteMonitor","datadog_query_logs":"queryLogs","datadog_query_timeseries":"queryTimeseries","datadog_search_spans":"searchSpans","datadog_send_logs":"sendLogs","datadog_submit_metrics":"submitMetrics","datadog_trigger_synthetics_tests":"triggerSyntheticTests","datadog_unmute_monitor":"unmuteMonitor","datadog_update_incident":"updateIncident","datadog_update_security_signal_assignee":"assignSecuritySignal","datadog_update_security_signal_state":"updateSecuritySignalState","datadog_update_slo":"updateSlo","datadog_update_synthetics_status":"pauseOrStartSyntheticTest"}},"datadog_v2":{"namespace":"datadog","methods":{"datadog_add_incident_todo":"addIncidentTodo","datadog_cancel_downtime":"cancelDowntime","datadog_create_dashboard":"createDashboard","datadog_create_downtime":"createDowntime","datadog_create_event":"createEvent","datadog_create_incident":"createIncident","datadog_create_monitor":"createMonitor","datadog_create_slo":"createSlo","datadog_delete_dashboard":"deleteDashboard","datadog_delete_slo":"deleteSlo","datadog_get_browser_synthetics_results":"getBrowserSyntheticTestResults","datadog_get_dashboard":"getDashboard","datadog_get_incident":"getIncident","datadog_get_monitor":"getMonitor","datadog_get_security_signal":"getSecuritySignal","datadog_get_slo":"getSlo","datadog_get_slo_history":"getSloHistory","datadog_get_synthetics_results":"getSyntheticTestResults","datadog_get_synthetics_test":"getSyntheticTest","datadog_list_dashboards":"listDashboards","datadog_list_downtimes":"listDowntimes","datadog_list_incidents":"listIncidents","datadog_list_monitors":"listMonitors","datadog_list_security_rules":"listSecurityRules","datadog_list_security_signals":"listSecuritySignals","datadog_list_services":"listServices","datadog_list_slos":"listSlos","datadog_list_synthetics_tests":"listSyntheticTests","datadog_mute_monitor":"muteMonitor","datadog_query_logs":"queryLogs","datadog_query_timeseries":"queryTimeseries","datadog_search_spans":"searchSpans","datadog_send_logs":"sendLogs","datadog_submit_metrics":"submitMetrics","datadog_trigger_synthetics_tests":"triggerSyntheticTests","datadog_unmute_monitor":"unmuteMonitor","datadog_update_incident":"updateIncident","datadog_update_security_signal_assignee":"assignSecuritySignal","datadog_update_security_signal_state":"updateSecuritySignalState","datadog_update_slo":"updateSlo","datadog_update_synthetics_status":"pauseOrStartSyntheticTest"},"params":{"action":{"oauthCredential":"credential"}}},"datagma":{"namespace":"datagma","methods":{"datagma_enrich_company":"enrichCompany","datagma_enrich_person":"enrichPerson","datagma_find_email":"findEmail","datagma_find_phone":"findPhone","datagma_get_credits":"getRemainingCredits"}},"daytona":{"namespace":"legacy.daytona","methods":{"create_sandbox":"createSandbox","delete_sandbox":"deleteSandbox","download_file":"downloadFile","execute_command":"executeCommand","get_sandbox":"getSandbox","git_clone":"gitClone","list_files":"listFiles","list_sandboxes":"listSandboxes","run_code":"runCode","start_sandbox":"startSandbox","stop_sandbox":"stopSandbox","upload_file":"uploadFile"}},"daytona_v2":{"namespace":"daytona","methods":{"create_sandbox":"createSandbox","delete_sandbox":"deleteSandbox","download_file":"downloadFile","execute_command":"executeCommand","get_sandbox":"getSandbox","git_clone":"gitClone","list_files":"listFiles","list_sandboxes":"listSandboxes","run_code":"runCode","start_sandbox":"startSandbox","stop_sandbox":"stopSandbox","upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"deployments":{"namespace":"deployments","methods":{"deployments_deploy":"deploy","deployments_get_version":"getVersionDetails","deployments_list_versions":"listVersions","deployments_promote":"promoteVersionToLive","deployments_undeploy":"undeploy"}},"devin":{"namespace":"legacy.devin","methods":{"append_session_tags":"appendSessionTags","archive_session":"archiveSession","create_session":"createSession","get_session":"getSession","get_session_tags":"getSessionTags","list_session_attachments":"listSessionAttachments","list_session_messages":"listSessionMessages","list_sessions":"listSessions","replace_session_tags":"replaceSessionTags","send_message":"sendMessage","terminate_session":"terminateSession"}},"devin_v2":{"namespace":"devin","methods":{"append_session_tags":"appendSessionTags","archive_session":"archiveSession","create_session":"createSession","get_session":"getSession","get_session_tags":"getSessionTags","list_session_attachments":"listSessionAttachments","list_session_messages":"listSessionMessages","list_sessions":"listSessions","replace_session_tags":"replaceSessionTags","send_message":"sendMessage","terminate_session":"terminateSession"},"params":{"action":{"oauthCredential":"credential"}}},"discord":{"namespace":"legacy.discord","methods":{"discord_add_reaction":"addReaction","discord_archive_thread":"archiveThread","discord_assign_role":"assignRole","discord_ban_member":"banMember","discord_bulk_delete_messages":"bulkDeleteMessages","discord_create_channel":"createChannel","discord_create_invite":"createInvite","discord_create_role":"createRole","discord_create_thread":"createThread","discord_create_webhook":"createWebhook","discord_delete_channel":"deleteChannel","discord_delete_invite":"deleteInvite","discord_delete_message":"deleteMessage","discord_delete_role":"deleteRole","discord_delete_webhook":"deleteWebhook","discord_edit_message":"editMessage","discord_execute_webhook":"executeWebhook","discord_get_channel":"getChannel","discord_get_invite":"getInvite","discord_get_member":"getMember","discord_get_messages":"getChannelMessages","discord_get_pinned_messages":"getPinnedMessages","discord_get_server":"getServerInformation","discord_get_user":"getUserInformation","discord_get_webhook":"getWebhook","discord_join_thread":"joinThread","discord_kick_member":"kickMember","discord_leave_thread":"leaveThread","discord_list_channels":"listChannels","discord_list_roles":"listRoles","discord_pin_message":"pinMessage","discord_remove_reaction":"removeReaction","discord_remove_role":"removeRole","discord_send_message":"sendMessage","discord_unban_member":"unbanMember","discord_unpin_message":"unpinMessage","discord_update_channel":"updateChannel","discord_update_member":"updateMember","discord_update_role":"updateRole"}},"discord_v2":{"namespace":"discord","methods":{"discord_add_reaction":"addReaction","discord_archive_thread":"archiveThread","discord_assign_role":"assignRole","discord_ban_member":"banMember","discord_bulk_delete_messages":"bulkDeleteMessages","discord_create_channel":"createChannel","discord_create_invite":"createInvite","discord_create_role":"createRole","discord_create_thread":"createThread","discord_create_webhook":"createWebhook","discord_delete_channel":"deleteChannel","discord_delete_invite":"deleteInvite","discord_delete_message":"deleteMessage","discord_delete_role":"deleteRole","discord_delete_webhook":"deleteWebhook","discord_edit_message":"editMessage","discord_execute_webhook":"executeWebhook","discord_get_channel":"getChannel","discord_get_invite":"getInvite","discord_get_member":"getMember","discord_get_messages":"getChannelMessages","discord_get_pinned_messages":"getPinnedMessages","discord_get_server":"getServerInformation","discord_get_user":"getUserInformation","discord_get_webhook":"getWebhook","discord_join_thread":"joinThread","discord_kick_member":"kickMember","discord_leave_thread":"leaveThread","discord_list_channels":"listChannels","discord_list_roles":"listRoles","discord_pin_message":"pinMessage","discord_remove_reaction":"removeReaction","discord_remove_role":"removeRole","discord_send_message":"sendMessage","discord_unban_member":"unbanMember","discord_unpin_message":"unpinMessage","discord_update_channel":"updateChannel","discord_update_member":"updateMember","discord_update_role":"updateRole"},"params":{"action":{"oauthCredential":"credential"}}},"docusign":{"namespace":"docusign","methods":{"create_from_template":"sendFromTemplate","download_document":"downloadDocument","get_envelope":"getEnvelope","list_envelopes":"listEnvelopes","list_recipients":"listRecipients","list_templates":"listTemplates","send_envelope":"sendEnvelope","void_envelope":"voidEnvelope"},"params":{"action":{"oauthCredential":"credential"}}},"downdetector":{"namespace":"downdetector","methods":{"downdetector_get_company":"getCompany","downdetector_get_company_attribution":"getCompanyAttribution","downdetector_get_company_baseline":"getCompanyBaseline","downdetector_get_company_events":"getCompanyEvents","downdetector_get_company_incidents":"getCompanyIncidents","downdetector_get_company_indicators":"getCompanyIndicators","downdetector_get_company_last_15":"getCompanyLast15Minutes","downdetector_get_company_status":"getCompanyStatus","downdetector_get_provider":"getProvider","downdetector_get_reports":"getReports","downdetector_get_site_companies":"getSiteCompanies","downdetector_list_categories":"listCategories","downdetector_list_incidents":"listIncidents","downdetector_list_sites":"listSites","downdetector_search_companies":"searchCompanies"}},"dropbox":{"namespace":"legacy.dropbox","methods":{"dropbox_copy":"copyFileFolder","dropbox_create_folder":"createFolder","dropbox_create_shared_link":"createSharedLink","dropbox_delete":"deleteFileFolder","dropbox_download":"downloadFile","dropbox_get_metadata":"getMetadata","dropbox_list_folder":"listFolder","dropbox_list_revisions":"listRevisions","dropbox_list_shared_links":"listSharedLinks","dropbox_move":"moveFileFolder","dropbox_restore":"restoreFile","dropbox_search":"searchFiles","dropbox_upload":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"dropbox_v2":{"namespace":"dropbox","methods":{"dropbox_copy":"copyFileFolder","dropbox_create_folder":"createFolder","dropbox_create_shared_link":"createSharedLink","dropbox_delete":"deleteFileFolder","dropbox_download":"downloadFile","dropbox_get_metadata":"getMetadata","dropbox_list_folder":"listFolder","dropbox_list_revisions":"listRevisions","dropbox_list_shared_links":"listSharedLinks","dropbox_move":"moveFileFolder","dropbox_restore":"restoreFile","dropbox_search":"searchFiles","dropbox_upload":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"dropcontact":{"namespace":"dropcontact","methods":{"dropcontact_enrich_contact":"enrichContact"}},"dspy":{"namespace":"dspy","methods":{"chain_of_thought":"chainOfThought","predict":"predict","react":"reActAgent"}},"dub":{"namespace":"legacy.dub","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"}},"dub_v2":{"namespace":"legacy.dubV2","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"}},"dub_v3":{"namespace":"dub","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"},"params":{"action":{"oauthCredential":"credential"}}},"duckduckgo":{"namespace":"duckduckgo"},"dynamodb":{"namespace":"legacy.dynamodb","methods":{"delete":"deleteItem","get":"getItem","introspect":"introspect","put":"putItem","query":"query","scan":"scan","update":"updateItem"}},"dynamodb_v2":{"namespace":"dynamodb","methods":{"delete":"deleteItem","get":"getItem","introspect":"introspect","put":"putItem","query":"query","scan":"scan","update":"updateItem"},"params":{"action":{"oauthCredential":"credential"}}},"dynatrace":{"namespace":"legacy.dynatrace","methods":{"dynatrace_add_problem_comment":"addProblemComment","dynatrace_add_tags":"addTags","dynatrace_close_problem":"closeProblem","dynatrace_create_settings_object":"createSettingsObject","dynatrace_create_slo":"createSlo","dynatrace_delete_problem_comment":"deleteProblemComment","dynatrace_delete_settings_object":"deleteSettingsObject","dynatrace_delete_slo":"deleteSlo","dynatrace_delete_tag":"deleteTag","dynatrace_execute_synthetic_monitors":"executeSyntheticMonitors","dynatrace_get_attack":"getAttack","dynatrace_get_audit_logs":"getAuditLogs","dynatrace_get_entity":"getEntity","dynatrace_get_event":"getEvent","dynatrace_get_metric":"getMetricDescriptor","dynatrace_get_problem":"getProblem","dynatrace_get_problem_comment":"getProblemComment","dynatrace_get_security_problem":"getSecurityProblem","dynatrace_get_settings_object":"getSettingsObject","dynatrace_get_slo":"getSlo","dynatrace_get_synthetic_batch":"getSyntheticBatch","dynatrace_ingest_event":"ingestEvent","dynatrace_ingest_logs":"ingestLogs","dynatrace_ingest_metrics":"ingestMetrics","dynatrace_list_attacks":"listAttacks","dynatrace_list_entities":"listEntities","dynatrace_list_entity_types":"listEntityTypes","dynatrace_list_events":"listEvents","dynatrace_list_metrics":"listMetrics","dynatrace_list_problem_comments":"listProblemComments","dynatrace_list_problems":"listProblems","dynatrace_list_remediation_items":"listRemediationItems","dynatrace_list_security_problems":"listSecurityProblems","dynatrace_list_settings_objects":"listSettingsObjects","dynatrace_list_settings_schemas":"listSettingsSchemas","dynatrace_list_slos":"listSlos","dynatrace_list_synthetic_monitors":"listSyntheticMonitors","dynatrace_list_tags":"listTags","dynatrace_mute_security_problem":"muteSecurityProblem","dynatrace_mute_security_problems":"muteSecurityProblemsBulk","dynatrace_query_metrics":"queryMetrics","dynatrace_search_logs":"searchLogs","dynatrace_unmute_security_problem":"unmuteSecurityProblem","dynatrace_unmute_security_problems":"unmuteSecurityProblemsBulk","dynatrace_update_problem_comment":"updateProblemComment","dynatrace_update_settings_object":"updateSettingsObject","dynatrace_update_slo":"updateSlo"}},"dynatrace_v2":{"namespace":"dynatrace","methods":{"dynatrace_add_problem_comment":"addProblemComment","dynatrace_add_tags":"addTags","dynatrace_close_problem":"closeProblem","dynatrace_create_settings_object":"createSettingsObject","dynatrace_create_slo":"createSlo","dynatrace_delete_problem_comment":"deleteProblemComment","dynatrace_delete_settings_object":"deleteSettingsObject","dynatrace_delete_slo":"deleteSlo","dynatrace_delete_tag":"deleteTag","dynatrace_execute_synthetic_monitors":"executeSyntheticMonitors","dynatrace_get_attack":"getAttack","dynatrace_get_audit_logs":"getAuditLogs","dynatrace_get_entity":"getEntity","dynatrace_get_event":"getEvent","dynatrace_get_metric":"getMetricDescriptor","dynatrace_get_problem":"getProblem","dynatrace_get_problem_comment":"getProblemComment","dynatrace_get_security_problem":"getSecurityProblem","dynatrace_get_settings_object":"getSettingsObject","dynatrace_get_slo":"getSlo","dynatrace_get_synthetic_batch":"getSyntheticBatch","dynatrace_ingest_event":"ingestEvent","dynatrace_ingest_logs":"ingestLogs","dynatrace_ingest_metrics":"ingestMetrics","dynatrace_list_attacks":"listAttacks","dynatrace_list_entities":"listEntities","dynatrace_list_entity_types":"listEntityTypes","dynatrace_list_events":"listEvents","dynatrace_list_metrics":"listMetrics","dynatrace_list_problem_comments":"listProblemComments","dynatrace_list_problems":"listProblems","dynatrace_list_remediation_items":"listRemediationItems","dynatrace_list_security_problems":"listSecurityProblems","dynatrace_list_settings_objects":"listSettingsObjects","dynatrace_list_settings_schemas":"listSettingsSchemas","dynatrace_list_slos":"listSlos","dynatrace_list_synthetic_monitors":"listSyntheticMonitors","dynatrace_list_tags":"listTags","dynatrace_mute_security_problem":"muteSecurityProblem","dynatrace_mute_security_problems":"muteSecurityProblemsBulk","dynatrace_query_metrics":"queryMetrics","dynatrace_search_logs":"searchLogs","dynatrace_unmute_security_problem":"unmuteSecurityProblem","dynatrace_unmute_security_problems":"unmuteSecurityProblemsBulk","dynatrace_update_problem_comment":"updateProblemComment","dynatrace_update_settings_object":"updateSettingsObject","dynatrace_update_slo":"updateSlo"},"params":{"action":{"oauthCredential":"credential"}}},"ec2":{"namespace":"legacy.ec2","methods":{"allocate_address":"allocateElasticIp","associate_address":"associateElasticIp","authorize_security_group_ingress":"authorizeSecurityGroupIngress","create_snapshot":"createEbsSnapshot","create_tags":"createTags","delete_snapshot":"deleteEbsSnapshot","delete_tags":"deleteTags","delete_volume":"deleteEbsVolume","describe_addresses":"describeElasticIps","describe_availability_zones":"describeAvailabilityZones","describe_images":"describeAmis","describe_instance_status":"describeInstanceStatus","describe_instances":"describeInstances","describe_internet_gateways":"describeInternetGateways","describe_key_pairs":"describeKeyPairs","describe_nat_gateways":"describeNatGateways","describe_network_acls":"describeNetworkAcls","describe_network_interfaces":"describeNetworkInterfaces","describe_regions":"describeRegions","describe_route_tables":"describeRouteTables","describe_security_groups":"describeSecurityGroups","describe_snapshots":"describeEbsSnapshots","describe_subnets":"describeSubnets","describe_volumes":"describeEbsVolumes","describe_vpc_endpoints":"describeVpcEndpoints","describe_vpc_peering_connections":"describeVpcPeeringConnections","describe_vpcs":"describeVpcs","disassociate_address":"disassociateElasticIp","reboot_instances":"rebootInstances","release_address":"releaseElasticIp","revoke_security_group_ingress":"revokeSecurityGroupIngress","start_instances":"startInstances","stop_instances":"stopInstances","terminate_instances":"terminateInstances"}},"ec2_v2":{"namespace":"ec2","methods":{"allocate_address":"allocateElasticIp","associate_address":"associateElasticIp","authorize_security_group_ingress":"authorizeSecurityGroupIngress","create_snapshot":"createEbsSnapshot","create_tags":"createTags","delete_snapshot":"deleteEbsSnapshot","delete_tags":"deleteTags","delete_volume":"deleteEbsVolume","describe_addresses":"describeElasticIps","describe_availability_zones":"describeAvailabilityZones","describe_images":"describeAmis","describe_instance_status":"describeInstanceStatus","describe_instances":"describeInstances","describe_internet_gateways":"describeInternetGateways","describe_key_pairs":"describeKeyPairs","describe_nat_gateways":"describeNatGateways","describe_network_acls":"describeNetworkAcls","describe_network_interfaces":"describeNetworkInterfaces","describe_regions":"describeRegions","describe_route_tables":"describeRouteTables","describe_security_groups":"describeSecurityGroups","describe_snapshots":"describeEbsSnapshots","describe_subnets":"describeSubnets","describe_volumes":"describeEbsVolumes","describe_vpc_endpoints":"describeVpcEndpoints","describe_vpc_peering_connections":"describeVpcPeeringConnections","describe_vpcs":"describeVpcs","disassociate_address":"disassociateElasticIp","reboot_instances":"rebootInstances","release_address":"releaseElasticIp","revoke_security_group_ingress":"revokeSecurityGroupIngress","start_instances":"startInstances","stop_instances":"stopInstances","terminate_instances":"terminateInstances"},"params":{"action":{"oauthCredential":"credential"}}},"elasticsearch":{"namespace":"elasticsearch","methods":{"elasticsearch_bulk":"bulkOperations","elasticsearch_cluster_health":"clusterHealth","elasticsearch_cluster_stats":"clusterStats","elasticsearch_count":"countDocuments","elasticsearch_create_index":"createIndex","elasticsearch_delete_document":"deleteDocument","elasticsearch_delete_index":"deleteIndex","elasticsearch_get_document":"getDocument","elasticsearch_get_index":"getIndexInfo","elasticsearch_index_document":"indexDocument","elasticsearch_list_indices":"listIndices","elasticsearch_search":"search","elasticsearch_update_document":"updateDocument"}},"elevenlabs":{"namespace":"legacy.elevenlabs","methods":{"audio_isolation":"audioIsolation","edit_voice_settings":"editVoiceSettings","get_user":"getUserInfo","get_voice":"getVoice","get_voice_settings":"getVoiceSettings","list_models":"listModels","list_voices":"listVoices","sound_effects":"soundEffects","speech_to_speech":"speechToSpeech","tts":"textToSpeech"}},"elevenlabs_v2":{"namespace":"elevenlabs","methods":{"audio_isolation":"audioIsolation","edit_voice_settings":"editVoiceSettings","get_user":"getUserInfo","get_voice":"getVoice","get_voice_settings":"getVoiceSettings","list_models":"listModels","list_voices":"listVoices","sound_effects":"soundEffects","speech_to_speech":"speechToSpeech","tts":"textToSpeech"},"params":{"action":{"oauthCredential":"credential"}}},"emailbison":{"namespace":"legacy.emailbison","methods":{"attach_leads_to_campaign":"attachLeadsToCampaign","attach_tags_to_leads":"attachTagsToLeads","create_campaign":"createCampaign","create_lead":"createLead","create_tag":"createTag","get_lead":"getLead","list_campaigns":"listCampaigns","list_leads":"listLeads","list_replies":"listReplies","list_tags":"listTags","update_campaign":"updateCampaign","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead"},"triggers":{"emailbison_email_account_added":"emailAccountAdded","emailbison_email_account_disconnected":"emailAccountDisconnected","emailbison_email_account_reconnected":"emailAccountReconnected","emailbison_email_account_removed":"emailAccountRemoved","emailbison_email_bounced":"emailBounced","emailbison_email_opened":"emailOpened","emailbison_email_sent":"emailSent","emailbison_lead_first_contacted":"leadFirstContacted","emailbison_lead_interested":"leadInterested","emailbison_lead_replied":"leadReplied","emailbison_lead_unsubscribed":"leadUnsubscribed","emailbison_manual_email_sent":"manualEmailSent","emailbison_tag_attached":"tagAttached","emailbison_tag_removed":"tagRemoved","emailbison_untracked_reply_received":"untrackedReplyReceived","emailbison_warmup_disabled_causing_bounces":"warmupDisabledCausingBounces","emailbison_warmup_disabled_receiving_bounces":"warmupDisabledReceivingBounces"}},"emailbison_v2":{"namespace":"emailbison","methods":{"attach_leads_to_campaign":"attachLeadsToCampaign","attach_tags_to_leads":"attachTagsToLeads","create_campaign":"createCampaign","create_lead":"createLead","create_tag":"createTag","get_lead":"getLead","list_campaigns":"listCampaigns","list_leads":"listLeads","list_replies":"listReplies","list_tags":"listTags","update_campaign":"updateCampaign","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead"},"triggers":{"emailbison_email_account_added":"emailAccountAdded","emailbison_email_account_disconnected":"emailAccountDisconnected","emailbison_email_account_reconnected":"emailAccountReconnected","emailbison_email_account_removed":"emailAccountRemoved","emailbison_email_bounced":"emailBounced","emailbison_email_opened":"emailOpened","emailbison_email_sent":"emailSent","emailbison_lead_first_contacted":"leadFirstContacted","emailbison_lead_interested":"leadInterested","emailbison_lead_replied":"leadReplied","emailbison_lead_unsubscribed":"leadUnsubscribed","emailbison_manual_email_sent":"manualEmailSent","emailbison_tag_attached":"tagAttached","emailbison_tag_removed":"tagRemoved","emailbison_untracked_reply_received":"untrackedReplyReceived","emailbison_warmup_disabled_causing_bounces":"warmupDisabledCausingBounces","emailbison_warmup_disabled_receiving_bounces":"warmupDisabledReceivingBounces"},"params":{"action":{"oauthCredential":"credential"}}},"embeddings":{"namespace":"embeddings"},"enrich":{"namespace":"legacy.enrich","methods":{"check_credits":"checkCredits","company_funding":"companyFundingTraffic","company_lookup":"companyLookup","company_revenue":"companyRevenue","disposable_email_check":"disposableEmailCheck","email_to_ip":"emailToIp","email_to_person_lite":"emailToPersonLite","email_to_phone":"emailToPhone","email_to_profile":"emailToProfile","find_email":"findEmail","get_post_details":"getPostDetails","ip_to_company":"ipToCompany","linkedin_profile":"linkedInProfileEnrichment","linkedin_to_personal_email":"linkedInToPersonalEmail","linkedin_to_work_email":"linkedInToWorkEmail","phone_finder":"phoneFinderLinkedIn","reverse_hash_lookup":"reverseHashLookup","sales_pointer_people":"salesPointerPeople","search_company":"searchCompany","search_company_activities":"searchCompanyActivities","search_company_employees":"searchCompanyEmployees","search_jobs":"searchJobs","search_logo":"searchLogo","search_people":"searchPeople","search_people_activities":"searchPeopleActivities","search_post_comments":"searchPostComments","search_post_comments_by_url":"searchPostCommentsByUrl","search_post_reactions":"searchPostReactions","search_post_reactions_by_url":"searchPostReactionsByUrl","search_posts":"searchPosts","search_similar_companies":"searchSimilarCompanies","verify_email":"verifyEmail"}},"enrich_v2":{"namespace":"enrich","methods":{"check_credits":"checkCredits","company_funding":"companyFundingTraffic","company_lookup":"companyLookup","company_revenue":"companyRevenue","disposable_email_check":"disposableEmailCheck","email_to_ip":"emailToIp","email_to_person_lite":"emailToPersonLite","email_to_phone":"emailToPhone","email_to_profile":"emailToProfile","find_email":"findEmail","get_post_details":"getPostDetails","ip_to_company":"ipToCompany","linkedin_profile":"linkedInProfileEnrichment","linkedin_to_personal_email":"linkedInToPersonalEmail","linkedin_to_work_email":"linkedInToWorkEmail","phone_finder":"phoneFinderLinkedIn","reverse_hash_lookup":"reverseHashLookup","sales_pointer_people":"salesPointerPeople","search_company":"searchCompany","search_company_activities":"searchCompanyActivities","search_company_employees":"searchCompanyEmployees","search_jobs":"searchJobs","search_logo":"searchLogo","search_people":"searchPeople","search_people_activities":"searchPeopleActivities","search_post_comments":"searchPostComments","search_post_comments_by_url":"searchPostCommentsByUrl","search_post_reactions":"searchPostReactions","search_post_reactions_by_url":"searchPostReactionsByUrl","search_posts":"searchPosts","search_similar_companies":"searchSimilarCompanies","verify_email":"verifyEmail"},"params":{"action":{"oauthCredential":"credential"}}},"enrichment":{"namespace":"enrichment","methods":{"company-domain":"companyDomain","company-info":"companyInfo","email-verification":"emailVerification","linkedin-profile":"linkedInProfile","phone-number":"phoneNumber","work-email":"workEmail"}},"enrow":{"namespace":"enrow","methods":{"enrow_find_email":"findEmail","enrow_verify_email":"verifyEmail"}},"evaluator":{"namespace":"evaluator"},"exa":{"namespace":"exa","methods":{"exa_agent":"agent","exa_answer":"answer","exa_find_similar_links":"findSimilarLinks","exa_get_contents":"getContents","exa_search":"search"}},"extend":{"namespace":"legacy.extend"},"extend_v2":{"namespace":"legacy.extendV2"},"extend_v3":{"namespace":"extend","params":{"action":{"oauthCredential":"credential"}}},"fathom":{"namespace":"legacy.fathom","methods":{"fathom_get_summary":"getSummary","fathom_get_transcript":"getTranscript","fathom_list_meeting_types":"listMeetingTypes","fathom_list_meetings":"listMeetings","fathom_list_team_members":"listTeamMembers","fathom_list_teams":"listTeams"},"triggers":{"fathom_new_meeting":"newMeeting","fathom_webhook":"webhook"}},"fathom_v2":{"namespace":"fathom","methods":{"fathom_get_summary":"getSummary","fathom_get_transcript":"getTranscript","fathom_list_meeting_types":"listMeetingTypes","fathom_list_meetings":"listMeetings","fathom_list_team_members":"listTeamMembers","fathom_list_teams":"listTeams"},"triggers":{"fathom_new_meeting":"newMeeting","fathom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"file":{"namespace":"legacy.file"},"file_v2":{"namespace":"legacy.fileV2"},"file_v3":{"namespace":"legacy.fileV3","methods":{"file_append":"append","file_get":"get","file_parser_v3":"read","file_write":"write"}},"file_v4":{"namespace":"legacy.fileV4","methods":{"file_append":"append","file_fetch":"fetch","file_read":"read","file_write":"write"}},"file_v5":{"namespace":"fileV5","methods":{"file_append":"append","file_compress":"compress","file_create_folder":"createFolder","file_decompress":"decompress","file_delete_folder":"deleteFolder","file_edit":"applyEdit","file_fetch":"fetch","file_get_content":"getContent","file_list":"list","file_manage_sharing":"manageSharing","file_move":"moveFile","file_read":"read","file_restore_folder":"restoreFolder","file_search":"search","file_update_folder":"moveFolder","file_write":"write"}},"findymail":{"namespace":"findymail","methods":{"findymail_find_email_from_linkedin":"findEmailFromLinkedIn","findymail_find_email_from_name":"findEmailFromName","findymail_find_emails_by_domain":"findEmailsByDomain","findymail_find_employees":"findEmployees","findymail_find_phone":"findPhone","findymail_get_company":"getCompanyInfo","findymail_get_credits":"getRemainingCredits","findymail_lookup_technologies":"lookupTechnologiesByDomain","findymail_reverse_email_lookup":"reverseEmailLookup","findymail_search_technologies":"searchTechnologies","findymail_verify_email":"verifyEmail"}},"firecrawl":{"namespace":"firecrawl","methods":{"agent":"agent","batch_scrape":"batchScrape","batch_scrape_status":"batchScrapeStatus","cancel_crawl":"cancelCrawl","crawl":"crawl","crawl_status":"crawlStatus","credit_usage":"creditUsage","enrich":"enrichContactOrCompany","extract":"extract","extract_status":"extractStatus","map":"map","parse":"parseDocument","scrape":"scrape","search":"search"}},"fireflies":{"namespace":"legacy.fireflies","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"}},"fireflies_v2":{"namespace":"legacy.firefliesV2","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"}},"fireflies_v3":{"namespace":"fireflies","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"},"params":{"action":{"oauthCredential":"credential"}}},"fivetran":{"namespace":"fivetran","methods":{"cancel_transformation":"cancelTransformation","create_connect_card":"createConnectCard","create_connection":"createConnection","create_destination":"createDestination","create_group":"createGroup","delete_connection":"deleteConnection","get_account_info":"getAccountInfo","get_connection":"getConnection","get_connection_schema_config":"getSchemaConfig","get_connection_warnings":"getConnectionWarnings","get_connector_type":"getConnectorType","get_destination":"getDestination","get_group":"getGroup","get_sync_history":"getSyncHistory","get_transformation":"getTransformation","list_connections":"listConnections","list_connector_types":"listConnectorTypes","list_destinations":"listDestinations","list_groups":"listGroups","list_transformations":"listTransformations","list_users":"listUsers","pause_connection":"pauseConnection","reload_connection_schema":"reloadSchema","resume_connection":"resumeConnection","resync_connection":"reSyncConnection","resync_tables":"reSyncTables","run_connection_setup_tests":"runConnectionSetupTests","run_destination_setup_tests":"runDestinationSetupTests","run_transformation":"runTransformation","sync_connection":"syncConnection","update_connection":"updateConnection","update_connection_schema":"updateSchemaSync","update_connection_table":"updateTableSync","update_schema_config":"updateSchemaConfig"},"triggers":{"fivetran_connection_failure":"connectionFailure","fivetran_connection_successful":"connectionSuccessful","fivetran_create_connector":"createConnector","fivetran_delete_connector":"deleteConnector","fivetran_edit_connector":"editConnector","fivetran_force_update_connector":"forceUpdateConnector","fivetran_pause_connector":"pauseConnector","fivetran_resume_connector":"resumeConnector","fivetran_resync_connector":"resyncConnector","fivetran_resync_table":"resyncTable","fivetran_sync_end":"syncEnd","fivetran_sync_start":"syncStart","fivetran_transformation_failed":"transformationFailed","fivetran_transformation_start":"transformationStart","fivetran_transformation_succeeded":"transformationSucceeded","fivetran_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"flint":{"namespace":"legacy.flint","methods":{"flint_create_task":"createTask","flint_generate_pages":"generatePages","flint_get_task":"getTask"}},"flint_v2":{"namespace":"flint","methods":{"flint_create_task":"createTask","flint_generate_pages":"generatePages","flint_get_task":"getTask"},"params":{"action":{"oauthCredential":"credential"}}},"flow":{"namespace":"flow","methods":{"add_link":"addLink","create_branch":"createBranch","create_comment":"createComment","create_entities":"createEntities","create_entity":"createEntity","delete_comment":"deleteComment","delete_entity":"deleteEntity","filter_entities":"filterEntities","get_comment":"getComment","get_data_model":"getDataModel","get_entities":"getEntities","get_entity_history":"getEntityHistory","get_project":"getProject","list_branches":"listBranches","list_comments":"listComments","list_entities":"listEntities","list_projects":"listProjects","remove_link":"removeLink","restore_entity":"restoreEntity","search_entities":"searchEntities","set_value":"setValue","set_values":"setValues","update_comment":"updateComment"},"params":{"action":{"oauthCredential":"credential"}}},"function":{"namespace":"fn"},"gamma":{"namespace":"legacy.gamma","methods":{"check_status":"checkStatus","generate":"generate","generate_from_template":"generateFromTemplate","list_folders":"listFolders","list_themes":"listThemes"}},"gamma_v2":{"namespace":"gamma","methods":{"check_status":"checkStatus","generate":"generate","generate_from_template":"generateFromTemplate","list_folders":"listFolders","list_themes":"listThemes"},"params":{"action":{"oauthCredential":"credential"}}},"gauge":{"namespace":"gauge","methods":{"gauge_add_tags_to_prompts":"addTagsToPrompts","gauge_bulk_update_prompts":"bulkUpdatePrompts","gauge_create_prompts":"createPrompts","gauge_create_tag":"createTag","gauge_create_topic":"createTopic","gauge_delete_tag":"deleteTag","gauge_get_answer":"getAnswer","gauge_get_category":"getCategory","gauge_get_current_credential":"getCurrentCredential","gauge_get_organization":"getOrganization","gauge_get_prompt":"getPrompt","gauge_get_query_metadata":"getQueryCatalog","gauge_get_tag":"getTag","gauge_get_topic":"getTopic","gauge_list_answers":"listAnswers","gauge_list_brands":"listBrands","gauge_list_categories":"listCategories","gauge_list_citations":"listCitations","gauge_list_organizations":"listOrganizations","gauge_list_prompts":"listPrompts","gauge_list_tags":"listTags","gauge_list_topics":"listTopics","gauge_query":"runReportQuery","gauge_remove_tags_from_prompts":"removeTagsFromPrompts","gauge_rename_topic":"renameTopic","gauge_update_prompt":"updatePrompt","gauge_update_tag":"updateTag"},"params":{"action":{"oauthCredential":"credential"}}},"generic_webhook":{"namespace":"trigger.webhook"},"github":{"namespace":"legacy.github","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"}},"github_v2":{"namespace":"legacy.githubV2","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"}},"github_v3":{"namespace":"github","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"},"params":{"action":{"oauthCredential":"credential"}}},"gitlab":{"namespace":"legacy.gitlab","methods":{"gitlab_activate_user":"activateUser","gitlab_add_member":"addMember","gitlab_add_saml_group_link":"addSamlGroupLink","gitlab_approve_access_request":"approveAccessRequest","gitlab_approve_merge_request":"approveMergeRequest","gitlab_approve_user":"approveUserSignup","gitlab_ban_user":"banUser","gitlab_block_user":"blockUser","gitlab_cancel_pipeline":"cancelPipeline","gitlab_compare_branches":"compareBranches","gitlab_create_branch":"createBranch","gitlab_create_file":"createFile","gitlab_create_issue":"createIssue","gitlab_create_issue_note":"addIssueComment","gitlab_create_merge_request":"createMergeRequest","gitlab_create_merge_request_note":"addMrComment","gitlab_create_pipeline":"createPipeline","gitlab_create_release":"createRelease","gitlab_create_user":"createUser","gitlab_deactivate_user":"deactivateUser","gitlab_delete_branch":"deleteBranch","gitlab_delete_issue":"deleteIssue","gitlab_delete_saml_group_link":"deleteSamlGroupLink","gitlab_delete_user":"deleteUser","gitlab_delete_user_identity":"deleteUserIdentity","gitlab_deny_access_request":"denyAccessRequest","gitlab_get_file":"getFile","gitlab_get_group":"getGroup","gitlab_get_issue":"getIssue","gitlab_get_job_log":"getJobLog","gitlab_get_merge_request":"getMergeRequest","gitlab_get_merge_request_changes":"getMrChanges","gitlab_get_pipeline":"getPipeline","gitlab_get_project":"getProject","gitlab_invite_member":"inviteMemberByEmail","gitlab_list_access_requests":"listAccessRequests","gitlab_list_branches":"listBranches","gitlab_list_commits":"listCommits","gitlab_list_groups":"listGroups","gitlab_list_invitations":"listInvitations","gitlab_list_issues":"listIssues","gitlab_list_members":"listMembers","gitlab_list_merge_requests":"listMergeRequests","gitlab_list_pipeline_jobs":"listPipelineJobs","gitlab_list_pipelines":"listPipelines","gitlab_list_projects":"listProjects","gitlab_list_releases":"listReleases","gitlab_list_repository_tree":"listRepositoryTree","gitlab_list_saml_group_links":"listSamlGroupLinks","gitlab_list_user_memberships":"listUserMemberships","gitlab_merge_merge_request":"mergeMergeRequest","gitlab_play_job":"playJob","gitlab_reject_user":"rejectUserSignup","gitlab_remove_member":"removeMember","gitlab_retry_pipeline":"retryPipeline","gitlab_revoke_invitation":"revokeInvitation","gitlab_search_users":"searchUsers","gitlab_unban_user":"unbanUser","gitlab_unblock_user":"unblockUser","gitlab_update_file":"updateFile","gitlab_update_invitation":"updateInvitation","gitlab_update_issue":"updateIssue","gitlab_update_member":"updateMember","gitlab_update_merge_request":"updateMergeRequest","gitlab_update_user":"updateUser"},"triggers":{"gitlab_comment":"comment","gitlab_issue":"issue","gitlab_merge_request":"mergeRequest","gitlab_pipeline":"pipeline","gitlab_push":"push","gitlab_webhook":"webhook"}},"gitlab_v2":{"namespace":"gitlab","methods":{"gitlab_activate_user":"activateUser","gitlab_add_member":"addMember","gitlab_add_saml_group_link":"addSamlGroupLink","gitlab_approve_access_request":"approveAccessRequest","gitlab_approve_merge_request":"approveMergeRequest","gitlab_approve_user":"approveUserSignup","gitlab_ban_user":"banUser","gitlab_block_user":"blockUser","gitlab_cancel_pipeline":"cancelPipeline","gitlab_compare_branches":"compareBranches","gitlab_create_branch":"createBranch","gitlab_create_file":"createFile","gitlab_create_issue":"createIssue","gitlab_create_issue_note":"addIssueComment","gitlab_create_merge_request":"createMergeRequest","gitlab_create_merge_request_note":"addMrComment","gitlab_create_pipeline":"createPipeline","gitlab_create_release":"createRelease","gitlab_create_user":"createUser","gitlab_deactivate_user":"deactivateUser","gitlab_delete_branch":"deleteBranch","gitlab_delete_issue":"deleteIssue","gitlab_delete_saml_group_link":"deleteSamlGroupLink","gitlab_delete_user":"deleteUser","gitlab_delete_user_identity":"deleteUserIdentity","gitlab_deny_access_request":"denyAccessRequest","gitlab_get_file":"getFile","gitlab_get_group":"getGroup","gitlab_get_issue":"getIssue","gitlab_get_job_log":"getJobLog","gitlab_get_merge_request":"getMergeRequest","gitlab_get_merge_request_changes":"getMrChanges","gitlab_get_pipeline":"getPipeline","gitlab_get_project":"getProject","gitlab_invite_member":"inviteMemberByEmail","gitlab_list_access_requests":"listAccessRequests","gitlab_list_branches":"listBranches","gitlab_list_commits":"listCommits","gitlab_list_groups":"listGroups","gitlab_list_invitations":"listInvitations","gitlab_list_issues":"listIssues","gitlab_list_members":"listMembers","gitlab_list_merge_requests":"listMergeRequests","gitlab_list_pipeline_jobs":"listPipelineJobs","gitlab_list_pipelines":"listPipelines","gitlab_list_projects":"listProjects","gitlab_list_releases":"listReleases","gitlab_list_repository_tree":"listRepositoryTree","gitlab_list_saml_group_links":"listSamlGroupLinks","gitlab_list_user_memberships":"listUserMemberships","gitlab_merge_merge_request":"mergeMergeRequest","gitlab_play_job":"playJob","gitlab_reject_user":"rejectUserSignup","gitlab_remove_member":"removeMember","gitlab_retry_pipeline":"retryPipeline","gitlab_revoke_invitation":"revokeInvitation","gitlab_search_users":"searchUsers","gitlab_unban_user":"unbanUser","gitlab_unblock_user":"unblockUser","gitlab_update_file":"updateFile","gitlab_update_invitation":"updateInvitation","gitlab_update_issue":"updateIssue","gitlab_update_member":"updateMember","gitlab_update_merge_request":"updateMergeRequest","gitlab_update_user":"updateUser"},"triggers":{"gitlab_comment":"comment","gitlab_issue":"issue","gitlab_merge_request":"mergeRequest","gitlab_pipeline":"pipeline","gitlab_push":"push","gitlab_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"gmail":{"namespace":"legacy.gmail","methods":{"add_label_gmail":"addLabel","archive_gmail":"archiveEmail","delete_gmail":"deleteEmail","draft_gmail":"draftEmail","edit_draft_gmail":"editDraft","mark_read_gmail":"markAsRead","mark_unread_gmail":"markAsUnread","move_gmail":"moveEmail","read_gmail":"readEmail","remove_label_gmail":"removeLabel","search_gmail":"searchEmail","send_gmail":"sendEmail","unarchive_gmail":"unarchiveEmail"},"triggers":{"gmail_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"gmail_v2":{"namespace":"gmail","methods":{"add_label_gmail":"addLabel","archive_gmail":"archiveEmail","create_label_gmail":"createLabel","delete_draft_gmail":"deleteDraft","delete_gmail":"deleteEmail","delete_label_gmail":"deleteLabel","draft_gmail":"draftEmail","edit_draft_gmail":"editDraft","get_draft_gmail":"getDraft","get_thread_gmail":"getThread","list_drafts_gmail":"listDrafts","list_labels_gmail":"listLabels","list_threads_gmail":"listThreads","mark_read_gmail":"markAsRead","mark_unread_gmail":"markAsUnread","move_gmail":"moveEmail","read_gmail":"readEmail","remove_label_gmail":"removeLabel","search_gmail":"searchEmail","send_gmail":"sendEmail","trash_thread_gmail":"trashThread","unarchive_gmail":"unarchiveEmail","untrash_thread_gmail":"untrashThread","update_label_gmail":"updateLabel"},"triggers":{"gmail_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"gong":{"namespace":"legacy.gong","methods":{"aggregate_activity":"aggregateActivity","aggregate_by_period":"aggregateByPeriod","answered_scorecards":"answeredScorecards","ask_anything":"askAnything","assign_flow_prospects":"assignFlowProspects","create_call":"createCall","day_by_day_activity":"dayByDayActivity","get_brief":"getBrief","get_call":"getCall","get_call_transcript":"getCallTranscript","get_coaching":"getCoaching","get_extensive_calls":"getExtensiveCalls","get_folder_content":"getFolderContent","get_logs":"getLogs","get_prospect_flows":"getProspectFlows","get_user":"getUser","interaction_stats":"interactionStats","list_calls":"listCalls","list_flows":"listFlows","list_library_folders":"listLibraryFolders","list_scorecards":"listScorecards","list_trackers":"listTrackers","list_users":"listUsers","list_workspaces":"listWorkspaces","lookup_email":"lookupEmail","lookup_phone":"lookupPhone","purge_email_address":"purgeEmailAddress","purge_phone_number":"purgePhoneNumber","unassign_flow_prospects":"unassignFlowProspects"},"triggers":{"gong_call_completed":"callCompleted","gong_webhook":"webhook"}},"gong_v2":{"namespace":"gong","methods":{"aggregate_activity":"aggregateActivity","aggregate_by_period":"aggregateByPeriod","answered_scorecards":"answeredScorecards","ask_anything":"askAnything","assign_flow_prospects":"assignFlowProspects","create_call":"createCall","day_by_day_activity":"dayByDayActivity","get_brief":"getBrief","get_call":"getCall","get_call_transcript":"getCallTranscript","get_coaching":"getCoaching","get_extensive_calls":"getExtensiveCalls","get_folder_content":"getFolderContent","get_logs":"getLogs","get_prospect_flows":"getProspectFlows","get_user":"getUser","interaction_stats":"interactionStats","list_calls":"listCalls","list_flows":"listFlows","list_library_folders":"listLibraryFolders","list_scorecards":"listScorecards","list_trackers":"listTrackers","list_users":"listUsers","list_workspaces":"listWorkspaces","lookup_email":"lookupEmail","lookup_phone":"lookupPhone","purge_email_address":"purgeEmailAddress","purge_phone_number":"purgePhoneNumber","unassign_flow_prospects":"unassignFlowProspects"},"triggers":{"gong_call_completed":"callCompleted","gong_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"google_ads":{"namespace":"googleAds","methods":{"ad_performance":"adPerformance","campaign_performance":"campaignPerformance","list_ad_groups":"listAdGroups","list_campaigns":"listCampaigns","list_customers":"listCustomers","search":"customQueryGaql"},"params":{"action":{"oauthCredential":"credential"}}},"google_appsheet":{"namespace":"googleAppsheet","methods":{"google_appsheet_add_rows":"addRows","google_appsheet_delete_rows":"deleteRows","google_appsheet_edit_rows":"editRows","google_appsheet_find_rows":"findRows"}},"google_bigquery":{"namespace":"googleBigquery","methods":{"create_dataset":"createDataset","create_table":"createTable","delete_dataset":"deleteDataset","delete_table":"deleteTable","get_query_results":"getQueryResults","get_table":"getTable","insert_rows":"insertRows","list_datasets":"listDatasets","list_table_data":"listTableData","list_tables":"listTables","query":"runQuery"},"params":{"action":{"oauthCredential":"credential"}}},"google_books":{"namespace":"googleBooks","methods":{"volume_details":"getVolumeDetails","volume_search":"searchVolumes"}},"google_calendar":{"namespace":"legacy.googleCalendar","methods":{"create":"createEvent","create_calendar":"createCalendar","delete":"deleteEvent","delete_calendar":"deleteCalendar","freebusy":"checkFreeBusy","get":"getEvent","instances":"getRecurringInstances","invite":"inviteAttendees","list":"listEvents","list_acl":"listSharing","list_calendars":"listCalendars","move":"moveEvent","quick_add":"quickAddNaturalLanguage","respond":"respondToInvitationRsvp","share_calendar":"shareCalendar","unshare_calendar":"removeSharing","update":"updateEvent","update_acl":"updateSharing","update_calendar":"updateCalendar"},"triggers":{"google_calendar_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_calendar_v2":{"namespace":"googleCalendar","methods":{"create":"createEvent","create_calendar":"createCalendar","delete":"deleteEvent","delete_calendar":"deleteCalendar","freebusy":"checkFreeBusy","get":"getEvent","instances":"getRecurringInstances","invite":"inviteAttendees","list":"listEvents","list_acl":"listSharing","list_calendars":"listCalendars","move":"moveEvent","quick_add":"quickAddNaturalLanguage","respond":"respondToInvitationRsvp","share_calendar":"shareCalendar","unshare_calendar":"removeSharing","update":"updateEvent","update_acl":"updateSharing","update_calendar":"updateCalendar"},"triggers":{"google_calendar_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_contacts":{"namespace":"googleContacts","methods":{"create":"createContact","delete":"deleteContact","get":"getContact","list":"listContacts","search":"searchContacts","update":"updateContact"},"params":{"action":{"oauthCredential":"credential"}}},"google_docs":{"namespace":"googleDocs","methods":{"create":"createDocument","create_named_range":"createNamedRange","create_paragraph_bullets":"createBullets","delete_content_range":"deleteContentRange","delete_named_range":"deleteNamedRange","delete_paragraph_bullets":"deleteBullets","insert_image":"insertImage","insert_page_break":"insertPageBreak","insert_table":"insertTable","insert_text":"insertText","read":"readDocument","replace_text":"findReplaceText","update_paragraph_style":"applyParagraphStyle","update_text_style":"applyTextStyle","write":"writeToDocument"},"params":{"action":{"oauthCredential":"credential"}}},"google_drive":{"namespace":"googleDrive","methods":{"copy":"copyFile","create_comment":"createComment","create_file":"createFile","create_folder":"createFolder","delete":"deletePermanently","delete_comment":"deleteComment","download":"downloadFile","export":"exportFile","get_about":"getDriveInfo","get_content":"getFileContent","get_file":"getFileInfo","get_revision":"getRevision","list":"listFiles","list_comments":"listComments","list_permissions":"listPermissions","list_revisions":"listRevisions","move":"moveFile","search":"searchFiles","share":"shareFile","trash":"moveToTrash","unshare":"removeSharing","untrash":"restoreFromTrash","update":"updateFile","upload":"uploadFile"},"triggers":{"google_drive_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_forms":{"namespace":"googleForms","methods":{"batch_update":"batchUpdate","create_form":"createForm","create_watch":"createWatch","delete_watch":"deleteWatch","get_form":"getForm","get_responses":"getResponses","list_watches":"listWatches","renew_watch":"renewWatch","set_publish_settings":"setPublishSettings"},"triggers":{"google_forms_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"google_groups":{"namespace":"googleGroups","methods":{"add_alias":"addAlias","add_member":"addMember","create_group":"createGroup","delete_group":"deleteGroup","get_group":"getGroup","get_member":"getMember","get_settings":"getSettings","has_member":"checkMembership","list_aliases":"listAliases","list_groups":"listGroups","list_members":"listMembers","remove_alias":"removeAlias","remove_member":"removeMember","update_group":"updateGroup","update_member":"updateMemberRole","update_settings":"updateSettings"},"params":{"action":{"oauthCredential":"credential"}}},"google_maps":{"namespace":"googleMaps","methods":{"air_quality":"airQuality","directions":"getDirections","distance_matrix":"distanceMatrix","elevation":"getElevation","geocode":"geocodeAddress","geolocate":"geolocateWiFiCell","place_details":"placeDetails","places_nearby":"nearbyPlaces","places_search":"searchPlaces","pollen":"pollenForecast","reverse_geocode":"reverseGeocode","snap_to_roads":"snapToRoads","solar":"solarPotential","speed_limits":"speedLimits","timezone":"getTimezone","validate_address":"validateAddress"}},"google_meet":{"namespace":"googleMeet","methods":{"create_space":"createSpace","end_conference":"endConference","get_conference_record":"getConferenceRecord","get_space":"getSpace","list_conference_records":"listConferenceRecords","list_participants":"listParticipants"},"params":{"action":{"oauthCredential":"credential"}}},"google_pagespeed":{"namespace":"googlePagespeed"},"google_search":{"namespace":"googleSearch"},"google_sheets":{"namespace":"legacy.googleSheets","methods":{"append":"appendData","read":"readData","update":"updateData","write":"writeData"},"params":{"action":{"oauthCredential":"credential"}}},"google_sheets_v2":{"namespace":"googleSheets","methods":{"append":"appendData","batch_clear":"batchClear","batch_get":"batchRead","batch_update":"batchUpdate","clear":"clearData","copy_sheet":"copySheet","create":"createSpreadsheet","delete_rows":"deleteRows","delete_sheet":"deleteSheet","delete_spreadsheet":"deleteSpreadsheet","get_info":"getSpreadsheetInfo","read":"readData","update":"updateData","write":"writeData"},"triggers":{"google_sheets_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_slides":{"namespace":"legacy.googleSlides","methods":{"add_image":"addImage","add_slide":"addSlide","batch_update":"batchUpdateRaw","copy_presentation":"copyPresentation","create":"createPresentation","create_line":"createLine","create_paragraph_bullets":"createParagraphBullets","create_shape":"createShape","create_sheets_chart":"embedSheetsChart","create_table":"createTable","create_video":"embedVideo","delete_object":"deleteObject","delete_paragraph_bullets":"deleteParagraphBullets","delete_table_column":"deleteTableColumn","delete_table_row":"deleteTableRow","delete_text":"deleteText","duplicate_object":"duplicateObject","export_presentation":"exportPresentation","get_page":"getPage","get_thumbnail":"getThumbnail","group_objects":"groupObjects","insert_table_columns":"insertTableColumns","insert_table_rows":"insertTableRows","insert_text":"insertText","merge_table_cells":"mergeTableCells","read":"readPresentation","refresh_sheets_chart":"refreshSheetsChart","reorder_slides":"reorderSlides","replace_all_shapes_with_image":"replaceAllShapesWithImage","replace_all_shapes_with_sheets_chart":"replaceAllShapesWithSheetsChart","replace_all_text":"replaceAllText","replace_image":"replaceImage","reroute_line":"rerouteLine","ungroup_objects":"ungroupObjects","unmerge_table_cells":"unmergeTableCells","update_image_properties":"updateImageProperties","update_line_category":"updateLineCategory","update_line_properties":"updateLineProperties","update_page_element_alt_text":"updateAltText","update_page_element_transform":"updateElementTransform","update_page_elements_z_order":"updateZOrder","update_page_properties":"updatePageProperties","update_paragraph_style":"updateParagraphStyle","update_shape_properties":"updateShapeProperties","update_slide_properties":"updateSlideProperties","update_table_border_properties":"updateTableBorderProperties","update_table_cell_properties":"updateTableCellProperties","update_table_column_properties":"updateTableColumnProperties","update_table_row_properties":"updateTableRowProperties","update_text_style":"updateTextStyle","update_video_properties":"updateVideoProperties","write":"writeToPresentation"},"params":{"action":{"oauthCredential":"credential"}}},"google_slides_v2":{"namespace":"googleSlides","methods":{"add_image":"addImage","add_slide":"addSlide","batch_update":"batchUpdateRaw","copy_presentation":"copyPresentation","create":"createPresentation","create_line":"createLine","create_paragraph_bullets":"createParagraphBullets","create_shape":"createShape","create_sheets_chart":"embedSheetsChart","create_table":"createTable","create_video":"embedVideo","delete_object":"deleteObject","delete_paragraph_bullets":"deleteParagraphBullets","delete_table_column":"deleteTableColumn","delete_table_row":"deleteTableRow","delete_text":"deleteText","duplicate_object":"duplicateObject","export_presentation":"exportPresentation","get_page":"getPage","get_thumbnail":"getThumbnail","group_objects":"groupObjects","insert_table_columns":"insertTableColumns","insert_table_rows":"insertTableRows","insert_text":"insertText","merge_table_cells":"mergeTableCells","read":"readPresentation","refresh_sheets_chart":"refreshSheetsChart","reorder_slides":"reorderSlides","replace_all_shapes_with_image":"replaceAllShapesWithImage","replace_all_shapes_with_sheets_chart":"replaceAllShapesWithSheetsChart","replace_all_text":"replaceAllText","replace_image":"replaceImage","reroute_line":"rerouteLine","ungroup_objects":"ungroupObjects","unmerge_table_cells":"unmergeTableCells","update_image_properties":"updateImageProperties","update_line_category":"updateLineCategory","update_line_properties":"updateLineProperties","update_page_element_alt_text":"updateAltText","update_page_element_transform":"updateElementTransform","update_page_elements_z_order":"updateZOrder","update_page_properties":"updatePageProperties","update_paragraph_style":"updateParagraphStyle","update_shape_properties":"updateShapeProperties","update_slide_properties":"updateSlideProperties","update_table_border_properties":"updateTableBorderProperties","update_table_cell_properties":"updateTableCellProperties","update_table_column_properties":"updateTableColumnProperties","update_table_row_properties":"updateTableRowProperties","update_text_style":"updateTextStyle","update_video_properties":"updateVideoProperties","write":"writeToPresentation"},"params":{"action":{"oauthCredential":"credential"}}},"google_tasks":{"namespace":"googleTasks","methods":{"create":"createTask","delete":"deleteTask","get":"getTask","list":"listTasks","list_task_lists":"listTaskLists","update":"updateTask"},"params":{"action":{"oauthCredential":"credential"}}},"google_translate":{"namespace":"googleTranslate","methods":{"detect":"detectLanguage","text":"translateText"}},"google_vault":{"namespace":"googleVault","methods":{"add_held_accounts":"addHeldAccounts","add_matters_permissions":"addMatterCollaborator","close_matters":"closeMatter","create_matters":"createMatter","create_matters_export":"createExport","create_matters_holds":"createHold","create_saved_query":"createSavedQuery","delete_matters":"deleteMatter","delete_matters_export":"deleteExport","delete_matters_holds":"deleteHold","delete_saved_query":"deleteSavedQuery","download_export_file":"downloadExportFile","list_matters":"listMatters","list_matters_export":"listExports","list_matters_holds":"listHolds","list_saved_queries":"listSavedQueries","remove_held_accounts":"removeHeldAccounts","remove_matters_permissions":"removeMatterCollaborator","reopen_matters":"reopenMatter","undelete_matters":"undeleteMatter","update_matters":"updateMatter","update_matters_holds":"updateHold"},"params":{"action":{"oauthCredential":"credential"}}},"grafana":{"namespace":"legacy.grafana","methods":{"grafana_check_data_source_health":"checkDataSourceHealth","grafana_create_alert_rule":"createAlertRule","grafana_create_annotation":"createAnnotation","grafana_create_contact_point":"createContactPoint","grafana_create_dashboard":"createDashboard","grafana_create_folder":"createFolder","grafana_delete_alert_rule":"deleteAlertRule","grafana_delete_annotation":"deleteAnnotation","grafana_delete_contact_point":"deleteContactPoint","grafana_delete_dashboard":"deleteDashboard","grafana_delete_folder":"deleteFolder","grafana_get_alert_rule":"getAlertRule","grafana_get_alert_rule_group":"getAlertRuleGroup","grafana_get_dashboard":"getDashboard","grafana_get_data_source":"getDataSource","grafana_get_folder":"getFolder","grafana_get_health":"getHealth","grafana_list_alert_rules":"listAlertRules","grafana_list_annotations":"listAnnotations","grafana_list_contact_points":"listContactPoints","grafana_list_dashboards":"listDashboards","grafana_list_data_sources":"listDataSources","grafana_list_folders":"listFolders","grafana_move_folder":"moveFolder","grafana_query_data_source":"queryDataSource","grafana_update_alert_rule":"updateAlertRule","grafana_update_annotation":"updateAnnotation","grafana_update_contact_point":"updateContactPoint","grafana_update_dashboard":"updateDashboard","grafana_update_folder":"updateFolder"}},"grafana_v2":{"namespace":"grafana","methods":{"grafana_check_data_source_health":"checkDataSourceHealth","grafana_create_alert_rule":"createAlertRule","grafana_create_annotation":"createAnnotation","grafana_create_contact_point":"createContactPoint","grafana_create_dashboard":"createDashboard","grafana_create_folder":"createFolder","grafana_delete_alert_rule":"deleteAlertRule","grafana_delete_annotation":"deleteAnnotation","grafana_delete_contact_point":"deleteContactPoint","grafana_delete_dashboard":"deleteDashboard","grafana_delete_folder":"deleteFolder","grafana_get_alert_rule":"getAlertRule","grafana_get_alert_rule_group":"getAlertRuleGroup","grafana_get_dashboard":"getDashboard","grafana_get_data_source":"getDataSource","grafana_get_folder":"getFolder","grafana_get_health":"getHealth","grafana_list_alert_rules":"listAlertRules","grafana_list_annotations":"listAnnotations","grafana_list_contact_points":"listContactPoints","grafana_list_dashboards":"listDashboards","grafana_list_data_sources":"listDataSources","grafana_list_folders":"listFolders","grafana_move_folder":"moveFolder","grafana_query_data_source":"queryDataSource","grafana_update_alert_rule":"updateAlertRule","grafana_update_annotation":"updateAnnotation","grafana_update_contact_point":"updateContactPoint","grafana_update_dashboard":"updateDashboard","grafana_update_folder":"updateFolder"},"params":{"action":{"oauthCredential":"credential"}}},"grain":{"namespace":"legacy.grain","methods":{"grain_create_hook":"createWebhook","grain_delete_hook":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams","grain_list_views":"listViews"},"triggers":{"grain_highlight_created":"highlightCreated","grain_highlight_updated":"highlightUpdated","grain_item_added":"itemAdded","grain_item_updated":"itemUpdated","grain_recording_created":"recordingCreated","grain_recording_updated":"recordingUpdated","grain_story_created":"storyCreated","grain_webhook":"webhook"}},"grain_v2":{"namespace":"legacy.grainV2","methods":{"grain_create_hook_v2":"createWebhook","grain_delete_hook_v2":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks_v2":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams"},"triggers":{"grain_all_events_v2":"allEvents","grain_highlight_added_v2":"highlightAdded","grain_highlight_deleted_v2":"highlightDeleted","grain_highlight_updated_v2":"highlightUpdated","grain_recording_added_v2":"recordingAdded","grain_recording_deleted_v2":"recordingDeleted","grain_recording_updated_v2":"recordingUpdated","grain_story_added_v2":"storyAdded","grain_story_deleted_v2":"storyDeleted","grain_story_updated_v2":"storyUpdated","grain_upload_status_v2":"uploadStatus"}},"grain_v3":{"namespace":"grain","methods":{"grain_create_hook_v2":"createWebhook","grain_delete_hook_v2":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks_v2":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams"},"triggers":{"grain_all_events_v2":"allEvents","grain_highlight_added_v2":"highlightAdded","grain_highlight_deleted_v2":"highlightDeleted","grain_highlight_updated_v2":"highlightUpdated","grain_recording_added_v2":"recordingAdded","grain_recording_deleted_v2":"recordingDeleted","grain_recording_updated_v2":"recordingUpdated","grain_story_added_v2":"storyAdded","grain_story_deleted_v2":"storyDeleted","grain_story_updated_v2":"storyUpdated","grain_upload_status_v2":"uploadStatus"},"params":{"action":{"oauthCredential":"credential"}}},"granola":{"namespace":"legacy.granola","methods":{"create_webhook_endpoint":"createWebhookEndpoint","delete_webhook_endpoint":"deleteWebhookEndpoint","get_note":"getNote","get_transcript":"getTranscript","list_audit_events":"listAuditEvents","list_folders":"listFolders","list_notes":"listNotes","list_webhook_endpoints":"listWebhookEndpoints","update_webhook_endpoint":"updateWebhookEndpoint"},"triggers":{"granola_note_access_granted":"noteAccessGranted","granola_note_edited":"noteEdited","granola_note_generated":"noteGenerated","granola_webhook":"webhook"}},"granola_v2":{"namespace":"granola","methods":{"create_webhook_endpoint":"createWebhookEndpoint","delete_webhook_endpoint":"deleteWebhookEndpoint","get_note":"getNote","get_transcript":"getTranscript","list_audit_events":"listAuditEvents","list_folders":"listFolders","list_notes":"listNotes","list_webhook_endpoints":"listWebhookEndpoints","update_webhook_endpoint":"updateWebhookEndpoint"},"triggers":{"granola_note_access_granted":"noteAccessGranted","granola_note_edited":"noteEdited","granola_note_generated":"noteGenerated","granola_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"greenhouse":{"namespace":"legacy.greenhouse","methods":{"greenhouse_get_application":"getApplication","greenhouse_get_candidate":"getCandidate","greenhouse_get_job":"getJob","greenhouse_get_user":"getUser","greenhouse_list_applications":"listApplications","greenhouse_list_candidates":"listCandidates","greenhouse_list_departments":"listDepartments","greenhouse_list_job_stages":"listJobStages","greenhouse_list_jobs":"listJobs","greenhouse_list_offices":"listOffices","greenhouse_list_users":"listUsers"},"triggers":{"greenhouse_candidate_hired":"candidateHired","greenhouse_candidate_rejected":"candidateRejected","greenhouse_candidate_stage_change":"candidateStageChange","greenhouse_job_created":"jobCreated","greenhouse_job_updated":"jobUpdated","greenhouse_new_application":"newApplication","greenhouse_offer_created":"offerCreated","greenhouse_webhook":"webhook"}},"greenhouse_v2":{"namespace":"greenhouse","methods":{"apply_candidate_tag":"applyCandidateTag","convert_prospect":"convertProspect","create_application":"createApplication","create_attachment":"createAttachment","create_candidate":"createCandidate","create_candidate_tag":"createCandidateTag","create_note":"createNote","delete_application":"deleteApplication","delete_attachment":"deleteAttachment","delete_candidate":"deleteCandidate","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_user":"getUser","hire_application":"hireApplication","list_application_stages":"listApplicationStages","list_applications":"listApplications","list_applied_candidate_tags":"listAppliedCandidateTags","list_attachments":"listAttachments","list_candidate_educations":"listCandidateEducations","list_candidate_employments":"listCandidateEmployments","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_close_reasons":"listCloseReasons","list_custom_field_options":"listCustomFieldOptions","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_email_templates":"listEmailTemplates","list_interviews":"listInterviews","list_job_hiring_managers":"listJobHiringManagers","list_job_interview_stages":"listJobInterviewStages","list_job_owners":"listJobOwners","list_jobs":"listJobs","list_notes":"listNotes","list_offers":"listOffers","list_offices":"listOffices","list_openings":"listOpenings","list_prospect_pool_stages":"listProspectPoolStages","list_prospect_pools":"listProspectPools","list_referrers":"listReferrers","list_rejection_reasons":"listRejectionReasons","list_scorecards":"listScorecards","list_sources":"listSources","list_users":"listUsers","move_application":"moveApplication","reject_application":"rejectApplication","remove_candidate_tag":"removeCandidateTag","unreject_application":"unrejectApplication","update_application":"updateApplication","update_candidate":"updateCandidate"},"triggers":{"greenhouse_candidate_hired":"candidateHired","greenhouse_candidate_rejected":"candidateRejected","greenhouse_candidate_stage_change":"candidateStageChange","greenhouse_job_created":"jobCreated","greenhouse_job_updated":"jobUpdated","greenhouse_new_application":"newApplication","greenhouse_offer_created":"offerCreated","greenhouse_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"greptile":{"namespace":"greptile","methods":{"greptile_index_repo":"indexRepository","greptile_query":"query","greptile_status":"checkStatus"}},"guardrails":{"namespace":"guardrails"},"harmonic":{"namespace":"harmonic","methods":{"harmonic_batch_get_people":"batchGetPeople","harmonic_clear_people_saved_search_net_new_results":"clearPeopleSavedSearchNetNewResults","harmonic_enrich_person":"enrichPerson","harmonic_get_company_employees":"getCompanyEmployees","harmonic_get_email_enrichment_job":"getEmailEnrichmentJob","harmonic_get_email_enrichment_usage":"getEmailEnrichmentUsage","harmonic_get_enrichment_status":"getEnrichmentStatus","harmonic_get_people_saved_search_net_new_results":"getPeopleSavedSearchNetNewResults","harmonic_get_people_saved_search_results":"getPeopleSavedSearchResults","harmonic_get_person":"getPerson","harmonic_list_people_saved_searches":"listPeopleSavedSearches","harmonic_search_people_scout":"searchPeopleWithScout","harmonic_submit_email_enrichment_job":"submitEmailEnrichmentJob"},"params":{"action":{"oauthCredential":"credential"}}},"helpscout":{"namespace":"helpscout","methods":{"assign_conversation":"assignConversation","create_conversation":"createConversation","create_customer":"createCustomer","create_customer_thread":"addCustomerMessage","create_note":"addNote","create_reply":"replyToConversation","delete_conversation":"deleteConversation","get_conversation":"getConversation","get_current_user":"getCurrentUser","get_customer":"getCustomer","get_organization":"getOrganization","get_saved_reply":"getSavedReply","list_conversations":"listConversations","list_custom_fields":"listCustomFields","list_customer_properties":"listCustomerProperties","list_customers":"listCustomers","list_folders":"listFolders","list_mailboxes":"listInboxes","list_organizations":"listOrganizations","list_saved_replies":"listSavedReplies","list_tags":"listTags","list_teams":"listTeams","list_threads":"listThreads","list_users":"listUsers","list_workflows":"listWorkflows","move_conversation":"moveConversation","run_workflow":"runWorkflow","set_conversation_tags":"setConversationTags","snooze_conversation":"snoozeConversation","unassign_conversation":"unassignConversation","unsnooze_conversation":"unsnoozeConversation","update_conversation_customer":"changeConversationCustomer","update_conversation_status":"updateConversationStatus","update_conversation_subject":"updateConversationSubject","update_custom_fields":"updateCustomFields","update_customer":"updateCustomer","update_customer_properties":"updateCustomerProperties"},"triggers":{"helpscout_agent_replied":"agentReplied","helpscout_conversation_assigned":"conversationAssigned","helpscout_conversation_created":"conversationCreated","helpscout_conversation_deleted":"conversationDeleted","helpscout_conversation_merged":"conversationMerged","helpscout_conversation_moved":"conversationMoved","helpscout_conversation_status_changed":"conversationStatusChanged","helpscout_conversation_tags_updated":"conversationTagsUpdated","helpscout_customer_created":"customerCreated","helpscout_customer_replied":"customerReplied","helpscout_customer_updated":"customerUpdated","helpscout_note_created":"noteCreated","helpscout_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"hex":{"namespace":"legacy.hex","methods":{"cancel_run":"cancelRun","create_collection":"createCollection","create_group":"createGroup","deactivate_user":"deactivateUser","delete_group":"deleteGroup","get_collection":"getCollection","get_data_connection":"getDataConnection","get_group":"getGroup","get_project":"getProject","get_project_runs":"getProjectRuns","get_queried_tables":"getQueriedTables","get_run_status":"getRunStatus","list_collections":"listCollections","list_data_connections":"listDataConnections","list_groups":"listGroups","list_projects":"listProjects","list_users":"listUsers","run_project":"runProject","update_collection":"updateCollection","update_group":"updateGroup","update_project":"updateProject"}},"hex_v2":{"namespace":"hex","methods":{"cancel_run":"cancelRun","create_collection":"createCollection","create_group":"createGroup","deactivate_user":"deactivateUser","delete_group":"deleteGroup","get_collection":"getCollection","get_data_connection":"getDataConnection","get_group":"getGroup","get_project":"getProject","get_project_runs":"getProjectRuns","get_queried_tables":"getQueriedTables","get_run_status":"getRunStatus","list_collections":"listCollections","list_data_connections":"listDataConnections","list_groups":"listGroups","list_projects":"listProjects","list_users":"listUsers","run_project":"runProject","update_collection":"updateCollection","update_group":"updateGroup","update_project":"updateProject"},"params":{"action":{"oauthCredential":"credential"}}},"higgsfield":{"namespace":"higgsfield","methods":{"higgsfield_cancel_request":"cancelRequest","higgsfield_create_character":"createCharacter","higgsfield_delete_character":"deleteCharacter","higgsfield_delete_request":"deleteRequest","higgsfield_generate":"generateAnyModel","higgsfield_generate_soul_image":"generateSoulImage","higgsfield_get_character":"getCharacter","higgsfield_get_request_status":"getRequestStatus","higgsfield_list_characters":"listCharacters"},"params":{"action":{"oauthCredential":"credential"}}},"hubspot":{"namespace":"hubspot","methods":{"add_list_memberships":"addListMembers","create_appointment":"createAppointment","create_association":"createAssociation","create_company":"createCompany","create_contact":"createContact","create_deal":"createDeal","create_email":"createEmail","create_line_item":"createLineItem","create_list":"createList","create_note":"createNote","create_ticket":"createTicket","delete_association":"deleteAssociation","delete_company":"deleteCompany","delete_contact":"deleteContact","delete_deal":"deleteDeal","delete_line_item":"deleteLineItem","delete_ticket":"deleteTicket","get_appointments":"getAppointments","get_association_labels":"getAssociationLabels","get_carts":"getCarts","get_companies":"getCompanies","get_contacts":"getContacts","get_deals":"getDeals","get_emails":"getEmails","get_line_items":"getLineItems","get_list_memberships":"getListMembers","get_lists":"getLists","get_marketing_events":"getMarketingEvents","get_notes":"getNotes","get_properties":"getProperties","get_quotes":"getQuotes","get_tickets":"getTickets","get_users":"getUsers","list_associations":"listAssociations","list_owners":"listOwners","remove_list_memberships":"removeListMembers","search_companies":"searchCompanies","search_contacts":"searchContacts","search_deals":"searchDeals","search_emails":"searchEmails","search_line_items":"searchLineItems","search_notes":"searchNotes","search_quotes":"searchQuotes","search_tickets":"searchTickets","update_appointment":"updateAppointment","update_company":"updateCompany","update_contact":"updateContact","update_deal":"updateDeal","update_line_item":"updateLineItem","update_ticket":"updateTicket"},"triggers":{"hubspot_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"huggingface":{"namespace":"legacy.huggingface"},"huggingface_v2":{"namespace":"huggingface","params":{"action":{"oauthCredential":"credential"}}},"human_in_the_loop":{"namespace":"legacy.humanInTheLoop"},"human_in_the_loop_v2":{"namespace":"human"},"hunter":{"namespace":"hunter","methods":{"hunter_companies_find":"findCompany","hunter_discover":"discoverCompanies","hunter_domain_search":"domainSearch","hunter_email_count":"emailCount","hunter_email_finder":"emailFinder","hunter_email_verifier":"emailVerifier"}},"iam":{"namespace":"legacy.iam","methods":{"add_user_to_group":"addUserToGroup","attach_role_policy":"attachRolePolicy","attach_user_policy":"attachUserPolicy","create_access_key":"createAccessKey","create_role":"createRole","create_user":"createUser","delete_access_key":"deleteAccessKey","delete_role":"deleteRole","delete_user":"deleteUser","detach_role_policy":"detachRolePolicy","detach_user_policy":"detachUserPolicy","get_policy":"getPolicy","get_role":"getRole","get_user":"getUser","list_access_keys":"listAccessKeys","list_attached_role_policies":"listAttachedRolePolicies","list_attached_user_policies":"listAttachedUserPolicies","list_groups":"listGroups","list_policies":"listPolicies","list_roles":"listRoles","list_users":"listUsers","remove_user_from_group":"removeUserFromGroup","simulate_principal_policy":"simulatePrincipalPolicy","update_access_key":"updateAccessKey"}},"iam_v2":{"namespace":"iam","methods":{"add_user_to_group":"addUserToGroup","attach_role_policy":"attachRolePolicy","attach_user_policy":"attachUserPolicy","create_access_key":"createAccessKey","create_role":"createRole","create_user":"createUser","delete_access_key":"deleteAccessKey","delete_role":"deleteRole","delete_user":"deleteUser","detach_role_policy":"detachRolePolicy","detach_user_policy":"detachUserPolicy","get_policy":"getPolicy","get_role":"getRole","get_user":"getUser","list_access_keys":"listAccessKeys","list_attached_role_policies":"listAttachedRolePolicies","list_attached_user_policies":"listAttachedUserPolicies","list_groups":"listGroups","list_policies":"listPolicies","list_roles":"listRoles","list_users":"listUsers","remove_user_from_group":"removeUserFromGroup","simulate_principal_policy":"simulatePrincipalPolicy","update_access_key":"updateAccessKey"},"params":{"action":{"oauthCredential":"credential"}}},"icypeas":{"namespace":"icypeas","methods":{"icypeas_find_email":"findEmail","icypeas_verify_email":"verifyEmail"}},"identity_center":{"namespace":"legacy.identityCenter","methods":{"check_assignment_deletion_status":"checkAssignmentDeletionStatus","check_assignment_status":"checkAssignmentStatus","create_account_assignment":"createAccountAssignment","delete_account_assignment":"deleteAccountAssignment","describe_account":"describeAccount","describe_group":"describeGroup","describe_user":"describeUser","get_group":"getGroup","get_user":"getUser","list_account_assignments":"listAccountAssignmentsForPrincipal","list_accounts":"listAccounts","list_assignments_for_account":"listAssignmentsForAccount","list_group_memberships":"listGroupMemberships","list_groups":"listGroups","list_instances":"listInstances","list_permission_sets":"listPermissionSets"}},"identity_center_v2":{"namespace":"identityCenter","methods":{"check_assignment_deletion_status":"checkAssignmentDeletionStatus","check_assignment_status":"checkAssignmentStatus","create_account_assignment":"createAccountAssignment","delete_account_assignment":"deleteAccountAssignment","describe_account":"describeAccount","describe_group":"describeGroup","describe_user":"describeUser","get_group":"getGroup","get_user":"getUser","list_account_assignments":"listAccountAssignmentsForPrincipal","list_accounts":"listAccounts","list_assignments_for_account":"listAssignmentsForAccount","list_group_memberships":"listGroupMemberships","list_groups":"listGroups","list_instances":"listInstances","list_permission_sets":"listPermissionSets"},"params":{"action":{"oauthCredential":"credential"}}},"image_generator":{"namespace":"legacy.imageGenerator"},"image_generator_v2":{"namespace":"imageGenerator"},"imap":{"namespace":"trigger.imap"},"incidentio":{"namespace":"legacy.incidentio","methods":{"incidentio_actions_create":"createAction","incidentio_actions_list":"listActions","incidentio_actions_show":"showAction","incidentio_actions_update":"updateAction","incidentio_alert_events_create":"createAlertEvent","incidentio_alerts_list":"listAlerts","incidentio_alerts_resolve":"resolveAlert","incidentio_alerts_show":"showAlert","incidentio_catalog_entries_list":"listCatalogEntries","incidentio_catalog_types_list":"listCatalogTypes","incidentio_custom_fields_create":"createCustomField","incidentio_custom_fields_delete":"deleteCustomField","incidentio_custom_fields_list":"listCustomFields","incidentio_custom_fields_show":"showCustomField","incidentio_custom_fields_update":"updateCustomField","incidentio_escalation_paths_create":"createEscalationPath","incidentio_escalation_paths_delete":"deleteEscalationPath","incidentio_escalation_paths_list":"listEscalationPaths","incidentio_escalation_paths_show":"showEscalationPath","incidentio_escalation_paths_update":"updateEscalationPath","incidentio_escalations_cancel":"cancelEscalation","incidentio_escalations_create":"createEscalation","incidentio_escalations_list":"listEscalations","incidentio_escalations_show":"showEscalation","incidentio_follow_ups_create":"createFollowUp","incidentio_follow_ups_list":"listFollowUps","incidentio_follow_ups_show":"showFollowUp","incidentio_follow_ups_update":"updateFollowUp","incidentio_incident_alerts_list":"listIncidentAlerts","incidentio_incident_memberships_create":"grantIncidentMembership","incidentio_incident_memberships_revoke":"revokeIncidentMembership","incidentio_incident_participants_list":"listIncidentParticipants","incidentio_incident_roles_create":"createIncidentRole","incidentio_incident_roles_delete":"deleteIncidentRole","incidentio_incident_roles_list":"listIncidentRoles","incidentio_incident_roles_show":"showIncidentRole","incidentio_incident_roles_update":"updateIncidentRole","incidentio_incident_statuses_list":"listIncidentStatuses","incidentio_incident_timestamps_list":"listIncidentTimestamps","incidentio_incident_timestamps_show":"showIncidentTimestamp","incidentio_incident_types_list":"listIncidentTypes","incidentio_incident_updates_list":"listIncidentUpdates","incidentio_incidents_create":"createIncident","incidentio_incidents_list":"listIncidents","incidentio_incidents_show":"showIncident","incidentio_incidents_update":"updateIncident","incidentio_on_call_now":"getWhoIsOnCall","incidentio_schedule_entries_list":"listScheduleEntries","incidentio_schedule_overrides_create":"createScheduleOverride","incidentio_schedule_overrides_list":"listScheduleOverrides","incidentio_schedules_create":"createSchedule","incidentio_schedules_delete":"deleteSchedule","incidentio_schedules_list":"listSchedules","incidentio_schedules_show":"showSchedule","incidentio_schedules_update":"updateSchedule","incidentio_severities_list":"listSeverities","incidentio_teams_list":"listTeams","incidentio_teams_show":"showTeam","incidentio_users_list":"listUsers","incidentio_users_show":"showUser","incidentio_workflows_create":"createWorkflow","incidentio_workflows_delete":"deleteWorkflow","incidentio_workflows_list":"listWorkflows","incidentio_workflows_show":"showWorkflow","incidentio_workflows_update":"updateWorkflow"},"triggers":{"incidentio_alert_created":"alertCreated","incidentio_incident_created":"incidentCreated","incidentio_incident_status_updated":"incidentStatusUpdated","incidentio_incident_updated":"incidentUpdated"}},"incidentio_v2":{"namespace":"incidentio","methods":{"incidentio_actions_create":"createAction","incidentio_actions_list":"listActions","incidentio_actions_show":"showAction","incidentio_actions_update":"updateAction","incidentio_alert_events_create":"createAlertEvent","incidentio_alerts_list":"listAlerts","incidentio_alerts_resolve":"resolveAlert","incidentio_alerts_show":"showAlert","incidentio_catalog_entries_list":"listCatalogEntries","incidentio_catalog_types_list":"listCatalogTypes","incidentio_custom_fields_create":"createCustomField","incidentio_custom_fields_delete":"deleteCustomField","incidentio_custom_fields_list":"listCustomFields","incidentio_custom_fields_show":"showCustomField","incidentio_custom_fields_update":"updateCustomField","incidentio_escalation_paths_create":"createEscalationPath","incidentio_escalation_paths_delete":"deleteEscalationPath","incidentio_escalation_paths_list":"listEscalationPaths","incidentio_escalation_paths_show":"showEscalationPath","incidentio_escalation_paths_update":"updateEscalationPath","incidentio_escalations_cancel":"cancelEscalation","incidentio_escalations_create":"createEscalation","incidentio_escalations_list":"listEscalations","incidentio_escalations_show":"showEscalation","incidentio_follow_ups_create":"createFollowUp","incidentio_follow_ups_list":"listFollowUps","incidentio_follow_ups_show":"showFollowUp","incidentio_follow_ups_update":"updateFollowUp","incidentio_incident_alerts_list":"listIncidentAlerts","incidentio_incident_memberships_create":"grantIncidentMembership","incidentio_incident_memberships_revoke":"revokeIncidentMembership","incidentio_incident_participants_list":"listIncidentParticipants","incidentio_incident_roles_create":"createIncidentRole","incidentio_incident_roles_delete":"deleteIncidentRole","incidentio_incident_roles_list":"listIncidentRoles","incidentio_incident_roles_show":"showIncidentRole","incidentio_incident_roles_update":"updateIncidentRole","incidentio_incident_statuses_list":"listIncidentStatuses","incidentio_incident_timestamps_list":"listIncidentTimestamps","incidentio_incident_timestamps_show":"showIncidentTimestamp","incidentio_incident_types_list":"listIncidentTypes","incidentio_incident_updates_list":"listIncidentUpdates","incidentio_incidents_create":"createIncident","incidentio_incidents_list":"listIncidents","incidentio_incidents_show":"showIncident","incidentio_incidents_update":"updateIncident","incidentio_on_call_now":"getWhoIsOnCall","incidentio_schedule_entries_list":"listScheduleEntries","incidentio_schedule_overrides_create":"createScheduleOverride","incidentio_schedule_overrides_list":"listScheduleOverrides","incidentio_schedules_create":"createSchedule","incidentio_schedules_delete":"deleteSchedule","incidentio_schedules_list":"listSchedules","incidentio_schedules_show":"showSchedule","incidentio_schedules_update":"updateSchedule","incidentio_severities_list":"listSeverities","incidentio_teams_list":"listTeams","incidentio_teams_show":"showTeam","incidentio_users_list":"listUsers","incidentio_users_show":"showUser","incidentio_workflows_create":"createWorkflow","incidentio_workflows_delete":"deleteWorkflow","incidentio_workflows_list":"listWorkflows","incidentio_workflows_show":"showWorkflow","incidentio_workflows_update":"updateWorkflow"},"triggers":{"incidentio_alert_created":"alertCreated","incidentio_incident_created":"incidentCreated","incidentio_incident_status_updated":"incidentStatusUpdated","incidentio_incident_updated":"incidentUpdated"},"params":{"action":{"oauthCredential":"credential"}}},"infisical":{"namespace":"legacy.infisical","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","get_secret":"getSecret","list_secrets":"listSecrets","update_secret":"updateSecret"}},"infisical_v2":{"namespace":"infisical","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","get_secret":"getSecret","list_secrets":"listSecrets","update_secret":"updateSecret"},"params":{"action":{"oauthCredential":"credential"}}},"input_trigger":{"namespace":"legacy.inputTrigger"},"instagram":{"namespace":"legacy.instagram","methods":{"instagram_delete_comment":"deleteComment","instagram_download_media":"downloadMedia","instagram_get_account_insights":"getAccountInsights","instagram_get_container_status":"getContainerStatus","instagram_get_conversation_messages":"getConversationMessages","instagram_get_media":"getMedia","instagram_get_media_insights":"getMediaInsights","instagram_get_message":"getMessage","instagram_get_profile":"getProfile","instagram_get_publishing_limit":"getPublishingLimit","instagram_hide_comment":"hideComment","instagram_list_comments":"listComments","instagram_list_conversations":"listConversations","instagram_list_media":"listMedia","instagram_list_stories":"listStories","instagram_private_reply":"privateReply","instagram_publish_carousel":"publishCarousel","instagram_publish_image":"publishImage","instagram_publish_reel":"publishReel","instagram_publish_story":"publishStory","instagram_publish_video":"publishVideo","instagram_reply_to_comment":"replyToComment","instagram_send_text_message":"sendTextMessage","instagram_set_comments_enabled":"setCommentsEnabled"},"params":{"action":{"oauthCredential":"credential"}}},"instantly":{"namespace":"legacy.instantly","methods":{"activate_campaign":"activateCampaign","create_campaign":"createCampaign","create_lead":"createLead","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_leads":"deleteLeads","get_lead":"getLead","list_campaigns":"listCampaigns","list_emails":"listEmails","list_lead_lists":"listLeadLists","list_leads":"listLeads","patch_campaign":"patchCampaign","patch_lead":"patchLead","pause_campaign":"pauseCampaign","reply_to_email":"replyToEmail","update_lead_interest_status":"updateLeadInterestStatus"},"triggers":{"instantly_account_error":"accountError","instantly_auto_reply_received":"autoReplyReceived","instantly_campaign_completed":"campaignCompleted","instantly_email_bounced":"emailBounced","instantly_email_opened":"emailOpened","instantly_email_sent":"emailSent","instantly_lead_closed":"leadClosed","instantly_lead_interested":"leadInterested","instantly_lead_meeting_booked":"leadMeetingBooked","instantly_lead_meeting_completed":"leadMeetingCompleted","instantly_lead_neutral":"leadNeutral","instantly_lead_no_show":"leadNoShow","instantly_lead_not_interested":"leadNotInterested","instantly_lead_out_of_office":"leadOutOfOffice","instantly_lead_unsubscribed":"leadUnsubscribed","instantly_lead_wrong_person":"leadWrongPerson","instantly_link_clicked":"linkClicked","instantly_reply_received":"replyReceived","instantly_supersearch_enrichment_completed":"supersearchEnrichmentCompleted","instantly_webhook":"webhook"}},"instantly_v2":{"namespace":"instantly","methods":{"activate_campaign":"activateCampaign","create_campaign":"createCampaign","create_lead":"createLead","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_leads":"deleteLeads","get_lead":"getLead","list_campaigns":"listCampaigns","list_emails":"listEmails","list_lead_lists":"listLeadLists","list_leads":"listLeads","patch_campaign":"patchCampaign","patch_lead":"patchLead","pause_campaign":"pauseCampaign","reply_to_email":"replyToEmail","update_lead_interest_status":"updateLeadInterestStatus"},"triggers":{"instantly_account_error":"accountError","instantly_auto_reply_received":"autoReplyReceived","instantly_campaign_completed":"campaignCompleted","instantly_email_bounced":"emailBounced","instantly_email_opened":"emailOpened","instantly_email_sent":"emailSent","instantly_lead_closed":"leadClosed","instantly_lead_interested":"leadInterested","instantly_lead_meeting_booked":"leadMeetingBooked","instantly_lead_meeting_completed":"leadMeetingCompleted","instantly_lead_neutral":"leadNeutral","instantly_lead_no_show":"leadNoShow","instantly_lead_not_interested":"leadNotInterested","instantly_lead_out_of_office":"leadOutOfOffice","instantly_lead_unsubscribed":"leadUnsubscribed","instantly_lead_wrong_person":"leadWrongPerson","instantly_link_clicked":"linkClicked","instantly_reply_received":"replyReceived","instantly_supersearch_enrichment_completed":"supersearchEnrichmentCompleted","instantly_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"intercom":{"namespace":"legacy.intercom","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"}},"intercom_v2":{"namespace":"legacy.intercomV2","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"intercom_contact_created":"contactCreated","intercom_conversation_closed":"conversationClosed","intercom_conversation_created":"conversationCreated","intercom_conversation_reply":"conversationReply","intercom_user_created":"userCreated","intercom_webhook":"webhook"}},"intercom_v3":{"namespace":"intercom","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"intercom_contact_created":"contactCreated","intercom_conversation_closed":"conversationClosed","intercom_conversation_created":"conversationCreated","intercom_conversation_reply":"conversationReply","intercom_user_created":"userCreated","intercom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"intune":{"namespace":"intune","methods":{"intune_get_compliance_policy":"getCompliancePolicy","intune_get_detected_app":"getDetectedApp","intune_get_device":"getDevice","intune_get_device_configuration":"getDeviceConfiguration","intune_list_app_devices":"listAppDevices","intune_list_compliance_policies":"listCompliancePolicies","intune_list_compliance_policy_device_statuses":"listCompliancePolicyDeviceStatuses","intune_list_detected_apps":"listDetectedApps","intune_list_device_configurations":"listDeviceConfigurations","intune_list_devices":"listDevices","intune_reboot_device":"rebootDevice","intune_remote_lock_device":"remoteLockDevice","intune_retire_device":"retireDevice","intune_sync_device":"syncDevice"},"params":{"action":{"oauthCredential":"credential"}}},"jama":{"namespace":"jama","methods":{"create_comment":"createComment","create_item":"createItem","create_relationship":"createRelationship","delete_item":"deleteItem","delete_relationship":"deleteRelationship","get_baseline":"getBaseline","get_current_user":"getCurrentUser","get_filter":"getFilter","get_item":"getItem","get_item_type":"getItemType","get_item_version":"getItemVersion","get_project":"getProject","get_relationship":"getRelationship","get_test_cycle":"getTestCycle","get_test_plan":"getTestPlan","get_test_run":"getTestRun","list_baseline_items":"listBaselineItems","list_baselines":"listBaselines","list_downstream_items":"listDownstreamItems","list_filter_results":"listFilterResults","list_filters":"listFilters","list_item_children":"listItemChildren","list_item_comments":"listItemComments","list_item_types":"listItemTypes","list_item_versions":"listItemVersions","list_items":"listItems","list_pick_list_options":"listPickListOptions","list_pick_lists":"listPickLists","list_projects":"listProjects","list_relationship_types":"listRelationshipTypes","list_relationships":"listRelationships","list_releases":"listReleases","list_tags":"listTags","list_test_cycles":"listTestCycles","list_test_plans":"listTestPlans","list_test_runs":"listTestRuns","list_upstream_items":"listUpstreamItems","search_items":"searchItems","update_item":"updateItem","update_test_run":"updateTestRun"},"params":{"action":{"oauthCredential":"credential"}}},"jina":{"namespace":"jina","methods":{"jina_read_url":"readUrl","jina_search":"search"}},"jira":{"namespace":"jira","methods":{"add_attachment":"addAttachment","add_comment":"addComment","add_watcher":"addWatcher","add_worklog":"addWorklog","assign":"assignIssue","create_link":"createIssueLink","create_sprint":"createSprint","delete":"deleteIssue","delete_attachment":"deleteAttachment","delete_comment":"deleteComment","delete_link":"deleteIssueLink","delete_worklog":"deleteWorklog","get_attachments":"getAttachments","get_comments":"getComments","get_fields":"getFields","get_project":"getProject","get_transitions":"getTransitions","get_users":"getUsers","get_worklogs":"getWorklogs","list_issue_types":"listIssueTypes","list_projects":"listProjects","read":"readIssue","read-bulk":"readBulkIssues","remove_watcher":"removeWatcher","search":"searchIssues","search_users":"searchUsers","transition":"transitionIssue","update":"updateIssue","update_comment":"updateComment","update_worklog":"updateWorklog","write":"writeIssue"},"triggers":{"jira_comment_deleted":"commentDeleted","jira_comment_updated":"commentUpdated","jira_issue_commented":"issueCommented","jira_issue_created":"issueCreated","jira_issue_deleted":"issueDeleted","jira_issue_updated":"issueUpdated","jira_project_created":"projectCreated","jira_sprint_closed":"sprintClosed","jira_sprint_created":"sprintCreated","jira_sprint_started":"sprintStarted","jira_version_released":"versionReleased","jira_webhook":"webhook","jira_worklog_created":"worklogCreated","jira_worklog_deleted":"worklogDeleted","jira_worklog_updated":"worklogUpdated"},"params":{"action":{"oauthCredential":"credential"}}},"jira_service_management":{"namespace":"jiraServiceManagement","methods":{"add_comment":"addComment","add_customer":"addCustomer","add_organization":"addOrganization","add_participants":"addParticipants","answer_approval":"answerApproval","attach_form":"attachForm","copy_forms":"copyForms","create_object":"createAssetObject","create_organization":"createOrganization","create_request":"createRequest","delete_form":"deleteForm","delete_object":"deleteAssetObject","externalise_form":"externaliseForm","get_approvals":"getApprovals","get_comments":"getComments","get_customers":"getCustomers","get_form":"getForm","get_form_answers":"getFormAnswers","get_form_structure":"getFormStructure","get_form_templates":"getFormTemplates","get_issue_forms":"getIssueForms","get_object":"getAssetObject","get_object_schema":"getAssetSchema","get_object_type_attributes":"getAssetObjectTypeAttributes","get_organizations":"getOrganizations","get_participants":"getParticipants","get_queues":"getQueues","get_request":"getRequest","get_request_type_fields":"getRequestTypeFields","get_request_types":"getRequestTypes","get_requests":"getRequests","get_service_desks":"getServiceDesks","get_sla":"getSla","get_transitions":"getTransitions","internalise_form":"internaliseForm","list_object_schemas":"listAssetSchemas","list_object_types":"listAssetObjectTypes","reopen_form":"reopenForm","save_form_answers":"saveFormAnswers","search_objects_aql":"searchAssetsAql","submit_form":"submitForm","transition_request":"transitionRequest","update_object":"updateAssetObject"},"triggers":{"jsm_request_commented":"requestCommented","jsm_request_created":"requestCreated","jsm_request_resolved":"requestResolved","jsm_request_updated":"requestUpdated","jsm_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"jotform":{"namespace":"legacy.jotform","methods":{"add_label_resources":"addLabelResources","clone_form":"cloneForm","create_form":"createForm","create_label":"createLabel","create_question":"createQuestion","create_questions":"createQuestions","create_report":"createReport","create_submission":"createSubmission","create_submissions":"createSubmissions","create_webhook":"createWebhook","delete_form":"deleteForm","delete_label":"deleteLabel","delete_question":"deleteQuestion","delete_report":"deleteReport","delete_submission":"deleteSubmission","delete_webhook":"deleteWebhook","get_form":"getForm","get_form_properties":"getFormProperties","get_history":"getHistory","get_label":"getLabel","get_question":"getQuestion","get_report":"getReport","get_settings":"getSettings","get_submission":"getSubmission","get_usage":"getUsage","get_user":"getAccount","list_form_files":"listFormFiles","list_form_reports":"listFormReports","list_form_submissions":"listFormSubmissions","list_forms":"listForms","list_label_resources":"listLabelResources","list_labels":"listLabels","list_questions":"listQuestions","list_reports":"listReports","list_submissions":"listSubmissions","list_subusers":"listSubUsers","list_webhooks":"listWebhooks","remove_label_resources":"removeLabelResources","update_form_properties":"updateFormProperties","update_label":"updateLabel","update_question":"updateQuestion","update_settings":"updateSettings","update_submission":"updateSubmission"},"triggers":{"jotform_webhook":"webhook"}},"jotform_v2":{"namespace":"jotform","methods":{"add_label_resources":"addLabelResources","clone_form":"cloneForm","create_form":"createForm","create_label":"createLabel","create_question":"createQuestion","create_questions":"createQuestions","create_report":"createReport","create_submission":"createSubmission","create_submissions":"createSubmissions","create_webhook":"createWebhook","delete_form":"deleteForm","delete_label":"deleteLabel","delete_question":"deleteQuestion","delete_report":"deleteReport","delete_submission":"deleteSubmission","delete_webhook":"deleteWebhook","get_form":"getForm","get_form_properties":"getFormProperties","get_history":"getHistory","get_label":"getLabel","get_question":"getQuestion","get_report":"getReport","get_settings":"getSettings","get_submission":"getSubmission","get_usage":"getUsage","get_user":"getAccount","list_form_files":"listFormFiles","list_form_reports":"listFormReports","list_form_submissions":"listFormSubmissions","list_forms":"listForms","list_label_resources":"listLabelResources","list_labels":"listLabels","list_questions":"listQuestions","list_reports":"listReports","list_submissions":"listSubmissions","list_subusers":"listSubUsers","list_webhooks":"listWebhooks","remove_label_resources":"removeLabelResources","update_form_properties":"updateFormProperties","update_label":"updateLabel","update_question":"updateQuestion","update_settings":"updateSettings","update_submission":"updateSubmission"},"triggers":{"jotform_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"jupyter":{"namespace":"legacy.jupyter","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"}},"jupyter_v2":{"namespace":"legacy.jupyterV2","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"}},"jupyter_v3":{"namespace":"jupyter","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"kalshi":{"namespace":"legacy.kalshi","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"}},"kalshi_v2":{"namespace":"legacy.kalshiV2","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"}},"kalshi_v3":{"namespace":"kalshi","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"},"params":{"action":{"oauthCredential":"credential"}}},"ketch":{"namespace":"ketch","methods":{"get_consent":"getConsent","get_subscriptions":"getSubscriptions","invoke_right":"invokeRight","set_consent":"setConsent","set_subscriptions":"setSubscriptions"}},"knowledge":{"namespace":"knowledge","methods":{"create_document":"createDocument","delete_chunk":"deleteChunk","delete_document":"deleteDocument","get_connector":"getConnector","get_document":"getDocument","list_chunks":"listChunks","list_connectors":"listConnectors","list_documents":"listDocuments","list_tags":"listTags","search":"search","trigger_sync":"triggerSync","update_chunk":"updateChunk","upload_chunk":"uploadChunk","upsert_document":"upsertDocument"}},"lambda":{"namespace":"legacy.lambda","methods":{"add_permission":"addPermission","create_alias":"createAlias","create_event_source_mapping":"createEventSourceMapping","create_function":"createFunction","create_function_url_config":"createFunctionUrl","delete_alias":"deleteAlias","delete_event_source_mapping":"deleteEventSourceMapping","delete_function":"deleteFunction","delete_function_concurrency":"deleteFunctionConcurrency","delete_function_event_invoke_config":"deleteAsyncInvokeConfig","delete_function_url_config":"deleteFunctionUrl","delete_provisioned_concurrency_config":"deleteProvisionedConcurrency","get_account_settings":"getAccountSettings","get_alias":"getAlias","get_event_source_mapping":"getEventSourceMapping","get_function":"getFunction","get_function_concurrency":"getFunctionConcurrency","get_function_configuration":"getFunctionConfiguration","get_function_event_invoke_config":"getAsyncInvokeConfig","get_function_recursion_config":"getRecursionConfig","get_function_url_config":"getFunctionUrl","get_layer_version":"getLayerVersion","get_policy":"getPolicy","get_provisioned_concurrency_config":"getProvisionedConcurrency","get_runtime_management_config":"getRuntimeManagementConfig","invoke":"invokeFunction","list_aliases":"listAliases","list_event_source_mappings":"listEventSourceMappings","list_function_event_invoke_configs":"listAsyncInvokeConfigs","list_function_url_configs":"listFunctionUrls","list_functions":"listFunctions","list_layer_versions":"listLayerVersions","list_layers":"listLayers","list_provisioned_concurrency_configs":"listProvisionedConcurrency","list_tags":"listTags","list_versions_by_function":"listFunctionVersions","publish_version":"publishVersion","put_function_concurrency":"setFunctionConcurrency","put_function_event_invoke_config":"setAsyncInvokeConfig","put_function_recursion_config":"setRecursionConfig","put_provisioned_concurrency_config":"setProvisionedConcurrency","put_runtime_management_config":"setRuntimeManagementConfig","remove_permission":"removePermission","tag_resource":"tagResource","untag_resource":"untagResource","update_alias":"updateAlias","update_event_source_mapping":"updateEventSourceMapping","update_function_code":"updateFunctionCode","update_function_configuration":"updateFunctionConfiguration","update_function_url_config":"updateFunctionUrl"}},"lambda_v2":{"namespace":"lambda","methods":{"add_permission":"addPermission","create_alias":"createAlias","create_event_source_mapping":"createEventSourceMapping","create_function":"createFunction","create_function_url_config":"createFunctionUrl","delete_alias":"deleteAlias","delete_event_source_mapping":"deleteEventSourceMapping","delete_function":"deleteFunction","delete_function_concurrency":"deleteFunctionConcurrency","delete_function_event_invoke_config":"deleteAsyncInvokeConfig","delete_function_url_config":"deleteFunctionUrl","delete_provisioned_concurrency_config":"deleteProvisionedConcurrency","get_account_settings":"getAccountSettings","get_alias":"getAlias","get_event_source_mapping":"getEventSourceMapping","get_function":"getFunction","get_function_concurrency":"getFunctionConcurrency","get_function_configuration":"getFunctionConfiguration","get_function_event_invoke_config":"getAsyncInvokeConfig","get_function_recursion_config":"getRecursionConfig","get_function_url_config":"getFunctionUrl","get_layer_version":"getLayerVersion","get_policy":"getPolicy","get_provisioned_concurrency_config":"getProvisionedConcurrency","get_runtime_management_config":"getRuntimeManagementConfig","invoke":"invokeFunction","list_aliases":"listAliases","list_event_source_mappings":"listEventSourceMappings","list_function_event_invoke_configs":"listAsyncInvokeConfigs","list_function_url_configs":"listFunctionUrls","list_functions":"listFunctions","list_layer_versions":"listLayerVersions","list_layers":"listLayers","list_provisioned_concurrency_configs":"listProvisionedConcurrency","list_tags":"listTags","list_versions_by_function":"listFunctionVersions","publish_version":"publishVersion","put_function_concurrency":"setFunctionConcurrency","put_function_event_invoke_config":"setAsyncInvokeConfig","put_function_recursion_config":"setRecursionConfig","put_provisioned_concurrency_config":"setProvisionedConcurrency","put_runtime_management_config":"setRuntimeManagementConfig","remove_permission":"removePermission","tag_resource":"tagResource","untag_resource":"untagResource","update_alias":"updateAlias","update_event_source_mapping":"updateEventSourceMapping","update_function_code":"updateFunctionCode","update_function_configuration":"updateFunctionConfiguration","update_function_url_config":"updateFunctionUrl"},"params":{"action":{"oauthCredential":"credential"}}},"langsmith":{"namespace":"legacy.langsmith","methods":{"langsmith_create_feedback":"createFeedback","langsmith_create_run":"createRun","langsmith_create_runs_batch":"createRunsBatch","langsmith_get_run":"getRun","langsmith_update_run":"updateRun"}},"langsmith_v2":{"namespace":"langsmith","methods":{"langsmith_create_feedback":"createFeedback","langsmith_create_run":"createRun","langsmith_create_runs_batch":"createRunsBatch","langsmith_get_run":"getRun","langsmith_update_run":"updateRun"},"params":{"action":{"oauthCredential":"credential"}}},"latex":{"namespace":"latex","methods":{"latex_compile":"compileDocument","latex_get_package":"getPackageDetails","latex_list_fonts":"listFonts","latex_search_packages":"searchPackages"}},"launchdarkly":{"namespace":"legacy.launchdarkly","methods":{"create_flag":"createFlag","delete_flag":"deleteFlag","get_audit_log":"getAuditLog","get_flag":"getFlag","get_flag_status":"getFlagStatus","list_environments":"listEnvironments","list_flags":"listFlags","list_members":"listMembers","list_projects":"listProjects","list_segments":"listSegments","toggle_flag":"toggleFlag","update_flag":"updateFlag"}},"launchdarkly_v2":{"namespace":"launchdarkly","methods":{"create_flag":"createFlag","delete_flag":"deleteFlag","get_audit_log":"getAuditLog","get_flag":"getFlag","get_flag_status":"getFlagStatus","list_environments":"listEnvironments","list_flags":"listFlags","list_members":"listMembers","list_projects":"listProjects","list_segments":"listSegments","toggle_flag":"toggleFlag","update_flag":"updateFlag"},"params":{"action":{"oauthCredential":"credential"}}},"leadmagic":{"namespace":"leadmagic","methods":{"leadmagic_company_search":"companySearch","leadmagic_email_to_profile":"emailToProfile","leadmagic_find_email":"findEmail","leadmagic_find_mobile":"findMobile","leadmagic_get_credits":"getCredits","leadmagic_profile_search":"profileSearch","leadmagic_profile_to_email":"profileToEmail","leadmagic_role_finder":"roleFinder","leadmagic_validate_email":"validateEmail"}},"lemlist":{"namespace":"legacy.lemlist","methods":{"get_activities":"getActivities","get_lead":"getLead","send_email":"sendEmail"},"triggers":{"lemlist_email_bounced":"emailBounced","lemlist_email_clicked":"emailClicked","lemlist_email_opened":"emailOpened","lemlist_email_replied":"emailReplied","lemlist_email_sent":"emailSent","lemlist_interested":"interested","lemlist_linkedin_replied":"linkedinReplied","lemlist_not_interested":"notInterested","lemlist_webhook":"webhook"}},"lemlist_v2":{"namespace":"lemlist","methods":{"get_activities":"getActivities","get_lead":"getLead","send_email":"sendEmail"},"triggers":{"lemlist_email_bounced":"emailBounced","lemlist_email_clicked":"emailClicked","lemlist_email_opened":"emailOpened","lemlist_email_replied":"emailReplied","lemlist_email_sent":"emailSent","lemlist_interested":"interested","lemlist_linkedin_replied":"linkedinReplied","lemlist_not_interested":"notInterested","lemlist_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"linear":{"namespace":"legacy.linear","methods":{"linear_add_label_to_issue":"addLabelToIssue","linear_add_label_to_project":"addLabelToProject","linear_archive_issue":"archiveIssue","linear_archive_label":"archiveLabel","linear_archive_project":"archiveProject","linear_create_attachment":"createAttachment","linear_create_comment":"createComment","linear_create_customer":"createCustomer","linear_create_customer_request":"createCustomerRequest","linear_create_customer_status":"createCustomerStatus","linear_create_customer_tier":"createCustomerTier","linear_create_cycle":"createCycle","linear_create_favorite":"createFavorite","linear_create_issue":"createIssue","linear_create_issue_relation":"createIssueRelation","linear_create_label":"createLabel","linear_create_project":"createProject","linear_create_project_label":"createProjectLabel","linear_create_project_milestone":"createProjectMilestone","linear_create_project_status":"createProjectStatus","linear_create_project_update":"createProjectUpdate","linear_create_workflow_state":"createWorkflowState","linear_delete_attachment":"deleteAttachment","linear_delete_comment":"deleteComment","linear_delete_customer":"deleteCustomer","linear_delete_customer_status":"deleteCustomerStatus","linear_delete_customer_tier":"deleteCustomerTier","linear_delete_issue":"deleteIssue","linear_delete_issue_relation":"deleteIssueRelation","linear_delete_project":"deleteProject","linear_delete_project_label":"deleteProjectLabel","linear_delete_project_milestone":"deleteProjectMilestone","linear_delete_project_status":"deleteProjectStatus","linear_get_active_cycle":"getActiveCycle","linear_get_customer":"getCustomer","linear_get_cycle":"getCycle","linear_get_issue":"getIssue","linear_get_project":"getProject","linear_get_viewer":"getViewer","linear_list_attachments":"listAttachments","linear_list_comments":"listComments","linear_list_customer_requests":"listCustomerRequests","linear_list_customer_statuses":"listCustomerStatuses","linear_list_customer_tiers":"listCustomerTiers","linear_list_customers":"listCustomers","linear_list_cycles":"listCycles","linear_list_favorites":"listFavorites","linear_list_issue_relations":"listIssueRelations","linear_list_labels":"listLabels","linear_list_notifications":"listNotifications","linear_list_project_labels":"listProjectLabels","linear_list_project_milestones":"listProjectMilestones","linear_list_project_statuses":"listProjectStatuses","linear_list_project_updates":"listProjectUpdates","linear_list_projects":"listProjects","linear_list_teams":"listTeams","linear_list_users":"listUsers","linear_list_workflow_states":"listWorkflowStates","linear_merge_customers":"mergeCustomers","linear_read_issues":"readIssues","linear_remove_label_from_issue":"removeLabelFromIssue","linear_remove_label_from_project":"removeLabelFromProject","linear_search_issues":"searchIssues","linear_unarchive_issue":"unarchiveIssue","linear_update_attachment":"updateAttachment","linear_update_comment":"updateComment","linear_update_customer":"updateCustomer","linear_update_customer_request":"updateCustomerRequest","linear_update_customer_status":"updateCustomerStatus","linear_update_customer_tier":"updateCustomerTier","linear_update_issue":"updateIssue","linear_update_label":"updateLabel","linear_update_notification":"updateNotification","linear_update_project":"updateProject","linear_update_project_label":"updateProjectLabel","linear_update_project_milestone":"updateProjectMilestone","linear_update_project_status":"updateProjectStatus","linear_update_workflow_state":"updateWorkflowState"},"triggers":{"linear_comment_created":"commentCreated","linear_comment_updated":"commentUpdated","linear_customer_request_created":"customerRequestCreated","linear_customer_request_updated":"customerRequestUpdated","linear_cycle_created":"cycleCreated","linear_cycle_updated":"cycleUpdated","linear_issue_created":"issueCreated","linear_issue_removed":"issueRemoved","linear_issue_updated":"issueUpdated","linear_label_created":"labelCreated","linear_label_updated":"labelUpdated","linear_project_created":"projectCreated","linear_project_update_created":"projectUpdateCreated","linear_project_updated":"projectUpdated","linear_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"linear_v2":{"namespace":"linear","methods":{"linear_add_label_to_issue":"addLabelToIssue","linear_add_label_to_project":"addLabelToProject","linear_archive_issue":"archiveIssue","linear_archive_label":"archiveLabel","linear_archive_project":"archiveProject","linear_create_attachment":"createAttachment","linear_create_comment":"createComment","linear_create_customer":"createCustomer","linear_create_customer_request":"createCustomerRequest","linear_create_customer_status":"createCustomerStatus","linear_create_customer_tier":"createCustomerTier","linear_create_cycle":"createCycle","linear_create_favorite":"createFavorite","linear_create_issue":"createIssue","linear_create_issue_relation":"createIssueRelation","linear_create_label":"createLabel","linear_create_project":"createProject","linear_create_project_label":"createProjectLabel","linear_create_project_milestone":"createProjectMilestone","linear_create_project_status":"createProjectStatus","linear_create_project_update":"createProjectUpdate","linear_create_workflow_state":"createWorkflowState","linear_delete_attachment":"deleteAttachment","linear_delete_comment":"deleteComment","linear_delete_customer":"deleteCustomer","linear_delete_customer_status":"deleteCustomerStatus","linear_delete_customer_tier":"deleteCustomerTier","linear_delete_issue":"deleteIssue","linear_delete_issue_relation":"deleteIssueRelation","linear_delete_project":"deleteProject","linear_delete_project_label":"deleteProjectLabel","linear_delete_project_milestone":"deleteProjectMilestone","linear_delete_project_status":"deleteProjectStatus","linear_get_active_cycle":"getActiveCycle","linear_get_customer":"getCustomer","linear_get_cycle":"getCycle","linear_get_issue":"getIssue","linear_get_project":"getProject","linear_get_viewer":"getViewer","linear_list_attachments":"listAttachments","linear_list_comments":"listComments","linear_list_customer_requests":"listCustomerRequests","linear_list_customer_statuses":"listCustomerStatuses","linear_list_customer_tiers":"listCustomerTiers","linear_list_customers":"listCustomers","linear_list_cycles":"listCycles","linear_list_favorites":"listFavorites","linear_list_issue_relations":"listIssueRelations","linear_list_labels":"listLabels","linear_list_notifications":"listNotifications","linear_list_project_labels":"listProjectLabels","linear_list_project_milestones":"listProjectMilestones","linear_list_project_statuses":"listProjectStatuses","linear_list_project_updates":"listProjectUpdates","linear_list_projects":"listProjects","linear_list_teams":"listTeams","linear_list_users":"listUsers","linear_list_workflow_states":"listWorkflowStates","linear_merge_customers":"mergeCustomers","linear_read_issues":"readIssues","linear_remove_label_from_issue":"removeLabelFromIssue","linear_remove_label_from_project":"removeLabelFromProject","linear_search_issues":"searchIssues","linear_unarchive_issue":"unarchiveIssue","linear_update_attachment":"updateAttachment","linear_update_comment":"updateComment","linear_update_customer":"updateCustomer","linear_update_customer_request":"updateCustomerRequest","linear_update_customer_status":"updateCustomerStatus","linear_update_customer_tier":"updateCustomerTier","linear_update_issue":"updateIssue","linear_update_label":"updateLabel","linear_update_notification":"updateNotification","linear_update_project":"updateProject","linear_update_project_label":"updateProjectLabel","linear_update_project_milestone":"updateProjectMilestone","linear_update_project_status":"updateProjectStatus","linear_update_workflow_state":"updateWorkflowState"},"triggers":{"linear_comment_created_v2":"commentCreated","linear_comment_updated_v2":"commentUpdated","linear_customer_request_created_v2":"customerRequestCreated","linear_customer_request_updated_v2":"customerRequestUpdated","linear_cycle_created_v2":"cycleCreated","linear_cycle_updated_v2":"cycleUpdated","linear_issue_created_v2":"issueCreated","linear_issue_removed_v2":"issueRemoved","linear_issue_updated_v2":"issueUpdated","linear_label_created_v2":"labelCreated","linear_label_updated_v2":"labelUpdated","linear_project_created_v2":"projectCreated","linear_project_update_created_v2":"projectUpdateCreated","linear_project_updated_v2":"projectUpdated","linear_webhook_v2":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"linkedin":{"namespace":"linkedin","methods":{"get_profile":"getProfile","share_post":"sharePost"},"params":{"action":{"oauthCredential":"credential"}}},"linkup":{"namespace":"linkup"},"linq":{"namespace":"legacy.linq","methods":{"add_participant":"addParticipant","check_imessage":"checkIMessage","check_rcs":"checkRcs","create_attachment":"createAttachment","create_chat":"createChat","create_contact_card":"createContactCard","create_webhook_subscription":"createWebhookSubscription","delete_attachment":"deleteAttachment","delete_message":"deleteMessage","delete_webhook_subscription":"deleteWebhookSubscription","edit_message":"editMessage","get_attachment":"getAttachment","get_chat":"getChat","get_contact_card":"getContactCard","get_message":"getMessage","get_webhook_subscription":"getWebhookSubscription","leave_chat":"leaveChat","list_chats":"listChats","list_messages":"listMessages","list_phone_numbers":"listPhoneNumbers","list_thread":"listThread","list_webhook_events":"listWebhookEvents","list_webhook_subscriptions":"listWebhookSubscriptions","mark_chat_read":"markChatAsRead","react_to_message":"reactToMessage","remove_participant":"removeParticipant","send_message":"sendMessage","send_voice_memo":"sendVoiceMemo","share_contact_card":"shareContactCard","start_typing":"startTyping","stop_typing":"stopTyping","update_chat":"updateChat","update_contact_card":"updateContactCard","update_webhook_subscription":"updateWebhookSubscription"},"triggers":{"linq_message_delivered":"messageDelivered","linq_message_failed":"messageFailed","linq_message_read":"messageRead","linq_message_received":"messageReceived","linq_reaction_added":"reactionAdded","linq_webhook":"webhook"}},"linq_v2":{"namespace":"linq","methods":{"add_participant":"addParticipant","check_imessage":"checkIMessage","check_rcs":"checkRcs","create_attachment":"createAttachment","create_chat":"createChat","create_contact_card":"createContactCard","create_webhook_subscription":"createWebhookSubscription","delete_attachment":"deleteAttachment","delete_message":"deleteMessage","delete_webhook_subscription":"deleteWebhookSubscription","edit_message":"editMessage","get_attachment":"getAttachment","get_chat":"getChat","get_contact_card":"getContactCard","get_message":"getMessage","get_webhook_subscription":"getWebhookSubscription","leave_chat":"leaveChat","list_chats":"listChats","list_messages":"listMessages","list_phone_numbers":"listPhoneNumbers","list_thread":"listThread","list_webhook_events":"listWebhookEvents","list_webhook_subscriptions":"listWebhookSubscriptions","mark_chat_read":"markChatAsRead","react_to_message":"reactToMessage","remove_participant":"removeParticipant","send_message":"sendMessage","send_voice_memo":"sendVoiceMemo","share_contact_card":"shareContactCard","start_typing":"startTyping","stop_typing":"stopTyping","update_chat":"updateChat","update_contact_card":"updateContactCard","update_webhook_subscription":"updateWebhookSubscription"},"triggers":{"linq_message_delivered":"messageDelivered","linq_message_failed":"messageFailed","linq_message_read":"messageRead","linq_message_received":"messageReceived","linq_reaction_added":"reactionAdded","linq_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"logfire":{"namespace":"legacy.logfire","methods":{"logfire_get_token_info":"getTokenInfo","logfire_get_trace":"getTrace","logfire_query":"runSqlQuery","logfire_search_records":"searchRecords"}},"logfire_v2":{"namespace":"logfire","methods":{"logfire_get_token_info":"getTokenInfo","logfire_get_trace":"getTrace","logfire_query":"runSqlQuery","logfire_search_records":"searchRecords"},"params":{"action":{"oauthCredential":"credential"}}},"logrocket":{"namespace":"logrocket","methods":{"create_release":"createRelease","get_audit_logs":"getAuditLogs","get_highlights":"getHighlights","identify_user":"identifyUser","list_exported_sessions":"listExportedSessions","request_highlights":"requestHighlights"}},"logs":{"namespace":"legacy.logs","methods":{"get_execution":"getExecutionDetails","get_log":"getLogById","query":"queryLogs"}},"logs_v2":{"namespace":"logs","methods":{"get_run_details":"getRunDetails","query":"queryLogs"}},"loops":{"namespace":"legacy.loops","methods":{"check_contact_suppression":"checkContactSuppression","create_contact":"createContact","create_contact_property":"createContactProperty","delete_contact":"deleteContact","find_contact":"findContact","get_transactional_email":"getTransactionalEmail","list_contact_properties":"listContactProperties","list_mailing_lists":"listMailingLists","list_transactional_emails":"listTransactionalEmails","remove_contact_suppression":"removeContactSuppression","send_event":"sendEvent","send_transactional_email":"sendTransactionalEmail","update_contact":"updateContact"},"triggers":{"loops_campaign_email_sent":"campaignEmailSent","loops_email_clicked":"emailClicked","loops_email_delivered":"emailDelivered","loops_email_hard_bounced":"emailHardBounced","loops_email_opened":"emailOpened","loops_email_soft_bounced":"emailSoftBounced","loops_loop_email_sent":"loopEmailSent","loops_transactional_email_sent":"transactionalEmailSent"}},"loops_v2":{"namespace":"loops","methods":{"check_contact_suppression":"checkContactSuppression","create_contact":"createContact","create_contact_property":"createContactProperty","delete_contact":"deleteContact","find_contact":"findContact","get_transactional_email":"getTransactionalEmail","list_contact_properties":"listContactProperties","list_mailing_lists":"listMailingLists","list_transactional_emails":"listTransactionalEmails","remove_contact_suppression":"removeContactSuppression","send_event":"sendEvent","send_transactional_email":"sendTransactionalEmail","update_contact":"updateContact"},"triggers":{"loops_campaign_email_sent":"campaignEmailSent","loops_email_clicked":"emailClicked","loops_email_delivered":"emailDelivered","loops_email_hard_bounced":"emailHardBounced","loops_email_opened":"emailOpened","loops_email_soft_bounced":"emailSoftBounced","loops_loop_email_sent":"loopEmailSent","loops_transactional_email_sent":"transactionalEmailSent"},"params":{"action":{"oauthCredential":"credential"}}},"luma":{"namespace":"legacy.luma","methods":{"add_guests":"addGuests","cancel_event":"cancelEvent","create_event":"createEvent","get_event":"getEvent","get_guest":"getGuest","get_guests":"getGuests","list_events":"listEvents","lookup_event":"lookupEvent","send_invites":"sendInvites","update_event":"updateEvent","update_guest_status":"updateGuestStatus"}},"luma_v2":{"namespace":"luma","methods":{"add_guests":"addGuests","cancel_event":"cancelEvent","create_event":"createEvent","get_event":"getEvent","get_guest":"getGuest","get_guests":"getGuests","list_events":"listEvents","lookup_event":"lookupEvent","send_invites":"sendInvites","update_event":"updateEvent","update_guest_status":"updateGuestStatus"},"params":{"action":{"oauthCredential":"credential"}}},"mailchimp":{"namespace":"legacy.mailchimp","methods":{"add_member":"addMember","add_member_tags":"addMemberTags","add_or_update_member":"addOrUpdateMember","add_segment_member":"addSegmentMember","add_subscriber_to_automation":"addSubscriberToAutomation","archive_member":"archiveMember","create_audience":"createAudience","create_batch_operation":"createBatchOperation","create_campaign":"createCampaign","create_interest":"createInterest","create_interest_category":"createInterestCategory","create_landing_page":"createLandingPage","create_merge_field":"createMergeField","create_segment":"createSegment","create_template":"createTemplate","delete_audience":"deleteAudience","delete_batch_operation":"deleteBatchOperation","delete_campaign":"deleteCampaign","delete_interest":"deleteInterest","delete_interest_category":"deleteInterestCategory","delete_landing_page":"deleteLandingPage","delete_member":"deleteMember","delete_member_permanent":"permanentlyDeleteMember","delete_merge_field":"deleteMergeField","delete_segment":"deleteSegment","delete_template":"deleteTemplate","get_audience":"getAudience","get_audiences":"getAudiences","get_automation":"getAutomation","get_automations":"getAutomations","get_batch_operation":"getBatchOperation","get_batch_operations":"getBatchOperations","get_campaign":"getCampaign","get_campaign_content":"getCampaignContent","get_campaign_report":"getCampaignReport","get_campaign_reports":"getCampaignReports","get_campaigns":"getCampaigns","get_interest":"getInterest","get_interest_categories":"getInterestCategories","get_interest_category":"getInterestCategory","get_interests":"getInterests","get_landing_page":"getLandingPage","get_landing_pages":"getLandingPages","get_member":"getMember","get_member_tags":"getMemberTags","get_members":"getMembers","get_merge_field":"getMergeField","get_merge_fields":"getMergeFields","get_segment":"getSegment","get_segment_members":"getSegmentMembers","get_segments":"getSegments","get_template":"getTemplate","get_templates":"getTemplates","pause_automation":"pauseAutomation","publish_landing_page":"publishLandingPage","remove_member_tags":"removeMemberTags","remove_segment_member":"removeSegmentMember","replicate_campaign":"replicateCampaign","schedule_campaign":"scheduleCampaign","send_campaign":"sendCampaign","set_campaign_content":"setCampaignContent","start_automation":"startAutomation","unarchive_member":"unarchiveMember","unpublish_landing_page":"unpublishLandingPage","unschedule_campaign":"unscheduleCampaign","update_audience":"updateAudience","update_campaign":"updateCampaign","update_interest":"updateInterest","update_interest_category":"updateInterestCategory","update_landing_page":"updateLandingPage","update_member":"updateMember","update_merge_field":"updateMergeField","update_segment":"updateSegment","update_template":"updateTemplate"}},"mailchimp_v2":{"namespace":"mailchimp","methods":{"add_member":"addMember","add_member_tags":"addMemberTags","add_or_update_member":"addOrUpdateMember","add_segment_member":"addSegmentMember","add_subscriber_to_automation":"addSubscriberToAutomation","archive_member":"archiveMember","create_audience":"createAudience","create_batch_operation":"createBatchOperation","create_campaign":"createCampaign","create_interest":"createInterest","create_interest_category":"createInterestCategory","create_landing_page":"createLandingPage","create_merge_field":"createMergeField","create_segment":"createSegment","create_template":"createTemplate","delete_audience":"deleteAudience","delete_batch_operation":"deleteBatchOperation","delete_campaign":"deleteCampaign","delete_interest":"deleteInterest","delete_interest_category":"deleteInterestCategory","delete_landing_page":"deleteLandingPage","delete_member":"deleteMember","delete_member_permanent":"permanentlyDeleteMember","delete_merge_field":"deleteMergeField","delete_segment":"deleteSegment","delete_template":"deleteTemplate","get_audience":"getAudience","get_audiences":"getAudiences","get_automation":"getAutomation","get_automations":"getAutomations","get_batch_operation":"getBatchOperation","get_batch_operations":"getBatchOperations","get_campaign":"getCampaign","get_campaign_content":"getCampaignContent","get_campaign_report":"getCampaignReport","get_campaign_reports":"getCampaignReports","get_campaigns":"getCampaigns","get_interest":"getInterest","get_interest_categories":"getInterestCategories","get_interest_category":"getInterestCategory","get_interests":"getInterests","get_landing_page":"getLandingPage","get_landing_pages":"getLandingPages","get_member":"getMember","get_member_tags":"getMemberTags","get_members":"getMembers","get_merge_field":"getMergeField","get_merge_fields":"getMergeFields","get_segment":"getSegment","get_segment_members":"getSegmentMembers","get_segments":"getSegments","get_template":"getTemplate","get_templates":"getTemplates","pause_automation":"pauseAutomation","publish_landing_page":"publishLandingPage","remove_member_tags":"removeMemberTags","remove_segment_member":"removeSegmentMember","replicate_campaign":"replicateCampaign","schedule_campaign":"scheduleCampaign","send_campaign":"sendCampaign","set_campaign_content":"setCampaignContent","start_automation":"startAutomation","unarchive_member":"unarchiveMember","unpublish_landing_page":"unpublishLandingPage","unschedule_campaign":"unscheduleCampaign","update_audience":"updateAudience","update_campaign":"updateCampaign","update_interest":"updateInterest","update_interest_category":"updateInterestCategory","update_landing_page":"updateLandingPage","update_member":"updateMember","update_merge_field":"updateMergeField","update_segment":"updateSegment","update_template":"updateTemplate"},"params":{"action":{"oauthCredential":"credential"}}},"mailgun":{"namespace":"legacy.mailgun","methods":{"add_list_member":"addListMember","create_mailing_list":"createMailingList","get_domain":"getDomain","get_mailing_list":"getMailingList","get_message":"getMessage","list_domains":"listDomains","list_messages":"listMessages","send_message":"sendMessage"}},"mailgun_v2":{"namespace":"mailgun","methods":{"add_list_member":"addListMember","create_mailing_list":"createMailingList","get_domain":"getDomain","get_mailing_list":"getMailingList","get_message":"getMessage","list_domains":"listDomains","list_messages":"listMessages","send_message":"sendMessage"},"params":{"action":{"oauthCredential":"credential"}}},"managed_agent":{"namespace":"managedAgent","methods":{"archive_session":"archiveSession","create_session":"createSession","delete_session":"deleteSession","get_session":"getSession","interrupt_session":"interruptSession","list_events":"listEvents","respond_custom_tool":"respondToCustomTool","respond_tool_confirmation":"respondToToolConfirmation","run_session":"runSessionCreateSendWaitForReply","send_message":"sendMessage","update_session":"updateSession"}},"manageengine_sdp":{"namespace":"manageengineSdp","methods":{"add_change_note":"addChangeNote","add_problem_note":"addProblemNote","add_request_note":"addRequestNote","create_asset":"createAsset","create_change":"createChange","create_problem":"createProblem","create_request":"createRequest","create_solution":"createSolution","delete_asset":"deleteAsset","delete_change":"deleteChange","delete_problem":"deleteProblem","delete_request":"deleteRequest","delete_solution":"deleteSolution","get_asset":"getAsset","get_change":"getChange","get_problem":"getProblem","get_request":"getRequest","get_solution":"getSolution","list_assets":"listAssets","list_change_notes":"listChangeNotes","list_changes":"listChanges","list_problem_notes":"listProblemNotes","list_problems":"listProblems","list_request_notes":"listRequestNotes","list_requests":"listRequests","list_solutions":"listSolutions","update_asset":"updateAsset","update_change":"updateChange","update_problem":"updateProblem","update_request":"updateRequest","update_solution":"updateSolution"},"params":{"action":{"oauthCredential":"credential"}}},"manual_trigger":{"namespace":"legacy.manualTrigger"},"mcp":{"namespace":"mcpBlock","methods":{"list":"listOperations","run":"runOperation"}},"mem0":{"namespace":"legacy.mem0","methods":{"add":"addMemories","get":"getMemories","search":"searchMemories"}},"mem0_v2":{"namespace":"mem0","methods":{"add":"addMemories","get":"getMemories","search":"searchMemories"},"params":{"action":{"oauthCredential":"credential"}}},"memory":{"namespace":"memory","methods":{"add":"addMemory","delete":"deleteMemory","get":"getMemory","getAll":"getAllMemories"}},"microsoft_ad":{"namespace":"microsoftAd","methods":{"add_directory_role_member":"addDirectoryRoleMember","add_group_member":"addGroupMember","add_user_app_role_assignment":"grantAppRoleToUser","assign_license":"assignLicense","create_group":"createGroup","create_user":"createUser","delete_group":"deleteGroup","delete_user":"deleteUser","get_conditional_access_policy":"getConditionalAccessPolicy","get_device":"getDevice","get_group":"getGroup","get_user":"getUser","list_authentication_methods":"listAuthenticationMethods","list_conditional_access_policies":"listConditionalAccessPolicies","list_devices":"listDevices","list_directory_audits":"listDirectoryAudits","list_directory_role_members":"listDirectoryRoleMembers","list_directory_roles":"listDirectoryRoles","list_group_members":"listGroupMembers","list_groups":"listGroups","list_service_principal_app_role_assignments":"listApplicationAssignments","list_service_principals":"listServicePrincipals","list_sign_ins":"listSignIns","list_subscribed_skus":"listSubscribedSkus","list_user_app_role_assignments":"listUserAppRoleAssignments","list_user_devices":"listUserDevices","list_user_licenses":"listUserLicenses","list_user_memberships":"listUserMemberships","list_users":"listUsers","remove_directory_role_member":"removeDirectoryRoleMember","remove_group_member":"removeGroupMember","remove_user_app_role_assignment":"revokeAppRoleFromUser","reset_password":"resetPassword","revoke_sign_in_sessions":"revokeSignInSessions","set_password":"setPassword","update_group":"updateGroup","update_user":"updateUser"}},"microsoft_dataverse":{"namespace":"legacy.microsoftDataverse","methods":{"associate":"associateRecords","create_multiple":"createMultiple","create_record":"createRecord","delete_record":"deleteRecord","disassociate":"disassociateRecords","download_file":"downloadFile","execute_action":"executeAction","execute_function":"executeFunction","fetchxml_query":"fetchXmlQuery","get_entity_metadata":"getTableMetadata","get_record":"getRecord","list_records":"listRecords","search":"search","update_multiple":"updateMultiple","update_record":"updateRecord","upload_file":"uploadFile","upsert_record":"upsertRecord","whoami":"whoAmI"}},"microsoft_dataverse_v2":{"namespace":"microsoftDataverse","methods":{"associate":"associateRecords","create_multiple":"createMultiple","create_record":"createRecord","delete_record":"deleteRecord","disassociate":"disassociateRecords","download_file":"downloadFile","execute_action":"executeAction","execute_function":"executeFunction","fetchxml_query":"fetchXmlQuery","get_entity_metadata":"getTableMetadata","get_record":"getRecord","list_records":"listRecords","search":"search","update_multiple":"updateMultiple","update_record":"updateRecord","upload_file":"uploadFile","upsert_record":"upsertRecord","whoami":"whoAmI"}},"microsoft_dynamics_365":{"namespace":"microsoftDynamics365","methods":{"assign_record":"assignRecord","close_case":"closeCase","close_opportunity":"closeOpportunity","create_record":"createRecord","get_record":"getRecord","list_owners":"listOwners","list_records":"listRecords","qualify_lead":"qualifyLead","search_records":"searchRecords","update_record":"updateRecord"}},"microsoft_excel":{"namespace":"legacy.microsoftExcel","methods":{"clear_range":"clearRange","create_table":"createTable","delete_worksheet":"deleteWorksheet","format_range":"formatRange","read":"readData","sort_range":"sortRange","table_add":"addToTable","worksheet_add":"addWorksheet","write":"writeUpdateData"},"params":{"action":{"oauthCredential":"credential"}}},"microsoft_excel_v2":{"namespace":"microsoftExcel","methods":{"calculate":"calculateWorkbook","clear_range":"clearRange","close_session":"closeSession","create_session":"createSession","create_table":"createTable","delete_table":"deleteTable","delete_table_row":"deleteTableRow","delete_worksheet":"deleteWorksheet","format_range":"formatRange","get_table":"getTable","get_table_row":"getTableRow","get_worksheet":"getWorksheet","list_table_rows":"listTableRows","list_tables":"listTables","list_worksheets":"listWorksheets","read":"readData","refresh_session":"refreshSession","sort_range":"sortRange","table_add":"addTableRows","update_table":"updateTable","update_table_row":"updateTableRow","update_worksheet":"updateWorksheet","worksheet_add":"addWorksheet","write":"writeData"},"params":{"action":{"oauthCredential":"credential"}}},"microsoft_planner":{"namespace":"microsoftPlanner","methods":{"create_bucket":"createBucket","create_plan":"createPlan","create_task":"createTask","delete_bucket":"deleteBucket","delete_plan":"deletePlan","delete_task":"deleteTask","get_plan_details":"getPlanDetails","get_task_details":"getTaskDetails","list_buckets":"listBuckets","list_plans":"listPlans","read_bucket":"readBucket","read_plan":"readPlan","read_task":"readTask","update_bucket":"updateBucket","update_plan":"updatePlan","update_plan_details":"updatePlanDetails","update_task":"updateTask","update_task_details":"updateTaskDetails"},"params":{"action":{"oauthCredential":"credential"}}},"microsoft_teams":{"namespace":"microsoftTeams","methods":{"delete_channel_message":"deleteChannelMessage","delete_chat_message":"deleteChatMessage","get_message":"getMessage","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_chat_members":"listChatMembers","list_chats":"listChats","list_team_members":"listTeamMembers","list_teams":"listTeams","read_channel":"readChannelMessages","read_chat":"readChatMessages","reply_to_message":"replyToChannelMessage","set_reaction":"addReaction","unset_reaction":"removeReaction","update_channel_message":"updateChannelMessage","update_chat_message":"updateChatMessage","write_channel":"writeChannelMessage","write_chat":"writeChatMessage"},"triggers":{"microsoftteams_chat_subscription":"microsoftteamsChatSubscription","microsoftteams_webhook":"microsoftteamsWebhook"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"microsoft_word":{"namespace":"microsoftWord","methods":{"append":"appendContent","create":"createDocument","create_from_template":"createFromTemplate","export_pdf":"exportAsPdf","list":"listDocuments","read":"readDocument","replace_text":"findAndReplaceText","update":"replaceContent"},"params":{"action":{"oauthCredential":"credential"}}},"millionverifier":{"namespace":"millionverifier","methods":{"millionverifier_get_credits":"getRemainingCredits","millionverifier_verify_email":"verifyEmail"}},"mintlify":{"namespace":"mintlify","methods":{"create_agent_job":"createAgentJob","create_assistant_message":"askAssistant","detect_ai_prose":"detectAiSoundingProse","get_agent_job":"getAgentJob","get_assistant_caller_stats":"getAssistantCallerStats","get_assistant_conversations":"getAssistantConversations","get_feedback":"getFeedback","get_feedback_by_page":"getFeedbackByPage","get_page_content":"getPageContent","get_searches":"getSearchQueries","get_update_status":"getUpdateStatus","get_views":"getPageViews","get_visitors":"getUniqueVisitors","search":"searchDocumentation","send_agent_message":"sendAgentMessage","trigger_automation":"triggerAutomation","trigger_preview":"triggerPreviewDeployment","trigger_update":"triggerUpdate"}},"mistral_parse":{"namespace":"legacy.mistralParse"},"mistral_parse_v2":{"namespace":"legacy.mistralParseV2"},"mistral_parse_v3":{"namespace":"mistralParse"},"modal":{"namespace":"modal","methods":{"call_function":"callFunction","chat_completion":"chatCompletion","list_models":"listModels"}},"monaco":{"namespace":"monaco","methods":{"monaco_add_audience_contacts":"addContactsToAudience","monaco_add_campaign_audiences":"addAudiencesToCampaign","monaco_create_audience":"createAudience","monaco_create_contact":"createContact","monaco_create_opportunity":"createOpportunity","monaco_create_tag":"createTag","monaco_create_task":"createTask","monaco_delete_account":"deleteAccount","monaco_delete_contact":"deleteContact","monaco_delete_opportunity":"deleteOpportunity","monaco_enroll_campaign_contacts":"enrollContactsInCampaign","monaco_get_account":"getAccount","monaco_get_audience":"getAudience","monaco_get_campaign":"getCampaign","monaco_get_contact":"getContact","monaco_get_conversation":"getConversation","monaco_get_current_user":"getCurrentUser","monaco_get_field_schemas":"getFieldSchemas","monaco_get_meeting":"getMeeting","monaco_get_opportunity":"getOpportunity","monaco_get_sequence":"getSequence","monaco_get_task":"getTask","monaco_link_opportunity_contacts":"linkContactsToOpportunity","monaco_list_accounts":"listAccounts","monaco_list_audience_contacts":"listAudienceContacts","monaco_list_audiences":"listAudiences","monaco_list_campaigns":"listCampaigns","monaco_list_contacts":"listContacts","monaco_list_meetings":"listMeetings","monaco_list_messages":"listMessages","monaco_list_opportunities":"listOpportunities","monaco_list_opportunity_contacts":"listOpportunityContacts","monaco_list_pipelines":"listPipelines","monaco_list_sequences":"listSequences","monaco_list_tags":"listTags","monaco_list_tasks":"listTasks","monaco_list_users":"listUsers","monaco_remove_audience_contacts":"removeContactsFromAudience","monaco_unlink_opportunity_contacts":"unlinkContactsFromOpportunity","monaco_update_account":"updateAccount","monaco_update_contact":"updateContact","monaco_update_opportunity":"updateOpportunity","monaco_update_sequence":"updateSequence","monaco_update_task":"updateTask","monaco_upsert_account":"upsertAccount","monaco_upsert_contact":"upsertContact"},"params":{"action":{"oauthCredential":"credential"}}},"monday":{"namespace":"monday","methods":{"archive_item":"archiveItem","change_column_value":"changeColumnValue","create_board":"createBoard","create_column":"createColumn","create_group":"createGroup","create_item":"createItem","create_subitem":"createSubitem","create_update":"createUpdate","delete_item":"deleteItem","duplicate_item":"duplicateItem","get_board":"getBoard","get_groups":"getGroups","get_item":"getItem","get_items":"getItems","list_boards":"listBoards","move_item_to_group":"moveItemToGroup","search_items":"searchItems","update_item":"updateItem"},"triggers":{"monday_column_changed":"columnChanged","monday_item_archived":"itemArchived","monday_item_created":"itemCreated","monday_item_deleted":"itemDeleted","monday_item_moved":"itemMoved","monday_item_name_changed":"itemNameChanged","monday_status_changed":"statusChanged","monday_subitem_created":"subitemCreated","monday_update_created":"updateCreated"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"mongodb":{"namespace":"mongodb","methods":{"delete":"deleteDocuments","execute":"aggregatePipeline","insert":"insertDocuments","introspect":"introspectDatabase","query":"findDocuments","update":"updateDocuments"}},"mothership":{"namespace":"mothership"},"mssql":{"namespace":"legacy.mssql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"mssql_v2":{"namespace":"mssql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"mysql":{"namespace":"legacy.mysql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"mysql_v2":{"namespace":"mysql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"neo4j":{"namespace":"neo4j","methods":{"create":"createNodesRelationships","delete":"deleteNodesRelationships","execute":"executeCypher","introspect":"introspectSchema","merge":"mergeFindOrCreate","query":"queryMatch","update":"updatePropertiesSet"}},"netsuite":{"namespace":"netsuite","methods":{"netsuite_attach_record":"attachRecordOrFile","netsuite_batch_create_records":"batchCreateRecords","netsuite_batch_delete_records":"batchDeleteRecords","netsuite_batch_get_records":"batchGetRecords","netsuite_batch_update_records":"batchUpdateRecords","netsuite_batch_upsert_records":"batchUpsertRecords","netsuite_create_record":"createRecord","netsuite_delete_record":"deleteRecord","netsuite_detach_record":"detachRecordOrFile","netsuite_execute_action":"executeRecordAction","netsuite_execute_dataset":"executeSuiteAnalyticsDataset","netsuite_execute_suiteql":"executeSuiteQl","netsuite_get_async_result":"getAsyncOperationResult","netsuite_get_async_status":"getAsyncStatus","netsuite_get_governance_limits":"getGovernanceLimits","netsuite_get_record":"getRecord","netsuite_get_record_form":"getRecordForm","netsuite_get_record_metadata":"getRecordMetadata","netsuite_get_select_options":"getSelectOptions","netsuite_get_server_time":"getServerTime","netsuite_get_subresource":"getSubresource","netsuite_list_datasets":"listSuiteAnalyticsDatasets","netsuite_list_record_types":"listRecordTypes","netsuite_list_records":"listSearchRecords","netsuite_transform_record":"transformRecord","netsuite_update_record":"updateRecord","netsuite_upsert_record":"upsertRecord"},"params":{"action":{"oauthCredential":"credential"}}},"neverbounce":{"namespace":"neverbounce","methods":{"neverbounce_get_credits":"getRemainingCredits","neverbounce_verify_email":"verifyEmail"}},"new_relic":{"namespace":"legacy.newRelic","methods":{"new_relic_create_deployment_event":"createDeploymentEvent","new_relic_get_entity":"getEntity","new_relic_nrql_query":"runNrqlQuery","new_relic_search_entities":"searchEntities"}},"new_relic_v2":{"namespace":"newRelic","methods":{"new_relic_create_deployment_event":"createDeploymentEvent","new_relic_get_entity":"getEntity","new_relic_nrql_query":"runNrqlQuery","new_relic_search_entities":"searchEntities"},"params":{"action":{"oauthCredential":"credential"}}},"note":{"namespace":"note"},"notion":{"namespace":"legacy.notion","methods":{"notion_add_database_row":"addDatabaseRow","notion_append_blocks":"appendBlockChildren","notion_create_comment":"createComment","notion_create_database":"createDatabase","notion_create_page":"createPage","notion_delete_block":"deleteBlock","notion_list_comments":"listComments","notion_list_users":"listUsers","notion_query_database":"queryDatabase","notion_read":"readPage","notion_read_database":"readDatabase","notion_retrieve_block":"retrieveBlock","notion_retrieve_block_children":"retrieveBlockChildren","notion_retrieve_user":"retrieveUser","notion_search":"searchWorkspace","notion_update_block":"updateBlock","notion_update_page":"updatePageProperties","notion_write":"appendContent"},"params":{"action":{"oauthCredential":"credential"}}},"notion_v2":{"namespace":"notion","methods":{"notion_add_database_row":"addDatabaseRow","notion_append_blocks":"appendBlockChildren","notion_create_comment":"createComment","notion_create_database":"createDatabase","notion_create_page":"createPage","notion_delete_block":"deleteBlock","notion_list_comments":"listComments","notion_list_users":"listUsers","notion_query_database":"queryDatabase","notion_read":"readPage","notion_read_database":"readDatabase","notion_retrieve_block":"retrieveBlock","notion_retrieve_block_children":"retrieveBlockChildren","notion_retrieve_user":"retrieveUser","notion_search":"searchWorkspace","notion_update_block":"updateBlock","notion_update_page":"updatePageProperties","notion_write":"appendContent"},"triggers":{"notion_comment_created":"commentCreated","notion_database_created":"databaseCreated","notion_database_deleted":"databaseDeleted","notion_database_schema_updated":"databaseSchemaUpdated","notion_page_content_updated":"pageContentUpdated","notion_page_created":"pageCreated","notion_page_deleted":"pageDeleted","notion_page_properties_updated":"pagePropertiesUpdated","notion_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"obsidian":{"namespace":"obsidian","methods":{"append_active":"appendToActiveFile","append_note":"appendToNote","append_periodic_note":"appendToPeriodicNote","create_note":"createNote","delete_note":"deleteNote","execute_command":"executeCommand","get_active":"getActiveFile","get_note":"getNote","get_periodic_note":"getPeriodicNote","list_commands":"listCommands","list_files":"listFiles","open_file":"openFile","patch_active":"patchActiveFile","patch_note":"patchNote","search":"search"}},"okta":{"namespace":"legacy.okta","methods":{"okta_activate_group_rule":"activateGroupRule","okta_activate_user":"activateUser","okta_add_user_to_group":"addUserToGroup","okta_assign_group_to_app":"assignGroupToApplication","okta_assign_user_role":"assignUserRole","okta_assign_user_to_app":"assignUserToApplication","okta_clear_user_sessions":"clearUserSessions","okta_create_group":"createGroup","okta_create_group_rule":"createGroupRule","okta_create_user":"createUser","okta_deactivate_group_rule":"deactivateGroupRule","okta_deactivate_user":"deactivateUser","okta_delete_group":"deleteGroup","okta_delete_group_rule":"deleteGroupRule","okta_delete_user":"deleteUser","okta_enroll_factor":"enrollFactor","okta_get_app":"getApplication","okta_get_factor":"getFactor","okta_get_group":"getGroup","okta_get_group_rule":"getGroupRule","okta_get_logs":"getSystemLogEvents","okta_get_session":"getSession","okta_get_user":"getUser","okta_list_app_groups":"listApplicationGroups","okta_list_app_users":"listApplicationUsers","okta_list_apps":"listApplications","okta_list_factors":"listFactors","okta_list_group_members":"listGroupMembers","okta_list_group_rules":"listGroupRules","okta_list_groups":"listGroups","okta_list_user_roles":"listUserRoles","okta_list_users":"listUsers","okta_remove_group_from_app":"removeGroupFromApplication","okta_remove_user_from_app":"removeUserFromApplication","okta_remove_user_from_group":"removeUserFromGroup","okta_remove_user_role":"removeUserRole","okta_reset_all_factors":"resetAllFactors","okta_reset_factor":"resetFactor","okta_reset_password":"resetPassword","okta_revoke_session":"revokeSession","okta_suspend_user":"suspendUser","okta_unsuspend_user":"unsuspendUser","okta_update_group":"updateGroup","okta_update_user":"updateUser"}},"okta_v2":{"namespace":"okta","methods":{"okta_activate_group_rule":"activateGroupRule","okta_activate_user":"activateUser","okta_add_user_to_group":"addUserToGroup","okta_assign_group_to_app":"assignGroupToApplication","okta_assign_user_role":"assignUserRole","okta_assign_user_to_app":"assignUserToApplication","okta_clear_user_sessions":"clearUserSessions","okta_create_group":"createGroup","okta_create_group_rule":"createGroupRule","okta_create_user":"createUser","okta_deactivate_group_rule":"deactivateGroupRule","okta_deactivate_user":"deactivateUser","okta_delete_group":"deleteGroup","okta_delete_group_rule":"deleteGroupRule","okta_delete_user":"deleteUser","okta_enroll_factor":"enrollFactor","okta_get_app":"getApplication","okta_get_factor":"getFactor","okta_get_group":"getGroup","okta_get_group_rule":"getGroupRule","okta_get_logs":"getSystemLogEvents","okta_get_session":"getSession","okta_get_user":"getUser","okta_list_app_groups":"listApplicationGroups","okta_list_app_users":"listApplicationUsers","okta_list_apps":"listApplications","okta_list_factors":"listFactors","okta_list_group_members":"listGroupMembers","okta_list_group_rules":"listGroupRules","okta_list_groups":"listGroups","okta_list_user_roles":"listUserRoles","okta_list_users":"listUsers","okta_remove_group_from_app":"removeGroupFromApplication","okta_remove_user_from_app":"removeUserFromApplication","okta_remove_user_from_group":"removeUserFromGroup","okta_remove_user_role":"removeUserRole","okta_reset_all_factors":"resetAllFactors","okta_reset_factor":"resetFactor","okta_reset_password":"resetPassword","okta_revoke_session":"revokeSession","okta_suspend_user":"suspendUser","okta_unsuspend_user":"unsuspendUser","okta_update_group":"updateGroup","okta_update_user":"updateUser"},"params":{"action":{"oauthCredential":"credential"}}},"onedrive":{"namespace":"onedrive","methods":{"copy":"copyFile","create_file":"createFile","create_folder":"createFolder","create_share_link":"createSharingLink","delete":"deleteFile","download":"downloadFile","get_drive_info":"getDriveInfo","get_item":"getItemInfo","list":"listFiles","move":"moveRenameFile","search":"searchFiles","upload":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"onepassword":{"namespace":"onepassword","methods":{"create_item":"createItem","delete_item":"deleteItem","get_item":"getItem","get_item_file":"getItemFile","get_vault":"getVault","list_items":"listItems","list_vaults":"listVaults","replace_item":"replaceItem","resolve_secret":"resolveSecret","update_item":"updateItem"}},"openai":{"namespace":"legacy.openai"},"oracle_fusion_financials":{"namespace":"oracleFusionFinancials","methods":{"oracle_fusion_financials_apply_receivables_receipt":"applyReceivablesReceipt","oracle_fusion_financials_approve_receivables_invoice":"approveReceivablesInvoice","oracle_fusion_financials_create_expense_line":"createExpenseLine","oracle_fusion_financials_create_expense_report":"createExpenseReport","oracle_fusion_financials_create_receivables_credit_memo":"createReceivablesCreditMemo","oracle_fusion_financials_create_receivables_invoice":"createReceivablesInvoice","oracle_fusion_financials_create_receivables_receipt":"createReceivablesReceipt","oracle_fusion_financials_get_expense_line":"getExpenseLine","oracle_fusion_financials_get_expense_report":"getExpenseReport","oracle_fusion_financials_get_gl_journal_batch":"getGlJournalBatch","oracle_fusion_financials_get_gl_ledger":"getGlLedger","oracle_fusion_financials_get_payables_invoice":"getPayablesInvoice","oracle_fusion_financials_get_payables_invoice_line":"getPayablesInvoiceLine","oracle_fusion_financials_get_payables_payment":"getPayablesPayment","oracle_fusion_financials_get_receivables_credit_memo":"getReceivablesCreditMemo","oracle_fusion_financials_get_receivables_invoice":"getReceivablesInvoice","oracle_fusion_financials_get_receivables_invoice_installment":"getReceivablesInvoiceInstallment","oracle_fusion_financials_get_receivables_invoice_line":"getReceivablesInvoiceLine","oracle_fusion_financials_get_receivables_receipt":"getReceivablesReceipt","oracle_fusion_financials_list_expense_lines":"listExpenseLines","oracle_fusion_financials_list_expense_reports":"listExpenseReports","oracle_fusion_financials_list_gl_balances":"listGlBalances","oracle_fusion_financials_list_gl_journal_batches":"listGlJournalBatches","oracle_fusion_financials_list_gl_ledgers":"listGlLedgers","oracle_fusion_financials_list_payables_invoice_lines":"listPayablesInvoiceLines","oracle_fusion_financials_list_payables_invoices":"listPayablesInvoices","oracle_fusion_financials_list_payables_payments":"listPayablesPayments","oracle_fusion_financials_list_receivables_credit_memos":"listReceivablesCreditMemos","oracle_fusion_financials_list_receivables_invoice_installments":"listReceivablesInvoiceInstallments","oracle_fusion_financials_list_receivables_invoice_lines":"listReceivablesInvoiceLines","oracle_fusion_financials_list_receivables_invoices":"listReceivablesInvoices","oracle_fusion_financials_list_receivables_receipts":"listReceivablesReceipts","oracle_fusion_financials_submit_expense_report":"submitExpenseReport","oracle_fusion_financials_update_expense_line":"updateExpenseLine","oracle_fusion_financials_update_expense_report":"updateExpenseReport","oracle_fusion_financials_update_receivables_invoice":"updateReceivablesInvoice"},"params":{"action":{"oauthCredential":"credential"}}},"oracledb":{"namespace":"oracledb","methods":{"delete":"deleteData","execute":"executeSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"otter":{"namespace":"legacy.otter","methods":{"create_conversation":"importRecording","get_conversation":"getConversation","get_conversation_audio":"getConversationAudio","get_workspace":"getWorkspace","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_conversations":"listConversations","list_workspace_conversations":"listWorkspaceConversations"},"triggers":{"otter_conversation_completed":"conversationCompleted","otter_conversation_shared":"conversationShared","otter_webhook":"webhook"}},"otter_v2":{"namespace":"otter","methods":{"create_conversation":"importRecording","get_conversation":"getConversation","get_conversation_audio":"getConversationAudio","get_workspace":"getWorkspace","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_conversations":"listConversations","list_workspace_conversations":"listWorkspaceConversations"},"triggers":{"otter_conversation_completed":"conversationCompleted","otter_conversation_shared":"conversationShared","otter_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"outlook":{"namespace":"outlook","methods":{"copy_outlook":"copyEmail","create_event_calendar":"createEvent","create_folder_outlook":"createFolder","delete_event_calendar":"deleteEvent","delete_outlook":"deleteEmail","draft_outlook":"draftEmail","forward_outlook":"forwardEmail","get_attachment_outlook":"getAttachment","get_event_calendar":"getCalendarEvent","list_attachments_outlook":"listAttachments","list_events_calendar":"listCalendarEvents","list_folders_outlook":"listFolders","mark_read_outlook":"markAsRead","mark_unread_outlook":"markAsUnread","move_outlook":"moveEmail","read_outlook":"readEmail","reply_all_outlook":"replyAll","reply_outlook":"replyToEmail","respond_calendar":"respondToInvite","search_outlook":"searchEmail","send_outlook":"sendEmail","update_event_calendar":"updateEvent","update_message_outlook":"setCategoriesFlag"},"triggers":{"outlook_poller":"poller"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"pagerduty":{"namespace":"legacy.pagerduty","methods":{"add_note":"addNote","create_incident":"createIncident","get_incident":"getIncident","get_service":"getService","list_escalation_policies":"listEscalationPolicies","list_incident_alerts":"listIncidentAlerts","list_incidents":"listIncidents","list_oncalls":"listOnCalls","list_schedules":"listSchedules","list_services":"listServices","list_users":"listUsers","merge_incidents":"mergeIncidents","send_event":"sendEvent","snooze_incident":"snoozeIncident","update_incident":"updateIncident"},"triggers":{"pagerduty_incident_acknowledged":"incidentAcknowledged","pagerduty_incident_escalated":"incidentEscalated","pagerduty_incident_reassigned":"incidentReassigned","pagerduty_incident_resolved":"incidentResolved","pagerduty_incident_triggered":"incidentTriggered","pagerduty_webhook":"webhook"}},"pagerduty_v2":{"namespace":"pagerduty","methods":{"add_note":"addNote","create_incident":"createIncident","get_incident":"getIncident","get_service":"getService","list_escalation_policies":"listEscalationPolicies","list_incident_alerts":"listIncidentAlerts","list_incidents":"listIncidents","list_oncalls":"listOnCalls","list_schedules":"listSchedules","list_services":"listServices","list_users":"listUsers","merge_incidents":"mergeIncidents","send_event":"sendEvent","snooze_incident":"snoozeIncident","update_incident":"updateIncident"},"triggers":{"pagerduty_incident_acknowledged":"incidentAcknowledged","pagerduty_incident_escalated":"incidentEscalated","pagerduty_incident_reassigned":"incidentReassigned","pagerduty_incident_resolved":"incidentResolved","pagerduty_incident_triggered":"incidentTriggered","pagerduty_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"parallel_ai":{"namespace":"parallelAi","methods":{"deep_research":"deepResearch","extract":"extractFromUrls","search":"search"}},"peopledatalabs":{"namespace":"peopledatalabs","methods":{"pdl_autocomplete":"autocomplete","pdl_bulk_company_enrich":"bulkCompanyEnrich","pdl_bulk_person_enrich":"bulkPersonEnrich","pdl_clean_company":"companyCleaner","pdl_clean_location":"locationCleaner","pdl_clean_school":"schoolCleaner","pdl_company_enrich":"companyEnrich","pdl_company_search":"companySearch","pdl_person_enrich":"personEnrich","pdl_person_identify":"personIdentify","pdl_person_search":"personSearch"}},"perplexity":{"namespace":"perplexity","methods":{"perplexity_chat":"chat","perplexity_search":"search"}},"persona":{"namespace":"legacy.persona","methods":{"approve_inquiry":"approveInquiry","create_account":"createAccount","create_inquiry":"createInquiry","create_report":"createReport","decline_inquiry":"declineInquiry","expire_inquiry":"expireInquiry","generate_inquiry_link":"generateInquiryLink","get_account":"getAccount","get_case":"getCase","get_document":"getDocument","get_inquiry":"getInquiry","get_report":"getReport","get_verification":"getVerification","import_accounts":"importAccountsCsv","list_accounts":"listAccounts","list_cases":"listCases","list_inquiries":"listInquiries","list_inquiry_templates":"listInquiryTemplates","list_reports":"listReports","mark_inquiry_for_review":"markInquiryForReview","print_inquiry_pdf":"printInquiryPdf","redact_account":"redactAccount","redact_inquiry":"redactInquiry","resume_inquiry":"resumeInquiry","update_account":"updateAccount","update_inquiry":"updateInquiry"}},"persona_v2":{"namespace":"persona","methods":{"approve_inquiry":"approveInquiry","create_account":"createAccount","create_inquiry":"createInquiry","create_report":"createReport","decline_inquiry":"declineInquiry","expire_inquiry":"expireInquiry","generate_inquiry_link":"generateInquiryLink","get_account":"getAccount","get_case":"getCase","get_document":"getDocument","get_inquiry":"getInquiry","get_report":"getReport","get_verification":"getVerification","import_accounts":"importAccountsCsv","list_accounts":"listAccounts","list_cases":"listCases","list_inquiries":"listInquiries","list_inquiry_templates":"listInquiryTemplates","list_reports":"listReports","mark_inquiry_for_review":"markInquiryForReview","print_inquiry_pdf":"printInquiryPdf","redact_account":"redactAccount","redact_inquiry":"redactInquiry","resume_inquiry":"resumeInquiry","update_account":"updateAccount","update_inquiry":"updateInquiry"},"params":{"action":{"oauthCredential":"credential"}}},"pi":{"namespace":"pi"},"pinecone":{"namespace":"pinecone","methods":{"delete_vectors":"deleteVectors","describe_index":"describeIndex","describe_index_stats":"describeIndexStats","fetch":"fetchVectors","generate":"generateEmbeddings","list_indexes":"listIndexes","list_vector_ids":"listVectorIds","search_text":"searchWithText","search_vector":"searchWithVector","update_vector":"updateVector","upsert_text":"upsertText"}},"pipedrive":{"namespace":"pipedrive","methods":{"create_activity":"createActivity","create_deal":"createDeal","create_lead":"createLead","create_project":"createProject","delete_lead":"deleteLead","get_activities":"getActivities","get_all_deals":"getAllDeals","get_deal":"getDeal","get_files":"getFiles","get_leads":"getLeads","get_mail_messages":"getMailThreads","get_mail_thread":"getMailThreadMessages","get_pipeline_deals":"getPipelineDeals","get_pipelines":"getPipelines","get_projects":"getProjects","update_activity":"updateActivity","update_deal":"updateDeal","update_lead":"updateLead"},"params":{"action":{"oauthCredential":"credential"}}},"pitchbook":{"namespace":"pitchbook","methods":{"company_active_investors":"getCompanyActiveInvestors","company_bio":"getCompanyBio","company_deal_service_providers":"getCompanyDealServiceProviders","company_deals":"getCompanyDeals","company_financials":"getCompanyFinancialsHistory","company_general_service_providers":"getCompanyServiceProviders","company_industries":"getCompanyIndustries","company_investors":"getCompanyInvestors","company_most_recent_debt_financing":"getCompanyLatestDebtFinancing","company_most_recent_financials":"getCompanyLatestFinancials","company_most_recent_financing":"getCompanyLatestFinancing","company_search":"searchCompanies","company_similar_companies":"getSimilarCompanies","company_social_analytics":"getCompanySocialAnalytics","company_updates":"getCompanyUpdates","company_vc_exit_predictions":"getVcExitPredictions","contracts_history":"getContractsHistory","cost_of_calls":"getCostOfCalls","credit_history":"getCreditHistory","credit_news":"getCreditNewsArticle","credit_news_bulk":"getCreditNewsArticlesInBulk","credit_news_most_recent":"getRecentCreditNews","credit_news_search":"searchCreditNews","deal_bio":"getDealBio","deal_cap_table_history":"getDealCapTable","deal_debt_lenders":"getDealDebtAndLenders","deal_detailed":"getDealDetail","deal_investors":"getDealInvestors","deal_multiples":"getDealMultiples","deal_search":"searchDeals","deal_service_providers":"getDealServiceProviders","deal_stock_info":"getDealStockInfo","deal_tranche_info":"getDealTranches","deal_updates":"getDealUpdates","deal_valuation":"getDealValuation","entity_affiliates":"getEntityAffiliates","entity_locations":"getEntityLocations","entity_news":"getEntityNews","entity_people":"getEntityPeople","entity_updates":"getEntityUpdates","fund_active_investments":"getFundActiveInvestments","fund_benchmark":"getFundBenchmark","fund_bio":"getFundBio","fund_cash_flows":"getFundCashFlows","fund_commitments":"getFundCommitments","fund_investment_preferences":"getFundPreferences","fund_investments":"getFundInvestments","fund_performance":"getFundPerformance","fund_search":"searchFunds","fund_team":"getFundTeam","fund_updates":"getFundUpdates","investor_active_investments":"getInvestorActiveInvestments","investor_bio":"getInvestorBio","investor_board_seats":"getInvestorBoardSeats","investor_deal_service_providers":"getInvestorDealServiceProviders","investor_funds":"getInvestorFunds","investor_general_service_providers":"getInvestorServiceProviders","investor_investments":"getInvestorInvestments","investor_last_closed_fund":"getInvestorLastClosedFund","investor_preferences":"getInvestorPreferences","investor_search":"searchInvestors","investor_updates":"getInvestorUpdates","limited_partner_actual_allocations":"getLpActualAllocations","limited_partner_bio":"getLimitedPartnerBio","limited_partner_commitment_aggregates":"getLpCommitmentTotals","limited_partner_commitment_preferences":"getLpCommitmentPreferences","limited_partner_commitments_detailed":"getLpCommitments","limited_partner_search":"searchLimitedPartners","limited_partner_service_providers":"getLpServiceProviders","limited_partner_target_allocations":"getLpTargetAllocations","limited_partner_updates":"getLpUpdates","lookup_table_structure":"listLookupTables","lookup_tables":"getLookupTableCodes","patent_detailed":"getPatentDetail","patent_search":"searchCompanyPatents","people_search":"searchPeople","person_bio":"getPersonBio","person_contact":"getPersonContact","person_education_work":"getPersonHistory","sandbox_entities":"listSandboxEntities","search":"searchAllEntities","service_provider_bio":"getServiceProviderBio","service_provider_search":"searchServiceProviders","service_provider_updates":"getServiceProviderUpdates","serviced_companies":"getServicedCompanies","serviced_deals":"getServicedDeals","serviced_funds":"getServicedFunds","serviced_investors":"getServicedInvestors","serviced_limited_partners":"getServicedLimitedPartners","shared_search":"sharedSearch","usage_report":"getUsageReport"}},"plane":{"namespace":"legacy.plane","methods":{"plane_archive_project":"archiveAProject","plane_archive_work_item":"archiveAWorkItem","plane_confirm_attachment_upload":"confirmAWorkItemAttachmentUpload","plane_create_attachment_upload":"createAWorkItemAttachmentUpload","plane_create_comment":"createAComment","plane_create_cycle":"createACycle","plane_create_label":"createALabel","plane_create_link":"createALink","plane_create_module":"createAModule","plane_create_project":"createAProject","plane_create_project_page":"createAProjectPage","plane_create_state":"createAState","plane_create_webhook":"createAWebhook","plane_create_work_item":"createAWorkItem","plane_delete_attachment":"deleteAnAttachment","plane_delete_comment":"deleteAComment","plane_delete_cycle":"deleteACycle","plane_delete_label":"deleteALabel","plane_delete_link":"deleteALink","plane_delete_module":"deleteAModule","plane_delete_project":"deleteAProject","plane_delete_project_page":"deleteAProjectPage","plane_delete_state":"deleteAState","plane_delete_webhook":"deleteAWebhook","plane_delete_work_item":"deleteAWorkItem","plane_get_attachment":"getAnAttachment","plane_get_comment":"getAComment","plane_get_current_user":"getCurrentUser","plane_get_cycle":"getACycle","plane_get_label":"getALabel","plane_get_link":"getALink","plane_get_module":"getAModule","plane_get_project":"getAProject","plane_get_project_page":"getAProjectPage","plane_get_project_summary":"getAProjectSummary","plane_get_state":"getAState","plane_get_webhook":"getAWebhook","plane_get_work_item":"getAWorkItem","plane_get_work_item_by_identifier":"getAWorkItemByIdentifier","plane_list_attachments":"listAttachments","plane_list_comments":"listComments","plane_list_cycles":"listCycles","plane_list_labels":"listLabels","plane_list_links":"listLinks","plane_list_modules":"listModules","plane_list_project_pages":"listProjectPages","plane_list_projects":"listProjects","plane_list_states":"listStates","plane_list_webhooks":"listWebhooks","plane_list_work_items":"listWorkItems","plane_list_workspace_work_items":"listWorkItemsAcrossAWorkspace","plane_manage_cycle_work_items":"addOrRemoveCycleWorkItems","plane_manage_module_work_items":"addOrRemoveModuleWorkItems","plane_regenerate_webhook_secret":"regenerateAWebhookSecret","plane_transfer_cycle_work_items":"transferWorkItemsBetweenCycles","plane_unarchive_project":"unarchiveAProject","plane_unarchive_work_item":"unarchiveAWorkItem","plane_update_comment":"updateAComment","plane_update_cycle":"updateACycle","plane_update_label":"updateALabel","plane_update_link":"updateALink","plane_update_module":"updateAModule","plane_update_project":"updateAProject","plane_update_project_page":"updateAProjectPage","plane_update_state":"updateAState","plane_update_webhook":"updateAWebhook","plane_update_work_item":"updateAWorkItem"},"triggers":{"plane_cycle_archived":"cycleArchived","plane_cycle_created":"cycleCreated","plane_cycle_deleted":"cycleDeleted","plane_cycle_updated":"cycleUpdated","plane_milestone_created":"milestoneCreated","plane_milestone_deleted":"milestoneDeleted","plane_milestone_updated":"milestoneUpdated","plane_module_archived":"moduleArchived","plane_module_created":"moduleCreated","plane_module_deleted":"moduleDeleted","plane_module_updated":"moduleUpdated","plane_page_archived":"pageArchived","plane_page_comment_created":"pageCommentCreated","plane_page_comment_deleted":"pageCommentDeleted","plane_page_comment_updated":"pageCommentUpdated","plane_page_created":"pageCreated","plane_page_deleted":"pageDeleted","plane_page_updated":"pageUpdated","plane_project_archived":"projectArchived","plane_project_created":"projectCreated","plane_project_deleted":"projectDeleted","plane_project_updated":"projectUpdated","plane_webhook":"webhook","plane_workitem_archived":"workitemArchived","plane_workitem_attachment_created":"workitemAttachmentCreated","plane_workitem_attachment_deleted":"workitemAttachmentDeleted","plane_workitem_attachment_updated":"workitemAttachmentUpdated","plane_workitem_comment_created":"workitemCommentCreated","plane_workitem_comment_deleted":"workitemCommentDeleted","plane_workitem_comment_updated":"workitemCommentUpdated","plane_workitem_created":"workitemCreated","plane_workitem_deleted":"workitemDeleted","plane_workitem_dependency_created":"workitemDependencyCreated","plane_workitem_dependency_deleted":"workitemDependencyDeleted","plane_workitem_link_created":"workitemLinkCreated","plane_workitem_link_deleted":"workitemLinkDeleted","plane_workitem_link_updated":"workitemLinkUpdated","plane_workitem_page_link_created":"workitemPageLinkCreated","plane_workitem_page_link_deleted":"workitemPageLinkDeleted","plane_workitem_relation_created":"workitemRelationCreated","plane_workitem_relation_deleted":"workitemRelationDeleted","plane_workitem_updated":"workitemUpdated","plane_workitem_vote_created":"workitemVoteCreated","plane_workitem_vote_deleted":"workitemVoteDeleted"}},"plane_v2":{"namespace":"plane","methods":{"plane_archive_project":"archiveAProject","plane_archive_work_item":"archiveAWorkItem","plane_confirm_attachment_upload":"confirmAWorkItemAttachmentUpload","plane_create_attachment_upload":"createAWorkItemAttachmentUpload","plane_create_comment":"createAComment","plane_create_cycle":"createACycle","plane_create_label":"createALabel","plane_create_link":"createALink","plane_create_module":"createAModule","plane_create_project":"createAProject","plane_create_project_page":"createAProjectPage","plane_create_state":"createAState","plane_create_webhook":"createAWebhook","plane_create_work_item":"createAWorkItem","plane_delete_attachment":"deleteAnAttachment","plane_delete_comment":"deleteAComment","plane_delete_cycle":"deleteACycle","plane_delete_label":"deleteALabel","plane_delete_link":"deleteALink","plane_delete_module":"deleteAModule","plane_delete_project":"deleteAProject","plane_delete_project_page":"deleteAProjectPage","plane_delete_state":"deleteAState","plane_delete_webhook":"deleteAWebhook","plane_delete_work_item":"deleteAWorkItem","plane_get_attachment":"getAnAttachment","plane_get_comment":"getAComment","plane_get_current_user":"getCurrentUser","plane_get_cycle":"getACycle","plane_get_label":"getALabel","plane_get_link":"getALink","plane_get_module":"getAModule","plane_get_project":"getAProject","plane_get_project_page":"getAProjectPage","plane_get_project_summary":"getAProjectSummary","plane_get_state":"getAState","plane_get_webhook":"getAWebhook","plane_get_work_item":"getAWorkItem","plane_get_work_item_by_identifier":"getAWorkItemByIdentifier","plane_list_attachments":"listAttachments","plane_list_comments":"listComments","plane_list_cycles":"listCycles","plane_list_labels":"listLabels","plane_list_links":"listLinks","plane_list_modules":"listModules","plane_list_project_pages":"listProjectPages","plane_list_projects":"listProjects","plane_list_states":"listStates","plane_list_webhooks":"listWebhooks","plane_list_work_items":"listWorkItems","plane_list_workspace_work_items":"listWorkItemsAcrossAWorkspace","plane_manage_cycle_work_items":"addOrRemoveCycleWorkItems","plane_manage_module_work_items":"addOrRemoveModuleWorkItems","plane_regenerate_webhook_secret":"regenerateAWebhookSecret","plane_transfer_cycle_work_items":"transferWorkItemsBetweenCycles","plane_unarchive_project":"unarchiveAProject","plane_unarchive_work_item":"unarchiveAWorkItem","plane_update_comment":"updateAComment","plane_update_cycle":"updateACycle","plane_update_label":"updateALabel","plane_update_link":"updateALink","plane_update_module":"updateAModule","plane_update_project":"updateAProject","plane_update_project_page":"updateAProjectPage","plane_update_state":"updateAState","plane_update_webhook":"updateAWebhook","plane_update_work_item":"updateAWorkItem"},"triggers":{"plane_cycle_archived":"cycleArchived","plane_cycle_created":"cycleCreated","plane_cycle_deleted":"cycleDeleted","plane_cycle_updated":"cycleUpdated","plane_milestone_created":"milestoneCreated","plane_milestone_deleted":"milestoneDeleted","plane_milestone_updated":"milestoneUpdated","plane_module_archived":"moduleArchived","plane_module_created":"moduleCreated","plane_module_deleted":"moduleDeleted","plane_module_updated":"moduleUpdated","plane_page_archived":"pageArchived","plane_page_comment_created":"pageCommentCreated","plane_page_comment_deleted":"pageCommentDeleted","plane_page_comment_updated":"pageCommentUpdated","plane_page_created":"pageCreated","plane_page_deleted":"pageDeleted","plane_page_updated":"pageUpdated","plane_project_archived":"projectArchived","plane_project_created":"projectCreated","plane_project_deleted":"projectDeleted","plane_project_updated":"projectUpdated","plane_webhook":"webhook","plane_workitem_archived":"workitemArchived","plane_workitem_attachment_created":"workitemAttachmentCreated","plane_workitem_attachment_deleted":"workitemAttachmentDeleted","plane_workitem_attachment_updated":"workitemAttachmentUpdated","plane_workitem_comment_created":"workitemCommentCreated","plane_workitem_comment_deleted":"workitemCommentDeleted","plane_workitem_comment_updated":"workitemCommentUpdated","plane_workitem_created":"workitemCreated","plane_workitem_deleted":"workitemDeleted","plane_workitem_dependency_created":"workitemDependencyCreated","plane_workitem_dependency_deleted":"workitemDependencyDeleted","plane_workitem_link_created":"workitemLinkCreated","plane_workitem_link_deleted":"workitemLinkDeleted","plane_workitem_link_updated":"workitemLinkUpdated","plane_workitem_page_link_created":"workitemPageLinkCreated","plane_workitem_page_link_deleted":"workitemPageLinkDeleted","plane_workitem_relation_created":"workitemRelationCreated","plane_workitem_relation_deleted":"workitemRelationDeleted","plane_workitem_updated":"workitemUpdated","plane_workitem_vote_created":"workitemVoteCreated","plane_workitem_vote_deleted":"workitemVoteDeleted"},"params":{"action":{"oauthCredential":"credential"}}},"planetscale":{"namespace":"legacy.planetscale","methods":{"close_deploy_request":"closeDeployRequestVitess","create_backup":"createBackup","create_branch":"createBranch","create_deploy_request":"createDeployRequestVitess","delete_branch":"deleteBranch","get_backup":"getBackup","get_branch":"getBranch","get_database":"getDatabase","get_deploy_request":"getDeployRequestVitess","list_backups":"listBackups","list_branches":"listBranches","list_databases":"listDatabases","list_deploy_requests":"listDeployRequestsVitess","queue_deploy_request":"queueDeployRequestVitess","review_deploy_request":"reviewDeployRequestVitess"}},"planetscale_v2":{"namespace":"planetscale","methods":{"close_deploy_request":"closeDeployRequestVitess","create_backup":"createBackup","create_branch":"createBranch","create_deploy_request":"createDeployRequestVitess","delete_branch":"deleteBranch","get_backup":"getBackup","get_branch":"getBranch","get_database":"getDatabase","get_deploy_request":"getDeployRequestVitess","list_backups":"listBackups","list_branches":"listBranches","list_databases":"listDatabases","list_deploy_requests":"listDeployRequestsVitess","queue_deploy_request":"queueDeployRequestVitess","review_deploy_request":"reviewDeployRequestVitess"},"params":{"action":{"oauthCredential":"credential"}}},"polymarket":{"namespace":"polymarket","methods":{"get_activity":"getActivity","get_event":"getEvent","get_events":"getEvents","get_holders":"getMarketHolders","get_last_trade_price":"getLastTradePrice","get_leaderboard":"getLeaderboard","get_market":"getMarket","get_markets":"getMarkets","get_midpoint":"getMidpoint","get_orderbook":"getOrderbook","get_positions":"getPositions","get_price":"getPrice","get_price_history":"getPriceHistory","get_series":"getSeries","get_series_by_id":"getSeriesById","get_spread":"getSpread","get_tags":"getTags","get_tick_size":"getTickSize","get_trades":"getTrades","search":"search"}},"postgresql":{"namespace":"legacy.postgresql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"postgresql_v2":{"namespace":"postgresql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"posthog":{"namespace":"posthog","methods":{"posthog_batch_events":"batchEvents","posthog_capture_event":"captureEvent","posthog_create_annotation":"createAnnotation","posthog_create_cohort":"createCohort","posthog_create_dashboard":"createDashboard","posthog_create_experiment":"createExperiment","posthog_create_feature_flag":"createFeatureFlag","posthog_create_insight":"createInsight","posthog_create_survey":"createSurvey","posthog_delete_feature_flag":"deleteFeatureFlag","posthog_delete_person":"deletePerson","posthog_delete_survey":"deleteSurvey","posthog_evaluate_flags":"evaluateFlags","posthog_get_cohort":"getCohort","posthog_get_dashboard":"getDashboard","posthog_get_event_definition":"getEventDefinition","posthog_get_experiment":"getExperiment","posthog_get_feature_flag":"getFeatureFlag","posthog_get_insight":"getInsight","posthog_get_organization":"getOrganization","posthog_get_person":"getPerson","posthog_get_project":"getProject","posthog_get_property_definition":"getPropertyDefinition","posthog_get_session_recording":"getSessionRecording","posthog_get_survey":"getSurvey","posthog_list_actions":"listActions","posthog_list_annotations":"listAnnotations","posthog_list_cohorts":"listCohorts","posthog_list_dashboards":"listDashboards","posthog_list_event_definitions":"listEventDefinitions","posthog_list_experiments":"listExperiments","posthog_list_feature_flags":"listFeatureFlags","posthog_list_insights":"listInsights","posthog_list_organizations":"listOrganizations","posthog_list_persons":"listPersons","posthog_list_projects":"listProjects","posthog_list_property_definitions":"listPropertyDefinitions","posthog_list_recording_playlists":"listRecordingPlaylists","posthog_list_session_recordings":"listSessionRecordings","posthog_list_surveys":"listSurveys","posthog_query":"runQueryHogQl","posthog_update_cohort":"updateCohort","posthog_update_event_definition":"updateEventDefinition","posthog_update_experiment":"updateExperiment","posthog_update_feature_flag":"updateFeatureFlag","posthog_update_insight":"updateInsight","posthog_update_property_definition":"updatePropertyDefinition","posthog_update_survey":"updateSurvey"}},"powerbi":{"namespace":"powerbi","methods":{"powerbi_execute_query":"executeDaxQuery","powerbi_get_dataset":"getSemanticModel","powerbi_get_refresh_history":"getRefreshHistory","powerbi_get_report":"getReport","powerbi_list_datasets":"listSemanticModels","powerbi_list_reports":"listReports","powerbi_list_workspaces":"listWorkspaces","powerbi_refresh_dataset":"refreshSemanticModel"},"params":{"action":{"oauthCredential":"credential"}}},"profound":{"namespace":"legacy.profound","methods":{"bot_logs":"botLogs","bots_report":"botsReport","category_assets":"categoryAssets","category_personas":"categoryPersonas","category_prompts":"categoryPrompts","category_tags":"categoryTags","category_topics":"categoryTopics","citation_prompts":"citationPrompts","citations_report":"citationsReport","list_assets":"listAssets","list_categories":"listCategories","list_domains":"listDomains","list_models":"listModels","list_optimizations":"listOptimizations","list_personas":"listPersonas","list_regions":"listRegions","optimization_analysis":"optimizationAnalysis","prompt_answers":"promptAnswers","prompt_volume":"promptVolume","query_fanouts":"queryFanouts","raw_logs":"rawLogs","referrals_report":"referralsReport","sentiment_report":"sentimentReport","visibility_report":"visibilityReport"}},"profound_v2":{"namespace":"profound","methods":{"bot_logs":"botLogs","bots_report":"botsReport","category_assets":"categoryAssets","category_personas":"categoryPersonas","category_prompts":"categoryPrompts","category_tags":"categoryTags","category_topics":"categoryTopics","citation_prompts":"citationPrompts","citations_report":"citationsReport","list_assets":"listAssets","list_categories":"listCategories","list_domains":"listDomains","list_models":"listModels","list_optimizations":"listOptimizations","list_personas":"listPersonas","list_regions":"listRegions","optimization_analysis":"optimizationAnalysis","prompt_answers":"promptAnswers","prompt_volume":"promptVolume","query_fanouts":"queryFanouts","raw_logs":"rawLogs","referrals_report":"referralsReport","sentiment_report":"sentimentReport","visibility_report":"visibilityReport"},"params":{"action":{"oauthCredential":"credential"}}},"prospeo":{"namespace":"prospeo","methods":{"prospeo_account_information":"accountInformation","prospeo_bulk_enrich_company":"bulkEnrichCompany","prospeo_bulk_enrich_person":"bulkEnrichPerson","prospeo_enrich_company":"enrichCompany","prospeo_enrich_person":"enrichPerson","prospeo_search_company":"searchCompany","prospeo_search_person":"searchPerson","prospeo_search_suggestions":"searchSuggestions"}},"pulse":{"namespace":"legacy.pulse"},"pulse_v2":{"namespace":"legacy.pulseV2"},"pulse_v3":{"namespace":"pulse","params":{"action":{"oauthCredential":"credential"}}},"qdrant":{"namespace":"legacy.qdrant","methods":{"fetch":"fetch","search":"search","upsert":"upsert"}},"qdrant_v2":{"namespace":"qdrant","methods":{"fetch":"fetch","search":"search","upsert":"upsert"},"params":{"action":{"oauthCredential":"credential"}}},"quartr":{"namespace":"legacy.quartr","methods":{"get_audio":"getAudio","get_company":"getCompany","get_event":"getEvent","get_event_summary":"getEventSummary","get_report":"getReport","get_slide_deck":"getSlideDeck","get_transcript":"getTranscript","list_audio":"listAudio","list_companies":"listCompanies","list_document_types":"listDocumentTypes","list_documents":"listDocuments","list_event_types":"listEventTypes","list_events":"listEvents","list_live_events":"listLiveEvents","list_reports":"listReports","list_slide_decks":"listSlideDecks","list_transcripts":"listTranscripts"}},"quartr_v2":{"namespace":"quartr","methods":{"get_audio":"getAudio","get_company":"getCompany","get_event":"getEvent","get_event_summary":"getEventSummary","get_report":"getReport","get_slide_deck":"getSlideDeck","get_transcript":"getTranscript","list_audio":"listAudio","list_companies":"listCompanies","list_document_types":"listDocumentTypes","list_documents":"listDocuments","list_event_types":"listEventTypes","list_events":"listEvents","list_live_events":"listLiveEvents","list_reports":"listReports","list_slide_decks":"listSlideDecks","list_transcripts":"listTranscripts"},"params":{"action":{"oauthCredential":"credential"}}},"quickbooks":{"namespace":"quickbooks","methods":{"quickbooks_add_attachment":"addAttachment","quickbooks_create_bill":"createBill","quickbooks_create_bill_payment":"createBillPayment","quickbooks_create_credit_memo":"createCreditMemo","quickbooks_create_customer":"createCustomer","quickbooks_create_customer_payment":"createCustomerPayment","quickbooks_create_deposit":"createDeposit","quickbooks_create_employee":"createEmployee","quickbooks_create_estimate":"createEstimate","quickbooks_create_invoice":"createInvoice","quickbooks_create_item":"createItem","quickbooks_create_journal_entry":"createJournalEntry","quickbooks_create_purchase":"createPurchaseOrExpense","quickbooks_create_purchase_order":"createPurchaseOrder","quickbooks_create_refund_receipt":"createRefundReceipt","quickbooks_create_sales_receipt":"createSalesReceipt","quickbooks_create_vendor":"createVendor","quickbooks_create_vendor_credit":"createVendorCredit","quickbooks_download_attachment":"downloadAttachment","quickbooks_download_transaction_pdf":"downloadTransactionPdf","quickbooks_email_transaction":"emailTransaction","quickbooks_get_company_info":"getCompanyInfo","quickbooks_read_accounting_transactions":"readAccountingTransactions","quickbooks_read_attachments":"readAttachments","quickbooks_read_master_data":"readMasterData","quickbooks_read_purchasing_transactions":"readPurchasingTransactions","quickbooks_read_sales_transactions":"readSalesTransactions","quickbooks_run_financial_report":"runFinancialReport","quickbooks_update_bill":"updateBill","quickbooks_update_bill_payment":"updateBillPayment","quickbooks_update_credit_memo":"updateCreditMemo","quickbooks_update_customer":"updateCustomer","quickbooks_update_customer_payment":"updateCustomerPayment","quickbooks_update_deposit":"updateDeposit","quickbooks_update_employee":"updateEmployee","quickbooks_update_estimate":"updateEstimate","quickbooks_update_invoice":"updateInvoice","quickbooks_update_item":"updateItem","quickbooks_update_journal_entry":"updateJournalEntry","quickbooks_update_purchase":"updatePurchaseOrExpense","quickbooks_update_purchase_order":"updatePurchaseOrder","quickbooks_update_refund_receipt":"updateRefundReceipt","quickbooks_update_sales_receipt":"updateSalesReceipt","quickbooks_update_vendor":"updateVendor","quickbooks_update_vendor_credit":"updateVendorCredit","quickbooks_void_bill_payment":"voidBillPayment","quickbooks_void_customer_payment":"voidCustomerPayment","quickbooks_void_invoice":"voidInvoice","quickbooks_void_sales_receipt":"voidSalesReceipt"},"triggers":{"quickbooks_account_events":"accountEvents","quickbooks_bill_events":"billEvents","quickbooks_bill_payment_events":"billPaymentEvents","quickbooks_budget_events":"budgetEvents","quickbooks_class_events":"classEvents","quickbooks_credit_memo_events":"creditMemoEvents","quickbooks_currency_events":"currencyEvents","quickbooks_customer_events":"customerEvents","quickbooks_department_events":"departmentEvents","quickbooks_deposit_events":"depositEvents","quickbooks_employee_events":"employeeEvents","quickbooks_estimate_events":"estimateEvents","quickbooks_invoice_events":"invoiceEvents","quickbooks_item_events":"itemEvents","quickbooks_journal_code_events":"journalCodeEvents","quickbooks_journal_entry_events":"journalEntryEvents","quickbooks_payment_events":"paymentEvents","quickbooks_payment_method_events":"paymentMethodEvents","quickbooks_preferences_updated":"preferencesUpdated","quickbooks_purchase_events":"purchaseEvents","quickbooks_purchase_order_events":"purchaseOrderEvents","quickbooks_refund_receipt_events":"refundReceiptEvents","quickbooks_sales_receipt_events":"salesReceiptEvents","quickbooks_tax_agency_events":"taxAgencyEvents","quickbooks_term_events":"termEvents","quickbooks_time_activity_events":"timeActivityEvents","quickbooks_transfer_events":"transferEvents","quickbooks_vendor_credit_events":"vendorCreditEvents","quickbooks_vendor_events":"vendorEvents"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"quiver":{"namespace":"legacy.quiver","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"}},"quiver_v2":{"namespace":"legacy.quiverV2","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"}},"quiver_v3":{"namespace":"quiver","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"},"params":{"action":{"oauthCredential":"credential"}}},"rabbitmq":{"namespace":"rabbitmq","methods":{"rabbitmq_create_binding":"createBinding","rabbitmq_create_exchange":"createExchange","rabbitmq_create_policy":"createPolicy","rabbitmq_create_queue":"createQueue","rabbitmq_delete_binding":"deleteBinding","rabbitmq_delete_exchange":"deleteExchange","rabbitmq_delete_policy":"deletePolicy","rabbitmq_delete_queue":"deleteQueue","rabbitmq_get_exchange":"getExchange","rabbitmq_get_messages":"getMessages","rabbitmq_get_overview":"getOverview","rabbitmq_get_queue":"getQueue","rabbitmq_health_check":"healthCheck","rabbitmq_list_bindings":"listQueueBindings","rabbitmq_list_channels":"listChannels","rabbitmq_list_connections":"listConnections","rabbitmq_list_consumers":"listConsumers","rabbitmq_list_exchange_bindings":"listExchangeBindings","rabbitmq_list_exchanges":"listExchanges","rabbitmq_list_nodes":"listNodes","rabbitmq_list_policies":"listPolicies","rabbitmq_list_queues":"listQueues","rabbitmq_list_vhosts":"listVirtualHosts","rabbitmq_publish_message":"publishMessage","rabbitmq_purge_queue":"purgeQueue"}},"railway":{"namespace":"legacy.railway","methods":{"create_environment":"createEnvironment","create_project":"createProject","create_service":"createService","delete_environment":"deleteEnvironment","delete_project":"deleteProject","delete_service":"deleteService","delete_variable":"deleteVariable","deploy_service":"deployService","get_deployment":"getDeployment","get_deployment_logs":"getDeploymentLogs","get_project":"getProject","list_deployments":"listDeployments","list_project_members":"listProjectMembers","list_projects":"listProjects","list_variables":"listVariables","restart_deployment":"restartDeployment","rollback_deployment":"rollbackDeployment","transfer_project":"transferProject","update_project":"updateProject","upsert_variable":"upsertVariable"}},"railway_v2":{"namespace":"railway","methods":{"create_environment":"createEnvironment","create_project":"createProject","create_service":"createService","delete_environment":"deleteEnvironment","delete_project":"deleteProject","delete_service":"deleteService","delete_variable":"deleteVariable","deploy_service":"deployService","get_deployment":"getDeployment","get_deployment_logs":"getDeploymentLogs","get_project":"getProject","list_deployments":"listDeployments","list_project_members":"listProjectMembers","list_projects":"listProjects","list_variables":"listVariables","restart_deployment":"restartDeployment","rollback_deployment":"rollbackDeployment","transfer_project":"transferProject","update_project":"updateProject","upsert_variable":"upsertVariable"},"params":{"action":{"oauthCredential":"credential"}}},"ramp":{"namespace":"ramp","methods":{"create_memo":"createMemo","get_balance":"getBalance","get_bill":"getBill","get_business":"getBusiness","get_memo":"getMemo","get_physical_card":"getPhysicalCard","get_reimbursement":"getReimbursement","get_transaction":"getTransaction","get_user":"getUser","get_vendor":"getVendor","get_virtual_card":"getVirtualCard","list_bills":"listBills","list_physical_cards":"listPhysicalCards","list_reimbursements":"listReimbursements","list_transactions":"listTransactions","list_users":"listUsers","list_vendors":"listVendors","list_virtual_cards":"listVirtualCards"},"params":{"action":{"oauthCredential":"credential"}}},"rb2b":{"namespace":"legacy.rb2b","methods":{"credit_check":"creditCheck","email_to_activity":"emailToLastActiveDate","hem_to_best_linkedin":"emailHemToBestLinkedInUrl","hem_to_business_profile":"emailHemToBusinessProfile","hem_to_linkedin":"emailHemToLinkedInSlug","hem_to_maid":"emailHemToMaid","ip_to_company":"ipToCompany","ip_to_hem":"ipToHem","ip_to_maid":"ipToMaid","linkedin_slug_search":"linkedInSlugSearch","linkedin_to_best_personal_email":"linkedInToBestPersonalEmail","linkedin_to_business_profile":"linkedInToBusinessProfile","linkedin_to_hashed_emails":"linkedInToHashedEmails","linkedin_to_mobile_phone":"linkedInToMobilePhone","linkedin_to_personal_email":"linkedInToPersonalEmail"}},"rb2b_v2":{"namespace":"rb2b","methods":{"credit_check":"creditCheck","email_to_activity":"emailToLastActiveDate","hem_to_best_linkedin":"emailHemToBestLinkedInUrl","hem_to_business_profile":"emailHemToBusinessProfile","hem_to_linkedin":"emailHemToLinkedInSlug","hem_to_maid":"emailHemToMaid","ip_to_company":"ipToCompany","ip_to_hem":"ipToHem","ip_to_maid":"ipToMaid","linkedin_slug_search":"linkedInSlugSearch","linkedin_to_best_personal_email":"linkedInToBestPersonalEmail","linkedin_to_business_profile":"linkedInToBusinessProfile","linkedin_to_hashed_emails":"linkedInToHashedEmails","linkedin_to_mobile_phone":"linkedInToMobilePhone","linkedin_to_personal_email":"linkedInToPersonalEmail"},"params":{"action":{"oauthCredential":"credential"}}},"rds":{"namespace":"legacy.rds","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"rds_v2":{"namespace":"rds","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"params":{"action":{"oauthCredential":"credential"}}},"reddit":{"namespace":"reddit","methods":{"delete":"delete_","edit":"edit","get_comments":"getComments","get_controversial":"getControversialPosts","get_info":"getInfoById","get_me":"getMyProfile","get_messages":"getMessages","get_posts":"getPosts","get_saved":"getSavedItems","get_subreddit_info":"getSubredditInfo","get_subreddit_rules":"getSubredditRules","get_user":"getUserProfile","get_user_comments":"getUserComments","get_user_posts":"getUserPosts","hide":"hide","list_my_subreddits":"listMySubreddits","lock":"lockMod","mark_all_read":"markAllMessagesRead","mark_read":"markMessagesRead","marknsfw":"markNsfw","mod_approve":"approveMod","mod_distinguish":"distinguishMod","mod_remove":"removeMod","mod_sticky":"stickyMod","reply":"reply","report":"report","save":"save","search":"searchSubreddit","search_subreddits":"searchSubreddits","send_message":"sendMessage","submit_post":"submitPost","subscribe":"subscribe","unhide":"unhide","unlock":"unlockMod","unmarknsfw":"unmarkNsfw","unsave":"unsave","vote":"vote"},"params":{"action":{"oauthCredential":"credential"}}},"redis":{"namespace":"redis","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hdel":"hdel","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","llen":"llen","lpop":"lpop","lpush":"lpush","lrange":"lrange","persist":"persist","rpop":"rpop","rpush":"rpush","set":"set","setnx":"setnx","ttl":"ttl"}},"reducto":{"namespace":"legacy.reducto"},"reducto_v2":{"namespace":"legacy.reductoV2"},"reducto_v3":{"namespace":"reducto","params":{"action":{"oauthCredential":"credential"}}},"resend":{"namespace":"legacy.resend","methods":{"cancel_email":"cancelEmail","create_audience":"createAudience","create_broadcast":"createBroadcast","create_contact":"createContact","delete_audience":"deleteAudience","delete_contact":"deleteContact","get_audience":"getAudience","get_broadcast":"getBroadcast","get_contact":"getContact","get_email":"getEmail","list_audiences":"listAudiences","list_contacts":"listContacts","list_domains":"listDomains","send_broadcast":"sendBroadcast","send_email":"sendEmail","update_contact":"updateContact"},"triggers":{"resend_email_bounced":"emailBounced","resend_email_clicked":"emailClicked","resend_email_complained":"emailComplained","resend_email_delivered":"emailDelivered","resend_email_failed":"emailFailed","resend_email_opened":"emailOpened","resend_email_sent":"emailSent","resend_webhook":"webhook"}},"resend_v2":{"namespace":"resend","methods":{"cancel_email":"cancelEmail","create_audience":"createAudience","create_broadcast":"createBroadcast","create_contact":"createContact","delete_audience":"deleteAudience","delete_contact":"deleteContact","get_audience":"getAudience","get_broadcast":"getBroadcast","get_contact":"getContact","get_email":"getEmail","list_audiences":"listAudiences","list_contacts":"listContacts","list_domains":"listDomains","send_broadcast":"sendBroadcast","send_email":"sendEmail","update_contact":"updateContact"},"triggers":{"resend_email_bounced":"emailBounced","resend_email_clicked":"emailClicked","resend_email_complained":"emailComplained","resend_email_delivered":"emailDelivered","resend_email_failed":"emailFailed","resend_email_opened":"emailOpened","resend_email_sent":"emailSent","resend_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"response":{"namespace":"response"},"revenuecat":{"namespace":"revenuecat","methods":{"create_purchase":"createPurchase","defer_google_subscription":"deferGoogleSubscription","delete_customer":"deleteCustomer","get_customer":"getCustomer","grant_entitlement":"grantEntitlement","list_offerings":"listOfferings","refund_google_subscription":"refundGoogleSubscription","revoke_entitlement":"revokeEntitlement","revoke_google_subscription":"revokeGoogleSubscription","update_subscriber_attributes":"updateSubscriberAttributes"},"triggers":{"revenuecat_cancellation":"cancellation","revenuecat_expiration":"expiration","revenuecat_initial_purchase":"initialPurchase","revenuecat_non_renewing_purchase":"nonRenewingPurchase","revenuecat_product_change":"productChange","revenuecat_renewal":"renewal"}},"rippling":{"namespace":"legacy.rippling","methods":{"bulk_create_custom_object_records":"bulkCreateCustomObjectRecords","bulk_delete_custom_object_records":"bulkDeleteCustomObjectRecords","bulk_update_custom_object_records":"bulkUpdateCustomObjectRecords","create_business_partner":"createBusinessPartner","create_business_partner_group":"createBusinessPartnerGroup","create_custom_app":"createCustomApp","create_custom_object":"createCustomObject","create_custom_object_field":"createCustomObjectField","create_custom_object_record":"createCustomObjectRecord","create_custom_page":"createCustomPage","create_custom_setting":"createCustomSetting","create_department":"createDepartment","create_draft_hires":"createDraftHires","create_object_category":"createObjectCategory","create_title":"createTitle","create_work_location":"createWorkLocation","delete_business_partner":"deleteBusinessPartner","delete_business_partner_group":"deleteBusinessPartnerGroup","delete_custom_app":"deleteCustomApp","delete_custom_object":"deleteCustomObject","delete_custom_object_field":"deleteCustomObjectField","delete_custom_object_record":"deleteCustomObjectRecord","delete_custom_page":"deleteCustomPage","delete_custom_setting":"deleteCustomSetting","delete_object_category":"deleteObjectCategory","delete_title":"deleteTitle","delete_work_location":"deleteWorkLocation","get_business_partner":"getBusinessPartner","get_business_partner_group":"getBusinessPartnerGroup","get_current_user":"getCurrentUser","get_custom_app":"getCustomApp","get_custom_object":"getCustomObject","get_custom_object_field":"getCustomObjectField","get_custom_object_record":"getCustomObjectRecord","get_custom_object_record_by_external_id":"getCustomObjectRecordByExternalId","get_custom_page":"getCustomPage","get_custom_setting":"getCustomSetting","get_department":"getDepartment","get_employment_type":"getEmploymentType","get_job_function":"getJobFunction","get_object_category":"getObjectCategory","get_report_run":"getReportRun","get_supergroup":"getSupergroup","get_team":"getTeam","get_title":"getTitle","get_user":"getUser","get_work_location":"getWorkLocation","get_worker":"getWorker","list_business_partner_groups":"listBusinessPartnerGroups","list_business_partners":"listBusinessPartners","list_companies":"listCompanies","list_custom_apps":"listCustomApps","list_custom_fields":"listCustomFields","list_custom_object_fields":"listCustomObjectFields","list_custom_object_records":"listCustomObjectRecords","list_custom_objects":"listCustomObjects","list_custom_pages":"listCustomPages","list_custom_settings":"listCustomSettings","list_departments":"listDepartments","list_employment_types":"listEmploymentTypes","list_entitlements":"listEntitlements","list_job_functions":"listJobFunctions","list_object_categories":"listObjectCategories","list_supergroup_exclusion_members":"listSupergroupExclusionMembers","list_supergroup_inclusion_members":"listSupergroupInclusionMembers","list_supergroup_members":"listSupergroupMembers","list_supergroups":"listSupergroups","list_teams":"listTeams","list_titles":"listTitles","list_users":"listUsers","list_work_locations":"listWorkLocations","list_workers":"listWorkers","query_custom_object_records":"queryCustomObjectRecords","trigger_report_run":"triggerReportRun","update_custom_app":"updateCustomApp","update_custom_object":"updateCustomObject","update_custom_object_field":"updateCustomObjectField","update_custom_object_record":"updateCustomObjectRecord","update_custom_page":"updateCustomPage","update_custom_setting":"updateCustomSetting","update_department":"updateDepartment","update_object_category":"updateObjectCategory","update_supergroup_exclusion_members":"updateSupergroupExclusionMembers","update_supergroup_inclusion_members":"updateSupergroupInclusionMembers","update_title":"updateTitle","update_work_location":"updateWorkLocation"}},"rippling_v2":{"namespace":"rippling","methods":{"bulk_create_custom_object_records":"bulkCreateCustomObjectRecords","bulk_delete_custom_object_records":"bulkDeleteCustomObjectRecords","bulk_update_custom_object_records":"bulkUpdateCustomObjectRecords","create_business_partner":"createBusinessPartner","create_business_partner_group":"createBusinessPartnerGroup","create_custom_app":"createCustomApp","create_custom_object":"createCustomObject","create_custom_object_field":"createCustomObjectField","create_custom_object_record":"createCustomObjectRecord","create_custom_page":"createCustomPage","create_custom_setting":"createCustomSetting","create_department":"createDepartment","create_draft_hires":"createDraftHires","create_object_category":"createObjectCategory","create_title":"createTitle","create_work_location":"createWorkLocation","delete_business_partner":"deleteBusinessPartner","delete_business_partner_group":"deleteBusinessPartnerGroup","delete_custom_app":"deleteCustomApp","delete_custom_object":"deleteCustomObject","delete_custom_object_field":"deleteCustomObjectField","delete_custom_object_record":"deleteCustomObjectRecord","delete_custom_page":"deleteCustomPage","delete_custom_setting":"deleteCustomSetting","delete_object_category":"deleteObjectCategory","delete_title":"deleteTitle","delete_work_location":"deleteWorkLocation","get_business_partner":"getBusinessPartner","get_business_partner_group":"getBusinessPartnerGroup","get_current_user":"getCurrentUser","get_custom_app":"getCustomApp","get_custom_object":"getCustomObject","get_custom_object_field":"getCustomObjectField","get_custom_object_record":"getCustomObjectRecord","get_custom_object_record_by_external_id":"getCustomObjectRecordByExternalId","get_custom_page":"getCustomPage","get_custom_setting":"getCustomSetting","get_department":"getDepartment","get_employment_type":"getEmploymentType","get_job_function":"getJobFunction","get_object_category":"getObjectCategory","get_report_run":"getReportRun","get_supergroup":"getSupergroup","get_team":"getTeam","get_title":"getTitle","get_user":"getUser","get_work_location":"getWorkLocation","get_worker":"getWorker","list_business_partner_groups":"listBusinessPartnerGroups","list_business_partners":"listBusinessPartners","list_companies":"listCompanies","list_custom_apps":"listCustomApps","list_custom_fields":"listCustomFields","list_custom_object_fields":"listCustomObjectFields","list_custom_object_records":"listCustomObjectRecords","list_custom_objects":"listCustomObjects","list_custom_pages":"listCustomPages","list_custom_settings":"listCustomSettings","list_departments":"listDepartments","list_employment_types":"listEmploymentTypes","list_entitlements":"listEntitlements","list_job_functions":"listJobFunctions","list_object_categories":"listObjectCategories","list_supergroup_exclusion_members":"listSupergroupExclusionMembers","list_supergroup_inclusion_members":"listSupergroupInclusionMembers","list_supergroup_members":"listSupergroupMembers","list_supergroups":"listSupergroups","list_teams":"listTeams","list_titles":"listTitles","list_users":"listUsers","list_work_locations":"listWorkLocations","list_workers":"listWorkers","query_custom_object_records":"queryCustomObjectRecords","trigger_report_run":"triggerReportRun","update_custom_app":"updateCustomApp","update_custom_object":"updateCustomObject","update_custom_object_field":"updateCustomObjectField","update_custom_object_record":"updateCustomObjectRecord","update_custom_page":"updateCustomPage","update_custom_setting":"updateCustomSetting","update_department":"updateDepartment","update_object_category":"updateObjectCategory","update_supergroup_exclusion_members":"updateSupergroupExclusionMembers","update_supergroup_inclusion_members":"updateSupergroupInclusionMembers","update_title":"updateTitle","update_work_location":"updateWorkLocation"},"params":{"action":{"oauthCredential":"credential"}}},"rocketlane":{"namespace":"legacy.rocketlane","methods":{"add_field_option":"addFieldOption","add_project_members":"addProjectMembers","add_task_assignees":"addTaskAssignees","add_task_dependencies":"addTaskDependencies","add_task_followers":"addTaskFollowers","archive_project":"archiveProject","assign_placeholders":"assignPlaceholder","create_field":"createField","create_phase":"createPhase","create_project":"createProject","create_space":"createSpace","create_space_document":"createSpaceDocument","create_task":"createTask","create_time_entry":"createTimeEntry","create_time_off":"createTimeOff","delete_field":"deleteField","delete_phase":"deletePhase","delete_project":"deleteProject","delete_space":"deleteSpace","delete_space_document":"deleteSpaceDocument","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","delete_time_off":"deleteTimeOff","get_field":"getField","get_invoice":"getInvoice","get_invoice_line_items":"getInvoiceLineItems","get_invoice_payments":"getInvoicePayments","get_phase":"getPhase","get_project":"getProject","get_space":"getSpace","get_space_document":"getSpaceDocument","get_task":"getTask","get_time_entry":"getTimeEntry","get_time_off":"getTimeOff","get_user":"getUser","import_template":"importTemplate","list_fields":"listFields","list_invoices":"listInvoices","list_phases":"listPhases","list_placeholders":"listPlaceholders","list_projects":"listProjects","list_resource_allocations":"listResourceAllocations","list_space_documents":"listSpaceDocuments","list_spaces":"listSpaces","list_tasks":"listTasks","list_time_entries":"listTimeEntries","list_time_entry_categories":"listTimeEntryCategories","list_time_offs":"listTimeOffs","list_users":"listUsers","move_task_to_phase":"moveTaskToPhase","remove_project_members":"removeProjectMembers","remove_task_assignees":"removeTaskAssignees","remove_task_dependencies":"removeTaskDependencies","remove_task_followers":"removeTaskFollowers","search_time_entries":"searchTimeEntries","unassign_placeholders":"unassignPlaceholder","update_field":"updateField","update_field_option":"updateFieldOption","update_phase":"updatePhase","update_project":"updateProject","update_space":"updateSpace","update_space_document":"updateSpaceDocument","update_task":"updateTask","update_time_entry":"updateTimeEntry"}},"rocketlane_v2":{"namespace":"rocketlane","methods":{"add_field_option":"addFieldOption","add_project_members":"addProjectMembers","add_task_assignees":"addTaskAssignees","add_task_dependencies":"addTaskDependencies","add_task_followers":"addTaskFollowers","archive_project":"archiveProject","assign_placeholders":"assignPlaceholder","create_field":"createField","create_phase":"createPhase","create_project":"createProject","create_space":"createSpace","create_space_document":"createSpaceDocument","create_task":"createTask","create_time_entry":"createTimeEntry","create_time_off":"createTimeOff","delete_field":"deleteField","delete_phase":"deletePhase","delete_project":"deleteProject","delete_space":"deleteSpace","delete_space_document":"deleteSpaceDocument","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","delete_time_off":"deleteTimeOff","get_field":"getField","get_invoice":"getInvoice","get_invoice_line_items":"getInvoiceLineItems","get_invoice_payments":"getInvoicePayments","get_phase":"getPhase","get_project":"getProject","get_space":"getSpace","get_space_document":"getSpaceDocument","get_task":"getTask","get_time_entry":"getTimeEntry","get_time_off":"getTimeOff","get_user":"getUser","import_template":"importTemplate","list_fields":"listFields","list_invoices":"listInvoices","list_phases":"listPhases","list_placeholders":"listPlaceholders","list_projects":"listProjects","list_resource_allocations":"listResourceAllocations","list_space_documents":"listSpaceDocuments","list_spaces":"listSpaces","list_tasks":"listTasks","list_time_entries":"listTimeEntries","list_time_entry_categories":"listTimeEntryCategories","list_time_offs":"listTimeOffs","list_users":"listUsers","move_task_to_phase":"moveTaskToPhase","remove_project_members":"removeProjectMembers","remove_task_assignees":"removeTaskAssignees","remove_task_dependencies":"removeTaskDependencies","remove_task_followers":"removeTaskFollowers","search_time_entries":"searchTimeEntries","unassign_placeholders":"unassignPlaceholder","update_field":"updateField","update_field_option":"updateFieldOption","update_phase":"updatePhase","update_project":"updateProject","update_space":"updateSpace","update_space_document":"updateSpaceDocument","update_task":"updateTask","update_time_entry":"updateTimeEntry"},"params":{"action":{"oauthCredential":"credential"}}},"rootly":{"namespace":"legacy.rootly","methods":{"rootly_acknowledge_alert":"acknowledgeAlert","rootly_add_incident_event":"addIncidentEvent","rootly_add_subscribers":"addSubscribers","rootly_assign_incident_role":"assignIncidentRole","rootly_create_action_item":"createActionItem","rootly_create_alert":"createAlert","rootly_create_incident":"createIncident","rootly_create_status_page_event":"createStatusPageEvent","rootly_delete_action_item":"deleteActionItem","rootly_delete_incident":"deleteIncident","rootly_escalate_alert":"escalateAlert","rootly_get_alert":"getAlert","rootly_get_incident":"getIncident","rootly_list_action_items":"listActionItems","rootly_list_alerts":"listAlerts","rootly_list_causes":"listCauses","rootly_list_environments":"listEnvironments","rootly_list_escalation_policies":"listEscalationPolicies","rootly_list_functionalities":"listFunctionalities","rootly_list_incident_events":"listIncidentEvents","rootly_list_incident_roles":"listIncidentRoles","rootly_list_incident_types":"listIncidentTypes","rootly_list_incidents":"listIncidents","rootly_list_on_calls":"listOnCalls","rootly_list_playbooks":"listPlaybooks","rootly_list_retrospectives":"listRetrospectives","rootly_list_schedules":"listSchedules","rootly_list_services":"listServices","rootly_list_severities":"listSeverities","rootly_list_teams":"listTeams","rootly_list_users":"listUsers","rootly_mitigate_incident":"mitigateIncident","rootly_remove_subscribers":"removeSubscribers","rootly_resolve_alert":"resolveAlert","rootly_resolve_incident":"resolveIncident","rootly_run_workflow":"runWorkflow","rootly_snooze_alert":"snoozeAlert","rootly_unassign_incident_role":"unassignIncidentRole","rootly_update_action_item":"updateActionItem","rootly_update_alert":"updateAlert","rootly_update_incident":"updateIncident"},"triggers":{"rootly_alert_created":"alertCreated","rootly_incident_created":"incidentCreated","rootly_incident_resolved":"incidentResolved","rootly_incident_updated":"incidentUpdated"}},"rootly_v2":{"namespace":"rootly","methods":{"rootly_acknowledge_alert":"acknowledgeAlert","rootly_add_incident_event":"addIncidentEvent","rootly_add_subscribers":"addSubscribers","rootly_assign_incident_role":"assignIncidentRole","rootly_create_action_item":"createActionItem","rootly_create_alert":"createAlert","rootly_create_incident":"createIncident","rootly_create_status_page_event":"createStatusPageEvent","rootly_delete_action_item":"deleteActionItem","rootly_delete_incident":"deleteIncident","rootly_escalate_alert":"escalateAlert","rootly_get_alert":"getAlert","rootly_get_incident":"getIncident","rootly_list_action_items":"listActionItems","rootly_list_alerts":"listAlerts","rootly_list_causes":"listCauses","rootly_list_environments":"listEnvironments","rootly_list_escalation_policies":"listEscalationPolicies","rootly_list_functionalities":"listFunctionalities","rootly_list_incident_events":"listIncidentEvents","rootly_list_incident_roles":"listIncidentRoles","rootly_list_incident_types":"listIncidentTypes","rootly_list_incidents":"listIncidents","rootly_list_on_calls":"listOnCalls","rootly_list_playbooks":"listPlaybooks","rootly_list_retrospectives":"listRetrospectives","rootly_list_schedules":"listSchedules","rootly_list_services":"listServices","rootly_list_severities":"listSeverities","rootly_list_teams":"listTeams","rootly_list_users":"listUsers","rootly_mitigate_incident":"mitigateIncident","rootly_remove_subscribers":"removeSubscribers","rootly_resolve_alert":"resolveAlert","rootly_resolve_incident":"resolveIncident","rootly_run_workflow":"runWorkflow","rootly_snooze_alert":"snoozeAlert","rootly_unassign_incident_role":"unassignIncidentRole","rootly_update_action_item":"updateActionItem","rootly_update_alert":"updateAlert","rootly_update_incident":"updateIncident"},"triggers":{"rootly_alert_created":"alertCreated","rootly_incident_created":"incidentCreated","rootly_incident_resolved":"incidentResolved","rootly_incident_updated":"incidentUpdated"},"params":{"action":{"oauthCredential":"credential"}}},"router":{"namespace":"legacy.router"},"router_v2":{"namespace":"router"},"rss":{"namespace":"trigger.rss"},"s3":{"namespace":"legacy.s3","methods":{"copy_object":"copyObject","create_bucket":"createBucket","delete_bucket":"deleteBucket","delete_object":"deleteObject","delete_objects":"deleteObjectsBatch","get_object":"downloadFile","head_object":"headObjectMetadata","list_buckets":"listBuckets","list_objects":"listObjects","presigned_url":"presignedUrl","put_object":"uploadFile"}},"s3_v2":{"namespace":"s3","methods":{"copy_object":"copyObject","create_bucket":"createBucket","delete_bucket":"deleteBucket","delete_object":"deleteObject","delete_objects":"deleteObjectsBatch","get_object":"downloadFile","head_object":"headObjectMetadata","list_buckets":"listBuckets","list_objects":"listObjects","presigned_url":"presignedUrl","put_object":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"sailpoint":{"namespace":"legacy.sailpoint","methods":{"sailpoint_approve_access_request":"approveAccessRequest","sailpoint_cancel_access_request":"cancelAccessRequest","sailpoint_decide_certification_review_items":"decideCertificationReviewItems","sailpoint_get_access_profile":"getAccessProfile","sailpoint_get_access_profile_entitlements":"getAccessProfileEntitlements","sailpoint_get_access_request_config":"getAccessRequestConfig","sailpoint_get_access_request_status":"getAccessRequestStatus","sailpoint_get_account":"getAccount","sailpoint_get_account_activity":"getAccountActivity","sailpoint_get_account_entitlements":"getAccountEntitlements","sailpoint_get_account_selections":"getAccountSelections","sailpoint_get_campaign":"getCampaign","sailpoint_get_certification":"getCertification","sailpoint_get_entitlement":"getEntitlement","sailpoint_get_entitlement_request_config":"getEntitlementRequestConfig","sailpoint_get_identity":"getIdentity","sailpoint_get_role":"getRole","sailpoint_get_role_entitlements":"getRoleEntitlements","sailpoint_get_source":"getSource","sailpoint_get_task_status":"getTaskStatus","sailpoint_list_access_profiles":"listAccessProfiles","sailpoint_list_account_activities":"listAccountActivities","sailpoint_list_accounts":"listAccounts","sailpoint_list_campaigns":"listCampaigns","sailpoint_list_certification_review_items":"listCertificationReviewItems","sailpoint_list_certifications":"listCertifications","sailpoint_list_entitlements":"listEntitlements","sailpoint_list_identities":"listIdentities","sailpoint_list_identity_entitlements":"listIdentityEntitlements","sailpoint_list_pending_access_request_approvals":"listPendingAccessRequestApprovals","sailpoint_list_roles":"listRoles","sailpoint_list_sources":"listSources","sailpoint_load_accounts":"loadAccountsCsv","sailpoint_load_entitlements":"loadEntitlementsCsv","sailpoint_reject_access_request":"rejectAccessRequest","sailpoint_request_access":"requestAccess","sailpoint_search":"search","sailpoint_search_aggregate":"searchAggregate","sailpoint_search_count":"searchCount","sailpoint_sign_off_certification":"signOffCertification"}},"sailpoint_v2":{"namespace":"sailpoint","methods":{"sailpoint_approve_access_request":"approveAccessRequest","sailpoint_cancel_access_request":"cancelAccessRequest","sailpoint_decide_certification_review_items":"decideCertificationReviewItems","sailpoint_get_access_profile":"getAccessProfile","sailpoint_get_access_profile_entitlements":"getAccessProfileEntitlements","sailpoint_get_access_request_config":"getAccessRequestConfig","sailpoint_get_access_request_status":"getAccessRequestStatus","sailpoint_get_account":"getAccount","sailpoint_get_account_activity":"getAccountActivity","sailpoint_get_account_entitlements":"getAccountEntitlements","sailpoint_get_account_selections":"getAccountSelections","sailpoint_get_campaign":"getCampaign","sailpoint_get_certification":"getCertification","sailpoint_get_entitlement":"getEntitlement","sailpoint_get_entitlement_request_config":"getEntitlementRequestConfig","sailpoint_get_identity":"getIdentity","sailpoint_get_role":"getRole","sailpoint_get_role_entitlements":"getRoleEntitlements","sailpoint_get_source":"getSource","sailpoint_get_task_status":"getTaskStatus","sailpoint_list_access_profiles":"listAccessProfiles","sailpoint_list_account_activities":"listAccountActivities","sailpoint_list_accounts":"listAccounts","sailpoint_list_campaigns":"listCampaigns","sailpoint_list_certification_review_items":"listCertificationReviewItems","sailpoint_list_certifications":"listCertifications","sailpoint_list_entitlements":"listEntitlements","sailpoint_list_identities":"listIdentities","sailpoint_list_identity_entitlements":"listIdentityEntitlements","sailpoint_list_pending_access_request_approvals":"listPendingAccessRequestApprovals","sailpoint_list_roles":"listRoles","sailpoint_list_sources":"listSources","sailpoint_load_accounts":"loadAccountsCsv","sailpoint_load_entitlements":"loadEntitlementsCsv","sailpoint_reject_access_request":"rejectAccessRequest","sailpoint_request_access":"requestAccess","sailpoint_search":"search","sailpoint_search_aggregate":"searchAggregate","sailpoint_search_count":"searchCount","sailpoint_sign_off_certification":"signOffCertification"},"params":{"action":{"oauthCredential":"credential"}}},"salesforce":{"namespace":"salesforce","methods":{"create_account":"createAccount","create_case":"createCase","create_contact":"createContact","create_custom_field":"createCustomField","create_custom_object":"createCustomObject","create_lead":"createLead","create_opportunity":"createOpportunity","create_task":"createTask","delete_account":"deleteAccount","delete_case":"deleteCase","delete_contact":"deleteContact","delete_custom_field":"deleteCustomField","delete_lead":"deleteLead","delete_opportunity":"deleteOpportunity","delete_task":"deleteTask","describe_object":"describeObject","get_accounts":"getAccounts","get_cases":"getCases","get_contacts":"getContacts","get_dashboard":"getDashboard","get_leads":"getLeads","get_opportunities":"getOpportunities","get_report":"getReport","get_tasks":"getTasks","list_dashboards":"listDashboards","list_objects":"listObjects","list_report_types":"listReportTypes","list_reports":"listReports","query":"runSoqlQuery","query_more":"getMoreQueryResults","refresh_dashboard":"refreshDashboard","run_report":"runReport","tooling_query":"runToolingQuery","update_account":"updateAccount","update_case":"updateCase","update_contact":"updateContact","update_custom_field":"updateCustomField","update_lead":"updateLead","update_opportunity":"updateOpportunity","update_task":"updateTask"},"triggers":{"salesforce_case_status_changed":"caseStatusChanged","salesforce_opportunity_stage_changed":"opportunityStageChanged","salesforce_record_created":"recordCreated","salesforce_record_deleted":"recordDeleted","salesforce_record_updated":"recordUpdated","salesforce_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"sap_concur":{"namespace":"sapConcur","methods":{"sap_concur_approve_expense_report":"approveExpenseReport","sap_concur_associate_attendees":"associateAttendees","sap_concur_create_cash_advance":"createCashAdvance","sap_concur_create_expected_expense":"createExpectedExpense","sap_concur_create_expense_report":"createExpenseReport","sap_concur_create_list_item":"createListItem","sap_concur_create_purchase_request":"createPurchaseRequest","sap_concur_create_quick_expense":"createQuickExpense","sap_concur_create_quick_expense_with_image":"createQuickExpenseWithImage","sap_concur_create_report_comment":"createReportComment","sap_concur_create_travel_request":"createTravelRequest","sap_concur_create_user":"createUser","sap_concur_delete_expected_expense":"deleteExpectedExpense","sap_concur_delete_expense":"deleteExpense","sap_concur_delete_expense_report":"deleteExpenseReport","sap_concur_delete_list_item":"deleteListItem","sap_concur_delete_travel_request":"deleteTravelRequest","sap_concur_delete_user":"deleteUser","sap_concur_get_allocation":"getAllocation","sap_concur_get_budget":"getBudget","sap_concur_get_cash_advance":"getCashAdvance","sap_concur_get_expected_expense":"getExpectedExpense","sap_concur_get_expense":"getExpense","sap_concur_get_expense_report":"getExpenseReport","sap_concur_get_itemizations":"getItemizations","sap_concur_get_itinerary":"getItineraryTrip","sap_concur_get_list":"getList","sap_concur_get_list_item":"getListItem","sap_concur_get_purchase_request":"getPurchaseRequest","sap_concur_get_receipt":"getReceipt","sap_concur_get_receipt_status":"getReceiptStatus","sap_concur_get_request_cash_advance":"getRequestCashAdvance","sap_concur_get_travel_profile":"getTravelProfile","sap_concur_get_travel_request":"getTravelRequest","sap_concur_get_user":"getUser","sap_concur_issue_cash_advance":"issueCashAdvance","sap_concur_list_allocations":"listAllocations","sap_concur_list_attendee_associations":"listAttendeeAssociations","sap_concur_list_budget_categories":"listBudgetCategories","sap_concur_list_budgets":"listBudgets","sap_concur_list_exceptions":"listExceptions","sap_concur_list_expected_expenses":"listExpectedExpenses","sap_concur_list_expense_reports":"listExpenseReports","sap_concur_list_expenses":"listExpenses","sap_concur_list_itineraries":"listItinerariesTrips","sap_concur_list_list_items":"listListItems","sap_concur_list_lists":"listLists","sap_concur_list_receipts":"listReceipts","sap_concur_list_report_comments":"listReportComments","sap_concur_list_reports_to_approve":"listReportsToApprove","sap_concur_list_travel_profiles_summary":"listTravelProfilesSummary","sap_concur_list_travel_request_comments":"listTravelRequestComments","sap_concur_list_travel_requests":"listTravelRequests","sap_concur_list_users":"listUsers","sap_concur_move_travel_request":"moveTravelRequestWorkflowAction","sap_concur_recall_expense_report":"recallExpenseReport","sap_concur_remove_all_attendees":"removeAllAttendees","sap_concur_search_locations":"searchLocations","sap_concur_search_users":"searchUsers","sap_concur_send_back_expense_report":"sendBackExpenseReport","sap_concur_submit_expense_report":"submitExpenseReport","sap_concur_update_allocation":"updateAllocation","sap_concur_update_expected_expense":"updateExpectedExpense","sap_concur_update_expense":"updateExpense","sap_concur_update_expense_report":"updateExpenseReport","sap_concur_update_list_item":"updateListItem","sap_concur_update_travel_request":"updateTravelRequest","sap_concur_update_user":"updateUserPatch","sap_concur_upload_exchange_rates":"uploadExchangeRates","sap_concur_upload_receipt_image":"uploadReceiptImage"}},"sap_s4hana":{"namespace":"sapS4hana","methods":{"sap_s4hana_create_business_partner":"createBusinessPartner","sap_s4hana_create_purchase_order":"createPurchaseOrder","sap_s4hana_create_purchase_requisition":"createPurchaseRequisition","sap_s4hana_create_sales_order":"createSalesOrder","sap_s4hana_delete_sales_order":"deleteSalesOrder","sap_s4hana_get_billing_document":"getBillingDocument","sap_s4hana_get_business_partner":"getBusinessPartner","sap_s4hana_get_customer":"getCustomer","sap_s4hana_get_inbound_delivery":"getInboundDelivery","sap_s4hana_get_material_document":"getMaterialDocument","sap_s4hana_get_outbound_delivery":"getOutboundDelivery","sap_s4hana_get_product":"getProduct","sap_s4hana_get_purchase_order":"getPurchaseOrder","sap_s4hana_get_purchase_requisition":"getPurchaseRequisition","sap_s4hana_get_sales_order":"getSalesOrder","sap_s4hana_get_supplier":"getSupplier","sap_s4hana_get_supplier_invoice":"getSupplierInvoice","sap_s4hana_list_billing_documents":"listBillingDocuments","sap_s4hana_list_business_partners":"listBusinessPartners","sap_s4hana_list_customers":"listCustomers","sap_s4hana_list_inbound_deliveries":"listInboundDeliveries","sap_s4hana_list_material_documents":"listMaterialDocuments","sap_s4hana_list_material_stock":"listMaterialStock","sap_s4hana_list_outbound_deliveries":"listOutboundDeliveries","sap_s4hana_list_products":"listProducts","sap_s4hana_list_purchase_orders":"listPurchaseOrders","sap_s4hana_list_purchase_requisitions":"listPurchaseRequisitions","sap_s4hana_list_sales_orders":"listSalesOrders","sap_s4hana_list_supplier_invoices":"listSupplierInvoices","sap_s4hana_list_suppliers":"listSuppliers","sap_s4hana_odata_query":"odataQueryAdvanced","sap_s4hana_update_business_partner":"updateBusinessPartner","sap_s4hana_update_customer":"updateCustomer","sap_s4hana_update_product":"updateProduct","sap_s4hana_update_purchase_order":"updatePurchaseOrder","sap_s4hana_update_purchase_requisition":"updatePurchaseRequisition","sap_s4hana_update_sales_order":"updateSalesOrder","sap_s4hana_update_supplier":"updateSupplier"}},"schedule":{"namespace":"trigger.schedule"},"search":{"namespace":"search"},"secrets_manager":{"namespace":"legacy.secretsManager","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","describe_secret":"describeSecret","get_secret":"getSecret","list_secrets":"listSecrets","restore_secret":"restoreSecret","rotate_secret":"rotateSecret","tag_resource":"tagSecret","untag_resource":"untagSecret","update_secret":"updateSecret"}},"secrets_manager_v2":{"namespace":"secretsManager","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","describe_secret":"describeSecret","get_secret":"getSecret","list_secrets":"listSecrets","restore_secret":"restoreSecret","rotate_secret":"rotateSecret","tag_resource":"tagSecret","untag_resource":"untagSecret","update_secret":"updateSecret"},"params":{"action":{"oauthCredential":"credential"}}},"semrush":{"namespace":"semrush","methods":{"semrush_backlinks":"backlinks","semrush_backlinks_anchors":"backlinkAnchors","semrush_backlinks_competitors":"backlinkCompetitors","semrush_backlinks_geo_distribution":"backlinkCountryDistribution","semrush_backlinks_indexed_pages":"indexedPages","semrush_backlinks_overview":"backlinksOverview","semrush_backlinks_tld_distribution":"backlinkTldDistribution","semrush_batch_keyword_overview":"batchKeywordOverview","semrush_broad_match_keywords":"broadMatchKeywords","semrush_domain_ad_copies":"domainAdCopies","semrush_domain_ad_history":"domainAdHistory","semrush_domain_organic_competitors":"organicCompetitors","semrush_domain_organic_keywords":"domainOrganicKeywords","semrush_domain_overview":"domainOverview","semrush_domain_overview_all":"domainOverviewAllDatabases","semrush_domain_overview_history":"domainOverviewHistory","semrush_domain_paid_competitors":"paidCompetitors","semrush_domain_paid_keywords":"domainPaidKeywords","semrush_domain_pla_copies":"domainPlaCopies","semrush_domain_pla_keywords":"domainPlaKeywords","semrush_domain_vs_domain":"domainVsDomain","semrush_keyword_ad_history":"keywordAdHistory","semrush_keyword_difficulty":"keywordDifficulty","semrush_keyword_overview":"keywordOverview","semrush_keyword_overview_all":"keywordOverviewAllDatabases","semrush_keyword_questions":"keywordQuestions","semrush_organic_results":"organicResults","semrush_paid_results":"paidResults","semrush_referring_domains":"referringDomains","semrush_referring_ips":"referringIps","semrush_related_keywords":"relatedKeywords","semrush_subdomain_ad_copies":"subdomainAdCopies","semrush_subdomain_organic_keywords":"subdomainOrganicKeywords","semrush_subdomain_overview":"subdomainOverview","semrush_subdomain_overview_all":"subdomainOverviewAllDatabases","semrush_subdomain_overview_history":"subdomainOverviewHistory","semrush_subdomain_paid_keywords":"subdomainPaidKeywords","semrush_top_domains":"topDomains","semrush_url_organic_keywords":"urlOrganicKeywords","semrush_url_overview":"urlOverview","semrush_url_overview_all":"urlOverviewAllDatabases","semrush_url_overview_history":"urlOverviewHistory","semrush_url_paid_keywords":"urlPaidKeywords","semrush_winners_and_losers":"winnersAndLosers"}},"sendblue":{"namespace":"sendblue","methods":{"sendblue_evaluate_service":"evaluateService","sendblue_get_message":"getMessage","sendblue_send_group_message":"sendGroupMessage","sendblue_send_message":"sendMessage","sendblue_send_typing_indicator":"sendTypingIndicator"},"triggers":{"sendblue_message_received":"messageReceived","sendblue_message_status_updated":"messageStatusUpdated"}},"sendgrid":{"namespace":"legacy.sendgrid","methods":{"add_contact":"addContact","add_contacts_to_list":"addContactsToList","create_list":"createList","create_template":"createTemplate","create_template_version":"createTemplateVersion","delete_contacts":"deleteContacts","delete_list":"deleteList","delete_template":"deleteTemplate","get_contact":"getContact","get_list":"getList","get_template":"getTemplate","list_all_lists":"listAllLists","list_templates":"listTemplates","remove_contacts_from_list":"removeContactsFromList","search_contacts":"searchContacts","send_mail":"sendMail"}},"sendgrid_v2":{"namespace":"sendgrid","methods":{"add_contact":"addContact","add_contacts_to_list":"addContactsToList","create_list":"createList","create_template":"createTemplate","create_template_version":"createTemplateVersion","delete_contacts":"deleteContacts","delete_list":"deleteList","delete_template":"deleteTemplate","get_contact":"getContact","get_list":"getList","get_template":"getTemplate","list_all_lists":"listAllLists","list_templates":"listTemplates","remove_contacts_from_list":"removeContactsFromList","search_contacts":"searchContacts","send_mail":"sendMail"},"params":{"action":{"oauthCredential":"credential"}}},"sentry":{"namespace":"legacy.sentry","methods":{"sentry_events_get":"getEvent","sentry_events_list":"listEvents","sentry_issues_get":"getIssue","sentry_issues_list":"listIssues","sentry_issues_update":"updateIssue","sentry_projects_create":"createProject","sentry_projects_get":"getProject","sentry_projects_list":"listProjects","sentry_projects_update":"updateProject","sentry_releases_create":"createRelease","sentry_releases_deploy":"createDeploy","sentry_releases_list":"listReleases","sentry_teams_list":"listTeams"},"triggers":{"sentry_error_created":"errorCreated","sentry_issue_alert":"issueAlert","sentry_issue_created":"issueCreated","sentry_issue_resolved":"issueResolved","sentry_metric_alert":"metricAlert"}},"sentry_v2":{"namespace":"sentry","methods":{"sentry_events_get":"getEvent","sentry_events_list":"listEvents","sentry_issues_get":"getIssue","sentry_issues_list":"listIssues","sentry_issues_update":"updateIssue","sentry_projects_create":"createProject","sentry_projects_get":"getProject","sentry_projects_list":"listProjects","sentry_projects_update":"updateProject","sentry_releases_create":"createRelease","sentry_releases_deploy":"createDeploy","sentry_releases_list":"listReleases","sentry_teams_list":"listTeams"},"triggers":{"sentry_error_created":"errorCreated","sentry_issue_alert":"issueAlert","sentry_issue_created":"issueCreated","sentry_issue_resolved":"issueResolved","sentry_metric_alert":"metricAlert"},"params":{"action":{"oauthCredential":"credential"}}},"serper":{"namespace":"serper"},"servicenow":{"namespace":"legacy.servicenow","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"}},"servicenow_v2":{"namespace":"legacy.servicenowV2","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"}},"servicenow_v3":{"namespace":"servicenow","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"ses":{"namespace":"legacy.ses","methods":{"create_configuration_set":"createConfigurationSet","create_email_identity":"createEmailIdentity","create_template":"createTemplate","delete_email_identity":"deleteEmailIdentity","delete_suppressed_destination":"deleteSuppressedDestination","delete_template":"deleteTemplate","get_account":"getAccount","get_email_identity":"getEmailIdentity","get_suppressed_destination":"getSuppressedDestination","get_template":"getTemplate","list_identities":"listIdentities","list_suppressed_destinations":"listSuppressedDestinations","list_templates":"listTemplates","put_suppressed_destination":"putSuppressedDestination","send_bulk_email":"sendBulkEmail","send_custom_verification_email":"sendCustomVerificationEmail","send_email":"sendEmail","send_templated_email":"sendTemplatedEmail","update_template":"updateTemplate"}},"ses_v2":{"namespace":"ses","methods":{"create_configuration_set":"createConfigurationSet","create_email_identity":"createEmailIdentity","create_template":"createTemplate","delete_email_identity":"deleteEmailIdentity","delete_suppressed_destination":"deleteSuppressedDestination","delete_template":"deleteTemplate","get_account":"getAccount","get_email_identity":"getEmailIdentity","get_suppressed_destination":"getSuppressedDestination","get_template":"getTemplate","list_identities":"listIdentities","list_suppressed_destinations":"listSuppressedDestinations","list_templates":"listTemplates","put_suppressed_destination":"putSuppressedDestination","send_bulk_email":"sendBulkEmail","send_custom_verification_email":"sendCustomVerificationEmail","send_email":"sendEmail","send_templated_email":"sendTemplatedEmail","update_template":"updateTemplate"},"params":{"action":{"oauthCredential":"credential"}}},"sftp":{"namespace":"legacy.sftp","methods":{"sftp_create":"createFile","sftp_delete":"deleteFileDirectory","sftp_download":"downloadFile","sftp_list":"listDirectory","sftp_mkdir":"createDirectory","sftp_upload":"uploadFiles"}},"sftp_v2":{"namespace":"sftp","methods":{"sftp_create":"createFile","sftp_delete":"deleteFileDirectory","sftp_download":"downloadFile","sftp_list":"listDirectory","sftp_mkdir":"createDirectory","sftp_upload":"uploadFiles"}},"sharepoint":{"namespace":"legacy.sharepoint","methods":{"add_list_items":"addListItems","create_list":"createList","create_page":"createPage","delete_file":"deleteFile","delete_list_item":"deleteListItem","delete_page":"deletePage","download_file":"downloadFile","get_drive_item":"getDriveItem","get_list_item":"getListItem","list_sites":"listSites","publish_page":"publishPage","read_list":"readList","read_page":"readPage","update_list":"updateList","update_page":"updatePage","upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"sharepoint_v2":{"namespace":"sharepoint","methods":{"sharepoint_add_list_items":"addListItem","sharepoint_create_list":"createList","sharepoint_create_page":"createPage","sharepoint_delete_file":"deleteFile","sharepoint_delete_list_item":"deleteListItem","sharepoint_delete_page":"deletePage","sharepoint_download_file":"downloadFile","sharepoint_get_drive_item":"getDriveItem","sharepoint_get_list":"readList","sharepoint_get_list_item":"getListItem","sharepoint_list_sites":"listSites","sharepoint_publish_page":"publishPage","sharepoint_read_page":"readPage","sharepoint_update_list":"updateListItem","sharepoint_update_page":"updatePage","sharepoint_upload_file":"uploadFile"},"params":{"action":{"oauthCredential":"credential"}}},"shopify":{"namespace":"shopify","methods":{"shopify_adjust_inventory":"adjustInventory","shopify_cancel_order":"cancelOrder","shopify_create_customer":"createCustomer","shopify_create_fulfillment":"createFulfillment","shopify_create_product":"createProduct","shopify_create_product_variants":"createProductVariants","shopify_delete_customer":"deleteCustomer","shopify_delete_product":"deleteProduct","shopify_get_collection":"getCollection","shopify_get_customer":"getCustomer","shopify_get_fulfillment":"getFulfillment","shopify_get_fulfillment_order":"getFulfillmentOrder","shopify_get_inventory_level":"getInventoryLevel","shopify_get_job":"getJob","shopify_get_order":"getOrder","shopify_get_product":"getProduct","shopify_list_collections":"listCollections","shopify_list_customers":"listCustomers","shopify_list_fulfillment_orders":"listFulfillmentOrders","shopify_list_inventory_items":"listInventoryItems","shopify_list_locations":"listLocations","shopify_list_orders":"listOrders","shopify_list_products":"listProducts","shopify_update_customer":"updateCustomer","shopify_update_fulfillment_tracking":"updateFulfillmentTracking","shopify_update_order":"updateOrder","shopify_update_product":"updateProduct","shopify_update_product_variants":"updateProductVariants"},"params":{"action":{"oauthCredential":"credential"}}},"sim_workspace_event":{"namespace":"trigger.simWorkspaceEvent"},"similarweb":{"namespace":"legacy.similarweb","methods":{"similarweb_bounce_rate":"bounceRate","similarweb_page_views":"pageViews","similarweb_pages_per_visit":"pagesPerVisit","similarweb_traffic_visits":"trafficVisits","similarweb_visit_duration":"visitDurationDesktop","similarweb_website_overview":"websiteOverview"}},"similarweb_v2":{"namespace":"similarweb","methods":{"similarweb_bounce_rate":"bounceRate","similarweb_page_views":"pageViews","similarweb_pages_per_visit":"pagesPerVisit","similarweb_traffic_visits":"trafficVisits","similarweb_visit_duration":"visitDurationDesktop","similarweb_website_overview":"websiteOverview"},"params":{"action":{"oauthCredential":"credential"}}},"sixtyfour":{"namespace":"legacy.sixtyfour","methods":{"enrich_company":"enrichCompany","enrich_lead":"enrichLead","find_email":"findEmail","find_phone":"findPhone"}},"sixtyfour_v2":{"namespace":"sixtyfour","methods":{"enrich_company":"enrichCompany","enrich_lead":"enrichLead","find_email":"findEmail","find_phone":"findPhone"},"params":{"action":{"oauthCredential":"credential"}}},"slack":{"namespace":"legacy.slack","methods":{"archive_conversation":"archiveConversation","canvas":"createCanvas","create_channel_canvas":"createChannelCanvas","create_conversation":"createConversation","delete":"deleteMessage","delete_canvas":"deleteCanvas","delete_scheduled_message":"deleteScheduledMessage","download":"downloadFile","edit_canvas":"editCanvas","ephemeral":"sendEphemeralMessage","get_canvas":"getCanvasInfo","get_channel_history":"getChannelHistory","get_channel_info":"getChannelInfo","get_message":"getMessage","get_permalink":"getMessagePermalink","get_thread":"getThread","get_thread_replies":"getThreadReplies","get_user":"getUserInfo","get_user_presence":"getUserPresence","invite_to_conversation":"inviteToConversation","list_canvases":"listCanvases","list_channels":"listChannels","list_members":"listChannelMembers","list_scheduled_messages":"listScheduledMessages","list_users":"listUsers","lookup_canvas_sections":"lookupCanvasSections","open_view":"openView","publish_view":"publishView","push_view":"pushView","react":"addReaction","read":"readMessages","rename_conversation":"renameConversation","schedule_message":"scheduleMessage","send":"sendMessage","set_conversation_purpose":"setConversationPurpose","set_conversation_topic":"setConversationTopic","set_status":"setAssistantStatus","set_suggested_prompts":"setSuggestedPrompts","set_title":"setAssistantTitle","unreact":"removeReaction","update":"updateMessage","update_view":"updateView"},"triggers":{"slack_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"slack_v2":{"namespace":"slack","methods":{"add_bookmark":"addBookmark","archive_conversation":"archiveConversation","canvas":"createCanvas","close_conversation":"closeConversation","create_channel_canvas":"createChannelCanvas","create_conversation":"createConversation","create_list":"createList","create_list_item":"createListItem","create_user_group":"createUserGroup","delete":"deleteMessage","delete_canvas":"deleteCanvas","delete_file":"deleteFile","delete_list_item":"deleteListItem","delete_list_items":"deleteListItems","delete_scheduled_message":"deleteScheduledMessage","disable_user_group":"disableUserGroup","download":"downloadFile","edit_bookmark":"editBookmark","edit_canvas":"editCanvas","enable_user_group":"enableUserGroup","ephemeral":"sendEphemeralMessage","get_canvas":"getCanvasInfo","get_channel_history":"getChannelHistory","get_channel_info":"getChannelInfo","get_dnd_info":"getDoNotDisturbInfo","get_file_info":"getFileInfo","get_list_export":"getListExport","get_list_item":"getListItem","get_message":"getMessage","get_permalink":"getMessagePermalink","get_reactions":"getReactions","get_team_dnd_info":"getTeamDoNotDisturbInfo","get_team_info":"getWorkspaceInfo","get_team_profile":"getWorkspaceProfileFields","get_thread":"getThread","get_thread_replies":"getThreadReplies","get_user":"getUserInfo","get_user_presence":"getUserPresence","get_user_profile":"getUserProfile","invite_to_conversation":"inviteToConversation","join_conversation":"joinConversation","kick_conversation":"removeUserFromConversation","leave_conversation":"leaveConversation","list_bookmarks":"listBookmarks","list_canvases":"listCanvases","list_channels":"listChannels","list_emoji":"listCustomEmoji","list_files":"listFiles","list_items":"readListItems","list_members":"listChannelMembers","list_pins":"listPins","list_reactions":"listReactions","list_scheduled_messages":"listScheduledMessages","list_user_conversations":"listUserConversations","list_user_group_members":"listUserGroupMembers","list_user_groups":"listUserGroups","list_users":"listUsers","lookup_canvas_sections":"lookupCanvasSections","lookup_user_by_email":"findUserByEmail","mark_conversation_read":"markConversationRead","open_conversation":"openConversation","open_view":"openView","pin_message":"pinMessage","publish_view":"publishView","push_view":"pushView","react":"addReaction","read":"readMessages","remove_bookmark":"removeBookmark","rename_agent_session":"renameAgentSession","rename_conversation":"renameConversation","rename_list":"updateList","revoke_canvas_access":"revokeCanvasAccess","revoke_list_access":"revokeListAccess","schedule_message":"scheduleMessage","send":"sendMessage","set_agent_session_status":"setAgentSessionStatus","set_agent_suggested_prompts":"setAgentSuggestedPrompts","set_conversation_purpose":"setConversationPurpose","set_conversation_topic":"setConversationTopic","set_status":"setAssistantStatus","set_suggested_prompts":"setAssistantSuggestedPrompts","set_title":"setAssistantTitle","set_user_presence":"setBotPresence","share_canvas":"shareCanvas","share_list":"shareList","start_list_export":"startListExport","unarchive_conversation":"unarchiveConversation","unfurl_links":"unfurlLinks","unpin_message":"unpinMessage","unreact":"removeReaction","update":"updateMessage","update_list_items":"updateListItems","update_user_group":"updateUserGroup","update_user_group_members":"updateUserGroupMembers","update_view":"updateView"},"triggers":{"slack_oauth":"oauth"},"params":{"action":{"oauthCredential":"credential"}}},"smartlead":{"namespace":"legacy.smartlead","methods":{"add_email_accounts_to_campaign":"addEmailAccountsToCampaign","add_leads_to_campaign":"addLeadsToCampaign","create_campaign":"createCampaign","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_campaign_webhook":"deleteCampaignWebhook","delete_lead_from_campaign":"deleteLeadFromCampaign","delete_lead_list":"deleteLeadList","duplicate_campaign":"duplicateCampaign","export_campaign_leads":"exportCampaignLeadsCsv","get_campaign":"getCampaign","get_campaign_analytics":"getCampaignAnalytics","get_campaign_analytics_by_date":"getCampaignAnalyticsByDate","get_campaign_lead_statistics":"getCampaignLeadStatistics","get_campaign_mailbox_statistics":"getCampaignMailboxStatistics","get_campaign_sequences":"getCampaignSequences","get_campaign_statistics":"getCampaignStatistics","get_campaign_top_level_analytics_by_date":"getTopLevelAnalyticsByDate","get_campaign_webhook_summary":"getWebhookSummary","get_lead_by_email":"getLeadByEmail","get_lead_by_id":"getLeadById","get_lead_list":"getLeadList","get_lead_message_history":"getLeadMessageHistory","list_campaign_email_accounts":"listCampaignEmailAccounts","list_campaign_leads":"listCampaignLeads","list_campaign_webhooks":"listCampaignWebhooks","list_campaigns":"listCampaigns","list_clients":"listClients","list_email_accounts":"listEmailAccounts","list_inbox_replies":"listInboxReplies","list_lead_activities":"listLeadActivities","list_lead_categories":"listLeadCategories","list_lead_lists":"listLeadLists","mark_lead_complete":"markLeadComplete","pause_lead":"pauseLead","remove_email_accounts_from_campaign":"removeEmailAccountsFromCampaign","resume_lead":"resumeLead","save_campaign_sequences":"saveCampaignSequences","unsubscribe_lead_from_campaign":"unsubscribeLeadFromCampaign","unsubscribe_lead_globally":"unsubscribeLeadGlobally","update_campaign_schedule":"updateCampaignSchedule","update_campaign_settings":"updateCampaignSettings","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead","update_lead_category":"updateLeadCategory","update_lead_list":"updateLeadList","upsert_campaign_webhook":"createOrUpdateWebhook"}},"smartlead_v2":{"namespace":"smartlead","methods":{"add_email_accounts_to_campaign":"addEmailAccountsToCampaign","add_leads_to_campaign":"addLeadsToCampaign","create_campaign":"createCampaign","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_campaign_webhook":"deleteCampaignWebhook","delete_lead_from_campaign":"deleteLeadFromCampaign","delete_lead_list":"deleteLeadList","duplicate_campaign":"duplicateCampaign","export_campaign_leads":"exportCampaignLeadsCsv","get_campaign":"getCampaign","get_campaign_analytics":"getCampaignAnalytics","get_campaign_analytics_by_date":"getCampaignAnalyticsByDate","get_campaign_lead_statistics":"getCampaignLeadStatistics","get_campaign_mailbox_statistics":"getCampaignMailboxStatistics","get_campaign_sequences":"getCampaignSequences","get_campaign_statistics":"getCampaignStatistics","get_campaign_top_level_analytics_by_date":"getTopLevelAnalyticsByDate","get_campaign_webhook_summary":"getWebhookSummary","get_lead_by_email":"getLeadByEmail","get_lead_by_id":"getLeadById","get_lead_list":"getLeadList","get_lead_message_history":"getLeadMessageHistory","list_campaign_email_accounts":"listCampaignEmailAccounts","list_campaign_leads":"listCampaignLeads","list_campaign_webhooks":"listCampaignWebhooks","list_campaigns":"listCampaigns","list_clients":"listClients","list_email_accounts":"listEmailAccounts","list_inbox_replies":"listInboxReplies","list_lead_activities":"listLeadActivities","list_lead_categories":"listLeadCategories","list_lead_lists":"listLeadLists","mark_lead_complete":"markLeadComplete","pause_lead":"pauseLead","remove_email_accounts_from_campaign":"removeEmailAccountsFromCampaign","resume_lead":"resumeLead","save_campaign_sequences":"saveCampaignSequences","unsubscribe_lead_from_campaign":"unsubscribeLeadFromCampaign","unsubscribe_lead_globally":"unsubscribeLeadGlobally","update_campaign_schedule":"updateCampaignSchedule","update_campaign_settings":"updateCampaignSettings","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead","update_lead_category":"updateLeadCategory","update_lead_list":"updateLeadList","upsert_campaign_webhook":"createOrUpdateWebhook"},"params":{"action":{"oauthCredential":"credential"}}},"smtp":{"namespace":"smtp"},"snowflake":{"namespace":"snowflake","methods":{"alter_warehouse":"alterWarehouse","call_procedure":"callProcedure","cancel_statement":"cancelStatement","cancel_task_run":"cancelTaskQuery","cortex_analyst_ask":"askCortexAnalyst","cortex_analyst_feedback":"sendCortexAnalystFeedback","delete_rows":"deleteRows","execute_sql":"executeSql","get_statement":"getStatement","get_task":"getTask","get_task_run":"getTaskRun","get_task_run_output":"getTaskRunOutput","get_warehouse":"getWarehouse","insert_rows":"insertRows","introspect_schema":"introspectSchema","list_copy_history":"listCopyHistory","list_databases":"listDatabases","list_query_history":"listQueryHistory","list_schemas":"listSchemas","list_tables":"listTables","list_task_runs":"listTaskRuns","list_tasks":"listTasks","list_warehouses":"listWarehouses","load_data":"loadData","resume_task":"resumeTask","resume_warehouse":"resumeWarehouse","run_task":"runTask","suspend_task":"suspendTask","suspend_warehouse":"suspendWarehouse","unload_data":"unloadData","update_rows":"updateRows","upsert_rows":"upsertRows"},"params":{"action":{"oauthCredential":"credential"}}},"splunk":{"namespace":"legacy.splunk","methods":{"splunk_cancel_search_job":"cancelSearchJob","splunk_create_search_job":"createSearchJob","splunk_dispatch_saved_search":"dispatchSavedSearch","splunk_get_fired_alerts":"getFiredAlerts","splunk_get_saved_search":"getSavedSearch","splunk_get_search_job":"getSearchJob","splunk_get_search_results":"getSearchResults","splunk_list_apps":"listApps","splunk_list_fired_alerts":"listFiredAlerts","splunk_list_indexes":"listIndexes","splunk_list_saved_searches":"listSavedSearches","splunk_run_search":"runSearch"}},"splunk_v2":{"namespace":"splunk","methods":{"splunk_cancel_search_job":"cancelSearchJob","splunk_create_search_job":"createSearchJob","splunk_dispatch_saved_search":"dispatchSavedSearch","splunk_get_fired_alerts":"getFiredAlerts","splunk_get_saved_search":"getSavedSearch","splunk_get_search_job":"getSearchJob","splunk_get_search_results":"getSearchResults","splunk_list_apps":"listApps","splunk_list_fired_alerts":"listFiredAlerts","splunk_list_indexes":"listIndexes","splunk_list_saved_searches":"listSavedSearches","splunk_run_search":"runSearch"},"params":{"action":{"oauthCredential":"credential"}}},"sportmonks":{"namespace":"legacy.sportmonks","methods":{"core_get_cities":"coreGetCities","core_get_city":"coreGetCityById","core_get_continent":"coreGetContinentById","core_get_continents":"coreGetContinents","core_get_countries":"coreGetCountries","core_get_country":"coreGetCountryById","core_get_entity_filters":"coreGetAllEntityFilters","core_get_my_usage":"coreGetMyUsage","core_get_region":"coreGetRegionById","core_get_regions":"coreGetRegions","core_get_timezones":"coreGetTimezones","core_get_type":"coreGetTypeById","core_get_type_by_entity":"coreGetTypeByEntity","core_get_types":"coreGetTypes","core_search_cities":"coreSearchCities","core_search_countries":"coreSearchCountries","core_search_regions":"coreSearchRegions","football_expected_by_player":"footballGetExpectedXGByPlayer","football_expected_by_team":"footballGetExpectedXGByTeam","football_get_all_commentaries":"footballGetAllCommentaries","football_get_all_fixtures":"footballGetAllFixtures","football_get_all_players":"footballGetAllPlayers","football_get_all_rivals":"footballGetAllRivals","football_get_all_teams":"footballGetAllTeams","football_get_all_transfer_rumours":"footballGetAllTransferRumours","football_get_all_transfers":"footballGetAllTransfers","football_get_brackets_by_season":"footballGetBracketsBySeason","football_get_coach":"footballGetCoachById","football_get_coaches":"footballGetCoaches","football_get_coaches_by_country":"footballGetCoachesByCountry","football_get_commentaries_by_fixture":"footballGetCommentariesByFixture","football_get_current_leagues_by_team":"footballGetCurrentLeaguesByTeam","football_get_expected_lineups_by_player":"footballGetExpectedLineupsByPlayer","football_get_expected_lineups_by_team":"footballGetExpectedLineupsByTeam","football_get_extended_team_squad":"footballGetExtendedTeamSquad","football_get_fixture":"footballGetFixtureById","football_get_fixtures_by_date":"footballGetFixturesByDate","football_get_fixtures_by_date_range":"footballGetFixturesByDateRange","football_get_fixtures_by_date_range_for_team":"footballGetFixturesByDateRangeForTeam","football_get_fixtures_by_ids":"footballGetFixturesByMultipleIds","football_get_grouped_standings_by_round":"footballGetGroupedStandingsByRound","football_get_head_to_head":"footballGetHeadToHead","football_get_inplay_livescores":"footballGetInplayLivescores","football_get_latest_coaches":"footballGetLastUpdatedCoaches","football_get_latest_fixtures":"footballGetLatestUpdatedFixtures","football_get_latest_livescores":"footballGetLatestUpdatedLivescores","football_get_latest_players":"footballGetLastUpdatedPlayers","football_get_latest_totw":"footballGetLatestTeamOfTheWeek","football_get_latest_transfers":"footballGetLatestTransfers","football_get_league":"footballGetLeagueById","football_get_leagues":"footballGetLeagues","football_get_leagues_by_country":"footballGetLeaguesByCountry","football_get_leagues_by_date":"footballGetLeaguesByDate","football_get_leagues_by_team":"footballGetLeaguesByTeam","football_get_live_leagues":"footballGetLiveLeagues","football_get_live_probabilities":"footballGetLiveProbabilities","football_get_live_probabilities_by_fixture":"footballGetLiveProbabilitiesByFixture","football_get_live_standings_by_league":"footballGetLiveStandingsByLeague","football_get_livescores":"footballGetLivescores","football_get_match_facts":"footballGetAllMatchFacts","football_get_match_facts_by_date_range":"footballGetMatchFactsByDateRange","football_get_match_facts_by_fixture":"footballGetMatchFactsByFixture","football_get_match_facts_by_league":"footballGetMatchFactsByLeague","football_get_past_fixtures_by_tv_station":"footballGetPastFixturesByTvStation","football_get_player":"footballGetPlayerById","football_get_players_by_country":"footballGetPlayersByCountry","football_get_postmatch_news":"footballGetPostMatchNews","football_get_postmatch_news_by_season":"footballGetPostMatchNewsBySeason","football_get_predictability_by_league":"footballGetPredictabilityByLeague","football_get_prematch_news":"footballGetPreMatchNews","football_get_prematch_news_by_season":"footballGetPreMatchNewsBySeason","football_get_prematch_news_upcoming":"footballGetPreMatchNewsForUpcomingFixtures","football_get_probabilities":"footballGetProbabilities","football_get_probabilities_by_fixture":"footballGetPredictionsByFixture","football_get_referee":"footballGetRefereeById","football_get_referees":"footballGetReferees","football_get_referees_by_country":"footballGetRefereesByCountry","football_get_referees_by_season":"footballGetRefereesBySeason","football_get_rivals_by_team":"footballGetRivalsByTeam","football_get_round":"footballGetRoundById","football_get_round_statistics":"footballGetRoundStatistics","football_get_rounds":"footballGetRounds","football_get_rounds_by_season":"footballGetRoundsBySeason","football_get_schedules_by_season":"footballGetSchedulesBySeason","football_get_schedules_by_season_and_team":"footballGetSchedulesBySeasonAndTeam","football_get_schedules_by_team":"footballGetSchedulesByTeam","football_get_season":"footballGetSeasonById","football_get_seasons":"footballGetSeasons","football_get_seasons_by_team":"footballGetSeasonsByTeam","football_get_stage":"footballGetStageById","football_get_stage_statistics":"footballGetStageStatistics","football_get_stages":"footballGetStages","football_get_stages_by_season":"footballGetStagesBySeason","football_get_standing_corrections_by_season":"footballGetStandingCorrectionsBySeason","football_get_standings":"footballGetAllStandings","football_get_standings_by_round":"footballGetStandingsByRound","football_get_standings_by_season":"footballGetStandingsBySeason","football_get_state":"footballGetStateById","football_get_states":"footballGetStates","football_get_team":"footballGetTeamById","football_get_team_rankings":"footballGetAllTeamRankings","football_get_team_rankings_by_date":"footballGetTeamRankingsByDate","football_get_team_rankings_by_team":"footballGetTeamRankingsByTeam","football_get_team_squad":"footballGetTeamSquad","football_get_team_squad_by_season":"footballGetTeamSquadBySeason","football_get_teams_by_country":"footballGetTeamsByCountry","football_get_teams_by_season":"footballGetTeamsBySeason","football_get_topscorers_by_season":"footballGetTopscorersBySeason","football_get_topscorers_by_stage":"footballGetTopscorersByStage","football_get_totw":"footballGetAllTeamOfTheWeek","football_get_totw_by_round":"footballGetTeamOfTheWeekByRound","football_get_transfer":"footballGetTransferById","football_get_transfer_rumour":"footballGetTransferRumourById","football_get_transfer_rumours_between_dates":"footballGetTransferRumoursBetweenDates","football_get_transfer_rumours_by_player":"footballGetTransferRumoursByPlayer","football_get_transfer_rumours_by_team":"footballGetTransferRumoursByTeam","football_get_transfers_between_dates":"footballGetTransfersBetweenDates","football_get_transfers_by_player":"footballGetTransfersByPlayer","football_get_transfers_by_team":"footballGetTransfersByTeam","football_get_tv_station":"footballGetTvStationById","football_get_tv_stations":"footballGetTvStations","football_get_tv_stations_by_fixture":"footballGetTvStationsByFixture","football_get_upcoming_fixtures_by_market":"footballGetUpcomingFixturesByMarket","football_get_upcoming_fixtures_by_tv_station":"footballGetUpcomingFixturesByTvStation","football_get_value_bets":"footballGetValueBets","football_get_value_bets_by_fixture":"footballGetValueBetsByFixture","football_get_venue":"footballGetVenueById","football_get_venues":"footballGetVenues","football_get_venues_by_season":"footballGetVenuesBySeason","football_search_coaches":"footballSearchCoaches","football_search_fixtures":"footballSearchFixtures","football_search_leagues":"footballSearchLeagues","football_search_players":"footballSearchPlayers","football_search_referees":"footballSearchReferees","football_search_rounds":"footballSearchRounds","football_search_seasons":"footballSearchSeasons","football_search_stages":"footballSearchStages","football_search_teams":"footballSearchTeams","football_search_venues":"footballSearchVenues","motorsport_get_all_fixtures":"motorsportGetAllFixtures","motorsport_get_current_leagues_by_team":"motorsportGetCurrentLeaguesByTeam","motorsport_get_driver":"motorsportGetDriverById","motorsport_get_driver_standings":"motorsportGetAllDriverStandings","motorsport_get_driver_standings_by_season":"motorsportGetDriverStandingsBySeason","motorsport_get_drivers":"motorsportGetDrivers","motorsport_get_drivers_by_country":"motorsportGetDriversByCountry","motorsport_get_drivers_by_season":"motorsportGetDriversBySeason","motorsport_get_fixture":"motorsportGetFixtureById","motorsport_get_fixtures_by_date":"motorsportGetFixturesByDate","motorsport_get_fixtures_by_date_range":"motorsportGetFixturesByDateRange","motorsport_get_fixtures_by_ids":"motorsportGetFixturesByIds","motorsport_get_laps_by_fixture":"motorsportGetLapsByFixture","motorsport_get_laps_by_fixture_and_driver":"motorsportGetLapsByFixtureAndDriver","motorsport_get_laps_by_fixture_and_lap":"motorsportGetLapsByFixtureAndLapNumber","motorsport_get_latest_laps_by_fixture":"motorsportGetLatestLapsByFixture","motorsport_get_latest_pitstops_by_fixture":"motorsportGetLatestPitstopsByFixture","motorsport_get_latest_stints_by_fixture":"motorsportGetLatestStintsByFixture","motorsport_get_latest_updated_drivers":"motorsportGetLatestUpdatedDrivers","motorsport_get_latest_updated_fixtures":"motorsportGetLatestUpdatedFixtures","motorsport_get_league":"motorsportGetLeagueById","motorsport_get_leagues":"motorsportGetAllLeagues","motorsport_get_leagues_by_country":"motorsportGetLeaguesByCountry","motorsport_get_leagues_by_date":"motorsportGetLeaguesByFixtureDate","motorsport_get_leagues_by_live":"motorsportGetLeaguesByLive","motorsport_get_leagues_by_team":"motorsportGetLeaguesByTeam","motorsport_get_livescores":"motorsportGetLivescores","motorsport_get_pitstops_by_fixture":"motorsportGetPitstopsByFixture","motorsport_get_pitstops_by_fixture_and_driver":"motorsportGetPitstopsByFixtureAndDriver","motorsport_get_pitstops_by_fixture_and_lap":"motorsportGetPitstopsByFixtureAndLapNumber","motorsport_get_race_results_by_season_and_driver":"motorsportGetRaceResultsBySeasonAndDriver","motorsport_get_race_results_by_season_and_team":"motorsportGetRaceResultsBySeasonAndTeam","motorsport_get_schedules_by_season":"motorsportGetSchedulesBySeason","motorsport_get_season":"motorsportGetSeasonById","motorsport_get_seasons":"motorsportGetAllSeasons","motorsport_get_stage":"motorsportGetStageById","motorsport_get_stages":"motorsportGetAllStages","motorsport_get_stages_by_season":"motorsportGetStagesBySeason","motorsport_get_state":"motorsportGetStateById","motorsport_get_states":"motorsportGetAllStates","motorsport_get_stints_by_fixture":"motorsportGetStintsByFixture","motorsport_get_stints_by_fixture_and_driver":"motorsportGetStintsByFixtureAndDriver","motorsport_get_stints_by_fixture_and_stint":"motorsportGetStintsByFixtureAndStintNumber","motorsport_get_team":"motorsportGetTeamById","motorsport_get_team_standings":"motorsportGetAllTeamStandings","motorsport_get_team_standings_by_season":"motorsportGetTeamStandingsBySeason","motorsport_get_teams":"motorsportGetTeams","motorsport_get_teams_by_country":"motorsportGetTeamsByCountry","motorsport_get_teams_by_season":"motorsportGetTeamsBySeason","motorsport_get_venue":"motorsportGetVenueById","motorsport_get_venues":"motorsportGetVenues","motorsport_get_venues_by_season":"motorsportGetVenuesBySeason","motorsport_search_drivers":"motorsportSearchDrivers","motorsport_search_leagues":"motorsportSearchLeagues","motorsport_search_stages":"motorsportSearchStages","motorsport_search_teams":"motorsportSearchTeams","motorsport_search_venues":"motorsportSearchVenues","odds_get_all_historical_odds":"oddsGetAllHistoricalOdds","odds_get_all_inplay_odds":"oddsGetAllInPlayOdds","odds_get_all_pre_match_odds":"oddsGetAllPreMatchOdds","odds_get_all_premium_odds":"oddsGetAllPremiumOdds","odds_get_bookmaker":"oddsGetBookmakerById","odds_get_bookmaker_event_ids_by_fixture":"oddsGetBookmakerEventIdsByFixture","odds_get_bookmakers":"oddsGetBookmakers","odds_get_bookmakers_by_fixture":"oddsGetBookmakersByFixture","odds_get_inplay_odds_by_fixture":"oddsGetInPlayOddsByFixture","odds_get_inplay_odds_by_fixture_and_bookmaker":"oddsGetInPlayOddsByFixtureAndBookmaker","odds_get_inplay_odds_by_fixture_and_market":"oddsGetInPlayOddsByFixtureAndMarket","odds_get_last_updated_inplay_odds":"oddsGetLastUpdatedInPlayOdds","odds_get_last_updated_pre_match_odds":"oddsGetLastUpdatedPreMatchOdds","odds_get_market":"oddsGetMarketById","odds_get_markets":"oddsGetMarkets","odds_get_pre_match_odds_by_fixture":"oddsGetPreMatchOddsByFixture","odds_get_pre_match_odds_by_fixture_and_bookmaker":"oddsGetPreMatchOddsByFixtureAndBookmaker","odds_get_pre_match_odds_by_fixture_and_market":"oddsGetPreMatchOddsByFixtureAndMarket","odds_get_premium_odds_by_fixture":"oddsGetPremiumOddsByFixture","odds_get_premium_odds_by_fixture_and_bookmaker":"oddsGetPremiumOddsByFixtureAndBookmaker","odds_get_premium_odds_by_fixture_and_market":"oddsGetPremiumOddsByFixtureAndMarket","odds_get_updated_historical_odds_between":"oddsGetUpdatedHistoricalOddsBetweenTimeRange","odds_get_updated_premium_odds_between":"oddsGetUpdatedPremiumOddsBetweenTimeRange","odds_search_bookmakers":"oddsSearchBookmakers","odds_search_markets":"oddsSearchMarkets"}},"sportmonks_v2":{"namespace":"sportmonks","methods":{"core_get_cities":"coreGetCities","core_get_city":"coreGetCityById","core_get_continent":"coreGetContinentById","core_get_continents":"coreGetContinents","core_get_countries":"coreGetCountries","core_get_country":"coreGetCountryById","core_get_entity_filters":"coreGetAllEntityFilters","core_get_my_usage":"coreGetMyUsage","core_get_region":"coreGetRegionById","core_get_regions":"coreGetRegions","core_get_timezones":"coreGetTimezones","core_get_type":"coreGetTypeById","core_get_type_by_entity":"coreGetTypeByEntity","core_get_types":"coreGetTypes","core_search_cities":"coreSearchCities","core_search_countries":"coreSearchCountries","core_search_regions":"coreSearchRegions","football_expected_by_player":"footballGetExpectedXGByPlayer","football_expected_by_team":"footballGetExpectedXGByTeam","football_get_all_commentaries":"footballGetAllCommentaries","football_get_all_fixtures":"footballGetAllFixtures","football_get_all_players":"footballGetAllPlayers","football_get_all_rivals":"footballGetAllRivals","football_get_all_teams":"footballGetAllTeams","football_get_all_transfer_rumours":"footballGetAllTransferRumours","football_get_all_transfers":"footballGetAllTransfers","football_get_brackets_by_season":"footballGetBracketsBySeason","football_get_coach":"footballGetCoachById","football_get_coaches":"footballGetCoaches","football_get_coaches_by_country":"footballGetCoachesByCountry","football_get_commentaries_by_fixture":"footballGetCommentariesByFixture","football_get_current_leagues_by_team":"footballGetCurrentLeaguesByTeam","football_get_expected_lineups_by_player":"footballGetExpectedLineupsByPlayer","football_get_expected_lineups_by_team":"footballGetExpectedLineupsByTeam","football_get_extended_team_squad":"footballGetExtendedTeamSquad","football_get_fixture":"footballGetFixtureById","football_get_fixtures_by_date":"footballGetFixturesByDate","football_get_fixtures_by_date_range":"footballGetFixturesByDateRange","football_get_fixtures_by_date_range_for_team":"footballGetFixturesByDateRangeForTeam","football_get_fixtures_by_ids":"footballGetFixturesByMultipleIds","football_get_grouped_standings_by_round":"footballGetGroupedStandingsByRound","football_get_head_to_head":"footballGetHeadToHead","football_get_inplay_livescores":"footballGetInplayLivescores","football_get_latest_coaches":"footballGetLastUpdatedCoaches","football_get_latest_fixtures":"footballGetLatestUpdatedFixtures","football_get_latest_livescores":"footballGetLatestUpdatedLivescores","football_get_latest_players":"footballGetLastUpdatedPlayers","football_get_latest_totw":"footballGetLatestTeamOfTheWeek","football_get_latest_transfers":"footballGetLatestTransfers","football_get_league":"footballGetLeagueById","football_get_leagues":"footballGetLeagues","football_get_leagues_by_country":"footballGetLeaguesByCountry","football_get_leagues_by_date":"footballGetLeaguesByDate","football_get_leagues_by_team":"footballGetLeaguesByTeam","football_get_live_leagues":"footballGetLiveLeagues","football_get_live_probabilities":"footballGetLiveProbabilities","football_get_live_probabilities_by_fixture":"footballGetLiveProbabilitiesByFixture","football_get_live_standings_by_league":"footballGetLiveStandingsByLeague","football_get_livescores":"footballGetLivescores","football_get_match_facts":"footballGetAllMatchFacts","football_get_match_facts_by_date_range":"footballGetMatchFactsByDateRange","football_get_match_facts_by_fixture":"footballGetMatchFactsByFixture","football_get_match_facts_by_league":"footballGetMatchFactsByLeague","football_get_past_fixtures_by_tv_station":"footballGetPastFixturesByTvStation","football_get_player":"footballGetPlayerById","football_get_players_by_country":"footballGetPlayersByCountry","football_get_postmatch_news":"footballGetPostMatchNews","football_get_postmatch_news_by_season":"footballGetPostMatchNewsBySeason","football_get_predictability_by_league":"footballGetPredictabilityByLeague","football_get_prematch_news":"footballGetPreMatchNews","football_get_prematch_news_by_season":"footballGetPreMatchNewsBySeason","football_get_prematch_news_upcoming":"footballGetPreMatchNewsForUpcomingFixtures","football_get_probabilities":"footballGetProbabilities","football_get_probabilities_by_fixture":"footballGetPredictionsByFixture","football_get_referee":"footballGetRefereeById","football_get_referees":"footballGetReferees","football_get_referees_by_country":"footballGetRefereesByCountry","football_get_referees_by_season":"footballGetRefereesBySeason","football_get_rivals_by_team":"footballGetRivalsByTeam","football_get_round":"footballGetRoundById","football_get_round_statistics":"footballGetRoundStatistics","football_get_rounds":"footballGetRounds","football_get_rounds_by_season":"footballGetRoundsBySeason","football_get_schedules_by_season":"footballGetSchedulesBySeason","football_get_schedules_by_season_and_team":"footballGetSchedulesBySeasonAndTeam","football_get_schedules_by_team":"footballGetSchedulesByTeam","football_get_season":"footballGetSeasonById","football_get_seasons":"footballGetSeasons","football_get_seasons_by_team":"footballGetSeasonsByTeam","football_get_stage":"footballGetStageById","football_get_stage_statistics":"footballGetStageStatistics","football_get_stages":"footballGetStages","football_get_stages_by_season":"footballGetStagesBySeason","football_get_standing_corrections_by_season":"footballGetStandingCorrectionsBySeason","football_get_standings":"footballGetAllStandings","football_get_standings_by_round":"footballGetStandingsByRound","football_get_standings_by_season":"footballGetStandingsBySeason","football_get_state":"footballGetStateById","football_get_states":"footballGetStates","football_get_team":"footballGetTeamById","football_get_team_rankings":"footballGetAllTeamRankings","football_get_team_rankings_by_date":"footballGetTeamRankingsByDate","football_get_team_rankings_by_team":"footballGetTeamRankingsByTeam","football_get_team_squad":"footballGetTeamSquad","football_get_team_squad_by_season":"footballGetTeamSquadBySeason","football_get_teams_by_country":"footballGetTeamsByCountry","football_get_teams_by_season":"footballGetTeamsBySeason","football_get_topscorers_by_season":"footballGetTopscorersBySeason","football_get_topscorers_by_stage":"footballGetTopscorersByStage","football_get_totw":"footballGetAllTeamOfTheWeek","football_get_totw_by_round":"footballGetTeamOfTheWeekByRound","football_get_transfer":"footballGetTransferById","football_get_transfer_rumour":"footballGetTransferRumourById","football_get_transfer_rumours_between_dates":"footballGetTransferRumoursBetweenDates","football_get_transfer_rumours_by_player":"footballGetTransferRumoursByPlayer","football_get_transfer_rumours_by_team":"footballGetTransferRumoursByTeam","football_get_transfers_between_dates":"footballGetTransfersBetweenDates","football_get_transfers_by_player":"footballGetTransfersByPlayer","football_get_transfers_by_team":"footballGetTransfersByTeam","football_get_tv_station":"footballGetTvStationById","football_get_tv_stations":"footballGetTvStations","football_get_tv_stations_by_fixture":"footballGetTvStationsByFixture","football_get_upcoming_fixtures_by_market":"footballGetUpcomingFixturesByMarket","football_get_upcoming_fixtures_by_tv_station":"footballGetUpcomingFixturesByTvStation","football_get_value_bets":"footballGetValueBets","football_get_value_bets_by_fixture":"footballGetValueBetsByFixture","football_get_venue":"footballGetVenueById","football_get_venues":"footballGetVenues","football_get_venues_by_season":"footballGetVenuesBySeason","football_search_coaches":"footballSearchCoaches","football_search_fixtures":"footballSearchFixtures","football_search_leagues":"footballSearchLeagues","football_search_players":"footballSearchPlayers","football_search_referees":"footballSearchReferees","football_search_rounds":"footballSearchRounds","football_search_seasons":"footballSearchSeasons","football_search_stages":"footballSearchStages","football_search_teams":"footballSearchTeams","football_search_venues":"footballSearchVenues","motorsport_get_all_fixtures":"motorsportGetAllFixtures","motorsport_get_current_leagues_by_team":"motorsportGetCurrentLeaguesByTeam","motorsport_get_driver":"motorsportGetDriverById","motorsport_get_driver_standings":"motorsportGetAllDriverStandings","motorsport_get_driver_standings_by_season":"motorsportGetDriverStandingsBySeason","motorsport_get_drivers":"motorsportGetDrivers","motorsport_get_drivers_by_country":"motorsportGetDriversByCountry","motorsport_get_drivers_by_season":"motorsportGetDriversBySeason","motorsport_get_fixture":"motorsportGetFixtureById","motorsport_get_fixtures_by_date":"motorsportGetFixturesByDate","motorsport_get_fixtures_by_date_range":"motorsportGetFixturesByDateRange","motorsport_get_fixtures_by_ids":"motorsportGetFixturesByIds","motorsport_get_laps_by_fixture":"motorsportGetLapsByFixture","motorsport_get_laps_by_fixture_and_driver":"motorsportGetLapsByFixtureAndDriver","motorsport_get_laps_by_fixture_and_lap":"motorsportGetLapsByFixtureAndLapNumber","motorsport_get_latest_laps_by_fixture":"motorsportGetLatestLapsByFixture","motorsport_get_latest_pitstops_by_fixture":"motorsportGetLatestPitstopsByFixture","motorsport_get_latest_stints_by_fixture":"motorsportGetLatestStintsByFixture","motorsport_get_latest_updated_drivers":"motorsportGetLatestUpdatedDrivers","motorsport_get_latest_updated_fixtures":"motorsportGetLatestUpdatedFixtures","motorsport_get_league":"motorsportGetLeagueById","motorsport_get_leagues":"motorsportGetAllLeagues","motorsport_get_leagues_by_country":"motorsportGetLeaguesByCountry","motorsport_get_leagues_by_date":"motorsportGetLeaguesByFixtureDate","motorsport_get_leagues_by_live":"motorsportGetLeaguesByLive","motorsport_get_leagues_by_team":"motorsportGetLeaguesByTeam","motorsport_get_livescores":"motorsportGetLivescores","motorsport_get_pitstops_by_fixture":"motorsportGetPitstopsByFixture","motorsport_get_pitstops_by_fixture_and_driver":"motorsportGetPitstopsByFixtureAndDriver","motorsport_get_pitstops_by_fixture_and_lap":"motorsportGetPitstopsByFixtureAndLapNumber","motorsport_get_race_results_by_season_and_driver":"motorsportGetRaceResultsBySeasonAndDriver","motorsport_get_race_results_by_season_and_team":"motorsportGetRaceResultsBySeasonAndTeam","motorsport_get_schedules_by_season":"motorsportGetSchedulesBySeason","motorsport_get_season":"motorsportGetSeasonById","motorsport_get_seasons":"motorsportGetAllSeasons","motorsport_get_stage":"motorsportGetStageById","motorsport_get_stages":"motorsportGetAllStages","motorsport_get_stages_by_season":"motorsportGetStagesBySeason","motorsport_get_state":"motorsportGetStateById","motorsport_get_states":"motorsportGetAllStates","motorsport_get_stints_by_fixture":"motorsportGetStintsByFixture","motorsport_get_stints_by_fixture_and_driver":"motorsportGetStintsByFixtureAndDriver","motorsport_get_stints_by_fixture_and_stint":"motorsportGetStintsByFixtureAndStintNumber","motorsport_get_team":"motorsportGetTeamById","motorsport_get_team_standings":"motorsportGetAllTeamStandings","motorsport_get_team_standings_by_season":"motorsportGetTeamStandingsBySeason","motorsport_get_teams":"motorsportGetTeams","motorsport_get_teams_by_country":"motorsportGetTeamsByCountry","motorsport_get_teams_by_season":"motorsportGetTeamsBySeason","motorsport_get_venue":"motorsportGetVenueById","motorsport_get_venues":"motorsportGetVenues","motorsport_get_venues_by_season":"motorsportGetVenuesBySeason","motorsport_search_drivers":"motorsportSearchDrivers","motorsport_search_leagues":"motorsportSearchLeagues","motorsport_search_stages":"motorsportSearchStages","motorsport_search_teams":"motorsportSearchTeams","motorsport_search_venues":"motorsportSearchVenues","odds_get_all_historical_odds":"oddsGetAllHistoricalOdds","odds_get_all_inplay_odds":"oddsGetAllInPlayOdds","odds_get_all_pre_match_odds":"oddsGetAllPreMatchOdds","odds_get_all_premium_odds":"oddsGetAllPremiumOdds","odds_get_bookmaker":"oddsGetBookmakerById","odds_get_bookmaker_event_ids_by_fixture":"oddsGetBookmakerEventIdsByFixture","odds_get_bookmakers":"oddsGetBookmakers","odds_get_bookmakers_by_fixture":"oddsGetBookmakersByFixture","odds_get_inplay_odds_by_fixture":"oddsGetInPlayOddsByFixture","odds_get_inplay_odds_by_fixture_and_bookmaker":"oddsGetInPlayOddsByFixtureAndBookmaker","odds_get_inplay_odds_by_fixture_and_market":"oddsGetInPlayOddsByFixtureAndMarket","odds_get_last_updated_inplay_odds":"oddsGetLastUpdatedInPlayOdds","odds_get_last_updated_pre_match_odds":"oddsGetLastUpdatedPreMatchOdds","odds_get_market":"oddsGetMarketById","odds_get_markets":"oddsGetMarkets","odds_get_pre_match_odds_by_fixture":"oddsGetPreMatchOddsByFixture","odds_get_pre_match_odds_by_fixture_and_bookmaker":"oddsGetPreMatchOddsByFixtureAndBookmaker","odds_get_pre_match_odds_by_fixture_and_market":"oddsGetPreMatchOddsByFixtureAndMarket","odds_get_premium_odds_by_fixture":"oddsGetPremiumOddsByFixture","odds_get_premium_odds_by_fixture_and_bookmaker":"oddsGetPremiumOddsByFixtureAndBookmaker","odds_get_premium_odds_by_fixture_and_market":"oddsGetPremiumOddsByFixtureAndMarket","odds_get_updated_historical_odds_between":"oddsGetUpdatedHistoricalOddsBetweenTimeRange","odds_get_updated_premium_odds_between":"oddsGetUpdatedPremiumOddsBetweenTimeRange","odds_search_bookmakers":"oddsSearchBookmakers","odds_search_markets":"oddsSearchMarkets"},"params":{"action":{"oauthCredential":"credential"}}},"spotify":{"namespace":"legacy.spotify","methods":{"spotify_add_playlist_cover":"addPlaylistCover","spotify_add_to_queue":"addToQueue","spotify_add_tracks_to_playlist":"addTracksToPlaylist","spotify_check_following":"checkFollowing","spotify_check_playlist_followers":"checkPlaylistFollowers","spotify_check_saved_albums":"checkSavedAlbums","spotify_check_saved_audiobooks":"checkSavedAudiobooks","spotify_check_saved_episodes":"checkSavedEpisodes","spotify_check_saved_shows":"checkSavedShows","spotify_check_saved_tracks":"checkSavedTracks","spotify_create_playlist":"createPlaylist","spotify_follow_artists":"followArtists","spotify_follow_playlist":"followPlaylist","spotify_get_album":"getAlbum","spotify_get_album_tracks":"getAlbumTracks","spotify_get_albums":"getMultipleAlbums","spotify_get_artist":"getArtist","spotify_get_artist_albums":"getArtistAlbums","spotify_get_artist_top_tracks":"getArtistTopTracks","spotify_get_artists":"getMultipleArtists","spotify_get_audiobook":"getAudiobook","spotify_get_audiobook_chapters":"getAudiobookChapters","spotify_get_audiobooks":"getMultipleAudiobooks","spotify_get_categories":"getCategories","spotify_get_current_user":"getMyProfile","spotify_get_currently_playing":"getCurrentlyPlaying","spotify_get_devices":"getDevices","spotify_get_episode":"getEpisode","spotify_get_episodes":"getMultipleEpisodes","spotify_get_followed_artists":"getFollowedArtists","spotify_get_markets":"getAvailableMarkets","spotify_get_new_releases":"getNewReleases","spotify_get_playback_state":"getPlaybackState","spotify_get_playlist":"getPlaylist","spotify_get_playlist_cover":"getPlaylistCover","spotify_get_playlist_tracks":"getPlaylistTracks","spotify_get_queue":"getQueue","spotify_get_recently_played":"getRecentlyPlayed","spotify_get_saved_albums":"getSavedAlbums","spotify_get_saved_audiobooks":"getSavedAudiobooks","spotify_get_saved_episodes":"getSavedEpisodes","spotify_get_saved_shows":"getSavedShows","spotify_get_saved_tracks":"getSavedTracks","spotify_get_show":"getShow","spotify_get_show_episodes":"getShowEpisodes","spotify_get_shows":"getMultipleShows","spotify_get_top_artists":"getMyTopArtists","spotify_get_top_tracks":"getMyTopTracks","spotify_get_track":"getTrack","spotify_get_tracks":"getMultipleTracks","spotify_get_user_playlists":"getMyPlaylists","spotify_get_user_profile":"getUserProfile","spotify_pause":"pause","spotify_play":"play","spotify_remove_saved_albums":"removeSavedAlbums","spotify_remove_saved_audiobooks":"removeSavedAudiobooks","spotify_remove_saved_episodes":"removeSavedEpisodes","spotify_remove_saved_shows":"removeSavedShows","spotify_remove_saved_tracks":"removeSavedTracks","spotify_remove_tracks_from_playlist":"removeTracksFromPlaylist","spotify_reorder_playlist_items":"reorderPlaylistItems","spotify_replace_playlist_items":"replacePlaylistItems","spotify_save_albums":"saveAlbums","spotify_save_audiobooks":"saveAudiobooks","spotify_save_episodes":"saveEpisodes","spotify_save_shows":"saveShows","spotify_save_tracks":"saveTracks","spotify_search":"search","spotify_seek":"seek","spotify_set_repeat":"setRepeat","spotify_set_shuffle":"setShuffle","spotify_set_volume":"setVolume","spotify_skip_next":"skipToNext","spotify_skip_previous":"skipToPrevious","spotify_transfer_playback":"transferPlayback","spotify_unfollow_artists":"unfollowArtists","spotify_unfollow_playlist":"unfollowPlaylist","spotify_update_playlist":"updatePlaylist"},"params":{"action":{"oauthCredential":"credential"}}},"sqs":{"namespace":"legacy.sqs","methods":{"cancel_message_move_task":"cancelMessageMoveTask","change_message_visibility":"changeMessageVisibility","change_message_visibility_batch":"changeMessageVisibilityBatch","create_queue":"createQueue","delete_message":"deleteMessage","delete_message_batch":"deleteMessageBatch","delete_queue":"deleteQueue","get_queue_attributes":"getQueueAttributes","get_queue_url":"getQueueUrl","list_dead_letter_source_queues":"listDeadLetterSourceQueues","list_message_move_tasks":"listMessageMoveTasks","list_queue_tags":"listQueueTags","list_queues":"listQueues","purge_queue":"purgeQueue","receive_message":"receiveMessage","send":"sendMessage","send_message_batch":"sendMessageBatch","set_queue_attributes":"setQueueAttributes","start_message_move_task":"startMessageMoveTask","tag_queue":"tagQueue","untag_queue":"untagQueue"}},"sqs_v2":{"namespace":"sqs","methods":{"cancel_message_move_task":"cancelMessageMoveTask","change_message_visibility":"changeMessageVisibility","change_message_visibility_batch":"changeMessageVisibilityBatch","create_queue":"createQueue","delete_message":"deleteMessage","delete_message_batch":"deleteMessageBatch","delete_queue":"deleteQueue","get_queue_attributes":"getQueueAttributes","get_queue_url":"getQueueUrl","list_dead_letter_source_queues":"listDeadLetterSourceQueues","list_message_move_tasks":"listMessageMoveTasks","list_queue_tags":"listQueueTags","list_queues":"listQueues","purge_queue":"purgeQueue","receive_message":"receiveMessage","send":"sendMessage","send_message_batch":"sendMessageBatch","set_queue_attributes":"setQueueAttributes","start_message_move_task":"startMessageMoveTask","tag_queue":"tagQueue","untag_queue":"untagQueue"},"params":{"action":{"oauthCredential":"credential"}}},"square":{"namespace":"legacy.square","methods":{"batch_retrieve_inventory_counts":"batchRetrieveInventoryCounts","cancel_invoice":"cancelInvoice","cancel_payment":"cancelPayment","complete_payment":"completePayment","create_catalog_image":"createCatalogImage","create_customer":"createCustomer","create_invoice":"createInvoice","create_order":"createOrder","create_payment":"createPayment","delete_catalog_object":"deleteCatalogObject","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","get_catalog_object":"getCatalogObject","get_customer":"getCustomer","get_invoice":"getInvoice","get_location":"getLocation","get_order":"getOrder","get_payment":"getPayment","get_refund":"getRefund","list_catalog":"listCatalog","list_customers":"listCustomers","list_invoices":"listInvoices","list_locations":"listLocations","list_payments":"listPayments","list_refunds":"listRefunds","pay_order":"payOrder","publish_invoice":"publishInvoice","refund_payment":"refundPayment","search_catalog_objects":"searchCatalogObjects","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_orders":"searchOrders","update_customer":"updateCustomer","upsert_catalog_object":"upsertCatalogObject"}},"square_v2":{"namespace":"square","methods":{"batch_retrieve_inventory_counts":"batchRetrieveInventoryCounts","cancel_invoice":"cancelInvoice","cancel_payment":"cancelPayment","complete_payment":"completePayment","create_catalog_image":"createCatalogImage","create_customer":"createCustomer","create_invoice":"createInvoice","create_order":"createOrder","create_payment":"createPayment","delete_catalog_object":"deleteCatalogObject","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","get_catalog_object":"getCatalogObject","get_customer":"getCustomer","get_invoice":"getInvoice","get_location":"getLocation","get_order":"getOrder","get_payment":"getPayment","get_refund":"getRefund","list_catalog":"listCatalog","list_customers":"listCustomers","list_invoices":"listInvoices","list_locations":"listLocations","list_payments":"listPayments","list_refunds":"listRefunds","pay_order":"payOrder","publish_invoice":"publishInvoice","refund_payment":"refundPayment","search_catalog_objects":"searchCatalogObjects","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_orders":"searchOrders","update_customer":"updateCustomer","upsert_catalog_object":"upsertCatalogObject"},"params":{"action":{"oauthCredential":"credential"}}},"ssh":{"namespace":"legacy.ssh","methods":{"ssh_check_command_exists":"checkCommandExists","ssh_check_file_exists":"checkFileDirectoryExists","ssh_create_directory":"createDirectory","ssh_delete_file":"deleteFileDirectory","ssh_download_file":"downloadFile","ssh_execute_command":"executeCommand","ssh_execute_script":"executeScript","ssh_get_system_info":"getSystemInfo","ssh_list_directory":"listDirectory","ssh_move_rename":"moveRename","ssh_read_file_content":"readFileContent","ssh_upload_file":"uploadFile","ssh_write_file_content":"writeFileContent"}},"ssh_v2":{"namespace":"ssh","methods":{"ssh_check_command_exists":"checkCommandExists","ssh_check_file_exists":"checkFileDirectoryExists","ssh_create_directory":"createDirectory","ssh_delete_file":"deleteFileDirectory","ssh_download_file":"downloadFile","ssh_execute_command":"executeCommand","ssh_execute_script":"executeScript","ssh_get_system_info":"getSystemInfo","ssh_list_directory":"listDirectory","ssh_move_rename":"moveRename","ssh_read_file_content":"readFileContent","ssh_upload_file":"uploadFile","ssh_write_file_content":"writeFileContent"}},"ssm":{"namespace":"legacy.ssm","methods":{"cancel_command":"cancelCommand","delete_parameter":"deleteParameter","describe_automation_executions":"describeAutomationExecutions","describe_instance_information":"describeInstanceInformation","describe_instance_patch_states":"describeInstancePatchStates","describe_instance_patches":"describeInstancePatches","describe_parameters":"describeParameters","get_automation_execution":"getAutomationExecution","get_command_invocation":"getCommandInvocation","get_document":"getDocument","get_parameter":"getParameter","get_parameters":"getParameters","get_parameters_by_path":"getParametersByPath","list_command_invocations":"listCommandInvocations","list_commands":"listCommands","list_compliance_items":"listComplianceItems","list_compliance_summaries":"listComplianceSummaries","list_documents":"listDocuments","put_parameter":"putParameter","send_command":"sendCommand","start_automation_execution":"startAutomationExecution","stop_automation_execution":"stopAutomationExecution"}},"ssm_v2":{"namespace":"ssm","methods":{"cancel_command":"cancelCommand","delete_parameter":"deleteParameter","describe_automation_executions":"describeAutomationExecutions","describe_instance_information":"describeInstanceInformation","describe_instance_patch_states":"describeInstancePatchStates","describe_instance_patches":"describeInstancePatches","describe_parameters":"describeParameters","get_automation_execution":"getAutomationExecution","get_command_invocation":"getCommandInvocation","get_document":"getDocument","get_parameter":"getParameter","get_parameters":"getParameters","get_parameters_by_path":"getParametersByPath","list_command_invocations":"listCommandInvocations","list_commands":"listCommands","list_compliance_items":"listComplianceItems","list_compliance_summaries":"listComplianceSummaries","list_documents":"listDocuments","put_parameter":"putParameter","send_command":"sendCommand","start_automation_execution":"startAutomationExecution","stop_automation_execution":"stopAutomationExecution"},"params":{"action":{"oauthCredential":"credential"}}},"stagehand":{"namespace":"stagehand","methods":{"agent":"runAgent","extract":"extractData"}},"start_trigger":{"namespace":"trigger.start"},"starter":{"namespace":"legacy.starter"},"stripe":{"namespace":"legacy.stripe","methods":{"cancel_payment_intent":"cancelPaymentIntent","cancel_subscription":"cancelSubscription","capture_charge":"captureCharge","capture_payment_intent":"capturePaymentIntent","confirm_payment_intent":"confirmPaymentIntent","create_charge":"createCharge","create_customer":"createCustomer","create_invoice":"createInvoice","create_payment_intent":"createPaymentIntent","create_price":"createPrice","create_product":"createProduct","create_subscription":"createSubscription","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","delete_product":"deleteProduct","finalize_invoice":"finalizeInvoice","list_charges":"listCharges","list_customers":"listCustomers","list_events":"listEvents","list_invoices":"listInvoices","list_payment_intents":"listPaymentIntents","list_prices":"listPrices","list_products":"listProducts","list_subscriptions":"listSubscriptions","pay_invoice":"payInvoice","resume_subscription":"resumeSubscription","retrieve_charge":"retrieveCharge","retrieve_customer":"retrieveCustomer","retrieve_event":"retrieveEvent","retrieve_invoice":"retrieveInvoice","retrieve_payment_intent":"retrievePaymentIntent","retrieve_price":"retrievePrice","retrieve_product":"retrieveProduct","retrieve_subscription":"retrieveSubscription","search_charges":"searchCharges","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_payment_intents":"searchPaymentIntents","search_prices":"searchPrices","search_products":"searchProducts","search_subscriptions":"searchSubscriptions","send_invoice":"sendInvoice","update_charge":"updateCharge","update_customer":"updateCustomer","update_invoice":"updateInvoice","update_payment_intent":"updatePaymentIntent","update_price":"updatePrice","update_product":"updateProduct","update_subscription":"updateSubscription","void_invoice":"voidInvoice"},"triggers":{"stripe_webhook":"webhook"}},"stripe_v2":{"namespace":"stripe","methods":{"cancel_payment_intent":"cancelPaymentIntent","cancel_subscription":"cancelSubscription","capture_charge":"captureCharge","capture_payment_intent":"capturePaymentIntent","confirm_payment_intent":"confirmPaymentIntent","create_charge":"createCharge","create_customer":"createCustomer","create_invoice":"createInvoice","create_payment_intent":"createPaymentIntent","create_price":"createPrice","create_product":"createProduct","create_subscription":"createSubscription","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","delete_product":"deleteProduct","finalize_invoice":"finalizeInvoice","list_charges":"listCharges","list_customers":"listCustomers","list_events":"listEvents","list_invoices":"listInvoices","list_payment_intents":"listPaymentIntents","list_prices":"listPrices","list_products":"listProducts","list_subscriptions":"listSubscriptions","pay_invoice":"payInvoice","resume_subscription":"resumeSubscription","retrieve_charge":"retrieveCharge","retrieve_customer":"retrieveCustomer","retrieve_event":"retrieveEvent","retrieve_invoice":"retrieveInvoice","retrieve_payment_intent":"retrievePaymentIntent","retrieve_price":"retrievePrice","retrieve_product":"retrieveProduct","retrieve_subscription":"retrieveSubscription","search_charges":"searchCharges","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_payment_intents":"searchPaymentIntents","search_prices":"searchPrices","search_products":"searchProducts","search_subscriptions":"searchSubscriptions","send_invoice":"sendInvoice","update_charge":"updateCharge","update_customer":"updateCustomer","update_invoice":"updateInvoice","update_payment_intent":"updatePaymentIntent","update_price":"updatePrice","update_product":"updateProduct","update_subscription":"updateSubscription","void_invoice":"voidInvoice"},"triggers":{"stripe_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"sts":{"namespace":"legacy.sts","methods":{"assume_role":"assumeRole","assume_role_with_saml":"assumeRoleWithSaml","assume_role_with_web_identity":"assumeRoleWithWebIdentity","get_access_key_info":"getAccessKeyInfo","get_caller_identity":"getCallerIdentity","get_session_token":"getSessionToken"}},"sts_v2":{"namespace":"sts","methods":{"assume_role":"assumeRole","assume_role_with_saml":"assumeRoleWithSaml","assume_role_with_web_identity":"assumeRoleWithWebIdentity","get_access_key_info":"getAccessKeyInfo","get_caller_identity":"getCallerIdentity","get_session_token":"getSessionToken"},"params":{"action":{"oauthCredential":"credential"}}},"stt":{"namespace":"legacy.stt"},"stt_v2":{"namespace":"stt"},"supabase":{"namespace":"legacy.supabase","methods":{"count":"countRows","delete":"deleteARow","get_row":"getARow","insert":"createARow","introspect":"introspectSchema","invoke_function":"invokeEdgeFunction","query":"getManyRows","rpc":"callRpcFunction","storage_copy":"storageCopyFile","storage_create_bucket":"storageCreateBucket","storage_create_signed_upload_url":"storageCreateSignedUploadUrl","storage_create_signed_url":"storageCreateSignedUrl","storage_delete":"storageDeleteFiles","storage_delete_bucket":"storageDeleteBucket","storage_download":"storageDownloadFile","storage_empty_bucket":"storageEmptyBucket","storage_get_public_url":"storageGetPublicUrl","storage_list":"storageListFiles","storage_list_buckets":"storageListBuckets","storage_move":"storageMoveFile","storage_update_bucket":"storageUpdateBucket","storage_upload":"storageUploadFile","text_search":"fullTextSearch","update":"updateARow","upsert":"upsertARow","vector_search":"vectorSearch"}},"supabase_v2":{"namespace":"supabase","methods":{"count":"countRows","delete":"deleteARow","get_row":"getARow","insert":"createARow","introspect":"introspectSchema","invoke_function":"invokeEdgeFunction","query":"getManyRows","rpc":"callRpcFunction","storage_copy":"storageCopyFile","storage_create_bucket":"storageCreateBucket","storage_create_signed_upload_url":"storageCreateSignedUploadUrl","storage_create_signed_url":"storageCreateSignedUrl","storage_delete":"storageDeleteFiles","storage_delete_bucket":"storageDeleteBucket","storage_download":"storageDownloadFile","storage_empty_bucket":"storageEmptyBucket","storage_get_public_url":"storageGetPublicUrl","storage_list":"storageListFiles","storage_list_buckets":"storageListBuckets","storage_move":"storageMoveFile","storage_update_bucket":"storageUpdateBucket","storage_upload":"storageUploadFile","text_search":"fullTextSearch","update":"updateARow","upsert":"upsertARow","vector_search":"vectorSearch"},"params":{"action":{"oauthCredential":"credential"}}},"table":{"namespace":"legacy.table","methods":{"batch_insert_rows":"batchInsertRows","delete_row":"deleteRowById","delete_rows_by_filter":"deleteRowsByFilter","get_row":"getRowById","get_schema":"getSchema","insert_row":"insertRow","query_rows":"queryRows","update_row":"updateRowById","update_rows_by_filter":"updateRowsByFilter","upsert_row":"upsertRow"},"triggers":{"table_new_row":"newRow"}},"table_v2":{"namespace":"table","methods":{"batch_insert_rows":"batchInsertRows","delete_row":"deleteRowById","delete_rows_by_filter":"deleteRowsByFilter","get_row":"getRowById","get_schema":"getSchema","insert_row":"insertRow","query_rows":"queryRows","update_row":"updateRowById","update_rows_by_filter":"updateRowsByFilter","upsert_row":"upsertRow"},"triggers":{"table_new_row":"newRow"}},"tailscale":{"namespace":"legacy.tailscale","methods":{"approve_user":"approveUser","authorize_device":"authorizeDevice","create_auth_key":"createAuthKey","delete_auth_key":"deleteAuthKey","delete_device":"deleteDevice","delete_device_attribute":"deleteDeviceAttribute","delete_user":"deleteUser","expire_device_key":"expireDeviceKey","get_acl":"getAcl","get_auth_key":"getAuthKey","get_device":"getDevice","get_device_attributes":"getDeviceAttributes","get_device_routes":"getDeviceRoutes","get_dns_configuration":"getDnsConfiguration","get_dns_preferences":"getDnsPreferences","get_dns_searchpaths":"getDnsSearchPaths","get_split_dns":"getSplitDns","get_tailnet_settings":"getTailnetSettings","get_user":"getUser","list_auth_keys":"listKeys","list_devices":"listDevices","list_dns_nameservers":"listDnsNameservers","list_users":"listUsers","restore_user":"restoreUser","set_acl":"setAcl","set_device_attribute":"setDeviceAttribute","set_device_name":"setDeviceName","set_device_routes":"setDeviceRoutes","set_device_tags":"setDeviceTags","set_dns_configuration":"setDnsConfiguration","set_dns_nameservers":"setDnsNameservers","set_dns_preferences":"setDnsPreferences","set_dns_searchpaths":"setDnsSearchPaths","set_split_dns":"setSplitDns","set_user_role":"setUserRole","suspend_user":"suspendUser","update_device_key":"updateDeviceKey","update_split_dns":"updateSplitDns","update_tailnet_settings":"updateTailnetSettings","validate_acl":"validateAcl"}},"tailscale_v2":{"namespace":"tailscale","methods":{"approve_user":"approveUser","authorize_device":"authorizeDevice","create_auth_key":"createAuthKey","delete_auth_key":"deleteAuthKey","delete_device":"deleteDevice","delete_device_attribute":"deleteDeviceAttribute","delete_user":"deleteUser","expire_device_key":"expireDeviceKey","get_acl":"getAcl","get_auth_key":"getAuthKey","get_device":"getDevice","get_device_attributes":"getDeviceAttributes","get_device_routes":"getDeviceRoutes","get_dns_configuration":"getDnsConfiguration","get_dns_preferences":"getDnsPreferences","get_dns_searchpaths":"getDnsSearchPaths","get_split_dns":"getSplitDns","get_tailnet_settings":"getTailnetSettings","get_user":"getUser","list_auth_keys":"listKeys","list_devices":"listDevices","list_dns_nameservers":"listDnsNameservers","list_users":"listUsers","restore_user":"restoreUser","set_acl":"setAcl","set_device_attribute":"setDeviceAttribute","set_device_name":"setDeviceName","set_device_routes":"setDeviceRoutes","set_device_tags":"setDeviceTags","set_dns_configuration":"setDnsConfiguration","set_dns_nameservers":"setDnsNameservers","set_dns_preferences":"setDnsPreferences","set_dns_searchpaths":"setDnsSearchPaths","set_split_dns":"setSplitDns","set_user_role":"setUserRole","suspend_user":"suspendUser","update_device_key":"updateDeviceKey","update_split_dns":"updateSplitDns","update_tailnet_settings":"updateTailnetSettings","validate_acl":"validateAcl"},"params":{"action":{"oauthCredential":"credential"}}},"tavily":{"namespace":"legacy.tavily","methods":{"tavily_crawl":"crawlWebsite","tavily_extract":"extractContent","tavily_map":"mapWebsite","tavily_search":"search"}},"tavily_v2":{"namespace":"tavily","methods":{"tavily_crawl":"crawlWebsite","tavily_extract":"extractContent","tavily_map":"mapWebsite","tavily_search":"search"},"params":{"action":{"oauthCredential":"credential"}}},"telegram":{"namespace":"legacy.telegram","methods":{"telegram_copy_message":"copyMessage","telegram_delete_message":"deleteMessage","telegram_edit_message_text":"editMessageText","telegram_forward_message":"forwardMessage","telegram_get_chat":"getChat","telegram_get_chat_member":"getChatMember","telegram_message":"sendMessage","telegram_pin_message":"pinMessage","telegram_send_animation":"sendAnimation","telegram_send_audio":"sendAudio","telegram_send_chat_action":"sendChatAction","telegram_send_contact":"sendContact","telegram_send_document":"sendDocument","telegram_send_location":"sendLocation","telegram_send_photo":"sendPhoto","telegram_send_poll":"sendPoll","telegram_send_video":"sendVideo","telegram_set_message_reaction":"setMessageReaction","telegram_unpin_message":"unpinMessage"},"triggers":{"telegram_webhook":"webhook"}},"telegram_v2":{"namespace":"telegram","methods":{"telegram_copy_message":"copyMessage","telegram_delete_message":"deleteMessage","telegram_edit_message_text":"editMessageText","telegram_forward_message":"forwardMessage","telegram_get_chat":"getChat","telegram_get_chat_member":"getChatMember","telegram_message":"sendMessage","telegram_pin_message":"pinMessage","telegram_send_animation":"sendAnimation","telegram_send_audio":"sendAudio","telegram_send_chat_action":"sendChatAction","telegram_send_contact":"sendContact","telegram_send_document":"sendDocument","telegram_send_location":"sendLocation","telegram_send_photo":"sendPhoto","telegram_send_poll":"sendPoll","telegram_send_video":"sendVideo","telegram_set_message_reaction":"setMessageReaction","telegram_unpin_message":"unpinMessage"},"triggers":{"telegram_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"temporal":{"namespace":"temporal","methods":{"cancel_workflow":"cancelWorkflow","count_workflows":"countWorkflows","create_schedule":"createSchedule","delete_schedule":"deleteSchedule","describe_schedule":"describeSchedule","describe_task_queue":"describeTaskQueue","describe_workflow":"describeWorkflow","get_workflow_history":"getWorkflowHistory","list_schedules":"listSchedules","list_workflows":"listWorkflows","pause_schedule":"pauseSchedule","query_workflow":"queryWorkflow","reset_workflow":"resetWorkflow","signal_with_start":"signalWithStart","signal_workflow":"signalWorkflow","start_workflow":"startWorkflow","terminate_workflow":"terminateWorkflow","trigger_schedule":"triggerSchedule","unpause_schedule":"unpauseSchedule","update_workflow":"updateWorkflow"}},"textract":{"namespace":"legacy.textract"},"textract_v2":{"namespace":"legacy.textractV2","methods":{"analyze_document":"analyzeDocumentTextTablesForms","analyze_expense":"analyzeExpenseInvoicesReceipts","analyze_id":"analyzeIdentityDocument"}},"textract_v3":{"namespace":"textract","methods":{"analyze_document":"analyzeDocumentTextTablesForms","analyze_expense":"analyzeExpenseInvoicesReceipts","analyze_id":"analyzeIdentityDocument"},"params":{"action":{"oauthCredential":"credential"}}},"thinking":{"namespace":"legacy.thinking"},"thrive":{"namespace":"legacy.thrive","methods":{"add_audience_managers":"addAudienceManagers","add_audience_members":"addAudienceMembers","add_user_tags":"addUserTags","create_assignment":"createAssignment","create_audience":"createAudience","create_completion":"createCompletion","create_user":"createUser","delete_assignment":"deleteAssignment","delete_audience":"deleteAudience","delete_user":"deleteUser","get_activity":"getActivity","get_assignment":"getAssignment","get_audience":"getAudience","get_completion":"getCompletion","get_content":"getContent","get_cpd_category":"getCpdCategory","get_cpd_entry":"getCpdEntry","get_cpd_requirement":"getCpdRequirement","get_enrolment":"getEnrolment","get_skill_levels":"getSkillLevels","get_tag":"getTag","get_user_by_id":"getUserById","get_user_by_ref":"getUserByRef","list_assignments":"listAssignments","list_audience_managers":"listAudienceManagers","list_audience_members":"listAudienceMembers","list_audiences":"listAudiences","list_completions":"listCompletions","list_enrolments":"listEnrolments","list_tags":"listTags","query_activities":"queryActivities","query_content":"queryContent","query_cpd_categories":"queryCpdCategories","query_cpd_entries":"queryCpdEntries","query_cpd_requirements":"queryCpdRequirements","query_cpd_user_summaries":"queryCpdUserSummaries","remove_audience_manager":"removeAudienceManager","remove_audience_member":"removeAudienceMember","remove_user_tags":"removeUserTags","replace_audience_managers":"replaceAudienceManagers","replace_audience_members":"replaceAudienceMembers","search_users":"searchUsers","suspend_user":"suspendUser","update_assignment":"updateAssignment","update_audience":"updateAudience","update_user":"updateUser","update_user_skills":"updateUserSkills"}},"thrive_v2":{"namespace":"thrive","methods":{"add_audience_managers":"addAudienceManagers","add_audience_members":"addAudienceMembers","add_user_tags":"addUserTags","create_assignment":"createAssignment","create_audience":"createAudience","create_completion":"createCompletion","create_user":"createUser","delete_assignment":"deleteAssignment","delete_audience":"deleteAudience","delete_user":"deleteUser","get_activity":"getActivity","get_assignment":"getAssignment","get_audience":"getAudience","get_completion":"getCompletion","get_content":"getContent","get_cpd_category":"getCpdCategory","get_cpd_entry":"getCpdEntry","get_cpd_requirement":"getCpdRequirement","get_enrolment":"getEnrolment","get_skill_levels":"getSkillLevels","get_tag":"getTag","get_user_by_id":"getUserById","get_user_by_ref":"getUserByRef","list_assignments":"listAssignments","list_audience_managers":"listAudienceManagers","list_audience_members":"listAudienceMembers","list_audiences":"listAudiences","list_completions":"listCompletions","list_enrolments":"listEnrolments","list_tags":"listTags","query_activities":"queryActivities","query_content":"queryContent","query_cpd_categories":"queryCpdCategories","query_cpd_entries":"queryCpdEntries","query_cpd_requirements":"queryCpdRequirements","query_cpd_user_summaries":"queryCpdUserSummaries","remove_audience_manager":"removeAudienceManager","remove_audience_member":"removeAudienceMember","remove_user_tags":"removeUserTags","replace_audience_managers":"replaceAudienceManagers","replace_audience_members":"replaceAudienceMembers","search_users":"searchUsers","suspend_user":"suspendUser","update_assignment":"updateAssignment","update_audience":"updateAudience","update_user":"updateUser","update_user_skills":"updateUserSkills"},"params":{"action":{"oauthCredential":"credential"}}},"tiktok":{"namespace":"tiktok","methods":{"tiktok_get_post_status":"getPostStatus","tiktok_get_user":"getUserInfo","tiktok_list_videos":"listVideos","tiktok_query_videos":"queryVideos","tiktok_upload_video_draft":"uploadVideoDraft"},"triggers":{"tiktok_authorization_removed":"authorizationRemoved","tiktok_post_inbox_delivered":"postInboxDelivered","tiktok_post_no_longer_public":"postNoLongerPublic","tiktok_post_publicly_available":"postPubliclyAvailable","tiktok_post_publish_complete":"postPublishComplete","tiktok_post_publish_failed":"postPublishFailed"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"tinybird":{"namespace":"legacy.tinybird","methods":{"tinybird_append_datasource":"appendDataSourceFromUrl","tinybird_delete_datasource_rows":"deleteDataSourceRows","tinybird_events":"sendEvents","tinybird_get_job":"getJobStatus","tinybird_query":"query","tinybird_query_pipe":"queryPipeEndpoint","tinybird_truncate_datasource":"truncateDataSource"}},"tinybird_v2":{"namespace":"tinybird","methods":{"tinybird_append_datasource":"appendDataSourceFromUrl","tinybird_delete_datasource_rows":"deleteDataSourceRows","tinybird_events":"sendEvents","tinybird_get_job":"getJobStatus","tinybird_query":"query","tinybird_query_pipe":"queryPipeEndpoint","tinybird_truncate_datasource":"truncateDataSource"},"params":{"action":{"oauthCredential":"credential"}}},"tinyfish":{"namespace":"tinyfish","methods":{"tinyfish_cancel_run":"cancelRun","tinyfish_fetch":"fetchUrls","tinyfish_get_run":"getRun","tinyfish_list_profiles":"listBrowserProfiles","tinyfish_list_runs":"listRuns","tinyfish_list_vault_items":"listVaultItems","tinyfish_run":"runAgent","tinyfish_run_async":"startAgentRun","tinyfish_search":"search"}},"translate":{"namespace":"translate"},"trello":{"namespace":"trello","methods":{"trello_add_checklist":"addChecklist","trello_add_checklist_item":"addChecklistItem","trello_add_comment":"addComment","trello_add_label":"addLabel","trello_add_member":"addMember","trello_create_board":"createBoard","trello_create_card":"createCard","trello_create_list":"createList","trello_delete_card":"deleteCard","trello_get_actions":"getActions","trello_get_board":"getBoard","trello_get_card":"getCard","trello_list_cards":"listCards","trello_list_lists":"getLists","trello_list_members":"listMembers","trello_remove_label":"removeLabel","trello_remove_member":"removeMember","trello_search":"search","trello_update_card":"updateCard","trello_update_checklist_item":"updateChecklistItem","trello_update_list":"updateList"},"params":{"action":{"oauthCredential":"credential"}}},"trigger_dev":{"namespace":"legacy.triggerDev","methods":{"trigger_dev_activate_schedule":"activateSchedule","trigger_dev_add_run_tags":"addRunTags","trigger_dev_batch_trigger_task":"batchTriggerTask","trigger_dev_cancel_run":"cancelRun","trigger_dev_complete_waitpoint_token":"completeWaitpointToken","trigger_dev_create_env_var":"createEnvVar","trigger_dev_create_schedule":"createSchedule","trigger_dev_create_waitpoint_token":"createWaitpointToken","trigger_dev_deactivate_schedule":"deactivateSchedule","trigger_dev_delete_env_var":"deleteEnvVar","trigger_dev_delete_schedule":"deleteSchedule","trigger_dev_execute_query":"executeQuery","trigger_dev_get_batch":"getBatch","trigger_dev_get_batch_results":"getBatchResults","trigger_dev_get_deployment":"getDeployment","trigger_dev_get_env_var":"getEnvVar","trigger_dev_get_latest_deployment":"getLatestDeployment","trigger_dev_get_query_schema":"getQuerySchema","trigger_dev_get_queue":"getQueue","trigger_dev_get_run":"getRun","trigger_dev_get_run_events":"getRunEvents","trigger_dev_get_run_result":"getRunResult","trigger_dev_get_run_trace":"getRunTrace","trigger_dev_get_schedule":"getSchedule","trigger_dev_get_waitpoint_token":"getWaitpointToken","trigger_dev_import_env_vars":"importEnvVars","trigger_dev_list_deployments":"listDeployments","trigger_dev_list_env_vars":"listEnvVars","trigger_dev_list_queues":"listQueues","trigger_dev_list_runs":"listRuns","trigger_dev_list_schedules":"listSchedules","trigger_dev_list_timezones":"listTimezones","trigger_dev_list_waitpoint_tokens":"listWaitpointTokens","trigger_dev_override_queue_concurrency":"overrideQueueConcurrency","trigger_dev_pause_queue":"pauseQueue","trigger_dev_promote_deployment":"promoteDeployment","trigger_dev_replay_run":"replayRun","trigger_dev_reschedule_run":"rescheduleRun","trigger_dev_reset_queue_concurrency":"resetQueueConcurrency","trigger_dev_resume_queue":"resumeQueue","trigger_dev_trigger_task":"triggerTask","trigger_dev_update_env_var":"updateEnvVar","trigger_dev_update_run_metadata":"updateRunMetadata","trigger_dev_update_schedule":"updateSchedule"}},"trigger_dev_v2":{"namespace":"triggerDev","methods":{"trigger_dev_activate_schedule":"activateSchedule","trigger_dev_add_run_tags":"addRunTags","trigger_dev_batch_trigger_task":"batchTriggerTask","trigger_dev_cancel_run":"cancelRun","trigger_dev_complete_waitpoint_token":"completeWaitpointToken","trigger_dev_create_env_var":"createEnvVar","trigger_dev_create_schedule":"createSchedule","trigger_dev_create_waitpoint_token":"createWaitpointToken","trigger_dev_deactivate_schedule":"deactivateSchedule","trigger_dev_delete_env_var":"deleteEnvVar","trigger_dev_delete_schedule":"deleteSchedule","trigger_dev_execute_query":"executeQuery","trigger_dev_get_batch":"getBatch","trigger_dev_get_batch_results":"getBatchResults","trigger_dev_get_deployment":"getDeployment","trigger_dev_get_env_var":"getEnvVar","trigger_dev_get_latest_deployment":"getLatestDeployment","trigger_dev_get_query_schema":"getQuerySchema","trigger_dev_get_queue":"getQueue","trigger_dev_get_run":"getRun","trigger_dev_get_run_events":"getRunEvents","trigger_dev_get_run_result":"getRunResult","trigger_dev_get_run_trace":"getRunTrace","trigger_dev_get_schedule":"getSchedule","trigger_dev_get_waitpoint_token":"getWaitpointToken","trigger_dev_import_env_vars":"importEnvVars","trigger_dev_list_deployments":"listDeployments","trigger_dev_list_env_vars":"listEnvVars","trigger_dev_list_queues":"listQueues","trigger_dev_list_runs":"listRuns","trigger_dev_list_schedules":"listSchedules","trigger_dev_list_timezones":"listTimezones","trigger_dev_list_waitpoint_tokens":"listWaitpointTokens","trigger_dev_override_queue_concurrency":"overrideQueueConcurrency","trigger_dev_pause_queue":"pauseQueue","trigger_dev_promote_deployment":"promoteDeployment","trigger_dev_replay_run":"replayRun","trigger_dev_reschedule_run":"rescheduleRun","trigger_dev_reset_queue_concurrency":"resetQueueConcurrency","trigger_dev_resume_queue":"resumeQueue","trigger_dev_trigger_task":"triggerTask","trigger_dev_update_env_var":"updateEnvVar","trigger_dev_update_run_metadata":"updateRunMetadata","trigger_dev_update_schedule":"updateSchedule"},"params":{"action":{"oauthCredential":"credential"}}},"tts":{"namespace":"tts"},"twilio_sms":{"namespace":"legacy.twilioSms","triggers":{"twilio_sms_received":"received","twilio_sms_status":"status"}},"twilio_sms_v2":{"namespace":"twilioSms","triggers":{"twilio_sms_received":"received","twilio_sms_status":"status"},"params":{"action":{"oauthCredential":"credential"}}},"twilio_voice":{"namespace":"legacy.twilioVoice","methods":{"get_recording":"getRecording","list_calls":"listCalls","make_call":"makeCall"},"triggers":{"twilio_voice_webhook":"webhook"}},"twilio_voice_v2":{"namespace":"twilioVoice","methods":{"get_recording":"getRecording","list_calls":"listCalls","make_call":"makeCall"},"triggers":{"twilio_voice_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"typeform":{"namespace":"legacy.typeform","methods":{"typeform_create_form":"createForm","typeform_delete_form":"deleteForm","typeform_files":"downloadFile","typeform_get_form":"getFormDetails","typeform_insights":"formInsights","typeform_list_forms":"listForms","typeform_responses":"retrieveResponses","typeform_update_form":"updateForm"},"triggers":{"typeform_webhook":"webhook"}},"typeform_v2":{"namespace":"typeform","methods":{"typeform_create_form":"createForm","typeform_delete_form":"deleteForm","typeform_files":"downloadFile","typeform_get_form":"getFormDetails","typeform_insights":"formInsights","typeform_list_forms":"listForms","typeform_responses":"retrieveResponses","typeform_update_form":"updateForm"},"triggers":{"typeform_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"upstash":{"namespace":"legacy.upstash","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","lpush":"lpush","lrange":"lrange","set":"set","setnx":"setnx","ttl":"ttl"}},"upstash_v2":{"namespace":"upstash","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","lpush":"lpush","lrange":"lrange","set":"set","setnx":"setnx","ttl":"ttl"},"params":{"action":{"oauthCredential":"credential"}}},"uptimerobot":{"namespace":"legacy.uptimerobot","methods":{"create_alert_contact":"createAlertContact","create_maintenance_window":"createMaintenanceWindow","create_monitor":"createMonitor","create_psp":"createStatusPage","delete_alert_contact":"deleteAlertContact","delete_maintenance_window":"deleteMaintenanceWindow","delete_monitor":"deleteMonitor","delete_psp":"deleteStatusPage","get_account":"getAccount","get_alert_contact":"getAlertContact","get_incident":"getIncident","get_maintenance_window":"getMaintenanceWindow","get_monitor":"getMonitor","get_psp":"getStatusPage","list_alert_contacts":"listAlertContacts","list_incidents":"listIncidents","list_maintenance_windows":"listMaintenanceWindows","list_monitors":"listMonitors","list_psps":"listStatusPages","pause_monitor":"pauseMonitor","start_monitor":"startMonitor","update_maintenance_window":"updateMaintenanceWindow","update_monitor":"updateMonitor","update_psp":"updateStatusPage"}},"uptimerobot_v2":{"namespace":"uptimerobot","methods":{"create_alert_contact":"createAlertContact","create_maintenance_window":"createMaintenanceWindow","create_monitor":"createMonitor","create_psp":"createStatusPage","delete_alert_contact":"deleteAlertContact","delete_maintenance_window":"deleteMaintenanceWindow","delete_monitor":"deleteMonitor","delete_psp":"deleteStatusPage","get_account":"getAccount","get_alert_contact":"getAlertContact","get_incident":"getIncident","get_maintenance_window":"getMaintenanceWindow","get_monitor":"getMonitor","get_psp":"getStatusPage","list_alert_contacts":"listAlertContacts","list_incidents":"listIncidents","list_maintenance_windows":"listMaintenanceWindows","list_monitors":"listMonitors","list_psps":"listStatusPages","pause_monitor":"pauseMonitor","start_monitor":"startMonitor","update_maintenance_window":"updateMaintenanceWindow","update_monitor":"updateMonitor","update_psp":"updateStatusPage"},"params":{"action":{"oauthCredential":"credential"}}},"vanta":{"namespace":"vanta","methods":{"download_document_file":"downloadDocumentFile","get_control":"getControl","get_document":"getDocument","get_framework":"getFramework","get_person":"getPerson","get_policy":"getPolicy","get_risk_scenario":"getRiskScenario","get_test":"getTest","get_vendor":"getVendor","get_vulnerable_asset":"getVulnerableAsset","list_control_documents":"listControlDocuments","list_control_tests":"listControlTests","list_controls":"listControls","list_document_uploads":"listDocumentUploads","list_documents":"listDocuments","list_framework_controls":"listFrameworkControls","list_frameworks":"listFrameworks","list_monitored_computers":"listMonitoredComputers","list_people":"listPeople","list_policies":"listPolicies","list_risk_scenarios":"listRiskScenarios","list_test_entities":"listTestEntities","list_tests":"listTests","list_vendors":"listVendors","list_vulnerabilities":"listVulnerabilities","list_vulnerability_remediations":"listVulnerabilityRemediations","list_vulnerable_assets":"listVulnerableAssets","submit_document":"submitDocument","upload_document_file":"uploadDocumentFile"},"params":{"action":{"oauthCredential":"credential"}}},"variables":{"namespace":"setVariables"},"vercel":{"namespace":"legacy.vercel","methods":{"add_domain":"addDomain","add_project_domain":"addProjectDomain","cancel_deployment":"cancelDeployment","create_alias":"createAlias","create_check":"createCheck","create_deployment":"createDeployment","create_dns_record":"createDnsRecord","create_edge_config":"createEdgeConfig","create_env_var":"createEnvironmentVariable","create_project":"createProject","create_webhook":"createWebhook","delete_alias":"deleteAlias","delete_deployment":"deleteDeployment","delete_dns_record":"deleteDnsRecord","delete_domain":"deleteDomain","delete_edge_config":"deleteEdgeConfig","delete_env_var":"deleteEnvironmentVariable","delete_project":"deleteProject","delete_webhook":"deleteWebhook","get_alias":"getAlias","get_check":"getCheck","get_deployment":"getDeployment","get_deployment_events":"getDeploymentLogs","get_domain":"getDomain","get_domain_config":"getDomainConfig","get_edge_config":"getEdgeConfig","get_edge_config_items":"getEdgeConfigItems","get_env_vars":"getEnvironmentVariables","get_project":"getProject","get_team":"getTeam","get_user":"getUser","get_webhook":"getWebhook","list_aliases":"listAliases","list_checks":"listChecks","list_deployment_files":"listDeploymentFiles","list_deployments":"listDeployments","list_dns_records":"listDnsRecords","list_domains":"listDomains","list_edge_configs":"listEdgeConfigs","list_project_domains":"listProjectDomains","list_projects":"listProjects","list_team_members":"listTeamMembers","list_teams":"listTeams","list_webhooks":"listWebhooks","pause_project":"pauseProject","promote_deployment":"promoteDeployment","remove_project_domain":"removeProjectDomain","rerequest_check":"rerequestCheck","unpause_project":"unpauseProject","update_check":"updateCheck","update_dns_record":"updateDnsRecord","update_edge_config_items":"updateEdgeConfigItems","update_env_var":"updateEnvironmentVariable","update_project":"updateProject","update_project_domain":"updateProjectDomain","verify_project_domain":"verifyProjectDomain"},"triggers":{"vercel_deployment_canceled":"deploymentCanceled","vercel_deployment_created":"deploymentCreated","vercel_deployment_error":"deploymentError","vercel_deployment_ready":"deploymentReady","vercel_domain_created":"domainCreated","vercel_project_created":"projectCreated","vercel_project_removed":"projectRemoved","vercel_webhook":"webhook"}},"vercel_v2":{"namespace":"vercel","methods":{"add_domain":"addDomain","add_project_domain":"addProjectDomain","cancel_deployment":"cancelDeployment","create_alias":"createAlias","create_check":"createCheck","create_deployment":"createDeployment","create_dns_record":"createDnsRecord","create_edge_config":"createEdgeConfig","create_env_var":"createEnvironmentVariable","create_project":"createProject","create_webhook":"createWebhook","delete_alias":"deleteAlias","delete_deployment":"deleteDeployment","delete_dns_record":"deleteDnsRecord","delete_domain":"deleteDomain","delete_edge_config":"deleteEdgeConfig","delete_env_var":"deleteEnvironmentVariable","delete_project":"deleteProject","delete_webhook":"deleteWebhook","get_alias":"getAlias","get_check":"getCheck","get_deployment":"getDeployment","get_deployment_events":"getDeploymentLogs","get_domain":"getDomain","get_domain_config":"getDomainConfig","get_edge_config":"getEdgeConfig","get_edge_config_items":"getEdgeConfigItems","get_env_vars":"getEnvironmentVariables","get_project":"getProject","get_team":"getTeam","get_user":"getUser","get_webhook":"getWebhook","list_aliases":"listAliases","list_checks":"listChecks","list_deployment_files":"listDeploymentFiles","list_deployments":"listDeployments","list_dns_records":"listDnsRecords","list_domains":"listDomains","list_edge_configs":"listEdgeConfigs","list_project_domains":"listProjectDomains","list_projects":"listProjects","list_team_members":"listTeamMembers","list_teams":"listTeams","list_webhooks":"listWebhooks","pause_project":"pauseProject","promote_deployment":"promoteDeployment","remove_project_domain":"removeProjectDomain","rerequest_check":"rerequestCheck","unpause_project":"unpauseProject","update_check":"updateCheck","update_dns_record":"updateDnsRecord","update_edge_config_items":"updateEdgeConfigItems","update_env_var":"updateEnvironmentVariable","update_project":"updateProject","update_project_domain":"updateProjectDomain","verify_project_domain":"verifyProjectDomain"},"triggers":{"vercel_deployment_canceled":"deploymentCanceled","vercel_deployment_created":"deploymentCreated","vercel_deployment_error":"deploymentError","vercel_deployment_ready":"deploymentReady","vercel_domain_created":"domainCreated","vercel_project_created":"projectCreated","vercel_project_removed":"projectRemoved","vercel_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"video_generator":{"namespace":"legacy.videoGenerator"},"video_generator_v2":{"namespace":"legacy.videoGeneratorV2"},"video_generator_v3":{"namespace":"videoGenerator"},"vision":{"namespace":"legacy.vision"},"vision_v2":{"namespace":"legacy.visionV2"},"wait":{"namespace":"wait"},"wealthbox":{"namespace":"wealthbox","methods":{"read_contact":"readContact","read_note":"readNote","read_task":"readTask","write_contact":"writeContact","write_note":"writeNote","write_task":"writeTask"},"params":{"action":{"oauthCredential":"credential"}}},"webflow":{"namespace":"webflow","methods":{"create":"createItem","delete":"deleteItem","get":"getItem","list":"listItems","update":"updateItem"},"triggers":{"webflow_collection_item_changed":"collectionItemChanged","webflow_collection_item_created":"collectionItemCreated","webflow_collection_item_deleted":"collectionItemDeleted","webflow_form_submission":"formSubmission"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"webhook_request":{"namespace":"webhookRequest"},"whatsapp":{"namespace":"legacy.whatsapp","methods":{"get_media":"downloadMedia","mark_read":"markAsRead","send_interactive":"sendInteractive","send_media":"sendMedia","send_message":"sendMessage","send_reaction":"sendReaction","send_template":"sendTemplate","upload_media":"uploadMedia"},"triggers":{"whatsapp_webhook":"webhook"}},"whatsapp_v2":{"namespace":"whatsapp","methods":{"get_media":"downloadMedia","mark_read":"markAsRead","send_interactive":"sendInteractive","send_media":"sendMedia","send_message":"sendMessage","send_reaction":"sendReaction","send_template":"sendTemplate","upload_media":"uploadMedia"},"triggers":{"whatsapp_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"wikipedia":{"namespace":"wikipedia","methods":{"wikipedia_content":"getPageContent","wikipedia_random":"randomPage","wikipedia_search":"searchPages","wikipedia_summary":"getPageSummary"}},"windchill":{"namespace":"windchill","methods":{"windchill_check_in_document":"checkInDocument","windchill_check_in_documents":"checkInDocuments","windchill_check_out_document":"checkOutDocument","windchill_check_out_documents":"checkOutDocuments","windchill_create_document":"createDocument","windchill_create_documents":"createDocuments","windchill_delete_document":"deleteDocument","windchill_delete_documents":"deleteDocuments","windchill_download_attachment":"downloadAttachment","windchill_download_primary_content":"downloadPrimaryContent","windchill_get_document":"getDocument","windchill_get_document_structure":"getDocumentStructure","windchill_get_primary_content":"getPrimaryContent","windchill_get_valid_state_transitions":"getValidStateTransitions","windchill_list_attachments":"listAttachments","windchill_list_documents":"listDocuments","windchill_revise_document":"reviseDocument","windchill_revise_documents":"reviseDocuments","windchill_set_lifecycle_state":"setLifecycleState","windchill_undo_check_out_document":"undoCheckOutDocument","windchill_undo_check_out_documents":"undoCheckOutDocuments","windchill_update_common_properties":"updateCommonProperties","windchill_update_document":"updateDocument","windchill_update_document_security_labels":"updateDocumentSecurityLabels","windchill_update_documents":"updateDocuments","windchill_upload_attachments":"uploadAttachments","windchill_upload_primary_content":"uploadPrimaryContent"}},"wiza":{"namespace":"wiza","methods":{"company_enrichment":"companyEnrichment","get_credits":"getCredits","individual_reveal":"individualReveal","prospect_search":"prospectSearch"}},"wordpress":{"namespace":"wordpress","methods":{"wordpress_create_category":"createCategory","wordpress_create_comment":"createComment","wordpress_create_page":"createPage","wordpress_create_post":"createPost","wordpress_create_tag":"createTag","wordpress_delete_category":"deleteCategory","wordpress_delete_comment":"deleteComment","wordpress_delete_media":"deleteMedia","wordpress_delete_page":"deletePage","wordpress_delete_post":"deletePost","wordpress_delete_tag":"deleteTag","wordpress_get_category":"getCategory","wordpress_get_current_user":"getCurrentUser","wordpress_get_media":"getMedia","wordpress_get_page":"getPage","wordpress_get_post":"getPost","wordpress_get_tag":"getTag","wordpress_get_user":"getUser","wordpress_list_categories":"listCategories","wordpress_list_comments":"listComments","wordpress_list_media":"listMedia","wordpress_list_pages":"listPages","wordpress_list_posts":"listPosts","wordpress_list_tags":"listTags","wordpress_list_users":"listUsers","wordpress_search_content":"searchContent","wordpress_update_category":"updateCategory","wordpress_update_comment":"updateComment","wordpress_update_page":"updatePage","wordpress_update_post":"updatePost","wordpress_update_tag":"updateTag","wordpress_upload_media":"uploadMedia"},"params":{"action":{"oauthCredential":"credential"}}},"workday":{"namespace":"workday","methods":{"assign_onboarding":"assignOnboardingPlan","change_job":"changeJob","create_prehire":"createPreHire","get_compensation":"getCompensation","get_organizations":"getOrganizations","get_worker":"getWorker","hire_employee":"hireEmployee","list_workers":"listWorkers","terminate_worker":"terminateWorker","update_worker":"updatePersonalInformation"}},"workflow":{"namespace":"legacy.workflow"},"workflow_input":{"namespace":"runWorkflow"},"x":{"namespace":"x","methods":{"x_create_bookmark":"createBookmark","x_create_tweet":"createTweet","x_delete_bookmark":"deleteBookmark","x_delete_tweet":"deleteTweet","x_get_blocking":"getBlockedUsers","x_get_bookmarks":"getBookmarks","x_get_followers":"getFollowers","x_get_following":"getFollowing","x_get_liked_tweets":"getLikedTweets","x_get_liking_users":"getLikingUsers","x_get_me":"getMyProfile","x_get_personalized_trends":"getPersonalizedTrends","x_get_quote_tweets":"getQuoteTweets","x_get_retweeted_by":"getRetweetedBy","x_get_trends_by_woeid":"getTrendsByLocation","x_get_tweets_by_ids":"getTweetsByIds","x_get_usage":"getApiUsage","x_get_user_mentions":"getUserMentions","x_get_user_timeline":"getUserTimeline","x_get_user_tweets":"getUserTweets","x_hide_reply":"hideReply","x_manage_block":"blockUnblock","x_manage_follow":"followUnfollow","x_manage_like":"likeUnlike","x_manage_mute":"muteUnmute","x_manage_retweet":"retweetUnretweet","x_search_tweets":"searchTweets","x_search_users":"searchUsers"},"params":{"action":{"oauthCredential":"credential"}}},"youcom":{"namespace":"legacy.youcom","methods":{"youcom_answer":"answer","youcom_finance_research":"financeResearch","youcom_get_account_balance":"getAccountBalance","youcom_get_contents":"getContents","youcom_get_research_task":"getResearchTask","youcom_research":"research","youcom_search":"search","youcom_search_images":"searchImages"}},"youcom_v2":{"namespace":"youcom","methods":{"youcom_answer":"answer","youcom_finance_research":"financeResearch","youcom_get_account_balance":"getAccountBalance","youcom_get_contents":"getContents","youcom_get_research_task":"getResearchTask","youcom_research":"research","youcom_search":"search","youcom_search_images":"searchImages"},"params":{"action":{"oauthCredential":"credential"}}},"youtube":{"namespace":"legacy.youtube","methods":{"youtube_channel_info":"getChannelInfo","youtube_channel_playlists":"getChannelPlaylists","youtube_channel_videos":"getChannelVideos","youtube_comments":"getVideoComments","youtube_playlist_items":"getPlaylistItems","youtube_search":"searchVideos","youtube_trending":"getTrendingVideos","youtube_video_categories":"getVideoCategories","youtube_video_details":"getVideoDetails"}},"youtube_v2":{"namespace":"youtube","methods":{"youtube_channel_info":"getChannelInfo","youtube_channel_playlists":"getChannelPlaylists","youtube_channel_videos":"getChannelVideos","youtube_comments":"getVideoComments","youtube_playlist_items":"getPlaylistItems","youtube_search":"searchVideos","youtube_trending":"getTrendingVideos","youtube_video_categories":"getVideoCategories","youtube_video_details":"getVideoDetails"},"params":{"action":{"oauthCredential":"credential"}}},"zendesk":{"namespace":"legacy.zendesk","methods":{"autocomplete_organizations":"autocompleteOrganizations","create_organization":"createOrganization","create_organizations_bulk":"createOrganizationsBulk","create_ticket":"createTicket","create_tickets_bulk":"createTicketsBulk","create_user":"createUser","create_users_bulk":"createUsersBulk","delete_organization":"deleteOrganization","delete_ticket":"deleteTicket","delete_user":"deleteUser","get_current_user":"getCurrentUser","get_organization":"getOrganization","get_organizations":"getOrganizations","get_ticket":"getTicket","get_tickets":"getTickets","get_user":"getUser","get_users":"getUsers","merge_tickets":"mergeTickets","search":"search","search_count":"searchCount","search_users":"searchUsers","update_organization":"updateOrganization","update_ticket":"updateTicket","update_tickets_bulk":"updateTicketsBulk","update_user":"updateUser","update_users_bulk":"updateUsersBulk"},"triggers":{"zendesk_ticket_comment_added":"ticketCommentAdded","zendesk_ticket_created":"ticketCreated","zendesk_ticket_priority_changed":"ticketPriorityChanged","zendesk_ticket_status_changed":"ticketStatusChanged","zendesk_webhook":"webhook"}},"zendesk_v2":{"namespace":"zendesk","methods":{"autocomplete_organizations":"autocompleteOrganizations","create_organization":"createOrganization","create_organizations_bulk":"createOrganizationsBulk","create_ticket":"createTicket","create_tickets_bulk":"createTicketsBulk","create_user":"createUser","create_users_bulk":"createUsersBulk","delete_organization":"deleteOrganization","delete_ticket":"deleteTicket","delete_user":"deleteUser","get_current_user":"getCurrentUser","get_organization":"getOrganization","get_organizations":"getOrganizations","get_ticket":"getTicket","get_tickets":"getTickets","get_user":"getUser","get_users":"getUsers","merge_tickets":"mergeTickets","search":"search","search_count":"searchCount","search_users":"searchUsers","update_organization":"updateOrganization","update_ticket":"updateTicket","update_tickets_bulk":"updateTicketsBulk","update_user":"updateUser","update_users_bulk":"updateUsersBulk"},"triggers":{"zendesk_ticket_comment_added":"ticketCommentAdded","zendesk_ticket_created":"ticketCreated","zendesk_ticket_priority_changed":"ticketPriorityChanged","zendesk_ticket_status_changed":"ticketStatusChanged","zendesk_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"zep":{"namespace":"legacy.zep","methods":{"add_messages":"addMessages","add_user":"addUser","create_thread":"createThread","delete_thread":"deleteThread","get_context":"getContext","get_messages":"getMessages","get_threads":"getThreads","get_user":"getUser","get_user_threads":"getUserThreads"}},"zep_v2":{"namespace":"zep","methods":{"add_messages":"addMessages","add_user":"addUser","create_thread":"createThread","delete_thread":"deleteThread","get_context":"getContext","get_messages":"getMessages","get_threads":"getThreads","get_user":"getUser","get_user_threads":"getUserThreads"},"params":{"action":{"oauthCredential":"credential"}}},"zerobounce":{"namespace":"zerobounce","methods":{"zerobounce_get_credits":"getRemainingCredits","zerobounce_verify_email":"verifyEmail"}},"zoho_desk":{"namespace":"zohoDesk","methods":{"add_comment":"addComment","create_account":"createAccount","create_contact":"createContact","create_ticket":"createTicket","delete_comment":"deleteComment","get_account":"getAccount","get_agent":"getAgent","get_attachment":"getAttachment","get_comment":"getComment","get_contact":"getContact","get_department":"getDepartment","get_thread":"getThread","get_ticket":"getTicket","list_accounts":"listAccounts","list_agents":"listAgents","list_comments":"listComments","list_contacts":"listContacts","list_departments":"listDepartments","list_organizations":"listOrganizations","list_threads":"listThreads","list_tickets":"listTickets","move_ticket":"moveTicket","search_accounts":"searchAccounts","search_contacts":"searchContacts","search_tickets":"searchTickets","send_reply":"sendReply","update_account":"updateAccount","update_comment":"updateComment","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"zoho_desk":"zohoDesk"},"params":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"zoom":{"namespace":"zoom","methods":{"zoom_create_meeting":"createMeeting","zoom_delete_meeting":"deleteMeeting","zoom_delete_recording":"deleteRecording","zoom_get_meeting":"getMeeting","zoom_get_meeting_invitation":"getMeetingInvitation","zoom_get_meeting_recordings":"getMeetingRecordings","zoom_list_meetings":"listMeetings","zoom_list_past_participants":"listPastParticipants","zoom_list_recordings":"listRecordings","zoom_update_meeting":"updateMeeting"},"triggers":{"zoom_meeting_ended":"meetingEnded","zoom_meeting_started":"meetingStarted","zoom_participant_joined":"participantJoined","zoom_participant_left":"participantLeft","zoom_recording_completed":"recordingCompleted","zoom_webhook":"webhook"},"params":{"action":{"oauthCredential":"credential"}}},"zoominfo":{"namespace":"legacy.zoominfo","methods":{"enrich_companies":"enrichCompanies","enrich_contacts":"enrichContacts","search_companies":"searchCompanies","search_contacts":"searchContacts","search_intent":"searchIntent","search_news":"searchNews"}},"zoominfo_v2":{"namespace":"zoominfo","methods":{"enrich_companies":"enrichCompanies","enrich_contacts":"enrichContacts","search_companies":"searchCompanies","search_contacts":"searchContacts","search_intent":"searchIntent","search_news":"searchNews"},"params":{"action":{"oauthCredential":"credential"}}}}}' + '{"version":1,"blocks":{"a2a":{"namespace":"a2a","methods":{"a2a_cancel_task":"cancelTask","a2a_get_agent_card":"getAgentCard","a2a_get_task":"getTask","a2a_send_message":"sendMessage"}},"affinity":{"namespace":"legacy.affinity","methods":{"batch_update_entity_fields":"batchUpdateEntityFields","batch_update_list_entry_fields":"batchUpdateListEntryFields","create_list":"createList","create_list_field_dropdown_option":"createListFieldDropdownOption","create_merge":"createMerge","create_note":"createNote","create_reminder":"createReminder","delete_list_field_dropdown_option":"deleteListFieldDropdownOption","delete_note":"deleteNote","get_company":"getCompany","get_current_user":"getCurrentUser","get_entity_field_value":"getEntityFieldValue","get_list":"getList","get_list_entry":"getListEntry","get_list_entry_field":"getListEntryField","get_list_field_dropdown_option":"getListFieldDropdownOption","get_merge":"getMerge","get_merge_task":"getMergeTask","get_note":"getNote","get_opportunity":"getOpportunity","get_person":"getPerson","get_saved_view":"getSavedView","get_transcript":"getTranscript","get_user":"getUser","list_calls":"listCalls","list_chat_messages":"listChatMessages","list_companies":"listCompanies","list_coworker_connections":"listCoworkerConnections","list_emails":"listEmails","list_entity_field_values":"listEntityFieldValues","list_entity_list_entries":"listRowsHoldingEntity","list_entity_lists":"listListsHoldingEntity","list_entity_notes":"listNotesOnEntity","list_entity_relationships":"listEntityRelationships","list_field_dropdown_options":"listFieldDropdownOptions","list_field_metadata":"listFieldMetadata","list_field_value_changes":"listFieldValueChanges","list_investor_executive_connections":"listInvestorExecutiveConnections","list_list_entries":"listListEntries","list_list_entry_field_value_changes":"listListEntryFieldValueChanges","list_list_entry_fields":"listListEntryFields","list_list_field_dropdown_options":"listListFieldDropdownOptions","list_list_fields":"listListFields","list_lists":"listLists","list_meetings":"listMeetings","list_merge_tasks":"listMergeTasks","list_merges":"listMerges","list_note_attached_companies":"listNoteAttachedCompanies","list_note_attached_opportunities":"listNoteAttachedOpportunities","list_note_attached_persons":"listNoteAttachedPeople","list_note_replies":"listNoteReplies","list_notes":"listNotes","list_opportunities":"listOpportunities","list_persons":"listPeople","list_reminders":"listReminders","list_saved_view_entries":"listSavedViewEntries","list_saved_views":"listSavedViews","list_transcript_fragments":"listTranscriptFragments","list_transcripts":"listTranscripts","list_users":"listUsers","search_companies":"searchCompanies","search_files":"searchFiles","search_list_entries":"searchListEntries","search_notes":"searchNotes","search_persons":"searchPeople","semantic_search":"semanticSearch","update_entity_field_value":"updateEntityFieldValue","update_list_entry_field":"updateListEntryField","update_list_field_dropdown_option":"updateListFieldDropdownOption","update_note":"updateNote"}},"affinity_v2":{"namespace":"affinity","methods":{"batch_update_entity_fields":"batchUpdateEntityFields","batch_update_list_entry_fields":"batchUpdateListEntryFields","create_list":"createList","create_list_field_dropdown_option":"createListFieldDropdownOption","create_merge":"createMerge","create_note":"createNote","create_reminder":"createReminder","delete_list_field_dropdown_option":"deleteListFieldDropdownOption","delete_note":"deleteNote","get_company":"getCompany","get_current_user":"getCurrentUser","get_entity_field_value":"getEntityFieldValue","get_list":"getList","get_list_entry":"getListEntry","get_list_entry_field":"getListEntryField","get_list_field_dropdown_option":"getListFieldDropdownOption","get_merge":"getMerge","get_merge_task":"getMergeTask","get_note":"getNote","get_opportunity":"getOpportunity","get_person":"getPerson","get_saved_view":"getSavedView","get_transcript":"getTranscript","get_user":"getUser","list_calls":"listCalls","list_chat_messages":"listChatMessages","list_companies":"listCompanies","list_coworker_connections":"listCoworkerConnections","list_emails":"listEmails","list_entity_field_values":"listEntityFieldValues","list_entity_list_entries":"listRowsHoldingEntity","list_entity_lists":"listListsHoldingEntity","list_entity_notes":"listNotesOnEntity","list_entity_relationships":"listEntityRelationships","list_field_dropdown_options":"listFieldDropdownOptions","list_field_metadata":"listFieldMetadata","list_field_value_changes":"listFieldValueChanges","list_investor_executive_connections":"listInvestorExecutiveConnections","list_list_entries":"listListEntries","list_list_entry_field_value_changes":"listListEntryFieldValueChanges","list_list_entry_fields":"listListEntryFields","list_list_field_dropdown_options":"listListFieldDropdownOptions","list_list_fields":"listListFields","list_lists":"listLists","list_meetings":"listMeetings","list_merge_tasks":"listMergeTasks","list_merges":"listMerges","list_note_attached_companies":"listNoteAttachedCompanies","list_note_attached_opportunities":"listNoteAttachedOpportunities","list_note_attached_persons":"listNoteAttachedPeople","list_note_replies":"listNoteReplies","list_notes":"listNotes","list_opportunities":"listOpportunities","list_persons":"listPeople","list_reminders":"listReminders","list_saved_view_entries":"listSavedViewEntries","list_saved_views":"listSavedViews","list_transcript_fragments":"listTranscriptFragments","list_transcripts":"listTranscripts","list_users":"listUsers","search_companies":"searchCompanies","search_files":"searchFiles","search_list_entries":"searchListEntries","search_notes":"searchNotes","search_persons":"searchPeople","semantic_search":"semanticSearch","update_entity_field_value":"updateEntityFieldValue","update_list_entry_field":"updateListEntryField","update_list_field_dropdown_option":"updateListFieldDropdownOption","update_note":"updateNote"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"agent":{"namespace":"agent"},"agentmail":{"namespace":"legacy.agentmail","methods":{"create_draft":"createDraft","create_inbox":"createInbox","delete_draft":"deleteDraft","delete_inbox":"deleteInbox","delete_thread":"deleteThread","forward_message":"forwardMessage","get_draft":"getDraft","get_inbox":"getInbox","get_message":"getMessage","get_thread":"getThread","list_drafts":"listDrafts","list_inboxes":"listInboxes","list_messages":"listMessages","list_threads":"listThreads","reply_message":"replyToMessage","send_draft":"sendDraft","send_message":"sendMessage","update_draft":"updateDraft","update_inbox":"updateInbox","update_message":"updateMessageLabels","update_thread":"updateThreadLabels"}},"agentmail_v2":{"namespace":"agentmail","methods":{"create_draft":"createDraft","create_inbox":"createInbox","delete_draft":"deleteDraft","delete_inbox":"deleteInbox","delete_thread":"deleteThread","forward_message":"forwardMessage","get_draft":"getDraft","get_inbox":"getInbox","get_message":"getMessage","get_thread":"getThread","list_drafts":"listDrafts","list_inboxes":"listInboxes","list_messages":"listMessages","list_threads":"listThreads","reply_message":"replyToMessage","send_draft":"sendDraft","send_message":"sendMessage","update_draft":"updateDraft","update_inbox":"updateInbox","update_message":"updateMessageLabels","update_thread":"updateThreadLabels"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"agentphone":{"namespace":"legacy.agentphone","methods":{"create_call":"createCall","create_contact":"createContact","create_number":"createNumber","delete_contact":"deleteContact","get_call":"getCall","get_call_transcript":"getCallTranscript","get_contact":"getContact","get_conversation":"getConversation","get_conversation_messages":"getConversationMessages","get_number_messages":"getNumberMessages","get_usage":"getUsage","get_usage_daily":"getDailyUsage","get_usage_monthly":"getMonthlyUsage","list_calls":"listCalls","list_contacts":"listContacts","list_conversations":"listConversations","list_numbers":"listNumbers","react_to_message":"reactToMessage","release_number":"releaseNumber","send_message":"sendMessage","update_contact":"updateContact","update_conversation":"updateConversation"}},"agentphone_v2":{"namespace":"agentphone","methods":{"create_call":"createCall","create_contact":"createContact","create_number":"createNumber","delete_contact":"deleteContact","get_call":"getCall","get_call_transcript":"getCallTranscript","get_contact":"getContact","get_conversation":"getConversation","get_conversation_messages":"getConversationMessages","get_number_messages":"getNumberMessages","get_usage":"getUsage","get_usage_daily":"getDailyUsage","get_usage_monthly":"getMonthlyUsage","list_calls":"listCalls","list_contacts":"listContacts","list_conversations":"listConversations","list_numbers":"listNumbers","react_to_message":"reactToMessage","release_number":"releaseNumber","send_message":"sendMessage","update_contact":"updateContact","update_conversation":"updateConversation"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"agiloft":{"namespace":"agiloft","methods":{"async_status":"asyncStatus","attach_file":"attachFile","attachment_info":"attachmentInfo","create_record":"createRecord","delete_record":"deleteRecord","get_choice_line_id":"getChoiceLineId","list_tables":"listTablesFields","lock_record":"lockRecord","nlp_search":"naturalLanguageSearch","read_record":"readRecord","remove_attachment":"removeAttachment","retrieve_attachment":"retrieveAttachment","run_action_button":"runActionButton","saved_search":"savedSearch","search_records":"searchRecords","select_records":"selectRecords","update_record":"updateRecord","upsert_record":"upsertRecord"}},"ahrefs":{"namespace":"legacy.ahrefs","methods":{"ahrefs_anchors":"anchors","ahrefs_backlinks":"backlinks","ahrefs_backlinks_stats":"backlinksStats","ahrefs_batch_analysis":"batchAnalysis","ahrefs_broken_backlinks":"brokenBacklinks","ahrefs_domain_rating":"domainRating","ahrefs_domain_rating_history":"domainRatingHistory","ahrefs_keyword_overview":"keywordOverview","ahrefs_keywords_history":"keywordsHistory","ahrefs_metrics":"metricsOverview","ahrefs_metrics_history":"metricsHistory","ahrefs_organic_competitors":"organicCompetitors","ahrefs_organic_keywords":"organicKeywords","ahrefs_paid_pages":"paidPages","ahrefs_rank_tracker_competitors_overview":"rankTrackerCompetitorsOverview","ahrefs_rank_tracker_competitors_stats":"rankTrackerCompetitorsStats","ahrefs_rank_tracker_overview":"rankTrackerOverview","ahrefs_rank_tracker_serp_overview":"rankTrackerSerpOverview","ahrefs_refdomains_history":"referringDomainsHistory","ahrefs_referring_domains":"referringDomains","ahrefs_related_terms":"relatedTerms","ahrefs_site_audit_page_explorer":"siteAuditPageExplorer","ahrefs_top_pages":"topPages"}},"ahrefs_v2":{"namespace":"ahrefs","methods":{"ahrefs_anchors":"anchors","ahrefs_backlinks":"backlinks","ahrefs_backlinks_stats":"backlinksStats","ahrefs_batch_analysis":"batchAnalysis","ahrefs_broken_backlinks":"brokenBacklinks","ahrefs_domain_rating":"domainRating","ahrefs_domain_rating_history":"domainRatingHistory","ahrefs_keyword_overview":"keywordOverview","ahrefs_keywords_history":"keywordsHistory","ahrefs_metrics":"metricsOverview","ahrefs_metrics_history":"metricsHistory","ahrefs_organic_competitors":"organicCompetitors","ahrefs_organic_keywords":"organicKeywords","ahrefs_paid_pages":"paidPages","ahrefs_rank_tracker_competitors_overview":"rankTrackerCompetitorsOverview","ahrefs_rank_tracker_competitors_stats":"rankTrackerCompetitorsStats","ahrefs_rank_tracker_overview":"rankTrackerOverview","ahrefs_rank_tracker_serp_overview":"rankTrackerSerpOverview","ahrefs_refdomains_history":"referringDomainsHistory","ahrefs_referring_domains":"referringDomains","ahrefs_related_terms":"relatedTerms","ahrefs_site_audit_page_explorer":"siteAuditPageExplorer","ahrefs_top_pages":"topPages"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"airtable":{"namespace":"airtable","methods":{"create":"createRecords","delete":"deleteRecords","get":"getRecord","getSchema":"getBaseSchema","list":"listRecords","listBases":"listBases","listTables":"listTables","update":"updateRecord","updateMultiple":"updateMultipleRecords","upsert":"upsertRecords"},"triggers":{"airtable_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"algolia":{"namespace":"legacy.algolia","methods":{"add_record":"addRecord","batch_operations":"batchOperations","browse_records":"browseRecords","clear_records":"clearRecords","copy_move_index":"copyMoveIndex","delete_by_filter":"deleteByFilter","delete_index":"deleteIndex","delete_record":"deleteRecord","get_record":"getRecord","get_records":"getRecords","get_settings":"getSettings","get_task_status":"getTaskStatus","list_indices":"listIndices","partial_update_record":"partialUpdateRecord","search":"search","update_settings":"updateSettings"}},"algolia_v2":{"namespace":"algolia","methods":{"add_record":"addRecord","batch_operations":"batchOperations","browse_records":"browseRecords","clear_records":"clearRecords","copy_move_index":"copyMoveIndex","delete_by_filter":"deleteByFilter","delete_index":"deleteIndex","delete_record":"deleteRecord","get_record":"getRecord","get_records":"getRecords","get_settings":"getSettings","get_task_status":"getTaskStatus","list_indices":"listIndices","partial_update_record":"partialUpdateRecord","search":"search","update_settings":"updateSettings"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"amplitude":{"namespace":"legacy.amplitude","methods":{"event_segmentation":"eventSegmentation","funnels":"funnels","get_active_users":"getActiveUsers","get_revenue":"getRevenue","group_identify":"groupIdentify","identify_user":"identifyUser","list_events":"listEvents","realtime_active_users":"realTimeActiveUsers","retention":"retention","send_event":"sendEvent","user_activity":"userActivity","user_profile":"userProfile","user_search":"userSearch"}},"amplitude_v2":{"namespace":"amplitude","methods":{"event_segmentation":"eventSegmentation","funnels":"funnels","get_active_users":"getActiveUsers","get_revenue":"getRevenue","group_identify":"groupIdentify","identify_user":"identifyUser","list_events":"listEvents","realtime_active_users":"realTimeActiveUsers","retention":"retention","send_event":"sendEvent","user_activity":"userActivity","user_profile":"userProfile","user_search":"userSearch"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"api":{"namespace":"api"},"api_trigger":{"namespace":"legacy.apiTrigger"},"apify":{"namespace":"legacy.apify","methods":{"apify_get_dataset_items":"getDatasetItems","apify_get_run":"getRun","apify_run_actor_async":"runActorAsync","apify_run_actor_sync":"runActor","apify_run_task":"runTask"}},"apify_v2":{"namespace":"apify","methods":{"apify_get_dataset_items":"getDatasetItems","apify_get_run":"getRun","apify_run_actor_async":"runActorAsync","apify_run_actor_sync":"runActor","apify_run_task":"runTask"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"apollo":{"namespace":"legacy.apollo","methods":{"account_bulk_create":"bulkCreateAccounts","account_bulk_update":"bulkUpdateAccounts","account_create":"createAccount","account_search":"searchAccounts","account_update":"updateAccount","contact_bulk_create":"bulkCreateContacts","contact_bulk_update":"bulkUpdateContacts","contact_create":"createContact","contact_search":"searchContacts","contact_update":"updateContact","email_accounts":"getEmailAccounts","opportunity_create":"createOpportunity","opportunity_get":"getOpportunity","opportunity_search":"searchOpportunities","opportunity_update":"updateOpportunity","organization_bulk_enrich":"bulkEnrichOrganizations","organization_enrich":"enrichOrganization","organization_search":"searchOrganizations","people_bulk_enrich":"bulkEnrichPeople","people_enrich":"enrichPerson","people_search":"searchPeople","sequence_add":"addToSequence","sequence_search":"searchSequences","task_create":"createTask","task_search":"searchTasks"}},"apollo_v2":{"namespace":"apollo","methods":{"account_bulk_create":"bulkCreateAccounts","account_bulk_update":"bulkUpdateAccounts","account_create":"createAccount","account_search":"searchAccounts","account_update":"updateAccount","contact_bulk_create":"bulkCreateContacts","contact_bulk_update":"bulkUpdateContacts","contact_create":"createContact","contact_search":"searchContacts","contact_update":"updateContact","email_accounts":"getEmailAccounts","opportunity_create":"createOpportunity","opportunity_get":"getOpportunity","opportunity_search":"searchOpportunities","opportunity_update":"updateOpportunity","organization_bulk_enrich":"bulkEnrichOrganizations","organization_enrich":"enrichOrganization","organization_search":"searchOrganizations","people_bulk_enrich":"bulkEnrichPeople","people_enrich":"enrichPerson","people_search":"searchPeople","sequence_add":"addToSequence","sequence_search":"searchSequences","task_create":"createTask","task_search":"searchTasks"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"appconfig":{"namespace":"legacy.appconfig","methods":{"create_application":"createApplication","create_configuration_profile":"createConfigurationProfile","create_environment":"createEnvironment","create_hosted_configuration_version":"createHostedConfigurationVersion","delete_application":"deleteApplication","delete_configuration_profile":"deleteConfigurationProfile","delete_environment":"deleteEnvironment","delete_hosted_configuration_version":"deleteHostedConfigurationVersion","get_application":"getApplication","get_configuration":"getConfiguration","get_configuration_profile":"getConfigurationProfile","get_deployment":"getDeployment","get_environment":"getEnvironment","get_hosted_configuration_version":"getHostedConfigurationVersion","list_applications":"listApplications","list_configuration_profiles":"listConfigurationProfiles","list_deployment_strategies":"listDeploymentStrategies","list_deployments":"listDeployments","list_environments":"listEnvironments","list_hosted_configuration_versions":"listHostedConfigurationVersions","start_deployment":"startDeployment","stop_deployment":"stopDeployment","update_application":"updateApplication","update_configuration_profile":"updateConfigurationProfile","update_environment":"updateEnvironment"}},"appconfig_v2":{"namespace":"appconfig","methods":{"create_application":"createApplication","create_configuration_profile":"createConfigurationProfile","create_environment":"createEnvironment","create_hosted_configuration_version":"createHostedConfigurationVersion","delete_application":"deleteApplication","delete_configuration_profile":"deleteConfigurationProfile","delete_environment":"deleteEnvironment","delete_hosted_configuration_version":"deleteHostedConfigurationVersion","get_application":"getApplication","get_configuration":"getConfiguration","get_configuration_profile":"getConfigurationProfile","get_deployment":"getDeployment","get_environment":"getEnvironment","get_hosted_configuration_version":"getHostedConfigurationVersion","list_applications":"listApplications","list_configuration_profiles":"listConfigurationProfiles","list_deployment_strategies":"listDeploymentStrategies","list_deployments":"listDeployments","list_environments":"listEnvironments","list_hosted_configuration_versions":"listHostedConfigurationVersions","start_deployment":"startDeployment","stop_deployment":"stopDeployment","update_application":"updateApplication","update_configuration_profile":"updateConfigurationProfile","update_environment":"updateEnvironment"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"arxiv":{"namespace":"arxiv","methods":{"arxiv_get_author_papers":"getAuthorPapers","arxiv_get_paper":"getPaperDetails","arxiv_search":"searchPapers"}},"asana":{"namespace":"asana","methods":{"add_comment":"addComment","add_followers":"addFollowers","create_project":"createProject","create_section":"createSection","create_subtask":"createSubtask","create_task":"createTask","delete_task":"deleteTask","get_project":"getProject","get_projects":"getProjects","get_task":"getTask","list_sections":"listSections","list_workspaces":"listWorkspaces","search_tasks":"searchTasks","update_task":"updateTask"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"ashby":{"namespace":"legacy.ashby","methods":{"add_candidate_tag":"addCandidateTag","anonymize_candidate":"anonymizeCandidate","change_application_source":"changeApplicationSource","change_application_stage":"changeApplicationStage","create_application":"createApplication","create_candidate":"createCandidate","create_note":"createNote","delete_application":"deleteApplication","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_job_posting":"getJobPosting","get_offer":"getOffer","get_opening":"getOpening","list_application_feedback":"listApplicationFeedback","list_application_history":"listApplicationHistory","list_applications":"listApplications","list_archive_reasons":"listArchiveReasons","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_interview_plans":"listInterviewPlans","list_interview_stages":"listInterviewStages","list_interviews":"listInterviews","list_job_postings":"listJobPostings","list_jobs":"listJobs","list_locations":"listLocations","list_notes":"listNotes","list_offers":"listOffers","list_openings":"listOpenings","list_sources":"listSources","list_users":"listUsers","remove_candidate_tag":"removeCandidateTag","search_candidates":"searchCandidates","search_jobs":"searchJobs","search_openings":"searchOpenings","search_users":"searchUsers","set_custom_field_value":"setCustomFieldValue","set_custom_field_values":"setCustomFieldValues","transfer_application":"transferApplication","update_candidate":"updateCandidate","upload_candidate_file":"uploadCandidateFile","upload_resume":"uploadResume"},"triggers":{"ashby_application_submit":"applicationSubmit","ashby_application_update":"applicationUpdate","ashby_candidate_delete":"candidateDelete","ashby_candidate_hire":"candidateHire","ashby_candidate_merge":"candidateMerge","ashby_candidate_stage_change":"candidateStageChange","ashby_interview_schedule_create":"interviewScheduleCreate","ashby_interview_schedule_update":"interviewScheduleUpdate","ashby_job_create":"jobCreate","ashby_job_posting_delete":"jobPostingDelete","ashby_job_posting_update":"jobPostingUpdate","ashby_job_update":"jobUpdate","ashby_offer_create":"offerCreate","ashby_offer_delete":"offerDelete","ashby_offer_update":"offerUpdate","ashby_opening_create":"openingCreate","ashby_signature_request_update":"signatureRequestUpdate"}},"ashby_v2":{"namespace":"ashby","methods":{"add_candidate_tag":"addCandidateTag","anonymize_candidate":"anonymizeCandidate","change_application_source":"changeApplicationSource","change_application_stage":"changeApplicationStage","create_application":"createApplication","create_candidate":"createCandidate","create_note":"createNote","delete_application":"deleteApplication","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_job_posting":"getJobPosting","get_offer":"getOffer","get_opening":"getOpening","list_application_feedback":"listApplicationFeedback","list_application_history":"listApplicationHistory","list_applications":"listApplications","list_archive_reasons":"listArchiveReasons","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_interview_plans":"listInterviewPlans","list_interview_stages":"listInterviewStages","list_interviews":"listInterviews","list_job_postings":"listJobPostings","list_jobs":"listJobs","list_locations":"listLocations","list_notes":"listNotes","list_offers":"listOffers","list_openings":"listOpenings","list_sources":"listSources","list_users":"listUsers","remove_candidate_tag":"removeCandidateTag","search_candidates":"searchCandidates","search_jobs":"searchJobs","search_openings":"searchOpenings","search_users":"searchUsers","set_custom_field_value":"setCustomFieldValue","set_custom_field_values":"setCustomFieldValues","transfer_application":"transferApplication","update_candidate":"updateCandidate","upload_candidate_file":"uploadCandidateFile","upload_resume":"uploadResume"},"triggers":{"ashby_application_submit":"applicationSubmit","ashby_application_update":"applicationUpdate","ashby_candidate_delete":"candidateDelete","ashby_candidate_hire":"candidateHire","ashby_candidate_merge":"candidateMerge","ashby_candidate_stage_change":"candidateStageChange","ashby_interview_schedule_create":"interviewScheduleCreate","ashby_interview_schedule_update":"interviewScheduleUpdate","ashby_job_create":"jobCreate","ashby_job_posting_delete":"jobPostingDelete","ashby_job_posting_update":"jobPostingUpdate","ashby_job_update":"jobUpdate","ashby_offer_create":"offerCreate","ashby_offer_delete":"offerDelete","ashby_offer_update":"offerUpdate","ashby_opening_create":"openingCreate","ashby_signature_request_update":"signatureRequestUpdate"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"athena":{"namespace":"legacy.athena","methods":{"batch_get_named_query":"batchGetNamedQueries","batch_get_prepared_statement":"batchGetPreparedStatements","batch_get_query_execution":"batchGetQueryExecutions","create_named_query":"createNamedQuery","create_prepared_statement":"createPreparedStatement","delete_named_query":"deleteNamedQuery","delete_prepared_statement":"deletePreparedStatement","get_data_catalog":"getDataCatalog","get_database":"getDatabase","get_named_query":"getNamedQuery","get_prepared_statement":"getPreparedStatement","get_query_execution":"getQueryExecution","get_query_results":"getQueryResults","get_query_runtime_statistics":"getQueryRuntimeStatistics","get_table_metadata":"getTableMetadata","get_work_group":"getWorkgroup","list_data_catalogs":"listDataCatalogs","list_databases":"listDatabases","list_named_queries":"listNamedQueries","list_prepared_statements":"listPreparedStatements","list_query_executions":"listQueryExecutions","list_table_metadata":"listTableMetadata","list_work_groups":"listWorkgroups","start_query":"startQuery","stop_query":"stopQuery","update_named_query":"updateNamedQuery","update_prepared_statement":"updatePreparedStatement"}},"athena_v2":{"namespace":"athena","methods":{"batch_get_named_query":"batchGetNamedQueries","batch_get_prepared_statement":"batchGetPreparedStatements","batch_get_query_execution":"batchGetQueryExecutions","create_named_query":"createNamedQuery","create_prepared_statement":"createPreparedStatement","delete_named_query":"deleteNamedQuery","delete_prepared_statement":"deletePreparedStatement","get_data_catalog":"getDataCatalog","get_database":"getDatabase","get_named_query":"getNamedQuery","get_prepared_statement":"getPreparedStatement","get_query_execution":"getQueryExecution","get_query_results":"getQueryResults","get_query_runtime_statistics":"getQueryRuntimeStatistics","get_table_metadata":"getTableMetadata","get_work_group":"getWorkgroup","list_data_catalogs":"listDataCatalogs","list_databases":"listDatabases","list_named_queries":"listNamedQueries","list_prepared_statements":"listPreparedStatements","list_query_executions":"listQueryExecutions","list_table_metadata":"listTableMetadata","list_work_groups":"listWorkgroups","start_query":"startQuery","stop_query":"stopQuery","update_named_query":"updateNamedQuery","update_prepared_statement":"updatePreparedStatement"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"attio":{"namespace":"attio","methods":{"assert_record":"assertRecordUpsert","create_attribute":"createAttribute","create_comment":"createComment","create_list":"createList","create_list_entry":"createListEntry","create_note":"createNote","create_object":"createObject","create_record":"createRecord","create_task":"createTask","create_webhook":"createWebhook","delete_comment":"deleteComment","delete_list_entry":"deleteListEntry","delete_note":"deleteNote","delete_record":"deleteRecord","delete_task":"deleteTask","delete_webhook":"deleteWebhook","get_attribute":"getAttribute","get_comment":"getComment","get_list":"getList","get_list_entry":"getListEntry","get_member":"getMember","get_note":"getNote","get_object":"getObject","get_record":"getRecord","get_task":"getTask","get_thread":"getThread","get_webhook":"getWebhook","list_attributes":"listAttributes","list_lists":"listLists","list_members":"listMembers","list_notes":"listNotes","list_objects":"listObjects","list_records":"listRecords","list_tasks":"listTasks","list_threads":"listThreads","list_webhooks":"listWebhooks","query_list_entries":"queryListEntries","search_records":"searchRecords","update_attribute":"updateAttribute","update_list":"updateList","update_list_entry":"updateListEntry","update_object":"updateObject","update_record":"updateRecord","update_task":"updateTask","update_webhook":"updateWebhook"},"triggers":{"attio_comment_created":"commentCreated","attio_comment_deleted":"commentDeleted","attio_comment_resolved":"commentResolved","attio_comment_unresolved":"commentUnresolved","attio_list_created":"listCreated","attio_list_deleted":"listDeleted","attio_list_entry_created":"listEntryCreated","attio_list_entry_deleted":"listEntryDeleted","attio_list_entry_updated":"listEntryUpdated","attio_list_updated":"listUpdated","attio_note_created":"noteCreated","attio_note_deleted":"noteDeleted","attio_note_updated":"noteUpdated","attio_record_created":"recordCreated","attio_record_deleted":"recordDeleted","attio_record_merged":"recordMerged","attio_record_updated":"recordUpdated","attio_task_created":"taskCreated","attio_task_deleted":"taskDeleted","attio_task_updated":"taskUpdated","attio_webhook":"webhook","attio_workspace_member_created":"workspaceMemberCreated"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"azure_data_explorer":{"namespace":"legacy.azureDataExplorer","methods":{"azure_data_explorer_create_table":"createTable","azure_data_explorer_drop_table":"dropTable","azure_data_explorer_ingest_from_query":"ingestFromQuery","azure_data_explorer_ingest_inline":"ingestRowsInline","azure_data_explorer_list_databases":"listDatabases","azure_data_explorer_list_functions":"listFunctions","azure_data_explorer_list_tables":"listTables","azure_data_explorer_management":"managementCommandAdvanced","azure_data_explorer_query":"runQuery","azure_data_explorer_show_database_schema":"showDatabaseSchema","azure_data_explorer_show_ingestion_failures":"showIngestionFailures","azure_data_explorer_show_operations":"showOperations","azure_data_explorer_show_table_details":"showTableDetails","azure_data_explorer_show_table_schema":"showTableSchema"}},"azure_data_explorer_v2":{"namespace":"azureDataExplorer","methods":{"azure_data_explorer_create_table":"createTable","azure_data_explorer_drop_table":"dropTable","azure_data_explorer_ingest_from_query":"ingestFromQuery","azure_data_explorer_ingest_inline":"ingestRowsInline","azure_data_explorer_list_databases":"listDatabases","azure_data_explorer_list_functions":"listFunctions","azure_data_explorer_list_tables":"listTables","azure_data_explorer_management":"managementCommandAdvanced","azure_data_explorer_query":"runQuery","azure_data_explorer_show_database_schema":"showDatabaseSchema","azure_data_explorer_show_ingestion_failures":"showIngestionFailures","azure_data_explorer_show_operations":"showOperations","azure_data_explorer_show_table_details":"showTableDetails","azure_data_explorer_show_table_schema":"showTableSchema"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"azure_devops":{"namespace":"legacy.azureDevops","methods":{"azure_devops_add_comment":"addComment","azure_devops_create_work_item":"createWorkItem","azure_devops_get_build_log":"getBuildLog","azure_devops_get_build_timeline":"getBuildTimeline","azure_devops_get_comments":"getComments","azure_devops_get_pipeline":"getPipeline","azure_devops_get_pipeline_run":"getPipelineRun","azure_devops_get_work_item":"getWorkItem","azure_devops_get_work_items_batch":"getWorkItemsBatch","azure_devops_get_work_items_between_builds":"getWorkItemsBetweenBuilds","azure_devops_list_build_logs":"listBuildLogs","azure_devops_list_builds":"listBuilds","azure_devops_list_pipeline_runs":"listPipelineRuns","azure_devops_list_pipelines":"listPipelines","azure_devops_query_work_items":"queryWorkItems","azure_devops_update_work_item":"updateWorkItem"},"triggers":{"azure_devops_build_failed":"buildFailed","azure_devops_webhook":"webhook","azure_devops_work_item_created":"workItemCreated"}},"azure_devops_v2":{"namespace":"azureDevops","methods":{"azure_devops_add_comment":"addComment","azure_devops_create_work_item":"createWorkItem","azure_devops_get_build_log":"getBuildLog","azure_devops_get_build_timeline":"getBuildTimeline","azure_devops_get_comments":"getComments","azure_devops_get_pipeline":"getPipeline","azure_devops_get_pipeline_run":"getPipelineRun","azure_devops_get_work_item":"getWorkItem","azure_devops_get_work_items_batch":"getWorkItemsBatch","azure_devops_get_work_items_between_builds":"getWorkItemsBetweenBuilds","azure_devops_list_build_logs":"listBuildLogs","azure_devops_list_builds":"listBuilds","azure_devops_list_pipeline_runs":"listPipelineRuns","azure_devops_list_pipelines":"listPipelines","azure_devops_query_work_items":"queryWorkItems","azure_devops_update_work_item":"updateWorkItem"},"triggers":{"azure_devops_build_failed":"buildFailed","azure_devops_webhook":"webhook","azure_devops_work_item_created":"workItemCreated"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"bitbucket":{"namespace":"bitbucket","methods":{"bitbucket_approve_pull_request":"approvePullRequest","bitbucket_create_branch":"createBranch","bitbucket_create_pull_request":"createPullRequest","bitbucket_create_pull_request_comment":"createPullRequestComment","bitbucket_decline_pull_request":"declinePullRequest","bitbucket_delete_branch":"deleteBranch","bitbucket_get_commit":"getCommit","bitbucket_get_file":"getFile","bitbucket_get_file_metadata":"getFileMetadata","bitbucket_get_pipeline":"getPipeline","bitbucket_get_pipeline_step_log":"getPipelineStepLog","bitbucket_get_pull_request":"getPullRequest","bitbucket_get_pull_request_diff":"getPullRequestDiff","bitbucket_get_pull_request_diffstat":"getPullRequestDiffstat","bitbucket_get_pull_request_merge_task_status":"getPullRequestMergeTaskStatus","bitbucket_get_repository":"getRepository","bitbucket_list_branches":"listBranches","bitbucket_list_commits":"listCommits","bitbucket_list_directory":"listDirectory","bitbucket_list_pipeline_steps":"listPipelineSteps","bitbucket_list_pipelines":"listPipelines","bitbucket_list_pull_request_comments":"listPullRequestComments","bitbucket_list_pull_request_commit_statuses":"listPullRequestCommitStatuses","bitbucket_list_pull_requests":"listPullRequests","bitbucket_list_repositories":"listRepositories","bitbucket_list_workspaces":"listWorkspaces","bitbucket_merge_pull_request":"mergePullRequest","bitbucket_request_pull_request_changes":"requestPullRequestChanges","bitbucket_stop_pipeline":"stopPipeline","bitbucket_trigger_pipeline":"triggerPipeline"},"triggers":{"bitbucket_build_status_created":"buildStatusCreated","bitbucket_build_status_updated":"buildStatusUpdated","bitbucket_commit_comment_created":"commitCommentCreated","bitbucket_pull_request_approval_removed":"pullRequestApprovalRemoved","bitbucket_pull_request_approved":"pullRequestApproved","bitbucket_pull_request_changes_request_removed":"pullRequestChangesRequestRemoved","bitbucket_pull_request_changes_requested":"pullRequestChangesRequested","bitbucket_pull_request_comment_created":"pullRequestCommentCreated","bitbucket_pull_request_comment_deleted":"pullRequestCommentDeleted","bitbucket_pull_request_comment_reopened":"pullRequestCommentReopened","bitbucket_pull_request_comment_resolved":"pullRequestCommentResolved","bitbucket_pull_request_comment_updated":"pullRequestCommentUpdated","bitbucket_pull_request_created":"pullRequestCreated","bitbucket_pull_request_declined":"pullRequestDeclined","bitbucket_pull_request_merged":"pullRequestMerged","bitbucket_pull_request_updated":"pullRequestUpdated","bitbucket_push":"push","bitbucket_repository_forked":"repositoryForked","bitbucket_repository_updated":"repositoryUpdated"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"box":{"namespace":"legacy.box","methods":{"copy_file":"copyFile","create_folder":"createFolder","delete_file":"deleteFile","delete_folder":"deleteFolder","download_file":"downloadFile","get_file_info":"getFileInfo","list_folder_items":"listFolderItems","search":"search","sign_cancel_request":"cancelSignRequest","sign_create_request":"createSignRequest","sign_get_request":"getSignRequest","sign_list_requests":"listSignRequests","sign_resend_request":"resendSignRequest","update_file":"updateFile","upload_file":"uploadFile"}},"box_v2":{"namespace":"box","methods":{"copy_file":"copyFile","create_folder":"createFolder","delete_file":"deleteFile","delete_folder":"deleteFolder","download_file":"downloadFile","get_file_info":"getFileInfo","list_folder_items":"listFolderItems","search":"search","sign_cancel_request":"cancelSignRequest","sign_create_request":"createSignRequest","sign_get_request":"getSignRequest","sign_list_requests":"listSignRequests","sign_resend_request":"resendSignRequest","update_file":"updateFile","upload_file":"uploadFile"}},"brandfetch":{"namespace":"brandfetch","methods":{"get_brand":"getBrand","search":"searchBrands"}},"brex":{"namespace":"legacy.brex","methods":{"archive_budget":"archiveBudget","create_budget":"createBudget","create_spend_limit":"createSpendLimit","create_transfer":"createTransfer","create_vendor":"createVendor","get_budget":"getBudget","get_cash_account":"getCashAccount","get_company":"getCompany","get_current_user":"getCurrentUser","get_expense":"getExpense","get_spend_limit":"getSpendLimit","get_transfer":"getTransfer","get_user":"getUser","get_vendor":"getVendor","list_budgets":"listBudgets","list_card_accounts":"listCardAccounts","list_card_statements":"listCardStatements","list_card_transactions":"listCardTransactions","list_cards":"listCards","list_cash_accounts":"listCashAccounts","list_cash_statements":"listCashStatements","list_cash_transactions":"listCashTransactions","list_departments":"listDepartments","list_expenses":"listExpenses","list_locations":"listLocations","list_spend_limits":"listSpendLimits","list_titles":"listTitles","list_transfers":"listTransfers","list_users":"listUsers","list_vendors":"listVendors","match_receipt":"matchReceipt","update_expense":"updateExpenseMemo","update_vendor":"updateVendor","upload_receipt":"uploadReceipt"}},"brex_v2":{"namespace":"brex","methods":{"archive_budget":"archiveBudget","create_budget":"createBudget","create_spend_limit":"createSpendLimit","create_transfer":"createTransfer","create_vendor":"createVendor","get_budget":"getBudget","get_cash_account":"getCashAccount","get_company":"getCompany","get_current_user":"getCurrentUser","get_expense":"getExpense","get_spend_limit":"getSpendLimit","get_transfer":"getTransfer","get_user":"getUser","get_vendor":"getVendor","list_budgets":"listBudgets","list_card_accounts":"listCardAccounts","list_card_statements":"listCardStatements","list_card_transactions":"listCardTransactions","list_cards":"listCards","list_cash_accounts":"listCashAccounts","list_cash_statements":"listCashStatements","list_cash_transactions":"listCashTransactions","list_departments":"listDepartments","list_expenses":"listExpenses","list_locations":"listLocations","list_spend_limits":"listSpendLimits","list_titles":"listTitles","list_transfers":"listTransfers","list_users":"listUsers","list_vendors":"listVendors","match_receipt":"matchReceipt","update_expense":"updateExpenseMemo","update_vendor":"updateVendor","upload_receipt":"uploadReceipt"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"brightdata":{"namespace":"legacy.brightdata","methods":{"cancel_snapshot":"cancelSnapshot","discover":"discover","download_snapshot":"downloadSnapshot","scrape_dataset":"scrapeDataset","scrape_url":"scrapeUrl","serp_search":"serpSearch","snapshot_status":"snapshotStatus","sync_scrape":"syncScrape"}},"brightdata_v2":{"namespace":"brightdata","methods":{"cancel_snapshot":"cancelSnapshot","discover":"discover","download_snapshot":"downloadSnapshot","scrape_dataset":"scrapeDataset","scrape_url":"scrapeUrl","serp_search":"serpSearch","snapshot_status":"snapshotStatus","sync_scrape":"syncScrape"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"browser_use":{"namespace":"legacy.browserUse"},"browser_use_v2":{"namespace":"browserUse","paramAliases":{"action":{"oauthCredential":"credential"}}},"buffer":{"namespace":"legacy.buffer","methods":{"create_idea":"createIdea","create_post":"createPost","delete_post":"deletePost","edit_post":"editPost","get_account":"getAccount","get_aggregated_post_metrics":"getAggregatedPostMetrics","get_channel":"getChannel","get_channels":"getChannels","get_daily_posting_limits":"getDailyPostingLimits","get_idea_groups":"getIdeaGroups","get_ideas":"getIdeas","get_post":"getPost","get_posts":"getPosts"}},"buffer_v2":{"namespace":"buffer","methods":{"create_idea":"createIdea","create_post":"createPost","delete_post":"deletePost","edit_post":"editPost","get_account":"getAccount","get_aggregated_post_metrics":"getAggregatedPostMetrics","get_channel":"getChannel","get_channels":"getChannels","get_daily_posting_limits":"getDailyPostingLimits","get_idea_groups":"getIdeaGroups","get_ideas":"getIdeas","get_post":"getPost","get_posts":"getPosts"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"calcom":{"namespace":"calcom","methods":{"calcom_cancel_booking":"cancelBooking","calcom_confirm_booking":"confirmBooking","calcom_create_booking":"createBooking","calcom_create_event_type":"createEventType","calcom_create_schedule":"createSchedule","calcom_decline_booking":"declineBooking","calcom_delete_event_type":"deleteEventType","calcom_delete_schedule":"deleteSchedule","calcom_get_booking":"getBooking","calcom_get_default_schedule":"getDefaultSchedule","calcom_get_event_type":"getEventType","calcom_get_schedule":"getSchedule","calcom_get_slots":"getAvailableSlots","calcom_list_bookings":"listBookings","calcom_list_event_types":"listEventTypes","calcom_list_schedules":"listSchedules","calcom_reschedule_booking":"rescheduleBooking","calcom_update_event_type":"updateEventType","calcom_update_schedule":"updateSchedule"},"triggers":{"calcom_booking_cancelled":"bookingCancelled","calcom_booking_created":"bookingCreated","calcom_booking_paid":"bookingPaid","calcom_booking_rejected":"bookingRejected","calcom_booking_requested":"bookingRequested","calcom_booking_rescheduled":"bookingRescheduled","calcom_meeting_ended":"meetingEnded","calcom_recording_ready":"recordingReady","calcom_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"calendly":{"namespace":"legacy.calendly","methods":{"calendly_cancel_event":"cancelEvent","calendly_create_event_invitee":"bookMeeting","calendly_create_invitee_no_show":"markInviteeNoShow","calendly_create_scheduling_link":"createSchedulingLink","calendly_delete_invitee_no_show":"unmarkInviteeNoShow","calendly_get_current_user":"getCurrentUser","calendly_get_event_invitee":"getEventInvitee","calendly_get_event_type":"getEventType","calendly_get_scheduled_event":"getScheduledEvent","calendly_get_user":"getUser","calendly_list_event_invitees":"listEventInvitees","calendly_list_event_type_available_times":"listEventTypeAvailableTimes","calendly_list_event_types":"listEventTypes","calendly_list_organization_memberships":"listOrganizationMemberships","calendly_list_routing_form_submissions":"listRoutingFormSubmissions","calendly_list_routing_forms":"listRoutingForms","calendly_list_scheduled_events":"listScheduledEvents","calendly_list_user_availability_schedules":"listUserAvailabilitySchedules","calendly_list_user_busy_times":"listUserBusyTimes"},"triggers":{"calendly_invitee_canceled":"inviteeCanceled","calendly_invitee_created":"inviteeCreated","calendly_routing_form_submitted":"routingFormSubmitted","calendly_webhook":"webhook"}},"calendly_v2":{"namespace":"calendly","methods":{"calendly_cancel_event":"cancelEvent","calendly_create_event_invitee":"bookMeeting","calendly_create_invitee_no_show":"markInviteeNoShow","calendly_create_scheduling_link":"createSchedulingLink","calendly_delete_invitee_no_show":"unmarkInviteeNoShow","calendly_get_current_user":"getCurrentUser","calendly_get_event_invitee":"getEventInvitee","calendly_get_event_type":"getEventType","calendly_get_scheduled_event":"getScheduledEvent","calendly_get_user":"getUser","calendly_list_event_invitees":"listEventInvitees","calendly_list_event_type_available_times":"listEventTypeAvailableTimes","calendly_list_event_types":"listEventTypes","calendly_list_organization_memberships":"listOrganizationMemberships","calendly_list_routing_form_submissions":"listRoutingFormSubmissions","calendly_list_routing_forms":"listRoutingForms","calendly_list_scheduled_events":"listScheduledEvents","calendly_list_user_availability_schedules":"listUserAvailabilitySchedules","calendly_list_user_busy_times":"listUserBusyTimes"},"triggers":{"calendly_invitee_canceled":"inviteeCanceled","calendly_invitee_created":"inviteeCreated","calendly_routing_form_submitted":"routingFormSubmitted","calendly_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"cbinsights":{"namespace":"legacy.cbinsights","methods":{"chat":"askChatCbi","get_commercial_maturity_history":"getCommercialMaturityHistory","get_exit_probability_history":"getExitProbabilityHistory","get_mosaic_history":"getMosaicHistory","get_org_business_relationships":"getOrganizationBusinessRelationships","get_org_funding_window":"getOrganizationFundingWindow","get_org_fundings":"getOrganizationFundings","get_org_investments":"getOrganizationInvestments","get_org_management_and_board":"getOrganizationManagementAndBoard","get_org_outlook":"getOrganizationOutlook","get_org_portfolio_exits":"getOrganizationPortfolioExits","get_org_revenue":"getOrganizationRevenue","get_scouting_report":"getScoutingReport","get_strategy_map":"getStrategyMap","list_business_relationships":"listBusinessRelationships","list_funding_window":"listFundingWindows","list_fundings":"listFundings","list_investments":"listInvestments","list_management_and_board":"listManagementAndBoard","list_outlook":"listOutlook","list_portfolio_exits":"listPortfolioExits","list_revenue":"listRevenue","lookup_organizations":"lookUpOrganizations","rag":"retrieveContext","search_firmographics":"searchFirmographics"}},"cbinsights_v2":{"namespace":"cbinsights","methods":{"chat":"askChatCbi","get_commercial_maturity_history":"getCommercialMaturityHistory","get_exit_probability_history":"getExitProbabilityHistory","get_mosaic_history":"getMosaicHistory","get_org_business_relationships":"getOrganizationBusinessRelationships","get_org_funding_window":"getOrganizationFundingWindow","get_org_fundings":"getOrganizationFundings","get_org_investments":"getOrganizationInvestments","get_org_management_and_board":"getOrganizationManagementAndBoard","get_org_outlook":"getOrganizationOutlook","get_org_portfolio_exits":"getOrganizationPortfolioExits","get_org_revenue":"getOrganizationRevenue","get_scouting_report":"getScoutingReport","get_strategy_map":"getStrategyMap","list_business_relationships":"listBusinessRelationships","list_funding_window":"listFundingWindows","list_fundings":"listFundings","list_investments":"listInvestments","list_management_and_board":"listManagementAndBoard","list_outlook":"listOutlook","list_portfolio_exits":"listPortfolioExits","list_revenue":"listRevenue","lookup_organizations":"lookUpOrganizations","rag":"retrieveContext","search_firmographics":"searchFirmographics"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"chat_trigger":{"namespace":"legacy.chatTrigger"},"checkr":{"namespace":"legacy.checkr","methods":{"add_report_tag":"addReportTag","apply_report_review_action":"applyReportReviewAction","cancel_adverse_action":"cancelAdverseAction","cancel_continuous_check":"cancelContinuousCheck","cancel_invitation":"cancelInvitation","cancel_subscription":"cancelSubscription","complete_report":"completeReport","create_adverse_action":"createAdverseAction","create_candidate":"createCandidate","create_continuous_check":"createContinuousCheck","create_geo":"createGeo","create_invitation":"inviteCandidate","create_report":"orderReport","create_subscription":"scheduleRecurringCheck","delete_candidate_pii":"deleteCandidatePii","delete_geo":"deleteGeo","get_account":"getAccount","get_adverse_action":"getAdverseAction","get_candidate":"getCandidate","get_continuous_check":"getContinuousCheck","get_document":"getDocument","get_geo":"getGeo","get_invitation":"getInvitation","get_node":"getNode","get_package":"getPackage","get_program":"getProgram","get_report":"getReport","get_report_eta":"getReportEta","get_report_progressive_status":"getReportCheckpoints","get_report_tags":"getReportTags","get_screening":"getScreening","get_subscription":"getSubscription","get_verification":"getVerification","list_adverse_actions":"listAdverseActions","list_adverse_items":"listAdverseItems","list_assessments":"listAssessments","list_candidate_documents":"listCandidateDocuments","list_candidates":"listCandidates","list_continuous_checks":"listContinuousChecks","list_counties":"listCounties","list_geos":"listGeos","list_invitations":"listInvitations","list_nodes":"listNodes","list_packages":"listPackages","list_programs":"listPrograms","list_report_addresses":"listReportAddresses","list_subscriptions":"listSubscriptions","list_users":"listUsers","list_verifications":"listVerifications","remove_report_tag":"removeReportTag","set_report_tags":"setReportTags","update_candidate":"updateCandidate","update_continuous_check":"updateContinuousCheck","update_geo":"updateGeo","update_report":"updateReport","update_subscription":"updateSubscription"},"triggers":{"checkr_adverse_action_canceled":"adverseActionCanceled","checkr_adverse_action_completed":"adverseActionCompleted","checkr_adverse_action_created":"adverseActionCreated","checkr_adverse_action_notice_not_delivered":"adverseActionNoticeNotDelivered","checkr_adverse_action_paused":"adverseActionPaused","checkr_adverse_action_resumed":"adverseActionResumed","checkr_candidate_created":"candidateCreated","checkr_candidate_updated":"candidateUpdated","checkr_continuous_check_confirmation_required":"continuousCheckConfirmationRequired","checkr_continuous_check_subscription_error":"continuousCheckSubscriptionError","checkr_invitation_completed":"invitationCompleted","checkr_invitation_created":"invitationCreated","checkr_invitation_deleted":"invitationDeleted","checkr_invitation_expired":"invitationExpired","checkr_report_canceled":"reportCanceled","checkr_report_completed":"reportCompleted","checkr_report_created":"reportCreated","checkr_report_dispute_completed":"reportDisputeCompleted","checkr_report_disputed":"reportDisputed","checkr_report_engaged":"reportEngaged","checkr_report_paused":"reportPaused","checkr_report_post_adverse_action":"reportPostAdverseAction","checkr_report_pre_adverse_action":"reportPreAdverseAction","checkr_report_resumed":"reportResumed","checkr_report_suspended":"reportSuspended","checkr_report_updated":"reportUpdated","checkr_report_upgraded":"reportUpgraded","checkr_verification_completed":"verificationCompleted","checkr_verification_created":"verificationCreated","checkr_verification_processed":"verificationProcessed","checkr_webhook":"webhook"}},"checkr_v2":{"namespace":"checkr","methods":{"add_report_tag":"addReportTag","apply_report_review_action":"applyReportReviewAction","cancel_adverse_action":"cancelAdverseAction","cancel_continuous_check":"cancelContinuousCheck","cancel_invitation":"cancelInvitation","cancel_subscription":"cancelSubscription","complete_report":"completeReport","create_adverse_action":"createAdverseAction","create_candidate":"createCandidate","create_continuous_check":"createContinuousCheck","create_geo":"createGeo","create_invitation":"inviteCandidate","create_report":"orderReport","create_subscription":"scheduleRecurringCheck","delete_candidate_pii":"deleteCandidatePii","delete_geo":"deleteGeo","get_account":"getAccount","get_adverse_action":"getAdverseAction","get_candidate":"getCandidate","get_continuous_check":"getContinuousCheck","get_document":"getDocument","get_geo":"getGeo","get_invitation":"getInvitation","get_node":"getNode","get_package":"getPackage","get_program":"getProgram","get_report":"getReport","get_report_eta":"getReportEta","get_report_progressive_status":"getReportCheckpoints","get_report_tags":"getReportTags","get_screening":"getScreening","get_subscription":"getSubscription","get_verification":"getVerification","list_adverse_actions":"listAdverseActions","list_adverse_items":"listAdverseItems","list_assessments":"listAssessments","list_candidate_documents":"listCandidateDocuments","list_candidates":"listCandidates","list_continuous_checks":"listContinuousChecks","list_counties":"listCounties","list_geos":"listGeos","list_invitations":"listInvitations","list_nodes":"listNodes","list_packages":"listPackages","list_programs":"listPrograms","list_report_addresses":"listReportAddresses","list_subscriptions":"listSubscriptions","list_users":"listUsers","list_verifications":"listVerifications","remove_report_tag":"removeReportTag","set_report_tags":"setReportTags","update_candidate":"updateCandidate","update_continuous_check":"updateContinuousCheck","update_geo":"updateGeo","update_report":"updateReport","update_subscription":"updateSubscription"},"triggers":{"checkr_adverse_action_canceled":"adverseActionCanceled","checkr_adverse_action_completed":"adverseActionCompleted","checkr_adverse_action_created":"adverseActionCreated","checkr_adverse_action_notice_not_delivered":"adverseActionNoticeNotDelivered","checkr_adverse_action_paused":"adverseActionPaused","checkr_adverse_action_resumed":"adverseActionResumed","checkr_candidate_created":"candidateCreated","checkr_candidate_updated":"candidateUpdated","checkr_continuous_check_confirmation_required":"continuousCheckConfirmationRequired","checkr_continuous_check_subscription_error":"continuousCheckSubscriptionError","checkr_invitation_completed":"invitationCompleted","checkr_invitation_created":"invitationCreated","checkr_invitation_deleted":"invitationDeleted","checkr_invitation_expired":"invitationExpired","checkr_report_canceled":"reportCanceled","checkr_report_completed":"reportCompleted","checkr_report_created":"reportCreated","checkr_report_dispute_completed":"reportDisputeCompleted","checkr_report_disputed":"reportDisputed","checkr_report_engaged":"reportEngaged","checkr_report_paused":"reportPaused","checkr_report_post_adverse_action":"reportPostAdverseAction","checkr_report_pre_adverse_action":"reportPreAdverseAction","checkr_report_resumed":"reportResumed","checkr_report_suspended":"reportSuspended","checkr_report_updated":"reportUpdated","checkr_report_upgraded":"reportUpgraded","checkr_verification_completed":"verificationCompleted","checkr_verification_created":"verificationCreated","checkr_verification_processed":"verificationProcessed","checkr_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"circleback":{"namespace":"legacy.circleback","methods":{"add_tag_to_meetings":"addTagToMeetings","create_tag":"createTag","delete_action_item":"deleteActionItem","delete_meeting":"deleteMeeting","delete_tag":"deleteTag","get_company":"getCompany","get_meeting":"getMeeting","get_person":"getPerson","get_transcript":"getTranscript","list_action_items":"listActionItems","list_calendar_events":"listCalendarEvents","list_companies":"listCompanies","list_meetings":"listMeetings","list_people":"listPeople","list_tags":"listTags","remove_tag_from_meetings":"removeTagFromMeetings","search_meetings":"searchMeetings","update_action_item":"updateActionItem","update_meeting":"updateMeeting","update_tag":"updateTag"},"triggers":{"circleback_meeting_completed":"meetingCompleted","circleback_meeting_notes":"meetingNotes","circleback_webhook":"webhook"}},"circleback_v2":{"namespace":"circleback","methods":{"add_tag_to_meetings":"addTagToMeetings","create_tag":"createTag","delete_action_item":"deleteActionItem","delete_meeting":"deleteMeeting","delete_tag":"deleteTag","get_company":"getCompany","get_meeting":"getMeeting","get_person":"getPerson","get_transcript":"getTranscript","list_action_items":"listActionItems","list_calendar_events":"listCalendarEvents","list_companies":"listCompanies","list_meetings":"listMeetings","list_people":"listPeople","list_tags":"listTags","remove_tag_from_meetings":"removeTagFromMeetings","search_meetings":"searchMeetings","update_action_item":"updateActionItem","update_meeting":"updateMeeting","update_tag":"updateTag"},"triggers":{"circleback_meeting_completed":"meetingCompleted","circleback_meeting_notes":"meetingNotes","circleback_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"clay":{"namespace":"clay"},"clerk":{"namespace":"legacy.clerk","methods":{"clerk_add_organization_member":"addOrganizationMember","clerk_ban_user":"banUser","clerk_create_actor_token":"createActorToken","clerk_create_allowlist_identifier":"createAllowlistIdentifier","clerk_create_blocklist_identifier":"createBlocklistIdentifier","clerk_create_organization":"createOrganization","clerk_create_organization_invitation":"createOrganizationInvitation","clerk_create_user":"createUser","clerk_delete_allowlist_identifier":"deleteAllowlistIdentifier","clerk_delete_blocklist_identifier":"deleteBlocklistIdentifier","clerk_delete_organization":"deleteOrganization","clerk_delete_user":"deleteUser","clerk_get_jwt_template":"getJwtTemplate","clerk_get_organization":"getOrganization","clerk_get_session":"getSession","clerk_get_user":"getUser","clerk_get_user_oauth_token":"getUserOauthToken","clerk_list_allowlist_identifiers":"listAllowlistIdentifiers","clerk_list_blocklist_identifiers":"listBlocklistIdentifiers","clerk_list_jwt_templates":"listJwtTemplates","clerk_list_organization_invitations":"listOrganizationInvitations","clerk_list_organization_memberships":"listOrganizationMemberships","clerk_list_organizations":"listOrganizations","clerk_list_sessions":"listSessions","clerk_list_users":"listUsers","clerk_lock_user":"lockUser","clerk_remove_organization_member":"removeOrganizationMember","clerk_revoke_actor_token":"revokeActorToken","clerk_revoke_session":"revokeSession","clerk_unban_user":"unbanUser","clerk_unlock_user":"unlockUser","clerk_update_organization":"updateOrganization","clerk_update_organization_membership":"updateOrganizationMembership","clerk_update_user":"updateUser"},"triggers":{"clerk_organization_created":"organizationCreated","clerk_organization_deleted":"organizationDeleted","clerk_organization_membership_created":"organizationMembershipCreated","clerk_organization_membership_deleted":"organizationMembershipDeleted","clerk_organization_membership_updated":"organizationMembershipUpdated","clerk_organization_updated":"organizationUpdated","clerk_session_created":"sessionCreated","clerk_session_ended":"sessionEnded","clerk_session_removed":"sessionRemoved","clerk_session_revoked":"sessionRevoked","clerk_user_created":"userCreated","clerk_user_deleted":"userDeleted","clerk_user_updated":"userUpdated","clerk_webhook":"webhook"}},"clerk_v2":{"namespace":"clerk","methods":{"clerk_add_organization_member":"addOrganizationMember","clerk_ban_user":"banUser","clerk_create_actor_token":"createActorToken","clerk_create_allowlist_identifier":"createAllowlistIdentifier","clerk_create_blocklist_identifier":"createBlocklistIdentifier","clerk_create_organization":"createOrganization","clerk_create_organization_invitation":"createOrganizationInvitation","clerk_create_user":"createUser","clerk_delete_allowlist_identifier":"deleteAllowlistIdentifier","clerk_delete_blocklist_identifier":"deleteBlocklistIdentifier","clerk_delete_organization":"deleteOrganization","clerk_delete_user":"deleteUser","clerk_get_jwt_template":"getJwtTemplate","clerk_get_organization":"getOrganization","clerk_get_session":"getSession","clerk_get_user":"getUser","clerk_get_user_oauth_token":"getUserOauthToken","clerk_list_allowlist_identifiers":"listAllowlistIdentifiers","clerk_list_blocklist_identifiers":"listBlocklistIdentifiers","clerk_list_jwt_templates":"listJwtTemplates","clerk_list_organization_invitations":"listOrganizationInvitations","clerk_list_organization_memberships":"listOrganizationMemberships","clerk_list_organizations":"listOrganizations","clerk_list_sessions":"listSessions","clerk_list_users":"listUsers","clerk_lock_user":"lockUser","clerk_remove_organization_member":"removeOrganizationMember","clerk_revoke_actor_token":"revokeActorToken","clerk_revoke_session":"revokeSession","clerk_unban_user":"unbanUser","clerk_unlock_user":"unlockUser","clerk_update_organization":"updateOrganization","clerk_update_organization_membership":"updateOrganizationMembership","clerk_update_user":"updateUser"},"triggers":{"clerk_organization_created":"organizationCreated","clerk_organization_deleted":"organizationDeleted","clerk_organization_membership_created":"organizationMembershipCreated","clerk_organization_membership_deleted":"organizationMembershipDeleted","clerk_organization_membership_updated":"organizationMembershipUpdated","clerk_organization_updated":"organizationUpdated","clerk_session_created":"sessionCreated","clerk_session_ended":"sessionEnded","clerk_session_removed":"sessionRemoved","clerk_session_revoked":"sessionRevoked","clerk_user_created":"userCreated","clerk_user_deleted":"userDeleted","clerk_user_updated":"userUpdated","clerk_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"clickhouse":{"namespace":"clickhouse","methods":{"count_rows":"countRows","create_database":"createDatabase","create_table":"createTable","delete":"deleteData","describe_table":"describeTable","drop_database":"dropDatabase","drop_partition":"dropPartition","drop_table":"dropTable","execute":"executeRawSql","insert":"insertRow","insert_rows":"insertRowsBulk","introspect":"introspectSchema","kill_query":"killQuery","list_clusters":"listClusters","list_databases":"listDatabases","list_mutations":"listMutations","list_partitions":"listPartitions","list_running_queries":"listRunningQueries","list_tables":"listTables","optimize_table":"optimizeTable","query":"querySelect","rename_table":"renameTable","show_create_table":"showCreateTable","table_stats":"tableStats","truncate_table":"truncateTable","update":"updateData"}},"clickup":{"namespace":"clickup","methods":{"add_tag_to_task":"addTagToTask","create_checklist":"createChecklist","create_checklist_item":"createChecklistItem","create_comment":"createComment","create_folder":"createFolder","create_list":"createList","create_task":"createTask","create_time_entry":"createTimeEntry","delete_checklist":"deleteChecklist","delete_checklist_item":"deleteChecklistItem","delete_comment":"deleteComment","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","get_comments":"getComments","get_custom_fields":"getCustomFields","get_folders":"getFolders","get_list_members":"getListMembers","get_lists":"getLists","get_running_timer":"getRunningTimer","get_space_tags":"getSpaceTags","get_spaces":"getSpaces","get_task":"getTask","get_task_members":"getTaskMembers","get_tasks":"getTasks","get_time_entries":"getTimeEntries","get_workspaces":"getWorkspaces","remove_custom_field_value":"removeCustomFieldValue","remove_tag_from_task":"removeTagFromTask","search_tasks":"searchTasks","set_custom_field_value":"setCustomFieldValue","start_timer":"startTimer","stop_timer":"stopTimer","update_checklist":"updateChecklist","update_checklist_item":"updateChecklistItem","update_comment":"updateComment","update_task":"updateTask","update_time_entry":"updateTimeEntry","upload_attachment":"uploadAttachment"},"triggers":{"clickup_folder_created":"folderCreated","clickup_folder_deleted":"folderDeleted","clickup_folder_updated":"folderUpdated","clickup_goal_created":"goalCreated","clickup_goal_deleted":"goalDeleted","clickup_goal_updated":"goalUpdated","clickup_key_result_created":"keyResultCreated","clickup_key_result_deleted":"keyResultDeleted","clickup_key_result_updated":"keyResultUpdated","clickup_list_created":"listCreated","clickup_list_deleted":"listDeleted","clickup_list_updated":"listUpdated","clickup_space_created":"spaceCreated","clickup_space_deleted":"spaceDeleted","clickup_space_updated":"spaceUpdated","clickup_task_assignee_updated":"taskAssigneeUpdated","clickup_task_comment_posted":"taskCommentPosted","clickup_task_comment_updated":"taskCommentUpdated","clickup_task_created":"taskCreated","clickup_task_deleted":"taskDeleted","clickup_task_due_date_updated":"taskDueDateUpdated","clickup_task_moved":"taskMoved","clickup_task_priority_updated":"taskPriorityUpdated","clickup_task_status_updated":"taskStatusUpdated","clickup_task_tag_updated":"taskTagUpdated","clickup_task_time_estimate_updated":"taskTimeEstimateUpdated","clickup_task_time_tracked_updated":"taskTimeTrackedUpdated","clickup_task_updated":"taskUpdated","clickup_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"cloudflare":{"namespace":"legacy.cloudflare","methods":{"create_access_application":"createAccessApplication","create_access_group":"createAccessGroup","create_access_policy":"createAccessPolicy","create_access_service_token":"createAccessServiceToken","create_dns_record":"createDnsRecord","create_r2_bucket":"createR2Bucket","create_rate_limit_rule":"createRateLimitingRule","create_ruleset":"createRuleset","create_ruleset_rule":"createRulesetRule","create_tunnel":"createTunnel","create_worker_route":"createWorkerRoute","create_zone":"createZone","delete_access_application":"deleteAccessApplication","delete_access_group":"deleteAccessGroup","delete_access_policy":"deleteAccessPolicy","delete_dns_record":"deleteDnsRecord","delete_r2_bucket":"deleteR2Bucket","delete_r2_bucket_cors":"deleteR2BucketCors","delete_ruleset":"deleteRuleset","delete_ruleset_rule":"deleteRulesetRule","delete_tunnel":"deleteTunnel","delete_worker_route":"deleteWorkerRoute","delete_worker_script":"deleteWorkerScript","delete_zone":"deleteZone","dns_analytics":"dnsAnalytics","get_access_application":"getAccessApplication","get_access_group":"getAccessGroup","get_access_policy":"getAccessPolicy","get_access_service_token":"getAccessServiceToken","get_dns_record":"getDnsRecord","get_r2_bucket":"getR2Bucket","get_r2_bucket_cors":"getR2BucketCors","get_r2_bucket_lifecycle":"getR2BucketLifecycle","get_ruleset":"getRuleset","get_ruleset_entrypoint":"getPhaseEntryPointRuleset","get_tunnel":"getTunnel","get_tunnel_configuration":"getTunnelConfiguration","get_tunnel_token":"getTunnelToken","get_worker_route":"getWorkerRoute","get_worker_script_settings":"getWorkerScriptSettings","get_zone":"getZoneDetails","get_zone_settings":"getZoneSettings","list_access_applications":"listAccessApplications","list_access_groups":"listAccessGroups","list_access_identity_providers":"listAccessIdentityProviders","list_access_policies":"listAccessPolicies","list_access_service_tokens":"listAccessServiceTokens","list_certificates":"listCertificates","list_dns_records":"listDnsRecords","list_managed_ruleset_overrides":"listManagedRulesetOverrides","list_r2_buckets":"listR2Buckets","list_rate_limit_rules":"listRateLimitingRules","list_rulesets":"listRulesets","list_tunnels":"listTunnels","list_worker_routes":"listWorkerRoutes","list_worker_scripts":"listWorkerScripts","list_zones":"listZones","purge_cache":"purgeCache","refresh_access_service_token":"refreshAccessServiceToken","revoke_access_service_token":"revokeAccessServiceToken","rotate_access_service_token":"rotateAccessServiceToken","update_access_application":"updateAccessApplication","update_access_group":"updateAccessGroup","update_access_policy":"updateAccessPolicy","update_access_service_token":"updateAccessServiceToken","update_dns_record":"updateDnsRecord","update_r2_bucket_cors":"updateR2BucketCors","update_r2_bucket_lifecycle":"updateR2BucketLifecycle","update_rate_limit_rule":"updateRateLimitingRule","update_ruleset":"updateRuleset","update_ruleset_rule":"updateRulesetRule","update_tunnel":"updateTunnel","update_tunnel_configuration":"updateTunnelConfiguration","update_worker_route":"updateWorkerRoute","update_zone":"updateZone","update_zone_setting":"updateZoneSetting"}},"cloudflare_v2":{"namespace":"cloudflare","methods":{"create_access_application":"createAccessApplication","create_access_group":"createAccessGroup","create_access_policy":"createAccessPolicy","create_access_service_token":"createAccessServiceToken","create_dns_record":"createDnsRecord","create_r2_bucket":"createR2Bucket","create_rate_limit_rule":"createRateLimitingRule","create_ruleset":"createRuleset","create_ruleset_rule":"createRulesetRule","create_tunnel":"createTunnel","create_worker_route":"createWorkerRoute","create_zone":"createZone","delete_access_application":"deleteAccessApplication","delete_access_group":"deleteAccessGroup","delete_access_policy":"deleteAccessPolicy","delete_dns_record":"deleteDnsRecord","delete_r2_bucket":"deleteR2Bucket","delete_r2_bucket_cors":"deleteR2BucketCors","delete_ruleset":"deleteRuleset","delete_ruleset_rule":"deleteRulesetRule","delete_tunnel":"deleteTunnel","delete_worker_route":"deleteWorkerRoute","delete_worker_script":"deleteWorkerScript","delete_zone":"deleteZone","dns_analytics":"dnsAnalytics","get_access_application":"getAccessApplication","get_access_group":"getAccessGroup","get_access_policy":"getAccessPolicy","get_access_service_token":"getAccessServiceToken","get_dns_record":"getDnsRecord","get_r2_bucket":"getR2Bucket","get_r2_bucket_cors":"getR2BucketCors","get_r2_bucket_lifecycle":"getR2BucketLifecycle","get_ruleset":"getRuleset","get_ruleset_entrypoint":"getPhaseEntryPointRuleset","get_tunnel":"getTunnel","get_tunnel_configuration":"getTunnelConfiguration","get_tunnel_token":"getTunnelToken","get_worker_route":"getWorkerRoute","get_worker_script_settings":"getWorkerScriptSettings","get_zone":"getZoneDetails","get_zone_settings":"getZoneSettings","list_access_applications":"listAccessApplications","list_access_groups":"listAccessGroups","list_access_identity_providers":"listAccessIdentityProviders","list_access_policies":"listAccessPolicies","list_access_service_tokens":"listAccessServiceTokens","list_certificates":"listCertificates","list_dns_records":"listDnsRecords","list_managed_ruleset_overrides":"listManagedRulesetOverrides","list_r2_buckets":"listR2Buckets","list_rate_limit_rules":"listRateLimitingRules","list_rulesets":"listRulesets","list_tunnels":"listTunnels","list_worker_routes":"listWorkerRoutes","list_worker_scripts":"listWorkerScripts","list_zones":"listZones","purge_cache":"purgeCache","refresh_access_service_token":"refreshAccessServiceToken","revoke_access_service_token":"revokeAccessServiceToken","rotate_access_service_token":"rotateAccessServiceToken","update_access_application":"updateAccessApplication","update_access_group":"updateAccessGroup","update_access_policy":"updateAccessPolicy","update_access_service_token":"updateAccessServiceToken","update_dns_record":"updateDnsRecord","update_r2_bucket_cors":"updateR2BucketCors","update_r2_bucket_lifecycle":"updateR2BucketLifecycle","update_rate_limit_rule":"updateRateLimitingRule","update_ruleset":"updateRuleset","update_ruleset_rule":"updateRulesetRule","update_tunnel":"updateTunnel","update_tunnel_configuration":"updateTunnelConfiguration","update_worker_route":"updateWorkerRoute","update_zone":"updateZone","update_zone_setting":"updateZoneSetting"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"cloudformation":{"namespace":"legacy.cloudformation","methods":{"cancel_update_stack":"cancelUpdateStack","create_change_set":"createChangeSet","create_stack":"createStack","delete_stack":"deleteStack","describe_change_set":"describeChangeSet","describe_stack_drift_detection_status":"driftDetectionStatus","describe_stack_events":"describeStackEvents","describe_stacks":"describeStacks","detect_stack_drift":"detectStackDrift","execute_change_set":"executeChangeSet","get_template":"getTemplate","get_template_summary":"getTemplateSummary","list_stack_resources":"listStackResources","update_stack":"updateStack","validate_template":"validateTemplate"}},"cloudformation_v2":{"namespace":"cloudformation","methods":{"cancel_update_stack":"cancelUpdateStack","create_change_set":"createChangeSet","create_stack":"createStack","delete_stack":"deleteStack","describe_change_set":"describeChangeSet","describe_stack_drift_detection_status":"driftDetectionStatus","describe_stack_events":"describeStackEvents","describe_stacks":"describeStacks","detect_stack_drift":"detectStackDrift","execute_change_set":"executeChangeSet","get_template":"getTemplate","get_template_summary":"getTemplateSummary","list_stack_resources":"listStackResources","update_stack":"updateStack","validate_template":"validateTemplate"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"cloudtrail":{"namespace":"legacy.cloudtrail","methods":{"cancel_query":"cancelLakeQuery","describe_query":"describeLakeQuery","describe_trails":"describeTrails","get_event_data_store":"getEventDataStore","get_event_selectors":"getEventSelectors","get_insight_selectors":"getInsightSelectors","get_query_results":"getLakeQueryResults","get_trail":"getTrail","get_trail_status":"getTrailStatus","list_event_data_stores":"listEventDataStores","list_tags":"listTags","list_trails":"listTrails","lookup_events":"lookUpEvents","start_query":"startLakeQuery"}},"cloudtrail_v2":{"namespace":"cloudtrail","methods":{"cancel_query":"cancelLakeQuery","describe_query":"describeLakeQuery","describe_trails":"describeTrails","get_event_data_store":"getEventDataStore","get_event_selectors":"getEventSelectors","get_insight_selectors":"getInsightSelectors","get_query_results":"getLakeQueryResults","get_trail":"getTrail","get_trail_status":"getTrailStatus","list_event_data_stores":"listEventDataStores","list_tags":"listTags","list_trails":"listTrails","lookup_events":"lookUpEvents","start_query":"startLakeQuery"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"cloudwatch":{"namespace":"legacy.cloudwatch","methods":{"describe_alarm_history":"describeAlarmHistory","describe_alarms":"describeAlarms","describe_log_groups":"describeLogGroups","describe_log_streams":"describeLogStreams","filter_log_events":"filterLogEvents","get_log_events":"getLogEvents","get_metric_statistics":"getMetricStatistics","list_metrics":"listMetrics","mute_alarm":"muteAlarm","put_log_group_retention":"setLogGroupRetention","put_metric_data":"publishMetric","query_logs":"queryLogsInsights","unmute_alarm":"unmuteAlarm"}},"cloudwatch_v2":{"namespace":"cloudwatch","methods":{"describe_alarm_history":"describeAlarmHistory","describe_alarms":"describeAlarms","describe_log_groups":"describeLogGroups","describe_log_streams":"describeLogStreams","filter_log_events":"filterLogEvents","get_log_events":"getLogEvents","get_metric_statistics":"getMetricStatistics","list_metrics":"listMetrics","mute_alarm":"muteAlarm","put_log_group_retention":"setLogGroupRetention","put_metric_data":"publishMetric","query_logs":"queryLogsInsights","unmute_alarm":"unmuteAlarm"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"coda":{"namespace":"coda","methods":{"add_custom_domain":"addCustomDomain","add_permission":"shareDoc","change_user_role":"changeUserRole","create_doc":"createDoc","create_folder":"createFolder","create_page":"createPage","delete_custom_domain":"deleteCustomDomain","delete_doc":"deleteDoc","delete_folder":"deleteFolder","delete_page":"deletePage","delete_page_content":"deletePageContent","delete_permission":"removePermission","delete_row":"deleteRow","delete_rows":"deleteRows","export_page":"exportPage","get_acl_settings":"getSharingSettings","get_analytics_last_updated":"getAnalyticsLastUpdated","get_column":"getColumn","get_control":"getControl","get_custom_domain_provider":"getCustomDomainProvider","get_doc":"getDoc","get_doc_analytics_summary":"getDocAnalyticsSummary","get_folder":"getFolder","get_formula":"getFormula","get_mutation_status":"getMutationStatus","get_page":"getPage","get_page_content":"getPageContent","get_page_export_status":"getPageExportStatus","get_row":"getRow","get_sharing_metadata":"getSharingMetadata","get_table":"getTable","list_categories":"listDocCategories","list_columns":"listColumns","list_controls":"listControls","list_custom_domains":"listCustomDomains","list_doc_analytics":"listDocAnalytics","list_docs":"listDocs","list_folder_children":"listSubfolders","list_folders":"listFolders","list_formulas":"listFormulas","list_page_analytics":"listPageAnalytics","list_pages":"listPages","list_permissions":"listPermissions","list_rows":"listRows","list_tables":"listTables","list_workspace_members":"listWorkspaceMembers","list_workspace_roles":"listWorkspaceRoleActivity","publish_doc":"publishDoc","push_button":"pushButton","resolve_browser_link":"resolveBrowserLink","search_principals":"searchUsersAndGroups","trigger_automation":"triggerAutomation","unpublish_doc":"unpublishDoc","update_acl_settings":"updateSharingSettings","update_doc":"updateDoc","update_folder":"updateFolder","update_page":"updatePage","update_row":"updateRow","upsert_rows":"insertOrUpsertRows","whoami":"getCurrentUser"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"codepipeline":{"namespace":"legacy.codepipeline","methods":{"disable_stage_transition":"disableStageTransition","enable_stage_transition":"enableStageTransition","get_pipeline":"getPipelineStructure","get_pipeline_execution":"getExecution","get_pipeline_state":"getPipelineState","list_action_executions":"listActionExecutions","list_pipeline_executions":"listExecutions","list_pipelines":"listPipelines","put_approval_result":"approveRejectApproval","retry_stage_execution":"retryStage","start_execution":"startExecution","stop_execution":"stopExecution"}},"codepipeline_v2":{"namespace":"codepipeline","methods":{"disable_stage_transition":"disableStageTransition","enable_stage_transition":"enableStageTransition","get_pipeline":"getPipelineStructure","get_pipeline_execution":"getExecution","get_pipeline_state":"getPipelineState","list_action_executions":"listActionExecutions","list_pipeline_executions":"listExecutions","list_pipelines":"listPipelines","put_approval_result":"approveRejectApproval","retry_stage_execution":"retryStage","start_execution":"startExecution","stop_execution":"stopExecution"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"condition":{"namespace":"condition"},"confluence":{"namespace":"legacy.confluence","methods":{"create":"createPage","create_comment":"createComment","delete":"deletePage","delete_attachment":"deleteAttachment","delete_comment":"deleteComment","get_space":"getSpace","list_attachments":"listAttachments","list_comments":"listComments","list_labels":"listLabels","list_spaces":"listSpaces","read":"readPage","search":"searchContent","update":"updatePage","update_comment":"updateComment","upload_attachment":"uploadAttachment"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"confluence_v2":{"namespace":"confluence","methods":{"add_label":"addLabel","create":"createPage","create_blogpost":"createBlogPost","create_comment":"createComment","create_page_property":"createPageProperty","create_space":"createSpace","create_space_property":"createSpaceProperty","delete":"deletePage","delete_attachment":"deleteAttachment","delete_blogpost":"deleteBlogPost","delete_comment":"deleteComment","delete_label":"deleteLabel","delete_page_property":"deletePageProperty","delete_space":"deleteSpace","delete_space_property":"deleteSpaceProperty","get_blogpost":"getBlogPost","get_page_ancestors":"getPageAncestors","get_page_children":"getPageChildren","get_page_descendants":"getPageDescendants","get_page_version":"getPageVersion","get_pages_by_label":"getPagesByLabel","get_space":"getSpace","get_task":"getTask","get_user":"getUser","list_attachments":"listAttachments","list_blogposts":"listBlogPosts","list_blogposts_in_space":"listBlogPostsInSpace","list_comments":"listComments","list_labels":"listLabels","list_page_properties":"listPageProperties","list_page_versions":"listPageVersions","list_pages_in_space":"listPagesInSpace","list_space_labels":"listSpaceLabels","list_space_permissions":"listSpacePermissions","list_space_properties":"listSpaceProperties","list_spaces":"listSpaces","list_tasks":"listTasks","read":"readPage","search":"searchContent","search_in_space":"searchInSpace","update":"updatePage","update_blogpost":"updateBlogPost","update_comment":"updateComment","update_space":"updateSpace","update_task":"updateTask","upload_attachment":"uploadAttachment"},"triggers":{"confluence_attachment_created":"attachmentCreated","confluence_attachment_removed":"attachmentRemoved","confluence_attachment_updated":"attachmentUpdated","confluence_blog_created":"blogCreated","confluence_blog_removed":"blogRemoved","confluence_blog_restored":"blogRestored","confluence_blog_updated":"blogUpdated","confluence_comment_created":"commentCreated","confluence_comment_removed":"commentRemoved","confluence_comment_updated":"commentUpdated","confluence_label_added":"labelAdded","confluence_label_removed":"labelRemoved","confluence_page_created":"pageCreated","confluence_page_moved":"pageMoved","confluence_page_permissions_updated":"pagePermissionsUpdated","confluence_page_removed":"pageRemoved","confluence_page_restored":"pageRestored","confluence_page_updated":"pageUpdated","confluence_space_created":"spaceCreated","confluence_space_removed":"spaceRemoved","confluence_space_updated":"spaceUpdated","confluence_user_created":"userCreated","confluence_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"context_dev":{"namespace":"contextDev","methods":{"classify_naics":"classifyNaics","classify_sic":"classifySic","crawl":"crawlWebsite","extract":"extractStructuredData","extract_product":"extractProduct","extract_products":"extractProducts","get_brand":"getBrandByDomain","get_brand_by_email":"getBrandByEmail","get_brand_by_name":"getBrandByName","get_brand_by_ticker":"getBrandByTicker","identify_transaction":"identifyTransaction","map":"mapSitemap","scrape_fonts":"scrapeFonts","scrape_html":"scrapeHtml","scrape_images":"scrapeImages","scrape_markdown":"scrapeMarkdown","scrape_styleguide":"scrapeStyleguide","screenshot":"screenshot","search":"webSearch"}},"convex":{"namespace":"legacy.convex","methods":{"action":"runAction","document_deltas":"documentDeltas","list_documents":"listDocuments","list_tables":"listTables","mutation":"runMutation","query":"runQuery","run_function":"runFunction"}},"convex_v2":{"namespace":"convex","methods":{"action":"runAction","document_deltas":"documentDeltas","list_documents":"listDocuments","list_tables":"listTables","mutation":"runMutation","query":"runQuery","run_function":"runFunction"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"credential":{"namespace":"credential","methods":{"find_organization_account":"findOrganizationAccount","find_organization_mcp_connection":"findOrganizationMcpConnection","list":"listCredentials","list_organization_accounts":"listOrganizationAccounts","list_organization_mcp_connections":"listOrganizationMcpConnections","select":"selectCredential"},"triggers":{"credential_group_event":"groupEvent"}},"credential_group":{"namespace":"legacy.credentialGroup","methods":{"get_invite_link":"getInviteLink","list_credentials":"listCredentials","list_mcp_connections":"listMcpConnections","list_people":"listPeople","send_invite":"sendInvite"},"triggers":{"credential_group_event":"event"}},"crowdstrike":{"namespace":"legacy.crowdstrike","methods":{"crowdstrike_create_indicators":"createIndicators","crowdstrike_delete_indicators":"deleteIndicators","crowdstrike_delete_rtr_session":"deleteRtrSession","crowdstrike_execute_rtr_command":"executeRtrCommand","crowdstrike_get_alert_details":"getAlertDetails","crowdstrike_get_case_details":"getCaseDetails","crowdstrike_get_host_group_details":"getHostGroupDetails","crowdstrike_get_indicator_details":"getIndicatorDetails","crowdstrike_get_rtr_command_status":"getRtrCommandStatus","crowdstrike_get_sensor_aggregates":"getSensorAggregates","crowdstrike_get_sensor_details":"getSensorDetails","crowdstrike_get_vulnerability_details":"getVulnerabilityDetails","crowdstrike_init_rtr_session":"initRtrSession","crowdstrike_perform_host_action":"performHostAction","crowdstrike_perform_host_group_action":"performHostGroupAction","crowdstrike_query_alerts":"queryAlerts","crowdstrike_query_cases":"queryCases","crowdstrike_query_host_groups":"queryHostGroups","crowdstrike_query_indicators":"queryIndicators","crowdstrike_query_sensors":"querySensors","crowdstrike_query_vulnerabilities":"queryVulnerabilities","crowdstrike_update_alerts":"updateAlerts","crowdstrike_update_indicators":"updateIndicators"}},"crowdstrike_v2":{"namespace":"crowdstrike","methods":{"crowdstrike_create_indicators":"createIndicators","crowdstrike_delete_indicators":"deleteIndicators","crowdstrike_delete_rtr_session":"deleteRtrSession","crowdstrike_execute_rtr_command":"executeRtrCommand","crowdstrike_get_alert_details":"getAlertDetails","crowdstrike_get_case_details":"getCaseDetails","crowdstrike_get_host_group_details":"getHostGroupDetails","crowdstrike_get_indicator_details":"getIndicatorDetails","crowdstrike_get_rtr_command_status":"getRtrCommandStatus","crowdstrike_get_sensor_aggregates":"getSensorAggregates","crowdstrike_get_sensor_details":"getSensorDetails","crowdstrike_get_vulnerability_details":"getVulnerabilityDetails","crowdstrike_init_rtr_session":"initRtrSession","crowdstrike_perform_host_action":"performHostAction","crowdstrike_perform_host_group_action":"performHostGroupAction","crowdstrike_query_alerts":"queryAlerts","crowdstrike_query_cases":"queryCases","crowdstrike_query_host_groups":"queryHostGroups","crowdstrike_query_indicators":"queryIndicators","crowdstrike_query_sensors":"querySensors","crowdstrike_query_vulnerabilities":"queryVulnerabilities","crowdstrike_update_alerts":"updateAlerts","crowdstrike_update_indicators":"updateIndicators"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"crunchbase":{"namespace":"legacy.crunchbase","methods":{"autocomplete":"autocomplete","get_acquisition":"getAcquisition","get_entity":"getAnyEntity","get_entity_card":"getEntityCard","get_fields_metadata":"getFieldsMetadata","get_funding_round":"getFundingRound","get_organization":"getOrganization","get_person":"getPerson","list_deleted_entities":"listDeletedEntities","search_acquisitions":"searchAcquisitions","search_entities":"searchAnyCollection","search_funding_rounds":"searchFundingRounds","search_organizations":"searchOrganizations","search_people":"searchPeople"}},"crunchbase_v2":{"namespace":"crunchbase","methods":{"autocomplete":"autocomplete","get_acquisition":"getAcquisition","get_entity":"getAnyEntity","get_entity_card":"getEntityCard","get_fields_metadata":"getFieldsMetadata","get_funding_round":"getFundingRound","get_organization":"getOrganization","get_person":"getPerson","list_deleted_entities":"listDeletedEntities","search_acquisitions":"searchAcquisitions","search_entities":"searchAnyCollection","search_funding_rounds":"searchFundingRounds","search_organizations":"searchOrganizations","search_people":"searchPeople"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"cursor":{"namespace":"legacy.cursor","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"}},"cursor_v2":{"namespace":"legacy.cursorV2","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"}},"cursor_v3":{"namespace":"cursor","methods":{"cursor_add_followup":"addFollowUp","cursor_delete_agent":"deleteAgent","cursor_download_artifact":"downloadArtifact","cursor_get_agent":"getAgentStatus","cursor_get_api_key_info":"getApiKeyInfo","cursor_get_conversation":"getConversation","cursor_launch_agent":"launchAgent","cursor_list_agents":"listAgents","cursor_list_artifacts":"listArtifacts","cursor_list_models":"listModels","cursor_list_repositories":"listRepositories","cursor_stop_agent":"stopAgent"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"dagster":{"namespace":"dagster","methods":{"delete_run":"deleteRun","get_asset":"getAsset","get_run":"getRun","get_run_logs":"getRunLogs","launch_run":"launchRun","list_assets":"listAssets","list_jobs":"listJobs","list_runs":"listRuns","list_schedules":"listSchedules","list_sensors":"listSensors","materialize_assets":"materializeAssets","reexecute_run":"reexecuteRun","report_asset_materialization":"reportAssetMaterialization","start_schedule":"startSchedule","start_sensor":"startSensor","stop_schedule":"stopSchedule","stop_sensor":"stopSensor","terminate_run":"terminateRun","wipe_asset":"wipeAsset"}},"databricks":{"namespace":"legacy.databricks","methods":{"cancel_all_runs":"cancelAllRuns","cancel_run":"cancelRun","cancel_statement":"cancelStatement","create_cluster":"createCluster","create_job":"createJob","create_warehouse":"createWarehouse","delete_cluster":"deleteCluster","delete_job":"deleteJob","delete_run":"deleteRun","delete_warehouse":"deleteWarehouse","edit_cluster":"editCluster","edit_warehouse":"editWarehouse","execute_sql":"executeSql","genie_agent_ask":"askGenieAgent","genie_agent_cancel":"cancelGenieAgentResponse","genie_agent_list_items":"listGenieAgentItems","genie_ask":"askGenie","genie_create_space":"createGenieSpace","genie_delete_conversation":"deleteGenieConversation","genie_delete_message":"deleteGenieMessage","genie_delete_space":"trashGenieSpace","genie_download_visualization":"downloadGenieVisualization","genie_execute_query":"executeGenieQuery","genie_get_message":"getGenieMessage","genie_get_query_result":"getGenieQueryResult","genie_get_space":"getGenieSpace","genie_list_conversations":"listGenieConversations","genie_list_messages":"listGenieMessages","genie_list_spaces":"listGenieSpaces","genie_send_feedback":"sendGenieFeedback","genie_update_space":"updateGenieSpace","get_cluster":"getCluster","get_job":"getJob","get_run":"getRun","get_run_output":"getRunOutput","get_statement":"getStatement","get_statement_chunk":"getStatementChunk","get_warehouse":"getWarehouse","list_clusters":"listClusters","list_jobs":"listJobs","list_runs":"listRuns","list_warehouses":"listWarehouses","repair_run":"repairRun","reset_job":"resetJob","resize_cluster":"resizeCluster","restart_cluster":"restartCluster","run_job":"runJob","start_cluster":"startCluster","start_warehouse":"startWarehouse","stop_warehouse":"stopWarehouse","submit_run":"submitRun","terminate_cluster":"terminateCluster","update_job":"updateJob"}},"databricks_v2":{"namespace":"databricks","methods":{"cancel_all_runs":"cancelAllRuns","cancel_run":"cancelRun","cancel_statement":"cancelStatement","create_cluster":"createCluster","create_job":"createJob","create_warehouse":"createWarehouse","delete_cluster":"deleteCluster","delete_job":"deleteJob","delete_run":"deleteRun","delete_warehouse":"deleteWarehouse","edit_cluster":"editCluster","edit_warehouse":"editWarehouse","execute_sql":"executeSql","genie_agent_ask":"askGenieAgent","genie_agent_cancel":"cancelGenieAgentResponse","genie_agent_list_items":"listGenieAgentItems","genie_ask":"askGenie","genie_create_space":"createGenieSpace","genie_delete_conversation":"deleteGenieConversation","genie_delete_message":"deleteGenieMessage","genie_delete_space":"trashGenieSpace","genie_download_visualization":"downloadGenieVisualization","genie_execute_query":"executeGenieQuery","genie_get_message":"getGenieMessage","genie_get_query_result":"getGenieQueryResult","genie_get_space":"getGenieSpace","genie_list_conversations":"listGenieConversations","genie_list_messages":"listGenieMessages","genie_list_spaces":"listGenieSpaces","genie_send_feedback":"sendGenieFeedback","genie_update_space":"updateGenieSpace","get_cluster":"getCluster","get_job":"getJob","get_run":"getRun","get_run_output":"getRunOutput","get_statement":"getStatement","get_statement_chunk":"getStatementChunk","get_warehouse":"getWarehouse","list_clusters":"listClusters","list_jobs":"listJobs","list_runs":"listRuns","list_warehouses":"listWarehouses","repair_run":"repairRun","reset_job":"resetJob","resize_cluster":"resizeCluster","restart_cluster":"restartCluster","run_job":"runJob","start_cluster":"startCluster","start_warehouse":"startWarehouse","stop_warehouse":"stopWarehouse","submit_run":"submitRun","terminate_cluster":"terminateCluster","update_job":"updateJob"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"datadog":{"namespace":"legacy.datadog","methods":{"datadog_add_incident_todo":"addIncidentTodo","datadog_cancel_downtime":"cancelDowntime","datadog_create_dashboard":"createDashboard","datadog_create_downtime":"createDowntime","datadog_create_event":"createEvent","datadog_create_incident":"createIncident","datadog_create_monitor":"createMonitor","datadog_create_slo":"createSlo","datadog_delete_dashboard":"deleteDashboard","datadog_delete_slo":"deleteSlo","datadog_get_browser_synthetics_results":"getBrowserSyntheticTestResults","datadog_get_dashboard":"getDashboard","datadog_get_incident":"getIncident","datadog_get_monitor":"getMonitor","datadog_get_security_signal":"getSecuritySignal","datadog_get_slo":"getSlo","datadog_get_slo_history":"getSloHistory","datadog_get_synthetics_results":"getSyntheticTestResults","datadog_get_synthetics_test":"getSyntheticTest","datadog_list_dashboards":"listDashboards","datadog_list_downtimes":"listDowntimes","datadog_list_incidents":"listIncidents","datadog_list_monitors":"listMonitors","datadog_list_security_rules":"listSecurityRules","datadog_list_security_signals":"listSecuritySignals","datadog_list_services":"listServices","datadog_list_slos":"listSlos","datadog_list_synthetics_tests":"listSyntheticTests","datadog_mute_monitor":"muteMonitor","datadog_query_logs":"queryLogs","datadog_query_timeseries":"queryTimeseries","datadog_search_spans":"searchSpans","datadog_send_logs":"sendLogs","datadog_submit_metrics":"submitMetrics","datadog_trigger_synthetics_tests":"triggerSyntheticTests","datadog_unmute_monitor":"unmuteMonitor","datadog_update_incident":"updateIncident","datadog_update_security_signal_assignee":"assignSecuritySignal","datadog_update_security_signal_state":"updateSecuritySignalState","datadog_update_slo":"updateSlo","datadog_update_synthetics_status":"pauseOrStartSyntheticTest"}},"datadog_v2":{"namespace":"datadog","methods":{"datadog_add_incident_todo":"addIncidentTodo","datadog_cancel_downtime":"cancelDowntime","datadog_create_dashboard":"createDashboard","datadog_create_downtime":"createDowntime","datadog_create_event":"createEvent","datadog_create_incident":"createIncident","datadog_create_monitor":"createMonitor","datadog_create_slo":"createSlo","datadog_delete_dashboard":"deleteDashboard","datadog_delete_slo":"deleteSlo","datadog_get_browser_synthetics_results":"getBrowserSyntheticTestResults","datadog_get_dashboard":"getDashboard","datadog_get_incident":"getIncident","datadog_get_monitor":"getMonitor","datadog_get_security_signal":"getSecuritySignal","datadog_get_slo":"getSlo","datadog_get_slo_history":"getSloHistory","datadog_get_synthetics_results":"getSyntheticTestResults","datadog_get_synthetics_test":"getSyntheticTest","datadog_list_dashboards":"listDashboards","datadog_list_downtimes":"listDowntimes","datadog_list_incidents":"listIncidents","datadog_list_monitors":"listMonitors","datadog_list_security_rules":"listSecurityRules","datadog_list_security_signals":"listSecuritySignals","datadog_list_services":"listServices","datadog_list_slos":"listSlos","datadog_list_synthetics_tests":"listSyntheticTests","datadog_mute_monitor":"muteMonitor","datadog_query_logs":"queryLogs","datadog_query_timeseries":"queryTimeseries","datadog_search_spans":"searchSpans","datadog_send_logs":"sendLogs","datadog_submit_metrics":"submitMetrics","datadog_trigger_synthetics_tests":"triggerSyntheticTests","datadog_unmute_monitor":"unmuteMonitor","datadog_update_incident":"updateIncident","datadog_update_security_signal_assignee":"assignSecuritySignal","datadog_update_security_signal_state":"updateSecuritySignalState","datadog_update_slo":"updateSlo","datadog_update_synthetics_status":"pauseOrStartSyntheticTest"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"datagma":{"namespace":"datagma","methods":{"datagma_enrich_company":"enrichCompany","datagma_enrich_person":"enrichPerson","datagma_find_email":"findEmail","datagma_find_phone":"findPhone","datagma_get_credits":"getRemainingCredits"}},"daytona":{"namespace":"legacy.daytona","methods":{"create_sandbox":"createSandbox","delete_sandbox":"deleteSandbox","download_file":"downloadFile","execute_command":"executeCommand","get_sandbox":"getSandbox","git_clone":"gitClone","list_files":"listFiles","list_sandboxes":"listSandboxes","run_code":"runCode","start_sandbox":"startSandbox","stop_sandbox":"stopSandbox","upload_file":"uploadFile"}},"daytona_v2":{"namespace":"daytona","methods":{"create_sandbox":"createSandbox","delete_sandbox":"deleteSandbox","download_file":"downloadFile","execute_command":"executeCommand","get_sandbox":"getSandbox","git_clone":"gitClone","list_files":"listFiles","list_sandboxes":"listSandboxes","run_code":"runCode","start_sandbox":"startSandbox","stop_sandbox":"stopSandbox","upload_file":"uploadFile"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"deployments":{"namespace":"deployments","methods":{"deployments_deploy":"deploy","deployments_get_version":"getVersionDetails","deployments_list_versions":"listVersions","deployments_promote":"promoteVersionToLive","deployments_undeploy":"undeploy"}},"devin":{"namespace":"legacy.devin","methods":{"append_session_tags":"appendSessionTags","archive_session":"archiveSession","create_session":"createSession","get_session":"getSession","get_session_tags":"getSessionTags","list_session_attachments":"listSessionAttachments","list_session_messages":"listSessionMessages","list_sessions":"listSessions","replace_session_tags":"replaceSessionTags","send_message":"sendMessage","terminate_session":"terminateSession"}},"devin_v2":{"namespace":"devin","methods":{"append_session_tags":"appendSessionTags","archive_session":"archiveSession","create_session":"createSession","get_session":"getSession","get_session_tags":"getSessionTags","list_session_attachments":"listSessionAttachments","list_session_messages":"listSessionMessages","list_sessions":"listSessions","replace_session_tags":"replaceSessionTags","send_message":"sendMessage","terminate_session":"terminateSession"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"discord":{"namespace":"legacy.discord","methods":{"discord_add_reaction":"addReaction","discord_archive_thread":"archiveThread","discord_assign_role":"assignRole","discord_ban_member":"banMember","discord_bulk_delete_messages":"bulkDeleteMessages","discord_create_channel":"createChannel","discord_create_invite":"createInvite","discord_create_role":"createRole","discord_create_thread":"createThread","discord_create_webhook":"createWebhook","discord_delete_channel":"deleteChannel","discord_delete_invite":"deleteInvite","discord_delete_message":"deleteMessage","discord_delete_role":"deleteRole","discord_delete_webhook":"deleteWebhook","discord_edit_message":"editMessage","discord_execute_webhook":"executeWebhook","discord_get_channel":"getChannel","discord_get_invite":"getInvite","discord_get_member":"getMember","discord_get_messages":"getChannelMessages","discord_get_pinned_messages":"getPinnedMessages","discord_get_server":"getServerInformation","discord_get_user":"getUserInformation","discord_get_webhook":"getWebhook","discord_join_thread":"joinThread","discord_kick_member":"kickMember","discord_leave_thread":"leaveThread","discord_list_channels":"listChannels","discord_list_roles":"listRoles","discord_pin_message":"pinMessage","discord_remove_reaction":"removeReaction","discord_remove_role":"removeRole","discord_send_message":"sendMessage","discord_unban_member":"unbanMember","discord_unpin_message":"unpinMessage","discord_update_channel":"updateChannel","discord_update_member":"updateMember","discord_update_role":"updateRole"}},"discord_v2":{"namespace":"discord","methods":{"discord_add_reaction":"addReaction","discord_archive_thread":"archiveThread","discord_assign_role":"assignRole","discord_ban_member":"banMember","discord_bulk_delete_messages":"bulkDeleteMessages","discord_create_channel":"createChannel","discord_create_invite":"createInvite","discord_create_role":"createRole","discord_create_thread":"createThread","discord_create_webhook":"createWebhook","discord_delete_channel":"deleteChannel","discord_delete_invite":"deleteInvite","discord_delete_message":"deleteMessage","discord_delete_role":"deleteRole","discord_delete_webhook":"deleteWebhook","discord_edit_message":"editMessage","discord_execute_webhook":"executeWebhook","discord_get_channel":"getChannel","discord_get_invite":"getInvite","discord_get_member":"getMember","discord_get_messages":"getChannelMessages","discord_get_pinned_messages":"getPinnedMessages","discord_get_server":"getServerInformation","discord_get_user":"getUserInformation","discord_get_webhook":"getWebhook","discord_join_thread":"joinThread","discord_kick_member":"kickMember","discord_leave_thread":"leaveThread","discord_list_channels":"listChannels","discord_list_roles":"listRoles","discord_pin_message":"pinMessage","discord_remove_reaction":"removeReaction","discord_remove_role":"removeRole","discord_send_message":"sendMessage","discord_unban_member":"unbanMember","discord_unpin_message":"unpinMessage","discord_update_channel":"updateChannel","discord_update_member":"updateMember","discord_update_role":"updateRole"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"docusign":{"namespace":"docusign","methods":{"create_from_template":"sendFromTemplate","download_document":"downloadDocument","get_envelope":"getEnvelope","list_envelopes":"listEnvelopes","list_recipients":"listRecipients","list_templates":"listTemplates","send_envelope":"sendEnvelope","void_envelope":"voidEnvelope"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"downdetector":{"namespace":"downdetector","methods":{"downdetector_get_company":"getCompany","downdetector_get_company_attribution":"getCompanyAttribution","downdetector_get_company_baseline":"getCompanyBaseline","downdetector_get_company_events":"getCompanyEvents","downdetector_get_company_incidents":"getCompanyIncidents","downdetector_get_company_indicators":"getCompanyIndicators","downdetector_get_company_last_15":"getCompanyLast15Minutes","downdetector_get_company_status":"getCompanyStatus","downdetector_get_provider":"getProvider","downdetector_get_reports":"getReports","downdetector_get_site_companies":"getSiteCompanies","downdetector_list_categories":"listCategories","downdetector_list_incidents":"listIncidents","downdetector_list_sites":"listSites","downdetector_search_companies":"searchCompanies"}},"dropbox":{"namespace":"legacy.dropbox","methods":{"dropbox_copy":"copyFileFolder","dropbox_create_folder":"createFolder","dropbox_create_shared_link":"createSharedLink","dropbox_delete":"deleteFileFolder","dropbox_download":"downloadFile","dropbox_get_metadata":"getMetadata","dropbox_list_folder":"listFolder","dropbox_list_revisions":"listRevisions","dropbox_list_shared_links":"listSharedLinks","dropbox_move":"moveFileFolder","dropbox_restore":"restoreFile","dropbox_search":"searchFiles","dropbox_upload":"uploadFile"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"dropbox_v2":{"namespace":"dropbox","methods":{"dropbox_copy":"copyFileFolder","dropbox_create_folder":"createFolder","dropbox_create_shared_link":"createSharedLink","dropbox_delete":"deleteFileFolder","dropbox_download":"downloadFile","dropbox_get_metadata":"getMetadata","dropbox_list_folder":"listFolder","dropbox_list_revisions":"listRevisions","dropbox_list_shared_links":"listSharedLinks","dropbox_move":"moveFileFolder","dropbox_restore":"restoreFile","dropbox_search":"searchFiles","dropbox_upload":"uploadFile"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"dropcontact":{"namespace":"dropcontact","methods":{"dropcontact_enrich_contact":"enrichContact"}},"dspy":{"namespace":"dspy","methods":{"chain_of_thought":"chainOfThought","predict":"predict","react":"reActAgent"}},"dub":{"namespace":"legacy.dub","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"}},"dub_v2":{"namespace":"legacy.dubV2","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"}},"dub_v3":{"namespace":"dub","methods":{"bulk_create_links":"bulkCreateLinks","bulk_delete_links":"bulkDeleteLinks","bulk_update_links":"bulkUpdateLinks","create_link":"createLink","create_tag":"createTag","delete_link":"deleteLink","get_analytics":"getAnalytics","get_events":"listEvents","get_link":"getLink","get_links_count":"countLinks","get_qr_code":"getQrCode","list_domains":"listDomains","list_folders":"listFolders","list_links":"listLinks","list_tags":"listTags","update_link":"updateLink","upsert_link":"upsertLink"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"duckduckgo":{"namespace":"duckduckgo"},"dynamodb":{"namespace":"legacy.dynamodb","methods":{"delete":"deleteItem","get":"getItem","introspect":"introspect","put":"putItem","query":"query","scan":"scan","update":"updateItem"}},"dynamodb_v2":{"namespace":"dynamodb","methods":{"delete":"deleteItem","get":"getItem","introspect":"introspect","put":"putItem","query":"query","scan":"scan","update":"updateItem"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"dynatrace":{"namespace":"legacy.dynatrace","methods":{"dynatrace_add_problem_comment":"addProblemComment","dynatrace_add_tags":"addTags","dynatrace_close_problem":"closeProblem","dynatrace_create_settings_object":"createSettingsObject","dynatrace_create_slo":"createSlo","dynatrace_delete_problem_comment":"deleteProblemComment","dynatrace_delete_settings_object":"deleteSettingsObject","dynatrace_delete_slo":"deleteSlo","dynatrace_delete_tag":"deleteTag","dynatrace_execute_synthetic_monitors":"executeSyntheticMonitors","dynatrace_get_attack":"getAttack","dynatrace_get_audit_logs":"getAuditLogs","dynatrace_get_entity":"getEntity","dynatrace_get_event":"getEvent","dynatrace_get_metric":"getMetricDescriptor","dynatrace_get_problem":"getProblem","dynatrace_get_problem_comment":"getProblemComment","dynatrace_get_security_problem":"getSecurityProblem","dynatrace_get_settings_object":"getSettingsObject","dynatrace_get_slo":"getSlo","dynatrace_get_synthetic_batch":"getSyntheticBatch","dynatrace_ingest_event":"ingestEvent","dynatrace_ingest_logs":"ingestLogs","dynatrace_ingest_metrics":"ingestMetrics","dynatrace_list_attacks":"listAttacks","dynatrace_list_entities":"listEntities","dynatrace_list_entity_types":"listEntityTypes","dynatrace_list_events":"listEvents","dynatrace_list_metrics":"listMetrics","dynatrace_list_problem_comments":"listProblemComments","dynatrace_list_problems":"listProblems","dynatrace_list_remediation_items":"listRemediationItems","dynatrace_list_security_problems":"listSecurityProblems","dynatrace_list_settings_objects":"listSettingsObjects","dynatrace_list_settings_schemas":"listSettingsSchemas","dynatrace_list_slos":"listSlos","dynatrace_list_synthetic_monitors":"listSyntheticMonitors","dynatrace_list_tags":"listTags","dynatrace_mute_security_problem":"muteSecurityProblem","dynatrace_mute_security_problems":"muteSecurityProblemsBulk","dynatrace_query_metrics":"queryMetrics","dynatrace_search_logs":"searchLogs","dynatrace_unmute_security_problem":"unmuteSecurityProblem","dynatrace_unmute_security_problems":"unmuteSecurityProblemsBulk","dynatrace_update_problem_comment":"updateProblemComment","dynatrace_update_settings_object":"updateSettingsObject","dynatrace_update_slo":"updateSlo"}},"dynatrace_v2":{"namespace":"dynatrace","methods":{"dynatrace_add_problem_comment":"addProblemComment","dynatrace_add_tags":"addTags","dynatrace_close_problem":"closeProblem","dynatrace_create_settings_object":"createSettingsObject","dynatrace_create_slo":"createSlo","dynatrace_delete_problem_comment":"deleteProblemComment","dynatrace_delete_settings_object":"deleteSettingsObject","dynatrace_delete_slo":"deleteSlo","dynatrace_delete_tag":"deleteTag","dynatrace_execute_synthetic_monitors":"executeSyntheticMonitors","dynatrace_get_attack":"getAttack","dynatrace_get_audit_logs":"getAuditLogs","dynatrace_get_entity":"getEntity","dynatrace_get_event":"getEvent","dynatrace_get_metric":"getMetricDescriptor","dynatrace_get_problem":"getProblem","dynatrace_get_problem_comment":"getProblemComment","dynatrace_get_security_problem":"getSecurityProblem","dynatrace_get_settings_object":"getSettingsObject","dynatrace_get_slo":"getSlo","dynatrace_get_synthetic_batch":"getSyntheticBatch","dynatrace_ingest_event":"ingestEvent","dynatrace_ingest_logs":"ingestLogs","dynatrace_ingest_metrics":"ingestMetrics","dynatrace_list_attacks":"listAttacks","dynatrace_list_entities":"listEntities","dynatrace_list_entity_types":"listEntityTypes","dynatrace_list_events":"listEvents","dynatrace_list_metrics":"listMetrics","dynatrace_list_problem_comments":"listProblemComments","dynatrace_list_problems":"listProblems","dynatrace_list_remediation_items":"listRemediationItems","dynatrace_list_security_problems":"listSecurityProblems","dynatrace_list_settings_objects":"listSettingsObjects","dynatrace_list_settings_schemas":"listSettingsSchemas","dynatrace_list_slos":"listSlos","dynatrace_list_synthetic_monitors":"listSyntheticMonitors","dynatrace_list_tags":"listTags","dynatrace_mute_security_problem":"muteSecurityProblem","dynatrace_mute_security_problems":"muteSecurityProblemsBulk","dynatrace_query_metrics":"queryMetrics","dynatrace_search_logs":"searchLogs","dynatrace_unmute_security_problem":"unmuteSecurityProblem","dynatrace_unmute_security_problems":"unmuteSecurityProblemsBulk","dynatrace_update_problem_comment":"updateProblemComment","dynatrace_update_settings_object":"updateSettingsObject","dynatrace_update_slo":"updateSlo"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"ec2":{"namespace":"legacy.ec2","methods":{"allocate_address":"allocateElasticIp","associate_address":"associateElasticIp","authorize_security_group_ingress":"authorizeSecurityGroupIngress","create_snapshot":"createEbsSnapshot","create_tags":"createTags","delete_snapshot":"deleteEbsSnapshot","delete_tags":"deleteTags","delete_volume":"deleteEbsVolume","describe_addresses":"describeElasticIps","describe_availability_zones":"describeAvailabilityZones","describe_images":"describeAmis","describe_instance_status":"describeInstanceStatus","describe_instances":"describeInstances","describe_internet_gateways":"describeInternetGateways","describe_key_pairs":"describeKeyPairs","describe_nat_gateways":"describeNatGateways","describe_network_acls":"describeNetworkAcls","describe_network_interfaces":"describeNetworkInterfaces","describe_regions":"describeRegions","describe_route_tables":"describeRouteTables","describe_security_groups":"describeSecurityGroups","describe_snapshots":"describeEbsSnapshots","describe_subnets":"describeSubnets","describe_volumes":"describeEbsVolumes","describe_vpc_endpoints":"describeVpcEndpoints","describe_vpc_peering_connections":"describeVpcPeeringConnections","describe_vpcs":"describeVpcs","disassociate_address":"disassociateElasticIp","reboot_instances":"rebootInstances","release_address":"releaseElasticIp","revoke_security_group_ingress":"revokeSecurityGroupIngress","start_instances":"startInstances","stop_instances":"stopInstances","terminate_instances":"terminateInstances"}},"ec2_v2":{"namespace":"ec2","methods":{"allocate_address":"allocateElasticIp","associate_address":"associateElasticIp","authorize_security_group_ingress":"authorizeSecurityGroupIngress","create_snapshot":"createEbsSnapshot","create_tags":"createTags","delete_snapshot":"deleteEbsSnapshot","delete_tags":"deleteTags","delete_volume":"deleteEbsVolume","describe_addresses":"describeElasticIps","describe_availability_zones":"describeAvailabilityZones","describe_images":"describeAmis","describe_instance_status":"describeInstanceStatus","describe_instances":"describeInstances","describe_internet_gateways":"describeInternetGateways","describe_key_pairs":"describeKeyPairs","describe_nat_gateways":"describeNatGateways","describe_network_acls":"describeNetworkAcls","describe_network_interfaces":"describeNetworkInterfaces","describe_regions":"describeRegions","describe_route_tables":"describeRouteTables","describe_security_groups":"describeSecurityGroups","describe_snapshots":"describeEbsSnapshots","describe_subnets":"describeSubnets","describe_volumes":"describeEbsVolumes","describe_vpc_endpoints":"describeVpcEndpoints","describe_vpc_peering_connections":"describeVpcPeeringConnections","describe_vpcs":"describeVpcs","disassociate_address":"disassociateElasticIp","reboot_instances":"rebootInstances","release_address":"releaseElasticIp","revoke_security_group_ingress":"revokeSecurityGroupIngress","start_instances":"startInstances","stop_instances":"stopInstances","terminate_instances":"terminateInstances"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"elasticsearch":{"namespace":"elasticsearch","methods":{"elasticsearch_bulk":"bulkOperations","elasticsearch_cluster_health":"clusterHealth","elasticsearch_cluster_stats":"clusterStats","elasticsearch_count":"countDocuments","elasticsearch_create_index":"createIndex","elasticsearch_delete_document":"deleteDocument","elasticsearch_delete_index":"deleteIndex","elasticsearch_get_document":"getDocument","elasticsearch_get_index":"getIndexInfo","elasticsearch_index_document":"indexDocument","elasticsearch_list_indices":"listIndices","elasticsearch_search":"search","elasticsearch_update_document":"updateDocument"}},"elevenlabs":{"namespace":"legacy.elevenlabs","methods":{"audio_isolation":"audioIsolation","edit_voice_settings":"editVoiceSettings","get_user":"getUserInfo","get_voice":"getVoice","get_voice_settings":"getVoiceSettings","list_models":"listModels","list_voices":"listVoices","sound_effects":"soundEffects","speech_to_speech":"speechToSpeech","tts":"textToSpeech"}},"elevenlabs_v2":{"namespace":"elevenlabs","methods":{"audio_isolation":"audioIsolation","edit_voice_settings":"editVoiceSettings","get_user":"getUserInfo","get_voice":"getVoice","get_voice_settings":"getVoiceSettings","list_models":"listModels","list_voices":"listVoices","sound_effects":"soundEffects","speech_to_speech":"speechToSpeech","tts":"textToSpeech"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"emailbison":{"namespace":"legacy.emailbison","methods":{"attach_leads_to_campaign":"attachLeadsToCampaign","attach_tags_to_leads":"attachTagsToLeads","create_campaign":"createCampaign","create_lead":"createLead","create_tag":"createTag","get_lead":"getLead","list_campaigns":"listCampaigns","list_leads":"listLeads","list_replies":"listReplies","list_tags":"listTags","update_campaign":"updateCampaign","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead"},"triggers":{"emailbison_email_account_added":"emailAccountAdded","emailbison_email_account_disconnected":"emailAccountDisconnected","emailbison_email_account_reconnected":"emailAccountReconnected","emailbison_email_account_removed":"emailAccountRemoved","emailbison_email_bounced":"emailBounced","emailbison_email_opened":"emailOpened","emailbison_email_sent":"emailSent","emailbison_lead_first_contacted":"leadFirstContacted","emailbison_lead_interested":"leadInterested","emailbison_lead_replied":"leadReplied","emailbison_lead_unsubscribed":"leadUnsubscribed","emailbison_manual_email_sent":"manualEmailSent","emailbison_tag_attached":"tagAttached","emailbison_tag_removed":"tagRemoved","emailbison_untracked_reply_received":"untrackedReplyReceived","emailbison_warmup_disabled_causing_bounces":"warmupDisabledCausingBounces","emailbison_warmup_disabled_receiving_bounces":"warmupDisabledReceivingBounces"}},"emailbison_v2":{"namespace":"emailbison","methods":{"attach_leads_to_campaign":"attachLeadsToCampaign","attach_tags_to_leads":"attachTagsToLeads","create_campaign":"createCampaign","create_lead":"createLead","create_tag":"createTag","get_lead":"getLead","list_campaigns":"listCampaigns","list_leads":"listLeads","list_replies":"listReplies","list_tags":"listTags","update_campaign":"updateCampaign","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead"},"triggers":{"emailbison_email_account_added":"emailAccountAdded","emailbison_email_account_disconnected":"emailAccountDisconnected","emailbison_email_account_reconnected":"emailAccountReconnected","emailbison_email_account_removed":"emailAccountRemoved","emailbison_email_bounced":"emailBounced","emailbison_email_opened":"emailOpened","emailbison_email_sent":"emailSent","emailbison_lead_first_contacted":"leadFirstContacted","emailbison_lead_interested":"leadInterested","emailbison_lead_replied":"leadReplied","emailbison_lead_unsubscribed":"leadUnsubscribed","emailbison_manual_email_sent":"manualEmailSent","emailbison_tag_attached":"tagAttached","emailbison_tag_removed":"tagRemoved","emailbison_untracked_reply_received":"untrackedReplyReceived","emailbison_warmup_disabled_causing_bounces":"warmupDisabledCausingBounces","emailbison_warmup_disabled_receiving_bounces":"warmupDisabledReceivingBounces"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"embeddings":{"namespace":"embeddings"},"enrich":{"namespace":"legacy.enrich","methods":{"check_credits":"checkCredits","company_funding":"companyFundingTraffic","company_lookup":"companyLookup","company_revenue":"companyRevenue","disposable_email_check":"disposableEmailCheck","email_to_ip":"emailToIp","email_to_person_lite":"emailToPersonLite","email_to_phone":"emailToPhone","email_to_profile":"emailToProfile","find_email":"findEmail","get_post_details":"getPostDetails","ip_to_company":"ipToCompany","linkedin_profile":"linkedInProfileEnrichment","linkedin_to_personal_email":"linkedInToPersonalEmail","linkedin_to_work_email":"linkedInToWorkEmail","phone_finder":"phoneFinderLinkedIn","reverse_hash_lookup":"reverseHashLookup","sales_pointer_people":"salesPointerPeople","search_company":"searchCompany","search_company_activities":"searchCompanyActivities","search_company_employees":"searchCompanyEmployees","search_jobs":"searchJobs","search_logo":"searchLogo","search_people":"searchPeople","search_people_activities":"searchPeopleActivities","search_post_comments":"searchPostComments","search_post_comments_by_url":"searchPostCommentsByUrl","search_post_reactions":"searchPostReactions","search_post_reactions_by_url":"searchPostReactionsByUrl","search_posts":"searchPosts","search_similar_companies":"searchSimilarCompanies","verify_email":"verifyEmail"}},"enrich_v2":{"namespace":"enrich","methods":{"check_credits":"checkCredits","company_funding":"companyFundingTraffic","company_lookup":"companyLookup","company_revenue":"companyRevenue","disposable_email_check":"disposableEmailCheck","email_to_ip":"emailToIp","email_to_person_lite":"emailToPersonLite","email_to_phone":"emailToPhone","email_to_profile":"emailToProfile","find_email":"findEmail","get_post_details":"getPostDetails","ip_to_company":"ipToCompany","linkedin_profile":"linkedInProfileEnrichment","linkedin_to_personal_email":"linkedInToPersonalEmail","linkedin_to_work_email":"linkedInToWorkEmail","phone_finder":"phoneFinderLinkedIn","reverse_hash_lookup":"reverseHashLookup","sales_pointer_people":"salesPointerPeople","search_company":"searchCompany","search_company_activities":"searchCompanyActivities","search_company_employees":"searchCompanyEmployees","search_jobs":"searchJobs","search_logo":"searchLogo","search_people":"searchPeople","search_people_activities":"searchPeopleActivities","search_post_comments":"searchPostComments","search_post_comments_by_url":"searchPostCommentsByUrl","search_post_reactions":"searchPostReactions","search_post_reactions_by_url":"searchPostReactionsByUrl","search_posts":"searchPosts","search_similar_companies":"searchSimilarCompanies","verify_email":"verifyEmail"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"enrichment":{"namespace":"enrichment","methods":{"company-domain":"companyDomain","company-info":"companyInfo","email-verification":"emailVerification","linkedin-profile":"linkedInProfile","phone-number":"phoneNumber","work-email":"workEmail"}},"enrow":{"namespace":"enrow","methods":{"enrow_find_email":"findEmail","enrow_verify_email":"verifyEmail"}},"evaluator":{"namespace":"evaluator"},"exa":{"namespace":"exa","methods":{"exa_agent":"agent","exa_answer":"answer","exa_find_similar_links":"findSimilarLinks","exa_get_contents":"getContents","exa_search":"search"}},"extend":{"namespace":"legacy.extend"},"extend_v2":{"namespace":"legacy.extendV2"},"extend_v3":{"namespace":"extend","paramAliases":{"action":{"oauthCredential":"credential"}}},"fathom":{"namespace":"legacy.fathom","methods":{"fathom_get_summary":"getSummary","fathom_get_transcript":"getTranscript","fathom_list_meeting_types":"listMeetingTypes","fathom_list_meetings":"listMeetings","fathom_list_team_members":"listTeamMembers","fathom_list_teams":"listTeams"},"triggers":{"fathom_new_meeting":"newMeeting","fathom_webhook":"webhook"}},"fathom_v2":{"namespace":"fathom","methods":{"fathom_get_summary":"getSummary","fathom_get_transcript":"getTranscript","fathom_list_meeting_types":"listMeetingTypes","fathom_list_meetings":"listMeetings","fathom_list_team_members":"listTeamMembers","fathom_list_teams":"listTeams"},"triggers":{"fathom_new_meeting":"newMeeting","fathom_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"file":{"namespace":"legacy.file"},"file_v2":{"namespace":"legacy.fileV2"},"file_v3":{"namespace":"legacy.fileV3","methods":{"file_append":"append","file_get":"get","file_parser_v3":"read","file_write":"write"}},"file_v4":{"namespace":"legacy.fileV4","methods":{"file_append":"append","file_fetch":"fetch","file_read":"read","file_write":"write"}},"file_v5":{"namespace":"file","methods":{"file_append":"append","file_compress":"compress","file_create_folder":"createFolder","file_decompress":"decompress","file_delete_folder":"deleteFolder","file_edit":"applyEdit","file_fetch":"fetch","file_get_content":"getContent","file_list":"list","file_manage_sharing":"manageSharing","file_move":"moveFile","file_read":"read","file_restore_folder":"restoreFolder","file_search":"search","file_update_folder":"moveFolder","file_write":"write"}},"findymail":{"namespace":"findymail","methods":{"findymail_find_email_from_linkedin":"findEmailFromLinkedIn","findymail_find_email_from_name":"findEmailFromName","findymail_find_emails_by_domain":"findEmailsByDomain","findymail_find_employees":"findEmployees","findymail_find_phone":"findPhone","findymail_get_company":"getCompanyInfo","findymail_get_credits":"getRemainingCredits","findymail_lookup_technologies":"lookupTechnologiesByDomain","findymail_reverse_email_lookup":"reverseEmailLookup","findymail_search_technologies":"searchTechnologies","findymail_verify_email":"verifyEmail"}},"firecrawl":{"namespace":"firecrawl","methods":{"agent":"agent","batch_scrape":"batchScrape","batch_scrape_status":"batchScrapeStatus","cancel_crawl":"cancelCrawl","crawl":"crawl","crawl_status":"crawlStatus","credit_usage":"creditUsage","enrich":"enrichContactOrCompany","extract":"extract","extract_status":"extractStatus","map":"map","parse":"parseDocument","scrape":"scrape","search":"search"}},"fireflies":{"namespace":"legacy.fireflies","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"}},"fireflies_v2":{"namespace":"legacy.firefliesV2","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"}},"fireflies_v3":{"namespace":"fireflies","methods":{"fireflies_add_to_live_meeting":"addBotToLiveMeeting","fireflies_create_bite":"createBite","fireflies_delete_transcript":"deleteTranscript","fireflies_get_transcript":"getTranscript","fireflies_get_user":"getUser","fireflies_list_bites":"listBites","fireflies_list_contacts":"listContacts","fireflies_list_transcripts":"listTranscripts","fireflies_list_users":"listUsers","fireflies_upload_audio":"uploadAudio"},"triggers":{"fireflies_transcription_complete":"transcriptionComplete"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"fivetran":{"namespace":"fivetran","methods":{"cancel_transformation":"cancelTransformation","create_connect_card":"createConnectCard","create_connection":"createConnection","create_destination":"createDestination","create_group":"createGroup","delete_connection":"deleteConnection","get_account_info":"getAccountInfo","get_connection":"getConnection","get_connection_schema_config":"getSchemaConfig","get_connection_warnings":"getConnectionWarnings","get_connector_type":"getConnectorType","get_destination":"getDestination","get_group":"getGroup","get_sync_history":"getSyncHistory","get_transformation":"getTransformation","list_connections":"listConnections","list_connector_types":"listConnectorTypes","list_destinations":"listDestinations","list_groups":"listGroups","list_transformations":"listTransformations","list_users":"listUsers","pause_connection":"pauseConnection","reload_connection_schema":"reloadSchema","resume_connection":"resumeConnection","resync_connection":"reSyncConnection","resync_tables":"reSyncTables","run_connection_setup_tests":"runConnectionSetupTests","run_destination_setup_tests":"runDestinationSetupTests","run_transformation":"runTransformation","sync_connection":"syncConnection","update_connection":"updateConnection","update_connection_schema":"updateSchemaSync","update_connection_table":"updateTableSync","update_schema_config":"updateSchemaConfig"},"triggers":{"fivetran_connection_failure":"connectionFailure","fivetran_connection_successful":"connectionSuccessful","fivetran_create_connector":"createConnector","fivetran_delete_connector":"deleteConnector","fivetran_edit_connector":"editConnector","fivetran_force_update_connector":"forceUpdateConnector","fivetran_pause_connector":"pauseConnector","fivetran_resume_connector":"resumeConnector","fivetran_resync_connector":"resyncConnector","fivetran_resync_table":"resyncTable","fivetran_sync_end":"syncEnd","fivetran_sync_start":"syncStart","fivetran_transformation_failed":"transformationFailed","fivetran_transformation_start":"transformationStart","fivetran_transformation_succeeded":"transformationSucceeded","fivetran_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"flint":{"namespace":"legacy.flint","methods":{"flint_create_task":"createTask","flint_generate_pages":"generatePages","flint_get_task":"getTask"}},"flint_v2":{"namespace":"flint","methods":{"flint_create_task":"createTask","flint_generate_pages":"generatePages","flint_get_task":"getTask"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"flow":{"namespace":"flow","methods":{"add_link":"addLink","create_branch":"createBranch","create_comment":"createComment","create_entities":"createEntities","create_entity":"createEntity","delete_comment":"deleteComment","delete_entity":"deleteEntity","filter_entities":"filterEntities","get_comment":"getComment","get_data_model":"getDataModel","get_entities":"getEntities","get_entity_history":"getEntityHistory","get_project":"getProject","list_branches":"listBranches","list_comments":"listComments","list_entities":"listEntities","list_projects":"listProjects","remove_link":"removeLink","restore_entity":"restoreEntity","search_entities":"searchEntities","set_value":"setValue","set_values":"setValues","update_comment":"updateComment"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"function":{"namespace":"fn"},"gamma":{"namespace":"legacy.gamma","methods":{"check_status":"checkStatus","generate":"generate","generate_from_template":"generateFromTemplate","list_folders":"listFolders","list_themes":"listThemes"}},"gamma_v2":{"namespace":"gamma","methods":{"check_status":"checkStatus","generate":"generate","generate_from_template":"generateFromTemplate","list_folders":"listFolders","list_themes":"listThemes"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"gauge":{"namespace":"gauge","methods":{"gauge_add_tags_to_prompts":"addTagsToPrompts","gauge_bulk_update_prompts":"bulkUpdatePrompts","gauge_create_prompts":"createPrompts","gauge_create_tag":"createTag","gauge_create_topic":"createTopic","gauge_delete_tag":"deleteTag","gauge_get_answer":"getAnswer","gauge_get_category":"getCategory","gauge_get_current_credential":"getCurrentCredential","gauge_get_organization":"getOrganization","gauge_get_prompt":"getPrompt","gauge_get_query_metadata":"getQueryCatalog","gauge_get_tag":"getTag","gauge_get_topic":"getTopic","gauge_list_answers":"listAnswers","gauge_list_brands":"listBrands","gauge_list_categories":"listCategories","gauge_list_citations":"listCitations","gauge_list_organizations":"listOrganizations","gauge_list_prompts":"listPrompts","gauge_list_tags":"listTags","gauge_list_topics":"listTopics","gauge_query":"runReportQuery","gauge_remove_tags_from_prompts":"removeTagsFromPrompts","gauge_rename_topic":"renameTopic","gauge_update_prompt":"updatePrompt","gauge_update_tag":"updateTag"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"generic_webhook":{"namespace":"trigger.webhook"},"github":{"namespace":"legacy.github","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"}},"github_v2":{"namespace":"legacy.githubV2","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"}},"github_v3":{"namespace":"github","methods":{"github_add_assignees":"addIssueAssignees","github_add_labels":"addIssueLabels","github_cancel_workflow_run":"cancelWorkflowRun","github_check_star":"checkIfStarred","github_close_issue":"closeIssue","github_close_pr":"closePullRequest","github_comment":"createPrComment","github_compare_commits":"compareCommits","github_create_branch":"createBranch","github_create_comment_reaction":"addCommentReaction","github_create_file":"createFile","github_create_gist":"createGist","github_create_issue":"createIssue","github_create_issue_reaction":"addIssueReaction","github_create_milestone":"createMilestone","github_create_pr":"createPullRequest","github_create_pr_review":"createPrReview","github_create_project":"createProject","github_create_release":"createRelease","github_delete_branch":"deleteBranch","github_delete_comment":"deleteComment","github_delete_comment_reaction":"removeCommentReaction","github_delete_file":"deleteFile","github_delete_gist":"deleteGist","github_delete_issue_reaction":"removeIssueReaction","github_delete_milestone":"deleteMilestone","github_delete_project":"deleteProject","github_delete_release":"deleteRelease","github_fork_gist":"forkGist","github_fork_repo":"forkRepository","github_get_branch":"getBranch","github_get_branch_protection":"getBranchProtection","github_get_commit":"getCommit","github_get_file_content":"getFileContent","github_get_gist":"getGist","github_get_issue":"getIssue","github_get_latest_release":"getLatestRelease","github_get_milestone":"getMilestone","github_get_pr_files":"getPrFiles","github_get_project":"getProject","github_get_readme":"getReadme","github_get_release":"getRelease","github_get_tree":"getDirectoryTree","github_get_workflow":"getWorkflow","github_get_workflow_run":"getWorkflowRun","github_issue_comment":"createIssueComment","github_latest_commit":"getLatestCommit","github_list_branches":"listBranches","github_list_commits":"listCommits","github_list_forks":"listForks","github_list_gists":"listGists","github_list_issue_comments":"listIssueComments","github_list_issues":"listIssues","github_list_milestones":"listMilestones","github_list_pr_comments":"listPrComments","github_list_projects":"listProjects","github_list_prs":"listPullRequests","github_list_releases":"listReleases","github_list_stargazers":"listStargazers","github_list_tags":"listTags","github_list_workflow_runs":"listWorkflowRuns","github_list_workflows":"listWorkflows","github_merge_pr":"mergePullRequest","github_pr":"getPrDetails","github_remove_label":"removeIssueLabel","github_repo_info":"getRepositoryInfo","github_request_reviewers":"requestPrReviewers","github_rerun_workflow":"rerunWorkflow","github_search_code":"searchCode","github_search_commits":"searchCommits","github_search_issues":"searchIssues","github_search_repos":"searchRepositories","github_search_users":"searchUsers","github_star_gist":"starGist","github_star_repo":"starRepository","github_trigger_workflow":"triggerWorkflow","github_unstar_gist":"unstarGist","github_unstar_repo":"unstarRepository","github_update_branch_protection":"updateBranchProtection","github_update_comment":"updateComment","github_update_file":"updateFile","github_update_gist":"updateGist","github_update_issue":"updateIssue","github_update_milestone":"updateMilestone","github_update_pr":"updatePullRequest","github_update_project":"updateProject","github_update_release":"updateRelease"},"triggers":{"github_issue_closed":"issueClosed","github_issue_comment":"issueComment","github_issue_opened":"issueOpened","github_pr_closed":"prClosed","github_pr_comment":"prComment","github_pr_merged":"prMerged","github_pr_opened":"prOpened","github_pr_reviewed":"prReviewed","github_push":"push","github_release_published":"releasePublished","github_workflow_run":"workflowRun"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"gitlab":{"namespace":"legacy.gitlab","methods":{"gitlab_activate_user":"activateUser","gitlab_add_member":"addMember","gitlab_add_saml_group_link":"addSamlGroupLink","gitlab_approve_access_request":"approveAccessRequest","gitlab_approve_merge_request":"approveMergeRequest","gitlab_approve_user":"approveUserSignup","gitlab_ban_user":"banUser","gitlab_block_user":"blockUser","gitlab_cancel_pipeline":"cancelPipeline","gitlab_compare_branches":"compareBranches","gitlab_create_branch":"createBranch","gitlab_create_file":"createFile","gitlab_create_issue":"createIssue","gitlab_create_issue_note":"addIssueComment","gitlab_create_merge_request":"createMergeRequest","gitlab_create_merge_request_note":"addMrComment","gitlab_create_pipeline":"createPipeline","gitlab_create_release":"createRelease","gitlab_create_user":"createUser","gitlab_deactivate_user":"deactivateUser","gitlab_delete_branch":"deleteBranch","gitlab_delete_issue":"deleteIssue","gitlab_delete_saml_group_link":"deleteSamlGroupLink","gitlab_delete_user":"deleteUser","gitlab_delete_user_identity":"deleteUserIdentity","gitlab_deny_access_request":"denyAccessRequest","gitlab_get_file":"getFile","gitlab_get_group":"getGroup","gitlab_get_issue":"getIssue","gitlab_get_job_log":"getJobLog","gitlab_get_merge_request":"getMergeRequest","gitlab_get_merge_request_changes":"getMrChanges","gitlab_get_pipeline":"getPipeline","gitlab_get_project":"getProject","gitlab_invite_member":"inviteMemberByEmail","gitlab_list_access_requests":"listAccessRequests","gitlab_list_branches":"listBranches","gitlab_list_commits":"listCommits","gitlab_list_groups":"listGroups","gitlab_list_invitations":"listInvitations","gitlab_list_issues":"listIssues","gitlab_list_members":"listMembers","gitlab_list_merge_requests":"listMergeRequests","gitlab_list_pipeline_jobs":"listPipelineJobs","gitlab_list_pipelines":"listPipelines","gitlab_list_projects":"listProjects","gitlab_list_releases":"listReleases","gitlab_list_repository_tree":"listRepositoryTree","gitlab_list_saml_group_links":"listSamlGroupLinks","gitlab_list_user_memberships":"listUserMemberships","gitlab_merge_merge_request":"mergeMergeRequest","gitlab_play_job":"playJob","gitlab_reject_user":"rejectUserSignup","gitlab_remove_member":"removeMember","gitlab_retry_pipeline":"retryPipeline","gitlab_revoke_invitation":"revokeInvitation","gitlab_search_users":"searchUsers","gitlab_unban_user":"unbanUser","gitlab_unblock_user":"unblockUser","gitlab_update_file":"updateFile","gitlab_update_invitation":"updateInvitation","gitlab_update_issue":"updateIssue","gitlab_update_member":"updateMember","gitlab_update_merge_request":"updateMergeRequest","gitlab_update_user":"updateUser"},"triggers":{"gitlab_comment":"comment","gitlab_issue":"issue","gitlab_merge_request":"mergeRequest","gitlab_pipeline":"pipeline","gitlab_push":"push","gitlab_webhook":"webhook"}},"gitlab_v2":{"namespace":"gitlab","methods":{"gitlab_activate_user":"activateUser","gitlab_add_member":"addMember","gitlab_add_saml_group_link":"addSamlGroupLink","gitlab_approve_access_request":"approveAccessRequest","gitlab_approve_merge_request":"approveMergeRequest","gitlab_approve_user":"approveUserSignup","gitlab_ban_user":"banUser","gitlab_block_user":"blockUser","gitlab_cancel_pipeline":"cancelPipeline","gitlab_compare_branches":"compareBranches","gitlab_create_branch":"createBranch","gitlab_create_file":"createFile","gitlab_create_issue":"createIssue","gitlab_create_issue_note":"addIssueComment","gitlab_create_merge_request":"createMergeRequest","gitlab_create_merge_request_note":"addMrComment","gitlab_create_pipeline":"createPipeline","gitlab_create_release":"createRelease","gitlab_create_user":"createUser","gitlab_deactivate_user":"deactivateUser","gitlab_delete_branch":"deleteBranch","gitlab_delete_issue":"deleteIssue","gitlab_delete_saml_group_link":"deleteSamlGroupLink","gitlab_delete_user":"deleteUser","gitlab_delete_user_identity":"deleteUserIdentity","gitlab_deny_access_request":"denyAccessRequest","gitlab_get_file":"getFile","gitlab_get_group":"getGroup","gitlab_get_issue":"getIssue","gitlab_get_job_log":"getJobLog","gitlab_get_merge_request":"getMergeRequest","gitlab_get_merge_request_changes":"getMrChanges","gitlab_get_pipeline":"getPipeline","gitlab_get_project":"getProject","gitlab_invite_member":"inviteMemberByEmail","gitlab_list_access_requests":"listAccessRequests","gitlab_list_branches":"listBranches","gitlab_list_commits":"listCommits","gitlab_list_groups":"listGroups","gitlab_list_invitations":"listInvitations","gitlab_list_issues":"listIssues","gitlab_list_members":"listMembers","gitlab_list_merge_requests":"listMergeRequests","gitlab_list_pipeline_jobs":"listPipelineJobs","gitlab_list_pipelines":"listPipelines","gitlab_list_projects":"listProjects","gitlab_list_releases":"listReleases","gitlab_list_repository_tree":"listRepositoryTree","gitlab_list_saml_group_links":"listSamlGroupLinks","gitlab_list_user_memberships":"listUserMemberships","gitlab_merge_merge_request":"mergeMergeRequest","gitlab_play_job":"playJob","gitlab_reject_user":"rejectUserSignup","gitlab_remove_member":"removeMember","gitlab_retry_pipeline":"retryPipeline","gitlab_revoke_invitation":"revokeInvitation","gitlab_search_users":"searchUsers","gitlab_unban_user":"unbanUser","gitlab_unblock_user":"unblockUser","gitlab_update_file":"updateFile","gitlab_update_invitation":"updateInvitation","gitlab_update_issue":"updateIssue","gitlab_update_member":"updateMember","gitlab_update_merge_request":"updateMergeRequest","gitlab_update_user":"updateUser"},"triggers":{"gitlab_comment":"comment","gitlab_issue":"issue","gitlab_merge_request":"mergeRequest","gitlab_pipeline":"pipeline","gitlab_push":"push","gitlab_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"gmail":{"namespace":"legacy.gmail","methods":{"add_label_gmail":"addLabel","archive_gmail":"archiveEmail","delete_gmail":"deleteEmail","draft_gmail":"draftEmail","edit_draft_gmail":"editDraft","mark_read_gmail":"markAsRead","mark_unread_gmail":"markAsUnread","move_gmail":"moveEmail","read_gmail":"readEmail","remove_label_gmail":"removeLabel","search_gmail":"searchEmail","send_gmail":"sendEmail","unarchive_gmail":"unarchiveEmail"},"triggers":{"gmail_poller":"poller"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"gmail_v2":{"namespace":"gmail","methods":{"add_label_gmail":"addLabel","archive_gmail":"archiveEmail","create_label_gmail":"createLabel","delete_draft_gmail":"deleteDraft","delete_gmail":"deleteEmail","delete_label_gmail":"deleteLabel","draft_gmail":"draftEmail","edit_draft_gmail":"editDraft","get_draft_gmail":"getDraft","get_thread_gmail":"getThread","list_drafts_gmail":"listDrafts","list_labels_gmail":"listLabels","list_threads_gmail":"listThreads","mark_read_gmail":"markAsRead","mark_unread_gmail":"markAsUnread","move_gmail":"moveEmail","read_gmail":"readEmail","remove_label_gmail":"removeLabel","search_gmail":"searchEmail","send_gmail":"sendEmail","trash_thread_gmail":"trashThread","unarchive_gmail":"unarchiveEmail","untrash_thread_gmail":"untrashThread","update_label_gmail":"updateLabel"},"triggers":{"gmail_poller":"poller"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"gong":{"namespace":"legacy.gong","methods":{"aggregate_activity":"aggregateActivity","aggregate_by_period":"aggregateByPeriod","answered_scorecards":"answeredScorecards","ask_anything":"askAnything","assign_flow_prospects":"assignFlowProspects","create_call":"createCall","day_by_day_activity":"dayByDayActivity","get_brief":"getBrief","get_call":"getCall","get_call_transcript":"getCallTranscript","get_coaching":"getCoaching","get_extensive_calls":"getExtensiveCalls","get_folder_content":"getFolderContent","get_logs":"getLogs","get_prospect_flows":"getProspectFlows","get_user":"getUser","interaction_stats":"interactionStats","list_calls":"listCalls","list_flows":"listFlows","list_library_folders":"listLibraryFolders","list_scorecards":"listScorecards","list_trackers":"listTrackers","list_users":"listUsers","list_workspaces":"listWorkspaces","lookup_email":"lookupEmail","lookup_phone":"lookupPhone","purge_email_address":"purgeEmailAddress","purge_phone_number":"purgePhoneNumber","unassign_flow_prospects":"unassignFlowProspects"},"triggers":{"gong_call_completed":"callCompleted","gong_webhook":"webhook"}},"gong_v2":{"namespace":"gong","methods":{"aggregate_activity":"aggregateActivity","aggregate_by_period":"aggregateByPeriod","answered_scorecards":"answeredScorecards","ask_anything":"askAnything","assign_flow_prospects":"assignFlowProspects","create_call":"createCall","day_by_day_activity":"dayByDayActivity","get_brief":"getBrief","get_call":"getCall","get_call_transcript":"getCallTranscript","get_coaching":"getCoaching","get_extensive_calls":"getExtensiveCalls","get_folder_content":"getFolderContent","get_logs":"getLogs","get_prospect_flows":"getProspectFlows","get_user":"getUser","interaction_stats":"interactionStats","list_calls":"listCalls","list_flows":"listFlows","list_library_folders":"listLibraryFolders","list_scorecards":"listScorecards","list_trackers":"listTrackers","list_users":"listUsers","list_workspaces":"listWorkspaces","lookup_email":"lookupEmail","lookup_phone":"lookupPhone","purge_email_address":"purgeEmailAddress","purge_phone_number":"purgePhoneNumber","unassign_flow_prospects":"unassignFlowProspects"},"triggers":{"gong_call_completed":"callCompleted","gong_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"google_ads":{"namespace":"googleAds","methods":{"ad_performance":"adPerformance","campaign_performance":"campaignPerformance","list_ad_groups":"listAdGroups","list_campaigns":"listCampaigns","list_customers":"listCustomers","search":"customQueryGaql"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"google_appsheet":{"namespace":"googleAppsheet","methods":{"google_appsheet_add_rows":"addRows","google_appsheet_delete_rows":"deleteRows","google_appsheet_edit_rows":"editRows","google_appsheet_find_rows":"findRows"}},"google_bigquery":{"namespace":"googleBigquery","methods":{"create_dataset":"createDataset","create_table":"createTable","delete_dataset":"deleteDataset","delete_table":"deleteTable","get_query_results":"getQueryResults","get_table":"getTable","insert_rows":"insertRows","list_datasets":"listDatasets","list_table_data":"listTableData","list_tables":"listTables","query":"runQuery"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"google_books":{"namespace":"googleBooks","methods":{"volume_details":"getVolumeDetails","volume_search":"searchVolumes"}},"google_calendar":{"namespace":"legacy.googleCalendar","methods":{"create":"createEvent","create_calendar":"createCalendar","delete":"deleteEvent","delete_calendar":"deleteCalendar","freebusy":"checkFreeBusy","get":"getEvent","instances":"getRecurringInstances","invite":"inviteAttendees","list":"listEvents","list_acl":"listSharing","list_calendars":"listCalendars","move":"moveEvent","quick_add":"quickAddNaturalLanguage","respond":"respondToInvitationRsvp","share_calendar":"shareCalendar","unshare_calendar":"removeSharing","update":"updateEvent","update_acl":"updateSharing","update_calendar":"updateCalendar"},"triggers":{"google_calendar_poller":"poller"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_calendar_v2":{"namespace":"googleCalendar","methods":{"create":"createEvent","create_calendar":"createCalendar","delete":"deleteEvent","delete_calendar":"deleteCalendar","freebusy":"checkFreeBusy","get":"getEvent","instances":"getRecurringInstances","invite":"inviteAttendees","list":"listEvents","list_acl":"listSharing","list_calendars":"listCalendars","move":"moveEvent","quick_add":"quickAddNaturalLanguage","respond":"respondToInvitationRsvp","share_calendar":"shareCalendar","unshare_calendar":"removeSharing","update":"updateEvent","update_acl":"updateSharing","update_calendar":"updateCalendar"},"triggers":{"google_calendar_poller":"poller"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_contacts":{"namespace":"googleContacts","methods":{"create":"createContact","delete":"deleteContact","get":"getContact","list":"listContacts","search":"searchContacts","update":"updateContact"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"google_docs":{"namespace":"googleDocs","methods":{"create":"createDocument","create_named_range":"createNamedRange","create_paragraph_bullets":"createBullets","delete_content_range":"deleteContentRange","delete_named_range":"deleteNamedRange","delete_paragraph_bullets":"deleteBullets","insert_image":"insertImage","insert_page_break":"insertPageBreak","insert_table":"insertTable","insert_text":"insertText","read":"readDocument","replace_text":"findReplaceText","update_paragraph_style":"applyParagraphStyle","update_text_style":"applyTextStyle","write":"writeToDocument"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"google_drive":{"namespace":"googleDrive","methods":{"copy":"copyFile","create_comment":"createComment","create_file":"createFile","create_folder":"createFolder","delete":"deletePermanently","delete_comment":"deleteComment","download":"downloadFile","export":"exportFile","get_about":"getDriveInfo","get_content":"getFileContent","get_file":"getFileInfo","get_revision":"getRevision","list":"listFiles","list_comments":"listComments","list_permissions":"listPermissions","list_revisions":"listRevisions","move":"moveFile","search":"searchFiles","share":"shareFile","trash":"moveToTrash","unshare":"removeSharing","untrash":"restoreFromTrash","update":"updateFile","upload":"uploadFile"},"triggers":{"google_drive_poller":"poller"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_forms":{"namespace":"googleForms","methods":{"batch_update":"batchUpdate","create_form":"createForm","create_watch":"createWatch","delete_watch":"deleteWatch","get_form":"getForm","get_responses":"getResponses","list_watches":"listWatches","renew_watch":"renewWatch","set_publish_settings":"setPublishSettings"},"triggers":{"google_forms_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"google_groups":{"namespace":"googleGroups","methods":{"add_alias":"addAlias","add_member":"addMember","create_group":"createGroup","delete_group":"deleteGroup","get_group":"getGroup","get_member":"getMember","get_settings":"getSettings","has_member":"checkMembership","list_aliases":"listAliases","list_groups":"listGroups","list_members":"listMembers","remove_alias":"removeAlias","remove_member":"removeMember","update_group":"updateGroup","update_member":"updateMemberRole","update_settings":"updateSettings"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"google_maps":{"namespace":"googleMaps","methods":{"air_quality":"airQuality","directions":"getDirections","distance_matrix":"distanceMatrix","elevation":"getElevation","geocode":"geocodeAddress","geolocate":"geolocateWiFiCell","place_details":"placeDetails","places_nearby":"nearbyPlaces","places_search":"searchPlaces","pollen":"pollenForecast","reverse_geocode":"reverseGeocode","snap_to_roads":"snapToRoads","solar":"solarPotential","speed_limits":"speedLimits","timezone":"getTimezone","validate_address":"validateAddress"}},"google_meet":{"namespace":"googleMeet","methods":{"create_space":"createSpace","end_conference":"endConference","get_conference_record":"getConferenceRecord","get_space":"getSpace","list_conference_records":"listConferenceRecords","list_participants":"listParticipants"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"google_pagespeed":{"namespace":"googlePagespeed"},"google_search":{"namespace":"googleSearch"},"google_sheets":{"namespace":"legacy.googleSheets","methods":{"append":"appendData","read":"readData","update":"updateData","write":"writeData"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"google_sheets_v2":{"namespace":"googleSheets","methods":{"append":"appendData","batch_clear":"batchClear","batch_get":"batchRead","batch_update":"batchUpdate","clear":"clearData","copy_sheet":"copySheet","create":"createSpreadsheet","delete_rows":"deleteRows","delete_sheet":"deleteSheet","delete_spreadsheet":"deleteSpreadsheet","get_info":"getSpreadsheetInfo","read":"readData","update":"updateData","write":"writeData"},"triggers":{"google_sheets_poller":"poller"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"google_slides":{"namespace":"legacy.googleSlides","methods":{"add_image":"addImage","add_slide":"addSlide","batch_update":"batchUpdateRaw","copy_presentation":"copyPresentation","create":"createPresentation","create_line":"createLine","create_paragraph_bullets":"createParagraphBullets","create_shape":"createShape","create_sheets_chart":"embedSheetsChart","create_table":"createTable","create_video":"embedVideo","delete_object":"deleteObject","delete_paragraph_bullets":"deleteParagraphBullets","delete_table_column":"deleteTableColumn","delete_table_row":"deleteTableRow","delete_text":"deleteText","duplicate_object":"duplicateObject","export_presentation":"exportPresentation","get_page":"getPage","get_thumbnail":"getThumbnail","group_objects":"groupObjects","insert_table_columns":"insertTableColumns","insert_table_rows":"insertTableRows","insert_text":"insertText","merge_table_cells":"mergeTableCells","read":"readPresentation","refresh_sheets_chart":"refreshSheetsChart","reorder_slides":"reorderSlides","replace_all_shapes_with_image":"replaceAllShapesWithImage","replace_all_shapes_with_sheets_chart":"replaceAllShapesWithSheetsChart","replace_all_text":"replaceAllText","replace_image":"replaceImage","reroute_line":"rerouteLine","ungroup_objects":"ungroupObjects","unmerge_table_cells":"unmergeTableCells","update_image_properties":"updateImageProperties","update_line_category":"updateLineCategory","update_line_properties":"updateLineProperties","update_page_element_alt_text":"updateAltText","update_page_element_transform":"updateElementTransform","update_page_elements_z_order":"updateZOrder","update_page_properties":"updatePageProperties","update_paragraph_style":"updateParagraphStyle","update_shape_properties":"updateShapeProperties","update_slide_properties":"updateSlideProperties","update_table_border_properties":"updateTableBorderProperties","update_table_cell_properties":"updateTableCellProperties","update_table_column_properties":"updateTableColumnProperties","update_table_row_properties":"updateTableRowProperties","update_text_style":"updateTextStyle","update_video_properties":"updateVideoProperties","write":"writeToPresentation"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"google_slides_v2":{"namespace":"googleSlides","methods":{"add_image":"addImage","add_slide":"addSlide","batch_update":"batchUpdateRaw","copy_presentation":"copyPresentation","create":"createPresentation","create_line":"createLine","create_paragraph_bullets":"createParagraphBullets","create_shape":"createShape","create_sheets_chart":"embedSheetsChart","create_table":"createTable","create_video":"embedVideo","delete_object":"deleteObject","delete_paragraph_bullets":"deleteParagraphBullets","delete_table_column":"deleteTableColumn","delete_table_row":"deleteTableRow","delete_text":"deleteText","duplicate_object":"duplicateObject","export_presentation":"exportPresentation","get_page":"getPage","get_thumbnail":"getThumbnail","group_objects":"groupObjects","insert_table_columns":"insertTableColumns","insert_table_rows":"insertTableRows","insert_text":"insertText","merge_table_cells":"mergeTableCells","read":"readPresentation","refresh_sheets_chart":"refreshSheetsChart","reorder_slides":"reorderSlides","replace_all_shapes_with_image":"replaceAllShapesWithImage","replace_all_shapes_with_sheets_chart":"replaceAllShapesWithSheetsChart","replace_all_text":"replaceAllText","replace_image":"replaceImage","reroute_line":"rerouteLine","ungroup_objects":"ungroupObjects","unmerge_table_cells":"unmergeTableCells","update_image_properties":"updateImageProperties","update_line_category":"updateLineCategory","update_line_properties":"updateLineProperties","update_page_element_alt_text":"updateAltText","update_page_element_transform":"updateElementTransform","update_page_elements_z_order":"updateZOrder","update_page_properties":"updatePageProperties","update_paragraph_style":"updateParagraphStyle","update_shape_properties":"updateShapeProperties","update_slide_properties":"updateSlideProperties","update_table_border_properties":"updateTableBorderProperties","update_table_cell_properties":"updateTableCellProperties","update_table_column_properties":"updateTableColumnProperties","update_table_row_properties":"updateTableRowProperties","update_text_style":"updateTextStyle","update_video_properties":"updateVideoProperties","write":"writeToPresentation"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"google_tasks":{"namespace":"googleTasks","methods":{"create":"createTask","delete":"deleteTask","get":"getTask","list":"listTasks","list_task_lists":"listTaskLists","update":"updateTask"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"google_translate":{"namespace":"googleTranslate","methods":{"detect":"detectLanguage","text":"translateText"}},"google_vault":{"namespace":"googleVault","methods":{"add_held_accounts":"addHeldAccounts","add_matters_permissions":"addMatterCollaborator","close_matters":"closeMatter","create_matters":"createMatter","create_matters_export":"createExport","create_matters_holds":"createHold","create_saved_query":"createSavedQuery","delete_matters":"deleteMatter","delete_matters_export":"deleteExport","delete_matters_holds":"deleteHold","delete_saved_query":"deleteSavedQuery","download_export_file":"downloadExportFile","list_matters":"listMatters","list_matters_export":"listExports","list_matters_holds":"listHolds","list_saved_queries":"listSavedQueries","remove_held_accounts":"removeHeldAccounts","remove_matters_permissions":"removeMatterCollaborator","reopen_matters":"reopenMatter","undelete_matters":"undeleteMatter","update_matters":"updateMatter","update_matters_holds":"updateHold"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"grafana":{"namespace":"legacy.grafana","methods":{"grafana_check_data_source_health":"checkDataSourceHealth","grafana_create_alert_rule":"createAlertRule","grafana_create_annotation":"createAnnotation","grafana_create_contact_point":"createContactPoint","grafana_create_dashboard":"createDashboard","grafana_create_folder":"createFolder","grafana_delete_alert_rule":"deleteAlertRule","grafana_delete_annotation":"deleteAnnotation","grafana_delete_contact_point":"deleteContactPoint","grafana_delete_dashboard":"deleteDashboard","grafana_delete_folder":"deleteFolder","grafana_get_alert_rule":"getAlertRule","grafana_get_alert_rule_group":"getAlertRuleGroup","grafana_get_dashboard":"getDashboard","grafana_get_data_source":"getDataSource","grafana_get_folder":"getFolder","grafana_get_health":"getHealth","grafana_list_alert_rules":"listAlertRules","grafana_list_annotations":"listAnnotations","grafana_list_contact_points":"listContactPoints","grafana_list_dashboards":"listDashboards","grafana_list_data_sources":"listDataSources","grafana_list_folders":"listFolders","grafana_move_folder":"moveFolder","grafana_query_data_source":"queryDataSource","grafana_update_alert_rule":"updateAlertRule","grafana_update_annotation":"updateAnnotation","grafana_update_contact_point":"updateContactPoint","grafana_update_dashboard":"updateDashboard","grafana_update_folder":"updateFolder"}},"grafana_v2":{"namespace":"grafana","methods":{"grafana_check_data_source_health":"checkDataSourceHealth","grafana_create_alert_rule":"createAlertRule","grafana_create_annotation":"createAnnotation","grafana_create_contact_point":"createContactPoint","grafana_create_dashboard":"createDashboard","grafana_create_folder":"createFolder","grafana_delete_alert_rule":"deleteAlertRule","grafana_delete_annotation":"deleteAnnotation","grafana_delete_contact_point":"deleteContactPoint","grafana_delete_dashboard":"deleteDashboard","grafana_delete_folder":"deleteFolder","grafana_get_alert_rule":"getAlertRule","grafana_get_alert_rule_group":"getAlertRuleGroup","grafana_get_dashboard":"getDashboard","grafana_get_data_source":"getDataSource","grafana_get_folder":"getFolder","grafana_get_health":"getHealth","grafana_list_alert_rules":"listAlertRules","grafana_list_annotations":"listAnnotations","grafana_list_contact_points":"listContactPoints","grafana_list_dashboards":"listDashboards","grafana_list_data_sources":"listDataSources","grafana_list_folders":"listFolders","grafana_move_folder":"moveFolder","grafana_query_data_source":"queryDataSource","grafana_update_alert_rule":"updateAlertRule","grafana_update_annotation":"updateAnnotation","grafana_update_contact_point":"updateContactPoint","grafana_update_dashboard":"updateDashboard","grafana_update_folder":"updateFolder"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"grain":{"namespace":"legacy.grain","methods":{"grain_create_hook":"createWebhook","grain_delete_hook":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams","grain_list_views":"listViews"},"triggers":{"grain_highlight_created":"highlightCreated","grain_highlight_updated":"highlightUpdated","grain_item_added":"itemAdded","grain_item_updated":"itemUpdated","grain_recording_created":"recordingCreated","grain_recording_updated":"recordingUpdated","grain_story_created":"storyCreated","grain_webhook":"webhook"}},"grain_v2":{"namespace":"legacy.grainV2","methods":{"grain_create_hook_v2":"createWebhook","grain_delete_hook_v2":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks_v2":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams"},"triggers":{"grain_all_events_v2":"allEvents","grain_highlight_added_v2":"highlightAdded","grain_highlight_deleted_v2":"highlightDeleted","grain_highlight_updated_v2":"highlightUpdated","grain_recording_added_v2":"recordingAdded","grain_recording_deleted_v2":"recordingDeleted","grain_recording_updated_v2":"recordingUpdated","grain_story_added_v2":"storyAdded","grain_story_deleted_v2":"storyDeleted","grain_story_updated_v2":"storyUpdated","grain_upload_status_v2":"uploadStatus"}},"grain_v3":{"namespace":"grain","methods":{"grain_create_hook_v2":"createWebhook","grain_delete_hook_v2":"deleteWebhook","grain_get_recording":"getRecording","grain_get_transcript":"getTranscript","grain_list_hooks_v2":"listWebhooks","grain_list_meeting_types":"listMeetingTypes","grain_list_recordings":"listRecordings","grain_list_teams":"listTeams"},"triggers":{"grain_all_events_v2":"allEvents","grain_highlight_added_v2":"highlightAdded","grain_highlight_deleted_v2":"highlightDeleted","grain_highlight_updated_v2":"highlightUpdated","grain_recording_added_v2":"recordingAdded","grain_recording_deleted_v2":"recordingDeleted","grain_recording_updated_v2":"recordingUpdated","grain_story_added_v2":"storyAdded","grain_story_deleted_v2":"storyDeleted","grain_story_updated_v2":"storyUpdated","grain_upload_status_v2":"uploadStatus"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"granola":{"namespace":"legacy.granola","methods":{"create_webhook_endpoint":"createWebhookEndpoint","delete_webhook_endpoint":"deleteWebhookEndpoint","get_note":"getNote","get_transcript":"getTranscript","list_audit_events":"listAuditEvents","list_folders":"listFolders","list_notes":"listNotes","list_webhook_endpoints":"listWebhookEndpoints","update_webhook_endpoint":"updateWebhookEndpoint"},"triggers":{"granola_note_access_granted":"noteAccessGranted","granola_note_edited":"noteEdited","granola_note_generated":"noteGenerated","granola_webhook":"webhook"}},"granola_v2":{"namespace":"granola","methods":{"create_webhook_endpoint":"createWebhookEndpoint","delete_webhook_endpoint":"deleteWebhookEndpoint","get_note":"getNote","get_transcript":"getTranscript","list_audit_events":"listAuditEvents","list_folders":"listFolders","list_notes":"listNotes","list_webhook_endpoints":"listWebhookEndpoints","update_webhook_endpoint":"updateWebhookEndpoint"},"triggers":{"granola_note_access_granted":"noteAccessGranted","granola_note_edited":"noteEdited","granola_note_generated":"noteGenerated","granola_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"greenhouse":{"namespace":"legacy.greenhouse","methods":{"greenhouse_get_application":"getApplication","greenhouse_get_candidate":"getCandidate","greenhouse_get_job":"getJob","greenhouse_get_user":"getUser","greenhouse_list_applications":"listApplications","greenhouse_list_candidates":"listCandidates","greenhouse_list_departments":"listDepartments","greenhouse_list_job_stages":"listJobStages","greenhouse_list_jobs":"listJobs","greenhouse_list_offices":"listOffices","greenhouse_list_users":"listUsers"},"triggers":{"greenhouse_candidate_hired":"candidateHired","greenhouse_candidate_rejected":"candidateRejected","greenhouse_candidate_stage_change":"candidateStageChange","greenhouse_job_created":"jobCreated","greenhouse_job_updated":"jobUpdated","greenhouse_new_application":"newApplication","greenhouse_offer_created":"offerCreated","greenhouse_webhook":"webhook"}},"greenhouse_v2":{"namespace":"greenhouse","methods":{"apply_candidate_tag":"applyCandidateTag","convert_prospect":"convertProspect","create_application":"createApplication","create_attachment":"createAttachment","create_candidate":"createCandidate","create_candidate_tag":"createCandidateTag","create_note":"createNote","delete_application":"deleteApplication","delete_attachment":"deleteAttachment","delete_candidate":"deleteCandidate","get_application":"getApplication","get_candidate":"getCandidate","get_job":"getJob","get_user":"getUser","hire_application":"hireApplication","list_application_stages":"listApplicationStages","list_applications":"listApplications","list_applied_candidate_tags":"listAppliedCandidateTags","list_attachments":"listAttachments","list_candidate_educations":"listCandidateEducations","list_candidate_employments":"listCandidateEmployments","list_candidate_tags":"listCandidateTags","list_candidates":"listCandidates","list_close_reasons":"listCloseReasons","list_custom_field_options":"listCustomFieldOptions","list_custom_fields":"listCustomFields","list_departments":"listDepartments","list_email_templates":"listEmailTemplates","list_interviews":"listInterviews","list_job_hiring_managers":"listJobHiringManagers","list_job_interview_stages":"listJobInterviewStages","list_job_owners":"listJobOwners","list_jobs":"listJobs","list_notes":"listNotes","list_offers":"listOffers","list_offices":"listOffices","list_openings":"listOpenings","list_prospect_pool_stages":"listProspectPoolStages","list_prospect_pools":"listProspectPools","list_referrers":"listReferrers","list_rejection_reasons":"listRejectionReasons","list_scorecards":"listScorecards","list_sources":"listSources","list_users":"listUsers","move_application":"moveApplication","reject_application":"rejectApplication","remove_candidate_tag":"removeCandidateTag","unreject_application":"unrejectApplication","update_application":"updateApplication","update_candidate":"updateCandidate"},"triggers":{"greenhouse_candidate_hired":"candidateHired","greenhouse_candidate_rejected":"candidateRejected","greenhouse_candidate_stage_change":"candidateStageChange","greenhouse_job_created":"jobCreated","greenhouse_job_updated":"jobUpdated","greenhouse_new_application":"newApplication","greenhouse_offer_created":"offerCreated","greenhouse_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"greptile":{"namespace":"greptile","methods":{"greptile_index_repo":"indexRepository","greptile_query":"query","greptile_status":"checkStatus"}},"guardrails":{"namespace":"guardrails"},"harmonic":{"namespace":"harmonic","methods":{"harmonic_batch_get_people":"batchGetPeople","harmonic_clear_people_saved_search_net_new_results":"clearPeopleSavedSearchNetNewResults","harmonic_enrich_person":"enrichPerson","harmonic_get_company_employees":"getCompanyEmployees","harmonic_get_email_enrichment_job":"getEmailEnrichmentJob","harmonic_get_email_enrichment_usage":"getEmailEnrichmentUsage","harmonic_get_enrichment_status":"getEnrichmentStatus","harmonic_get_people_saved_search_net_new_results":"getPeopleSavedSearchNetNewResults","harmonic_get_people_saved_search_results":"getPeopleSavedSearchResults","harmonic_get_person":"getPerson","harmonic_list_people_saved_searches":"listPeopleSavedSearches","harmonic_search_people_scout":"searchPeopleWithScout","harmonic_submit_email_enrichment_job":"submitEmailEnrichmentJob"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"helpscout":{"namespace":"helpscout","methods":{"assign_conversation":"assignConversation","create_conversation":"createConversation","create_customer":"createCustomer","create_customer_thread":"addCustomerMessage","create_note":"addNote","create_reply":"replyToConversation","delete_conversation":"deleteConversation","get_conversation":"getConversation","get_current_user":"getCurrentUser","get_customer":"getCustomer","get_organization":"getOrganization","get_saved_reply":"getSavedReply","list_conversations":"listConversations","list_custom_fields":"listCustomFields","list_customer_properties":"listCustomerProperties","list_customers":"listCustomers","list_folders":"listFolders","list_mailboxes":"listInboxes","list_organizations":"listOrganizations","list_saved_replies":"listSavedReplies","list_tags":"listTags","list_teams":"listTeams","list_threads":"listThreads","list_users":"listUsers","list_workflows":"listWorkflows","move_conversation":"moveConversation","run_workflow":"runWorkflow","set_conversation_tags":"setConversationTags","snooze_conversation":"snoozeConversation","unassign_conversation":"unassignConversation","unsnooze_conversation":"unsnoozeConversation","update_conversation_customer":"changeConversationCustomer","update_conversation_status":"updateConversationStatus","update_conversation_subject":"updateConversationSubject","update_custom_fields":"updateCustomFields","update_customer":"updateCustomer","update_customer_properties":"updateCustomerProperties"},"triggers":{"helpscout_agent_replied":"agentReplied","helpscout_conversation_assigned":"conversationAssigned","helpscout_conversation_created":"conversationCreated","helpscout_conversation_deleted":"conversationDeleted","helpscout_conversation_merged":"conversationMerged","helpscout_conversation_moved":"conversationMoved","helpscout_conversation_status_changed":"conversationStatusChanged","helpscout_conversation_tags_updated":"conversationTagsUpdated","helpscout_customer_created":"customerCreated","helpscout_customer_replied":"customerReplied","helpscout_customer_updated":"customerUpdated","helpscout_note_created":"noteCreated","helpscout_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"hex":{"namespace":"legacy.hex","methods":{"cancel_run":"cancelRun","create_collection":"createCollection","create_group":"createGroup","deactivate_user":"deactivateUser","delete_group":"deleteGroup","get_collection":"getCollection","get_data_connection":"getDataConnection","get_group":"getGroup","get_project":"getProject","get_project_runs":"getProjectRuns","get_queried_tables":"getQueriedTables","get_run_status":"getRunStatus","list_collections":"listCollections","list_data_connections":"listDataConnections","list_groups":"listGroups","list_projects":"listProjects","list_users":"listUsers","run_project":"runProject","update_collection":"updateCollection","update_group":"updateGroup","update_project":"updateProject"}},"hex_v2":{"namespace":"hex","methods":{"cancel_run":"cancelRun","create_collection":"createCollection","create_group":"createGroup","deactivate_user":"deactivateUser","delete_group":"deleteGroup","get_collection":"getCollection","get_data_connection":"getDataConnection","get_group":"getGroup","get_project":"getProject","get_project_runs":"getProjectRuns","get_queried_tables":"getQueriedTables","get_run_status":"getRunStatus","list_collections":"listCollections","list_data_connections":"listDataConnections","list_groups":"listGroups","list_projects":"listProjects","list_users":"listUsers","run_project":"runProject","update_collection":"updateCollection","update_group":"updateGroup","update_project":"updateProject"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"higgsfield":{"namespace":"higgsfield","methods":{"higgsfield_cancel_request":"cancelRequest","higgsfield_create_character":"createCharacter","higgsfield_delete_character":"deleteCharacter","higgsfield_delete_request":"deleteRequest","higgsfield_generate":"generateAnyModel","higgsfield_generate_soul_image":"generateSoulImage","higgsfield_get_character":"getCharacter","higgsfield_get_request_status":"getRequestStatus","higgsfield_list_characters":"listCharacters"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"hubspot":{"namespace":"hubspot","methods":{"add_list_memberships":"addListMembers","create_appointment":"createAppointment","create_association":"createAssociation","create_company":"createCompany","create_contact":"createContact","create_deal":"createDeal","create_email":"createEmail","create_line_item":"createLineItem","create_list":"createList","create_note":"createNote","create_ticket":"createTicket","delete_association":"deleteAssociation","delete_company":"deleteCompany","delete_contact":"deleteContact","delete_deal":"deleteDeal","delete_line_item":"deleteLineItem","delete_ticket":"deleteTicket","get_appointments":"getAppointments","get_association_labels":"getAssociationLabels","get_carts":"getCarts","get_companies":"getCompanies","get_contacts":"getContacts","get_deals":"getDeals","get_emails":"getEmails","get_line_items":"getLineItems","get_list_memberships":"getListMembers","get_lists":"getLists","get_marketing_events":"getMarketingEvents","get_notes":"getNotes","get_properties":"getProperties","get_quotes":"getQuotes","get_tickets":"getTickets","get_users":"getUsers","list_associations":"listAssociations","list_owners":"listOwners","remove_list_memberships":"removeListMembers","search_companies":"searchCompanies","search_contacts":"searchContacts","search_deals":"searchDeals","search_emails":"searchEmails","search_line_items":"searchLineItems","search_notes":"searchNotes","search_quotes":"searchQuotes","search_tickets":"searchTickets","update_appointment":"updateAppointment","update_company":"updateCompany","update_contact":"updateContact","update_deal":"updateDeal","update_line_item":"updateLineItem","update_ticket":"updateTicket"},"triggers":{"hubspot_poller":"poller"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"huggingface":{"namespace":"legacy.huggingface"},"huggingface_v2":{"namespace":"huggingface","paramAliases":{"action":{"oauthCredential":"credential"}}},"human_in_the_loop":{"namespace":"legacy.humanInTheLoop"},"human_in_the_loop_v2":{"namespace":"human"},"hunter":{"namespace":"hunter","methods":{"hunter_companies_find":"findCompany","hunter_discover":"discoverCompanies","hunter_domain_search":"domainSearch","hunter_email_count":"emailCount","hunter_email_finder":"emailFinder","hunter_email_verifier":"emailVerifier"}},"iam":{"namespace":"legacy.iam","methods":{"add_user_to_group":"addUserToGroup","attach_role_policy":"attachRolePolicy","attach_user_policy":"attachUserPolicy","create_access_key":"createAccessKey","create_role":"createRole","create_user":"createUser","delete_access_key":"deleteAccessKey","delete_role":"deleteRole","delete_user":"deleteUser","detach_role_policy":"detachRolePolicy","detach_user_policy":"detachUserPolicy","get_policy":"getPolicy","get_role":"getRole","get_user":"getUser","list_access_keys":"listAccessKeys","list_attached_role_policies":"listAttachedRolePolicies","list_attached_user_policies":"listAttachedUserPolicies","list_groups":"listGroups","list_policies":"listPolicies","list_roles":"listRoles","list_users":"listUsers","remove_user_from_group":"removeUserFromGroup","simulate_principal_policy":"simulatePrincipalPolicy","update_access_key":"updateAccessKey"}},"iam_v2":{"namespace":"iam","methods":{"add_user_to_group":"addUserToGroup","attach_role_policy":"attachRolePolicy","attach_user_policy":"attachUserPolicy","create_access_key":"createAccessKey","create_role":"createRole","create_user":"createUser","delete_access_key":"deleteAccessKey","delete_role":"deleteRole","delete_user":"deleteUser","detach_role_policy":"detachRolePolicy","detach_user_policy":"detachUserPolicy","get_policy":"getPolicy","get_role":"getRole","get_user":"getUser","list_access_keys":"listAccessKeys","list_attached_role_policies":"listAttachedRolePolicies","list_attached_user_policies":"listAttachedUserPolicies","list_groups":"listGroups","list_policies":"listPolicies","list_roles":"listRoles","list_users":"listUsers","remove_user_from_group":"removeUserFromGroup","simulate_principal_policy":"simulatePrincipalPolicy","update_access_key":"updateAccessKey"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"icypeas":{"namespace":"icypeas","methods":{"icypeas_find_email":"findEmail","icypeas_verify_email":"verifyEmail"}},"identity_center":{"namespace":"legacy.identityCenter","methods":{"check_assignment_deletion_status":"checkAssignmentDeletionStatus","check_assignment_status":"checkAssignmentStatus","create_account_assignment":"createAccountAssignment","delete_account_assignment":"deleteAccountAssignment","describe_account":"describeAccount","describe_group":"describeGroup","describe_user":"describeUser","get_group":"getGroup","get_user":"getUser","list_account_assignments":"listAccountAssignmentsForPrincipal","list_accounts":"listAccounts","list_assignments_for_account":"listAssignmentsForAccount","list_group_memberships":"listGroupMemberships","list_groups":"listGroups","list_instances":"listInstances","list_permission_sets":"listPermissionSets"}},"identity_center_v2":{"namespace":"identityCenter","methods":{"check_assignment_deletion_status":"checkAssignmentDeletionStatus","check_assignment_status":"checkAssignmentStatus","create_account_assignment":"createAccountAssignment","delete_account_assignment":"deleteAccountAssignment","describe_account":"describeAccount","describe_group":"describeGroup","describe_user":"describeUser","get_group":"getGroup","get_user":"getUser","list_account_assignments":"listAccountAssignmentsForPrincipal","list_accounts":"listAccounts","list_assignments_for_account":"listAssignmentsForAccount","list_group_memberships":"listGroupMemberships","list_groups":"listGroups","list_instances":"listInstances","list_permission_sets":"listPermissionSets"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"image_generator":{"namespace":"legacy.imageGenerator"},"image_generator_v2":{"namespace":"imageGenerator"},"imap":{"namespace":"trigger.imap"},"incidentio":{"namespace":"legacy.incidentio","methods":{"incidentio_actions_create":"createAction","incidentio_actions_list":"listActions","incidentio_actions_show":"showAction","incidentio_actions_update":"updateAction","incidentio_alert_events_create":"createAlertEvent","incidentio_alerts_list":"listAlerts","incidentio_alerts_resolve":"resolveAlert","incidentio_alerts_show":"showAlert","incidentio_catalog_entries_list":"listCatalogEntries","incidentio_catalog_types_list":"listCatalogTypes","incidentio_custom_fields_create":"createCustomField","incidentio_custom_fields_delete":"deleteCustomField","incidentio_custom_fields_list":"listCustomFields","incidentio_custom_fields_show":"showCustomField","incidentio_custom_fields_update":"updateCustomField","incidentio_escalation_paths_create":"createEscalationPath","incidentio_escalation_paths_delete":"deleteEscalationPath","incidentio_escalation_paths_list":"listEscalationPaths","incidentio_escalation_paths_show":"showEscalationPath","incidentio_escalation_paths_update":"updateEscalationPath","incidentio_escalations_cancel":"cancelEscalation","incidentio_escalations_create":"createEscalation","incidentio_escalations_list":"listEscalations","incidentio_escalations_show":"showEscalation","incidentio_follow_ups_create":"createFollowUp","incidentio_follow_ups_list":"listFollowUps","incidentio_follow_ups_show":"showFollowUp","incidentio_follow_ups_update":"updateFollowUp","incidentio_incident_alerts_list":"listIncidentAlerts","incidentio_incident_memberships_create":"grantIncidentMembership","incidentio_incident_memberships_revoke":"revokeIncidentMembership","incidentio_incident_participants_list":"listIncidentParticipants","incidentio_incident_roles_create":"createIncidentRole","incidentio_incident_roles_delete":"deleteIncidentRole","incidentio_incident_roles_list":"listIncidentRoles","incidentio_incident_roles_show":"showIncidentRole","incidentio_incident_roles_update":"updateIncidentRole","incidentio_incident_statuses_list":"listIncidentStatuses","incidentio_incident_timestamps_list":"listIncidentTimestamps","incidentio_incident_timestamps_show":"showIncidentTimestamp","incidentio_incident_types_list":"listIncidentTypes","incidentio_incident_updates_list":"listIncidentUpdates","incidentio_incidents_create":"createIncident","incidentio_incidents_list":"listIncidents","incidentio_incidents_show":"showIncident","incidentio_incidents_update":"updateIncident","incidentio_on_call_now":"getWhoIsOnCall","incidentio_schedule_entries_list":"listScheduleEntries","incidentio_schedule_overrides_create":"createScheduleOverride","incidentio_schedule_overrides_list":"listScheduleOverrides","incidentio_schedules_create":"createSchedule","incidentio_schedules_delete":"deleteSchedule","incidentio_schedules_list":"listSchedules","incidentio_schedules_show":"showSchedule","incidentio_schedules_update":"updateSchedule","incidentio_severities_list":"listSeverities","incidentio_teams_list":"listTeams","incidentio_teams_show":"showTeam","incidentio_users_list":"listUsers","incidentio_users_show":"showUser","incidentio_workflows_create":"createWorkflow","incidentio_workflows_delete":"deleteWorkflow","incidentio_workflows_list":"listWorkflows","incidentio_workflows_show":"showWorkflow","incidentio_workflows_update":"updateWorkflow"},"triggers":{"incidentio_alert_created":"alertCreated","incidentio_incident_created":"incidentCreated","incidentio_incident_status_updated":"incidentStatusUpdated","incidentio_incident_updated":"incidentUpdated"}},"incidentio_v2":{"namespace":"incidentio","methods":{"incidentio_actions_create":"createAction","incidentio_actions_list":"listActions","incidentio_actions_show":"showAction","incidentio_actions_update":"updateAction","incidentio_alert_events_create":"createAlertEvent","incidentio_alerts_list":"listAlerts","incidentio_alerts_resolve":"resolveAlert","incidentio_alerts_show":"showAlert","incidentio_catalog_entries_list":"listCatalogEntries","incidentio_catalog_types_list":"listCatalogTypes","incidentio_custom_fields_create":"createCustomField","incidentio_custom_fields_delete":"deleteCustomField","incidentio_custom_fields_list":"listCustomFields","incidentio_custom_fields_show":"showCustomField","incidentio_custom_fields_update":"updateCustomField","incidentio_escalation_paths_create":"createEscalationPath","incidentio_escalation_paths_delete":"deleteEscalationPath","incidentio_escalation_paths_list":"listEscalationPaths","incidentio_escalation_paths_show":"showEscalationPath","incidentio_escalation_paths_update":"updateEscalationPath","incidentio_escalations_cancel":"cancelEscalation","incidentio_escalations_create":"createEscalation","incidentio_escalations_list":"listEscalations","incidentio_escalations_show":"showEscalation","incidentio_follow_ups_create":"createFollowUp","incidentio_follow_ups_list":"listFollowUps","incidentio_follow_ups_show":"showFollowUp","incidentio_follow_ups_update":"updateFollowUp","incidentio_incident_alerts_list":"listIncidentAlerts","incidentio_incident_memberships_create":"grantIncidentMembership","incidentio_incident_memberships_revoke":"revokeIncidentMembership","incidentio_incident_participants_list":"listIncidentParticipants","incidentio_incident_roles_create":"createIncidentRole","incidentio_incident_roles_delete":"deleteIncidentRole","incidentio_incident_roles_list":"listIncidentRoles","incidentio_incident_roles_show":"showIncidentRole","incidentio_incident_roles_update":"updateIncidentRole","incidentio_incident_statuses_list":"listIncidentStatuses","incidentio_incident_timestamps_list":"listIncidentTimestamps","incidentio_incident_timestamps_show":"showIncidentTimestamp","incidentio_incident_types_list":"listIncidentTypes","incidentio_incident_updates_list":"listIncidentUpdates","incidentio_incidents_create":"createIncident","incidentio_incidents_list":"listIncidents","incidentio_incidents_show":"showIncident","incidentio_incidents_update":"updateIncident","incidentio_on_call_now":"getWhoIsOnCall","incidentio_schedule_entries_list":"listScheduleEntries","incidentio_schedule_overrides_create":"createScheduleOverride","incidentio_schedule_overrides_list":"listScheduleOverrides","incidentio_schedules_create":"createSchedule","incidentio_schedules_delete":"deleteSchedule","incidentio_schedules_list":"listSchedules","incidentio_schedules_show":"showSchedule","incidentio_schedules_update":"updateSchedule","incidentio_severities_list":"listSeverities","incidentio_teams_list":"listTeams","incidentio_teams_show":"showTeam","incidentio_users_list":"listUsers","incidentio_users_show":"showUser","incidentio_workflows_create":"createWorkflow","incidentio_workflows_delete":"deleteWorkflow","incidentio_workflows_list":"listWorkflows","incidentio_workflows_show":"showWorkflow","incidentio_workflows_update":"updateWorkflow"},"triggers":{"incidentio_alert_created":"alertCreated","incidentio_incident_created":"incidentCreated","incidentio_incident_status_updated":"incidentStatusUpdated","incidentio_incident_updated":"incidentUpdated"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"infisical":{"namespace":"legacy.infisical","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","get_secret":"getSecret","list_secrets":"listSecrets","update_secret":"updateSecret"}},"infisical_v2":{"namespace":"infisical","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","get_secret":"getSecret","list_secrets":"listSecrets","update_secret":"updateSecret"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"input_trigger":{"namespace":"legacy.inputTrigger"},"instagram":{"namespace":"legacy.instagram","methods":{"instagram_delete_comment":"deleteComment","instagram_download_media":"downloadMedia","instagram_get_account_insights":"getAccountInsights","instagram_get_container_status":"getContainerStatus","instagram_get_conversation_messages":"getConversationMessages","instagram_get_media":"getMedia","instagram_get_media_insights":"getMediaInsights","instagram_get_message":"getMessage","instagram_get_profile":"getProfile","instagram_get_publishing_limit":"getPublishingLimit","instagram_hide_comment":"hideComment","instagram_list_comments":"listComments","instagram_list_conversations":"listConversations","instagram_list_media":"listMedia","instagram_list_stories":"listStories","instagram_private_reply":"privateReply","instagram_publish_carousel":"publishCarousel","instagram_publish_image":"publishImage","instagram_publish_reel":"publishReel","instagram_publish_story":"publishStory","instagram_publish_video":"publishVideo","instagram_reply_to_comment":"replyToComment","instagram_send_text_message":"sendTextMessage","instagram_set_comments_enabled":"setCommentsEnabled"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"instantly":{"namespace":"legacy.instantly","methods":{"activate_campaign":"activateCampaign","create_campaign":"createCampaign","create_lead":"createLead","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_leads":"deleteLeads","get_lead":"getLead","list_campaigns":"listCampaigns","list_emails":"listEmails","list_lead_lists":"listLeadLists","list_leads":"listLeads","patch_campaign":"patchCampaign","patch_lead":"patchLead","pause_campaign":"pauseCampaign","reply_to_email":"replyToEmail","update_lead_interest_status":"updateLeadInterestStatus"},"triggers":{"instantly_account_error":"accountError","instantly_auto_reply_received":"autoReplyReceived","instantly_campaign_completed":"campaignCompleted","instantly_email_bounced":"emailBounced","instantly_email_opened":"emailOpened","instantly_email_sent":"emailSent","instantly_lead_closed":"leadClosed","instantly_lead_interested":"leadInterested","instantly_lead_meeting_booked":"leadMeetingBooked","instantly_lead_meeting_completed":"leadMeetingCompleted","instantly_lead_neutral":"leadNeutral","instantly_lead_no_show":"leadNoShow","instantly_lead_not_interested":"leadNotInterested","instantly_lead_out_of_office":"leadOutOfOffice","instantly_lead_unsubscribed":"leadUnsubscribed","instantly_lead_wrong_person":"leadWrongPerson","instantly_link_clicked":"linkClicked","instantly_reply_received":"replyReceived","instantly_supersearch_enrichment_completed":"supersearchEnrichmentCompleted","instantly_webhook":"webhook"}},"instantly_v2":{"namespace":"instantly","methods":{"activate_campaign":"activateCampaign","create_campaign":"createCampaign","create_lead":"createLead","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_leads":"deleteLeads","get_lead":"getLead","list_campaigns":"listCampaigns","list_emails":"listEmails","list_lead_lists":"listLeadLists","list_leads":"listLeads","patch_campaign":"patchCampaign","patch_lead":"patchLead","pause_campaign":"pauseCampaign","reply_to_email":"replyToEmail","update_lead_interest_status":"updateLeadInterestStatus"},"triggers":{"instantly_account_error":"accountError","instantly_auto_reply_received":"autoReplyReceived","instantly_campaign_completed":"campaignCompleted","instantly_email_bounced":"emailBounced","instantly_email_opened":"emailOpened","instantly_email_sent":"emailSent","instantly_lead_closed":"leadClosed","instantly_lead_interested":"leadInterested","instantly_lead_meeting_booked":"leadMeetingBooked","instantly_lead_meeting_completed":"leadMeetingCompleted","instantly_lead_neutral":"leadNeutral","instantly_lead_no_show":"leadNoShow","instantly_lead_not_interested":"leadNotInterested","instantly_lead_out_of_office":"leadOutOfOffice","instantly_lead_unsubscribed":"leadUnsubscribed","instantly_lead_wrong_person":"leadWrongPerson","instantly_link_clicked":"linkClicked","instantly_reply_received":"replyReceived","instantly_supersearch_enrichment_completed":"supersearchEnrichmentCompleted","instantly_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"intercom":{"namespace":"legacy.intercom","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"}},"intercom_v2":{"namespace":"legacy.intercomV2","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"intercom_contact_created":"contactCreated","intercom_conversation_closed":"conversationClosed","intercom_conversation_created":"conversationCreated","intercom_conversation_reply":"conversationReply","intercom_user_created":"userCreated","intercom_webhook":"webhook"}},"intercom_v3":{"namespace":"intercom","methods":{"assign_conversation":"assignConversation","attach_contact_to_company":"attachContactToCompany","close_conversation":"closeConversation","create_company":"createCompany","create_contact":"createContact","create_event":"createEvent","create_message":"createMessage","create_note":"createNote","create_tag":"createTag","create_ticket":"createTicket","delete_contact":"deleteContact","detach_contact_from_company":"detachContactFromCompany","get_company":"getCompany","get_contact":"getContact","get_conversation":"getConversation","get_ticket":"getTicket","list_admins":"listAdmins","list_companies":"listCompanies","list_contacts":"listContacts","list_conversations":"listConversations","list_tags":"listTags","open_conversation":"openConversation","reply_conversation":"replyToConversation","search_contacts":"searchContacts","search_conversations":"searchConversations","snooze_conversation":"snoozeConversation","tag_contact":"tagContact","tag_conversation":"tagConversation","untag_contact":"untagContact","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"intercom_contact_created":"contactCreated","intercom_conversation_closed":"conversationClosed","intercom_conversation_created":"conversationCreated","intercom_conversation_reply":"conversationReply","intercom_user_created":"userCreated","intercom_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"intune":{"namespace":"intune","methods":{"intune_get_compliance_policy":"getCompliancePolicy","intune_get_detected_app":"getDetectedApp","intune_get_device":"getDevice","intune_get_device_configuration":"getDeviceConfiguration","intune_list_app_devices":"listAppDevices","intune_list_compliance_policies":"listCompliancePolicies","intune_list_compliance_policy_device_statuses":"listCompliancePolicyDeviceStatuses","intune_list_detected_apps":"listDetectedApps","intune_list_device_configurations":"listDeviceConfigurations","intune_list_devices":"listDevices","intune_reboot_device":"rebootDevice","intune_remote_lock_device":"remoteLockDevice","intune_retire_device":"retireDevice","intune_sync_device":"syncDevice"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"jama":{"namespace":"jama","methods":{"create_comment":"createComment","create_item":"createItem","create_relationship":"createRelationship","delete_item":"deleteItem","delete_relationship":"deleteRelationship","get_baseline":"getBaseline","get_current_user":"getCurrentUser","get_filter":"getFilter","get_item":"getItem","get_item_type":"getItemType","get_item_version":"getItemVersion","get_project":"getProject","get_relationship":"getRelationship","get_test_cycle":"getTestCycle","get_test_plan":"getTestPlan","get_test_run":"getTestRun","list_baseline_items":"listBaselineItems","list_baselines":"listBaselines","list_downstream_items":"listDownstreamItems","list_filter_results":"listFilterResults","list_filters":"listFilters","list_item_children":"listItemChildren","list_item_comments":"listItemComments","list_item_types":"listItemTypes","list_item_versions":"listItemVersions","list_items":"listItems","list_pick_list_options":"listPickListOptions","list_pick_lists":"listPickLists","list_projects":"listProjects","list_relationship_types":"listRelationshipTypes","list_relationships":"listRelationships","list_releases":"listReleases","list_tags":"listTags","list_test_cycles":"listTestCycles","list_test_plans":"listTestPlans","list_test_runs":"listTestRuns","list_upstream_items":"listUpstreamItems","search_items":"searchItems","update_item":"updateItem","update_test_run":"updateTestRun"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"jina":{"namespace":"jina","methods":{"jina_read_url":"readUrl","jina_search":"search"}},"jira":{"namespace":"jira","methods":{"add_attachment":"addAttachment","add_comment":"addComment","add_watcher":"addWatcher","add_worklog":"addWorklog","assign":"assignIssue","create_link":"createIssueLink","create_sprint":"createSprint","delete":"deleteIssue","delete_attachment":"deleteAttachment","delete_comment":"deleteComment","delete_link":"deleteIssueLink","delete_worklog":"deleteWorklog","get_attachments":"getAttachments","get_comments":"getComments","get_fields":"getFields","get_project":"getProject","get_transitions":"getTransitions","get_users":"getUsers","get_worklogs":"getWorklogs","list_issue_types":"listIssueTypes","list_projects":"listProjects","read":"readIssue","read-bulk":"readBulkIssues","remove_watcher":"removeWatcher","search":"searchIssues","search_users":"searchUsers","transition":"transitionIssue","update":"updateIssue","update_comment":"updateComment","update_worklog":"updateWorklog","write":"writeIssue"},"triggers":{"jira_comment_deleted":"commentDeleted","jira_comment_updated":"commentUpdated","jira_issue_commented":"issueCommented","jira_issue_created":"issueCreated","jira_issue_deleted":"issueDeleted","jira_issue_updated":"issueUpdated","jira_project_created":"projectCreated","jira_sprint_closed":"sprintClosed","jira_sprint_created":"sprintCreated","jira_sprint_started":"sprintStarted","jira_version_released":"versionReleased","jira_webhook":"webhook","jira_worklog_created":"worklogCreated","jira_worklog_deleted":"worklogDeleted","jira_worklog_updated":"worklogUpdated"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"jira_service_management":{"namespace":"jiraServiceManagement","methods":{"add_comment":"addComment","add_customer":"addCustomer","add_organization":"addOrganization","add_participants":"addParticipants","answer_approval":"answerApproval","attach_form":"attachForm","copy_forms":"copyForms","create_object":"createAssetObject","create_organization":"createOrganization","create_request":"createRequest","delete_form":"deleteForm","delete_object":"deleteAssetObject","externalise_form":"externaliseForm","get_approvals":"getApprovals","get_comments":"getComments","get_customers":"getCustomers","get_form":"getForm","get_form_answers":"getFormAnswers","get_form_structure":"getFormStructure","get_form_templates":"getFormTemplates","get_issue_forms":"getIssueForms","get_object":"getAssetObject","get_object_schema":"getAssetSchema","get_object_type_attributes":"getAssetObjectTypeAttributes","get_organizations":"getOrganizations","get_participants":"getParticipants","get_queues":"getQueues","get_request":"getRequest","get_request_type_fields":"getRequestTypeFields","get_request_types":"getRequestTypes","get_requests":"getRequests","get_service_desks":"getServiceDesks","get_sla":"getSla","get_transitions":"getTransitions","internalise_form":"internaliseForm","list_object_schemas":"listAssetSchemas","list_object_types":"listAssetObjectTypes","reopen_form":"reopenForm","save_form_answers":"saveFormAnswers","search_objects_aql":"searchAssetsAql","submit_form":"submitForm","transition_request":"transitionRequest","update_object":"updateAssetObject"},"triggers":{"jsm_request_commented":"requestCommented","jsm_request_created":"requestCreated","jsm_request_resolved":"requestResolved","jsm_request_updated":"requestUpdated","jsm_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"jotform":{"namespace":"legacy.jotform","methods":{"add_label_resources":"addLabelResources","clone_form":"cloneForm","create_form":"createForm","create_label":"createLabel","create_question":"createQuestion","create_questions":"createQuestions","create_report":"createReport","create_submission":"createSubmission","create_submissions":"createSubmissions","create_webhook":"createWebhook","delete_form":"deleteForm","delete_label":"deleteLabel","delete_question":"deleteQuestion","delete_report":"deleteReport","delete_submission":"deleteSubmission","delete_webhook":"deleteWebhook","get_form":"getForm","get_form_properties":"getFormProperties","get_history":"getHistory","get_label":"getLabel","get_question":"getQuestion","get_report":"getReport","get_settings":"getSettings","get_submission":"getSubmission","get_usage":"getUsage","get_user":"getAccount","list_form_files":"listFormFiles","list_form_reports":"listFormReports","list_form_submissions":"listFormSubmissions","list_forms":"listForms","list_label_resources":"listLabelResources","list_labels":"listLabels","list_questions":"listQuestions","list_reports":"listReports","list_submissions":"listSubmissions","list_subusers":"listSubUsers","list_webhooks":"listWebhooks","remove_label_resources":"removeLabelResources","update_form_properties":"updateFormProperties","update_label":"updateLabel","update_question":"updateQuestion","update_settings":"updateSettings","update_submission":"updateSubmission"},"triggers":{"jotform_webhook":"webhook"}},"jotform_v2":{"namespace":"jotform","methods":{"add_label_resources":"addLabelResources","clone_form":"cloneForm","create_form":"createForm","create_label":"createLabel","create_question":"createQuestion","create_questions":"createQuestions","create_report":"createReport","create_submission":"createSubmission","create_submissions":"createSubmissions","create_webhook":"createWebhook","delete_form":"deleteForm","delete_label":"deleteLabel","delete_question":"deleteQuestion","delete_report":"deleteReport","delete_submission":"deleteSubmission","delete_webhook":"deleteWebhook","get_form":"getForm","get_form_properties":"getFormProperties","get_history":"getHistory","get_label":"getLabel","get_question":"getQuestion","get_report":"getReport","get_settings":"getSettings","get_submission":"getSubmission","get_usage":"getUsage","get_user":"getAccount","list_form_files":"listFormFiles","list_form_reports":"listFormReports","list_form_submissions":"listFormSubmissions","list_forms":"listForms","list_label_resources":"listLabelResources","list_labels":"listLabels","list_questions":"listQuestions","list_reports":"listReports","list_submissions":"listSubmissions","list_subusers":"listSubUsers","list_webhooks":"listWebhooks","remove_label_resources":"removeLabelResources","update_form_properties":"updateFormProperties","update_label":"updateLabel","update_question":"updateQuestion","update_settings":"updateSettings","update_submission":"updateSubmission"},"triggers":{"jotform_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"jupyter":{"namespace":"legacy.jupyter","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"}},"jupyter_v2":{"namespace":"legacy.jupyterV2","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"}},"jupyter_v3":{"namespace":"jupyter","methods":{"jupyter_copy_content":"copyContent","jupyter_create_file":"createFile","jupyter_create_session":"createSession","jupyter_delete_content":"deleteContent","jupyter_delete_session":"deleteSession","jupyter_get_content":"getContent","jupyter_interrupt_kernel":"interruptKernel","jupyter_list_contents":"listContents","jupyter_list_kernels":"listKernels","jupyter_list_kernelspecs":"listKernelSpecs","jupyter_list_sessions":"listSessions","jupyter_rename_content":"renameContent","jupyter_restart_kernel":"restartKernel","jupyter_start_kernel":"startKernel","jupyter_stop_kernel":"stopKernel","jupyter_upload_file":"uploadFile"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"kalshi":{"namespace":"legacy.kalshi","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"}},"kalshi_v2":{"namespace":"legacy.kalshiV2","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"}},"kalshi_v3":{"namespace":"kalshi","methods":{"amend_order":"amendOrder","cancel_order":"cancelOrder","create_order":"createOrder","get_balance":"getBalance","get_candlesticks":"getCandlesticks","get_event":"getEvent","get_event_candlesticks":"getEventCandlesticks","get_events":"getEvents","get_exchange_announcements":"getExchangeAnnouncements","get_exchange_schedule":"getExchangeSchedule","get_exchange_status":"getExchangeStatus","get_fills":"getFills","get_market":"getMarket","get_markets":"getMarkets","get_order":"getOrder","get_orderbook":"getOrderbook","get_orders":"getOrders","get_positions":"getPositions","get_series_by_ticker":"getSeriesByTicker","get_series_list":"getSeriesList","get_settlements":"getSettlements","get_trades":"getTrades"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"ketch":{"namespace":"ketch","methods":{"get_consent":"getConsent","get_subscriptions":"getSubscriptions","invoke_right":"invokeRight","set_consent":"setConsent","set_subscriptions":"setSubscriptions"}},"knowledge":{"namespace":"knowledge","methods":{"create_document":"createDocument","delete_chunk":"deleteChunk","delete_document":"deleteDocument","get_connector":"getConnector","get_document":"getDocument","list_chunks":"listChunks","list_connectors":"listConnectors","list_documents":"listDocuments","list_tags":"listTags","search":"search","trigger_sync":"triggerSync","update_chunk":"updateChunk","upload_chunk":"uploadChunk","upsert_document":"upsertDocument"}},"lambda":{"namespace":"legacy.lambda","methods":{"add_permission":"addPermission","create_alias":"createAlias","create_event_source_mapping":"createEventSourceMapping","create_function":"createFunction","create_function_url_config":"createFunctionUrl","delete_alias":"deleteAlias","delete_event_source_mapping":"deleteEventSourceMapping","delete_function":"deleteFunction","delete_function_concurrency":"deleteFunctionConcurrency","delete_function_event_invoke_config":"deleteAsyncInvokeConfig","delete_function_url_config":"deleteFunctionUrl","delete_provisioned_concurrency_config":"deleteProvisionedConcurrency","get_account_settings":"getAccountSettings","get_alias":"getAlias","get_event_source_mapping":"getEventSourceMapping","get_function":"getFunction","get_function_concurrency":"getFunctionConcurrency","get_function_configuration":"getFunctionConfiguration","get_function_event_invoke_config":"getAsyncInvokeConfig","get_function_recursion_config":"getRecursionConfig","get_function_url_config":"getFunctionUrl","get_layer_version":"getLayerVersion","get_policy":"getPolicy","get_provisioned_concurrency_config":"getProvisionedConcurrency","get_runtime_management_config":"getRuntimeManagementConfig","invoke":"invokeFunction","list_aliases":"listAliases","list_event_source_mappings":"listEventSourceMappings","list_function_event_invoke_configs":"listAsyncInvokeConfigs","list_function_url_configs":"listFunctionUrls","list_functions":"listFunctions","list_layer_versions":"listLayerVersions","list_layers":"listLayers","list_provisioned_concurrency_configs":"listProvisionedConcurrency","list_tags":"listTags","list_versions_by_function":"listFunctionVersions","publish_version":"publishVersion","put_function_concurrency":"setFunctionConcurrency","put_function_event_invoke_config":"setAsyncInvokeConfig","put_function_recursion_config":"setRecursionConfig","put_provisioned_concurrency_config":"setProvisionedConcurrency","put_runtime_management_config":"setRuntimeManagementConfig","remove_permission":"removePermission","tag_resource":"tagResource","untag_resource":"untagResource","update_alias":"updateAlias","update_event_source_mapping":"updateEventSourceMapping","update_function_code":"updateFunctionCode","update_function_configuration":"updateFunctionConfiguration","update_function_url_config":"updateFunctionUrl"}},"lambda_v2":{"namespace":"lambda","methods":{"add_permission":"addPermission","create_alias":"createAlias","create_event_source_mapping":"createEventSourceMapping","create_function":"createFunction","create_function_url_config":"createFunctionUrl","delete_alias":"deleteAlias","delete_event_source_mapping":"deleteEventSourceMapping","delete_function":"deleteFunction","delete_function_concurrency":"deleteFunctionConcurrency","delete_function_event_invoke_config":"deleteAsyncInvokeConfig","delete_function_url_config":"deleteFunctionUrl","delete_provisioned_concurrency_config":"deleteProvisionedConcurrency","get_account_settings":"getAccountSettings","get_alias":"getAlias","get_event_source_mapping":"getEventSourceMapping","get_function":"getFunction","get_function_concurrency":"getFunctionConcurrency","get_function_configuration":"getFunctionConfiguration","get_function_event_invoke_config":"getAsyncInvokeConfig","get_function_recursion_config":"getRecursionConfig","get_function_url_config":"getFunctionUrl","get_layer_version":"getLayerVersion","get_policy":"getPolicy","get_provisioned_concurrency_config":"getProvisionedConcurrency","get_runtime_management_config":"getRuntimeManagementConfig","invoke":"invokeFunction","list_aliases":"listAliases","list_event_source_mappings":"listEventSourceMappings","list_function_event_invoke_configs":"listAsyncInvokeConfigs","list_function_url_configs":"listFunctionUrls","list_functions":"listFunctions","list_layer_versions":"listLayerVersions","list_layers":"listLayers","list_provisioned_concurrency_configs":"listProvisionedConcurrency","list_tags":"listTags","list_versions_by_function":"listFunctionVersions","publish_version":"publishVersion","put_function_concurrency":"setFunctionConcurrency","put_function_event_invoke_config":"setAsyncInvokeConfig","put_function_recursion_config":"setRecursionConfig","put_provisioned_concurrency_config":"setProvisionedConcurrency","put_runtime_management_config":"setRuntimeManagementConfig","remove_permission":"removePermission","tag_resource":"tagResource","untag_resource":"untagResource","update_alias":"updateAlias","update_event_source_mapping":"updateEventSourceMapping","update_function_code":"updateFunctionCode","update_function_configuration":"updateFunctionConfiguration","update_function_url_config":"updateFunctionUrl"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"langsmith":{"namespace":"legacy.langsmith","methods":{"langsmith_create_feedback":"createFeedback","langsmith_create_run":"createRun","langsmith_create_runs_batch":"createRunsBatch","langsmith_get_run":"getRun","langsmith_update_run":"updateRun"}},"langsmith_v2":{"namespace":"langsmith","methods":{"langsmith_create_feedback":"createFeedback","langsmith_create_run":"createRun","langsmith_create_runs_batch":"createRunsBatch","langsmith_get_run":"getRun","langsmith_update_run":"updateRun"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"latex":{"namespace":"latex","methods":{"latex_compile":"compileDocument","latex_get_package":"getPackageDetails","latex_list_fonts":"listFonts","latex_search_packages":"searchPackages"}},"launchdarkly":{"namespace":"legacy.launchdarkly","methods":{"create_flag":"createFlag","delete_flag":"deleteFlag","get_audit_log":"getAuditLog","get_flag":"getFlag","get_flag_status":"getFlagStatus","list_environments":"listEnvironments","list_flags":"listFlags","list_members":"listMembers","list_projects":"listProjects","list_segments":"listSegments","toggle_flag":"toggleFlag","update_flag":"updateFlag"}},"launchdarkly_v2":{"namespace":"launchdarkly","methods":{"create_flag":"createFlag","delete_flag":"deleteFlag","get_audit_log":"getAuditLog","get_flag":"getFlag","get_flag_status":"getFlagStatus","list_environments":"listEnvironments","list_flags":"listFlags","list_members":"listMembers","list_projects":"listProjects","list_segments":"listSegments","toggle_flag":"toggleFlag","update_flag":"updateFlag"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"leadmagic":{"namespace":"leadmagic","methods":{"leadmagic_company_search":"companySearch","leadmagic_email_to_profile":"emailToProfile","leadmagic_find_email":"findEmail","leadmagic_find_mobile":"findMobile","leadmagic_get_credits":"getCredits","leadmagic_profile_search":"profileSearch","leadmagic_profile_to_email":"profileToEmail","leadmagic_role_finder":"roleFinder","leadmagic_validate_email":"validateEmail"}},"lemlist":{"namespace":"legacy.lemlist","methods":{"get_activities":"getActivities","get_lead":"getLead","send_email":"sendEmail"},"triggers":{"lemlist_email_bounced":"emailBounced","lemlist_email_clicked":"emailClicked","lemlist_email_opened":"emailOpened","lemlist_email_replied":"emailReplied","lemlist_email_sent":"emailSent","lemlist_interested":"interested","lemlist_linkedin_replied":"linkedinReplied","lemlist_not_interested":"notInterested","lemlist_webhook":"webhook"}},"lemlist_v2":{"namespace":"lemlist","methods":{"get_activities":"getActivities","get_lead":"getLead","send_email":"sendEmail"},"triggers":{"lemlist_email_bounced":"emailBounced","lemlist_email_clicked":"emailClicked","lemlist_email_opened":"emailOpened","lemlist_email_replied":"emailReplied","lemlist_email_sent":"emailSent","lemlist_interested":"interested","lemlist_linkedin_replied":"linkedinReplied","lemlist_not_interested":"notInterested","lemlist_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"linear":{"namespace":"legacy.linear","methods":{"linear_add_label_to_issue":"addLabelToIssue","linear_add_label_to_project":"addLabelToProject","linear_archive_issue":"archiveIssue","linear_archive_label":"archiveLabel","linear_archive_project":"archiveProject","linear_create_attachment":"createAttachment","linear_create_comment":"createComment","linear_create_customer":"createCustomer","linear_create_customer_request":"createCustomerRequest","linear_create_customer_status":"createCustomerStatus","linear_create_customer_tier":"createCustomerTier","linear_create_cycle":"createCycle","linear_create_favorite":"createFavorite","linear_create_issue":"createIssue","linear_create_issue_relation":"createIssueRelation","linear_create_label":"createLabel","linear_create_project":"createProject","linear_create_project_label":"createProjectLabel","linear_create_project_milestone":"createProjectMilestone","linear_create_project_status":"createProjectStatus","linear_create_project_update":"createProjectUpdate","linear_create_workflow_state":"createWorkflowState","linear_delete_attachment":"deleteAttachment","linear_delete_comment":"deleteComment","linear_delete_customer":"deleteCustomer","linear_delete_customer_status":"deleteCustomerStatus","linear_delete_customer_tier":"deleteCustomerTier","linear_delete_issue":"deleteIssue","linear_delete_issue_relation":"deleteIssueRelation","linear_delete_project":"deleteProject","linear_delete_project_label":"deleteProjectLabel","linear_delete_project_milestone":"deleteProjectMilestone","linear_delete_project_status":"deleteProjectStatus","linear_get_active_cycle":"getActiveCycle","linear_get_customer":"getCustomer","linear_get_cycle":"getCycle","linear_get_issue":"getIssue","linear_get_project":"getProject","linear_get_viewer":"getViewer","linear_list_attachments":"listAttachments","linear_list_comments":"listComments","linear_list_customer_requests":"listCustomerRequests","linear_list_customer_statuses":"listCustomerStatuses","linear_list_customer_tiers":"listCustomerTiers","linear_list_customers":"listCustomers","linear_list_cycles":"listCycles","linear_list_favorites":"listFavorites","linear_list_issue_relations":"listIssueRelations","linear_list_labels":"listLabels","linear_list_notifications":"listNotifications","linear_list_project_labels":"listProjectLabels","linear_list_project_milestones":"listProjectMilestones","linear_list_project_statuses":"listProjectStatuses","linear_list_project_updates":"listProjectUpdates","linear_list_projects":"listProjects","linear_list_teams":"listTeams","linear_list_users":"listUsers","linear_list_workflow_states":"listWorkflowStates","linear_merge_customers":"mergeCustomers","linear_read_issues":"readIssues","linear_remove_label_from_issue":"removeLabelFromIssue","linear_remove_label_from_project":"removeLabelFromProject","linear_search_issues":"searchIssues","linear_unarchive_issue":"unarchiveIssue","linear_update_attachment":"updateAttachment","linear_update_comment":"updateComment","linear_update_customer":"updateCustomer","linear_update_customer_request":"updateCustomerRequest","linear_update_customer_status":"updateCustomerStatus","linear_update_customer_tier":"updateCustomerTier","linear_update_issue":"updateIssue","linear_update_label":"updateLabel","linear_update_notification":"updateNotification","linear_update_project":"updateProject","linear_update_project_label":"updateProjectLabel","linear_update_project_milestone":"updateProjectMilestone","linear_update_project_status":"updateProjectStatus","linear_update_workflow_state":"updateWorkflowState"},"triggers":{"linear_comment_created":"commentCreated","linear_comment_updated":"commentUpdated","linear_customer_request_created":"customerRequestCreated","linear_customer_request_updated":"customerRequestUpdated","linear_cycle_created":"cycleCreated","linear_cycle_updated":"cycleUpdated","linear_issue_created":"issueCreated","linear_issue_removed":"issueRemoved","linear_issue_updated":"issueUpdated","linear_label_created":"labelCreated","linear_label_updated":"labelUpdated","linear_project_created":"projectCreated","linear_project_update_created":"projectUpdateCreated","linear_project_updated":"projectUpdated","linear_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"linear_v2":{"namespace":"linear","methods":{"linear_add_label_to_issue":"addLabelToIssue","linear_add_label_to_project":"addLabelToProject","linear_archive_issue":"archiveIssue","linear_archive_label":"archiveLabel","linear_archive_project":"archiveProject","linear_create_attachment":"createAttachment","linear_create_comment":"createComment","linear_create_customer":"createCustomer","linear_create_customer_request":"createCustomerRequest","linear_create_customer_status":"createCustomerStatus","linear_create_customer_tier":"createCustomerTier","linear_create_cycle":"createCycle","linear_create_favorite":"createFavorite","linear_create_issue":"createIssue","linear_create_issue_relation":"createIssueRelation","linear_create_label":"createLabel","linear_create_project":"createProject","linear_create_project_label":"createProjectLabel","linear_create_project_milestone":"createProjectMilestone","linear_create_project_status":"createProjectStatus","linear_create_project_update":"createProjectUpdate","linear_create_workflow_state":"createWorkflowState","linear_delete_attachment":"deleteAttachment","linear_delete_comment":"deleteComment","linear_delete_customer":"deleteCustomer","linear_delete_customer_status":"deleteCustomerStatus","linear_delete_customer_tier":"deleteCustomerTier","linear_delete_issue":"deleteIssue","linear_delete_issue_relation":"deleteIssueRelation","linear_delete_project":"deleteProject","linear_delete_project_label":"deleteProjectLabel","linear_delete_project_milestone":"deleteProjectMilestone","linear_delete_project_status":"deleteProjectStatus","linear_get_active_cycle":"getActiveCycle","linear_get_customer":"getCustomer","linear_get_cycle":"getCycle","linear_get_issue":"getIssue","linear_get_project":"getProject","linear_get_viewer":"getViewer","linear_list_attachments":"listAttachments","linear_list_comments":"listComments","linear_list_customer_requests":"listCustomerRequests","linear_list_customer_statuses":"listCustomerStatuses","linear_list_customer_tiers":"listCustomerTiers","linear_list_customers":"listCustomers","linear_list_cycles":"listCycles","linear_list_favorites":"listFavorites","linear_list_issue_relations":"listIssueRelations","linear_list_labels":"listLabels","linear_list_notifications":"listNotifications","linear_list_project_labels":"listProjectLabels","linear_list_project_milestones":"listProjectMilestones","linear_list_project_statuses":"listProjectStatuses","linear_list_project_updates":"listProjectUpdates","linear_list_projects":"listProjects","linear_list_teams":"listTeams","linear_list_users":"listUsers","linear_list_workflow_states":"listWorkflowStates","linear_merge_customers":"mergeCustomers","linear_read_issues":"readIssues","linear_remove_label_from_issue":"removeLabelFromIssue","linear_remove_label_from_project":"removeLabelFromProject","linear_search_issues":"searchIssues","linear_unarchive_issue":"unarchiveIssue","linear_update_attachment":"updateAttachment","linear_update_comment":"updateComment","linear_update_customer":"updateCustomer","linear_update_customer_request":"updateCustomerRequest","linear_update_customer_status":"updateCustomerStatus","linear_update_customer_tier":"updateCustomerTier","linear_update_issue":"updateIssue","linear_update_label":"updateLabel","linear_update_notification":"updateNotification","linear_update_project":"updateProject","linear_update_project_label":"updateProjectLabel","linear_update_project_milestone":"updateProjectMilestone","linear_update_project_status":"updateProjectStatus","linear_update_workflow_state":"updateWorkflowState"},"triggers":{"linear_comment_created_v2":"commentCreated","linear_comment_updated_v2":"commentUpdated","linear_customer_request_created_v2":"customerRequestCreated","linear_customer_request_updated_v2":"customerRequestUpdated","linear_cycle_created_v2":"cycleCreated","linear_cycle_updated_v2":"cycleUpdated","linear_issue_created_v2":"issueCreated","linear_issue_removed_v2":"issueRemoved","linear_issue_updated_v2":"issueUpdated","linear_label_created_v2":"labelCreated","linear_label_updated_v2":"labelUpdated","linear_project_created_v2":"projectCreated","linear_project_update_created_v2":"projectUpdateCreated","linear_project_updated_v2":"projectUpdated","linear_webhook_v2":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"linkedin":{"namespace":"linkedin","methods":{"get_profile":"getProfile","share_post":"sharePost"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"linkup":{"namespace":"linkup"},"linq":{"namespace":"legacy.linq","methods":{"add_participant":"addParticipant","check_imessage":"checkIMessage","check_rcs":"checkRcs","create_attachment":"createAttachment","create_chat":"createChat","create_contact_card":"createContactCard","create_webhook_subscription":"createWebhookSubscription","delete_attachment":"deleteAttachment","delete_message":"deleteMessage","delete_webhook_subscription":"deleteWebhookSubscription","edit_message":"editMessage","get_attachment":"getAttachment","get_chat":"getChat","get_contact_card":"getContactCard","get_message":"getMessage","get_webhook_subscription":"getWebhookSubscription","leave_chat":"leaveChat","list_chats":"listChats","list_messages":"listMessages","list_phone_numbers":"listPhoneNumbers","list_thread":"listThread","list_webhook_events":"listWebhookEvents","list_webhook_subscriptions":"listWebhookSubscriptions","mark_chat_read":"markChatAsRead","react_to_message":"reactToMessage","remove_participant":"removeParticipant","send_message":"sendMessage","send_voice_memo":"sendVoiceMemo","share_contact_card":"shareContactCard","start_typing":"startTyping","stop_typing":"stopTyping","update_chat":"updateChat","update_contact_card":"updateContactCard","update_webhook_subscription":"updateWebhookSubscription"},"triggers":{"linq_message_delivered":"messageDelivered","linq_message_failed":"messageFailed","linq_message_read":"messageRead","linq_message_received":"messageReceived","linq_reaction_added":"reactionAdded","linq_webhook":"webhook"}},"linq_v2":{"namespace":"linq","methods":{"add_participant":"addParticipant","check_imessage":"checkIMessage","check_rcs":"checkRcs","create_attachment":"createAttachment","create_chat":"createChat","create_contact_card":"createContactCard","create_webhook_subscription":"createWebhookSubscription","delete_attachment":"deleteAttachment","delete_message":"deleteMessage","delete_webhook_subscription":"deleteWebhookSubscription","edit_message":"editMessage","get_attachment":"getAttachment","get_chat":"getChat","get_contact_card":"getContactCard","get_message":"getMessage","get_webhook_subscription":"getWebhookSubscription","leave_chat":"leaveChat","list_chats":"listChats","list_messages":"listMessages","list_phone_numbers":"listPhoneNumbers","list_thread":"listThread","list_webhook_events":"listWebhookEvents","list_webhook_subscriptions":"listWebhookSubscriptions","mark_chat_read":"markChatAsRead","react_to_message":"reactToMessage","remove_participant":"removeParticipant","send_message":"sendMessage","send_voice_memo":"sendVoiceMemo","share_contact_card":"shareContactCard","start_typing":"startTyping","stop_typing":"stopTyping","update_chat":"updateChat","update_contact_card":"updateContactCard","update_webhook_subscription":"updateWebhookSubscription"},"triggers":{"linq_message_delivered":"messageDelivered","linq_message_failed":"messageFailed","linq_message_read":"messageRead","linq_message_received":"messageReceived","linq_reaction_added":"reactionAdded","linq_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"logfire":{"namespace":"legacy.logfire","methods":{"logfire_get_token_info":"getTokenInfo","logfire_get_trace":"getTrace","logfire_query":"runSqlQuery","logfire_search_records":"searchRecords"}},"logfire_v2":{"namespace":"logfire","methods":{"logfire_get_token_info":"getTokenInfo","logfire_get_trace":"getTrace","logfire_query":"runSqlQuery","logfire_search_records":"searchRecords"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"logrocket":{"namespace":"logrocket","methods":{"create_release":"createRelease","get_audit_logs":"getAuditLogs","get_highlights":"getHighlights","identify_user":"identifyUser","list_exported_sessions":"listExportedSessions","request_highlights":"requestHighlights"}},"logs":{"namespace":"legacy.logs","methods":{"get_execution":"getExecutionDetails","get_log":"getLogById","query":"queryLogs"}},"logs_v2":{"namespace":"logs","methods":{"get_run_details":"getRunDetails","query":"queryLogs"}},"loops":{"namespace":"legacy.loops","methods":{"check_contact_suppression":"checkContactSuppression","create_contact":"createContact","create_contact_property":"createContactProperty","delete_contact":"deleteContact","find_contact":"findContact","get_transactional_email":"getTransactionalEmail","list_contact_properties":"listContactProperties","list_mailing_lists":"listMailingLists","list_transactional_emails":"listTransactionalEmails","remove_contact_suppression":"removeContactSuppression","send_event":"sendEvent","send_transactional_email":"sendTransactionalEmail","update_contact":"updateContact"},"triggers":{"loops_campaign_email_sent":"campaignEmailSent","loops_email_clicked":"emailClicked","loops_email_delivered":"emailDelivered","loops_email_hard_bounced":"emailHardBounced","loops_email_opened":"emailOpened","loops_email_soft_bounced":"emailSoftBounced","loops_loop_email_sent":"loopEmailSent","loops_transactional_email_sent":"transactionalEmailSent"}},"loops_v2":{"namespace":"loops","methods":{"check_contact_suppression":"checkContactSuppression","create_contact":"createContact","create_contact_property":"createContactProperty","delete_contact":"deleteContact","find_contact":"findContact","get_transactional_email":"getTransactionalEmail","list_contact_properties":"listContactProperties","list_mailing_lists":"listMailingLists","list_transactional_emails":"listTransactionalEmails","remove_contact_suppression":"removeContactSuppression","send_event":"sendEvent","send_transactional_email":"sendTransactionalEmail","update_contact":"updateContact"},"triggers":{"loops_campaign_email_sent":"campaignEmailSent","loops_email_clicked":"emailClicked","loops_email_delivered":"emailDelivered","loops_email_hard_bounced":"emailHardBounced","loops_email_opened":"emailOpened","loops_email_soft_bounced":"emailSoftBounced","loops_loop_email_sent":"loopEmailSent","loops_transactional_email_sent":"transactionalEmailSent"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"luma":{"namespace":"legacy.luma","methods":{"add_guests":"addGuests","cancel_event":"cancelEvent","create_event":"createEvent","get_event":"getEvent","get_guest":"getGuest","get_guests":"getGuests","list_events":"listEvents","lookup_event":"lookupEvent","send_invites":"sendInvites","update_event":"updateEvent","update_guest_status":"updateGuestStatus"}},"luma_v2":{"namespace":"luma","methods":{"add_guests":"addGuests","cancel_event":"cancelEvent","create_event":"createEvent","get_event":"getEvent","get_guest":"getGuest","get_guests":"getGuests","list_events":"listEvents","lookup_event":"lookupEvent","send_invites":"sendInvites","update_event":"updateEvent","update_guest_status":"updateGuestStatus"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"mailchimp":{"namespace":"legacy.mailchimp","methods":{"add_member":"addMember","add_member_tags":"addMemberTags","add_or_update_member":"addOrUpdateMember","add_segment_member":"addSegmentMember","add_subscriber_to_automation":"addSubscriberToAutomation","archive_member":"archiveMember","create_audience":"createAudience","create_batch_operation":"createBatchOperation","create_campaign":"createCampaign","create_interest":"createInterest","create_interest_category":"createInterestCategory","create_landing_page":"createLandingPage","create_merge_field":"createMergeField","create_segment":"createSegment","create_template":"createTemplate","delete_audience":"deleteAudience","delete_batch_operation":"deleteBatchOperation","delete_campaign":"deleteCampaign","delete_interest":"deleteInterest","delete_interest_category":"deleteInterestCategory","delete_landing_page":"deleteLandingPage","delete_member":"deleteMember","delete_member_permanent":"permanentlyDeleteMember","delete_merge_field":"deleteMergeField","delete_segment":"deleteSegment","delete_template":"deleteTemplate","get_audience":"getAudience","get_audiences":"getAudiences","get_automation":"getAutomation","get_automations":"getAutomations","get_batch_operation":"getBatchOperation","get_batch_operations":"getBatchOperations","get_campaign":"getCampaign","get_campaign_content":"getCampaignContent","get_campaign_report":"getCampaignReport","get_campaign_reports":"getCampaignReports","get_campaigns":"getCampaigns","get_interest":"getInterest","get_interest_categories":"getInterestCategories","get_interest_category":"getInterestCategory","get_interests":"getInterests","get_landing_page":"getLandingPage","get_landing_pages":"getLandingPages","get_member":"getMember","get_member_tags":"getMemberTags","get_members":"getMembers","get_merge_field":"getMergeField","get_merge_fields":"getMergeFields","get_segment":"getSegment","get_segment_members":"getSegmentMembers","get_segments":"getSegments","get_template":"getTemplate","get_templates":"getTemplates","pause_automation":"pauseAutomation","publish_landing_page":"publishLandingPage","remove_member_tags":"removeMemberTags","remove_segment_member":"removeSegmentMember","replicate_campaign":"replicateCampaign","schedule_campaign":"scheduleCampaign","send_campaign":"sendCampaign","set_campaign_content":"setCampaignContent","start_automation":"startAutomation","unarchive_member":"unarchiveMember","unpublish_landing_page":"unpublishLandingPage","unschedule_campaign":"unscheduleCampaign","update_audience":"updateAudience","update_campaign":"updateCampaign","update_interest":"updateInterest","update_interest_category":"updateInterestCategory","update_landing_page":"updateLandingPage","update_member":"updateMember","update_merge_field":"updateMergeField","update_segment":"updateSegment","update_template":"updateTemplate"}},"mailchimp_v2":{"namespace":"mailchimp","methods":{"add_member":"addMember","add_member_tags":"addMemberTags","add_or_update_member":"addOrUpdateMember","add_segment_member":"addSegmentMember","add_subscriber_to_automation":"addSubscriberToAutomation","archive_member":"archiveMember","create_audience":"createAudience","create_batch_operation":"createBatchOperation","create_campaign":"createCampaign","create_interest":"createInterest","create_interest_category":"createInterestCategory","create_landing_page":"createLandingPage","create_merge_field":"createMergeField","create_segment":"createSegment","create_template":"createTemplate","delete_audience":"deleteAudience","delete_batch_operation":"deleteBatchOperation","delete_campaign":"deleteCampaign","delete_interest":"deleteInterest","delete_interest_category":"deleteInterestCategory","delete_landing_page":"deleteLandingPage","delete_member":"deleteMember","delete_member_permanent":"permanentlyDeleteMember","delete_merge_field":"deleteMergeField","delete_segment":"deleteSegment","delete_template":"deleteTemplate","get_audience":"getAudience","get_audiences":"getAudiences","get_automation":"getAutomation","get_automations":"getAutomations","get_batch_operation":"getBatchOperation","get_batch_operations":"getBatchOperations","get_campaign":"getCampaign","get_campaign_content":"getCampaignContent","get_campaign_report":"getCampaignReport","get_campaign_reports":"getCampaignReports","get_campaigns":"getCampaigns","get_interest":"getInterest","get_interest_categories":"getInterestCategories","get_interest_category":"getInterestCategory","get_interests":"getInterests","get_landing_page":"getLandingPage","get_landing_pages":"getLandingPages","get_member":"getMember","get_member_tags":"getMemberTags","get_members":"getMembers","get_merge_field":"getMergeField","get_merge_fields":"getMergeFields","get_segment":"getSegment","get_segment_members":"getSegmentMembers","get_segments":"getSegments","get_template":"getTemplate","get_templates":"getTemplates","pause_automation":"pauseAutomation","publish_landing_page":"publishLandingPage","remove_member_tags":"removeMemberTags","remove_segment_member":"removeSegmentMember","replicate_campaign":"replicateCampaign","schedule_campaign":"scheduleCampaign","send_campaign":"sendCampaign","set_campaign_content":"setCampaignContent","start_automation":"startAutomation","unarchive_member":"unarchiveMember","unpublish_landing_page":"unpublishLandingPage","unschedule_campaign":"unscheduleCampaign","update_audience":"updateAudience","update_campaign":"updateCampaign","update_interest":"updateInterest","update_interest_category":"updateInterestCategory","update_landing_page":"updateLandingPage","update_member":"updateMember","update_merge_field":"updateMergeField","update_segment":"updateSegment","update_template":"updateTemplate"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"mailgun":{"namespace":"legacy.mailgun","methods":{"add_list_member":"addListMember","create_mailing_list":"createMailingList","get_domain":"getDomain","get_mailing_list":"getMailingList","get_message":"getMessage","list_domains":"listDomains","list_messages":"listMessages","send_message":"sendMessage"}},"mailgun_v2":{"namespace":"mailgun","methods":{"add_list_member":"addListMember","create_mailing_list":"createMailingList","get_domain":"getDomain","get_mailing_list":"getMailingList","get_message":"getMessage","list_domains":"listDomains","list_messages":"listMessages","send_message":"sendMessage"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"managed_agent":{"namespace":"managedAgent","methods":{"archive_session":"archiveSession","create_session":"createSession","delete_session":"deleteSession","get_session":"getSession","interrupt_session":"interruptSession","list_events":"listEvents","respond_custom_tool":"respondToCustomTool","respond_tool_confirmation":"respondToToolConfirmation","run_session":"runSessionCreateSendWaitForReply","send_message":"sendMessage","update_session":"updateSession"}},"manageengine_sdp":{"namespace":"manageengineSdp","methods":{"add_change_note":"addChangeNote","add_problem_note":"addProblemNote","add_request_note":"addRequestNote","create_asset":"createAsset","create_change":"createChange","create_problem":"createProblem","create_request":"createRequest","create_solution":"createSolution","delete_asset":"deleteAsset","delete_change":"deleteChange","delete_problem":"deleteProblem","delete_request":"deleteRequest","delete_solution":"deleteSolution","get_asset":"getAsset","get_change":"getChange","get_problem":"getProblem","get_request":"getRequest","get_solution":"getSolution","list_assets":"listAssets","list_change_notes":"listChangeNotes","list_changes":"listChanges","list_problem_notes":"listProblemNotes","list_problems":"listProblems","list_request_notes":"listRequestNotes","list_requests":"listRequests","list_solutions":"listSolutions","update_asset":"updateAsset","update_change":"updateChange","update_problem":"updateProblem","update_request":"updateRequest","update_solution":"updateSolution"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"manual_trigger":{"namespace":"legacy.manualTrigger"},"mcp":{"namespace":"mcpBlock","methods":{"list":"listOperations","run":"runOperation"}},"mem0":{"namespace":"legacy.mem0","methods":{"add":"addMemories","get":"getMemories","search":"searchMemories"}},"mem0_v2":{"namespace":"mem0","methods":{"add":"addMemories","get":"getMemories","search":"searchMemories"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"memory":{"namespace":"memory","methods":{"add":"addMemory","delete":"deleteMemory","get":"getMemory","getAll":"getAllMemories"}},"microsoft_ad":{"namespace":"microsoftAd","methods":{"add_directory_role_member":"addDirectoryRoleMember","add_group_member":"addGroupMember","add_user_app_role_assignment":"grantAppRoleToUser","assign_license":"assignLicense","create_group":"createGroup","create_user":"createUser","delete_group":"deleteGroup","delete_user":"deleteUser","get_conditional_access_policy":"getConditionalAccessPolicy","get_device":"getDevice","get_group":"getGroup","get_user":"getUser","list_authentication_methods":"listAuthenticationMethods","list_conditional_access_policies":"listConditionalAccessPolicies","list_devices":"listDevices","list_directory_audits":"listDirectoryAudits","list_directory_role_members":"listDirectoryRoleMembers","list_directory_roles":"listDirectoryRoles","list_group_members":"listGroupMembers","list_groups":"listGroups","list_service_principal_app_role_assignments":"listApplicationAssignments","list_service_principals":"listServicePrincipals","list_sign_ins":"listSignIns","list_subscribed_skus":"listSubscribedSkus","list_user_app_role_assignments":"listUserAppRoleAssignments","list_user_devices":"listUserDevices","list_user_licenses":"listUserLicenses","list_user_memberships":"listUserMemberships","list_users":"listUsers","remove_directory_role_member":"removeDirectoryRoleMember","remove_group_member":"removeGroupMember","remove_user_app_role_assignment":"revokeAppRoleFromUser","reset_password":"resetPassword","revoke_sign_in_sessions":"revokeSignInSessions","set_password":"setPassword","update_group":"updateGroup","update_user":"updateUser"}},"microsoft_dataverse":{"namespace":"legacy.microsoftDataverse","methods":{"associate":"associateRecords","create_multiple":"createMultiple","create_record":"createRecord","delete_record":"deleteRecord","disassociate":"disassociateRecords","download_file":"downloadFile","execute_action":"executeAction","execute_function":"executeFunction","fetchxml_query":"fetchXmlQuery","get_entity_metadata":"getTableMetadata","get_record":"getRecord","list_records":"listRecords","search":"search","update_multiple":"updateMultiple","update_record":"updateRecord","upload_file":"uploadFile","upsert_record":"upsertRecord","whoami":"whoAmI"}},"microsoft_dataverse_v2":{"namespace":"microsoftDataverse","methods":{"associate":"associateRecords","create_multiple":"createMultiple","create_record":"createRecord","delete_record":"deleteRecord","disassociate":"disassociateRecords","download_file":"downloadFile","execute_action":"executeAction","execute_function":"executeFunction","fetchxml_query":"fetchXmlQuery","get_entity_metadata":"getTableMetadata","get_record":"getRecord","list_records":"listRecords","search":"search","update_multiple":"updateMultiple","update_record":"updateRecord","upload_file":"uploadFile","upsert_record":"upsertRecord","whoami":"whoAmI"}},"microsoft_dynamics_365":{"namespace":"microsoftDynamics365","methods":{"assign_record":"assignRecord","close_case":"closeCase","close_opportunity":"closeOpportunity","create_record":"createRecord","get_record":"getRecord","list_owners":"listOwners","list_records":"listRecords","qualify_lead":"qualifyLead","search_records":"searchRecords","update_record":"updateRecord"}},"microsoft_excel":{"namespace":"legacy.microsoftExcel","methods":{"clear_range":"clearRange","create_table":"createTable","delete_worksheet":"deleteWorksheet","format_range":"formatRange","read":"readData","sort_range":"sortRange","table_add":"addToTable","worksheet_add":"addWorksheet","write":"writeUpdateData"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"microsoft_excel_v2":{"namespace":"microsoftExcel","methods":{"calculate":"calculateWorkbook","clear_range":"clearRange","close_session":"closeSession","create_session":"createSession","create_table":"createTable","delete_table":"deleteTable","delete_table_row":"deleteTableRow","delete_worksheet":"deleteWorksheet","format_range":"formatRange","get_table":"getTable","get_table_row":"getTableRow","get_worksheet":"getWorksheet","list_table_rows":"listTableRows","list_tables":"listTables","list_worksheets":"listWorksheets","read":"readData","refresh_session":"refreshSession","sort_range":"sortRange","table_add":"addTableRows","update_table":"updateTable","update_table_row":"updateTableRow","update_worksheet":"updateWorksheet","worksheet_add":"addWorksheet","write":"writeData"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"microsoft_planner":{"namespace":"microsoftPlanner","methods":{"create_bucket":"createBucket","create_plan":"createPlan","create_task":"createTask","delete_bucket":"deleteBucket","delete_plan":"deletePlan","delete_task":"deleteTask","get_plan_details":"getPlanDetails","get_task_details":"getTaskDetails","list_buckets":"listBuckets","list_plans":"listPlans","read_bucket":"readBucket","read_plan":"readPlan","read_task":"readTask","update_bucket":"updateBucket","update_plan":"updatePlan","update_plan_details":"updatePlanDetails","update_task":"updateTask","update_task_details":"updateTaskDetails"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"microsoft_teams":{"namespace":"microsoftTeams","methods":{"delete_channel_message":"deleteChannelMessage","delete_chat_message":"deleteChatMessage","get_message":"getMessage","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_chat_members":"listChatMembers","list_chats":"listChats","list_team_members":"listTeamMembers","list_teams":"listTeams","read_channel":"readChannelMessages","read_chat":"readChatMessages","reply_to_message":"replyToChannelMessage","set_reaction":"addReaction","unset_reaction":"removeReaction","update_channel_message":"updateChannelMessage","update_chat_message":"updateChatMessage","write_channel":"writeChannelMessage","write_chat":"writeChatMessage"},"triggers":{"microsoftteams_chat_subscription":"microsoftteamsChatSubscription","microsoftteams_webhook":"microsoftteamsWebhook"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"microsoft_word":{"namespace":"microsoftWord","methods":{"append":"appendContent","create":"createDocument","create_from_template":"createFromTemplate","export_pdf":"exportAsPdf","list":"listDocuments","read":"readDocument","replace_text":"findAndReplaceText","update":"replaceContent"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"millionverifier":{"namespace":"millionverifier","methods":{"millionverifier_get_credits":"getRemainingCredits","millionverifier_verify_email":"verifyEmail"}},"mintlify":{"namespace":"mintlify","methods":{"create_agent_job":"createAgentJob","create_assistant_message":"askAssistant","detect_ai_prose":"detectAiSoundingProse","get_agent_job":"getAgentJob","get_assistant_caller_stats":"getAssistantCallerStats","get_assistant_conversations":"getAssistantConversations","get_feedback":"getFeedback","get_feedback_by_page":"getFeedbackByPage","get_page_content":"getPageContent","get_searches":"getSearchQueries","get_update_status":"getUpdateStatus","get_views":"getPageViews","get_visitors":"getUniqueVisitors","search":"searchDocumentation","send_agent_message":"sendAgentMessage","trigger_automation":"triggerAutomation","trigger_preview":"triggerPreviewDeployment","trigger_update":"triggerUpdate"}},"mistral_parse":{"namespace":"legacy.mistralParse"},"mistral_parse_v2":{"namespace":"legacy.mistralParseV2"},"mistral_parse_v3":{"namespace":"mistralParse"},"modal":{"namespace":"modal","methods":{"call_function":"callFunction","chat_completion":"chatCompletion","list_models":"listModels"}},"monaco":{"namespace":"monaco","methods":{"monaco_add_audience_contacts":"addContactsToAudience","monaco_add_campaign_audiences":"addAudiencesToCampaign","monaco_create_audience":"createAudience","monaco_create_contact":"createContact","monaco_create_opportunity":"createOpportunity","monaco_create_tag":"createTag","monaco_create_task":"createTask","monaco_delete_account":"deleteAccount","monaco_delete_contact":"deleteContact","monaco_delete_opportunity":"deleteOpportunity","monaco_enroll_campaign_contacts":"enrollContactsInCampaign","monaco_get_account":"getAccount","monaco_get_audience":"getAudience","monaco_get_campaign":"getCampaign","monaco_get_contact":"getContact","monaco_get_conversation":"getConversation","monaco_get_current_user":"getCurrentUser","monaco_get_field_schemas":"getFieldSchemas","monaco_get_meeting":"getMeeting","monaco_get_opportunity":"getOpportunity","monaco_get_sequence":"getSequence","monaco_get_task":"getTask","monaco_link_opportunity_contacts":"linkContactsToOpportunity","monaco_list_accounts":"listAccounts","monaco_list_audience_contacts":"listAudienceContacts","monaco_list_audiences":"listAudiences","monaco_list_campaigns":"listCampaigns","monaco_list_contacts":"listContacts","monaco_list_meetings":"listMeetings","monaco_list_messages":"listMessages","monaco_list_opportunities":"listOpportunities","monaco_list_opportunity_contacts":"listOpportunityContacts","monaco_list_pipelines":"listPipelines","monaco_list_sequences":"listSequences","monaco_list_tags":"listTags","monaco_list_tasks":"listTasks","monaco_list_users":"listUsers","monaco_remove_audience_contacts":"removeContactsFromAudience","monaco_unlink_opportunity_contacts":"unlinkContactsFromOpportunity","monaco_update_account":"updateAccount","monaco_update_contact":"updateContact","monaco_update_opportunity":"updateOpportunity","monaco_update_sequence":"updateSequence","monaco_update_task":"updateTask","monaco_upsert_account":"upsertAccount","monaco_upsert_contact":"upsertContact"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"monday":{"namespace":"monday","methods":{"archive_item":"archiveItem","change_column_value":"changeColumnValue","create_board":"createBoard","create_column":"createColumn","create_group":"createGroup","create_item":"createItem","create_subitem":"createSubitem","create_update":"createUpdate","delete_item":"deleteItem","duplicate_item":"duplicateItem","get_board":"getBoard","get_groups":"getGroups","get_item":"getItem","get_items":"getItems","list_boards":"listBoards","move_item_to_group":"moveItemToGroup","search_items":"searchItems","update_item":"updateItem"},"triggers":{"monday_column_changed":"columnChanged","monday_item_archived":"itemArchived","monday_item_created":"itemCreated","monday_item_deleted":"itemDeleted","monday_item_moved":"itemMoved","monday_item_name_changed":"itemNameChanged","monday_status_changed":"statusChanged","monday_subitem_created":"subitemCreated","monday_update_created":"updateCreated"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"mongodb":{"namespace":"mongodb","methods":{"delete":"deleteDocuments","execute":"aggregatePipeline","insert":"insertDocuments","introspect":"introspectDatabase","query":"findDocuments","update":"updateDocuments"}},"mothership":{"namespace":"simChat"},"mssql":{"namespace":"legacy.mssql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"mssql_v2":{"namespace":"mssql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"mysql":{"namespace":"legacy.mysql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"mysql_v2":{"namespace":"mysql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"neo4j":{"namespace":"neo4j","methods":{"create":"createNodesRelationships","delete":"deleteNodesRelationships","execute":"executeCypher","introspect":"introspectSchema","merge":"mergeFindOrCreate","query":"queryMatch","update":"updatePropertiesSet"}},"netsuite":{"namespace":"netsuite","methods":{"netsuite_attach_record":"attachRecordOrFile","netsuite_batch_create_records":"batchCreateRecords","netsuite_batch_delete_records":"batchDeleteRecords","netsuite_batch_get_records":"batchGetRecords","netsuite_batch_update_records":"batchUpdateRecords","netsuite_batch_upsert_records":"batchUpsertRecords","netsuite_create_record":"createRecord","netsuite_delete_record":"deleteRecord","netsuite_detach_record":"detachRecordOrFile","netsuite_execute_action":"executeRecordAction","netsuite_execute_dataset":"executeSuiteAnalyticsDataset","netsuite_execute_suiteql":"executeSuiteQl","netsuite_get_async_result":"getAsyncOperationResult","netsuite_get_async_status":"getAsyncStatus","netsuite_get_governance_limits":"getGovernanceLimits","netsuite_get_record":"getRecord","netsuite_get_record_form":"getRecordForm","netsuite_get_record_metadata":"getRecordMetadata","netsuite_get_select_options":"getSelectOptions","netsuite_get_server_time":"getServerTime","netsuite_get_subresource":"getSubresource","netsuite_list_datasets":"listSuiteAnalyticsDatasets","netsuite_list_record_types":"listRecordTypes","netsuite_list_records":"listSearchRecords","netsuite_transform_record":"transformRecord","netsuite_update_record":"updateRecord","netsuite_upsert_record":"upsertRecord"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"neverbounce":{"namespace":"neverbounce","methods":{"neverbounce_get_credits":"getRemainingCredits","neverbounce_verify_email":"verifyEmail"}},"new_relic":{"namespace":"legacy.newRelic","methods":{"new_relic_create_deployment_event":"createDeploymentEvent","new_relic_get_entity":"getEntity","new_relic_nrql_query":"runNrqlQuery","new_relic_search_entities":"searchEntities"}},"new_relic_v2":{"namespace":"newRelic","methods":{"new_relic_create_deployment_event":"createDeploymentEvent","new_relic_get_entity":"getEntity","new_relic_nrql_query":"runNrqlQuery","new_relic_search_entities":"searchEntities"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"note":{"namespace":"note"},"notion":{"namespace":"legacy.notion","methods":{"notion_add_database_row":"addDatabaseRow","notion_append_blocks":"appendBlockChildren","notion_create_comment":"createComment","notion_create_database":"createDatabase","notion_create_page":"createPage","notion_delete_block":"deleteBlock","notion_list_comments":"listComments","notion_list_users":"listUsers","notion_query_database":"queryDatabase","notion_read":"readPage","notion_read_database":"readDatabase","notion_retrieve_block":"retrieveBlock","notion_retrieve_block_children":"retrieveBlockChildren","notion_retrieve_user":"retrieveUser","notion_search":"searchWorkspace","notion_update_block":"updateBlock","notion_update_page":"updatePageProperties","notion_write":"appendContent"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"notion_v2":{"namespace":"notion","methods":{"notion_add_database_row":"addDatabaseRow","notion_append_blocks":"appendBlockChildren","notion_create_comment":"createComment","notion_create_database":"createDatabase","notion_create_page":"createPage","notion_delete_block":"deleteBlock","notion_list_comments":"listComments","notion_list_users":"listUsers","notion_query_database":"queryDatabase","notion_read":"readPage","notion_read_database":"readDatabase","notion_retrieve_block":"retrieveBlock","notion_retrieve_block_children":"retrieveBlockChildren","notion_retrieve_user":"retrieveUser","notion_search":"searchWorkspace","notion_update_block":"updateBlock","notion_update_page":"updatePageProperties","notion_write":"appendContent"},"triggers":{"notion_comment_created":"commentCreated","notion_database_created":"databaseCreated","notion_database_deleted":"databaseDeleted","notion_database_schema_updated":"databaseSchemaUpdated","notion_page_content_updated":"pageContentUpdated","notion_page_created":"pageCreated","notion_page_deleted":"pageDeleted","notion_page_properties_updated":"pagePropertiesUpdated","notion_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"obsidian":{"namespace":"obsidian","methods":{"append_active":"appendToActiveFile","append_note":"appendToNote","append_periodic_note":"appendToPeriodicNote","create_note":"createNote","delete_note":"deleteNote","execute_command":"executeCommand","get_active":"getActiveFile","get_note":"getNote","get_periodic_note":"getPeriodicNote","list_commands":"listCommands","list_files":"listFiles","open_file":"openFile","patch_active":"patchActiveFile","patch_note":"patchNote","search":"search"}},"okta":{"namespace":"legacy.okta","methods":{"okta_activate_group_rule":"activateGroupRule","okta_activate_user":"activateUser","okta_add_user_to_group":"addUserToGroup","okta_assign_group_to_app":"assignGroupToApplication","okta_assign_user_role":"assignUserRole","okta_assign_user_to_app":"assignUserToApplication","okta_clear_user_sessions":"clearUserSessions","okta_create_group":"createGroup","okta_create_group_rule":"createGroupRule","okta_create_user":"createUser","okta_deactivate_group_rule":"deactivateGroupRule","okta_deactivate_user":"deactivateUser","okta_delete_group":"deleteGroup","okta_delete_group_rule":"deleteGroupRule","okta_delete_user":"deleteUser","okta_enroll_factor":"enrollFactor","okta_get_app":"getApplication","okta_get_factor":"getFactor","okta_get_group":"getGroup","okta_get_group_rule":"getGroupRule","okta_get_logs":"getSystemLogEvents","okta_get_session":"getSession","okta_get_user":"getUser","okta_list_app_groups":"listApplicationGroups","okta_list_app_users":"listApplicationUsers","okta_list_apps":"listApplications","okta_list_factors":"listFactors","okta_list_group_members":"listGroupMembers","okta_list_group_rules":"listGroupRules","okta_list_groups":"listGroups","okta_list_user_roles":"listUserRoles","okta_list_users":"listUsers","okta_remove_group_from_app":"removeGroupFromApplication","okta_remove_user_from_app":"removeUserFromApplication","okta_remove_user_from_group":"removeUserFromGroup","okta_remove_user_role":"removeUserRole","okta_reset_all_factors":"resetAllFactors","okta_reset_factor":"resetFactor","okta_reset_password":"resetPassword","okta_revoke_session":"revokeSession","okta_suspend_user":"suspendUser","okta_unsuspend_user":"unsuspendUser","okta_update_group":"updateGroup","okta_update_user":"updateUser"}},"okta_v2":{"namespace":"okta","methods":{"okta_activate_group_rule":"activateGroupRule","okta_activate_user":"activateUser","okta_add_user_to_group":"addUserToGroup","okta_assign_group_to_app":"assignGroupToApplication","okta_assign_user_role":"assignUserRole","okta_assign_user_to_app":"assignUserToApplication","okta_clear_user_sessions":"clearUserSessions","okta_create_group":"createGroup","okta_create_group_rule":"createGroupRule","okta_create_user":"createUser","okta_deactivate_group_rule":"deactivateGroupRule","okta_deactivate_user":"deactivateUser","okta_delete_group":"deleteGroup","okta_delete_group_rule":"deleteGroupRule","okta_delete_user":"deleteUser","okta_enroll_factor":"enrollFactor","okta_get_app":"getApplication","okta_get_factor":"getFactor","okta_get_group":"getGroup","okta_get_group_rule":"getGroupRule","okta_get_logs":"getSystemLogEvents","okta_get_session":"getSession","okta_get_user":"getUser","okta_list_app_groups":"listApplicationGroups","okta_list_app_users":"listApplicationUsers","okta_list_apps":"listApplications","okta_list_factors":"listFactors","okta_list_group_members":"listGroupMembers","okta_list_group_rules":"listGroupRules","okta_list_groups":"listGroups","okta_list_user_roles":"listUserRoles","okta_list_users":"listUsers","okta_remove_group_from_app":"removeGroupFromApplication","okta_remove_user_from_app":"removeUserFromApplication","okta_remove_user_from_group":"removeUserFromGroup","okta_remove_user_role":"removeUserRole","okta_reset_all_factors":"resetAllFactors","okta_reset_factor":"resetFactor","okta_reset_password":"resetPassword","okta_revoke_session":"revokeSession","okta_suspend_user":"suspendUser","okta_unsuspend_user":"unsuspendUser","okta_update_group":"updateGroup","okta_update_user":"updateUser"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"onedrive":{"namespace":"onedrive","methods":{"copy":"copyFile","create_file":"createFile","create_folder":"createFolder","create_share_link":"createSharingLink","delete":"deleteFile","download":"downloadFile","get_drive_info":"getDriveInfo","get_item":"getItemInfo","list":"listFiles","move":"moveRenameFile","search":"searchFiles","upload":"uploadFile"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"onepassword":{"namespace":"onepassword","methods":{"create_item":"createItem","delete_item":"deleteItem","get_item":"getItem","get_item_file":"getItemFile","get_vault":"getVault","list_items":"listItems","list_vaults":"listVaults","replace_item":"replaceItem","resolve_secret":"resolveSecret","update_item":"updateItem"}},"openai":{"namespace":"legacy.openai"},"oracle_fusion_financials":{"namespace":"oracleFusionFinancials","methods":{"oracle_fusion_financials_apply_receivables_receipt":"applyReceivablesReceipt","oracle_fusion_financials_approve_receivables_invoice":"approveReceivablesInvoice","oracle_fusion_financials_create_expense_line":"createExpenseLine","oracle_fusion_financials_create_expense_report":"createExpenseReport","oracle_fusion_financials_create_receivables_credit_memo":"createReceivablesCreditMemo","oracle_fusion_financials_create_receivables_invoice":"createReceivablesInvoice","oracle_fusion_financials_create_receivables_receipt":"createReceivablesReceipt","oracle_fusion_financials_get_expense_line":"getExpenseLine","oracle_fusion_financials_get_expense_report":"getExpenseReport","oracle_fusion_financials_get_gl_journal_batch":"getGlJournalBatch","oracle_fusion_financials_get_gl_ledger":"getGlLedger","oracle_fusion_financials_get_payables_invoice":"getPayablesInvoice","oracle_fusion_financials_get_payables_invoice_line":"getPayablesInvoiceLine","oracle_fusion_financials_get_payables_payment":"getPayablesPayment","oracle_fusion_financials_get_receivables_credit_memo":"getReceivablesCreditMemo","oracle_fusion_financials_get_receivables_invoice":"getReceivablesInvoice","oracle_fusion_financials_get_receivables_invoice_installment":"getReceivablesInvoiceInstallment","oracle_fusion_financials_get_receivables_invoice_line":"getReceivablesInvoiceLine","oracle_fusion_financials_get_receivables_receipt":"getReceivablesReceipt","oracle_fusion_financials_list_expense_lines":"listExpenseLines","oracle_fusion_financials_list_expense_reports":"listExpenseReports","oracle_fusion_financials_list_gl_balances":"listGlBalances","oracle_fusion_financials_list_gl_journal_batches":"listGlJournalBatches","oracle_fusion_financials_list_gl_ledgers":"listGlLedgers","oracle_fusion_financials_list_payables_invoice_lines":"listPayablesInvoiceLines","oracle_fusion_financials_list_payables_invoices":"listPayablesInvoices","oracle_fusion_financials_list_payables_payments":"listPayablesPayments","oracle_fusion_financials_list_receivables_credit_memos":"listReceivablesCreditMemos","oracle_fusion_financials_list_receivables_invoice_installments":"listReceivablesInvoiceInstallments","oracle_fusion_financials_list_receivables_invoice_lines":"listReceivablesInvoiceLines","oracle_fusion_financials_list_receivables_invoices":"listReceivablesInvoices","oracle_fusion_financials_list_receivables_receipts":"listReceivablesReceipts","oracle_fusion_financials_submit_expense_report":"submitExpenseReport","oracle_fusion_financials_update_expense_line":"updateExpenseLine","oracle_fusion_financials_update_expense_report":"updateExpenseReport","oracle_fusion_financials_update_receivables_invoice":"updateReceivablesInvoice"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"oracledb":{"namespace":"oracledb","methods":{"delete":"deleteData","execute":"executeSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"otter":{"namespace":"legacy.otter","methods":{"create_conversation":"importRecording","get_conversation":"getConversation","get_conversation_audio":"getConversationAudio","get_workspace":"getWorkspace","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_conversations":"listConversations","list_workspace_conversations":"listWorkspaceConversations"},"triggers":{"otter_conversation_completed":"conversationCompleted","otter_conversation_shared":"conversationShared","otter_webhook":"webhook"}},"otter_v2":{"namespace":"otter","methods":{"create_conversation":"importRecording","get_conversation":"getConversation","get_conversation_audio":"getConversationAudio","get_workspace":"getWorkspace","list_channel_members":"listChannelMembers","list_channels":"listChannels","list_conversations":"listConversations","list_workspace_conversations":"listWorkspaceConversations"},"triggers":{"otter_conversation_completed":"conversationCompleted","otter_conversation_shared":"conversationShared","otter_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"outlook":{"namespace":"outlook","methods":{"copy_outlook":"copyEmail","create_event_calendar":"createEvent","create_folder_outlook":"createFolder","delete_event_calendar":"deleteEvent","delete_outlook":"deleteEmail","draft_outlook":"draftEmail","forward_outlook":"forwardEmail","get_attachment_outlook":"getAttachment","get_event_calendar":"getCalendarEvent","list_attachments_outlook":"listAttachments","list_events_calendar":"listCalendarEvents","list_folders_outlook":"listFolders","mark_read_outlook":"markAsRead","mark_unread_outlook":"markAsUnread","move_outlook":"moveEmail","read_outlook":"readEmail","reply_all_outlook":"replyAll","reply_outlook":"replyToEmail","respond_calendar":"respondToInvite","search_outlook":"searchEmail","send_outlook":"sendEmail","update_event_calendar":"updateEvent","update_message_outlook":"setCategoriesFlag"},"triggers":{"outlook_poller":"poller"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"pagerduty":{"namespace":"legacy.pagerduty","methods":{"add_note":"addNote","create_incident":"createIncident","get_incident":"getIncident","get_service":"getService","list_escalation_policies":"listEscalationPolicies","list_incident_alerts":"listIncidentAlerts","list_incidents":"listIncidents","list_oncalls":"listOnCalls","list_schedules":"listSchedules","list_services":"listServices","list_users":"listUsers","merge_incidents":"mergeIncidents","send_event":"sendEvent","snooze_incident":"snoozeIncident","update_incident":"updateIncident"},"triggers":{"pagerduty_incident_acknowledged":"incidentAcknowledged","pagerduty_incident_escalated":"incidentEscalated","pagerduty_incident_reassigned":"incidentReassigned","pagerduty_incident_resolved":"incidentResolved","pagerduty_incident_triggered":"incidentTriggered","pagerduty_webhook":"webhook"}},"pagerduty_v2":{"namespace":"pagerduty","methods":{"add_note":"addNote","create_incident":"createIncident","get_incident":"getIncident","get_service":"getService","list_escalation_policies":"listEscalationPolicies","list_incident_alerts":"listIncidentAlerts","list_incidents":"listIncidents","list_oncalls":"listOnCalls","list_schedules":"listSchedules","list_services":"listServices","list_users":"listUsers","merge_incidents":"mergeIncidents","send_event":"sendEvent","snooze_incident":"snoozeIncident","update_incident":"updateIncident"},"triggers":{"pagerduty_incident_acknowledged":"incidentAcknowledged","pagerduty_incident_escalated":"incidentEscalated","pagerduty_incident_reassigned":"incidentReassigned","pagerduty_incident_resolved":"incidentResolved","pagerduty_incident_triggered":"incidentTriggered","pagerduty_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"parallel_ai":{"namespace":"parallelAi","methods":{"deep_research":"deepResearch","extract":"extractFromUrls","search":"search"}},"peopledatalabs":{"namespace":"peopledatalabs","methods":{"pdl_autocomplete":"autocomplete","pdl_bulk_company_enrich":"bulkCompanyEnrich","pdl_bulk_person_enrich":"bulkPersonEnrich","pdl_clean_company":"companyCleaner","pdl_clean_location":"locationCleaner","pdl_clean_school":"schoolCleaner","pdl_company_enrich":"companyEnrich","pdl_company_search":"companySearch","pdl_person_enrich":"personEnrich","pdl_person_identify":"personIdentify","pdl_person_search":"personSearch"}},"perplexity":{"namespace":"perplexity","methods":{"perplexity_chat":"chat","perplexity_search":"search"}},"persona":{"namespace":"legacy.persona","methods":{"approve_inquiry":"approveInquiry","create_account":"createAccount","create_inquiry":"createInquiry","create_report":"createReport","decline_inquiry":"declineInquiry","expire_inquiry":"expireInquiry","generate_inquiry_link":"generateInquiryLink","get_account":"getAccount","get_case":"getCase","get_document":"getDocument","get_inquiry":"getInquiry","get_report":"getReport","get_verification":"getVerification","import_accounts":"importAccountsCsv","list_accounts":"listAccounts","list_cases":"listCases","list_inquiries":"listInquiries","list_inquiry_templates":"listInquiryTemplates","list_reports":"listReports","mark_inquiry_for_review":"markInquiryForReview","print_inquiry_pdf":"printInquiryPdf","redact_account":"redactAccount","redact_inquiry":"redactInquiry","resume_inquiry":"resumeInquiry","update_account":"updateAccount","update_inquiry":"updateInquiry"}},"persona_v2":{"namespace":"persona","methods":{"approve_inquiry":"approveInquiry","create_account":"createAccount","create_inquiry":"createInquiry","create_report":"createReport","decline_inquiry":"declineInquiry","expire_inquiry":"expireInquiry","generate_inquiry_link":"generateInquiryLink","get_account":"getAccount","get_case":"getCase","get_document":"getDocument","get_inquiry":"getInquiry","get_report":"getReport","get_verification":"getVerification","import_accounts":"importAccountsCsv","list_accounts":"listAccounts","list_cases":"listCases","list_inquiries":"listInquiries","list_inquiry_templates":"listInquiryTemplates","list_reports":"listReports","mark_inquiry_for_review":"markInquiryForReview","print_inquiry_pdf":"printInquiryPdf","redact_account":"redactAccount","redact_inquiry":"redactInquiry","resume_inquiry":"resumeInquiry","update_account":"updateAccount","update_inquiry":"updateInquiry"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"pi":{"namespace":"pi"},"pinecone":{"namespace":"pinecone","methods":{"delete_vectors":"deleteVectors","describe_index":"describeIndex","describe_index_stats":"describeIndexStats","fetch":"fetchVectors","generate":"generateEmbeddings","list_indexes":"listIndexes","list_vector_ids":"listVectorIds","search_text":"searchWithText","search_vector":"searchWithVector","update_vector":"updateVector","upsert_text":"upsertText"}},"pipedrive":{"namespace":"pipedrive","methods":{"create_activity":"createActivity","create_deal":"createDeal","create_lead":"createLead","create_project":"createProject","delete_lead":"deleteLead","get_activities":"getActivities","get_all_deals":"getAllDeals","get_deal":"getDeal","get_files":"getFiles","get_leads":"getLeads","get_mail_messages":"getMailThreads","get_mail_thread":"getMailThreadMessages","get_pipeline_deals":"getPipelineDeals","get_pipelines":"getPipelines","get_projects":"getProjects","update_activity":"updateActivity","update_deal":"updateDeal","update_lead":"updateLead"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"pitchbook":{"namespace":"pitchbook","methods":{"company_active_investors":"getCompanyActiveInvestors","company_bio":"getCompanyBio","company_deal_service_providers":"getCompanyDealServiceProviders","company_deals":"getCompanyDeals","company_financials":"getCompanyFinancialsHistory","company_general_service_providers":"getCompanyServiceProviders","company_industries":"getCompanyIndustries","company_investors":"getCompanyInvestors","company_most_recent_debt_financing":"getCompanyLatestDebtFinancing","company_most_recent_financials":"getCompanyLatestFinancials","company_most_recent_financing":"getCompanyLatestFinancing","company_search":"searchCompanies","company_similar_companies":"getSimilarCompanies","company_social_analytics":"getCompanySocialAnalytics","company_updates":"getCompanyUpdates","company_vc_exit_predictions":"getVcExitPredictions","contracts_history":"getContractsHistory","cost_of_calls":"getCostOfCalls","credit_history":"getCreditHistory","credit_news":"getCreditNewsArticle","credit_news_bulk":"getCreditNewsArticlesInBulk","credit_news_most_recent":"getRecentCreditNews","credit_news_search":"searchCreditNews","deal_bio":"getDealBio","deal_cap_table_history":"getDealCapTable","deal_debt_lenders":"getDealDebtAndLenders","deal_detailed":"getDealDetail","deal_investors":"getDealInvestors","deal_multiples":"getDealMultiples","deal_search":"searchDeals","deal_service_providers":"getDealServiceProviders","deal_stock_info":"getDealStockInfo","deal_tranche_info":"getDealTranches","deal_updates":"getDealUpdates","deal_valuation":"getDealValuation","entity_affiliates":"getEntityAffiliates","entity_locations":"getEntityLocations","entity_news":"getEntityNews","entity_people":"getEntityPeople","entity_updates":"getEntityUpdates","fund_active_investments":"getFundActiveInvestments","fund_benchmark":"getFundBenchmark","fund_bio":"getFundBio","fund_cash_flows":"getFundCashFlows","fund_commitments":"getFundCommitments","fund_investment_preferences":"getFundPreferences","fund_investments":"getFundInvestments","fund_performance":"getFundPerformance","fund_search":"searchFunds","fund_team":"getFundTeam","fund_updates":"getFundUpdates","investor_active_investments":"getInvestorActiveInvestments","investor_bio":"getInvestorBio","investor_board_seats":"getInvestorBoardSeats","investor_deal_service_providers":"getInvestorDealServiceProviders","investor_funds":"getInvestorFunds","investor_general_service_providers":"getInvestorServiceProviders","investor_investments":"getInvestorInvestments","investor_last_closed_fund":"getInvestorLastClosedFund","investor_preferences":"getInvestorPreferences","investor_search":"searchInvestors","investor_updates":"getInvestorUpdates","limited_partner_actual_allocations":"getLpActualAllocations","limited_partner_bio":"getLimitedPartnerBio","limited_partner_commitment_aggregates":"getLpCommitmentTotals","limited_partner_commitment_preferences":"getLpCommitmentPreferences","limited_partner_commitments_detailed":"getLpCommitments","limited_partner_search":"searchLimitedPartners","limited_partner_service_providers":"getLpServiceProviders","limited_partner_target_allocations":"getLpTargetAllocations","limited_partner_updates":"getLpUpdates","lookup_table_structure":"listLookupTables","lookup_tables":"getLookupTableCodes","patent_detailed":"getPatentDetail","patent_search":"searchCompanyPatents","people_search":"searchPeople","person_bio":"getPersonBio","person_contact":"getPersonContact","person_education_work":"getPersonHistory","sandbox_entities":"listSandboxEntities","search":"searchAllEntities","service_provider_bio":"getServiceProviderBio","service_provider_search":"searchServiceProviders","service_provider_updates":"getServiceProviderUpdates","serviced_companies":"getServicedCompanies","serviced_deals":"getServicedDeals","serviced_funds":"getServicedFunds","serviced_investors":"getServicedInvestors","serviced_limited_partners":"getServicedLimitedPartners","shared_search":"sharedSearch","usage_report":"getUsageReport"}},"plane":{"namespace":"legacy.plane","methods":{"plane_archive_project":"archiveAProject","plane_archive_work_item":"archiveAWorkItem","plane_confirm_attachment_upload":"confirmAWorkItemAttachmentUpload","plane_create_attachment_upload":"createAWorkItemAttachmentUpload","plane_create_comment":"createAComment","plane_create_cycle":"createACycle","plane_create_label":"createALabel","plane_create_link":"createALink","plane_create_module":"createAModule","plane_create_project":"createAProject","plane_create_project_page":"createAProjectPage","plane_create_state":"createAState","plane_create_webhook":"createAWebhook","plane_create_work_item":"createAWorkItem","plane_delete_attachment":"deleteAnAttachment","plane_delete_comment":"deleteAComment","plane_delete_cycle":"deleteACycle","plane_delete_label":"deleteALabel","plane_delete_link":"deleteALink","plane_delete_module":"deleteAModule","plane_delete_project":"deleteAProject","plane_delete_project_page":"deleteAProjectPage","plane_delete_state":"deleteAState","plane_delete_webhook":"deleteAWebhook","plane_delete_work_item":"deleteAWorkItem","plane_get_attachment":"getAnAttachment","plane_get_comment":"getAComment","plane_get_current_user":"getCurrentUser","plane_get_cycle":"getACycle","plane_get_label":"getALabel","plane_get_link":"getALink","plane_get_module":"getAModule","plane_get_project":"getAProject","plane_get_project_page":"getAProjectPage","plane_get_project_summary":"getAProjectSummary","plane_get_state":"getAState","plane_get_webhook":"getAWebhook","plane_get_work_item":"getAWorkItem","plane_get_work_item_by_identifier":"getAWorkItemByIdentifier","plane_list_attachments":"listAttachments","plane_list_comments":"listComments","plane_list_cycles":"listCycles","plane_list_labels":"listLabels","plane_list_links":"listLinks","plane_list_modules":"listModules","plane_list_project_pages":"listProjectPages","plane_list_projects":"listProjects","plane_list_states":"listStates","plane_list_webhooks":"listWebhooks","plane_list_work_items":"listWorkItems","plane_list_workspace_work_items":"listWorkItemsAcrossAWorkspace","plane_manage_cycle_work_items":"addOrRemoveCycleWorkItems","plane_manage_module_work_items":"addOrRemoveModuleWorkItems","plane_regenerate_webhook_secret":"regenerateAWebhookSecret","plane_transfer_cycle_work_items":"transferWorkItemsBetweenCycles","plane_unarchive_project":"unarchiveAProject","plane_unarchive_work_item":"unarchiveAWorkItem","plane_update_comment":"updateAComment","plane_update_cycle":"updateACycle","plane_update_label":"updateALabel","plane_update_link":"updateALink","plane_update_module":"updateAModule","plane_update_project":"updateAProject","plane_update_project_page":"updateAProjectPage","plane_update_state":"updateAState","plane_update_webhook":"updateAWebhook","plane_update_work_item":"updateAWorkItem"},"triggers":{"plane_cycle_archived":"cycleArchived","plane_cycle_created":"cycleCreated","plane_cycle_deleted":"cycleDeleted","plane_cycle_updated":"cycleUpdated","plane_milestone_created":"milestoneCreated","plane_milestone_deleted":"milestoneDeleted","plane_milestone_updated":"milestoneUpdated","plane_module_archived":"moduleArchived","plane_module_created":"moduleCreated","plane_module_deleted":"moduleDeleted","plane_module_updated":"moduleUpdated","plane_page_archived":"pageArchived","plane_page_comment_created":"pageCommentCreated","plane_page_comment_deleted":"pageCommentDeleted","plane_page_comment_updated":"pageCommentUpdated","plane_page_created":"pageCreated","plane_page_deleted":"pageDeleted","plane_page_updated":"pageUpdated","plane_project_archived":"projectArchived","plane_project_created":"projectCreated","plane_project_deleted":"projectDeleted","plane_project_updated":"projectUpdated","plane_webhook":"webhook","plane_workitem_archived":"workitemArchived","plane_workitem_attachment_created":"workitemAttachmentCreated","plane_workitem_attachment_deleted":"workitemAttachmentDeleted","plane_workitem_attachment_updated":"workitemAttachmentUpdated","plane_workitem_comment_created":"workitemCommentCreated","plane_workitem_comment_deleted":"workitemCommentDeleted","plane_workitem_comment_updated":"workitemCommentUpdated","plane_workitem_created":"workitemCreated","plane_workitem_deleted":"workitemDeleted","plane_workitem_dependency_created":"workitemDependencyCreated","plane_workitem_dependency_deleted":"workitemDependencyDeleted","plane_workitem_link_created":"workitemLinkCreated","plane_workitem_link_deleted":"workitemLinkDeleted","plane_workitem_link_updated":"workitemLinkUpdated","plane_workitem_page_link_created":"workitemPageLinkCreated","plane_workitem_page_link_deleted":"workitemPageLinkDeleted","plane_workitem_relation_created":"workitemRelationCreated","plane_workitem_relation_deleted":"workitemRelationDeleted","plane_workitem_updated":"workitemUpdated","plane_workitem_vote_created":"workitemVoteCreated","plane_workitem_vote_deleted":"workitemVoteDeleted"}},"plane_v2":{"namespace":"plane","methods":{"plane_archive_project":"archiveAProject","plane_archive_work_item":"archiveAWorkItem","plane_confirm_attachment_upload":"confirmAWorkItemAttachmentUpload","plane_create_attachment_upload":"createAWorkItemAttachmentUpload","plane_create_comment":"createAComment","plane_create_cycle":"createACycle","plane_create_label":"createALabel","plane_create_link":"createALink","plane_create_module":"createAModule","plane_create_project":"createAProject","plane_create_project_page":"createAProjectPage","plane_create_state":"createAState","plane_create_webhook":"createAWebhook","plane_create_work_item":"createAWorkItem","plane_delete_attachment":"deleteAnAttachment","plane_delete_comment":"deleteAComment","plane_delete_cycle":"deleteACycle","plane_delete_label":"deleteALabel","plane_delete_link":"deleteALink","plane_delete_module":"deleteAModule","plane_delete_project":"deleteAProject","plane_delete_project_page":"deleteAProjectPage","plane_delete_state":"deleteAState","plane_delete_webhook":"deleteAWebhook","plane_delete_work_item":"deleteAWorkItem","plane_get_attachment":"getAnAttachment","plane_get_comment":"getAComment","plane_get_current_user":"getCurrentUser","plane_get_cycle":"getACycle","plane_get_label":"getALabel","plane_get_link":"getALink","plane_get_module":"getAModule","plane_get_project":"getAProject","plane_get_project_page":"getAProjectPage","plane_get_project_summary":"getAProjectSummary","plane_get_state":"getAState","plane_get_webhook":"getAWebhook","plane_get_work_item":"getAWorkItem","plane_get_work_item_by_identifier":"getAWorkItemByIdentifier","plane_list_attachments":"listAttachments","plane_list_comments":"listComments","plane_list_cycles":"listCycles","plane_list_labels":"listLabels","plane_list_links":"listLinks","plane_list_modules":"listModules","plane_list_project_pages":"listProjectPages","plane_list_projects":"listProjects","plane_list_states":"listStates","plane_list_webhooks":"listWebhooks","plane_list_work_items":"listWorkItems","plane_list_workspace_work_items":"listWorkItemsAcrossAWorkspace","plane_manage_cycle_work_items":"addOrRemoveCycleWorkItems","plane_manage_module_work_items":"addOrRemoveModuleWorkItems","plane_regenerate_webhook_secret":"regenerateAWebhookSecret","plane_transfer_cycle_work_items":"transferWorkItemsBetweenCycles","plane_unarchive_project":"unarchiveAProject","plane_unarchive_work_item":"unarchiveAWorkItem","plane_update_comment":"updateAComment","plane_update_cycle":"updateACycle","plane_update_label":"updateALabel","plane_update_link":"updateALink","plane_update_module":"updateAModule","plane_update_project":"updateAProject","plane_update_project_page":"updateAProjectPage","plane_update_state":"updateAState","plane_update_webhook":"updateAWebhook","plane_update_work_item":"updateAWorkItem"},"triggers":{"plane_cycle_archived":"cycleArchived","plane_cycle_created":"cycleCreated","plane_cycle_deleted":"cycleDeleted","plane_cycle_updated":"cycleUpdated","plane_milestone_created":"milestoneCreated","plane_milestone_deleted":"milestoneDeleted","plane_milestone_updated":"milestoneUpdated","plane_module_archived":"moduleArchived","plane_module_created":"moduleCreated","plane_module_deleted":"moduleDeleted","plane_module_updated":"moduleUpdated","plane_page_archived":"pageArchived","plane_page_comment_created":"pageCommentCreated","plane_page_comment_deleted":"pageCommentDeleted","plane_page_comment_updated":"pageCommentUpdated","plane_page_created":"pageCreated","plane_page_deleted":"pageDeleted","plane_page_updated":"pageUpdated","plane_project_archived":"projectArchived","plane_project_created":"projectCreated","plane_project_deleted":"projectDeleted","plane_project_updated":"projectUpdated","plane_webhook":"webhook","plane_workitem_archived":"workitemArchived","plane_workitem_attachment_created":"workitemAttachmentCreated","plane_workitem_attachment_deleted":"workitemAttachmentDeleted","plane_workitem_attachment_updated":"workitemAttachmentUpdated","plane_workitem_comment_created":"workitemCommentCreated","plane_workitem_comment_deleted":"workitemCommentDeleted","plane_workitem_comment_updated":"workitemCommentUpdated","plane_workitem_created":"workitemCreated","plane_workitem_deleted":"workitemDeleted","plane_workitem_dependency_created":"workitemDependencyCreated","plane_workitem_dependency_deleted":"workitemDependencyDeleted","plane_workitem_link_created":"workitemLinkCreated","plane_workitem_link_deleted":"workitemLinkDeleted","plane_workitem_link_updated":"workitemLinkUpdated","plane_workitem_page_link_created":"workitemPageLinkCreated","plane_workitem_page_link_deleted":"workitemPageLinkDeleted","plane_workitem_relation_created":"workitemRelationCreated","plane_workitem_relation_deleted":"workitemRelationDeleted","plane_workitem_updated":"workitemUpdated","plane_workitem_vote_created":"workitemVoteCreated","plane_workitem_vote_deleted":"workitemVoteDeleted"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"planetscale":{"namespace":"legacy.planetscale","methods":{"close_deploy_request":"closeDeployRequestVitess","create_backup":"createBackup","create_branch":"createBranch","create_deploy_request":"createDeployRequestVitess","delete_branch":"deleteBranch","get_backup":"getBackup","get_branch":"getBranch","get_database":"getDatabase","get_deploy_request":"getDeployRequestVitess","list_backups":"listBackups","list_branches":"listBranches","list_databases":"listDatabases","list_deploy_requests":"listDeployRequestsVitess","queue_deploy_request":"queueDeployRequestVitess","review_deploy_request":"reviewDeployRequestVitess"}},"planetscale_v2":{"namespace":"planetscale","methods":{"close_deploy_request":"closeDeployRequestVitess","create_backup":"createBackup","create_branch":"createBranch","create_deploy_request":"createDeployRequestVitess","delete_branch":"deleteBranch","get_backup":"getBackup","get_branch":"getBranch","get_database":"getDatabase","get_deploy_request":"getDeployRequestVitess","list_backups":"listBackups","list_branches":"listBranches","list_databases":"listDatabases","list_deploy_requests":"listDeployRequestsVitess","queue_deploy_request":"queueDeployRequestVitess","review_deploy_request":"reviewDeployRequestVitess"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"polymarket":{"namespace":"polymarket","methods":{"get_activity":"getActivity","get_event":"getEvent","get_events":"getEvents","get_holders":"getMarketHolders","get_last_trade_price":"getLastTradePrice","get_leaderboard":"getLeaderboard","get_market":"getMarket","get_markets":"getMarkets","get_midpoint":"getMidpoint","get_orderbook":"getOrderbook","get_positions":"getPositions","get_price":"getPrice","get_price_history":"getPriceHistory","get_series":"getSeries","get_series_by_id":"getSeriesById","get_spread":"getSpread","get_tags":"getTags","get_tick_size":"getTickSize","get_trades":"getTrades","search":"search"}},"postgresql":{"namespace":"legacy.postgresql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"postgresql_v2":{"namespace":"postgresql","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"posthog":{"namespace":"posthog","methods":{"posthog_batch_events":"batchEvents","posthog_capture_event":"captureEvent","posthog_create_annotation":"createAnnotation","posthog_create_cohort":"createCohort","posthog_create_dashboard":"createDashboard","posthog_create_experiment":"createExperiment","posthog_create_feature_flag":"createFeatureFlag","posthog_create_insight":"createInsight","posthog_create_survey":"createSurvey","posthog_delete_feature_flag":"deleteFeatureFlag","posthog_delete_person":"deletePerson","posthog_delete_survey":"deleteSurvey","posthog_evaluate_flags":"evaluateFlags","posthog_get_cohort":"getCohort","posthog_get_dashboard":"getDashboard","posthog_get_event_definition":"getEventDefinition","posthog_get_experiment":"getExperiment","posthog_get_feature_flag":"getFeatureFlag","posthog_get_insight":"getInsight","posthog_get_organization":"getOrganization","posthog_get_person":"getPerson","posthog_get_project":"getProject","posthog_get_property_definition":"getPropertyDefinition","posthog_get_session_recording":"getSessionRecording","posthog_get_survey":"getSurvey","posthog_list_actions":"listActions","posthog_list_annotations":"listAnnotations","posthog_list_cohorts":"listCohorts","posthog_list_dashboards":"listDashboards","posthog_list_event_definitions":"listEventDefinitions","posthog_list_experiments":"listExperiments","posthog_list_feature_flags":"listFeatureFlags","posthog_list_insights":"listInsights","posthog_list_organizations":"listOrganizations","posthog_list_persons":"listPersons","posthog_list_projects":"listProjects","posthog_list_property_definitions":"listPropertyDefinitions","posthog_list_recording_playlists":"listRecordingPlaylists","posthog_list_session_recordings":"listSessionRecordings","posthog_list_surveys":"listSurveys","posthog_query":"runQueryHogQl","posthog_update_cohort":"updateCohort","posthog_update_event_definition":"updateEventDefinition","posthog_update_experiment":"updateExperiment","posthog_update_feature_flag":"updateFeatureFlag","posthog_update_insight":"updateInsight","posthog_update_property_definition":"updatePropertyDefinition","posthog_update_survey":"updateSurvey"}},"powerbi":{"namespace":"powerbi","methods":{"powerbi_execute_query":"executeDaxQuery","powerbi_get_dataset":"getSemanticModel","powerbi_get_refresh_history":"getRefreshHistory","powerbi_get_report":"getReport","powerbi_list_datasets":"listSemanticModels","powerbi_list_reports":"listReports","powerbi_list_workspaces":"listWorkspaces","powerbi_refresh_dataset":"refreshSemanticModel"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"profound":{"namespace":"legacy.profound","methods":{"bot_logs":"botLogs","bots_report":"botsReport","category_assets":"categoryAssets","category_personas":"categoryPersonas","category_prompts":"categoryPrompts","category_tags":"categoryTags","category_topics":"categoryTopics","citation_prompts":"citationPrompts","citations_report":"citationsReport","list_assets":"listAssets","list_categories":"listCategories","list_domains":"listDomains","list_models":"listModels","list_optimizations":"listOptimizations","list_personas":"listPersonas","list_regions":"listRegions","optimization_analysis":"optimizationAnalysis","prompt_answers":"promptAnswers","prompt_volume":"promptVolume","query_fanouts":"queryFanouts","raw_logs":"rawLogs","referrals_report":"referralsReport","sentiment_report":"sentimentReport","visibility_report":"visibilityReport"}},"profound_v2":{"namespace":"profound","methods":{"bot_logs":"botLogs","bots_report":"botsReport","category_assets":"categoryAssets","category_personas":"categoryPersonas","category_prompts":"categoryPrompts","category_tags":"categoryTags","category_topics":"categoryTopics","citation_prompts":"citationPrompts","citations_report":"citationsReport","list_assets":"listAssets","list_categories":"listCategories","list_domains":"listDomains","list_models":"listModels","list_optimizations":"listOptimizations","list_personas":"listPersonas","list_regions":"listRegions","optimization_analysis":"optimizationAnalysis","prompt_answers":"promptAnswers","prompt_volume":"promptVolume","query_fanouts":"queryFanouts","raw_logs":"rawLogs","referrals_report":"referralsReport","sentiment_report":"sentimentReport","visibility_report":"visibilityReport"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"prospeo":{"namespace":"prospeo","methods":{"prospeo_account_information":"accountInformation","prospeo_bulk_enrich_company":"bulkEnrichCompany","prospeo_bulk_enrich_person":"bulkEnrichPerson","prospeo_enrich_company":"enrichCompany","prospeo_enrich_person":"enrichPerson","prospeo_search_company":"searchCompany","prospeo_search_person":"searchPerson","prospeo_search_suggestions":"searchSuggestions"}},"pulse":{"namespace":"legacy.pulse"},"pulse_v2":{"namespace":"legacy.pulseV2"},"pulse_v3":{"namespace":"pulse","paramAliases":{"action":{"oauthCredential":"credential"}}},"qdrant":{"namespace":"legacy.qdrant","methods":{"fetch":"fetch","search":"search","upsert":"upsert"}},"qdrant_v2":{"namespace":"qdrant","methods":{"fetch":"fetch","search":"search","upsert":"upsert"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"quartr":{"namespace":"legacy.quartr","methods":{"get_audio":"getAudio","get_company":"getCompany","get_event":"getEvent","get_event_summary":"getEventSummary","get_report":"getReport","get_slide_deck":"getSlideDeck","get_transcript":"getTranscript","list_audio":"listAudio","list_companies":"listCompanies","list_document_types":"listDocumentTypes","list_documents":"listDocuments","list_event_types":"listEventTypes","list_events":"listEvents","list_live_events":"listLiveEvents","list_reports":"listReports","list_slide_decks":"listSlideDecks","list_transcripts":"listTranscripts"}},"quartr_v2":{"namespace":"quartr","methods":{"get_audio":"getAudio","get_company":"getCompany","get_event":"getEvent","get_event_summary":"getEventSummary","get_report":"getReport","get_slide_deck":"getSlideDeck","get_transcript":"getTranscript","list_audio":"listAudio","list_companies":"listCompanies","list_document_types":"listDocumentTypes","list_documents":"listDocuments","list_event_types":"listEventTypes","list_events":"listEvents","list_live_events":"listLiveEvents","list_reports":"listReports","list_slide_decks":"listSlideDecks","list_transcripts":"listTranscripts"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"quickbooks":{"namespace":"quickbooks","methods":{"quickbooks_add_attachment":"addAttachment","quickbooks_create_bill":"createBill","quickbooks_create_bill_payment":"createBillPayment","quickbooks_create_credit_memo":"createCreditMemo","quickbooks_create_customer":"createCustomer","quickbooks_create_customer_payment":"createCustomerPayment","quickbooks_create_deposit":"createDeposit","quickbooks_create_employee":"createEmployee","quickbooks_create_estimate":"createEstimate","quickbooks_create_invoice":"createInvoice","quickbooks_create_item":"createItem","quickbooks_create_journal_entry":"createJournalEntry","quickbooks_create_purchase":"createPurchaseOrExpense","quickbooks_create_purchase_order":"createPurchaseOrder","quickbooks_create_refund_receipt":"createRefundReceipt","quickbooks_create_sales_receipt":"createSalesReceipt","quickbooks_create_vendor":"createVendor","quickbooks_create_vendor_credit":"createVendorCredit","quickbooks_download_attachment":"downloadAttachment","quickbooks_download_transaction_pdf":"downloadTransactionPdf","quickbooks_email_transaction":"emailTransaction","quickbooks_get_company_info":"getCompanyInfo","quickbooks_read_accounting_transactions":"readAccountingTransactions","quickbooks_read_attachments":"readAttachments","quickbooks_read_master_data":"readMasterData","quickbooks_read_purchasing_transactions":"readPurchasingTransactions","quickbooks_read_sales_transactions":"readSalesTransactions","quickbooks_run_financial_report":"runFinancialReport","quickbooks_update_bill":"updateBill","quickbooks_update_bill_payment":"updateBillPayment","quickbooks_update_credit_memo":"updateCreditMemo","quickbooks_update_customer":"updateCustomer","quickbooks_update_customer_payment":"updateCustomerPayment","quickbooks_update_deposit":"updateDeposit","quickbooks_update_employee":"updateEmployee","quickbooks_update_estimate":"updateEstimate","quickbooks_update_invoice":"updateInvoice","quickbooks_update_item":"updateItem","quickbooks_update_journal_entry":"updateJournalEntry","quickbooks_update_purchase":"updatePurchaseOrExpense","quickbooks_update_purchase_order":"updatePurchaseOrder","quickbooks_update_refund_receipt":"updateRefundReceipt","quickbooks_update_sales_receipt":"updateSalesReceipt","quickbooks_update_vendor":"updateVendor","quickbooks_update_vendor_credit":"updateVendorCredit","quickbooks_void_bill_payment":"voidBillPayment","quickbooks_void_customer_payment":"voidCustomerPayment","quickbooks_void_invoice":"voidInvoice","quickbooks_void_sales_receipt":"voidSalesReceipt"},"triggers":{"quickbooks_account_events":"accountEvents","quickbooks_bill_events":"billEvents","quickbooks_bill_payment_events":"billPaymentEvents","quickbooks_budget_events":"budgetEvents","quickbooks_class_events":"classEvents","quickbooks_credit_memo_events":"creditMemoEvents","quickbooks_currency_events":"currencyEvents","quickbooks_customer_events":"customerEvents","quickbooks_department_events":"departmentEvents","quickbooks_deposit_events":"depositEvents","quickbooks_employee_events":"employeeEvents","quickbooks_estimate_events":"estimateEvents","quickbooks_invoice_events":"invoiceEvents","quickbooks_item_events":"itemEvents","quickbooks_journal_code_events":"journalCodeEvents","quickbooks_journal_entry_events":"journalEntryEvents","quickbooks_payment_events":"paymentEvents","quickbooks_payment_method_events":"paymentMethodEvents","quickbooks_preferences_updated":"preferencesUpdated","quickbooks_purchase_events":"purchaseEvents","quickbooks_purchase_order_events":"purchaseOrderEvents","quickbooks_refund_receipt_events":"refundReceiptEvents","quickbooks_sales_receipt_events":"salesReceiptEvents","quickbooks_tax_agency_events":"taxAgencyEvents","quickbooks_term_events":"termEvents","quickbooks_time_activity_events":"timeActivityEvents","quickbooks_transfer_events":"transferEvents","quickbooks_vendor_credit_events":"vendorCreditEvents","quickbooks_vendor_events":"vendorEvents"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"quiver":{"namespace":"legacy.quiver","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"}},"quiver_v2":{"namespace":"legacy.quiverV2","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"}},"quiver_v3":{"namespace":"quiver","methods":{"image_to_svg":"imageToSvg","list_models":"listModels","text_to_svg":"textToSvg"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"rabbitmq":{"namespace":"rabbitmq","methods":{"rabbitmq_create_binding":"createBinding","rabbitmq_create_exchange":"createExchange","rabbitmq_create_policy":"createPolicy","rabbitmq_create_queue":"createQueue","rabbitmq_delete_binding":"deleteBinding","rabbitmq_delete_exchange":"deleteExchange","rabbitmq_delete_policy":"deletePolicy","rabbitmq_delete_queue":"deleteQueue","rabbitmq_get_exchange":"getExchange","rabbitmq_get_messages":"getMessages","rabbitmq_get_overview":"getOverview","rabbitmq_get_queue":"getQueue","rabbitmq_health_check":"healthCheck","rabbitmq_list_bindings":"listQueueBindings","rabbitmq_list_channels":"listChannels","rabbitmq_list_connections":"listConnections","rabbitmq_list_consumers":"listConsumers","rabbitmq_list_exchange_bindings":"listExchangeBindings","rabbitmq_list_exchanges":"listExchanges","rabbitmq_list_nodes":"listNodes","rabbitmq_list_policies":"listPolicies","rabbitmq_list_queues":"listQueues","rabbitmq_list_vhosts":"listVirtualHosts","rabbitmq_publish_message":"publishMessage","rabbitmq_purge_queue":"purgeQueue"}},"railway":{"namespace":"legacy.railway","methods":{"create_environment":"createEnvironment","create_project":"createProject","create_service":"createService","delete_environment":"deleteEnvironment","delete_project":"deleteProject","delete_service":"deleteService","delete_variable":"deleteVariable","deploy_service":"deployService","get_deployment":"getDeployment","get_deployment_logs":"getDeploymentLogs","get_project":"getProject","list_deployments":"listDeployments","list_project_members":"listProjectMembers","list_projects":"listProjects","list_variables":"listVariables","restart_deployment":"restartDeployment","rollback_deployment":"rollbackDeployment","transfer_project":"transferProject","update_project":"updateProject","upsert_variable":"upsertVariable"}},"railway_v2":{"namespace":"railway","methods":{"create_environment":"createEnvironment","create_project":"createProject","create_service":"createService","delete_environment":"deleteEnvironment","delete_project":"deleteProject","delete_service":"deleteService","delete_variable":"deleteVariable","deploy_service":"deployService","get_deployment":"getDeployment","get_deployment_logs":"getDeploymentLogs","get_project":"getProject","list_deployments":"listDeployments","list_project_members":"listProjectMembers","list_projects":"listProjects","list_variables":"listVariables","restart_deployment":"restartDeployment","rollback_deployment":"rollbackDeployment","transfer_project":"transferProject","update_project":"updateProject","upsert_variable":"upsertVariable"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"ramp":{"namespace":"ramp","methods":{"create_memo":"createMemo","get_balance":"getBalance","get_bill":"getBill","get_business":"getBusiness","get_memo":"getMemo","get_physical_card":"getPhysicalCard","get_reimbursement":"getReimbursement","get_transaction":"getTransaction","get_user":"getUser","get_vendor":"getVendor","get_virtual_card":"getVirtualCard","list_bills":"listBills","list_physical_cards":"listPhysicalCards","list_reimbursements":"listReimbursements","list_transactions":"listTransactions","list_users":"listUsers","list_vendors":"listVendors","list_virtual_cards":"listVirtualCards"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"rb2b":{"namespace":"legacy.rb2b","methods":{"credit_check":"creditCheck","email_to_activity":"emailToLastActiveDate","hem_to_best_linkedin":"emailHemToBestLinkedInUrl","hem_to_business_profile":"emailHemToBusinessProfile","hem_to_linkedin":"emailHemToLinkedInSlug","hem_to_maid":"emailHemToMaid","ip_to_company":"ipToCompany","ip_to_hem":"ipToHem","ip_to_maid":"ipToMaid","linkedin_slug_search":"linkedInSlugSearch","linkedin_to_best_personal_email":"linkedInToBestPersonalEmail","linkedin_to_business_profile":"linkedInToBusinessProfile","linkedin_to_hashed_emails":"linkedInToHashedEmails","linkedin_to_mobile_phone":"linkedInToMobilePhone","linkedin_to_personal_email":"linkedInToPersonalEmail"}},"rb2b_v2":{"namespace":"rb2b","methods":{"credit_check":"creditCheck","email_to_activity":"emailToLastActiveDate","hem_to_best_linkedin":"emailHemToBestLinkedInUrl","hem_to_business_profile":"emailHemToBusinessProfile","hem_to_linkedin":"emailHemToLinkedInSlug","hem_to_maid":"emailHemToMaid","ip_to_company":"ipToCompany","ip_to_hem":"ipToHem","ip_to_maid":"ipToMaid","linkedin_slug_search":"linkedInSlugSearch","linkedin_to_best_personal_email":"linkedInToBestPersonalEmail","linkedin_to_business_profile":"linkedInToBusinessProfile","linkedin_to_hashed_emails":"linkedInToHashedEmails","linkedin_to_mobile_phone":"linkedInToMobilePhone","linkedin_to_personal_email":"linkedInToPersonalEmail"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"rds":{"namespace":"legacy.rds","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"}},"rds_v2":{"namespace":"rds","methods":{"delete":"deleteData","execute":"executeRawSql","insert":"insertData","introspect":"introspectSchema","query":"querySelect","update":"updateData"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"reddit":{"namespace":"reddit","methods":{"delete":"delete_","edit":"edit","get_comments":"getComments","get_controversial":"getControversialPosts","get_info":"getInfoById","get_me":"getMyProfile","get_messages":"getMessages","get_posts":"getPosts","get_saved":"getSavedItems","get_subreddit_info":"getSubredditInfo","get_subreddit_rules":"getSubredditRules","get_user":"getUserProfile","get_user_comments":"getUserComments","get_user_posts":"getUserPosts","hide":"hide","list_my_subreddits":"listMySubreddits","lock":"lockMod","mark_all_read":"markAllMessagesRead","mark_read":"markMessagesRead","marknsfw":"markNsfw","mod_approve":"approveMod","mod_distinguish":"distinguishMod","mod_remove":"removeMod","mod_sticky":"stickyMod","reply":"reply","report":"report","save":"save","search":"searchSubreddit","search_subreddits":"searchSubreddits","send_message":"sendMessage","submit_post":"submitPost","subscribe":"subscribe","unhide":"unhide","unlock":"unlockMod","unmarknsfw":"unmarkNsfw","unsave":"unsave","vote":"vote"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"redis":{"namespace":"redis","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hdel":"hdel","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","llen":"llen","lpop":"lpop","lpush":"lpush","lrange":"lrange","persist":"persist","rpop":"rpop","rpush":"rpush","set":"set","setnx":"setnx","ttl":"ttl"}},"reducto":{"namespace":"legacy.reducto"},"reducto_v2":{"namespace":"legacy.reductoV2"},"reducto_v3":{"namespace":"reducto","paramAliases":{"action":{"oauthCredential":"credential"}}},"resend":{"namespace":"legacy.resend","methods":{"cancel_email":"cancelEmail","create_audience":"createAudience","create_broadcast":"createBroadcast","create_contact":"createContact","delete_audience":"deleteAudience","delete_contact":"deleteContact","get_audience":"getAudience","get_broadcast":"getBroadcast","get_contact":"getContact","get_email":"getEmail","list_audiences":"listAudiences","list_contacts":"listContacts","list_domains":"listDomains","send_broadcast":"sendBroadcast","send_email":"sendEmail","update_contact":"updateContact"},"triggers":{"resend_email_bounced":"emailBounced","resend_email_clicked":"emailClicked","resend_email_complained":"emailComplained","resend_email_delivered":"emailDelivered","resend_email_failed":"emailFailed","resend_email_opened":"emailOpened","resend_email_sent":"emailSent","resend_webhook":"webhook"}},"resend_v2":{"namespace":"resend","methods":{"cancel_email":"cancelEmail","create_audience":"createAudience","create_broadcast":"createBroadcast","create_contact":"createContact","delete_audience":"deleteAudience","delete_contact":"deleteContact","get_audience":"getAudience","get_broadcast":"getBroadcast","get_contact":"getContact","get_email":"getEmail","list_audiences":"listAudiences","list_contacts":"listContacts","list_domains":"listDomains","send_broadcast":"sendBroadcast","send_email":"sendEmail","update_contact":"updateContact"},"triggers":{"resend_email_bounced":"emailBounced","resend_email_clicked":"emailClicked","resend_email_complained":"emailComplained","resend_email_delivered":"emailDelivered","resend_email_failed":"emailFailed","resend_email_opened":"emailOpened","resend_email_sent":"emailSent","resend_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"response":{"namespace":"response"},"revenuecat":{"namespace":"revenuecat","methods":{"create_purchase":"createPurchase","defer_google_subscription":"deferGoogleSubscription","delete_customer":"deleteCustomer","get_customer":"getCustomer","grant_entitlement":"grantEntitlement","list_offerings":"listOfferings","refund_google_subscription":"refundGoogleSubscription","revoke_entitlement":"revokeEntitlement","revoke_google_subscription":"revokeGoogleSubscription","update_subscriber_attributes":"updateSubscriberAttributes"},"triggers":{"revenuecat_cancellation":"cancellation","revenuecat_expiration":"expiration","revenuecat_initial_purchase":"initialPurchase","revenuecat_non_renewing_purchase":"nonRenewingPurchase","revenuecat_product_change":"productChange","revenuecat_renewal":"renewal"}},"rippling":{"namespace":"legacy.rippling","methods":{"bulk_create_custom_object_records":"bulkCreateCustomObjectRecords","bulk_delete_custom_object_records":"bulkDeleteCustomObjectRecords","bulk_update_custom_object_records":"bulkUpdateCustomObjectRecords","create_business_partner":"createBusinessPartner","create_business_partner_group":"createBusinessPartnerGroup","create_custom_app":"createCustomApp","create_custom_object":"createCustomObject","create_custom_object_field":"createCustomObjectField","create_custom_object_record":"createCustomObjectRecord","create_custom_page":"createCustomPage","create_custom_setting":"createCustomSetting","create_department":"createDepartment","create_draft_hires":"createDraftHires","create_object_category":"createObjectCategory","create_title":"createTitle","create_work_location":"createWorkLocation","delete_business_partner":"deleteBusinessPartner","delete_business_partner_group":"deleteBusinessPartnerGroup","delete_custom_app":"deleteCustomApp","delete_custom_object":"deleteCustomObject","delete_custom_object_field":"deleteCustomObjectField","delete_custom_object_record":"deleteCustomObjectRecord","delete_custom_page":"deleteCustomPage","delete_custom_setting":"deleteCustomSetting","delete_object_category":"deleteObjectCategory","delete_title":"deleteTitle","delete_work_location":"deleteWorkLocation","get_business_partner":"getBusinessPartner","get_business_partner_group":"getBusinessPartnerGroup","get_current_user":"getCurrentUser","get_custom_app":"getCustomApp","get_custom_object":"getCustomObject","get_custom_object_field":"getCustomObjectField","get_custom_object_record":"getCustomObjectRecord","get_custom_object_record_by_external_id":"getCustomObjectRecordByExternalId","get_custom_page":"getCustomPage","get_custom_setting":"getCustomSetting","get_department":"getDepartment","get_employment_type":"getEmploymentType","get_job_function":"getJobFunction","get_object_category":"getObjectCategory","get_report_run":"getReportRun","get_supergroup":"getSupergroup","get_team":"getTeam","get_title":"getTitle","get_user":"getUser","get_work_location":"getWorkLocation","get_worker":"getWorker","list_business_partner_groups":"listBusinessPartnerGroups","list_business_partners":"listBusinessPartners","list_companies":"listCompanies","list_custom_apps":"listCustomApps","list_custom_fields":"listCustomFields","list_custom_object_fields":"listCustomObjectFields","list_custom_object_records":"listCustomObjectRecords","list_custom_objects":"listCustomObjects","list_custom_pages":"listCustomPages","list_custom_settings":"listCustomSettings","list_departments":"listDepartments","list_employment_types":"listEmploymentTypes","list_entitlements":"listEntitlements","list_job_functions":"listJobFunctions","list_object_categories":"listObjectCategories","list_supergroup_exclusion_members":"listSupergroupExclusionMembers","list_supergroup_inclusion_members":"listSupergroupInclusionMembers","list_supergroup_members":"listSupergroupMembers","list_supergroups":"listSupergroups","list_teams":"listTeams","list_titles":"listTitles","list_users":"listUsers","list_work_locations":"listWorkLocations","list_workers":"listWorkers","query_custom_object_records":"queryCustomObjectRecords","trigger_report_run":"triggerReportRun","update_custom_app":"updateCustomApp","update_custom_object":"updateCustomObject","update_custom_object_field":"updateCustomObjectField","update_custom_object_record":"updateCustomObjectRecord","update_custom_page":"updateCustomPage","update_custom_setting":"updateCustomSetting","update_department":"updateDepartment","update_object_category":"updateObjectCategory","update_supergroup_exclusion_members":"updateSupergroupExclusionMembers","update_supergroup_inclusion_members":"updateSupergroupInclusionMembers","update_title":"updateTitle","update_work_location":"updateWorkLocation"}},"rippling_v2":{"namespace":"rippling","methods":{"bulk_create_custom_object_records":"bulkCreateCustomObjectRecords","bulk_delete_custom_object_records":"bulkDeleteCustomObjectRecords","bulk_update_custom_object_records":"bulkUpdateCustomObjectRecords","create_business_partner":"createBusinessPartner","create_business_partner_group":"createBusinessPartnerGroup","create_custom_app":"createCustomApp","create_custom_object":"createCustomObject","create_custom_object_field":"createCustomObjectField","create_custom_object_record":"createCustomObjectRecord","create_custom_page":"createCustomPage","create_custom_setting":"createCustomSetting","create_department":"createDepartment","create_draft_hires":"createDraftHires","create_object_category":"createObjectCategory","create_title":"createTitle","create_work_location":"createWorkLocation","delete_business_partner":"deleteBusinessPartner","delete_business_partner_group":"deleteBusinessPartnerGroup","delete_custom_app":"deleteCustomApp","delete_custom_object":"deleteCustomObject","delete_custom_object_field":"deleteCustomObjectField","delete_custom_object_record":"deleteCustomObjectRecord","delete_custom_page":"deleteCustomPage","delete_custom_setting":"deleteCustomSetting","delete_object_category":"deleteObjectCategory","delete_title":"deleteTitle","delete_work_location":"deleteWorkLocation","get_business_partner":"getBusinessPartner","get_business_partner_group":"getBusinessPartnerGroup","get_current_user":"getCurrentUser","get_custom_app":"getCustomApp","get_custom_object":"getCustomObject","get_custom_object_field":"getCustomObjectField","get_custom_object_record":"getCustomObjectRecord","get_custom_object_record_by_external_id":"getCustomObjectRecordByExternalId","get_custom_page":"getCustomPage","get_custom_setting":"getCustomSetting","get_department":"getDepartment","get_employment_type":"getEmploymentType","get_job_function":"getJobFunction","get_object_category":"getObjectCategory","get_report_run":"getReportRun","get_supergroup":"getSupergroup","get_team":"getTeam","get_title":"getTitle","get_user":"getUser","get_work_location":"getWorkLocation","get_worker":"getWorker","list_business_partner_groups":"listBusinessPartnerGroups","list_business_partners":"listBusinessPartners","list_companies":"listCompanies","list_custom_apps":"listCustomApps","list_custom_fields":"listCustomFields","list_custom_object_fields":"listCustomObjectFields","list_custom_object_records":"listCustomObjectRecords","list_custom_objects":"listCustomObjects","list_custom_pages":"listCustomPages","list_custom_settings":"listCustomSettings","list_departments":"listDepartments","list_employment_types":"listEmploymentTypes","list_entitlements":"listEntitlements","list_job_functions":"listJobFunctions","list_object_categories":"listObjectCategories","list_supergroup_exclusion_members":"listSupergroupExclusionMembers","list_supergroup_inclusion_members":"listSupergroupInclusionMembers","list_supergroup_members":"listSupergroupMembers","list_supergroups":"listSupergroups","list_teams":"listTeams","list_titles":"listTitles","list_users":"listUsers","list_work_locations":"listWorkLocations","list_workers":"listWorkers","query_custom_object_records":"queryCustomObjectRecords","trigger_report_run":"triggerReportRun","update_custom_app":"updateCustomApp","update_custom_object":"updateCustomObject","update_custom_object_field":"updateCustomObjectField","update_custom_object_record":"updateCustomObjectRecord","update_custom_page":"updateCustomPage","update_custom_setting":"updateCustomSetting","update_department":"updateDepartment","update_object_category":"updateObjectCategory","update_supergroup_exclusion_members":"updateSupergroupExclusionMembers","update_supergroup_inclusion_members":"updateSupergroupInclusionMembers","update_title":"updateTitle","update_work_location":"updateWorkLocation"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"rocketlane":{"namespace":"legacy.rocketlane","methods":{"add_field_option":"addFieldOption","add_project_members":"addProjectMembers","add_task_assignees":"addTaskAssignees","add_task_dependencies":"addTaskDependencies","add_task_followers":"addTaskFollowers","archive_project":"archiveProject","assign_placeholders":"assignPlaceholder","create_field":"createField","create_phase":"createPhase","create_project":"createProject","create_space":"createSpace","create_space_document":"createSpaceDocument","create_task":"createTask","create_time_entry":"createTimeEntry","create_time_off":"createTimeOff","delete_field":"deleteField","delete_phase":"deletePhase","delete_project":"deleteProject","delete_space":"deleteSpace","delete_space_document":"deleteSpaceDocument","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","delete_time_off":"deleteTimeOff","get_field":"getField","get_invoice":"getInvoice","get_invoice_line_items":"getInvoiceLineItems","get_invoice_payments":"getInvoicePayments","get_phase":"getPhase","get_project":"getProject","get_space":"getSpace","get_space_document":"getSpaceDocument","get_task":"getTask","get_time_entry":"getTimeEntry","get_time_off":"getTimeOff","get_user":"getUser","import_template":"importTemplate","list_fields":"listFields","list_invoices":"listInvoices","list_phases":"listPhases","list_placeholders":"listPlaceholders","list_projects":"listProjects","list_resource_allocations":"listResourceAllocations","list_space_documents":"listSpaceDocuments","list_spaces":"listSpaces","list_tasks":"listTasks","list_time_entries":"listTimeEntries","list_time_entry_categories":"listTimeEntryCategories","list_time_offs":"listTimeOffs","list_users":"listUsers","move_task_to_phase":"moveTaskToPhase","remove_project_members":"removeProjectMembers","remove_task_assignees":"removeTaskAssignees","remove_task_dependencies":"removeTaskDependencies","remove_task_followers":"removeTaskFollowers","search_time_entries":"searchTimeEntries","unassign_placeholders":"unassignPlaceholder","update_field":"updateField","update_field_option":"updateFieldOption","update_phase":"updatePhase","update_project":"updateProject","update_space":"updateSpace","update_space_document":"updateSpaceDocument","update_task":"updateTask","update_time_entry":"updateTimeEntry"}},"rocketlane_v2":{"namespace":"rocketlane","methods":{"add_field_option":"addFieldOption","add_project_members":"addProjectMembers","add_task_assignees":"addTaskAssignees","add_task_dependencies":"addTaskDependencies","add_task_followers":"addTaskFollowers","archive_project":"archiveProject","assign_placeholders":"assignPlaceholder","create_field":"createField","create_phase":"createPhase","create_project":"createProject","create_space":"createSpace","create_space_document":"createSpaceDocument","create_task":"createTask","create_time_entry":"createTimeEntry","create_time_off":"createTimeOff","delete_field":"deleteField","delete_phase":"deletePhase","delete_project":"deleteProject","delete_space":"deleteSpace","delete_space_document":"deleteSpaceDocument","delete_task":"deleteTask","delete_time_entry":"deleteTimeEntry","delete_time_off":"deleteTimeOff","get_field":"getField","get_invoice":"getInvoice","get_invoice_line_items":"getInvoiceLineItems","get_invoice_payments":"getInvoicePayments","get_phase":"getPhase","get_project":"getProject","get_space":"getSpace","get_space_document":"getSpaceDocument","get_task":"getTask","get_time_entry":"getTimeEntry","get_time_off":"getTimeOff","get_user":"getUser","import_template":"importTemplate","list_fields":"listFields","list_invoices":"listInvoices","list_phases":"listPhases","list_placeholders":"listPlaceholders","list_projects":"listProjects","list_resource_allocations":"listResourceAllocations","list_space_documents":"listSpaceDocuments","list_spaces":"listSpaces","list_tasks":"listTasks","list_time_entries":"listTimeEntries","list_time_entry_categories":"listTimeEntryCategories","list_time_offs":"listTimeOffs","list_users":"listUsers","move_task_to_phase":"moveTaskToPhase","remove_project_members":"removeProjectMembers","remove_task_assignees":"removeTaskAssignees","remove_task_dependencies":"removeTaskDependencies","remove_task_followers":"removeTaskFollowers","search_time_entries":"searchTimeEntries","unassign_placeholders":"unassignPlaceholder","update_field":"updateField","update_field_option":"updateFieldOption","update_phase":"updatePhase","update_project":"updateProject","update_space":"updateSpace","update_space_document":"updateSpaceDocument","update_task":"updateTask","update_time_entry":"updateTimeEntry"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"rootly":{"namespace":"legacy.rootly","methods":{"rootly_acknowledge_alert":"acknowledgeAlert","rootly_add_incident_event":"addIncidentEvent","rootly_add_subscribers":"addSubscribers","rootly_assign_incident_role":"assignIncidentRole","rootly_create_action_item":"createActionItem","rootly_create_alert":"createAlert","rootly_create_incident":"createIncident","rootly_create_status_page_event":"createStatusPageEvent","rootly_delete_action_item":"deleteActionItem","rootly_delete_incident":"deleteIncident","rootly_escalate_alert":"escalateAlert","rootly_get_alert":"getAlert","rootly_get_incident":"getIncident","rootly_list_action_items":"listActionItems","rootly_list_alerts":"listAlerts","rootly_list_causes":"listCauses","rootly_list_environments":"listEnvironments","rootly_list_escalation_policies":"listEscalationPolicies","rootly_list_functionalities":"listFunctionalities","rootly_list_incident_events":"listIncidentEvents","rootly_list_incident_roles":"listIncidentRoles","rootly_list_incident_types":"listIncidentTypes","rootly_list_incidents":"listIncidents","rootly_list_on_calls":"listOnCalls","rootly_list_playbooks":"listPlaybooks","rootly_list_retrospectives":"listRetrospectives","rootly_list_schedules":"listSchedules","rootly_list_services":"listServices","rootly_list_severities":"listSeverities","rootly_list_teams":"listTeams","rootly_list_users":"listUsers","rootly_mitigate_incident":"mitigateIncident","rootly_remove_subscribers":"removeSubscribers","rootly_resolve_alert":"resolveAlert","rootly_resolve_incident":"resolveIncident","rootly_run_workflow":"runWorkflow","rootly_snooze_alert":"snoozeAlert","rootly_unassign_incident_role":"unassignIncidentRole","rootly_update_action_item":"updateActionItem","rootly_update_alert":"updateAlert","rootly_update_incident":"updateIncident"},"triggers":{"rootly_alert_created":"alertCreated","rootly_incident_created":"incidentCreated","rootly_incident_resolved":"incidentResolved","rootly_incident_updated":"incidentUpdated"}},"rootly_v2":{"namespace":"rootly","methods":{"rootly_acknowledge_alert":"acknowledgeAlert","rootly_add_incident_event":"addIncidentEvent","rootly_add_subscribers":"addSubscribers","rootly_assign_incident_role":"assignIncidentRole","rootly_create_action_item":"createActionItem","rootly_create_alert":"createAlert","rootly_create_incident":"createIncident","rootly_create_status_page_event":"createStatusPageEvent","rootly_delete_action_item":"deleteActionItem","rootly_delete_incident":"deleteIncident","rootly_escalate_alert":"escalateAlert","rootly_get_alert":"getAlert","rootly_get_incident":"getIncident","rootly_list_action_items":"listActionItems","rootly_list_alerts":"listAlerts","rootly_list_causes":"listCauses","rootly_list_environments":"listEnvironments","rootly_list_escalation_policies":"listEscalationPolicies","rootly_list_functionalities":"listFunctionalities","rootly_list_incident_events":"listIncidentEvents","rootly_list_incident_roles":"listIncidentRoles","rootly_list_incident_types":"listIncidentTypes","rootly_list_incidents":"listIncidents","rootly_list_on_calls":"listOnCalls","rootly_list_playbooks":"listPlaybooks","rootly_list_retrospectives":"listRetrospectives","rootly_list_schedules":"listSchedules","rootly_list_services":"listServices","rootly_list_severities":"listSeverities","rootly_list_teams":"listTeams","rootly_list_users":"listUsers","rootly_mitigate_incident":"mitigateIncident","rootly_remove_subscribers":"removeSubscribers","rootly_resolve_alert":"resolveAlert","rootly_resolve_incident":"resolveIncident","rootly_run_workflow":"runWorkflow","rootly_snooze_alert":"snoozeAlert","rootly_unassign_incident_role":"unassignIncidentRole","rootly_update_action_item":"updateActionItem","rootly_update_alert":"updateAlert","rootly_update_incident":"updateIncident"},"triggers":{"rootly_alert_created":"alertCreated","rootly_incident_created":"incidentCreated","rootly_incident_resolved":"incidentResolved","rootly_incident_updated":"incidentUpdated"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"router":{"namespace":"legacy.router"},"router_v2":{"namespace":"router"},"rss":{"namespace":"trigger.rss"},"s3":{"namespace":"legacy.s3","methods":{"copy_object":"copyObject","create_bucket":"createBucket","delete_bucket":"deleteBucket","delete_object":"deleteObject","delete_objects":"deleteObjectsBatch","get_object":"downloadFile","head_object":"headObjectMetadata","list_buckets":"listBuckets","list_objects":"listObjects","presigned_url":"presignedUrl","put_object":"uploadFile"}},"s3_v2":{"namespace":"s3","methods":{"copy_object":"copyObject","create_bucket":"createBucket","delete_bucket":"deleteBucket","delete_object":"deleteObject","delete_objects":"deleteObjectsBatch","get_object":"downloadFile","head_object":"headObjectMetadata","list_buckets":"listBuckets","list_objects":"listObjects","presigned_url":"presignedUrl","put_object":"uploadFile"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"sailpoint":{"namespace":"legacy.sailpoint","methods":{"sailpoint_approve_access_request":"approveAccessRequest","sailpoint_cancel_access_request":"cancelAccessRequest","sailpoint_decide_certification_review_items":"decideCertificationReviewItems","sailpoint_get_access_profile":"getAccessProfile","sailpoint_get_access_profile_entitlements":"getAccessProfileEntitlements","sailpoint_get_access_request_config":"getAccessRequestConfig","sailpoint_get_access_request_status":"getAccessRequestStatus","sailpoint_get_account":"getAccount","sailpoint_get_account_activity":"getAccountActivity","sailpoint_get_account_entitlements":"getAccountEntitlements","sailpoint_get_account_selections":"getAccountSelections","sailpoint_get_campaign":"getCampaign","sailpoint_get_certification":"getCertification","sailpoint_get_entitlement":"getEntitlement","sailpoint_get_entitlement_request_config":"getEntitlementRequestConfig","sailpoint_get_identity":"getIdentity","sailpoint_get_role":"getRole","sailpoint_get_role_entitlements":"getRoleEntitlements","sailpoint_get_source":"getSource","sailpoint_get_task_status":"getTaskStatus","sailpoint_list_access_profiles":"listAccessProfiles","sailpoint_list_account_activities":"listAccountActivities","sailpoint_list_accounts":"listAccounts","sailpoint_list_campaigns":"listCampaigns","sailpoint_list_certification_review_items":"listCertificationReviewItems","sailpoint_list_certifications":"listCertifications","sailpoint_list_entitlements":"listEntitlements","sailpoint_list_identities":"listIdentities","sailpoint_list_identity_entitlements":"listIdentityEntitlements","sailpoint_list_pending_access_request_approvals":"listPendingAccessRequestApprovals","sailpoint_list_roles":"listRoles","sailpoint_list_sources":"listSources","sailpoint_load_accounts":"loadAccountsCsv","sailpoint_load_entitlements":"loadEntitlementsCsv","sailpoint_reject_access_request":"rejectAccessRequest","sailpoint_request_access":"requestAccess","sailpoint_search":"search","sailpoint_search_aggregate":"searchAggregate","sailpoint_search_count":"searchCount","sailpoint_sign_off_certification":"signOffCertification"}},"sailpoint_v2":{"namespace":"sailpoint","methods":{"sailpoint_approve_access_request":"approveAccessRequest","sailpoint_cancel_access_request":"cancelAccessRequest","sailpoint_decide_certification_review_items":"decideCertificationReviewItems","sailpoint_get_access_profile":"getAccessProfile","sailpoint_get_access_profile_entitlements":"getAccessProfileEntitlements","sailpoint_get_access_request_config":"getAccessRequestConfig","sailpoint_get_access_request_status":"getAccessRequestStatus","sailpoint_get_account":"getAccount","sailpoint_get_account_activity":"getAccountActivity","sailpoint_get_account_entitlements":"getAccountEntitlements","sailpoint_get_account_selections":"getAccountSelections","sailpoint_get_campaign":"getCampaign","sailpoint_get_certification":"getCertification","sailpoint_get_entitlement":"getEntitlement","sailpoint_get_entitlement_request_config":"getEntitlementRequestConfig","sailpoint_get_identity":"getIdentity","sailpoint_get_role":"getRole","sailpoint_get_role_entitlements":"getRoleEntitlements","sailpoint_get_source":"getSource","sailpoint_get_task_status":"getTaskStatus","sailpoint_list_access_profiles":"listAccessProfiles","sailpoint_list_account_activities":"listAccountActivities","sailpoint_list_accounts":"listAccounts","sailpoint_list_campaigns":"listCampaigns","sailpoint_list_certification_review_items":"listCertificationReviewItems","sailpoint_list_certifications":"listCertifications","sailpoint_list_entitlements":"listEntitlements","sailpoint_list_identities":"listIdentities","sailpoint_list_identity_entitlements":"listIdentityEntitlements","sailpoint_list_pending_access_request_approvals":"listPendingAccessRequestApprovals","sailpoint_list_roles":"listRoles","sailpoint_list_sources":"listSources","sailpoint_load_accounts":"loadAccountsCsv","sailpoint_load_entitlements":"loadEntitlementsCsv","sailpoint_reject_access_request":"rejectAccessRequest","sailpoint_request_access":"requestAccess","sailpoint_search":"search","sailpoint_search_aggregate":"searchAggregate","sailpoint_search_count":"searchCount","sailpoint_sign_off_certification":"signOffCertification"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"salesforce":{"namespace":"salesforce","methods":{"create_account":"createAccount","create_case":"createCase","create_contact":"createContact","create_custom_field":"createCustomField","create_custom_object":"createCustomObject","create_lead":"createLead","create_opportunity":"createOpportunity","create_task":"createTask","delete_account":"deleteAccount","delete_case":"deleteCase","delete_contact":"deleteContact","delete_custom_field":"deleteCustomField","delete_lead":"deleteLead","delete_opportunity":"deleteOpportunity","delete_task":"deleteTask","describe_object":"describeObject","get_accounts":"getAccounts","get_cases":"getCases","get_contacts":"getContacts","get_dashboard":"getDashboard","get_leads":"getLeads","get_opportunities":"getOpportunities","get_report":"getReport","get_tasks":"getTasks","list_dashboards":"listDashboards","list_objects":"listObjects","list_report_types":"listReportTypes","list_reports":"listReports","query":"runSoqlQuery","query_more":"getMoreQueryResults","refresh_dashboard":"refreshDashboard","run_report":"runReport","tooling_query":"runToolingQuery","update_account":"updateAccount","update_case":"updateCase","update_contact":"updateContact","update_custom_field":"updateCustomField","update_lead":"updateLead","update_opportunity":"updateOpportunity","update_task":"updateTask"},"triggers":{"salesforce_case_status_changed":"caseStatusChanged","salesforce_opportunity_stage_changed":"opportunityStageChanged","salesforce_record_created":"recordCreated","salesforce_record_deleted":"recordDeleted","salesforce_record_updated":"recordUpdated","salesforce_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"sap_concur":{"namespace":"sapConcur","methods":{"sap_concur_approve_expense_report":"approveExpenseReport","sap_concur_associate_attendees":"associateAttendees","sap_concur_create_cash_advance":"createCashAdvance","sap_concur_create_expected_expense":"createExpectedExpense","sap_concur_create_expense_report":"createExpenseReport","sap_concur_create_list_item":"createListItem","sap_concur_create_purchase_request":"createPurchaseRequest","sap_concur_create_quick_expense":"createQuickExpense","sap_concur_create_quick_expense_with_image":"createQuickExpenseWithImage","sap_concur_create_report_comment":"createReportComment","sap_concur_create_travel_request":"createTravelRequest","sap_concur_create_user":"createUser","sap_concur_delete_expected_expense":"deleteExpectedExpense","sap_concur_delete_expense":"deleteExpense","sap_concur_delete_expense_report":"deleteExpenseReport","sap_concur_delete_list_item":"deleteListItem","sap_concur_delete_travel_request":"deleteTravelRequest","sap_concur_delete_user":"deleteUser","sap_concur_get_allocation":"getAllocation","sap_concur_get_budget":"getBudget","sap_concur_get_cash_advance":"getCashAdvance","sap_concur_get_expected_expense":"getExpectedExpense","sap_concur_get_expense":"getExpense","sap_concur_get_expense_report":"getExpenseReport","sap_concur_get_itemizations":"getItemizations","sap_concur_get_itinerary":"getItineraryTrip","sap_concur_get_list":"getList","sap_concur_get_list_item":"getListItem","sap_concur_get_purchase_request":"getPurchaseRequest","sap_concur_get_receipt":"getReceipt","sap_concur_get_receipt_status":"getReceiptStatus","sap_concur_get_request_cash_advance":"getRequestCashAdvance","sap_concur_get_travel_profile":"getTravelProfile","sap_concur_get_travel_request":"getTravelRequest","sap_concur_get_user":"getUser","sap_concur_issue_cash_advance":"issueCashAdvance","sap_concur_list_allocations":"listAllocations","sap_concur_list_attendee_associations":"listAttendeeAssociations","sap_concur_list_budget_categories":"listBudgetCategories","sap_concur_list_budgets":"listBudgets","sap_concur_list_exceptions":"listExceptions","sap_concur_list_expected_expenses":"listExpectedExpenses","sap_concur_list_expense_reports":"listExpenseReports","sap_concur_list_expenses":"listExpenses","sap_concur_list_itineraries":"listItinerariesTrips","sap_concur_list_list_items":"listListItems","sap_concur_list_lists":"listLists","sap_concur_list_receipts":"listReceipts","sap_concur_list_report_comments":"listReportComments","sap_concur_list_reports_to_approve":"listReportsToApprove","sap_concur_list_travel_profiles_summary":"listTravelProfilesSummary","sap_concur_list_travel_request_comments":"listTravelRequestComments","sap_concur_list_travel_requests":"listTravelRequests","sap_concur_list_users":"listUsers","sap_concur_move_travel_request":"moveTravelRequestWorkflowAction","sap_concur_recall_expense_report":"recallExpenseReport","sap_concur_remove_all_attendees":"removeAllAttendees","sap_concur_search_locations":"searchLocations","sap_concur_search_users":"searchUsers","sap_concur_send_back_expense_report":"sendBackExpenseReport","sap_concur_submit_expense_report":"submitExpenseReport","sap_concur_update_allocation":"updateAllocation","sap_concur_update_expected_expense":"updateExpectedExpense","sap_concur_update_expense":"updateExpense","sap_concur_update_expense_report":"updateExpenseReport","sap_concur_update_list_item":"updateListItem","sap_concur_update_travel_request":"updateTravelRequest","sap_concur_update_user":"updateUserPatch","sap_concur_upload_exchange_rates":"uploadExchangeRates","sap_concur_upload_receipt_image":"uploadReceiptImage"}},"sap_s4hana":{"namespace":"sapS4hana","methods":{"sap_s4hana_create_business_partner":"createBusinessPartner","sap_s4hana_create_purchase_order":"createPurchaseOrder","sap_s4hana_create_purchase_requisition":"createPurchaseRequisition","sap_s4hana_create_sales_order":"createSalesOrder","sap_s4hana_delete_sales_order":"deleteSalesOrder","sap_s4hana_get_billing_document":"getBillingDocument","sap_s4hana_get_business_partner":"getBusinessPartner","sap_s4hana_get_customer":"getCustomer","sap_s4hana_get_inbound_delivery":"getInboundDelivery","sap_s4hana_get_material_document":"getMaterialDocument","sap_s4hana_get_outbound_delivery":"getOutboundDelivery","sap_s4hana_get_product":"getProduct","sap_s4hana_get_purchase_order":"getPurchaseOrder","sap_s4hana_get_purchase_requisition":"getPurchaseRequisition","sap_s4hana_get_sales_order":"getSalesOrder","sap_s4hana_get_supplier":"getSupplier","sap_s4hana_get_supplier_invoice":"getSupplierInvoice","sap_s4hana_list_billing_documents":"listBillingDocuments","sap_s4hana_list_business_partners":"listBusinessPartners","sap_s4hana_list_customers":"listCustomers","sap_s4hana_list_inbound_deliveries":"listInboundDeliveries","sap_s4hana_list_material_documents":"listMaterialDocuments","sap_s4hana_list_material_stock":"listMaterialStock","sap_s4hana_list_outbound_deliveries":"listOutboundDeliveries","sap_s4hana_list_products":"listProducts","sap_s4hana_list_purchase_orders":"listPurchaseOrders","sap_s4hana_list_purchase_requisitions":"listPurchaseRequisitions","sap_s4hana_list_sales_orders":"listSalesOrders","sap_s4hana_list_supplier_invoices":"listSupplierInvoices","sap_s4hana_list_suppliers":"listSuppliers","sap_s4hana_odata_query":"odataQueryAdvanced","sap_s4hana_update_business_partner":"updateBusinessPartner","sap_s4hana_update_customer":"updateCustomer","sap_s4hana_update_product":"updateProduct","sap_s4hana_update_purchase_order":"updatePurchaseOrder","sap_s4hana_update_purchase_requisition":"updatePurchaseRequisition","sap_s4hana_update_sales_order":"updateSalesOrder","sap_s4hana_update_supplier":"updateSupplier"}},"schedule":{"namespace":"trigger.schedule"},"search":{"namespace":"search"},"secrets_manager":{"namespace":"legacy.secretsManager","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","describe_secret":"describeSecret","get_secret":"getSecret","list_secrets":"listSecrets","restore_secret":"restoreSecret","rotate_secret":"rotateSecret","tag_resource":"tagSecret","untag_resource":"untagSecret","update_secret":"updateSecret"}},"secrets_manager_v2":{"namespace":"secretsManager","methods":{"create_secret":"createSecret","delete_secret":"deleteSecret","describe_secret":"describeSecret","get_secret":"getSecret","list_secrets":"listSecrets","restore_secret":"restoreSecret","rotate_secret":"rotateSecret","tag_resource":"tagSecret","untag_resource":"untagSecret","update_secret":"updateSecret"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"semrush":{"namespace":"semrush","methods":{"semrush_backlinks":"backlinks","semrush_backlinks_anchors":"backlinkAnchors","semrush_backlinks_competitors":"backlinkCompetitors","semrush_backlinks_geo_distribution":"backlinkCountryDistribution","semrush_backlinks_indexed_pages":"indexedPages","semrush_backlinks_overview":"backlinksOverview","semrush_backlinks_tld_distribution":"backlinkTldDistribution","semrush_batch_keyword_overview":"batchKeywordOverview","semrush_broad_match_keywords":"broadMatchKeywords","semrush_domain_ad_copies":"domainAdCopies","semrush_domain_ad_history":"domainAdHistory","semrush_domain_organic_competitors":"organicCompetitors","semrush_domain_organic_keywords":"domainOrganicKeywords","semrush_domain_overview":"domainOverview","semrush_domain_overview_all":"domainOverviewAllDatabases","semrush_domain_overview_history":"domainOverviewHistory","semrush_domain_paid_competitors":"paidCompetitors","semrush_domain_paid_keywords":"domainPaidKeywords","semrush_domain_pla_copies":"domainPlaCopies","semrush_domain_pla_keywords":"domainPlaKeywords","semrush_domain_vs_domain":"domainVsDomain","semrush_keyword_ad_history":"keywordAdHistory","semrush_keyword_difficulty":"keywordDifficulty","semrush_keyword_overview":"keywordOverview","semrush_keyword_overview_all":"keywordOverviewAllDatabases","semrush_keyword_questions":"keywordQuestions","semrush_organic_results":"organicResults","semrush_paid_results":"paidResults","semrush_referring_domains":"referringDomains","semrush_referring_ips":"referringIps","semrush_related_keywords":"relatedKeywords","semrush_subdomain_ad_copies":"subdomainAdCopies","semrush_subdomain_organic_keywords":"subdomainOrganicKeywords","semrush_subdomain_overview":"subdomainOverview","semrush_subdomain_overview_all":"subdomainOverviewAllDatabases","semrush_subdomain_overview_history":"subdomainOverviewHistory","semrush_subdomain_paid_keywords":"subdomainPaidKeywords","semrush_top_domains":"topDomains","semrush_url_organic_keywords":"urlOrganicKeywords","semrush_url_overview":"urlOverview","semrush_url_overview_all":"urlOverviewAllDatabases","semrush_url_overview_history":"urlOverviewHistory","semrush_url_paid_keywords":"urlPaidKeywords","semrush_winners_and_losers":"winnersAndLosers"}},"sendblue":{"namespace":"sendblue","methods":{"sendblue_evaluate_service":"evaluateService","sendblue_get_message":"getMessage","sendblue_send_group_message":"sendGroupMessage","sendblue_send_message":"sendMessage","sendblue_send_typing_indicator":"sendTypingIndicator"},"triggers":{"sendblue_message_received":"messageReceived","sendblue_message_status_updated":"messageStatusUpdated"}},"sendgrid":{"namespace":"legacy.sendgrid","methods":{"add_contact":"addContact","add_contacts_to_list":"addContactsToList","create_list":"createList","create_template":"createTemplate","create_template_version":"createTemplateVersion","delete_contacts":"deleteContacts","delete_list":"deleteList","delete_template":"deleteTemplate","get_contact":"getContact","get_list":"getList","get_template":"getTemplate","list_all_lists":"listAllLists","list_templates":"listTemplates","remove_contacts_from_list":"removeContactsFromList","search_contacts":"searchContacts","send_mail":"sendMail"}},"sendgrid_v2":{"namespace":"sendgrid","methods":{"add_contact":"addContact","add_contacts_to_list":"addContactsToList","create_list":"createList","create_template":"createTemplate","create_template_version":"createTemplateVersion","delete_contacts":"deleteContacts","delete_list":"deleteList","delete_template":"deleteTemplate","get_contact":"getContact","get_list":"getList","get_template":"getTemplate","list_all_lists":"listAllLists","list_templates":"listTemplates","remove_contacts_from_list":"removeContactsFromList","search_contacts":"searchContacts","send_mail":"sendMail"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"sentry":{"namespace":"legacy.sentry","methods":{"sentry_events_get":"getEvent","sentry_events_list":"listEvents","sentry_issues_get":"getIssue","sentry_issues_list":"listIssues","sentry_issues_update":"updateIssue","sentry_projects_create":"createProject","sentry_projects_get":"getProject","sentry_projects_list":"listProjects","sentry_projects_update":"updateProject","sentry_releases_create":"createRelease","sentry_releases_deploy":"createDeploy","sentry_releases_list":"listReleases","sentry_teams_list":"listTeams"},"triggers":{"sentry_error_created":"errorCreated","sentry_issue_alert":"issueAlert","sentry_issue_created":"issueCreated","sentry_issue_resolved":"issueResolved","sentry_metric_alert":"metricAlert"}},"sentry_v2":{"namespace":"sentry","methods":{"sentry_events_get":"getEvent","sentry_events_list":"listEvents","sentry_issues_get":"getIssue","sentry_issues_list":"listIssues","sentry_issues_update":"updateIssue","sentry_projects_create":"createProject","sentry_projects_get":"getProject","sentry_projects_list":"listProjects","sentry_projects_update":"updateProject","sentry_releases_create":"createRelease","sentry_releases_deploy":"createDeploy","sentry_releases_list":"listReleases","sentry_teams_list":"listTeams"},"triggers":{"sentry_error_created":"errorCreated","sentry_issue_alert":"issueAlert","sentry_issue_created":"issueCreated","sentry_issue_resolved":"issueResolved","sentry_metric_alert":"metricAlert"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"serper":{"namespace":"serper"},"servicenow":{"namespace":"legacy.servicenow","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"}},"servicenow_v2":{"namespace":"legacy.servicenowV2","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"}},"servicenow_v3":{"namespace":"servicenow","methods":{"servicenow_add_incident_comment":"addIncidentComment","servicenow_aggregate":"aggregateRecords","servicenow_close_incident":"closeIncident","servicenow_create_change_request":"createChangeRequest","servicenow_create_incident":"createIncident","servicenow_create_record":"createRecord","servicenow_delete_record":"deleteRecord","servicenow_download_attachment":"downloadAttachment","servicenow_find_user":"findUser","servicenow_get_change_next_states":"getChangeNextStates","servicenow_get_change_request":"getChangeRequest","servicenow_get_ci":"getConfigurationItem","servicenow_get_incident":"getIncident","servicenow_get_knowledge_article":"getKnowledgeArticle","servicenow_get_requested_item":"getRequestedItem","servicenow_list_approvals":"listApprovals","servicenow_list_attachments":"listAttachments","servicenow_list_catalog_items":"listCatalogItems","servicenow_list_change_requests":"listChangeRequests","servicenow_list_change_tasks":"listChangeTasks","servicenow_list_ci_relationships":"listCiRelationships","servicenow_list_group_members":"listGroupMembers","servicenow_list_incidents":"listIncidents","servicenow_list_requested_items":"listRequestedItems","servicenow_order_catalog_item":"orderCatalogItem","servicenow_read_record":"readRecords","servicenow_resolve_incident":"resolveIncident","servicenow_search_cis":"searchConfigurationItems","servicenow_search_knowledge":"searchKnowledge","servicenow_update_approval":"approveOrReject","servicenow_update_change_request":"updateChangeRequest","servicenow_update_change_state":"moveChangeState","servicenow_update_incident":"updateIncident","servicenow_update_record":"updateRecord","servicenow_upload_attachment":"uploadAttachment"},"triggers":{"servicenow_change_request_created":"changeRequestCreated","servicenow_change_request_updated":"changeRequestUpdated","servicenow_incident_created":"incidentCreated","servicenow_incident_updated":"incidentUpdated","servicenow_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"ses":{"namespace":"legacy.ses","methods":{"create_configuration_set":"createConfigurationSet","create_email_identity":"createEmailIdentity","create_template":"createTemplate","delete_email_identity":"deleteEmailIdentity","delete_suppressed_destination":"deleteSuppressedDestination","delete_template":"deleteTemplate","get_account":"getAccount","get_email_identity":"getEmailIdentity","get_suppressed_destination":"getSuppressedDestination","get_template":"getTemplate","list_identities":"listIdentities","list_suppressed_destinations":"listSuppressedDestinations","list_templates":"listTemplates","put_suppressed_destination":"putSuppressedDestination","send_bulk_email":"sendBulkEmail","send_custom_verification_email":"sendCustomVerificationEmail","send_email":"sendEmail","send_templated_email":"sendTemplatedEmail","update_template":"updateTemplate"}},"ses_v2":{"namespace":"ses","methods":{"create_configuration_set":"createConfigurationSet","create_email_identity":"createEmailIdentity","create_template":"createTemplate","delete_email_identity":"deleteEmailIdentity","delete_suppressed_destination":"deleteSuppressedDestination","delete_template":"deleteTemplate","get_account":"getAccount","get_email_identity":"getEmailIdentity","get_suppressed_destination":"getSuppressedDestination","get_template":"getTemplate","list_identities":"listIdentities","list_suppressed_destinations":"listSuppressedDestinations","list_templates":"listTemplates","put_suppressed_destination":"putSuppressedDestination","send_bulk_email":"sendBulkEmail","send_custom_verification_email":"sendCustomVerificationEmail","send_email":"sendEmail","send_templated_email":"sendTemplatedEmail","update_template":"updateTemplate"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"sftp":{"namespace":"legacy.sftp","methods":{"sftp_create":"createFile","sftp_delete":"deleteFileDirectory","sftp_download":"downloadFile","sftp_list":"listDirectory","sftp_mkdir":"createDirectory","sftp_upload":"uploadFiles"}},"sftp_v2":{"namespace":"sftp","methods":{"sftp_create":"createFile","sftp_delete":"deleteFileDirectory","sftp_download":"downloadFile","sftp_list":"listDirectory","sftp_mkdir":"createDirectory","sftp_upload":"uploadFiles"}},"sharepoint":{"namespace":"legacy.sharepoint","methods":{"add_list_items":"addListItems","create_list":"createList","create_page":"createPage","delete_file":"deleteFile","delete_list_item":"deleteListItem","delete_page":"deletePage","download_file":"downloadFile","get_drive_item":"getDriveItem","get_list_item":"getListItem","list_sites":"listSites","publish_page":"publishPage","read_list":"readList","read_page":"readPage","update_list":"updateList","update_page":"updatePage","upload_file":"uploadFile"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"sharepoint_v2":{"namespace":"sharepoint","methods":{"sharepoint_add_list_items":"addListItem","sharepoint_create_list":"createList","sharepoint_create_page":"createPage","sharepoint_delete_file":"deleteFile","sharepoint_delete_list_item":"deleteListItem","sharepoint_delete_page":"deletePage","sharepoint_download_file":"downloadFile","sharepoint_get_drive_item":"getDriveItem","sharepoint_get_list":"readList","sharepoint_get_list_item":"getListItem","sharepoint_list_sites":"listSites","sharepoint_publish_page":"publishPage","sharepoint_read_page":"readPage","sharepoint_update_list":"updateListItem","sharepoint_update_page":"updatePage","sharepoint_upload_file":"uploadFile"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"shopify":{"namespace":"shopify","methods":{"shopify_adjust_inventory":"adjustInventory","shopify_cancel_order":"cancelOrder","shopify_create_customer":"createCustomer","shopify_create_fulfillment":"createFulfillment","shopify_create_product":"createProduct","shopify_create_product_variants":"createProductVariants","shopify_delete_customer":"deleteCustomer","shopify_delete_product":"deleteProduct","shopify_get_collection":"getCollection","shopify_get_customer":"getCustomer","shopify_get_fulfillment":"getFulfillment","shopify_get_fulfillment_order":"getFulfillmentOrder","shopify_get_inventory_level":"getInventoryLevel","shopify_get_job":"getJob","shopify_get_order":"getOrder","shopify_get_product":"getProduct","shopify_list_collections":"listCollections","shopify_list_customers":"listCustomers","shopify_list_fulfillment_orders":"listFulfillmentOrders","shopify_list_inventory_items":"listInventoryItems","shopify_list_locations":"listLocations","shopify_list_orders":"listOrders","shopify_list_products":"listProducts","shopify_update_customer":"updateCustomer","shopify_update_fulfillment_tracking":"updateFulfillmentTracking","shopify_update_order":"updateOrder","shopify_update_product":"updateProduct","shopify_update_product_variants":"updateProductVariants"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"sim_workspace_event":{"namespace":"trigger.simWorkspaceEvent"},"similarweb":{"namespace":"legacy.similarweb","methods":{"similarweb_bounce_rate":"bounceRate","similarweb_page_views":"pageViews","similarweb_pages_per_visit":"pagesPerVisit","similarweb_traffic_visits":"trafficVisits","similarweb_visit_duration":"visitDurationDesktop","similarweb_website_overview":"websiteOverview"}},"similarweb_v2":{"namespace":"similarweb","methods":{"similarweb_bounce_rate":"bounceRate","similarweb_page_views":"pageViews","similarweb_pages_per_visit":"pagesPerVisit","similarweb_traffic_visits":"trafficVisits","similarweb_visit_duration":"visitDurationDesktop","similarweb_website_overview":"websiteOverview"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"sixtyfour":{"namespace":"legacy.sixtyfour","methods":{"enrich_company":"enrichCompany","enrich_lead":"enrichLead","find_email":"findEmail","find_phone":"findPhone"}},"sixtyfour_v2":{"namespace":"sixtyfour","methods":{"enrich_company":"enrichCompany","enrich_lead":"enrichLead","find_email":"findEmail","find_phone":"findPhone"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"slack":{"namespace":"legacy.slack","methods":{"archive_conversation":"archiveConversation","canvas":"createCanvas","create_channel_canvas":"createChannelCanvas","create_conversation":"createConversation","delete":"deleteMessage","delete_canvas":"deleteCanvas","delete_scheduled_message":"deleteScheduledMessage","download":"downloadFile","edit_canvas":"editCanvas","ephemeral":"sendEphemeralMessage","get_canvas":"getCanvasInfo","get_channel_history":"getChannelHistory","get_channel_info":"getChannelInfo","get_message":"getMessage","get_permalink":"getMessagePermalink","get_thread":"getThread","get_thread_replies":"getThreadReplies","get_user":"getUserInfo","get_user_presence":"getUserPresence","invite_to_conversation":"inviteToConversation","list_canvases":"listCanvases","list_channels":"listChannels","list_members":"listChannelMembers","list_scheduled_messages":"listScheduledMessages","list_users":"listUsers","lookup_canvas_sections":"lookupCanvasSections","open_view":"openView","publish_view":"publishView","push_view":"pushView","react":"addReaction","read":"readMessages","rename_conversation":"renameConversation","schedule_message":"scheduleMessage","send":"sendMessage","set_conversation_purpose":"setConversationPurpose","set_conversation_topic":"setConversationTopic","set_status":"setAssistantStatus","set_suggested_prompts":"setSuggestedPrompts","set_title":"setAssistantTitle","unreact":"removeReaction","update":"updateMessage","update_view":"updateView"},"triggers":{"slack_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"slack_v2":{"namespace":"slack","methods":{"add_bookmark":"addBookmark","archive_conversation":"archiveConversation","canvas":"createCanvas","close_conversation":"closeConversation","create_channel_canvas":"createChannelCanvas","create_conversation":"createConversation","create_list":"createList","create_list_item":"createListItem","create_user_group":"createUserGroup","delete":"deleteMessage","delete_canvas":"deleteCanvas","delete_file":"deleteFile","delete_list_item":"deleteListItem","delete_list_items":"deleteListItems","delete_scheduled_message":"deleteScheduledMessage","disable_user_group":"disableUserGroup","download":"downloadFile","edit_bookmark":"editBookmark","edit_canvas":"editCanvas","enable_user_group":"enableUserGroup","ephemeral":"sendEphemeralMessage","get_canvas":"getCanvasInfo","get_channel_history":"getChannelHistory","get_channel_info":"getChannelInfo","get_dnd_info":"getDoNotDisturbInfo","get_file_info":"getFileInfo","get_list_export":"getListExport","get_list_item":"getListItem","get_message":"getMessage","get_permalink":"getMessagePermalink","get_reactions":"getReactions","get_team_dnd_info":"getTeamDoNotDisturbInfo","get_team_info":"getWorkspaceInfo","get_team_profile":"getWorkspaceProfileFields","get_thread":"getThread","get_thread_replies":"getThreadReplies","get_user":"getUserInfo","get_user_presence":"getUserPresence","get_user_profile":"getUserProfile","invite_to_conversation":"inviteToConversation","join_conversation":"joinConversation","kick_conversation":"removeUserFromConversation","leave_conversation":"leaveConversation","list_bookmarks":"listBookmarks","list_canvases":"listCanvases","list_channels":"listChannels","list_emoji":"listCustomEmoji","list_files":"listFiles","list_items":"readListItems","list_members":"listChannelMembers","list_pins":"listPins","list_reactions":"listReactions","list_scheduled_messages":"listScheduledMessages","list_user_conversations":"listUserConversations","list_user_group_members":"listUserGroupMembers","list_user_groups":"listUserGroups","list_users":"listUsers","lookup_canvas_sections":"lookupCanvasSections","lookup_user_by_email":"findUserByEmail","mark_conversation_read":"markConversationRead","open_conversation":"openConversation","open_view":"openView","pin_message":"pinMessage","publish_view":"publishView","push_view":"pushView","react":"addReaction","read":"readMessages","remove_bookmark":"removeBookmark","rename_agent_session":"renameAgentSession","rename_conversation":"renameConversation","rename_list":"updateList","revoke_canvas_access":"revokeCanvasAccess","revoke_list_access":"revokeListAccess","schedule_message":"scheduleMessage","send":"sendMessage","set_agent_session_status":"setAgentSessionStatus","set_agent_suggested_prompts":"setAgentSuggestedPrompts","set_conversation_purpose":"setConversationPurpose","set_conversation_topic":"setConversationTopic","set_status":"setAssistantStatus","set_suggested_prompts":"setAssistantSuggestedPrompts","set_title":"setAssistantTitle","set_user_presence":"setBotPresence","share_canvas":"shareCanvas","share_list":"shareList","start_list_export":"startListExport","unarchive_conversation":"unarchiveConversation","unfurl_links":"unfurlLinks","unpin_message":"unpinMessage","unreact":"removeReaction","update":"updateMessage","update_list_items":"updateListItems","update_user_group":"updateUserGroup","update_user_group_members":"updateUserGroupMembers","update_view":"updateView"},"triggers":{"slack_oauth":"oauth"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"smartlead":{"namespace":"legacy.smartlead","methods":{"add_email_accounts_to_campaign":"addEmailAccountsToCampaign","add_leads_to_campaign":"addLeadsToCampaign","create_campaign":"createCampaign","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_campaign_webhook":"deleteCampaignWebhook","delete_lead_from_campaign":"deleteLeadFromCampaign","delete_lead_list":"deleteLeadList","duplicate_campaign":"duplicateCampaign","export_campaign_leads":"exportCampaignLeadsCsv","get_campaign":"getCampaign","get_campaign_analytics":"getCampaignAnalytics","get_campaign_analytics_by_date":"getCampaignAnalyticsByDate","get_campaign_lead_statistics":"getCampaignLeadStatistics","get_campaign_mailbox_statistics":"getCampaignMailboxStatistics","get_campaign_sequences":"getCampaignSequences","get_campaign_statistics":"getCampaignStatistics","get_campaign_top_level_analytics_by_date":"getTopLevelAnalyticsByDate","get_campaign_webhook_summary":"getWebhookSummary","get_lead_by_email":"getLeadByEmail","get_lead_by_id":"getLeadById","get_lead_list":"getLeadList","get_lead_message_history":"getLeadMessageHistory","list_campaign_email_accounts":"listCampaignEmailAccounts","list_campaign_leads":"listCampaignLeads","list_campaign_webhooks":"listCampaignWebhooks","list_campaigns":"listCampaigns","list_clients":"listClients","list_email_accounts":"listEmailAccounts","list_inbox_replies":"listInboxReplies","list_lead_activities":"listLeadActivities","list_lead_categories":"listLeadCategories","list_lead_lists":"listLeadLists","mark_lead_complete":"markLeadComplete","pause_lead":"pauseLead","remove_email_accounts_from_campaign":"removeEmailAccountsFromCampaign","resume_lead":"resumeLead","save_campaign_sequences":"saveCampaignSequences","unsubscribe_lead_from_campaign":"unsubscribeLeadFromCampaign","unsubscribe_lead_globally":"unsubscribeLeadGlobally","update_campaign_schedule":"updateCampaignSchedule","update_campaign_settings":"updateCampaignSettings","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead","update_lead_category":"updateLeadCategory","update_lead_list":"updateLeadList","upsert_campaign_webhook":"createOrUpdateWebhook"}},"smartlead_v2":{"namespace":"smartlead","methods":{"add_email_accounts_to_campaign":"addEmailAccountsToCampaign","add_leads_to_campaign":"addLeadsToCampaign","create_campaign":"createCampaign","create_lead_list":"createLeadList","delete_campaign":"deleteCampaign","delete_campaign_webhook":"deleteCampaignWebhook","delete_lead_from_campaign":"deleteLeadFromCampaign","delete_lead_list":"deleteLeadList","duplicate_campaign":"duplicateCampaign","export_campaign_leads":"exportCampaignLeadsCsv","get_campaign":"getCampaign","get_campaign_analytics":"getCampaignAnalytics","get_campaign_analytics_by_date":"getCampaignAnalyticsByDate","get_campaign_lead_statistics":"getCampaignLeadStatistics","get_campaign_mailbox_statistics":"getCampaignMailboxStatistics","get_campaign_sequences":"getCampaignSequences","get_campaign_statistics":"getCampaignStatistics","get_campaign_top_level_analytics_by_date":"getTopLevelAnalyticsByDate","get_campaign_webhook_summary":"getWebhookSummary","get_lead_by_email":"getLeadByEmail","get_lead_by_id":"getLeadById","get_lead_list":"getLeadList","get_lead_message_history":"getLeadMessageHistory","list_campaign_email_accounts":"listCampaignEmailAccounts","list_campaign_leads":"listCampaignLeads","list_campaign_webhooks":"listCampaignWebhooks","list_campaigns":"listCampaigns","list_clients":"listClients","list_email_accounts":"listEmailAccounts","list_inbox_replies":"listInboxReplies","list_lead_activities":"listLeadActivities","list_lead_categories":"listLeadCategories","list_lead_lists":"listLeadLists","mark_lead_complete":"markLeadComplete","pause_lead":"pauseLead","remove_email_accounts_from_campaign":"removeEmailAccountsFromCampaign","resume_lead":"resumeLead","save_campaign_sequences":"saveCampaignSequences","unsubscribe_lead_from_campaign":"unsubscribeLeadFromCampaign","unsubscribe_lead_globally":"unsubscribeLeadGlobally","update_campaign_schedule":"updateCampaignSchedule","update_campaign_settings":"updateCampaignSettings","update_campaign_status":"updateCampaignStatus","update_lead":"updateLead","update_lead_category":"updateLeadCategory","update_lead_list":"updateLeadList","upsert_campaign_webhook":"createOrUpdateWebhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"smtp":{"namespace":"smtp"},"snowflake":{"namespace":"snowflake","methods":{"alter_warehouse":"alterWarehouse","call_procedure":"callProcedure","cancel_statement":"cancelStatement","cancel_task_run":"cancelTaskQuery","cortex_analyst_ask":"askCortexAnalyst","cortex_analyst_feedback":"sendCortexAnalystFeedback","delete_rows":"deleteRows","execute_sql":"executeSql","get_statement":"getStatement","get_task":"getTask","get_task_run":"getTaskRun","get_task_run_output":"getTaskRunOutput","get_warehouse":"getWarehouse","insert_rows":"insertRows","introspect_schema":"introspectSchema","list_copy_history":"listCopyHistory","list_databases":"listDatabases","list_query_history":"listQueryHistory","list_schemas":"listSchemas","list_tables":"listTables","list_task_runs":"listTaskRuns","list_tasks":"listTasks","list_warehouses":"listWarehouses","load_data":"loadData","resume_task":"resumeTask","resume_warehouse":"resumeWarehouse","run_task":"runTask","suspend_task":"suspendTask","suspend_warehouse":"suspendWarehouse","unload_data":"unloadData","update_rows":"updateRows","upsert_rows":"upsertRows"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"splunk":{"namespace":"legacy.splunk","methods":{"splunk_cancel_search_job":"cancelSearchJob","splunk_create_search_job":"createSearchJob","splunk_dispatch_saved_search":"dispatchSavedSearch","splunk_get_fired_alerts":"getFiredAlerts","splunk_get_saved_search":"getSavedSearch","splunk_get_search_job":"getSearchJob","splunk_get_search_results":"getSearchResults","splunk_list_apps":"listApps","splunk_list_fired_alerts":"listFiredAlerts","splunk_list_indexes":"listIndexes","splunk_list_saved_searches":"listSavedSearches","splunk_run_search":"runSearch"}},"splunk_v2":{"namespace":"splunk","methods":{"splunk_cancel_search_job":"cancelSearchJob","splunk_create_search_job":"createSearchJob","splunk_dispatch_saved_search":"dispatchSavedSearch","splunk_get_fired_alerts":"getFiredAlerts","splunk_get_saved_search":"getSavedSearch","splunk_get_search_job":"getSearchJob","splunk_get_search_results":"getSearchResults","splunk_list_apps":"listApps","splunk_list_fired_alerts":"listFiredAlerts","splunk_list_indexes":"listIndexes","splunk_list_saved_searches":"listSavedSearches","splunk_run_search":"runSearch"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"sportmonks":{"namespace":"legacy.sportmonks","methods":{"core_get_cities":"coreGetCities","core_get_city":"coreGetCityById","core_get_continent":"coreGetContinentById","core_get_continents":"coreGetContinents","core_get_countries":"coreGetCountries","core_get_country":"coreGetCountryById","core_get_entity_filters":"coreGetAllEntityFilters","core_get_my_usage":"coreGetMyUsage","core_get_region":"coreGetRegionById","core_get_regions":"coreGetRegions","core_get_timezones":"coreGetTimezones","core_get_type":"coreGetTypeById","core_get_type_by_entity":"coreGetTypeByEntity","core_get_types":"coreGetTypes","core_search_cities":"coreSearchCities","core_search_countries":"coreSearchCountries","core_search_regions":"coreSearchRegions","football_expected_by_player":"footballGetExpectedXGByPlayer","football_expected_by_team":"footballGetExpectedXGByTeam","football_get_all_commentaries":"footballGetAllCommentaries","football_get_all_fixtures":"footballGetAllFixtures","football_get_all_players":"footballGetAllPlayers","football_get_all_rivals":"footballGetAllRivals","football_get_all_teams":"footballGetAllTeams","football_get_all_transfer_rumours":"footballGetAllTransferRumours","football_get_all_transfers":"footballGetAllTransfers","football_get_brackets_by_season":"footballGetBracketsBySeason","football_get_coach":"footballGetCoachById","football_get_coaches":"footballGetCoaches","football_get_coaches_by_country":"footballGetCoachesByCountry","football_get_commentaries_by_fixture":"footballGetCommentariesByFixture","football_get_current_leagues_by_team":"footballGetCurrentLeaguesByTeam","football_get_expected_lineups_by_player":"footballGetExpectedLineupsByPlayer","football_get_expected_lineups_by_team":"footballGetExpectedLineupsByTeam","football_get_extended_team_squad":"footballGetExtendedTeamSquad","football_get_fixture":"footballGetFixtureById","football_get_fixtures_by_date":"footballGetFixturesByDate","football_get_fixtures_by_date_range":"footballGetFixturesByDateRange","football_get_fixtures_by_date_range_for_team":"footballGetFixturesByDateRangeForTeam","football_get_fixtures_by_ids":"footballGetFixturesByMultipleIds","football_get_grouped_standings_by_round":"footballGetGroupedStandingsByRound","football_get_head_to_head":"footballGetHeadToHead","football_get_inplay_livescores":"footballGetInplayLivescores","football_get_latest_coaches":"footballGetLastUpdatedCoaches","football_get_latest_fixtures":"footballGetLatestUpdatedFixtures","football_get_latest_livescores":"footballGetLatestUpdatedLivescores","football_get_latest_players":"footballGetLastUpdatedPlayers","football_get_latest_totw":"footballGetLatestTeamOfTheWeek","football_get_latest_transfers":"footballGetLatestTransfers","football_get_league":"footballGetLeagueById","football_get_leagues":"footballGetLeagues","football_get_leagues_by_country":"footballGetLeaguesByCountry","football_get_leagues_by_date":"footballGetLeaguesByDate","football_get_leagues_by_team":"footballGetLeaguesByTeam","football_get_live_leagues":"footballGetLiveLeagues","football_get_live_probabilities":"footballGetLiveProbabilities","football_get_live_probabilities_by_fixture":"footballGetLiveProbabilitiesByFixture","football_get_live_standings_by_league":"footballGetLiveStandingsByLeague","football_get_livescores":"footballGetLivescores","football_get_match_facts":"footballGetAllMatchFacts","football_get_match_facts_by_date_range":"footballGetMatchFactsByDateRange","football_get_match_facts_by_fixture":"footballGetMatchFactsByFixture","football_get_match_facts_by_league":"footballGetMatchFactsByLeague","football_get_past_fixtures_by_tv_station":"footballGetPastFixturesByTvStation","football_get_player":"footballGetPlayerById","football_get_players_by_country":"footballGetPlayersByCountry","football_get_postmatch_news":"footballGetPostMatchNews","football_get_postmatch_news_by_season":"footballGetPostMatchNewsBySeason","football_get_predictability_by_league":"footballGetPredictabilityByLeague","football_get_prematch_news":"footballGetPreMatchNews","football_get_prematch_news_by_season":"footballGetPreMatchNewsBySeason","football_get_prematch_news_upcoming":"footballGetPreMatchNewsForUpcomingFixtures","football_get_probabilities":"footballGetProbabilities","football_get_probabilities_by_fixture":"footballGetPredictionsByFixture","football_get_referee":"footballGetRefereeById","football_get_referees":"footballGetReferees","football_get_referees_by_country":"footballGetRefereesByCountry","football_get_referees_by_season":"footballGetRefereesBySeason","football_get_rivals_by_team":"footballGetRivalsByTeam","football_get_round":"footballGetRoundById","football_get_round_statistics":"footballGetRoundStatistics","football_get_rounds":"footballGetRounds","football_get_rounds_by_season":"footballGetRoundsBySeason","football_get_schedules_by_season":"footballGetSchedulesBySeason","football_get_schedules_by_season_and_team":"footballGetSchedulesBySeasonAndTeam","football_get_schedules_by_team":"footballGetSchedulesByTeam","football_get_season":"footballGetSeasonById","football_get_seasons":"footballGetSeasons","football_get_seasons_by_team":"footballGetSeasonsByTeam","football_get_stage":"footballGetStageById","football_get_stage_statistics":"footballGetStageStatistics","football_get_stages":"footballGetStages","football_get_stages_by_season":"footballGetStagesBySeason","football_get_standing_corrections_by_season":"footballGetStandingCorrectionsBySeason","football_get_standings":"footballGetAllStandings","football_get_standings_by_round":"footballGetStandingsByRound","football_get_standings_by_season":"footballGetStandingsBySeason","football_get_state":"footballGetStateById","football_get_states":"footballGetStates","football_get_team":"footballGetTeamById","football_get_team_rankings":"footballGetAllTeamRankings","football_get_team_rankings_by_date":"footballGetTeamRankingsByDate","football_get_team_rankings_by_team":"footballGetTeamRankingsByTeam","football_get_team_squad":"footballGetTeamSquad","football_get_team_squad_by_season":"footballGetTeamSquadBySeason","football_get_teams_by_country":"footballGetTeamsByCountry","football_get_teams_by_season":"footballGetTeamsBySeason","football_get_topscorers_by_season":"footballGetTopscorersBySeason","football_get_topscorers_by_stage":"footballGetTopscorersByStage","football_get_totw":"footballGetAllTeamOfTheWeek","football_get_totw_by_round":"footballGetTeamOfTheWeekByRound","football_get_transfer":"footballGetTransferById","football_get_transfer_rumour":"footballGetTransferRumourById","football_get_transfer_rumours_between_dates":"footballGetTransferRumoursBetweenDates","football_get_transfer_rumours_by_player":"footballGetTransferRumoursByPlayer","football_get_transfer_rumours_by_team":"footballGetTransferRumoursByTeam","football_get_transfers_between_dates":"footballGetTransfersBetweenDates","football_get_transfers_by_player":"footballGetTransfersByPlayer","football_get_transfers_by_team":"footballGetTransfersByTeam","football_get_tv_station":"footballGetTvStationById","football_get_tv_stations":"footballGetTvStations","football_get_tv_stations_by_fixture":"footballGetTvStationsByFixture","football_get_upcoming_fixtures_by_market":"footballGetUpcomingFixturesByMarket","football_get_upcoming_fixtures_by_tv_station":"footballGetUpcomingFixturesByTvStation","football_get_value_bets":"footballGetValueBets","football_get_value_bets_by_fixture":"footballGetValueBetsByFixture","football_get_venue":"footballGetVenueById","football_get_venues":"footballGetVenues","football_get_venues_by_season":"footballGetVenuesBySeason","football_search_coaches":"footballSearchCoaches","football_search_fixtures":"footballSearchFixtures","football_search_leagues":"footballSearchLeagues","football_search_players":"footballSearchPlayers","football_search_referees":"footballSearchReferees","football_search_rounds":"footballSearchRounds","football_search_seasons":"footballSearchSeasons","football_search_stages":"footballSearchStages","football_search_teams":"footballSearchTeams","football_search_venues":"footballSearchVenues","motorsport_get_all_fixtures":"motorsportGetAllFixtures","motorsport_get_current_leagues_by_team":"motorsportGetCurrentLeaguesByTeam","motorsport_get_driver":"motorsportGetDriverById","motorsport_get_driver_standings":"motorsportGetAllDriverStandings","motorsport_get_driver_standings_by_season":"motorsportGetDriverStandingsBySeason","motorsport_get_drivers":"motorsportGetDrivers","motorsport_get_drivers_by_country":"motorsportGetDriversByCountry","motorsport_get_drivers_by_season":"motorsportGetDriversBySeason","motorsport_get_fixture":"motorsportGetFixtureById","motorsport_get_fixtures_by_date":"motorsportGetFixturesByDate","motorsport_get_fixtures_by_date_range":"motorsportGetFixturesByDateRange","motorsport_get_fixtures_by_ids":"motorsportGetFixturesByIds","motorsport_get_laps_by_fixture":"motorsportGetLapsByFixture","motorsport_get_laps_by_fixture_and_driver":"motorsportGetLapsByFixtureAndDriver","motorsport_get_laps_by_fixture_and_lap":"motorsportGetLapsByFixtureAndLapNumber","motorsport_get_latest_laps_by_fixture":"motorsportGetLatestLapsByFixture","motorsport_get_latest_pitstops_by_fixture":"motorsportGetLatestPitstopsByFixture","motorsport_get_latest_stints_by_fixture":"motorsportGetLatestStintsByFixture","motorsport_get_latest_updated_drivers":"motorsportGetLatestUpdatedDrivers","motorsport_get_latest_updated_fixtures":"motorsportGetLatestUpdatedFixtures","motorsport_get_league":"motorsportGetLeagueById","motorsport_get_leagues":"motorsportGetAllLeagues","motorsport_get_leagues_by_country":"motorsportGetLeaguesByCountry","motorsport_get_leagues_by_date":"motorsportGetLeaguesByFixtureDate","motorsport_get_leagues_by_live":"motorsportGetLeaguesByLive","motorsport_get_leagues_by_team":"motorsportGetLeaguesByTeam","motorsport_get_livescores":"motorsportGetLivescores","motorsport_get_pitstops_by_fixture":"motorsportGetPitstopsByFixture","motorsport_get_pitstops_by_fixture_and_driver":"motorsportGetPitstopsByFixtureAndDriver","motorsport_get_pitstops_by_fixture_and_lap":"motorsportGetPitstopsByFixtureAndLapNumber","motorsport_get_race_results_by_season_and_driver":"motorsportGetRaceResultsBySeasonAndDriver","motorsport_get_race_results_by_season_and_team":"motorsportGetRaceResultsBySeasonAndTeam","motorsport_get_schedules_by_season":"motorsportGetSchedulesBySeason","motorsport_get_season":"motorsportGetSeasonById","motorsport_get_seasons":"motorsportGetAllSeasons","motorsport_get_stage":"motorsportGetStageById","motorsport_get_stages":"motorsportGetAllStages","motorsport_get_stages_by_season":"motorsportGetStagesBySeason","motorsport_get_state":"motorsportGetStateById","motorsport_get_states":"motorsportGetAllStates","motorsport_get_stints_by_fixture":"motorsportGetStintsByFixture","motorsport_get_stints_by_fixture_and_driver":"motorsportGetStintsByFixtureAndDriver","motorsport_get_stints_by_fixture_and_stint":"motorsportGetStintsByFixtureAndStintNumber","motorsport_get_team":"motorsportGetTeamById","motorsport_get_team_standings":"motorsportGetAllTeamStandings","motorsport_get_team_standings_by_season":"motorsportGetTeamStandingsBySeason","motorsport_get_teams":"motorsportGetTeams","motorsport_get_teams_by_country":"motorsportGetTeamsByCountry","motorsport_get_teams_by_season":"motorsportGetTeamsBySeason","motorsport_get_venue":"motorsportGetVenueById","motorsport_get_venues":"motorsportGetVenues","motorsport_get_venues_by_season":"motorsportGetVenuesBySeason","motorsport_search_drivers":"motorsportSearchDrivers","motorsport_search_leagues":"motorsportSearchLeagues","motorsport_search_stages":"motorsportSearchStages","motorsport_search_teams":"motorsportSearchTeams","motorsport_search_venues":"motorsportSearchVenues","odds_get_all_historical_odds":"oddsGetAllHistoricalOdds","odds_get_all_inplay_odds":"oddsGetAllInPlayOdds","odds_get_all_pre_match_odds":"oddsGetAllPreMatchOdds","odds_get_all_premium_odds":"oddsGetAllPremiumOdds","odds_get_bookmaker":"oddsGetBookmakerById","odds_get_bookmaker_event_ids_by_fixture":"oddsGetBookmakerEventIdsByFixture","odds_get_bookmakers":"oddsGetBookmakers","odds_get_bookmakers_by_fixture":"oddsGetBookmakersByFixture","odds_get_inplay_odds_by_fixture":"oddsGetInPlayOddsByFixture","odds_get_inplay_odds_by_fixture_and_bookmaker":"oddsGetInPlayOddsByFixtureAndBookmaker","odds_get_inplay_odds_by_fixture_and_market":"oddsGetInPlayOddsByFixtureAndMarket","odds_get_last_updated_inplay_odds":"oddsGetLastUpdatedInPlayOdds","odds_get_last_updated_pre_match_odds":"oddsGetLastUpdatedPreMatchOdds","odds_get_market":"oddsGetMarketById","odds_get_markets":"oddsGetMarkets","odds_get_pre_match_odds_by_fixture":"oddsGetPreMatchOddsByFixture","odds_get_pre_match_odds_by_fixture_and_bookmaker":"oddsGetPreMatchOddsByFixtureAndBookmaker","odds_get_pre_match_odds_by_fixture_and_market":"oddsGetPreMatchOddsByFixtureAndMarket","odds_get_premium_odds_by_fixture":"oddsGetPremiumOddsByFixture","odds_get_premium_odds_by_fixture_and_bookmaker":"oddsGetPremiumOddsByFixtureAndBookmaker","odds_get_premium_odds_by_fixture_and_market":"oddsGetPremiumOddsByFixtureAndMarket","odds_get_updated_historical_odds_between":"oddsGetUpdatedHistoricalOddsBetweenTimeRange","odds_get_updated_premium_odds_between":"oddsGetUpdatedPremiumOddsBetweenTimeRange","odds_search_bookmakers":"oddsSearchBookmakers","odds_search_markets":"oddsSearchMarkets"}},"sportmonks_v2":{"namespace":"sportmonks","methods":{"core_get_cities":"coreGetCities","core_get_city":"coreGetCityById","core_get_continent":"coreGetContinentById","core_get_continents":"coreGetContinents","core_get_countries":"coreGetCountries","core_get_country":"coreGetCountryById","core_get_entity_filters":"coreGetAllEntityFilters","core_get_my_usage":"coreGetMyUsage","core_get_region":"coreGetRegionById","core_get_regions":"coreGetRegions","core_get_timezones":"coreGetTimezones","core_get_type":"coreGetTypeById","core_get_type_by_entity":"coreGetTypeByEntity","core_get_types":"coreGetTypes","core_search_cities":"coreSearchCities","core_search_countries":"coreSearchCountries","core_search_regions":"coreSearchRegions","football_expected_by_player":"footballGetExpectedXGByPlayer","football_expected_by_team":"footballGetExpectedXGByTeam","football_get_all_commentaries":"footballGetAllCommentaries","football_get_all_fixtures":"footballGetAllFixtures","football_get_all_players":"footballGetAllPlayers","football_get_all_rivals":"footballGetAllRivals","football_get_all_teams":"footballGetAllTeams","football_get_all_transfer_rumours":"footballGetAllTransferRumours","football_get_all_transfers":"footballGetAllTransfers","football_get_brackets_by_season":"footballGetBracketsBySeason","football_get_coach":"footballGetCoachById","football_get_coaches":"footballGetCoaches","football_get_coaches_by_country":"footballGetCoachesByCountry","football_get_commentaries_by_fixture":"footballGetCommentariesByFixture","football_get_current_leagues_by_team":"footballGetCurrentLeaguesByTeam","football_get_expected_lineups_by_player":"footballGetExpectedLineupsByPlayer","football_get_expected_lineups_by_team":"footballGetExpectedLineupsByTeam","football_get_extended_team_squad":"footballGetExtendedTeamSquad","football_get_fixture":"footballGetFixtureById","football_get_fixtures_by_date":"footballGetFixturesByDate","football_get_fixtures_by_date_range":"footballGetFixturesByDateRange","football_get_fixtures_by_date_range_for_team":"footballGetFixturesByDateRangeForTeam","football_get_fixtures_by_ids":"footballGetFixturesByMultipleIds","football_get_grouped_standings_by_round":"footballGetGroupedStandingsByRound","football_get_head_to_head":"footballGetHeadToHead","football_get_inplay_livescores":"footballGetInplayLivescores","football_get_latest_coaches":"footballGetLastUpdatedCoaches","football_get_latest_fixtures":"footballGetLatestUpdatedFixtures","football_get_latest_livescores":"footballGetLatestUpdatedLivescores","football_get_latest_players":"footballGetLastUpdatedPlayers","football_get_latest_totw":"footballGetLatestTeamOfTheWeek","football_get_latest_transfers":"footballGetLatestTransfers","football_get_league":"footballGetLeagueById","football_get_leagues":"footballGetLeagues","football_get_leagues_by_country":"footballGetLeaguesByCountry","football_get_leagues_by_date":"footballGetLeaguesByDate","football_get_leagues_by_team":"footballGetLeaguesByTeam","football_get_live_leagues":"footballGetLiveLeagues","football_get_live_probabilities":"footballGetLiveProbabilities","football_get_live_probabilities_by_fixture":"footballGetLiveProbabilitiesByFixture","football_get_live_standings_by_league":"footballGetLiveStandingsByLeague","football_get_livescores":"footballGetLivescores","football_get_match_facts":"footballGetAllMatchFacts","football_get_match_facts_by_date_range":"footballGetMatchFactsByDateRange","football_get_match_facts_by_fixture":"footballGetMatchFactsByFixture","football_get_match_facts_by_league":"footballGetMatchFactsByLeague","football_get_past_fixtures_by_tv_station":"footballGetPastFixturesByTvStation","football_get_player":"footballGetPlayerById","football_get_players_by_country":"footballGetPlayersByCountry","football_get_postmatch_news":"footballGetPostMatchNews","football_get_postmatch_news_by_season":"footballGetPostMatchNewsBySeason","football_get_predictability_by_league":"footballGetPredictabilityByLeague","football_get_prematch_news":"footballGetPreMatchNews","football_get_prematch_news_by_season":"footballGetPreMatchNewsBySeason","football_get_prematch_news_upcoming":"footballGetPreMatchNewsForUpcomingFixtures","football_get_probabilities":"footballGetProbabilities","football_get_probabilities_by_fixture":"footballGetPredictionsByFixture","football_get_referee":"footballGetRefereeById","football_get_referees":"footballGetReferees","football_get_referees_by_country":"footballGetRefereesByCountry","football_get_referees_by_season":"footballGetRefereesBySeason","football_get_rivals_by_team":"footballGetRivalsByTeam","football_get_round":"footballGetRoundById","football_get_round_statistics":"footballGetRoundStatistics","football_get_rounds":"footballGetRounds","football_get_rounds_by_season":"footballGetRoundsBySeason","football_get_schedules_by_season":"footballGetSchedulesBySeason","football_get_schedules_by_season_and_team":"footballGetSchedulesBySeasonAndTeam","football_get_schedules_by_team":"footballGetSchedulesByTeam","football_get_season":"footballGetSeasonById","football_get_seasons":"footballGetSeasons","football_get_seasons_by_team":"footballGetSeasonsByTeam","football_get_stage":"footballGetStageById","football_get_stage_statistics":"footballGetStageStatistics","football_get_stages":"footballGetStages","football_get_stages_by_season":"footballGetStagesBySeason","football_get_standing_corrections_by_season":"footballGetStandingCorrectionsBySeason","football_get_standings":"footballGetAllStandings","football_get_standings_by_round":"footballGetStandingsByRound","football_get_standings_by_season":"footballGetStandingsBySeason","football_get_state":"footballGetStateById","football_get_states":"footballGetStates","football_get_team":"footballGetTeamById","football_get_team_rankings":"footballGetAllTeamRankings","football_get_team_rankings_by_date":"footballGetTeamRankingsByDate","football_get_team_rankings_by_team":"footballGetTeamRankingsByTeam","football_get_team_squad":"footballGetTeamSquad","football_get_team_squad_by_season":"footballGetTeamSquadBySeason","football_get_teams_by_country":"footballGetTeamsByCountry","football_get_teams_by_season":"footballGetTeamsBySeason","football_get_topscorers_by_season":"footballGetTopscorersBySeason","football_get_topscorers_by_stage":"footballGetTopscorersByStage","football_get_totw":"footballGetAllTeamOfTheWeek","football_get_totw_by_round":"footballGetTeamOfTheWeekByRound","football_get_transfer":"footballGetTransferById","football_get_transfer_rumour":"footballGetTransferRumourById","football_get_transfer_rumours_between_dates":"footballGetTransferRumoursBetweenDates","football_get_transfer_rumours_by_player":"footballGetTransferRumoursByPlayer","football_get_transfer_rumours_by_team":"footballGetTransferRumoursByTeam","football_get_transfers_between_dates":"footballGetTransfersBetweenDates","football_get_transfers_by_player":"footballGetTransfersByPlayer","football_get_transfers_by_team":"footballGetTransfersByTeam","football_get_tv_station":"footballGetTvStationById","football_get_tv_stations":"footballGetTvStations","football_get_tv_stations_by_fixture":"footballGetTvStationsByFixture","football_get_upcoming_fixtures_by_market":"footballGetUpcomingFixturesByMarket","football_get_upcoming_fixtures_by_tv_station":"footballGetUpcomingFixturesByTvStation","football_get_value_bets":"footballGetValueBets","football_get_value_bets_by_fixture":"footballGetValueBetsByFixture","football_get_venue":"footballGetVenueById","football_get_venues":"footballGetVenues","football_get_venues_by_season":"footballGetVenuesBySeason","football_search_coaches":"footballSearchCoaches","football_search_fixtures":"footballSearchFixtures","football_search_leagues":"footballSearchLeagues","football_search_players":"footballSearchPlayers","football_search_referees":"footballSearchReferees","football_search_rounds":"footballSearchRounds","football_search_seasons":"footballSearchSeasons","football_search_stages":"footballSearchStages","football_search_teams":"footballSearchTeams","football_search_venues":"footballSearchVenues","motorsport_get_all_fixtures":"motorsportGetAllFixtures","motorsport_get_current_leagues_by_team":"motorsportGetCurrentLeaguesByTeam","motorsport_get_driver":"motorsportGetDriverById","motorsport_get_driver_standings":"motorsportGetAllDriverStandings","motorsport_get_driver_standings_by_season":"motorsportGetDriverStandingsBySeason","motorsport_get_drivers":"motorsportGetDrivers","motorsport_get_drivers_by_country":"motorsportGetDriversByCountry","motorsport_get_drivers_by_season":"motorsportGetDriversBySeason","motorsport_get_fixture":"motorsportGetFixtureById","motorsport_get_fixtures_by_date":"motorsportGetFixturesByDate","motorsport_get_fixtures_by_date_range":"motorsportGetFixturesByDateRange","motorsport_get_fixtures_by_ids":"motorsportGetFixturesByIds","motorsport_get_laps_by_fixture":"motorsportGetLapsByFixture","motorsport_get_laps_by_fixture_and_driver":"motorsportGetLapsByFixtureAndDriver","motorsport_get_laps_by_fixture_and_lap":"motorsportGetLapsByFixtureAndLapNumber","motorsport_get_latest_laps_by_fixture":"motorsportGetLatestLapsByFixture","motorsport_get_latest_pitstops_by_fixture":"motorsportGetLatestPitstopsByFixture","motorsport_get_latest_stints_by_fixture":"motorsportGetLatestStintsByFixture","motorsport_get_latest_updated_drivers":"motorsportGetLatestUpdatedDrivers","motorsport_get_latest_updated_fixtures":"motorsportGetLatestUpdatedFixtures","motorsport_get_league":"motorsportGetLeagueById","motorsport_get_leagues":"motorsportGetAllLeagues","motorsport_get_leagues_by_country":"motorsportGetLeaguesByCountry","motorsport_get_leagues_by_date":"motorsportGetLeaguesByFixtureDate","motorsport_get_leagues_by_live":"motorsportGetLeaguesByLive","motorsport_get_leagues_by_team":"motorsportGetLeaguesByTeam","motorsport_get_livescores":"motorsportGetLivescores","motorsport_get_pitstops_by_fixture":"motorsportGetPitstopsByFixture","motorsport_get_pitstops_by_fixture_and_driver":"motorsportGetPitstopsByFixtureAndDriver","motorsport_get_pitstops_by_fixture_and_lap":"motorsportGetPitstopsByFixtureAndLapNumber","motorsport_get_race_results_by_season_and_driver":"motorsportGetRaceResultsBySeasonAndDriver","motorsport_get_race_results_by_season_and_team":"motorsportGetRaceResultsBySeasonAndTeam","motorsport_get_schedules_by_season":"motorsportGetSchedulesBySeason","motorsport_get_season":"motorsportGetSeasonById","motorsport_get_seasons":"motorsportGetAllSeasons","motorsport_get_stage":"motorsportGetStageById","motorsport_get_stages":"motorsportGetAllStages","motorsport_get_stages_by_season":"motorsportGetStagesBySeason","motorsport_get_state":"motorsportGetStateById","motorsport_get_states":"motorsportGetAllStates","motorsport_get_stints_by_fixture":"motorsportGetStintsByFixture","motorsport_get_stints_by_fixture_and_driver":"motorsportGetStintsByFixtureAndDriver","motorsport_get_stints_by_fixture_and_stint":"motorsportGetStintsByFixtureAndStintNumber","motorsport_get_team":"motorsportGetTeamById","motorsport_get_team_standings":"motorsportGetAllTeamStandings","motorsport_get_team_standings_by_season":"motorsportGetTeamStandingsBySeason","motorsport_get_teams":"motorsportGetTeams","motorsport_get_teams_by_country":"motorsportGetTeamsByCountry","motorsport_get_teams_by_season":"motorsportGetTeamsBySeason","motorsport_get_venue":"motorsportGetVenueById","motorsport_get_venues":"motorsportGetVenues","motorsport_get_venues_by_season":"motorsportGetVenuesBySeason","motorsport_search_drivers":"motorsportSearchDrivers","motorsport_search_leagues":"motorsportSearchLeagues","motorsport_search_stages":"motorsportSearchStages","motorsport_search_teams":"motorsportSearchTeams","motorsport_search_venues":"motorsportSearchVenues","odds_get_all_historical_odds":"oddsGetAllHistoricalOdds","odds_get_all_inplay_odds":"oddsGetAllInPlayOdds","odds_get_all_pre_match_odds":"oddsGetAllPreMatchOdds","odds_get_all_premium_odds":"oddsGetAllPremiumOdds","odds_get_bookmaker":"oddsGetBookmakerById","odds_get_bookmaker_event_ids_by_fixture":"oddsGetBookmakerEventIdsByFixture","odds_get_bookmakers":"oddsGetBookmakers","odds_get_bookmakers_by_fixture":"oddsGetBookmakersByFixture","odds_get_inplay_odds_by_fixture":"oddsGetInPlayOddsByFixture","odds_get_inplay_odds_by_fixture_and_bookmaker":"oddsGetInPlayOddsByFixtureAndBookmaker","odds_get_inplay_odds_by_fixture_and_market":"oddsGetInPlayOddsByFixtureAndMarket","odds_get_last_updated_inplay_odds":"oddsGetLastUpdatedInPlayOdds","odds_get_last_updated_pre_match_odds":"oddsGetLastUpdatedPreMatchOdds","odds_get_market":"oddsGetMarketById","odds_get_markets":"oddsGetMarkets","odds_get_pre_match_odds_by_fixture":"oddsGetPreMatchOddsByFixture","odds_get_pre_match_odds_by_fixture_and_bookmaker":"oddsGetPreMatchOddsByFixtureAndBookmaker","odds_get_pre_match_odds_by_fixture_and_market":"oddsGetPreMatchOddsByFixtureAndMarket","odds_get_premium_odds_by_fixture":"oddsGetPremiumOddsByFixture","odds_get_premium_odds_by_fixture_and_bookmaker":"oddsGetPremiumOddsByFixtureAndBookmaker","odds_get_premium_odds_by_fixture_and_market":"oddsGetPremiumOddsByFixtureAndMarket","odds_get_updated_historical_odds_between":"oddsGetUpdatedHistoricalOddsBetweenTimeRange","odds_get_updated_premium_odds_between":"oddsGetUpdatedPremiumOddsBetweenTimeRange","odds_search_bookmakers":"oddsSearchBookmakers","odds_search_markets":"oddsSearchMarkets"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"spotify":{"namespace":"legacy.spotify","methods":{"spotify_add_playlist_cover":"addPlaylistCover","spotify_add_to_queue":"addToQueue","spotify_add_tracks_to_playlist":"addTracksToPlaylist","spotify_check_following":"checkFollowing","spotify_check_playlist_followers":"checkPlaylistFollowers","spotify_check_saved_albums":"checkSavedAlbums","spotify_check_saved_audiobooks":"checkSavedAudiobooks","spotify_check_saved_episodes":"checkSavedEpisodes","spotify_check_saved_shows":"checkSavedShows","spotify_check_saved_tracks":"checkSavedTracks","spotify_create_playlist":"createPlaylist","spotify_follow_artists":"followArtists","spotify_follow_playlist":"followPlaylist","spotify_get_album":"getAlbum","spotify_get_album_tracks":"getAlbumTracks","spotify_get_albums":"getMultipleAlbums","spotify_get_artist":"getArtist","spotify_get_artist_albums":"getArtistAlbums","spotify_get_artist_top_tracks":"getArtistTopTracks","spotify_get_artists":"getMultipleArtists","spotify_get_audiobook":"getAudiobook","spotify_get_audiobook_chapters":"getAudiobookChapters","spotify_get_audiobooks":"getMultipleAudiobooks","spotify_get_categories":"getCategories","spotify_get_current_user":"getMyProfile","spotify_get_currently_playing":"getCurrentlyPlaying","spotify_get_devices":"getDevices","spotify_get_episode":"getEpisode","spotify_get_episodes":"getMultipleEpisodes","spotify_get_followed_artists":"getFollowedArtists","spotify_get_markets":"getAvailableMarkets","spotify_get_new_releases":"getNewReleases","spotify_get_playback_state":"getPlaybackState","spotify_get_playlist":"getPlaylist","spotify_get_playlist_cover":"getPlaylistCover","spotify_get_playlist_tracks":"getPlaylistTracks","spotify_get_queue":"getQueue","spotify_get_recently_played":"getRecentlyPlayed","spotify_get_saved_albums":"getSavedAlbums","spotify_get_saved_audiobooks":"getSavedAudiobooks","spotify_get_saved_episodes":"getSavedEpisodes","spotify_get_saved_shows":"getSavedShows","spotify_get_saved_tracks":"getSavedTracks","spotify_get_show":"getShow","spotify_get_show_episodes":"getShowEpisodes","spotify_get_shows":"getMultipleShows","spotify_get_top_artists":"getMyTopArtists","spotify_get_top_tracks":"getMyTopTracks","spotify_get_track":"getTrack","spotify_get_tracks":"getMultipleTracks","spotify_get_user_playlists":"getMyPlaylists","spotify_get_user_profile":"getUserProfile","spotify_pause":"pause","spotify_play":"play","spotify_remove_saved_albums":"removeSavedAlbums","spotify_remove_saved_audiobooks":"removeSavedAudiobooks","spotify_remove_saved_episodes":"removeSavedEpisodes","spotify_remove_saved_shows":"removeSavedShows","spotify_remove_saved_tracks":"removeSavedTracks","spotify_remove_tracks_from_playlist":"removeTracksFromPlaylist","spotify_reorder_playlist_items":"reorderPlaylistItems","spotify_replace_playlist_items":"replacePlaylistItems","spotify_save_albums":"saveAlbums","spotify_save_audiobooks":"saveAudiobooks","spotify_save_episodes":"saveEpisodes","spotify_save_shows":"saveShows","spotify_save_tracks":"saveTracks","spotify_search":"search","spotify_seek":"seek","spotify_set_repeat":"setRepeat","spotify_set_shuffle":"setShuffle","spotify_set_volume":"setVolume","spotify_skip_next":"skipToNext","spotify_skip_previous":"skipToPrevious","spotify_transfer_playback":"transferPlayback","spotify_unfollow_artists":"unfollowArtists","spotify_unfollow_playlist":"unfollowPlaylist","spotify_update_playlist":"updatePlaylist"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"sqs":{"namespace":"legacy.sqs","methods":{"cancel_message_move_task":"cancelMessageMoveTask","change_message_visibility":"changeMessageVisibility","change_message_visibility_batch":"changeMessageVisibilityBatch","create_queue":"createQueue","delete_message":"deleteMessage","delete_message_batch":"deleteMessageBatch","delete_queue":"deleteQueue","get_queue_attributes":"getQueueAttributes","get_queue_url":"getQueueUrl","list_dead_letter_source_queues":"listDeadLetterSourceQueues","list_message_move_tasks":"listMessageMoveTasks","list_queue_tags":"listQueueTags","list_queues":"listQueues","purge_queue":"purgeQueue","receive_message":"receiveMessage","send":"sendMessage","send_message_batch":"sendMessageBatch","set_queue_attributes":"setQueueAttributes","start_message_move_task":"startMessageMoveTask","tag_queue":"tagQueue","untag_queue":"untagQueue"}},"sqs_v2":{"namespace":"sqs","methods":{"cancel_message_move_task":"cancelMessageMoveTask","change_message_visibility":"changeMessageVisibility","change_message_visibility_batch":"changeMessageVisibilityBatch","create_queue":"createQueue","delete_message":"deleteMessage","delete_message_batch":"deleteMessageBatch","delete_queue":"deleteQueue","get_queue_attributes":"getQueueAttributes","get_queue_url":"getQueueUrl","list_dead_letter_source_queues":"listDeadLetterSourceQueues","list_message_move_tasks":"listMessageMoveTasks","list_queue_tags":"listQueueTags","list_queues":"listQueues","purge_queue":"purgeQueue","receive_message":"receiveMessage","send":"sendMessage","send_message_batch":"sendMessageBatch","set_queue_attributes":"setQueueAttributes","start_message_move_task":"startMessageMoveTask","tag_queue":"tagQueue","untag_queue":"untagQueue"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"square":{"namespace":"legacy.square","methods":{"batch_retrieve_inventory_counts":"batchRetrieveInventoryCounts","cancel_invoice":"cancelInvoice","cancel_payment":"cancelPayment","complete_payment":"completePayment","create_catalog_image":"createCatalogImage","create_customer":"createCustomer","create_invoice":"createInvoice","create_order":"createOrder","create_payment":"createPayment","delete_catalog_object":"deleteCatalogObject","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","get_catalog_object":"getCatalogObject","get_customer":"getCustomer","get_invoice":"getInvoice","get_location":"getLocation","get_order":"getOrder","get_payment":"getPayment","get_refund":"getRefund","list_catalog":"listCatalog","list_customers":"listCustomers","list_invoices":"listInvoices","list_locations":"listLocations","list_payments":"listPayments","list_refunds":"listRefunds","pay_order":"payOrder","publish_invoice":"publishInvoice","refund_payment":"refundPayment","search_catalog_objects":"searchCatalogObjects","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_orders":"searchOrders","update_customer":"updateCustomer","upsert_catalog_object":"upsertCatalogObject"}},"square_v2":{"namespace":"square","methods":{"batch_retrieve_inventory_counts":"batchRetrieveInventoryCounts","cancel_invoice":"cancelInvoice","cancel_payment":"cancelPayment","complete_payment":"completePayment","create_catalog_image":"createCatalogImage","create_customer":"createCustomer","create_invoice":"createInvoice","create_order":"createOrder","create_payment":"createPayment","delete_catalog_object":"deleteCatalogObject","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","get_catalog_object":"getCatalogObject","get_customer":"getCustomer","get_invoice":"getInvoice","get_location":"getLocation","get_order":"getOrder","get_payment":"getPayment","get_refund":"getRefund","list_catalog":"listCatalog","list_customers":"listCustomers","list_invoices":"listInvoices","list_locations":"listLocations","list_payments":"listPayments","list_refunds":"listRefunds","pay_order":"payOrder","publish_invoice":"publishInvoice","refund_payment":"refundPayment","search_catalog_objects":"searchCatalogObjects","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_orders":"searchOrders","update_customer":"updateCustomer","upsert_catalog_object":"upsertCatalogObject"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"ssh":{"namespace":"legacy.ssh","methods":{"ssh_check_command_exists":"checkCommandExists","ssh_check_file_exists":"checkFileDirectoryExists","ssh_create_directory":"createDirectory","ssh_delete_file":"deleteFileDirectory","ssh_download_file":"downloadFile","ssh_execute_command":"executeCommand","ssh_execute_script":"executeScript","ssh_get_system_info":"getSystemInfo","ssh_list_directory":"listDirectory","ssh_move_rename":"moveRename","ssh_read_file_content":"readFileContent","ssh_upload_file":"uploadFile","ssh_write_file_content":"writeFileContent"}},"ssh_v2":{"namespace":"ssh","methods":{"ssh_check_command_exists":"checkCommandExists","ssh_check_file_exists":"checkFileDirectoryExists","ssh_create_directory":"createDirectory","ssh_delete_file":"deleteFileDirectory","ssh_download_file":"downloadFile","ssh_execute_command":"executeCommand","ssh_execute_script":"executeScript","ssh_get_system_info":"getSystemInfo","ssh_list_directory":"listDirectory","ssh_move_rename":"moveRename","ssh_read_file_content":"readFileContent","ssh_upload_file":"uploadFile","ssh_write_file_content":"writeFileContent"}},"ssm":{"namespace":"legacy.ssm","methods":{"cancel_command":"cancelCommand","delete_parameter":"deleteParameter","describe_automation_executions":"describeAutomationExecutions","describe_instance_information":"describeInstanceInformation","describe_instance_patch_states":"describeInstancePatchStates","describe_instance_patches":"describeInstancePatches","describe_parameters":"describeParameters","get_automation_execution":"getAutomationExecution","get_command_invocation":"getCommandInvocation","get_document":"getDocument","get_parameter":"getParameter","get_parameters":"getParameters","get_parameters_by_path":"getParametersByPath","list_command_invocations":"listCommandInvocations","list_commands":"listCommands","list_compliance_items":"listComplianceItems","list_compliance_summaries":"listComplianceSummaries","list_documents":"listDocuments","put_parameter":"putParameter","send_command":"sendCommand","start_automation_execution":"startAutomationExecution","stop_automation_execution":"stopAutomationExecution"}},"ssm_v2":{"namespace":"ssm","methods":{"cancel_command":"cancelCommand","delete_parameter":"deleteParameter","describe_automation_executions":"describeAutomationExecutions","describe_instance_information":"describeInstanceInformation","describe_instance_patch_states":"describeInstancePatchStates","describe_instance_patches":"describeInstancePatches","describe_parameters":"describeParameters","get_automation_execution":"getAutomationExecution","get_command_invocation":"getCommandInvocation","get_document":"getDocument","get_parameter":"getParameter","get_parameters":"getParameters","get_parameters_by_path":"getParametersByPath","list_command_invocations":"listCommandInvocations","list_commands":"listCommands","list_compliance_items":"listComplianceItems","list_compliance_summaries":"listComplianceSummaries","list_documents":"listDocuments","put_parameter":"putParameter","send_command":"sendCommand","start_automation_execution":"startAutomationExecution","stop_automation_execution":"stopAutomationExecution"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"stagehand":{"namespace":"stagehand","methods":{"agent":"runAgent","extract":"extractData"}},"start_trigger":{"namespace":"trigger.start"},"starter":{"namespace":"legacy.starter"},"stripe":{"namespace":"legacy.stripe","methods":{"cancel_payment_intent":"cancelPaymentIntent","cancel_subscription":"cancelSubscription","capture_charge":"captureCharge","capture_payment_intent":"capturePaymentIntent","confirm_payment_intent":"confirmPaymentIntent","create_charge":"createCharge","create_customer":"createCustomer","create_invoice":"createInvoice","create_payment_intent":"createPaymentIntent","create_price":"createPrice","create_product":"createProduct","create_subscription":"createSubscription","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","delete_product":"deleteProduct","finalize_invoice":"finalizeInvoice","list_charges":"listCharges","list_customers":"listCustomers","list_events":"listEvents","list_invoices":"listInvoices","list_payment_intents":"listPaymentIntents","list_prices":"listPrices","list_products":"listProducts","list_subscriptions":"listSubscriptions","pay_invoice":"payInvoice","resume_subscription":"resumeSubscription","retrieve_charge":"retrieveCharge","retrieve_customer":"retrieveCustomer","retrieve_event":"retrieveEvent","retrieve_invoice":"retrieveInvoice","retrieve_payment_intent":"retrievePaymentIntent","retrieve_price":"retrievePrice","retrieve_product":"retrieveProduct","retrieve_subscription":"retrieveSubscription","search_charges":"searchCharges","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_payment_intents":"searchPaymentIntents","search_prices":"searchPrices","search_products":"searchProducts","search_subscriptions":"searchSubscriptions","send_invoice":"sendInvoice","update_charge":"updateCharge","update_customer":"updateCustomer","update_invoice":"updateInvoice","update_payment_intent":"updatePaymentIntent","update_price":"updatePrice","update_product":"updateProduct","update_subscription":"updateSubscription","void_invoice":"voidInvoice"},"triggers":{"stripe_webhook":"webhook"}},"stripe_v2":{"namespace":"stripe","methods":{"cancel_payment_intent":"cancelPaymentIntent","cancel_subscription":"cancelSubscription","capture_charge":"captureCharge","capture_payment_intent":"capturePaymentIntent","confirm_payment_intent":"confirmPaymentIntent","create_charge":"createCharge","create_customer":"createCustomer","create_invoice":"createInvoice","create_payment_intent":"createPaymentIntent","create_price":"createPrice","create_product":"createProduct","create_subscription":"createSubscription","delete_customer":"deleteCustomer","delete_invoice":"deleteInvoice","delete_product":"deleteProduct","finalize_invoice":"finalizeInvoice","list_charges":"listCharges","list_customers":"listCustomers","list_events":"listEvents","list_invoices":"listInvoices","list_payment_intents":"listPaymentIntents","list_prices":"listPrices","list_products":"listProducts","list_subscriptions":"listSubscriptions","pay_invoice":"payInvoice","resume_subscription":"resumeSubscription","retrieve_charge":"retrieveCharge","retrieve_customer":"retrieveCustomer","retrieve_event":"retrieveEvent","retrieve_invoice":"retrieveInvoice","retrieve_payment_intent":"retrievePaymentIntent","retrieve_price":"retrievePrice","retrieve_product":"retrieveProduct","retrieve_subscription":"retrieveSubscription","search_charges":"searchCharges","search_customers":"searchCustomers","search_invoices":"searchInvoices","search_payment_intents":"searchPaymentIntents","search_prices":"searchPrices","search_products":"searchProducts","search_subscriptions":"searchSubscriptions","send_invoice":"sendInvoice","update_charge":"updateCharge","update_customer":"updateCustomer","update_invoice":"updateInvoice","update_payment_intent":"updatePaymentIntent","update_price":"updatePrice","update_product":"updateProduct","update_subscription":"updateSubscription","void_invoice":"voidInvoice"},"triggers":{"stripe_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"sts":{"namespace":"legacy.sts","methods":{"assume_role":"assumeRole","assume_role_with_saml":"assumeRoleWithSaml","assume_role_with_web_identity":"assumeRoleWithWebIdentity","get_access_key_info":"getAccessKeyInfo","get_caller_identity":"getCallerIdentity","get_session_token":"getSessionToken"}},"sts_v2":{"namespace":"sts","methods":{"assume_role":"assumeRole","assume_role_with_saml":"assumeRoleWithSaml","assume_role_with_web_identity":"assumeRoleWithWebIdentity","get_access_key_info":"getAccessKeyInfo","get_caller_identity":"getCallerIdentity","get_session_token":"getSessionToken"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"stt":{"namespace":"legacy.stt"},"stt_v2":{"namespace":"stt"},"supabase":{"namespace":"legacy.supabase","methods":{"count":"countRows","delete":"deleteARow","get_row":"getARow","insert":"createARow","introspect":"introspectSchema","invoke_function":"invokeEdgeFunction","query":"getManyRows","rpc":"callRpcFunction","storage_copy":"storageCopyFile","storage_create_bucket":"storageCreateBucket","storage_create_signed_upload_url":"storageCreateSignedUploadUrl","storage_create_signed_url":"storageCreateSignedUrl","storage_delete":"storageDeleteFiles","storage_delete_bucket":"storageDeleteBucket","storage_download":"storageDownloadFile","storage_empty_bucket":"storageEmptyBucket","storage_get_public_url":"storageGetPublicUrl","storage_list":"storageListFiles","storage_list_buckets":"storageListBuckets","storage_move":"storageMoveFile","storage_update_bucket":"storageUpdateBucket","storage_upload":"storageUploadFile","text_search":"fullTextSearch","update":"updateARow","upsert":"upsertARow","vector_search":"vectorSearch"}},"supabase_v2":{"namespace":"supabase","methods":{"count":"countRows","delete":"deleteARow","get_row":"getARow","insert":"createARow","introspect":"introspectSchema","invoke_function":"invokeEdgeFunction","query":"getManyRows","rpc":"callRpcFunction","storage_copy":"storageCopyFile","storage_create_bucket":"storageCreateBucket","storage_create_signed_upload_url":"storageCreateSignedUploadUrl","storage_create_signed_url":"storageCreateSignedUrl","storage_delete":"storageDeleteFiles","storage_delete_bucket":"storageDeleteBucket","storage_download":"storageDownloadFile","storage_empty_bucket":"storageEmptyBucket","storage_get_public_url":"storageGetPublicUrl","storage_list":"storageListFiles","storage_list_buckets":"storageListBuckets","storage_move":"storageMoveFile","storage_update_bucket":"storageUpdateBucket","storage_upload":"storageUploadFile","text_search":"fullTextSearch","update":"updateARow","upsert":"upsertARow","vector_search":"vectorSearch"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"table":{"namespace":"legacy.table","methods":{"batch_insert_rows":"batchInsertRows","delete_row":"deleteRowById","delete_rows_by_filter":"deleteRowsByFilter","get_row":"getRowById","get_schema":"getSchema","insert_row":"insertRow","query_rows":"queryRows","update_row":"updateRowById","update_rows_by_filter":"updateRowsByFilter","upsert_row":"upsertRow"},"triggers":{"table_new_row":"newRow"}},"table_v2":{"namespace":"table","methods":{"batch_insert_rows":"batchInsertRows","delete_row":"deleteRowById","delete_rows_by_filter":"deleteRowsByFilter","get_row":"getRowById","get_schema":"getSchema","insert_row":"insertRow","query_rows":"queryRows","update_row":"updateRowById","update_rows_by_filter":"updateRowsByFilter","upsert_row":"upsertRow"},"triggers":{"table_new_row":"newRow"}},"tailscale":{"namespace":"legacy.tailscale","methods":{"approve_user":"approveUser","authorize_device":"authorizeDevice","create_auth_key":"createAuthKey","delete_auth_key":"deleteAuthKey","delete_device":"deleteDevice","delete_device_attribute":"deleteDeviceAttribute","delete_user":"deleteUser","expire_device_key":"expireDeviceKey","get_acl":"getAcl","get_auth_key":"getAuthKey","get_device":"getDevice","get_device_attributes":"getDeviceAttributes","get_device_routes":"getDeviceRoutes","get_dns_configuration":"getDnsConfiguration","get_dns_preferences":"getDnsPreferences","get_dns_searchpaths":"getDnsSearchPaths","get_split_dns":"getSplitDns","get_tailnet_settings":"getTailnetSettings","get_user":"getUser","list_auth_keys":"listKeys","list_devices":"listDevices","list_dns_nameservers":"listDnsNameservers","list_users":"listUsers","restore_user":"restoreUser","set_acl":"setAcl","set_device_attribute":"setDeviceAttribute","set_device_name":"setDeviceName","set_device_routes":"setDeviceRoutes","set_device_tags":"setDeviceTags","set_dns_configuration":"setDnsConfiguration","set_dns_nameservers":"setDnsNameservers","set_dns_preferences":"setDnsPreferences","set_dns_searchpaths":"setDnsSearchPaths","set_split_dns":"setSplitDns","set_user_role":"setUserRole","suspend_user":"suspendUser","update_device_key":"updateDeviceKey","update_split_dns":"updateSplitDns","update_tailnet_settings":"updateTailnetSettings","validate_acl":"validateAcl"}},"tailscale_v2":{"namespace":"tailscale","methods":{"approve_user":"approveUser","authorize_device":"authorizeDevice","create_auth_key":"createAuthKey","delete_auth_key":"deleteAuthKey","delete_device":"deleteDevice","delete_device_attribute":"deleteDeviceAttribute","delete_user":"deleteUser","expire_device_key":"expireDeviceKey","get_acl":"getAcl","get_auth_key":"getAuthKey","get_device":"getDevice","get_device_attributes":"getDeviceAttributes","get_device_routes":"getDeviceRoutes","get_dns_configuration":"getDnsConfiguration","get_dns_preferences":"getDnsPreferences","get_dns_searchpaths":"getDnsSearchPaths","get_split_dns":"getSplitDns","get_tailnet_settings":"getTailnetSettings","get_user":"getUser","list_auth_keys":"listKeys","list_devices":"listDevices","list_dns_nameservers":"listDnsNameservers","list_users":"listUsers","restore_user":"restoreUser","set_acl":"setAcl","set_device_attribute":"setDeviceAttribute","set_device_name":"setDeviceName","set_device_routes":"setDeviceRoutes","set_device_tags":"setDeviceTags","set_dns_configuration":"setDnsConfiguration","set_dns_nameservers":"setDnsNameservers","set_dns_preferences":"setDnsPreferences","set_dns_searchpaths":"setDnsSearchPaths","set_split_dns":"setSplitDns","set_user_role":"setUserRole","suspend_user":"suspendUser","update_device_key":"updateDeviceKey","update_split_dns":"updateSplitDns","update_tailnet_settings":"updateTailnetSettings","validate_acl":"validateAcl"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"tavily":{"namespace":"legacy.tavily","methods":{"tavily_crawl":"crawlWebsite","tavily_extract":"extractContent","tavily_map":"mapWebsite","tavily_search":"search"}},"tavily_v2":{"namespace":"tavily","methods":{"tavily_crawl":"crawlWebsite","tavily_extract":"extractContent","tavily_map":"mapWebsite","tavily_search":"search"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"telegram":{"namespace":"legacy.telegram","methods":{"telegram_copy_message":"copyMessage","telegram_delete_message":"deleteMessage","telegram_edit_message_text":"editMessageText","telegram_forward_message":"forwardMessage","telegram_get_chat":"getChat","telegram_get_chat_member":"getChatMember","telegram_message":"sendMessage","telegram_pin_message":"pinMessage","telegram_send_animation":"sendAnimation","telegram_send_audio":"sendAudio","telegram_send_chat_action":"sendChatAction","telegram_send_contact":"sendContact","telegram_send_document":"sendDocument","telegram_send_location":"sendLocation","telegram_send_photo":"sendPhoto","telegram_send_poll":"sendPoll","telegram_send_video":"sendVideo","telegram_set_message_reaction":"setMessageReaction","telegram_unpin_message":"unpinMessage"},"triggers":{"telegram_webhook":"webhook"}},"telegram_v2":{"namespace":"telegram","methods":{"telegram_copy_message":"copyMessage","telegram_delete_message":"deleteMessage","telegram_edit_message_text":"editMessageText","telegram_forward_message":"forwardMessage","telegram_get_chat":"getChat","telegram_get_chat_member":"getChatMember","telegram_message":"sendMessage","telegram_pin_message":"pinMessage","telegram_send_animation":"sendAnimation","telegram_send_audio":"sendAudio","telegram_send_chat_action":"sendChatAction","telegram_send_contact":"sendContact","telegram_send_document":"sendDocument","telegram_send_location":"sendLocation","telegram_send_photo":"sendPhoto","telegram_send_poll":"sendPoll","telegram_send_video":"sendVideo","telegram_set_message_reaction":"setMessageReaction","telegram_unpin_message":"unpinMessage"},"triggers":{"telegram_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"temporal":{"namespace":"temporal","methods":{"cancel_workflow":"cancelWorkflow","count_workflows":"countWorkflows","create_schedule":"createSchedule","delete_schedule":"deleteSchedule","describe_schedule":"describeSchedule","describe_task_queue":"describeTaskQueue","describe_workflow":"describeWorkflow","get_workflow_history":"getWorkflowHistory","list_schedules":"listSchedules","list_workflows":"listWorkflows","pause_schedule":"pauseSchedule","query_workflow":"queryWorkflow","reset_workflow":"resetWorkflow","signal_with_start":"signalWithStart","signal_workflow":"signalWorkflow","start_workflow":"startWorkflow","terminate_workflow":"terminateWorkflow","trigger_schedule":"triggerSchedule","unpause_schedule":"unpauseSchedule","update_workflow":"updateWorkflow"}},"textract":{"namespace":"legacy.textract"},"textract_v2":{"namespace":"legacy.textractV2","methods":{"analyze_document":"analyzeDocumentTextTablesForms","analyze_expense":"analyzeExpenseInvoicesReceipts","analyze_id":"analyzeIdentityDocument"}},"textract_v3":{"namespace":"textract","methods":{"analyze_document":"analyzeDocumentTextTablesForms","analyze_expense":"analyzeExpenseInvoicesReceipts","analyze_id":"analyzeIdentityDocument"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"thinking":{"namespace":"legacy.thinking"},"thrive":{"namespace":"legacy.thrive","methods":{"add_audience_managers":"addAudienceManagers","add_audience_members":"addAudienceMembers","add_user_tags":"addUserTags","create_assignment":"createAssignment","create_audience":"createAudience","create_completion":"createCompletion","create_user":"createUser","delete_assignment":"deleteAssignment","delete_audience":"deleteAudience","delete_user":"deleteUser","get_activity":"getActivity","get_assignment":"getAssignment","get_audience":"getAudience","get_completion":"getCompletion","get_content":"getContent","get_cpd_category":"getCpdCategory","get_cpd_entry":"getCpdEntry","get_cpd_requirement":"getCpdRequirement","get_enrolment":"getEnrolment","get_skill_levels":"getSkillLevels","get_tag":"getTag","get_user_by_id":"getUserById","get_user_by_ref":"getUserByRef","list_assignments":"listAssignments","list_audience_managers":"listAudienceManagers","list_audience_members":"listAudienceMembers","list_audiences":"listAudiences","list_completions":"listCompletions","list_enrolments":"listEnrolments","list_tags":"listTags","query_activities":"queryActivities","query_content":"queryContent","query_cpd_categories":"queryCpdCategories","query_cpd_entries":"queryCpdEntries","query_cpd_requirements":"queryCpdRequirements","query_cpd_user_summaries":"queryCpdUserSummaries","remove_audience_manager":"removeAudienceManager","remove_audience_member":"removeAudienceMember","remove_user_tags":"removeUserTags","replace_audience_managers":"replaceAudienceManagers","replace_audience_members":"replaceAudienceMembers","search_users":"searchUsers","suspend_user":"suspendUser","update_assignment":"updateAssignment","update_audience":"updateAudience","update_user":"updateUser","update_user_skills":"updateUserSkills"}},"thrive_v2":{"namespace":"thrive","methods":{"add_audience_managers":"addAudienceManagers","add_audience_members":"addAudienceMembers","add_user_tags":"addUserTags","create_assignment":"createAssignment","create_audience":"createAudience","create_completion":"createCompletion","create_user":"createUser","delete_assignment":"deleteAssignment","delete_audience":"deleteAudience","delete_user":"deleteUser","get_activity":"getActivity","get_assignment":"getAssignment","get_audience":"getAudience","get_completion":"getCompletion","get_content":"getContent","get_cpd_category":"getCpdCategory","get_cpd_entry":"getCpdEntry","get_cpd_requirement":"getCpdRequirement","get_enrolment":"getEnrolment","get_skill_levels":"getSkillLevels","get_tag":"getTag","get_user_by_id":"getUserById","get_user_by_ref":"getUserByRef","list_assignments":"listAssignments","list_audience_managers":"listAudienceManagers","list_audience_members":"listAudienceMembers","list_audiences":"listAudiences","list_completions":"listCompletions","list_enrolments":"listEnrolments","list_tags":"listTags","query_activities":"queryActivities","query_content":"queryContent","query_cpd_categories":"queryCpdCategories","query_cpd_entries":"queryCpdEntries","query_cpd_requirements":"queryCpdRequirements","query_cpd_user_summaries":"queryCpdUserSummaries","remove_audience_manager":"removeAudienceManager","remove_audience_member":"removeAudienceMember","remove_user_tags":"removeUserTags","replace_audience_managers":"replaceAudienceManagers","replace_audience_members":"replaceAudienceMembers","search_users":"searchUsers","suspend_user":"suspendUser","update_assignment":"updateAssignment","update_audience":"updateAudience","update_user":"updateUser","update_user_skills":"updateUserSkills"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"tiktok":{"namespace":"tiktok","methods":{"tiktok_get_post_status":"getPostStatus","tiktok_get_user":"getUserInfo","tiktok_list_videos":"listVideos","tiktok_query_videos":"queryVideos","tiktok_upload_video_draft":"uploadVideoDraft"},"triggers":{"tiktok_authorization_removed":"authorizationRemoved","tiktok_post_inbox_delivered":"postInboxDelivered","tiktok_post_no_longer_public":"postNoLongerPublic","tiktok_post_publicly_available":"postPubliclyAvailable","tiktok_post_publish_complete":"postPublishComplete","tiktok_post_publish_failed":"postPublishFailed"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"triggerCredentials":"credential"}}},"tinybird":{"namespace":"legacy.tinybird","methods":{"tinybird_append_datasource":"appendDataSourceFromUrl","tinybird_delete_datasource_rows":"deleteDataSourceRows","tinybird_events":"sendEvents","tinybird_get_job":"getJobStatus","tinybird_query":"query","tinybird_query_pipe":"queryPipeEndpoint","tinybird_truncate_datasource":"truncateDataSource"}},"tinybird_v2":{"namespace":"tinybird","methods":{"tinybird_append_datasource":"appendDataSourceFromUrl","tinybird_delete_datasource_rows":"deleteDataSourceRows","tinybird_events":"sendEvents","tinybird_get_job":"getJobStatus","tinybird_query":"query","tinybird_query_pipe":"queryPipeEndpoint","tinybird_truncate_datasource":"truncateDataSource"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"tinyfish":{"namespace":"tinyfish","methods":{"tinyfish_cancel_run":"cancelRun","tinyfish_fetch":"fetchUrls","tinyfish_get_run":"getRun","tinyfish_list_profiles":"listBrowserProfiles","tinyfish_list_runs":"listRuns","tinyfish_list_vault_items":"listVaultItems","tinyfish_run":"runAgent","tinyfish_run_async":"startAgentRun","tinyfish_search":"search"}},"translate":{"namespace":"translate"},"trello":{"namespace":"trello","methods":{"trello_add_checklist":"addChecklist","trello_add_checklist_item":"addChecklistItem","trello_add_comment":"addComment","trello_add_label":"addLabel","trello_add_member":"addMember","trello_create_board":"createBoard","trello_create_card":"createCard","trello_create_list":"createList","trello_delete_card":"deleteCard","trello_get_actions":"getActions","trello_get_board":"getBoard","trello_get_card":"getCard","trello_list_cards":"listCards","trello_list_lists":"getLists","trello_list_members":"listMembers","trello_remove_label":"removeLabel","trello_remove_member":"removeMember","trello_search":"search","trello_update_card":"updateCard","trello_update_checklist_item":"updateChecklistItem","trello_update_list":"updateList"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"trigger_dev":{"namespace":"legacy.triggerDev","methods":{"trigger_dev_activate_schedule":"activateSchedule","trigger_dev_add_run_tags":"addRunTags","trigger_dev_batch_trigger_task":"batchTriggerTask","trigger_dev_cancel_run":"cancelRun","trigger_dev_complete_waitpoint_token":"completeWaitpointToken","trigger_dev_create_env_var":"createEnvVar","trigger_dev_create_schedule":"createSchedule","trigger_dev_create_waitpoint_token":"createWaitpointToken","trigger_dev_deactivate_schedule":"deactivateSchedule","trigger_dev_delete_env_var":"deleteEnvVar","trigger_dev_delete_schedule":"deleteSchedule","trigger_dev_execute_query":"executeQuery","trigger_dev_get_batch":"getBatch","trigger_dev_get_batch_results":"getBatchResults","trigger_dev_get_deployment":"getDeployment","trigger_dev_get_env_var":"getEnvVar","trigger_dev_get_latest_deployment":"getLatestDeployment","trigger_dev_get_query_schema":"getQuerySchema","trigger_dev_get_queue":"getQueue","trigger_dev_get_run":"getRun","trigger_dev_get_run_events":"getRunEvents","trigger_dev_get_run_result":"getRunResult","trigger_dev_get_run_trace":"getRunTrace","trigger_dev_get_schedule":"getSchedule","trigger_dev_get_waitpoint_token":"getWaitpointToken","trigger_dev_import_env_vars":"importEnvVars","trigger_dev_list_deployments":"listDeployments","trigger_dev_list_env_vars":"listEnvVars","trigger_dev_list_queues":"listQueues","trigger_dev_list_runs":"listRuns","trigger_dev_list_schedules":"listSchedules","trigger_dev_list_timezones":"listTimezones","trigger_dev_list_waitpoint_tokens":"listWaitpointTokens","trigger_dev_override_queue_concurrency":"overrideQueueConcurrency","trigger_dev_pause_queue":"pauseQueue","trigger_dev_promote_deployment":"promoteDeployment","trigger_dev_replay_run":"replayRun","trigger_dev_reschedule_run":"rescheduleRun","trigger_dev_reset_queue_concurrency":"resetQueueConcurrency","trigger_dev_resume_queue":"resumeQueue","trigger_dev_trigger_task":"triggerTask","trigger_dev_update_env_var":"updateEnvVar","trigger_dev_update_run_metadata":"updateRunMetadata","trigger_dev_update_schedule":"updateSchedule"}},"trigger_dev_v2":{"namespace":"triggerDev","methods":{"trigger_dev_activate_schedule":"activateSchedule","trigger_dev_add_run_tags":"addRunTags","trigger_dev_batch_trigger_task":"batchTriggerTask","trigger_dev_cancel_run":"cancelRun","trigger_dev_complete_waitpoint_token":"completeWaitpointToken","trigger_dev_create_env_var":"createEnvVar","trigger_dev_create_schedule":"createSchedule","trigger_dev_create_waitpoint_token":"createWaitpointToken","trigger_dev_deactivate_schedule":"deactivateSchedule","trigger_dev_delete_env_var":"deleteEnvVar","trigger_dev_delete_schedule":"deleteSchedule","trigger_dev_execute_query":"executeQuery","trigger_dev_get_batch":"getBatch","trigger_dev_get_batch_results":"getBatchResults","trigger_dev_get_deployment":"getDeployment","trigger_dev_get_env_var":"getEnvVar","trigger_dev_get_latest_deployment":"getLatestDeployment","trigger_dev_get_query_schema":"getQuerySchema","trigger_dev_get_queue":"getQueue","trigger_dev_get_run":"getRun","trigger_dev_get_run_events":"getRunEvents","trigger_dev_get_run_result":"getRunResult","trigger_dev_get_run_trace":"getRunTrace","trigger_dev_get_schedule":"getSchedule","trigger_dev_get_waitpoint_token":"getWaitpointToken","trigger_dev_import_env_vars":"importEnvVars","trigger_dev_list_deployments":"listDeployments","trigger_dev_list_env_vars":"listEnvVars","trigger_dev_list_queues":"listQueues","trigger_dev_list_runs":"listRuns","trigger_dev_list_schedules":"listSchedules","trigger_dev_list_timezones":"listTimezones","trigger_dev_list_waitpoint_tokens":"listWaitpointTokens","trigger_dev_override_queue_concurrency":"overrideQueueConcurrency","trigger_dev_pause_queue":"pauseQueue","trigger_dev_promote_deployment":"promoteDeployment","trigger_dev_replay_run":"replayRun","trigger_dev_reschedule_run":"rescheduleRun","trigger_dev_reset_queue_concurrency":"resetQueueConcurrency","trigger_dev_resume_queue":"resumeQueue","trigger_dev_trigger_task":"triggerTask","trigger_dev_update_env_var":"updateEnvVar","trigger_dev_update_run_metadata":"updateRunMetadata","trigger_dev_update_schedule":"updateSchedule"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"tts":{"namespace":"tts"},"twilio_sms":{"namespace":"legacy.twilioSms","triggers":{"twilio_sms_received":"received","twilio_sms_status":"status"}},"twilio_sms_v2":{"namespace":"twilioSms","triggers":{"twilio_sms_received":"received","twilio_sms_status":"status"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"twilio_voice":{"namespace":"legacy.twilioVoice","methods":{"get_recording":"getRecording","list_calls":"listCalls","make_call":"makeCall"},"triggers":{"twilio_voice_webhook":"webhook"}},"twilio_voice_v2":{"namespace":"twilioVoice","methods":{"get_recording":"getRecording","list_calls":"listCalls","make_call":"makeCall"},"triggers":{"twilio_voice_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"typeform":{"namespace":"legacy.typeform","methods":{"typeform_create_form":"createForm","typeform_delete_form":"deleteForm","typeform_files":"downloadFile","typeform_get_form":"getFormDetails","typeform_insights":"formInsights","typeform_list_forms":"listForms","typeform_responses":"retrieveResponses","typeform_update_form":"updateForm"},"triggers":{"typeform_webhook":"webhook"}},"typeform_v2":{"namespace":"typeform","methods":{"typeform_create_form":"createForm","typeform_delete_form":"deleteForm","typeform_files":"downloadFile","typeform_get_form":"getFormDetails","typeform_insights":"formInsights","typeform_list_forms":"listForms","typeform_responses":"retrieveResponses","typeform_update_form":"updateForm"},"triggers":{"typeform_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"upstash":{"namespace":"legacy.upstash","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","lpush":"lpush","lrange":"lrange","set":"set","setnx":"setnx","ttl":"ttl"}},"upstash_v2":{"namespace":"upstash","methods":{"command":"command","delete":"delete_","exists":"exists","expire":"expire","get":"get","hget":"hget","hgetall":"hgetall","hset":"hset","incr":"incr","incrby":"incrby","keys":"listKeys","lpush":"lpush","lrange":"lrange","set":"set","setnx":"setnx","ttl":"ttl"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"uptimerobot":{"namespace":"legacy.uptimerobot","methods":{"create_alert_contact":"createAlertContact","create_maintenance_window":"createMaintenanceWindow","create_monitor":"createMonitor","create_psp":"createStatusPage","delete_alert_contact":"deleteAlertContact","delete_maintenance_window":"deleteMaintenanceWindow","delete_monitor":"deleteMonitor","delete_psp":"deleteStatusPage","get_account":"getAccount","get_alert_contact":"getAlertContact","get_incident":"getIncident","get_maintenance_window":"getMaintenanceWindow","get_monitor":"getMonitor","get_psp":"getStatusPage","list_alert_contacts":"listAlertContacts","list_incidents":"listIncidents","list_maintenance_windows":"listMaintenanceWindows","list_monitors":"listMonitors","list_psps":"listStatusPages","pause_monitor":"pauseMonitor","start_monitor":"startMonitor","update_maintenance_window":"updateMaintenanceWindow","update_monitor":"updateMonitor","update_psp":"updateStatusPage"}},"uptimerobot_v2":{"namespace":"uptimerobot","methods":{"create_alert_contact":"createAlertContact","create_maintenance_window":"createMaintenanceWindow","create_monitor":"createMonitor","create_psp":"createStatusPage","delete_alert_contact":"deleteAlertContact","delete_maintenance_window":"deleteMaintenanceWindow","delete_monitor":"deleteMonitor","delete_psp":"deleteStatusPage","get_account":"getAccount","get_alert_contact":"getAlertContact","get_incident":"getIncident","get_maintenance_window":"getMaintenanceWindow","get_monitor":"getMonitor","get_psp":"getStatusPage","list_alert_contacts":"listAlertContacts","list_incidents":"listIncidents","list_maintenance_windows":"listMaintenanceWindows","list_monitors":"listMonitors","list_psps":"listStatusPages","pause_monitor":"pauseMonitor","start_monitor":"startMonitor","update_maintenance_window":"updateMaintenanceWindow","update_monitor":"updateMonitor","update_psp":"updateStatusPage"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"vanta":{"namespace":"vanta","methods":{"download_document_file":"downloadDocumentFile","get_control":"getControl","get_document":"getDocument","get_framework":"getFramework","get_person":"getPerson","get_policy":"getPolicy","get_risk_scenario":"getRiskScenario","get_test":"getTest","get_vendor":"getVendor","get_vulnerable_asset":"getVulnerableAsset","list_control_documents":"listControlDocuments","list_control_tests":"listControlTests","list_controls":"listControls","list_document_uploads":"listDocumentUploads","list_documents":"listDocuments","list_framework_controls":"listFrameworkControls","list_frameworks":"listFrameworks","list_monitored_computers":"listMonitoredComputers","list_people":"listPeople","list_policies":"listPolicies","list_risk_scenarios":"listRiskScenarios","list_test_entities":"listTestEntities","list_tests":"listTests","list_vendors":"listVendors","list_vulnerabilities":"listVulnerabilities","list_vulnerability_remediations":"listVulnerabilityRemediations","list_vulnerable_assets":"listVulnerableAssets","submit_document":"submitDocument","upload_document_file":"uploadDocumentFile"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"variables":{"namespace":"setVariables"},"vercel":{"namespace":"legacy.vercel","methods":{"add_domain":"addDomain","add_project_domain":"addProjectDomain","cancel_deployment":"cancelDeployment","create_alias":"createAlias","create_check":"createCheck","create_deployment":"createDeployment","create_dns_record":"createDnsRecord","create_edge_config":"createEdgeConfig","create_env_var":"createEnvironmentVariable","create_project":"createProject","create_webhook":"createWebhook","delete_alias":"deleteAlias","delete_deployment":"deleteDeployment","delete_dns_record":"deleteDnsRecord","delete_domain":"deleteDomain","delete_edge_config":"deleteEdgeConfig","delete_env_var":"deleteEnvironmentVariable","delete_project":"deleteProject","delete_webhook":"deleteWebhook","get_alias":"getAlias","get_check":"getCheck","get_deployment":"getDeployment","get_deployment_events":"getDeploymentLogs","get_domain":"getDomain","get_domain_config":"getDomainConfig","get_edge_config":"getEdgeConfig","get_edge_config_items":"getEdgeConfigItems","get_env_vars":"getEnvironmentVariables","get_project":"getProject","get_team":"getTeam","get_user":"getUser","get_webhook":"getWebhook","list_aliases":"listAliases","list_checks":"listChecks","list_deployment_files":"listDeploymentFiles","list_deployments":"listDeployments","list_dns_records":"listDnsRecords","list_domains":"listDomains","list_edge_configs":"listEdgeConfigs","list_project_domains":"listProjectDomains","list_projects":"listProjects","list_team_members":"listTeamMembers","list_teams":"listTeams","list_webhooks":"listWebhooks","pause_project":"pauseProject","promote_deployment":"promoteDeployment","remove_project_domain":"removeProjectDomain","rerequest_check":"rerequestCheck","unpause_project":"unpauseProject","update_check":"updateCheck","update_dns_record":"updateDnsRecord","update_edge_config_items":"updateEdgeConfigItems","update_env_var":"updateEnvironmentVariable","update_project":"updateProject","update_project_domain":"updateProjectDomain","verify_project_domain":"verifyProjectDomain"},"triggers":{"vercel_deployment_canceled":"deploymentCanceled","vercel_deployment_created":"deploymentCreated","vercel_deployment_error":"deploymentError","vercel_deployment_ready":"deploymentReady","vercel_domain_created":"domainCreated","vercel_project_created":"projectCreated","vercel_project_removed":"projectRemoved","vercel_webhook":"webhook"}},"vercel_v2":{"namespace":"vercel","methods":{"add_domain":"addDomain","add_project_domain":"addProjectDomain","cancel_deployment":"cancelDeployment","create_alias":"createAlias","create_check":"createCheck","create_deployment":"createDeployment","create_dns_record":"createDnsRecord","create_edge_config":"createEdgeConfig","create_env_var":"createEnvironmentVariable","create_project":"createProject","create_webhook":"createWebhook","delete_alias":"deleteAlias","delete_deployment":"deleteDeployment","delete_dns_record":"deleteDnsRecord","delete_domain":"deleteDomain","delete_edge_config":"deleteEdgeConfig","delete_env_var":"deleteEnvironmentVariable","delete_project":"deleteProject","delete_webhook":"deleteWebhook","get_alias":"getAlias","get_check":"getCheck","get_deployment":"getDeployment","get_deployment_events":"getDeploymentLogs","get_domain":"getDomain","get_domain_config":"getDomainConfig","get_edge_config":"getEdgeConfig","get_edge_config_items":"getEdgeConfigItems","get_env_vars":"getEnvironmentVariables","get_project":"getProject","get_team":"getTeam","get_user":"getUser","get_webhook":"getWebhook","list_aliases":"listAliases","list_checks":"listChecks","list_deployment_files":"listDeploymentFiles","list_deployments":"listDeployments","list_dns_records":"listDnsRecords","list_domains":"listDomains","list_edge_configs":"listEdgeConfigs","list_project_domains":"listProjectDomains","list_projects":"listProjects","list_team_members":"listTeamMembers","list_teams":"listTeams","list_webhooks":"listWebhooks","pause_project":"pauseProject","promote_deployment":"promoteDeployment","remove_project_domain":"removeProjectDomain","rerequest_check":"rerequestCheck","unpause_project":"unpauseProject","update_check":"updateCheck","update_dns_record":"updateDnsRecord","update_edge_config_items":"updateEdgeConfigItems","update_env_var":"updateEnvironmentVariable","update_project":"updateProject","update_project_domain":"updateProjectDomain","verify_project_domain":"verifyProjectDomain"},"triggers":{"vercel_deployment_canceled":"deploymentCanceled","vercel_deployment_created":"deploymentCreated","vercel_deployment_error":"deploymentError","vercel_deployment_ready":"deploymentReady","vercel_domain_created":"domainCreated","vercel_project_created":"projectCreated","vercel_project_removed":"projectRemoved","vercel_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"video_generator":{"namespace":"legacy.videoGenerator"},"video_generator_v2":{"namespace":"legacy.videoGeneratorV2"},"video_generator_v3":{"namespace":"videoGenerator"},"vision":{"namespace":"legacy.vision"},"vision_v2":{"namespace":"legacy.visionV2"},"wait":{"namespace":"wait"},"wealthbox":{"namespace":"wealthbox","methods":{"read_contact":"readContact","read_note":"readNote","read_task":"readTask","write_contact":"writeContact","write_note":"writeNote","write_task":"writeTask"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"webflow":{"namespace":"webflow","methods":{"create":"createItem","delete":"deleteItem","get":"getItem","list":"listItems","update":"updateItem"},"triggers":{"webflow_collection_item_changed":"collectionItemChanged","webflow_collection_item_created":"collectionItemCreated","webflow_collection_item_deleted":"collectionItemDeleted","webflow_form_submission":"formSubmission"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"webhook_request":{"namespace":"webhookRequest"},"whatsapp":{"namespace":"legacy.whatsapp","methods":{"get_media":"downloadMedia","mark_read":"markAsRead","send_interactive":"sendInteractive","send_media":"sendMedia","send_message":"sendMessage","send_reaction":"sendReaction","send_template":"sendTemplate","upload_media":"uploadMedia"},"triggers":{"whatsapp_webhook":"webhook"}},"whatsapp_v2":{"namespace":"whatsapp","methods":{"get_media":"downloadMedia","mark_read":"markAsRead","send_interactive":"sendInteractive","send_media":"sendMedia","send_message":"sendMessage","send_reaction":"sendReaction","send_template":"sendTemplate","upload_media":"uploadMedia"},"triggers":{"whatsapp_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"wikipedia":{"namespace":"wikipedia","methods":{"wikipedia_content":"getPageContent","wikipedia_random":"randomPage","wikipedia_search":"searchPages","wikipedia_summary":"getPageSummary"}},"windchill":{"namespace":"windchill","methods":{"windchill_check_in_document":"checkInDocument","windchill_check_in_documents":"checkInDocuments","windchill_check_out_document":"checkOutDocument","windchill_check_out_documents":"checkOutDocuments","windchill_create_document":"createDocument","windchill_create_documents":"createDocuments","windchill_delete_document":"deleteDocument","windchill_delete_documents":"deleteDocuments","windchill_download_attachment":"downloadAttachment","windchill_download_primary_content":"downloadPrimaryContent","windchill_get_document":"getDocument","windchill_get_document_structure":"getDocumentStructure","windchill_get_primary_content":"getPrimaryContent","windchill_get_valid_state_transitions":"getValidStateTransitions","windchill_list_attachments":"listAttachments","windchill_list_documents":"listDocuments","windchill_revise_document":"reviseDocument","windchill_revise_documents":"reviseDocuments","windchill_set_lifecycle_state":"setLifecycleState","windchill_undo_check_out_document":"undoCheckOutDocument","windchill_undo_check_out_documents":"undoCheckOutDocuments","windchill_update_common_properties":"updateCommonProperties","windchill_update_document":"updateDocument","windchill_update_document_security_labels":"updateDocumentSecurityLabels","windchill_update_documents":"updateDocuments","windchill_upload_attachments":"uploadAttachments","windchill_upload_primary_content":"uploadPrimaryContent"}},"wiza":{"namespace":"wiza","methods":{"company_enrichment":"companyEnrichment","get_credits":"getCredits","individual_reveal":"individualReveal","prospect_search":"prospectSearch"}},"wordpress":{"namespace":"wordpress","methods":{"wordpress_create_category":"createCategory","wordpress_create_comment":"createComment","wordpress_create_page":"createPage","wordpress_create_post":"createPost","wordpress_create_tag":"createTag","wordpress_delete_category":"deleteCategory","wordpress_delete_comment":"deleteComment","wordpress_delete_media":"deleteMedia","wordpress_delete_page":"deletePage","wordpress_delete_post":"deletePost","wordpress_delete_tag":"deleteTag","wordpress_get_category":"getCategory","wordpress_get_current_user":"getCurrentUser","wordpress_get_media":"getMedia","wordpress_get_page":"getPage","wordpress_get_post":"getPost","wordpress_get_tag":"getTag","wordpress_get_user":"getUser","wordpress_list_categories":"listCategories","wordpress_list_comments":"listComments","wordpress_list_media":"listMedia","wordpress_list_pages":"listPages","wordpress_list_posts":"listPosts","wordpress_list_tags":"listTags","wordpress_list_users":"listUsers","wordpress_search_content":"searchContent","wordpress_update_category":"updateCategory","wordpress_update_comment":"updateComment","wordpress_update_page":"updatePage","wordpress_update_post":"updatePost","wordpress_update_tag":"updateTag","wordpress_upload_media":"uploadMedia"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"workday":{"namespace":"workday","methods":{"assign_onboarding":"assignOnboardingPlan","change_job":"changeJob","create_prehire":"createPreHire","get_compensation":"getCompensation","get_organizations":"getOrganizations","get_worker":"getWorker","hire_employee":"hireEmployee","list_workers":"listWorkers","terminate_worker":"terminateWorker","update_worker":"updatePersonalInformation"}},"workflow":{"namespace":"legacy.workflow"},"workflow_input":{"namespace":"runWorkflow"},"x":{"namespace":"x","methods":{"x_create_bookmark":"createBookmark","x_create_tweet":"createTweet","x_delete_bookmark":"deleteBookmark","x_delete_tweet":"deleteTweet","x_get_blocking":"getBlockedUsers","x_get_bookmarks":"getBookmarks","x_get_followers":"getFollowers","x_get_following":"getFollowing","x_get_liked_tweets":"getLikedTweets","x_get_liking_users":"getLikingUsers","x_get_me":"getMyProfile","x_get_personalized_trends":"getPersonalizedTrends","x_get_quote_tweets":"getQuoteTweets","x_get_retweeted_by":"getRetweetedBy","x_get_trends_by_woeid":"getTrendsByLocation","x_get_tweets_by_ids":"getTweetsByIds","x_get_usage":"getApiUsage","x_get_user_mentions":"getUserMentions","x_get_user_timeline":"getUserTimeline","x_get_user_tweets":"getUserTweets","x_hide_reply":"hideReply","x_manage_block":"blockUnblock","x_manage_follow":"followUnfollow","x_manage_like":"likeUnlike","x_manage_mute":"muteUnmute","x_manage_retweet":"retweetUnretweet","x_search_tweets":"searchTweets","x_search_users":"searchUsers"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"youcom":{"namespace":"legacy.youcom","methods":{"youcom_answer":"answer","youcom_finance_research":"financeResearch","youcom_get_account_balance":"getAccountBalance","youcom_get_contents":"getContents","youcom_get_research_task":"getResearchTask","youcom_research":"research","youcom_search":"search","youcom_search_images":"searchImages"}},"youcom_v2":{"namespace":"youcom","methods":{"youcom_answer":"answer","youcom_finance_research":"financeResearch","youcom_get_account_balance":"getAccountBalance","youcom_get_contents":"getContents","youcom_get_research_task":"getResearchTask","youcom_research":"research","youcom_search":"search","youcom_search_images":"searchImages"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"youtube":{"namespace":"legacy.youtube","methods":{"youtube_channel_info":"getChannelInfo","youtube_channel_playlists":"getChannelPlaylists","youtube_channel_videos":"getChannelVideos","youtube_comments":"getVideoComments","youtube_playlist_items":"getPlaylistItems","youtube_search":"searchVideos","youtube_trending":"getTrendingVideos","youtube_video_categories":"getVideoCategories","youtube_video_details":"getVideoDetails"}},"youtube_v2":{"namespace":"youtube","methods":{"youtube_channel_info":"getChannelInfo","youtube_channel_playlists":"getChannelPlaylists","youtube_channel_videos":"getChannelVideos","youtube_comments":"getVideoComments","youtube_playlist_items":"getPlaylistItems","youtube_search":"searchVideos","youtube_trending":"getTrendingVideos","youtube_video_categories":"getVideoCategories","youtube_video_details":"getVideoDetails"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"zendesk":{"namespace":"legacy.zendesk","methods":{"autocomplete_organizations":"autocompleteOrganizations","create_organization":"createOrganization","create_organizations_bulk":"createOrganizationsBulk","create_ticket":"createTicket","create_tickets_bulk":"createTicketsBulk","create_user":"createUser","create_users_bulk":"createUsersBulk","delete_organization":"deleteOrganization","delete_ticket":"deleteTicket","delete_user":"deleteUser","get_current_user":"getCurrentUser","get_organization":"getOrganization","get_organizations":"getOrganizations","get_ticket":"getTicket","get_tickets":"getTickets","get_user":"getUser","get_users":"getUsers","merge_tickets":"mergeTickets","search":"search","search_count":"searchCount","search_users":"searchUsers","update_organization":"updateOrganization","update_ticket":"updateTicket","update_tickets_bulk":"updateTicketsBulk","update_user":"updateUser","update_users_bulk":"updateUsersBulk"},"triggers":{"zendesk_ticket_comment_added":"ticketCommentAdded","zendesk_ticket_created":"ticketCreated","zendesk_ticket_priority_changed":"ticketPriorityChanged","zendesk_ticket_status_changed":"ticketStatusChanged","zendesk_webhook":"webhook"}},"zendesk_v2":{"namespace":"zendesk","methods":{"autocomplete_organizations":"autocompleteOrganizations","create_organization":"createOrganization","create_organizations_bulk":"createOrganizationsBulk","create_ticket":"createTicket","create_tickets_bulk":"createTicketsBulk","create_user":"createUser","create_users_bulk":"createUsersBulk","delete_organization":"deleteOrganization","delete_ticket":"deleteTicket","delete_user":"deleteUser","get_current_user":"getCurrentUser","get_organization":"getOrganization","get_organizations":"getOrganizations","get_ticket":"getTicket","get_tickets":"getTickets","get_user":"getUser","get_users":"getUsers","merge_tickets":"mergeTickets","search":"search","search_count":"searchCount","search_users":"searchUsers","update_organization":"updateOrganization","update_ticket":"updateTicket","update_tickets_bulk":"updateTicketsBulk","update_user":"updateUser","update_users_bulk":"updateUsersBulk"},"triggers":{"zendesk_ticket_comment_added":"ticketCommentAdded","zendesk_ticket_created":"ticketCreated","zendesk_ticket_priority_changed":"ticketPriorityChanged","zendesk_ticket_status_changed":"ticketStatusChanged","zendesk_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"zep":{"namespace":"legacy.zep","methods":{"add_messages":"addMessages","add_user":"addUser","create_thread":"createThread","delete_thread":"deleteThread","get_context":"getContext","get_messages":"getMessages","get_threads":"getThreads","get_user":"getUser","get_user_threads":"getUserThreads"}},"zep_v2":{"namespace":"zep","methods":{"add_messages":"addMessages","add_user":"addUser","create_thread":"createThread","delete_thread":"deleteThread","get_context":"getContext","get_messages":"getMessages","get_threads":"getThreads","get_user":"getUser","get_user_threads":"getUserThreads"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"zerobounce":{"namespace":"zerobounce","methods":{"zerobounce_get_credits":"getRemainingCredits","zerobounce_verify_email":"verifyEmail"}},"zoho_desk":{"namespace":"zohoDesk","methods":{"add_comment":"addComment","create_account":"createAccount","create_contact":"createContact","create_ticket":"createTicket","delete_comment":"deleteComment","get_account":"getAccount","get_agent":"getAgent","get_attachment":"getAttachment","get_comment":"getComment","get_contact":"getContact","get_department":"getDepartment","get_thread":"getThread","get_ticket":"getTicket","list_accounts":"listAccounts","list_agents":"listAgents","list_comments":"listComments","list_contacts":"listContacts","list_departments":"listDepartments","list_organizations":"listOrganizations","list_threads":"listThreads","list_tickets":"listTickets","move_ticket":"moveTicket","search_accounts":"searchAccounts","search_contacts":"searchContacts","search_tickets":"searchTickets","send_reply":"sendReply","update_account":"updateAccount","update_comment":"updateComment","update_contact":"updateContact","update_ticket":"updateTicket"},"triggers":{"zoho_desk":"zohoDesk"},"paramAliases":{"action":{"oauthCredential":"credential"},"trigger":{"oauthCredential":"credential"}}},"zoom":{"namespace":"zoom","methods":{"zoom_create_meeting":"createMeeting","zoom_delete_meeting":"deleteMeeting","zoom_delete_recording":"deleteRecording","zoom_get_meeting":"getMeeting","zoom_get_meeting_invitation":"getMeetingInvitation","zoom_get_meeting_recordings":"getMeetingRecordings","zoom_list_meetings":"listMeetings","zoom_list_past_participants":"listPastParticipants","zoom_list_recordings":"listRecordings","zoom_update_meeting":"updateMeeting"},"triggers":{"zoom_meeting_ended":"meetingEnded","zoom_meeting_started":"meetingStarted","zoom_participant_joined":"participantJoined","zoom_participant_left":"participantLeft","zoom_recording_completed":"recordingCompleted","zoom_webhook":"webhook"},"paramAliases":{"action":{"oauthCredential":"credential"}}},"zoominfo":{"namespace":"legacy.zoominfo","methods":{"enrich_companies":"enrichCompanies","enrich_contacts":"enrichContacts","search_companies":"searchCompanies","search_contacts":"searchContacts","search_intent":"searchIntent","search_news":"searchNews"}},"zoominfo_v2":{"namespace":"zoominfo","methods":{"enrich_companies":"enrichCompanies","enrich_contacts":"enrichContacts","search_companies":"searchCompanies","search_contacts":"searchContacts","search_intent":"searchIntent","search_news":"searchNews"},"paramAliases":{"action":{"oauthCredential":"credential"}}}}}' ) diff --git a/apps/sim/blocks/sdk-names.json b/apps/sim/blocks/sdk-names.json index c0f20ee0318..4222defd9a8 100644 --- a/apps/sim/blocks/sdk-names.json +++ b/apps/sim/blocks/sdk-names.json @@ -159,7 +159,7 @@ "update_list_field_dropdown_option": "updateListFieldDropdownOption", "update_note": "updateNote" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -219,7 +219,7 @@ "update_message": "updateMessageLabels", "update_thread": "updateThreadLabels" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -278,7 +278,7 @@ "update_contact": "updateContact", "update_conversation": "updateConversation" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -362,7 +362,7 @@ "ahrefs_site_audit_page_explorer": "siteAuditPageExplorer", "ahrefs_top_pages": "topPages" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -385,7 +385,7 @@ "triggers": { "airtable_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -435,7 +435,7 @@ "search": "search", "update_settings": "updateSettings" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -476,7 +476,7 @@ "user_profile": "userProfile", "user_search": "userSearch" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -507,7 +507,7 @@ "apify_run_actor_sync": "runActor", "apify_run_task": "runTask" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -572,7 +572,7 @@ "task_create": "createTask", "task_search": "searchTasks" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -637,7 +637,7 @@ "update_configuration_profile": "updateConfigurationProfile", "update_environment": "updateEnvironment" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -669,7 +669,7 @@ "search_tasks": "searchTasks", "update_task": "updateTask" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -810,7 +810,7 @@ "ashby_opening_create": "openingCreate", "ashby_signature_request_update": "signatureRequestUpdate" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -879,7 +879,7 @@ "update_named_query": "updateNamedQuery", "update_prepared_statement": "updatePreparedStatement" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -958,7 +958,7 @@ "attio_webhook": "webhook", "attio_workspace_member_created": "workspaceMemberCreated" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -1004,7 +1004,7 @@ "azure_data_explorer_show_table_details": "showTableDetails", "azure_data_explorer_show_table_schema": "showTableSchema" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -1061,7 +1061,7 @@ "azure_devops_webhook": "webhook", "azure_devops_work_item_created": "workItemCreated" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -1122,7 +1122,7 @@ "bitbucket_repository_forked": "repositoryForked", "bitbucket_repository_updated": "repositoryUpdated" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -1255,7 +1255,7 @@ "update_vendor": "updateVendor", "upload_receipt": "uploadReceipt" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -1286,7 +1286,7 @@ "snapshot_status": "snapshotStatus", "sync_scrape": "syncScrape" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -1297,7 +1297,7 @@ }, "browser_use_v2": { "namespace": "browserUse", - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -1338,7 +1338,7 @@ "get_post": "getPost", "get_posts": "getPosts" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -1378,7 +1378,7 @@ "calcom_recording_ready": "recordingReady", "calcom_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -1443,7 +1443,7 @@ "calendly_routing_form_submitted": "routingFormSubmitted", "calendly_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -1508,7 +1508,7 @@ "rag": "retrieveContext", "search_firmographics": "searchFirmographics" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -1704,7 +1704,7 @@ "checkr_verification_processed": "verificationProcessed", "checkr_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -1769,7 +1769,7 @@ "circleback_meeting_notes": "meetingNotes", "circleback_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -1887,7 +1887,7 @@ "clerk_user_updated": "userUpdated", "clerk_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -1997,7 +1997,7 @@ "clickup_task_updated": "taskUpdated", "clickup_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -2167,7 +2167,7 @@ "update_zone": "updateZone", "update_zone_setting": "updateZoneSetting" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -2212,7 +2212,7 @@ "update_stack": "updateStack", "validate_template": "validateTemplate" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -2255,7 +2255,7 @@ "lookup_events": "lookUpEvents", "start_query": "startLakeQuery" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -2296,7 +2296,7 @@ "query_logs": "queryLogsInsights", "unmute_alarm": "unmuteAlarm" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -2366,7 +2366,7 @@ "upsert_rows": "insertOrUpsertRows", "whoami": "getCurrentUser" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -2405,7 +2405,7 @@ "start_execution": "startExecution", "stop_execution": "stopExecution" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -2433,7 +2433,7 @@ "update_comment": "updateComment", "upload_attachment": "uploadAttachment" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -2514,7 +2514,7 @@ "confluence_user_created": "userCreated", "confluence_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -2567,7 +2567,7 @@ "query": "runQuery", "run_function": "runFunction" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -2655,7 +2655,7 @@ "crowdstrike_update_alerts": "updateAlerts", "crowdstrike_update_indicators": "updateIndicators" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -2698,7 +2698,7 @@ "search_organizations": "searchOrganizations", "search_people": "searchPeople" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -2754,7 +2754,7 @@ "cursor_list_repositories": "listRepositories", "cursor_stop_agent": "stopAgent" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -2899,7 +2899,7 @@ "terminate_cluster": "terminateCluster", "update_job": "updateJob" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -2996,7 +2996,7 @@ "datadog_update_slo": "updateSlo", "datadog_update_synthetics_status": "pauseOrStartSyntheticTest" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3045,7 +3045,7 @@ "stop_sandbox": "stopSandbox", "upload_file": "uploadFile" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3092,7 +3092,7 @@ "send_message": "sendMessage", "terminate_session": "terminateSession" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3185,7 +3185,7 @@ "discord_update_member": "updateMember", "discord_update_role": "updateRole" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3203,7 +3203,7 @@ "send_envelope": "sendEnvelope", "void_envelope": "voidEnvelope" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3246,7 +3246,7 @@ "dropbox_search": "searchFiles", "dropbox_upload": "uploadFile" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3269,7 +3269,7 @@ "dropbox_search": "searchFiles", "dropbox_upload": "uploadFile" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3354,7 +3354,7 @@ "update_link": "updateLink", "upsert_link": "upsertLink" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3386,7 +3386,7 @@ "scan": "scan", "update": "updateItem" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3495,7 +3495,7 @@ "dynatrace_update_settings_object": "updateSettingsObject", "dynatrace_update_slo": "updateSlo" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3578,7 +3578,7 @@ "stop_instances": "stopInstances", "terminate_instances": "terminateInstances" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3631,7 +3631,7 @@ "speech_to_speech": "speechToSpeech", "tts": "textToSpeech" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3710,7 +3710,7 @@ "emailbison_warmup_disabled_causing_bounces": "warmupDisabledCausingBounces", "emailbison_warmup_disabled_receiving_bounces": "warmupDisabledReceivingBounces" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3792,7 +3792,7 @@ "search_similar_companies": "searchSimilarCompanies", "verify_email": "verifyEmail" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3837,7 +3837,7 @@ }, "extend_v3": { "namespace": "extend", - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3872,7 +3872,7 @@ "fathom_new_meeting": "newMeeting", "fathom_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -3903,7 +3903,7 @@ } }, "file_v5": { - "namespace": "fileV5", + "namespace": "file", "methods": { "file_append": "append", "file_compress": "compress", @@ -4011,7 +4011,7 @@ "triggers": { "fireflies_transcription_complete": "transcriptionComplete" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -4073,7 +4073,7 @@ "fivetran_transformation_succeeded": "transformationSucceeded", "fivetran_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -4094,7 +4094,7 @@ "flint_generate_pages": "generatePages", "flint_get_task": "getTask" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -4127,7 +4127,7 @@ "set_values": "setValues", "update_comment": "updateComment" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -4155,7 +4155,7 @@ "list_folders": "listFolders", "list_themes": "listThemes" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -4192,7 +4192,7 @@ "gauge_update_prompt": "updatePrompt", "gauge_update_tag": "updateTag" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -4515,7 +4515,7 @@ "github_release_published": "releasePublished", "github_workflow_run": "workflowRun" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -4676,7 +4676,7 @@ "gitlab_push": "push", "gitlab_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -4702,7 +4702,7 @@ "triggers": { "gmail_poller": "poller" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -4742,7 +4742,7 @@ "triggers": { "gmail_poller": "poller" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -4826,7 +4826,7 @@ "gong_call_completed": "callCompleted", "gong_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -4842,7 +4842,7 @@ "list_customers": "listCustomers", "search": "customQueryGaql" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -4872,7 +4872,7 @@ "list_tables": "listTables", "query": "runQuery" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -4911,7 +4911,7 @@ "triggers": { "google_calendar_poller": "poller" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -4946,7 +4946,7 @@ "triggers": { "google_calendar_poller": "poller" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -4965,7 +4965,7 @@ "search": "searchContacts", "update": "updateContact" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -4990,7 +4990,7 @@ "update_text_style": "applyTextStyle", "write": "writeToDocument" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5027,7 +5027,7 @@ "triggers": { "google_drive_poller": "poller" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -5052,7 +5052,7 @@ "triggers": { "google_forms_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5078,7 +5078,7 @@ "update_member": "updateMemberRole", "update_settings": "updateSettings" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5115,7 +5115,7 @@ "list_conference_records": "listConferenceRecords", "list_participants": "listParticipants" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5135,7 +5135,7 @@ "update": "updateData", "write": "writeData" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5162,7 +5162,7 @@ "triggers": { "google_sheets_poller": "poller" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -5227,7 +5227,7 @@ "update_video_properties": "updateVideoProperties", "write": "writeToPresentation" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5289,7 +5289,7 @@ "update_video_properties": "updateVideoProperties", "write": "writeToPresentation" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5305,7 +5305,7 @@ "list_task_lists": "listTaskLists", "update": "updateTask" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5344,7 +5344,7 @@ "update_matters": "updateMatter", "update_matters_holds": "updateHold" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5419,7 +5419,7 @@ "grafana_update_dashboard": "updateDashboard", "grafana_update_folder": "updateFolder" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5500,7 +5500,7 @@ "grain_story_updated_v2": "storyUpdated", "grain_upload_status_v2": "uploadStatus" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5545,7 +5545,7 @@ "granola_note_generated": "noteGenerated", "granola_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5641,7 +5641,7 @@ "greenhouse_offer_created": "offerCreated", "greenhouse_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5675,7 +5675,7 @@ "harmonic_search_people_scout": "searchPeopleWithScout", "harmonic_submit_email_enrichment_job": "submitEmailEnrichmentJob" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5737,7 +5737,7 @@ "helpscout_note_created": "noteCreated", "helpscout_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -5797,7 +5797,7 @@ "update_group": "updateGroup", "update_project": "updateProject" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5816,7 +5816,7 @@ "higgsfield_get_request_status": "getRequestStatus", "higgsfield_list_characters": "listCharacters" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5879,7 +5879,7 @@ "triggers": { "hubspot_poller": "poller" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -5893,7 +5893,7 @@ }, "huggingface_v2": { "namespace": "huggingface", - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -5973,7 +5973,7 @@ "simulate_principal_policy": "simulatePrincipalPolicy", "update_access_key": "updateAccessKey" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -6027,7 +6027,7 @@ "list_instances": "listInstances", "list_permission_sets": "listPermissionSets" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -6193,7 +6193,7 @@ "incidentio_incident_status_updated": "incidentStatusUpdated", "incidentio_incident_updated": "incidentUpdated" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -6218,7 +6218,7 @@ "list_secrets": "listSecrets", "update_secret": "updateSecret" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -6255,7 +6255,7 @@ "instagram_send_text_message": "sendTextMessage", "instagram_set_comments_enabled": "setCommentsEnabled" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -6346,7 +6346,7 @@ "instantly_supersearch_enrichment_completed": "supersearchEnrichmentCompleted", "instantly_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -6475,7 +6475,7 @@ "intercom_user_created": "userCreated", "intercom_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -6499,7 +6499,7 @@ "intune_retire_device": "retireDevice", "intune_sync_device": "syncDevice" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -6549,7 +6549,7 @@ "update_item": "updateItem", "update_test_run": "updateTestRun" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -6614,7 +6614,7 @@ "jira_worklog_deleted": "worklogDeleted", "jira_worklog_updated": "worklogUpdated" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -6674,7 +6674,7 @@ "jsm_request_updated": "requestUpdated", "jsm_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -6781,7 +6781,7 @@ "triggers": { "jotform_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -6849,7 +6849,7 @@ "jupyter_stop_kernel": "stopKernel", "jupyter_upload_file": "uploadFile" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -6935,7 +6935,7 @@ "get_settlements": "getSettlements", "get_trades": "getTrades" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7079,7 +7079,7 @@ "update_function_configuration": "updateFunctionConfiguration", "update_function_url_config": "updateFunctionUrl" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7104,7 +7104,7 @@ "langsmith_get_run": "getRun", "langsmith_update_run": "updateRun" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7152,7 +7152,7 @@ "toggle_flag": "toggleFlag", "update_flag": "updateFlag" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7209,7 +7209,7 @@ "lemlist_not_interested": "notInterested", "lemlist_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7314,7 +7314,7 @@ "linear_project_updated": "projectUpdated", "linear_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7419,7 +7419,7 @@ "linear_project_updated_v2": "projectUpdated", "linear_webhook_v2": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7431,7 +7431,7 @@ "get_profile": "getProfile", "share_post": "sharePost" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7533,7 +7533,7 @@ "linq_reaction_added": "reactionAdded", "linq_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7556,7 +7556,7 @@ "logfire_query": "runSqlQuery", "logfire_search_records": "searchRecords" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7643,7 +7643,7 @@ "loops_loop_email_sent": "loopEmailSent", "loops_transactional_email_sent": "transactionalEmailSent" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7680,7 +7680,7 @@ "update_event": "updateEvent", "update_guest_status": "updateGuestStatus" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7843,7 +7843,7 @@ "update_segment": "updateSegment", "update_template": "updateTemplate" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7874,7 +7874,7 @@ "list_messages": "listMessages", "send_message": "sendMessage" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7931,7 +7931,7 @@ "update_request": "updateRequest", "update_solution": "updateSolution" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -7962,7 +7962,7 @@ "get": "getMemories", "search": "searchMemories" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8093,7 +8093,7 @@ "worksheet_add": "addWorksheet", "write": "writeUpdateData" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8127,7 +8127,7 @@ "worksheet_add": "addWorksheet", "write": "writeData" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8155,7 +8155,7 @@ "update_task": "updateTask", "update_task_details": "updateTaskDetails" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8187,7 +8187,7 @@ "microsoftteams_chat_subscription": "microsoftteamsChatSubscription", "microsoftteams_webhook": "microsoftteamsWebhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -8208,7 +8208,7 @@ "replace_text": "findAndReplaceText", "update": "replaceContent" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8311,7 +8311,7 @@ "monaco_upsert_account": "upsertAccount", "monaco_upsert_contact": "upsertContact" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8350,7 +8350,7 @@ "monday_subitem_created": "subitemCreated", "monday_update_created": "updateCreated" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -8371,7 +8371,7 @@ } }, "mothership": { - "namespace": "mothership" + "namespace": "simChat" }, "mssql": { "namespace": "legacy.mssql", @@ -8394,7 +8394,7 @@ "query": "querySelect", "update": "updateData" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8421,7 +8421,7 @@ "query": "querySelect", "update": "updateData" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8470,7 +8470,7 @@ "netsuite_update_record": "updateRecord", "netsuite_upsert_record": "upsertRecord" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8500,7 +8500,7 @@ "new_relic_nrql_query": "runNrqlQuery", "new_relic_search_entities": "searchEntities" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8531,7 +8531,7 @@ "notion_update_page": "updatePageProperties", "notion_write": "appendContent" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8570,7 +8570,7 @@ "notion_page_properties_updated": "pagePropertiesUpdated", "notion_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8693,7 +8693,7 @@ "okta_update_group": "updateGroup", "okta_update_user": "updateUser" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8715,7 +8715,7 @@ "search": "searchFiles", "upload": "uploadFile" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8779,7 +8779,7 @@ "oracle_fusion_financials_update_expense_report": "updateExpenseReport", "oracle_fusion_financials_update_receivables_invoice": "updateReceivablesInvoice" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8795,7 +8795,7 @@ "query": "querySelect", "update": "updateData" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8836,7 +8836,7 @@ "otter_conversation_shared": "conversationShared", "otter_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -8872,7 +8872,7 @@ "triggers": { "outlook_poller": "poller" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -8936,7 +8936,7 @@ "pagerduty_incident_triggered": "incidentTriggered", "pagerduty_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -9034,7 +9034,7 @@ "update_account": "updateAccount", "update_inquiry": "updateInquiry" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -9081,7 +9081,7 @@ "update_deal": "updateDeal", "update_lead": "updateLead" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -9418,7 +9418,7 @@ "plane_workitem_vote_created": "workitemVoteCreated", "plane_workitem_vote_deleted": "workitemVoteDeleted" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -9463,7 +9463,7 @@ "queue_deploy_request": "queueDeployRequestVitess", "review_deploy_request": "reviewDeployRequestVitess" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -9515,7 +9515,7 @@ "query": "querySelect", "update": "updateData" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -9586,7 +9586,7 @@ "powerbi_list_workspaces": "listWorkspaces", "powerbi_refresh_dataset": "refreshSemanticModel" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -9649,7 +9649,7 @@ "sentiment_report": "sentimentReport", "visibility_report": "visibilityReport" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -9676,7 +9676,7 @@ }, "pulse_v3": { "namespace": "pulse", - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -9697,7 +9697,7 @@ "search": "search", "upsert": "upsert" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -9746,7 +9746,7 @@ "list_slide_decks": "listSlideDecks", "list_transcripts": "listTranscripts" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -9836,7 +9836,7 @@ "quickbooks_vendor_credit_events": "vendorCreditEvents", "quickbooks_vendor_events": "vendorEvents" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -9868,7 +9868,7 @@ "list_models": "listModels", "text_to_svg": "textToSvg" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -9953,7 +9953,7 @@ "update_project": "updateProject", "upsert_variable": "upsertVariable" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -9981,7 +9981,7 @@ "list_vendors": "listVendors", "list_virtual_cards": "listVirtualCards" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -10026,7 +10026,7 @@ "linkedin_to_mobile_phone": "linkedInToMobilePhone", "linkedin_to_personal_email": "linkedInToPersonalEmail" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -10053,7 +10053,7 @@ "query": "querySelect", "update": "updateData" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -10100,7 +10100,7 @@ "unsave": "unsave", "vote": "vote" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -10141,7 +10141,7 @@ }, "reducto_v3": { "namespace": "reducto", - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -10208,7 +10208,7 @@ "resend_email_sent": "emailSent", "resend_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -10421,7 +10421,7 @@ "update_title": "updateTitle", "update_work_location": "updateWorkLocation" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -10564,7 +10564,7 @@ "update_task": "updateTask", "update_time_entry": "updateTimeEntry" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -10673,7 +10673,7 @@ "rootly_incident_resolved": "incidentResolved", "rootly_incident_updated": "incidentUpdated" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -10719,7 +10719,7 @@ "presigned_url": "presignedUrl", "put_object": "uploadFile" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -10814,7 +10814,7 @@ "sailpoint_search_count": "searchCount", "sailpoint_sign_off_certification": "signOffCertification" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -10872,7 +10872,7 @@ "salesforce_record_updated": "recordUpdated", "salesforce_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11031,7 +11031,7 @@ "untag_resource": "untagSecret", "update_secret": "updateSecret" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11141,7 +11141,7 @@ "search_contacts": "searchContacts", "send_mail": "sendMail" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11196,7 +11196,7 @@ "sentry_issue_resolved": "issueResolved", "sentry_metric_alert": "metricAlert" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11345,7 +11345,7 @@ "servicenow_incident_updated": "incidentUpdated", "servicenow_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11398,7 +11398,7 @@ "send_templated_email": "sendTemplatedEmail", "update_template": "updateTemplate" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11446,7 +11446,7 @@ "update_page": "updatePage", "upload_file": "uploadFile" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11472,7 +11472,7 @@ "sharepoint_update_page": "updatePage", "sharepoint_upload_file": "uploadFile" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11510,7 +11510,7 @@ "shopify_update_product": "updateProduct", "shopify_update_product_variants": "updateProductVariants" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11540,7 +11540,7 @@ "similarweb_visit_duration": "visitDurationDesktop", "similarweb_website_overview": "websiteOverview" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11563,7 +11563,7 @@ "find_email": "findEmail", "find_phone": "findPhone" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11618,7 +11618,7 @@ "triggers": { "slack_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11726,7 +11726,7 @@ "triggers": { "slack_oauth": "oauth" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11835,7 +11835,7 @@ "update_lead_list": "updateLeadList", "upsert_campaign_webhook": "createOrUpdateWebhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11880,7 +11880,7 @@ "update_rows": "updateRows", "upsert_rows": "upsertRows" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -11919,7 +11919,7 @@ "splunk_list_saved_searches": "listSavedSearches", "splunk_run_search": "runSearch" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -12376,7 +12376,7 @@ "odds_search_bookmakers": "oddsSearchBookmakers", "odds_search_markets": "oddsSearchMarkets" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -12464,7 +12464,7 @@ "spotify_unfollow_playlist": "unfollowPlaylist", "spotify_update_playlist": "updatePlaylist" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -12521,7 +12521,7 @@ "tag_queue": "tagQueue", "untag_queue": "untagQueue" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -12604,7 +12604,7 @@ "update_customer": "updateCustomer", "upsert_catalog_object": "upsertCatalogObject" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -12699,7 +12699,7 @@ "start_automation_execution": "startAutomationExecution", "stop_automation_execution": "stopAutomationExecution" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -12833,7 +12833,7 @@ "triggers": { "stripe_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -12860,7 +12860,7 @@ "get_caller_identity": "getCallerIdentity", "get_session_token": "getSessionToken" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -12933,7 +12933,7 @@ "upsert": "upsertARow", "vector_search": "vectorSearch" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13064,7 +13064,7 @@ "update_tailnet_settings": "updateTailnetSettings", "validate_acl": "validateAcl" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13087,7 +13087,7 @@ "tavily_map": "mapWebsite", "tavily_search": "search" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13146,7 +13146,7 @@ "triggers": { "telegram_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13195,7 +13195,7 @@ "analyze_expense": "analyzeExpenseInvoicesReceipts", "analyze_id": "analyzeIdentityDocument" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13307,7 +13307,7 @@ "update_user": "updateUser", "update_user_skills": "updateUserSkills" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13330,7 +13330,7 @@ "tiktok_post_publish_complete": "postPublishComplete", "tiktok_post_publish_failed": "postPublishFailed" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -13362,7 +13362,7 @@ "tinybird_query_pipe": "queryPipeEndpoint", "tinybird_truncate_datasource": "truncateDataSource" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13410,7 +13410,7 @@ "trello_update_checklist_item": "updateChecklistItem", "trello_update_list": "updateList" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13513,7 +13513,7 @@ "trigger_dev_update_run_metadata": "updateRunMetadata", "trigger_dev_update_schedule": "updateSchedule" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13535,7 +13535,7 @@ "twilio_sms_received": "received", "twilio_sms_status": "status" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13562,7 +13562,7 @@ "triggers": { "twilio_voice_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13599,7 +13599,7 @@ "triggers": { "typeform_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13646,7 +13646,7 @@ "setnx": "setnx", "ttl": "ttl" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13709,7 +13709,7 @@ "update_monitor": "updateMonitor", "update_psp": "updateStatusPage" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13748,7 +13748,7 @@ "submit_document": "submitDocument", "upload_document_file": "uploadDocumentFile" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13898,7 +13898,7 @@ "vercel_project_removed": "projectRemoved", "vercel_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13932,7 +13932,7 @@ "write_note": "writeNote", "write_task": "writeTask" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -13953,7 +13953,7 @@ "webflow_collection_item_deleted": "collectionItemDeleted", "webflow_form_submission": "formSubmission" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -13996,7 +13996,7 @@ "triggers": { "whatsapp_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -14088,7 +14088,7 @@ "wordpress_update_tag": "updateTag", "wordpress_upload_media": "uploadMedia" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -14147,7 +14147,7 @@ "x_search_tweets": "searchTweets", "x_search_users": "searchUsers" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -14178,7 +14178,7 @@ "youcom_search": "search", "youcom_search_images": "searchImages" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -14211,7 +14211,7 @@ "youtube_video_categories": "getVideoCategories", "youtube_video_details": "getVideoDetails" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -14292,7 +14292,7 @@ "zendesk_ticket_status_changed": "ticketStatusChanged", "zendesk_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -14325,7 +14325,7 @@ "get_user": "getUser", "get_user_threads": "getUserThreads" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -14375,7 +14375,7 @@ "triggers": { "zoho_desk": "zohoDesk" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" }, @@ -14406,7 +14406,7 @@ "zoom_recording_completed": "recordingCompleted", "zoom_webhook": "webhook" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } @@ -14433,7 +14433,7 @@ "search_intent": "searchIntent", "search_news": "searchNews" }, - "params": { + "paramAliases": { "action": { "oauthCredential": "credential" } diff --git a/apps/sim/lib/workflows/code/catalog/sdk-names.test.ts b/apps/sim/lib/workflows/code/catalog/sdk-names.test.ts index f35f948d755..ba2810397a5 100644 --- a/apps/sim/lib/workflows/code/catalog/sdk-names.test.ts +++ b/apps/sim/lib/workflows/code/catalog/sdk-names.test.ts @@ -111,11 +111,11 @@ describe('extendSdkNames', () => { params: { action: [param('oauthCredential', true), param('credential')], trigger: [] }, }), ]) - expect(names.blocks.drive.params).toEqual({ + expect(names.blocks.drive.paramAliases).toEqual({ action: { oauthCredential: 'credential' }, trigger: { triggerCredentials: 'credential' }, }) - expect(names.blocks.mixed.params).toBeUndefined() + expect(names.blocks.mixed.paramAliases).toBeUndefined() }) }) @@ -149,7 +149,7 @@ describe('validateSdkNames', () => { version: 1, blocks: { a: { namespace: 'shared', methods: { x: 'go', y: 'go' } }, - b: { namespace: 'shared', params: { action: { oauthCredential: 'credential' } } }, + b: { namespace: 'shared', paramAliases: { action: { oauthCredential: 'credential' } } }, }, } const issues = validateSdkNames(names, [ diff --git a/apps/sim/lib/workflows/code/catalog/sdk-names.ts b/apps/sim/lib/workflows/code/catalog/sdk-names.ts index c8c54c032a0..b09c8933252 100644 --- a/apps/sim/lib/workflows/code/catalog/sdk-names.ts +++ b/apps/sim/lib/workflows/code/catalog/sdk-names.ts @@ -18,7 +18,7 @@ interface SdkNamesBlockEntry { /** Trigger id → method name under `trigger.`. */ triggers?: Record /** Param renames per surface (s2 D4: `oauthCredential` / `triggerCredentials` → `credential`). */ - params?: Partial>> + paramAliases?: Partial>> } export interface SdkNamesFile { @@ -55,13 +55,15 @@ const CREDENTIAL_ALIAS_SOURCES = new Set(['oauthCredential', 'triggerCredentials const CREDENTIAL_ALIAS = 'credential' /** - * Core SDK exports that ARE block builders: the core blocks' namespaces (`condition(...)`, - * `table.queryRows(...)` by declaration merging, `fn(...)`). Every other core export is a value - * constructor or tree root (`block`, `trigger`, `legacy`, `env`, `kb`, `loop`, ...), which no block - * namespace may take. + * Core SDK exports that ARE block builders: the core blocks' namespaces (`condition(...)`, `fn(...)`, + * and `table.queryRows(...)`, `file.read(...)`, `credential.listCredentials(...)` by declaration + * merging). Every other core export is a value constructor or tree root (`block`, `trigger`, + * `legacy`, `env`, `loop`, ...), which no block namespace may take. */ const CORE_BLOCK_BUILDERS = new Set([ 'condition', + 'credential', + 'file', 'fn', 'human', 'note', @@ -90,6 +92,7 @@ const NAMESPACE_SEEDS: Record = { human_in_the_loop_v2: 'human', variables: 'setVariables', generic_webhook: 'webhook', + mothership: 'simChat', } /** The root a visible trigger block's namespace sits under. */ @@ -251,7 +254,7 @@ export function extendSdkNames( } for (const surface of ['action', 'trigger'] as const) { - const aliases = entry.params?.[surface] ?? {} + const aliases = entry.paramAliases?.[surface] ?? {} const names = new Set(source.params[surface].map((param) => param.name)) const used = new Set([...names, ...Object.values(aliases)]) for (const name of [...names].sort(compareStrings)) { @@ -261,7 +264,8 @@ export function extendSdkNames( used.add(CREDENTIAL_ALIAS) added.push(`${source.type}: ${surface} param ${name} → ${CREDENTIAL_ALIAS}`) } - if (Object.keys(aliases).length > 0) entry.params = { ...entry.params, [surface]: aliases } + if (Object.keys(aliases).length > 0) + entry.paramAliases = { ...entry.paramAliases, [surface]: aliases } } } @@ -283,11 +287,11 @@ function sortEntries( const next: SdkNamesBlockEntry = { namespace: entry.namespace } if (entry.methods) next.methods = sortRecord(entry.methods) if (entry.triggers) next.triggers = sortRecord(entry.triggers) - if (entry.params) { - const params: Partial>> = {} - if (entry.params.action) params.action = sortRecord(entry.params.action) - if (entry.params.trigger) params.trigger = sortRecord(entry.params.trigger) - next.params = params + if (entry.paramAliases) { + const paramAliases: Partial>> = {} + if (entry.paramAliases.action) paramAliases.action = sortRecord(entry.paramAliases.action) + if (entry.paramAliases.trigger) paramAliases.trigger = sortRecord(entry.paramAliases.trigger) + next.paramAliases = paramAliases } sorted[type] = next } @@ -367,7 +371,7 @@ export function validateSdkNames(names: SdkNamesFile, sources: readonly SdkNameS } } for (const surface of ['action', 'trigger'] as const) { - const aliases = entry.params?.[surface] ?? {} + const aliases = entry.paramAliases?.[surface] ?? {} const identities = new Map>() for (const param of source.params[surface]) { const name = aliases[param.name] ?? param.name diff --git a/apps/sim/lib/workflows/code/golden-cases.test-helpers.ts b/apps/sim/lib/workflows/code/golden-cases.test-helpers.ts index afae2e74609..8bb96ac6e82 100644 --- a/apps/sim/lib/workflows/code/golden-cases.test-helpers.ts +++ b/apps/sim/lib/workflows/code/golden-cases.test-helpers.ts @@ -24,8 +24,8 @@ import { catalogTrigger, compactBlockCatalog, encodeAnchor, - type LockHints, type Port, + type SourceHints, sha256Hex, stableStringify, type Value, @@ -101,7 +101,7 @@ export const goldenCatalog: BlockCatalog = narrowedCatalog() interface PrintCase { name: string workflow: CanonicalWorkflow - hints?: LockHints + hints?: SourceHints } type BlockInit = Partial> & { @@ -848,7 +848,7 @@ export const cases: PrintCase[] = [ blk('Bad hint', 'api', { params: { url: 'https://j.test' } }), ], }), - hints: { blocks: { hinted: { binding: 'myHinted' }, badhint: { binding: 'class' } } }, + hints: { blocks: { hinted: { ident: 'myHinted' }, badhint: { ident: 'class' } } }, }, { name: 'lock-order', diff --git a/apps/sim/lib/workflows/code/goldens.test.ts b/apps/sim/lib/workflows/code/goldens.test.ts index bb2e5cd0434..34c6660c1df 100644 --- a/apps/sim/lib/workflows/code/goldens.test.ts +++ b/apps/sim/lib/workflows/code/goldens.test.ts @@ -27,8 +27,8 @@ import { compileWorkflow, executableInactiveParams, executableView, - type LockHints, printWorkflow, + type SourceHints, } from '@sim/workflow-code' import { editorDefaults } from '@sim/workflow-code/catalog/defaults' import { generateSdkTypes } from '@sim/workflow-sdk/codegen' @@ -55,7 +55,7 @@ function findCase(name: string) { return testCase } -function print(workflow: CanonicalWorkflow, hints: LockHints | undefined) { +function print(workflow: CanonicalWorkflow, hints: SourceHints | undefined) { return printWorkflow({ workflow, catalog, hints, options: INLINE }) } diff --git a/packages/workflow-code/src/canonicalize/index.test.ts b/packages/workflow-code/src/canonicalize/index.test.ts index ef722beda73..a75353143de 100644 --- a/packages/workflow-code/src/canonicalize/index.test.ts +++ b/packages/workflow-code/src/canonicalize/index.test.ts @@ -947,13 +947,13 @@ describe('canonicalize: branches (step 6, quirks 4-8)', () => { ) const result = run(workflow([blockState('c1', 'condition', 'Cond', { conditions: rows })]), { lock: { - lockVersion: 1, + version: 1, variables: {}, blocks: { cond: { id: 'c1', parent: null, - binding: 'cond', + ident: 'cond', order: 0, branches: { highValue: 'c1-if' }, }, diff --git a/packages/workflow-code/src/canonicalize/index.ts b/packages/workflow-code/src/canonicalize/index.ts index 4d67875d495..2218e135ec9 100644 --- a/packages/workflow-code/src/canonicalize/index.ts +++ b/packages/workflow-code/src/canonicalize/index.ts @@ -177,11 +177,11 @@ export const canonicalize: CanonicalizeFn = (state, options) => { }) } - const extraData: Record = {} + const extraFields: Record = {} const parentId = typeof data.parentId === 'string' ? data.parentId : undefined const parent = parentId !== undefined ? (keyById.get(parentId) ?? null) : null if (data.parentId != null && (parentId === undefined || parent === null)) { - extraData.parentId = toJson(data.parentId) + extraFields.parentId = toJson(data.parentId) report(context, { code: 'W_CANON_DANGLING_PARENT', severity: 'warning', @@ -252,9 +252,9 @@ export const canonicalize: CanonicalizeFn = (state, options) => { if (dataKey === 'extent' && value === 'parent' && parent !== null) continue if (dataKey === 'canonicalModes' && isModeMap(value)) continue if (isContainer && SUBFLOW_DATA_KEYS.has(dataKey) && !rejectedDataKeys.has(dataKey)) continue - setOwn(extraData, dataKey, toJson(value)) + setOwn(extraFields, dataKey, toJson(value)) } - if (Object.keys(extraData).length > 0) canonical.extra = extraData + if (Object.keys(extraFields).length > 0) canonical.extra = extraFields if (catalog && !isContainer) { const activityValues = overrides ? { ...rawValues, __canonicalModes: overrides } : rawValues diff --git a/packages/workflow-code/src/catalog/types.ts b/packages/workflow-code/src/catalog/types.ts index 2e6a8f1c4a4..82bbf299f79 100644 --- a/packages/workflow-code/src/catalog/types.ts +++ b/packages/workflow-code/src/catalog/types.ts @@ -53,7 +53,7 @@ export type CatalogCondition = SubBlockConditionClause | OpaqueMarker * - `resource`: a workspace resource by key (`resourceKind` says which). Selector-kind, so a pair * member of this kind is the basic member (build-spec decision 7). * - `picked`: an opaque provider id from a remote selector (`picked('C0123')`); basic. - * - `upload`: a workspace file upload (`upload('path')`); basic. + * - `upload`: a workspace file (`file('path')`); basic. * - `none`: display-only or server-managed (text, schedule-info, webhook-config, modal); never * written in source. */ diff --git a/packages/workflow-code/src/compile/SYNTAX.md b/packages/workflow-code/src/compile/SYNTAX.md index c157e3d9ee1..e2e13f1c628 100644 --- a/packages/workflow-code/src/compile/SYNTAX.md +++ b/packages/workflow-code/src/compile/SYNTAX.md @@ -10,7 +10,7 @@ taken. deploy reads, wiring, branches and the config of the loop or parallel type in effect. What only the canvas cares about is never required: which member of a basic/advanced pair shows a value, whether a selector or a typed value produced an id, inactive values, the other loop or parallel -types' fields, layout and unknown residue. Source has no syntax for it: the printer leaves it out +types' fields, layout and unknown extra data. Source has no syntax for it: the printer leaves it out and apply keeps it from the stored workflow (`materialize/preserve.ts`). **Defaults rule.** An omitted param is the editor default canvas creation writes (the catalog's @@ -31,7 +31,7 @@ to the default and writes `null` for an active field that has a default but no s ## Blocks -- `const x = builder('Name', params?, meta?)`, or a bare `builder(...)` statement (no binding). +- `const x = builder('Name', params?, meta?)`, or a bare `builder(...)` statement (no `const`). The builder is the dotted catalog path (`slack.sendMessage`, `trigger.gmail.poller`). - `block(type, 'Name', params?, meta?)` for any type: unknown, legacy, or a builder that does not fit. With a catalog type, params are checked against its fields; without one, they are kept @@ -40,8 +40,8 @@ to the default and writes `null` for an active field that has a default but no s group of one). Writing a group member by its own id is `E_UNKNOWN_PARAM` with a hint. A pinned id (`operation`, a builder's `fixed`) is `E_FIXED_PARAM`; the compiler adds pinned values. - Pair mode follows from the value kind alone; there is no `meta.modes`. A selector call - (`binding`, `table`, `kb`, `workflow`, `skill`, `customTool`, `mcp`, `sandbox`, `folder`, - `upload`) or a non-empty array of them is basic, anything else advanced, except that a list or + (`credential`, `table`, `knowledgeBase`, `childWorkflow`, `skill`, `customTool`, `mcp`, + `sandbox`, `folder`, `file`) or a non-empty array of them is basic, anything else advanced, except that a list or object literal never lands in a JSON code member (subBlock type `code`) when the pair's other member is not code: it goes to that other member as written (`table_v2`'s `filterInput`: a list is the filter builder's, JSON text the code editor's). The printer writes a JSON code member's @@ -50,14 +50,14 @@ to the default and writes `null` for an active field that has a default but no s mode is canvas state: when the pair's value is unchanged the stored member and mode stay, and a plain id written where the stored block shows the selector member stays in that member. - `meta`: `key`, `disabled`, `locked`, `advancedMode`, `triggerMode` (any builder), `errorPort`, - `retry: { enabled, maxTries, waitBetweenTriesMs }`, `branches`, `extra`, `extraData` + `retry: { enabled, maxTries, waitBetweenTriesMs }` (the stored `BlockRetryConfig`), `branches`, `extra`, `subflowData` (containers only). - A builder prints only blocks on its own surface: a trigger-mode builder never prints an action block, nor an action builder a block in trigger mode (a trigger block's builders fit either); such a block prints through `block()`. - `meta.key: ''` (a string literal) keeps a legacy key that the display name cannot carry. The printer writes it only for such a block, and the compiler accepts it only when the key is in - `CompileInput.knownKeys` (the stored workflow's keys, from the lock or `code_meta`) and is one of + `CompileInput.knownKeys` (the stored workflow's keys, from the lock or source meta) and is one of the two legacy shapes canonicalize produces: - the `~n` collision form of the normalized name (`api('agent1', {...}, { key: 'agent1~2' })` next to `api('Agent 1', ...)`), with the plain key declared by another block; @@ -73,11 +73,11 @@ to the default and writes `null` for an active field that has a default but no s prompt fields, a container's stored params. A key the block's params can name is `E_UNSUPPORTED_SYNTAX`. Values that never run are not written: apply restores them from the stored workflow. -- `extraData: { : json }`, on a loop or parallel only, holds the subflow keys of +- `subflowData: { : json }`, on a loop or parallel only, holds the subflow keys of `block.data` (`count`, `collection`, `loopType`, `whileCondition`, `doWhileCondition`, `parallelType`, `batchSize`) canonicalize could not read as config, which the serializer passes on. It is separate from `extra` because containers stored by the canvas often carry params - under those same names. Plain JSON; any other key, or `extraData` on another block, is + under those same names. Plain JSON; any other key, or `subflowData` on another block, is `E_UNSUPPORTED_SYNTAX`. ## Values @@ -109,7 +109,7 @@ to the default and writes `null` for an active field that has a default but no s `{ name, type: 'string', value: '' }`; `name: { type, ... }` → `{ name, type, ... }`; `{}` is the empty list. Arrays pass through; the printer writes a list the record cannot carry (an integer-like or repeated name, an unknown key) as `raw([...])`. -- Function code: `code: file('./functions/x.js')`, relative to the entry file, extension matching +- Function code: `code: codeFile('./functions/x.js')`, relative to the entry file, extension matching `language` (default `javascript`). JavaScript files have `$ref`/`$env` chains rewritten back (`src/code-files`); Python and shell are verbatim. - Tools (`valueKind: 'tools'`): an array of `ns.tool.method(params, options?)` / @@ -137,7 +137,7 @@ to the default and writes `null` for an active field that has a default but no s - Third argument: `(p) => { ... }`, or `(p) => block(...)` which implies `p.to(block)`. - The other types' stored fields have no syntax; apply keeps them from the stored workflow. A loop with no `count` gets 5, the count that runs. `meta.extra` carries the container's stored - params and `meta.extraData` its unreadable subflow data (see `meta` above). + params and `meta.subflowData` its unreadable subflow data (see `meta` above). - `p.x` is `` / `` when `p`'s container is the innermost of its kind around the block, else the named ``. `container.results` / `container.index` are named refs. @@ -145,7 +145,7 @@ to the default and writes `null` for an active field that has a default but no s ## Wiring - `a.to(b, c)` (fan-out), chains `a.to(b).to(c)`, groups `a.to(b, c).to(d)` (fan-in), - `a.onError(b)` (not chainable), `cond.key.to(x)`, `p.to(x)` / `p.start.to(x)`, and + `a.onError(b)` (not chainable), `cond.key.to(x)`, `p.to(x)` (the start port), and `container.to(x)` (end port). - `edge(a, 'handle', b)`: `'source'` is the out port (how the printer writes it for a condition, router or container), `'loop-start-source'`/`'parallel-start-source'` the start port, @@ -166,5 +166,5 @@ to the default and writes `null` for an active field that has a default but no s ## Also accepted (hand-written conveniences) -- `p.start.to(x)` alongside `p.to(x)`; `env['X']`; `blk['to']` and non-call `blk.to` as refs. +- `env['X']`; `blk['to']` and non-call `blk.to` as refs. - `raw([...])` for a whole tool list. diff --git a/packages/workflow-code/src/compile/blocks.ts b/packages/workflow-code/src/compile/blocks.ts index 4e64063f450..0796f0ce9be 100644 --- a/packages/workflow-code/src/compile/blocks.ts +++ b/packages/workflow-code/src/compile/blocks.ts @@ -46,7 +46,7 @@ import { interface CompiledBlock { block: CanonicalBlock - /** Repo-relative path of the function-code file, when the code came from `file()`. */ + /** Repo-relative path of the function-code file, when the code came from `codeFile()`. */ codeFile?: string } @@ -60,7 +60,7 @@ const META_KEYS = [ 'retry', 'branches', 'extra', - 'extraData', + 'subflowData', ] const BRANCH_KEY = /^[A-Za-z_$][A-Za-z0-9_$]*$/ const EDGE_METHOD_NAMES = new Set(['to', 'onError']) @@ -78,8 +78,8 @@ interface CompiledMeta { branches: Array<[string, ObjectProperty]> /** Stored fields that run but have no SDK syntax (the printer's meta `extra`). */ extra: Array<[string, ObjectProperty]> - /** A container's unreadable subflow `block.data` keys (the printer's meta `extraData`). */ - extraData: { node: Node; data: Record } | null + /** A container's unreadable subflow `block.data` keys (the printer's meta `subflowData`). */ + subflowData: { node: Node; data: Record } | null } function unsupported( @@ -172,7 +172,7 @@ function compileMeta(ctx: CompileContext, node: Node | undefined, site: ValueSit triggerMode: null, branches: [], extra: [], - extraData: null, + subflowData: null, } if (!node) return meta const { decl } = site @@ -220,20 +220,20 @@ function compileMeta(ctx: CompileContext, node: Node | undefined, site: ValueSit ) break } - case 'extraData': { + case 'subflowData': { const json = compileJsonLiteral(ctx, property.value, site) if (json === undefined) break if (!isRecordLike(json) || Object.keys(json).some((k) => !SUBFLOW_DATA_KEYS.has(k))) { unsupported( ctx, property.value, - 'extraData holds subflow data keys only.', + 'subflowData holds subflow data keys only.', `Keys are ${[...SUBFLOW_DATA_KEYS].join(', ')}.`, decl ) break } - meta.extraData = { node: property, data: json as Record } + meta.subflowData = { node: property, data: json as Record } break } default: @@ -266,10 +266,10 @@ function resolveRelative(base: string, relative: string): string | null { return parts.join('/') } -/** Reads a `file('./x.js')` code file back into stored code (build-spec decision 9). */ +/** Reads a `codeFile('./x.js')` code file back into stored code (build-spec decision 9). */ function readCodeFile( ctx: CompileContext, - compiled: Extract, + compiled: Extract, language: string, decl: BlockDecl ): { code: string; path: string } | null { @@ -280,7 +280,7 @@ function readCodeFile( if (budget.refs === ctx.limits.maxCodeFileRefs + 1) { ctx.reporter.report( 'E_LIMIT_EXCEEDED', - `The workflow has more than ${ctx.limits.maxCodeFileRefs} file() references.`, + `The workflow has more than ${ctx.limits.maxCodeFileRefs} codeFile() references.`, at, { hint: 'Write short code inline with js``.', blockKey: decl.key } ) @@ -305,7 +305,7 @@ function readCodeFile( : `${compiled.path} does not match the block language ${language}.`, at, { - hint: "Write file('./functions/name.js') with .js, .py or .sh matching language.", + hint: "Write codeFile('./functions/name.js') with .js, .py or .sh matching language.", blockKey: decl.key, } ) @@ -548,7 +548,7 @@ interface BlockState { * never fills them. */ unset: Set - pendingFile: { compiled: Extract; target: SubBlockId } | null + pendingFile: { compiled: Extract; target: SubBlockId } | null } function isJsonContainer(value: Value): boolean { @@ -595,13 +595,13 @@ function compileField( if (compiled.kind === 'todo') state.todos.set(field.param, property) return } - if (compiled.kind === 'file') { + if (compiled.kind === 'codeFile') { if (field.kind !== 'single' || field.sub.type !== 'code') { unsupported( ctx, property.value, - 'file() holds a function block code.', - "Write code: file('./functions/x.js').", + 'codeFile() holds a function block code.', + "Write code: codeFile('./functions/x.js').", decl ) return @@ -745,11 +745,11 @@ function compileRegularBlock(ctx: CompileContext, decl: BlockDecl): CompiledBloc if (!index) { const compiled = compileValue(ctx, property.value, site) if (!compiled || compiled.kind === 'absent' || compiled.kind === 'todo') continue - if (compiled.kind === 'file') { + if (compiled.kind === 'codeFile') { unsupported( ctx, property.value, - 'file() needs a catalog block type.', + 'codeFile() needs a catalog block type.', 'Write the code inline.', decl ) @@ -829,12 +829,12 @@ function compileRegularBlock(ctx: CompileContext, decl: BlockDecl): CompiledBloc compileExtraParams(ctx, meta.extra, params, site, (id) => Boolean(index?.subBlocks.has(id) || pinned.has(id) || id === branchField?.subBlockId) ) - if (meta.extraData) { + if (meta.subflowData) { unsupported( ctx, - meta.extraData.node, - 'Only a loop or parallel has extraData.', - 'Remove extraData; apply keeps the stored block data.', + meta.subflowData.node, + 'Only a loop or parallel has subflowData.', + 'Remove subflowData; apply keeps the stored block data.', decl ) } @@ -966,7 +966,7 @@ function numberLiteral(node: Node): number | null { /** * `loop.(name, config, body, meta?)` / `parallel[.](...)`. Config holds the fields * the type uses; apply keeps the other types' fields from the stored workflow. `meta.extra` holds - * the container's stored params, and `meta.extraData` the subflow keys of `block.data` + * the container's stored params, and `meta.subflowData` the subflow keys of `block.data` * canonicalize could not read as config. */ function compileContainer(ctx: CompileContext, decl: BlockDecl): CompiledBlock | null { @@ -1070,7 +1070,7 @@ function compileContainer(ctx: CompileContext, decl: BlockDecl): CompiledBlock | params, modes: {}, subflow, - ...(meta.extraData && { extra: meta.extraData.data }), + ...(meta.subflowData && { extra: meta.subflowData.data }), } return { block } } diff --git a/packages/workflow-code/src/compile/context.ts b/packages/workflow-code/src/compile/context.ts index afb75f22fd8..38edf0d826d 100644 --- a/packages/workflow-code/src/compile/context.ts +++ b/packages/workflow-code/src/compile/context.ts @@ -35,7 +35,7 @@ export interface BlockDecl { key: BlockKey name: string /** The `const` identifier, or `null` for a bare statement or an arrow-expression body. */ - binding: string | null + ident: string | null call: CallExpression /** The node the `block` anchor and span cover. */ anchorNode: Node @@ -59,7 +59,7 @@ export interface BlockDecl { type Binding = | { kind: 'block'; decl: BlockDecl } - | { kind: 'loopParam'; container: BlockDecl } + | { kind: 'subflowScope'; container: BlockDecl } | { kind: 'sdk'; name: string } | { kind: 'vars' } @@ -90,7 +90,7 @@ interface ImpliedEdge { interface CodeFileBudget { /** Repo-relative path → stored code, or `null` when the file was rejected. */ reads: Map - /** `file()` references seen so far. */ + /** `codeFile()` references seen so far. */ refs: number /** Bytes of the distinct files read so far. */ bytes: number @@ -107,8 +107,8 @@ export interface CompileContext { comments: CommentCollector decls: BlockDecl[] declsByKey: Map - /** Every block binding by identifier, across scopes, for `E_OUT_OF_SCOPE`. */ - declsByBinding: Map + /** Every block declaration by ident, across scopes, for `E_OUT_OF_SCOPE`. */ + declsByIdent: Map variables: Map wiring: WiringStatement[] implied: ImpliedEdge[] diff --git a/packages/workflow-code/src/compile/edges.ts b/packages/workflow-code/src/compile/edges.ts index f6e9bce8379..f94cca5938a 100644 --- a/packages/workflow-code/src/compile/edges.ts +++ b/packages/workflow-code/src/compile/edges.ts @@ -21,7 +21,7 @@ import { import { HINTS, hintForNode } from './hints' import { literalText } from './values' -/** A wiring source: a block and, when written explicitly, the port (`cond.key`, `p.start`). */ +/** A wiring source: a block and, when written explicitly, the port (`cond.key`, `p`). */ interface Endpoint { decl: BlockDecl port: Port | null @@ -123,7 +123,7 @@ export class EdgeCollector { ? `${to.name} is not inside ${from.name}.` : `${to.name} is inside ${from.name}; start it with the loop parameter.`), node, - 'Wire blocks within one scope; start a subflow body with p.start.to(block).' + 'Wire blocks within one scope; start a subflow body with p.to(block).' ) return false } @@ -187,7 +187,7 @@ export class EdgeCollector { if (node.type === 'Identifier') { const binding = lookup(scope, node.name) if (binding?.kind === 'block') return [{ decl: binding.decl, port: null }] - if (binding?.kind === 'loopParam') + if (binding?.kind === 'subflowScope') return [{ decl: binding.container, port: { kind: 'subflowStart' } }] this.error('E_UNKNOWN_IDENTIFIER', `${node.name} is not a block.`, node) return null @@ -196,9 +196,6 @@ export class EdgeCollector { const object = node.object if (object.type === 'Identifier') { const binding = lookup(scope, object.name) - if (binding?.kind === 'loopParam' && node.property.name === 'start') { - return [{ decl: binding.container, port: { kind: 'subflowStart' } }] - } if (binding?.kind === 'block') { const port = this.branchPort(binding.decl, node.property.name, node) return port ? [{ decl: binding.decl, port }] : null @@ -257,7 +254,7 @@ export class EdgeCollector { 'E_NO_DEFAULT_OUTPUT', `${endpoint.decl.name} routes through named branches.`, statement, - `Wire a branch: ${endpoint.decl.binding ?? 'block'}..to(...).` + `Wire a branch: ${endpoint.decl.ident ?? 'block'}..to(...).` ) return null } diff --git a/packages/workflow-code/src/compile/grammar.test.ts b/packages/workflow-code/src/compile/grammar.test.ts index 2ff7bfacff2..b7c88c837d2 100644 --- a/packages/workflow-code/src/compile/grammar.test.ts +++ b/packages/workflow-code/src/compile/grammar.test.ts @@ -6,7 +6,7 @@ import { compileWorkflow } from './index' import { TEST_CATALOG } from './test-catalog' const IMPORTS = - "import { agent, api, binding, block, condition, edge, env, file, fn, js, json, kb, loop, md, note, parallel, raw, ref, router, slack, t, table, todo, trigger, upload, workflow } from '@sim/workflow-sdk'" + "import { agent, api, block, childWorkflow, codeFile, condition, credential, edge, env, file, fn, js, json, knowledgeBase, loop, md, note, parallel, raw, ref, router, slack, t, table, todo, trigger, workflow } from '@sim/workflow-sdk'" const DEFAULT_OPTIONS = "{ variables: { retries: { type: 'number', value: 3 } } }" @@ -154,9 +154,9 @@ describe('accepted grammar', () => { const wf = ok( source( [ - "const send = slack.sendMessage('Send', { authMethod: 'oauth', credential: binding('support-slack'), channel: 'C1', text: 'hi' })", + "const send = slack.sendMessage('Send', { authMethod: 'oauth', credential: credential('support-slack'), channel: 'C1', text: 'hi' })", "const row = table.insertRow('Row', { tableId: table('leads'), data: raw('{\"a\":1}') })", - "const legacy = block('custom_block_x', 'Legacy', { a: kb('docs'), b: workflow('enrich'), c: upload('files/a.pdf'), d: raw({ $sim: 'unresolved', kind: 'table', id: 't1' }), e: { $sim: 'plain' } }, { triggerMode: true })", + "const legacy = block('custom_block_x', 'Legacy', { a: knowledgeBase('docs'), b: childWorkflow('enrich'), c: file('files/a.pdf'), d: raw({ $sim: 'unresolved', kind: 'table', id: 't1' }), e: { $sim: 'plain' } }, { triggerMode: true })", ].join('\n') ) ) @@ -294,7 +294,7 @@ describe('accepted grammar', () => { ' })', " const deep = loop.for('Deep', { count: 2 }, (r) => {", " const bottom = api('Bottom', { url: t`${p.index}/${r.index}` })", - ' r.start.to(bottom)', + ' r.to(bottom)', ' })', ' p.to(inner)', ' inner.to(fan)', @@ -374,7 +374,7 @@ describe('accepted grammar', () => { const text = source( [ "const s = slack.sendMessage('S', { authMethod: 'oauth', text: 'x' }, { disabled: true, locked: true, errorPort: true, retry: { enabled: true, maxTries: 3, waitBetweenTriesMs: 1000 }, extra: { legacyField: 'old' } })", - "const l = loop.for('L', { count: 2 }, (p) => {\n const a = api('A', { url: 'u' })\n p.to(a)\n}, { extra: { note: 'kept' }, extraData: { loopType: 'weird' } })", + "const l = loop.for('L', { count: 2 }, (p) => {\n const a = api('A', { url: 'u' })\n p.to(a)\n}, { extra: { note: 'kept' }, subflowData: { loopType: 'weird' } })", ].join('\n') ) const result = run(text) @@ -395,7 +395,7 @@ describe('accepted grammar', () => { it('pins the trigger builder, its fixed values and the operation', () => { const wf = ok( source( - "const mail = trigger.gmail.poller('Mail', { credential: binding('g'), labelIds: ['INBOX'], markAsRead: true })" + "const mail = trigger.gmail.poller('Mail', { credential: credential('g'), labelIds: ['INBOX'], markAsRead: true })" ) ) const mail = blockOf(wf, 'mail') @@ -409,8 +409,8 @@ describe('accepted grammar', () => { source( [ START, - "const score = fn('Score', { language: 'javascript', code: file('./fns/score.js') })", - "const py = fn('Py', { language: 'python', code: file('./fns/py.py') })", + "const score = fn('Score', { language: 'javascript', code: codeFile('./fns/score.js') })", + "const py = fn('Py', { language: 'python', code: codeFile('./fns/py.py') })", ].join('\n') ), { @@ -424,7 +424,7 @@ describe('accepted grammar', () => { expect(paramValue(wf, 'score', 'code')).toBe('return + {{KEY}} // $ref.x') expect(paramValue(wf, 'py', 'code')).toBe('print($ref.start.input)') expect(result.hints.blocks.score).toEqual({ - binding: 'score', + ident: 'score', order: 1, codeFile: 'workflows/fns/score.js', }) @@ -503,8 +503,8 @@ describe('accepted grammar', () => { expect(spanOf(result, 'param:call:url')).toMatchObject({ line: 10, column: 5 }) expect(spanOf(result, 'edges:start:out')).toMatchObject({ line: 17, column: 3 }) expect(result.hints.blocks).toEqual({ - start: { binding: 'start', order: 0 }, - call: { binding: 'call', order: 1 }, + start: { ident: 'start', order: 0 }, + call: { ident: 'call', order: 1 }, }) }) }) @@ -648,16 +648,16 @@ describe('errors, each with its code, location and hint', () => { [ 'an unknown loop property', "const l = loop.forEach('L', { collection: [] }, (p) => {\n const a = api('A', { url: p.curentItem })\n p.to(a)\n})", - 'E_UNKNOWN_LOOP_PROPERTY', + 'E_UNKNOWN_SUBFLOW_PROPERTY', 'p.curentItem', 'Did you mean p.currentItem?', ], [ 'subflow data on a block that is not a container', - "const s = slack.sendMessage('S', { authMethod: 'oauth', text: 'x' }, { extraData: { count: 2 } })", + "const s = slack.sendMessage('S', { authMethod: 'oauth', text: 'x' }, { subflowData: { count: 2 } })", 'E_UNSUPPORTED_SYNTAX', - 'extraData: { count: 2 }', - 'Remove extraData; apply keeps the stored block data.', + 'subflowData: { count: 2 }', + 'Remove subflowData; apply keeps the stored block data.', ], [ 'an extra field the block declares as a param', @@ -754,19 +754,19 @@ describe('errors, each with its code, location and hint', () => { ], [ 'a missing code file', - "const f = fn('F', { code: file('./fns/missing.js') })", + "const f = fn('F', { code: codeFile('./fns/missing.js') })", 'E_CODE_FILE_MISSING', "'./fns/missing.js'", ], [ 'a code file outside the repo', - "const f = fn('F', { code: file('../../../x.js') })", + "const f = fn('F', { code: codeFile('../../../x.js') })", 'E_CODE_FILE_PATH', "'../../../x.js'", ], [ 'a code file whose extension does not match the language', - "const f = fn('F', { language: 'python', code: file('./fns/a.js') })", + "const f = fn('F', { language: 'python', code: codeFile('./fns/a.js') })", 'E_CODE_FILE_PATH', "'./fns/a.js'", ], @@ -790,7 +790,7 @@ describe('errors, each with its code, location and hint', () => { }) it('reports a syntax error inside a code file at its own location', () => { - const result = run(source("const f = fn('F', { code: file('./fns/bad.js') })"), { + const result = run(source("const f = fn('F', { code: codeFile('./fns/bad.js') })"), { 'workflows/fns/bad.js': 'return (', }) const syntax = result.diagnostics.find((d) => d.code === 'E_SYNTAX') @@ -823,7 +823,7 @@ describe('rejected constructs (s3 §4 table)', () => { 'Only blocks can be named. Inline the value, or declare a workflow variable and use vars.x.' const DESTRUCTURE = 'Bind the block and use blk.field.' const HELPERS = - "Helpers aren't supported in workflow files; put logic in a function block with code: file('./fns/x.js')." + "Helpers aren't supported in workflow files; put logic in a function block with code: codeFile('./fns/x.js')." const CONTROL = "Control flow can't create blocks. Use condition()/router() for branching and loop()/parallel() for iteration." const SPREAD = 'Write each field explicitly.' @@ -838,7 +838,7 @@ describe('rejected constructs (s3 §4 table)', () => { "Regex and BigInt literals aren't values; write the pattern or number as a string." const ELEMENT = "Use a literal key: blk['key'] or blk[0]." const IMPORT = - "Only '@sim/workflow-sdk' is importable; reference function files with file('./fns/x.js')." + "Only '@sim/workflow-sdk' is importable; reference function files with codeFile('./fns/x.js')." const EXTRA = 'A workflow file holds imports and one export default workflow(...); move this inside the workflow body or delete it.' const NAMED_EXPORT = 'Only export default workflow(...) is allowed; remove this export.' @@ -847,7 +847,7 @@ describe('rejected constructs (s3 §4 table)', () => { ['let', "let a = api('A', { url: 'x' })", 'let a', LET], ['var', "var a = api('A', { url: 'x' })", 'var a', LET], ['a non-builder const', "const x = 'value'", "const x = 'value'", NON_BUILDER], - ['a resource const', "const x = binding('k')", "const x = binding('k')", NON_BUILDER], + ['a resource const', "const x = credential('k')", "const x = credential('k')", NON_BUILDER], ['destructuring', "const { a } = api('A', { url: 'x' })", '{ a }', DESTRUCTURE], ['a function declaration', 'function helper() {}', 'function helper', HELPERS], ['a class', 'class Helper {}', 'class Helper', HELPERS], @@ -935,7 +935,7 @@ describe('meta.key: legacy keys the display name cannot carry', () => { expect(errorsOf(kept)).toEqual([]) expect(Object.keys(kept.workflow?.blocks ?? {}).sort()).toEqual(['agent1', 'agent1~2']) expect(kept.workflow?.blocks['agent1~2']?.name).toBe('agent1') - expect(kept.hints.blocks['agent1~2']).toMatchObject({ binding: 'b' }) + expect(kept.hints.blocks['agent1~2']).toMatchObject({ ident: 'b' }) const loopBlock = withKeys(reserved, ['loop']) expect(errorsOf(loopBlock)).toEqual([]) diff --git a/packages/workflow-code/src/compile/hints.ts b/packages/workflow-code/src/compile/hints.ts index 33fedb85799..141b73d955d 100644 --- a/packages/workflow-code/src/compile/hints.ts +++ b/packages/workflow-code/src/compile/hints.ts @@ -10,7 +10,7 @@ export const HINTS = { 'Only blocks can be named. Inline the value, or declare a workflow variable and use vars.x.', destructuring: 'Bind the block and use blk.field.', helpers: - "Helpers aren't supported in workflow files; put logic in a function block with code: file('./fns/x.js').", + "Helpers aren't supported in workflow files; put logic in a function block with code: codeFile('./fns/x.js').", controlFlow: "Control flow can't create blocks. Use condition()/router() for branching and loop()/parallel() for iteration.", spread: 'Write each field explicitly.', @@ -23,7 +23,7 @@ export const HINTS = { literalKind: "Regex and BigInt literals aren't values; write the pattern or number as a string.", elementAccess: "Use a literal key: blk['key'] or blk[0].", otherImport: - "Only '@sim/workflow-sdk' is importable; reference function files with file('./fns/x.js').", + "Only '@sim/workflow-sdk' is importable; reference function files with codeFile('./fns/x.js').", extraStatement: 'A workflow file holds imports and one export default workflow(...); move this inside the workflow body or delete it.', namedExport: 'Only export default workflow(...) is allowed; remove this export.', diff --git a/packages/workflow-code/src/compile/hostile.test.ts b/packages/workflow-code/src/compile/hostile.test.ts index 055394a1f1c..e0a73deead4 100644 --- a/packages/workflow-code/src/compile/hostile.test.ts +++ b/packages/workflow-code/src/compile/hostile.test.ts @@ -150,17 +150,18 @@ describe('hostile sources produce diagnostics only', () => { }) it('never reads a code file outside the repository or past the size cap', () => { - const text = `// @sim-sdk 1\nimport { file, fn, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('X', {}, () => {\n const a = fn('A', { code: file('../../etc/passwd.js') })\n const b = fn('B', { code: file('./big.js') })\n})\n` + const text = `// @sim-sdk 1\nimport { codeFile, fn, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('X', {}, () => {\n const a = fn('A', { code: codeFile('../../etc/passwd.js') })\n const b = fn('B', { code: codeFile('./big.js') })\n})\n` const result = run(text, { maxBytes: 1_000 }, { 'workflows/big.js': 'x'.repeat(5_000) }) expect(codes(result)).toEqual(expect.arrayContaining(['E_CODE_FILE_PATH', 'E_LIMIT_EXCEEDED'])) }) describe('code file budget', () => { - const FILE_HEADER = "// @sim-sdk 1\nimport { file, fn, workflow } from '@sim/workflow-sdk'\n\n" + const FILE_HEADER = + "// @sim-sdk 1\nimport { codeFile, fn, workflow } from '@sim/workflow-sdk'\n\n" const fnFile = (count: number, path: (i: number) => string) => `${FILE_HEADER}export default workflow('X', {}, () => {\n${Array.from( { length: count }, - (_, i) => ` const f${i} = fn('F${i}', { code: file('${path(i)}') })` + (_, i) => ` const f${i} = fn('F${i}', { code: codeFile('${path(i)}') })` ).join('\n')}\n})\n` it('parses a code file referenced by many blocks once', () => { @@ -189,7 +190,7 @@ describe('hostile sources produce diagnostics only', () => { expect(result.workflow).toBeNull() }) - it('caps the number of file() references with one diagnostic', () => { + it('caps the number of codeFile() references with one diagnostic', () => { const result = run( fnFile(10, () => './a.js'), { maxCodeFileRefs: 3 }, diff --git a/packages/workflow-code/src/compile/index.ts b/packages/workflow-code/src/compile/index.ts index 9b70538c549..d54cd61b15e 100644 --- a/packages/workflow-code/src/compile/index.ts +++ b/packages/workflow-code/src/compile/index.ts @@ -2,7 +2,7 @@ import type { ArrowFunctionExpression, CallExpression, Node } from '@babel/types import { compareStrings } from '@sim/utils/string' import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' import { encodeAnchor, portKey } from '../anchors' -import type { CompileResult, CompileWorkflowFn, LockHints } from '../api' +import type { CompileResult, CompileWorkflowFn, SourceHints } from '../api' import type { SourceSpan } from '../diagnostics/frame' import type { AnchorKey, @@ -339,7 +339,7 @@ export const compileWorkflow: CompileWorkflowFn = (input) => { comments: new CommentCollector(file, reporter), decls: [], declsByKey: new Map(), - declsByBinding: new Map(), + declsByIdent: new Map(), variables: new Map(), wiring: [], implied: [], @@ -424,13 +424,13 @@ export const compileWorkflow: CompileWorkflowFn = (input) => { } const compiled = new Map() - const hints: LockHints = { blocks: {} } + const hints: SourceHints = { blocks: {} } for (const decl of ctx.decls) { const result = compileBlock(ctx, decl) if (!result) continue compiled.set(decl.key, result.block) setOwn(hints.blocks, decl.key, { - ...(decl.binding !== null && { binding: decl.binding }), + ...(decl.ident !== null && { ident: decl.ident }), order: decl.order, ...(result.codeFile !== undefined && { codeFile: result.codeFile }), }) diff --git a/packages/workflow-code/src/compile/scope.ts b/packages/workflow-code/src/compile/scope.ts index 1cf8da12813..3b733027669 100644 --- a/packages/workflow-code/src/compile/scope.ts +++ b/packages/workflow-code/src/compile/scope.ts @@ -229,7 +229,7 @@ function declare( const decl: BlockDecl = { key, name, - binding: binding?.name ?? null, + ident: binding?.name ?? null, call, anchorNode, nameNode, @@ -259,9 +259,9 @@ function declare( ctx.decls.push(decl) if (binding) { scope.bindings.set(binding.name, { kind: 'block', decl }) - const all = ctx.declsByBinding.get(binding.name) ?? [] + const all = ctx.declsByIdent.get(binding.name) ?? [] all.push(decl) - ctx.declsByBinding.set(binding.name, all) + ctx.declsByIdent.set(binding.name, all) } if (!decl.duplicate) recordSpan(ctx, { kind: 'block', block: key }, anchorNode) if (classified.builder.kind === 'container') collectContainerBody(ctx, decl) @@ -289,7 +289,7 @@ function collectContainerBody(ctx: CompileContext, decl: BlockDecl): void { } else { if (param.typeAnnotation) unsupported(ctx, param.typeAnnotation, 'Type annotations are not supported.', HINTS.types) - scope.bindings.set(param.name, { kind: 'loopParam', container: decl }) + scope.bindings.set(param.name, { kind: 'subflowScope', container: decl }) } } if (body.body.type === 'BlockStatement') { diff --git a/packages/workflow-code/src/compile/throughput.bench.ts b/packages/workflow-code/src/compile/throughput.bench.ts index b241a5a7504..247869dd39b 100644 --- a/packages/workflow-code/src/compile/throughput.bench.ts +++ b/packages/workflow-code/src/compile/throughput.bench.ts @@ -35,7 +35,7 @@ function blockSource(index: number): string { return [ ` const step${index} = slack.sendMessage('Step ${index}', {`, " authMethod: 'oauth',", - " credential: binding('support-slack'),", + " credential: credential('support-slack'),", ` channel: 'C0${index}',`, ` text: t\`Update ${index}: ${ref('content')}\`,`, ' })', @@ -54,7 +54,7 @@ function blockSource(index: number): string { const SOURCE = [ '// @sim-sdk 1', - "import { agent, api, binding, env, fn, js, slack, t, trigger, workflow } from '@sim/workflow-sdk'", + "import { agent, api, credential, env, fn, js, slack, t, trigger, workflow } from '@sim/workflow-sdk'", '', "export default workflow('Bench', { description: 'Two hundred blocks.' }, () => {", " const start = trigger.start('Start', { inputFormat: { query: 'string' } })", diff --git a/packages/workflow-code/src/compile/values.ts b/packages/workflow-code/src/compile/values.ts index b4c04da4600..1bf7ad11816 100644 --- a/packages/workflow-code/src/compile/values.ts +++ b/packages/workflow-code/src/compile/values.ts @@ -53,7 +53,7 @@ export interface ValueSite { * How a value was written, which picks the member of a basic/advanced pair (build-spec * decision 7) and decides whether `W_VALUE_KIND` applies (only to literals). */ -type ValueForm = 'literal' | 'ref' | 'template' | 'resource' | 'upload' | 'raw' +type ValueForm = 'literal' | 'ref' | 'template' | 'resource' | 'file' | 'raw' export type CompiledValue = | { kind: 'value'; value: Value; form: ValueForm } @@ -61,10 +61,10 @@ export type CompiledValue = | { kind: 'todo' } /** `null` at the top of a param: a stored `null` is absent. */ | { kind: 'absent' } - /** `file('./x.js')`: only valid as a function block's code. */ - | { kind: 'file'; path: string; pathNode: Node } + /** `codeFile('./x.js')`: only valid as a function block's code. */ + | { kind: 'codeFile'; path: string; pathNode: Node } -const SELECTOR_FORMS: ReadonlySet = new Set(['resource', 'upload']) +const SELECTOR_FORMS: ReadonlySet = new Set(['resource', 'file']) export function isSelectorForm(form: ValueForm): boolean { return SELECTOR_FORMS.has(form) @@ -72,16 +72,16 @@ export function isSelectorForm(form: ValueForm): boolean { /** Call-form resource constructors (s2 D6) and the kind each produces. */ const RESOURCE_CALLS: Record = { - binding: 'credential', + credential: 'credential', table: 'table', - kb: 'knowledge-base', - workflow: 'workflow', + knowledgeBase: 'knowledge-base', + childWorkflow: 'workflow', skill: 'skill', customTool: 'custom-tool', mcp: 'mcp-server', sandbox: 'sandbox', folder: 'file-folder', - upload: 'file', + file: 'file', } const TEMPLATE_TAGS = new Set(['t', 'js', 'json', 'md', 'py', 'sh']) @@ -93,7 +93,7 @@ export const SDK_VALUE_FUNCTIONS = new Set([ 'raw', 'todo', 'ref', - 'file', + 'codeFile', 'edge', 'env', 'vars', @@ -436,7 +436,7 @@ function compileRef(ctx: CompileContext, node: Node, site: ValueSite): string | const binding = lookup(site.scope, root.name) if (!binding) { - const elsewhere = ctx.declsByBinding.get(root.name) + const elsewhere = ctx.declsByIdent.get(root.name) if (elsewhere && elsewhere.length > 0) { ctx.reporter.report( 'E_OUT_OF_SCOPE', @@ -511,8 +511,8 @@ function compileRef(ctx: CompileContext, node: Node, site: ValueSite): string | } return `{{${name}}}` } - case 'loopParam': - return loopParamRef(ctx, node, binding.container, members, site) + case 'subflowScope': + return subflowScopeRef(ctx, node, binding.container, members, site) case 'block': { const target = binding.decl const segments = segmentsOf(ctx, members, site) @@ -521,7 +521,7 @@ function compileRef(ctx: CompileContext, node: Node, site: ValueSite): string | if (target.order > site.decl.order && target !== site.decl) { ctx.reporter.report( 'W_FORWARD_REF', - `${target.binding ?? target.key} is declared after this block.`, + `${target.ident ?? target.key} is declared after this block.`, rangeOf(ctx, node), { hint: 'Declare blocks before the blocks that read them.', blockKey: site.decl.key } ) @@ -588,7 +588,7 @@ function checkOutputPath( } } -function loopParamRef( +function subflowScopeRef( ctx: CompileContext, node: Node, container: BlockDecl, @@ -603,17 +603,11 @@ function loopParamRef( const label = paramName.type === 'Identifier' ? paramName.name : 'p' if (!first || property === null || !known.includes(property)) { ctx.reporter.report( - 'E_UNKNOWN_LOOP_PROPERTY', - property === 'start' - ? `${label}.start is only for wiring the first block.` - : `A ${kind} has no property ${property ?? '(none)'}.`, + 'E_UNKNOWN_SUBFLOW_PROPERTY', + `A ${kind} has no property ${property ?? '(none)'}.`, rangeOf(ctx, node), { - ...withHint( - property === 'start' - ? `Write ${label}.start.to(block).` - : didYouMean(property ?? '', known, (name) => `${label}.${name}`) - ), + ...withHint(didYouMean(property ?? '', known, (name) => `${label}.${name}`)), blockKey: site.decl.key, } ) @@ -683,16 +677,16 @@ function compileCall( const argument = singleStringArgument(ctx, call, path, site) if (!argument) return null const value: Value = { $sim: 'resource', kind: resourceKind, key: argument.text } - return { kind: 'value', value, form: path === 'upload' ? 'upload' : 'resource' } + return { kind: 'value', value, form: path === 'file' ? 'file' : 'resource' } } switch (path) { case 'ref': { const argument = singleStringArgument(ctx, call, 'ref', site) return argument ? { kind: 'value', value: `<${argument.text}>`, form: 'ref' } : null } - case 'file': { - const argument = singleStringArgument(ctx, call, 'file', site) - return argument ? { kind: 'file', path: argument.text, pathNode: argument.node } : null + case 'codeFile': { + const argument = singleStringArgument(ctx, call, 'codeFile', site) + return argument ? { kind: 'codeFile', path: argument.text, pathNode: argument.node } : null } case 'todo': if (call.arguments.length > 0) @@ -791,10 +785,10 @@ function nestedValue( node, compiled.kind === 'todo' ? 'todo() stands for a whole param.' - : 'file() holds a whole code param.', + : 'codeFile() holds a whole code param.', compiled.kind === 'todo' ? 'Write todo() as the param value.' - : "Write code: file('./fns/x.js').", + : "Write code: codeFile('./fns/x.js').", site ) return undefined diff --git a/packages/workflow-code/src/equivalence/executable.ts b/packages/workflow-code/src/equivalence/executable.ts index dda2c72e1e8..e6df563acee 100644 --- a/packages/workflow-code/src/equivalence/executable.ts +++ b/packages/workflow-code/src/equivalence/executable.ts @@ -9,7 +9,7 @@ * one param keyed by its `canonicalParamId`; * - the config fields of the loop or parallel types not in effect, and storage spellings the * runtime reads alike (`count: 0` and an absent count both run 5 iterations); - * - unknown `block.data` residue, which nothing executes (a container keeps the subflow keys it + * - unknown `block.data` extra data, which nothing executes (a container keeps the subflow keys it * could not read, because the serializer passes a container's `data` through). * * P0/P1 compare this view; O1 still compares stored bytes. @@ -78,7 +78,7 @@ export interface ExecutableBlock { branches?: CanonicalBranches subflow?: ExecutableSubflow /** Container `data` keys canonicalize could not read as config; the serializer passes them on. */ - subflowResidue?: Record + subflowData?: Record } export interface ExecutableWorkflow { @@ -175,11 +175,11 @@ function executableBlock(block: CanonicalBlock, catalog: BlockCatalog): Executab if (block.branches) view.branches = block.branches if (block.subflow) { view.subflow = executableSubflow(block.subflow) - const residue: Record = {} + const extra: Record = {} for (const [key, value] of Object.entries(block.extra ?? {})) { - if (SUBFLOW_DATA_KEYS.has(key)) setOwn(residue, key, value) + if (SUBFLOW_DATA_KEYS.has(key)) setOwn(extra, key, value) } - if (Object.keys(residue).length > 0) view.subflowResidue = residue + if (Object.keys(extra).length > 0) view.subflowData = extra } return view } diff --git a/packages/workflow-code/src/materialize/preserve.ts b/packages/workflow-code/src/materialize/preserve.ts index ba53e4e576b..edc53c5fbaf 100644 --- a/packages/workflow-code/src/materialize/preserve.ts +++ b/packages/workflow-code/src/materialize/preserve.ts @@ -9,7 +9,7 @@ * editor defaults compile filled into fields that never run; * - the config fields of the loop or parallel types not in effect, and prev's spelling of a config * that runs the same (`count: 0` and `count: 5`); - * - unknown `block.data` residue source does not carry. + * - unknown `block.data` extra data source does not carry. * * Canonicalize's output already holds all of this, so restoring onto it changes nothing and the * no-op round trip stays byte-identical. @@ -193,7 +193,7 @@ function restoreSubflow( /** * Unknown `block.data` source leaves out comes from prev. A container's subflow keys are the - * only ones source carries (`meta.extraData`), so the target's copy of those wins. + * only ones source carries (`meta.subflowData`), so the target's copy of those wins. */ function restoreExtra(target: CanonicalBlock, prev: CanonicalBlock): CanonicalBlock['extra'] { const data: Record = {} diff --git a/packages/workflow-code/src/model.ts b/packages/workflow-code/src/model.ts index d2a24320253..356556e21eb 100644 --- a/packages/workflow-code/src/model.ts +++ b/packages/workflow-code/src/model.ts @@ -47,7 +47,7 @@ export type ParamMode = 'basic' | 'advanced' * (`WORKFLOW_RESOURCE_KINDS` in `@sim/workflow-types/resources`, also used by workflow imports and * fork sync) minus `env-var`. Environment variables are `{{NAME}}` text tokens printed as * `env.NAME`, never nodes. Each kind is printed call-form (`table('leads')`, - * `binding('support-slack')`, `kb('docs')`, ...; build-spec decision 7, s2 D6) and resolved by the + * `credential('support-slack')`, `knowledgeBase('docs')`, ...; build-spec decision 7, s2 D6) and resolved by the * server's `ResourceKeyResolver`. */ export type ResourceKind = Exclude @@ -226,7 +226,7 @@ export interface CanonicalBlock { /** The enclosing loop/parallel (`data.parentId`), or `null` at the root. */ parent: BlockKey | null enabled: boolean - /** Protected: apply refuses any diff touching it (build-spec decision 11, s4 D2). */ + /** Locked: apply refuses any diff touching it (build-spec decision 11, s4 D2). */ locked: boolean /** The stored `triggerMode` flag. */ triggerMode: boolean @@ -260,7 +260,7 @@ export interface CanonicalBlock { subflow?: LoopSpec | ParallelSpec /** * Unknown `block.data` keys, verbatim. Source carries only a container's subflow keys, which the - * serializer passes on (`meta.extraData`); apply keeps the rest from the stored workflow. + * serializer passes on (`meta.subflowData`); apply keeps the rest from the stored workflow. */ extra?: Record } @@ -362,7 +362,7 @@ export interface WorkflowAnnotations { */ inactive: Record /** - * Comments by anchor, in source order. Persisted server-side in `workflow.code_meta` once it + * Comments by anchor, in source order. Persisted server-side in `workflow_source_meta` once it * exists (build-spec decision 6); until then only files carry them. */ comments: Partial> diff --git a/packages/workflow-code/src/print/__golden__/function-files.txt b/packages/workflow-code/src/print/__golden__/function-files.txt index 101fb438e81..0f3cab68ef4 100644 --- a/packages/workflow-code/src/print/__golden__/function-files.txt +++ b/packages/workflow-code/src/print/__golden__/function-files.txt @@ -1,11 +1,11 @@ // @sim-sdk 1 -import { file, fn, raw, trigger, workflow } from '@sim/workflow-sdk' +import { codeFile, fn, raw, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const start = trigger.start('Start', { inputFormat: { total: 'number' } }) - const jsCode = fn('Js code', { code: file('./functions/js-code.js') }) - const pyCode = fn('Py code', { language: 'python', code: file('./functions/py-code.py') }) - const shCode = fn('Sh code', { language: raw('shell'), code: file('./functions/sh-code.sh') }) + const jsCode = fn('Js code', { code: codeFile('./functions/js-code.js') }) + const pyCode = fn('Py code', { language: 'python', code: codeFile('./functions/py-code.py') }) + const shCode = fn('Sh code', { language: raw('shell'), code: codeFile('./functions/sh-code.sh') }) start.to(jsCode) jsCode.to(pyCode) diff --git a/packages/workflow-code/src/print/__golden__/support-triage.txt b/packages/workflow-code/src/print/__golden__/support-triage.txt index 197c689be36..d14ecc079be 100644 --- a/packages/workflow-code/src/print/__golden__/support-triage.txt +++ b/packages/workflow-code/src/print/__golden__/support-triage.txt @@ -1,8 +1,8 @@ // @sim-sdk 1 import { agent, - binding, condition, + credential, env, js, response, @@ -52,7 +52,7 @@ ${ticketIn.body}`, const notify = slack.sendMessage( 'Notify', { - oauthCredential: binding('support-slack'), + oauthCredential: credential('support-slack'), channel: 'C0SUPPORT', text: t`New ${classify.content} ticket: ${ticketIn.subject}`, }, diff --git a/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt b/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt index b5e2686fe9d..496e819e9dd 100644 --- a/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt +++ b/packages/workflow-code/src/print/__golden__/trigger-mode-builders.txt @@ -1,20 +1,20 @@ // @sim-sdk 1 -import { binding, gmail, todo, trigger, workflow } from '@sim/workflow-sdk' +import { credential, gmail, todo, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Fixture', {}, () => { const invoiceEmail = trigger.gmail.poller('Invoice email', { - oauthCredential: binding('finance-gmail'), + oauthCredential: credential('finance-gmail'), labelIds: ['INBOX'], labelFilterBehavior: todo(), markAsRead: true, }) const oddTrigger = trigger.gmail.poller('Odd trigger', { - oauthCredential: binding('finance-gmail'), + oauthCredential: credential('finance-gmail'), labelFilterBehavior: todo(), markAsRead: false, }) const sendSummary = gmail.sendEmail('Send summary', { - oauthCredential: binding('finance-gmail'), + oauthCredential: credential('finance-gmail'), to: 'cfo@acme.test', subject: 'Invoices', body: invoiceEmail.email.subject, diff --git a/packages/workflow-code/src/print/idents.ts b/packages/workflow-code/src/print/idents.ts index f3c363def35..3eb9a9d9700 100644 --- a/packages/workflow-code/src/print/idents.ts +++ b/packages/workflow-code/src/print/idents.ts @@ -20,7 +20,7 @@ function isReservedIdentifier(name: string, extraReserved: ReadonlySet): /** * Assigns one unique `const` identifier per block. Blocks are visited in declaration order: a - * usable hinted binding (lock or code_meta) is claimed first, so a canvas rename keeps the + * usable hinted ident (lock or source meta) is claimed first, so a canvas rename keeps the * identifier (build-spec decision 4); the rest derive camelCase from the display name, with a * numeric suffix on collision with another block, `SDK_RESERVED_IDENTIFIERS` or a name in * `reserved` (the catalog's builder namespaces). diff --git a/packages/workflow-code/src/print/order.ts b/packages/workflow-code/src/print/order.ts index 12f4fe09014..21cb05363af 100644 --- a/packages/workflow-code/src/print/order.ts +++ b/packages/workflow-code/src/print/order.ts @@ -4,7 +4,7 @@ import type { BlockKey } from '../model' export interface OrderNode { key: BlockKey isTrigger: boolean - /** Lock / code_meta order; absent sorts last. */ + /** Lock / source meta order; absent sorts last. */ order: number | undefined } diff --git a/packages/workflow-code/src/print/printer.ts b/packages/workflow-code/src/print/printer.ts index 76516015791..6f1d80b14eb 100644 --- a/packages/workflow-code/src/print/printer.ts +++ b/packages/workflow-code/src/print/printer.ts @@ -11,7 +11,7 @@ import { RESERVED_WORKFLOW_BLOCK_NAMES, } from '@sim/workflow-types/workflow' import { portKey } from '../anchors' -import type { LockHintBlock, LockHints, PrintInput, PrintResult, PrintWorkflowFn } from '../api' +import type { PrintInput, PrintResult, PrintWorkflowFn, SourceHintBlock, SourceHints } from '../api' import { SUBFLOW_DATA_KEYS } from '../canonicalize/subflows' import { canonicalActivityInputs, executableInactiveParams, isInactive } from '../catalog/activity' import { type EditorDefault, editorDefaults } from '../catalog/defaults' @@ -193,7 +193,7 @@ function toolJson(tool: CanonicalTool): Json { class WorkflowPrinter { private readonly workflow: CanonicalWorkflow private readonly catalog: BlockCatalog - private readonly hints: LockHints + private readonly hints: SourceHints private readonly width: number private readonly options: PrintInput['options'] private readonly diagnostics: Diag[] = [] @@ -230,7 +230,7 @@ class WorkflowPrinter { hasVariable: (key) => key in this.workflow.variables, visibility: (from, target) => this.visibility(from, target), identOf: (key) => this.idents.get(key) ?? key, - loopParam: (from, kind) => this.loopParam(from, kind), + subflowScope: (from, kind) => this.subflowScope(from, kind), use: (name) => this.imports.add(name), useVars: () => { this.usesVars = true @@ -292,7 +292,7 @@ class WorkflowPrinter { return a < b ? 'ok' : 'forward' } - private loopParam(from: BlockKey, kind: 'loop' | 'parallel'): string | null { + private subflowScope(from: BlockKey, kind: 'loop' | 'parallel'): string | null { for (const ancestor of this.ancestors(from)) { if (this.blocks.get(ancestor)?.subflow?.kind === kind) { return this.paramNames.get(ancestor) ?? null @@ -360,7 +360,7 @@ class WorkflowPrinter { this.preorder.map((key) => ({ key, name: this.blocks.get(key)?.name ?? key, - hint: getOwn(this.hints.blocks, key)?.binding, + hint: getOwn(this.hints.blocks, key)?.ident, })), reserved ) @@ -513,7 +513,7 @@ class WorkflowPrinter { this.takenCodePaths.add(path) this.codeFileHints.set(block.key, path) this.codeFiles.push({ path, text }) - return this.values.call('file', [{ doc: quoteString(`./${path}`), shape: 'string' }]) + return this.values.call('codeFile', [{ doc: quoteString(`./${path}`), shape: 'string' }]) } private printTools(block: CanonicalBlock, tools: CanonicalTool[]): PrintedValue { @@ -731,7 +731,7 @@ class WorkflowPrinter { fields: { triggerMode?: boolean | undefined extra: Property[] - extraData?: Record + subflowData?: Record branches?: Property[] } ): Property[] { @@ -754,7 +754,9 @@ class WorkflowPrinter { meta.push({ key: 'branches', value: objectExpr(fields.branches) }) } if (fields.extra.length > 0) meta.push({ key: 'extra', value: objectExpr(fields.extra) }) - if (fields.extraData) meta.push({ key: 'extraData', value: this.values.json(fields.extraData) }) + if (fields.subflowData) { + meta.push({ key: 'subflowData', value: this.values.json(fields.subflowData) }) + } return meta } @@ -859,7 +861,7 @@ class WorkflowPrinter { /** * `loop.(name, config, body, meta?)` / `parallel[.](...)`. Config holds the fields * the type runs with; the other types' fields are left to the stored workflow. `meta.extra` - * carries the container's stored params, and `meta.extraData` the subflow keys of `block.data` + * carries the container's stored params, and `meta.subflowData` the subflow keys of `block.data` * canonicalize could not read as config, which the serializer passes on with the container's * data. */ @@ -892,13 +894,13 @@ class WorkflowPrinter { catalogBlockOf(this.catalog, block.type), new Set() ) - const residue: Record = {} + const subflowData: Record = {} for (const [key, value] of Object.entries(block.extra ?? {})) { - if (SUBFLOW_DATA_KEYS.has(key)) setOwn(residue, key, value) + if (SUBFLOW_DATA_KEYS.has(key)) setOwn(subflowData, key, value) } const meta = this.metaProperties(block, { extra: this.paramProperties([...params, ...extra]), - ...(Object.keys(residue).length > 0 && { extraData: residue }), + ...(Object.keys(subflowData).length > 0 && { subflowData }), }) const body = this.scopeStatements(block.key) const args: Expr[] = [ @@ -1134,11 +1136,11 @@ class WorkflowPrinter { parts.push(hardline) const text = printDoc(parts, this.width) - const hintBlocks: Record = { ...this.hints.blocks } + const hintBlocks: Record = { ...this.hints.blocks } this.preorder.forEach((key, index) => { const codeFile = this.codeFileHints.get(key) setOwn(hintBlocks, key, { - binding: this.idents.get(key) ?? key, + ident: this.idents.get(key) ?? key, order: index, ...(codeFile ? { codeFile } : {}), }) diff --git a/packages/workflow-code/src/print/refs.ts b/packages/workflow-code/src/print/refs.ts index 30370070552..6617fccba25 100644 --- a/packages/workflow-code/src/print/refs.ts +++ b/packages/workflow-code/src/print/refs.ts @@ -30,7 +30,7 @@ export interface RefScope { visibility(from: BlockKey, target: BlockKey): 'ok' | 'forward' | 'scope' identOf(key: BlockKey): string /** The param name of the nearest `kind` container enclosing `from`, if any. */ - loopParam(from: BlockKey, kind: 'loop' | 'parallel'): string | null + subflowScope(from: BlockKey, kind: 'loop' | 'parallel'): string | null /** Records that the printed file uses an SDK import (`env`). */ use(name: string): void /** Records that the printed file reads `vars`. */ @@ -64,7 +64,7 @@ export class RefPrinter { } if (head.name === 'loop' || head.name === 'parallel') { const known = head.name === 'loop' ? LOOP_PROPERTIES : PARALLEL_PROPERTIES - const param = from === null ? null : this.scope.loopParam(from, head.name) + const param = from === null ? null : this.scope.subflowScope(from, head.name) if (first?.kind !== 'name' || !known.includes(first.name) || param === null) { return this.unresolved(token, from, 'W_UNRESOLVED_REF') } diff --git a/packages/workflow-code/src/print/values.ts b/packages/workflow-code/src/print/values.ts index 670cdca023c..94e0307c2ee 100644 --- a/packages/workflow-code/src/print/values.ts +++ b/packages/workflow-code/src/print/values.ts @@ -35,21 +35,21 @@ export interface FieldContext { * `raw()`, which compiles back to the same node. */ const RESOURCE_CALLS: Partial> = { - credential: 'binding', + credential: 'credential', table: 'table', - 'knowledge-base': 'kb', - workflow: 'workflow', + 'knowledge-base': 'knowledgeBase', + workflow: 'childWorkflow', skill: 'skill', 'custom-tool': 'customTool', 'mcp-server': 'mcp', sandbox: 'sandbox', - file: 'upload', + file: 'file', 'file-folder': 'folder', } export interface PrintedValue extends Expr { /** - * True when the value printed as a selector call (`table('x')`, `upload('a.pdf')`, ...) or a + * True when the value printed as a selector call (`table('x')`, `file('a.pdf')`, ...) or a * non-empty array of them: the form that stores into the basic member of a pair. */ selector?: boolean diff --git a/packages/workflow-code/src/sdk.ts b/packages/workflow-code/src/sdk.ts index 75b4d1a1261..e6e0501be46 100644 --- a/packages/workflow-code/src/sdk.ts +++ b/packages/workflow-code/src/sdk.ts @@ -1,6 +1,6 @@ /** * Names the `@sim/workflow-sdk` authoring surface fixes, shared by the printer (which must never - * emit a block binding that shadows one), the compiler (which resolves them) and the lock + * emit a block ident that shadows one), the compiler (which resolves them) and the lock * validator. 2E's `core.d.ts` must export exactly {@link SDK_CORE_EXPORTS}. */ @@ -14,8 +14,10 @@ export const GENERIC_BUILDER = 'block' /** Every value the SDK's core module exports (s2 §2 core types, build-spec decision 7). */ export const SDK_CORE_EXPORTS = [ GENERIC_BUILDER, - 'binding', + 'childWorkflow', + 'codeFile', 'condition', + 'credential', 'customTool', 'edge', 'env', @@ -25,7 +27,7 @@ export const SDK_CORE_EXPORTS = [ 'human', 'js', 'json', - 'kb', + 'knowledgeBase', 'legacy', 'loop', 'mcp', @@ -46,7 +48,6 @@ export const SDK_CORE_EXPORTS = [ 'table', 'todo', 'trigger', - 'upload', 'vars', 'workflow', ] as const @@ -105,7 +106,7 @@ const JS_RESERVED_WORDS = [ ] as const /** - * Identifiers a block binding may never take: JS reserved words plus every SDK core export. + * Identifiers a block ident may never take: JS reserved words plus every SDK core export. * Catalog builder namespaces (`slack`, `agent`, ...) are catalog-dependent, so the printer avoids * those itself with a numeric suffix. */ diff --git a/packages/workflow-sdk/README.md b/packages/workflow-sdk/README.md index 078c8d5aeee..1e0864a18c1 100644 --- a/packages/workflow-sdk/README.md +++ b/packages/workflow-sdk/README.md @@ -7,34 +7,34 @@ runtime export throws `SimSdkNotExecutable`. ## Editing a workflow (for agents) ```bash -sim workflows source get --out ./wf # write the source tree +sim workflows source get --dir ./wf # write the source tree # edit ./wf/workflow.ts (and ./wf/functions/*) tsc -p ./wf # optional: type-check locally -sim workflows source apply --from ./wf --dry-run # check, write nothing -sim workflows source apply --from ./wf --yes # save the draft +sim workflows source apply --dir ./wf --dry-run # check, write nothing +sim workflows source apply --dir ./wf --yes # save the draft ``` To create a workflow instead, write `workflow.ts` in an empty directory and run -`sim workflows source apply --new --from ./wf [--name ] [--folder ] --yes`; it prints +`sim workflows source create --dir ./wf [--name ] [--folder ] --yes`; it prints the new workflow id and writes the lock files back into the directory. - Every file starts with `// @sim-sdk 1`, then imports from `@sim/workflow-sdk`. -- `apply` asks for confirmation on a terminal. Anywhere else pass `--yes` (it exits 2 without it). - `--dry-run` never asks. +- `apply` and `create` ask for confirmation on a terminal. Anywhere else pass `--yes` (without it + they refuse with `CONFIRMATION_REQUIRED`). `--dry-run` never asks. - Apply only ever changes the draft. Deploy separately. - Keep `.sim/lock.json` and `.sim/base.json`: they bind each block in the file to its stored id. Renaming a block's const or display name keeps its id; deleting the lock does not. -## What `--out` writes +## What `--dir` writes | Path | Contents | |------|----------| | `workflow.ts`, `functions/*` | The source. Edit these. | | `.sim/lock.json`, `.sim/base.json` | Identity lock and the fingerprint the source was read at. Do not edit. | -| `.sim/sdk/core.d.ts` | This package's authoring types (`BlockMeta`, `t`, `env`, `table`, `binding`, ...). | +| `.sim/sdk/core.d.ts` | This package's authoring types (`BlockMeta`, `t`, `env`, `table`, `credential`, ...). | | `.sim/sdk/blocks/{type}.d.ts` | One file per block type with its builders: every block, not only the ones in use. | | `.sim/sdk/operations/{type}/{operation}.d.ts` | One operation's params and outputs, about 1-2 KB each. Read these to learn a block. | -| `.sim/sdk/workspace.d.ts` | This workspace's tables (with columns), knowledge bases, credential bindings, workflows (with inputs) and env var names, so `table('tickets')`, `binding('support-slack')` and `env.X` are checked. | +| `.sim/sdk/workspace.d.ts` | This workspace's tables (with columns), knowledge bases, credentials, workflows (with inputs) and env var names, so `table('tickets')`, `credential('support-slack')` and `env.X` are checked. | | `tsconfig.json` | Resolves `@sim/workflow-sdk` to `.sim/sdk`. | | `AGENTS.md` | A pointer to this README. | @@ -48,7 +48,7 @@ directory, so a second `get` in the same workspace does not download it again. ``` workflow.ts:12:5 error E_UNKNOWN_PARAM: Slack has no param credential. 11 | const notify = slack.sendMessage('Notify', { -> 12 | credential: binding('support-slack'), +> 12 | credential: credential('support-slack'), | ^^^^^^^^^^ 13 | channel: 'C0SUPPORT', hint: Write it as oauthCredential; the value kind picks the basic or advanced field. @@ -64,9 +64,9 @@ apply is refused) with `file`, `line`, `column`, `code`, `severity`, `message` a Someone changed the workflow since you read it. Nothing was saved. Rebase: -1. `sim workflows source get --out ./wf-fresh`. +1. `sim workflows source get --dir ./wf-fresh`. 2. Re-apply your edit to `./wf-fresh/workflow.ts` (diff your copy against the old source to find - it), then `apply --from ./wf-fresh --dry-run`, then apply. + it), then `apply --dir ./wf-fresh --dry-run`, then apply. Never copy the old `.sim/` files over the fresh ones: the fingerprint in `.sim/base.json` is what makes the next apply safe. diff --git a/packages/workflow-sdk/src/codegen/core-text.generated.ts b/packages/workflow-sdk/src/codegen/core-text.generated.ts index 2138dcc1778..9783370aecb 100644 --- a/packages/workflow-sdk/src/codegen/core-text.generated.ts +++ b/packages/workflow-sdk/src/codegen/core-text.generated.ts @@ -1,4 +1,4 @@ // Generated by scripts/generate-core-text.ts from src/core.d.ts; do not edit. /** The text of `core.d.ts`, the workflow SDK authoring declarations. */ -export const CORE_DTS = "/**\n * The authoring surface for Sim workflows written as TypeScript (s2 §2).\n *\n * Nothing declared here runs. `@sim/workflow-code` compiles a workflow file statically, and every\n * runtime export of this package throws `SimSdkNotExecutable`. These declarations exist so an\n * editor, `tsgo --noEmit` or an agent can check a workflow file before the compiler sees it.\n *\n * Block builders (`slack.sendMessage`, `agent`, `trigger.gmail.poller`, ...) are not declared here:\n * they are generated from the block catalog into `blocks/{type}.d.ts`, which augment this module.\n * The generic `block(type, name, params)` covers any stored type without a builder.\n *\n * Every workflow file starts with the SDK header line, before any import:\n *\n * ```ts\n * // @sim-sdk 1\n * import { agent, trigger, workflow } from '@sim/workflow-sdk'\n * ```\n *\n * The number is the SDK major version the file is written against. A file without the header is\n * refused with `E_SDK_HEADER`, and one written for a newer major than the server supports with\n * `E_SDK_MAJOR`.\n */\n\n/** Plain JSON. */\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json }\n\ndeclare const REF: unique symbol\ndeclare const TEMPLATE: unique symbol\ndeclare const ENV: unique symbol\ndeclare const RESOURCE: unique symbol\ndeclare const TOOL: unique symbol\ndeclare const NODE: unique symbol\ndeclare const FILE_BODY: unique symbol\ndeclare const RAW: unique symbol\n\n/** Any reference, whatever it points at. */\nexport interface AnyRef {\n readonly [REF]: unknown\n}\n\ntype RefPaths = [Json] extends [T]\n ? { readonly [key: string]: Ref }\n : T extends readonly (infer E)[]\n ? { readonly [index: number]: Ref; readonly length: Ref }\n : T extends object\n ? { readonly [K in keyof T]-?: Ref }\n : unknown\n\n/**\n * A typed reference to a block output, compiled to `` (build-spec decision 8).\n * Paths map exactly: `.seg`, `['seg']` and `[n]`. Untyped JSON allows any path.\n */\nexport type Ref = { readonly [REF]: T } & RefPaths\n\n/** Text with references in it, written with one of the tags below. */\nexport type Template = string & { readonly [TEMPLATE]: true }\n\n/** A workspace environment variable, compiled to `{{NAME}}`. */\nexport interface EnvRef {\n readonly [ENV]: string\n}\n\n/** A param value: a literal, a reference, a template or an environment variable. */\nexport type Value = T | AnyRef | Template | EnvRef\n\n/** JSON whose leaves may be references, templates or environment variables. */\nexport type JsonWithRefs =\n | null\n | boolean\n | number\n | string\n | AnyRef\n | Template\n | EnvRef\n | JsonWithRefs[]\n | { [key: string]: JsonWithRefs }\n\n/** A literal union that still accepts any other string (option ids read from values). */\nexport type LiteralUnion = T | (string & {})\n\n/** A `time-input` value, `HH:MM`. */\nexport type TimeString = `${number}:${number}`\n\ntype Interpolation = AnyRef | EnvRef | VarRef | string | number | boolean\n\n/** Text with interpolated references: `` t`New ${cls.category} ticket` ``. */\nexport declare function t(strings: TemplateStringsArray, ...values: Interpolation[]): Template\n/** JavaScript code (condition expressions, inline function code). */\nexport declare const js: typeof t\n/** Python code. */\nexport declare const py: typeof t\n/** Shell code. */\nexport declare const sh: typeof t\n/** JSON text kept verbatim, for bodies an object literal cannot reproduce byte for byte. */\nexport declare const json: typeof t\n/** Markdown text (note content). */\nexport declare const md: typeof t\n\n/** A reference with a non-canonical spelling, such as `ref('Classify.content')`. */\nexport declare function ref(path: string): Ref\n\n/** A stored value outside the generated type (a legacy option id, say), kept verbatim. */\nexport declare function raw(value: unknown): T & { readonly [RAW]: true }\n\n/** A required value that is still missing; compiles to absent, so canvas drafts type-check. */\nexport declare function todo(): never\n\n/** Function code kept in a file next to the workflow (`.js`, `.py` or `.sh`), stored verbatim. */\nexport interface FileBody {\n readonly [FILE_BODY]: string\n}\nexport declare function file(path: `./${string}`): FileBody\n\n/**\n * Environment variable names known to the workspace. `workspace.d.ts` adds one member per name;\n * until it exists `env` accepts any name.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceEnv {}\n\nexport declare const env: keyof WorkspaceEnv extends never\n ? { readonly [name: string]: EnvRef }\n : { readonly [K in keyof WorkspaceEnv]: EnvRef }\n\n/**\n * Workspace resources by stable key, filled in by the generated `workspace.d.ts`. Each map's\n * values describe the resource: a table's row type, a binding's service, a workflow's inputs.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceTables {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceKnowledgeBases {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceBindings {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceWorkflows {}\n\ntype KeyOf = keyof M extends never ? string : Extract\n\nexport type TableKey = KeyOf\nexport type KnowledgeBaseKey = KeyOf\nexport type BindingKey = KeyOf\nexport type WorkflowKey = KeyOf\n\n/** A workspace resource by stable key, compiled to the resource's internal id. */\nexport interface ResourceRef {\n readonly [RESOURCE]: Kind\n readonly key: Key\n}\n\n/** A credential binding: `binding('support-slack')`. */\nexport type Binding = ResourceRef<'credential', Key>\nexport declare function binding(key: K): Binding\n\n/** The columns of a workspace table, or loose JSON when `workspace.d.ts` does not know it. */\nexport type TableColumns = K extends keyof WorkspaceTables\n ? WorkspaceTables[K]\n : { [column: string]: Json }\n/** One stored row: its columns plus the row id. */\nexport type TableRow = TableColumns & { id: string }\n/** Column values written to a row. */\nexport type TableData = K extends keyof WorkspaceTables\n ? { [C in keyof WorkspaceTables[K]]?: Value | JsonWithRefs }\n : { [column: string]: JsonWithRefs }\n\n/** A workspace table: `table('leads')`. Table block operations live on `table.*`. */\nexport type TableRef = ResourceRef<'table', Key>\nexport declare function table(key: K): TableRef\n\n/** A knowledge base: `kb('docs')`. */\nexport type KnowledgeBaseRef = ResourceRef<'knowledge-base', Key>\nexport declare function kb(key: K): KnowledgeBaseRef\n\n/** A workspace skill: `skill('triage')`. */\nexport type SkillRef = ResourceRef<'skill'>\nexport declare function skill(key: string): SkillRef\n\n/** A sandbox image: `sandbox('node-ml')`. */\nexport type SandboxRef = ResourceRef<'sandbox'>\nexport declare function sandbox(key: string): SandboxRef\n\n/** A workspace folder: `folder('reports')`. */\nexport type FolderRef = ResourceRef<'file-folder'>\nexport declare function folder(key: string): FolderRef\n\n/** A workspace file upload: `upload('contracts/acme.pdf')`. */\nexport type Upload = ResourceRef<'file'>\nexport declare function upload(path: string): Upload\n\n/** A file produced at run time (`file` / `file[]` outputs). */\nexport interface SimFile {\n id: string\n name: string\n url: string\n size: number\n type: string\n key: string\n}\n\n// Agent tools\n\n/** One entry of an agent's `tools` list. */\nexport interface Tool {\n readonly [TOOL]: true\n}\n\n/** How the model may use a tool, and the stored tool fields a print carries. */\nexport interface ToolOpts {\n usageControl?: 'auto' | 'force' | 'none'\n usageControlExpression?: string\n title?: string\n /** The stored operation, when the method does not pin it. */\n operation?: string\n toolId?: string\n /** Pair modes of the tool's params, which pick the member the agent reads. */\n modes?: Record\n customTool?: JsonWithRefs\n operationPolicy?: Json\n /** Unknown stored tool keys, kept verbatim. */\n extra?: Json\n}\n\n/** A custom tool by key: `customTool('lookup-order')`. */\nexport declare function customTool(key: string, options?: ToolOpts): Tool\nexport declare namespace customTool {\n /** A custom tool snapshot that has drifted from the workspace tool. */\n function inline(definition: { schema: Json; code: string | Template; title?: string }): Tool\n}\n\n/** An MCP server by key; `mcp('linear').tool('create_issue')`. */\nexport interface McpServerRef extends ResourceRef<'mcp-server'> {\n tool(name: string, options?: ToolOpts & { args?: Record }): Tool\n}\nexport declare function mcp(key: string): McpServerRef\n\n// Graph\n\n/** Block-level fields (`BlockState`), written as the third builder argument. */\nexport interface BlockMeta {\n /**\n * A legacy key the display name cannot carry (a `name~n` collision key or a reserved name such\n * as `Loop`). Printed only for such a stored block; apply accepts it only for a key the stored\n * workflow already has, so it can never introduce one.\n */\n key?: string\n /** Stored as `enabled: false`. */\n disabled?: true\n /** Protected: apply refuses any change to this block. */\n locked?: true\n /** Exposes the error port without an `onError` edge. */\n errorPort?: boolean\n /** The block-level advanced toggle (`advancedMode`). */\n advancedMode?: boolean\n /**\n * Runs the block as its trigger (`triggerMode`). Trigger builders (`trigger.gmail.poller`) set\n * it themselves; write it on any other builder only for a block stored in trigger mode.\n */\n triggerMode?: boolean\n retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number }\n /**\n * Per branch key of a condition or router, the row's display `title` and any stored fields the\n * SDK has no syntax for (`extra`, plain JSON).\n */\n branches?: Record }>\n /**\n * Stored params that run but have no SDK syntax: a schema-agnostic custom block's inputs, the\n * agent's legacy prompt fields, a container's stored params. Values the block keeps but never\n * runs are not written; apply keeps them from the stored workflow.\n */\n extra?: Record\n /**\n * A loop or parallel's `block.data` subflow keys the loader could not read as config, kept\n * verbatim (plain JSON).\n */\n extraData?: Record\n}\n\n/** Anything an edge can point at. */\nexport type Target = Node | Group\n\n/** A block or container in the graph. */\nexport interface Node {\n readonly [NODE]: true\n /** Wires this node's default port to each target. Returns the target, or a group of them. */\n to(...targets: T): T extends [infer One] ? One : Group\n /** Wires this node's error port to each target. */\n onError(...targets: Target[]): void\n}\n\n/** Several nodes; `.to()` wires every member (fan-in). */\nexport interface Group {\n to(...targets: Target[]): Group\n}\n\n/** A block: a node whose outputs can be referenced. */\nexport type Block = Node & Ref\n\n/** The named ports of a condition or router. */\nexport type Branches = { readonly [P in K]: Node }\n\n/** Trigger builders (`trigger.start`, `trigger.gmail.poller`, ...), generated from the catalog. */\nexport declare namespace trigger {}\n\n/** Builders for hidden legacy block versions (`legacy.slack.send`), generated from the catalog. */\nexport declare namespace legacy {}\n\n/** A raw edge from a handle the SDK has no name for (a legacy or unknown port). */\nexport declare function edge(from: Node, handle: string, to: Target): void\n\n/** Any stored block type without a builder (legacy, unknown or custom), with untyped outputs. */\nexport declare function block(\n type: string,\n name: string,\n params: Record,\n meta?: BlockMeta\n): Block\n\n// Workflow and variables\n\nexport type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'plain'\n\nexport interface VariableDeclaration {\n type: VariableType\n value?: Json\n}\n\nexport type VariableDeclarations = Record\n\ndeclare const VAR: unique symbol\n\n/** A workflow variable, compiled to ``. */\nexport interface VarRef {\n readonly [VAR]: string\n}\n\ntype VariableValue = T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'string' | 'plain'\n ? string\n : Json\n\nexport type VarRefs = {\n readonly [K in keyof V]: VarRef & Ref>\n}\n\n/**\n * Workflow variables by name, untyped. Prefer the `vars` the `workflow()` body receives, which is\n * typed from the declared variables.\n */\nexport declare const vars: { readonly [name: string]: VarRef & Ref }\n\ndeclare const WORKFLOW_DEF: unique symbol\n\n/** The default export of a workflow file. */\nexport interface WorkflowDef {\n readonly [WORKFLOW_DEF]: true\n}\n\n/** A child workflow by key, for `runWorkflow` or as an agent tool. */\nexport interface WorkflowRef extends ResourceRef<'workflow', Key> {\n asTool(options?: ToolOpts): Tool\n}\n\n/** Declares a workflow. The body wires blocks; it never runs. */\nexport declare function workflow>(\n name: string,\n options: { description?: string; variables?: V },\n body: (scope: { vars: VarRefs }) => void\n): WorkflowDef\n/** A child workflow by key: `workflow('enrich-lead')`. */\nexport declare function workflow(key: K): WorkflowRef\n\n// Containers\n\ntype ItemOf = C extends { readonly [REF]: readonly (infer E)[] }\n ? E\n : C extends readonly (infer E)[]\n ? E\n : Json\n\n/** Inside a loop or parallel body. */\nexport interface SubflowScope {\n /** The container's start port, into its first child. */\n readonly start: Node\n /** Wires the start port to each target (same as `start.to`). */\n to(...targets: T): T extends [infer One] ? One : Group\n readonly index: Ref\n readonly currentItem: Ref\n readonly items: Ref\n}\n\n/**\n * A container's outputs, plus its iteration fields by name (`outer.index`), which is how a block\n * in a nested container reads an outer loop's index or item.\n */\nexport interface SubflowOutput {\n results: Json[]\n index: number\n currentItem: Json\n items: Json[]\n}\n\n/** A loop or parallel container. Its `.to()` wires the port taken after it finishes. */\nexport type Container = Block\n\ntype Collection = AnyRef | Template | Json[] | string\n\nexport declare const loop: {\n for(\n name: string,\n params: { count?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n forEach(\n name: string,\n params: { collection: C },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n while(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n doWhile(\n name: string,\n params: { condition?: Template | string; count?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n}\n\nexport declare const parallel: {\n /** A parallel with no stored type, which the loader runs as `count`. */\n (\n name: string,\n params: { count?: number; collection?: Collection; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n count(\n name: string,\n params: { count: number; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n collection(\n name: string,\n params: { collection: C; batchSize?: number },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n}\n\n// Blocks with a source form of their own\n\n/**\n * Params and outputs of the blocks below, generated from the catalog. Each entry is\n * `{ params; output }`; without generated types the params are loose.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface SpecialBuilderTypes {}\n\ntype SpecialParams = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { params: infer P }\n ? P\n : never\n : Record\n\ntype SpecialOutput = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { output: infer O }\n ? O\n : never\n : Json\n\n/** A condition expression, or `true` for the `else` branch. */\nexport type BranchExpression = Template | string | true\n\n/**\n * Keys of a condition written with no rows (`condition('Name', {})`, the source form of rows\n * that were never persisted): the implicit `if` and `else` ports stay addressable.\n */\ntype ConditionKeys = keyof B extends never ? 'if' | 'else' : Extract\ntype RouterKeys = keyof R extends never ? 'route0' : Extract\n\n/** A condition: named branches, the last one `else` when there are two or more. */\nexport declare function condition>(\n name: string,\n branches: B,\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A router: named routes described for the model. */\nexport declare function router>(\n name: string,\n params: SpecialParams<'router'> & { routes: R },\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A function block. `code` is inline (`` js`...` ``) or a file (`file('./functions/x.js')`). */\nexport declare function fn(\n name: string,\n params: SpecialParams<'fn'> & { code: Template | FileBody | string },\n meta?: BlockMeta\n): Block>\n\n/** Runs a child workflow. */\nexport declare function runWorkflow(\n name: string,\n params: SpecialParams<'runWorkflow'>,\n meta?: BlockMeta\n): Block>\n\n/** Pauses for a person; the form in `inputFormat` types `submission`. */\nexport declare function human>(\n name: string,\n params: SpecialParams<'human'> & { inputFormat?: F },\n meta?: BlockMeta\n): Block, 'submission'> & { submission: InputFieldsOutput }>\n\n/** Ends the workflow with an API response. */\nexport declare function response(\n name: string,\n params: SpecialParams<'response'>,\n meta?: BlockMeta\n): Block>\n\n/** Assigns workflow variables. */\nexport declare function setVariables(\n name: string,\n params: SpecialParams<'setVariables'>,\n meta?: BlockMeta\n): Block>\n\ndeclare const ANNOTATION: unique symbol\n\n/** A canvas note: no edges, no outputs. */\nexport interface Annotation {\n readonly [ANNOTATION]: true\n}\nexport declare function note(\n name: string,\n params: SpecialParams<'note'>,\n meta?: BlockMeta\n): Annotation\n\n// Structured param shapes\n\n/** Type names an input-format field may declare. */\nexport type InputFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'file[]'\n\n/** A structured input field: its type plus a default value, description or required flag. */\nexport interface InputFieldSpec {\n type: InputFieldType\n value?: JsonWithRefs\n description?: string\n required?: boolean\n}\n\n/** `input-format` fields by name: `{ subject: 'string', amount: { type: 'number', value: 0 } }`. */\nexport type InputFields = Record\n\ntype InputFieldValue = T extends 'string'\n ? string\n : T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'array'\n ? Json[]\n : T extends 'file[]'\n ? SimFile[]\n : Json\n\n/** The outputs an `input-format` declares. */\nexport type InputFieldsOutput = {\n [K in keyof F]: F[K] extends { type: infer T } ? InputFieldValue : InputFieldValue\n}\n\n/** `response-format` fields: `{ ok: true, id: { type: 'string', value: row.id } }`. */\nexport type ResponseFields = Record\n\n/** An agent message. */\nexport interface Message {\n role: 'system' | 'user' | 'assistant'\n content: Value\n}\n\n/** One `variables-input` assignment, with any other stored keys kept. */\nexport interface VariableAssignment {\n variableId: VarRef\n value?: JsonWithRefs\n [key: string]: JsonWithRefs | VarRef | undefined\n}\n\n/** Child workflow inputs by name (`input-mapping`, `workflow-input-mapper`). */\nexport type InputMapping = Record\n\n/** A table filter by column: `{ status: { $eq: 'new' } }`. */\nexport type Filter = Record\n\n/** A table sort by column: `{ createdAt: 'desc' }`. */\nexport type Sort =\n | Record\n | Array<{ column: string; direction: 'asc' | 'desc' }>\n\n/** One knowledge tag filter. */\nexport interface TagFilter {\n tagName: string\n tagValue: Value\n [key: string]: JsonWithRefs\n}\n\n/** One document tag. */\nexport interface DocumentTag {\n tagName: string\n value: Value\n [key: string]: JsonWithRefs\n}\n\n/** One `eval-input` metric. */\nexport interface EvalMetric {\n name: string\n description?: string\n range?: { min: number; max: number }\n [key: string]: JsonWithRefs | undefined\n}\n\n/** One `model-fallback-list` entry. */\nexport interface ModelFallback {\n model: LiteralUnion\n [key: string]: JsonWithRefs\n}\n\n/**\n * Model ids, generated into `models.d.ts` (which adds one member per model). Kept apart from the\n * block files so a model-list change touches one file.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface ModelIds {}\nexport type Model = Extract\n\n/** A JSON Schema `responseFormat`, or `{ name, strict, schema }` around one. */\nexport type ResponseFormat = JsonWithRefs\n\ntype Depth = [never, 0, 1, 2, 3, 4]\n\ntype FromSchema = [D] extends [never]\n ? Json\n : S extends { enum: readonly (infer E)[] }\n ? E\n : S extends { type: 'object'; properties: infer P }\n ? { [K in keyof P]: FromSchema }\n : S extends { type: 'array'; items: infer I }\n ? FromSchema[]\n : S extends { type: 'string' }\n ? string\n : S extends { type: 'number' | 'integer' }\n ? number\n : S extends { type: 'boolean' }\n ? boolean\n : Json\n\n/**\n * The outputs a literal `responseFormat` adds, read from its JSON Schema with recursion capped at\n * depth 4. A template or reference adds untyped JSON.\n */\nexport type ResponseFormatOutput = [RF] extends [undefined]\n ? unknown\n : RF extends { schema: infer S }\n ? FromSchema\n : RF extends { type: 'object'; properties: object }\n ? FromSchema\n : { [key: string]: Json }\n" +export const CORE_DTS = "/**\n * The authoring surface for Sim workflows written as TypeScript (s2 §2).\n *\n * Nothing declared here runs. `@sim/workflow-code` compiles a workflow file statically, and every\n * runtime export of this package throws `SimSdkNotExecutable`. These declarations exist so an\n * editor, `tsgo --noEmit` or an agent can check a workflow file before the compiler sees it.\n *\n * Block builders (`slack.sendMessage`, `agent`, `trigger.gmail.poller`, ...) are not declared here:\n * they are generated from the block catalog into `blocks/{type}.d.ts`, which augment this module.\n * The generic `block(type, name, params)` covers any stored type without a builder.\n *\n * Every workflow file starts with the SDK header line, before any import:\n *\n * ```ts\n * // @sim-sdk 1\n * import { agent, trigger, workflow } from '@sim/workflow-sdk'\n * ```\n *\n * The number is the SDK major version the file is written against. A file without the header is\n * refused with `E_SDK_HEADER`, and one written for a newer major than the server supports with\n * `E_SDK_MAJOR`.\n */\n\n/** Plain JSON. */\nexport type Json = null | boolean | number | string | Json[] | { [key: string]: Json }\n\ndeclare const REF: unique symbol\ndeclare const TEMPLATE: unique symbol\ndeclare const ENV: unique symbol\ndeclare const RESOURCE: unique symbol\ndeclare const TOOL: unique symbol\ndeclare const NODE: unique symbol\ndeclare const CODE_FILE: unique symbol\ndeclare const RAW: unique symbol\n\n/** Any reference, whatever it points at. */\nexport interface AnyRef {\n readonly [REF]: unknown\n}\n\ntype RefPaths = [Json] extends [T]\n ? { readonly [key: string]: Ref }\n : T extends readonly (infer E)[]\n ? { readonly [index: number]: Ref; readonly length: Ref }\n : T extends object\n ? { readonly [K in keyof T]-?: Ref }\n : unknown\n\n/**\n * A typed reference to a block output, compiled to `` (build-spec decision 8).\n * Paths map exactly: `.seg`, `['seg']` and `[n]`. Untyped JSON allows any path.\n */\nexport type Ref = { readonly [REF]: T } & RefPaths\n\n/** Text with references in it, written with one of the tags below. */\nexport type Template = string & { readonly [TEMPLATE]: true }\n\n/** A workspace environment variable, compiled to `{{NAME}}`. */\nexport interface EnvRef {\n readonly [ENV]: string\n}\n\n/** A param value: a literal, a reference, a template or an environment variable. */\nexport type Value = T | AnyRef | Template | EnvRef\n\n/** JSON whose leaves may be references, templates or environment variables. */\nexport type JsonWithRefs =\n | null\n | boolean\n | number\n | string\n | AnyRef\n | Template\n | EnvRef\n | JsonWithRefs[]\n | { [key: string]: JsonWithRefs }\n\n/** A literal union that still accepts any other string (option ids read from values). */\nexport type LiteralUnion = T | (string & {})\n\n/** A `time-input` value, `HH:MM`. */\nexport type TimeString = `${number}:${number}`\n\ntype Interpolation = AnyRef | EnvRef | VarRef | string | number | boolean\n\n/** Text with interpolated references: `` t`New ${cls.category} ticket` ``. */\nexport declare function t(strings: TemplateStringsArray, ...values: Interpolation[]): Template\n/** JavaScript code (condition expressions, inline function code). */\nexport declare const js: typeof t\n/** Python code. */\nexport declare const py: typeof t\n/** Shell code. */\nexport declare const sh: typeof t\n/** JSON text kept verbatim, for bodies an object literal cannot reproduce byte for byte. */\nexport declare const json: typeof t\n/** Markdown text (note content). */\nexport declare const md: typeof t\n\n/** A reference with a non-canonical spelling, such as `ref('Classify.content')`. */\nexport declare function ref(path: string): Ref\n\n/** A stored value outside the generated type (a legacy option id, say), kept verbatim. */\nexport declare function raw(value: unknown): T & { readonly [RAW]: true }\n\n/** A required value that is still missing; compiles to absent, so canvas drafts type-check. */\nexport declare function todo(): never\n\n/** Function code kept in a file next to the workflow (`.js`, `.py` or `.sh`), stored verbatim. */\nexport interface CodeFileRef {\n readonly [CODE_FILE]: string\n}\nexport declare function codeFile(path: `./${string}`): CodeFileRef\n\n/**\n * Environment variable names known to the workspace. `workspace.d.ts` adds one member per name;\n * until it exists `env` accepts any name.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceEnv {}\n\nexport declare const env: keyof WorkspaceEnv extends never\n ? { readonly [name: string]: EnvRef }\n : { readonly [K in keyof WorkspaceEnv]: EnvRef }\n\n/**\n * Workspace resources by stable key, filled in by the generated `workspace.d.ts`. Each map's\n * values describe the resource: a table's row type, a credential's provider, a workflow's inputs.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceTables {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceKnowledgeBases {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceCredentials {}\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface WorkspaceWorkflows {}\n\ntype KeyOf = keyof M extends never ? string : Extract\n\nexport type TableKey = KeyOf\nexport type KnowledgeBaseKey = KeyOf\nexport type CredentialKey = KeyOf\nexport type WorkflowKey = KeyOf\n\n/** A workspace resource by stable key, compiled to the resource's internal id. */\nexport interface ResourceRef {\n readonly [RESOURCE]: Kind\n readonly key: Key\n}\n\n/** A saved credential: `credential('support-slack')`. */\nexport type CredentialRef = ResourceRef<'credential', Key>\nexport declare function credential(key: K): CredentialRef\n\n/** The columns of a workspace table, or loose JSON when `workspace.d.ts` does not know it. */\nexport type TableColumns = K extends keyof WorkspaceTables\n ? WorkspaceTables[K]\n : { [column: string]: Json }\n/** One stored row: its columns plus the row id. */\nexport type TableRow = TableColumns & { id: string }\n/** Column values written to a row. */\nexport type TableData = K extends keyof WorkspaceTables\n ? { [C in keyof WorkspaceTables[K]]?: Value | JsonWithRefs }\n : { [column: string]: JsonWithRefs }\n\n/** A workspace table: `table('leads')`. Table block operations live on `table.*`. */\nexport type TableRef = ResourceRef<'table', Key>\nexport declare function table(key: K): TableRef\n\n/** A knowledge base: `knowledgeBase('docs')`. */\nexport type KnowledgeBaseRef = ResourceRef<'knowledge-base', Key>\nexport declare function knowledgeBase(key: K): KnowledgeBaseRef\n\n/** A workspace skill: `skill('triage')`. */\nexport type SkillRef = ResourceRef<'skill'>\nexport declare function skill(key: string): SkillRef\n\n/** A sandbox image: `sandbox('node-ml')`. */\nexport type SandboxRef = ResourceRef<'sandbox'>\nexport declare function sandbox(key: string): SandboxRef\n\n/** A workspace folder: `folder('reports')`. */\nexport type FolderRef = ResourceRef<'file-folder'>\nexport declare function folder(key: string): FolderRef\n\n/** A workspace file: `file('contracts/acme.pdf')`. File block operations live on `file.*`. */\nexport type FileRef = ResourceRef<'file'>\nexport declare function file(path: string): FileRef\n\n/** A file produced at run time (`file` / `file[]` outputs). */\nexport interface SimFile {\n id: string\n name: string\n url: string\n size: number\n type: string\n key: string\n}\n\n// Agent tools\n\n/** One entry of an agent's `tools` list. */\nexport interface Tool {\n readonly [TOOL]: true\n}\n\n/** How the model may use a tool, and the stored tool fields a print carries. */\nexport interface ToolOpts {\n usageControl?: 'auto' | 'force' | 'none'\n usageControlExpression?: string\n title?: string\n /** The stored operation, when the method does not pin it. */\n operation?: string\n toolId?: string\n /** Pair modes of the tool's params, which pick the member the agent reads. */\n modes?: Record\n customTool?: JsonWithRefs\n operationPolicy?: Json\n /** Unknown stored tool keys, kept verbatim. */\n extra?: Json\n}\n\n/** A custom tool by key: `customTool('lookup-order')`. */\nexport declare function customTool(key: string, options?: ToolOpts): Tool\nexport declare namespace customTool {\n /** A custom tool snapshot that has drifted from the workspace tool. */\n function inline(definition: { schema: Json; code: string | Template; title?: string }): Tool\n}\n\n/** An MCP server by key; `mcp('linear').tool('create_issue')`. */\nexport interface McpServerRef extends ResourceRef<'mcp-server'> {\n tool(name: string, options?: ToolOpts & { args?: Record }): Tool\n}\nexport declare function mcp(key: string): McpServerRef\n\n// Graph\n\n/** Block-level fields (`BlockState`), written as the third builder argument. */\nexport interface BlockMeta {\n /**\n * A legacy key the display name cannot carry (a `name~n` collision key or a reserved name such\n * as `Loop`). Printed only for such a stored block; apply accepts it only for a key the stored\n * workflow already has, so it can never introduce one.\n */\n key?: string\n /** Stored as `enabled: false`. */\n disabled?: true\n /** Locked: apply refuses any change to this block. */\n locked?: true\n /** Exposes the error port without an `onError` edge. */\n errorPort?: boolean\n /** The block-level advanced toggle (`advancedMode`). */\n advancedMode?: boolean\n /**\n * Runs the block as its trigger (`triggerMode`). Trigger builders (`trigger.gmail.poller`) set\n * it themselves; write it on any other builder only for a block stored in trigger mode.\n */\n triggerMode?: boolean\n /** The stored retry policy, written whole. */\n retry?: BlockRetryConfig\n /**\n * Per branch key of a condition or router, the row's display `title` and any stored fields the\n * SDK has no syntax for (`extra`, plain JSON).\n */\n branches?: Record }>\n /**\n * Stored params that run but have no SDK syntax: a schema-agnostic custom block's inputs, the\n * agent's legacy prompt fields, a container's stored params. Values the block keeps but never\n * runs are not written; apply keeps them from the stored workflow.\n */\n extra?: Record\n /**\n * A loop or parallel's `block.data` subflow keys the loader could not read as config, kept\n * verbatim (plain JSON).\n */\n subflowData?: Record\n}\n\n/** A block's retry policy, field for field the stored `BlockRetryConfig`. */\nexport interface BlockRetryConfig {\n /** Absent config and `false` mean the same thing: the block runs once. */\n enabled: boolean\n /** Total tries including the first. */\n maxTries: number\n /** Delay between tries. */\n waitBetweenTriesMs: number\n}\n\n/** Anything an edge can point at. */\nexport type Target = Node | Group\n\n/** A block or container in the graph. */\nexport interface Node {\n readonly [NODE]: true\n /** Wires this node's default port to each target. Returns the target, or a group of them. */\n to(...targets: T): T extends [infer One] ? One : Group\n /** Wires this node's error port to each target. */\n onError(...targets: Target[]): void\n}\n\n/** Several nodes; `.to()` wires every member (fan-in). */\nexport interface Group {\n to(...targets: Target[]): Group\n}\n\n/** A block: a node whose outputs can be referenced. */\nexport type Block = Node & Ref\n\n/** The named ports of a condition or router. */\nexport type Branches = { readonly [P in K]: Node }\n\n/** Trigger builders (`trigger.start`, `trigger.gmail.poller`, ...), generated from the catalog. */\nexport declare namespace trigger {}\n\n/** Builders for hidden legacy block versions (`legacy.slack.send`), generated from the catalog. */\nexport declare namespace legacy {}\n\n/** A raw edge from a handle the SDK has no name for (a legacy or unknown port). */\nexport declare function edge(from: Node, handle: string, to: Target): void\n\n/** Any stored block type without a builder (legacy, unknown or custom), with untyped outputs. */\nexport declare function block(\n type: string,\n name: string,\n params: Record,\n meta?: BlockMeta\n): Block\n\n// Workflow and variables\n\nexport type VariableType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'plain'\n\nexport interface VariableDeclaration {\n type: VariableType\n value?: Json\n}\n\nexport type VariableDeclarations = Record\n\ndeclare const VAR: unique symbol\n\n/** A workflow variable, compiled to ``. */\nexport interface VarRef {\n readonly [VAR]: string\n}\n\ntype VariableValue = T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'string' | 'plain'\n ? string\n : Json\n\nexport type VarRefs = {\n readonly [K in keyof V]: VarRef & Ref>\n}\n\n/**\n * Workflow variables by name, untyped. Prefer the `vars` the `workflow()` body receives, which is\n * typed from the declared variables.\n */\nexport declare const vars: { readonly [name: string]: VarRef & Ref }\n\ndeclare const WORKFLOW_DEF: unique symbol\n\n/** The default export of a workflow file. */\nexport interface WorkflowDef {\n readonly [WORKFLOW_DEF]: true\n}\n\n/** A child workflow by key, for `runWorkflow` or as an agent tool. */\nexport interface WorkflowRef extends ResourceRef<'workflow', Key> {\n asTool(options?: ToolOpts): Tool\n}\n\n/** Declares a workflow. The body wires blocks; it never runs. */\nexport declare function workflow>(\n name: string,\n options: { description?: string; variables?: V },\n body: (scope: { vars: VarRefs }) => void\n): WorkflowDef\n/** A child workflow by key: `childWorkflow('enrich-lead')`. */\nexport declare function childWorkflow(key: K): WorkflowRef\n\n// Containers\n\ntype ItemOf = C extends { readonly [REF]: readonly (infer E)[] }\n ? E\n : C extends readonly (infer E)[]\n ? E\n : Json\n\n/** Inside a loop or parallel body. As a node it is the container's start port: `p.to(first)`. */\nexport interface SubflowScope extends Node {\n readonly index: Ref\n readonly currentItem: Ref\n readonly items: Ref\n}\n\n/**\n * A container's outputs, plus its iteration fields by name (`outer.index`), which is how a block\n * in a nested container reads an outer loop's index or item.\n */\nexport interface SubflowOutput {\n results: Json[]\n index: number\n currentItem: Json\n items: Json[]\n}\n\n/** A loop or parallel container. Its `.to()` wires the port taken after it finishes. */\nexport type Container = Block\n\ntype Collection = AnyRef | Template | Json[] | string\n\nexport declare const loop: {\n for(\n name: string,\n params: { count?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n forEach(\n name: string,\n params: { collection: C },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n while(\n name: string,\n params: { condition: Template | string },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n doWhile(\n name: string,\n params: { condition?: Template | string; count?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n}\n\nexport declare const parallel: {\n /** A parallel with no stored type, which the loader runs as `count`. */\n (\n name: string,\n params: { count?: number; collection?: Collection; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n count(\n name: string,\n params: { count: number; batchSize?: number },\n body: (scope: SubflowScope) => void,\n meta?: BlockMeta\n ): Container\n collection(\n name: string,\n params: { collection: C; batchSize?: number },\n body: (scope: SubflowScope>) => void,\n meta?: BlockMeta\n ): Container\n}\n\n// Blocks with a source form of their own\n\n/**\n * Params and outputs of the blocks below, generated from the catalog. Each entry is\n * `{ params; output }`; without generated types the params are loose.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface SpecialBuilderTypes {}\n\ntype SpecialParams = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { params: infer P }\n ? P\n : never\n : Record\n\ntype SpecialOutput = K extends keyof SpecialBuilderTypes\n ? SpecialBuilderTypes[K] extends { output: infer O }\n ? O\n : never\n : Json\n\n/** A condition expression, or `true` for the `else` branch. */\nexport type BranchExpression = Template | string | true\n\n/**\n * Keys of a condition written with no rows (`condition('Name', {})`, the source form of rows\n * that were never persisted): the implicit `if` and `else` ports stay addressable.\n */\ntype ConditionKeys = keyof B extends never ? 'if' | 'else' : Extract\ntype RouterKeys = keyof R extends never ? 'route0' : Extract\n\n/** A condition: named branches, the last one `else` when there are two or more. */\nexport declare function condition>(\n name: string,\n branches: B,\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A router: named routes described for the model. */\nexport declare function router>(\n name: string,\n params: SpecialParams<'router'> & { routes: R },\n meta?: BlockMeta\n): Block> & Branches>\n\n/** A function block. `code` is inline (`` js`...` ``) or a code file (`codeFile('./functions/x.js')`). */\nexport declare function fn(\n name: string,\n params: SpecialParams<'fn'> & { code: Template | CodeFileRef | string },\n meta?: BlockMeta\n): Block>\n\n/** Runs a child workflow. */\nexport declare function runWorkflow(\n name: string,\n params: SpecialParams<'runWorkflow'>,\n meta?: BlockMeta\n): Block>\n\n/** Pauses for a person; the form in `inputFormat` types `submission`. */\nexport declare function human>(\n name: string,\n params: SpecialParams<'human'> & { inputFormat?: F },\n meta?: BlockMeta\n): Block, 'submission'> & { submission: InputFieldsOutput }>\n\n/** Ends the workflow with an API response. */\nexport declare function response(\n name: string,\n params: SpecialParams<'response'>,\n meta?: BlockMeta\n): Block>\n\n/** Assigns workflow variables. */\nexport declare function setVariables(\n name: string,\n params: SpecialParams<'setVariables'>,\n meta?: BlockMeta\n): Block>\n\ndeclare const ANNOTATION: unique symbol\n\n/** A canvas note: no edges, no outputs. */\nexport interface Annotation {\n readonly [ANNOTATION]: true\n}\nexport declare function note(\n name: string,\n params: SpecialParams<'note'>,\n meta?: BlockMeta\n): Annotation\n\n// Structured param shapes\n\n/** Type names an input-format field may declare. */\nexport type InputFieldType = 'string' | 'number' | 'boolean' | 'object' | 'array' | 'file[]'\n\n/** A structured input field: its type plus a default value, description or required flag. */\nexport interface InputFieldSpec {\n type: InputFieldType\n value?: JsonWithRefs\n description?: string\n required?: boolean\n}\n\n/** `input-format` fields by name: `{ subject: 'string', amount: { type: 'number', value: 0 } }`. */\nexport type InputFields = Record\n\ntype InputFieldValue = T extends 'string'\n ? string\n : T extends 'number'\n ? number\n : T extends 'boolean'\n ? boolean\n : T extends 'array'\n ? Json[]\n : T extends 'file[]'\n ? SimFile[]\n : Json\n\n/** The outputs an `input-format` declares. */\nexport type InputFieldsOutput = {\n [K in keyof F]: F[K] extends { type: infer T } ? InputFieldValue : InputFieldValue\n}\n\n/** `response-format` fields: `{ ok: true, id: { type: 'string', value: row.id } }`. */\nexport type ResponseFields = Record\n\n/** An agent message. */\nexport interface Message {\n role: 'system' | 'user' | 'assistant'\n content: Value\n}\n\n/** One `variables-input` assignment, with any other stored keys kept. */\nexport interface VariableAssignment {\n variableId: VarRef\n value?: JsonWithRefs\n [key: string]: JsonWithRefs | VarRef | undefined\n}\n\n/** Child workflow inputs by name (`input-mapping`, `workflow-input-mapper`). */\nexport type InputMapping = Record\n\n/** A table filter by column: `{ status: { $eq: 'new' } }`. */\nexport type Filter = Record\n\n/** A table sort by column: `{ createdAt: 'desc' }`. */\nexport type Sort =\n | Record\n | Array<{ column: string; direction: 'asc' | 'desc' }>\n\n/** One knowledge tag filter. */\nexport interface TagFilter {\n tagName: string\n tagValue: Value\n [key: string]: JsonWithRefs\n}\n\n/** One document tag. */\nexport interface DocumentTag {\n tagName: string\n value: Value\n [key: string]: JsonWithRefs\n}\n\n/** One `eval-input` metric. */\nexport interface EvalMetric {\n name: string\n description?: string\n range?: { min: number; max: number }\n [key: string]: JsonWithRefs | undefined\n}\n\n/** One `model-fallback-list` entry. */\nexport interface ModelFallback {\n model: LiteralUnion\n [key: string]: JsonWithRefs\n}\n\n/**\n * Model ids, generated into `models.d.ts` (which adds one member per model). Kept apart from the\n * block files so a model-list change touches one file.\n */\n// biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment\nexport interface ModelIds {}\nexport type Model = Extract\n\n/** A JSON Schema `responseFormat`, or `{ name, strict, schema }` around one. */\nexport type ResponseFormat = JsonWithRefs\n\ntype Depth = [never, 0, 1, 2, 3, 4]\n\ntype FromSchema = [D] extends [never]\n ? Json\n : S extends { enum: readonly (infer E)[] }\n ? E\n : S extends { type: 'object'; properties: infer P }\n ? { [K in keyof P]: FromSchema }\n : S extends { type: 'array'; items: infer I }\n ? FromSchema[]\n : S extends { type: 'string' }\n ? string\n : S extends { type: 'number' | 'integer' }\n ? number\n : S extends { type: 'boolean' }\n ? boolean\n : Json\n\n/**\n * The outputs a literal `responseFormat` adds, read from its JSON Schema with recursion capped at\n * depth 4. A template or reference adds untyped JSON.\n */\nexport type ResponseFormatOutput = [RF] extends [undefined]\n ? unknown\n : RF extends { schema: infer S }\n ? FromSchema\n : RF extends { type: 'object'; properties: object }\n ? FromSchema\n : { [key: string]: Json }\n" diff --git a/packages/workflow-sdk/src/codegen/generate.test.ts b/packages/workflow-sdk/src/codegen/generate.test.ts index c878dcdd7ee..a0f5e4dfbff 100644 --- a/packages/workflow-sdk/src/codegen/generate.test.ts +++ b/packages/workflow-sdk/src/codegen/generate.test.ts @@ -77,7 +77,7 @@ describe('generateWorkspaceTypes', () => { const reversed = { ...FIXTURE_WORKSPACE, tables: reversedKeys(FIXTURE_WORKSPACE.tables ?? {}), - bindings: reversedKeys(FIXTURE_WORKSPACE.bindings ?? {}), + credentials: reversedKeys(FIXTURE_WORKSPACE.credentials ?? {}), env: [...(FIXTURE_WORKSPACE.env ?? [])].reverse(), } expect(generateWorkspaceTypes(reversed)).toEqual(generateWorkspaceTypes(FIXTURE_WORKSPACE)) diff --git a/packages/workflow-sdk/src/codegen/generate.ts b/packages/workflow-sdk/src/codegen/generate.ts index 7bd35eab91a..41833e313a1 100644 --- a/packages/workflow-sdk/src/codegen/generate.ts +++ b/packages/workflow-sdk/src/codegen/generate.ts @@ -40,12 +40,13 @@ export type GenerateSdkTypesFn = (catalog: BlockCatalog) => SdkTypeFile[] /** Names `core.d.ts` exports that generated files may reference; imported only when used. */ const CORE_TYPE_NAMES = [ 'AnyRef', - 'Binding', 'Block', 'BlockMeta', 'BranchExpression', + 'CredentialRef', 'DocumentTag', 'EvalMetric', + 'FileRef', 'Filter', 'FolderRef', 'InputFields', @@ -72,7 +73,6 @@ const CORE_TYPE_NAMES = [ 'TimeString', 'Tool', 'ToolOpts', - 'Upload', 'Value', 'VariableAssignment', 'WorkflowRef', diff --git a/packages/workflow-sdk/src/codegen/map-subblock.ts b/packages/workflow-sdk/src/codegen/map-subblock.ts index a6315aeca06..b793d792833 100644 --- a/packages/workflow-sdk/src/codegen/map-subblock.ts +++ b/packages/workflow-sdk/src/codegen/map-subblock.ts @@ -2,7 +2,7 @@ * SubBlock type → TS param type (s2 §2 "Mapping each subBlock type"). Every one of the 48 * `SubBlockType`s has an arm; the `never` check makes a new type a compile error here. * - * Types reference names exported by `core.d.ts` (`Value`, `Binding`, `TableRef`, ...). A basic/advanced + * Types reference names exported by `core.d.ts` (`Value`, `CredentialRef`, `TableRef`, ...). A basic/advanced * pair is the union of its members' types, so the mode follows from the kind of value written * (build-spec decision 7): a selector-kind constructor is basic, a plain value or reference is * advanced. @@ -107,7 +107,7 @@ export function mapSubBlock(subBlock: CatalogSubBlock): MappedType | null { } case 'oauth-input': return { - type: 'Binding', + type: 'CredentialRef', doc: [...doc, ...(subBlock.serviceId ? [`Service: \`${subBlock.serviceId}\`.`] : [])], } case 'channel-selector': @@ -131,7 +131,7 @@ export function mapSubBlock(subBlock: CatalogSubBlock): MappedType | null { case 'workflow-selector': return { type: 'WorkflowRef', doc } case 'file-upload': - return { type: subBlock.multiple ? 'Upload | Upload[]' : 'Upload', doc } + return { type: subBlock.multiple ? 'FileRef | FileRef[]' : 'FileRef', doc } case 'tool-input': return { type: 'Tool[]', doc } case 'skill-input': diff --git a/packages/workflow-sdk/src/codegen/names.ts b/packages/workflow-sdk/src/codegen/names.ts index 6189782309a..073b28ef89f 100644 --- a/packages/workflow-sdk/src/codegen/names.ts +++ b/packages/workflow-sdk/src/codegen/names.ts @@ -32,21 +32,22 @@ export const SPECIAL_BUILDER_KEYS: readonly string[] = Object.keys(SPECIAL_BUILD /** * Core exports a generated namespace may merge with: functions (`table.insertRow` beside - * `table('leads')`) and the empty `trigger` / `legacy` namespaces. Consts (`env`, `loop`, `js`, + * `table('leads')`, `file.read` beside `file('a.pdf')`) and the empty `trigger` / `legacy` namespaces. Consts (`env`, `loop`, `js`, * ...) cannot merge. */ const MERGEABLE_CORE_EXPORTS: ReadonlySet = new Set([ - 'binding', + 'childWorkflow', + 'credential', 'customTool', + 'file', 'folder', - 'kb', + 'knowledgeBase', 'legacy', 'mcp', 'sandbox', 'skill', 'table', 'trigger', - 'upload', 'workflow', ]) diff --git a/packages/workflow-sdk/src/codegen/workspace.ts b/packages/workflow-sdk/src/codegen/workspace.ts index 00081ab7754..49681ff1cc0 100644 --- a/packages/workflow-sdk/src/codegen/workspace.ts +++ b/packages/workflow-sdk/src/codegen/workspace.ts @@ -1,7 +1,7 @@ /** * `generateWorkspaceTypes(manifest)`: one `workspace.d.ts` that narrows the SDK to a workspace's * resources (s2 D6). It fills the `Workspace*` interfaces `core.d.ts` declares, so `table('leads')` - * types its rows, a misspelled `kb('dosc')` or `env.STRIPE_KYE` is an error, and so on. Written by + * types its rows, a misspelled `knowledgeBase('dosc')` or `env.STRIPE_KYE` is an error, and so on. Written by * `sim workflows source get --out` from the workspace resource manifest; without it every key is a * plain string. */ @@ -22,8 +22,8 @@ export interface WorkspaceManifestColumn { export interface WorkspaceManifest { tables?: Record }> knowledgeBases?: string[] - /** Credential bindings, with the provider service each one is for. */ - bindings?: Record + /** Saved credentials, with the provider each one is for. */ + credentials?: Record /** Workflows by key, with the inputs their start block declares. */ workflows?: Record }> /** Environment variable names (never values). */ @@ -88,8 +88,8 @@ export const generateWorkspaceTypes: GenerateWorkspaceTypesFn = (manifest) => { const knowledgeBases = [...new Set(manifest.knowledgeBases ?? [])] .sort(compareStrings) .map((key) => `${quote(key)}: true`) - const bindings = sortedKeys(manifest.bindings).map( - (key) => `${quote(key)}: { service: ${quote(manifest.bindings?.[key]?.service ?? '')} }` + const credentials = sortedKeys(manifest.credentials).map( + (key) => `${quote(key)}: { provider: ${quote(manifest.credentials?.[key]?.provider ?? '')} }` ) const workflows = sortedKeys(manifest.workflows).map((key) => { const inputs = manifest.workflows?.[key]?.inputs ?? {} @@ -104,7 +104,7 @@ export const generateWorkspaceTypes: GenerateWorkspaceTypesFn = (manifest) => { const body = [ ...interfaceBlock('WorkspaceTables', tables), ...interfaceBlock('WorkspaceKnowledgeBases', knowledgeBases), - ...interfaceBlock('WorkspaceBindings', bindings), + ...interfaceBlock('WorkspaceCredentials', credentials), ...interfaceBlock('WorkspaceWorkflows', workflows), ...interfaceBlock('WorkspaceEnv', env), ] diff --git a/packages/workflow-sdk/src/core.d.ts b/packages/workflow-sdk/src/core.d.ts index c20ec135aed..855683cfdfe 100644 --- a/packages/workflow-sdk/src/core.d.ts +++ b/packages/workflow-sdk/src/core.d.ts @@ -30,7 +30,7 @@ declare const ENV: unique symbol declare const RESOURCE: unique symbol declare const TOOL: unique symbol declare const NODE: unique symbol -declare const FILE_BODY: unique symbol +declare const CODE_FILE: unique symbol declare const RAW: unique symbol /** Any reference, whatever it points at. */ @@ -106,10 +106,10 @@ export declare function raw(value: unknown): T & { readonly [RAW]: tr export declare function todo(): never /** Function code kept in a file next to the workflow (`.js`, `.py` or `.sh`), stored verbatim. */ -export interface FileBody { - readonly [FILE_BODY]: string +export interface CodeFileRef { + readonly [CODE_FILE]: string } -export declare function file(path: `./${string}`): FileBody +export declare function codeFile(path: `./${string}`): CodeFileRef /** * Environment variable names known to the workspace. `workspace.d.ts` adds one member per name; @@ -124,14 +124,14 @@ export declare const env: keyof WorkspaceEnv extends never /** * Workspace resources by stable key, filled in by the generated `workspace.d.ts`. Each map's - * values describe the resource: a table's row type, a binding's service, a workflow's inputs. + * values describe the resource: a table's row type, a credential's provider, a workflow's inputs. */ // biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment export interface WorkspaceTables {} // biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment export interface WorkspaceKnowledgeBases {} // biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment -export interface WorkspaceBindings {} +export interface WorkspaceCredentials {} // biome-ignore lint/suspicious/noEmptyInterface: an empty interface is the merge target generated declarations augment export interface WorkspaceWorkflows {} @@ -139,7 +139,7 @@ type KeyOf = keyof M extends never ? string : Extract export type TableKey = KeyOf export type KnowledgeBaseKey = KeyOf -export type BindingKey = KeyOf +export type CredentialKey = KeyOf export type WorkflowKey = KeyOf /** A workspace resource by stable key, compiled to the resource's internal id. */ @@ -148,9 +148,9 @@ export interface ResourceRef { readonly key: Key } -/** A credential binding: `binding('support-slack')`. */ -export type Binding = ResourceRef<'credential', Key> -export declare function binding(key: K): Binding +/** A saved credential: `credential('support-slack')`. */ +export type CredentialRef = ResourceRef<'credential', Key> +export declare function credential(key: K): CredentialRef /** The columns of a workspace table, or loose JSON when `workspace.d.ts` does not know it. */ export type TableColumns = K extends keyof WorkspaceTables @@ -167,9 +167,9 @@ export type TableData = K extends keyof WorkspaceTables export type TableRef = ResourceRef<'table', Key> export declare function table(key: K): TableRef -/** A knowledge base: `kb('docs')`. */ +/** A knowledge base: `knowledgeBase('docs')`. */ export type KnowledgeBaseRef = ResourceRef<'knowledge-base', Key> -export declare function kb(key: K): KnowledgeBaseRef +export declare function knowledgeBase(key: K): KnowledgeBaseRef /** A workspace skill: `skill('triage')`. */ export type SkillRef = ResourceRef<'skill'> @@ -183,9 +183,9 @@ export declare function sandbox(key: string): SandboxRef export type FolderRef = ResourceRef<'file-folder'> export declare function folder(key: string): FolderRef -/** A workspace file upload: `upload('contracts/acme.pdf')`. */ -export type Upload = ResourceRef<'file'> -export declare function upload(path: string): Upload +/** A workspace file: `file('contracts/acme.pdf')`. File block operations live on `file.*`. */ +export type FileRef = ResourceRef<'file'> +export declare function file(path: string): FileRef /** A file produced at run time (`file` / `file[]` outputs). */ export interface SimFile { @@ -245,7 +245,7 @@ export interface BlockMeta { key?: string /** Stored as `enabled: false`. */ disabled?: true - /** Protected: apply refuses any change to this block. */ + /** Locked: apply refuses any change to this block. */ locked?: true /** Exposes the error port without an `onError` edge. */ errorPort?: boolean @@ -256,7 +256,8 @@ export interface BlockMeta { * it themselves; write it on any other builder only for a block stored in trigger mode. */ triggerMode?: boolean - retry?: { enabled: boolean; maxTries: number; waitBetweenTriesMs: number } + /** The stored retry policy, written whole. */ + retry?: BlockRetryConfig /** * Per branch key of a condition or router, the row's display `title` and any stored fields the * SDK has no syntax for (`extra`, plain JSON). @@ -272,7 +273,17 @@ export interface BlockMeta { * A loop or parallel's `block.data` subflow keys the loader could not read as config, kept * verbatim (plain JSON). */ - extraData?: Record + subflowData?: Record +} + +/** A block's retry policy, field for field the stored `BlockRetryConfig`. */ +export interface BlockRetryConfig { + /** Absent config and `false` mean the same thing: the block runs once. */ + enabled: boolean + /** Total tries including the first. */ + maxTries: number + /** Delay between tries. */ + waitBetweenTriesMs: number } /** Anything an edge can point at. */ @@ -369,8 +380,8 @@ export declare function workflow }) => void ): WorkflowDef -/** A child workflow by key: `workflow('enrich-lead')`. */ -export declare function workflow(key: K): WorkflowRef +/** A child workflow by key: `childWorkflow('enrich-lead')`. */ +export declare function childWorkflow(key: K): WorkflowRef // Containers @@ -380,12 +391,8 @@ type ItemOf = C extends { readonly [REF]: readonly (infer E)[] } ? E : Json -/** Inside a loop or parallel body. */ -export interface SubflowScope { - /** The container's start port, into its first child. */ - readonly start: Node - /** Wires the start port to each target (same as `start.to`). */ - to(...targets: T): T extends [infer One] ? One : Group +/** Inside a loop or parallel body. As a node it is the container's start port: `p.to(first)`. */ +export interface SubflowScope extends Node { readonly index: Ref readonly currentItem: Ref readonly items: Ref @@ -501,10 +508,10 @@ export declare function router meta?: BlockMeta ): Block> & Branches> -/** A function block. `code` is inline (`` js`...` ``) or a file (`file('./functions/x.js')`). */ +/** A function block. `code` is inline (`` js`...` ``) or a code file (`codeFile('./functions/x.js')`). */ export declare function fn( name: string, - params: SpecialParams<'fn'> & { code: Template | FileBody | string }, + params: SpecialParams<'fn'> & { code: Template | CodeFileRef | string }, meta?: BlockMeta ): Block> diff --git a/packages/workflow-sdk/src/runtime.test.ts b/packages/workflow-sdk/src/runtime.test.ts index fe7d6fd17d7..bc7cf59833a 100644 --- a/packages/workflow-sdk/src/runtime.test.ts +++ b/packages/workflow-sdk/src/runtime.test.ts @@ -1,7 +1,9 @@ import { readFileSync } from 'node:fs' import path from 'node:path' import { SDK_CORE_EXPORTS } from '@sim/workflow-code/sdk' -import { describe, expect, it } from 'vitest' +import type { BlockRetryConfig as StoredBlockRetryConfig } from '@sim/workflow-types/workflow' +import { describe, expect, expectTypeOf, it } from 'vitest' +import type { BlockRetryConfig } from './core' import * as runtimeModule from './runtime' import { SimSdkNotExecutable } from './runtime' @@ -31,4 +33,8 @@ describe('the SDK value surface', () => { expect(() => Reflect.get(value, 'anything')).toThrow(SimSdkNotExecutable) } }) + + it('BlockMeta.retry declares exactly the stored retry fields', () => { + expectTypeOf().toEqualTypeOf() + }) }) diff --git a/packages/workflow-sdk/src/runtime.ts b/packages/workflow-sdk/src/runtime.ts index 5e081f8d4ac..6dbc93e0386 100644 --- a/packages/workflow-sdk/src/runtime.ts +++ b/packages/workflow-sdk/src/runtime.ts @@ -10,7 +10,7 @@ export class SimSdkNotExecutable extends Error { constructor(exportName: string) { super( - `@sim/workflow-sdk: \`${exportName}\` does not run. Workflow files are compiled by Sim, never executed; check them with \`sim workflows source plan\` or a type-check.` + `@sim/workflow-sdk: \`${exportName}\` does not run. Workflow files are compiled by Sim, never executed; check them with \`sim workflows source apply --dry-run\` or a type-check.` ) this.name = 'SimSdkNotExecutable' this.export = exportName @@ -40,20 +40,21 @@ export const md = stub('md') export const ref = stub('ref') export const raw = stub('raw') export const todo = stub('todo') -export const file = stub('file') +export const codeFile = stub('codeFile') export const env = stub('env') -export const binding = stub('binding') +export const credential = stub('credential') export const table = stub('table') -export const kb = stub('kb') +export const knowledgeBase = stub('knowledgeBase') export const skill = stub('skill') export const sandbox = stub('sandbox') export const folder = stub('folder') -export const upload = stub('upload') +export const file = stub('file') export const customTool = stub('customTool') export const mcp = stub('mcp') export const edge = stub('edge') export const block = stub('block') export const workflow = stub('workflow') +export const childWorkflow = stub('childWorkflow') export const loop = stub('loop') export const parallel = stub('parallel') export const condition = stub('condition') diff --git a/packages/workflow-sdk/test/examples/approval-flow.ts b/packages/workflow-sdk/test/examples/approval-flow.ts index 82158e91405..03727829410 100644 --- a/packages/workflow-sdk/test/examples/approval-flow.ts +++ b/packages/workflow-sdk/test/examples/approval-flow.ts @@ -1,7 +1,7 @@ // @sim-sdk 1 import { - binding, condition, + credential, human, js, ref, @@ -25,7 +25,7 @@ export default workflow('Approval flow', {}, () => { builderData: { amount: { type: 'number', value: req.amount } }, notification: [ slack.tool.sendMessage({ - oauthCredential: binding('ops-slack'), + oauthCredential: credential('ops-slack'), channel: 'C0OPS', text: t`Approve: ${ref('managerapproval.url')}`, }), diff --git a/packages/workflow-sdk/test/examples/lead-enrichment.ts b/packages/workflow-sdk/test/examples/lead-enrichment.ts index 0286fd088cc..0e570facd5a 100644 --- a/packages/workflow-sdk/test/examples/lead-enrichment.ts +++ b/packages/workflow-sdk/test/examples/lead-enrichment.ts @@ -1,9 +1,10 @@ // @sim-sdk 1 import { api, - binding, + childWorkflow, + codeFile, + credential, env, - file, fn, parallel, runWorkflow, @@ -34,22 +35,22 @@ export default workflow('Lead enrichment', {}, () => { method: 'GET', headers: [{ cells: { Key: 'Authorization', Value: t`Bearer ${env.CRM_KEY}` } }], }) - const score = fn('Score', { language: 'javascript', code: file('./functions/score.js') }) + const score = fn('Score', { language: 'javascript', code: codeFile('./functions/score.js') }) const save = table.updateRowById('Save', { tableId: table('leads'), rowId: p.currentItem.id, data: { score: score.result }, }) - p.start.to(lookup).to(score).to(save) + p.to(lookup).to(score).to(save) } ) const handoff = runWorkflow('Hand off', { - workflowId: workflow('assign-owner'), + workflowId: childWorkflow('assign-owner'), inputMapping: { leads: enrichAll.results }, }) const legacyPing = slack.sendMessage( 'Old ping', - { oauthCredential: binding('sales-slack'), channel: 'C0SALES', text: 'done' }, + { oauthCredential: credential('sales-slack'), channel: 'C0SALES', text: 'done' }, { disabled: true } ) nightly.to(pending).to(enrichAll).to(handoff, legacyPing) diff --git a/packages/workflow-sdk/test/examples/rag-doc-qa.ts b/packages/workflow-sdk/test/examples/rag-doc-qa.ts index b6f17f1c5f8..047a449fbf5 100644 --- a/packages/workflow-sdk/test/examples/rag-doc-qa.ts +++ b/packages/workflow-sdk/test/examples/rag-doc-qa.ts @@ -1,10 +1,10 @@ // @sim-sdk 1 -import { agent, kb, knowledge, response, t, trigger, workflow } from '@sim/workflow-sdk' +import { agent, knowledge, knowledgeBase, response, t, trigger, workflow } from '@sim/workflow-sdk' export default workflow('Doc QA', {}, () => { const start = trigger.start('Start', { inputFormat: { question: 'string' } }) const search = knowledge.search('Search docs', { - knowledgeBaseId: kb('docs'), + knowledgeBaseId: knowledgeBase('docs'), query: start.question, topK: '5', }) diff --git a/packages/workflow-sdk/test/examples/scheduled-report.ts b/packages/workflow-sdk/test/examples/scheduled-report.ts index 4bce692ea88..83d0b35d925 100644 --- a/packages/workflow-sdk/test/examples/scheduled-report.ts +++ b/packages/workflow-sdk/test/examples/scheduled-report.ts @@ -1,7 +1,7 @@ // @sim-sdk 1 import { agent, - binding, + credential, gmail, googleSheets, md, @@ -13,7 +13,7 @@ import { export default workflow('Invoice report', {}, () => { const mail = trigger.gmail.poller('Invoice email', { - oauthCredential: binding('finance-gmail'), + oauthCredential: credential('finance-gmail'), labelIds: ['INBOX'], markAsRead: true, }) @@ -22,13 +22,13 @@ export default workflow('Invoice report', {}, () => { messages: [{ role: 'user', content: t`Extract totals:\n${mail.email.bodyText}` }], tools: [ googleSheets.tool.appendData( - { oauthCredential: binding('finance-google'), spreadsheetId: '1AbC' }, + { oauthCredential: credential('finance-google'), spreadsheetId: '1AbC' }, { usageControl: 'auto' } ), ], }) const send = gmail.sendEmail('Send summary', { - oauthCredential: binding('finance-gmail'), + oauthCredential: credential('finance-gmail'), to: 'cfo@acme.com', subject: 'Invoices', body: extract.content, diff --git a/packages/workflow-sdk/test/examples/support-triage.ts b/packages/workflow-sdk/test/examples/support-triage.ts index a08ba0eeb4e..fbde25fefd7 100644 --- a/packages/workflow-sdk/test/examples/support-triage.ts +++ b/packages/workflow-sdk/test/examples/support-triage.ts @@ -1,8 +1,8 @@ // @sim-sdk 1 import { agent, - binding, condition, + credential, env, js, response, @@ -52,7 +52,7 @@ export default workflow( data: { subject: ticketIn.subject, category: classify.category }, }) const notify = slack.sendMessage('Notify', { - oauthCredential: binding('support-slack'), + oauthCredential: credential('support-slack'), channel: 'C0SUPPORT', text: t`New ${classify.category} ticket: ${ticketIn.subject}`, }) diff --git a/packages/workflow-sdk/test/fixtures/workspace.ts b/packages/workflow-sdk/test/fixtures/workspace.ts index 87cdf8da90f..10cc281a5db 100644 --- a/packages/workflow-sdk/test/fixtures/workspace.ts +++ b/packages/workflow-sdk/test/fixtures/workspace.ts @@ -13,12 +13,12 @@ export const FIXTURE_WORKSPACE: WorkspaceManifest = { }, }, knowledgeBases: ['docs'], - bindings: { - 'support-slack': { service: 'slack' }, - 'sales-slack': { service: 'slack' }, - 'ops-slack': { service: 'slack' }, - 'finance-gmail': { service: 'google-email' }, - 'finance-google': { service: 'google-sheets' }, + credentials: { + 'support-slack': { provider: 'slack' }, + 'sales-slack': { provider: 'slack' }, + 'ops-slack': { provider: 'slack' }, + 'finance-gmail': { provider: 'google-email' }, + 'finance-google': { provider: 'google-sheets' }, }, workflows: { 'assign-owner': { inputs: { leads: 'array' } } }, env: ['TICKETS_WEBHOOK_TOKEN', 'CRM_KEY'], diff --git a/packages/workflow-sdk/test/negative/rejected.ts b/packages/workflow-sdk/test/negative/rejected.ts index 6f182f782c4..dbf94061ea5 100644 --- a/packages/workflow-sdk/test/negative/rejected.ts +++ b/packages/workflow-sdk/test/negative/rejected.ts @@ -2,12 +2,12 @@ // Each `@ts-expect-error` must see an error, or the type-check fails with "unused directive". import { agent, - binding, + credential, env, gmail, js, - kb, knowledge, + knowledgeBase, slack, t, table, @@ -37,7 +37,7 @@ export default workflow('Rejected', {}, () => { // An unknown param. gmail.sendEmail('Send', { - oauthCredential: binding('finance-gmail'), + oauthCredential: credential('finance-gmail'), to: 'a@b.co', body: 'hi', // @ts-expect-error `recipient` is not a param of gmail.sendEmail @@ -46,14 +46,14 @@ export default workflow('Rejected', {}, () => { // A wrong literal option. knowledge.search('Search', { - knowledgeBaseId: kb('docs'), + knowledgeBaseId: knowledgeBase('docs'), // @ts-expect-error `semantic` is not a search mode searchMode: 'semantic', }) // A missing required param (`to`). // @ts-expect-error `to` is required by gmail.sendEmail - gmail.sendEmail('Send', { oauthCredential: binding('finance-gmail'), body: 'hi' }) + gmail.sendEmail('Send', { oauthCredential: credential('finance-gmail'), body: 'hi' }) // An unknown table column, with workspace types loaded. table.insertRow('Log', { @@ -64,7 +64,7 @@ export default workflow('Rejected', {}, () => { // Unknown workspace resources and env names. // @ts-expect-error `dosc` is not a knowledge base of the workspace - kb('dosc') + knowledgeBase('dosc') // @ts-expect-error `CRM_KYE` is not a workspace environment variable t`${env.CRM_KYE}` From d23a22e2cbb22f002564e3d0ebc9a9cabb586247 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 01:05:07 -0800 Subject: [PATCH 144/428] refactor(workflow-code): name lock idents, source hints, the source base and source meta - the lock's and source meta's binding is ident (compiledIdents, the lock-ident identity rule, E_LOCK_IDENT, E_LOCK_DUPLICATE_IDENT); stored documents carry version, not lockVersion or v - LockHints is SourceHints; LockBase is SourceBase { workspaceId, fingerprint, catalogHash } - code_meta is source meta: WorkflowSourceMetaV1 in source-meta.ts, parseSourceMeta, hintsFromSourceMeta and E_SOURCE_META_* - E_TYPE_NOT_ADDABLE is the apply code E_APPLY_TYPE_NOT_ADDABLE; E_APPLY_PROTECTED_BLOCK is E_APPLY_LOCKED_BLOCK, which absorbs the engine's block_locked skip - codes freeze at release, not before --- packages/workflow-code/DESIGN.md | 53 +++--- packages/workflow-code/package.json | 6 +- packages/workflow-code/src/anchors.ts | 2 +- packages/workflow-code/src/api.ts | 34 ++-- .../workflow-code/src/diagnostics/codes.ts | 46 ++--- .../workflow-code/src/diagnostics/frame.ts | 2 +- packages/workflow-code/src/index.ts | 34 ++-- packages/workflow-code/src/lock.test.ts | 40 ++--- packages/workflow-code/src/lock.ts | 64 +++---- .../src/materialize/fixtures.test-helpers.ts | 6 +- .../workflow-code/src/materialize/identity.ts | 18 +- .../src/materialize/index.test.ts | 14 +- .../workflow-code/src/materialize/index.ts | 2 +- ...{code-meta.test.ts => source-meta.test.ts} | 127 +++++++------- .../src/{code-meta.ts => source-meta.ts} | 162 ++++++++++-------- packages/workflow-persistence/package.json | 6 +- packages/workflow-persistence/src/save.ts | 4 +- .../src/{code-meta.ts => source-meta.ts} | 74 ++++---- 18 files changed, 355 insertions(+), 339 deletions(-) rename packages/workflow-code/src/{code-meta.test.ts => source-meta.test.ts} (68%) rename packages/workflow-code/src/{code-meta.ts => source-meta.ts} (66%) rename packages/workflow-persistence/src/{code-meta.ts => source-meta.ts} (53%) diff --git a/packages/workflow-code/DESIGN.md b/packages/workflow-code/DESIGN.md index e96a7d080d1..f378f50d885 100644 --- a/packages/workflow-code/DESIGN.md +++ b/packages/workflow-code/DESIGN.md @@ -58,21 +58,21 @@ instead of failing at run time. 8. **The lock has two halves.** The first, `LockIdentity`, holds ids, type, name, parent, branches and items. Canonicalize derives it and materialize returns it, and the fingerprint hashes it. - The second, `WorkflowLockBlock`, adds `binding`, `order`, `contentHash`, `layout` and + The second, `WorkflowLockBlock`, adds `ident`, `order`, `contentHash`, `layout` and `codeFile`. The source use case assembles the full `WorkflowLockV1` from identity plus - print/compile `LockHints` plus `workflowId`/`catalogHash`/fingerprint. Canonicalize does not + print/compile `SourceHints` plus `workflowId`/`catalogHash`/fingerprint. Canonicalize does not return a full lock: it cannot know the fingerprint, which hashes its own output. 9. **`codeFile` is per block**, not a top-level `codeFiles` map keyed by id (s3). -10. **`LockHints` are keyed by block key** (s3 keyed them by id): neither print nor compile sees - ids. They hold the same fields `workflow.code_meta` will store (decision 6). +10. **`SourceHints` are keyed by block key** (s3 keyed them by id): neither print nor compile sees + ids. They hold the same fields `workflow_source_meta` will store (decision 6). 11. **`order` is not unique.** Ties fall back to the key, so a lock merged from two branches stays valid. 12. **The validator is strict.** It rejects any unknown field. Keys must already be in normalized form and must match `normalizeWorkflowBlockName(name)` or that name's `~n` - collision form. `binding` must be a non-reserved identifier, unique in the lock. Ids must be + collision form. `ident` must be a non-reserved identifier, unique in the lock. Ids must be unique per scope: blocks, variables, branches within a block, items within a subBlock. Parents must exist and must not form a cycle. `contentHash` is 64 lowercase hex characters, - and `baseFingerprint` is `sf1:` plus 64 lowercase hex characters. `codeFile` must be a + and a fingerprint is `sf1:` plus 64 lowercase hex characters. `codeFile` must be a normalized relative POSIX path. Every problem is reported at once, with an RFC 6901 `path`. A string input is parsed as JSON text. @@ -93,7 +93,7 @@ instead of failing at run time. 15. **Codes added beyond s3 §4**, because the grammar implies them: - syntax and limits: `E_WORKFLOW_EXPORT`, `E_LIMIT_EXCEEDED`; - scope: `E_UNKNOWN_VARIABLE`, `E_DUPLICATE_VARIABLE`, `E_INVALID_ENV_NAME`, - `E_UNKNOWN_LOOP_PROPERTY`, `W_FORWARD_REF`; + `E_UNKNOWN_SUBFLOW_PROPERTY`, `W_FORWARD_REF`; - branches: `E_UNKNOWN_BRANCH`, `E_DUPLICATE_BRANCH_KEY`, `E_BRANCH_ELSE_LAST`; - code files and handles: `E_CODE_FILE_MISSING`, `E_CODE_FILE_PATH`, `W_CODE_FILE_INLINED`, `W_RAW_HANDLE`. @@ -116,7 +116,8 @@ instead of failing at run time. - `CatalogBlock.dynamicOutputs` and `singleInstance`; - `CatalogSubBlock.surface`, which separates the action and trigger copies of one id. 19. **`valueKind`** is one of `string | number | boolean | array | object | json | code | - branches | tools | resource | picked | upload | none`. `resource`, `picked` and `upload` are + branches | tools | resource | picked | upload | none`. `resource`, `picked` and `upload` (a + workspace file, `file()`) are the selector kinds, so a pair member of those kinds is the basic member (build-spec decision 7). `resourceKind` is set iff `valueKind` is `resource`. 20. **`options` can be opaque.** It is a static list, `{ dynamic: true }` (fetched through a @@ -154,20 +155,20 @@ instead of failing at run time. no `storage`, so equality, hashes, diffs and the fingerprint never see the encoding. Materialize chooses it: prev's raw encoding first, then `CatalogSubBlock.storage`. `ParamStorage` now lives in `catalog/types.ts`. -- **A2. Two new materialize inputs.** `MaterializeOptions.compiledBindings` feeds identity rule 2. +- **A2. Two new materialize inputs.** `MaterializeOptions.compiledIdents` feeds identity rule 2. `MaterializeOptions.lockFreshness` (`fresh | stale | none`, required) gates rule 4 and the `W_MAT_DELETED_SINCE_PULL` handling. - **A3. The lock is split.** This supersedes items 8 and 12. - - `WorkflowLockV1` is `{ lockVersion, blocks, variables }`. Each block holds `id`, `parent`, - `branches?`, `items?`, `binding`, `order`, `layout?` and `codeFile?`, and every id is logical. + - `WorkflowLockV1` is `{ version, blocks, variables }`. Each block holds `id`, `parent`, + `branches?`, `items?`, `ident`, `order`, `layout?` and `codeFile?`, and every id is logical. - These lock fields were removed: `workflowId`, `workspaceId`, `catalogHash`, `baseFingerprint`, `blocks[].type`, `blocks[].name` and `blocks[].contentHash`. The - environment facts now live in `LockBase { workspaceId, baseFingerprint, catalogHash }`, which - `source get/apply` carries beside the lock and a repo stores in - `.sim/state//revision.json`. + environment facts now live in `SourceBase { workspaceId, fingerprint, catalogHash }`, which + `source get/apply` carries beside the lock (wire `base`, required on apply) and the CLI stores + in `.sim/base.json`. - The validator tolerates `x-` fields on the lock, on blocks and on layout, and preserves them. Item entries stay strict. - - Version policy: adding an optional field does not bump `lockVersion`. Validators ship support + - Version policy: adding an optional field does not bump `version`. Validators ship support for a field before writers emit it, and data waits under `x-` until then. - **A4. One resource-kind list.** `WORKFLOW_RESOURCE_KINDS`, `WorkflowResourceKind` and `PortableResourceKind` moved to `@sim/workflow-types/resources`. This supersedes item 6. @@ -189,7 +190,7 @@ instead of failing at run time. conditions), `columns?`, `step?` and `integer?`. - **A6. Every stored type prints and compiles.** - `CatalogBlock.addable?: false` marks a type that may stay in a workflow but cannot be added. - Compile reports a new block of that type as `E_TYPE_NOT_ADDABLE`. + Compile reports a new block of that type as `E_APPLY_TYPE_NOT_ADDABLE`. - A type with no builder (legacy, unknown, or `custom_block_*` without a method) uses the generic builder `block(type, name, params, meta?)` (`GENERIC_BUILDER`). - **A7. `rows: null` has a source form.** It is an empty branch object: `condition('Name', {})`, @@ -214,12 +215,12 @@ instead of failing at run time. `decodeAnchor`. Each segment escapes `%` and `:`. - For a basic/advanced pair, a `param` anchor uses the `canonicalParamId`. - `portKey` and `parsePortKey` are the only port string forms. -- **A11. Bindings avoid SDK names.** `SDK_RESERVED_IDENTIFIERS` (JS reserved words plus - `SDK_CORE_EXPORTS`) is enforced on lock bindings. +- **A11. Idents avoid SDK names.** `SDK_RESERVED_IDENTIFIERS` (JS reserved words plus + `SDK_CORE_EXPORTS`) is enforced on lock idents. - **Note for 2E:** `core.d.ts` must export exactly `SDK_CORE_EXPORTS`, and `BlockMeta` needs `advancedMode?: boolean`, because the CWM keeps that legacy flag. - **A12. Diagnostic changes.** `Diagnostic.related?: Array<{ span, message }>` was added, along - with the codes `E_APPLY_LINT` and `E_TYPE_NOT_ADDABLE`. `E_MAT_LOCK_WORKFLOW_MISMATCH` was + with the codes `E_APPLY_LINT` and `E_APPLY_TYPE_NOT_ADDABLE`. `E_MAT_LOCK_WORKFLOW_MISMATCH` was removed, because the lock no longer carries a workflow or workspace. - **A13. The boundary rule is tighter.** Rule 3 also bans `.constructor` reads, `import.meta`, and value references to `globalThis`, `window`, `self`, `global`, `Reflect` and `require`. That @@ -249,20 +250,20 @@ instead of failing at run time. consumer indexes `catalog.blocks`, `catalog.triggers` or `catalog.builders` directly. - The hash is still SHA-256 over `stableStringify` of the core shard, so it stays the ETag and `lock.catalogHash`. It is deterministic: the tables fill in catalog key order. -- **A17. `workflow.code_meta` (Wave 3E).** `WorkflowCodeMetaV1` in `src/code-meta.ts` is - `{ v: 1, bindings, order, comments }`, the server-side copy of what the lock's `LockHints` +- **A17. `workflow_source_meta` (Wave 3E).** `WorkflowSourceMetaV1` in `src/source-meta.ts` is + `{ version: 1, idents, order, comments }`, the server-side copy of what the lock's `SourceHints` carry, plus comments. - Every entry is keyed by **block id**, never by key, so a canvas rename never orphans one. Comment anchors are `encodeAnchor` keys whose block segment is the block id and whose `var` segment is the variable id. - There is no `branchKeys` map: branch keys persist on the rows as the optional row `key` (s1 D2b), so there is one source of truth for them. - - `parseCodeMeta` mirrors `parseWorkflowLock`: strict, every problem at once, `x-` fields - preserved. Its codes are `E_CODE_META_*`. + - `parseSourceMeta` mirrors `parseWorkflowLock`: strict, every problem at once, `x-` fields + preserved. Its codes are `E_SOURCE_META_*`. - `CompileInput.knownKeys` (the lock's block keys) gates the new `meta.key` override, which is how source carries a legacy `name~n` collision key or a reserved name (`Loop`, `Parallel`) without being able to introduce one. A violation is `E_KEY_OVERRIDE`. - - Wave 4D: it is stored in the `workflow_code_meta(workflow_id pk → workflow on delete + - Wave 4D: it is stored in the `workflow_source_meta(workflow_id pk → workflow on delete cascade, meta jsonb, updated_at)` side table, not on the `workflow` row, so no `select()` of the hot row loads it. Only source get/apply, duplicate, fork/promote copy and the prune on block or variable delete read it. An empty value deletes the row. @@ -295,7 +296,7 @@ instead of failing at run time. `meta.extra`, the only place source takes such a field: a schema-agnostic custom block's input, the agent's legacy prompt fields, or a container's stored params. A container's subflow keys of `block.data` canonicalize could not read as config print under - `meta.extraData`, kept apart because canvas containers often store params under the same + `meta.subflowData`, kept apart because canvas containers often store params under the same names. The CWM keeps unknown `block.data` under `extra` too, so `opaque` means only the catalog's "could not evaluate" marker. - **A pair's member follows from the value kind alone.** A selector call is basic, anything @@ -323,7 +324,7 @@ instead of failing at run time. mode; when a plain id changed and prev showed the basic selector member of a `picked` pair, prev's member; then every param inactive under the target's values, from prev (absent included, so defaults compile filled into fields that never run are dropped); off-type subflow - fields and prev's whole config when it runs the same; unknown residue source does not + fields and prev's whole config when it runs the same; unknown extra data source does not carry. A full CWM restores onto itself unchanged, so O1 holds. Source cannot pick a pair member for a plain id: that is canvas state. - **The loop count is the one that runs.** `loopSpec` reads `block.data.count`, and an absent diff --git a/packages/workflow-code/package.json b/packages/workflow-code/package.json index 2fac118d80b..8e4a085b23a 100644 --- a/packages/workflow-code/package.json +++ b/packages/workflow-code/package.json @@ -14,9 +14,9 @@ "types": "./src/index.ts", "default": "./src/index.ts" }, - "./code-meta": { - "types": "./src/code-meta.ts", - "default": "./src/code-meta.ts" + "./source-meta": { + "types": "./src/source-meta.ts", + "default": "./src/source-meta.ts" }, "./catalog/canonical-index": { "types": "./src/catalog/canonical-index/index.ts", diff --git a/packages/workflow-code/src/anchors.ts b/packages/workflow-code/src/anchors.ts index c82fa29a0de..c212ebb43d5 100644 --- a/packages/workflow-code/src/anchors.ts +++ b/packages/workflow-code/src/anchors.ts @@ -1,6 +1,6 @@ /** * String forms of ports and comment anchors. Edges sort by `portKey`, and comment maps (in the CWM - * and in `workflow.code_meta`) are keyed by `encodeAnchor`, so every engine must use these and + * and in `workflow_source_meta`) are keyed by `encodeAnchor`, so every engine must use these and * never format either by hand. */ diff --git a/packages/workflow-code/src/api.ts b/packages/workflow-code/src/api.ts index 01ae8283a01..db5a03f7952 100644 --- a/packages/workflow-code/src/api.ts +++ b/packages/workflow-code/src/api.ts @@ -35,7 +35,7 @@ import type { /** * Maps workspace resources between internal ids and stable keys. Implemented server-side over the - * workspace's tables, knowledge bases, credentials (bindings) and so on; `null` when there is no + * workspace's tables, knowledge bases, credentials (idents) and so on; `null` when there is no * mapping. */ export interface ResourceKeyResolver { @@ -81,7 +81,7 @@ export interface MaterializeHooks { } /** How identity rule matched a compiled block to a stored one (s1 §4, rules 1–4). */ -export type IdentityMatchRule = 'lock-key' | 'lock-binding' | 'db-name' | 'inferred' +export type IdentityMatchRule = 'lock-key' | 'lock-ident' | 'db-name' | 'inferred' /** One block's identity outcome, for plan output and audit. */ export type IdentityEntry = @@ -115,11 +115,11 @@ export interface MaterializeOptions { /** Disables identity rule 4 (`--no-infer-renames`). */ inferRenames?: boolean /** - * Bindings as written in the compiled file (`CompileResult.hints`), by block key. Identity - * rule 2 matches a lock entry whose key is gone by its binding, so a human who edits only the + * Idents as written in the compiled file (`CompileResult.hints`), by block key. Identity + * rule 2 matches a lock entry whose key is gone by its ident, so a human who edits only the * display string keeps the block's id (s1 §4). */ - compiledBindings?: Record + compiledIdents?: Record /** * How the lock relates to `prev`: `fresh` when its base fingerprint matches the stored graph, * `stale` when it does not, `none` when there is no lock. Rule 4 (inferred renames) runs only @@ -215,14 +215,14 @@ export type DiffCanonicalFn = ( ) => CanonicalDiff /** - * Per-block print hints: the parts of the lock (or of `workflow.code_meta`, build-spec + * Per-block print hints: the parts of the lock (or of `workflow_source_meta`, build-spec * decision 6) the printer reads and the compiler reports. Keyed by block key, since neither stage * sees ids. */ -export type LockHintBlock = Partial> +export type SourceHintBlock = Partial> -export interface LockHints { - blocks: Record +export interface SourceHints { + blocks: Record } /** Caps on hostile input (s4 D7). Defaults are the compile module's. */ @@ -232,9 +232,9 @@ export interface CompileLimits { maxNodes?: number /** Nesting depth of the entry file, and bracket depth of each JavaScript code file. */ maxDepth?: number - /** Bytes summed over the distinct code files `file()` references. */ + /** Bytes summed over the distinct code files `codeFile()` references. */ maxCodeFileBytesTotal?: number - /** `file()` references across the workflow, distinct or not. */ + /** `codeFile()` references across the workflow, distinct or not. */ maxCodeFileRefs?: number } @@ -248,7 +248,7 @@ export interface CompileInput { limits?: CompileLimits /** * Block keys already bound to stored ids: the keys of the lock, or of the lock assembled from - * `workflow.code_meta`. A `meta.key` override (a legacy `name~n` collision key or a reserved + * `workflow_source_meta`. A `meta.key` override (a legacy `name~n` collision key or a reserved * name) compiles only for one of these, so source can carry a legacy key losslessly but never * introduce one. Absent means no override is accepted. */ @@ -261,8 +261,8 @@ export interface CompileResult { diagnostics: LocatedDiagnostic[] /** Where each anchor sits, to map later server findings back to lines. */ spans: Partial> - /** Bindings as written, `order` as declaration index, and code files, for the lock. */ - hints: LockHints + /** Idents as written, `order` as declaration index, and code files, for the lock. */ + hints: SourceHints /** The header's major, or `null` when the header is missing. */ sdkMajor: number | null } @@ -282,7 +282,7 @@ export interface PrintOptions { export interface PrintInput { workflow: CanonicalWorkflow catalog: BlockCatalog - hints?: LockHints + hints?: SourceHints options: PrintOptions } @@ -294,8 +294,8 @@ export interface PrintedFile { export interface PrintResult { /** The workflow file first, then code files. */ files: [PrintedFile, ...PrintedFile[]] - /** Input hints plus a binding, order and code file for every block. */ - hints: LockHints + /** Input hints plus an ident, order and code file for every block. */ + hints: SourceHints diagnostics: Diagnostic[] } diff --git a/packages/workflow-code/src/diagnostics/codes.ts b/packages/workflow-code/src/diagnostics/codes.ts index 843a5e4dffb..059fba02fe6 100644 --- a/packages/workflow-code/src/diagnostics/codes.ts +++ b/packages/workflow-code/src/diagnostics/codes.ts @@ -1,6 +1,6 @@ /** - * Every diagnostic code `@sim/workflow-code` and the source apply path can emit. Codes are stable - * wire values: CLI output, the copilot and tests match on them, so never rename one; retire it. + * Every diagnostic code `@sim/workflow-code` and the source apply path can emit. CLI output, the + * copilot and tests match on them, so they freeze at release. * * The first letter fixes the severity (`E_` error, `W_` warning, `I_` info; see * {@link SeverityOf}). The segment after it names the stage that owns the code: @@ -48,7 +48,7 @@ export type CompileScopeCode = /** `env.X` where X does not match `PATTERNS.ENV_VAR_NAME` (constants.ts:431). */ | 'E_INVALID_ENV_NAME' /** `p.` not in the loop/parallel KNOWN_PROPERTIES (loop.ts:44, parallel.ts:45). */ - | 'E_UNKNOWN_LOOP_PROPERTY' + | 'E_UNKNOWN_SUBFLOW_PROPERTY' /** A ref to a block declared later; it resolves, but the order is unusual. */ | 'W_FORWARD_REF' @@ -76,8 +76,6 @@ export type CompileEdgeCode = /** Checks against the block catalog (s3 §4 "Catalog checks", build-spec decision 2). */ export type CompileCatalogCode = | 'E_UNKNOWN_BUILDER' - /** A new block of a catalog type marked `addable: false`; existing blocks keep compiling. */ - | 'E_TYPE_NOT_ADDABLE' /** `hint` carries a did-you-mean over the params visible for the chosen operation. */ | 'E_UNKNOWN_PARAM' /** The builder already pins this param (`operation` or a `fixed` entry). */ @@ -129,7 +127,7 @@ export type PrintDiagnosticCode = ReferenceCode | 'W_CODE_FILE_INLINED' | 'W_RAW export type LockDiagnosticCode = /** The lock text is not valid JSON. */ | 'E_LOCK_JSON' - /** `lockVersion` is missing or not `1`. */ + /** `version` is missing or not `1`. */ | 'E_LOCK_VERSION' /** A required field is missing or has the wrong type or format. */ | 'E_LOCK_SHAPE' @@ -137,9 +135,9 @@ export type LockDiagnosticCode = | 'E_LOCK_UNKNOWN_FIELD' /** A block or variable key that is not in normalized form. */ | 'E_LOCK_KEY' - /** A `binding` that is not a JS identifier, or is in `SDK_RESERVED_IDENTIFIERS`. */ - | 'E_LOCK_BINDING' - | 'E_LOCK_DUPLICATE_BINDING' + /** A `ident` that is not a JS identifier, or is in `SDK_RESERVED_IDENTIFIERS`. */ + | 'E_LOCK_IDENT' + | 'E_LOCK_DUPLICATE_IDENT' /** The same block, variable or branch id under two keys (s1 §4 "Stale lock"). */ | 'E_LOCK_DUPLICATE_ID' /** A `parent` naming no lock block, itself, or forming a cycle. */ @@ -149,21 +147,21 @@ export type LockDiagnosticCode = /** A `codeFile` that is absolute, escapes the repo, or uses backslashes. */ | 'E_LOCK_CODE_FILE_PATH' -/** `parseCodeMeta` (code-meta.ts), for the stored `workflow.code_meta` value. */ -export type CodeMetaDiagnosticCode = +/** `parseSourceMeta` (source-meta.ts), for the stored `workflow_source_meta` value. */ +export type SourceMetaDiagnosticCode = /** The text is not valid JSON. */ - | 'E_CODE_META_JSON' + | 'E_SOURCE_META_JSON' /** `v` is missing or not `1`. */ - | 'E_CODE_META_VERSION' + | 'E_SOURCE_META_VERSION' /** A required field is missing or has the wrong type or format. */ - | 'E_CODE_META_SHAPE' + | 'E_SOURCE_META_SHAPE' /** A field the schema does not define. */ - | 'E_CODE_META_UNKNOWN_FIELD' - /** A binding that is not a JS identifier, or is in `SDK_RESERVED_IDENTIFIERS`. */ - | 'E_CODE_META_BINDING' - | 'E_CODE_META_DUPLICATE_BINDING' + | 'E_SOURCE_META_UNKNOWN_FIELD' + /** An ident that is not a JS identifier, or is in `SDK_RESERVED_IDENTIFIERS`. */ + | 'E_SOURCE_META_IDENT' + | 'E_SOURCE_META_DUPLICATE_IDENT' /** A `comments` key that `decodeAnchor` does not accept. */ - | 'E_CODE_META_ANCHOR' + | 'E_SOURCE_META_ANCHOR' /** canonicalize (s1 §2 algorithm, §5 quirks). */ export type CanonicalizeDiagnosticCode = @@ -215,21 +213,23 @@ export type MaterializeDiagnosticCode = /** * The server apply pipeline. Gate codes mirror the editing engine's `SkippedItemType` * (apps/sim/lib/workflows/editing/types.ts `WORKFLOW_SKIPPED_ITEM_TYPES`) minus - * `invalid_edge_target`, as `E_APPLY_`; the rest are s4 §2 additions. The engine + * `invalid_edge_target`, as `E_APPLY_` (`block_locked` shares `E_APPLY_LOCKED_BLOCK`); + * the rest are s4 §2 additions. The engine * skips such an item silently, while source apply refuses the whole write (s4 D1, D5). */ export type ApplyDiagnosticCode = /** The base fingerprint no longer matches the stored graph (HTTP 409; s4 D3). */ | 'E_APPLY_STALE' /** The diff touches a locked block or a child of a locked container (s4 D2). */ - | 'E_APPLY_PROTECTED_BLOCK' + | 'E_APPLY_LOCKED_BLOCK' + /** A new block of a catalog type marked `addable: false`; existing blocks keep applying. */ + | 'E_APPLY_TYPE_NOT_ADDABLE' /** `validateWorkflowState` rejected the materialized graph. */ | 'E_APPLY_INVALID_STATE' | 'E_APPLY_BLOCK_NOT_FOUND' | 'E_APPLY_INVALID_BLOCK_TYPE' | 'E_APPLY_BLOCK_NOT_ALLOWED' | 'E_APPLY_MODEL_NOT_ALLOWED' - | 'E_APPLY_BLOCK_LOCKED' | 'E_APPLY_TOOL_NOT_ALLOWED' | 'E_APPLY_INVALID_EDGE_SOURCE' | 'E_APPLY_INVALID_EDGE_SCOPE' @@ -263,7 +263,7 @@ export type ApplyDiagnosticCode = export type DiagnosticCode = | CompileDiagnosticCode | LockDiagnosticCode - | CodeMetaDiagnosticCode + | SourceMetaDiagnosticCode | CanonicalizeDiagnosticCode | MaterializeDiagnosticCode | ApplyDiagnosticCode diff --git a/packages/workflow-code/src/diagnostics/frame.ts b/packages/workflow-code/src/diagnostics/frame.ts index 5a9c9bb5550..d92298cf36d 100644 --- a/packages/workflow-code/src/diagnostics/frame.ts +++ b/packages/workflow-code/src/diagnostics/frame.ts @@ -38,7 +38,7 @@ interface DiagnosticFields { /** Set by the apply path once identity is resolved (s4 `SourceDiagnostic.blockId`). */ blockId?: string param?: SubBlockId - /** RFC 6901 JSON Pointer into a non-source input, such as the lock (`/blocks/agent/binding`). */ + /** RFC 6901 JSON Pointer into a non-source input, such as the lock (`/blocks/agent/ident`). */ path?: string } diff --git a/packages/workflow-code/src/index.ts b/packages/workflow-code/src/index.ts index 313ecc2056d..1a9c6342820 100644 --- a/packages/workflow-code/src/index.ts +++ b/packages/workflow-code/src/index.ts @@ -16,8 +16,6 @@ export type { DiffCanonicalFn, IdentityEntry, IdentityMatchRule, - LockHintBlock, - LockHints, MaterializeFn, MaterializeHooks, MaterializeOptions, @@ -29,6 +27,8 @@ export type { PrintWorkflowFn, ResourceKeyResolver, SourceFingerprintFn, + SourceHintBlock, + SourceHints, } from './api' export { canonicalize } from './canonicalize' export { executableInactiveParams } from './catalog/activity' @@ -87,25 +87,11 @@ export { isIdentifierName, toCodeFile, } from './code-files' -export { - type CodeMetaDiagnostic, - codeMetaEquals, - codeMetaExtensions, - emptyCodeMeta, - isEmptyCodeMeta, - mapAnchorIds, - type ParseCodeMetaResult, - parseCodeMeta, - pruneCodeMeta, - remapCodeMeta, - type WorkflowCodeMetaV1, -} from './code-meta' export { compileWorkflow } from './compile' export type { ApplyDiagnosticCode, CanonicalizeDiagnosticCode, CodeFileCode, - CodeMetaDiagnosticCode, CompileCatalogCode, CompileDiagnosticCode, CompileEdgeCode, @@ -118,6 +104,7 @@ export type { PrintDiagnosticCode, ReferenceCode, SeverityOf, + SourceMetaDiagnosticCode, } from './diagnostics/codes' export { codeFrame, @@ -137,7 +124,6 @@ export { } from './equivalence/executable' export { sha256Hex, stableStringify } from './hash' export { - type LockBase, type LockDiagnostic, type LockExtensionKey, type LockIdentity, @@ -146,6 +132,7 @@ export { type LockLayout, type ParseWorkflowLockResult, parseWorkflowLock, + type SourceBase, type SourceFingerprint, type WorkflowLockBlock, type WorkflowLockV1, @@ -188,3 +175,16 @@ export type { export { assignIdentifiers, printWorkflow } from './print' export { parseJsonContainer, setOwn } from './records' export { GENERIC_BUILDER, SDK_CORE_EXPORTS, SDK_RESERVED_IDENTIFIERS } from './sdk' +export { + emptySourceMeta, + isEmptySourceMeta, + mapAnchorIds, + type ParseSourceMetaResult, + parseSourceMeta, + pruneSourceMeta, + remapSourceMeta, + type SourceMetaDiagnostic, + sourceMetaEquals, + sourceMetaExtensions, + type WorkflowSourceMetaV1, +} from './source-meta' diff --git a/packages/workflow-code/src/lock.test.ts b/packages/workflow-code/src/lock.test.ts index 4462feb1e5f..a8f2d171fdd 100644 --- a/packages/workflow-code/src/lock.test.ts +++ b/packages/workflow-code/src/lock.test.ts @@ -3,14 +3,14 @@ import { parseWorkflowLock } from './lock' function validLock(): Record { return { - lockVersion: 1, + version: 1, blocks: { - start: { id: 'blk-start', parent: null, binding: 'start', order: 0 }, - each: { id: 'blk-each', parent: null, binding: 'each', order: 1 }, + start: { id: 'blk-start', parent: null, ident: 'start', order: 0 }, + each: { id: 'blk-each', parent: null, ident: 'each', order: 1 }, route: { id: 'blk-route', parent: 'each', - binding: 'route', + ident: 'route', order: 2, branches: { if: 'blk-route-if', else: 'blk-route-else' }, items: { @@ -60,37 +60,37 @@ describe('parseWorkflowLock', () => { }) it('rejects text that is not JSON and values that are not objects', () => { - expect(codesFor('{"lockVersion":')).toEqual(['E_LOCK_JSON ']) + expect(codesFor('{"version":')).toEqual(['E_LOCK_JSON ']) expect(codesFor([])).toEqual(['E_LOCK_SHAPE ']) expect(codesFor(null)).toEqual(['E_LOCK_SHAPE ']) }) it('rejects any lock version but 1 before reading the rest', () => { - expect(codesFor({ ...validLock(), lockVersion: 2, blocks: 'nope' })).toEqual([ - 'E_LOCK_VERSION /lockVersion', + expect(codesFor({ ...validLock(), version: 2, blocks: 'nope' })).toEqual([ + 'E_LOCK_VERSION /version', ]) }) it('reports every problem at once with JSON Pointer paths', () => { - const lock = withBlock('route', { id: '', binding: 'class', order: -1 }) + const lock = withBlock('route', { id: '', ident: 'class', order: -1 }) lock.variables = { retries: 7 } expect(codesFor(lock)).toEqual([ 'E_LOCK_SHAPE /blocks/route/id', - 'E_LOCK_BINDING /blocks/route/binding', + 'E_LOCK_IDENT /blocks/route/ident', 'E_LOCK_SHAPE /blocks/route/order', 'E_LOCK_SHAPE /variables/retries', ]) }) it('rejects fields the schema does not define, at every level', () => { - const lock = withBlock('start', { ident: 'start' }) + const lock = withBlock('start', { alias: 'start' }) lock.workflowId = 'wf-1' const route = (lock.blocks as Record>).route route.layout = { x: 1, y: 2, z: 3 } route.items = { inputFormat: [{ name: 'a', id: 'f', type: 'string' }] } expect(codesFor(lock)).toEqual([ 'E_LOCK_UNKNOWN_FIELD /workflowId', - 'E_LOCK_UNKNOWN_FIELD /blocks/start/ident', + 'E_LOCK_UNKNOWN_FIELD /blocks/start/alias', 'E_LOCK_UNKNOWN_FIELD /blocks/route/items/inputFormat/0/type', 'E_LOCK_UNKNOWN_FIELD /blocks/route/layout/z', ]) @@ -114,8 +114,8 @@ describe('parseWorkflowLock', () => { it('requires block and variable keys in normalized form, including ~n collision keys', () => { const lock = validLock() const blocks = lock.blocks as Record> - blocks['My Block'] = { id: 'blk-x', parent: null, binding: 'myBlock', order: 3 } - blocks['start~2'] = { id: 'blk-start-2', parent: null, binding: 'start2', order: 4 } + blocks['My Block'] = { id: 'blk-x', parent: null, ident: 'myBlock', order: 3 } + blocks['start~2'] = { id: 'blk-start-2', parent: null, ident: 'start2', order: 4 } lock.variables = { 'Retry Count': 'var-2' } expect(codesFor(lock)).toEqual([ 'E_LOCK_KEY /blocks/My Block', @@ -123,14 +123,14 @@ describe('parseWorkflowLock', () => { ]) }) - it('rejects bindings that are not identifiers, are reserved, shadow the SDK, or repeat', () => { - for (const binding of ['2fast', 'await', 'env', 'block', 't']) { - expect(codesFor(withBlock('route', { binding })), binding).toEqual([ - 'E_LOCK_BINDING /blocks/route/binding', + it('rejects idents that are not identifiers, are reserved, shadow the SDK, or repeat', () => { + for (const ident of ['2fast', 'await', 'env', 'block', 't']) { + expect(codesFor(withBlock('route', { ident })), ident).toEqual([ + 'E_LOCK_IDENT /blocks/route/ident', ]) } - expect(codesFor(withBlock('route', { binding: 'start' }))).toEqual([ - 'E_LOCK_DUPLICATE_BINDING /blocks/route/binding', + expect(codesFor(withBlock('route', { ident: 'start' }))).toEqual([ + 'E_LOCK_DUPLICATE_IDENT /blocks/route/ident', ]) }) @@ -207,7 +207,7 @@ describe('parseWorkflowLock', () => { it('escapes ~ and / in pointer segments', () => { const lock = validLock() const blocks = lock.blocks as Record> - blocks['a/b~2'] = { id: 'blk-ab', parent: null, binding: 'ab', order: 'x' } + blocks['a/b~2'] = { id: 'blk-ab', parent: null, ident: 'ab', order: 'x' } expect(codesFor(lock)).toEqual(['E_LOCK_SHAPE /blocks/a~1b~02/order']) }) }) diff --git a/packages/workflow-code/src/lock.ts b/packages/workflow-code/src/lock.ts index 5efa934f028..2a139df929d 100644 --- a/packages/workflow-code/src/lock.ts +++ b/packages/workflow-code/src/lock.ts @@ -3,14 +3,14 @@ * so a canvas rename, a drag or a branch reorder never changes identity (build-spec decision 4, * s1 §2, s3 D10/D11). Edge ids are never in the lock (s1 D5). * - * The lock holds only environment-independent facts: logical ids, bindings, print order, code + * The lock holds only environment-independent facts: logical ids, idents, print order, code * files and layout. Everything tied to one environment's stored state (workspace, freshness - * fingerprint, catalog hash) is the separate {@link LockBase}: single-workflow `source get/apply` - * returns and takes it beside the lock, and a repo keeps it in `.sim/state//revision.json`. + * fingerprint, catalog hash) is the separate {@link SourceBase}: single-workflow `source get/apply` + * returns and takes it beside the lock, and the CLI keeps it in `.sim/base.json`. * Logical ids equal physical ids in the home environment; elsewhere * `workspace_repo_block_binding` maps them (build-spec decision 4). * - * Version policy: adding an optional field does not bump `lockVersion`. Validators learn a field + * Version policy: adding an optional field does not bump `version`. Validators learn a field * before writers emit it; until every reader knows a field, data goes under an `x-` key, which * every validator tolerates and preserves. Removing or changing the meaning of a field bumps it. */ @@ -78,7 +78,7 @@ export interface WorkflowLockBlock extends LockIdentityBlock { * the name on first print, then persisted, so a canvas rename changes one line * (build-spec decision 4). Never one of `SDK_RESERVED_IDENTIFIERS`. */ - binding: string + ident: string /** * Print-order tie-break: the second key of the declaration sort (isTrigger, order, key) * (build-spec decision 10, s3 D10). Not unique: equal orders fall back to the key, so locks @@ -92,16 +92,16 @@ export interface WorkflowLockBlock extends LockIdentityBlock { export interface WorkflowLockV1 { [extension: LockExtensionKey]: Json - lockVersion: 1 + version: 1 blocks: Record variables: Record } -/** One environment's freshness facts for a lock (see the module comment). */ -export interface LockBase { +/** One environment's freshness facts for a lock, `.sim/base.json` (see the module comment). */ +export interface SourceBase { workspaceId: string /** The DB freshness token at pull; apply answers 409 when it no longer matches. */ - baseFingerprint: SourceFingerprint + fingerprint: string /** The catalog `hash` the file was printed against. */ catalogHash: string } @@ -112,8 +112,8 @@ export type LockDiagnostic = Diagnostic< | 'E_LOCK_SHAPE' | 'E_LOCK_UNKNOWN_FIELD' | 'E_LOCK_KEY' - | 'E_LOCK_BINDING' - | 'E_LOCK_DUPLICATE_BINDING' + | 'E_LOCK_IDENT' + | 'E_LOCK_DUPLICATE_IDENT' | 'E_LOCK_DUPLICATE_ID' | 'E_LOCK_PARENT' | 'E_LOCK_BRANCH' @@ -126,8 +126,8 @@ export type ParseWorkflowLockResult = const DRIVE_PATH = /^[A-Za-z]:/ -const LOCK_FIELDS = ['lockVersion', 'blocks', 'variables'] -const BLOCK_FIELDS = ['id', 'parent', 'branches', 'items', 'binding', 'order', 'layout', 'codeFile'] +const LOCK_FIELDS = ['version', 'blocks', 'variables'] +const BLOCK_FIELDS = ['id', 'parent', 'branches', 'items', 'ident', 'order', 'layout', 'codeFile'] const LAYOUT_FIELDS = ['x', 'y', 'w', 'h', 'height', 'horizontalHandles'] const ITEM_FIELDS = ['name', 'id'] @@ -141,20 +141,20 @@ function isFiniteNumber(value: unknown): value is number { return typeof value === 'number' && Number.isFinite(value) } -/** A print-order tie-break, in the lock and in `code_meta`: a non-negative integer. */ +/** A print-order tie-break, in the lock and in source meta: a non-negative integer. */ export function isPrintOrder(value: unknown): value is number { return typeof value === 'number' && Number.isSafeInteger(value) && value >= 0 } -/** A block's `const` binding, in the lock or in `code_meta`, or why `value` cannot be one. */ -export function readBinding(value: unknown): { binding: string } | { problem: string } { +/** A block's `const` ident, in the lock or in source meta, or why `value` cannot be one. */ +export function readIdent(value: unknown): { ident: string } | { problem: string } { if (typeof value !== 'string' || !isIdentifierName(value)) { - return { problem: 'A binding must be a JS identifier.' } + return { problem: 'An ident must be a JS identifier.' } } if (SDK_RESERVED_IDENTIFIERS.has(value)) { return { problem: `"${value}" is a reserved word or an SDK export.` } } - return { binding: value } + return { ident: value } } export function isExtensionKey(key: string): key is LockExtensionKey { @@ -338,9 +338,9 @@ class LockReader { this.report('E_LOCK_SHAPE', [...at, 'parent'], '"parent" must be a block key or null.') } - const read = readBinding(raw.binding) - if ('problem' in read) this.report('E_LOCK_BINDING', [...at, 'binding'], read.problem) - const binding = 'binding' in read ? read.binding : '' + const read = readIdent(raw.ident) + if ('problem' in read) this.report('E_LOCK_IDENT', [...at, 'ident'], read.problem) + const ident = 'ident' in read ? read.ident : '' let order = 0 if (isPrintOrder(raw.order)) { @@ -349,7 +349,7 @@ class LockReader { this.report('E_LOCK_SHAPE', [...at, 'order'], '"order" must be a non-negative integer.') } - const block: WorkflowLockBlock = { ...extensions, id, parent, binding, order } + const block: WorkflowLockBlock = { ...extensions, id, parent, ident, order } if (raw.branches !== undefined) { const branches = this.idRecord(raw.branches, [...at, 'branches']) @@ -398,17 +398,17 @@ class LockReader { } crossCheckBlocks(blocks: Record): void { - const bindings = new Map() + const idents = new Map() const ids = new Map() for (const [key, block] of Object.entries(blocks)) { - if (block.binding) { - const holder = bindings.get(block.binding) - if (holder === undefined) bindings.set(block.binding, key) + if (block.ident) { + const holder = idents.get(block.ident) + if (holder === undefined) idents.set(block.ident, key) else { this.report( - 'E_LOCK_DUPLICATE_BINDING', - ['blocks', key, 'binding'], - `Binding "${block.binding}" is already used by "${holder}".` + 'E_LOCK_DUPLICATE_IDENT', + ['blocks', key, 'ident'], + `Ident "${block.ident}" is already used by "${holder}".` ) } } @@ -481,8 +481,8 @@ export function parseWorkflowLock(input: unknown): ParseWorkflowLockResult { reader.report('E_LOCK_SHAPE', [], 'The lock must be a JSON object.') return { diagnostics: reader.diagnostics } } - if (json.lockVersion !== 1) { - reader.report('E_LOCK_VERSION', ['lockVersion'], 'Unsupported lock version; expected 1.') + if (json.version !== 1) { + reader.report('E_LOCK_VERSION', ['version'], 'Unsupported lock version; expected 1.') return { diagnostics: reader.diagnostics } } @@ -501,5 +501,5 @@ export function parseWorkflowLock(input: unknown): ParseWorkflowLockResult { const variables = reader.variables(json.variables) if (reader.diagnostics.length > 0) return { diagnostics: reader.diagnostics } - return { lock: { ...extensions, lockVersion: 1, blocks, variables } } + return { lock: { ...extensions, version: 1, blocks, variables } } } diff --git a/packages/workflow-code/src/materialize/fixtures.test-helpers.ts b/packages/workflow-code/src/materialize/fixtures.test-helpers.ts index 706cbc4ac5b..f94f94b1a85 100644 --- a/packages/workflow-code/src/materialize/fixtures.test-helpers.ts +++ b/packages/workflow-code/src/materialize/fixtures.test-helpers.ts @@ -302,15 +302,15 @@ export function canonical(state: WorkflowState, lock?: WorkflowLockV1 | null) { return canonicalize(state, { catalog: CATALOG, meta: META, lock, resources: RESOURCES }) } -/** A fresh lock for `state`, as `source get` would hand out: identity plus key-derived bindings. */ +/** A fresh lock for `state`, as `source get` would hand out: identity plus key-derived idents. */ export function lockFor(state: WorkflowState): WorkflowLockV1 { const { identity, layout } = canonical(state) const blocks: WorkflowLockV1['blocks'] = {} Object.entries(identity.blocks).forEach(([key, entry], order) => { - blocks[key] = { ...entry, binding: `b_${key.replace(/[^A-Za-z0-9_$]/g, '_')}`, order } + blocks[key] = { ...entry, ident: `b_${key.replace(/[^A-Za-z0-9_$]/g, '_')}`, order } if (layout[key]) blocks[key].layout = layout[key] }) - return { lockVersion: 1, blocks, variables: identity.variables } + return { version: 1, blocks, variables: identity.variables } } function copyJson(value: unknown): unknown { diff --git a/packages/workflow-code/src/materialize/identity.ts b/packages/workflow-code/src/materialize/identity.ts index 3e51c2b13f0..92d90751052 100644 --- a/packages/workflow-code/src/materialize/identity.ts +++ b/packages/workflow-code/src/materialize/identity.ts @@ -44,7 +44,7 @@ interface IdentityInputs { catalog: BlockCatalog hooks: MaterializeHooks freshness: MaterializeOptions['lockFreshness'] - compiledBindings: Record | undefined + compiledIdents: Record | undefined inferRenames: boolean diagnostics: Diagnostic[] } @@ -88,7 +88,7 @@ function duplicateLockKeys( /** * Binds every compiled block to an id (s1 §4, build-spec decision 3), in rule order: * 1. the lock entry under the same key, when its id is in prev; - * 2. a lock entry whose key the file dropped but whose binding the file still uses; + * 2. a lock entry whose key the file dropped but whose ident the file still uses; * 3. the prev block with the same canonical key (the lockless and stale-lock path); * 4. an inferred rename, only without a fresh lock: exactly one unmatched prev block and one * unmatched compiled block with the same type and parent and agreeing edge neighbourhoods; @@ -140,7 +140,7 @@ export function resolveIdentity(inputs: IdentityInputs): IdentityResolution { resolved.set(key, { id: prevId, prevKey, - lockOwned: via === 'lock-key' || via === 'lock-binding', + lockOwned: via === 'lock-key' || via === 'lock-ident', entry, }) return true @@ -169,17 +169,17 @@ export function resolveIdentity(inputs: IdentityInputs): IdentityResolution { } } - const bindingEntries = Object.entries(lock?.blocks ?? {}).filter( + const identEntries = Object.entries(lock?.blocks ?? {}).filter( ([key]) => !duplicates.has(key) && !Object.hasOwn(workflow.blocks, key) ) for (const key of open()) { if (lockEntry(key)) continue - const binding = inputs.compiledBindings?.[key] - if (binding === undefined) continue - const found = bindingEntries.find( - ([, entry]) => entry.binding === binding && Object.hasOwn(prevBlocks, entry.id) + const ident = inputs.compiledIdents?.[key] + if (ident === undefined) continue + const found = identEntries.find( + ([, entry]) => entry.ident === ident && Object.hasOwn(prevBlocks, entry.id) ) - if (found) match(key, found[1].id, 'lock-binding') + if (found) match(key, found[1].id, 'lock-ident') } for (const key of open()) { diff --git a/packages/workflow-code/src/materialize/index.test.ts b/packages/workflow-code/src/materialize/index.test.ts index ee78864345a..09405e455eb 100644 --- a/packages/workflow-code/src/materialize/index.test.ts +++ b/packages/workflow-code/src/materialize/index.test.ts @@ -415,19 +415,19 @@ describe('materialize: identity (s1 §4)', () => { }) } - it('keeps the id across a rename matched by lock binding and rewrites { + it('keeps the id across a rename matched by lock ident and rewrites { const prev = base() const lock = lockFor(prev) const target = renameFetch(canonical(prev, lock).workflow) const result = run(target, lock, { prev, - compiledBindings: { load: lock.blocks.fetch.binding }, + compiledIdents: { load: lock.blocks.fetch.ident }, }) expect(result.entries).toContainEqual({ status: 'matched', key: 'load', id: 'a1', - via: 'lock-binding', + via: 'lock-ident', renamedFrom: 'Fetch', }) expect(result.state.blocks.a1.name).toBe('Load') @@ -669,7 +669,7 @@ describe('materialize: identity (s1 §4)', () => { const result = run(target, lockFor(prev), { prev, lockFreshness: 'fresh', - compiledBindings: { reply: 'b_answer' }, + compiledIdents: { reply: 'b_answer' }, }) expect(Object.keys(result.state.blocks).sort()).toEqual(['gate', 'out', 'sched', 'trig']) expect(result.state.blocks.trig).toBe(prev.blocks.trig) @@ -694,14 +694,14 @@ describe('materialize: positions and server-owned fields', () => { draft.blocks.three = { ...draft.blocks.one, key: 'three', name: 'Three' } }) const lock: WorkflowLockV1 = { - lockVersion: 1, + version: 1, variables: {}, blocks: { - one: { id: 'f1', parent: null, binding: 'one', order: 0, layout: { x: 99, y: 99 } }, + one: { id: 'f1', parent: null, ident: 'one', order: 0, layout: { x: 99, y: 99 } }, two: { id: 'f2', parent: null, - binding: 'two', + ident: 'two', order: 1, layout: { x: 1, y: 2, w: 300, height: 80 }, }, diff --git a/packages/workflow-code/src/materialize/index.ts b/packages/workflow-code/src/materialize/index.ts index 5d9c18376b7..96442b30b09 100644 --- a/packages/workflow-code/src/materialize/index.ts +++ b/packages/workflow-code/src/materialize/index.ts @@ -121,7 +121,7 @@ export const materialize: MaterializeFn = (input, lock, options) => { catalog, hooks, freshness: options.lockFreshness, - compiledBindings: options.compiledBindings, + compiledIdents: options.compiledIdents, inferRenames: options.inferRenames !== false, diagnostics, }) diff --git a/packages/workflow-code/src/code-meta.test.ts b/packages/workflow-code/src/source-meta.test.ts similarity index 68% rename from packages/workflow-code/src/code-meta.test.ts rename to packages/workflow-code/src/source-meta.test.ts index 555a144d66e..cfe960fa5e9 100644 --- a/packages/workflow-code/src/code-meta.test.ts +++ b/packages/workflow-code/src/source-meta.test.ts @@ -1,21 +1,21 @@ import fc from 'fast-check' import { describe, expect, it } from 'vitest' import { decodeAnchor, encodeAnchor } from './anchors' -import { - codeMetaEquals, - parseCodeMeta, - pruneCodeMeta, - remapCodeMeta, - type WorkflowCodeMetaV1, -} from './code-meta' import type { Anchor, AnchorKey, CodeComment } from './model' +import { + parseSourceMeta, + pruneSourceMeta, + remapSourceMeta, + sourceMetaEquals, + type WorkflowSourceMetaV1, +} from './source-meta' const line = (text: string): CodeComment => ({ text, kind: 'line', placement: 'leading' }) function validMeta(): Record { return { - v: 1, - bindings: { 'blk-a': 'fetchUser', 'blk-b': 'route' }, + version: 1, + idents: { 'blk-a': 'fetchUser', 'blk-b': 'route' }, order: { 'blk-a': 0, 'blk-b': 1 }, comments: { header: [line(' file header')], @@ -30,17 +30,17 @@ function validMeta(): Record { } function codesFor(input: unknown): string[] { - const result = parseCodeMeta(input) + const result = parseSourceMeta(input) return result.diagnostics ? result.diagnostics.map((d) => `${d.code} ${d.path ?? ''}`) : [] } -function parsed(input: unknown): WorkflowCodeMetaV1 { - const result = parseCodeMeta(input) +function parsed(input: unknown): WorkflowSourceMetaV1 { + const result = parseSourceMeta(input) if (!result.meta) throw new Error(codesFor(input).join(', ')) return result.meta } -describe('parseCodeMeta', () => { +describe('parseSourceMeta', () => { it('accepts a well-formed value from an object or JSON text and keeps x- fields', () => { const meta = parsed(validMeta()) expect(meta['x-future']).toEqual({ anything: [1, 'two'] }) @@ -48,39 +48,41 @@ describe('parseCodeMeta', () => { }) it('stops at an unsupported version and at text that is not JSON', () => { - expect(codesFor({ ...validMeta(), v: 2, bindings: 'nope' })).toEqual(['E_CODE_META_VERSION /v']) - expect(codesFor('{"v":1,')).toEqual(['E_CODE_META_JSON ']) - expect(codesFor([])).toEqual(['E_CODE_META_SHAPE ']) + expect(codesFor({ ...validMeta(), version: 2, idents: 'nope' })).toEqual([ + 'E_SOURCE_META_VERSION /version', + ]) + expect(codesFor('{"version":1,')).toEqual(['E_SOURCE_META_JSON ']) + expect(codesFor([])).toEqual(['E_SOURCE_META_SHAPE ']) }) - it('rejects bindings that would not compile: non-identifiers, reserved names, duplicates', () => { + it('rejects idents that would not compile: non-identifiers, reserved names, duplicates', () => { expect( codesFor({ ...validMeta(), - bindings: { a: 'two words', b: 'workflow', c: 'class', d: 'same', e: 'same' }, + idents: { a: 'two words', b: 'workflow', c: 'class', d: 'same', e: 'same' }, }) ).toEqual([ - 'E_CODE_META_BINDING /bindings/a', - 'E_CODE_META_BINDING /bindings/b', - 'E_CODE_META_BINDING /bindings/c', - 'E_CODE_META_DUPLICATE_BINDING /bindings/e', + 'E_SOURCE_META_IDENT /idents/a', + 'E_SOURCE_META_IDENT /idents/b', + 'E_SOURCE_META_IDENT /idents/c', + 'E_SOURCE_META_DUPLICATE_IDENT /idents/e', ]) }) it('reports every problem at once with a JSON pointer, escaping ~ and /', () => { expect( codesFor({ - v: 1, - bindings: {}, + version: 1, + idents: {}, order: { 'a/b': -1, 'c~d': 1.5 }, comments: { 'block:x': [{ text: 1, kind: 'line', placement: 'leading' }] }, typo: true, }) ).toEqual([ - 'E_CODE_META_UNKNOWN_FIELD /typo', - 'E_CODE_META_SHAPE /order/a~1b', - 'E_CODE_META_SHAPE /order/c~0d', - 'E_CODE_META_SHAPE /comments/block:x/0/text', + 'E_SOURCE_META_UNKNOWN_FIELD /typo', + 'E_SOURCE_META_SHAPE /order/a~1b', + 'E_SOURCE_META_SHAPE /order/c~0d', + 'E_SOURCE_META_SHAPE /comments/block:x/0/text', ]) }) @@ -96,10 +98,10 @@ describe('parseCodeMeta', () => { }, }) ).toEqual([ - 'E_CODE_META_ANCHOR /comments/nowhere:x', - 'E_CODE_META_ANCHOR /comments/block:a%zz', - 'E_CODE_META_ANCHOR /comments/edges:a:nonsense', - 'E_CODE_META_ANCHOR /comments/block:a:b', + 'E_SOURCE_META_ANCHOR /comments/nowhere:x', + 'E_SOURCE_META_ANCHOR /comments/block:a%zz', + 'E_SOURCE_META_ANCHOR /comments/edges:a:nonsense', + 'E_SOURCE_META_ANCHOR /comments/block:a:b', ]) }) @@ -116,21 +118,21 @@ describe('parseCodeMeta', () => { }, }) ).toEqual([ - 'E_CODE_META_SHAPE /comments/header/0/kind', - 'E_CODE_META_SHAPE /comments/header/1/placement', - 'E_CODE_META_UNKNOWN_FIELD /comments/header/2/color', + 'E_SOURCE_META_SHAPE /comments/header/0/kind', + 'E_SOURCE_META_SHAPE /comments/header/1/placement', + 'E_SOURCE_META_UNKNOWN_FIELD /comments/header/2/color', ]) }) }) -describe('pruneCodeMeta and remapCodeMeta', () => { +describe('pruneSourceMeta and remapSourceMeta', () => { it('prunes every entry of a deleted block or variable and keeps id-free anchors', () => { const meta = parsed(validMeta()) - const pruned = pruneCodeMeta(meta, { + const pruned = pruneSourceMeta(meta, { blocks: (id) => id !== 'blk-b', variables: () => false, }) - expect(pruned.bindings).toEqual({ 'blk-a': 'fetchUser' }) + expect(pruned.idents).toEqual({ 'blk-a': 'fetchUser' }) expect(pruned.order).toEqual({ 'blk-a': 0 }) expect(Object.keys(pruned.comments).sort()).toEqual(['block:blk-a', 'header']) expect(pruned['x-future']).toEqual(meta['x-future']) @@ -138,15 +140,15 @@ describe('pruneCodeMeta and remapCodeMeta', () => { it('remaps ids onto a copy and drops ids the copy did not take', () => { const meta = parsed(validMeta()) - const copy = remapCodeMeta(meta, new Map([['blk-a', 'new-a']]), new Map([['var-1', 'v-2']])) - expect(copy.bindings).toEqual({ 'new-a': 'fetchUser' }) + const copy = remapSourceMeta(meta, new Map([['blk-a', 'new-a']]), new Map([['var-1', 'v-2']])) + expect(copy.idents).toEqual({ 'new-a': 'fetchUser' }) expect(copy.order).toEqual({ 'new-a': 0 }) expect(Object.keys(copy.comments).sort()).toEqual(['block:new-a', 'header', 'var:v-2']) }) - it('keeps one binding when two ids collapse onto one', () => { + it('keeps one ident when two ids collapse onto one', () => { const meta = parsed(validMeta()) - const merged = remapCodeMeta( + const merged = remapSourceMeta( meta, new Map([ ['blk-a', 'same'], @@ -154,8 +156,8 @@ describe('pruneCodeMeta and remapCodeMeta', () => { ]), new Map() ) - expect(merged.bindings).toEqual({ same: 'fetchUser' }) - expect(parseCodeMeta(merged).diagnostics).toBeUndefined() + expect(merged.idents).toEqual({ same: 'fetchUser' }) + expect(parseSourceMeta(merged).diagnostics).toBeUndefined() }) }) @@ -163,7 +165,8 @@ const idArb = fc.stringMatching(/^[a-z0-9:%-]{1,8}$/) const identifierArb = fc .stringMatching(/^[a-z][A-Za-z0-9]{0,6}$/) .filter( - (s) => parseCodeMeta({ v: 1, bindings: { x: s }, order: {}, comments: {} }).meta !== undefined + (s) => + parseSourceMeta({ version: 1, idents: { x: s }, order: {}, comments: {} }).meta !== undefined ) const commentArb: fc.Arbitrary = fc.record({ text: fc.string(), @@ -188,7 +191,7 @@ function anchorArb(blockIds: string[], variableIds: string[]): fc.Arbitrary = fc @@ -199,7 +202,7 @@ const metaArb: fc.Arbitrary<{ .chain(({ blockIds, variableIds }) => fc .record({ - bindings: fc.uniqueArray(identifierArb, { + idents: fc.uniqueArray(identifierArb, { minLength: blockIds.length, maxLength: blockIds.length, }), @@ -212,10 +215,10 @@ const metaArb: fc.Arbitrary<{ { maxLength: 6 } ), }) - .map(({ bindings, order, comments }) => { - const meta: WorkflowCodeMetaV1 = { - v: 1, - bindings: Object.fromEntries(blockIds.map((id, i) => [id, bindings[i] ?? 'b'])), + .map(({ idents, order, comments }) => { + const meta: WorkflowSourceMetaV1 = { + version: 1, + idents: Object.fromEntries(blockIds.map((id, i) => [id, idents[i] ?? 'b'])), order: Object.fromEntries(blockIds.map((id, i) => [id, order[i] ?? 0])), comments: {}, } @@ -228,8 +231,8 @@ const metaArb: fc.Arbitrary<{ * The block ids `meta` mentions. Variable ids are a separate namespace (`var:` anchors), so a * variable that shares a removed block's id is not a mention of that block. */ -function mentionedBlockIds(meta: WorkflowCodeMetaV1): Set { - const ids = new Set([...Object.keys(meta.bindings), ...Object.keys(meta.order)]) +function mentionedBlockIds(meta: WorkflowSourceMetaV1): Set { + const ids = new Set([...Object.keys(meta.idents), ...Object.keys(meta.order)]) for (const key of Object.keys(meta.comments)) { const anchor = decodeAnchor(key as AnchorKey) if (anchor && 'block' in anchor) ids.add(anchor.block) @@ -237,11 +240,11 @@ function mentionedBlockIds(meta: WorkflowCodeMetaV1): Set { return ids } -describe('code_meta properties', () => { +describe('source meta properties', () => { it('every generated value parses back to itself', () => { fc.assert( fc.property(metaArb, ({ meta }) => { - expect(codeMetaEquals(parsed(JSON.stringify(meta)), meta)).toBe(true) + expect(sourceMetaEquals(parsed(JSON.stringify(meta)), meta)).toBe(true) }) ) }) @@ -251,14 +254,14 @@ describe('code_meta properties', () => { fc.property(metaArb, ({ meta, blockIds, variableIds }) => { const forward = new Map(blockIds.map((id, i) => [id, `copy-${i}`])) const vars = new Map(variableIds.map((id, i) => [id, `copyvar-${i}`])) - const copy = remapCodeMeta(meta, forward, vars) - expect(parseCodeMeta(copy).diagnostics).toBeUndefined() - const back = remapCodeMeta( + const copy = remapSourceMeta(meta, forward, vars) + expect(parseSourceMeta(copy).diagnostics).toBeUndefined() + const back = remapSourceMeta( copy, new Map([...forward].map(([a, b]) => [b, a])), new Map([...vars].map(([a, b]) => [b, a])) ) - expect(codeMetaEquals(back, meta)).toBe(true) + expect(sourceMetaEquals(back, meta)).toBe(true) }) ) }) @@ -267,11 +270,11 @@ describe('code_meta properties', () => { fc.assert( fc.property(metaArb, fc.integer({ min: 0, max: 5 }), ({ meta, blockIds }, drop) => { const removed = blockIds[drop % blockIds.length] - const pruned = pruneCodeMeta(meta, { blocks: (id) => id !== removed }) + const pruned = pruneSourceMeta(meta, { blocks: (id) => id !== removed }) expect(mentionedBlockIds(pruned).has(removed)).toBe(false) - expect(codeMetaEquals(pruneCodeMeta(meta, { blocks: () => true }), meta)).toBe(true) + expect(sourceMetaEquals(pruneSourceMeta(meta, { blocks: () => true }), meta)).toBe(true) for (const id of blockIds) { - if (id !== removed) expect(pruned.bindings[id]).toBe(meta.bindings[id]) + if (id !== removed) expect(pruned.idents[id]).toBe(meta.idents[id]) } for (const key of Object.keys(meta.comments) as AnchorKey[]) { if (decodeAnchor(key)?.kind === 'var') { diff --git a/packages/workflow-code/src/code-meta.ts b/packages/workflow-code/src/source-meta.ts similarity index 66% rename from packages/workflow-code/src/code-meta.ts rename to packages/workflow-code/src/source-meta.ts index b6d6316b70e..97b1a016556 100644 --- a/packages/workflow-code/src/code-meta.ts +++ b/packages/workflow-code/src/source-meta.ts @@ -1,5 +1,5 @@ /** - * `workflow.code_meta`: the server-side half of the lock (build-spec decision 6). It keeps the + * `workflow_source_meta`: the server-side half of the lock (build-spec decision 6). It keeps the * facts a source file carries that the stored graph does not (each block's `const` identifier, * its declaration order, and comments) so they survive edits made only on the canvas and prints * that have no repo lock. @@ -11,13 +11,13 @@ * Branch keys are not stored here: they persist on the condition/router rows themselves as the * optional row `key` (s1 D2b), which canonicalize already reads. * - * Version policy matches the lock's: adding an optional field does not bump `v`; until every + * Version policy matches the lock's: adding an optional field does not bump `version`; until every * reader knows a field, data goes under an `x-` key, which the validator tolerates and preserves. */ import { isRecordLike } from '@sim/utils/object' import { decodeAnchor, encodeAnchor } from './anchors' -import type { CodeMetaDiagnosticCode } from './diagnostics/codes' +import type { SourceMetaDiagnosticCode } from './diagnostics/codes' import type { Diagnostic } from './diagnostics/frame' import { stableStringify } from './hash' import { @@ -27,79 +27,83 @@ import { jsonInput, type LockExtensionKey, pointer, - readBinding, readExtensions, + readIdent, } from './lock' import type { Anchor, AnchorKey, CodeComment, Json } from './model' -export interface WorkflowCodeMetaV1 { +export interface WorkflowSourceMetaV1 { [extension: LockExtensionKey]: Json - v: 1 + version: 1 /** Block id → the TS `const` identifier it prints as. Never in `SDK_RESERVED_IDENTIFIERS`. */ - bindings: Record + idents: Record /** Block id → print-order tie-break (a non-negative integer; not unique, like the lock's). */ order: Record /** Comments by id-anchored `AnchorKey`, in source order. */ comments: Partial> } -export type CodeMetaDiagnostic = Diagnostic +export type SourceMetaDiagnostic = Diagnostic -export type ParseCodeMetaResult = - | { meta: WorkflowCodeMetaV1; diagnostics?: undefined } - | { meta?: undefined; diagnostics: CodeMetaDiagnostic[] } +export type ParseSourceMetaResult = + | { meta: WorkflowSourceMetaV1; diagnostics?: undefined } + | { meta?: undefined; diagnostics: SourceMetaDiagnostic[] } -const META_FIELDS = ['v', 'bindings', 'order', 'comments'] +const META_FIELDS = ['version', 'idents', 'order', 'comments'] const COMMENT_FIELDS = ['text', 'kind', 'placement'] -class CodeMetaReader { - readonly diagnostics: CodeMetaDiagnostic[] = [] +class SourceMetaReader { + readonly diagnostics: SourceMetaDiagnostic[] = [] - report(code: CodeMetaDiagnosticCode, segments: readonly string[], message: string): void { + report(code: SourceMetaDiagnosticCode, segments: readonly string[], message: string): void { this.diagnostics.push({ code, severity: 'error', message, path: pointer(segments) }) } extensions(value: Record): Record { return readExtensions(value, META_FIELDS, (field, problem) => problem === 'unknown' - ? this.report('E_CODE_META_UNKNOWN_FIELD', [field], `Unknown code_meta field "${field}".`) - : this.report('E_CODE_META_SHAPE', [field], 'An extension field must hold JSON.') + ? this.report( + 'E_SOURCE_META_UNKNOWN_FIELD', + [field], + `Unknown source meta field "${field}".` + ) + : this.report('E_SOURCE_META_SHAPE', [field], 'An extension field must hold JSON.') ) } - bindings(raw: unknown): Record { + idents(raw: unknown): Record { if (!isRecordLike(raw)) { - this.report('E_CODE_META_SHAPE', ['bindings'], '"bindings" must be an object.') + this.report('E_SOURCE_META_SHAPE', ['idents'], '"idents" must be an object.') return {} } const holders = new Map() const entries: Array<[string, string]> = [] for (const [blockId, value] of Object.entries(raw)) { - const at = ['bindings', blockId] - const read = readBinding(value) + const at = ['idents', blockId] + const read = readIdent(value) if ('problem' in read) { - this.report('E_CODE_META_BINDING', at, read.problem) + this.report('E_SOURCE_META_IDENT', at, read.problem) continue } - const { binding } = read - const holder = holders.get(binding) + const { ident } = read + const holder = holders.get(ident) if (holder !== undefined) { this.report( - 'E_CODE_META_DUPLICATE_BINDING', + 'E_SOURCE_META_DUPLICATE_IDENT', at, - `Binding "${binding}" is already used by block "${holder}".` + `Ident "${ident}" is already used by block "${holder}".` ) continue } - holders.set(binding, blockId) - entries.push([blockId, binding]) + holders.set(ident, blockId) + entries.push([blockId, ident]) } return Object.fromEntries(entries) } order(raw: unknown): Record { if (!isRecordLike(raw)) { - this.report('E_CODE_META_SHAPE', ['order'], '"order" must be an object.') + this.report('E_SOURCE_META_SHAPE', ['order'], '"order" must be an object.') return {} } const entries: Array<[string, number]> = [] @@ -107,7 +111,11 @@ class CodeMetaReader { if (isPrintOrder(order)) { entries.push([blockId, order]) } else { - this.report('E_CODE_META_SHAPE', ['order', blockId], 'An order is a non-negative integer.') + this.report( + 'E_SOURCE_META_SHAPE', + ['order', blockId], + 'An order is a non-negative integer.' + ) } } return Object.fromEntries(entries) @@ -115,13 +123,13 @@ class CodeMetaReader { comment(raw: unknown, at: readonly string[]): CodeComment | null { if (!isRecordLike(raw)) { - this.report('E_CODE_META_SHAPE', at, 'A comment must be an object.') + this.report('E_SOURCE_META_SHAPE', at, 'A comment must be an object.') return null } for (const field of Object.keys(raw)) { if (!COMMENT_FIELDS.includes(field)) { this.report( - 'E_CODE_META_UNKNOWN_FIELD', + 'E_SOURCE_META_UNKNOWN_FIELD', [...at, field], `Unknown comment field "${field}".` ) @@ -129,16 +137,16 @@ class CodeMetaReader { } const { text, kind, placement } = raw if (typeof text !== 'string') { - this.report('E_CODE_META_SHAPE', [...at, 'text'], '"text" must be a string.') + this.report('E_SOURCE_META_SHAPE', [...at, 'text'], '"text" must be a string.') return null } if (kind !== 'line' && kind !== 'block') { - this.report('E_CODE_META_SHAPE', [...at, 'kind'], '"kind" is "line" or "block".') + this.report('E_SOURCE_META_SHAPE', [...at, 'kind'], '"kind" is "line" or "block".') return null } if (placement !== 'leading' && placement !== 'trailing') { this.report( - 'E_CODE_META_SHAPE', + 'E_SOURCE_META_SHAPE', [...at, 'placement'], '"placement" is "leading" or "trailing".' ) @@ -149,7 +157,7 @@ class CodeMetaReader { comments(raw: unknown): Partial> { if (!isRecordLike(raw)) { - this.report('E_CODE_META_SHAPE', ['comments'], '"comments" must be an object.') + this.report('E_SOURCE_META_SHAPE', ['comments'], '"comments" must be an object.') return {} } const result: Partial> = {} @@ -157,11 +165,11 @@ class CodeMetaReader { const at = ['comments', key] const anchor = decodeAnchor(key) if (!anchor || encodeAnchor(anchor) !== key) { - this.report('E_CODE_META_ANCHOR', at, `"${key}" is not a comment anchor.`) + this.report('E_SOURCE_META_ANCHOR', at, `"${key}" is not a comment anchor.`) continue } if (!Array.isArray(list)) { - this.report('E_CODE_META_SHAPE', at, 'Comments must be an array.') + this.report('E_SOURCE_META_SHAPE', at, 'Comments must be an array.') continue } const comments: CodeComment[] = [] @@ -176,38 +184,42 @@ class CodeMetaReader { } /** - * Validates a stored `code_meta` value, given as parsed JSON or as JSON text. Mirrors + * Validates a stored source meta value, given as parsed JSON or as JSON text. Mirrors * `parseWorkflowLock`: every problem is reported at once with an RFC 6901 `path`, any problem * rejects the whole value, unknown fields are errors except `x-` extensions (preserved), and a * version other than 1 stops validation there. */ -export function parseCodeMeta(input: unknown): ParseCodeMetaResult { - const reader = new CodeMetaReader() +export function parseSourceMeta(input: unknown): ParseSourceMetaResult { + const reader = new SourceMetaReader() const parsed = jsonInput(input) if (!parsed) { - reader.report('E_CODE_META_JSON', [], 'code_meta is not valid JSON.') + reader.report('E_SOURCE_META_JSON', [], 'source meta is not valid JSON.') return { diagnostics: reader.diagnostics } } const { json } = parsed if (!isRecordLike(json)) { - reader.report('E_CODE_META_SHAPE', [], 'code_meta must be a JSON object.') + reader.report('E_SOURCE_META_SHAPE', [], 'source meta must be a JSON object.') return { diagnostics: reader.diagnostics } } - if (json.v !== 1) { - reader.report('E_CODE_META_VERSION', ['v'], 'Unsupported code_meta version; expected 1.') + if (json.version !== 1) { + reader.report( + 'E_SOURCE_META_VERSION', + ['version'], + 'Unsupported source meta version; expected 1.' + ) return { diagnostics: reader.diagnostics } } const extensions = reader.extensions(json) - const bindings = reader.bindings(json.bindings) + const idents = reader.idents(json.idents) const order = reader.order(json.order) const comments = reader.comments(json.comments) if (reader.diagnostics.length > 0) return { diagnostics: reader.diagnostics } - return { meta: { ...extensions, v: 1, bindings, order, comments } } + return { meta: { ...extensions, version: 1, idents, order, comments } } } -/** An empty `code_meta`. */ -export function emptyCodeMeta(): WorkflowCodeMetaV1 { - return { v: 1, bindings: {}, order: {}, comments: {} } +/** An empty source meta. */ +export function emptySourceMeta(): WorkflowSourceMetaV1 { + return { version: 1, idents: {}, order: {}, comments: {} } } /** @@ -236,8 +248,8 @@ export function mapAnchorIds( } } -/** The `x-` extension fields of a `code_meta`, which every rewrite preserves. */ -export function codeMetaExtensions(meta: WorkflowCodeMetaV1): Record { +/** The `x-` extension fields of a source meta, which every rewrite preserves. */ +export function sourceMetaExtensions(meta: WorkflowSourceMetaV1): Record { const extensions: Record = {} for (const [field, value] of Object.entries(meta)) { if (isExtensionKey(field) && isJson(value)) extensions[field] = value @@ -247,21 +259,21 @@ export function codeMetaExtensions(meta: WorkflowCodeMetaV1): Record string | null, variable: (id: string) => string | null -): WorkflowCodeMetaV1 { - const bindings: Record = {} +): WorkflowSourceMetaV1 { + const idents: Record = {} const taken = new Set() - for (const [id, binding] of Object.entries(meta.bindings)) { + for (const [id, ident] of Object.entries(meta.idents)) { const next = block(id) - if (next === null || Object.hasOwn(bindings, next) || taken.has(binding)) continue - bindings[next] = binding - taken.add(binding) + if (next === null || Object.hasOwn(idents, next) || taken.has(ident)) continue + idents[next] = ident + taken.add(ident) } const order: Record = {} for (const [id, value] of Object.entries(meta.order)) { @@ -276,7 +288,7 @@ function mapCodeMetaIds( const mappedKey = encodeAnchor(mapped) comments[mappedKey] = [...(comments[mappedKey] ?? []), ...list] } - return { ...codeMetaExtensions(meta), v: 1, bindings, order, comments } + return { ...sourceMetaExtensions(meta), version: 1, idents, order, comments } } /** @@ -284,12 +296,12 @@ function mapCodeMetaIds( * answer whether an id is still stored; an omitted predicate keeps every id of that kind. * Readers still tolerate stale ids: pruning is hygiene, not the correctness gate. */ -export function pruneCodeMeta( - meta: WorkflowCodeMetaV1, +export function pruneSourceMeta( + meta: WorkflowSourceMetaV1, live: { blocks?: (id: string) => boolean; variables?: (id: string) => boolean } -): WorkflowCodeMetaV1 { +): WorkflowSourceMetaV1 { const { blocks, variables } = live - return mapCodeMetaIds( + return mapSourceMetaIds( meta, (id) => (!blocks || blocks(id) ? id : null), (id) => (!variables || variables(id) ? id : null) @@ -301,12 +313,12 @@ export function pruneCodeMeta( * `blockIds` and each variable id through `variableIds`. Ids absent from a map are dropped, so a * copy never carries entries for blocks it did not copy. */ -export function remapCodeMeta( - meta: WorkflowCodeMetaV1, +export function remapSourceMeta( + meta: WorkflowSourceMetaV1, blockIds: ReadonlyMap, variableIds: ReadonlyMap -): WorkflowCodeMetaV1 { - return mapCodeMetaIds( +): WorkflowSourceMetaV1 { + return mapSourceMetaIds( meta, (id) => blockIds.get(id) ?? null, (id) => variableIds.get(id) ?? null @@ -314,16 +326,16 @@ export function remapCodeMeta( } /** Whether two values hold the same entries, extensions included, in any key order. */ -export function codeMetaEquals(a: WorkflowCodeMetaV1, b: WorkflowCodeMetaV1): boolean { +export function sourceMetaEquals(a: WorkflowSourceMetaV1, b: WorkflowSourceMetaV1): boolean { return stableStringify(a) === stableStringify(b) } /** Whether `meta` holds nothing worth storing (no entries and no extensions). */ -export function isEmptyCodeMeta(meta: WorkflowCodeMetaV1): boolean { +export function isEmptySourceMeta(meta: WorkflowSourceMetaV1): boolean { return ( - Object.keys(meta.bindings).length === 0 && + Object.keys(meta.idents).length === 0 && Object.keys(meta.order).length === 0 && Object.keys(meta.comments).length === 0 && - Object.keys(codeMetaExtensions(meta)).length === 0 + Object.keys(sourceMetaExtensions(meta)).length === 0 ) } diff --git a/packages/workflow-persistence/package.json b/packages/workflow-persistence/package.json index 05350a13b58..098054f7e24 100644 --- a/packages/workflow-persistence/package.json +++ b/packages/workflow-persistence/package.json @@ -10,9 +10,9 @@ "node": ">=20.0.0" }, "exports": { - "./code-meta": { - "types": "./src/code-meta.ts", - "default": "./src/code-meta.ts" + "./source-meta": { + "types": "./src/source-meta.ts", + "default": "./src/source-meta.ts" }, "./load": { "types": "./src/load.ts", diff --git a/packages/workflow-persistence/src/save.ts b/packages/workflow-persistence/src/save.ts index 913a13ede9a..8b9da592308 100644 --- a/packages/workflow-persistence/src/save.ts +++ b/packages/workflow-persistence/src/save.ts @@ -9,7 +9,7 @@ import { } from '@sim/workflow-types/workflow' import type { InferInsertModel } from 'drizzle-orm' import { eq } from 'drizzle-orm' -import { pruneWorkflowCodeMeta } from './code-meta' +import { pruneWorkflowSourceMeta } from './source-meta' import { generateLoopBlocks, generateParallelBlocks } from './subflow-helpers' import type { DbOrTx } from './types' @@ -102,7 +102,7 @@ export async function saveWorkflowToNormalizedTables( } const savedBlockIds = new Set(Object.keys(state.blocks)) - await pruneWorkflowCodeMeta(tx, workflowId, { blocks: (id) => savedBlockIds.has(id) }) + await pruneWorkflowSourceMeta(tx, workflowId, { blocks: (id) => savedBlockIds.has(id) }) } if (externalTx) { diff --git a/packages/workflow-persistence/src/code-meta.ts b/packages/workflow-persistence/src/source-meta.ts similarity index 53% rename from packages/workflow-persistence/src/code-meta.ts rename to packages/workflow-persistence/src/source-meta.ts index adf725505ee..1826d957bed 100644 --- a/packages/workflow-persistence/src/code-meta.ts +++ b/packages/workflow-persistence/src/source-meta.ts @@ -1,7 +1,7 @@ /** - * Reads and writes a workflow's code metadata (`WorkflowCodeMetaV1`): the bindings, declaration + * Reads and writes a workflow's code metadata (`WorkflowSourceMetaV1`): the idents, declaration * order and comments its source form keeps beside the graph, keyed by block id. It lives in the - * `workflow_code_meta` side table, not on the workflow row or in the normalized state, so it never + * `workflow_source_meta` side table, not on the workflow row or in the normalized state, so it never * counts as a deploy change and no ordinary read of the workflow row loads it. A workflow has no * row until a source is applied, and an empty value deletes the row. * @@ -9,29 +9,29 @@ * their entries in the same transaction. Readers still tolerate stale ids. */ -import { workflowCodeMeta } from '@sim/db' +import { workflowSourceMeta } from '@sim/db' import { createLogger } from '@sim/logger' import { - codeMetaEquals, - isEmptyCodeMeta, - parseCodeMeta, - pruneCodeMeta, - type WorkflowCodeMetaV1, -} from '@sim/workflow-code/code-meta' + isEmptySourceMeta, + parseSourceMeta, + pruneSourceMeta, + sourceMetaEquals, + type WorkflowSourceMetaV1, +} from '@sim/workflow-code/source-meta' import { and, eq, sql } from 'drizzle-orm' import type { DbOrTx } from './types' -const logger = createLogger('WorkflowCodeMeta') +const logger = createLogger('WorkflowSourceMeta') /** * Validates a stored value. An invalid value reads as `null` (and is logged), so one corrupt - * entry degrades to derived bindings and order instead of failing a read. + * entry degrades to derived idents and order instead of failing a read. */ -function readCodeMetaValue(workflowId: string, stored: unknown): WorkflowCodeMetaV1 | null { +function readSourceMetaValue(workflowId: string, stored: unknown): WorkflowSourceMetaV1 | null { if (stored === null || stored === undefined) return null - const parsed = parseCodeMeta(stored) + const parsed = parseSourceMeta(stored) if (parsed.meta) return parsed.meta - logger.warn('Ignoring invalid workflow code_meta', { + logger.warn('Ignoring invalid workflow source meta', { workflowId, codes: parsed.diagnostics.map((diagnostic) => diagnostic.code), }) @@ -39,41 +39,41 @@ function readCodeMetaValue(workflowId: string, stored: unknown): WorkflowCodeMet } /** The stored value as written, or `undefined` when the workflow has no row. */ -async function readStoredCodeMeta(executor: DbOrTx, workflowId: string): Promise { +async function readStoredSourceMeta(executor: DbOrTx, workflowId: string): Promise { const [row] = await executor - .select({ meta: workflowCodeMeta.meta }) - .from(workflowCodeMeta) - .where(eq(workflowCodeMeta.workflowId, workflowId)) + .select({ meta: workflowSourceMeta.meta }) + .from(workflowSourceMeta) + .where(eq(workflowSourceMeta.workflowId, workflowId)) .limit(1) return row?.meta } /** The workflow's code metadata, or `null` when it has none or the stored value is invalid. */ -export async function readWorkflowCodeMeta( +export async function readWorkflowSourceMeta( executor: DbOrTx, workflowId: string -): Promise { - return readCodeMetaValue(workflowId, await readStoredCodeMeta(executor, workflowId)) +): Promise { + return readSourceMetaValue(workflowId, await readStoredSourceMeta(executor, workflowId)) } /** * Stores `meta` for an existing workflow (the row references it). An empty value deletes the row, * so untouched workflows keep none. */ -export async function writeWorkflowCodeMeta( +export async function writeWorkflowSourceMeta( executor: DbOrTx, workflowId: string, - meta: WorkflowCodeMetaV1 | null + meta: WorkflowSourceMetaV1 | null ): Promise { - if (!meta || isEmptyCodeMeta(meta)) { - await executor.delete(workflowCodeMeta).where(eq(workflowCodeMeta.workflowId, workflowId)) + if (!meta || isEmptySourceMeta(meta)) { + await executor.delete(workflowSourceMeta).where(eq(workflowSourceMeta.workflowId, workflowId)) return } const updatedAt = new Date() await executor - .insert(workflowCodeMeta) + .insert(workflowSourceMeta) .values({ workflowId, meta, updatedAt }) - .onConflictDoUpdate({ target: workflowCodeMeta.workflowId, set: { meta, updatedAt } }) + .onConflictDoUpdate({ target: workflowSourceMeta.workflowId, set: { meta, updatedAt } }) } /** @@ -84,27 +84,27 @@ export async function writeWorkflowCodeMeta( * in between, its value wins and this prune is skipped (stale ids are harmless, every reader * filters by the stored graph). */ -export async function pruneWorkflowCodeMeta( +export async function pruneWorkflowSourceMeta( executor: DbOrTx, workflowId: string, live: { blocks?: (id: string) => boolean; variables?: (id: string) => boolean } ): Promise { - const stored = await readStoredCodeMeta(executor, workflowId) + const stored = await readStoredSourceMeta(executor, workflowId) if (stored === undefined) return - const meta = readCodeMetaValue(workflowId, stored) + const meta = readSourceMetaValue(workflowId, stored) if (!meta) return - const pruned = pruneCodeMeta(meta, live) - if (codeMetaEquals(pruned, meta)) return + const pruned = pruneSourceMeta(meta, live) + if (sourceMetaEquals(pruned, meta)) return const unchanged = and( - eq(workflowCodeMeta.workflowId, workflowId), - sql`${workflowCodeMeta.meta} = ${JSON.stringify(stored)}::jsonb` + eq(workflowSourceMeta.workflowId, workflowId), + sql`${workflowSourceMeta.meta} = ${JSON.stringify(stored)}::jsonb` ) - if (isEmptyCodeMeta(pruned)) { - await executor.delete(workflowCodeMeta).where(unchanged) + if (isEmptySourceMeta(pruned)) { + await executor.delete(workflowSourceMeta).where(unchanged) return } await executor - .update(workflowCodeMeta) + .update(workflowSourceMeta) .set({ meta: pruned, updatedAt: new Date() }) .where(unchanged) } From 20cbc6c4bd579d16e15d303eea9eda5b1a30dd24 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 01:05:15 -0800 Subject: [PATCH 145/428] refactor(db): rename the unreleased source tables workflow_source_meta and workspace_resource_key Migrations 0460 and 0461 are unreleased, so they are rewritten in place (with their snapshots and journal tags) rather than followed by renames. The resource key helpers move to resource-keys.ts around workspaceResourceKey, and the persistence, duplicate, fork and realtime prune paths read and write source meta. --- apps/realtime/src/database/operations.ts | 8 +- ...on.ts => source-meta-prune.integration.ts} | 36 +++--- .../lib/copy/copy-workflows.ts | 19 +-- .../ee/workspace-forking/lib/create-fork.ts | 2 +- .../workspace-forking/lib/promote/promote.ts | 2 +- .../lib/workflows/persistence/duplicate.ts | 15 ++- ...egration.ts => source-meta.integration.ts} | 115 +++++++++--------- ...ration.ts => resource-keys.integration.ts} | 32 ++--- ...bindings.test.ts => resource-keys.test.ts} | 2 +- ...{resource-bindings.ts => resource-keys.ts} | 56 ++++----- .../db/migrations/0460_workflow_code_meta.sql | 7 -- .../migrations/0460_workflow_source_meta.sql | 7 ++ .../0461_workspace_resource_binding.sql | 19 --- .../0461_workspace_resource_key.sql | 19 +++ .../db/migrations/meta/0460_snapshot.json | 10 +- .../db/migrations/meta/0461_snapshot.json | 46 +++---- packages/db/migrations/meta/_journal.json | 4 +- packages/db/schema.ts | 16 +-- .../src/mocks/schema-tables.generated.ts | 4 +- 19 files changed, 215 insertions(+), 204 deletions(-) rename apps/realtime/src/database/{code-meta-prune.integration.ts => source-meta-prune.integration.ts} (80%) rename apps/sim/lib/workflows/persistence/{code-meta.integration.ts => source-meta.integration.ts} (75%) rename apps/sim/lib/workspaces/{resource-bindings.integration.ts => resource-keys.integration.ts} (90%) rename apps/sim/lib/workspaces/{resource-bindings.test.ts => resource-keys.test.ts} (98%) rename apps/sim/lib/workspaces/{resource-bindings.ts => resource-keys.ts} (88%) delete mode 100644 packages/db/migrations/0460_workflow_code_meta.sql create mode 100644 packages/db/migrations/0460_workflow_source_meta.sql delete mode 100644 packages/db/migrations/0461_workspace_resource_binding.sql create mode 100644 packages/db/migrations/0461_workspace_resource_key.sql diff --git a/apps/realtime/src/database/operations.ts b/apps/realtime/src/database/operations.ts index 57977ca88f2..284677af888 100644 --- a/apps/realtime/src/database/operations.ts +++ b/apps/realtime/src/database/operations.ts @@ -24,8 +24,8 @@ import { WORKFLOW_OPERATIONS, } from '@sim/realtime-protocol/constants' import { randomFloat } from '@sim/utils/random' -import { pruneWorkflowCodeMeta } from '@sim/workflow-persistence/code-meta' import { loadWorkflowFromNormalizedTablesRaw } from '@sim/workflow-persistence/load' +import { pruneWorkflowSourceMeta } from '@sim/workflow-persistence/source-meta' import { mergeSubBlockValues } from '@sim/workflow-persistence/subblocks' import type { DbOrTx } from '@sim/workflow-persistence/types' import { @@ -1272,7 +1272,7 @@ async function handleBlocksOperationTx( await updateSubflowNodeList(tx, workflowId, parentId) } - await pruneWorkflowCodeMeta(tx, workflowId, { + await pruneWorkflowSourceMeta(tx, workflowId, { blocks: (id) => !allBlocksToDelete.has(id), }) @@ -2157,7 +2157,7 @@ async function handleVariableOperationTx( updatedAt: new Date(), }) .where(eq(workflow.id, workflowId)) - await pruneWorkflowCodeMeta(tx, workflowId, { + await pruneWorkflowSourceMeta(tx, workflowId, { variables: (id) => id !== payload.variableId, }) @@ -2251,7 +2251,7 @@ async function handleWorkflowOperationTx( if (blockValues.length > 0) { await tx.insert(workflowBlocks).values(blockValues) } - await pruneWorkflowCodeMeta(tx, workflowId, { + await pruneWorkflowSourceMeta(tx, workflowId, { blocks: (id) => Object.hasOwn(merged.blocks, id), }) diff --git a/apps/realtime/src/database/code-meta-prune.integration.ts b/apps/realtime/src/database/source-meta-prune.integration.ts similarity index 80% rename from apps/realtime/src/database/code-meta-prune.integration.ts rename to apps/realtime/src/database/source-meta-prune.integration.ts index fed2d68bbe1..bc96e209332 100644 --- a/apps/realtime/src/database/code-meta-prune.integration.ts +++ b/apps/realtime/src/database/source-meta-prune.integration.ts @@ -1,12 +1,12 @@ /** * Real PostgreSQL coverage: canvas deletes through the realtime server prune the deleted blocks' - * and variables' entries from the `workflow_code_meta` side table, and delete its row once nothing + * and variables' entries from the `workflow_source_meta` side table, and delete its row once nothing * is left, so source bindings and comments never outlive what they describe. */ import { mkdir, writeFile } from 'node:fs/promises' import { dirname, resolve } from 'node:path' import { db } from '@sim/db' -import { user, workflow, workflowBlocks, workflowCodeMeta, workspace } from '@sim/db/schema' +import { user, workflow, workflowBlocks, workflowSourceMeta, workspace } from '@sim/db/schema' import { deleteWorkspaceFixture, insertWorkspaceFixture } from '@sim/db/testing/workspace-fixtures' import { BLOCKS_OPERATIONS, @@ -15,7 +15,7 @@ import { } from '@sim/realtime-protocol/constants' import { getErrorMessage } from '@sim/utils/errors' import { generateId } from '@sim/utils/id' -import { writeWorkflowCodeMeta } from '@sim/workflow-persistence/code-meta' +import { writeWorkflowSourceMeta } from '@sim/workflow-persistence/source-meta' import { eq } from 'drizzle-orm' import { afterAll, beforeAll, describe, expect, it } from 'vitest' import { persistWorkflowOperation } from '@/database/operations' @@ -29,7 +29,7 @@ const variableId = generateId() const checks: { name: string; status: 'passed' | 'failed'; durationMs: number; error?: string }[] = [] -type StoredCodeMeta = NonNullable[2]> +type StoredSourceMeta = NonNullable[2]> /** Registers a test and records its status and duration in the suite report. */ function check(name: string, run: () => Promise) { @@ -62,19 +62,19 @@ function persist(target: string, operation: string, payload: unknown) { async function storedMeta(): Promise { const [row] = await db - .select({ meta: workflowCodeMeta.meta }) - .from(workflowCodeMeta) - .where(eq(workflowCodeMeta.workflowId, workflowId)) + .select({ meta: workflowSourceMeta.meta }) + .from(workflowSourceMeta) + .where(eq(workflowSourceMeta.workflowId, workflowId)) return row?.meta } -describe('workflow_code_meta pruning on realtime canvas deletes', () => { +describe('workflow_source_meta pruning on realtime canvas deletes', () => { beforeAll(async () => { const now = new Date() await db.insert(user).values({ id: userId, name: 'Code meta prune fixture', - email: `${userId}@code-meta-prune.test`, + email: `${userId}@source-meta-prune.test`, emailVerified: true, createdAt: now, updatedAt: now, @@ -111,8 +111,8 @@ describe('workflow_code_meta pruning on realtime canvas deletes', () => { afterAll(async () => { const reportPath = - process.env.REALTIME_CODE_META_PRUNE_REPORT_PATH ?? - resolve('test-results/realtime-code-meta-prune.json') + process.env.REALTIME_SOURCE_META_PRUNE_REPORT_PATH ?? + resolve('test-results/realtime-source-meta-prune.json') await mkdir(dirname(reportPath), { recursive: true }) await writeFile(reportPath, JSON.stringify({ checks }, null, 2)) await deleteWorkspaceFixture(db, eq(workspace.ownerId, userId)) @@ -120,20 +120,20 @@ describe('workflow_code_meta pruning on realtime canvas deletes', () => { }) check('a block delete drops its entries and keeps the rest', async () => { - const meta: StoredCodeMeta = { - v: 1, + const meta: StoredSourceMeta = { + version: 1, bindings: { [keptId]: 'kept', [deletedId]: 'doomed' }, order: { [keptId]: 0, [deletedId]: 1 }, comments: {}, } - await writeWorkflowCodeMeta(db, workflowId, meta) + await writeWorkflowSourceMeta(db, workflowId, meta) await persist(OPERATION_TARGETS.BLOCKS, BLOCKS_OPERATIONS.BATCH_REMOVE_BLOCKS, { ids: [deletedId], }) expect(await storedMeta()).toEqual({ - v: 1, + version: 1, bindings: { [keptId]: 'kept' }, order: { [keptId]: 0 }, comments: {}, @@ -141,15 +141,15 @@ describe('workflow_code_meta pruning on realtime canvas deletes', () => { }) check('a variable delete that leaves nothing removes the row', async () => { - const meta: StoredCodeMeta = { - v: 1, + const meta: StoredSourceMeta = { + version: 1, bindings: {}, order: {}, comments: { [`var:${variableId}`]: [{ text: ' retry budget', kind: 'line', placement: 'trailing' }], }, } - await writeWorkflowCodeMeta(db, workflowId, meta) + await writeWorkflowSourceMeta(db, workflowId, meta) expect(await storedMeta()).toBeDefined() await persist(OPERATION_TARGETS.VARIABLE, VARIABLE_OPERATIONS.REMOVE, { variableId }) diff --git a/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts b/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts index 54d62921bba..628a9548e74 100644 --- a/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts +++ b/apps/sim/ee/workspace-forking/lib/copy/copy-workflows.ts @@ -3,8 +3,11 @@ import { createLogger } from '@sim/logger' import { generateId } from '@sim/utils/id' import { isRecordLike } from '@sim/utils/object' import type { CanonicalModeOverrides } from '@sim/workflow-code/catalog/canonical-index' -import { remapCodeMeta } from '@sim/workflow-code/code-meta' -import { readWorkflowCodeMeta, writeWorkflowCodeMeta } from '@sim/workflow-persistence/code-meta' +import { remapSourceMeta } from '@sim/workflow-code/source-meta' +import { + readWorkflowSourceMeta, + writeWorkflowSourceMeta, +} from '@sim/workflow-persistence/source-meta' import { and, eq, inArray, isNull } from 'drizzle-orm' import type { FolderResourceType } from '@/lib/api/contracts/folders' import { generateRequestId } from '@/lib/core/utils/request' @@ -427,7 +430,7 @@ export interface CopyWorkflowStateParams { * the target, re-keyed to the copied block and variable ids. A source without any clears the * target's. Omitted leaves the target's own value untouched. */ - codeMetaSourceWorkflowId?: string + sourceMetaFromWorkflowId?: string /** source workflow id -> target workflow id, for `workflow-selector` references */ workflowIdMap: Map /** source folder id -> target folder id */ @@ -499,7 +502,7 @@ export async function copyWorkflowStateIntoTarget( now, sourceState, sourceMeta, - codeMetaSourceWorkflowId, + sourceMetaFromWorkflowId, workflowIdMap, folderIdMap, transformSubBlocks, @@ -756,12 +759,12 @@ export async function copyWorkflowStateIntoTarget( .where(eq(workflow.id, targetWorkflowId)) } - if (codeMetaSourceWorkflowId !== undefined) { - const sourceCodeMeta = await readWorkflowCodeMeta(tx, codeMetaSourceWorkflowId) - await writeWorkflowCodeMeta( + if (sourceMetaFromWorkflowId !== undefined) { + const copiedSourceMeta = await readWorkflowSourceMeta(tx, sourceMetaFromWorkflowId) + await writeWorkflowSourceMeta( tx, targetWorkflowId, - sourceCodeMeta ? remapCodeMeta(sourceCodeMeta, blockIdMapping, varIdMapping) : null + copiedSourceMeta ? remapSourceMeta(copiedSourceMeta, blockIdMapping, varIdMapping) : null ) } diff --git a/apps/sim/ee/workspace-forking/lib/create-fork.ts b/apps/sim/ee/workspace-forking/lib/create-fork.ts index 1552d09ca94..76e4e52c2b7 100644 --- a/apps/sim/ee/workspace-forking/lib/create-fork.ts +++ b/apps/sim/ee/workspace-forking/lib/create-fork.ts @@ -460,7 +460,7 @@ export async function createFork(params: CreateForkParams): Promise { - const meta = await readWorkflowCodeMeta(db, id) - if (!meta) throw new Error(`workflow ${id} has no code_meta`) +async function storedSourceMeta(id: string): Promise { + const meta = await readWorkflowSourceMeta(db, id) + if (!meta) throw new Error(`workflow ${id} has no source meta`) return meta } -async function codeMetaRowCount(id: string): Promise { +async function sourceMetaRowCount(id: string): Promise { const rows = await db - .select({ workflowId: workflowCodeMeta.workflowId }) - .from(workflowCodeMeta) - .where(eq(workflowCodeMeta.workflowId, id)) + .select({ workflowId: workflowSourceMeta.workflowId }) + .from(workflowSourceMeta) + .where(eq(workflowSourceMeta.workflowId, id)) return rows.length } @@ -137,7 +137,7 @@ beforeAll(async () => { await db.insert(user).values({ id: ownerId, name: 'Code meta fixture', - email: `${ownerId}@code-meta.test`, + email: `${ownerId}@source-meta.test`, emailVerified: true, createdAt: now, updatedAt: now, @@ -177,15 +177,15 @@ afterAll(async () => { await db.$client.end() }) -describe('workflow_code_meta against real Postgres', () => { - it('stores code_meta in the side table without making the draft differ from its deployment', async () => { +describe('workflow_source_meta against real Postgres', () => { + it('stores source meta in the side table without making the draft differ from its deployment', async () => { expect(await checkNeedsRedeployment(workflowId)).toBe(false) - expect(await codeMetaRowCount(workflowId)).toBe(0) + expect(await sourceMetaRowCount(workflowId)).toBe(0) - await writeWorkflowCodeMeta(db, workflowId, storedMeta) + await writeWorkflowSourceMeta(db, workflowId, storedMeta) - expect(await storedCodeMeta(workflowId)).toEqual(storedMeta) - expect(await codeMetaRowCount(workflowId)).toBe(1) + expect(await storedSourceMeta(workflowId)).toEqual(storedMeta) + expect(await sourceMetaRowCount(workflowId)).toBe(1) expect(await checkNeedsRedeployment(workflowId)).toBe(false) const snapshot = await loadWorkflowDeploymentSnapshot(workflowId) expect(JSON.stringify(snapshot)).not.toContain('fetchUser') @@ -205,28 +205,33 @@ describe('workflow_code_meta against real Postgres', () => { createdAt: now, updatedAt: now, }) - await writeWorkflowCodeMeta(db, scratchId, storedMeta) - const rewritten = { ...storedMeta, bindings: { [fetchId]: 'loadUser' } } - await writeWorkflowCodeMeta(db, scratchId, rewritten) - expect(await storedCodeMeta(scratchId)).toEqual(rewritten) - expect(await codeMetaRowCount(scratchId)).toBe(1) + await writeWorkflowSourceMeta(db, scratchId, storedMeta) + const rewritten = { ...storedMeta, idents: { [fetchId]: 'loadUser' } } + await writeWorkflowSourceMeta(db, scratchId, rewritten) + expect(await storedSourceMeta(scratchId)).toEqual(rewritten) + expect(await sourceMetaRowCount(scratchId)).toBe(1) - await writeWorkflowCodeMeta(db, scratchId, { v: 1, bindings: {}, order: {}, comments: {} }) - expect(await codeMetaRowCount(scratchId)).toBe(0) - expect(await readWorkflowCodeMeta(db, scratchId)).toBeNull() + await writeWorkflowSourceMeta(db, scratchId, { + version: 1, + idents: {}, + order: {}, + comments: {}, + }) + expect(await sourceMetaRowCount(scratchId)).toBe(0) + expect(await readWorkflowSourceMeta(db, scratchId)).toBeNull() - await writeWorkflowCodeMeta(db, scratchId, storedMeta) + await writeWorkflowSourceMeta(db, scratchId, storedMeta) await db.delete(workflow).where(eq(workflow.id, scratchId)) - expect(await codeMetaRowCount(scratchId)).toBe(0) + expect(await sourceMetaRowCount(scratchId)).toBe(0) }) - it('keeps every entry across a canvas rename, so the lock keeps the binding', async () => { + it('keeps every entry across a canvas rename, so the lock keeps the ident', async () => { await db .update(workflowBlocks) .set({ name: 'Load profile' }) .where(eq(workflowBlocks.id, fetchId)) - const meta = await storedCodeMeta(workflowId) + const meta = await storedSourceMeta(workflowId) expect(meta).toEqual(storedMeta) const state = await loadWorkflowDeploymentSnapshot(workflowId) @@ -236,7 +241,7 @@ describe('workflow_code_meta against real Postgres', () => { meta: { name: 'Code meta fixture', description: null }, }) const lock = buildLockFromState(meta, canonical) - expect(lock.blocks.loadprofile).toMatchObject({ id: fetchId, binding: 'fetchUser', order: 0 }) + expect(lock.blocks.loadprofile).toMatchObject({ id: fetchId, ident: 'fetchUser', order: 0 }) expect(lock.variables).toEqual({ retries: variableId }) }) @@ -248,17 +253,17 @@ describe('workflow_code_meta against real Postgres', () => { success: true, }) - const afterDelete = await storedCodeMeta(workflowId) - expect(afterDelete.bindings).toEqual({ [fetchId]: 'fetchUser', [sendId]: 'notify' }) + const afterDelete = await storedSourceMeta(workflowId) + expect(afterDelete.idents).toEqual({ [fetchId]: 'fetchUser', [sendId]: 'notify' }) expect(afterDelete.order).toEqual({ [fetchId]: 0, [sendId]: 1 }) expect(Object.keys(afterDelete.comments).sort()).toEqual( [anchorFetch, anchorVariable, anchorHeader].sort() ) await db.transaction((tx) => - pruneWorkflowCodeMeta(tx, workflowId, { variables: (id) => id !== variableId }) + pruneWorkflowSourceMeta(tx, workflowId, { variables: (id) => id !== variableId }) ) - expect(Object.keys((await storedCodeMeta(workflowId)).comments).sort()).toEqual( + expect(Object.keys((await storedSourceMeta(workflowId)).comments).sort()).toEqual( [anchorFetch, anchorHeader].sort() ) }) @@ -275,21 +280,21 @@ describe('workflow_code_meta against real Postgres', () => { createdAt: now, updatedAt: now, }) - const onlyFetch: WorkflowCodeMetaV1 = { - v: 1, - bindings: { [fetchId]: 'fetchUser' }, + const onlyFetch: WorkflowSourceMetaV1 = { + version: 1, + idents: { [fetchId]: 'fetchUser' }, order: { [fetchId]: 0 }, comments: {}, } - await writeWorkflowCodeMeta(db, scratchId, onlyFetch) + await writeWorkflowSourceMeta(db, scratchId, onlyFetch) await db.transaction((tx) => - pruneWorkflowCodeMeta(tx, scratchId, { blocks: (id) => id !== fetchId }) + pruneWorkflowSourceMeta(tx, scratchId, { blocks: (id) => id !== fetchId }) ) - expect(await codeMetaRowCount(scratchId)).toBe(0) + expect(await sourceMetaRowCount(scratchId)).toBe(0) await db.delete(workflow).where(eq(workflow.id, scratchId)) }) - it('re-keys code_meta onto the copy when the workflow is duplicated', async () => { + it('re-keys source meta onto the copy when the workflow is duplicated', async () => { const copy = await db.transaction((tx) => duplicateWorkflow({ sourceWorkflowId: workflowId, @@ -310,8 +315,8 @@ describe('workflow_code_meta against real Postgres', () => { expect(copiedFetch).toBeDefined() expect(copiedFetch).not.toBe(fetchId) - const meta = await storedCodeMeta(copy.id) - expect(meta.bindings).toEqual({ + const meta = await storedSourceMeta(copy.id) + expect(meta.idents).toEqual({ [copiedFetch ?? '']: 'fetchUser', [copiedSend ?? '']: 'notify', }) @@ -319,10 +324,10 @@ describe('workflow_code_meta against real Postgres', () => { [encodeAnchor({ kind: 'block', block: copiedFetch ?? '' }), anchorHeader].sort() ) expect(JSON.stringify(meta)).not.toContain(fetchId) - expect(await storedCodeMeta(workflowId)).toMatchObject({ bindings: { [fetchId]: 'fetchUser' } }) + expect(await storedSourceMeta(workflowId)).toMatchObject({ idents: { [fetchId]: 'fetchUser' } }) }) - it('re-keys code_meta onto the derived block ids when the workflow is forked', async () => { + it('re-keys source meta onto the derived block ids when the workflow is forked', async () => { const sourceState = await loadWorkflowDeploymentSnapshot(workflowId) if (!sourceState) throw new Error('missing draft') const targetWorkflowId = generateId() @@ -342,15 +347,15 @@ describe('workflow_code_meta against real Postgres', () => { folderId: null, sortOrder: 0, }, - codeMetaSourceWorkflowId: workflowId, + sourceMetaFromWorkflowId: workflowId, workflowIdMap: new Map([[workflowId, targetWorkflowId]]), folderIdMap: new Map(), nameRegistry: await loadWorkflowNameRegistry(tx, forkWorkspaceId), }) }) - const meta = await storedCodeMeta(targetWorkflowId) - expect(meta.bindings).toEqual({ + const meta = await storedSourceMeta(targetWorkflowId) + expect(meta.idents).toEqual({ [deriveForkBlockId(targetWorkflowId, fetchId)]: 'fetchUser', [deriveForkBlockId(targetWorkflowId, sendId)]: 'notify', }) diff --git a/apps/sim/lib/workspaces/resource-bindings.integration.ts b/apps/sim/lib/workspaces/resource-keys.integration.ts similarity index 90% rename from apps/sim/lib/workspaces/resource-bindings.integration.ts rename to apps/sim/lib/workspaces/resource-keys.integration.ts index 13c51f14c4d..452f2d79487 100644 --- a/apps/sim/lib/workspaces/resource-bindings.integration.ts +++ b/apps/sim/lib/workspaces/resource-keys.integration.ts @@ -9,7 +9,7 @@ import { userTableDefinitions, workflow, workspace, - workspaceResourceBinding, + workspaceResourceKey, } from '@sim/db/schema' import { deleteWorkspaceFixture, insertWorkspaceFixture } from '@sim/db/testing/workspace-fixtures' import { generateId } from '@sim/utils/id' @@ -17,7 +17,7 @@ import type { ResourceKind } from '@sim/workflow-code' import { and, eq, inArray } from 'drizzle-orm' import { afterAll, beforeAll, describe, expect, it } from 'vitest' import { loadResourceKeyResolver } from '@/lib/workflows/code/resources' -import { resolveIds, resolveKeys } from '@/lib/workspaces/resource-bindings' +import { resolveIds, resolveKeys } from '@/lib/workspaces/resource-keys' const userId = generateId() const workspaceId = generateId() @@ -46,25 +46,25 @@ async function idOf(kind: ResourceKind, key: string, wsId = workspaceId) { return (await resolveIds(wsId, [{ kind, key }])).get(kind)?.get(key) } -async function bindingRows(wsId: string, kind: ResourceKind, resourceId: string) { +async function keyRows(wsId: string, kind: ResourceKind, resourceId: string) { return db - .select({ key: workspaceResourceBinding.key, origin: workspaceResourceBinding.origin }) - .from(workspaceResourceBinding) + .select({ key: workspaceResourceKey.key, origin: workspaceResourceKey.origin }) + .from(workspaceResourceKey) .where( and( - eq(workspaceResourceBinding.workspaceId, wsId), - eq(workspaceResourceBinding.kind, kind), - eq(workspaceResourceBinding.resourceId, resourceId) + eq(workspaceResourceKey.workspaceId, wsId), + eq(workspaceResourceKey.kind, kind), + eq(workspaceResourceKey.resourceId, resourceId) ) ) } -describe('workspace resource bindings against PostgreSQL', () => { +describe('workspace resource keys against PostgreSQL', () => { beforeAll(async () => { const now = new Date() await db.insert(user).values({ id: userId, - name: 'Resource binding fixture', + name: 'Resource key fixture', email: `${userId}@fixture.test`, emailVerified: true, createdAt: now, @@ -74,7 +74,7 @@ describe('workspace resource bindings against PostgreSQL', () => { db, [workspaceId, otherWorkspaceId].map((id) => ({ id, - name: 'Resource binding fixture', + name: 'Resource key fixture', ownerId: userId, billedAccountUserId: userId, })) @@ -105,7 +105,7 @@ describe('workspace resource bindings against PostgreSQL', () => { expect(first.get('table')?.get(newer)).toBe('leads-2') expect(await keyOf('table', older)).toBe('leads') - expect(await bindingRows(workspaceId, 'table', older)).toEqual([ + expect(await keyRows(workspaceId, 'table', older)).toEqual([ { key: 'leads', origin: 'allocated' }, ]) expect(await idOf('table', 'leads-2')).toBe(newer) @@ -118,7 +118,7 @@ describe('workspace resource bindings against PostgreSQL', () => { const keys = await Promise.all(Array.from({ length: 6 }, () => keyOf('table', id))) expect(new Set(keys)).toEqual(new Set(['orders'])) - expect(await bindingRows(workspaceId, 'table', id)).toHaveLength(1) + expect(await keyRows(workspaceId, 'table', id)).toHaveLength(1) }) it('gives distinct keys to same-named resources allocated concurrently', async () => { @@ -278,7 +278,7 @@ describe('workspace resource bindings against PostgreSQL', () => { expect(await idOf('table', 'docs')).toBeUndefined() expect(await keyOf('table', older)).toBeUndefined() expect(await keyOf('table', newer)).toBe('docs-2') - expect(await bindingRows(workspaceId, 'table', older)).toEqual([ + expect(await keyRows(workspaceId, 'table', older)).toEqual([ { key: 'docs', origin: 'allocated' }, ]) @@ -297,7 +297,7 @@ describe('workspace resource bindings against PostgreSQL', () => { expect(await idOf('table', 'payroll')).toBeUndefined() expect(await keyOf('table', foreign)).toBeUndefined() - expect(await bindingRows(workspaceId, 'table', foreign)).toEqual([]) + expect(await keyRows(workspaceId, 'table', foreign)).toEqual([]) }) it('allocates inside the caller’s transaction and rolls back with it', async () => { @@ -312,6 +312,6 @@ describe('workspace resource bindings against PostgreSQL', () => { }) ).rejects.toThrow('roll back') - expect(await bindingRows(workspaceId, 'table', id)).toEqual([]) + expect(await keyRows(workspaceId, 'table', id)).toEqual([]) }) }) diff --git a/apps/sim/lib/workspaces/resource-bindings.test.ts b/apps/sim/lib/workspaces/resource-keys.test.ts similarity index 98% rename from apps/sim/lib/workspaces/resource-bindings.test.ts rename to apps/sim/lib/workspaces/resource-keys.test.ts index 2fd20aff437..0624a987a1b 100644 --- a/apps/sim/lib/workspaces/resource-bindings.test.ts +++ b/apps/sim/lib/workspaces/resource-keys.test.ts @@ -1,5 +1,5 @@ import { describe, expect, it } from 'vitest' -import { nextFreeKey, resourceKeyBase } from '@/lib/workspaces/resource-bindings' +import { nextFreeKey, resourceKeyBase } from '@/lib/workspaces/resource-keys' const KEY_FORMAT = /^[a-z][a-z0-9_-]{0,63}$/ diff --git a/apps/sim/lib/workspaces/resource-bindings.ts b/apps/sim/lib/workspaces/resource-keys.ts similarity index 88% rename from apps/sim/lib/workspaces/resource-bindings.ts rename to apps/sim/lib/workspaces/resource-keys.ts index 36cdc230a4c..df43ce7fe7f 100644 --- a/apps/sim/lib/workspaces/resource-bindings.ts +++ b/apps/sim/lib/workspaces/resource-keys.ts @@ -8,7 +8,7 @@ import { skill, userTableDefinitions, workflow, - workspaceResourceBinding, + workspaceResourceKey, } from '@sim/db/schema' import { createLogger } from '@sim/logger' import { generateId } from '@sim/utils/id' @@ -18,12 +18,12 @@ import { and, eq, inArray, isNull, like, or } from 'drizzle-orm' import type { DbOrTx } from '@/lib/db/types' /** - * Persisted resource keys (`workspace_resource_binding`): the only mapping between a workflow + * Persisted resource keys (`workspace_resource_key`): the only mapping between a workflow * source key such as `table('leads')` and a resource id. * * A key is allocated the first time something needs one for a resource, derived from the * resource's name at that moment, and never changes afterwards. Renaming the resource keeps its - * key; deleting it leaves the binding on the dead id, so the key stops resolving instead of + * key; deleting it leaves the key on the dead id, so the key stops resolving instead of * moving to another resource with the same name. Only resources that are live in the given * workspace resolve in either direction, so an id or key from another workspace never does. * @@ -31,7 +31,7 @@ import type { DbOrTx } from '@/lib/db/types' * after each insert, so the caller's transaction must run at READ COMMITTED (the default). */ -const logger = createLogger('ResourceBindings') +const logger = createLogger('ResourceKeys') const MAX_KEY_LENGTH = 64 @@ -155,12 +155,12 @@ export interface ResourceKeyRef { /** kind → (id → key), or kind → (key → id); only live, bound resources appear. */ export type ResourceKeyMap = Map> -interface BindingOptions { +interface ResourceKeyOptions { /** The caller's transaction, when the lookup must see or join its writes. */ executor?: DbOrTx } -interface ResolveKeysOptions extends BindingOptions { +interface ResolveKeysOptions extends ResourceKeyOptions { /** The human the allocation is attributed to; `null` for an actorless caller. */ createdBy?: string | null } @@ -214,7 +214,7 @@ async function loadLiveResources( return load(executor, workspaceId, ids) } -async function readBindingsByResource( +async function readKeysByResource( executor: DbOrTx, workspaceId: string, kind: ResourceKind, @@ -222,13 +222,13 @@ async function readBindingsByResource( ): Promise> { if (resourceIds.length === 0) return new Map() const rows = await executor - .select({ resourceId: workspaceResourceBinding.resourceId, key: workspaceResourceBinding.key }) - .from(workspaceResourceBinding) + .select({ resourceId: workspaceResourceKey.resourceId, key: workspaceResourceKey.key }) + .from(workspaceResourceKey) .where( and( - eq(workspaceResourceBinding.workspaceId, workspaceId), - eq(workspaceResourceBinding.kind, kind), - inArray(workspaceResourceBinding.resourceId, resourceIds) + eq(workspaceResourceKey.workspaceId, workspaceId), + eq(workspaceResourceKey.kind, kind), + inArray(workspaceResourceKey.resourceId, resourceIds) ) ) return new Map(rows.map((row) => [row.resourceId, row.key])) @@ -242,13 +242,13 @@ async function readTakenKeys( ): Promise> { const prefixes = [...new Set(bases.map((base) => base.slice(0, TAKEN_PREFIX_LENGTH)))] const rows = await executor - .select({ key: workspaceResourceBinding.key }) - .from(workspaceResourceBinding) + .select({ key: workspaceResourceKey.key }) + .from(workspaceResourceKey) .where( and( - eq(workspaceResourceBinding.workspaceId, workspaceId), - eq(workspaceResourceBinding.kind, kind), - or(...prefixes.map((prefix) => like(workspaceResourceBinding.key, `${prefix}%`))) + eq(workspaceResourceKey.workspaceId, workspaceId), + eq(workspaceResourceKey.kind, kind), + or(...prefixes.map((prefix) => like(workspaceResourceKey.key, `${prefix}%`))) ) ) return new Set(rows.map((row) => row.key)) @@ -290,8 +290,8 @@ async function allocateKeys( updatedAt: now, } }) - await executor.insert(workspaceResourceBinding).values(values).onConflictDoNothing() - const bound = await readBindingsByResource( + await executor.insert(workspaceResourceKey).values(values).onConflictDoNothing() + const bound = await readKeysByResource( executor, workspaceId, kind, @@ -331,7 +331,7 @@ export async function resolveKeys( for (const [kind, ids] of groupByKind(refs, (ref) => ref.id)) { const live = await loadLiveResources(executor, workspaceId, kind, ids) if (live.length === 0) continue - const keys = await readBindingsByResource( + const keys = await readKeysByResource( executor, workspaceId, kind, @@ -355,13 +355,13 @@ export async function resolveKeys( /** * The resource each key is bound to in `workspaceId`, when that resource is still live. A key - * with no binding, or bound to a deleted or archived resource, is left out: it is never re-pointed + * with no key, or keyed to a deleted or archived resource, is left out: it is never re-pointed * at another resource. Never allocates. */ export async function resolveIds( workspaceId: string, refs: Iterable, - options: BindingOptions = {} + options: ResourceKeyOptions = {} ): Promise { const executor = options.executor ?? db const resolved: ResourceKeyMap = new Map() @@ -369,15 +369,15 @@ export async function resolveIds( if (!LIVE_RESOURCE_LOADERS[kind]) continue const rows = await executor .select({ - key: workspaceResourceBinding.key, - resourceId: workspaceResourceBinding.resourceId, + key: workspaceResourceKey.key, + resourceId: workspaceResourceKey.resourceId, }) - .from(workspaceResourceBinding) + .from(workspaceResourceKey) .where( and( - eq(workspaceResourceBinding.workspaceId, workspaceId), - eq(workspaceResourceBinding.kind, kind), - inArray(workspaceResourceBinding.key, keys) + eq(workspaceResourceKey.workspaceId, workspaceId), + eq(workspaceResourceKey.kind, kind), + inArray(workspaceResourceKey.key, keys) ) ) if (rows.length === 0) continue diff --git a/packages/db/migrations/0460_workflow_code_meta.sql b/packages/db/migrations/0460_workflow_code_meta.sql deleted file mode 100644 index f0449a0247e..00000000000 --- a/packages/db/migrations/0460_workflow_code_meta.sql +++ /dev/null @@ -1,7 +0,0 @@ -CREATE TABLE "workflow_code_meta" ( - "workflow_id" text PRIMARY KEY NOT NULL, - "meta" jsonb NOT NULL, - "updated_at" timestamp DEFAULT now() NOT NULL -); ---> statement-breakpoint -ALTER TABLE "workflow_code_meta" ADD CONSTRAINT "workflow_code_meta_workflow_id_workflow_id_fk" FOREIGN KEY ("workflow_id") REFERENCES "public"."workflow"("id") ON DELETE cascade ON UPDATE no action; \ No newline at end of file diff --git a/packages/db/migrations/0460_workflow_source_meta.sql b/packages/db/migrations/0460_workflow_source_meta.sql new file mode 100644 index 00000000000..9ef7f0cdfe8 --- /dev/null +++ b/packages/db/migrations/0460_workflow_source_meta.sql @@ -0,0 +1,7 @@ +CREATE TABLE "workflow_source_meta" ( + "workflow_id" text PRIMARY KEY NOT NULL, + "meta" jsonb NOT NULL, + "updated_at" timestamp DEFAULT now() NOT NULL +); +--> statement-breakpoint +ALTER TABLE "workflow_source_meta" ADD CONSTRAINT "workflow_source_meta_workflow_id_workflow_id_fk" FOREIGN KEY ("workflow_id") REFERENCES "public"."workflow"("id") ON DELETE cascade ON UPDATE no action; \ No newline at end of file diff --git a/packages/db/migrations/0461_workspace_resource_binding.sql b/packages/db/migrations/0461_workspace_resource_binding.sql deleted file mode 100644 index 0e4e8eb69aa..00000000000 --- a/packages/db/migrations/0461_workspace_resource_binding.sql +++ /dev/null @@ -1,19 +0,0 @@ -CREATE TYPE "public"."workspace_resource_kind" AS ENUM('credential', 'knowledge-base', 'knowledge-document', 'table', 'file', 'file-folder', 'mcp-server', 'custom-tool', 'custom-block', 'skill', 'sandbox', 'workflow');--> statement-breakpoint -CREATE TABLE "workspace_resource_binding" ( - "id" text PRIMARY KEY NOT NULL, - "workspace_id" text NOT NULL, - "kind" "workspace_resource_kind" NOT NULL, - "key" text NOT NULL, - "resource_id" text NOT NULL, - "origin" text NOT NULL, - "created_by" text, - "created_at" timestamp DEFAULT now() NOT NULL, - "updated_at" timestamp DEFAULT now() NOT NULL, - CONSTRAINT "workspace_resource_binding_key_format" CHECK ("workspace_resource_binding"."key" ~ '^[a-z][a-z0-9_-]{0,63}$'), - CONSTRAINT "workspace_resource_binding_origin_check" CHECK ("workspace_resource_binding"."origin" IN ('allocated', 'adopted', 'created')) -); ---> statement-breakpoint -ALTER TABLE "workspace_resource_binding" ADD CONSTRAINT "workspace_resource_binding_workspace_id_workspace_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspace"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint -ALTER TABLE "workspace_resource_binding" ADD CONSTRAINT "workspace_resource_binding_created_by_user_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."user"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint -CREATE UNIQUE INDEX "workspace_resource_binding_ws_kind_key_unique" ON "workspace_resource_binding" USING btree ("workspace_id","kind","key");--> statement-breakpoint -CREATE UNIQUE INDEX "workspace_resource_binding_ws_kind_resource_unique" ON "workspace_resource_binding" USING btree ("workspace_id","kind","resource_id"); \ No newline at end of file diff --git a/packages/db/migrations/0461_workspace_resource_key.sql b/packages/db/migrations/0461_workspace_resource_key.sql new file mode 100644 index 00000000000..60a9cea7ab5 --- /dev/null +++ b/packages/db/migrations/0461_workspace_resource_key.sql @@ -0,0 +1,19 @@ +CREATE TYPE "public"."workspace_resource_kind" AS ENUM('credential', 'knowledge-base', 'knowledge-document', 'table', 'file', 'file-folder', 'mcp-server', 'custom-tool', 'custom-block', 'skill', 'sandbox', 'workflow');--> statement-breakpoint +CREATE TABLE "workspace_resource_key" ( + "id" text PRIMARY KEY NOT NULL, + "workspace_id" text NOT NULL, + "kind" "workspace_resource_kind" NOT NULL, + "key" text NOT NULL, + "resource_id" text NOT NULL, + "origin" text NOT NULL, + "created_by" text, + "created_at" timestamp DEFAULT now() NOT NULL, + "updated_at" timestamp DEFAULT now() NOT NULL, + CONSTRAINT "workspace_resource_key_key_format" CHECK ("workspace_resource_key"."key" ~ '^[a-z][a-z0-9_-]{0,63}$'), + CONSTRAINT "workspace_resource_key_origin_check" CHECK ("workspace_resource_key"."origin" IN ('allocated', 'adopted', 'created')) +); +--> statement-breakpoint +ALTER TABLE "workspace_resource_key" ADD CONSTRAINT "workspace_resource_key_workspace_id_workspace_id_fk" FOREIGN KEY ("workspace_id") REFERENCES "public"."workspace"("id") ON DELETE cascade ON UPDATE no action;--> statement-breakpoint +ALTER TABLE "workspace_resource_key" ADD CONSTRAINT "workspace_resource_key_created_by_user_id_fk" FOREIGN KEY ("created_by") REFERENCES "public"."user"("id") ON DELETE set null ON UPDATE no action;--> statement-breakpoint +CREATE UNIQUE INDEX "workspace_resource_key_ws_kind_key_unique" ON "workspace_resource_key" USING btree ("workspace_id","kind","key");--> statement-breakpoint +CREATE UNIQUE INDEX "workspace_resource_key_ws_kind_resource_unique" ON "workspace_resource_key" USING btree ("workspace_id","kind","resource_id"); \ No newline at end of file diff --git a/packages/db/migrations/meta/0460_snapshot.json b/packages/db/migrations/meta/0460_snapshot.json index f8047e1902e..90bfa4b0ba2 100644 --- a/packages/db/migrations/meta/0460_snapshot.json +++ b/packages/db/migrations/meta/0460_snapshot.json @@ -26609,8 +26609,8 @@ "checkConstraints": {}, "isRLSEnabled": false }, - "public.workflow_code_meta": { - "name": "workflow_code_meta", + "public.workflow_source_meta": { + "name": "workflow_source_meta", "schema": "", "columns": { "workflow_id": { @@ -26635,9 +26635,9 @@ }, "indexes": {}, "foreignKeys": { - "workflow_code_meta_workflow_id_workflow_id_fk": { - "name": "workflow_code_meta_workflow_id_workflow_id_fk", - "tableFrom": "workflow_code_meta", + "workflow_source_meta_workflow_id_workflow_id_fk": { + "name": "workflow_source_meta_workflow_id_workflow_id_fk", + "tableFrom": "workflow_source_meta", "tableTo": "workflow", "columnsFrom": ["workflow_id"], "columnsTo": ["id"], diff --git a/packages/db/migrations/meta/0461_snapshot.json b/packages/db/migrations/meta/0461_snapshot.json index cc44615dbdd..5ff553059a1 100644 --- a/packages/db/migrations/meta/0461_snapshot.json +++ b/packages/db/migrations/meta/0461_snapshot.json @@ -26609,8 +26609,8 @@ "checkConstraints": {}, "isRLSEnabled": false }, - "public.workflow_code_meta": { - "name": "workflow_code_meta", + "public.workflow_source_meta": { + "name": "workflow_source_meta", "schema": "", "columns": { "workflow_id": { @@ -26635,9 +26635,9 @@ }, "indexes": {}, "foreignKeys": { - "workflow_code_meta_workflow_id_workflow_id_fk": { - "name": "workflow_code_meta_workflow_id_workflow_id_fk", - "tableFrom": "workflow_code_meta", + "workflow_source_meta_workflow_id_workflow_id_fk": { + "name": "workflow_source_meta_workflow_id_workflow_id_fk", + "tableFrom": "workflow_source_meta", "tableTo": "workflow", "columnsFrom": ["workflow_id"], "columnsTo": ["id"], @@ -32721,8 +32721,8 @@ "checkConstraints": {}, "isRLSEnabled": false }, - "public.workspace_resource_binding": { - "name": "workspace_resource_binding", + "public.workspace_resource_key": { + "name": "workspace_resource_key", "schema": "", "columns": { "id": { @@ -32784,8 +32784,8 @@ } }, "indexes": { - "workspace_resource_binding_ws_kind_key_unique": { - "name": "workspace_resource_binding_ws_kind_key_unique", + "workspace_resource_key_ws_kind_key_unique": { + "name": "workspace_resource_key_ws_kind_key_unique", "columns": [ { "expression": "workspace_id", @@ -32811,8 +32811,8 @@ "method": "btree", "with": {} }, - "workspace_resource_binding_ws_kind_resource_unique": { - "name": "workspace_resource_binding_ws_kind_resource_unique", + "workspace_resource_key_ws_kind_resource_unique": { + "name": "workspace_resource_key_ws_kind_resource_unique", "columns": [ { "expression": "workspace_id", @@ -32840,18 +32840,18 @@ } }, "foreignKeys": { - "workspace_resource_binding_workspace_id_workspace_id_fk": { - "name": "workspace_resource_binding_workspace_id_workspace_id_fk", - "tableFrom": "workspace_resource_binding", + "workspace_resource_key_workspace_id_workspace_id_fk": { + "name": "workspace_resource_key_workspace_id_workspace_id_fk", + "tableFrom": "workspace_resource_key", "tableTo": "workspace", "columnsFrom": ["workspace_id"], "columnsTo": ["id"], "onDelete": "cascade", "onUpdate": "no action" }, - "workspace_resource_binding_created_by_user_id_fk": { - "name": "workspace_resource_binding_created_by_user_id_fk", - "tableFrom": "workspace_resource_binding", + "workspace_resource_key_created_by_user_id_fk": { + "name": "workspace_resource_key_created_by_user_id_fk", + "tableFrom": "workspace_resource_key", "tableTo": "user", "columnsFrom": ["created_by"], "columnsTo": ["id"], @@ -32863,13 +32863,13 @@ "uniqueConstraints": {}, "policies": {}, "checkConstraints": { - "workspace_resource_binding_key_format": { - "name": "workspace_resource_binding_key_format", - "value": "\"workspace_resource_binding\".\"key\" ~ '^[a-z][a-z0-9_-]{0,63}$'" + "workspace_resource_key_key_format": { + "name": "workspace_resource_key_key_format", + "value": "\"workspace_resource_key\".\"key\" ~ '^[a-z][a-z0-9_-]{0,63}$'" }, - "workspace_resource_binding_origin_check": { - "name": "workspace_resource_binding_origin_check", - "value": "\"workspace_resource_binding\".\"origin\" IN ('allocated', 'adopted', 'created')" + "workspace_resource_key_origin_check": { + "name": "workspace_resource_key_origin_check", + "value": "\"workspace_resource_key\".\"origin\" IN ('allocated', 'adopted', 'created')" } }, "isRLSEnabled": false diff --git a/packages/db/migrations/meta/_journal.json b/packages/db/migrations/meta/_journal.json index a82cabb94ba..85055525dc5 100644 --- a/packages/db/migrations/meta/_journal.json +++ b/packages/db/migrations/meta/_journal.json @@ -3219,14 +3219,14 @@ "idx": 460, "version": "7", "when": 1794808198951, - "tag": "0460_workflow_code_meta", + "tag": "0460_workflow_source_meta", "breakpoints": true }, { "idx": 461, "version": "7", "when": 1794808265145, - "tag": "0461_workspace_resource_binding", + "tag": "0461_workspace_resource_key", "breakpoints": true } ] diff --git a/packages/db/schema.ts b/packages/db/schema.ts index 1f35dcf7c33..734108b13c9 100644 --- a/packages/db/schema.ts +++ b/packages/db/schema.ts @@ -475,12 +475,12 @@ export const workflow = pgTable( /** * Source-form facts a workflow's graph does not hold (each block's TS binding, declaration order, * and comments), keyed by block id so canvas edits never orphan them. Shape and validator: - * `WorkflowCodeMetaV1` / `parseCodeMeta` in `@sim/workflow-code/code-meta`. A side table rather + * `WorkflowSourceMetaV1` / `parseSourceMeta` in `@sim/workflow-code/source-meta`. A side table rather * than a `workflow` column, so the hot workflow row (and every `select()` of it) never carries it; * only the source get/apply, copy and prune paths read it. Not part of the workflow state, so it * never counts as a deploy change. No row until a source is applied; an empty value deletes it. */ -export const workflowCodeMeta = pgTable('workflow_code_meta', { +export const workflowSourceMeta = pgTable('workflow_source_meta', { workflowId: text('workflow_id') .primaryKey() .references(() => workflow.id, { onDelete: 'cascade' }), @@ -2746,8 +2746,8 @@ export const workspaceResourceKindEnum = pgEnum('workspace_resource_kind', [ * the first time source referenced the resource), `adopted` (a later sync bound an existing * resource to a key), or `created` (a sync created the resource for the key). */ -export const workspaceResourceBinding = pgTable( - 'workspace_resource_binding', +export const workspaceResourceKey = pgTable( + 'workspace_resource_key', { id: text('id').primaryKey(), workspaceId: text('workspace_id') @@ -2763,22 +2763,22 @@ export const workspaceResourceBinding = pgTable( updatedAt: timestamp('updated_at').notNull().defaultNow(), }, (table) => ({ - keyUnique: uniqueIndex('workspace_resource_binding_ws_kind_key_unique').on( + keyUnique: uniqueIndex('workspace_resource_key_ws_kind_key_unique').on( table.workspaceId, table.kind, table.key ), - resourceUnique: uniqueIndex('workspace_resource_binding_ws_kind_resource_unique').on( + resourceUnique: uniqueIndex('workspace_resource_key_ws_kind_resource_unique').on( table.workspaceId, table.kind, table.resourceId ), keyFormat: check( - 'workspace_resource_binding_key_format', + 'workspace_resource_key_key_format', sql`${table.key} ~ '^[a-z][a-z0-9_-]{0,63}$'` ), originCheck: check( - 'workspace_resource_binding_origin_check', + 'workspace_resource_key_origin_check', sql`${table.origin} IN ('allocated', 'adopted', 'created')` ), }) diff --git a/packages/testing/src/mocks/schema-tables.generated.ts b/packages/testing/src/mocks/schema-tables.generated.ts index d7c3c08f646..01ffec06bbe 100644 --- a/packages/testing/src/mocks/schema-tables.generated.ts +++ b/packages/testing/src/mocks/schema-tables.generated.ts @@ -91,7 +91,7 @@ export const GENERATED_SCHEMA_TABLES = { 'variables', 'archivedAt', ], - workflowCodeMeta: ['workflowId', 'meta', 'updatedAt'], + workflowSourceMeta: ['workflowId', 'meta', 'updatedAt'], workflowBlocks: [ 'id', 'workflowId', @@ -663,7 +663,7 @@ export const GENERATED_SCHEMA_TABLES = { 'createdAt', 'updatedAt', ], - workspaceResourceBinding: [ + workspaceResourceKey: [ 'id', 'workspaceId', 'kind', From c4dbebec860c755e7d0247af2cadd10fc649dd3d Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 01:05:31 -0800 Subject: [PATCH 146/428] refactor(workflows): move the source catalog and resources under workflows/source and settle the source wire names - GET /api/v2/workspaces/{id}/block-catalog is /workflows/source/catalog and /resource-manifest is /workflows/source/resources; their operations are workflows.source.catalog.read and workflows.source.resources.read, folded into workflowOperations - readSourceCatalog, buildSourceCatalog and SourceCatalogScope (catalog/workspace.ts), and readWorkflowSource (read-workflow-source.ts) for the source read - the resources list carries credentials[].provider - the source read returns base, catalogHash and diagnostics; apply takes one required base and returns fingerprint, base and notes - the locked-block gate lives in code/apply/locked.ts - regenerated the route table, OpenAPI, MCP operations and the Copilot route inventory --- .../(generated)/workflows/meta.json | 2 +- apps/docs/openapi-v2-resources.json | 24 +- apps/docs/openapi-v2-workflows.json | 256 +++++++++--------- .../[workspaceId]/resource-manifest/route.ts | 28 -- .../source/catalog}/route.test.ts | 12 +- .../source/catalog}/route.ts | 14 +- .../source/resources}/route.test.ts | 25 +- .../workflows/source/resources/route.ts | 28 ++ .../app/api/workflows/[id]/source/route.ts | 6 +- .../api/contracts/v2/openapi/block-catalog.ts | 79 ------ .../lib/api/contracts/v2/openapi/resources.ts | 4 +- .../contracts/v2/openapi/source-catalog.ts | 79 ++++++ ...source-manifest.ts => source-resources.ts} | 41 +-- .../contracts/v2/openapi/workflow-source.ts | 29 +- .../lib/api/contracts/v2/openapi/workflows.ts | 4 +- .../{block-catalog.ts => source-catalog.ts} | 29 +- ...source-manifest.ts => source-resources.ts} | 26 +- .../lib/api/contracts/v2/workflow-source.ts | 25 +- apps/sim/lib/api/contracts/workflow-source.ts | 32 ++- .../lib/api/mcp/generated/v2-operations.ts | 46 ++-- .../server/routes/copilot-refused-routes.json | 4 +- .../server/routes/v2-route-table.generated.ts | 16 +- .../apply-workflow-source.integration.ts | 49 ++-- ...pply-workflow-source.parity.integration.ts | 15 +- .../application/apply-workflow-source.ts | 92 ++++--- .../lib/workflows/application/operations.ts | 37 +++ ...flow-source.ts => read-workflow-source.ts} | 44 +-- .../workflows/application/source-commit.ts | 29 +- .../lib/workflows/application/source-error.ts | 4 +- .../workflows/application/source-evaluate.ts | 60 ++-- .../lib/workflows/code/apply/gates.test.ts | 6 +- apps/sim/lib/workflows/code/apply/gates.ts | 4 +- .../{protected.test.ts => locked.test.ts} | 44 +-- .../code/apply/{protected.ts => locked.ts} | 44 +-- apps/sim/lib/workflows/code/apply/print.ts | 30 +- .../lib/workflows/code/catalog/build.test.ts | 4 +- .../lib/workflows/code/catalog/operations.ts | 28 -- ....ts => read-source-catalog.integration.ts} | 8 +- ...lock-catalog.ts => read-source-catalog.ts} | 14 +- ...pace-catalog.test.ts => workspace.test.ts} | 6 +- .../{workspace-catalog.ts => workspace.ts} | 8 +- .../code/corpus/roundtrip.corpus.test.ts | 2 +- apps/sim/lib/workflows/code/operations.ts | 20 -- apps/sim/lib/workflows/code/resources.ts | 6 +- .../lib/workflows/code/source-lock.test.ts | 94 +++---- apps/sim/lib/workflows/code/source-lock.ts | 100 ++++--- ...source-manifest.ts => source-resources.ts} | 34 +-- .../workflows/code/stored-canonical.test.ts | 24 +- .../lib/workflows/code/stored-canonical.ts | 8 +- .../scripts/test-workflow-source-apply-e2e.ts | 26 +- apps/sim/scripts/test-workflow-source-e2e.ts | 14 +- 51 files changed, 830 insertions(+), 833 deletions(-) delete mode 100644 apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.ts rename apps/sim/app/api/v2/workspaces/[workspaceId]/{block-catalog => workflows/source/catalog}/route.test.ts (89%) rename apps/sim/app/api/v2/workspaces/[workspaceId]/{block-catalog => workflows/source/catalog}/route.ts (59%) rename apps/sim/app/api/v2/workspaces/[workspaceId]/{resource-manifest => workflows/source/resources}/route.test.ts (82%) create mode 100644 apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/resources/route.ts delete mode 100644 apps/sim/lib/api/contracts/v2/openapi/block-catalog.ts create mode 100644 apps/sim/lib/api/contracts/v2/openapi/source-catalog.ts rename apps/sim/lib/api/contracts/v2/openapi/{resource-manifest.ts => source-resources.ts} (64%) rename apps/sim/lib/api/contracts/v2/{block-catalog.ts => source-catalog.ts} (94%) rename apps/sim/lib/api/contracts/v2/{resource-manifest.ts => source-resources.ts} (79%) rename apps/sim/lib/workflows/application/{get-workflow-source.ts => read-workflow-source.ts} (81%) rename apps/sim/lib/workflows/code/apply/{protected.test.ts => locked.test.ts} (83%) rename apps/sim/lib/workflows/code/apply/{protected.ts => locked.ts} (76%) delete mode 100644 apps/sim/lib/workflows/code/catalog/operations.ts rename apps/sim/lib/workflows/code/catalog/{read-block-catalog.integration.ts => read-source-catalog.integration.ts} (92%) rename apps/sim/lib/workflows/code/catalog/{read-block-catalog.ts => read-source-catalog.ts} (84%) rename apps/sim/lib/workflows/code/catalog/{workspace-catalog.test.ts => workspace.test.ts} (95%) rename apps/sim/lib/workflows/code/catalog/{workspace-catalog.ts => workspace.ts} (95%) delete mode 100644 apps/sim/lib/workflows/code/operations.ts rename apps/sim/lib/workflows/code/{resource-manifest.ts => source-resources.ts} (89%) diff --git a/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json b/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json index 9f3883e6866..f86682b1a2d 100644 --- a/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json +++ b/apps/docs/content/docs/api-reference/(generated)/workflows/meta.json @@ -13,7 +13,7 @@ "getWorkflowSource", "applyWorkflowSource", "createWorkflowFromSource", - "getResourceManifest", + "getSourceResources", "replaceWorkflowState", "applyWorkflowOperations", "applyWorkflowVariables", diff --git a/apps/docs/openapi-v2-resources.json b/apps/docs/openapi-v2-resources.json index 6a53eb8c413..e580403a32a 100644 --- a/apps/docs/openapi-v2-resources.json +++ b/apps/docs/openapi-v2-resources.json @@ -14750,12 +14750,12 @@ } } }, - "/api/v2/workspaces/{workspaceId}/block-catalog": { + "/api/v2/workspaces/{workspaceId}/workflows/source/catalog": { "get": { - "operationId": "getBlockCatalog", - "summary": "Get block catalog", - "description": "Get the block catalog that workflow source is compiled and type-checked against: every block type the caller may place in the workspace, with its fields, visibility conditions, outputs, triggers, and SDK builder names. Pass `workflowId` to add the block types already placed in that workflow. The response carries the catalog `hash` as an `ETag`; send it back in `If-None-Match` to receive `304 Not Modified` with no body when the catalog is unchanged. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.", - "x-sim-operation": "workflows.code.catalog.read", + "operationId": "getSourceCatalog", + "summary": "Get source catalog", + "description": "Get the source catalog, the block catalog that workflow source is compiled and type-checked against: every block type the caller may place in the workspace, with its fields, visibility conditions, outputs, triggers, and SDK builder names. Pass `workflowId` to add the block types already placed in that workflow. The response carries the catalog `hash` as an `ETag`; send it back in `If-None-Match` to receive `304 Not Modified` with no body when the catalog is unchanged. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.", + "x-sim-operation": "workflows.source.catalog.read", "x-oauth-scope": "api:read", "tags": ["Catalog"], "security": [ @@ -14783,9 +14783,9 @@ "name": "workflowId", "in": "query", "required": false, - "description": "Return the compile catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`.", + "description": "Return the source catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`.", "schema": { - "description": "Return the compile catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`.", + "description": "Return the source catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`.", "type": "string", "minLength": 1 } @@ -14804,7 +14804,7 @@ ], "responses": { "200": { - "description": "The block catalog.", + "description": "The source catalog.", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" @@ -14819,7 +14819,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetBlockCatalogResponse" + "$ref": "#/components/schemas/GetSourceCatalogResponse" }, "examples": { "example1": { @@ -29673,7 +29673,7 @@ } ] }, - "GetBlockCatalogResponse": { + "GetSourceCatalogResponse": { "type": "object", "properties": { "data": { @@ -32416,8 +32416,8 @@ }, "required": ["data"], "additionalProperties": false, - "title": "Get block catalog response", - "description": "The block catalog core shard.", + "title": "Get source catalog response", + "description": "The source catalog core shard.", "examples": [ { "data": { diff --git a/apps/docs/openapi-v2-workflows.json b/apps/docs/openapi-v2-workflows.json index dc330d8859a..c5ce2f484dd 100644 --- a/apps/docs/openapi-v2-workflows.json +++ b/apps/docs/openapi-v2-workflows.json @@ -5911,7 +5911,7 @@ "get": { "operationId": "getWorkflowSource", "summary": "Get workflow source", - "description": "Read the saved draft as TypeScript source written against the workflow SDK, with its identity lock and a freshness `fingerprint`. The lock binds each block key in the source to its stored id; `lockBase` records the fingerprint and block catalog the source was read at. The fingerprint ignores canvas positions, so moving blocks does not change it. Workspace resources such as tables and knowledge bases appear as keys derived from their current names, so renaming a resource changes its key; an id that matches no resource in the workspace prints as an unresolved reference. Function-block code goes to `functions/*` files unless `functionCode` is `inline`. This read records no audit event; `HEAD` mirrors `GET`. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.", + "description": "Read the saved draft as TypeScript source written against the workflow SDK, with its identity lock and a freshness `fingerprint`. The lock binds each block key in the source to its stored id; `base` records the workspace, fingerprint and block catalog the source was read at. The fingerprint ignores canvas positions, so moving blocks does not change it. Workspace resources such as tables and knowledge bases appear as keys derived from their current names, so renaming a resource changes its key; an id that matches no resource in the workspace prints as an unresolved reference. Function-block code goes to `functions/*` files unless `functionCode` is `inline`. This read records no audit event; `HEAD` mirrors `GET`. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.", "x-sim-operation": "workflows.source.read", "x-oauth-scope": "api:read", "tags": ["Workflows"], @@ -5940,9 +5940,9 @@ "name": "functionCode", "in": "query", "required": false, - "description": "Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates.", + "description": "Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `codeFile()`; `inline` prints it in tagged templates.", "schema": { - "description": "Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates.", + "description": "Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `codeFile()`; `inline` prints it in tagged templates.", "type": "string", "enum": ["inline", "files"] } @@ -5978,28 +5978,28 @@ "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" }, "lock": { - "lockVersion": 1, + "version": 1, "blocks": { "start": { "id": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77", "parent": null, - "binding": "start", + "ident": "start", "order": 0 } }, "variables": {} }, - "lockBase": { + "base": { "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", - "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" }, "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "canonicalHash": "0d6e2b8a4c1f7e3d9b5a2c8f4e1d7b3a9c6f2e8d4b1a7c3e9f5d2b8a4c1e7f3d", - "catalogVersion": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a", + "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a", "sdkMajor": 1, "blockTypes": ["start_trigger"], - "warnings": [] + "diagnostics": [] } } } @@ -6085,23 +6085,22 @@ "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" }, "lock": { - "lockVersion": 1, + "version": 1, "blocks": { "start": { "id": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77", "parent": null, - "binding": "start", + "ident": "start", "order": 0 } }, "variables": {} }, - "lockBase": { + "base": { "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", - "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" - }, - "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d" + } } } } @@ -6155,29 +6154,29 @@ } }, "diagnostics": [], - "newFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "files": { "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" }, "lock": { - "lockVersion": 1, + "version": 1, "blocks": { "start": { "id": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77", "parent": null, - "binding": "start", + "ident": "start", "order": 0 } }, "variables": {} }, - "lockBase": { + "base": { "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", - "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" }, "mintedIds": {}, - "warnings": [], + "notes": [], "needsRedeployment": false } } @@ -6333,31 +6332,31 @@ } }, "diagnostics": [], - "newFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "files": { "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" }, "lock": { - "lockVersion": 1, + "version": 1, "blocks": { "start": { "id": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77", "parent": null, - "binding": "start", + "ident": "start", "order": 0 } }, "variables": {} }, - "lockBase": { + "base": { "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", - "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" }, "mintedIds": { "start": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77" }, - "warnings": [], + "notes": [], "needsRedeployment": false } } @@ -6396,12 +6395,12 @@ } } }, - "/api/v2/workspaces/{workspaceId}/resource-manifest": { + "/api/v2/workspaces/{workspaceId}/workflows/source/resources": { "get": { - "operationId": "getResourceManifest", - "summary": "Get resource manifest", + "operationId": "getSourceResources", + "summary": "Get source resources", "description": "List the workspace resources workflow source can name, each with the key source uses for it: tables with their columns, knowledge bases, saved credentials with their provider, workflows with their start-block inputs, and the names (never values) of the environment variables a run can read. A resource keeps its key when renamed; one that no source has named yet is given its key by this call. Each kind lists its oldest 1000 resources, and `truncated` says when there were more. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.", - "x-sim-operation": "workflows.code.resource_manifest.read", + "x-sim-operation": "workflows.source.resources.read", "x-oauth-scope": "api:read", "tags": ["Workflows"], "security": [ @@ -6428,7 +6427,7 @@ ], "responses": { "200": { - "description": "The resource manifest.", + "description": "The resources workflow source can name.", "headers": { "X-RateLimit-Limit": { "$ref": "#/components/headers/X-RateLimit-Limit" @@ -6443,7 +6442,7 @@ "content": { "application/json": { "schema": { - "$ref": "#/components/schemas/GetResourceManifestResponse" + "$ref": "#/components/schemas/GetSourceResourcesResponse" }, "examples": { "example1": { @@ -6476,12 +6475,12 @@ "name": "Docs" } ], - "bindings": [ + "credentials": [ { "key": "support-slack", "id": "cred_51d0b8f4", "name": "Support Slack", - "service": "slack" + "provider": "slack" } ], "workflows": [ @@ -17929,7 +17928,7 @@ "lock": { "type": "object", "properties": { - "lockVersion": { + "version": { "type": "number", "const": 1, "description": "Lock format version." @@ -17993,7 +17992,7 @@ } } }, - "binding": { + "ident": { "type": "string", "description": "The `const` name the block is printed as." }, @@ -18042,7 +18041,7 @@ "type": "string" } }, - "required": ["id", "parent", "binding", "order"], + "required": ["id", "parent", "ident", "order"], "additionalProperties": { "description": "An `x-` extension field, kept verbatim." }, @@ -18061,21 +18060,23 @@ "description": "Variable key → variable id." } }, - "required": ["lockVersion", "blocks", "variables"], + "required": ["version", "blocks", "variables"], "additionalProperties": { "description": "An `x-` extension field, kept verbatim." }, "description": "Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids." }, - "lockBase": { + "base": { "type": "object", "properties": { "workspaceId": { "type": "string", "description": "Workspace the workflow belongs to." }, - "baseFingerprint": { + "fingerprint": { "type": "string", + "minLength": 1, + "maxLength": 256, "description": "The `fingerprint` this source was read at." }, "catalogHash": { @@ -18083,19 +18084,19 @@ "description": "Hash of the block catalog the source was printed against." } }, - "required": ["workspaceId", "baseFingerprint", "catalogHash"], + "required": ["workspaceId", "fingerprint", "catalogHash"], "additionalProperties": false, "description": "Freshness facts for the lock in this environment (`.sim/base.json`)." }, "fingerprint": { "type": "string", - "description": "Freshness token of the stored draft. It ignores canvas positions, so moving blocks does not change it." + "description": "Freshness token of the stored draft: a hash of the canonical workflow and its ids. It ignores canvas positions, so moving blocks does not change it." }, "canonicalHash": { "type": "string", - "description": "Hash of the canonical workflow the files compile to; comments do not affect it." + "description": "Hash of the canonical workflow alone, without ids; comments do not affect it." }, - "catalogVersion": { + "catalogHash": { "type": "string", "description": "Hash of the block catalog the source was printed against." }, @@ -18112,7 +18113,7 @@ }, "description": "Block types the source uses, as blocks or as agent tools, sorted." }, - "warnings": { + "diagnostics": { "type": "array", "items": { "type": "object", @@ -18155,13 +18156,13 @@ "workspaceId", "files", "lock", - "lockBase", + "base", "fingerprint", "canonicalHash", - "catalogVersion", + "catalogHash", "sdkMajor", "blockTypes", - "warnings" + "diagnostics" ], "additionalProperties": false, "description": "Response data." @@ -18180,28 +18181,28 @@ "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" }, "lock": { - "lockVersion": 1, + "version": 1, "blocks": { "start": { "id": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77", "parent": null, - "binding": "start", + "ident": "start", "order": 0 } }, "variables": {} }, - "lockBase": { + "base": { "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", - "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" }, "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "canonicalHash": "0d6e2b8a4c1f7e3d9b5a2c8f4e1d7b3a9c6f2e8d4b1a7c3e9f5d2b8a4c1e7f3d", - "catalogVersion": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a", + "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a", "sdkMajor": 1, "blockTypes": ["start_trigger"], - "warnings": [] + "diagnostics": [] } } ] @@ -18399,7 +18400,7 @@ "properties": { "code": { "type": "string", - "description": "Diagnostic code, e.g. `E_UNKNOWN_PARAM` or `E_APPLY_PROTECTED_BLOCK`." + "description": "Diagnostic code, e.g. `E_UNKNOWN_PARAM` or `E_APPLY_LOCKED_BLOCK`." }, "severity": { "type": "string", @@ -18469,9 +18470,9 @@ }, "description": "Warnings, and on a dry run every error a commit would refuse." }, - "newFingerprint": { + "fingerprint": { "type": "string", - "description": "Fingerprint of the saved (or, on a dry run, would-be) draft: the next `baseFingerprint`." + "description": "Fingerprint of the saved (or, on a dry run, would-be) draft: the next `base.fingerprint`." }, "files": { "type": "object", @@ -18486,7 +18487,7 @@ "lock": { "type": "object", "properties": { - "lockVersion": { + "version": { "type": "number", "const": 1, "description": "Lock format version." @@ -18550,7 +18551,7 @@ } } }, - "binding": { + "ident": { "type": "string", "description": "The `const` name the block is printed as." }, @@ -18599,7 +18600,7 @@ "type": "string" } }, - "required": ["id", "parent", "binding", "order"], + "required": ["id", "parent", "ident", "order"], "additionalProperties": { "description": "An `x-` extension field, kept verbatim." }, @@ -18618,21 +18619,23 @@ "description": "Variable key → variable id." } }, - "required": ["lockVersion", "blocks", "variables"], + "required": ["version", "blocks", "variables"], "additionalProperties": { "description": "An `x-` extension field, kept verbatim." }, "description": "Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids." }, - "lockBase": { + "base": { "type": "object", "properties": { "workspaceId": { "type": "string", "description": "Workspace the workflow belongs to." }, - "baseFingerprint": { + "fingerprint": { "type": "string", + "minLength": 1, + "maxLength": 256, "description": "The `fingerprint` this source was read at." }, "catalogHash": { @@ -18640,7 +18643,7 @@ "description": "Hash of the block catalog the source was printed against." } }, - "required": ["workspaceId", "baseFingerprint", "catalogHash"], + "required": ["workspaceId", "fingerprint", "catalogHash"], "additionalProperties": false, "description": "Freshness facts for the lock in this environment (`.sim/base.json`)." }, @@ -18654,7 +18657,7 @@ }, "description": "Block key → id for new blocks whose id was minted rather than taken from the lock." }, - "warnings": { + "notes": { "type": "array", "items": { "type": "string" @@ -18673,12 +18676,12 @@ "applied", "diff", "diagnostics", - "newFingerprint", + "fingerprint", "files", "lock", - "lockBase", + "base", "mintedIds", - "warnings", + "notes", "needsRedeployment" ], "additionalProperties": false, @@ -18715,29 +18718,29 @@ } }, "diagnostics": [], - "newFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "files": { "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" }, "lock": { - "lockVersion": 1, + "version": 1, "blocks": { "start": { "id": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77", "parent": null, - "binding": "start", + "ident": "start", "order": 0 } }, "variables": {} }, - "lockBase": { + "base": { "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", - "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" }, "mintedIds": {}, - "warnings": [], + "notes": [], "needsRedeployment": false } } @@ -18761,7 +18764,7 @@ "lock": { "type": "object", "properties": { - "lockVersion": { + "version": { "type": "number", "const": 1, "description": "Lock format version." @@ -18825,7 +18828,7 @@ } } }, - "binding": { + "ident": { "type": "string", "description": "The `const` name the block is printed as." }, @@ -18874,7 +18877,7 @@ "type": "string" } }, - "required": ["id", "parent", "binding", "order"], + "required": ["id", "parent", "ident", "order"], "additionalProperties": { "description": "An `x-` extension field, kept verbatim." }, @@ -18893,21 +18896,23 @@ "description": "Variable key → variable id." } }, - "required": ["lockVersion", "blocks", "variables"], + "required": ["version", "blocks", "variables"], "additionalProperties": { "description": "An `x-` extension field, kept verbatim." }, "description": "Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids." }, - "lockBase": { + "base": { "type": "object", "properties": { "workspaceId": { "type": "string", "description": "Workspace the workflow belongs to." }, - "baseFingerprint": { + "fingerprint": { "type": "string", + "minLength": 1, + "maxLength": 256, "description": "The `fingerprint` this source was read at." }, "catalogHash": { @@ -18915,15 +18920,9 @@ "description": "Hash of the block catalog the source was printed against." } }, - "required": ["workspaceId", "baseFingerprint", "catalogHash"], + "required": ["workspaceId", "fingerprint", "catalogHash"], "additionalProperties": false, - "description": "Freshness facts for the lock in this environment (`.sim/base.json`)." - }, - "baseFingerprint": { - "type": "string", - "minLength": 1, - "maxLength": 256, - "description": "The `fingerprint` the source was read at. The apply answers `409` when the saved draft no longer matches it." + "description": "Where and when the source was read (`.sim/base.json`). The apply answers `409` when the saved draft no longer matches `base.fingerprint`." }, "provenance": { "description": "Where the source came from, for the audit log.", @@ -18950,7 +18949,7 @@ "additionalProperties": false } }, - "required": ["files", "lock", "baseFingerprint"], + "required": ["files", "lock", "base"], "additionalProperties": false, "title": "Apply workflow source body", "description": "Edited source files with the lock and fingerprint they were read with.", @@ -18960,23 +18959,22 @@ "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" }, "lock": { - "lockVersion": 1, + "version": 1, "blocks": { "start": { "id": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77", "parent": null, - "binding": "start", + "ident": "start", "order": 0 } }, "variables": {} }, - "lockBase": { + "base": { "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", - "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" - }, - "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d" + } } ] }, @@ -19173,7 +19171,7 @@ "properties": { "code": { "type": "string", - "description": "Diagnostic code, e.g. `E_UNKNOWN_PARAM` or `E_APPLY_PROTECTED_BLOCK`." + "description": "Diagnostic code, e.g. `E_UNKNOWN_PARAM` or `E_APPLY_LOCKED_BLOCK`." }, "severity": { "type": "string", @@ -19243,9 +19241,9 @@ }, "description": "Warnings, and on a dry run every error a commit would refuse." }, - "newFingerprint": { + "fingerprint": { "type": "string", - "description": "Fingerprint of the saved (or, on a dry run, would-be) draft: the next `baseFingerprint`." + "description": "Fingerprint of the saved (or, on a dry run, would-be) draft: the next `base.fingerprint`." }, "files": { "type": "object", @@ -19260,7 +19258,7 @@ "lock": { "type": "object", "properties": { - "lockVersion": { + "version": { "type": "number", "const": 1, "description": "Lock format version." @@ -19324,7 +19322,7 @@ } } }, - "binding": { + "ident": { "type": "string", "description": "The `const` name the block is printed as." }, @@ -19373,7 +19371,7 @@ "type": "string" } }, - "required": ["id", "parent", "binding", "order"], + "required": ["id", "parent", "ident", "order"], "additionalProperties": { "description": "An `x-` extension field, kept verbatim." }, @@ -19392,21 +19390,23 @@ "description": "Variable key → variable id." } }, - "required": ["lockVersion", "blocks", "variables"], + "required": ["version", "blocks", "variables"], "additionalProperties": { "description": "An `x-` extension field, kept verbatim." }, "description": "Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids." }, - "lockBase": { + "base": { "type": "object", "properties": { "workspaceId": { "type": "string", "description": "Workspace the workflow belongs to." }, - "baseFingerprint": { + "fingerprint": { "type": "string", + "minLength": 1, + "maxLength": 256, "description": "The `fingerprint` this source was read at." }, "catalogHash": { @@ -19414,7 +19414,7 @@ "description": "Hash of the block catalog the source was printed against." } }, - "required": ["workspaceId", "baseFingerprint", "catalogHash"], + "required": ["workspaceId", "fingerprint", "catalogHash"], "additionalProperties": false, "description": "Freshness facts for the lock in this environment (`.sim/base.json`)." }, @@ -19428,7 +19428,7 @@ }, "description": "Block key → id for new blocks whose id was minted rather than taken from the lock." }, - "warnings": { + "notes": { "type": "array", "items": { "type": "string" @@ -19447,12 +19447,12 @@ "applied", "diff", "diagnostics", - "newFingerprint", + "fingerprint", "files", "lock", - "lockBase", + "base", "mintedIds", - "warnings", + "notes", "needsRedeployment" ], "additionalProperties": false, @@ -19494,31 +19494,31 @@ } }, "diagnostics": [], - "newFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "files": { "workflow.ts": "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n" }, "lock": { - "lockVersion": 1, + "version": 1, "blocks": { "start": { "id": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77", "parent": null, - "binding": "start", + "ident": "start", "order": 0 } }, "variables": {} }, - "lockBase": { + "base": { "workspaceId": "a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64", - "baseFingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", + "fingerprint": "sf1:9c1d4e7f0a3b6c9d2e5f8a1b4c7d0e3f6a9b2c5d8e1f4a7b0c3d6e9f2a5b8c1d", "catalogHash": "3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a" }, "mintedIds": { "start": "a3f1c0b2-7a44-4c1d-9d3a-2b8e5f0a1c77" }, - "warnings": [], + "notes": [], "needsRedeployment": false } } @@ -19590,7 +19590,7 @@ "title": "Create workflow from source body", "description": "Source files and where to create the workflow." }, - "GetResourceManifestResponse": { + "GetSourceResourcesResponse": { "type": "object", "properties": { "data": { @@ -19670,11 +19670,11 @@ }, "required": ["key", "id", "name"], "additionalProperties": false, - "description": "A knowledge base: `kb(key)`." + "description": "A knowledge base: `knowledgeBase(key)`." }, "description": "Knowledge bases, oldest first." }, - "bindings": { + "credentials": { "type": "array", "items": { "type": "object", @@ -19691,16 +19691,16 @@ "type": "string", "description": "Current display name." }, - "service": { + "provider": { "type": "string", "description": "The provider the credential is for, e.g. `slack` or `google-email`." } }, - "required": ["key", "id", "name", "service"], + "required": ["key", "id", "name", "provider"], "additionalProperties": false, - "description": "A saved credential: `binding(key)`." + "description": "A saved credential: `credential(key)`." }, - "description": "Credential bindings, oldest first. Secrets are listed under `env`." + "description": "Saved credentials, oldest first. Secrets are listed under `env`." }, "workflows": { "type": "array", @@ -19741,7 +19741,7 @@ }, "required": ["key", "id", "name", "inputs"], "additionalProperties": false, - "description": "A workflow: `workflow(key)`." + "description": "A workflow: `childWorkflow(key)`." }, "description": "Workflows, oldest first." }, @@ -19761,7 +19761,7 @@ "workspaceId", "tables", "knowledgeBases", - "bindings", + "credentials", "workflows", "env", "truncated" @@ -19772,7 +19772,7 @@ }, "required": ["data"], "additionalProperties": false, - "title": "Get resource manifest response", + "title": "Get source resources response", "description": "The workspace resources workflow source can name.", "examples": [ { @@ -19803,12 +19803,12 @@ "name": "Docs" } ], - "bindings": [ + "credentials": [ { "key": "support-slack", "id": "cred_51d0b8f4", "name": "Support Slack", - "service": "slack" + "provider": "slack" } ], "workflows": [ diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.ts deleted file mode 100644 index b8f31e5d12f..00000000000 --- a/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { v2GetResourceManifestContract } from '@/lib/api/contracts/v2/resource-manifest' -import { defineV2JsonRoute, v2ApiKeyAuth, v2RateLimits } from '@/lib/api/server/routes' -import { workflowCodeOperations } from '@/lib/workflows/code/operations' -import { readResourceManifest } from '@/lib/workflows/code/resource-manifest' -import { catalogErrorPolicy } from '@/app/api/v2/lib/catalog' - -export const dynamic = 'force-dynamic' -export const revalidate = 0 - -/** - * GET /api/v2/workspaces/{workspaceId}/resource-manifest — the tables, knowledge bases, credential - * bindings, workflows and env names workflow source can name, by key. Answers 403 while the - * `workflow-code` flag is off. - * - * `headSafe: false` because listing a resource that has no key yet allocates one - * (`workspace_resource_binding`), so a `HEAD` probe must not run it. - */ -export const GET = defineV2JsonRoute({ - contract: v2GetResourceManifestContract, - auth: v2ApiKeyAuth, - headSafe: false, - operation: workflowCodeOperations.readResourceManifest, - rateLimit: v2RateLimits.publicApi, - errorPolicy: catalogErrorPolicy, - mapInput: ({ params }) => ({ workspaceId: params.workspaceId }), - useCase: readResourceManifest, - present: (manifest) => ({ data: manifest }), -}) diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.test.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/catalog/route.test.ts similarity index 89% rename from apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.test.ts rename to apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/catalog/route.test.ts index b3c7cda7fba..707097df29b 100644 --- a/apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.test.ts +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/catalog/route.test.ts @@ -12,14 +12,14 @@ const mocks = vi.hoisted(() => ({ read: vi.fn() })) vi.mock('@/lib/api/server/routes/v2-api-key-auth', () => v2ApiKeyAuthModuleMock) vi.mock('@/lib/core/rate-limiter', () => v2RateLimiterModuleMock) -vi.mock('@/lib/workflows/code/catalog/read-block-catalog', () => ({ - readWorkflowCodeCatalog: { - operation: { id: 'workflows.code.catalog.read' }, +vi.mock('@/lib/workflows/code/catalog/read-source-catalog', () => ({ + readSourceCatalog: { + operation: { id: 'workflows.source.catalog.read' }, execute: mocks.read, }, })) -import { GET } from '@/app/api/v2/workspaces/[workspaceId]/block-catalog/route' +import { GET } from '@/app/api/v2/workspaces/[workspaceId]/workflows/source/catalog/route' const WORKSPACE_ID = '11111111-2222-4333-8444-555555555555' const HASH = 'a'.repeat(64) @@ -68,14 +68,14 @@ const catalog = { function request(query = '', headers: Record = {}) { return new NextRequest( - `http://localhost:3000/api/v2/workspaces/${WORKSPACE_ID}/block-catalog${query}`, + `http://localhost:3000/api/v2/workspaces/${WORKSPACE_ID}/workflows/source/catalog${query}`, { headers: { 'x-api-key': 'key', ...headers } } ) } const context = { params: Promise.resolve({ workspaceId: WORKSPACE_ID }) } -describe('GET /api/v2/workspaces/{workspaceId}/block-catalog', () => { +describe('GET /api/v2/workspaces/{workspaceId}/workflows/source/catalog', () => { beforeEach(() => { v2RouteMocks.authenticate.mockResolvedValue(auth) v2RouteMocks.preauthRate.mockResolvedValue(V2_PREAUTH_RATE_LIMIT_ALLOWED) diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/catalog/route.ts similarity index 59% rename from apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.ts rename to apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/catalog/route.ts index 8a1540c113f..1fa59a036eb 100644 --- a/apps/sim/app/api/v2/workspaces/[workspaceId]/block-catalog/route.ts +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/catalog/route.ts @@ -1,19 +1,19 @@ -import { v2GetBlockCatalogContract } from '@/lib/api/contracts/v2/block-catalog' +import { v2GetSourceCatalogContract } from '@/lib/api/contracts/v2/source-catalog' import { defineV2JsonRoute, v2ApiKeyAuth, v2RateLimits } from '@/lib/api/server/routes' -import { workflowCodeCatalogOperations } from '@/lib/workflows/code/catalog/operations' -import { readWorkflowCodeCatalog } from '@/lib/workflows/code/catalog/read-block-catalog' +import { workflowOperations } from '@/lib/workflows/application/operations' +import { readSourceCatalog } from '@/lib/workflows/code/catalog/read-source-catalog' import { catalogErrorPolicy } from '@/app/api/v2/lib/catalog' export const dynamic = 'force-dynamic' export const revalidate = 0 /** - * GET /api/v2/workspaces/{workspaceId}/block-catalog — the workflow-SDK block catalog. The + * GET /api/v2/workspaces/{workspaceId}/workflows/source/catalog — the source catalog. The * response carries `ETag: ""`; a matching `If-None-Match` answers `304` with no body. */ export const GET = defineV2JsonRoute({ - contract: v2GetBlockCatalogContract, - operation: workflowCodeCatalogOperations.read, + contract: v2GetSourceCatalogContract, + operation: workflowOperations.readSourceCatalog, auth: v2ApiKeyAuth, rateLimit: v2RateLimits.publicApi, errorPolicy: catalogErrorPolicy, @@ -21,7 +21,7 @@ export const GET = defineV2JsonRoute({ workspaceId: params.workspaceId, ...(query.workflowId ? { workflowId: query.workflowId } : {}), }), - useCase: readWorkflowCodeCatalog, + useCase: readSourceCatalog, entityTag: (catalog) => catalog.hash, present: (catalog) => ({ data: catalog }), }) diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.test.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/resources/route.test.ts similarity index 82% rename from apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.test.ts rename to apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/resources/route.test.ts index 015b6258ab5..d88ecefcdbf 100644 --- a/apps/sim/app/api/v2/workspaces/[workspaceId]/resource-manifest/route.test.ts +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/resources/route.test.ts @@ -13,15 +13,15 @@ const mocks = vi.hoisted(() => ({ read: vi.fn(), authorize: vi.fn() })) vi.mock('@/lib/api/server/routes/v2-api-key-auth', () => v2ApiKeyAuthModuleMock) vi.mock('@/lib/core/rate-limiter', () => v2RateLimiterModuleMock) -vi.mock('@/lib/workflows/code/resource-manifest', () => ({ - readResourceManifest: { - operation: { id: 'workflows.code.resource_manifest.read' }, +vi.mock('@/lib/workflows/code/source-resources', () => ({ + readSourceResources: { + operation: { id: 'workflows.source.resources.read' }, authorize: mocks.authorize, execute: mocks.read, }, })) -import { GET } from '@/app/api/v2/workspaces/[workspaceId]/resource-manifest/route' +import { GET } from '@/app/api/v2/workspaces/[workspaceId]/workflows/source/resources/route' const WORKSPACE_ID = '11111111-2222-4333-8444-555555555555' @@ -51,7 +51,7 @@ const manifest = { }, ], knowledgeBases: [{ key: 'docs', id: 'kb-1', name: 'Docs' }], - bindings: [{ key: 'support-slack', id: 'cred-1', name: 'Support Slack', service: 'slack' }], + credentials: [{ key: 'support-slack', id: 'cred-1', name: 'Support Slack', provider: 'slack' }], workflows: [ { key: 'assign-owner', @@ -66,14 +66,14 @@ const manifest = { function request(query = '') { return new NextRequest( - `http://localhost:3000/api/v2/workspaces/${WORKSPACE_ID}/resource-manifest${query}`, + `http://localhost:3000/api/v2/workspaces/${WORKSPACE_ID}/workflows/source/resources${query}`, { headers: { 'x-api-key': 'key' } } ) } const context = { params: Promise.resolve({ workspaceId: WORKSPACE_ID }) } -describe('GET /api/v2/workspaces/{workspaceId}/resource-manifest', () => { +describe('GET /api/v2/workspaces/{workspaceId}/workflows/source/resources', () => { beforeEach(() => { v2RouteMocks.authenticate.mockResolvedValue(auth) v2RouteMocks.preauthRate.mockResolvedValue(V2_PREAUTH_RATE_LIMIT_ALLOWED) @@ -84,10 +84,13 @@ describe('GET /api/v2/workspaces/{workspaceId}/resource-manifest', () => { it('answers HEAD after authorizing without reading, so a probe never allocates resource keys', async () => { const response = await GET( - new NextRequest(`http://localhost:3000/api/v2/workspaces/${WORKSPACE_ID}/resource-manifest`, { - method: 'HEAD', - headers: { 'x-api-key': 'key' }, - }), + new NextRequest( + `http://localhost:3000/api/v2/workspaces/${WORKSPACE_ID}/workflows/source/resources`, + { + method: 'HEAD', + headers: { 'x-api-key': 'key' }, + } + ), context ) diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/resources/route.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/resources/route.ts new file mode 100644 index 00000000000..ed86ddb9576 --- /dev/null +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/resources/route.ts @@ -0,0 +1,28 @@ +import { v2GetSourceResourcesContract } from '@/lib/api/contracts/v2/source-resources' +import { defineV2JsonRoute, v2ApiKeyAuth, v2RateLimits } from '@/lib/api/server/routes' +import { workflowOperations } from '@/lib/workflows/application/operations' +import { readSourceResources } from '@/lib/workflows/code/source-resources' +import { catalogErrorPolicy } from '@/app/api/v2/lib/catalog' + +export const dynamic = 'force-dynamic' +export const revalidate = 0 + +/** + * GET /api/v2/workspaces/{workspaceId}/workflows/source/resources — the tables, knowledge bases, + * credentials, workflows and env names workflow source can name, by key. Answers 403 while the + * `workflow-code` flag is off. + * + * `headSafe: false` because listing a resource that has no key yet allocates one + * (`workspace_resource_key`), so a `HEAD` probe must not run it. + */ +export const GET = defineV2JsonRoute({ + contract: v2GetSourceResourcesContract, + auth: v2ApiKeyAuth, + headSafe: false, + operation: workflowOperations.readSourceResources, + rateLimit: v2RateLimits.publicApi, + errorPolicy: catalogErrorPolicy, + mapInput: ({ params }) => ({ workspaceId: params.workspaceId }), + useCase: readSourceResources, + present: (manifest) => ({ data: manifest }), +}) diff --git a/apps/sim/app/api/workflows/[id]/source/route.ts b/apps/sim/app/api/workflows/[id]/source/route.ts index 2818418a12e..8421396eab5 100644 --- a/apps/sim/app/api/workflows/[id]/source/route.ts +++ b/apps/sim/app/api/workflows/[id]/source/route.ts @@ -5,7 +5,7 @@ import { internalSessionAuth, } from '@/lib/api/server/routes' import { internalWorkflowErrorPolicies } from '@/lib/workflows/api' -import { getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' +import { readWorkflowSource } from '@/lib/workflows/application/read-workflow-source' export const dynamic = 'force-dynamic' export const revalidate = 0 @@ -17,7 +17,7 @@ export const revalidate = 0 export const GET = defineInternalJsonRoute({ contract: getWorkflowSourceContract, auth: internalSessionAuth, - operation: getWorkflowSource.operation, + operation: readWorkflowSource.operation, rateLimit: internalRateLimits.none({ reason: 'A session read the Code tab refetches after edits, like GET /api/workflows/[id]', }), @@ -26,6 +26,6 @@ export const GET = defineInternalJsonRoute({ workflowId: params.id, ...(query.functionCode ? { functionCode: query.functionCode } : {}), }), - useCase: getWorkflowSource, + useCase: readWorkflowSource, present: (source) => ({ data: source }), }) diff --git a/apps/sim/lib/api/contracts/v2/openapi/block-catalog.ts b/apps/sim/lib/api/contracts/v2/openapi/block-catalog.ts deleted file mode 100644 index b1461f5766a..00000000000 --- a/apps/sim/lib/api/contracts/v2/openapi/block-catalog.ts +++ /dev/null @@ -1,79 +0,0 @@ -import { v2GetBlockCatalogContract } from '@/lib/api/contracts/v2/block-catalog' -import { - documentedSchema, - RATE_LIMIT_HEADERS, - RESOURCE_ERRORS, -} from '@/lib/api/contracts/v2/openapi/shared' -import { defineOpenApiRoute } from '@/lib/api/openapi/types' -import { workflowCodeCatalogOperations } from '@/lib/workflows/code/catalog/operations' - -const BLOCK_CATALOG_EXAMPLE = { - catalogVersion: 1, - hash: '3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a', - sdkMajor: 1, - blocks: { - slack_v2: { - type: 'slack_v2', - name: 'Slack', - category: 'tools', - subBlocks: [ - { - id: 'operation', - type: 'dropdown', - valueKind: 'string', - storage: 'native', - options: [{ id: 'send', label: 'Send Message' }], - }, - ], - tools: { access: ['slack_message'], selector: 'operation' }, - inputs: {}, - outputs: { ts: { type: 'string', description: 'Message timestamp' } }, - graph: { canBeTarget: true, errorPort: true, container: null, annotationOnly: false }, - }, - }, - triggers: {}, - builders: { 'slack.sendMessage': { type: 'slack_v2', operation: 'send' } }, -} - -export const blockCatalogOpenApiRoutes = [ - defineOpenApiRoute( - v2GetBlockCatalogContract, - { - applicationOperation: workflowCodeCatalogOperations.read, - operationId: 'getBlockCatalog', - summary: 'Get block catalog', - description: - 'Get the block catalog that workflow source is compiled and type-checked against: every block type the caller may place in the workspace, with its fields, visibility conditions, outputs, triggers, and SDK builder names. Pass `workflowId` to add the block types already placed in that workflow. The response carries the catalog `hash` as an `ETag`; send it back in `If-None-Match` to receive `304 Not Modified` with no body when the catalog is unchanged. Returns `403` while code-first workflows are not enabled.', - tags: ['Catalog'], - errors: RESOURCE_ERRORS, - success: { description: 'The block catalog.', headers: RATE_LIMIT_HEADERS }, - }, - { - params: documentedSchema( - v2GetBlockCatalogContract.params, - 'GetBlockCatalogParams', - 'Get block catalog path parameters', - 'Workspace whose block availability is applied.' - ), - query: documentedSchema( - v2GetBlockCatalogContract.query, - 'GetBlockCatalogQuery', - 'Get block catalog query', - 'Optional workflow whose placed block types are added.' - ), - headers: documentedSchema( - v2GetBlockCatalogContract.headers, - 'GetBlockCatalogHeaders', - 'Get block catalog headers', - 'Conditional request header.' - ), - response: documentedSchema( - v2GetBlockCatalogContract.response.schema, - 'GetBlockCatalogResponse', - 'Get block catalog response', - 'The block catalog core shard.', - [{ data: BLOCK_CATALOG_EXAMPLE }] - ), - } - ), -] diff --git a/apps/sim/lib/api/contracts/v2/openapi/resources.ts b/apps/sim/lib/api/contracts/v2/openapi/resources.ts index eb22668067b..4226a6af457 100644 --- a/apps/sim/lib/api/contracts/v2/openapi/resources.ts +++ b/apps/sim/lib/api/contracts/v2/openapi/resources.ts @@ -33,7 +33,6 @@ import { } from '@/lib/api/contracts/v2/mcp-servers' import { v2GetMetaContract } from '@/lib/api/contracts/v2/meta' import { accessRequestOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/access-requests' -import { blockCatalogOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/block-catalog' import { credentialMemberOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/credential-members' import { organizationUsageOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/organization-usage' import { organizationOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/organizations' @@ -54,6 +53,7 @@ import { withErrorExamples, withRequestBodyErrors, } from '@/lib/api/contracts/v2/openapi/shared' +import { sourceCatalogOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/source-catalog' import { ssoOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/sso' import { workspaceInvitationOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/workspace-invitations' import { workspacePermissionOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/workspace-permissions' @@ -2503,7 +2503,7 @@ const declaredRoutes = [ ...workspaceInvitationOpenApiRoutes, ...organizationUsageOpenApiRoutes, ...accessRequestOpenApiRoutes, - ...blockCatalogOpenApiRoutes, + ...sourceCatalogOpenApiRoutes, ] as const const routes = declaredRoutes.map(withRequestBodyErrors) diff --git a/apps/sim/lib/api/contracts/v2/openapi/source-catalog.ts b/apps/sim/lib/api/contracts/v2/openapi/source-catalog.ts new file mode 100644 index 00000000000..8232e581279 --- /dev/null +++ b/apps/sim/lib/api/contracts/v2/openapi/source-catalog.ts @@ -0,0 +1,79 @@ +import { + documentedSchema, + RATE_LIMIT_HEADERS, + RESOURCE_ERRORS, +} from '@/lib/api/contracts/v2/openapi/shared' +import { v2GetSourceCatalogContract } from '@/lib/api/contracts/v2/source-catalog' +import { defineOpenApiRoute } from '@/lib/api/openapi/types' +import { workflowOperations } from '@/lib/workflows/application/operations' + +const BLOCK_CATALOG_EXAMPLE = { + catalogVersion: 1, + hash: '3f0c1a9e5b7d2c4f6a8e0b1d3c5f7a9e2b4d6f8a0c2e4b6d8f0a2c4e6b8d0f2a', + sdkMajor: 1, + blocks: { + slack_v2: { + type: 'slack_v2', + name: 'Slack', + category: 'tools', + subBlocks: [ + { + id: 'operation', + type: 'dropdown', + valueKind: 'string', + storage: 'native', + options: [{ id: 'send', label: 'Send Message' }], + }, + ], + tools: { access: ['slack_message'], selector: 'operation' }, + inputs: {}, + outputs: { ts: { type: 'string', description: 'Message timestamp' } }, + graph: { canBeTarget: true, errorPort: true, container: null, annotationOnly: false }, + }, + }, + triggers: {}, + builders: { 'slack.sendMessage': { type: 'slack_v2', operation: 'send' } }, +} + +export const sourceCatalogOpenApiRoutes = [ + defineOpenApiRoute( + v2GetSourceCatalogContract, + { + applicationOperation: workflowOperations.readSourceCatalog, + operationId: 'getSourceCatalog', + summary: 'Get source catalog', + description: + 'Get the source catalog, the block catalog that workflow source is compiled and type-checked against: every block type the caller may place in the workspace, with its fields, visibility conditions, outputs, triggers, and SDK builder names. Pass `workflowId` to add the block types already placed in that workflow. The response carries the catalog `hash` as an `ETag`; send it back in `If-None-Match` to receive `304 Not Modified` with no body when the catalog is unchanged. Returns `403` while code-first workflows are not enabled.', + tags: ['Catalog'], + errors: RESOURCE_ERRORS, + success: { description: 'The source catalog.', headers: RATE_LIMIT_HEADERS }, + }, + { + params: documentedSchema( + v2GetSourceCatalogContract.params, + 'GetSourceCatalogParams', + 'Get source catalog path parameters', + 'Workspace whose block availability is applied.' + ), + query: documentedSchema( + v2GetSourceCatalogContract.query, + 'GetSourceCatalogQuery', + 'Get source catalog query', + 'Optional workflow whose placed block types are added.' + ), + headers: documentedSchema( + v2GetSourceCatalogContract.headers, + 'GetSourceCatalogHeaders', + 'Get source catalog headers', + 'Conditional request header.' + ), + response: documentedSchema( + v2GetSourceCatalogContract.response.schema, + 'GetSourceCatalogResponse', + 'Get source catalog response', + 'The source catalog core shard.', + [{ data: BLOCK_CATALOG_EXAMPLE }] + ), + } + ), +] diff --git a/apps/sim/lib/api/contracts/v2/openapi/resource-manifest.ts b/apps/sim/lib/api/contracts/v2/openapi/source-resources.ts similarity index 64% rename from apps/sim/lib/api/contracts/v2/openapi/resource-manifest.ts rename to apps/sim/lib/api/contracts/v2/openapi/source-resources.ts index b54efdfceeb..7e9145e87ba 100644 --- a/apps/sim/lib/api/contracts/v2/openapi/resource-manifest.ts +++ b/apps/sim/lib/api/contracts/v2/openapi/source-resources.ts @@ -3,11 +3,11 @@ import { RATE_LIMIT_HEADERS, RESOURCE_ERRORS, } from '@/lib/api/contracts/v2/openapi/shared' -import { v2GetResourceManifestContract } from '@/lib/api/contracts/v2/resource-manifest' +import { v2GetSourceResourcesContract } from '@/lib/api/contracts/v2/source-resources' import { defineOpenApiRoute } from '@/lib/api/openapi/types' -import { workflowCodeOperations } from '@/lib/workflows/code/operations' +import { workflowOperations } from '@/lib/workflows/application/operations' -const RESOURCE_MANIFEST_EXAMPLE = { +const SOURCE_RESOURCES_EXAMPLE = { workspaceId: 'a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64', tables: [ { @@ -21,8 +21,8 @@ const RESOURCE_MANIFEST_EXAMPLE = { }, ], knowledgeBases: [{ key: 'docs', id: 'kb_93a1e7c2', name: 'Docs' }], - bindings: [ - { key: 'support-slack', id: 'cred_51d0b8f4', name: 'Support Slack', service: 'slack' }, + credentials: [ + { key: 'support-slack', id: 'cred_51d0b8f4', name: 'Support Slack', provider: 'slack' }, ], workflows: [ { @@ -36,33 +36,36 @@ const RESOURCE_MANIFEST_EXAMPLE = { truncated: false, } -export const resourceManifestOpenApiRoutes = [ +export const sourceResourcesOpenApiRoutes = [ defineOpenApiRoute( - v2GetResourceManifestContract, + v2GetSourceResourcesContract, { - applicationOperation: workflowCodeOperations.readResourceManifest, - operationId: 'getResourceManifest', - summary: 'Get resource manifest', + applicationOperation: workflowOperations.readSourceResources, + operationId: 'getSourceResources', + summary: 'Get source resources', description: 'List the workspace resources workflow source can name, each with the key source uses for it: tables with their columns, knowledge bases, saved credentials with their provider, workflows with their start-block inputs, and the names (never values) of the environment variables a run can read. A resource keeps its key when renamed; one that no source has named yet is given its key by this call. Each kind lists its oldest 1000 resources, and `truncated` says when there were more. Returns `403` while code-first workflows are not enabled.', tags: ['Workflows'], errors: RESOURCE_ERRORS, - success: { description: 'The resource manifest.', headers: RATE_LIMIT_HEADERS }, + success: { + description: 'The resources workflow source can name.', + headers: RATE_LIMIT_HEADERS, + }, }, { - query: v2GetResourceManifestContract.query, + query: v2GetSourceResourcesContract.query, params: documentedSchema( - v2GetResourceManifestContract.params, - 'GetResourceManifestParams', - 'Get resource manifest path parameters', + v2GetSourceResourcesContract.params, + 'GetSourceResourcesParams', + 'Get source resources path parameters', 'Workspace whose resources to list.' ), response: documentedSchema( - v2GetResourceManifestContract.response.schema, - 'GetResourceManifestResponse', - 'Get resource manifest response', + v2GetSourceResourcesContract.response.schema, + 'GetSourceResourcesResponse', + 'Get source resources response', 'The workspace resources workflow source can name.', - [{ data: RESOURCE_MANIFEST_EXAMPLE }] + [{ data: SOURCE_RESOURCES_EXAMPLE }] ), } ), diff --git a/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts index 88bd90a5833..f46cd7b51f2 100644 --- a/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts +++ b/apps/sim/lib/api/contracts/v2/openapi/workflow-source.ts @@ -25,21 +25,21 @@ const WORKFLOW_SOURCE_EXAMPLE = { "// @sim-sdk 1\nimport { trigger, workflow } from '@sim/workflow-sdk'\n\nexport default workflow('Support triage', () => {\n const start = trigger.start('Start')\n})\n", }, lock: { - lockVersion: 1, - blocks: { start: { id: BLOCK_ID, parent: null, binding: 'start', order: 0 } }, + version: 1, + blocks: { start: { id: BLOCK_ID, parent: null, ident: 'start', order: 0 } }, variables: {}, }, - lockBase: { + base: { workspaceId: 'a91c4b2e-6d3f-4e8a-b5c7-0d9e2f1a8c64', - baseFingerprint: FINGERPRINT, + fingerprint: FINGERPRINT, catalogHash: CATALOG_HASH, }, fingerprint: FINGERPRINT, canonicalHash: '0d6e2b8a4c1f7e3d9b5a2c8f4e1d7b3a9c6f2e8d4b1a7c3e9f5d2b8a4c1e7f3d', - catalogVersion: CATALOG_HASH, + catalogHash: CATALOG_HASH, sdkMajor: 1, blockTypes: ['start_trigger'], - warnings: [], + diagnostics: [], } export const workflowSourceOpenApiRoutes = [ @@ -50,7 +50,7 @@ export const workflowSourceOpenApiRoutes = [ operationId: 'getWorkflowSource', summary: 'Get workflow source', description: - 'Read the saved draft as TypeScript source written against the workflow SDK, with its identity lock and a freshness `fingerprint`. The lock binds each block key in the source to its stored id; `lockBase` records the fingerprint and block catalog the source was read at. The fingerprint ignores canvas positions, so moving blocks does not change it. Workspace resources such as tables and knowledge bases appear as keys derived from their current names, so renaming a resource changes its key; an id that matches no resource in the workspace prints as an unresolved reference. Function-block code goes to `functions/*` files unless `functionCode` is `inline`. This read records no audit event; `HEAD` mirrors `GET`. Returns `403` while code-first workflows are not enabled.', + 'Read the saved draft as TypeScript source written against the workflow SDK, with its identity lock and a freshness `fingerprint`. The lock binds each block key in the source to its stored id; `base` records the workspace, fingerprint and block catalog the source was read at. The fingerprint ignores canvas positions, so moving blocks does not change it. Workspace resources such as tables and knowledge bases appear as keys derived from their current names, so renaming a resource changes its key; an id that matches no resource in the workspace prints as an unresolved reference. Function-block code goes to `functions/*` files unless `functionCode` is `inline`. This read records no audit event; `HEAD` mirrors `GET`. Returns `403` while code-first workflows are not enabled.', tags: ['Workflows'], errors: RESOURCE_ERRORS, success: { description: 'The workflow draft as source.', headers: RATE_LIMIT_HEADERS }, @@ -100,8 +100,7 @@ export const workflowSourceOpenApiRoutes = [ { files: WORKFLOW_SOURCE_EXAMPLE.files, lock: WORKFLOW_SOURCE_EXAMPLE.lock, - lockBase: WORKFLOW_SOURCE_EXAMPLE.lockBase, - baseFingerprint: FINGERPRINT, + base: WORKFLOW_SOURCE_EXAMPLE.base, }, ] ), @@ -124,12 +123,12 @@ export const workflowSourceOpenApiRoutes = [ variables: { added: [], removed: [], modified: [] }, }, diagnostics: [], - newFingerprint: FINGERPRINT, + fingerprint: FINGERPRINT, files: WORKFLOW_SOURCE_EXAMPLE.files, lock: WORKFLOW_SOURCE_EXAMPLE.lock, - lockBase: WORKFLOW_SOURCE_EXAMPLE.lockBase, + base: WORKFLOW_SOURCE_EXAMPLE.base, mintedIds: {}, - warnings: [], + notes: [], needsRedeployment: false, }, }, @@ -192,12 +191,12 @@ export const workflowSourceOpenApiRoutes = [ variables: { added: [], removed: [], modified: [] }, }, diagnostics: [], - newFingerprint: FINGERPRINT, + fingerprint: FINGERPRINT, files: WORKFLOW_SOURCE_EXAMPLE.files, lock: WORKFLOW_SOURCE_EXAMPLE.lock, - lockBase: WORKFLOW_SOURCE_EXAMPLE.lockBase, + base: WORKFLOW_SOURCE_EXAMPLE.base, mintedIds: { start: BLOCK_ID }, - warnings: [], + notes: [], needsRedeployment: false, }, }, diff --git a/apps/sim/lib/api/contracts/v2/openapi/workflows.ts b/apps/sim/lib/api/contracts/v2/openapi/workflows.ts index 9b3a3f0c081..82f96a8ae74 100644 --- a/apps/sim/lib/api/contracts/v2/openapi/workflows.ts +++ b/apps/sim/lib/api/contracts/v2/openapi/workflows.ts @@ -5,7 +5,6 @@ import { v2ListChatDeploymentsContract, v2ReplaceWorkflowChatDeploymentContract, } from '@/lib/api/contracts/v2/chat-deployments' -import { resourceManifestOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/resource-manifest' import { documentedSchema, ERROR_RESPONSES, @@ -27,6 +26,7 @@ import { WORKSPACE_ERRORS, withRequestBodyErrors, } from '@/lib/api/contracts/v2/openapi/shared' +import { sourceResourcesOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/source-resources' import { workflowSourceOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/workflow-source' import { workspaceSyncOpenApiRoutes } from '@/lib/api/contracts/v2/openapi/workspace-sync' import { @@ -1817,7 +1817,7 @@ export const workflowsOpenApiDocument = defineOpenApiDocument({ routes: [ ...routes, ...workflowSourceOpenApiRoutes, - ...resourceManifestOpenApiRoutes, + ...sourceResourcesOpenApiRoutes, ...workspaceSyncOpenApiRoutes, ], }) diff --git a/apps/sim/lib/api/contracts/v2/block-catalog.ts b/apps/sim/lib/api/contracts/v2/source-catalog.ts similarity index 94% rename from apps/sim/lib/api/contracts/v2/block-catalog.ts rename to apps/sim/lib/api/contracts/v2/source-catalog.ts index 1c7254858ec..43c78e6f752 100644 --- a/apps/sim/lib/api/contracts/v2/block-catalog.ts +++ b/apps/sim/lib/api/contracts/v2/source-catalog.ts @@ -4,8 +4,9 @@ import { defineRouteContract } from '@/lib/api/contracts/types' import { v2DataResponse } from '@/lib/api/contracts/v2/shared' /** - * The workflow-SDK block catalog: one content-hashed JSON document the compiler, printer, and - * type generator read instead of the block, trigger, and tool registries (build-spec decision 14). + * The source catalog, the workflow-SDK block catalog: one content-hashed JSON document the + * compiler, printer, and type generator read instead of the block, trigger, and tool registries + * (build-spec decision 14). * * The response is the catalog's core shard (`BlockCatalog` in `@sim/workflow-code`, which owns * the shape; this schema mirrors it field for field, and the registry-wide catalog test parses @@ -22,23 +23,23 @@ import { v2DataResponse } from '@/lib/api/contracts/v2/shared' * per-block accessors) from `@sim/workflow-code` rather than walking these references themselves. */ -const v2BlockCatalogQuerySchema = z +const v2SourceCatalogQuerySchema = z .object({ workflowId: workflowIdSchema .optional() .describe( - 'Return the compile catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`.' + 'Return the source catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`.' ), }) .strict() -const v2BlockCatalogParamsSchema = z.object({ +const v2SourceCatalogParamsSchema = z.object({ workspaceId: workspaceIdSchema.describe( 'Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what the catalog contains.' ), }) -const v2BlockCatalogHeadersSchema = z.object({ +const v2SourceCatalogHeadersSchema = z.object({ 'if-none-match': z .string() .max(1024, 'if-none-match must be at most 1024 characters') @@ -407,7 +408,7 @@ const catalogBuilderSchema = z }) .describe('One SDK builder method.') -export const v2BlockCatalogSchema = z +export const v2SourceCatalogSchema = z .object({ catalogVersion: z.literal(1).describe('Catalog format version.'), hash: z.string().describe('SHA-256 of the catalog content; the response `ETag`.'), @@ -438,13 +439,13 @@ export const v2BlockCatalogSchema = z .optional() .describe('Present when the catalog includes an organization’s custom blocks.'), }) - .describe('Block catalog core shard.') + .describe('Source catalog core shard.') -export const v2GetBlockCatalogContract = defineRouteContract({ +export const v2GetSourceCatalogContract = defineRouteContract({ method: 'GET', - path: '/api/v2/workspaces/[workspaceId]/block-catalog', - params: v2BlockCatalogParamsSchema, - query: v2BlockCatalogQuerySchema, - headers: v2BlockCatalogHeadersSchema, - response: { mode: 'json', schema: v2DataResponse(v2BlockCatalogSchema) }, + path: '/api/v2/workspaces/[workspaceId]/workflows/source/catalog', + params: v2SourceCatalogParamsSchema, + query: v2SourceCatalogQuerySchema, + headers: v2SourceCatalogHeadersSchema, + response: { mode: 'json', schema: v2DataResponse(v2SourceCatalogSchema) }, }) diff --git a/apps/sim/lib/api/contracts/v2/resource-manifest.ts b/apps/sim/lib/api/contracts/v2/source-resources.ts similarity index 79% rename from apps/sim/lib/api/contracts/v2/resource-manifest.ts rename to apps/sim/lib/api/contracts/v2/source-resources.ts index 1f7552a8320..2216ec71604 100644 --- a/apps/sim/lib/api/contracts/v2/resource-manifest.ts +++ b/apps/sim/lib/api/contracts/v2/source-resources.ts @@ -3,7 +3,7 @@ import { noInputSchema, workspaceIdSchema } from '@/lib/api/contracts/primitives import { defineRouteContract } from '@/lib/api/contracts/types' import { v2DataResponse } from '@/lib/api/contracts/v2/shared' -const v2ResourceManifestParamsSchema = z +const v2SourceResourcesParamsSchema = z .object({ workspaceId: workspaceIdSchema.describe('Workspace whose resources to list.') }) .strict() @@ -17,7 +17,7 @@ const manifestResourceSchema = z.object({ name: z.string().describe('Current display name.'), }) -const resourceManifestSchema = z +const sourceResourcesSchema = z .object({ workspaceId: z.string().describe('Workspace id.'), tables: z @@ -43,19 +43,19 @@ const resourceManifestSchema = z ) .describe('Tables, oldest first.'), knowledgeBases: z - .array(manifestResourceSchema.describe('A knowledge base: `kb(key)`.')) + .array(manifestResourceSchema.describe('A knowledge base: `knowledgeBase(key)`.')) .describe('Knowledge bases, oldest first.'), - bindings: z + credentials: z .array( manifestResourceSchema .extend({ - service: z + provider: z .string() .describe('The provider the credential is for, e.g. `slack` or `google-email`.'), }) - .describe('A saved credential: `binding(key)`.') + .describe('A saved credential: `credential(key)`.') ) - .describe('Credential bindings, oldest first. Secrets are listed under `env`.'), + .describe('Saved credentials, oldest first. Secrets are listed under `env`.'), workflows: z .array( manifestResourceSchema @@ -69,7 +69,7 @@ const resourceManifestSchema = z ) .describe('Inputs the workflow start block declares.'), }) - .describe('A workflow: `workflow(key)`.') + .describe('A workflow: `childWorkflow(key)`.') ) .describe('Workflows, oldest first.'), env: z @@ -85,11 +85,11 @@ const resourceManifestSchema = z }) .describe('The workspace resources workflow source can name, by key.') -/** `GET /api/v2/workspaces/{workspaceId}/resource-manifest`: resources workflow source can name. */ -export const v2GetResourceManifestContract = defineRouteContract({ +/** `GET /api/v2/workspaces/{workspaceId}/workflows/source/resources`: resources source can name. */ +export const v2GetSourceResourcesContract = defineRouteContract({ method: 'GET', - path: '/api/v2/workspaces/[workspaceId]/resource-manifest', - params: v2ResourceManifestParamsSchema, + path: '/api/v2/workspaces/[workspaceId]/workflows/source/resources', + params: v2SourceResourcesParamsSchema, query: noInputSchema, - response: { mode: 'json', schema: v2DataResponse(resourceManifestSchema) }, + response: { mode: 'json', schema: v2DataResponse(sourceResourcesSchema) }, }) diff --git a/apps/sim/lib/api/contracts/v2/workflow-source.ts b/apps/sim/lib/api/contracts/v2/workflow-source.ts index b9520a0c64b..bcdf99befe7 100644 --- a/apps/sim/lib/api/contracts/v2/workflow-source.ts +++ b/apps/sim/lib/api/contracts/v2/workflow-source.ts @@ -4,7 +4,7 @@ import { defineRouteContract } from '@/lib/api/contracts/types' import { v2DataResponse, v2FolderPathInputSchema } from '@/lib/api/contracts/v2/shared' import { v2WorkflowIdParamsSchema } from '@/lib/api/contracts/v2/workflows' import { - lockBaseSchema, + sourceBaseSchema, workflowLockSchema, workflowSourceQuerySchema, workflowSourceSchema, @@ -79,23 +79,16 @@ const applyWorkflowSourceBodySchema = z .object({ files: sourceFilesSchema, lock: workflowLockSchema, - lockBase: lockBaseSchema.optional(), - baseFingerprint: z - .string() - .min(1, 'baseFingerprint cannot be empty') - .max(256, 'baseFingerprint is too long') - .describe( - 'The `fingerprint` the source was read at. The apply answers `409` when the saved draft no longer matches it.' - ), + base: sourceBaseSchema.describe( + 'Where and when the source was read (`.sim/base.json`). The apply answers `409` when the saved draft no longer matches `base.fingerprint`.' + ), provenance: provenanceSchema, }) .strict() const sourceDiagnosticSchema = z .object({ - code: z - .string() - .describe('Diagnostic code, e.g. `E_UNKNOWN_PARAM` or `E_APPLY_PROTECTED_BLOCK`.'), + code: z.string().describe('Diagnostic code, e.g. `E_UNKNOWN_PARAM` or `E_APPLY_LOCKED_BLOCK`.'), severity: z.enum(['error', 'warning', 'info']).describe('Diagnostic severity.'), message: z.string().describe('What was found.'), hint: z.string().optional().describe('How to address it.'), @@ -179,22 +172,22 @@ const applyWorkflowSourceDataSchema = z diagnostics: z .array(sourceDiagnosticSchema) .describe('Warnings, and on a dry run every error a commit would refuse.'), - newFingerprint: z + fingerprint: z .string() .describe( - 'Fingerprint of the saved (or, on a dry run, would-be) draft: the next `baseFingerprint`.' + 'Fingerprint of the saved (or, on a dry run, would-be) draft: the next `base.fingerprint`.' ), files: z .record(z.string(), z.string()) .describe('The source re-printed from what was saved, including any normalized values.'), lock: workflowLockSchema, - lockBase: lockBaseSchema, + base: sourceBaseSchema, mintedIds: z .record(z.string(), z.string()) .describe( 'Block key → id for new blocks whose id was minted rather than taken from the lock.' ), - warnings: z.array(z.string()).describe('Non-fatal notes about the write.'), + notes: z.array(z.string()).describe('Non-fatal notes about the write.'), needsRedeployment: z .boolean() .describe('Whether the draft now differs from the live deployment; apply never deploys.'), diff --git a/apps/sim/lib/api/contracts/workflow-source.ts b/apps/sim/lib/api/contracts/workflow-source.ts index 64beac5472f..e0c1120b267 100644 --- a/apps/sim/lib/api/contracts/workflow-source.ts +++ b/apps/sim/lib/api/contracts/workflow-source.ts @@ -5,7 +5,7 @@ import { workflowIdParamsSchema } from '@/lib/api/contracts/workflows' /** * Workflow source: a stored draft printed as TypeScript against the workflow SDK, with its * identity lock (build-spec decisions 11–13). The shapes mirror `@sim/workflow-code`'s - * `WorkflowLockV1` and `LockBase`, which own them; the internal route (the canvas Code tab) and + * `WorkflowLockV1` and `SourceBase`, which own them; the internal route (the canvas Code tab) and * the v2 route share these schemas. */ @@ -17,7 +17,7 @@ export const workflowSourceQuerySchema = z }) .optional() .describe( - 'Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates.' + 'Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `codeFile()`; `inline` prints it in tagged templates.' ), }) .strict() @@ -83,28 +83,32 @@ const lockBlockSchema = withExtensions({ ) .optional() .describe('Per field, its id-bearing items (input format fields) in stored order.'), - binding: z.string().describe('The `const` name the block is printed as.'), + ident: z.string().describe('The `const` name the block is printed as.'), order: z.number().int().describe('Declaration-order tie-break.'), layout: lockLayoutSchema.optional(), codeFile: z.string().optional().describe('Path of the block’s function-code file.'), }).describe('One block’s identity.') export const workflowLockSchema = withExtensions({ - lockVersion: z.literal(1).describe('Lock format version.'), + version: z.literal(1).describe('Lock format version.'), blocks: z.record(z.string(), lockBlockSchema).describe('Block key → identity.'), variables: z.record(z.string(), z.string()).describe('Variable key → variable id.'), }).describe('Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids.') -export const lockBaseSchema = z +export const sourceBaseSchema = z .object({ workspaceId: z.string().describe('Workspace the workflow belongs to.'), - baseFingerprint: z.string().describe('The `fingerprint` this source was read at.'), + fingerprint: z + .string() + .min(1, 'base.fingerprint cannot be empty') + .max(256, 'base.fingerprint is too long') + .describe('The `fingerprint` this source was read at.'), catalogHash: z.string().describe('Hash of the block catalog the source was printed against.'), }) .strict() .describe('Freshness facts for the lock in this environment (`.sim/base.json`).') -const sourceWarningSchema = z +const sourceReadDiagnosticSchema = z .object({ code: z.string().describe('Diagnostic code, e.g. `W_CANON_UNRESOLVED_ID`.'), severity: z.enum(['error', 'warning', 'info']).describe('Diagnostic severity.'), @@ -123,23 +127,23 @@ export const workflowSourceSchema = z .record(z.string(), z.string()) .describe('Relative path → file text: `workflow.ts`, then any `functions/*` files.'), lock: workflowLockSchema, - lockBase: lockBaseSchema, + base: sourceBaseSchema, fingerprint: z .string() .describe( - 'Freshness token of the stored draft. It ignores canvas positions, so moving blocks does not change it.' + 'Freshness token of the stored draft: a hash of the canonical workflow and its ids. It ignores canvas positions, so moving blocks does not change it.' ), canonicalHash: z .string() - .describe('Hash of the canonical workflow the files compile to; comments do not affect it.'), - catalogVersion: z - .string() - .describe('Hash of the block catalog the source was printed against.'), + .describe('Hash of the canonical workflow alone, without ids; comments do not affect it.'), + catalogHash: z.string().describe('Hash of the block catalog the source was printed against.'), sdkMajor: z.number().int().describe('Workflow SDK major version of the source.'), blockTypes: z .array(z.string()) .describe('Block types the source uses, as blocks or as agent tools, sorted.'), - warnings: z.array(sourceWarningSchema).describe('Findings from reading the stored graph.'), + diagnostics: z + .array(sourceReadDiagnosticSchema) + .describe('Findings from reading the stored graph.'), }) .describe('A workflow draft as TypeScript source.') diff --git a/apps/sim/lib/api/mcp/generated/v2-operations.ts b/apps/sim/lib/api/mcp/generated/v2-operations.ts index 82976db97ca..043cd91c5fc 100644 --- a/apps/sim/lib/api/mcp/generated/v2-operations.ts +++ b/apps/sim/lib/api/mcp/generated/v2-operations.ts @@ -26,7 +26,6 @@ import { v2GetBillingStatusContract, v2ListBillingLogsContract, } from '@/lib/api/contracts/v2/billing' -import { v2GetBlockCatalogContract } from '@/lib/api/contracts/v2/block-catalog' import { v2ExecuteToolContract, v2GetBlockContract, @@ -194,7 +193,6 @@ import { v2RemovePermissionGroupMemberContract, v2UpdatePermissionGroupContract, } from '@/lib/api/contracts/v2/permission-groups' -import { v2GetResourceManifestContract } from '@/lib/api/contracts/v2/resource-manifest' import { v2CreateSandboxContract, v2DeleteSandboxContract, @@ -218,6 +216,8 @@ import { v2RevokeSkillEditorContract, v2UpdateSkillContract, } from '@/lib/api/contracts/v2/skills' +import { v2GetSourceCatalogContract } from '@/lib/api/contracts/v2/source-catalog' +import { v2GetSourceResourcesContract } from '@/lib/api/contracts/v2/source-resources' import { v2AddOrganizationDomainContract, v2DeleteSsoProviderContract, @@ -1338,16 +1338,6 @@ export const V2_MCP_OPERATIONS = { "Get a block's fields, conditions, operations, tool schemas, and triggers. Unversioned types resolve to the newest visible version; the returned `id` identifies that version. Hidden or missing blocks return `404`.\n\nOAuth scope: `api:read`.", handler: () => import('@/app/api/v2/blocks/[blockId]/route').then((route) => route.GET), }, - getBlockCatalog: { - contract: v2GetBlockCatalogContract, - summary: 'Get block catalog', - description: - 'Get the block catalog that workflow source is compiled and type-checked against: every block type the caller may place in the workspace, with its fields, visibility conditions, outputs, triggers, and SDK builder names. Pass `workflowId` to add the block types already placed in that workflow. The response carries the catalog `hash` as an `ETag`; send it back in `If-None-Match` to receive `304 Not Modified` with no body when the catalog is unchanged. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.', - handler: () => - import('@/app/api/v2/workspaces/[workspaceId]/block-catalog/route').then( - (route) => route.GET - ), - }, getCustomTool: { contract: v2GetCustomToolContract, summary: 'Get custom tool', @@ -1548,16 +1538,6 @@ export const V2_MCP_OPERATIONS = { (route) => route.GET ), }, - getResourceManifest: { - contract: v2GetResourceManifestContract, - summary: 'Get resource manifest', - description: - 'List the workspace resources workflow source can name, each with the key source uses for it: tables with their columns, knowledge bases, saved credentials with their provider, workflows with their start-block inputs, and the names (never values) of the environment variables a run can read. A resource keeps its key when renamed; one that no source has named yet is given its key by this call. Each kind lists its oldest 1000 resources, and `truncated` says when there were more. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.', - handler: () => - import('@/app/api/v2/workspaces/[workspaceId]/resource-manifest/route').then( - (route) => route.GET - ), - }, getRowEnrichment: { contract: v2GetRowEnrichmentContract, summary: 'Get row group run', @@ -1601,6 +1581,26 @@ export const V2_MCP_OPERATIONS = { 'Get a workspace or built-in skill, including its full instructions. Built-in skills are read-only. Requires workspace read access.\n\nOAuth scope: `api:read`.', handler: () => import('@/app/api/v2/skills/[skillId]/route').then((route) => route.GET), }, + getSourceCatalog: { + contract: v2GetSourceCatalogContract, + summary: 'Get source catalog', + description: + 'Get the source catalog, the block catalog that workflow source is compiled and type-checked against: every block type the caller may place in the workspace, with its fields, visibility conditions, outputs, triggers, and SDK builder names. Pass `workflowId` to add the block types already placed in that workflow. The response carries the catalog `hash` as an `ETag`; send it back in `If-None-Match` to receive `304 Not Modified` with no body when the catalog is unchanged. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.', + handler: () => + import('@/app/api/v2/workspaces/[workspaceId]/workflows/source/catalog/route').then( + (route) => route.GET + ), + }, + getSourceResources: { + contract: v2GetSourceResourcesContract, + summary: 'Get source resources', + description: + 'List the workspace resources workflow source can name, each with the key source uses for it: tables with their columns, knowledge bases, saved credentials with their provider, workflows with their start-block inputs, and the names (never values) of the environment variables a run can read. A resource keeps its key when renamed; one that no source has named yet is given its key by this call. Each kind lists its oldest 1000 resources, and `truncated` says when there were more. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.', + handler: () => + import('@/app/api/v2/workspaces/[workspaceId]/workflows/source/resources/route').then( + (route) => route.GET + ), + }, getSsoPolicy: { contract: v2GetSsoPolicyContract, summary: 'Get SSO policy', @@ -1732,7 +1732,7 @@ export const V2_MCP_OPERATIONS = { contract: v2GetWorkflowSourceContract, summary: 'Get workflow source', description: - 'Read the saved draft as TypeScript source written against the workflow SDK, with its identity lock and a freshness `fingerprint`. The lock binds each block key in the source to its stored id; `lockBase` records the fingerprint and block catalog the source was read at. The fingerprint ignores canvas positions, so moving blocks does not change it. Workspace resources such as tables and knowledge bases appear as keys derived from their current names, so renaming a resource changes its key; an id that matches no resource in the workspace prints as an unresolved reference. Function-block code goes to `functions/*` files unless `functionCode` is `inline`. This read records no audit event; `HEAD` mirrors `GET`. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.', + 'Read the saved draft as TypeScript source written against the workflow SDK, with its identity lock and a freshness `fingerprint`. The lock binds each block key in the source to its stored id; `base` records the workspace, fingerprint and block catalog the source was read at. The fingerprint ignores canvas positions, so moving blocks does not change it. Workspace resources such as tables and knowledge bases appear as keys derived from their current names, so renaming a resource changes its key; an id that matches no resource in the workspace prints as an unresolved reference. Function-block code goes to `functions/*` files unless `functionCode` is `inline`. This read records no audit event; `HEAD` mirrors `GET`. Returns `403` while code-first workflows are not enabled.\n\nOAuth scope: `api:read`.', handler: () => import('@/app/api/v2/workflows/[workflowId]/source/route').then((route) => route.GET), }, diff --git a/apps/sim/lib/api/server/routes/copilot-refused-routes.json b/apps/sim/lib/api/server/routes/copilot-refused-routes.json index e3d804d1924..f521d2f00f9 100644 --- a/apps/sim/lib/api/server/routes/copilot-refused-routes.json +++ b/apps/sim/lib/api/server/routes/copilot-refused-routes.json @@ -281,7 +281,7 @@ }, { "method": "GET", - "path": "/api/v2/workspaces/[workspaceId]/resource-manifest", - "operation": "workflows.code.resource_manifest.read" + "path": "/api/v2/workspaces/[workspaceId]/workflows/source/resources", + "operation": "workflows.source.resources.read" } ] diff --git a/apps/sim/lib/api/server/routes/v2-route-table.generated.ts b/apps/sim/lib/api/server/routes/v2-route-table.generated.ts index bb2586b012c..879188238d4 100644 --- a/apps/sim/lib/api/server/routes/v2-route-table.generated.ts +++ b/apps/sim/lib/api/server/routes/v2-route-table.generated.ts @@ -928,10 +928,6 @@ export const V2_ROUTES: readonly V2RouteEntry[] = [ pattern: '/api/v2/workspaces/{workspaceId}/access-requests/discovery', load: () => import('@/app/api/v2/workspaces/[workspaceId]/access-requests/discovery/route'), }, - { - pattern: '/api/v2/workspaces/{workspaceId}/block-catalog', - load: () => import('@/app/api/v2/workspaces/[workspaceId]/block-catalog/route'), - }, { pattern: '/api/v2/workspaces/{workspaceId}/fork', load: () => import('@/app/api/v2/workspaces/[workspaceId]/fork/route'), @@ -1012,12 +1008,16 @@ export const V2_ROUTES: readonly V2RouteEntry[] = [ pattern: '/api/v2/workspaces/{workspaceId}/permission-config', load: () => import('@/app/api/v2/workspaces/[workspaceId]/permission-config/route'), }, - { - pattern: '/api/v2/workspaces/{workspaceId}/resource-manifest', - load: () => import('@/app/api/v2/workspaces/[workspaceId]/resource-manifest/route'), - }, { pattern: '/api/v2/workspaces/{workspaceId}/workflows/source', load: () => import('@/app/api/v2/workspaces/[workspaceId]/workflows/source/route'), }, + { + pattern: '/api/v2/workspaces/{workspaceId}/workflows/source/catalog', + load: () => import('@/app/api/v2/workspaces/[workspaceId]/workflows/source/catalog/route'), + }, + { + pattern: '/api/v2/workspaces/{workspaceId}/workflows/source/resources', + load: () => import('@/app/api/v2/workspaces/[workspaceId]/workflows/source/resources/route'), + }, ] diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts b/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts index 8b49c7fa9e6..1dc2a2d337d 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.integration.ts @@ -1,5 +1,5 @@ /** - * Real PostgreSQL coverage for `applyWorkflowSource`: source read with `getWorkflowSource`, + * Real PostgreSQL coverage for `applyWorkflowSource`: source read with `readWorkflowSource`, * edited as text, and written back. Each check reads the stored rows directly, so "nothing was * written" means the rows and `updated_at` are byte-identical, not that the use case said so. * @@ -19,7 +19,7 @@ import { webhook, workflow, workflowBlocks, - workflowCodeMeta, + workflowSourceMeta, workspace, } from '@sim/db/schema' import { deleteWorkspaceFixture, insertWorkspaceFixture } from '@sim/db/testing/workspace-fixtures' @@ -43,7 +43,7 @@ import { type ApplyWorkflowSourceInput, applyWorkflowSource, } from '@/lib/workflows/application/apply-workflow-source' -import { getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' +import { readWorkflowSource } from '@/lib/workflows/application/read-workflow-source' import { WorkflowSourceRejectedError } from '@/lib/workflows/application/source-error' import { loadWorkflowFromNormalizedTables } from '@/lib/workflows/persistence/utils' @@ -132,16 +132,16 @@ async function seedWorkflow(): Promise { return { workflowId, startId, scoreId, edgeId, variableId } } -type GetWorkflowSourceResult = Awaited> +type ReadWorkflowSourceResult = Awaited> -function getSource(workflowId: string): Promise { +function getSource(workflowId: string): Promise { return withPermissionGroupScope(() => - getWorkflowSource.execute({ principal, input: { workflowId } }) + readWorkflowSource.execute({ principal, input: { workflowId } }) ) } function apply( - source: GetWorkflowSourceResult, + source: ReadWorkflowSourceResult, files: Record, extra: Partial = {} ) { @@ -152,8 +152,7 @@ function apply( workflowId: source.workflowId, files, lock: source.lock, - lockBase: source.lockBase, - baseFingerprint: source.fingerprint, + base: source.base, ...extra, }, }) @@ -269,7 +268,7 @@ check('get → apply unchanged is a no-op that writes, audits and notifies nothi expect(result.applied).toBe(false) expect(result.diff.noop).toBe(true) - expect(result.newFingerprint).toBe(source.fingerprint) + expect(result.fingerprint).toBe(source.fingerprint) expect(await snapshot(seeded.workflowId)).toEqual(before) expect(await settledAuditRows(seeded.workflowId, 0)).toHaveLength(0) expect(notifiedFor(seeded.workflowId)).toBe(0) @@ -313,7 +312,7 @@ check('a one-field edit changes exactly that stored field and keeps every id', a ) const reread = await getSource(seeded.workflowId) - expect(reread.fingerprint).toBe(result.newFingerprint) + expect(reread.fingerprint).toBe(result.fingerprint) expect(await settledAuditRows(seeded.workflowId, 1)).toHaveLength(1) expect(notifiedFor(seeded.workflowId)).toBe(1) }) @@ -364,11 +363,11 @@ check('editing a locked block is refused with diagnostics and writes nothing', a const error = await expectRejected( apply(source, edit(source.files, SCORE_CODE, 'return 11')), - 'E_APPLY_PROTECTED_BLOCK' + 'E_APPLY_LOCKED_BLOCK' ) expect(error.code).toBe('validation') - expect(error.diagnostics.find((d) => d.code === 'E_APPLY_PROTECTED_BLOCK')?.blockId).toBe( + expect(error.diagnostics.find((d) => d.code === 'E_APPLY_LOCKED_BLOCK')?.blockId).toBe( seeded.scoreId ) expect(await snapshot(seeded.workflowId)).toEqual(before) @@ -421,28 +420,28 @@ check('a rename keeps the block id, so a webhook row bound to it stays valid', a }) check( - 'an apply stores its bindings, order and comments in code_meta, and the next get prints them', + 'an apply stores its idents, order and comments in source meta, and the next get prints them', async () => { const seeded = await seedWorkflow() const source = await getSource(seeded.workflowId) - const scoreBinding = source.lock.blocks.score.binding + const scoreIdent = source.lock.blocks.score.ident const renamed = source.files['workflow.ts'] - .replace(new RegExp(`(? { workflowId: seeded.workflowId, files: source.files, lock: source.lock, - baseFingerprint: source.fingerprint, + base: source.base, }, }) ) @@ -477,7 +476,7 @@ check('a dry run reports the outcome and never writes', async () => { expect(result.dryRun).toBe(true) expect(result.applied).toBe(false) expect(result.diff.blocks.modified.map((block) => block.id)).toEqual([seeded.scoreId]) - expect(result.newFingerprint).not.toBe(source.fingerprint) + expect(result.fingerprint).not.toBe(source.fingerprint) expect(await snapshot(seeded.workflowId)).toEqual(before) expect(await settledAuditRows(seeded.workflowId, 0)).toHaveLength(0) expect(notifiedFor(seeded.workflowId)).toBe(0) diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts b/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts index 3d8aca22b7e..b9c964c7fb9 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.parity.integration.ts @@ -27,11 +27,11 @@ import { eq } from 'drizzle-orm' import { afterAll, beforeAll, expect, it, vi } from 'vitest' import { withPermissionGroupScope } from '@/lib/permission-groups/request-scope.server' import { applyWorkflowSource } from '@/lib/workflows/application/apply-workflow-source' -import { getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' +import { readWorkflowSource } from '@/lib/workflows/application/read-workflow-source' import { WorkflowSourceRejectedError } from '@/lib/workflows/application/source-error' import { gateSourceDiff, SKIP_TYPE_APPLY_CODES } from '@/lib/workflows/code/apply/gates' import type { SourceGraph } from '@/lib/workflows/code/apply/graph-diff' -import { findProtectedBlockRefusals } from '@/lib/workflows/code/apply/protected' +import { findLockedBlockRefusals } from '@/lib/workflows/code/apply/locked' import { buildBlockCatalog } from '@/lib/workflows/code/catalog/build' import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' @@ -59,11 +59,11 @@ const checks: { name: string; status: string; durationMs: number; error?: string /** Gate and pipeline codes as the engine's skip vocabulary, as `gates.test.ts` reduces them. */ const CATEGORY: Record = { ...Object.fromEntries(Object.entries(SKIP_TYPE_APPLY_CODES).map(([skip, code]) => [code, skip])), - E_APPLY_PROTECTED_BLOCK: 'block_locked', + E_APPLY_LOCKED_BLOCK: 'block_locked', E_APPLY_CREDENTIAL_UNREACHABLE: 'credential', E_APPLY_SANDBOX_PLAN_REQUIRED: 'sandbox_plan', /** The pipeline's own placement refusal for a type the caller may keep but not add. */ - E_TYPE_NOT_ADDABLE: 'block_not_allowed', + E_APPLY_TYPE_NOT_ADDABLE: 'block_not_allowed', } interface BlockOptions { @@ -323,7 +323,7 @@ it.each(CASES)('$name', async (testCase) => { const direct = await withPermissionGroupScope(async () => categories([ - ...findProtectedBlockRefusals(base, target), + ...findLockedBlockRefusals(base, target), ...(await gateSourceDiff({ base, target, @@ -336,7 +336,7 @@ it.each(CASES)('$name', async (testCase) => { ) const source = await withPermissionGroupScope(() => - getWorkflowSource.execute({ principal, input: { workflowId } }) + readWorkflowSource.execute({ principal, input: { workflowId } }) ) const { files, lock } = printTarget(target, name) const outcome = await withPermissionGroupScope(() => @@ -346,8 +346,7 @@ it.each(CASES)('$name', async (testCase) => { workflowId, files, lock, - lockBase: source.lockBase, - baseFingerprint: source.fingerprint, + base: source.base, }, }) ).then( diff --git a/apps/sim/lib/workflows/application/apply-workflow-source.ts b/apps/sim/lib/workflows/application/apply-workflow-source.ts index d81dd26058e..baa464f3789 100644 --- a/apps/sim/lib/workflows/application/apply-workflow-source.ts +++ b/apps/sim/lib/workflows/application/apply-workflow-source.ts @@ -10,12 +10,15 @@ import { assertFolderMutable, FolderLockedError } from '@sim/platform-authz/work import { generateId } from '@sim/utils/id' import { type CanonicalizeResult, - type LockBase, + type SourceBase, sourceFingerprint, - type WorkflowCodeMetaV1, type WorkflowLockV1, + type WorkflowSourceMetaV1, } from '@sim/workflow-code' -import { readWorkflowCodeMeta, writeWorkflowCodeMeta } from '@sim/workflow-persistence/code-meta' +import { + readWorkflowSourceMeta, + writeWorkflowSourceMeta, +} from '@sim/workflow-persistence/source-meta' import type { WorkflowState } from '@sim/workflow-types/workflow' import { isEqual } from 'es-toolkit' import { resolveCatalogGate, withCatalogBlockScope } from '@/lib/catalog/application/context' @@ -46,7 +49,7 @@ import { printStoredSource, type StoredSource, } from '@/lib/workflows/code/apply/print' -import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog' +import { buildSourceCatalog } from '@/lib/workflows/code/catalog/workspace' import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' import { canonicalizeStored } from '@/lib/workflows/code/stored-canonical' import { checkNeedsRedeployment } from '@/lib/workflows/deployment-status' @@ -71,10 +74,11 @@ export interface ApplyWorkflowSourceInput extends SourceSubmission { assertedWorkspaceId?: string /** The identity lock returned by `source get` (or a previous apply). */ lock: WorkflowLockV1 - /** The environment facts that came with the lock; a lock read elsewhere is treated as stale. */ - lockBase?: LockBase - /** The `fingerprint` the source was read at; the apply answers 409 when it no longer matches. */ - baseFingerprint: string + /** + * Where and when the source was read. The apply answers 409 when `base.fingerprint` no longer + * matches the draft; a lock read in another workspace is treated as stale. + */ + base: SourceBase } export interface CreateWorkflowFromSourceInput extends SourceSubmission { @@ -97,18 +101,18 @@ interface ApplyWorkflowSourceResult { diff: SourceDiffSummary /** Warnings on success; on a dry run, every finding including the errors a commit would refuse. */ diagnostics: WorkflowSourceDiagnostic[] - /** The fingerprint of what is (or would be) stored; the next apply's `baseFingerprint`. */ - newFingerprint: string + /** The fingerprint of what is (or would be) stored; the next apply's `base.fingerprint`. */ + fingerprint: string /** Re-printed from what is (or would be) stored, so normalized values show in the source. */ files: Record lock: WorkflowLockV1 - lockBase: LockBase + base: SourceBase /** Source key → id for every new block whose id was minted rather than taken from the lock. */ mintedIds: Record - warnings: string[] + notes: string[] needsRedeployment: boolean sdkMajor: number - catalogVersion: string + catalogHash: string } /** @@ -116,7 +120,7 @@ interface ApplyWorkflowSourceResult { * apply creates, with an empty graph standing in for the stored one. */ type SourceApplyTarget = - | { kind: 'existing'; context: ActiveWorkflowApplicationContext; baseFingerprint: string } + | { kind: 'existing'; context: ActiveWorkflowApplicationContext; base: SourceBase } | { kind: 'new' workspace: ActiveWorkspaceApplicationContext @@ -130,8 +134,8 @@ type SourceApplyTarget = * against its live per-workflow catalog and evaluates them onto the stored graph * (`evaluateSource`); any error refuses the whole write, with source lines. The write is one * replace under the workflow row lock that re-checks the fingerprint (409 when the draft moved) - * and stores the submission's bindings, order and comments in `code_meta`. A source that changes - * only those is a graph no-op that stores just `code_meta`. Draft only: it never deploys. + * and stores the submission's idents, order and comments in source meta. A source that changes + * only those is a graph no-op that stores just source meta. Draft only: it never deploys. */ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ operation: workflowOperations.applySource, @@ -142,7 +146,7 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ return runSourceApply(principal, input, { kind: 'existing', context, - baseFingerprint: input.baseFingerprint, + base: input.base, }) }, /** Only a committed, non-empty apply is a change worth auditing. */ @@ -166,7 +170,7 @@ export const applyWorkflowSource = defineAuthorizedWorkflowUseCase({ /** * Creates a workflow from source: the same pipeline as {@link applyWorkflowSource} with an empty * graph as the stored draft, so every block is new, every id is minted and no fingerprint is - * checked. The row, its graph, variables and `code_meta` are written in one transaction, so a + * checked. The row, its graph, variables and source meta are written in one transaction, so a * refused or failed create leaves nothing behind. A dry run runs every check and creates nothing. */ export const createWorkflowFromSource = defineAuthorizedWorkflowUseCase({ @@ -187,7 +191,7 @@ export const createWorkflowFromSource = defineAuthorizedWorkflowUseCase({ } return runSourceApply( principal, - { ...input, lock: { lockVersion: 1, blocks: {}, variables: {} } }, + { ...input, lock: { version: 1, blocks: {}, variables: {} } }, { kind: 'new', workspace: context, @@ -237,7 +241,7 @@ function sourceAuditMetadata( edgesRemoved: edges.removed, variablesChanged: variables.added.length + variables.removed.length + variables.modified.length, sdkMajor: result.sdkMajor, - catalogVersion: result.catalogVersion, + catalogHash: result.catalogHash, ...(input.provenance ? { client: input.provenance.client } : {}), ...(input.provenance?.gitSha ? { gitSha: input.provenance.gitSha } : {}), source: principalAuditSource(principal), @@ -255,13 +259,13 @@ async function loadStoredSource(context: ActiveWorkflowApplicationContext): Prom /** * The source-apply pipeline for either target: evaluate the submission onto the stored graph - * (empty for a new workflow), then write it: `code_meta` alone for a graph no-op, a replace under + * (empty for a new workflow), then write it: source meta alone for a graph no-op, a replace under * the row lock for an existing draft, or a create that inserts the row and its graph in one * transaction. A dry run stops before the write; a refusal throws, or on a dry run answers 200. */ async function runSourceApply( principal: Principal, - input: SourceSubmission & { lock: WorkflowLockV1; lockBase?: LockBase }, + input: SourceSubmission & { lock: WorkflowLockV1 }, target: SourceApplyTarget ): Promise { const context = @@ -276,11 +280,11 @@ async function runSourceApply( const subjectUserId = resolvePrincipalAttribution(principal, { workspaceBillingOwnerUserId: context.billedAccountUserId, }).attributedUserId - const [stored, storedCodeMeta]: [StoredSource, WorkflowCodeMetaV1 | null] = + const [stored, storedSourceMeta]: [StoredSource, WorkflowSourceMetaV1 | null] = target.kind === 'existing' ? await Promise.all([ loadStoredSource(target.context), - readWorkflowCodeMeta(db, context.workflowId), + readWorkflowSourceMeta(db, context.workflowId), ]) : [ { @@ -289,7 +293,7 @@ async function runSourceApply( }, null, ] - const { catalog } = buildCodeCatalog({ + const { catalog } = buildSourceCatalog({ gate, organizationId: context.workspaceOrganizationId, storedTypes: [...new Set(Object.values(stored.state.blocks).map((block) => block.type))], @@ -312,26 +316,26 @@ async function runSourceApply( const result = async ( printed: Pick, outcome: Pick & - Partial> + Partial> ): Promise => ({ workflowId: context.workflowId, workflowName: stored.meta.name, workspaceId: context.workspaceId, dryRun, mintedIds: {}, - warnings: [], + notes: [], ...outcome, - newFingerprint: printed.fingerprint, + fingerprint: printed.fingerprint, files: printed.files, lock: printed.lock, - lockBase: { + base: { workspaceId: context.workspaceId, - baseFingerprint: printed.fingerprint, + fingerprint: printed.fingerprint, catalogHash: catalog.hash, }, needsRedeployment: !isNew && (await checkNeedsRedeployment(context.workflowId)), sdkMajor: catalog.sdkMajor, - catalogVersion: catalog.hash, + catalogHash: catalog.hash, }) /** Refuses a commit; a dry run reports the same findings with a 200 instead. */ const refuse = (diagnostics: WorkflowSourceDiagnostic[]) => { @@ -342,7 +346,7 @@ async function runSourceApply( ) } - if (target.kind === 'existing' && storedFingerprint !== target.baseFingerprint) { + if (target.kind === 'existing' && storedFingerprint !== target.base.fingerprint) { if (!dryRun) throw new WorkflowSourceStaleError(storedFingerprint) return refuse([ { @@ -365,12 +369,12 @@ async function runSourceApply( stored, storedCanonical, storedFingerprint, - storedCodeMeta, + storedSourceMeta, catalog, createdBy, files: input.files, lock: input.lock, - ...(input.lockBase ? { lockBase: input.lockBase } : {}), + ...(target.kind === 'existing' ? { base: target.base } : {}), ...(target.kind === 'new' ? { create: target.create } : {}), }) if ('refused' in evaluation) return refuse(evaluation.refused) @@ -379,7 +383,7 @@ async function runSourceApply( /** Prints a state under the keys the submission bound, as the next `source get` will. */ const print = ( state: WorkflowState, - codeMeta: WorkflowCodeMetaV1 | null, + sourceMeta: WorkflowSourceMetaV1 | null, lockless?: CanonicalizeResult ) => printStoredSource({ @@ -387,13 +391,13 @@ async function runSourceApply( meta: plan.meta, catalog, resources: plan.resources, - codeMeta, + sourceMeta, functionCode: plan.functionCode, identity: plan.identity, ...(lockless ? { lockless } : {}), }) const printWritten = (written: Omit) => - print({ ...written, variables: plan.storedVariables }, plan.codeMeta) + print({ ...written, variables: plan.storedVariables }, plan.sourceMeta) const logContext = { workflowId: context.workflowId, workspaceId: context.workspaceId, @@ -401,14 +405,14 @@ async function runSourceApply( } if (plan.noop) { - const printed = print(stored.state, plan.codeMeta, storedCanonical.canonical) + const printed = print(stored.state, plan.sourceMeta, storedCanonical.canonical) if (!dryRun) { - const before = print(stored.state, storedCodeMeta, storedCanonical.canonical) + const before = print(stored.state, storedSourceMeta, storedCanonical.canonical) if (!isEqual(printed.files, before.files) || !isEqual(printed.lock, before.lock)) { - await writeWorkflowCodeMeta(db, context.workflowId, plan.codeMeta) + await writeWorkflowSourceMeta(db, context.workflowId, plan.sourceMeta) } } - return result(printed, { applied: false, diff, diagnostics, warnings: plan.warnings }) + return result(printed, { applied: false, diff, diagnostics, notes: plan.notes }) } const scope = { @@ -424,7 +428,7 @@ async function runSourceApply( diff, diagnostics, mintedIds, - warnings: [...plan.warnings, ...preview.warnings], + notes: [...plan.notes, ...preview.warnings], }) } @@ -436,7 +440,7 @@ async function runSourceApply( plan, stored, storedFingerprint, - baseFingerprint: target.baseFingerprint, + expectedFingerprint: target.base.fingerprint, catalog, }) logger.info(isNew ? 'Created workflow from source' : 'Applied workflow source', logContext) @@ -446,7 +450,7 @@ async function runSourceApply( diagnostics, mintedIds, ...('name' in committed ? { workflowName: committed.name } : {}), - warnings: [...plan.warnings, ...committed.warnings], + notes: [...plan.notes, ...committed.warnings], }) }) } diff --git a/apps/sim/lib/workflows/application/operations.ts b/apps/sim/lib/workflows/application/operations.ts index df5f2d31595..286e99241f4 100644 --- a/apps/sim/lib/workflows/application/operations.ts +++ b/apps/sim/lib/workflows/application/operations.ts @@ -84,6 +84,43 @@ export const workflowOperations = { contentDelivery: 'none', ...WORKFLOW_READ_PRINCIPAL_POLICY, }), + /** + * The source catalog: the per-workspace block catalog in the shape the workflow compiler reads. + * Same policy as `catalog.blocks.list` (s4 §2): a workspace read at the `read` role, reachable by + * a workspace API key and by Copilot delegation. + */ + // permission-group-exempt: the source catalog is the block catalog in another shape; withholding it hides the product rather than restricting it + readSourceCatalog: defineWorkspaceOperation({ + id: 'workflows.source.catalog.read', + oauthScope: 'api:read', + minimumRole: 'read', + workspaceApiKey: 'allow', + capability: 'none', + contentDelivery: 'none', + principalKinds: [ + 'session', + 'personal_api_key', + 'oauth_access_token', + 'workspace_api_key', + 'delegated', + ], + delegatedServices: ['copilot'], + }), + /** + * The workspace resources workflow source can name, by key. A read: any member may list them, + * as any member may read the source that names them; a workspace API key may too, like + * `workflows.source.read`. Listing allocates keys for resources that have none, which changes + * no resource (see `readSourceResources`). + */ + // permission-group-exempt: lists resource names and their keys, already visible to every workspace member; no group capability withholds them + readSourceResources: defineWorkspaceOperation({ + id: 'workflows.source.resources.read', + oauthScope: 'api:read', + minimumRole: 'read', + workspaceApiKey: 'allow', + capability: 'none', + principalKinds: ['session', 'personal_api_key', 'oauth_access_token', 'workspace_api_key'], + }), /** Full diagnostics retain the caller's subject for protected reference and secret reads. */ // permission-group-exempt: lint reads workflow content under the existing workflow and secret authorization policies readLint: defineWorkspaceOperation({ diff --git a/apps/sim/lib/workflows/application/get-workflow-source.ts b/apps/sim/lib/workflows/application/read-workflow-source.ts similarity index 81% rename from apps/sim/lib/workflows/application/get-workflow-source.ts rename to apps/sim/lib/workflows/application/read-workflow-source.ts index 60b0c89c9e7..fd5c3b5d8fa 100644 --- a/apps/sim/lib/workflows/application/get-workflow-source.ts +++ b/apps/sim/lib/workflows/application/read-workflow-source.ts @@ -5,18 +5,18 @@ import { type CanonicalWorkflow, canonicalHash, type Diagnostic, - type LockBase, + type SourceBase, type SourceFingerprint, type WorkflowLockV1, } from '@sim/workflow-code' -import { readWorkflowCodeMeta } from '@sim/workflow-persistence/code-meta' +import { readWorkflowSourceMeta } from '@sim/workflow-persistence/source-meta' import { resolveCatalogGate, withCatalogBlockScope } from '@/lib/catalog/application/context' import { defineAuthorizedWorkflowUseCase } from '@/lib/workflows/application/authorized-workflow-use-case' import { workflowOperations } from '@/lib/workflows/application/operations' import { resolvePrincipalWorkflowContext } from '@/lib/workflows/application/principal-scope' import { loadWorkflowGraph } from '@/lib/workflows/application/read-workflow-graph' import { printStoredSource } from '@/lib/workflows/code/apply/print' -import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog' +import { buildSourceCatalog } from '@/lib/workflows/code/catalog/workspace' import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' import { canonicalizeStored } from '@/lib/workflows/code/stored-canonical' @@ -28,7 +28,7 @@ interface GetWorkflowSourceInput { } /** A canonicalize or print finding, without source spans (the read path has no input text). */ -interface WorkflowSourceWarning { +interface WorkflowSourceReadDiagnostic { code: string severity: 'error' | 'warning' | 'info' message: string @@ -37,26 +37,26 @@ interface WorkflowSourceWarning { param?: string } -interface GetWorkflowSourceResult { +interface ReadWorkflowSourceResult { workflowId: string workspaceId: string /** Repo-relative path → text: `workflow.ts` first, then any function-code files. */ files: Record lock: WorkflowLockV1 - lockBase: LockBase + base: SourceBase /** `sf1:` freshness token; apply answers 409 when the stored graph no longer matches it. */ fingerprint: SourceFingerprint /** Hash of the canonical model the files compile to (annotations excluded). */ canonicalHash: string - /** The compile catalog's content hash the files were printed against. */ - catalogVersion: string + /** The source catalog's content hash the files were printed against. */ + catalogHash: string sdkMajor: number /** Block types the source uses, as blocks or as agent tools, sorted; for SDK type generation. */ blockTypes: string[] - warnings: WorkflowSourceWarning[] + diagnostics: WorkflowSourceReadDiagnostic[] } -function toWarning(diagnostic: Diagnostic): WorkflowSourceWarning { +function toReadDiagnostic(diagnostic: Diagnostic): WorkflowSourceReadDiagnostic { return { code: diagnostic.code, severity: diagnostic.severity, @@ -79,28 +79,28 @@ function usedBlockTypes(workflow: CanonicalWorkflow): string[] { } /** - * Reads a workflow's stored draft as TypeScript source. Builds the per-workflow compile catalog + * Reads a workflow's stored draft as TypeScript source. Builds the per-workflow source catalog * (the blocks this caller may place plus every type already in the workflow), canonicalizes the * stored graph once with resource ids lifted to their persisted keys, and prints it with the - * bindings, order and comments of its `code_meta` through the same printer every apply response + * idents, order and comments of its source meta through the same printer every apply response * uses. No audit. The one write is resource-key allocation: the first get that references a * resource with no key binds one. That is idempotent identity metadata, so read access may cause it. */ -export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ +export const readWorkflowSource = defineAuthorizedWorkflowUseCase({ operation: workflowOperations.readSource, resolveContext: resolvePrincipalWorkflowContext, - async execute({ principal, input, context }): Promise { + async execute({ principal, input, context }): Promise { await requireWorkflowCodeEnabled() - const [graph, gate, codeMeta] = await Promise.all([ + const [graph, gate, sourceMeta] = await Promise.all([ loadWorkflowGraph(context), resolveCatalogGate(principal, context, { customBlockInputs: true }), - readWorkflowCodeMeta(db, context.workflowId), + readWorkflowSourceMeta(db, context.workflowId), ]) const { blocks, edges, loops, parallels, variables } = graph const state = { blocks, edges, loops, parallels, variables } const meta = { name: context.workflow.name, description: context.workflow.description ?? null } const { catalog } = await withCatalogBlockScope(gate, async () => - buildCodeCatalog({ + buildSourceCatalog({ gate, organizationId: context.workspaceOrganizationId, storedTypes: [...new Set(Object.values(blocks).map((block) => block.type))], @@ -119,7 +119,7 @@ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ meta, catalog, resources, - codeMeta, + sourceMeta, functionCode: input.functionCode ?? 'files', lockless: canonical, }) @@ -128,17 +128,17 @@ export const getWorkflowSource = defineAuthorizedWorkflowUseCase({ workspaceId: context.workspaceId, files: printed.files, lock: printed.lock, - lockBase: { + base: { workspaceId: context.workspaceId, - baseFingerprint: printed.fingerprint, + fingerprint: printed.fingerprint, catalogHash: catalog.hash, }, fingerprint: printed.fingerprint, canonicalHash: canonicalHash(canonical.workflow), - catalogVersion: catalog.hash, + catalogHash: catalog.hash, sdkMajor: catalog.sdkMajor, blockTypes: usedBlockTypes(canonical.workflow), - warnings: [...canonical.diagnostics, ...printed.diagnostics].map(toWarning), + diagnostics: [...canonical.diagnostics, ...printed.diagnostics].map(toReadDiagnostic), } }, }) diff --git a/apps/sim/lib/workflows/application/source-commit.ts b/apps/sim/lib/workflows/application/source-commit.ts index 504bee2b02d..9b68b8f18cc 100644 --- a/apps/sim/lib/workflows/application/source-commit.ts +++ b/apps/sim/lib/workflows/application/source-commit.ts @@ -3,7 +3,10 @@ import { workflow as workflowTable } from '@sim/db/schema' import { createLogger } from '@sim/logger' import { omit } from '@sim/utils/object' import type { BlockCatalog, SourceFingerprint } from '@sim/workflow-code' -import { readWorkflowCodeMeta, writeWorkflowCodeMeta } from '@sim/workflow-persistence/code-meta' +import { + readWorkflowSourceMeta, + writeWorkflowSourceMeta, +} from '@sim/workflow-persistence/source-meta' import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' import { and, eq, isNull } from 'drizzle-orm' import { isEqual } from 'es-toolkit' @@ -12,9 +15,9 @@ import type { DbOrTx } from '@/lib/db/types' import { WorkflowSourceStaleError } from '@/lib/workflows/application/source-error' import type { SourcePlan } from '@/lib/workflows/application/source-evaluate' import { requireWorkflowTransition } from '@/lib/workflows/application/transition-result' +import { assertLockedBlocksPreserved } from '@/lib/workflows/code/apply/locked' import { fingerprintOf, type StoredSource } from '@/lib/workflows/code/apply/print' -import { assertProtectedBlocksPreserved } from '@/lib/workflows/code/apply/protected' -import { mergeCodeMetaFromLock } from '@/lib/workflows/code/source-lock' +import { mergeSourceMetaFromLock } from '@/lib/workflows/code/source-lock' import { performCreateWorkflowTransition } from '@/lib/workflows/orchestration' import { assertNoWithheldBlockType } from '@/lib/workflows/persistence/block-access-guard' import { extractAndPersistCustomTools } from '@/lib/workflows/persistence/custom-tools-persistence' @@ -124,8 +127,8 @@ function mergeCurrentLayout( /** * Writes the plan over an existing draft in one `replaceWorkflowNormalizedState` under the * workflow row lock. Inside the lock it re-reads the draft and answers 409 when its fingerprint - * moved off `baseFingerprint`, keeps current canvas positions for existing blocks, asserts the - * protected-block merge is the identity, and stores the submission's `code_meta` in the same + * moved off `expectedFingerprint`, keeps current canvas positions for existing blocks, asserts the + * locked-block merge is the identity, and stores the submission's source meta in the same * transaction. */ export async function commitSourceReplace(args: { @@ -134,7 +137,7 @@ export async function commitSourceReplace(args: { /** The draft the plan was evaluated against, and its fingerprint. */ stored: StoredSource storedFingerprint: SourceFingerprint - baseFingerprint: string + expectedFingerprint: string catalog: BlockCatalog }): Promise { const { scope, plan, stored, catalog } = args @@ -152,20 +155,20 @@ export async function commitSourceReplace(args: { const fingerprint = isEqual(current, stored) ? args.storedFingerprint : fingerprintOf(current, catalog, plan.resources) - if (fingerprint !== args.baseFingerprint) throw new WorkflowSourceStaleError(fingerprint) + if (fingerprint !== args.expectedFingerprint) throw new WorkflowSourceStaleError(fingerprint) const next = { blocks: mergeCurrentLayout(plan.blocks, current.state.blocks), edges: plan.edges, } - assertProtectedBlocksPreserved( + assertLockedBlocksPreserved( { blocks: current.state.blocks, edges: current.state.edges }, next ) - await writeWorkflowCodeMeta( + await writeWorkflowSourceMeta( tx, scope.workflowId, - mergeCodeMetaFromLock( - await readWorkflowCodeMeta(tx, scope.workflowId), + mergeSourceMetaFromLock( + await readWorkflowSourceMeta(tx, scope.workflowId), plan.lock, plan.compiled ) @@ -178,7 +181,7 @@ export async function commitSourceReplace(args: { /** * Inserts a workflow created from source and its graph in one transaction: the row (with the * create path's folder, name-conflict and sort rules), the prepared graph under the caller's block - * access, its variables and its `code_meta`. A name taken in the folder is a 409; any failure rolls + * access, its variables and its source meta. A name taken in the folder is a 409; any failure rolls * the whole create back. */ export async function commitSourceCreate(args: { @@ -214,7 +217,7 @@ export async function commitSourceCreate(args: { .set({ variables: plan.variables }) .where(eq(workflowTable.id, workflowId)) } - await writeWorkflowCodeMeta(tx, workflowId, plan.codeMeta) + await writeWorkflowSourceMeta(tx, workflowId, plan.sourceMeta) }, }) requireWorkflowTransition(transition, 'Failed to create workflow') diff --git a/apps/sim/lib/workflows/application/source-error.ts b/apps/sim/lib/workflows/application/source-error.ts index e0d11d05962..0faf5986878 100644 --- a/apps/sim/lib/workflows/application/source-error.ts +++ b/apps/sim/lib/workflows/application/source-error.ts @@ -20,12 +20,12 @@ export interface WorkflowSourceDiagnostic { blockKey?: string blockId?: string param?: string - /** JSON Pointer into a non-source input, such as the lock (`/blocks/agent/binding`). */ + /** JSON Pointer into a non-source input, such as the lock (`/blocks/agent/ident`). */ path?: string } /** - * Submitted workflow source that cannot be applied: a compile error, a gate refusal, a protected + * Submitted workflow source that cannot be applied: a compile error, a gate refusal, a locked * block, an invalid value or a blocking lint finding (s4 D5). Nothing was written. Kept apart * from the use case so a route error policy can narrow on it without importing the compiler. */ diff --git a/apps/sim/lib/workflows/application/source-evaluate.ts b/apps/sim/lib/workflows/application/source-evaluate.ts index 642af3fc73f..add7a3a9c82 100644 --- a/apps/sim/lib/workflows/application/source-evaluate.ts +++ b/apps/sim/lib/workflows/application/source-evaluate.ts @@ -9,8 +9,6 @@ import { compileWorkflow, type Diagnostic, diffCanonical, - type LockBase, - type LockHints, type LockIdentity, type MaterializeResult, materialize, @@ -18,9 +16,11 @@ import { type ResourceKeyResolver, type ResourceKind, renamesBetween, - type WorkflowCodeMetaV1, + type SourceBase, + type SourceHints, type WorkflowLockBlock, type WorkflowLockV1, + type WorkflowSourceMetaV1, } from '@sim/workflow-code' import { catalogBlock } from '@sim/workflow-code/catalog/view' import type { BlockState, WorkflowState } from '@sim/workflow-types/workflow' @@ -41,15 +41,15 @@ import { import { normalizeWorkflowVariables } from '@/lib/workflows/application/workflow-variables' import { gateSourceDiff } from '@/lib/workflows/code/apply/gates' import { diffGraphs, type SourceGraph } from '@/lib/workflows/code/apply/graph-diff' +import { findLockedBlockRefusals } from '@/lib/workflows/code/apply/locked' import { boundLock, type StoredSource } from '@/lib/workflows/code/apply/print' -import { findProtectedBlockRefusals } from '@/lib/workflows/code/apply/protected' import { createMaterializeHooks } from '@/lib/workflows/code/materialize-hooks' import { loadResourceKeyResolver } from '@/lib/workflows/code/resources' -import { mergeCodeMetaFromLock } from '@/lib/workflows/code/source-lock' +import { mergeSourceMetaFromLock } from '@/lib/workflows/code/source-lock' import { canonicalizeUnderLock, type StoredCanonical } from '@/lib/workflows/code/stored-canonical' import { buildWorkflowLintReport } from '@/lib/workflows/editing/lint-report' import { parseWorkflowVariables } from '@/lib/workflows/variables/parse' -import type { ResourceKeyRef } from '@/lib/workspaces/resource-bindings' +import type { ResourceKeyRef } from '@/lib/workspaces/resource-keys' /** The entry file every submission carries; function code lives beside it. */ const ENTRY_FILE = 'workflow.ts' @@ -69,13 +69,14 @@ export interface SourceEvaluationInput { /** `stored` canonicalized with its resource keys. */ storedCanonical: StoredCanonical storedFingerprint: string - storedCodeMeta: WorkflowCodeMetaV1 | null + storedSourceMeta: WorkflowSourceMetaV1 | null catalog: BlockCatalog /** Attribution for resource keys a submitted reference allocates. */ createdBy: string | null files: Record lock: WorkflowLockV1 - lockBase?: LockBase + /** Where and when the source was read; absent for a create. */ + base?: SourceBase /** Set when the apply creates the workflow: the caller's name and description overrides. */ create?: { name?: string; description?: string | null } } @@ -84,7 +85,7 @@ export interface SourceEvaluationInput { export interface SourcePlan { /** The workflow's name and description: the stored ones, or a created workflow's. */ meta: CanonicalWorkflowMeta - /** The graph is unchanged; only `code_meta` may differ. Never true for a create. */ + /** The graph is unchanged; only source meta may differ. Never true for a create. */ noop: boolean blocks: Record edges: WorkflowState['edges'] @@ -94,18 +95,19 @@ export interface SourcePlan { storedVariables: WorkflowState['variables'] /** Warnings (on a dry run, every finding), pinned to the submitted files. */ diagnostics: WorkflowSourceDiagnostic[] - warnings: string[] + /** Non-fatal notes about the write. */ + notes: string[] diff: SourceDiffSummary /** Source key → id for every new block whose id was minted rather than taken from the lock. */ mintedIds: Record /** Every key the write binds, with its id: what the next print is keyed by. */ identity: LockIdentity - /** The post-materialize lock the compiled bindings and comments are re-keyed onto. */ + /** The post-materialize lock the compiled idents and comments are re-keyed onto. */ lock: WorkflowLockV1 - /** The compiled file's bindings, order and comments. */ - compiled: { hints: LockHints; workflow: Pick } - /** `code_meta` after the write, merged onto the stored one. */ - codeMeta: WorkflowCodeMetaV1 + /** The compiled file's idents, order and comments. */ + compiled: { hints: SourceHints; workflow: Pick } + /** source meta after the write, merged onto the stored one. */ + sourceMeta: WorkflowSourceMetaV1 /** How the response prints function code: as the submission did. */ functionCode: 'inline' | 'files' /** Answers every resource reference of both the stored and the submitted source. */ @@ -114,7 +116,7 @@ export interface SourcePlan { export type SourceEvaluation = { refused: WorkflowSourceDiagnostic[] } | { plan: SourcePlan } -/** Every `(kind, key)` resource reference in a compiled model, for binding lookup. */ +/** Every `(kind, key)` resource reference in a compiled model, for ident lookup. */ function collectResourceKeys(value: unknown, refs: ResourceKeyRef[]): void { if (Array.isArray(value)) { for (const item of value) collectResourceKeys(item, refs) @@ -145,7 +147,7 @@ async function findBlockIdsClaimedElsewhere(workflowId: string, ids: string[]): /** * Evaluates submitted source against a stored draft without writing it: compile against the live * catalog, parse the lock, materialize onto the stored graph (keeping every unchanged value's - * stored bytes and every id the lock binds), then every gate (protected blocks, engine gates, + * stored bytes and every id the lock binds), then every gate (locked blocks, engine gates, * types that may stay but not be added), the value checks and lint. Returns the refusals, located * in the submitted text, or the plan the write stores. */ @@ -207,14 +209,14 @@ export async function evaluateSource(input: SourceEvaluationInput): Promise 0 || Object.keys(lock.variables).length > 0 const lockFreshness: 'fresh' | 'stale' | 'none' = !hasLockEntries ? 'none' - : input.lockBase && - (input.lockBase.workspaceId !== scope.workspaceId || - input.lockBase.baseFingerprint !== input.storedFingerprint) + : input.base && + (input.base.workspaceId !== scope.workspaceId || + input.base.fingerprint !== input.storedFingerprint) ? 'stale' : 'fresh' - const compiledBindings: Record = {} + const compiledIdents: Record = {} for (const [key, hint] of Object.entries(compiled.hints.blocks)) { - if (hint.binding !== undefined) compiledBindings[key] = hint.binding + if (hint.ident !== undefined) compiledIdents[key] = hint.ident } const hooks = createMaterializeHooks() const materializeWith = (withLock: WorkflowLockV1): MaterializeResult => @@ -223,7 +225,7 @@ export async function evaluateSource(input: SourceEvaluationInput): Promise 0) { - warnings.push( + notes.push( `The workflow ${ignoredMeta.join(' and ')} in the source differs from the stored one and was not changed; rename or describe the workflow through its settings.` ) } @@ -307,7 +309,7 @@ export async function evaluateSource(input: SourceEvaluationInput): Promise hint.codeFile) ? 'files' : 'inline', diff --git a/apps/sim/lib/workflows/code/apply/gates.test.ts b/apps/sim/lib/workflows/code/apply/gates.test.ts index 5ef7e8715a7..1c5d314f2d2 100644 --- a/apps/sim/lib/workflows/code/apply/gates.test.ts +++ b/apps/sim/lib/workflows/code/apply/gates.test.ts @@ -24,7 +24,7 @@ import { } from '@/lib/permission-groups/fields' import { gateSourceDiff, SKIP_TYPE_APPLY_CODES } from '@/lib/workflows/code/apply/gates' import type { SourceGraph } from '@/lib/workflows/code/apply/graph-diff' -import { findProtectedBlockRefusals } from '@/lib/workflows/code/apply/protected' +import { findLockedBlockRefusals } from '@/lib/workflows/code/apply/locked' import { decideBlockEnablement } from '@/lib/workflows/editing/block-enablement' import { applyOperationsToWorkflowState } from '@/lib/workflows/editing/engine' import { operationsReferenceSimSandbox } from '@/lib/workflows/editing/sandbox-projection' @@ -240,7 +240,7 @@ async function engineRefusals(testCase: ParityCase): Promise { const APPLY_CODE_CATEGORY: Record = { ...Object.fromEntries(Object.entries(SKIP_TYPE_APPLY_CODES).map(([skip, code]) => [code, skip])), - E_APPLY_PROTECTED_BLOCK: 'block_locked', + E_APPLY_LOCKED_BLOCK: 'block_locked', E_APPLY_CREDENTIAL_UNREACHABLE: 'credential', W_APPLY_HOSTED_KEY_DROPPED: 'hosted_key', E_APPLY_SANDBOX_PLAN_REQUIRED: 'sandbox_plan', @@ -248,7 +248,7 @@ const APPLY_CODE_CATEGORY: Record = { async function sourceRefusals(testCase: ParityCase): Promise { const diagnostics = [ - ...findProtectedBlockRefusals(testCase.base, testCase.target), + ...findLockedBlockRefusals(testCase.base, testCase.target), ...(await gateSourceDiff({ base: testCase.base, target: testCase.target, diff --git a/apps/sim/lib/workflows/code/apply/gates.ts b/apps/sim/lib/workflows/code/apply/gates.ts index 2b0dc3c5c95..bf612d98f65 100644 --- a/apps/sim/lib/workflows/code/apply/gates.ts +++ b/apps/sim/lib/workflows/code/apply/gates.ts @@ -48,7 +48,7 @@ export const SKIP_TYPE_APPLY_CODES = { invalid_block_type: 'E_APPLY_INVALID_BLOCK_TYPE', block_not_allowed: 'E_APPLY_BLOCK_NOT_ALLOWED', model_not_allowed: 'E_APPLY_MODEL_NOT_ALLOWED', - block_locked: 'E_APPLY_BLOCK_LOCKED', + block_locked: 'E_APPLY_LOCKED_BLOCK', tool_not_allowed: 'E_APPLY_TOOL_NOT_ALLOWED', invalid_edge_source: 'E_APPLY_INVALID_EDGE_SOURCE', invalid_edge_scope: 'E_APPLY_INVALID_EDGE_SCOPE', @@ -300,7 +300,7 @@ function sandboxChanged(entry: GatedBlock): boolean { * refuse the whole apply; `W_APPLY_HOSTED_KEY_DROPPED` names a platform-managed key the use case * must leave unset, and `W_APPLY_TYPE_CHANGED` a block that keeps its id under a new type. * - * Protected blocks are refused separately, by `findProtectedBlockRefusals`. + * Locked blocks are refused separately, by `findLockedBlockRefusals`. */ export async function gateSourceDiff(args: GateSourceDiffArgs): Promise { const { base, target, permissionConfig, subjectUserId, workspaceId, isCopilot } = args diff --git a/apps/sim/lib/workflows/code/apply/protected.test.ts b/apps/sim/lib/workflows/code/apply/locked.test.ts similarity index 83% rename from apps/sim/lib/workflows/code/apply/protected.test.ts rename to apps/sim/lib/workflows/code/apply/locked.test.ts index 546b232c3c1..f9eab1eae38 100644 --- a/apps/sim/lib/workflows/code/apply/protected.test.ts +++ b/apps/sim/lib/workflows/code/apply/locked.test.ts @@ -1,5 +1,5 @@ /** - * The protected-block gate must refuse every change the persistence door's + * The locked-block gate must refuse every change the persistence door's * `preserveProtectedWorkflowBlocks` merge would silently undo, so that a write the gate admits is * stored exactly as submitted (s4 D2). */ @@ -8,9 +8,9 @@ import { type BlockState, preserveProtectedWorkflowBlocks } from '@sim/workflow- import { describe, expect, it } from 'vitest' import type { SourceGraph } from '@/lib/workflows/code/apply/graph-diff' import { - assertProtectedBlocksPreserved, - findProtectedBlockRefusals, -} from '@/lib/workflows/code/apply/protected' + assertLockedBlocksPreserved, + findLockedBlockRefusals, +} from '@/lib/workflows/code/apply/locked' type GraphEdge = SourceGraph['edges'][number] @@ -136,8 +136,8 @@ function withStoredLayout(current: SourceGraph, target: SourceGraph): SourceGrap return { blocks, edges: target.edges } } -describe('findProtectedBlockRefusals', () => { - it('refuses every change the protected-block merge would undo, across every lock layout', () => { +describe('findLockedBlockRefusals', () => { + it('refuses every change the locked-block merge would undo, across every lock layout', () => { let admitted = 0 let refused = 0 for (const locked of lockCombinations()) { @@ -145,14 +145,14 @@ describe('findProtectedBlockRefusals', () => { const base = baseGraph(locked) const target = structuredClone(base) mutate(target) - const refusals = findProtectedBlockRefusals(base, target) + const refusals = findLockedBlockRefusals(base, target) if (refusals.length > 0) { refused++ continue } admitted++ expect( - () => assertProtectedBlocksPreserved(base, withStoredLayout(base, target)), + () => assertLockedBlocksPreserved(base, withStoredLayout(base, target)), `${name} with locked=[${[...locked].join(',')}] was admitted but the merge changes it` ).not.toThrow() } @@ -167,7 +167,7 @@ describe('findProtectedBlockRefusals', () => { target.blocks.b.name = 'renamed' const merged = preserveProtectedWorkflowBlocks(base, target) expect(merged.blocks.b.name).toBe('b') - expect(findProtectedBlockRefusals(base, target).map((d) => d.blockId)).toEqual(['b']) + expect(findLockedBlockRefusals(base, target).map((d) => d.blockId)).toEqual(['b']) }) it('refuses an edge added into a locked block, which the engine would let through', () => { @@ -175,9 +175,9 @@ describe('findProtectedBlockRefusals', () => { const target = structuredClone(base) target.blocks.n = block('n') target.edges.push(edge('n', 'b')) - const refusals = findProtectedBlockRefusals(base, target) + const refusals = findLockedBlockRefusals(base, target) expect(refusals).toEqual([ - expect.objectContaining({ code: 'E_APPLY_PROTECTED_BLOCK', blockId: 'b' }), + expect.objectContaining({ code: 'E_APPLY_LOCKED_BLOCK', blockId: 'b' }), ]) }) @@ -185,14 +185,14 @@ describe('findProtectedBlockRefusals', () => { const base = baseGraph(new Set(['a'])) const target = structuredClone(base) target.edges = target.edges.filter((e) => e.id !== 'a->b') - expect(findProtectedBlockRefusals(base, target).map((d) => d.blockId)).toEqual(['a']) + expect(findLockedBlockRefusals(base, target).map((d) => d.blockId)).toEqual(['a']) }) it('lets an edge to a locked block go when its unlocked source is deleted', () => { const base = baseGraph(new Set(['b'])) const target = structuredClone(base) removeBlocks(target, ['a']) - expect(findProtectedBlockRefusals(base, target)).toEqual([]) + expect(findLockedBlockRefusals(base, target)).toEqual([]) }) it('refuses locking a block or creating one locked', () => { @@ -201,7 +201,7 @@ describe('findProtectedBlockRefusals', () => { target.blocks.a.locked = true target.blocks.n = { ...block('n'), locked: true } expect( - findProtectedBlockRefusals(base, target) + findLockedBlockRefusals(base, target) .map((d) => d.blockId) .sort() ).toEqual(['a', 'n']) @@ -211,7 +211,7 @@ describe('findProtectedBlockRefusals', () => { const base = baseGraph(new Set(['a'])) const target = structuredClone(base) target.blocks.a.locked = false - expect(findProtectedBlockRefusals(base, target)).toEqual([ + expect(findLockedBlockRefusals(base, target)).toEqual([ expect.objectContaining({ blockId: 'a', message: expect.stringContaining('lock') }), ]) }) @@ -221,25 +221,25 @@ describe('findProtectedBlockRefusals', () => { const target = structuredClone(base) target.blocks.child.position = { x: 500, y: 500 } target.blocks.loop.data = { ...target.blocks.loop.data, width: 900 } - expect(findProtectedBlockRefusals(base, target)).toEqual([]) + expect(findLockedBlockRefusals(base, target)).toEqual([]) }) }) -describe('assertProtectedBlocksPreserved', () => { - it('throws an internal error when the target changes a protected block', () => { +describe('assertLockedBlocksPreserved', () => { + it('throws an internal error when the target changes a locked block', () => { const current = baseGraph(new Set(['a'])) const target = structuredClone(current) target.blocks.a.subBlocks.prompt.value = 'changed' - expect(() => assertProtectedBlocksPreserved(current, target)).toThrow( + expect(() => assertLockedBlocksPreserved(current, target)).toThrow( expect.objectContaining({ code: 'internal' }) ) }) - it('throws when the target drops an edge into a protected block', () => { + it('throws when the target drops an edge into a locked block', () => { const current = baseGraph(new Set(['b'])) const target = structuredClone(current) target.edges = target.edges.filter((e) => e.id !== 'a->b') - expect(() => assertProtectedBlocksPreserved(current, target)).toThrow() + expect(() => assertLockedBlocksPreserved(current, target)).toThrow() }) it('accepts a target whose unlocked blocks omit the lock flag', () => { @@ -247,6 +247,6 @@ describe('assertProtectedBlocksPreserved', () => { const target = structuredClone(current) target.blocks.a.subBlocks.prompt.value = 'changed' target.blocks.b = omit(target.blocks.b, ['locked']) - expect(() => assertProtectedBlocksPreserved(current, target)).not.toThrow() + expect(() => assertLockedBlocksPreserved(current, target)).not.toThrow() }) }) diff --git a/apps/sim/lib/workflows/code/apply/protected.ts b/apps/sim/lib/workflows/code/apply/locked.ts similarity index 76% rename from apps/sim/lib/workflows/code/apply/protected.ts rename to apps/sim/lib/workflows/code/apply/locked.ts index 6b11b04ad0c..537b817abab 100644 --- a/apps/sim/lib/workflows/code/apply/protected.ts +++ b/apps/sim/lib/workflows/code/apply/locked.ts @@ -16,18 +16,18 @@ import { } from '@/lib/workflows/code/apply/graph-diff' /** - * The source apply path refuses, and never silently preserves, any change to a protected block: + * The source apply path refuses, and never silently preserves, any change to a locked block: * one that is locked or sits inside a locked container (s4 D2). The persistence door keeps - * protected blocks as stored whatever the incoming graph says, so a source write that changed one + * locked blocks as stored whatever the incoming graph says, so a source write that changed one * would report success while storing something else. This applies to admins too, as the * operations engine does; unlocking stays the canvas toggle. */ -export type ProtectedBlockDiagnostic = Diagnostic<'E_APPLY_PROTECTED_BLOCK'> +export type LockedBlockDiagnostic = Diagnostic<'E_APPLY_LOCKED_BLOCK'> -function refusal(block: BlockState, message: string): ProtectedBlockDiagnostic { +function refusal(block: BlockState, message: string): LockedBlockDiagnostic { return { - code: 'E_APPLY_PROTECTED_BLOCK', + code: 'E_APPLY_LOCKED_BLOCK', severity: 'error', message, blockId: block.id, @@ -45,7 +45,7 @@ function describe(block: BlockState, blocks: Record): string } /** - * Whether a protected block leaves only because an unprotected container above it was deleted, + * Whether a locked block leaves only because an unlocked container above it was deleted, * which the engine and the persistence door both allow (the child goes with its container). */ function leavesWithRemovedContainer(id: string, base: SourceGraph, target: SourceGraph): boolean { @@ -60,24 +60,24 @@ function leavesWithRemovedContainer(id: string, base: SourceGraph, target: Sourc } /** - * Returns one refusal per protected block the diff from `base` to `target` touches, plus one per + * Returns one refusal per locked block the diff from `base` to `target` touches, plus one per * attempt to lock a block or to put a new child into a locked container. Edges into or out of a - * protected block may not be added or removed, except when the edge goes because its other end + * locked block may not be added or removed, except when the edge goes because its other end * was deleted. */ -export function findProtectedBlockRefusals( +export function findLockedBlockRefusals( base: SourceGraph, target: SourceGraph, diff: GraphDiff = diffGraphs(base, target) -): ProtectedBlockDiagnostic[] { - const isProtected = (id: string) => isWorkflowBlockProtected(id, base.blocks) - const refusals = new Map() +): LockedBlockDiagnostic[] { + const isLockedInBase = (id: string) => isWorkflowBlockProtected(id, base.blocks) + const refusals = new Map() const refuse = (block: BlockState, message: string) => { if (!refusals.has(block.id)) refusals.set(block.id, refusal(block, message)) } for (const id of diff.removed) { - if (isProtected(id) && !leavesWithRemovedContainer(id, base, target)) { + if (isLockedInBase(id) && !leavesWithRemovedContainer(id, base, target)) { const block = base.blocks[id] refuse(block, `${describe(block, base.blocks)} and cannot be deleted`) } @@ -85,7 +85,7 @@ export function findProtectedBlockRefusals( for (const change of diff.modified) { const block = base.blocks[change.id] - if (isProtected(change.id)) { + if (isLockedInBase(change.id)) { const what = change.lockedChanged ? 'its lock cannot be changed from source' : change.parentChanged @@ -99,7 +99,7 @@ export function findProtectedBlockRefusals( continue } const parentId = parentIdOf(target.blocks[change.id]) - if (change.parentChanged && parentId && isProtected(parentId)) { + if (change.parentChanged && parentId && isLockedInBase(parentId)) { refuse(block, `Block "${block.name}" cannot be moved into locked container "${parentId}"`) } } @@ -111,7 +111,7 @@ export function findProtectedBlockRefusals( continue } const parentId = parentIdOf(block) - if (parentId && isProtected(parentId)) { + if (parentId && isLockedInBase(parentId)) { refuse(block, `Block "${block.name}" cannot be added to locked container "${parentId}"`) } } @@ -122,13 +122,13 @@ export function findProtectedBlockRefusals( } for (const edge of diff.edgesAdded) { for (const endpoint of [edge.source, edge.target]) { - if (isProtected(endpoint)) refuseEdge(endpoint, 'added to') + if (isLockedInBase(endpoint)) refuseEdge(endpoint, 'added to') } } for (const edge of diff.edgesRemoved) { if (!target.blocks[edge.source] || !target.blocks[edge.target]) continue for (const endpoint of [edge.source, edge.target]) { - if (isProtected(endpoint)) refuseEdge(endpoint, 'removed from') + if (isLockedInBase(endpoint)) refuseEdge(endpoint, 'removed from') } } @@ -140,12 +140,12 @@ function withLockOff(block: BlockState): BlockState { } /** - * Asserts that the persistence door's protected-block merge leaves `target` unchanged. The + * Asserts that the persistence door's locked-block merge leaves `target` unchanged. The * source gate refuses every diff that merge would undo, so a difference here means the gate and * the merge disagree: an invariant breach, reported as an internal error (HTTP 500) rather than * written as a silently merged graph (s4 D2). `current` is the graph re-read under the row lock. */ -export function assertProtectedBlocksPreserved(current: SourceGraph, target: SourceGraph): void { +export function assertLockedBlocksPreserved(current: SourceGraph, target: SourceGraph): void { const merged = preserveProtectedWorkflowBlocks(current, target) const expectedBlocks = new Map(Object.values(target.blocks).map((b) => [b.id, withLockOff(b)])) @@ -164,8 +164,8 @@ export function assertProtectedBlocksPreserved(current: SourceGraph, target: Sou throw new OrchestrationError( 'internal', blockMismatch !== undefined - ? `Protected-block merge would change block ${blockMismatch}; the source gate let through a change it must refuse` - : `Protected-block merge would change edge ${edgeMismatch}; the source gate let through a change it must refuse` + ? `Locked-block merge would change block ${blockMismatch}; the source gate let through a change it must refuse` + : `Locked-block merge would change edge ${edgeMismatch}; the source gate let through a change it must refuse` ) } } diff --git a/apps/sim/lib/workflows/code/apply/print.ts b/apps/sim/lib/workflows/code/apply/print.ts index cdb72732857..e5c27bd79d9 100644 --- a/apps/sim/lib/workflows/code/apply/print.ts +++ b/apps/sim/lib/workflows/code/apply/print.ts @@ -9,12 +9,12 @@ import { type ResourceKeyResolver, type SourceFingerprint, sourceFingerprint, - type WorkflowCodeMetaV1, type WorkflowLockBlock, type WorkflowLockV1, + type WorkflowSourceMetaV1, } from '@sim/workflow-code' import type { WorkflowState } from '@sim/workflow-types/workflow' -import { buildLockFromState, codeMetaPrintInputs } from '@/lib/workflows/code/source-lock' +import { buildLockFromState, hintsFromSourceMeta } from '@/lib/workflows/code/source-lock' import { canonicalizeUnderLock } from '@/lib/workflows/code/stored-canonical' /** Directory function-code files are printed into when `functionCode` is `files`. */ @@ -29,8 +29,8 @@ export interface StoredSource { interface PrintStoredSourceInput extends StoredSource { catalog: BlockCatalog resources: ResourceKeyResolver - /** The bindings, order and comments to print with. */ - codeMeta: WorkflowCodeMetaV1 | null + /** The idents, order and comments to print with. */ + sourceMeta: WorkflowSourceMetaV1 | null functionCode: 'inline' | 'files' /** `state`'s lockless canonical model, when the caller already holds it. */ lockless?: CanonicalizeResult @@ -54,13 +54,13 @@ export interface PrintedSource { } /** - * Prints a stored (or about-to-be-stored) state as source with the bindings, order and comments - * of `codeMeta`, assembles its lock from the same print, and computes its fingerprint. `source get` + * Prints a stored (or about-to-be-stored) state as source with the idents, order and comments + * of `sourceMeta`, assembles its lock from the same print, and computes its fingerprint. `source get` * and every apply response go through here, so an apply answers with exactly what the next get * prints and its fingerprint is the next apply's base. */ export function printStoredSource(input: PrintStoredSourceInput): PrintedSource { - const { state, meta, catalog, resources, codeMeta } = input + const { state, meta, catalog, resources, sourceMeta } = input const lockless = input.lockless ?? canonicalize(state, { catalog, meta, resources }) const canonical = input.identity ? canonicalizeUnderLock( @@ -70,7 +70,7 @@ export function printStoredSource(input: PrintStoredSourceInput): PrintedSource identityLock(input.identity) ) : lockless - const metaInputs = codeMetaPrintInputs(codeMeta, canonical) + const metaInputs = hintsFromSourceMeta(sourceMeta, canonical) const printed = printWorkflow({ workflow: { ...canonical.workflow, @@ -88,7 +88,7 @@ export function printStoredSource(input: PrintStoredSourceInput): PrintedSource }) return { files: Object.fromEntries(printed.files.map((file) => [file.path, file.text])), - lock: buildLockFromState(codeMeta, canonical, printed.hints), + lock: buildLockFromState(sourceMeta, canonical, printed.hints), fingerprint: sourceFingerprint(lockless.workflow, lockless.identity), canonical, diagnostics: printed.diagnostics, @@ -116,20 +116,20 @@ export function fingerprintOf( function identityLock(identity: LockIdentity): WorkflowLockV1 { const blocks: Record = {} for (const [key, block] of Object.entries(identity.blocks)) { - blocks[key] = { ...block, binding: key, order: 0 } + blocks[key] = { ...block, ident: key, order: 0 } } - return { lockVersion: 1, blocks, variables: identity.variables } + return { version: 1, blocks, variables: identity.variables } } /** - * The post-materialize lock `mergeCodeMetaFromLock` re-keys onto: every bound key with its id, - * and the submitted lock's binding and order for a block the file does not state them for. + * The post-materialize lock `mergeSourceMetaFromLock` re-keys onto: every bound key with its id, + * and the submitted lock's ident and order for a block the file does not state them for. */ export function boundLock(identity: LockIdentity, submitted: WorkflowLockV1): WorkflowLockV1 { const blocks: Record = {} for (const [key, block] of Object.entries(identity.blocks)) { const previous = Object.hasOwn(submitted.blocks, key) ? submitted.blocks[key] : undefined - blocks[key] = { ...block, binding: previous?.binding ?? key, order: previous?.order ?? 0 } + blocks[key] = { ...block, ident: previous?.ident ?? key, order: previous?.order ?? 0 } } - return { lockVersion: 1, blocks, variables: identity.variables } + return { version: 1, blocks, variables: identity.variables } } diff --git a/apps/sim/lib/workflows/code/catalog/build.test.ts b/apps/sim/lib/workflows/code/catalog/build.test.ts index 092c7d29968..fe9cc369edf 100644 --- a/apps/sim/lib/workflows/code/catalog/build.test.ts +++ b/apps/sim/lib/workflows/code/catalog/build.test.ts @@ -17,7 +17,7 @@ import { describe, expect, it, vi } from 'vitest' vi.unmock('@/blocks/registry') -import { v2BlockCatalogSchema } from '@/lib/api/contracts/v2/block-catalog' +import { v2SourceCatalogSchema } from '@/lib/api/contracts/v2/source-catalog' import { buildBlockCatalog, projectBlockCatalog } from '@/lib/workflows/code/catalog/build' import { registryTrigger } from '@/lib/workflows/code/catalog/registry-sources' import { operationOptions } from '@/lib/workflows/code/catalog/sdk-names' @@ -245,7 +245,7 @@ describe('block catalog projection over the whole registry', () => { }) it('passes through the v2 response schema unchanged, so no projected field is stripped', () => { - expect(v2BlockCatalogSchema.parse(catalog)).toEqual(catalog) + expect(v2SourceCatalogSchema.parse(catalog)).toEqual(catalog) }) it('keeps the core shard under its gzip budget', () => { diff --git a/apps/sim/lib/workflows/code/catalog/operations.ts b/apps/sim/lib/workflows/code/catalog/operations.ts deleted file mode 100644 index b578d6fe8bb..00000000000 --- a/apps/sim/lib/workflows/code/catalog/operations.ts +++ /dev/null @@ -1,28 +0,0 @@ -import { defineWorkspaceOperation } from '@/lib/core/application/workspace-operation' - -/** - * Semantic operations for the workflow-SDK block catalog. - * - * Same policy as `catalog.blocks.list` (s4 §2): a workspace read at the `read` role, reachable by - * a workspace API key and by Copilot delegation, because it is the same per-workspace block - * availability projected into the shape the workflow compiler reads. - */ -export const workflowCodeCatalogOperations = { - // permission-group-exempt: the compile catalog is the block catalog in another shape; withholding it hides the product rather than restricting it - read: defineWorkspaceOperation({ - id: 'workflows.code.catalog.read', - oauthScope: 'api:read', - minimumRole: 'read', - workspaceApiKey: 'allow', - capability: 'none', - contentDelivery: 'none', - principalKinds: [ - 'session', - 'personal_api_key', - 'oauth_access_token', - 'workspace_api_key', - 'delegated', - ], - delegatedServices: ['copilot'], - }), -} as const diff --git a/apps/sim/lib/workflows/code/catalog/read-block-catalog.integration.ts b/apps/sim/lib/workflows/code/catalog/read-source-catalog.integration.ts similarity index 92% rename from apps/sim/lib/workflows/code/catalog/read-block-catalog.integration.ts rename to apps/sim/lib/workflows/code/catalog/read-source-catalog.integration.ts index 6a5474a5348..d5608c0b556 100644 --- a/apps/sim/lib/workflows/code/catalog/read-block-catalog.integration.ts +++ b/apps/sim/lib/workflows/code/catalog/read-source-catalog.integration.ts @@ -9,12 +9,12 @@ import { getErrorMessage } from '@sim/utils/errors' import { generateId } from '@sim/utils/id' import { eq, inArray } from 'drizzle-orm' import { afterAll, beforeAll, beforeEach, expect, it, vi } from 'vitest' -import { readWorkflowCodeCatalog } from '@/lib/workflows/code/catalog/read-block-catalog' +import { readSourceCatalog } from '@/lib/workflows/code/catalog/read-source-catalog' vi.mock('@/lib/core/config/feature-flags', () => featureFlagsMock) /** - * The per-workflow compile catalog reads a workflow's stored block types, so the workflow id is + * The per-workflow source catalog reads a workflow's stored block types, so the workflow id is * an input the caller controls. Against real Postgres: a workflow that belongs to another * workspace (one the caller also administers, so only the workspace binding can refuse it) and an * archived workflow both answer as not found, while the caller's own active workflow is read. @@ -48,7 +48,7 @@ function check(name: string, run: () => Promise) { } function read(workflowId: string) { - return readWorkflowCodeCatalog.execute({ principal, input: { workspaceId, workflowId } }) + return readSourceCatalog.execute({ principal, input: { workspaceId, workflowId } }) } beforeAll(async () => { @@ -121,7 +121,7 @@ afterAll(async () => { await db.delete(user).where(eq(user.id, ownerId)) }) -check("reads the compile catalog for the caller's own active workflow", async () => { +check("reads the source catalog for the caller's own active workflow", async () => { const catalog = await read(activeWorkflowId) expect(Object.hasOwn(catalog.blocks, 'function')).toBe(true) }) diff --git a/apps/sim/lib/workflows/code/catalog/read-block-catalog.ts b/apps/sim/lib/workflows/code/catalog/read-source-catalog.ts similarity index 84% rename from apps/sim/lib/workflows/code/catalog/read-block-catalog.ts rename to apps/sim/lib/workflows/code/catalog/read-source-catalog.ts index b11e38dfd3c..abab7b73ab9 100644 --- a/apps/sim/lib/workflows/code/catalog/read-block-catalog.ts +++ b/apps/sim/lib/workflows/code/catalog/read-source-catalog.ts @@ -10,13 +10,13 @@ import { } from '@/lib/catalog/application/context' import { defineAuthorizedWorkspaceUseCase } from '@/lib/core/application' import { OrchestrationError } from '@/lib/core/orchestration/types' -import { workflowCodeCatalogOperations } from '@/lib/workflows/code/catalog/operations' -import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog' +import { workflowOperations } from '@/lib/workflows/application/operations' +import { buildSourceCatalog } from '@/lib/workflows/code/catalog/workspace' import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' interface ReadBlockCatalogInput { workspaceId: string - /** Adds this workflow's stored block types (the per-workflow compile catalog, s4 §2). */ + /** Adds this workflow's stored block types (the per-workflow source catalog, s4 §2). */ workflowId?: string } @@ -47,11 +47,11 @@ async function loadStoredBlockTypes(workspaceId: string, workflowId: string): Pr /** * The block catalog the workflow compiler, printer and SDK type generator read: the blocks this * caller may place in the workspace (the same allowlist, preview reveals and custom blocks as the - * block list), or with `workflowId` the compile catalog for that workflow. Not audited: reading a + * block list), or with `workflowId` the source catalog for that workflow. Not audited: reading a * catalog is not a semantic event, matching the other catalog reads. */ -export const readWorkflowCodeCatalog = defineAuthorizedWorkspaceUseCase({ - operation: workflowCodeCatalogOperations.read, +export const readSourceCatalog = defineAuthorizedWorkspaceUseCase({ + operation: workflowOperations.readSourceCatalog, resolveContext: ({ input }: { input: ReadBlockCatalogInput }) => loadCatalogWorkspaceContext(input.workspaceId), authorizationOptions: { delegation: catalogDelegationPolicy }, @@ -62,7 +62,7 @@ export const readWorkflowCodeCatalog = defineAuthorizedWorkspaceUseCase({ input.workflowId ? loadStoredBlockTypes(context.workspaceId, input.workflowId) : undefined, ]) return withCatalogBlockScope(gate, async () => { - const { catalog } = buildCodeCatalog({ + const { catalog } = buildSourceCatalog({ gate, organizationId: context.workspaceOrganizationId, ...(storedTypes ? { storedTypes } : {}), diff --git a/apps/sim/lib/workflows/code/catalog/workspace-catalog.test.ts b/apps/sim/lib/workflows/code/catalog/workspace.test.ts similarity index 95% rename from apps/sim/lib/workflows/code/catalog/workspace-catalog.test.ts rename to apps/sim/lib/workflows/code/catalog/workspace.test.ts index 9bf301a56e9..03cba2267d2 100644 --- a/apps/sim/lib/workflows/code/catalog/workspace-catalog.test.ts +++ b/apps/sim/lib/workflows/code/catalog/workspace.test.ts @@ -9,7 +9,7 @@ import { describe, expect, it, vi } from 'vitest' vi.unmock('@/blocks/registry') import { type CatalogGate, withCatalogBlockScope } from '@/lib/catalog/application/context' -import { buildCodeCatalog } from '@/lib/workflows/code/catalog/workspace-catalog' +import { buildSourceCatalog } from '@/lib/workflows/code/catalog/workspace' import type { CustomBlockOverlayRow } from '@/blocks/custom/server-overlay' function gateWith(customBlockRows: CustomBlockOverlayRow[]): CatalogGate { @@ -32,7 +32,7 @@ function customRow(type: string, inputNames: string[]): CustomBlockOverlayRow { function catalogFor(organizationId: string, gate: CatalogGate) { return withCatalogBlockScope(gate, async () => - buildCodeCatalog({ gate, organizationId, storedTypes: [] }) + buildSourceCatalog({ gate, organizationId, storedTypes: [] }) ) } @@ -40,7 +40,7 @@ function inputIds(catalog: Awaited>['catalog'], ty return catalogBlock(catalog, type)?.subBlocks.map((subBlock) => subBlock.id) ?? [] } -describe('compile catalog cache', () => { +describe('source catalog cache', () => { it('never serves one organization the catalog holding another organization custom blocks', async () => { const orgA = await catalogFor('org-a', gateWith([customRow('custom_block_a', ['lead'])])) const orgB = await catalogFor('org-b', gateWith([customRow('custom_block_b', ['ticket'])])) diff --git a/apps/sim/lib/workflows/code/catalog/workspace-catalog.ts b/apps/sim/lib/workflows/code/catalog/workspace.ts similarity index 95% rename from apps/sim/lib/workflows/code/catalog/workspace-catalog.ts rename to apps/sim/lib/workflows/code/catalog/workspace.ts index a9f8a59169a..9f6abedd3a8 100644 --- a/apps/sim/lib/workflows/code/catalog/workspace-catalog.ts +++ b/apps/sim/lib/workflows/code/catalog/workspace.ts @@ -11,10 +11,10 @@ import type { BlockConfig } from '@/blocks/types' import { getToolMetadata } from '@/tools/metadata' import { getToolOutputsMetadata } from '@/tools/metadata-outputs' -interface CodeCatalogScope { +interface SourceCatalogScope { gate: CatalogGate organizationId: string | null - /** Block types stored in the workflow, for the per-workflow compile catalog (s4 step 2). */ + /** Block types stored in the workflow, for the per-workflow source catalog (s4 step 2). */ storedTypes?: readonly string[] } @@ -69,7 +69,7 @@ function catalogCacheKey( } /** - * The workspace catalog, or with `storedTypes` the per-workflow compile catalog: the blocks this + * The workspace catalog, or with `storedTypes` the per-workflow source catalog: the blocks this * caller may place, sunset blocks included (existing placements must still compile), plus every * type already stored in the workflow that the caller could not place, marked `addable: false`. * @@ -80,7 +80,7 @@ function catalogCacheKey( * Served from a process cache keyed by the content the build reads; callers share the result and * must not mutate it. */ -export function buildCodeCatalog(scope: CodeCatalogScope): CatalogBuildResult { +export function buildSourceCatalog(scope: SourceCatalogScope): CatalogBuildResult { const registry = getBlockRegistry() const included = new Map() for (const block of getAllBlocks()) { diff --git a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts index 77d5a657eed..c3af00ed7f0 100644 --- a/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts +++ b/apps/sim/lib/workflows/code/corpus/roundtrip.corpus.test.ts @@ -147,7 +147,7 @@ function printText(e: ResolvedEngines, workflow: CanonicalWorkflow, mode: 'inlin /** * The keys the stored workflow binds to ids, as the lock (or the lock assembled from - * `code_meta`) carries them. They let a printed `meta.key` keep a legacy collision key or a + * source meta) carries them. They let a printed `meta.key` keep a legacy collision key or a * reserved name through compile. */ function storedKeys(workflow: CanonicalWorkflow): ReadonlySet { diff --git a/apps/sim/lib/workflows/code/operations.ts b/apps/sim/lib/workflows/code/operations.ts deleted file mode 100644 index 40a3bada458..00000000000 --- a/apps/sim/lib/workflows/code/operations.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { defineWorkspaceOperation } from '@/lib/core/application/workspace-operation' - -/** Semantic operations for authoring workflows as code, beyond the block catalog. */ -export const workflowCodeOperations = { - /** - * The workspace resources a workflow file can name, by key. A read: any member may list them, - * as any member may read the source that names them; a workspace API key may too, like - * `workflows.source.read`. Listing allocates keys for resources that have none, which changes - * no resource (see `readResourceManifest`). - */ - // permission-group-exempt: lists resource names and key bindings already visible to every workspace member; no group capability withholds them - readResourceManifest: defineWorkspaceOperation({ - id: 'workflows.code.resource_manifest.read', - oauthScope: 'api:read', - minimumRole: 'read', - workspaceApiKey: 'allow', - capability: 'none', - principalKinds: ['session', 'personal_api_key', 'oauth_access_token', 'workspace_api_key'], - }), -} as const diff --git a/apps/sim/lib/workflows/code/resources.ts b/apps/sim/lib/workflows/code/resources.ts index 1c9e820ad1b..8f629a67859 100644 --- a/apps/sim/lib/workflows/code/resources.ts +++ b/apps/sim/lib/workflows/code/resources.ts @@ -5,12 +5,12 @@ import { type ResourceKeyRef, resolveIds, resolveKeys, -} from '@/lib/workspaces/resource-bindings' +} from '@/lib/workspaces/resource-keys' /** - * Resource keys for workflow source: `table('leads')`, `kb('docs')`, `binding('support-slack')`. + * Resource keys for workflow source: `table('leads')`, `knowledgeBase('docs')`, `credential('support-slack')`. * - * Keys come only from the workspace's persisted bindings (`@/lib/workspaces/resource-bindings`), + * Keys come only from the workspace's persisted bindings (`@/lib/workspaces/resource-keys`), * never from a resource's current name: a rename keeps the key, and deleting a resource leaves its * key bound to the dead id, so the key is unresolved rather than re-pointed. A stored id that is * deleted, archived, of a kind with no workspace table, or from another workspace resolves to diff --git a/apps/sim/lib/workflows/code/source-lock.test.ts b/apps/sim/lib/workflows/code/source-lock.test.ts index 24685711618..5089617f9ac 100644 --- a/apps/sim/lib/workflows/code/source-lock.test.ts +++ b/apps/sim/lib/workflows/code/source-lock.test.ts @@ -2,17 +2,17 @@ import { type CanonicalBlock, type CanonicalizeResult, encodeAnchor, - parseCodeMeta, + parseSourceMeta, parseWorkflowLock, - type WorkflowCodeMetaV1, + type WorkflowSourceMetaV1, } from '@sim/workflow-code' import { normalizeWorkflowBlockName } from '@sim/workflow-types/workflow' import fc from 'fast-check' import { describe, expect, it } from 'vitest' import { buildLockFromState, - codeMetaPrintInputs, - mergeCodeMetaFromLock, + hintsFromSourceMeta, + mergeSourceMetaFromLock, } from '@/lib/workflows/code/source-lock' interface StoredBlock { @@ -63,70 +63,70 @@ function canonicalOf( } } -const meta = (patch: Partial): WorkflowCodeMetaV1 => ({ - v: 1, - bindings: {}, +const meta = (patch: Partial): WorkflowSourceMetaV1 => ({ + version: 1, + idents: {}, order: {}, comments: {}, ...patch, }) describe('buildLockFromState', () => { - it('keeps a block binding and order across a canvas rename (keyed by id, not key)', () => { - const codeMeta = meta({ bindings: { 'id-1': 'classify' }, order: { 'id-1': 4 } }) - const before = buildLockFromState(codeMeta, canonicalOf([{ id: 'id-1', name: 'Classify' }])) + it('keeps a block ident and order across a canvas rename (keyed by id, not key)', () => { + const sourceMeta = meta({ idents: { 'id-1': 'classify' }, order: { 'id-1': 4 } }) + const before = buildLockFromState(sourceMeta, canonicalOf([{ id: 'id-1', name: 'Classify' }])) const after = buildLockFromState( - codeMeta, + sourceMeta, canonicalOf([{ id: 'id-1', name: 'Route ticket by intent' }]) ) - expect(before.blocks.classify).toMatchObject({ id: 'id-1', binding: 'classify', order: 4 }) + expect(before.blocks.classify).toMatchObject({ id: 'id-1', ident: 'classify', order: 4 }) expect(after.blocks.routeticketbyintent).toMatchObject({ id: 'id-1', - binding: 'classify', + ident: 'classify', order: 4, }) }) - it('derives a binding and an order for blocks code_meta does not know, after stored orders', () => { + it('derives an ident and an order for blocks source meta does not know, after stored orders', () => { const lock = buildLockFromState( - meta({ bindings: { 'id-1': 'first' }, order: { 'id-1': 7 } }), + meta({ idents: { 'id-1': 'first' }, order: { 'id-1': 7 } }), canonicalOf([ { id: 'id-1', name: 'Zeta' }, { id: 'id-2', name: 'Fetch user' }, { id: 'id-3', name: 'Alpha' }, ]) ) - expect(lock.blocks.zeta).toMatchObject({ binding: 'first', order: 7 }) - expect(lock.blocks.alpha).toMatchObject({ binding: 'alpha', order: 8 }) - expect(lock.blocks.fetchuser).toMatchObject({ binding: 'fetchUser', order: 9 }) + expect(lock.blocks.zeta).toMatchObject({ ident: 'first', order: 7 }) + expect(lock.blocks.alpha).toMatchObject({ ident: 'alpha', order: 8 }) + expect(lock.blocks.fetchuser).toMatchObject({ ident: 'fetchUser', order: 9 }) }) - it('prefers what the printer wrote over code_meta, and never reuses a binding', () => { + it('prefers what the printer wrote over source meta, and never reuses an ident', () => { const lock = buildLockFromState( - meta({ bindings: { 'id-1': 'slack', 'id-2': 'other' } }), + meta({ idents: { 'id-1': 'slack', 'id-2': 'other' } }), canonicalOf([ { id: 'id-1', name: 'Slack' }, { id: 'id-2', name: 'Other' }, ]), - { blocks: { slack: { binding: 'slack2', order: 0 }, other: { binding: 'slack2', order: 1 } } } + { blocks: { slack: { ident: 'slack2', order: 0 }, other: { ident: 'slack2', order: 1 } } } ) - expect(lock.blocks.slack.binding).toBe('slack2') - expect(lock.blocks.other.binding).not.toBe('slack2') + expect(lock.blocks.slack.ident).toBe('slack2') + expect(lock.blocks.other.ident).not.toBe('slack2') }) - it('ignores unusable stored bindings instead of writing an invalid lock', () => { + it('ignores unusable stored idents instead of writing an invalid lock', () => { const lock = buildLockFromState( - meta({ bindings: { 'id-1': 'workflow' } }), + meta({ idents: { 'id-1': 'workflow' } }), canonicalOf([{ id: 'id-1', name: 'Workflow step' }]) ) - expect(lock.blocks.workflowstep.binding).toBe('workflowStep') + expect(lock.blocks.workflowstep.ident).toBe('workflowStep') }) }) -describe('codeMetaPrintInputs', () => { +describe('hintsFromSourceMeta', () => { it('re-keys hints and comments to the current keys and skips ids that left the graph', () => { - const codeMeta = meta({ - bindings: { 'id-1': 'fetchUser', gone: 'stale' }, + const sourceMeta = meta({ + idents: { 'id-1': 'fetchUser', gone: 'stale' }, order: { 'id-1': 2, gone: 0 }, comments: { [encodeAnchor({ kind: 'block', block: 'id-1' })]: [ @@ -140,17 +140,17 @@ describe('codeMetaPrintInputs', () => { ], }, }) - const inputs = codeMetaPrintInputs( - codeMeta, + const inputs = hintsFromSourceMeta( + sourceMeta, canonicalOf([{ id: 'id-1', name: 'Load user' }], { retries: 'var-1' }) ) - expect(inputs.hints).toEqual({ blocks: { loaduser: { binding: 'fetchUser', order: 2 } } }) + expect(inputs.hints).toEqual({ blocks: { loaduser: { ident: 'fetchUser', order: 2 } } }) expect(Object.keys(inputs.comments).sort()).toEqual(['block:loaduser', 'var:retries']) }) }) -describe('mergeCodeMetaFromLock', () => { - it('stores the compiled bindings, order and comments under ids and drops deleted blocks', () => { +describe('mergeSourceMetaFromLock', () => { + it('stores the compiled idents, order and comments under ids and drops deleted blocks', () => { const lock = buildLockFromState( null, canonicalOf([ @@ -158,11 +158,11 @@ describe('mergeCodeMetaFromLock', () => { { id: 'id-2', name: 'Send' }, ]) ) - const merged = mergeCodeMetaFromLock( - meta({ bindings: { 'id-gone': 'old' }, 'x-keep': true }), + const merged = mergeSourceMetaFromLock( + meta({ idents: { 'id-gone': 'old' }, 'x-keep': true }), lock, { - hints: { blocks: { fetch: { binding: 'getIt', order: 1 }, send: { order: 0 } } }, + hints: { blocks: { fetch: { ident: 'getIt', order: 1 }, send: { order: 0 } } }, workflow: { annotations: { inactive: {}, @@ -181,11 +181,11 @@ describe('mergeCodeMetaFromLock', () => { }, } ) - expect(merged.bindings).toEqual({ 'id-1': 'getIt', 'id-2': 'send' }) + expect(merged.idents).toEqual({ 'id-1': 'getIt', 'id-2': 'send' }) expect(merged.order).toEqual({ 'id-1': 1, 'id-2': 0 }) expect(Object.keys(merged.comments).sort()).toEqual(['block:id-2', 'header']) expect(merged['x-keep']).toBe(true) - expect(parseCodeMeta(merged).diagnostics).toBeUndefined() + expect(parseSourceMeta(merged).diagnostics).toBeUndefined() }) }) @@ -200,7 +200,7 @@ const graphArb = fc .map((names) => names.map((name, i) => ({ id: `id-${i}`, name }))) describe('lock helper properties', () => { - it('every assembled lock is valid, whatever code_meta holds', () => { + it('every assembled lock is valid, whatever source meta holds', () => { fc.assert( fc.property( graphArb, @@ -208,8 +208,8 @@ describe('lock helper properties', () => { fc.constantFrom('id-0', 'id-1', 'id-2', 'gone'), nameArb.map((n) => n.replace(/ /g, '')) ), - (stored, bindings) => { - const lock = buildLockFromState(meta({ bindings }), canonicalOf(stored)) + (stored, idents) => { + const lock = buildLockFromState(meta({ idents }), canonicalOf(stored)) expect(parseWorkflowLock(lock).diagnostics).toBeUndefined() expect(Object.keys(lock.blocks)).toHaveLength(stored.length) } @@ -225,7 +225,7 @@ describe('lock helper properties', () => { meta({ order: Object.fromEntries(orders.map((order, i) => [`id-${i}`, order])) }), canonical ) - const stored2 = mergeCodeMetaFromLock(null, first, { + const stored2 = mergeSourceMetaFromLock(null, first, { hints: { blocks: {} }, workflow: { annotations: { inactive: {}, comments: {} } }, }) @@ -234,20 +234,20 @@ describe('lock helper properties', () => { ) }) - it('renaming every block on the canvas changes no binding or order', () => { + it('renaming every block on the canvas changes no ident or order', () => { fc.assert( fc.property(graphArb, (stored) => { const first = buildLockFromState(null, canonicalOf(stored)) - const codeMeta = mergeCodeMetaFromLock(null, first, { + const sourceMeta = mergeSourceMetaFromLock(null, first, { hints: { blocks: {} }, workflow: { annotations: { inactive: {}, comments: {} } }, }) const renamed = buildLockFromState( - codeMeta, + sourceMeta, canonicalOf(stored.map(({ id }) => ({ id, name: `Renamed ${id}` }))) ) const byId = (lock: typeof first) => - Object.fromEntries(Object.values(lock.blocks).map((b) => [b.id, [b.binding, b.order]])) + Object.fromEntries(Object.values(lock.blocks).map((b) => [b.id, [b.ident, b.order]])) expect(byId(renamed)).toEqual(byId(first)) }) ) diff --git a/apps/sim/lib/workflows/code/source-lock.ts b/apps/sim/lib/workflows/code/source-lock.ts index 2fdc0c525b9..5f77e1acf3e 100644 --- a/apps/sim/lib/workflows/code/source-lock.ts +++ b/apps/sim/lib/workflows/code/source-lock.ts @@ -1,13 +1,13 @@ /** - * Glue between `workflow.code_meta` (keyed by block id) and the key-keyed world of the printer, + * Glue between `workflow_source_meta` (keyed by block id) and the key-keyed world of the printer, * the compiler and the lock (build-spec decisions 4 and 6). * - * Read path (`getWorkflowSource`): canonicalize the stored graph, turn `code_meta` into printer - * inputs with {@link codeMetaPrintInputs}, print, then assemble the lock with + * Read path (`readWorkflowSource`): canonicalize the stored graph, turn source meta into printer + * inputs with {@link hintsFromSourceMeta}, print, then assemble the lock with * {@link buildLockFromState} from the canonical identity and the hints the printer returned. * - * Write path (`applyWorkflowSource`): after a successful apply, {@link mergeCodeMetaFromLock} - * re-keys the compiled bindings, order and comments onto the ids the lock now holds, and the + * Write path (`applyWorkflowSource`): after a successful apply, {@link mergeSourceMetaFromLock} + * re-keys the compiled idents, order and comments onto the ids the lock now holds, and the * result is stored back. */ @@ -19,22 +19,20 @@ import { type CanonicalizeResult, type CanonicalWorkflow, type CodeComment, - codeMetaExtensions, decodeAnchor, encodeAnchor, isIdentifierName, - type LockHints, mapAnchorIds, SDK_RESERVED_IDENTIFIERS, - type WorkflowCodeMetaV1, + type SourceHints, + sourceMetaExtensions, type WorkflowLockBlock, type WorkflowLockV1, + type WorkflowSourceMetaV1, } from '@sim/workflow-code' -function isUsableBinding(binding: string | undefined): binding is string { - return ( - binding !== undefined && isIdentifierName(binding) && !SDK_RESERVED_IDENTIFIERS.has(binding) - ) +function isUsableIdent(ident: string | undefined): ident is string { + return ident !== undefined && isIdentifierName(ident) && !SDK_RESERVED_IDENTIFIERS.has(ident) } /** Re-maps the block and variable segments of comment anchors; an anchor mapped to `null` is dropped. */ @@ -62,39 +60,39 @@ function invert(record: Record): Map { return inverse } -export interface CodeMetaPrintInputs { - /** `binding` and `order` per block key, for `PrintInput.hints`. */ - hints: LockHints +export interface SourceMetaPrintInputs { + /** `ident` and `order` per block key, for `PrintInput.hints`. */ + hints: SourceHints /** Key-anchored comments, for `workflow.annotations.comments` before printing. */ comments: Partial> } /** - * Projects `code_meta` onto the keys canonicalize assigned. Entries for ids the stored graph no + * Projects source meta onto the keys canonicalize assigned. Entries for ids the stored graph no * longer holds are ignored, so a stale (unpruned) entry never reaches a print. */ -export function codeMetaPrintInputs( - codeMeta: WorkflowCodeMetaV1 | null, +export function hintsFromSourceMeta( + sourceMeta: WorkflowSourceMetaV1 | null, canonical: Pick -): CodeMetaPrintInputs { - const hints: LockHints = { blocks: {} } - if (!codeMeta) return { hints, comments: {} } +): SourceMetaPrintInputs { + const hints: SourceHints = { blocks: {} } + if (!sourceMeta) return { hints, comments: {} } const keyById = invert( Object.fromEntries(Object.entries(canonical.identity.blocks).map(([key, b]) => [key, b.id])) ) const varKeyById = invert(canonical.identity.variables) for (const [key, block] of Object.entries(canonical.identity.blocks)) { - const binding = codeMeta.bindings[block.id] - const order = codeMeta.order[block.id] + const ident = sourceMeta.idents[block.id] + const order = sourceMeta.order[block.id] hints.blocks[key] = { - ...(binding !== undefined && { binding }), + ...(ident !== undefined && { ident }), ...(order !== undefined && { order }), } } return { hints, comments: rekeyComments( - codeMeta.comments, + sourceMeta.comments, (id) => keyById.get(id) ?? null, (id) => varKeyById.get(id) ?? null ), @@ -103,17 +101,17 @@ export function codeMetaPrintInputs( /** * Assembles the full lock for a stored graph: ids, parents, branches, items and layout from - * canonicalize; `binding` and `order` from `printed` (the hints `printWorkflow` returned, which - * is what the file holds), then `code_meta`, then derived values. + * canonicalize; `ident` and `order` from `printed` (the hints `printWorkflow` returned, which + * is what the file holds), then source meta, then derived values. * - * Derived bindings are camelCase from the display name (`assignIdentifiers`). Derived orders sort + * Derived idents are camelCase from the display name (`assignIdentifiers`). Derived orders sort * after every stored order, by key, which is exactly how the printer orders blocks without one. * Pass `printed` whenever a file was printed, so the lock and the file always agree. */ export function buildLockFromState( - codeMeta: WorkflowCodeMetaV1 | null, + sourceMeta: WorkflowSourceMetaV1 | null, canonical: Pick, - printed?: LockHints + printed?: SourceHints ): WorkflowLockV1 { const { identity, layout, workflow } = canonical const keys = Object.keys(identity.blocks).sort(compareStrings) @@ -121,7 +119,7 @@ export function buildLockFromState( const orderOf = new Map() for (const key of keys) { const id = identity.blocks[key].id - const order = printed?.blocks[key]?.order ?? codeMeta?.order[id] + const order = printed?.blocks[key]?.order ?? sourceMeta?.order[id] if (order !== undefined && Number.isSafeInteger(order) && order >= 0) orderOf.set(key, order) } let next = Math.max(-1, ...orderOf.values()) + 1 @@ -132,14 +130,14 @@ export function buildLockFromState( const declarationOrder = [...keys].sort( (a, b) => (orderOf.get(a) ?? 0) - (orderOf.get(b) ?? 0) || compareStrings(a, b) ) - const bindings = assignIdentifiers( + const idents = assignIdentifiers( declarationOrder.map((key) => { const id = identity.blocks[key].id - const candidates = [printed?.blocks[key]?.binding, codeMeta?.bindings[id]] + const candidates = [printed?.blocks[key]?.ident, sourceMeta?.idents[id]] return { key, name: workflow.blocks[key]?.name ?? key, - hint: candidates.find(isUsableBinding), + hint: candidates.find(isUsableIdent), } }), new Set() @@ -154,38 +152,38 @@ export function buildLockFromState( parent: entry.parent, ...(entry.branches && { branches: { ...entry.branches } }), ...(entry.items && { items: structuredClone(entry.items) }), - binding: bindings.get(key) ?? key, + ident: idents.get(key) ?? key, order: orderOf.get(key) ?? 0, ...(layout[key] && { layout: { ...layout[key] } }), ...(codeFile && { codeFile }), } } - return { lockVersion: 1, blocks, variables: { ...identity.variables } } + return { version: 1, blocks, variables: { ...identity.variables } } } /** - * The `code_meta` to store after a successful apply: the compiled file's bindings, declaration + * The source meta to store after a successful apply: the compiled file's idents, declaration * order and comments, re-keyed from block keys to the ids in `lock` (the post-materialize lock). - * Bindings or orders the file does not state fall back to the lock's. Blocks and variables the + * Idents or orders the file does not state fall back to the lock's. Blocks and variables the * lock does not hold are dropped, and `x-` extensions of `prevMeta` are kept. */ -export function mergeCodeMetaFromLock( - prevMeta: WorkflowCodeMetaV1 | null, +export function mergeSourceMetaFromLock( + prevMeta: WorkflowSourceMetaV1 | null, lock: Pick, - compiled: { hints: LockHints; workflow: Pick } -): WorkflowCodeMetaV1 { - const bindings: Record = {} + compiled: { hints: SourceHints; workflow: Pick } +): WorkflowSourceMetaV1 { + const idents: Record = {} const order: Record = {} const taken = new Set() for (const key of Object.keys(lock.blocks).sort(compareStrings)) { const block = lock.blocks[key] const hint = compiled.hints.blocks[key] - const binding = [hint?.binding, block.binding].find( - (candidate) => isUsableBinding(candidate) && !taken.has(candidate) + const ident = [hint?.ident, block.ident].find( + (candidate) => isUsableIdent(candidate) && !taken.has(candidate) ) - if (binding !== undefined) { - bindings[block.id] = binding - taken.add(binding) + if (ident !== undefined) { + idents[block.id] = ident + taken.add(ident) } order[block.id] = hint?.order ?? block.order } @@ -195,9 +193,9 @@ export function mergeCodeMetaFromLock( (key) => (Object.hasOwn(lock.variables, key) ? lock.variables[key] : null) ) return { - ...(prevMeta ? codeMetaExtensions(prevMeta) : {}), - v: 1, - bindings, + ...(prevMeta ? sourceMetaExtensions(prevMeta) : {}), + version: 1, + idents, order, comments, } diff --git a/apps/sim/lib/workflows/code/resource-manifest.ts b/apps/sim/lib/workflows/code/source-resources.ts similarity index 89% rename from apps/sim/lib/workflows/code/resource-manifest.ts rename to apps/sim/lib/workflows/code/source-resources.ts index 76ea16853d3..d27e4abc53b 100644 --- a/apps/sim/lib/workflows/code/resource-manifest.ts +++ b/apps/sim/lib/workflows/code/source-resources.ts @@ -12,12 +12,12 @@ import { compareStrings } from '@sim/utils/string' import type { ResourceKind } from '@sim/workflow-code' import { and, asc, eq, inArray, isNull, notInArray, or } from 'drizzle-orm' import { defineAuthorizedWorkspaceUseCase } from '@/lib/core/application' +import { workflowOperations } from '@/lib/workflows/application/operations' import { requireWorkflowCodeEnabled } from '@/lib/workflows/code/feature-flag' -import { workflowCodeOperations } from '@/lib/workflows/code/operations' import { extractInputFieldsFromBlocks } from '@/lib/workflows/input-format' import { INPUT_DEFINITION_TRIGGER_TYPES } from '@/lib/workflows/triggers/input-definition-triggers' import { resolveActiveWorkspaceApplicationContext } from '@/lib/workspaces/application/context' -import { type ResourceIdRef, resolveKeys } from '@/lib/workspaces/resource-bindings' +import { type ResourceIdRef, resolveKeys } from '@/lib/workspaces/resource-keys' /** * Most resources of one kind the manifest lists, oldest first. Past it the manifest says @@ -25,7 +25,7 @@ import { type ResourceIdRef, resolveKeys } from '@/lib/workspaces/resource-bindi */ const MAX_MANIFEST_RESOURCES_PER_KIND = 1000 -/** Credential types a `binding(...)` can name: every saved account, never an env secret. */ +/** Credential types a `credential(...)` can name: every saved account, never an env secret. */ const ENV_CREDENTIAL_TYPES = ['env_workspace', 'env_personal'] as const interface ManifestColumn { @@ -47,20 +47,20 @@ interface ManifestResource { name: string } -interface ManifestBinding extends ManifestResource { +interface ManifestCredential extends ManifestResource { /** The provider the credential is for (`slack`, `google-email`, ...). */ - service: string + provider: string } interface ManifestWorkflow extends ManifestResource { inputs: Array<{ name: string; type: string }> } -export interface WorkspaceResourceManifest { +export interface SourceResources { workspaceId: string tables: ManifestTable[] knowledgeBases: ManifestResource[] - bindings: ManifestBinding[] + credentials: ManifestCredential[] workflows: ManifestWorkflow[] /** Environment variable names the workflow can read as `env.NAME`; never values. */ env: string[] @@ -68,7 +68,7 @@ export interface WorkspaceResourceManifest { truncated: boolean } -interface ReadResourceManifestInput { +interface ReadSourceResourcesInput { workspaceId: string } @@ -144,20 +144,20 @@ function capped(rows: T[]): { rows: T[]; truncated: boolean } { /** * The workspace resources a workflow file can name, by the keys source uses for them: tables - * with their columns, knowledge bases, credential bindings with their provider, workflows with + * with their columns, knowledge bases, saved credentials with their provider, workflows with * the inputs their start block declares, and env variable names (never values). The CLI writes it - * as `workspace.d.ts`, so `table('tickets')`, `binding('support-slack')` and `env.X` type-check. + * as `workspace.d.ts`, so `table('tickets')`, `credential('support-slack')` and `env.X` type-check. * * Every listed resource gets its key here (`resolveKeys` allocates one for a resource no source * has named yet), so a key an agent reads from the manifest resolves on apply. That allocation is * idempotent identity bookkeeping, not a change to any resource, which is why a read-role caller * may cause it. Not audited, like the other catalog reads. */ -export const readResourceManifest = defineAuthorizedWorkspaceUseCase({ - operation: workflowCodeOperations.readResourceManifest, - resolveContext: ({ input }: { input: ReadResourceManifestInput }) => +export const readSourceResources = defineAuthorizedWorkspaceUseCase({ + operation: workflowOperations.readSourceResources, + resolveContext: ({ input }: { input: ReadSourceResourcesInput }) => resolveActiveWorkspaceApplicationContext(input.workspaceId), - execute: async ({ principal, context }): Promise => { + execute: async ({ principal, context }): Promise => { await requireWorkflowCodeEnabled() const workspaceId = context.workspaceId const userId = resolvePrincipalSubjectUserId(principal) @@ -236,9 +236,11 @@ export const readResourceManifest = defineAuthorizedWorkspaceUseCase({ const key = keyOf('knowledge-base', row.id) return key ? [{ key, id: row.id, name: row.name }] : [] }), - bindings: credentials.rows.flatMap((row) => { + credentials: credentials.rows.flatMap((row) => { const key = keyOf('credential', row.id) - return key ? [{ key, id: row.id, name: row.name, service: row.providerId ?? row.type }] : [] + return key + ? [{ key, id: row.id, name: row.name, provider: row.providerId ?? row.type }] + : [] }), workflows: workflows.rows.flatMap((row) => { const key = keyOf('workflow', row.id) diff --git a/apps/sim/lib/workflows/code/stored-canonical.test.ts b/apps/sim/lib/workflows/code/stored-canonical.test.ts index c752ccfe6eb..32b1dcaae56 100644 --- a/apps/sim/lib/workflows/code/stored-canonical.test.ts +++ b/apps/sim/lib/workflows/code/stored-canonical.test.ts @@ -95,7 +95,7 @@ const branching = state([ ]) function lockOf(blocks: WorkflowLockV1['blocks']): WorkflowLockV1 { - return { lockVersion: 1, blocks, variables: {} } + return { version: 1, blocks, variables: {} } } describe('lockKeepsCanonical', () => { @@ -111,12 +111,12 @@ describe('lockKeepsCanonical', () => { const cases: Array<[string, WorkflowLockV1 | null]> = [ ['no lock', null], - ['a lock without branches', lockOf({ gate: { id: 'cond', binding: 'gate', order: 0 } })], + ['a lock without branches', lockOf({ gate: { id: 'cond', ident: 'gate', order: 0 } })], [ 'every row keyed as the lockless pass keys it', lockOf({ - gate: { id: 'cond', binding: 'gate', order: 0, branches: gateBranches }, - route: { id: 'route', binding: 'route', order: 1, branches: routeBranches }, + gate: { id: 'cond', ident: 'gate', order: 0, branches: gateBranches }, + route: { id: 'route', ident: 'route', order: 1, branches: routeBranches }, }), ], [ @@ -124,7 +124,7 @@ describe('lockKeepsCanonical', () => { lockOf({ gate: { id: 'cond', - binding: 'gate', + ident: 'gate', order: 0, branches: { [gateKeyOf('cond-c')]: 'cond-c' }, }, @@ -133,14 +133,14 @@ describe('lockKeepsCanonical', () => { [ 'keys for rows and blocks the graph does not have', lockOf({ - gate: { id: 'cond', binding: 'gate', order: 0, branches: { stale: 'cond-gone' } }, - ghost: { id: 'ghost', binding: 'ghost', order: 1, branches: { if: 'ghost-if' } }, + gate: { id: 'cond', ident: 'gate', order: 0, branches: { stale: 'cond-gone' } }, + ghost: { id: 'ghost', ident: 'ghost', order: 1, branches: { if: 'ghost-if' } }, }), ], [ 'a row renamed by the lock', lockOf({ - gate: { id: 'cond', binding: 'gate', order: 0, branches: { highValue: 'cond-a' } }, + gate: { id: 'cond', ident: 'gate', order: 0, branches: { highValue: 'cond-a' } }, }), ], [ @@ -148,7 +148,7 @@ describe('lockKeepsCanonical', () => { lockOf({ gate: { id: 'cond', - binding: 'gate', + ident: 'gate', order: 0, branches: { [gateKeyOf('cond-a')]: 'cond-b', [gateKeyOf('cond-b')]: 'cond-a' }, }, @@ -157,7 +157,7 @@ describe('lockKeepsCanonical', () => { [ 'a router row given another key', lockOf({ - route: { id: 'route', binding: 'route', order: 1, branches: { sales: 'route-b' } }, + route: { id: 'route', ident: 'route', order: 1, branches: { sales: 'route-b' } }, }), ], ] @@ -178,10 +178,10 @@ describe('lockKeepsCanonical', () => { it('returns the lockless result only when the lock changes nothing', () => { const options = { catalog, meta, resources: { toKey: () => null, toId: () => null } } const agreeing = lockOf({ - gate: { id: 'cond', binding: 'gate', order: 0, branches: gateBranches }, + gate: { id: 'cond', ident: 'gate', order: 0, branches: gateBranches }, }) const renaming = lockOf({ - gate: { id: 'cond', binding: 'gate', order: 0, branches: { highValue: 'cond-a' } }, + gate: { id: 'cond', ident: 'gate', order: 0, branches: { highValue: 'cond-a' } }, }) expect(canonicalizeUnderLock(branching, options, lockless, agreeing)).toBe(lockless) const renamed = canonicalizeUnderLock(branching, options, lockless, renaming) diff --git a/apps/sim/lib/workflows/code/stored-canonical.ts b/apps/sim/lib/workflows/code/stored-canonical.ts index 5a3d6a68b24..918898fb194 100644 --- a/apps/sim/lib/workflows/code/stored-canonical.ts +++ b/apps/sim/lib/workflows/code/stored-canonical.ts @@ -7,7 +7,7 @@ * - Resource keys. Canonicalize asks the resolver only about the resources the graph references, * so a resolver that has resolved a superset of those references gives the same result as one * that resolved exactly them. The references a workflow made last time are remembered, resolved - * up front through the workspace's bindings, and checked after the pass; only a workflow that + * up front through the workspace's resource keys, and checked after the pass; only a workflow that * gained a reference pays a second pass. * - The lock. Canonicalize reads a lock only for branch keys, by row id * (`CanonicalizeOptions.lock`: it never changes block keys). When every key the lock supplies @@ -29,7 +29,7 @@ import { loadResourceKeyResolver, type ResourceReferences } from '@/lib/workflow /** * Resources each workflow's stored graph referenced on its last canonicalize: a hint for which - * bindings to resolve before the pass. A stale entry costs at most resolving a resource no longer + * resource keys to resolve before the pass. A stale entry costs at most resolving a resource no longer * referenced (idempotent: it reads or allocates that resource's own key) or one extra pass (a * resource newly referenced), never a wrong result. Entries are a handful of ids, so the ceiling * is a memory backstop. @@ -49,7 +49,7 @@ interface StoredCanonicalInput { export interface StoredCanonical { /** The lockless canonical model of the stored graph, resource ids lifted to keys. */ canonical: CanonicalizeResult - /** Answers every reference in `loaded` from this workspace's bindings. */ + /** Answers every reference in `loaded` from this workspace's resource keys. */ resources: ResourceKeyResolver /** The references `resources` has resolved: every one the stored graph makes, maybe more. */ loaded: ResourceReferences @@ -70,7 +70,7 @@ function unionReferences(base: ResourceReferences, extra: ResourceReferences): R * Canonicalizes the stored graph with its resource keys, normally in one pass. The result equals * a recording pass followed by a pass over a resolver for exactly the recorded references. This is * the single entry point for canonicalizing a stored workflow with resources: keys come only from - * the workspace's persisted bindings (`resolveKeys` / `resolveIds`), allocated on first reference. + * the workspace's persisted resource keys (`resolveKeys` / `resolveIds`), allocated on first reference. */ export async function canonicalizeStored(input: StoredCanonicalInput): Promise { const { workflowId, workspaceId, state, meta, catalog, createdBy } = input diff --git a/apps/sim/scripts/test-workflow-source-apply-e2e.ts b/apps/sim/scripts/test-workflow-source-apply-e2e.ts index ca6800508cf..c17fb5a73d5 100644 --- a/apps/sim/scripts/test-workflow-source-apply-e2e.ts +++ b/apps/sim/scripts/test-workflow-source-apply-e2e.ts @@ -11,7 +11,7 @@ import { isRecordLike } from '@sim/utils/object' * read it as TypeScript (`GET /api/v2/workflows/{id}/source`), edit the text, apply it * (`POST .../source`), and check the stored graph through `GET .../state`. Also drives the dry * run, the stale-fingerprint 409 and the line-pinned 400. Then reads the resource manifest - * (`GET /api/v2/workspaces/{id}/resource-manifest`), creates a workflow from source + * (`GET /api/v2/workspaces/{id}/workflows/source/resources`), creates a workflow from source * (`POST /api/v2/workspaces/{id}/workflows/source`: dry run, create, name conflict, refusal) and * applies to the new workflow with the lock the create returned. The app must have the `workflow-code` * flag on, and the key must be a personal API key (workspace keys are refused). @@ -101,7 +101,7 @@ async function readSource(workflowId: string) { return { files: record(source.files) as Record, lock: record(source.lock), - lockBase: record(source.lockBase), + base: record(source.base), fingerprint: String(source.fingerprint), } } @@ -115,8 +115,7 @@ function applyBody(source: Awaited>, files = sourc return { files, lock: source.lock, - lockBase: source.lockBase, - baseFingerprint: source.fingerprint, + base: source.base, provenance: { client: 'api' }, } } @@ -166,7 +165,7 @@ async function main() { const result = record(data) assert.equal(result.applied, false) assert.equal(record(result.diff).noop, true) - assert.equal(result.newFingerprint, source.fingerprint) + assert.equal(result.fingerprint, source.fingerprint) }) await check('a dry run reports the edit and saves nothing', async () => { @@ -199,7 +198,7 @@ async function main() { assert.equal(record(record(after[scoreId].subBlocks).code).value, 'return 7') assert.deepEqual(after[startId], before[startId]) const reread = await readSource(workflowId) - assert.equal(reread.fingerprint, result.newFingerprint) + assert.equal(reread.fingerprint, result.fingerprint) }) await check('source read before that edit is refused with 409', async () => { @@ -233,16 +232,16 @@ async function main() { await check('the resource manifest lists this workflow by a key that stays put', async () => { const first = record( - (await request('GET', `/api/v2/workspaces/${workspaceId}/resource-manifest`)).data + (await request('GET', `/api/v2/workspaces/${workspaceId}/workflows/source/resources`)).data ) const entry = (first.workflows as unknown[]).map(record).find((w) => w.id === workflowId) assert(entry, 'the manifest lists the workflow') assert.match(String(entry.key), /^[a-z][a-z0-9_-]{0,63}$/) - for (const kind of ['tables', 'knowledgeBases', 'bindings', 'env']) { + for (const kind of ['tables', 'knowledgeBases', 'credentials', 'env']) { assert(Array.isArray(first[kind]), `${kind} is a list`) } const second = record( - (await request('GET', `/api/v2/workspaces/${workspaceId}/resource-manifest`)).data + (await request('GET', `/api/v2/workspaces/${workspaceId}/workflows/source/resources`)).data ) const again = (second.workflows as unknown[]).map(record).find((w) => w.id === workflowId) assert.equal(again?.key, entry.key) @@ -253,7 +252,7 @@ async function main() { let copy: { workflowId: string lock: Json - lockBase: Json + base: Json files: Record } | null = null @@ -284,14 +283,14 @@ async function main() { copy = { workflowId: newId, lock: record(result.lock), - lockBase: record(result.lockBase), + base: record(result.base), files: record(result.files) as Record, } const blocks = await storedBlocks(newId) assert.equal(Object.keys(blocks).length, Object.keys(await storedBlocks(workflowId)).length) assert(!(scoreId in blocks), 'the new workflow mints its own block ids') const reread = await readSource(newId) - assert.equal(reread.fingerprint, result.newFingerprint) + assert.equal(reread.fingerprint, result.fingerprint) }) await check( @@ -301,8 +300,7 @@ async function main() { const { data } = await request('POST', `/api/v2/workflows/${copy.workflowId}/source`, { files: edit(copy.files, 'return 7', 'return 8'), lock: copy.lock, - lockBase: copy.lockBase, - baseFingerprint: String(copy.lockBase.baseFingerprint), + base: copy.base, }) assert.equal(record(data).applied, true) const blocks = Object.values(await storedBlocks(copy.workflowId)) diff --git a/apps/sim/scripts/test-workflow-source-e2e.ts b/apps/sim/scripts/test-workflow-source-e2e.ts index d462fd099bd..efc72df699d 100644 --- a/apps/sim/scripts/test-workflow-source-e2e.ts +++ b/apps/sim/scripts/test-workflow-source-e2e.ts @@ -11,7 +11,7 @@ import { type BlockCatalog, canonicalHash, canonicalize, compileWorkflow } from import type { WorkflowState } from '@sim/workflow-types/workflow' import { makeSignature } from 'better-auth/crypto' import postgres from 'postgres' -import { v2GetBlockCatalogContract } from '@/lib/api/contracts/v2/block-catalog' +import { v2GetSourceCatalogContract } from '@/lib/api/contracts/v2/source-catalog' import { v2GetWorkflowSourceContract } from '@/lib/api/contracts/v2/workflow-source' import { v2ApplyWorkflowOperationsContract, @@ -150,10 +150,10 @@ async function readSource(query = ''): Promise { } async function readCatalog(): Promise { - const parsed = v2GetBlockCatalogContract.response.schema.parse( + const parsed = v2GetSourceCatalogContract.response.schema.parse( await call( 'GET', - `/api/v2/workspaces/${workspaceId}/block-catalog?workflowId=${workflowId}`, + `/api/v2/workspaces/${workspaceId}/workflows/source/catalog?workflowId=${workflowId}`, { key: workspaceKey }, 200 ) @@ -220,7 +220,7 @@ async function seed() { cookie = encodeURIComponent(`${sessionToken}.${await makeSignature(sessionToken, authSecret)}`) } -/** Compiles printed files against the compile catalog; any error diagnostic fails. */ +/** Compiles printed files against the source catalog; any error diagnostic fails. */ function compileSource(source: WorkflowSource, catalog: BlockCatalog) { const entryText = source.files['workflow.ts'] assert(entryText, 'The source must include workflow.ts') @@ -279,9 +279,9 @@ try { 'a workspace API key reads source that compiles with zero errors to its canonical hash', async () => { const [source, catalog] = await Promise.all([readSource(), readCatalog()]) - assert.equal(source.catalogVersion, catalog.hash) - assert.equal(source.lockBase.catalogHash, catalog.hash) - assert.equal(source.lockBase.baseFingerprint, source.fingerprint) + assert.equal(source.catalogHash, catalog.hash) + assert.equal(source.base.catalogHash, catalog.hash) + assert.equal(source.base.fingerprint, source.fingerprint) assert.match(source.fingerprint, /^sf1:[0-9a-f]{64}$/) assert(source.blockTypes.includes('function'), 'blockTypes lists the function block') assert.equal(source.lock.blocks.score?.id, scoreBlockId, 'The lock binds the key to its id') From a146f3156bea28cfff39c6a81fe3ae68476019f2 Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 01:05:40 -0800 Subject: [PATCH 147/428] refactor(sim-cli): one --dir flag and a workflows source create command - workflows source get and apply take --dir in place of --out and --from - workflows source create --dir replaces apply --new; apply always names its workflow - a write without --yes where no terminal can ask refuses through the generic confirmation exit, still coded CONFIRMATION_REQUIRED - workflows source catalog and workflows source resources follow the moved routes - regenerated the CLI API and CLI docs --- apps/docs/content/docs/cli/reference.mdx | 199 ++- apps/docs/content/docs/cli/workflows.mdx | 83 +- apps/docs/content/docs/cli/workspaces.mdx | 48 - .../sim-cli/src/commands/protocol/index.ts | 5 +- .../protocol/workflow-source-apply.test.ts | 52 +- .../protocol/workflow-source-apply.ts | 293 ++-- .../protocol/workflow-source-get.test.ts | 38 +- .../commands/protocol/workflow-source-get.ts | 83 +- .../protocol/workflow-source-layout.ts | 6 +- .../workflow-source-roundtrip.test.ts | 57 +- packages/sim-cli/src/contract/commands.ts | 17 +- packages/sim-cli/src/generated/v2-api.ts | 1511 ++++++++--------- 12 files changed, 1219 insertions(+), 1173 deletions(-) diff --git a/apps/docs/content/docs/cli/reference.mdx b/apps/docs/content/docs/cli/reference.mdx index 216d0bc460d..995a804e1e9 100644 --- a/apps/docs/content/docs/cli/reference.mdx +++ b/apps/docs/content/docs/cli/reference.mdx @@ -8171,12 +8171,12 @@ sim workflows export [options] API request and response schemas: [exportWorkflow](/api-reference/workflows/exportWorkflow). -### sim workflows get +### sim workflows source catalog -Get workflow +Get source catalog ```bash -sim workflows get +sim workflows source catalog [options] ``` **Arguments** @@ -8185,18 +8185,28 @@ sim workflows get | Argument | Required | Description | | --- | --- | --- | -| `workflowId` | Yes | Unique workflow identifier. | +| `workspaceId` | Yes | Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what the catalog contains. | -API request and response schemas: [getWorkflow](/api-reference/workflows/getWorkflow). +**Options** -### sim workflows deployment status + -Show a workflow’s current deployment +| Option | Required | Description | +| --- | --- | --- | +| `--workflow-id ` | No | Return the source catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`. | + + + +API request and response schemas: [getSourceCatalog](/api-reference/catalog/getSourceCatalog). + +### sim workflows source resources + +List the tables, knowledge bases, credentials, workflows and env names source can name ```bash -sim workflows deployment status +sim workflows source resources ``` **Arguments** @@ -8205,18 +8215,18 @@ sim workflows deployment status | Argument | Required | Description | | --- | --- | --- | -| `workflowId` | Yes | Unique workflow identifier. | +| `workspaceId` | Yes | Workspace whose resources to list. | -API request and response schemas: [getWorkflowDeployment](/api-reference/workflows/getWorkflowDeployment). +API request and response schemas: [getSourceResources](/api-reference/workflows/getSourceResources). -### sim workflows deployment update +### sim workflows source get -Update workflow public API access (OAuth login or personal API key required) +Show a workflow’s draft as TypeScript source with its identity lock ```bash -sim workflows deployment update [options] +sim workflows source get [options] ``` **Arguments** @@ -8235,18 +8245,19 @@ sim workflows deployment update [options] | Option | Required | Description | | --- | --- | --- | -| `--is-public-api ` | Yes | Whether the deployed workflow should accept unauthenticated public API execution. Accepted values: `true`, `false`. | +| `--function-code ` | No | Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `codeFile()`; `inline` prints it in tagged templates. Accepted values: `inline`, `files`. | +| `--dir ` | No | Write the source, its lock and SDK type declarations into this directory instead of printing them. | -API request and response schemas: [updateWorkflowPublicApi](/api-reference/workflows/updateWorkflowPublicApi). +API request and response schemas: [getWorkflowSource](/api-reference/workflows/getWorkflowSource). -### sim workflows outline +### sim workflows source apply -Show a workflow’s draft as a compact read-only outline +Apply a workflow source directory to a workflow draft ```bash -sim workflows outline +sim workflows source apply [options] ``` **Arguments** @@ -8255,18 +8266,54 @@ sim workflows outline | Argument | Required | Description | | --- | --- | --- | -| `workflowId` | Yes | Unique workflow identifier. | +| `workflowId` | Yes | Workflow whose draft the source replaces | -API request and response schemas: [getWorkflowOutline](/api-reference/workflows/getWorkflowOutline). +**Options** -### sim workflows source get + -Show a workflow’s draft as TypeScript source with its identity lock +| Option | Required | Description | +| --- | --- | --- | +| `--dir ` | Yes | Source directory: workflow.ts, functions/*, .sim/lock.json and .sim/base.json. | +| `--dry-run` | No | Check the source and show the outcome without saving or writing files. | +| `-y, --yes` | No | Apply without asking for confirmation. | + + + +API request and response schemas: [applyWorkflowSource](/api-reference/workflows/applyWorkflowSource). + +### sim workflows source create + +Create a workflow from a workflow source directory ```bash -sim workflows source get [options] +sim workflows source create [options] +``` + +**Options** + + + +| Option | Required | Description | +| --- | --- | --- | +| `--dir ` | Yes | Source directory: workflow.ts and functions/*. | +| `--dry-run` | No | Check the source and show the outcome without creating anything. | +| `--name ` | No | The workflow name (default: the source's). | +| `--folder ` | No | The folder to create it in (default: the root). | +| `-y, --yes` | No | Create without asking for confirmation. | + + + +API request and response schemas: [createWorkflowFromSource](/api-reference/workflows/createWorkflowFromSource). + +### sim workflows get + +Get workflow + +```bash +sim workflows get ``` **Arguments** @@ -8279,25 +8326,34 @@ sim workflows source get [options] -**Options** +API request and response schemas: [getWorkflow](/api-reference/workflows/getWorkflow). + +### sim workflows deployment status + +Show a workflow’s current deployment + +```bash +sim workflows deployment status +``` + +**Arguments** -| Option | Required | Description | +| Argument | Required | Description | | --- | --- | --- | -| `--function-code ` | No | Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates. Accepted values: `inline`, `files`. | -| `--out ` | No | Write the source, its lock and SDK type declarations into this directory instead of printing them. | +| `workflowId` | Yes | Unique workflow identifier. | -API request and response schemas: [getWorkflowSource](/api-reference/workflows/getWorkflowSource). +API request and response schemas: [getWorkflowDeployment](/api-reference/workflows/getWorkflowDeployment). -### sim workflows source apply +### sim workflows deployment update -Apply a workflow source directory to a workflow draft, or create one with --new +Update workflow public API access (OAuth login or personal API key required) ```bash -sim workflows source apply [workflowId] [options] +sim workflows deployment update [options] ``` **Arguments** @@ -8306,7 +8362,7 @@ sim workflows source apply [workflowId] [options] | Argument | Required | Description | | --- | --- | --- | -| `workflowId` | No | Workflow whose draft the source replaces (omit with --new) | +| `workflowId` | Yes | Unique workflow identifier. | @@ -8316,16 +8372,31 @@ sim workflows source apply [workflowId] [options] | Option | Required | Description | | --- | --- | --- | -| `--from ` | Yes | Source directory: workflow.ts, functions/*, .sim/lock.json and .sim/base.json. | -| `--dry-run` | No | Check the source and show the outcome without saving or writing files. | -| `--new` | No | Create a new workflow from the directory instead of updating one. | -| `--name ` | No | With --new: the workflow name (default: the source's). | -| `--folder ` | No | With --new: the folder to create it in (default: the root). | -| `-y, --yes` | No | Apply without asking for confirmation. | +| `--is-public-api ` | Yes | Whether the deployed workflow should accept unauthenticated public API execution. Accepted values: `true`, `false`. | -API request and response schemas: [applyWorkflowSource](/api-reference/workflows/applyWorkflowSource). +API request and response schemas: [updateWorkflowPublicApi](/api-reference/workflows/updateWorkflowPublicApi). + +### sim workflows outline + +Show a workflow’s draft as a compact read-only outline + +```bash +sim workflows outline +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `workflowId` | Yes | Unique workflow identifier. | + + + +API request and response schemas: [getWorkflowOutline](/api-reference/workflows/getWorkflowOutline). ### sim workflows state get @@ -8907,56 +8978,6 @@ sim workspaces fork [options] API request and response schemas: [forkWorkspace](/api-reference/workspace-sync/forkWorkspace). -### sim workspaces block-catalog list - -Get block catalog - -```bash -sim workspaces block-catalog list [options] -``` - -**Arguments** - - - -| Argument | Required | Description | -| --- | --- | --- | -| `workspaceId` | Yes | Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what the catalog contains. | - - - -**Options** - - - -| Option | Required | Description | -| --- | --- | --- | -| `--workflow-id ` | No | Return the compile catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`. | - - - -API request and response schemas: [getBlockCatalog](/api-reference/catalog/getBlockCatalog). - -### sim workspaces resource-manifest get - -List the tables, knowledge bases, credentials, workflows and env names source can name - -```bash -sim workspaces resource-manifest get -``` - -**Arguments** - - - -| Argument | Required | Description | -| --- | --- | --- | -| `workspaceId` | Yes | Workspace whose resources to list. | - - - -API request and response schemas: [getResourceManifest](/api-reference/workflows/getResourceManifest). - ### sim workspaces get Get workspace diff --git a/apps/docs/content/docs/cli/workflows.mdx b/apps/docs/content/docs/cli/workflows.mdx index 3f3732b81ff..86d70e75755 100644 --- a/apps/docs/content/docs/cli/workflows.mdx +++ b/apps/docs/content/docs/cli/workflows.mdx @@ -1309,17 +1309,39 @@ sim workflows source get [options] | Option | Required | Description | | --- | --- | --- | -| `--function-code ` | No | Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates. Accepted values: `inline`, `files`. | -| `--out ` | No | Write the source, its lock and SDK type declarations into this directory instead of printing them. | +| `--function-code ` | No | Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `codeFile()`; `inline` prints it in tagged templates. Accepted values: `inline`, `files`. | +| `--dir ` | No | Write the source, its lock and SDK type declarations into this directory instead of printing them. | API request and response schemas: [getWorkflowSource](/api-reference/workflows/getWorkflowSource). -### Apply a workflow source directory to a workflow draft, or create one with --new +### Create a workflow from a workflow source directory ```bash -sim workflows source apply [workflowId] [options] +sim workflows source create [options] +``` + +**Options** + + + +| Option | Required | Description | +| --- | --- | --- | +| `--dir ` | Yes | Source directory: workflow.ts and functions/*. | +| `--dry-run` | No | Check the source and show the outcome without creating anything. | +| `--name ` | No | The workflow name (default: the source's). | +| `--folder ` | No | The folder to create it in (default: the root). | +| `-y, --yes` | No | Create without asking for confirmation. | + + + +API request and response schemas: [createWorkflowFromSource](/api-reference/workflows/createWorkflowFromSource). + +### Apply a workflow source directory to a workflow draft + +```bash +sim workflows source apply [options] ``` **Arguments** @@ -1328,7 +1350,7 @@ sim workflows source apply [workflowId] [options] | Argument | Required | Description | | --- | --- | --- | -| `workflowId` | No | Workflow whose draft the source replaces (omit with --new) | +| `workflowId` | Yes | Workflow whose draft the source replaces | @@ -1338,17 +1360,60 @@ sim workflows source apply [workflowId] [options] | Option | Required | Description | | --- | --- | --- | -| `--from ` | Yes | Source directory: workflow.ts, functions/*, .sim/lock.json and .sim/base.json. | +| `--dir ` | Yes | Source directory: workflow.ts, functions/*, .sim/lock.json and .sim/base.json. | | `--dry-run` | No | Check the source and show the outcome without saving or writing files. | -| `--new` | No | Create a new workflow from the directory instead of updating one. | -| `--name ` | No | With --new: the workflow name (default: the source's). | -| `--folder ` | No | With --new: the folder to create it in (default: the root). | | `-y, --yes` | No | Apply without asking for confirmation. | API request and response schemas: [applyWorkflowSource](/api-reference/workflows/applyWorkflowSource). +### Get source catalog + +```bash +sim workflows source catalog [options] +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `workspaceId` | Yes | Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what the catalog contains. | + + + +**Options** + + + +| Option | Required | Description | +| --- | --- | --- | +| `--workflow-id ` | No | Return the source catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`. | + + + +API request and response schemas: [getSourceCatalog](/api-reference/catalog/getSourceCatalog). + +### List the tables, knowledge bases, credentials, workflows and env names source can name + +```bash +sim workflows source resources +``` + +**Arguments** + + + +| Argument | Required | Description | +| --- | --- | --- | +| `workspaceId` | Yes | Workspace whose resources to list. | + + + +API request and response schemas: [getSourceResources](/api-reference/workflows/getSourceResources). + ## Related docs - [Workflow builder](/workflows) diff --git a/apps/docs/content/docs/cli/workspaces.mdx b/apps/docs/content/docs/cli/workspaces.mdx index b89d3430976..b3d5f9b4306 100644 --- a/apps/docs/content/docs/cli/workspaces.mdx +++ b/apps/docs/content/docs/cli/workspaces.mdx @@ -686,54 +686,6 @@ sim workspaces unlink [options] API request and response schemas: [unlinkWorkspaceFork](/api-reference/workspace-sync/unlinkWorkspaceFork). -## Other commands - -### Get block catalog - -```bash -sim workspaces block-catalog list [options] -``` - -**Arguments** - - - -| Argument | Required | Description | -| --- | --- | --- | -| `workspaceId` | Yes | Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what the catalog contains. | - - - -**Options** - - - -| Option | Required | Description | -| --- | --- | --- | -| `--workflow-id ` | No | Return the compile catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`. | - - - -API request and response schemas: [getBlockCatalog](/api-reference/catalog/getBlockCatalog). - -### List the tables, knowledge bases, credentials, workflows and env names source can name - -```bash -sim workspaces resource-manifest get -``` - -**Arguments** - - - -| Argument | Required | Description | -| --- | --- | --- | -| `workspaceId` | Yes | Workspace whose resources to list. | - - - -API request and response schemas: [getResourceManifest](/api-reference/workflows/getResourceManifest). - ## Related docs - [Workspace sync](/cli/workflow-sync) diff --git a/packages/sim-cli/src/commands/protocol/index.ts b/packages/sim-cli/src/commands/protocol/index.ts index 6073f70bffb..ac6d7ffc219 100644 --- a/packages/sim-cli/src/commands/protocol/index.ts +++ b/packages/sim-cli/src/commands/protocol/index.ts @@ -18,7 +18,7 @@ import { attachTableImport } from './tables-import' import { attachWorkflowRunFollow } from './workflow-run-follow' import { attachWorkflowRunGet } from './workflow-run-get' import { attachWorkflowRunWait } from './workflow-run-wait' -import { attachWorkflowSourceApply } from './workflow-source-apply' +import { attachWorkflowSourceApply, attachWorkflowSourceCreate } from './workflow-source-apply' import { attachWorkflowSourceGet } from './workflow-source-get' import { attachWorkspaceOperationWait } from './workspace-operation-wait' @@ -77,7 +77,7 @@ export function attachProtocolCommands(program: Command): void { createFolder: 'createWorkflowFolder', }) // All four augment commands the generated pass already built — `run` gains - // `--follow`, `runs get` gains block names, `runs` gains `wait`, and `source get` gains `--out` — so they + // `--follow`, `runs get` gains block names, `runs` gains `wait`, and `source get` gains `--dir` — so they // must attach after it, which is the order `buildProgram` calls them in. attachWorkflowRunFollow(workflows) const runs = group(workflows, 'runs') @@ -86,6 +86,7 @@ export function attachProtocolCommands(program: Command): void { const source = group(workflows, 'source') attachWorkflowSourceGet(source) attachWorkflowSourceApply(source) + attachWorkflowSourceCreate(source) attachWorkspaceOperationWait(group(group(program, 'workspaces'), 'operations')) diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-apply.test.ts b/packages/sim-cli/src/commands/protocol/workflow-source-apply.test.ts index 051760cb303..5099f775ca7 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-apply.test.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-apply.test.ts @@ -6,7 +6,7 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest' import { SimApiError } from '../../http/client' import { buildGeneratedCommands } from '../../runtime/build' import { contextMockFns, contextMockState } from '../../test/context-mock' -import { attachWorkflowSourceApply } from './workflow-source-apply' +import { attachWorkflowSourceApply, attachWorkflowSourceCreate } from './workflow-source-apply' const prompt = vi.hoisted(() => ({ question: vi.fn() })) @@ -21,8 +21,8 @@ const WORKFLOW_ID = '00000000-0000-4000-8000-00000000000a' const WORKSPACE_ID = 'ws_local' const APPLY_PATH = `/api/v2/workflows/${WORKFLOW_ID}/source` const CREATE_PATH = `/api/v2/workspaces/${WORKSPACE_ID}/workflows/source` -const BASE = { workspaceId: WORKSPACE_ID, baseFingerprint: 'sf1:a', catalogHash: 'h' } -const LOCK = { lockVersion: 1, blocks: {}, variables: {} } +const BASE = { workspaceId: WORKSPACE_ID, fingerprint: 'sf1:a', catalogHash: 'h' } +const LOCK = { version: 1, blocks: {}, variables: {} } const ENTRY = "// @sim-sdk 1\nexport default workflow('W', () => {})\n" function outcome(overrides: { dryRun?: boolean; diagnostics?: unknown[] } = {}) { @@ -40,12 +40,12 @@ function outcome(overrides: { dryRun?: boolean; diagnostics?: unknown[] } = {}) variables: { added: [], removed: [], modified: [] }, }, diagnostics: overrides.diagnostics ?? [], - newFingerprint: 'sf1:b', + fingerprint: 'sf1:b', files: { 'workflow.ts': `${ENTRY}// stored\n` }, lock: LOCK, - lockBase: { ...BASE, baseFingerprint: 'sf1:b' }, + base: { ...BASE, fingerprint: 'sf1:b' }, mintedIds: {}, - warnings: [], + notes: [], needsRedeployment: true, }, } @@ -58,6 +58,7 @@ function program(): Command { const sourceGroup = workflows?.commands.find((command) => command.name() === 'source') if (!sourceGroup) throw new Error('workflows source group missing') attachWorkflowSourceApply(sourceGroup) + attachWorkflowSourceCreate(sourceGroup) const override = (command: Command) => { command.exitOverride() command.commands.forEach(override) @@ -70,6 +71,10 @@ async function apply(...argv: string[]): Promise { await program().parseAsync(['node', 'sim', 'workflows', 'source', 'apply', ...argv]) } +async function create(...argv: string[]): Promise { + await program().parseAsync(['node', 'sim', 'workflows', 'source', 'create', ...argv]) +} + /** Runs with a person at the terminal (stdin and stderr both TTYs) or without one. */ function setTerminal(interactive: boolean) { Object.defineProperty(process.stdin, 'isTTY', { value: interactive, configurable: true }) @@ -108,13 +113,13 @@ function dryRunFlags() { } describe('sim workflows source apply', () => { - it('exits 2 without --yes when nobody is at a terminal, sending nothing', async () => { + it('refuses without --yes when nobody is at a terminal, sending nothing', async () => { setTerminal(false) - const error = await apply(WORKFLOW_ID, '--from', dir).catch((caught: unknown) => caught) + const error = await apply(WORKFLOW_ID, '--dir', dir).catch((caught: unknown) => caught) expect(error).toBeInstanceOf(SimApiError) - expect((error as SimApiError).exitCode).toBe(2) + expect((error as SimApiError).code).toBe('CONFIRMATION_REQUIRED') expect((error as SimApiError).message).toContain('--yes') expect(request).not.toHaveBeenCalled() }) @@ -123,7 +128,7 @@ describe('sim workflows source apply', () => { setTerminal(false) request.mockResolvedValue(outcome()) - await apply(WORKFLOW_ID, '--from', dir, '--yes') + await apply(WORKFLOW_ID, '--dir', dir, '--yes') expect(dryRunFlags()).toEqual([false]) expect(request.mock.calls[0][0]).toBe(APPLY_PATH) @@ -135,7 +140,7 @@ describe('sim workflows source apply', () => { setTerminal(true) request.mockResolvedValue(outcome({ dryRun: true })) - await apply(WORKFLOW_ID, '--from', dir, '--dry-run') + await apply(WORKFLOW_ID, '--dir', dir, '--dry-run') expect(dryRunFlags()).toEqual([true]) expect(prompt.question).not.toHaveBeenCalled() @@ -149,7 +154,7 @@ describe('sim workflows source apply', () => { ) prompt.question.mockResolvedValue('y') - await apply(WORKFLOW_ID, '--from', dir) + await apply(WORKFLOW_ID, '--dir', dir) expect(dryRunFlags()).toEqual([true, false]) expect(prompt.question).toHaveBeenCalledTimes(1) @@ -161,7 +166,7 @@ describe('sim workflows source apply', () => { request.mockResolvedValue(outcome({ dryRun: true })) prompt.question.mockResolvedValue('n') - await expect(apply(WORKFLOW_ID, '--from', dir)).rejects.toThrow('Nothing was applied') + await expect(apply(WORKFLOW_ID, '--dir', dir)).rejects.toThrow('Nothing was applied') expect(dryRunFlags()).toEqual([true]) expect(readFileSync(join(dir, 'workflow.ts'), 'utf8')).toBe(ENTRY) @@ -178,19 +183,19 @@ describe('sim workflows source apply', () => { }) ) - await apply(WORKFLOW_ID, '--from', dir) + await apply(WORKFLOW_ID, '--dir', dir) expect(prompt.question).not.toHaveBeenCalled() expect(dryRunFlags()).toEqual([true]) expect(process.exitCode).toBe(1) }) - it('creates a workflow with --new from the directory alone, then writes its lock files', async () => { + it('creates a workflow from the directory alone, then writes its lock files', async () => { setTerminal(false) rmSync(join(dir, '.sim'), { recursive: true }) request.mockResolvedValue(outcome()) - await apply('--new', '--from', dir, '--folder', '/Ops', '--yes') + await create('--dir', dir, '--folder', '/Ops', '--yes') expect(request.mock.calls[0][0]).toBe(CREATE_PATH) expect(request.mock.calls[0][1].body).toEqual({ @@ -198,19 +203,6 @@ describe('sim workflows source apply', () => { folderPath: '/Ops', provenance: { client: 'cli' }, }) - expect(JSON.parse(readFileSync(join(dir, '.sim/base.json'), 'utf8')).baseFingerprint).toBe( - 'sf1:b' - ) - }) - - it.each([ - ['a workflow id with --new', [WORKFLOW_ID, '--new'], 'drop the workflow id'], - ['neither a workflow id nor --new', [], '--new'], - ['--name without --new', [WORKFLOW_ID, '--name', 'X'], 'only with --new'], - ])('refuses %s before sending anything', async (_label, argv, message) => { - setTerminal(false) - - await expect(apply(...argv, '--from', dir, '--yes')).rejects.toThrow(message) - expect(request).not.toHaveBeenCalled() + expect(JSON.parse(readFileSync(join(dir, '.sim/base.json'), 'utf8')).fingerprint).toBe('sf1:b') }) }) diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts b/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts index c1dc287f889..e2a38a422b6 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-apply.ts @@ -20,22 +20,16 @@ import { SOURCE_LOCK_FILE as LOCK_FILE, } from './workflow-source-layout' -/** `code: file('./functions/x.js')` in the entry file (the SDK's only code-file form). */ -const CODE_FILE_REFERENCE = /\bfile\(\s*(['"])([^'"\n]+)\1\s*\)/g - -/** The exit status of an apply that needs `--yes` and had no terminal to ask on. */ -const CONFIRMATION_REQUIRED_EXIT_CODE = 2 +/** `code: codeFile('./functions/x.js')` in the entry file (the SDK's only code-file form). */ +const CODE_FILE_REFERENCE = /\bcodeFile\(\s*(['"])([^'"\n]+)\1\s*\)/g type SourceApplyData = ApplyWorkflowSourceResponse['data'] type Diagnostic = SourceApplyData['diagnostics'][number] type SourceLock = ApplyWorkflowSourceBody['lock'] -interface SourceApplyOptions { - from: string +interface SourceWriteOptions { + dir: string dryRun?: boolean - new?: boolean - name?: string - folder?: string yes?: boolean } @@ -82,7 +76,7 @@ async function writeText(directory: string, path: string, text: string): Promise } /** - * The function-code files the source can reference: every `file('…')` in the entry file plus + * The function-code files the source can reference: every `codeFile('…')` in the entry file plus * every `codeFile` the lock records. Only those are sent; the server reports a referenced file * that is missing. */ @@ -155,7 +149,7 @@ async function confirm(question: string): Promise { interface SourceSubmission { files: Record lock: SourceLock | null - lockBase: NonNullable | null + base: ApplyWorkflowSourceBody['base'] | null } /** Reads the directory: the entry file, its code files and, unless creating, the lock files. */ @@ -163,14 +157,12 @@ async function readSubmission(directory: string, creating: boolean): Promise - if (typeof lockBase?.baseFingerprint !== 'string') { - throw new SimApiError(`${locate(directory, BASE_FILE)} has no baseFingerprint. ${hint}`, 0) + base = (await readJson(directory, BASE_FILE, hint)) as ApplyWorkflowSourceBody['base'] + if (typeof base?.fingerprint !== 'string') { + throw new SimApiError(`${locate(directory, BASE_FILE)} has no fingerprint. ${hint}`, 0) } } const files: Record = { [ENTRY_FILE]: entry } @@ -181,72 +173,164 @@ async function readSubmission(directory: string, creating: boolean): Promise Promise + output: Parameters[0] +}): Promise { + const { directory, options, creating, send } = args + if (!options.dryRun && !options.yes) { + const preview = await send(true) + for (const diagnostic of preview.diagnostics) printError(formatDiagnostic(diagnostic)) + if (preview.diagnostics.some((diagnostic) => diagnostic.severity === 'error')) { + setSoftExitCode(1) + printProtocolResult(args.output, summarize(preview, creating)) + return + } + printError(diffSummary(preview)) + if (!(await confirm(args.question))) { + throw new SimApiError('Nothing was applied.', 0, 'CANCELLED') + } + } + + const data = await send(options.dryRun === true) + for (const diagnostic of data.diagnostics) printError(formatDiagnostic(diagnostic)) + const refused = data.diagnostics.some((diagnostic) => diagnostic.severity === 'error') + if (refused) setSoftExitCode(1) + + if (!data.dryRun && !refused && (data.applied || !creating)) { + for (const [path, text] of Object.entries(data.files)) { + const relative = sourceRelativePath(path) + if (!relative) throw new SimApiError(`Refusing to write ${path} outside ${directory}`, 0) + await writeText(directory, relative, text) + } + await writeText(directory, LOCK_FILE, `${JSON.stringify(data.lock, null, 2)}\n`) + await writeText(directory, BASE_FILE, `${JSON.stringify(data.base, null, 2)}\n`) + } + + printProtocolResult(args.output, summarize(data, creating)) +} + +/** A write without `--yes` or `--dry-run` where no terminal can ask: the generic refusal. */ +function requireConsent(options: SourceWriteOptions, action: string): void { + if (!options.dryRun && !options.yes && !canPrompt()) { + throw new SimApiError( + `This ${action}. Re-run with --yes to apply it, or with --dry-run to check it without writing.`, + 0, + 'CONFIRMATION_REQUIRED' + ) + } } +const DIR_DESCRIPTION = + 'Source directory: workflow.ts, functions/*, .sim/lock.json and .sim/base.json' + /** - * `sim workflows source apply --from `: sends a source directory written by + * `sim workflows source apply --dir `: sends a source directory written by * `workflows source get` (`workflow.ts`, its function-code files, `.sim/lock.json` and * `.sim/base.json`) and, after a successful write, saves the re-printed files, the new lock and - * the new base back into it, so the next apply starts from what was stored. With `--new` (and no - * workflow id) it creates a workflow from the directory's `workflow.ts` instead, then writes the - * lock files of the new workflow into the directory. + * the new base back into it, so the next apply starts from what was stored. * * Writing needs consent: on a terminal it shows the dry-run outcome and asks; anywhere else it - * needs `--yes` and exits 2 without it. `--dry-run` writes nothing, so it never asks. + * needs `--yes`. `--dry-run` writes nothing, so it never asks. */ export function attachWorkflowSourceApply(source: Command): void { - const [command, connectApply] = apiCommand( - source, - 'apply', - ['applyWorkflowSource', 'createWorkflowFromSource'], - { runs: 'applyWorkflowSource' } - ) + const [command, connectApply] = apiCommand(source, 'apply', ['applyWorkflowSource']) command - .argument('[workflowId]', 'Workflow whose draft the source replaces (omit with --new)') - .requiredOption( - '--from ', - 'Source directory: workflow.ts, functions/*, .sim/lock.json and .sim/base.json' - ) + .argument('', 'Workflow whose draft the source replaces') + .requiredOption('--dir ', DIR_DESCRIPTION) .option('--dry-run', 'Check the source and show the outcome without saving or writing files') - .option('--new', 'Create a new workflow from the directory instead of updating one') - .option('--name ', "With --new: the workflow name (default: the source's)") - .option('--folder ', 'With --new: the folder to create it in (default: the root)') .option('-y, --yes', 'Apply without asking for confirmation') .allowExcessArguments(false) - .description('Apply a workflow source directory to a workflow draft, or create one with --new') - .action(async (workflowId: string | undefined, options: SourceApplyOptions) => { - const creating = options.new === true - if (creating && workflowId !== undefined) { - throw new SimApiError('--new creates a workflow; drop the workflow id.', 0) - } - if (!creating && workflowId === undefined) { - throw new SimApiError( - 'Name the workflow to apply to, or pass --new to create one from the directory.', - 0 - ) - } - if (!creating && (options.name !== undefined || options.folder !== undefined)) { - throw new SimApiError('--name and --folder apply only with --new.', 0) - } - if (!options.dryRun && !options.yes && !canPrompt()) { - throw new SimApiError( - `This ${creating ? 'creates a workflow' : 'writes the workflow draft'}. Re-run with --yes to apply it, or with --dry-run to check it without writing.`, - 0, - 'CONFIRMATION_REQUIRED', - undefined, - CONFIRMATION_REQUIRED_EXIT_CODE - ) - } - + .description('Apply a workflow source directory to a workflow draft') + .action(async (workflowId: string, options: SourceWriteOptions) => { + requireConsent(options, 'writes the workflow draft') const { client, profile } = connectApply() - const workspaceId = creating ? client.requireWorkspace() : null - const directory = options.from - const submission = await readSubmission(directory, creating) + const submission = await readSubmission(options.dir, false) + const { lock, base } = submission + if (!lock || !base) + throw new SimApiError('The source directory has no lock to apply with.', 0) + await runSourceWrite({ + directory: options.dir, + options, + creating: false, + question: `Apply these changes to workflow ${workflowId}?`, + output: profile.output, + send: async (dryRun) => { + try { + const response = await client.request( + 'applyWorkflowSource', + { + params: { workflowId }, + ...(dryRun ? { query: { dryRun: true } } : {}), + body: { + files: submission.files, + lock, + base, + provenance: { client: 'cli' }, + } satisfies ApplyWorkflowSourceBody, + } + ) + return response.data + } catch (error) { + return printRefusal(error) + } + }, + }) + }) +} - const send = async (dryRun: boolean): Promise => { - try { - if (workspaceId !== null) { +/** + * `sim workflows source create --dir `: creates a workflow from the directory's + * `workflow.ts`, then writes the new workflow's re-printed files and lock files into the + * directory. Same consent rule as `apply`. + */ +export function attachWorkflowSourceCreate(source: Command): void { + const [command, connectCreate] = apiCommand(source, 'create', ['createWorkflowFromSource']) + command + .requiredOption('--dir ', 'Source directory: workflow.ts and functions/*') + .option('--dry-run', 'Check the source and show the outcome without creating anything') + .option('--name ', "The workflow name (default: the source's)") + .option('--folder ', 'The folder to create it in (default: the root)') + .option('-y, --yes', 'Create without asking for confirmation') + .allowExcessArguments(false) + .description('Create a workflow from a workflow source directory') + .action(async (options: SourceWriteOptions & { name?: string; folder?: string }) => { + requireConsent(options, 'creates a workflow') + const { client, profile } = connectCreate() + const workspaceId = client.requireWorkspace() + const submission = await readSubmission(options.dir, true) + await runSourceWrite({ + directory: options.dir, + options, + creating: true, + question: 'Create this workflow?', + output: profile.output, + send: async (dryRun) => { + try { const response = await client.request( 'createWorkflowFromSource', { @@ -261,70 +345,11 @@ export function attachWorkflowSourceApply(source: Command): void { } ) return response.data + } catch (error) { + return printRefusal(error) } - if (!submission.lock || !submission.lockBase || workflowId === undefined) { - throw new SimApiError('The source directory has no lock to apply with.', 0) - } - const response = await client.request( - 'applyWorkflowSource', - { - params: { workflowId }, - ...(dryRun ? { query: { dryRun: true } } : {}), - body: { - files: submission.files, - lock: submission.lock, - lockBase: submission.lockBase, - baseFingerprint: submission.lockBase.baseFingerprint, - provenance: { client: 'cli' }, - } satisfies ApplyWorkflowSourceBody, - } - ) - return response.data - } catch (error) { - if (error instanceof SimApiError && error.details && typeof error.details === 'object') { - const diagnostics = (error.details as { diagnostics?: unknown }).diagnostics - if (isDiagnosticList(diagnostics)) { - for (const diagnostic of diagnostics) printError(formatDiagnostic(diagnostic)) - throw new SimApiError(error.message, error.status, error.code, undefined) - } - } - throw error - } - } - - if (!options.dryRun && !options.yes) { - const preview = await send(true) - for (const diagnostic of preview.diagnostics) printError(formatDiagnostic(diagnostic)) - if (preview.diagnostics.some((diagnostic) => diagnostic.severity === 'error')) { - setSoftExitCode(1) - printProtocolResult(profile.output, summarize(preview)) - return - } - printError(diffSummary(preview)) - const question = creating - ? 'Create this workflow?' - : `Apply these changes to workflow ${workflowId}?` - if (!(await confirm(question))) { - throw new SimApiError('Nothing was applied.', 0, 'CANCELLED') - } - } - - const data = await send(options.dryRun === true) - for (const diagnostic of data.diagnostics) printError(formatDiagnostic(diagnostic)) - const refused = data.diagnostics.some((diagnostic) => diagnostic.severity === 'error') - if (refused) setSoftExitCode(1) - - if (!data.dryRun && !refused && (data.applied || !creating)) { - for (const [path, text] of Object.entries(data.files)) { - const relative = sourceRelativePath(path) - if (!relative) throw new SimApiError(`Refusing to write ${path} outside ${directory}`, 0) - await writeText(directory, relative, text) - } - await writeText(directory, LOCK_FILE, `${JSON.stringify(data.lock, null, 2)}\n`) - await writeText(directory, BASE_FILE, `${JSON.stringify(data.lockBase, null, 2)}\n`) - } - - printProtocolResult(profile.output, summarize(data, creating)) + }, + }) }) } @@ -343,8 +368,8 @@ function summarize(data: SourceApplyData, created = false) { errors: data.diagnostics.filter((diagnostic) => diagnostic.severity === 'error').length, warnings: data.diagnostics.filter((diagnostic) => diagnostic.severity === 'warning').length + - data.warnings.length, - newFingerprint: data.newFingerprint, + data.notes.length, + fingerprint: data.fingerprint, needsRedeployment: data.needsRedeployment, } } diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts b/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts index 4cdd9b11ad9..16c200ee8f8 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-get.test.ts @@ -15,8 +15,8 @@ const { mockRequest: request } = contextMockFns const WORKFLOW_ID = '00000000-0000-4000-8000-00000000000a' const WORKSPACE_ID = '00000000-0000-4000-8000-00000000000b' const SOURCE_PATH = `/api/v2/workflows/${WORKFLOW_ID}/source` -const CATALOG_PATH = `/api/v2/workspaces/${WORKSPACE_ID}/block-catalog` -const MANIFEST_PATH = `/api/v2/workspaces/${WORKSPACE_ID}/resource-manifest` +const CATALOG_PATH = `/api/v2/workspaces/${WORKSPACE_ID}/workflows/source/catalog` +const MANIFEST_PATH = `/api/v2/workspaces/${WORKSPACE_ID}/workflows/source/resources` /** A real catalog projected from registry blocks, shared with the SDK's own type checks. */ const CATALOG = JSON.parse( @@ -32,14 +32,14 @@ function source( workflowId: WORKFLOW_ID, workspaceId: WORKSPACE_ID, files, - lock: { lockVersion: 1, blocks: {}, variables: {} }, - lockBase: { workspaceId: WORKSPACE_ID, baseFingerprint: 'sf1:x', catalogHash: CATALOG.hash }, + lock: { version: 1, blocks: {}, variables: {} }, + base: { workspaceId: WORKSPACE_ID, fingerprint: 'sf1:x', catalogHash: CATALOG.hash }, fingerprint: 'sf1:x', canonicalHash: 'h', - catalogVersion: CATALOG.hash, + catalogHash: CATALOG.hash, sdkMajor: 1, blockTypes, - warnings: [], + diagnostics: [], }, } } @@ -71,7 +71,7 @@ const MANIFEST = { workspaceId: WORKSPACE_ID, tables: [], knowledgeBases: [{ key: 'docs', id: 'kb-1', name: 'Docs' }], - bindings: [], + credentials: [], workflows: [], env: [], truncated: false, @@ -107,18 +107,18 @@ afterEach(() => { rmSync(rootDir, { recursive: true, force: true }) }) -describe('sim workflows source get --out', () => { +describe('sim workflows source get --dir', () => { it('writes the source, lock, base, an agent guide and declarations for every block in the workspace catalog', async () => { serve({ [SOURCE_PATH]: () => source({ 'workflow.ts': '// @sim-sdk 1\n', 'functions/score.js': 'return 1\n' }), }) - await get('--out', outDir) + await get('--dir', outDir) expect(readFileSync(join(outDir, 'functions/score.js'), 'utf8')).toBe('return 1\n') - expect(JSON.parse(readFileSync(join(outDir, '.sim/lock.json'), 'utf8')).lockVersion).toBe(1) - expect(JSON.parse(readFileSync(join(outDir, '.sim/base.json'), 'utf8')).baseFingerprint).toBe( + expect(JSON.parse(readFileSync(join(outDir, '.sim/lock.json'), 'utf8')).version).toBe(1) + expect(JSON.parse(readFileSync(join(outDir, '.sim/base.json'), 'utf8')).fingerprint).toBe( 'sf1:x' ) expect(existsSync(join(outDir, '.sim/sdk/core.d.ts'))).toBe(true) @@ -132,7 +132,7 @@ describe('sim workflows source get --out', () => { it('revalidates one cached catalog per workspace, whatever the output directory, and reuses it on 304', async () => { serve() - await get('--out', outDir) + await get('--dir', outDir) request.mockReset() serve({ [CATALOG_PATH]: () => { @@ -141,13 +141,13 @@ describe('sim workflows source get --out', () => { }) const otherDir = join(rootDir, 'other') - await get('--out', otherDir) + await get('--dir', otherDir) expect(callsTo(CATALOG_PATH)[0][1].headers).toEqual({ 'if-none-match': `"${CATALOG.hash}"` }) expect(existsSync(join(otherDir, '.sim/sdk/blocks/agent.d.ts'))).toBe(true) }) - it('fetches the workflow compile catalog when the workflow holds a type the workspace no longer offers', async () => { + it('fetches the per-workflow source catalog when the workflow holds a type the workspace no longer offers', async () => { const compileCatalog = { ...CATALOG, blocks: { ...CATALOG.blocks, legacy_block: { ...CATALOG.blocks.note, type: 'legacy_block' } }, @@ -158,7 +158,7 @@ describe('sim workflows source get --out', () => { callsTo(CATALOG_PATH).length === 1 ? { data: CATALOG } : { data: compileCatalog }, }) - await get('--out', outDir) + await get('--dir', outDir) expect(callsTo(CATALOG_PATH).map((call) => call[1].query)).toEqual([ undefined, @@ -173,7 +173,7 @@ describe('sim workflows source get --out', () => { }, }) - await get('--out', outDir) + await get('--dir', outDir) expect(existsSync(join(outDir, 'workflow.ts'))).toBe(true) expect(existsSync(join(outDir, '.sim/sdk/workspace.d.ts'))).toBe(false) @@ -186,19 +186,19 @@ describe('sim workflows source get --out', () => { }, }) - await expect(get('--out', outDir)).rejects.toThrow('Not modified') + await expect(get('--dir', outDir)).rejects.toThrow('Not modified') expect(existsSync(join(outDir, 'workflow.ts'))).toBe(false) }) it('refuses a file path that would escape the output directory, writing nothing', async () => { serve({ [SOURCE_PATH]: () => source({ '../escape.js': 'x' }) }) - await expect(get('--out', outDir)).rejects.toThrow('unsafe file path') + await expect(get('--dir', outDir)).rejects.toThrow('unsafe file path') expect(existsSync(join(rootDir, 'escape.js'))).toBe(false) expect(request).toHaveBeenCalledTimes(1) }) - it('prints the response unchanged without --out', async () => { + it('prints the response unchanged without --dir', async () => { request.mockResolvedValue(source()) await get('--function-code', 'inline') diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-get.ts b/packages/sim-cli/src/commands/protocol/workflow-source-get.ts index df1dbca70c2..9c445e41590 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-get.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-get.ts @@ -25,7 +25,7 @@ import { SOURCE_LOCK_FILE, } from './workflow-source-layout' -const OUT_FLAG = 'out' +const DIR_FLAG = 'dir' /** The SDK file that names the catalog hash; unchanged text means unchanged declarations. */ const SDK_INDEX_FILE = `${SDK_DIR}/index.d.ts` const WORKSPACE_TYPES_FILE = `${SDK_DIR}/workspace.d.ts` @@ -38,7 +38,7 @@ interface WorkflowSource { workspaceId: string files: Record lock: unknown - lockBase: unknown + base: unknown fingerprint: string blockTypes: string[] } @@ -60,7 +60,7 @@ function isBlockCatalog(value: unknown): value is BlockCatalog { ) } -/** A server-supplied relative path that stays inside the output directory. */ +/** A server-supplied relative path that stays inside the source directory. */ function isSafeRelativePath(path: string): boolean { if (!path || path.includes('\\') || path.startsWith('/') || /^[A-Za-z]:/.test(path)) return false return path.split('/').every((segment) => segment !== '' && segment !== '.' && segment !== '..') @@ -90,7 +90,7 @@ function readSource(raw: unknown): WorkflowSource { workspaceId: data.workspaceId, files, lock: data.lock, - lockBase: data.lockBase, + base: data.base, fingerprint: data.fingerprint, blockTypes: data.blockTypes.filter((type): type is string => typeof type === 'string'), } @@ -102,7 +102,7 @@ function readSource(raw: unknown): WorkflowSource { * the same copy. Workspace ids are uuids, so the name is safe as given. */ function catalogCachePath(workspaceId: string): string { - return join(configDir(), 'cache', 'block-catalog', `${workspaceId}.json`) + return join(configDir(), 'cache', 'source-catalog', `${workspaceId}.json`) } /** Standalone runs only: an embedded run has no local disk of its own to cache on. */ @@ -140,14 +140,14 @@ function catalogFrom(raw: unknown): BlockCatalog { * catalog fetched instead, uncached, so its types still resolve. */ async function loadCatalog( - client: OperationClient<'getBlockCatalog'>, + client: OperationClient<'getSourceCatalog'>, source: WorkflowSource ): Promise { const cached = await readCachedCatalog(source.workspaceId) let catalog: BlockCatalog try { catalog = catalogFrom( - await client.request('getBlockCatalog', { + await client.request('getSourceCatalog', { params: { workspaceId: source.workspaceId }, ...(cached ? { headers: { 'if-none-match': `"${cached.hash}"` } } : {}), }) @@ -159,7 +159,7 @@ async function loadCatalog( } if (source.blockTypes.every((type) => catalogBlock(catalog, type) !== undefined)) return catalog return catalogFrom( - await client.request('getBlockCatalog', { + await client.request('getSourceCatalog', { params: { workspaceId: source.workspaceId }, query: { workflowId: source.workflowId }, }) @@ -209,10 +209,10 @@ function workspaceManifestFrom(raw: unknown): WorkspaceManifest { ]) ), knowledgeBases: list(data.knowledgeBases).map((kb) => kb.key), - bindings: Object.fromEntries( - list(data.bindings).map((binding) => [ - binding.key, - { service: typeof binding.service === 'string' ? binding.service : '' }, + credentials: Object.fromEntries( + list(data.credentials).map((credential) => [ + credential.key, + { provider: typeof credential.provider === 'string' ? credential.provider : '' }, ]) ), workflows: Object.fromEntries( @@ -242,11 +242,11 @@ function workspaceManifestFrom(raw: unknown): WorkspaceManifest { * predates the route. The source still writes and type-checks, with every key a plain string. */ async function loadWorkspaceTypes( - client: OperationClient<'getResourceManifest'>, + client: OperationClient<'getSourceResources'>, workspaceId: string ): Promise { try { - const raw = await client.request('getResourceManifest', { params: { workspaceId } }) + const raw = await client.request('getSourceResources', { params: { workspaceId } }) return generateWorkspaceTypes(workspaceManifestFrom(raw)).text } catch (error) { if (error instanceof SimApiError && (error.status === 403 || error.status === 404)) return null @@ -254,25 +254,22 @@ async function loadWorkspaceTypes( } } -function localPath(outDir: string, relativePath: string): string { - return join(outDir, ...relativePath.split('/')) +function localPath(dir: string, relativePath: string): string { + return join(dir, ...relativePath.split('/')) } -/** Writes files under `outDir`: straight to a local disk, through the host's writer when embedded. */ -async function writeOutFiles( - outDir: string, - files: ReadonlyArray<[string, string]> -): Promise { +/** Writes files under `dir`: straight to a local disk, through the host's writer when embedded. */ +async function writeTreeFiles(dir: string, files: ReadonlyArray<[string, string]>): Promise { if (embedStore.getStore()) { for (const [path, text] of files) { - await saveToFile(new Blob([text]).stream(), posix.join(outDir, path), true) + await saveToFile(new Blob([text]).stream(), posix.join(dir, path), true) } return } for (let start = 0; start < files.length; start += WRITE_CONCURRENCY) { await Promise.all( files.slice(start, start + WRITE_CONCURRENCY).map(async ([path, text]) => { - const target = localPath(outDir, path) + const target = localPath(dir, path) await mkdir(dirname(target), { recursive: true }) await writeFile(target, text) }) @@ -281,10 +278,10 @@ async function writeOutFiles( } /** The index the directory already holds, so an unchanged catalog is not rewritten. */ -async function writtenSdkIndex(outDir: string): Promise { +async function writtenSdkIndex(dir: string): Promise { if (embedStore.getStore()) return null try { - return await readFile(localPath(outDir, SDK_INDEX_FILE), 'utf8') + return await readFile(localPath(dir, SDK_INDEX_FILE), 'utf8') } catch { return null } @@ -317,12 +314,12 @@ const AGENTS_GUIDE = `# Sim workflow source This directory is a Sim workflow written as TypeScript. Edit \`${SOURCE_ENTRY_FILE}\` (and \`functions/*\`), then: \`\`\`bash -sim workflows source apply --from . --dry-run # check; prints file:line diagnostics -sim workflows source apply --from . --yes # save the draft +sim workflows source apply --dir . --dry-run # check; prints file:line diagnostics +sim workflows source apply --dir . --yes # save the draft \`\`\` - Types: \`${SDK_DIR}/core.d.ts\` (SDK), \`${SDK_DIR}/blocks/*.d.ts\` and \`${SDK_DIR}/operations//.d.ts\` (every block's builders, params and outputs), \`${WORKSPACE_TYPES_FILE}\` (this workspace's tables, knowledge bases, credentials, workflows and env names). \`tsc -p .\` checks the file locally. -- Keep \`${SOURCE_LOCK_FILE}\` and \`${SOURCE_BASE_FILE}\`. A \`409\` (\`SOURCE_STALE\`) means the workflow changed: run \`sim workflows source get --out \`, reapply your edit there and retry. +- Keep \`${SOURCE_LOCK_FILE}\` and \`${SOURCE_BASE_FILE}\`. A \`409\` (\`SOURCE_STALE\`) means the workflow changed: run \`sim workflows source get --dir \`, reapply your edit there and retry. - The full guide is the \`@sim/workflow-sdk\` README: the edit loop, the diagnostics format and the rebase loop. ` @@ -333,7 +330,7 @@ interface SourceTree { } async function writeSourceTree( - outDir: string, + dir: string, source: WorkflowSource, catalog: BlockCatalog, workspaceTypes: string | null @@ -341,7 +338,7 @@ async function writeSourceTree( const files: Array<[string, string]> = [ ...Object.entries(source.files), [SOURCE_LOCK_FILE, `${JSON.stringify(source.lock, null, 2)}\n`], - [SOURCE_BASE_FILE, `${JSON.stringify(source.lockBase, null, 2)}\n`], + [SOURCE_BASE_FILE, `${JSON.stringify(source.base, null, 2)}\n`], ['tsconfig.json', TSCONFIG], [SOURCE_AGENTS_FILE, AGENTS_GUIDE], [`${SDK_DIR}/core.d.ts`, CORE_DTS], @@ -351,47 +348,47 @@ async function writeSourceTree( file.text, ]) const index = sdkFiles.find(([path]) => path === SDK_INDEX_FILE)?.[1] - if (index === undefined || index !== (await writtenSdkIndex(outDir))) { + if (index === undefined || index !== (await writtenSdkIndex(dir))) { if (!embedStore.getStore()) { - await rm(localPath(outDir, SDK_DIR), { recursive: true, force: true }) + await rm(localPath(dir, SDK_DIR), { recursive: true, force: true }) } files.push(...sdkFiles) } if (workspaceTypes !== null) files.push([WORKSPACE_TYPES_FILE, workspaceTypes]) - await writeOutFiles(outDir, files) + await writeTreeFiles(dir, files) return { written: files.length, workspaceTypes: workspaceTypes !== null } } /** - * Teaches the generated `workflows source get` leaf `--out `: instead of printing the + * Teaches the generated `workflows source get` leaf `--dir `: instead of printing the * response, it writes `workflow.ts`, `functions/*`, `.sim/lock.json`, `.sim/base.json`, SDK * declarations for every block in the workspace's catalog (`.sim/sdk/**`, so a block an agent * adds resolves too; the catalog is ETag-cached per workspace in the CLI's config directory), * `.sim/sdk/workspace.d.ts` from the resource manifest, a `tsconfig.json` that resolves them and - * a short `AGENTS.md`. Without `--out` the generated handler runs unchanged. Commander offers no + * a short `AGENTS.md`. Without `--dir` the generated handler runs unchanged. Commander offers no * way to read the action it holds, so it is captured and delegated to, as `runs get` does. */ export function attachWorkflowSourceGet(source: Command): void { const get = source.commands.find((command) => command.name() === 'get') const held = (get as (Command & { _actionHandler?: unknown }) | undefined)?._actionHandler if (!get || typeof held !== 'function') { - throw new Error('workflows source get must be registered before --out can be attached to it') + throw new Error('workflows source get must be registered before --dir can be attached to it') } const previous = held as (args: unknown[]) => unknown const connectGet = callsOperations(get, [ 'getWorkflowSource', - 'getBlockCatalog', - 'getResourceManifest', + 'getSourceCatalog', + 'getSourceResources', ]) get.option( - `--${OUT_FLAG} `, + `--${DIR_FLAG} `, 'Write the source, its lock and SDK type declarations into this directory instead of printing them' ) get.action(async (workflowId: string, _options: unknown, command: Command): Promise => { const flags = command.optsWithGlobals() as Record - const outDir = flags[OUT_FLAG] - if (typeof outDir !== 'string') { + const dir = flags[DIR_FLAG] + if (typeof dir !== 'string') { await previous(command.processedArgs) return } @@ -412,10 +409,10 @@ export function attachWorkflowSourceGet(source: Command): void { loadCatalog(client, workflowSource), loadWorkspaceTypes(client, workflowSource.workspaceId), ]) - const tree = await writeSourceTree(outDir, workflowSource, catalog, workspaceTypes) + const tree = await writeSourceTree(dir, workflowSource, catalog, workspaceTypes) printProtocolResult(profile.output, { workflowId: workflowSource.workflowId, - outDir, + dir, files: tree.written, workspaceTypes: tree.workspaceTypes, fingerprint: workflowSource.fingerprint, diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-layout.ts b/packages/sim-cli/src/commands/protocol/workflow-source-layout.ts index ea7611febe3..ad4e6ff7b49 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-layout.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-layout.ts @@ -1,13 +1,13 @@ /** - * The source directory `workflows source get --out` writes and `workflows source apply --from` - * reads back. One definition, so the two commands cannot drift apart. + * The source directory `workflows source get --dir` writes and `workflows source apply --dir` + * (or `create --dir`) reads back. One definition, so the two commands cannot drift apart. */ /** The entry file every source directory holds; function code sits beside it under `functions/`. */ export const SOURCE_ENTRY_FILE = 'workflow.ts' /** The identity lock (`WorkflowLockV1`). */ export const SOURCE_LOCK_FILE = '.sim/lock.json' -/** The freshness facts for the lock in this environment (`LockBase`). */ +/** The freshness facts for the lock in this environment (`SourceBase`). */ export const SOURCE_BASE_FILE = '.sim/base.json' /** Generated SDK declarations: every block in the workspace catalog, plus `workspace.d.ts`. */ export const SOURCE_SDK_DIR = '.sim/sdk' diff --git a/packages/sim-cli/src/commands/protocol/workflow-source-roundtrip.test.ts b/packages/sim-cli/src/commands/protocol/workflow-source-roundtrip.test.ts index 241a1db15c6..7f81dfaf75a 100644 --- a/packages/sim-cli/src/commands/protocol/workflow-source-roundtrip.test.ts +++ b/packages/sim-cli/src/commands/protocol/workflow-source-roundtrip.test.ts @@ -41,15 +41,15 @@ const CATALOG = JSON.parse( ) const WORKFLOW_TS = - "// @sim-sdk 1\nexport default workflow('W', {}, () => {\n const score = fn('Score', { code: file('./functions/score.js') })\n})\n" + "// @sim-sdk 1\nexport default workflow('W', {}, () => {\n const score = fn('Score', { code: codeFile('./functions/score.js') })\n})\n" const LOCK = { - lockVersion: 1, + version: 1, 'x-tool': { pinned: true }, blocks: { score: { id: 'b-1', parent: null, - binding: 'score', + ident: 'score', order: 0, codeFile: 'functions/score.js', }, @@ -64,13 +64,13 @@ function sourceResponse() { workspaceId: WORKSPACE_ID, files: { 'workflow.ts': WORKFLOW_TS, 'functions/score.js': 'return 1\n' }, lock: LOCK, - lockBase: { workspaceId: WORKSPACE_ID, baseFingerprint: FIRST, catalogHash: CATALOG.hash }, + base: { workspaceId: WORKSPACE_ID, fingerprint: FIRST, catalogHash: CATALOG.hash }, fingerprint: FIRST, canonicalHash: 'h', - catalogVersion: CATALOG.hash, + catalogHash: CATALOG.hash, sdkMajor: 1, blockTypes: ['function'], - warnings: [], + diagnostics: [], }, } } @@ -90,15 +90,15 @@ function appliedResponse(files: Record) { variables: { added: [], removed: [], modified: [] }, }, diagnostics: [], - newFingerprint: SECOND, + fingerprint: SECOND, files, lock: LOCK, - lockBase: { workspaceId: WORKSPACE_ID, baseFingerprint: SECOND, catalogHash: CATALOG.hash }, + base: { workspaceId: WORKSPACE_ID, fingerprint: SECOND, catalogHash: CATALOG.hash }, mintedIds: {}, - warnings: [], + notes: [], needsRedeployment: true, sdkMajor: 1, - catalogVersion: CATALOG.hash, + catalogHash: CATALOG.hash, }, } } @@ -133,7 +133,7 @@ const MANIFEST = { { key: 'tickets', id: 't-1', name: 'Tickets', columns: [{ name: 'subject', type: 'string' }] }, ], knowledgeBases: [], - bindings: [{ key: 'support-slack', id: 'c-1', name: 'Support Slack', service: 'slack' }], + credentials: [{ key: 'support-slack', id: 'c-1', name: 'Support Slack', provider: 'slack' }], workflows: [], env: ['CRM_KEY'], truncated: false, @@ -157,10 +157,10 @@ beforeEach(() => { if (url.pathname === `/api/v2/workflows/${WORKFLOW_ID}/source` && method === 'GET') { return json(sourceResponse()) } - if (url.pathname === `/api/v2/workspaces/${WORKSPACE_ID}/block-catalog`) { + if (url.pathname === `/api/v2/workspaces/${WORKSPACE_ID}/workflows/source/catalog`) { return json({ data: CATALOG }) } - if (url.pathname === `/api/v2/workspaces/${WORKSPACE_ID}/resource-manifest`) { + if (url.pathname === `/api/v2/workspaces/${WORKSPACE_ID}/workflows/source/resources`) { return json({ data: MANIFEST }) } if (url.pathname === `/api/v2/workspaces/${WORKSPACE_ID}/workflows/source`) { @@ -186,43 +186,40 @@ afterEach(() => { rmSync(join(dir, '..'), { recursive: true, force: true }) }) -describe('sim workflows source get --out → apply --from', () => { +describe('sim workflows source get --dir → apply --dir', () => { it('sends back exactly the directory get wrote, then saves what the server stored', async () => { - await sim('workflows', 'source', 'get', WORKFLOW_ID, '--out', dir) - await sim('workflows', 'source', 'apply', WORKFLOW_ID, '--from', dir, '--yes') + await sim('workflows', 'source', 'get', WORKFLOW_ID, '--dir', dir) + await sim('workflows', 'source', 'apply', WORKFLOW_ID, '--dir', dir, '--yes') expect(applyBodies).toEqual([ { files: { 'workflow.ts': WORKFLOW_TS, 'functions/score.js': 'return 1\n' }, lock: LOCK, - lockBase: { workspaceId: WORKSPACE_ID, baseFingerprint: FIRST, catalogHash: CATALOG.hash }, - baseFingerprint: FIRST, + base: { workspaceId: WORKSPACE_ID, fingerprint: FIRST, catalogHash: CATALOG.hash }, provenance: { client: 'cli' }, }, ]) expect(readFileSync(join(dir, 'functions/score.js'), 'utf8')).toBe('return 2\n') - expect(JSON.parse(readFileSync(join(dir, '.sim/base.json'), 'utf8')).baseFingerprint).toBe( - SECOND - ) + expect(JSON.parse(readFileSync(join(dir, '.sim/base.json'), 'utf8')).fingerprint).toBe(SECOND) expect(JSON.parse(readFileSync(join(dir, '.sim/lock.json'), 'utf8'))).toEqual(LOCK) }) it('writes workspace types from the manifest, so resource keys are checked locally', async () => { - await sim('workflows', 'source', 'get', WORKFLOW_ID, '--out', dir) + await sim('workflows', 'source', 'get', WORKFLOW_ID, '--dir', dir) const types = readFileSync(join(dir, '.sim/sdk/workspace.d.ts'), 'utf8') expect(types).toContain(`'tickets': { subject: string }`) - expect(types).toContain(`'support-slack': { service: 'slack' }`) + expect(types).toContain(`'support-slack': { provider: 'slack' }`) expect(types).toContain('CRM_KEY: true') expect(readFileSync(join(dir, 'AGENTS.md'), 'utf8')).toContain('@sim/workflow-sdk') }) - it('creates a workflow from a bare directory with --new, then applies to it by its new id', async () => { - await sim('workflows', 'source', 'get', WORKFLOW_ID, '--out', dir) + it('creates a workflow from a bare directory, then applies to it by its new id', async () => { + await sim('workflows', 'source', 'get', WORKFLOW_ID, '--dir', dir) rmSync(join(dir, '.sim/lock.json')) rmSync(join(dir, '.sim/base.json')) - await sim('workflows', 'source', 'apply', '--new', '--from', dir, '--name', 'Copy', '--yes') + await sim('workflows', 'source', 'create', '--dir', dir, '--name', 'Copy', '--yes') expect(createBodies).toEqual([ { @@ -232,11 +229,9 @@ describe('sim workflows source get --out → apply --from', () => { }, ]) expect(existsSync(join(dir, '.sim/lock.json'))).toBe(true) - expect(JSON.parse(readFileSync(join(dir, '.sim/base.json'), 'utf8')).baseFingerprint).toBe( - SECOND - ) + expect(JSON.parse(readFileSync(join(dir, '.sim/base.json'), 'utf8')).fingerprint).toBe(SECOND) - await sim('workflows', 'source', 'apply', WORKFLOW_ID, '--from', dir, '--yes') - expect((applyBodies[0] as { baseFingerprint: string }).baseFingerprint).toBe(SECOND) + await sim('workflows', 'source', 'apply', WORKFLOW_ID, '--dir', dir, '--yes') + expect((applyBodies[0] as { base: { fingerprint: string } }).base.fingerprint).toBe(SECOND) }) }) diff --git a/packages/sim-cli/src/contract/commands.ts b/packages/sim-cli/src/contract/commands.ts index 4953c894e5f..6dccea65ff6 100644 --- a/packages/sim-cli/src/contract/commands.ts +++ b/packages/sim-cli/src/contract/commands.ts @@ -643,16 +643,19 @@ export const CLI_CONTRACT: CliContract = { command: 'workflows source get', describe: 'Show a workflow’s draft as TypeScript source with its identity lock', }, - /** `workflows source apply --from ` reads and writes a source directory by hand. */ + /** `workflows source apply --dir ` reads and writes a source directory by hand. */ applyWorkflowSource: { hidden: true }, // The ETag revalidation header is for a client that caches the catalog, as `workflows source - // get --out` does by hand; a one-off read has no cached hash to send. - getBlockCatalog: { flags: { 'if-none-match': { omit: true } } }, - /** `workflows source apply --new --from ` reads and writes a source directory by hand. */ + // get --dir` does by hand; a one-off read has no cached hash to send. + getSourceCatalog: { + command: 'workflows source catalog', + flags: { 'if-none-match': { omit: true } }, + }, + /** `workflows source create --dir ` reads and writes a source directory by hand. */ createWorkflowFromSource: { hidden: true }, - /** One document, not a page: `workflows source get --out` writes it as `workspace.d.ts`. */ - getResourceManifest: { - command: 'workspaces resource-manifest get', + /** One document, not a page: `workflows source get --dir` writes it as `workspace.d.ts`. */ + getSourceResources: { + command: 'workflows source resources', describe: 'List the tables, knowledge bases, credentials, workflows and env names source can name', }, diff --git a/packages/sim-cli/src/generated/v2-api.ts b/packages/sim-cli/src/generated/v2-api.ts index bbdcd2c1c79..fe16680be34 100644 --- a/packages/sim-cli/src/generated/v2-api.ts +++ b/packages/sim-cli/src/generated/v2-api.ts @@ -703,7 +703,7 @@ export type ApplyWorkflowSourceQuery = { export type ApplyWorkflowSourceBody = { files: Record lock: { - lockVersion: 1 + version: 1 blocks: Record< string, { @@ -717,7 +717,7 @@ export type ApplyWorkflowSourceBody = { id: string }> > - binding: string + ident: string order: number layout?: { x: number @@ -732,12 +732,11 @@ export type ApplyWorkflowSourceBody = { > variables: Record } - lockBase?: { + base: { workspaceId: string - baseFingerprint: string + fingerprint: string catalogHash: string } - baseFingerprint: string provenance?: { client: 'cli' | 'copilot' | 'canvas' | 'api' gitSha?: string @@ -800,10 +799,10 @@ export type ApplyWorkflowSourceResponse = { param?: string path?: string }> - newFingerprint: string + fingerprint: string files: Record lock: { - lockVersion: 1 + version: 1 blocks: Record< string, { @@ -817,7 +816,7 @@ export type ApplyWorkflowSourceResponse = { id: string }> > - binding: string + ident: string order: number layout?: { x: number @@ -832,13 +831,13 @@ export type ApplyWorkflowSourceResponse = { > variables: Record } - lockBase: { + base: { workspaceId: string - baseFingerprint: string + fingerprint: string catalogHash: string } mintedIds: Record - warnings: Array + notes: Array needsRedeployment: boolean } } @@ -4276,10 +4275,10 @@ export type CreateWorkflowFromSourceResponse = { param?: string path?: string }> - newFingerprint: string + fingerprint: string files: Record lock: { - lockVersion: 1 + version: 1 blocks: Record< string, { @@ -4293,7 +4292,7 @@ export type CreateWorkflowFromSourceResponse = { id: string }> > - binding: string + ident: string order: number layout?: { x: number @@ -4308,13 +4307,13 @@ export type CreateWorkflowFromSourceResponse = { > variables: Record } - lockBase: { + base: { workspaceId: string - baseFingerprint: string + fingerprint: string catalogHash: string } mintedIds: Record - warnings: Array + notes: Array needsRedeployment: boolean } } @@ -6368,650 +6367,37 @@ export type GetBlockResponse = { data: GetBlockResponseRef6 } -/** `GET /api/v2/workspaces/[workspaceId]/block-catalog` */ -export type GetBlockCatalogParams = { +/** `GET /api/v2/custom-tools/[customToolId]` */ +export type GetCustomToolParams = { + customToolId: string +} + +export type GetCustomToolQuery = { workspaceId: string } -export type GetBlockCatalogQuery = { - workflowId?: string +type GetCustomToolResponseRef0 = { + id: string + title: string + schema: { + type: 'function' + function: { + name: string + description?: string + parameters: { + type: string + properties: Record + required?: Array + } + } + } + code: string + createdAt: string + updatedAt: string } -export type GetBlockCatalogHeaders = { - 'if-none-match'?: string -} - -export type GetBlockCatalogResponse = { - data: { - catalogVersion: 1 - hash: string - sdkMajor: number - blocks: Record< - string, - { - type: string - name: string - category: 'blocks' | 'tools' | 'triggers' - addable?: false - lifecycle?: { - hidden?: true - preview?: true - sunset?: { - status: 'legacy' | 'deprecated' - replacedBy?: string - } - } - triggerAllowed?: boolean - triggers?: { - enabled: boolean - available: Array - } - singleInstance?: boolean - subBlocks: Array< - | { - id: string - type: string - title?: string - mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' - canonicalParamId?: string - surface?: 'action' | 'trigger' - condition?: - | { - field: string - value: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - and?: { - field: string - value?: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - } - } - | { - opaque: true - } - visibleFor?: Record - visibleWhen?: Record< - string, - { - field: string - value: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - and?: { - field: string - value?: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - } - } - > - visibleForModel?: Record - required?: - | boolean - | { - field: string - value: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - and?: { - field: string - value?: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - } - } - | { - opaque: true - } - dependsOn?: { - all: Array - any: Array - } - defaultValue?: unknown - valueDefault?: - | { - computed: true - initial?: unknown - } - | { - constant: unknown - } - options?: - | Array<{ - id: string - label?: string - }> - | { - dynamic: true - } - | { - opaque: true - } - hidden?: boolean - readOnly?: boolean - password?: boolean - hideFromCopilot?: boolean - context?: 'tool-input' - paramVisibility?: string - emptyIsValid?: boolean - language?: string - multiple?: boolean - min?: number - max?: number - step?: number - integer?: boolean - columns?: Array - selectorKey?: string - serviceId?: string - valueKind: - | 'string' - | 'number' - | 'boolean' - | 'array' - | 'object' - | 'json' - | 'code' - | 'branches' - | 'tools' - | 'resource' - | 'picked' - | 'upload' - | 'none' - resourceKind?: string - storage: 'native' | 'json-string' - structured?: 'tools' | 'branches' | 'tableRows' | 'inputFormat' | 'variables' - } - | { - shared: number - } - | { - trigger: string - start: number - count: number - } - > - tools: { - access: Array - selector: 'single' | 'operation' | 'opaque' - } - inputs?: Record< - string, - { - type: string - schema?: unknown - } - > - outputs?: Record< - string, - { - type: string - description?: string - condition?: unknown - hiddenFromDisplay?: boolean - properties?: Record - sharedProperties?: number - items?: unknown - } - > - sharedOutputs?: number - dynamicOutputs?: { - source: 'responseFormat' | 'inputFormat' | 'humanForm' | 'tableRows' - param: string - } - graph: { - canBeTarget: boolean - errorPort: boolean - container: 'loop' | 'parallel' | null - annotationOnly: boolean - branches?: { - subBlockId: string - kind: 'condition' | 'router' - } - } - legacyIds?: Array<{ - from: string - to: string | null - whenOperation?: Array - conditional?: true - }> - legacyCanonicalIds?: Array<{ - from: string - to: string - }> - custom?: { - sourceWorkflowId?: string - } - } - > - triggers: Record< - string, - { - id: string - provider: string - name: string - polling?: boolean - webhook?: boolean - subBlocks: Array< - | { - id: string - type: string - title?: string - mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' - canonicalParamId?: string - surface?: 'action' | 'trigger' - condition?: - | { - field: string - value: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - and?: { - field: string - value?: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - } - } - | { - opaque: true - } - visibleFor?: Record - visibleWhen?: Record< - string, - { - field: string - value: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - and?: { - field: string - value?: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - } - } - > - visibleForModel?: Record - required?: - | boolean - | { - field: string - value: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - and?: { - field: string - value?: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - } - } - | { - opaque: true - } - dependsOn?: { - all: Array - any: Array - } - defaultValue?: unknown - valueDefault?: - | { - computed: true - initial?: unknown - } - | { - constant: unknown - } - options?: - | Array<{ - id: string - label?: string - }> - | { - dynamic: true - } - | { - opaque: true - } - hidden?: boolean - readOnly?: boolean - password?: boolean - hideFromCopilot?: boolean - context?: 'tool-input' - paramVisibility?: string - emptyIsValid?: boolean - language?: string - multiple?: boolean - min?: number - max?: number - step?: number - integer?: boolean - columns?: Array - selectorKey?: string - serviceId?: string - valueKind: - | 'string' - | 'number' - | 'boolean' - | 'array' - | 'object' - | 'json' - | 'code' - | 'branches' - | 'tools' - | 'resource' - | 'picked' - | 'upload' - | 'none' - resourceKind?: string - storage: 'native' | 'json-string' - structured?: 'tools' | 'branches' | 'tableRows' | 'inputFormat' | 'variables' - } - | { - shared: number - } - > - outputs?: Record< - string, - { - type: string - description?: string - condition?: unknown - hiddenFromDisplay?: boolean - properties?: Record - sharedProperties?: number - items?: unknown - } - > - sharedOutputs?: number - } - > - builders: Record< - string, - { - type: string - operation?: string - triggerMode?: boolean - fixed?: Record - } - > - subBlocks?: Array<{ - id: string - type: string - title?: string - mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' - canonicalParamId?: string - surface?: 'action' | 'trigger' - condition?: - | { - field: string - value: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - and?: { - field: string - value?: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - } - } - | { - opaque: true - } - visibleFor?: Record - visibleWhen?: Record< - string, - { - field: string - value: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - and?: { - field: string - value?: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - } - } - > - visibleForModel?: Record - required?: - | boolean - | { - field: string - value: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - and?: { - field: string - value?: - | string - | number - | boolean - | Array - | { - list: number - } - not?: boolean - } - } - | { - opaque: true - } - dependsOn?: { - all: Array - any: Array - } - defaultValue?: unknown - valueDefault?: - | { - computed: true - initial?: unknown - } - | { - constant: unknown - } - options?: - | Array<{ - id: string - label?: string - }> - | { - dynamic: true - } - | { - opaque: true - } - hidden?: boolean - readOnly?: boolean - password?: boolean - hideFromCopilot?: boolean - context?: 'tool-input' - paramVisibility?: string - emptyIsValid?: boolean - language?: string - multiple?: boolean - min?: number - max?: number - step?: number - integer?: boolean - columns?: Array - selectorKey?: string - serviceId?: string - valueKind: - | 'string' - | 'number' - | 'boolean' - | 'array' - | 'object' - | 'json' - | 'code' - | 'branches' - | 'tools' - | 'resource' - | 'picked' - | 'upload' - | 'none' - resourceKind?: string - storage: 'native' | 'json-string' - structured?: 'tools' | 'branches' | 'tableRows' | 'inputFormat' | 'variables' - }> - lists?: Array> - outputs?: Array< - Record< - string, - { - type: string - description?: string - condition?: unknown - hiddenFromDisplay?: boolean - properties?: Record - sharedProperties?: number - items?: unknown - } - > - > - scope?: { - organizationId: string - } - } -} - -/** `GET /api/v2/custom-tools/[customToolId]` */ -export type GetCustomToolParams = { - customToolId: string -} - -export type GetCustomToolQuery = { - workspaceId: string -} - -type GetCustomToolResponseRef0 = { - id: string - title: string - schema: { - type: 'function' - function: { - name: string - description?: string - parameters: { - type: string - properties: Record - required?: Array - } - } - } - code: string - createdAt: string - updatedAt: string -} - -export type GetCustomToolResponse = { - data: GetCustomToolResponseRef0 +export type GetCustomToolResponse = { + data: GetCustomToolResponseRef0 } /** `GET /api/v2/files/[fileId]/metadata` */ @@ -8004,51 +7390,6 @@ export type GetProjectFileVersionResponse = { data: GetProjectFileVersionResponseRef0 } -/** `GET /api/v2/workspaces/[workspaceId]/resource-manifest` */ -export type GetResourceManifestParams = { - workspaceId: string -} - -export type GetResourceManifestQuery = Record - -export type GetResourceManifestResponse = { - data: { - workspaceId: string - tables: Array<{ - key: string - id: string - name: string - columns: Array<{ - name: string - type: string - options?: Array - }> - }> - knowledgeBases: Array<{ - key: string - id: string - name: string - }> - bindings: Array<{ - key: string - id: string - name: string - service: string - }> - workflows: Array<{ - key: string - id: string - name: string - inputs: Array<{ - name: string - type: string - }> - }> - env: Array - truncated: boolean - } -} - /** `GET /api/v2/tables/[tableId]/rows/[rowId]/enrichment/[groupId]` */ export type GetRowEnrichmentParams = { tableId: string @@ -8327,22 +7668,680 @@ export type GetSkillParams = { skillId: string } -export type GetSkillQuery = { +export type GetSkillQuery = { + workspaceId: string +} + +type GetSkillResponseRef0 = { + id: string + name: string + description: string + readOnly: boolean + createdAt: string + updatedAt: string + content: string +} + +export type GetSkillResponse = { + data: GetSkillResponseRef0 +} + +/** `GET /api/v2/workspaces/[workspaceId]/workflows/source/catalog` */ +export type GetSourceCatalogParams = { + workspaceId: string +} + +export type GetSourceCatalogQuery = { + workflowId?: string +} + +export type GetSourceCatalogHeaders = { + 'if-none-match'?: string +} + +export type GetSourceCatalogResponse = { + data: { + catalogVersion: 1 + hash: string + sdkMajor: number + blocks: Record< + string, + { + type: string + name: string + category: 'blocks' | 'tools' | 'triggers' + addable?: false + lifecycle?: { + hidden?: true + preview?: true + sunset?: { + status: 'legacy' | 'deprecated' + replacedBy?: string + } + } + triggerAllowed?: boolean + triggers?: { + enabled: boolean + available: Array + } + singleInstance?: boolean + subBlocks: Array< + | { + id: string + type: string + title?: string + mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' + canonicalParamId?: string + surface?: 'action' | 'trigger' + condition?: + | { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + | { + opaque: true + } + visibleFor?: Record + visibleWhen?: Record< + string, + { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + > + visibleForModel?: Record + required?: + | boolean + | { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + | { + opaque: true + } + dependsOn?: { + all: Array + any: Array + } + defaultValue?: unknown + valueDefault?: + | { + computed: true + initial?: unknown + } + | { + constant: unknown + } + options?: + | Array<{ + id: string + label?: string + }> + | { + dynamic: true + } + | { + opaque: true + } + hidden?: boolean + readOnly?: boolean + password?: boolean + hideFromCopilot?: boolean + context?: 'tool-input' + paramVisibility?: string + emptyIsValid?: boolean + language?: string + multiple?: boolean + min?: number + max?: number + step?: number + integer?: boolean + columns?: Array + selectorKey?: string + serviceId?: string + valueKind: + | 'string' + | 'number' + | 'boolean' + | 'array' + | 'object' + | 'json' + | 'code' + | 'branches' + | 'tools' + | 'resource' + | 'picked' + | 'upload' + | 'none' + resourceKind?: string + storage: 'native' | 'json-string' + structured?: 'tools' | 'branches' | 'tableRows' | 'inputFormat' | 'variables' + } + | { + shared: number + } + | { + trigger: string + start: number + count: number + } + > + tools: { + access: Array + selector: 'single' | 'operation' | 'opaque' + } + inputs?: Record< + string, + { + type: string + schema?: unknown + } + > + outputs?: Record< + string, + { + type: string + description?: string + condition?: unknown + hiddenFromDisplay?: boolean + properties?: Record + sharedProperties?: number + items?: unknown + } + > + sharedOutputs?: number + dynamicOutputs?: { + source: 'responseFormat' | 'inputFormat' | 'humanForm' | 'tableRows' + param: string + } + graph: { + canBeTarget: boolean + errorPort: boolean + container: 'loop' | 'parallel' | null + annotationOnly: boolean + branches?: { + subBlockId: string + kind: 'condition' | 'router' + } + } + legacyIds?: Array<{ + from: string + to: string | null + whenOperation?: Array + conditional?: true + }> + legacyCanonicalIds?: Array<{ + from: string + to: string + }> + custom?: { + sourceWorkflowId?: string + } + } + > + triggers: Record< + string, + { + id: string + provider: string + name: string + polling?: boolean + webhook?: boolean + subBlocks: Array< + | { + id: string + type: string + title?: string + mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' + canonicalParamId?: string + surface?: 'action' | 'trigger' + condition?: + | { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + | { + opaque: true + } + visibleFor?: Record + visibleWhen?: Record< + string, + { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + > + visibleForModel?: Record + required?: + | boolean + | { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + | { + opaque: true + } + dependsOn?: { + all: Array + any: Array + } + defaultValue?: unknown + valueDefault?: + | { + computed: true + initial?: unknown + } + | { + constant: unknown + } + options?: + | Array<{ + id: string + label?: string + }> + | { + dynamic: true + } + | { + opaque: true + } + hidden?: boolean + readOnly?: boolean + password?: boolean + hideFromCopilot?: boolean + context?: 'tool-input' + paramVisibility?: string + emptyIsValid?: boolean + language?: string + multiple?: boolean + min?: number + max?: number + step?: number + integer?: boolean + columns?: Array + selectorKey?: string + serviceId?: string + valueKind: + | 'string' + | 'number' + | 'boolean' + | 'array' + | 'object' + | 'json' + | 'code' + | 'branches' + | 'tools' + | 'resource' + | 'picked' + | 'upload' + | 'none' + resourceKind?: string + storage: 'native' | 'json-string' + structured?: 'tools' | 'branches' | 'tableRows' | 'inputFormat' | 'variables' + } + | { + shared: number + } + > + outputs?: Record< + string, + { + type: string + description?: string + condition?: unknown + hiddenFromDisplay?: boolean + properties?: Record + sharedProperties?: number + items?: unknown + } + > + sharedOutputs?: number + } + > + builders: Record< + string, + { + type: string + operation?: string + triggerMode?: boolean + fixed?: Record + } + > + subBlocks?: Array<{ + id: string + type: string + title?: string + mode?: 'basic' | 'advanced' | 'both' | 'trigger' | 'trigger-advanced' + canonicalParamId?: string + surface?: 'action' | 'trigger' + condition?: + | { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + | { + opaque: true + } + visibleFor?: Record + visibleWhen?: Record< + string, + { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + > + visibleForModel?: Record + required?: + | boolean + | { + field: string + value: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + and?: { + field: string + value?: + | string + | number + | boolean + | Array + | { + list: number + } + not?: boolean + } + } + | { + opaque: true + } + dependsOn?: { + all: Array + any: Array + } + defaultValue?: unknown + valueDefault?: + | { + computed: true + initial?: unknown + } + | { + constant: unknown + } + options?: + | Array<{ + id: string + label?: string + }> + | { + dynamic: true + } + | { + opaque: true + } + hidden?: boolean + readOnly?: boolean + password?: boolean + hideFromCopilot?: boolean + context?: 'tool-input' + paramVisibility?: string + emptyIsValid?: boolean + language?: string + multiple?: boolean + min?: number + max?: number + step?: number + integer?: boolean + columns?: Array + selectorKey?: string + serviceId?: string + valueKind: + | 'string' + | 'number' + | 'boolean' + | 'array' + | 'object' + | 'json' + | 'code' + | 'branches' + | 'tools' + | 'resource' + | 'picked' + | 'upload' + | 'none' + resourceKind?: string + storage: 'native' | 'json-string' + structured?: 'tools' | 'branches' | 'tableRows' | 'inputFormat' | 'variables' + }> + lists?: Array> + outputs?: Array< + Record< + string, + { + type: string + description?: string + condition?: unknown + hiddenFromDisplay?: boolean + properties?: Record + sharedProperties?: number + items?: unknown + } + > + > + scope?: { + organizationId: string + } + } +} + +/** `GET /api/v2/workspaces/[workspaceId]/workflows/source/resources` */ +export type GetSourceResourcesParams = { workspaceId: string } -type GetSkillResponseRef0 = { - id: string - name: string - description: string - readOnly: boolean - createdAt: string - updatedAt: string - content: string -} +export type GetSourceResourcesQuery = Record -export type GetSkillResponse = { - data: GetSkillResponseRef0 +export type GetSourceResourcesResponse = { + data: { + workspaceId: string + tables: Array<{ + key: string + id: string + name: string + columns: Array<{ + name: string + type: string + options?: Array + }> + }> + knowledgeBases: Array<{ + key: string + id: string + name: string + }> + credentials: Array<{ + key: string + id: string + name: string + provider: string + }> + workflows: Array<{ + key: string + id: string + name: string + inputs: Array<{ + name: string + type: string + }> + }> + env: Array + truncated: boolean + } } /** `GET /api/v2/organizations/[organizationId]/sso/policy` */ @@ -9017,7 +9016,7 @@ export type GetWorkflowSourceResponse = { workspaceId: string files: Record lock: { - lockVersion: 1 + version: 1 blocks: Record< string, { @@ -9031,7 +9030,7 @@ export type GetWorkflowSourceResponse = { id: string }> > - binding: string + ident: string order: number layout?: { x: number @@ -9046,17 +9045,17 @@ export type GetWorkflowSourceResponse = { > variables: Record } - lockBase: { + base: { workspaceId: string - baseFingerprint: string + fingerprint: string catalogHash: string } fingerprint: string canonicalHash: string - catalogVersion: string + catalogHash: string sdkMajor: number blockTypes: Array - warnings: Array<{ + diagnostics: Array<{ code: string severity: 'error' | 'warning' | 'info' message: string @@ -17632,15 +17631,11 @@ export const V2_OPERATIONS = { describe: 'Identity sidecar (`.sim/lock.json`): binds the keys in the source to stored ids.', }, - lockBase: { + base: { kind: 'object', - describe: 'Freshness facts for the lock in this environment (`.sim/base.json`).', - }, - baseFingerprint: { - kind: 'string', required: true, describe: - 'The `fingerprint` the source was read at. The apply answers `409` when the saved draft no longer matches it.', + 'Where and when the source was read (`.sim/base.json`). The apply answers `409` when the saved draft no longer matches `base.fingerprint`.', }, provenance: { kind: 'object', describe: 'Where the source came from, for the audit log.' }, }, @@ -20280,30 +20275,6 @@ export const V2_OPERATIONS = { }, }, }, - getBlockCatalog: { - method: 'GET', - path: '/api/v2/workspaces/[workspaceId]/block-catalog', - pathParams: ['workspaceId'] as const, - pathParamDocs: { - workspaceId: - 'Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what the catalog contains.', - }, - responseMode: 'json', - summary: 'Get block catalog', - query: { - workflowId: { - kind: 'string', - describe: - 'Return the compile catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`.', - }, - }, - headers: { - 'if-none-match': { - kind: 'string', - describe: 'A catalog `hash` (quoted, as sent in `ETag`) the caller already holds.', - }, - }, - }, getCustomTool: { method: 'GET', path: '/api/v2/custom-tools/[customToolId]', @@ -20830,14 +20801,6 @@ export const V2_OPERATIONS = { summary: 'Get Project File Version', workspaceKeyUnsupported: true, }, - getResourceManifest: { - method: 'GET', - path: '/api/v2/workspaces/[workspaceId]/resource-manifest', - pathParams: ['workspaceId'] as const, - pathParamDocs: { workspaceId: 'Workspace whose resources to list.' }, - responseMode: 'json', - summary: 'Get resource manifest', - }, getRowEnrichment: { method: 'GET', path: '/api/v2/tables/[tableId]/rows/[rowId]/enrichment/[groupId]', @@ -21052,6 +21015,38 @@ export const V2_OPERATIONS = { workspaceId: { kind: 'string', required: true, describe: 'Workspace that owns the skill.' }, }, }, + getSourceCatalog: { + method: 'GET', + path: '/api/v2/workspaces/[workspaceId]/workflows/source/catalog', + pathParams: ['workspaceId'] as const, + pathParamDocs: { + workspaceId: + 'Workspace whose integration allowlist, revealed preview blocks, and deployed custom blocks decide what the catalog contains.', + }, + responseMode: 'json', + summary: 'Get source catalog', + query: { + workflowId: { + kind: 'string', + describe: + 'Return the source catalog for this workflow: the workspace catalog plus every block type already placed in it, the ones the caller could not add marked `addable: false`.', + }, + }, + headers: { + 'if-none-match': { + kind: 'string', + describe: 'A catalog `hash` (quoted, as sent in `ETag`) the caller already holds.', + }, + }, + }, + getSourceResources: { + method: 'GET', + path: '/api/v2/workspaces/[workspaceId]/workflows/source/resources', + pathParams: ['workspaceId'] as const, + pathParamDocs: { workspaceId: 'Workspace whose resources to list.' }, + responseMode: 'json', + summary: 'Get source resources', + }, getSsoPolicy: { method: 'GET', path: '/api/v2/organizations/[organizationId]/sso/policy', @@ -21278,7 +21273,7 @@ export const V2_OPERATIONS = { kind: 'enum', values: ['inline', 'files'] as const, describe: - 'Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `file()`; `inline` prints it in tagged templates.', + 'Where function-block code goes: `files` (default) writes it to `functions/*` files referenced with `codeFile()`; `inline` prints it in tagged templates.', }, }, }, From ac11b1498001783f152f83e171d6bb515552b5eb Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 01:05:41 -0800 Subject: [PATCH 148/428] refactor(workflows): name the Code tab event and count source writes as apply or create MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - code_view_opened is code_tab_opened, with only the toolbar entry that is emitted - workflow_source_applied carries operation: 'apply' | 'create' and changes in place of ops; ok and error_kind are dropped until failures are emitted - the Code tab reads Loading code… and Couldn't load code: --- .../[workflowId]/source/route.test.ts | 43 ++++++++++++------- .../v2/workflows/[workflowId]/source/route.ts | 19 ++++---- .../workflows/source/route.test.ts | 20 ++++++--- .../[workspaceId]/workflows/source/route.ts | 10 ++--- .../components/panel/components/code/code.tsx | 4 +- .../w/[workflowId]/components/panel/panel.tsx | 2 +- apps/sim/lib/posthog/events.ts | 14 +++--- 7 files changed, 64 insertions(+), 48 deletions(-) diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts index 667db75afb8..07d5fb327d8 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.test.ts @@ -14,8 +14,8 @@ const mocks = vi.hoisted(() => ({ read: vi.fn(), authorizeRead: vi.fn(), apply: vi.mock('@/lib/api/server/routes/v2-api-key-auth', () => v2ApiKeyAuthModuleMock) vi.mock('@/lib/core/rate-limiter', () => v2RateLimiterModuleMock) -vi.mock('@/lib/workflows/application/get-workflow-source', () => ({ - getWorkflowSource: { +vi.mock('@/lib/workflows/application/read-workflow-source', () => ({ + readWorkflowSource: { operation: { id: 'workflows.source.read' }, authorize: mocks.authorizeRead, execute: mocks.read, @@ -58,17 +58,17 @@ const source = { workspaceId: WORKSPACE_ID, files: { 'workflow.ts': "// @sim-sdk 1\nexport default workflow('W', () => {})\n" }, lock: { - lockVersion: 1 as const, - blocks: { start: { id: 'b-1', parent: null, binding: 'start', order: 0 } }, + version: 1 as const, + blocks: { start: { id: 'b-1', parent: null, ident: 'start', order: 0 } }, variables: {}, }, - lockBase: { workspaceId: WORKSPACE_ID, baseFingerprint: FINGERPRINT, catalogHash: 'h' }, + base: { workspaceId: WORKSPACE_ID, fingerprint: FINGERPRINT, catalogHash: 'h' }, fingerprint: FINGERPRINT, canonicalHash: 'd'.repeat(64), - catalogVersion: 'h', + catalogHash: 'h', sdkMajor: 1, blockTypes: ['start_trigger'], - warnings: [], + diagnostics: [], } function request(query = '') { @@ -161,8 +161,7 @@ const personalKeyAuth = { const applyBody = { files: source.files, lock: source.lock, - lockBase: source.lockBase, - baseFingerprint: FINGERPRINT, + base: source.base, } const applied = { @@ -183,15 +182,15 @@ const applied = { variables: { added: [], removed: [], modified: [] }, }, diagnostics: [], - newFingerprint: `sf1:${'e'.repeat(64)}`, + fingerprint: `sf1:${'e'.repeat(64)}`, files: source.files, lock: source.lock, - lockBase: source.lockBase, + base: source.base, mintedIds: {}, - warnings: [], + notes: [], needsRedeployment: true, sdkMajor: 1, - catalogVersion: 'h', + catalogHash: 'h', } describe('POST /api/v2/workflows/{workflowId}/source', () => { @@ -204,7 +203,7 @@ describe('POST /api/v2/workflows/{workflowId}/source', () => { it('answers 400 with the line-pinned diagnostics of refused source', async () => { const diagnostic = { - code: 'E_APPLY_PROTECTED_BLOCK' as const, + code: 'E_APPLY_LOCKED_BLOCK' as const, severity: 'error' as const, message: 'Block "Start" is locked', file: 'workflow.ts', @@ -311,7 +310,13 @@ describe('POST /api/v2/workflows/{workflowId}/source', () => { expect(posthogServerMockFns.mockCaptureServerEvent).toHaveBeenCalledWith( 'user-1', 'workflow_source_applied', - { workflow_id: WORKFLOW_ID, workspace_id: WORKSPACE_ID, source: 'cli', ok: true, ops: 1 }, + { + workflow_id: WORKFLOW_ID, + workspace_id: WORKSPACE_ID, + source: 'cli', + operation: 'apply', + changes: 1, + }, { groups: { workspace: WORKSPACE_ID } } ) }) @@ -327,7 +332,13 @@ describe('POST /api/v2/workflows/{workflowId}/source', () => { expect(posthogServerMockFns.mockCaptureServerEvent).toHaveBeenCalledWith( 'user-9', 'workflow_source_applied', - { workflow_id: WORKFLOW_ID, workspace_id: WORKSPACE_ID, source: 'copilot', ok: true, ops: 1 }, + { + workflow_id: WORKFLOW_ID, + workspace_id: WORKSPACE_ID, + source: 'copilot', + operation: 'apply', + changes: 1, + }, { groups: { workspace: WORKSPACE_ID } } ) }) diff --git a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts index 879846801fc..93500e228c0 100644 --- a/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts +++ b/apps/sim/app/api/v2/workflows/[workflowId]/source/route.ts @@ -6,8 +6,8 @@ import { defineV2JsonRoute, v2ApiKeyAuth, v2RateLimits } from '@/lib/api/server/ import { captureServerEvent } from '@/lib/posthog/server' import { sourceWriteActor, v2WorkflowErrorPolicies } from '@/lib/workflows/api' import { applyWorkflowSource } from '@/lib/workflows/application/apply-workflow-source' -import { getWorkflowSource } from '@/lib/workflows/application/get-workflow-source' import { workflowOperations } from '@/lib/workflows/application/operations' +import { readWorkflowSource } from '@/lib/workflows/application/read-workflow-source' import { MAX_IMPORT_BODY_BYTES } from '@/lib/workflows/operations/import-workflow' export const dynamic = 'force-dynamic' @@ -19,7 +19,7 @@ export const revalidate = 0 * while the `workflow-code` flag is off. * * `headSafe: false` because the first read that references a resource with no key allocates one - * (`workspace_resource_binding`), so a `HEAD` probe must not run it. + * (`workspace_resource_key`), so a `HEAD` probe must not run it. */ export const GET = defineV2JsonRoute({ contract: v2GetWorkflowSourceContract, @@ -32,7 +32,7 @@ export const GET = defineV2JsonRoute({ workflowId: params.workflowId, ...(query.functionCode ? { functionCode: query.functionCode } : {}), }), - useCase: getWorkflowSource, + useCase: readWorkflowSource, present: (source) => ({ data: source }), }) @@ -53,8 +53,7 @@ export const POST = defineV2JsonRoute({ workflowId: params.workflowId, files: body.files, lock: body.lock, - baseFingerprint: body.baseFingerprint, - ...(body.lockBase ? { lockBase: body.lockBase } : {}), + base: body.base, ...(body.provenance ? { provenance: body.provenance } : {}), ...(query.dryRun !== undefined ? { dryRun: query.dryRun } : {}), }), @@ -67,12 +66,12 @@ export const POST = defineV2JsonRoute({ applied: result.applied, diff: result.diff, diagnostics: result.diagnostics, - newFingerprint: result.newFingerprint, + fingerprint: result.fingerprint, files: result.files, lock: result.lock, - lockBase: result.lockBase, + base: result.base, mintedIds: result.mintedIds, - warnings: result.warnings, + notes: result.notes, needsRedeployment: result.needsRedeployment, }, }), @@ -94,8 +93,8 @@ export const POST = defineV2JsonRoute({ workflow_id: result.workflowId, workspace_id: result.workspaceId, source: actor.source, - ok: true, - ops: + operation: 'apply', + changes: blocks.added.length + blocks.removed.length + blocks.renamed.length + diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.test.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.test.ts index 3037dd3bd53..6612a1d30ba 100644 --- a/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.test.ts +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.test.ts @@ -54,19 +54,19 @@ const created = { variables: { added: [], removed: [], modified: [] }, }, diagnostics: [], - newFingerprint: FINGERPRINT, + fingerprint: FINGERPRINT, files, lock: { - lockVersion: 1 as const, - blocks: { start: { id: 'b-1', parent: null, binding: 'start', order: 0 } }, + version: 1 as const, + blocks: { start: { id: 'b-1', parent: null, ident: 'start', order: 0 } }, variables: {}, }, - lockBase: { workspaceId: WORKSPACE_ID, baseFingerprint: FINGERPRINT, catalogHash: 'h' }, + base: { workspaceId: WORKSPACE_ID, fingerprint: FINGERPRINT, catalogHash: 'h' }, mintedIds: { start: 'b-1' }, - warnings: [], + notes: [], needsRedeployment: false, sdkMajor: 1, - catalogVersion: 'h', + catalogHash: 'h', } function createRequest(body: unknown, query = '') { @@ -166,7 +166,13 @@ describe('POST /api/v2/workspaces/{workspaceId}/workflows/source', () => { expect(posthogServerMockFns.mockCaptureServerEvent).toHaveBeenCalledWith( 'user-1', 'workflow_source_applied', - { workflow_id: WORKFLOW_ID, workspace_id: WORKSPACE_ID, source: 'cli', ok: true, ops: 1 }, + { + workflow_id: WORKFLOW_ID, + workspace_id: WORKSPACE_ID, + source: 'cli', + operation: 'create', + changes: 1, + }, { groups: { workspace: WORKSPACE_ID } } ) }) diff --git a/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.ts b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.ts index e56b34c4a68..8ec4411ebd8 100644 --- a/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.ts +++ b/apps/sim/app/api/v2/workspaces/[workspaceId]/workflows/source/route.ts @@ -40,12 +40,12 @@ export const POST = defineV2JsonRoute({ applied: result.applied, diff: result.diff, diagnostics: result.diagnostics, - newFingerprint: result.newFingerprint, + fingerprint: result.fingerprint, files: result.files, lock: result.lock, - lockBase: result.lockBase, + base: result.base, mintedIds: result.mintedIds, - warnings: result.warnings, + notes: result.notes, needsRedeployment: result.needsRedeployment, }, }), @@ -61,8 +61,8 @@ export const POST = defineV2JsonRoute({ workflow_id: result.workflowId, workspace_id: result.workspaceId, source: actor.source, - ok: true, - ops: result.diff.blocks.added.length + result.diff.edges.added, + operation: 'create', + changes: result.diff.blocks.added.length + result.diff.edges.added, }, { groups: { workspace: result.workspaceId } } ) diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/code/code.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/code/code.tsx index cb812ad7d7f..a1b64ea6b43 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/code/code.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/components/code/code.tsx @@ -82,12 +82,12 @@ export function Code({ isActive }: CodeProps) { if (error) { return (
- Could not load source: {error.message} + Couldn't load code: {error.message}
) } if (isPending) { - return
Loading source…
+ return
Loading code…
} return ( diff --git a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx index 28672d33bf1..8b31d041f19 100644 --- a/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx +++ b/apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/panel/panel.tsx @@ -588,7 +588,7 @@ export const Panel = memo(function Panel() { */ const handleTabClick = (tab: PanelTab) => { if (tab === 'code' && activeTab !== 'code' && scopedWorkflowId) { - captureEvent(posthogRef.current, 'code_view_opened', { + captureEvent(posthogRef.current, 'code_tab_opened', { workflow_id: scopedWorkflowId, workspace_id: workspaceId, entry: 'toolbar', diff --git a/apps/sim/lib/posthog/events.ts b/apps/sim/lib/posthog/events.ts index 57fc1d9382c..70b7b6eda42 100644 --- a/apps/sim/lib/posthog/events.ts +++ b/apps/sim/lib/posthog/events.ts @@ -930,21 +930,21 @@ export interface PostHogEventMap { to_entity: 'user' | 'organization' } - /** Defined ahead of the code view; captured client-side when it ships. */ - code_view_opened: { + /** The Code tab opened in the workflow panel. */ + code_tab_opened: { workflow_id: string workspace_id: string - entry: 'toolbar' | 'shortcut' | 'link' + entry: 'toolbar' } - /** Defined ahead of workflow source apply; captured when it ships. */ + /** Workflow source wrote a draft: an apply to an existing workflow, or a create. */ workflow_source_applied: { workflow_id: string workspace_id: string source: WorkflowWriteSource - ok: boolean - ops: number - error_kind?: string + operation: 'apply' | 'create' + /** How many blocks, connections and variables the write added, removed or changed. */ + changes: number } } From 7e8ab132414e65994af61fb6ae89dfd88d23d0fd Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 01:13:50 -0800 Subject: [PATCH 149/428] docs(workflow-code): call resource keys and idents by name in the remaining comments --- apps/sim/lib/workflows/code/resources.ts | 9 +++++---- packages/workflow-code/src/compile/hints.ts | 2 +- packages/workflow-sdk/src/codegen/workspace.ts | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/sim/lib/workflows/code/resources.ts b/apps/sim/lib/workflows/code/resources.ts index 8f629a67859..2378c17488c 100644 --- a/apps/sim/lib/workflows/code/resources.ts +++ b/apps/sim/lib/workflows/code/resources.ts @@ -8,13 +8,14 @@ import { } from '@/lib/workspaces/resource-keys' /** - * Resource keys for workflow source: `table('leads')`, `knowledgeBase('docs')`, `credential('support-slack')`. + * Resource keys for workflow source: `table('leads')`, `knowledgeBase('docs')`, + * `credential('support-slack')`. * - * Keys come only from the workspace's persisted bindings (`@/lib/workspaces/resource-keys`), + * Keys come only from the workspace's persisted resource keys (`@/lib/workspaces/resource-keys`), * never from a resource's current name: a rename keeps the key, and deleting a resource leaves its * key bound to the dead id, so the key is unresolved rather than re-pointed. A stored id that is * deleted, archived, of a kind with no workspace table, or from another workspace resolves to - * `null`, which canonicalize keeps verbatim as `$sim: 'unresolved'`; a key with no live binding + * `null`, which canonicalize keeps verbatim as `$sim: 'unresolved'`; a key with no live resource * resolves to `null`, which materialize reports as `E_MAT_UNKNOWN_RESOURCE`. */ @@ -30,7 +31,7 @@ interface LoadResourceKeyResolverOptions { } /** - * Resolves `references` in one workspace through its bindings and returns a resolver over the + * Resolves `references` in one workspace through its resource keys and returns a resolver over the * result: each referenced live resource's key (allocated on first reference, see `resolveKeys`) * and each referenced key's live resource, in both directions (so a fingerprint taken after * writing a key's id prints that key). Nothing outside `references` resolves. diff --git a/packages/workflow-code/src/compile/hints.ts b/packages/workflow-code/src/compile/hints.ts index 141b73d955d..953501b7a3d 100644 --- a/packages/workflow-code/src/compile/hints.ts +++ b/packages/workflow-code/src/compile/hints.ts @@ -28,7 +28,7 @@ export const HINTS = { 'A workflow file holds imports and one export default workflow(...); move this inside the workflow body or delete it.', namedExport: 'Only export default workflow(...) is allowed; remove this export.', duplicateKey: 'Write each key once.', - bindInline: 'Declare the block with const and pass its binding.', + bindInline: 'Declare the block with const and pass its name.', } as const /** The hint for an expression or statement outside the accepted grammar. */ diff --git a/packages/workflow-sdk/src/codegen/workspace.ts b/packages/workflow-sdk/src/codegen/workspace.ts index 49681ff1cc0..c0d7f8e61ba 100644 --- a/packages/workflow-sdk/src/codegen/workspace.ts +++ b/packages/workflow-sdk/src/codegen/workspace.ts @@ -2,7 +2,7 @@ * `generateWorkspaceTypes(manifest)`: one `workspace.d.ts` that narrows the SDK to a workspace's * resources (s2 D6). It fills the `Workspace*` interfaces `core.d.ts` declares, so `table('leads')` * types its rows, a misspelled `knowledgeBase('dosc')` or `env.STRIPE_KYE` is an error, and so on. Written by - * `sim workflows source get --out` from the workspace resource manifest; without it every key is a + * `sim workflows source get --dir` from the workspace source resources; without it every key is a * plain string. */ From 9b3f5b418e560c978ed15676d420e16bbb62119c Mon Sep 17 00:00:00 2001 From: Waleed Latif Date: Mon, 16 Nov 2026 01:29:17 -0800 Subject: [PATCH 150/428] test(workflows): browser e2e for the read-only Code tab Chromium against two production-build apps on one database, flag on (with realtime) and off: no Code tab and a persisted code tab falling back when off; read-only Monaco, refresh after a canvas edit and a v2 source apply; the error state on a failed read and when the flag-off app answers 403. Wired as the workflow-code-ui http-e2e group. --- .github/ci-suites.json | 4 + .github/scripts/ci-plan.gql | 2 +- .github/scripts/http-e2e.sh | 57 ++- .../components/panel/components/code/code.tsx | 5 +- apps/sim/package.json | 2 + apps/sim/scripts/test-workflow-code-ui-e2e.ts | 452 ++++++++++++++++++ apps/sim/turbo.json | 7 + scripts/ci-changes.test.ts | 3 + 8 files changed, 528 insertions(+), 4 deletions(-) create mode 100644 apps/sim/scripts/test-workflow-code-ui-e2e.ts diff --git a/.github/ci-suites.json b/.github/ci-suites.json index d8f1e3953fd..787003ff190 100644 --- a/.github/ci-suites.json +++ b/.github/ci-suites.json @@ -47,6 +47,10 @@ { "group": "markdown-viewer", "task": "ci:e2e-markdown-viewer" + }, + { + "group": "workflow-code-ui", + "task": "ci:e2e-workflow-code-ui" } ], "production": [ diff --git a/.github/scripts/ci-plan.gql b/.github/scripts/ci-plan.gql index f393f1a0aed..0198e02d1a0 100644 --- a/.github/scripts/ci-plan.gql +++ b/.github/scripts/ci-plan.gql @@ -6,7 +6,7 @@ query($base: String!, $head: String!) { "ci:e2e-assistant-actions", "ci:e2e-organization-search", "ci:e2e-docs-platform", "ci:e2e-browser-extension", "ci:e2e-project-files", "ci:e2e-mobile", "ci:e2e-seo", - "ci:e2e-markdown-viewer" + "ci:e2e-markdown-viewer", "ci:e2e-workflow-code-ui" ]) { items { name diff --git a/.github/scripts/http-e2e.sh b/.github/scripts/http-e2e.sh index 0669173c0ad..8197d408154 100755 --- a/.github/scripts/http-e2e.sh +++ b/.github/scripts/http-e2e.sh @@ -3,7 +3,7 @@ # CI groups, which reuse the production build from `e2e-build`. # The job extracts it into apps/sim/.next before running these suites. # -# Usage: http-e2e.sh (run from apps/sim) +# Usage: http-e2e.sh (run from apps/sim) # # The job provides DATABASE_URL, BETTER_AUTH_SECRET and ENCRYPTION_KEY; each group sets the rest of # its app's environment here. Reports and server logs land in $RUNNER_TEMP/e2e. @@ -20,7 +20,7 @@ # telemetry flush runs detached and still writes .next/dev). set -euo pipefail -group=${1:?usage: http-e2e.sh } +group=${1:?usage: http-e2e.sh } report_dir="$RUNNER_TEMP/e2e" ready_timeout_seconds=600 mkdir -p "$report_dir" @@ -34,6 +34,9 @@ realtime_tag='' realtime_log='' browsers_pid='' local_app_url='' +extra_pids=() +extra_tags=() +extra_logs=() # `dev` or `start`; a group sets it before start_app. app_server=${E2E_APP_SERVER:-dev} @@ -56,6 +59,13 @@ finish() { tail -n 200 "$server_log" fi fi + for i in "${!extra_pids[@]}"; do + bash "$GITHUB_WORKSPACE/.github/scripts/stop-session.sh" "${extra_pids[$i]}" "${extra_tags[$i]}" || status=1 + wait "${extra_pids[$i]}" 2>/dev/null || true + if [ "$status" -ne 0 ]; then + tail -n 100 "${extra_logs[$i]}" + fi + done if [ -n "$realtime_pid" ]; then bash "$GITHUB_WORKSPACE/.github/scripts/stop-session.sh" "$realtime_pid" "$realtime_tag" || status=1 wait "$realtime_pid" 2>/dev/null || true @@ -119,6 +129,27 @@ start_app() { wait_ready "$server_pid" "$local_app_url/api/health" "$label app" } +# start_extra_app